Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] [WIP] New package: sagemath-9.5.beta5
@ 2021-11-11 14:12 tornaria
  2021-11-11 16:08 ` dkwo
                   ` (248 more replies)
  0 siblings, 249 replies; 250+ messages in thread
From: tornaria @ 2021-11-11 14:12 UTC (permalink / raw)
  To: ml

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

There is a new 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.beta5
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: 4316 bytes --]

From a3f2026d7738a65824d0536677a5cfebff7f5e97 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 1/2] add 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..0ac9d7dda65a 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 9e7ae4a1e0b33ed1ea5cfad89b3f8fa2016324cb 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 2/2] 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..49d835c5f39c
--- /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/"

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta5
  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
                   ` (247 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-11-11 16:08 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-966426866

Comment:
I'd go with `sagemath`.
Is it possible to not build as root, or otherwise pass the option?
```
checking for root user... yes
configure: error: You cannot build Sage as root, switch to an unprivileged user.  (If building in a container, use --enable-build-as-root.)
```
We need more expert advice with relocation.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta5
  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
                   ` (246 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: fosslinux @ 2021-11-12  7:27 UTC (permalink / raw)
  To: ml

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

New comment by fosslinux on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-966883839

Comment:
Should use the `--enable-build-as-root` option

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta5
  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
                   ` (245 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-11-12 20:16 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-967473305

Comment:
With this, at least it gets to the end
```
=> Registering new packages to /host/binpkgs/sagemath
index: added `sage-9.5.beta5_1' (x86_64).
index: 1 packages registered.
=> sage-9.5.beta5_1: removing autodeps, please wait...
=> sage-9.5.beta5_1: cleaning build directory...
=> sage: removing files from destdir...
```
on the `x86_64`
```
make[2]: Leaving directory '/builddir/sage-9.5.beta5/build/make'

real    22m23.377s
user    164m31.944s
sys     6m1.798s
Sage build/upgrade complete!
```
Obviously, it complains that
```
=> sage-9.5.beta5_1: running pre-pkg hook: 99-pkglint ...
=> WARNING: sage-9.5.beta5_1: liblinbox.so.0 not found in common/shlibs!
=> WARNING: sage-9.5.beta5_1: liblrcalc.so.1 not found in common/shlibs!
=> WARNING: sage-9.5.beta5_1: libbrial_groebner.so.3 not found in common/shlibs!
=> WARNING: sage-9.5.beta5_1: libcliquer.so.1 not found in common/shlibs!
=> WARNING: sage-9.5.beta5_1: libpython3.9.so.1.0 not found in common/shlibs!
=> WARNING: sage-9.5.beta5_1: libbrial.so.3 not found in common/shlibs!
=> WARNING: sage-9.5.beta5_1: libgap.so.0 not found in common/shlibs!
=> WARNING: sage-9.5.beta5_1: libbraiding.so.0 not found in common/shlibs!
=> WARNING: sage-9.5.beta5_1: libhomfly.so.0 not found in common/shlibs!
```
and lots of `=> WARNING: sage-9.5.beta5_1: removed empty dir: ...`

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (2 preceding siblings ...)
  2021-11-12 20:16 ` dkwo
@ 2021-11-12 20:22 ` dkwo
  2021-11-12 20:28 ` dkwo
                   ` (244 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-11-12 20:22 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-967482959

Comment:
Other than that, it installs fine.
I will run doctests and perhaps test on musl, but it looks not so bad.
```
[nicolo@mabragor ~]$ sage
/usr/lib/sage-9.5.beta5/bin/sage-env: line 122: cd: /builddir/sage-9.5.beta5: No such file or directory
Warning: overwriting SAGE_ROOT environment variable:
Old SAGE_ROOT=/builddir/sage-9.5.beta5
New SAGE_ROOT=
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 9.5.beta5, Release Date: 2021-10-28               │
│ Using Python 3.9.7. Type "help()" for help.                        │
└────────────────────────────────────────────────────────────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Warning: this is a prerelease version, and it may be unstable.     ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
sage: 2+2
4
```

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (3 preceding siblings ...)
  2021-11-12 20:22 ` dkwo
@ 2021-11-12 20:28 ` dkwo
  2021-11-12 20:37 ` dkwo
                   ` (243 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-11-12 20:28 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-967493612

Comment:
Either `./configure --prefix=SAGE_LOCAL` or edit `#SAGE_ROOT=/path/to/sage-version` at the beginning of the scritp should fix that.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (4 preceding siblings ...)
  2021-11-12 20:28 ` dkwo
@ 2021-11-12 20:37 ` dkwo
  2021-11-12 22:06 ` fosslinux
                   ` (242 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-11-12 20:37 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-967508279

Comment:
About the doctests, I'm still unable to perform them
From within sage
```
sage: run_doctests(sage.combinat.affine_permutation)
too few successful tests, not using stored timings
Running doctests with ID 2021-11-12-21-34-16-32069d04.
Using --optional=sage
Doctesting 1 file.
sage -t --random-seed=0 /builddir/sage-9.5.beta5/src/sage/combinat/affine_permutation.py
    FileNotFoundError in doctesting framework
**********************************************************************
Traceback (most recent call last):
  File "/usr/lib/sage-9.5.beta5/lib/python3.9/site-packages/sage/doctest/forker.py", line 2465, in __call__
    doctests, extras = self._run(runner, options, results)
  File "/usr/lib/sage-9.5.beta5/lib/python3.9/site-packages/sage/doctest/forker.py", line 2513, in _run
    doctests, extras = self.source.create_doctests(sage_namespace)
  File "/usr/lib/sage-9.5.beta5/lib/python3.9/site-packages/sage/doctest/sources.py", line 725, in create_doctests
    raise IOError(errno.ENOENT, "File does not exist", self.path)
FileNotFoundError: [Errno 2] File does not exist: '/builddir/sage-9.5.beta5/src/sage/combinat/affine_permutation.py'

----------------------------------------------------------------------
sage -t --random-seed=0 /builddir/sage-9.5.beta5/src/sage/combinat/affine_permutation.py  # FileNotFoundError in doctesting framework
----------------------------------------------------------------------
Total time for all tests: 0.0 seconds
    cpu time: 0.0 seconds
    cumulative wall time: 0.0 seconds
```
From terminal
```
[nicolo@mabragor ~]$ sage --testall
/usr/lib/sage-9.5.beta5/bin/sage-env: line 122: cd: /builddir/sage-9.5.beta5: No such file or directory
Warning: overwriting SAGE_ROOT environment variable:
Old SAGE_ROOT=/builddir/sage-9.5.beta5
New SAGE_ROOT=
Running doctests with ID 2021-11-12-21-36-43-b1335b9b.
Using --optional=dochtml,pip,sage,sage.geometry.polyhedron,sage.rings.real_double
Doctesting entire Sage library.
Traceback (most recent call last):
  File "/usr/lib/sage-9.5.beta5/bin/sage-runtests", line 151, in <module>
    err = DC.run()
  File "/usr/lib/sage-9.5.beta5/lib/python3.9/site-packages/sage/doctest/control.py", line 1251, in run
    self.expand_files_into_sources()
  File "/usr/lib/sage-9.5.beta5/lib/python3.9/site-packages/sage/doctest/control.py", line 835, in expand_files_into_sources
    self.sources = [FileDocTestSource(path, self.options) for path in expand()]
  File "/usr/lib/sage-9.5.beta5/lib/python3.9/site-packages/sage/doctest/control.py", line 835, in <listcomp>
    self.sources = [FileDocTestSource(path, self.options) for path in expand()]
  File "/usr/lib/sage-9.5.beta5/lib/python3.9/site-packages/sage/doctest/sources.py", line 527, in __init__
    raise ValueError("unknown file extension %r"%ext)
ValueError: unknown file extension ''
```
What am I missing?

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (5 preceding siblings ...)
  2021-11-12 20:37 ` dkwo
@ 2021-11-12 22:06 ` fosslinux
  2021-11-12 22:12 ` [PR REVIEW] " Duncaen
                   ` (241 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: fosslinux @ 2021-11-12 22:06 UTC (permalink / raw)
  To: ml

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

New comment by fosslinux on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-967659661

Comment:
You can ignore the `common/shlibs` and `empty dir` messages.

The doctest failures probably have something to do with using python 3.9; why is this?

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [PR REVIEW] [WIP] New package: sagemath-9.5.beta5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (6 preceding siblings ...)
  2021-11-12 22:06 ` fosslinux
@ 2021-11-12 22:12 ` Duncaen
  2021-11-13  1:27 ` tornaria
                   ` (240 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: Duncaen @ 2021-11-12 22:12 UTC (permalink / raw)
  To: ml

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

New review comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#discussion_r748614634

Comment:
things like this should be quoted.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (7 preceding siblings ...)
  2021-11-12 22:12 ` [PR REVIEW] " Duncaen
@ 2021-11-13  1:27 ` tornaria
  2021-11-13  1:30 ` tornaria
                   ` (239 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-11-13  1:27 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-967754923

Comment:
> We need more expert advice with relocation.

I think one way would be to compile sage in-place, then remove all unnecessary stuff (or vinstall all necessary stuff).

I'll give it a try later.

The alternative is how sage builds binary tarballs: compile sage in a directory with a particular pathname (long enough), then search-and-replace this pathname with the location it will be installed.

In their binary tarballs they do this search-and-replace step the first time sage runs after being extracted, in this way sage can be extracted anywhere and will fix its paths the first time it runs. We would do this at xbps-src install time.


^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (8 preceding siblings ...)
  2021-11-13  1:27 ` tornaria
@ 2021-11-13  1:30 ` tornaria
  2021-11-13  1:33 ` tornaria
                   ` (238 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-11-13  1:30 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-967755491

Comment:
> Obviously, it complains that
> 
> ```
> => sage-9.5.beta5_1: running pre-pkg hook: 99-pkglint ...
> => WARNING: sage-9.5.beta5_1: liblinbox.so.0 not found in common/shlibs!
> => WARNING: sage-9.5.beta5_1: liblrcalc.so.1 not found in common/shlibs!
> => WARNING: sage-9.5.beta5_1: libbrial_groebner.so.3 not found in common/shlibs!
> => WARNING: sage-9.5.beta5_1: libcliquer.so.1 not found in common/shlibs!
> => WARNING: sage-9.5.beta5_1: libpython3.9.so.1.0 not found in common/shlibs!
> => WARNING: sage-9.5.beta5_1: libbrial.so.3 not found in common/shlibs!
> => WARNING: sage-9.5.beta5_1: libgap.so.0 not found in common/shlibs!
> => WARNING: sage-9.5.beta5_1: libbraiding.so.0 not found in common/shlibs!
> => WARNING: sage-9.5.beta5_1: libhomfly.so.0 not found in common/shlibs!
> ```

These are false warnings, we don't want this pkg to provide any shlibs and those shlibs will not be in any standard path anyway. As a matter of fact, all of those should eventually be gone and used from system instead.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (9 preceding siblings ...)
  2021-11-13  1:30 ` tornaria
@ 2021-11-13  1:33 ` tornaria
  2021-11-13  3:14 ` [PR PATCH] [Updated] " tornaria
                   ` (237 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-11-13  1:33 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-967756058

Comment:
> You can ignore the `common/shlibs` and `empty dir` messages.
> 
> The doctest failures probably have something to do with using python 3.9; why is this?

No, this is because sage needs the source files to be available, and I didn't include in the pkg. This is not just for testing, but also for inline help. You can see it complains about missing `/builddir/sage-9.5.beta5/...` files, which is where the source files were.

I'll do a second attempt soon.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: sagemath-9.5.beta5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (10 preceding siblings ...)
  2021-11-13  1:33 ` tornaria
@ 2021-11-13  3:14 ` tornaria
  2021-11-13  3:18 ` tornaria
                   ` (236 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-11-13  3:14 UTC (permalink / raw)
  To: ml

[-- 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.beta5
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: 7976 bytes --]

From c3a3d3732b428ccd187895647561cb8233f309e3 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 1/3] add 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..0ac9d7dda65a 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 de92a506b36c787110d68b4c49abd71ae9d50cb5 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 2/3] 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..49d835c5f39c
--- /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 5515c6226a169bba1158fc6464a811d7cb8f259e 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 3/3] 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 49d835c5f39c..fd19d60b2a1d 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/"

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (11 preceding siblings ...)
  2021-11-13  3:14 ` [PR PATCH] [Updated] " tornaria
@ 2021-11-13  3:18 ` tornaria
  2021-11-13  8:59 ` dkwo
                   ` (235 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-11-13  3:18 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-967770614

Comment:
Second draft:
 - rename pkg from sage to sagemath (please remove sage before installing sagemath as I didn't set replaces=)
 - updated sage to sage-9.5.beta6
 - now it builds in place at `/usr/lib/sage-$version`
 - the resulting pkg includes 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).

A useful reference is https://github.com/sagemath/binary-pkg.

Now it's possible to run tests on the installed sage, for instance:
```
$ sage -tp 8 --all
```
to test all with 8 parallel jobs.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (12 preceding siblings ...)
  2021-11-13  3:18 ` tornaria
@ 2021-11-13  8:59 ` dkwo
  2021-11-13  9:02 ` dkwo
                   ` (234 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-11-13  8:59 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-967865094

Comment:
It's getting better.
Could you include your `pyzmq` patch, at least until we're using sage's python modules, so that it also builds on `musl`?

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (13 preceding siblings ...)
  2021-11-13  8:59 ` dkwo
@ 2021-11-13  9:02 ` dkwo
  2021-11-13  9:28 ` dkwo
                   ` (233 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-11-13  9:02 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-967870203

Comment:
>     * now it builds in place at `/usr/lib/sage-$version`

@leahneukirchen What do you think?

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (14 preceding siblings ...)
  2021-11-13  9:02 ` dkwo
@ 2021-11-13  9:28 ` dkwo
  2021-11-13  9:36 ` dkwo
                   ` (232 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-11-13  9:28 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-967916355

Comment:
>     * the resulting pkg includes 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).

Definitely :)
`Size required on disk:        7300MB `

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (15 preceding siblings ...)
  2021-11-13  9:28 ` dkwo
@ 2021-11-13  9:36 ` dkwo
  2021-11-13 10:22 ` dkwo
                   ` (231 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-11-13  9:36 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-967928792

Comment:
Dumb question: does this in htop mean it is using system python? 
`python3 /usr/lib/sage-9.5.beta6/src/bin/sage-runtests -p 12 --all`

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (16 preceding siblings ...)
  2021-11-13  9:36 ` dkwo
@ 2021-11-13 10:22 ` dkwo
  2021-11-13 10:48 ` dkwo
                   ` (230 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-11-13 10:22 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-968008642

Comment:
Could you add `gengetopt` to the makedepends?

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (17 preceding siblings ...)
  2021-11-13 10:22 ` dkwo
@ 2021-11-13 10:48 ` dkwo
  2021-11-13 10:50 ` [PR PATCH] [Updated] " tornaria
                   ` (229 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-11-13 10:48 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-968048978

Comment:
It seems `giac` is not picked up, could you add it also to `depends`?
```
 RuntimeError: unable to start giac because the command 'giac --sage' failed: The command was not found or was not executable: giac.

    In order to use the Giac interface you need to have Giac installed
    and have a program called "giac" in your PATH. You need a giac version
    supporting "giac --sage" ( roughly after 0.9.1 of march 2011). Some giac
    instructions  and the help's langage depend of you LANG variable. To obtain
    inline help for  giac commands, you also need to have the program "cas_help"
    in your PATH.
```

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: sagemath-9.5.beta5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (18 preceding siblings ...)
  2021-11-13 10:48 ` dkwo
@ 2021-11-13 10:50 ` tornaria
  2021-11-13 10:59 ` tornaria
                   ` (228 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-11-13 10:50 UTC (permalink / raw)
  To: ml

[-- 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.beta5
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: 10469 bytes --]

From 5701339d82dc6127ada60ee9487a4a0e9186adb5 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 1/4] 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 e5df033c986d4451162ba9d605bc2438b4e35461 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 2/4] 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 0e85019dec9235654b682c14f80e0fdf8f5b6c0b 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 3/4] 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 b0a333cb0447a65134497b60a91a443d3a5f4132 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 4/4] 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..8cbfc4023df3 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
+ gengetopts texinfo
 "
 
 # TODO: standard

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: sagemath-9.5.beta5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (19 preceding siblings ...)
  2021-11-13 10:50 ` [PR PATCH] [Updated] " tornaria
@ 2021-11-13 10:59 ` tornaria
  2021-11-13 11:05 ` tornaria
                   ` (227 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-11-13 10:59 UTC (permalink / raw)
  To: ml

[-- 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.beta5
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: 10468 bytes --]

From 5701339d82dc6127ada60ee9487a4a0e9186adb5 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 1/4] 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 e5df033c986d4451162ba9d605bc2438b4e35461 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 2/4] 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 0e85019dec9235654b682c14f80e0fdf8f5b6c0b 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 3/4] 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 ad557eb75ef34ad8c4c2febd27e9b90f0f28c21b 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 4/4] 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

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (20 preceding siblings ...)
  2021-11-13 10:59 ` tornaria
@ 2021-11-13 11:05 ` tornaria
  2021-11-13 11:42 ` tornaria
                   ` (226 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-11-13 11:05 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-968050979

Comment:
New on sagemath-9.5.beta6_2:
 - include patch fixing build of pyzmq on musl
 - add gengetopts and texinfo to makedepends
 - first attempt at cleanup: remove upstream sources and build artifacts

This one should save ~ 3.8G installed size.

Again, it should be possible to run tests on the installed sage, for instance:
```
$ sage -tp 8 --all
```
to test all with 8 parallel jobs. There are a few tests failing will look into it when I get a chance. It may also be useful to compare tests failing on `./xbps-src check sagemath` vs test failing on installed sage.
```
----------------------------------------------------------------------
sage -t --random-seed=45812884732240074843516850899920199933 /usr/lib/sage-9.5.beta6/src/sage/env.py  # 1 doctest failed
sage -t --random-seed=45812884732240074843516850899920199933 /usr/lib/sage-9.5.beta6/src/sage/functions/min_max.py  # 2 doctests failed
sage -t --random-seed=45812884732240074843516850899920199933 /usr/lib/sage-9.5.beta6/src/sage/lfunctions/sympow.py  # 10 doctests failed
sage -t --random-seed=45812884732240074843516850899920199933 /usr/lib/sage-9.5.beta6/src/sage/lfunctions/pari.py  # 1 doctest failed
sage -t --random-seed=45812884732240074843516850899920199933 /usr/lib/sage-9.5.beta6/src/sage/modular/abvar/abvar.py  # 1 doctest failed
sage -t --random-seed=45812884732240074843516850899920199933 /usr/lib/sage-9.5.beta6/src/sage/modular/hecke/submodule.py  # 1 doctest failed
sage -t --random-seed=45812884732240074843516850899920199933 /usr/lib/sage-9.5.beta6/src/sage/repl/ipython_kernel/install.py  # 1 doctest failed
sage -t --random-seed=45812884732240074843516850899920199933 /usr/lib/sage-9.5.beta6/src/sage/schemes/elliptic_curves/ell_rational_field.py  # 9 doctests failed
sage -t --random-seed=45812884732240074843516850899920199933 /usr/lib/sage-9.5.beta6/src/sage_docbuild/__init__.py  # 1 doctest failed
sage -t --random-seed=45812884732240074843516850899920199933 /usr/lib/sage-9.5.beta6/src/sage_setup/find.py  # 3 doctests failed
sage -t --random-seed=45812884732240074843516850899920199933 /usr/lib/sage-9.5.beta6/src/sage/tests/cmdline.py  # 1 doctest failed
----------------------------------------------------------------------
Total time for all tests: 1186.4 seconds
    cpu time: 7017.0 seconds
    cumulative wall time: 8303.5 seconds
```

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (21 preceding siblings ...)
  2021-11-13 11:05 ` tornaria
@ 2021-11-13 11:42 ` tornaria
  2021-11-13 12:30 ` dkwo
                   ` (225 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-11-13 11:42 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-968055202

Comment:
> It seems `giac` is not picked up, could you add it also to `depends`?

Good point, we have to explicitly add anything that is needed at runtime that is not implicitly required by shlibs. Maybe we should try to run all tests in a barebones chroot with only sagemath installed.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (22 preceding siblings ...)
  2021-11-13 11:42 ` tornaria
@ 2021-11-13 12:30 ` dkwo
  2021-11-13 13:48 ` dkwo
                   ` (224 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-11-13 12:30 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-968061042

Comment:
Was the building taking 90+ min on the ci also before?

I'm not yet using a chroot, but my system is quite clean: it seems we also miss `singular, pari` from `depends`.
As a consequence, I was still getting a bit more doctest failures with previous version:
```
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage/tests/cmdline.py  # 5 doctests failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage/schemes/elliptic_curves/ell_rational_field.py  # 14 doctests failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage/rings/number_field/number_field.py  # 6 doctests failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage/misc/sageinspect.py  # 35 doctests failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage/misc/sagedoc.py  # 6 doctests failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage/modular/abvar/abvar.py  # 1 doctest failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage/rings/number_field/number_field_element.pyx  # 2 doctests failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage/modular/hecke/submodule.py  # 1 doctest failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage/rings/integer.pyx  # 1 doctest failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage/repl/ipython_extension.py  # 6 doctests failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage/graphs/connectivity.pyx  # 2 doctests failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage/parallel/decorate.py  # 2 doctests failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage/rings/number_field/number_field_rel.py  # 1 doctest failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage/rings/number_field/galois_group.py  # 11 doctests failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage/misc/persist.pyx  # 2 doctests failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage/structure/element.pyx  # 37 doctests failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage/misc/inline_fortran.py  # 3 doctests failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage/functions/min_max.py  # 2 doctests failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage_docbuild/__init__.py  # 5 doctests failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage/features/__init__.py  # 2 doctests failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage/lfunctions/pari.py  # 1 doctest failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage_setup/find.py  # 3 doctests failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage/misc/superseded.py  # 6 doctests failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage/groups/galois_group.py  # 2 doctests failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage/interfaces/gp.py  # 1 doctest failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage/groups/perm_gps/permgroup_morphism.py  # 3 doctests failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage/env.py  # 4 doctests failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage/rings/polynomial/ore_polynomial_element.pyx  # 6 doctests failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage/repl/ipython_kernel/install.py  # 1 doctest failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage/tests/books/judson-abstract-algebra/galois-sage.py  # 5 doctests
 failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage/rings/tate_algebra_ideal.pyx  # 6 doctests failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage/lfunctions/sympow.py  # 10 doctests failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage/interfaces/qsieve.py  # 7 doctests failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage/misc/cython.py  # 21 doctests failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage/structure/factory.pyx  # 8 doctests failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage/graphs/graph_decompositions/fast_digraph.pyx  # 5 doctests failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage/misc/session.pyx  # 2 doctests failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage/misc/lazy_attribute.pyx  # 3 doctests failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage/ext/memory_allocator.pxd  # 3 doctests failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage/ext/memory_allocator.pyx  # 7 doctests failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage/groups/pari_group.py  # 2 doctests failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage/misc/nested_class.pyx  # 6 doctests failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage/arith/long.pxd  # 14 doctests failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage/repl/load.py  # 2 doctests failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage/docs/instancedoc.pyx  # 4 doctests failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage/cpython/cython_metaclass.pyx  # 4 doctests failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage/rings/integer_fake.pxd  # 1 doctest failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage/cpython/wrapperdescr.pxd  # 6 doctests failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage/symbolic/pynac.pxi  # 1 doctest failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage/misc/inherit_comparison.pyx  # 5 doctests failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage/cpython/string.pyx  # 1 doctest failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage/docs/conf.py  # 1 doctest failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage/cpython/getattr.pyx  # 4 doctests failed
sage -t --random-seed=210801943898287344358194260905231821388 /usr/lib/sage-9.5.beta6/src/sage/misc/cachefunc.pyx  # 54 doctests failed
```

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (23 preceding siblings ...)
  2021-11-13 12:30 ` dkwo
@ 2021-11-13 13:48 ` dkwo
  2021-11-13 13:50 ` dkwo
                   ` (223 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-11-13 13:48 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-968071538

Comment:
perhaps also add to depends: flintqs pari-datapkgs and zn_poly

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (24 preceding siblings ...)
  2021-11-13 13:48 ` dkwo
@ 2021-11-13 13:50 ` dkwo
  2021-11-13 13:53 ` leahneukirchen
                   ` (222 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-11-13 13:50 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-968071841

Comment:
Sorry, forget about singular and pari.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (25 preceding siblings ...)
  2021-11-13 13:50 ` dkwo
@ 2021-11-13 13:53 ` leahneukirchen
  2021-11-13 14:20 ` leahneukirchen
                   ` (221 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: leahneukirchen @ 2021-11-13 13:53 UTC (permalink / raw)
  To: ml

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

New comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-968072324

Comment:
Running the test suite also requires git.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (26 preceding siblings ...)
  2021-11-13 13:53 ` leahneukirchen
@ 2021-11-13 14:20 ` leahneukirchen
  2021-11-13 14:22 ` leahneukirchen
                   ` (220 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: leahneukirchen @ 2021-11-13 14:20 UTC (permalink / raw)
  To: ml

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

New comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-968075951

Comment:
Also sympow.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (27 preceding siblings ...)
  2021-11-13 14:20 ` leahneukirchen
@ 2021-11-13 14:22 ` leahneukirchen
  2021-11-13 14:55 ` leahneukirchen
                   ` (219 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: leahneukirchen @ 2021-11-13 14:22 UTC (permalink / raw)
  To: ml

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

New comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-968075951

Comment:
Also sympow.

We may want to add this patch: https://gitweb.gentoo.org/repo/gentoo.git/tree/sci-mathematics/sympow/files/sympow-2.023.6-no-pkgdatafilesbindir-warnings.patch

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (28 preceding siblings ...)
  2021-11-13 14:22 ` leahneukirchen
@ 2021-11-13 14:55 ` leahneukirchen
  2021-11-13 14:58 ` leahneukirchen
                   ` (218 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: leahneukirchen @ 2021-11-13 14:55 UTC (permalink / raw)
  To: ml

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

New comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-968081092

Comment:
I made all but 6 tests pass:

> sage -t --random-seed=2922128458579573960176688891507420022 usr/lib/sage-9.5.beta6/src/sage/functions/min_max.py  # 2 doctests failed

Lack of symbolic execution and wrong rounding, this one should be investigated.

> sage -t --random-seed=2922128458579573960176688891507420022 usr/lib/sage-9.5.beta6/src/sage/lfunctions/pari.py  # 1 doctest failed

Just a warning: `      ***   Warning: normalizing a series with 0 leading term.`

> sage -t --random-seed=2922128458579573960176688891507420022 usr/lib/sage-9.5.beta6/src/sage_setup/find.py  # 1 doctest failed

`find_extra_files`, not sure why there should be a `wrapper_cdf.h`.

> sage -t --random-seed=2922128458579573960176688891507420022 usr/lib/sage-9.5.beta6/src/sage/env.py  # 1 doctest failed

`_get_shared_lib_path` may be broken

> sage -t --random-seed=2922128458579573960176688891507420022 usr/lib/sage-9.5.beta6/src/sage/misc/sagedoc.py  # 4 doctests failed
> sage -t --random-seed=2922128458579573960176688891507420022 usr/lib/sage-9.5.beta6/src/sage/docs/conf.py  # 1 doctest failed

No docs are installed.


^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (29 preceding siblings ...)
  2021-11-13 14:55 ` leahneukirchen
@ 2021-11-13 14:58 ` leahneukirchen
  2021-11-13 15:00 ` dkwo
                   ` (217 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: leahneukirchen @ 2021-11-13 14:58 UTC (permalink / raw)
  To: ml

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

New comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-968081422

Comment:
Also we should install pytest with `sage --pip install` to have more tests.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (30 preceding siblings ...)
  2021-11-13 14:58 ` leahneukirchen
@ 2021-11-13 15:00 ` dkwo
  2021-11-13 15:07 ` leahneukirchen
                   ` (216 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-11-13 15:00 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-968081812

Comment:
Very well.
Indeed, sage uses the same patch for sympow, see https://git.sagemath.org/sage.git/tree/build/pkgs/sympow

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (31 preceding siblings ...)
  2021-11-13 15:00 ` dkwo
@ 2021-11-13 15:07 ` leahneukirchen
  2021-11-13 15:11 ` leahneukirchen
                   ` (215 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: leahneukirchen @ 2021-11-13 15:07 UTC (permalink / raw)
  To: ml

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

New comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-968082964

Comment:
> sage -t --warn-long 35.7 --random-seed=327098103431076596046796804314805549386 usr/lib/sage-9.5.beta6/src/sage>/rings/tate_algebra_ideal.pyx
May be a upstream bug, does someone want to report?

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (32 preceding siblings ...)
  2021-11-13 15:07 ` leahneukirchen
@ 2021-11-13 15:11 ` leahneukirchen
  2021-11-13 15:28 ` dkwo
                   ` (214 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: leahneukirchen @ 2021-11-13 15:11 UTC (permalink / raw)
  To: ml

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

New comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-968083600

Comment:
> sage -t --warn-long 35.7 --random-seed=327098103431076596046796804314805549386 usr/lib/sage-9.5.beta6/src/sage/tests/cmdline.py

Not sure about that one, has a missing fixture?

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (33 preceding siblings ...)
  2021-11-13 15:11 ` leahneukirchen
@ 2021-11-13 15:28 ` dkwo
  2021-11-13 15:34 ` leahneukirchen
                   ` (213 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-11-13 15:28 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-968085864

Comment:
@leahneukirchen Did you find anything missing other than these?
```
+depends="giac git FlintQS zn_poly sympow
+ pari-elldata-small pari-galdata pari-galpol-small pari-seadata"
```
Are you also testing with `sage -tp NUM --all` ?

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (34 preceding siblings ...)
  2021-11-13 15:28 ` dkwo
@ 2021-11-13 15:34 ` leahneukirchen
  2021-11-14  4:42 ` ericonr
                   ` (212 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: leahneukirchen @ 2021-11-13 15:34 UTC (permalink / raw)
  To: ml

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

New comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-968086750

Comment:
These: flintlib-devel gsl-devel ntl-devel eclib-devel pari-devel mpfr-devel m4ri-devel gd-devel libpng-devel fflas-ffpack pkg-config gcc-fortran 

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (35 preceding siblings ...)
  2021-11-13 15:34 ` leahneukirchen
@ 2021-11-14  4:42 ` ericonr
  2021-11-14  4:43 ` ericonr
                   ` (211 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: ericonr @ 2021-11-14  4:42 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-968205411

Comment:
I maintain my comment from https://github.com/void-linux/void-packages/pull/34053#issuecomment-968073629

> _get_shared_lib_path may be broken

Could a patch like https://github.com/void-linux/void-packages/blob/67adbca402734d3a4fabab246e355850bf7b736b/srcpkgs/python3/patches/musl-find_library.patch be necessary?

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (36 preceding siblings ...)
  2021-11-14  4:42 ` ericonr
@ 2021-11-14  4:43 ` ericonr
  2021-11-14 14:27 ` leahneukirchen
                   ` (210 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: ericonr @ 2021-11-14  4:43 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-968205411

Comment:
I keep my comment from https://github.com/void-linux/void-packages/pull/34053#issuecomment-968073629

> _get_shared_lib_path may be broken

Could a patch like https://github.com/void-linux/void-packages/blob/67adbca402734d3a4fabab246e355850bf7b736b/srcpkgs/python3/patches/musl-find_library.patch be necessary?

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (37 preceding siblings ...)
  2021-11-14  4:43 ` ericonr
@ 2021-11-14 14:27 ` leahneukirchen
  2021-11-14 15:20 ` tornaria
                   ` (209 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: leahneukirchen @ 2021-11-14 14:27 UTC (permalink / raw)
  To: ml

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

New comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-968301144

Comment:
I tried on glibc, not sure how that patch would help?

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (38 preceding siblings ...)
  2021-11-14 14:27 ` leahneukirchen
@ 2021-11-14 15:20 ` tornaria
  2021-11-14 16:31 ` leahneukirchen
                   ` (208 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-11-14 15:20 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-968310951

Comment:
> These: flintlib-devel gsl-devel ntl-devel eclib-devel pari-devel mpfr-devel m4ri-devel gd-devel libpng-devel fflas-ffpack pkg-config gcc-fortran

Are all those `*-devel` pkgs really necessary for running sage?

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (39 preceding siblings ...)
  2021-11-14 15:20 ` tornaria
@ 2021-11-14 16:31 ` leahneukirchen
  2021-11-14 21:28 ` [PR PATCH] [Updated] " tornaria
                   ` (207 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: leahneukirchen @ 2021-11-14 16:31 UTC (permalink / raw)
  To: ml

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

New comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-968323262

Comment:
For just running, no. But some doctests need it.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: sagemath-9.5.beta5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (40 preceding siblings ...)
  2021-11-14 16:31 ` leahneukirchen
@ 2021-11-14 21:28 ` tornaria
  2021-11-14 21:47 ` tornaria
                   ` (206 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-11-14 21:28 UTC (permalink / raw)
  To: ml

[-- 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.beta5
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: 13268 bytes --]

From 5701339d82dc6127ada60ee9487a4a0e9186adb5 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 1/5] 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 e5df033c986d4451162ba9d605bc2438b4e35461 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 2/5] 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 0e85019dec9235654b682c14f80e0fdf8f5b6c0b 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 3/5] 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 ad557eb75ef34ad8c4c2febd27e9b90f0f28c21b 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 4/5] 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 5c604df178fb44f4e1fa1cf02a96582f672e5fdd 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 5/5] 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

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (41 preceding siblings ...)
  2021-11-14 21:28 ` [PR PATCH] [Updated] " tornaria
@ 2021-11-14 21:47 ` tornaria
  2021-11-15 15:58 ` leahneukirchen
                   ` (205 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-11-14 21:47 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-968369692

Comment:
New on sagemath-9.5.beta6_3:
     - 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` (unexpected... let's try and be alert in case problems arise)
     - 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.

The doctest failures for `sympow` should be fixed when #34077 is merged.

At some point I plan on:
 - investigating all the doctest failures, try to fix them or find a workaround (goal: enable check and still have CI pass)
 - investigate https://trac.sagemath.org/ticket/30766 to see if we can get it working on system python 3.10.
 - add more packages to void:
    - standard pkgs missing: `brial cliquer gfan libbraiding libhomfly lrcalc nauty palp pdf2svg tachyon`
    - optional pkgs missing: `4ti2 coxeter3 libnauty libsemigroups lrslib perl_mongodb`

Note that https://trac.sagemath.org/ticket/30766 mentions some updates necessary to support python 3.10, some of which we don't have, namely:
 - `python3-Babel` update to 2.9.1
 - `python3-traitlets` update to 5.1.1
 - `python3-distlib` update to 0.3.3

Most probably I won't have time to follow up much on this PR before next weekend.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (42 preceding siblings ...)
  2021-11-14 21:47 ` tornaria
@ 2021-11-15 15:58 ` leahneukirchen
  2021-11-15 16:16 ` tornaria
                   ` (204 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: leahneukirchen @ 2021-11-15 15:58 UTC (permalink / raw)
  To: ml

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

New comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-969053713

Comment:
I think we are still installing too much. Wouldn't it be enough if /usr/lib/sage was $SAGELOCAL?

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (43 preceding siblings ...)
  2021-11-15 15:58 ` leahneukirchen
@ 2021-11-15 16:16 ` tornaria
  2021-11-17  9:20 ` dkwo
                   ` (203 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-11-15 16:16 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-969072495

Comment:
> I think we are still installing too much. Wouldn't it be enough if /usr/lib/sage was $SAGELOCAL?

That's what revision 1 did, namely: instead of compiling in place, compile in `/build` and use `--prefix=/usr/lib/sage-$version`. Then the whole of $SAGELOCAL ended up in /usr/lib/sage-$version but it didn''t work since sage expects to have all source available for inline help and for doctesting; moreover it was looking for it at `/builddir/sage-$version`, etc...

So from what's installed now (revision 3), we must keep at least `local` and `src`. From the rest `logs` we can definitely kill, I didn't do it just to have it around while we are trying working in case it's useful but it should go. I don't know about `build`, there's 22M left and I would need to look carefully to see what's needed and what's not needed. The rest is small stuff most of it should be safe to remove but I rather have all tests passing before I start pruning.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (44 preceding siblings ...)
  2021-11-15 16:16 ` tornaria
@ 2021-11-17  9:20 ` dkwo
  2021-11-20 22:12 ` [PR PATCH] [Updated] " tornaria
                   ` (202 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-11-17  9:20 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-971388341

Comment:
> Note that https://trac.sagemath.org/ticket/30766 mentions some updates necessary to support python 3.10, some of which we don't have, namely:
> 
>     * `python3-Babel` update to 2.9.1
> 
>     * `python3-traitlets` update to 5.1.1
> 
>     * `python3-distlib` update to 0.3.3
> 

Aren't those shipped by `sage` anyway at the moment though, even if `python3` comes from system?
If so, their priority is on the same level as say `gap`.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: sagemath-9.5.beta5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (45 preceding siblings ...)
  2021-11-17  9:20 ` dkwo
@ 2021-11-20 22:12 ` tornaria
  2021-11-21  9:37 ` dkwo
                   ` (201 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-11-20 22:12 UTC (permalink / raw)
  To: ml

[-- 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.beta5
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: 14379 bytes --]

From 34773deb2ca2fdbea3d61f5cf93e9aec8ac79beb 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 1/6] 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 9bda4cb647d64026e2e82f99ef8a1a251c96c628 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 2/6] 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 21a5106c8b7b48ca751cd71503dc9b0e31f9cc38 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 3/6] 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 38f69160565dc1334195cc3b549e0e99f128056f 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 4/6] 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 4dc5be66df29ef22f8d1a02fc42a974e442686c4 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 5/6] 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 65e8719b8e0e6ee7dc25073e158b843eef7f94e4 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 6/6] 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

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (46 preceding siblings ...)
  2021-11-20 22:12 ` [PR PATCH] [Updated] " tornaria
@ 2021-11-21  9:37 ` dkwo
  2021-11-21 14:00 ` tornaria
                   ` (200 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-11-21  9:37 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-974783747

Comment:
With the `beta7`, using
```
checkdepends=${makedepends}
do_check() {
  ./sage -tp ${XBPS_MAKEJOBS} --all
}
```
I got the same errors as reported in https://github.com/void-linux/void-packages/pull/34030#issuecomment-968081092 , plus a few more ones, of the same nature (rounding errors). Do we have any issue or missing patch with `arb`?
```
sage -t --random-seed=143111302483655198481928268308882618130 src/sage/functions/gamma.py  # 1 doctest failed
File "src/sage/functions/gamma.py", line 1052, in sage.functions.gamma.Function_beta._method_arguments
Failed example:
    RBF(beta(sin(3),sqrt(RBF(2).add_error(1e-8)/3)))
Expected:
    [7.407662 +/- 6.17e-7]
Got:
    [7.4076616 +/- 5.44e-8]

sage -t --random-seed=143111302483655198481928268308882618130 src/sage/rings/complex_arb.pyx  # 3 doctests failed
File "src/sage/rings/complex_arb.pyx", line 4192, in sage.rings.complex_arb.ComplexBall.Ei
Failed example:
    CBF(Ei(I))
Expected:
    [0.337403922900968 +/- 3.76e-16] + [2.51687939716208 +/- 2.01e-15]*I
Got:
    [0.337403922900968 +/- 4.31e-16] + [2.51687939716208 +/- 2.01e-15]*I
**********************************************************************
File "src/sage/rings/complex_arb.pyx", line 4242, in sage.rings.complex_arb.ComplexBall.Ci
Failed example:
    CBF(Ci(I))
Expected:
    [0.837866940980208 +/- 4.72e-16] + [1.570796326794897 +/- 5.54e-16]*I
Got:
    [0.837866940980208 +/- 4.78e-16] + [1.570796326794897 +/- 5.54e-16]*I
**********************************************************************
File "src/sage/rings/complex_arb.pyx", line 4294, in sage.rings.complex_arb.ComplexBall.Chi
Failed example:
    CBF(Chi(I))
Expected:
    [0.337403922900968 +/- 3.25e-16] + [1.570796326794897 +/- 5.54e-16]*I
Got:
    [0.337403922900968 +/- 3.80e-16] + [1.570796326794897 +/- 5.54e-16]*I

sage -t --random-seed=143111302483655198481928268308882618130 src/sage/rings/real_arb.pyx  # 12 doctests failed
File "src/sage/rings/real_arb.pyx", line 3492, in sage.rings.real_arb.RealBall.Ei
Failed example:
    RBF(1).Ei()
Expected:
    [1.89511781635594 +/- 4.94e-15]
Got:
    [1.89511781635594 +/- 5.11e-15]
**********************************************************************
File "src/sage/rings/real_arb.pyx", line 3497, in sage.rings.real_arb.RealBall.Ei
Failed example:
    RBF(Ei(1))
Expected:
    [1.89511781635594 +/- 4.94e-15]
Got:
    [1.89511781635594 +/- 5.11e-15]
**********************************************************************
File "src/sage/rings/real_arb.pyx", line 3534, in sage.rings.real_arb.RealBall.Ci
Failed example:
    RBF(1).Ci()
Expected:
    [0.337403922900968 +/- 3.25e-16]
Got:
    [0.337403922900968 +/- 3.80e-16]
**********************************************************************
File "src/sage/rings/real_arb.pyx", line 3539, in sage.rings.real_arb.RealBall.Ci
Failed example:
    RBF(Ci(1))
Expected:
    [0.337403922900968 +/- 3.25e-16]
Got:
    [0.337403922900968 +/- 3.80e-16]
**********************************************************************
File "src/sage/rings/real_arb.pyx", line 3578, in sage.rings.real_arb.RealBall.Chi
Failed example:
    RBF(1).Chi()
Expected:
    [0.837866940980208 +/- 4.72e-16]
Got:
    [0.837866940980208 +/- 4.78e-16]
**********************************************************************
File "src/sage/rings/real_arb.pyx", line 3583, in sage.rings.real_arb.RealBall.Chi
Failed example:
    RBF(Chi(1))
Expected:
    [0.837866940980208 +/- 4.72e-16]
Got:
    [0.837866940980208 +/- 4.78e-16]
**********************************************************************
File "src/sage/rings/real_arb.pyx", line 3600, in sage.rings.real_arb.RealBall.li
Failed example:
    RBF(3).li()
Expected:
    [2.16358859466719 +/- 4.72e-15]
Got:
    [2.16358859466719 +/- 5.11e-15]
**********************************************************************
File "src/sage/rings/real_arb.pyx", line 3624, in sage.rings.real_arb.RealBall.Li
Failed example:
    RBF(3).Li()
Expected:
    [1.11842481454970 +/- 7.61e-15]
Got:
    [1.11842481454970 +/- 8.00e-15]
**********************************************************************
File "src/sage/rings/real_arb.pyx", line 3651, in sage.rings.real_arb.RealBall.beta
Failed example:
    RBF(sin(3)).beta(RBF(2/3).sqrt())
Expected:
    [7.407661629415 +/- 1.07e-13]
Got:
    [7.4076616294151 +/- 5.60e-14]
**********************************************************************
File "src/sage/rings/real_arb.pyx", line 3653, in sage.rings.real_arb.RealBall.beta
Failed example:
    RealBallField(100)(7/2).beta(1)
Expected:
    [0.28571428571428571428571428571 +/- 5.23e-30]
Got:
    [0.28571428571428571428571428571 +/- 4.93e-30]
**********************************************************************
File "src/sage/rings/real_arb.pyx", line 3688, in sage.rings.real_arb.RealBall.gamma
Failed example:
    RBF(gamma(3/2, RBF(2).sqrt()))
Expected:
    [0.37118875695353 +/- 3.00e-15]
Got:
    [0.37118875695353 +/- 3.01e-15]
**********************************************************************
File "src/sage/rings/real_arb.pyx", line 3690, in sage.rings.real_arb.RealBall.gamma
Failed example:
    RBF(3/2).gamma_inc(RBF(2).sqrt())
Expected:
    [0.37118875695353 +/- 3.00e-15]
Got:
    [0.37118875695353 +/- 3.01e-15]

sage -t --random-seed=143111302483655198481928268308882618130 src/sage/symbolic/function.pyx  # 1 doctest failed
File "src/sage/symbolic/function.pyx", line 629, in sage.symbolic.function.Function._is_numerical
Failed example:
    gamma(b, 1)
Expected:
    [0.50728223 +/- 4.67e-9]
Got:
    [0.507282234 +/- 3.81e-10]
```

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (47 preceding siblings ...)
  2021-11-21  9:37 ` dkwo
@ 2021-11-21 14:00 ` tornaria
  2021-11-21 19:44 ` dkwo
                   ` (199 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-11-21 14:00 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-974822824

Comment:
Are you using system arb? There used to be some issue with rounding in `gamma_fmpq` that was fixed upstream in 2.21.1 (cf https://github.com/fredrik-johansson/arb/commit/450435a84a40acc1871cd84f1caf2ea47c11a18c)

Since sagemath is still shipping 2.19, maybe that's the reason?

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (48 preceding siblings ...)
  2021-11-21 14:00 ` tornaria
@ 2021-11-21 19:44 ` dkwo
  2021-11-22 12:51 ` tornaria
                   ` (198 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-11-21 19:44 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-974882319

Comment:
I believe I'm using system `arb`.
Btw, I have a weird issue: if I build beta7, it only rebuilds sage the library, while using the rest from my system.
Wasn't the build supposed to happen in a chroot? How come it knows I have beta6 installed?

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (49 preceding siblings ...)
  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
                   ` (197 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-11-22 12:51 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-975490505

Comment:
 Report on test failures for `sagemath-9.5.beta7_1` using all possible standard packages from system.

1. Failures due to missing documentation. These are all marked "optional - dochtml".

Solution: disable "dochtml" in the options to test so they are skipped.

```
sage -t --random-seed=297278893996117458976707301988403259133 src/sage/docs/conf.py  # 1 doctest failed
sage -t --random-seed=297278893996117458976707301988403259133 src/sage/misc/sagedoc.py  # 4 doctests failed
```

2. Problem because a new warning in pari 2.13.3

Solution: this will be fixed by https://trac.sagemath.org/ticket/32797

Patch: https://git.sagemath.org/sage.git/patch/?id=f5f7a86908daf60b25e66e6a189c51ada7e0a732

```
sage -t --random-seed=297278893996117458976707301988403259133 src/sage/lfunctions/pari.py  # 1 doctest failed
```

3. Problem because libSingular is used from system

Solution: this will be fixed by https://trac.sagemath.org/ticket/32880

Patch: https://git.sagemath.org/sage.git/patch/?id=17e308fd9d56d022ed28592f93f07ec8dce530ef

```
sage -t --random-seed=297278893996117458976707301988403259133 src/sage/env.py  # 1 doctest failed
```

4. Problem because giac is upgraded to 1.7.0.x

This is reported in https://trac.sagemath.org/ticket/32880

No solution yet

```
sage -t --random-seed=297278893996117458976707301988403259133 src/sage/functions/min_max.py  # 2 doctests failed
```

5. Problems because arb is upgraded to 2.21

This will be fixed by https://trac.sagemath.org/ticket/32905

Note that downgrading the shared lib to arb-2.20.0_1 (without even recompiling sage) makes all of these tests to pass.

Patch: https://git.sagemath.org/sage.git/patch/?id=2ee7b99e0270f80cf03b80418372f45274f46051

```
sage -t --random-seed=297278893996117458976707301988403259133 src/sage/functions/gamma.py  # 1 doctest failed
sage -t --random-seed=297278893996117458976707301988403259133 src/sage/rings/complex_arb.pyx  # 3 doctests failed
sage -t --random-seed=297278893996117458976707301988403259133 src/sage/rings/real_arb.pyx  # 12 doctests failed
sage -t --random-seed=297278893996117458976707301988403259133 src/sage/symbolic/function.pyx  # 1 doctest failed
```


^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (50 preceding siblings ...)
  2021-11-22 12:51 ` tornaria
@ 2021-11-22 13:17 ` dkwo
  2021-11-22 14:30 ` [PR PATCH] [Updated] " tornaria
                   ` (196 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-11-22 13:17 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-975513044

Comment:
Very well, so we are left with
```
src/sage_setup/find.py
src/sage/tests/cmdline.py
src/sage/rings/tate_algebra_ideal.pyx
```
failing, right?
Could you add `https` to distfiles and the newly added packages to makedepends, in the next iteration?

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (51 preceding siblings ...)
  2021-11-22 13:17 ` [WIP] New package: sagemath-9.5.beta7 dkwo
@ 2021-11-22 14:30 ` tornaria
  2021-11-22 14:35 ` tornaria
                   ` (195 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-11-22 14:30 UTC (permalink / raw)
  To: ml

[-- 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.beta7
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: 27063 bytes --]

From 0fc1a24bb0e451b7e38a19567a34917d42ac85e3 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 1/7] 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 39ee86e12aae3feb374fe263d8c977d14f6c19c2 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 2/7] 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 338692887c7186b776b192af8dcc536849cceb8d 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 3/7] 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 21b053172d023a556f022f632af48b5efedefb81 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 4/7] 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 d131943a21b36a2c35b65566cf8ef82652b7574c 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 5/7] 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 0b68044a2f53c384e07956484b673b8a5ef876b8 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 6/7] 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 7dcff791d4a6eccd8584ea713f56346f84661fcc 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 7/7] 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

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (52 preceding siblings ...)
  2021-11-22 14:30 ` [PR PATCH] [Updated] " tornaria
@ 2021-11-22 14:35 ` tornaria
  2021-11-22 14:55 ` tornaria
                   ` (194 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-11-22 14:35 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-975591928

Comment:
New version:
 - add more dependencies
 - add patches so more doctests pass
 - add do_check() to skip building docs
 - use https for distfiles

With this, the only expected doctest failures are the 2 in `src/sage/functions/min_max.py` which seem to be caused by the upgrade to giac-1.7.0 and are reported upstream at https://trac.sagemath.org/ticket/32880 with no fix so far.

The main thing now is to see if this can be made to work with system python 3.10.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (53 preceding siblings ...)
  2021-11-22 14:35 ` tornaria
@ 2021-11-22 14:55 ` tornaria
  2021-11-22 15:22 ` tornaria
                   ` (193 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-11-22 14:55 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-975609798

Comment:
> ```
> src/sage_setup/find.py
> src/sage/tests/cmdline.py
> src/sage/rings/tate_algebra_ideal.pyx
> ```

I get the failure in `cmdline.py` when running tests inside the xbps-src chroot, but not when running outside.

As for the other two, I've never seen them. Are they on musl or glibc?

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (54 preceding siblings ...)
  2021-11-22 14:55 ` tornaria
@ 2021-11-22 15:22 ` tornaria
  2021-11-22 15:30 ` dkwo
                   ` (192 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-11-22 15:22 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-975637205

Comment:
The failures in `cmdline.py` are because we installed pytest... If we don't, then this failures go away.

The second one should go away after https://trac.sagemath.org/ticket/32892. The first one, I don't know.

We could workaround it by not installing pytest in post_build()...



^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (55 preceding siblings ...)
  2021-11-22 15:22 ` tornaria
@ 2021-11-22 15:30 ` dkwo
  2021-11-22 15:30 ` dkwo
                   ` (191 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-11-22 15:30 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-975643915

Comment:
They are on glibc.
Does `sage-9.5.beta7_1 -t --warn-long 35.7 --random-seed=327098103431076596046796804314805549386 /usr/lib/sage-9.5.beta7/src/sage/rings/tate_algebra_ideal.pyx` pass for you (outside of chroot, just in the terminal)?
Same for `sage-9.5.beta7_1 -t --random-seed=2922128458579573960176688891507420022 /usr/lib/sage-9.5.beta7/src/sage_setup/find.py` ?
Btw, I now have
```
$ ls /usr/lib/sage-9.5.beta
sage-9.5.beta5/ sage-9.5.beta6/ sage-9.5.beta7/
```
even after removing `sage` via xbps-remove. Should I remove those by hand?
I thought we added `pytest` to have more tests..

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (56 preceding siblings ...)
  2021-11-22 15:30 ` dkwo
@ 2021-11-22 15:30 ` dkwo
  2021-11-22 15:41 ` dkwo
                   ` (190 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-11-22 15:30 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-975643915

Comment:
They are on glibc.
Does `sage-9.5.beta7_1 -t --warn-long 35.7 --random-seed=327098103431076596046796804314805549386 /usr/lib/sage-9.5.beta7/src/sage/rings/tate_algebra_ideal.pyx` pass for you (outside of chroot, just in the terminal)?
Same for `sage-9.5.beta7_1 -t --random-seed=2922128458579573960176688891507420022 /usr/lib/sage-9.5.beta7/src/sage_setup/find.py` ?
Btw, I now have
```
$ ls /usr/lib/sage-9.5.beta
sage-9.5.beta5/ sage-9.5.beta6/ sage-9.5.beta7/
```
even after removing `sagemath` via xbps-remove. Should I remove those by hand?
I thought we added `pytest` to have more tests..

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (57 preceding siblings ...)
  2021-11-22 15:30 ` dkwo
@ 2021-11-22 15:41 ` dkwo
  2021-11-22 16:30 ` dkwo
                   ` (189 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-11-22 15:41 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-975655162

Comment:
Anyhow, great work.
Now that we run tests in the chroot, shall we trim down the `depends` and what is actually installed?
I guess `giac` was needed there, but not all `devel` stuff (just to run sage).

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (58 preceding siblings ...)
  2021-11-22 15:41 ` dkwo
@ 2021-11-22 16:30 ` dkwo
  2021-11-22 16:35 ` tornaria
                   ` (188 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-11-22 16:30 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-975701012

Comment:
Ok, I stand corrected: if run from inside the chroot, both `src/sage/rings/tate_algebra_ideal.pyx` and `src/sage_setup/find.py` now pass.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (59 preceding siblings ...)
  2021-11-22 16:30 ` dkwo
@ 2021-11-22 16:35 ` tornaria
  2021-11-22 17:09 ` dkwo
                   ` (187 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-11-22 16:35 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-975706551

Comment:
With that particular random-seed it fails every time:
```
$ ./sage -t --random-seed=327098103431076596046796804314805549386 src/sage/rings/tate_algebra_ideal.pyx 
Running doctests with ID 2021-11-22-13-31-59-591c1eef.
Git branch: develop
Using --optional=build,pip,sage,sage.geometry.polyhedron,sage.rings.real_double,sage_spkg,void
Doctesting 1 file.
sage -t --warn-long 36.3 --random-seed=327098103431076596046796804314805549386 src/sage/rings/tate_algebra_ideal.pyx
**********************************************************************
File "src/sage/rings/tate_algebra_ideal.pyx", line 198, in sage.rings.tate_algebra_ideal.TateAlgebraIdeal._contains_
Failed example:
    I.random_element() in I
Expected:
    True
Got:
    False
**********************************************************************
```

The second one I can't reproduce:
```
$ ./sage -t --random-seed=2922128458579573960176688891507420022 src/sage_setup/find.py
Running doctests with ID 2021-11-22-13-33-39-21d4fa99.
Git branch: develop
Using --optional=build,pip,sage,sage.geometry.polyhedron,sage.rings.real_double,sage_spkg,void
Doctesting 1 file.
sage -t --warn-long 36.3 --random-seed=2922128458579573960176688891507420022 src/sage_setup/find.py
    [45 tests, 0.63 s]
----------------------------------------------------------------------
All tests passed!
----------------------------------------------------------------------
```

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (60 preceding siblings ...)
  2021-11-22 16:35 ` tornaria
@ 2021-11-22 17:09 ` dkwo
  2021-11-22 17:28 ` tornaria
                   ` (186 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-11-22 17:09 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-975739343

Comment:
Are these intentional?
`Shebang converted to '#!/usr/bin/python3': /usr/lib/sage-9.5.beta7/src/setup.py`

As for the second, it still fails for me _outside_ of chroot, but perhaps it is just missing stuff.
```
[nicolo@mabragor ~]$ sage-9.5.beta7_1 -t --random-seed=2922128458579573960176688891507420022 /usr/lib/sage-9.5.beta7/src/sage_setup/find
.py
Running doctests with ID 2021-11-22-18-06-28-7269724d.
Git branch: develop
Using --optional=build,pip,sage,sage.geometry.polyhedron,sage.rings.real_double,sage_spkg,void
Doctesting 1 file.
sage -t --warn-long 42.8 --random-seed=2922128458579573960176688891507420022 /usr/lib/sage-9.5.beta7/src/sage_setup/find.py
**********************************************************************
File "/usr/lib/sage-9.5.beta7/src/sage_setup/find.py", line 303, in sage_setup.find.find_extra_files
Failed example:
    extras["sage/ext/interpreters"]
Expected:
    ['.../src/sage/ext/interpreters/wrapper_cdf.pxd', ...wrapper_cdf.h...]
Got:
    ['/usr/lib/sage-9.5.beta7/src/sage/ext/interpreters/wrapper_rr.pxd',
     '/usr/lib/sage-9.5.beta7/src/sage/ext/interpreters/wrapper_cdf.pyx',
     '/usr/lib/sage-9.5.beta7/src/sage/ext/interpreters/wrapper_cc.pyx',
     '/usr/lib/sage-9.5.beta7/src/sage/ext/interpreters/wrapper_rdf.pyx',
     '/usr/lib/sage-9.5.beta7/src/sage/ext/interpreters/wrapper_rdf.pxd',
     '/usr/lib/sage-9.5.beta7/src/sage/ext/interpreters/wrapper_py.pyx',
     '/usr/lib/sage-9.5.beta7/src/sage/ext/interpreters/wrapper_cc.pxd',
     '/usr/lib/sage-9.5.beta7/src/sage/ext/interpreters/wrapper_py.pxd',
     '/usr/lib/sage-9.5.beta7/src/sage/ext/interpreters/wrapper_cdf.pxd',
     '/usr/lib/sage-9.5.beta7/src/sage/ext/interpreters/wrapper_rr.pyx',
     '/usr/lib/sage-9.5.beta7/src/sage/ext/interpreters/wrapper_el.pxd',
     '/usr/lib/sage-9.5.beta7/src/sage/ext/interpreters/wrapper_el.pyx']
**********************************************************************
File "/usr/lib/sage-9.5.beta7/src/sage_setup/find.py", line 364, in sage_setup.find.installed_files_by_module
Failed example:
    (f1, f2) = sorted(files_by_module['sage.structure'])
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/sage-9.5.beta7/local/var/lib/sage/venv-python3.9.7/lib/python3.9/site-packages/sage/doctest/forker.py", line 694, i
n _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/usr/lib/sage-9.5.beta7/local/var/lib/sage/venv-python3.9.7/lib/python3.9/site-packages/sage/doctest/forker.py", line 1088,
in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage_setup.find.installed_files_by_module[5]>", line 1, in <module>
        (f1, f2) = sorted(files_by_module['sage.structure'])
    ValueError: not enough values to unpack (expected 2, got 1)
**********************************************************************
File "/usr/lib/sage-9.5.beta7/src/sage_setup/find.py", line 365, in sage_setup.find.installed_files_by_module
Failed example:
    f1
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/sage-9.5.beta7/local/var/lib/sage/venv-python3.9.7/lib/python3.9/site-packages/sage/doctest/forker.py", line 694, i
n _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/usr/lib/sage-9.5.beta7/local/var/lib/sage/venv-python3.9.7/lib/python3.9/site-packages/sage/doctest/forker.py", line 1088,
in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage_setup.find.installed_files_by_module[6]>", line 1, in <module>
        f1
    NameError: name 'f1' is not defined
**********************************************************************
File "/usr/lib/sage-9.5.beta7/src/sage_setup/find.py", line 367, in sage_setup.find.installed_files_by_module
Failed example:
    f2
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/sage-9.5.beta7/local/var/lib/sage/venv-python3.9.7/lib/python3.9/site-packages/sage/doctest/forker.py", line 694, i
n _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/usr/lib/sage-9.5.beta7/local/var/lib/sage/venv-python3.9.7/lib/python3.9/site-packages/sage/doctest/forker.py", line 1088,
in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage_setup.find.installed_files_by_module[7]>", line 1, in <module>
        f2
    NameError: name 'f2' is not defined
**********************************************************************
**********************************************************************
2 items had failures:
   1 of   7 in sage_setup.find.find_extra_files
   3 of  10 in sage_setup.find.installed_files_by_module
    [45 tests, 4 failures, 0.54 s]
----------------------------------------------------------------------
sage -t --warn-long 42.8 --random-seed=2922128458579573960176688891507420022 /usr/lib/sage-9.5.beta7/src/sage_setup/find.py  # 4 doctest
s failed
----------------------------------------------------------------------
Total time for all tests: 0.6 seconds
    cpu time: 0.5 seconds
    cumulative wall time: 0.5 seconds
========================================================= test session starts ==========================================================
platform linux -- Python 3.9.7, pytest-6.2.5, py-1.10.0, pluggy-1.0.0
rootdir: /usr/lib/sage-9.5.beta7/src, configfile: tox.ini
collected 0 items

=========================================================== warnings summary ===========================================================
../../usr/lib/sage-9.5.beta7/local/var/lib/sage/venv-python3.9.7/lib/python3.9/site-packages/_pytest/cacheprovider.py:428
  /usr/lib/sage-9.5.beta7/local/var/lib/sage/venv-python3.9.7/lib/python3.9/site-packages/_pytest/cacheprovider.py:428: PytestCacheWarni
ng: cache could not write path /usr/lib/sage-9.5.beta7/src/.pytest_cache/v/cache/nodeids
    config.cache.set("cache/nodeids", sorted(self.cached_nodeids))

../../usr/lib/sage-9.5.beta7/local/var/lib/sage/venv-python3.9.7/lib/python3.9/site-packages/_pytest/stepwise.py:49
  /usr/lib/sage-9.5.beta7/local/var/lib/sage/venv-python3.9.7/lib/python3.9/site-packages/_pytest/stepwise.py:49: PytestCacheWarning: ca
che could not write path /usr/lib/sage-9.5.beta7/src/.pytest_cache/v/cache/stepwise
    session.config.cache.set(STEPWISE_CACHE_DIR, [])

-- Docs: https://docs.pytest.org/en/stable/warnings.html
========================================================= 2 warnings in 0.00s ==========================================================
```

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (61 preceding siblings ...)
  2021-11-22 17:09 ` dkwo
@ 2021-11-22 17:28 ` tornaria
  2021-11-22 17:52 ` dkwo
                   ` (185 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-11-22 17:28 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-975490505

Comment:
 Report on test failures for `sagemath-9.5.beta7_1` using all possible standard packages from system.

1. Failures due to missing documentation. These are all marked "optional - dochtml".

Solution: disable "dochtml" in the options to test so they are skipped.

```
sage -t --random-seed=297278893996117458976707301988403259133 src/sage/docs/conf.py  # 1 doctest failed
sage -t --random-seed=297278893996117458976707301988403259133 src/sage/misc/sagedoc.py  # 4 doctests failed
```

2. Problem because a new warning in pari 2.13.3

Solution: this will be fixed by https://trac.sagemath.org/ticket/32797

Patch: https://git.sagemath.org/sage.git/patch/?id=f5f7a86908daf60b25e66e6a189c51ada7e0a732

```
sage -t --random-seed=297278893996117458976707301988403259133 src/sage/lfunctions/pari.py  # 1 doctest failed
```

3. Problem because libSingular is used from system

Solution: this will be fixed by https://trac.sagemath.org/ticket/32880

Patch: https://git.sagemath.org/sage.git/patch/?id=17e308fd9d56d022ed28592f93f07ec8dce530ef

```
sage -t --random-seed=297278893996117458976707301988403259133 src/sage/env.py  # 1 doctest failed
```

4. Problem because giac is upgraded to 1.7.0.x

This is reported in https://trac.sagemath.org/ticket/31563
No solution yet

```
sage -t --random-seed=297278893996117458976707301988403259133 src/sage/functions/min_max.py  # 2 doctests failed
```

5. Problems because arb is upgraded to 2.21

This will be fixed by https://trac.sagemath.org/ticket/32905

Note that downgrading the shared lib to arb-2.20.0_1 (without even recompiling sage) makes all of these tests to pass.

Patch: https://git.sagemath.org/sage.git/patch/?id=2ee7b99e0270f80cf03b80418372f45274f46051

```
sage -t --random-seed=297278893996117458976707301988403259133 src/sage/functions/gamma.py  # 1 doctest failed
sage -t --random-seed=297278893996117458976707301988403259133 src/sage/rings/complex_arb.pyx  # 3 doctests failed
sage -t --random-seed=297278893996117458976707301988403259133 src/sage/rings/real_arb.pyx  # 12 doctests failed
sage -t --random-seed=297278893996117458976707301988403259133 src/sage/symbolic/function.pyx  # 1 doctest failed
```

EDIT: fix a link

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (62 preceding siblings ...)
  2021-11-22 17:28 ` tornaria
@ 2021-11-22 17:52 ` dkwo
  2021-11-22 23:41 ` tornaria
                   ` (184 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-11-22 17:52 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-975775712

Comment:
Also, it would be useful to have a symlink so that sage can be used from jupyterlab.
Arch does it like that:
```
# fix symlinks to assets
  _pythonpath=`python -c "from sysconfig import get_path; print(get_path('platlib'))"`
  for _i in $(ls "$srcdir"/sage-$pkgver/src/sage/ext_data/notebook-ipython); do
    rm "$pkgdir"/usr/share/jupyter/kernels/sagemath/$_i
    ln -s $_pythonpath/sage/ext_data/notebook-ipython/$_i "$pkgdir"/usr/share/jupyter/kernels/sagemath/
  done
```
I'll look into it later.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (63 preceding siblings ...)
  2021-11-22 17:52 ` dkwo
@ 2021-11-22 23:41 ` tornaria
  2021-11-23  3:22 ` [PR PATCH] [Updated] " tornaria
                   ` (183 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-11-22 23:41 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-976010587

Comment:
Doctest failures in `x86_64-musl`:
```
----------------------------------------------------------------------
sage -t --random-seed=263343733075529654576520741661576957914 src/sage/functions/min_max.py  # 2 doctests failed
sage -t --random-seed=263343733075529654576520741661576957914 src/sage/tests/cmdline.py  # 1 doctest failed
sage -t --random-seed=263343733075529654576520741661576957914 src/sage/lfunctions/sympow.py  # 3 doctests failed
sage -t --random-seed=263343733075529654576520741661576957914 src/sage/misc/gperftools.py  # 1 doctest failed
----------------------------------------------------------------------
```

The first two are just the same as in glibc. The second one is actually fixed by just not installing pytest which I'll do in the next commit.

The third one is
```
sage -t --random-seed=263343733075529654576520741661576957914 src/sage/lfunctions/sympow.py
**********************************************************************
File "src/sage/lfunctions/sympow.py", line 279, in sage.lfunctions.sympow.Sympow.analytic_rank
Failed example:
    sympow.analytic_rank(EllipticCurve('389a'))
Expected:
    (2, '7.59317e-01')
Got:
    (2, '7.59316e-01')
**********************************************************************
File "src/sage/lfunctions/sympow.py", line 281, in sage.lfunctions.sympow.Sympow.analytic_rank
Failed example:
    sympow.analytic_rank(EllipticCurve('5077a'))
Expected:
    (3, '1.73185e+00')
Got:
    (3, '1.73184e+00')
**********************************************************************
File "src/sage/lfunctions/sympow.py", line 283, in sage.lfunctions.sympow.Sympow.analytic_rank
Failed example:
    sympow.analytic_rank(EllipticCurve([1, -1, 0, -79, 289]))
Expected:
    (4, '8.94385e+00')
Got:
    (4, '8.94384e+00')
**********************************************************************
1 item had failures:
   3 of   6 in sage.lfunctions.sympow.Sympow.analytic_rank
    [10 tests, 3 failures, 0.90 s]
```
Seems like a mishandling of fpu control words in sympow that affects musl printing routines (I doubt is anything more than printing since all is computed at least to double precision which is ~18 digits it would be unexpected to get a difference in the 6th decimal place).

The last one is
```
sage -t --random-seed=263343733075529654576520741661576957914 src/sage/misc/gperftools.py
**********************************************************************
File "src/sage/misc/gperftools.py", line 118, in sage.misc.gperftools.Profiler._libc
Failed example:
    Profiler()._libc()
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/sage-9.5.beta7/local/var/lib/sage/venv-python3.9.7/lib/python3.9/site-packages/sage/doctest/forker.py", line 694, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/usr/lib/sage-9.5.beta7/local/var/lib/sage/venv-python3.9.7/lib/python3.9/site-packages/sage/doctest/forker.py", line 1088, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.misc.gperftools.Profiler._libc[1]>", line 1, in <module>
        Profiler()._libc()
      File "/usr/lib/sage-9.5.beta7/local/var/lib/sage/venv-python3.9.7/lib/python3.9/site-packages/sage/misc/gperftools.py", line 129, in _libc
        raise ImportError('failed to open libc')
    ImportError: failed to open libc
**********************************************************************
1 item had failures:
   1 of   3 in sage.misc.gperftools.Profiler._libc
    [35 tests, 1 failure, 0.89 s]
```
I'll look into it.


^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (64 preceding siblings ...)
  2021-11-22 23:41 ` tornaria
@ 2021-11-23  3:22 ` tornaria
  2021-11-23  3:25 ` tornaria
                   ` (182 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-11-23  3:22 UTC (permalink / raw)
  To: ml

[-- 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.beta7
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: 42178 bytes --]

From e483ed0e729742ec8eb83eb81d0f7007ad95708e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 22 Nov 2021 19:24:50 -0300
Subject: [PATCH 1/9] sympow: do not mess with fpu control word

It turns out doing that on musl results in wrong output for doubles.
Moreover any cpu with sse2 should not be using fp registers anyway.

For i686 without sse, the configure will figure out that floats are
80 bits and add -ffloat-store to CFLAGS to force them to be 64 bits.

A simple way to test it is to run

    $ sympow -curve '[0,0,0,0,1]' -analrank
    ...
    Analytic Rank is 0 : L-value 7.01091e-01

When broken this prints "7.01092e-01" instead.

The actual value computed to 128 bits with pari is:

    $ echo 'elllseries(ellinit([0,0,0,0,1]),1)' | gp -q
    0.70109105266272713058750953952514706773

so the glibc output is the correct one.

What is broken is not computing but printing, as fmt_fp in musl uses
long double, which means messing with fpu control word breaks it.
This is important since sagemath parses sympow output.

This affects sagemath doctests as in

    $ sage -t src/sage/lfunctions/sympow.py
    ...
    (3 failures)

After this commit, the doctest in question passes.
---
 .../patches/dont-change-fpu-control-word.patch   | 16 ++++++++++++++++
 srcpkgs/sympow/template                          |  2 +-
 2 files changed, 17 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/sympow/patches/dont-change-fpu-control-word.patch

diff --git a/srcpkgs/sympow/patches/dont-change-fpu-control-word.patch b/srcpkgs/sympow/patches/dont-change-fpu-control-word.patch
new file mode 100644
index 000000000000..2a1155111268
--- /dev/null
+++ b/srcpkgs/sympow/patches/dont-change-fpu-control-word.patch
@@ -0,0 +1,16 @@
+--- a/Configure	2021-11-22 22:20:42.512565997 -0300
++++ b/Configure	2021-11-22 23:10:09.986457874 -0300
+@@ -154,9 +154,10 @@
+ done
+ 
+ # Select the most appropriate FPU control scheme
+-for FLAG in '-DISOC99_FENV' '-DFPUCONTROLH' '-Dx86'; do
+-    try_add_CFLAG $FLAG && break
+-done
++## disable messing with fpu control word -- not worth it
++# for FLAG in '-DISOC99_FENV' '-DFPUCONTROLH' '-Dx86'; do
++#     try_add_CFLAG $FLAG && break
++# done
+ 
+ # Some flags to try as last resort.  These hurt performance, so only add
+ # them if needed.
diff --git a/srcpkgs/sympow/template b/srcpkgs/sympow/template
index d484cf847f57..48e2399b72e3 100644
--- a/srcpkgs/sympow/template
+++ b/srcpkgs/sympow/template
@@ -1,7 +1,7 @@
 # Template file for 'sympow'
 pkgname=sympow
 version=2.023.6
-revision=2
+revision=3
 wrksrc=${pkgname}-v${version}
 build_style=configure
 make_build_target=all

From 6b25dfcb8e39077d1283daa31e621c1ac8227454 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 2/9] 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 0962da75c6bb03ae4757480178a1949f3457c41b 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 3/9] 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 7cfead0840766a381c15e94e194645dbeb8df255 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 4/9] 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 63c3e5960b171bdea8a63c08251f904307128c06 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 5/9] 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 6d80881d35949067e13d1b1c8f77525ead03cd00 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 6/9] 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 442e3dfd448344ce1843b68417367a975f2bfc94 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 7/9] 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 f165af50129b01e61b67c57659aa2af0d21e897b 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 8/9] 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 b971fa9d0ce6f514e5a7749d9f14ae843ae57fbe 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 9/9] 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/

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (65 preceding siblings ...)
  2021-11-23  3:22 ` [PR PATCH] [Updated] " tornaria
@ 2021-11-23  3:25 ` tornaria
  2021-11-23  9:22 ` dkwo
                   ` (181 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-11-23  3:25 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-976130713

Comment:
New version:
 - 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...

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (66 preceding siblings ...)
  2021-11-23  3:25 ` tornaria
@ 2021-11-23  9:22 ` dkwo
  2021-11-23 12:16 ` tornaria
                   ` (180 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-11-23  9:22 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-976320284

Comment:
This looks good.
Now on x86_64 (both glibc and musl) only
`sage -t --random-seed=239417738005644781849247931063272806042 src/sage/functions/min_max.py  # 2 doctests failed`
fails, as you pointed out, while on i686 there are also
```
sage -t --random-seed=313681864676731812413561326645236136667 src/sage/geometry/polyhedron/base.py  # Killed due to abort
sage -t --random-seed=313681864676731812413561326645236136667 src/sage/geometry/polyhedron/combinatorial_polyhedron/list_of_faces.pyx  # Killed due to abort
sage -t --random-seed=313681864676731812413561326645236136667 src/sage/geometry/polyhedron/combinatorial_polyhedron/face_iterator.pyx  # Timed out
sage -t --random-seed=313681864676731812413561326645236136667 src/sage/schemes/elliptic_curves/ell_rational_field.py  # 2 doctests failed
```
of which only the last one seems a real failure.
Btw, do we need `linbox` in makedepends at the moment? see
`linbox-1.6.3.p1:                             standard, will be installed as an SPKG`

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (67 preceding siblings ...)
  2021-11-23  9:22 ` dkwo
@ 2021-11-23 12:16 ` tornaria
  2021-11-24 19:28 ` tornaria
                   ` (179 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-11-23 12:16 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-976455781

Comment:
Same here, on 64 bit (glibc and musl) only the single failure due to giac-1.7

> ```
> sage -t --random-seed=313681864676731812413561326645236136667 src/sage/schemes/elliptic_curves/ell_rational_field.py  # 2 doctests failed
> ```
This is due to a faulty sympow on i686, see https://github.com/void-linux/void-packages/pull/34209#issuecomment-976444205


> ```
> sage -t --random-seed=313681864676731812413561326645236136667 src/sage/geometry/polyhedron/base.py  # Killed due to abort
> sage -t --random-seed=313681864676731812413561326645236136667 src/sage/geometry/polyhedron/combinatorial_polyhedron/list_of_faces.pyx  # Killed due to abort
> sage -t --random-seed=313681864676731812413561326645236136667 src/sage/geometry/polyhedron/combinatorial_polyhedron/face_iterator.pyx  # Timed out
> ```

These 3 in polyhedron might also be caused by miscompilation of some external program or library, it would be useful to try to see which external packages are used in those files, remove them from makedepends and recompile/rerun these tests.

In addition to those I also had (on i686)
```
sage -t --random-seed=335940497943411300414171505300249115189 src/sage/functions/orthogonal_polys.py  # Timed out
```

No idea if this is related, but it could also be due to some miscompilation.


> Btw, do we need `linbox` in makedepends at the moment? see `linbox-1.6.3.p1: standard, will be installed as an SPKG`

No, linbox is not picked up from system yet, there is https://trac.sagemath.org/ticket/29631 which I'll try later. Note that the message is different for packages not found (something like "pkg is not available from system, will be installed as SPKG").



^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (68 preceding siblings ...)
  2021-11-23 12:16 ` tornaria
@ 2021-11-24 19:28 ` tornaria
  2021-11-25 22:41 ` tornaria
                   ` (178 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-11-24 19:28 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-976455781

Comment:
Same here, on 64 bit (glibc and musl) only the single failure due to giac-1.7

On i686:

> ```
> sage -t --random-seed=313681864676731812413561326645236136667 src/sage/schemes/elliptic_curves/ell_rational_field.py  # 2 doctests failed
> ```
This is due to a faulty sympow on i686, see https://github.com/void-linux/void-packages/pull/34209#issuecomment-976444205


> ```
> sage -t --random-seed=313681864676731812413561326645236136667 src/sage/geometry/polyhedron/base.py  # Killed due to abort
> sage -t --random-seed=313681864676731812413561326645236136667 src/sage/geometry/polyhedron/combinatorial_polyhedron/list_of_faces.pyx  # Killed due to abort
> sage -t --random-seed=313681864676731812413561326645236136667 src/sage/geometry/polyhedron/combinatorial_polyhedron/face_iterator.pyx  # Timed out
> ```

These 3 in polyhedron might also be caused by miscompilation of some external program or library, it would be useful to try to see which external packages are used in those files, remove them from makedepends and recompile/rerun these tests.

In addition to those I also had (on i686)
```
sage -t --random-seed=335940497943411300414171505300249115189 src/sage/functions/orthogonal_polys.py  # Timed out
```

No idea if this is related, but it could also be due to some miscompilation.


> Btw, do we need `linbox` in makedepends at the moment? see `linbox-1.6.3.p1: standard, will be installed as an SPKG`

No, linbox is not picked up from system yet, there is https://trac.sagemath.org/ticket/29631 which I'll try later. Note that the message is different for packages not found (something like "pkg is not available from system, will be installed as SPKG").



^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (69 preceding siblings ...)
  2021-11-24 19:28 ` tornaria
@ 2021-11-25 22:41 ` tornaria
  2021-11-26  3:04 ` [PR PATCH] [Updated] " tornaria
                   ` (177 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-11-25 22:41 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-975591928

Comment:
New version:
 - add more dependencies
 - add patches so more doctests pass
 - add do_check() to skip building docs
 - use https for distfiles

With this, the only expected doctest failures are the 2 in `src/sage/functions/min_max.py` which seem to be caused by the upgrade to giac-1.7.0 and are reported upstream at https://trac.sagemath.org/ticket/31563 with no fix so far.

The main thing now is to see if this can be made to work with system python 3.10.

Edit: fix link

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (70 preceding siblings ...)
  2021-11-25 22:41 ` tornaria
@ 2021-11-26  3:04 ` tornaria
  2021-11-26  3:12 ` tornaria
                   ` (176 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-11-26  3:04 UTC (permalink / raw)
  To: ml

[-- 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.beta7
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: 45198 bytes --]

From 05b0c3942ad86b95e93f06a7e17ac518ffa1cf9c 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 1/8] 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 262f31eb166bdf8dde211a724d570c5c4f6156d2 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 2/8] 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 701eb7ed5c1cb69f94a8c1faa7bc63392e8e4b53 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 3/8] 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 d15b8d8ffe769fc6e94d39f8f8041ca208574ca1 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 4/8] 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 dc8d1fa87812662564ba7c360f9ccad4bdb2aab4 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 5/8] 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 8180fcfea461af888ee490398f6bbb9b5431a2f3 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 6/8] 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 f5c88fcfbf0927363290cc68718f746356b8ba30 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 7/8] 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 b6265d590293584b50ef1df433845cae39e6f2fa 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 8/8] 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

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (71 preceding siblings ...)
  2021-11-26  3:04 ` [PR PATCH] [Updated] " tornaria
@ 2021-11-26  3:12 ` tornaria
  2021-11-26  9:30 ` dkwo
                   ` (175 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-11-26  3:12 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-979655784

Comment:
The new version uses system linbox. Also includes a patch to skip the doctest that fails because of giac 1.7.0 so we expect all tests to pass on x86_64 and x86_64-musl. As for i686, I'll ignore it for now, there are better ways to spend my time and I'm not even sure anyone will use it.

Most of the patches are expected to be merged upstream (probably soon, possibly for 9.5).

The main blocker at this time seems to be making it run on python 3.10.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (72 preceding siblings ...)
  2021-11-26  3:12 ` tornaria
@ 2021-11-26  9:30 ` dkwo
  2021-11-26  9:31 ` dkwo
                   ` (174 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-11-26  9:30 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-979820980

Comment:
Sounds reasonable.
On musl, the failures are not real (I think)
```
sage -t --random-seed=53597881869110074179920514523677232559 src/sage/parallel/map_reduce.py  # Timed out
sage -t --random-seed=53597881869110074179920514523677232559 src/sage/schemes/affine/affine_point.py  # Killed due to kill signal
```
Do you think python3.10 will make it into sage9.5?

Can you bring the `depends` down to what is really necessary, and make sure it removes properly with xbps-remove?
(last time I tried, it left behind `/usr/lib/sage..`)
Maybe this is creating issues?
```
# 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}
```

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (73 preceding siblings ...)
  2021-11-26  9:30 ` dkwo
@ 2021-11-26  9:31 ` dkwo
  2021-11-26  9:33 ` dkwo
                   ` (173 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-11-26  9:31 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-979820980

Comment:
Sounds reasonable.
On musl, the failures are not real (I think)
```
sage -t --random-seed=53597881869110074179920514523677232559 src/sage/parallel/map_reduce.py  # Timed out
sage -t --random-seed=53597881869110074179920514523677232559 src/sage/schemes/affine/affine_point.py  # Killed due to kill signal
```
Do you think python3.10 will make it into sage9.5?

Can you bring the `depends` down to what is really necessary, and make sure it removes properly with xbps-remove?
(last time I tried, it left behind `/usr/lib/sage..`)

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (74 preceding siblings ...)
  2021-11-26  9:31 ` dkwo
@ 2021-11-26  9:33 ` dkwo
  2021-11-26 13:10 ` tornaria
                   ` (172 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-11-26  9:33 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-979820980

Comment:
Sounds reasonable.
On musl, the failures are not real (I think) (and similar for i686)
```
sage -t --random-seed=53597881869110074179920514523677232559 src/sage/parallel/map_reduce.py  # Timed out
sage -t --random-seed=53597881869110074179920514523677232559 src/sage/schemes/affine/affine_point.py  # Killed due to kill signal
```

Do you think python3.10 will make it into sage9.5?

Can you bring the `depends` down to what is really necessary, and make sure it removes properly with xbps-remove?
(last time I tried, it left behind `/usr/lib/sage..`)

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (75 preceding siblings ...)
  2021-11-26  9:33 ` dkwo
@ 2021-11-26 13:10 ` tornaria
  2021-11-27 14:08 ` dkwo
                   ` (171 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-11-26 13:10 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-979968082

Comment:
> Sounds reasonable. On musl, the failures are not real (I think) (and similar for i686)
> 
> ```
> sage -t --random-seed=53597881869110074179920514523677232559 src/sage/parallel/map_reduce.py  # Timed out
> sage -t --random-seed=53597881869110074179920514523677232559 src/sage/schemes/affine/affine_point.py  # Killed due to kill signal
> ```

Why do you mean with "not real" ? Occasionally a timeout could be a false positive: when a test takes too long it could sometimes goes over the timeout (in that case it should has to be tagged as "# long test" so it's still a bug). All of these may be very real, just random. The failures on i686 are definitely real.
  
> Do you think python3.10 will make it into sage9.5?

I don't know, it's progressing slowly.

> Can you bring the `depends` down to what is really necessary,

What should I remove? We have to make sure all tests pass because a failed tests is a missing feature.

> and make sure it removes properly with xbps-remove? (last time I tried, it left behind `/usr/lib/sage..`)

Can you tell me which files are left behind?

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (76 preceding siblings ...)
  2021-11-26 13:10 ` tornaria
@ 2021-11-27 14:08 ` dkwo
  2021-11-28 12:32 ` tornaria
                   ` (170 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-11-27 14:08 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-980633918

Comment:
With regard to removing:
```
[nicolo@mabragor void-packages]$ du /usr/lib/sage-9.5.beta7
du: cannot access '/usr/lib/sage-9.5.beta7': No such file or directory
nicolo@mabragor void-packages]$ xi sagemath
Size required on disk:        3846MB
doas xbps-remove -R sagemath
[nicolo@mabragor void-packages]$ du /usr/lib/sage-9.5.beta7/
4       /usr/lib/sage-9.5.beta7/local/share/gap/bin/x86_64-pc-linux-gnu-default64-kv7
8       /usr/lib/sage-9.5.beta7/local/share/gap/bin
12      /usr/lib/sage-9.5.beta7/local/share/gap
16      /usr/lib/sage-9.5.beta7/local/share
20      /usr/lib/sage-9.5.beta7/local
24      /usr/lib/sage-9.5.beta7/
```
With regard to `depends`: I'm not an expert, but I thought we should not need `-devel` packages to run it. Are tests supposed to pass even for the user or just in the build process?

As for the failures, you may be right.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (77 preceding siblings ...)
  2021-11-27 14:08 ` dkwo
@ 2021-11-28 12:32 ` tornaria
  2021-11-28 13:42 ` tornaria
                   ` (169 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-11-28 12:32 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-981077742

Comment:
After #34273 and https://trac.sagemath.org/ticket/32867 I am able to build sagemath using system maxima and pass all doctests.

I'd appreciate some help / comments with #34273 so it can be merged. 

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (78 preceding siblings ...)
  2021-11-28 12:32 ` tornaria
@ 2021-11-28 13:42 ` tornaria
  2021-11-28 13:52 ` tornaria
                   ` (168 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-11-28 13:42 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-981087871

Comment:
> With regard to removing:
> 
> ```
> 4       /usr/lib/sage-9.5.beta7/local/share/gap/bin/x86_64-pc-linux-gnu-default64-kv7
> ```

This is very strange. A couple of symlinks installed by the package in this directory are not removed. For some reason the `files.plist` is wrong, here's an excerpt:
```
       <dict>
            <key>file</key>
            <string>/usr/lib/sage-9.5.beta7/local/share/gap/bin/x86_64-pc-linux-gnu-default64-kv7/config.h</string>
            <key>mtime</key>
            <integer>1638070346</integer>
            <key>target</key>
            <string>/usr/lib/sage-9.5.beta7/local/share/gap/gen/config.h</string>
        </dict>
        <dict>
            <key>file</key>
            <string>/usr/lib/sage-9.5.beta7/local/share/gap/bin/x86_64-pc-linux-gnu-default64-kv7/gac</string>
            <key>mtime</key>
            <integer>1638070346</integer>
            <key>target</key>
            <string>al/bin/gac</string>
        </dict>
        <dict>
            <key>file</key>
            <string>/usr/lib/sage-9.5.beta7/local/share/gap/bin/x86_64-pc-linux-gnu-default64-kv7/gap</string>
            <key>mtime</key>
            <integer>1638070346</integer>
            <key>target</key>
            <string>al/bin/gap-bin</string>
        </dict>
        <dict>
            <key>file</key>
            <string>/usr/lib/sage-9.5.beta7/local/share/gap/bin/x86_64-pc-linux-gnu-default64-kv7/src</string>
            <key>mtime</key>
            <integer>1638070346</integer>
            <key>target</key>
            <string>/usr/lib/sage-9.5.beta7/local/share/gap/src</string>
        </dict>
```
These are the four symlinks installed in this directory, but two of them are incorrectly reported
Here are the relevant contents of the tarball:
```
$ tar tvf hostdir/binpkgs/sagemath/sagemath-9.5.beta7_1.x86_64.xbps  | grep -e local/share/gap/bin/x86_64-pc-linux-gnu-default64-kv7 -e local/share/gap/ga -e local/bin/ga
lrwxrwxrwx 0/0               0 2021-11-28 00:32 ./usr/lib/sage-9.5.beta7/local/share/gap/gap -> /usr/lib/sage-9.5.beta7/local/bin/gap-bin
lrwxrwxrwx 0/0               0 2021-11-28 00:32 ./usr/lib/sage-9.5.beta7/local/share/gap/gac -> /usr/lib/sage-9.5.beta7/local/bin/gac
lrwxrwxrwx 0/0               0 2021-11-28 00:32 ./usr/lib/sage-9.5.beta7/local/share/gap/bin/x86_64-pc-linux-gnu-default64-kv7/src -> ../../src
lrwxrwxrwx 0/0               0 2021-11-28 00:32 ./usr/lib/sage-9.5.beta7/local/share/gap/bin/x86_64-pc-linux-gnu-default64-kv7/gap -> ../../gap
lrwxrwxrwx 0/0               0 2021-11-28 00:32 ./usr/lib/sage-9.5.beta7/local/share/gap/bin/x86_64-pc-linux-gnu-default64-kv7/gac -> ../../gac
lrwxrwxrwx 0/0               0 2021-11-28 00:32 ./usr/lib/sage-9.5.beta7/local/share/gap/bin/x86_64-pc-linux-gnu-default64-kv7/config.h -> ../../gen/config.h
-rwxr-xr-x 0/0         2248752 2021-11-28 00:32 ./usr/lib/sage-9.5.beta7/local/bin/gap-bin
-rwxr-xr-x 0/0             256 2021-11-28 00:32 ./usr/lib/sage-9.5.beta7/local/bin/gap
-rwxr-xr-x 0/0           12559 2021-11-28 00:32 ./usr/lib/sage-9.5.beta7/local/bin/gac
```
Note that `../../src` and `../../gen/config.h` are ok (point to a directory and a file) while `../../gap` and `../../gac` point to other (absolute) symlinks. Is that the source of trouble? Maybe a bug in `xbps-create`?

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (79 preceding siblings ...)
  2021-11-28 13:42 ` tornaria
@ 2021-11-28 13:52 ` tornaria
  2021-11-28 23:21 ` [PR PATCH] [Updated] " tornaria
                   ` (167 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-11-28 13:52 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-981089325

Comment:
> With regard to `depends`: I'm not an expert, but I thought we should not need `-devel` packages to run it. Are tests supposed to pass even for the user or just in the build process?

I don't care much about pruning the depends list at this point. We can figure out the minimal list later, at this point things are pretty much in flux and I'd rather not get false doctests failures due to forgetting to depend on something. In principle I think that, since doctests are functional, everything that is needed to pass the doctests should be installed for a full experience. Later on, if there's some large package that might be considered "optional" we could figure out whether it makes sense to leave it out.

Note that most math packages (except for some core packages) are updated much much less than sagemath itself and having them split in separate packages as we now do means they are not a toll on sagemath updates, only on first install.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (80 preceding siblings ...)
  2021-11-28 13:52 ` tornaria
@ 2021-11-28 23:21 ` tornaria
  2021-11-28 23:27 ` tornaria
                   ` (166 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-11-28 23:21 UTC (permalink / raw)
  To: ml

[-- 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.beta7
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: 63519 bytes --]

From 0e548f6e328e538757467d2b98ca65614537cca4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 27 Nov 2021 19:38:48 -0300
Subject: [PATCH 01/10] maxima: add a subpkg maxima-ecl needed for sagemath

 - Added a build option 'ecl' (enabled by default)
 - The ecl binary and library will be in a subpkg maxima-ecl so this
   should not affect current users of maxima
 - new patches:
   - a0d7a43...: build a FASL library for ECL (this is merged upstream)
   - handle-multiple-ldflags.patch: otherwise compilation with multiple
     options in LDFLAGS fails (taken from debian)
   - matrixexp.patch: fixes an error in matrix exponentiation (taken
     from debian, this originates in sagemath)

A weak point is that the library maxima.fas is installed in
/usr/lib/ecl-${ecl_version} which is where ecl looks for them, but this
doesn't seem right.

Maybe an alternative would be to have the ecl package ship a symlink at
/usr/lib/ecl pointing to the versioned directory, then have the
maxima-ecl package place its library in the non-versioned directory.
---
 srcpkgs/maxima-ecl                            |  1 +
 ...a43e5234305bd6f1de5909d4ce5d7e1ea864.patch | 24 +++++++++++
 .../patches/handle-multiple-ldflags.patch     | 43 +++++++++++++++++++
 srcpkgs/maxima/patches/matrixexp.patch        | 23 ++++++++++
 srcpkgs/maxima/template                       | 34 ++++++++++++---
 5 files changed, 120 insertions(+), 5 deletions(-)
 create mode 120000 srcpkgs/maxima-ecl
 create mode 100644 srcpkgs/maxima/patches/a0d7a43e5234305bd6f1de5909d4ce5d7e1ea864.patch
 create mode 100644 srcpkgs/maxima/patches/handle-multiple-ldflags.patch
 create mode 100644 srcpkgs/maxima/patches/matrixexp.patch

diff --git a/srcpkgs/maxima-ecl b/srcpkgs/maxima-ecl
new file mode 120000
index 000000000000..b8b0e8240fa4
--- /dev/null
+++ b/srcpkgs/maxima-ecl
@@ -0,0 +1 @@
+maxima
\ No newline at end of file
diff --git a/srcpkgs/maxima/patches/a0d7a43e5234305bd6f1de5909d4ce5d7e1ea864.patch b/srcpkgs/maxima/patches/a0d7a43e5234305bd6f1de5909d4ce5d7e1ea864.patch
new file mode 100644
index 000000000000..e1ac1e5f6086
--- /dev/null
+++ b/srcpkgs/maxima/patches/a0d7a43e5234305bd6f1de5909d4ce5d7e1ea864.patch
@@ -0,0 +1,24 @@
+commit a0d7a43e5234305bd6f1de5909d4ce5d7e1ea864
+Author: Robert Dodier <robert_dodier@users.sourceforge.net>
+Date:   Mon Oct 11 22:40:13 2021 -0700
+
+    Apply patch #80: "Build a FASL library, needed by SageMath"
+    
+    This modifies maxima.system for ECL only.
+
+diff --git a/src/maxima.system b/src/maxima.system
+index d954bc2b9..525fb778e 100644
+--- a/src/maxima.system
++++ b/src/maxima.system
+@@ -75,6 +75,11 @@
+ 			     ;; Convert dir/foo.fas to dir/foo.o
+ 			     (make-pathname :type "o" :defaults p))
+ 			 files)))
++	(c::build-fasl "binary-ecl/maxima" :lisp-files obj
++			  :ld-flags
++			  (let ((x (symbol-value (find-symbol "*AUTOCONF-LD-FLAGS*"
++							      (find-package "MAXIMA")))))
++			    (if (and x (not (string= x ""))) (list x))))
+ 	(c::build-program "binary-ecl/maxima" :lisp-files obj
+ 			  :ld-flags
+ 			  (let ((x (symbol-value (find-symbol "*AUTOCONF-LD-FLAGS*"
diff --git a/srcpkgs/maxima/patches/handle-multiple-ldflags.patch b/srcpkgs/maxima/patches/handle-multiple-ldflags.patch
new file mode 100644
index 000000000000..799fc15f9185
--- /dev/null
+++ b/srcpkgs/maxima/patches/handle-multiple-ldflags.patch
@@ -0,0 +1,43 @@
+Description: Handle multiple LDFLAGS
+ Without this patch, building with LDFLAGS containing more than one flag results 
+ in flags being dropped.
+Author: Graham Inggs <ginggs@debian.org>
+Bug-Debian: http://bugs.debian.org/847925
+
+--- a/src/maxima.system
++++ b/src/maxima.system
+@@ -58,6 +58,19 @@
+     (and (apply #'compile-file file :output-file object-output args)
+ 	 (c:build-fasl output :lisp-files (list object-output)))))
+ 
++(defun split-string (string &key (item #\space) (test #'char=))
++  ;; Splits the string into substrings at spaces.
++  (let ((len (length string))
++	(index 0) result)
++    (dotimes (i len
++		(progn (unless (= index len)
++			 (push (subseq string index) result))
++		       (reverse result)))
++      (when (funcall test (char string i) item)
++	(unless (= index i);; two spaces in a row
++	  (push (subseq string index i) result))
++	(setf index (1+ i))))))
++
+ #+ecl
+ (defun build-maxima-lib ()
+   (labels ((list-all-objects (module)
+@@ -79,12 +92,12 @@
+ 			  :ld-flags
+ 			  (let ((x (symbol-value (find-symbol "*AUTOCONF-LD-FLAGS*"
+ 							      (find-package "MAXIMA")))))
+-			    (if (and x (not (string= x ""))) (list x))))
++			    (if (and x (not (string= x ""))) (split-string x))))
+ 	(c::build-program "binary-ecl/maxima" :lisp-files obj
+ 			  :ld-flags
+ 			  (let ((x (symbol-value (find-symbol "*AUTOCONF-LD-FLAGS*"
+ 							      (find-package "MAXIMA")))))
+-			    (if (and x (not (string= x ""))) (list x)))
++			    (if (and x (not (string= x ""))) (split-string x)))
+ 			  :epilogue-code '(progn (cl-user::run)))))))
+ 
+ (defun maxima-binary-pathname ()
diff --git a/srcpkgs/maxima/patches/matrixexp.patch b/srcpkgs/maxima/patches/matrixexp.patch
new file mode 100644
index 000000000000..7cbd9ccac089
--- /dev/null
+++ b/srcpkgs/maxima/patches/matrixexp.patch
@@ -0,0 +1,23 @@
+Description: Fix error in matrix exponentiation
+ This patch was written by SageMath but not yet committed into Maxima releases.
+ However, it is needed for SageMath to work correctly:
+ .
+ https://git.sagemath.org/sage.git/tree/build/pkgs/maxima/patches/matrixexp.patch
+Author: Peter Bruin <P.J.Bruin@math.leidenuniv.nl>
+Bug-Sage: http://trac.sagemath.org/ticket/13973
+Bug: https://sourceforge.net/p/maxima/bugs/2596/
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/share/linearalgebra/matrixexp.lisp
++++ b/share/linearalgebra/matrixexp.lisp
+@@ -138,8 +138,8 @@
+ 	   (print `(ratvars = ,$ratvars gcd = '$gcd algebraic = ,$algebraic))
+ 	   (print `(ratfac = ,$ratfac))
+ 	   (merror "Unable to find the spectrum")))
+-   
+-    (setq res ($fullratsimp (ncpower (sub (mult z ($ident n)) mat) -1) z))
++
++    (setq res ($fullratsimp ($invert_by_lu (sub (mult z ($ident n)) mat) '$crering) z))
+     (setq m (length sp))
+     (dotimes (i m)
+       (setq zi (nth i sp))
diff --git a/srcpkgs/maxima/template b/srcpkgs/maxima/template
index 3a95e3706447..798b4f9f00de 100644
--- a/srcpkgs/maxima/template
+++ b/srcpkgs/maxima/template
@@ -1,11 +1,11 @@
 # Template file for 'maxima'
 pkgname=maxima
 version=5.45.1
-revision=1
+revision=2
 build_style=gnu-configure
-configure_args="$(vopt_enable clisp) $(vopt_enable sbcl sbcl-exec)"
+configure_args="$(vopt_enable clisp) $(vopt_enable sbcl sbcl-exec) $(vopt_enable ecl)"
 hostmakedepends="python3 perl emacs texinfo"
-makedepends="$(vopt_if clisp clisp) $(vopt_if sbcl sbcl)"
+makedepends="$(vopt_if clisp clisp) $(vopt_if sbcl sbcl) $(vopt_if ecl ecl)"
 depends="$(vopt_if clisp clisp) rlwrap"
 checkdepends="gnuplot"
 short_desc="Computer Algebra System"
@@ -17,10 +17,11 @@ checksum=fe9016276970bef214a1a244348558644514d7fdfaa4fc8b9d0e87afcbb4e7dc
 
 nostrip=yes
 nopie=yes
-build_options="clisp sbcl"
+build_options="clisp sbcl ecl"
 desc_option_clisp="Build with CLISP"
 desc_option_sbcl="Build with SBCL"
-build_options_default="sbcl"
+desc_option_ecl="Build with ECL"
+build_options_default="sbcl ecl"
 vopt_conflict clisp sbcl
 
 post_install() {
@@ -66,3 +67,26 @@ xmaxima_package() {
 			${PKGDESTDIR}/usr/share/pixmaps/maxima
 	}
 }
+
+subpackages="maxima-src maxima-emacs xmaxima"
+
+if [ "$build_option_ecl" ]; then
+	subpackages+=" maxima-ecl"
+fi
+
+maxima-ecl_package() {
+	short_desc+=" - compiled with ECL"
+	depends="${sourcepkg}-${version}_${revision}"
+	pkg_install() {
+		# this is /usr/lib/ecl-${ecl_version}
+		# ideally we would just place it in /usr/lib/ecl but this
+		# doesn't just work
+		# Maybe we can have the ecl package ship a symlink:
+		#     /usr/lib/ecl -> /usr/lib/ecl-${ecl_version}
+		# and have this package just install in /usr/lib/ecl
+		ECLDIR=$(ecl -eval "(princ (SI:GET-LIBRARY-PATHNAME))" -eval "(quit)")
+		vmkdir $ECLDIR
+		vinstall src/binary-ecl/maxima.fas 755 $ECLDIR
+		vmove usr/lib/maxima/${version}/binary-ecl
+	}
+}

From 64d2d52ce7735a14a90d11109a4dbe995012a86e 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 02/10] 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 c5b3a150ee792f28baa86a1b216328e44d21d4cd 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 03/10] 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 33be922b813689246a067d155440ca3f20ba7613 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 04/10] 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 83deef4c801299951748469e63ff807b104c98ce 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 05/10] 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 752a1e1a1cf470fcbf64f37426d7a4908133f225 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 06/10] 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 b2aa4d0f446cc5a257d8d0b55cb82607f38b05a6 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 07/10] 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 f694705d9ed2a6afa657c94fcd629dc3649bdf90 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 08/10] 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 481c143c2524d8456aa3349ec36faa4aee782593 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 09/10] 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 371430a3eecd0419d34135ceba540a12a92c4bc8 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 10/10] 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

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (81 preceding siblings ...)
  2021-11-28 23:21 ` [PR PATCH] [Updated] " tornaria
@ 2021-11-28 23:27 ` tornaria
  2021-11-28 23:32 ` tornaria
                   ` (165 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-11-28 23:27 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-981173383

Comment:
New version:
 - uses system maxima-ecl (from #34273, included in this PR for convenience)
 - fixes the issue with a couple of gap symlinks not being removed by xbps-remove (see https://github.com/void-linux/xbps/issues/435)

As far as I tested, all tests pass on x86_64 (glibc and musl).

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (82 preceding siblings ...)
  2021-11-28 23:27 ` tornaria
@ 2021-11-28 23:32 ` tornaria
  2021-12-02 16:38 ` dkwo
                   ` (164 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-11-28 23:32 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-981174327

Comment:
The only large (non-python-module) packages pending seem to be:
 - gap (https://trac.sagemath.org/ticket/29644, I'm not sure that is usable yet, and it's not being worked out)
 - python 3.10 (https://trac.sagemath.org/ticket/30766, this is not done yet, but it seems to be more active than the gap ticket)

For reference:
 - meta-ticket about system packages is https://trac.sagemath.org/ticket/27330
 - meta-ticket about system python modules is https://trac.sagemath.org/ticket/29023

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (83 preceding siblings ...)
  2021-11-28 23:32 ` tornaria
@ 2021-12-02 16:38 ` dkwo
  2021-12-02 16:44 ` leahneukirchen
                   ` (163 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-12-02 16:38 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-984798114

Comment:
I was trying to make `jupyterlab` pick up sage kernel.
According to the docs, it should be enough to have a symlink of the form
`ln -s $SAGE_LOCAL/share/jupyter/kernels/sagemath $HOME/.local/share/jupyter`
However, we currently have `/usr/lib/sage-9.5.beta7/venv/share/jupyter/kernels/sagemath`, but no `jupyter` folder in `/usr/lib/sage-9.5.beta7/local/share/`.
I wonder whether this is due to our not using `python` from system,
and should work once we use it.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (84 preceding siblings ...)
  2021-12-02 16:38 ` dkwo
@ 2021-12-02 16:44 ` leahneukirchen
  2021-12-02 17:04 ` dkwo
                   ` (162 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: leahneukirchen @ 2021-12-02 16:44 UTC (permalink / raw)
  To: ml

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

New comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-984803795

Comment:
I use `ln -s /usr/lib/sage-9.5.beta7/local/var/lib/sage/venv-python3.9.7/share/jupyter /usr/local/share/`

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (85 preceding siblings ...)
  2021-12-02 16:44 ` leahneukirchen
@ 2021-12-02 17:04 ` dkwo
  2021-12-02 17:12 ` leahneukirchen
                   ` (161 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-12-02 17:04 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-984820811

Comment:
Thanks.
If I do that, and use 'jupyter lab', then it gives

Traceback (most recent call last):
  File "/usr/lib/sage-9.5.beta7/local/var/lib/sage/venv-python3.9.7/bin/sage-config", line 5, in <module>
    from sage_conf import _main
ModuleNotFoundError: No module named 'sage_conf'
/usr/bin/python3: Error while finding module specification for 'sage.repl.ipython_kernel' (ModuleNotFoundError: No module named 'sage')

Does it work smoothly for you?


^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (86 preceding siblings ...)
  2021-12-02 17:04 ` dkwo
@ 2021-12-02 17:12 ` leahneukirchen
  2021-12-04 15:37 ` [PR PATCH] [Updated] " tornaria
                   ` (160 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: leahneukirchen @ 2021-12-02 17:12 UTC (permalink / raw)
  To: ml

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

New comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-984827808

Comment:
That script has a wrong shebang...

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (87 preceding siblings ...)
  2021-12-02 17:12 ` leahneukirchen
@ 2021-12-04 15:37 ` tornaria
  2021-12-04 15:38 ` tornaria
                   ` (159 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-12-04 15:37 UTC (permalink / raw)
  To: ml

[-- 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.beta7
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: 65982 bytes --]

From 5cafb1588eb81db64924f567382a7c5376522e00 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 27 Nov 2021 19:38:48 -0300
Subject: [PATCH 01/12] maxima: add a subpkg maxima-ecl needed for sagemath

 - Added a build option 'ecl' (enabled by default)
 - The ecl binary and library will be in a subpkg maxima-ecl so this
   should not affect current users of maxima
 - new patches:
   - a0d7a43...: build a FASL library for ECL (this is merged upstream)
   - handle-multiple-ldflags.patch: otherwise compilation with multiple
     options in LDFLAGS fails (taken from debian)
   - matrixexp.patch: fixes an error in matrix exponentiation (taken
     from debian, this originates in sagemath)

A weak point is that the library maxima.fas is installed in
/usr/lib/ecl-${ecl_version} which is where ecl looks for them, but this
doesn't seem right.

Maybe an alternative would be to have the ecl package ship a symlink at
/usr/lib/ecl pointing to the versioned directory, then have the
maxima-ecl package place its library in the non-versioned directory.
---
 srcpkgs/maxima-ecl                            |  1 +
 ...a43e5234305bd6f1de5909d4ce5d7e1ea864.patch | 24 +++++++++++
 .../patches/handle-multiple-ldflags.patch     | 43 +++++++++++++++++++
 srcpkgs/maxima/patches/matrixexp.patch        | 23 ++++++++++
 srcpkgs/maxima/template                       | 34 ++++++++++++---
 5 files changed, 120 insertions(+), 5 deletions(-)
 create mode 120000 srcpkgs/maxima-ecl
 create mode 100644 srcpkgs/maxima/patches/a0d7a43e5234305bd6f1de5909d4ce5d7e1ea864.patch
 create mode 100644 srcpkgs/maxima/patches/handle-multiple-ldflags.patch
 create mode 100644 srcpkgs/maxima/patches/matrixexp.patch

diff --git a/srcpkgs/maxima-ecl b/srcpkgs/maxima-ecl
new file mode 120000
index 000000000000..b8b0e8240fa4
--- /dev/null
+++ b/srcpkgs/maxima-ecl
@@ -0,0 +1 @@
+maxima
\ No newline at end of file
diff --git a/srcpkgs/maxima/patches/a0d7a43e5234305bd6f1de5909d4ce5d7e1ea864.patch b/srcpkgs/maxima/patches/a0d7a43e5234305bd6f1de5909d4ce5d7e1ea864.patch
new file mode 100644
index 000000000000..e1ac1e5f6086
--- /dev/null
+++ b/srcpkgs/maxima/patches/a0d7a43e5234305bd6f1de5909d4ce5d7e1ea864.patch
@@ -0,0 +1,24 @@
+commit a0d7a43e5234305bd6f1de5909d4ce5d7e1ea864
+Author: Robert Dodier <robert_dodier@users.sourceforge.net>
+Date:   Mon Oct 11 22:40:13 2021 -0700
+
+    Apply patch #80: "Build a FASL library, needed by SageMath"
+    
+    This modifies maxima.system for ECL only.
+
+diff --git a/src/maxima.system b/src/maxima.system
+index d954bc2b9..525fb778e 100644
+--- a/src/maxima.system
++++ b/src/maxima.system
+@@ -75,6 +75,11 @@
+ 			     ;; Convert dir/foo.fas to dir/foo.o
+ 			     (make-pathname :type "o" :defaults p))
+ 			 files)))
++	(c::build-fasl "binary-ecl/maxima" :lisp-files obj
++			  :ld-flags
++			  (let ((x (symbol-value (find-symbol "*AUTOCONF-LD-FLAGS*"
++							      (find-package "MAXIMA")))))
++			    (if (and x (not (string= x ""))) (list x))))
+ 	(c::build-program "binary-ecl/maxima" :lisp-files obj
+ 			  :ld-flags
+ 			  (let ((x (symbol-value (find-symbol "*AUTOCONF-LD-FLAGS*"
diff --git a/srcpkgs/maxima/patches/handle-multiple-ldflags.patch b/srcpkgs/maxima/patches/handle-multiple-ldflags.patch
new file mode 100644
index 000000000000..799fc15f9185
--- /dev/null
+++ b/srcpkgs/maxima/patches/handle-multiple-ldflags.patch
@@ -0,0 +1,43 @@
+Description: Handle multiple LDFLAGS
+ Without this patch, building with LDFLAGS containing more than one flag results 
+ in flags being dropped.
+Author: Graham Inggs <ginggs@debian.org>
+Bug-Debian: http://bugs.debian.org/847925
+
+--- a/src/maxima.system
++++ b/src/maxima.system
+@@ -58,6 +58,19 @@
+     (and (apply #'compile-file file :output-file object-output args)
+ 	 (c:build-fasl output :lisp-files (list object-output)))))
+ 
++(defun split-string (string &key (item #\space) (test #'char=))
++  ;; Splits the string into substrings at spaces.
++  (let ((len (length string))
++	(index 0) result)
++    (dotimes (i len
++		(progn (unless (= index len)
++			 (push (subseq string index) result))
++		       (reverse result)))
++      (when (funcall test (char string i) item)
++	(unless (= index i);; two spaces in a row
++	  (push (subseq string index i) result))
++	(setf index (1+ i))))))
++
+ #+ecl
+ (defun build-maxima-lib ()
+   (labels ((list-all-objects (module)
+@@ -79,12 +92,12 @@
+ 			  :ld-flags
+ 			  (let ((x (symbol-value (find-symbol "*AUTOCONF-LD-FLAGS*"
+ 							      (find-package "MAXIMA")))))
+-			    (if (and x (not (string= x ""))) (list x))))
++			    (if (and x (not (string= x ""))) (split-string x))))
+ 	(c::build-program "binary-ecl/maxima" :lisp-files obj
+ 			  :ld-flags
+ 			  (let ((x (symbol-value (find-symbol "*AUTOCONF-LD-FLAGS*"
+ 							      (find-package "MAXIMA")))))
+-			    (if (and x (not (string= x ""))) (list x)))
++			    (if (and x (not (string= x ""))) (split-string x)))
+ 			  :epilogue-code '(progn (cl-user::run)))))))
+ 
+ (defun maxima-binary-pathname ()
diff --git a/srcpkgs/maxima/patches/matrixexp.patch b/srcpkgs/maxima/patches/matrixexp.patch
new file mode 100644
index 000000000000..7cbd9ccac089
--- /dev/null
+++ b/srcpkgs/maxima/patches/matrixexp.patch
@@ -0,0 +1,23 @@
+Description: Fix error in matrix exponentiation
+ This patch was written by SageMath but not yet committed into Maxima releases.
+ However, it is needed for SageMath to work correctly:
+ .
+ https://git.sagemath.org/sage.git/tree/build/pkgs/maxima/patches/matrixexp.patch
+Author: Peter Bruin <P.J.Bruin@math.leidenuniv.nl>
+Bug-Sage: http://trac.sagemath.org/ticket/13973
+Bug: https://sourceforge.net/p/maxima/bugs/2596/
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/share/linearalgebra/matrixexp.lisp
++++ b/share/linearalgebra/matrixexp.lisp
+@@ -138,8 +138,8 @@
+ 	   (print `(ratvars = ,$ratvars gcd = '$gcd algebraic = ,$algebraic))
+ 	   (print `(ratfac = ,$ratfac))
+ 	   (merror "Unable to find the spectrum")))
+-   
+-    (setq res ($fullratsimp (ncpower (sub (mult z ($ident n)) mat) -1) z))
++
++    (setq res ($fullratsimp ($invert_by_lu (sub (mult z ($ident n)) mat) '$crering) z))
+     (setq m (length sp))
+     (dotimes (i m)
+       (setq zi (nth i sp))
diff --git a/srcpkgs/maxima/template b/srcpkgs/maxima/template
index 3a95e3706447..798b4f9f00de 100644
--- a/srcpkgs/maxima/template
+++ b/srcpkgs/maxima/template
@@ -1,11 +1,11 @@
 # Template file for 'maxima'
 pkgname=maxima
 version=5.45.1
-revision=1
+revision=2
 build_style=gnu-configure
-configure_args="$(vopt_enable clisp) $(vopt_enable sbcl sbcl-exec)"
+configure_args="$(vopt_enable clisp) $(vopt_enable sbcl sbcl-exec) $(vopt_enable ecl)"
 hostmakedepends="python3 perl emacs texinfo"
-makedepends="$(vopt_if clisp clisp) $(vopt_if sbcl sbcl)"
+makedepends="$(vopt_if clisp clisp) $(vopt_if sbcl sbcl) $(vopt_if ecl ecl)"
 depends="$(vopt_if clisp clisp) rlwrap"
 checkdepends="gnuplot"
 short_desc="Computer Algebra System"
@@ -17,10 +17,11 @@ checksum=fe9016276970bef214a1a244348558644514d7fdfaa4fc8b9d0e87afcbb4e7dc
 
 nostrip=yes
 nopie=yes
-build_options="clisp sbcl"
+build_options="clisp sbcl ecl"
 desc_option_clisp="Build with CLISP"
 desc_option_sbcl="Build with SBCL"
-build_options_default="sbcl"
+desc_option_ecl="Build with ECL"
+build_options_default="sbcl ecl"
 vopt_conflict clisp sbcl
 
 post_install() {
@@ -66,3 +67,26 @@ xmaxima_package() {
 			${PKGDESTDIR}/usr/share/pixmaps/maxima
 	}
 }
+
+subpackages="maxima-src maxima-emacs xmaxima"
+
+if [ "$build_option_ecl" ]; then
+	subpackages+=" maxima-ecl"
+fi
+
+maxima-ecl_package() {
+	short_desc+=" - compiled with ECL"
+	depends="${sourcepkg}-${version}_${revision}"
+	pkg_install() {
+		# this is /usr/lib/ecl-${ecl_version}
+		# ideally we would just place it in /usr/lib/ecl but this
+		# doesn't just work
+		# Maybe we can have the ecl package ship a symlink:
+		#     /usr/lib/ecl -> /usr/lib/ecl-${ecl_version}
+		# and have this package just install in /usr/lib/ecl
+		ECLDIR=$(ecl -eval "(princ (SI:GET-LIBRARY-PATHNAME))" -eval "(quit)")
+		vmkdir $ECLDIR
+		vinstall src/binary-ecl/maxima.fas 755 $ECLDIR
+		vmove usr/lib/maxima/${version}/binary-ecl
+	}
+}

From 140b30b5f591597cbfa634f0f3c98320a01cfd05 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 02/12] 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 d24272eaa4f41219a74871ecbb81be6e25fa373f 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 03/12] 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 1741bf53f6770dab0df451ba941810716822651d 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 04/12] 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 d404ebeaac42a0de145ce212cbd41da71a7c8ea2 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 05/12] 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 3061547b1f04f0adcda524bee3973aad74319901 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 06/12] 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 65e720547823e2c50867b5b849b5a9e5b1a09204 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 07/12] 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 136fa1a44c8f8f9f6b6e73a2c0a5aa6a2ea72889 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 08/12] 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 0661f768b7fba1416c5f866b340a944858c3ca08 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 09/12] 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 8bf5297c13a024f32e63a9c6915a6eb3c8ab1d17 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 10/12] 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 0756d358b4158eccee942a13b08c5048d50dc1e0 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 11/12] 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 157bad9161822e3393fcb5a065f66012f80f5da2 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 12/12] 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

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (88 preceding siblings ...)
  2021-12-04 15:37 ` [PR PATCH] [Updated] " tornaria
@ 2021-12-04 15:38 ` tornaria
  2021-12-04 15:47 ` tornaria
                   ` (158 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-12-04 15:38 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-986046857

Comment:
> That script has a wrong shebang...

Indeed: originally I had a patch to skip 03-rewrite-python-shebang because there was a failure running this hook. Later I discovered that the failure would go away by adding `python_version=3` to the template, so I removed the patch. However, many of the python scripts with shebangs that point to python inside the sage venv are broken.

The simple fix/workaround would be to reinstate this patch for now and skip rewriting all the shebangs.

I'm still hoping that sage-9.5 can work with system python 3.10 by the time it's released, but at the moment [trac #30766](https://trac.sagemath.org/ticket/30766) is a bit outdated and it was far from working last time I tried. I've just noticed that [trac #30767](https://trac.sagemath.org/ticket/30767) has just been rebased on top of a handful of other tickets with positive_review so I'm more hopeful of that.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (89 preceding siblings ...)
  2021-12-04 15:38 ` tornaria
@ 2021-12-04 15:47 ` tornaria
  2021-12-05 10:22 ` dkwo
                   ` (157 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-12-04 15:47 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-986048062

Comment:
New version (157bad91):

 - don't rewrite python shebangs, as commented above
 - add some depends (linbox, maxima, and others that I think were missing before)

@dkwo: can you try this version?

Also: should I add something to `do_install()` so you don't need to  `ln -s /usr/lib/sage-9.5.beta7/local/var/lib/sage/venv-python3.9.7/share/jupyter /usr/local/share/`? Please let me know and I'll add it (preferrably not in `/usr/local`?).

There's a bunch of tickets with positive_review that I'd like to include, but I'm hoping there will be a new beta soon which includes them so I'll just wait and see (I'm already including 6-7 patches with positive_review, they should go away with next beta). After that I might give a new try to the python 3.10 patches.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (90 preceding siblings ...)
  2021-12-04 15:47 ` tornaria
@ 2021-12-05 10:22 ` dkwo
  2021-12-10 21:28 ` dkwo
                   ` (156 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-12-05 10:22 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-986203412

Comment:
Thanks, (temporarily) rewriting shebangs works for me.

According to https://doc.sagemath.org/html/en/installation/launching.html#setting-up-sagemath-as-a-jupyter-kernel-in-an-existing-jupyter-notebook-or-jupyterlab-installation any of
```
$HOME/.local/share/jupyter
/usr/local/share/jupyter
/usr/share/jupyter
```
should work.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (91 preceding siblings ...)
  2021-12-05 10:22 ` dkwo
@ 2021-12-10 21:28 ` dkwo
  2021-12-10 21:31 ` dkwo
                   ` (155 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-12-10 21:28 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-991306564

Comment:
Btw, it builds and checks fine on my laptop with `x86_64-musl` (`All tests passed!`).

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (92 preceding siblings ...)
  2021-12-10 21:28 ` dkwo
@ 2021-12-10 21:31 ` dkwo
  2021-12-11  2:29 ` ericonr
                   ` (154 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-12-10 21:31 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-991308599

Comment:
ok, now it is not installing
```
=> Registering new packages to /host/binpkgs/sagemath
index: added `sagemath-9.5.beta7_1' (x86_64-musl).
index: 6 packages registered.
=> sagemath-9.5.beta7_1: running do_clean ...
=> sagemath-9.5.beta7_1: removing autodeps, please wait...
=> sagemath: removing files from destdir...
$ xi sagemath
doas (nicolo@ajax) password:
[*] Updating repository `https://alpha.de.repo.voidlinux.org/current/musl/x86_64-musl-repodata' ...
x86_64-musl-repodata: 1686KB [avg rate: 7320MB/s]
[*] Updating repository `https://alpha.de.repo.voidlinux.org/current/musl/nonfree/x86_64-musl-repodata' ...
MISSING: glibc>=2.32_1
Transaction aborted due to unresolved dependencies.
```
Do you know what is going wrong?

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (93 preceding siblings ...)
  2021-12-10 21:31 ` dkwo
@ 2021-12-11  2:29 ` ericonr
  2021-12-11 17:58 ` dkwo
                   ` (153 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: ericonr @ 2021-12-11  2:29 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-991415871

Comment:
There's something wrong in the build that's making it link against musl instead of glibc...

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (94 preceding siblings ...)
  2021-12-11  2:29 ` ericonr
@ 2021-12-11 17:58 ` dkwo
  2021-12-13  3:13 ` [PR PATCH] [Updated] " tornaria
                   ` (152 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-12-11 17:58 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-991730625

Comment:
See
```
=> sagemath-9.5.beta7_1: running pre-pkg hook: 04-generate-runtime-deps ...
   SONAME: libc.so <-> musl>=1.1.24_7
   SONAME: libc.so.6 <-> glibc>=2.32_1
```

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (95 preceding siblings ...)
  2021-12-11 17:58 ` dkwo
@ 2021-12-13  3:13 ` tornaria
  2021-12-13  9:25 ` dkwo
                   ` (151 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-12-13  3:13 UTC (permalink / raw)
  To: ml

[-- 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.beta7
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: 89712 bytes --]

From 4ed298bb586c99fed42d3913a750774b6567cb37 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 12 Dec 2021 23:48:01 -0300
Subject: [PATCH 01/16] lcalc: update to 2.0.4.

---
 common/shlibs                |   2 +-
 srcpkgs/lcalc/files/test     |  30 ----------
 srcpkgs/lcalc/files/test.out | 112 -----------------------------------
 srcpkgs/lcalc/template       |  69 ++++-----------------
 4 files changed, 14 insertions(+), 199 deletions(-)
 delete mode 100644 srcpkgs/lcalc/files/test
 delete mode 100644 srcpkgs/lcalc/files/test.out

diff --git a/common/shlibs b/common/shlibs
index 2c0536f1550a..be2975dd7a96 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4025,7 +4025,7 @@ libflint.so.16 flintlib-2.8.0_1
 libarb.so.2 arb-2.20.0_1
 libec.so.8 eclib-20210625_1
 libsymmetrica.so.2 symmetrica-3.0.1_1
-libLfunction.so lcalc-1.23_2
+libLfunction.so.1 lcalc-2.0.4_1
 liblrcalc.so.1 lrcalc-1.2_1
 libwayland-client++.so.0 libwaylandpp-0.2.8_1
 libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/lcalc/files/test b/srcpkgs/lcalc/files/test
deleted file mode 100644
index de1f2a6b34e1..000000000000
--- a/srcpkgs/lcalc/files/test
+++ /dev/null
@@ -1,30 +0,0 @@
-#! /bin/sh
-#
-# Quick minimal test for lcalc.
-#
-# Test running the main binary (lcalc) and running the provided
-# example program which is dynamically linked to the library.
-# Also test that loading of L-function data files works.
-#
-# The precision is truncated at 13 (rather than the default 14),
-# otherwise the output could vary a little bit depending on
-# architecture and compiler flags. For the example program we
-# patch-round using sed the two outputs that seem to vary.
-#
-echo "### First 1000 zeros of zeta function"
-./lcalc -z 10 -P 13
-echo
-echo "### Analytic rank of elliptic curve 5077a1"
-./lcalc -e --a1=0 --a2=0 --a3=1 --a4=-7 --a6=6 -r
-echo
-echo "### run example program"
-# do some ad hoc rounding to avoid minor differences
-LD_LIBRARY_PATH=. example_programs/example | sed -e '
-	s/\(L4(1,0) = ([0-9.]*\)[0-9],/\1,/;
-	s/6.123[0-9]*e-17/6.123e-17/'
-echo
-echo "### test data files: zeros of data_mass"
-./lcalc -F example_data_files/data_maass -z 10 -P 13
-echo
-echo "### test data files: zeros of data_tau"
-./lcalc -F example_data_files/data_tau -z 10 -P 13
diff --git a/srcpkgs/lcalc/files/test.out b/srcpkgs/lcalc/files/test.out
deleted file mode 100644
index b8e661e7e6c8..000000000000
--- a/srcpkgs/lcalc/files/test.out
+++ /dev/null
@@ -1,112 +0,0 @@
-### First 1000 zeros of zeta function
- 14.1347251417
- 21.0220396388
- 25.0108575801
- 30.4248761259
- 32.9350615877
- 37.5861781588
- 40.9187190121
- 43.3270732809
- 48.0051508812
- 49.7738324777
-
-### Analytic rank of elliptic curve 5077a1
-analytic rank equals 3
-
-### run example program
------------------------------------------------
-
-Name of L_function: zeta
-All coefficients are equal to 1
-
-Q = 0.564189583548
-OMEGA = (1,0)
-a = 1 (the quasi degree)
-gamma[1] =0.5    lambda[1] =(0,0)
-
-
-number of poles (of the completed L function) = 2
-pole[1] =(1,0)    residue[1] =(1,0)
-pole[2] =(0,0)    residue[2] =(-1,0)
------------------------------------------------
-
------------------------------------------------
-
-Name of L_function: L4
-number of dirichlet coefficients = 4
-coefficients are periodic
-b[1] = 1
-b[2] = 0
-b[3] = -1
-b[4] = 0
-
-Q = 1.1283791671
-OMEGA = (1,0)
-a = 1 (the quasi degree)
-gamma[1] =0.5    lambda[1] =(0.5,0)
-
-
-number of poles (of the completed L function) = 0
------------------------------------------------
-
------------------------------------------------
-
-Name of L_function: L5
-number of dirichlet coefficients = 5
-coefficients are periodic
-b[1] = (1,0)
-b[2] = (0,1)
-b[3] = (-0,-1)
-b[4] = (-1,0)
-b[5] = (0,0)
-
-Q = 1.26156626101
-OMEGA = (0.850650808352,0.525731112119)
-a = 1 (the quasi degree)
-gamma[1] =0.5    lambda[1] =(0.5,0)
-
-
-number of poles (of the completed L function) = 0
------------------------------------------------
-
-zeta(0.5,0) = (-1.46035450881,0)
-L4(0.5,0) = (0.6676914571896,0)
-L5(0.5,0) = (0.7637478801173,0.2169647675189)
-L4(1,0) = (0.785398163397,0)
-L5(1,0) = (0.8648062659772,0.2041530661384)
-0.4285714285714
-1.5
-0.1666666666667
-0.6666666666667
-0.5714285714286
-0
-0.5714285714286
-0.5714285714286
-0
-0.8888888888889
-6.123e-17
--0.7071067811865
-
-### test data files: zeros of data_mass
- 2.8977246783
- 5.5912453153
- 21.0903775087
- 23.1575104846
- 25.4393003898
- 29.1892067135
- 31.0617394845
- 32.4527182375
- 34.027279684
- 36.9312371969
-
-### test data files: zeros of data_tau
- 9.22237939992
- 13.9075498614
- 17.4427769782
- 19.656513142
- 22.3361036372
- 25.2746365481
- 26.8043911584
- 28.8316826242
- 31.1782094984
- 32.7748753822
diff --git a/srcpkgs/lcalc/template b/srcpkgs/lcalc/template
index 1b3df018d527..a030c96039ef 100644
--- a/srcpkgs/lcalc/template
+++ b/srcpkgs/lcalc/template
@@ -1,66 +1,21 @@
 # Template file for 'lcalc'
 pkgname=lcalc
-version=1.23
-revision=2
-build_wrksrc="src"
-build_style=gnu-makefile
+version=2.0.4
+revision=1
+build_style=gnu-configure
+configure_args="--with-pari"
+hostmakedepends="automake libtool pkg-config gengetopt"
 makedepends="gmp-devel pari-devel"
 short_desc="Michael Rubinstein's L-function calculator"
 maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-2.0-or-later"
-homepage="https://mirrors.mit.edu/sage/spkg/upstream/lcalc/"
-distfiles="https://mirrors.mit.edu/sage/spkg/upstream/lcalc/lcalc-${version}.tar.bz2"
-checksum="83d4253ec2f38553b21190d6d0c6b71bab7ea14717f6dde5bd18f60775d3cdb0
- bd39a43b24a332e1826e667f85ca2ce2ca14749d56f60069cd886c96f55e9e3c
- d8c660f68f33b6eeb4b801d4028faaaaccbfff5797efe654bb6367e0a687542d
- dadf6fc6d481595cb041f8b0dd92bc2e2bc390cbb3e0dd36b7fe63b74942db26
- 342cde1c9effda48597bfee439acb37c91458a100580c97c84da6a142d2cc5b6
- 55c6c9f969593f24c75a85e7a150b876671356aa68ceb8e77c563a645897643e
- 906ef33de15bb0d94883b7797d8cb3c889b9f59bceebeb171e65f1546faf1c37
- 437e3870342ef4cb5749398ead9381504403e7e1f99efadab95f4a607678b400
- 6471f2f30497486e289fc8977cbb89c495cf0d5ff58af2b1f479a497a28165e6
- dde1f80b0ca42fb43917c24e6016c19e4a8d28de9c50cd0a523a318866bdc0eb
- 941d4ac025f5d6f0142fb785b27f7a221729466dc83d45fd206cce102c012eaf
- 045f23ea9131b8039001c8f13d22152f7b3c2e91adcf8c555354eaf39e7a7b48"
-shlib_provides="libLfunction.so"
+homepage="https://gitlab.com/sagemath/lcalc"
+changelog="https://gitlab.com/sagemath/lcalc/-/raw/master/doc/ChangeLog"
+distfiles="https://gitlab.com/sagemath/lcalc/-/archive/${version}/lcalc-${version}.tar.bz2"
+checksum=28b9d33307d0aa002accf6950fa4547df8c6764df8d025bc8523aa857423417b
 
-# get patches from sagemath
-_patchurl="https://git.sagemath.org/sage.git/plain/build/pkgs/lcalc/patches"
-_patchtag="?h=9.3.rc2"
-_patches="
- Lcommon.h.patch
- Lvalue.h.patch
- Makefile.patch
- clang.patch
- lcalc-1.23_default_parameters_1.patch
- lcalc-1.23_default_parameters_2.patch
- pari-2.7.patch
- pari-mem.patch
- pari_include.patch
- time.h.patch
- using_namespace_std.patch"
-for patch in $_patches ; do
-	distfiles+=" ${_patchurl}/${patch}${_patchtag}>${patch}"
-done
-skip_extraction="$_patches"
-
-post_extract() {
-	for patch in $_patches ; do
-		patch -p1 < "$XBPS_SRCDISTDIR/${pkgname}-${version}/${patch}"
-	done
-}
-
-CXXFLAGS="-fPIC -Wno-deprecated"
-
-pre_install() {
-	mkdir -p ${DESTDIR}/usr/{bin,lib,include}
-	make_install_args+=" INSTALL_DIR=${DESTDIR}/usr"
-}
-
-do_check() {
-	echo "Testing lcalc ..."
-	sh "${FILESDIR}"/test > test.log
-	diff "${FILESDIR}"/test.out test.log && echo PASS
+pre_configure() {
+	autoreconf -fi
 }
 
 lcalc-devel_package() {
@@ -68,5 +23,7 @@ lcalc-devel_package() {
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove "usr/lib/*.so"
 	}
 }

From 78292802606542dfff3fae37df6e069d67f3153c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 27 Nov 2021 19:38:48 -0300
Subject: [PATCH 02/16] maxima: add a subpkg maxima-ecl needed for sagemath

 - Added a build option 'ecl' (enabled by default)
 - The ecl binary and library will be in a subpkg maxima-ecl so this
   should not affect current users of maxima
 - new patches:
   - a0d7a43...: build a FASL library for ECL (this is merged upstream)
   - handle-multiple-ldflags.patch: otherwise compilation with multiple
     options in LDFLAGS fails (taken from debian)
   - matrixexp.patch: fixes an error in matrix exponentiation (taken
     from debian, this originates in sagemath)

A weak point is that the library maxima.fas is installed in
/usr/lib/ecl-${ecl_version} which is where ecl looks for them, but this
doesn't seem right.

Maybe an alternative would be to have the ecl package ship a symlink at
/usr/lib/ecl pointing to the versioned directory, then have the
maxima-ecl package place its library in the non-versioned directory.
---
 srcpkgs/maxima-ecl                            |  1 +
 ...a43e5234305bd6f1de5909d4ce5d7e1ea864.patch | 24 +++++++++++
 .../patches/handle-multiple-ldflags.patch     | 43 +++++++++++++++++++
 srcpkgs/maxima/patches/matrixexp.patch        | 23 ++++++++++
 srcpkgs/maxima/template                       | 34 ++++++++++++---
 5 files changed, 120 insertions(+), 5 deletions(-)
 create mode 120000 srcpkgs/maxima-ecl
 create mode 100644 srcpkgs/maxima/patches/a0d7a43e5234305bd6f1de5909d4ce5d7e1ea864.patch
 create mode 100644 srcpkgs/maxima/patches/handle-multiple-ldflags.patch
 create mode 100644 srcpkgs/maxima/patches/matrixexp.patch

diff --git a/srcpkgs/maxima-ecl b/srcpkgs/maxima-ecl
new file mode 120000
index 000000000000..b8b0e8240fa4
--- /dev/null
+++ b/srcpkgs/maxima-ecl
@@ -0,0 +1 @@
+maxima
\ No newline at end of file
diff --git a/srcpkgs/maxima/patches/a0d7a43e5234305bd6f1de5909d4ce5d7e1ea864.patch b/srcpkgs/maxima/patches/a0d7a43e5234305bd6f1de5909d4ce5d7e1ea864.patch
new file mode 100644
index 000000000000..e1ac1e5f6086
--- /dev/null
+++ b/srcpkgs/maxima/patches/a0d7a43e5234305bd6f1de5909d4ce5d7e1ea864.patch
@@ -0,0 +1,24 @@
+commit a0d7a43e5234305bd6f1de5909d4ce5d7e1ea864
+Author: Robert Dodier <robert_dodier@users.sourceforge.net>
+Date:   Mon Oct 11 22:40:13 2021 -0700
+
+    Apply patch #80: "Build a FASL library, needed by SageMath"
+    
+    This modifies maxima.system for ECL only.
+
+diff --git a/src/maxima.system b/src/maxima.system
+index d954bc2b9..525fb778e 100644
+--- a/src/maxima.system
++++ b/src/maxima.system
+@@ -75,6 +75,11 @@
+ 			     ;; Convert dir/foo.fas to dir/foo.o
+ 			     (make-pathname :type "o" :defaults p))
+ 			 files)))
++	(c::build-fasl "binary-ecl/maxima" :lisp-files obj
++			  :ld-flags
++			  (let ((x (symbol-value (find-symbol "*AUTOCONF-LD-FLAGS*"
++							      (find-package "MAXIMA")))))
++			    (if (and x (not (string= x ""))) (list x))))
+ 	(c::build-program "binary-ecl/maxima" :lisp-files obj
+ 			  :ld-flags
+ 			  (let ((x (symbol-value (find-symbol "*AUTOCONF-LD-FLAGS*"
diff --git a/srcpkgs/maxima/patches/handle-multiple-ldflags.patch b/srcpkgs/maxima/patches/handle-multiple-ldflags.patch
new file mode 100644
index 000000000000..799fc15f9185
--- /dev/null
+++ b/srcpkgs/maxima/patches/handle-multiple-ldflags.patch
@@ -0,0 +1,43 @@
+Description: Handle multiple LDFLAGS
+ Without this patch, building with LDFLAGS containing more than one flag results 
+ in flags being dropped.
+Author: Graham Inggs <ginggs@debian.org>
+Bug-Debian: http://bugs.debian.org/847925
+
+--- a/src/maxima.system
++++ b/src/maxima.system
+@@ -58,6 +58,19 @@
+     (and (apply #'compile-file file :output-file object-output args)
+ 	 (c:build-fasl output :lisp-files (list object-output)))))
+ 
++(defun split-string (string &key (item #\space) (test #'char=))
++  ;; Splits the string into substrings at spaces.
++  (let ((len (length string))
++	(index 0) result)
++    (dotimes (i len
++		(progn (unless (= index len)
++			 (push (subseq string index) result))
++		       (reverse result)))
++      (when (funcall test (char string i) item)
++	(unless (= index i);; two spaces in a row
++	  (push (subseq string index i) result))
++	(setf index (1+ i))))))
++
+ #+ecl
+ (defun build-maxima-lib ()
+   (labels ((list-all-objects (module)
+@@ -79,12 +92,12 @@
+ 			  :ld-flags
+ 			  (let ((x (symbol-value (find-symbol "*AUTOCONF-LD-FLAGS*"
+ 							      (find-package "MAXIMA")))))
+-			    (if (and x (not (string= x ""))) (list x))))
++			    (if (and x (not (string= x ""))) (split-string x))))
+ 	(c::build-program "binary-ecl/maxima" :lisp-files obj
+ 			  :ld-flags
+ 			  (let ((x (symbol-value (find-symbol "*AUTOCONF-LD-FLAGS*"
+ 							      (find-package "MAXIMA")))))
+-			    (if (and x (not (string= x ""))) (list x)))
++			    (if (and x (not (string= x ""))) (split-string x)))
+ 			  :epilogue-code '(progn (cl-user::run)))))))
+ 
+ (defun maxima-binary-pathname ()
diff --git a/srcpkgs/maxima/patches/matrixexp.patch b/srcpkgs/maxima/patches/matrixexp.patch
new file mode 100644
index 000000000000..7cbd9ccac089
--- /dev/null
+++ b/srcpkgs/maxima/patches/matrixexp.patch
@@ -0,0 +1,23 @@
+Description: Fix error in matrix exponentiation
+ This patch was written by SageMath but not yet committed into Maxima releases.
+ However, it is needed for SageMath to work correctly:
+ .
+ https://git.sagemath.org/sage.git/tree/build/pkgs/maxima/patches/matrixexp.patch
+Author: Peter Bruin <P.J.Bruin@math.leidenuniv.nl>
+Bug-Sage: http://trac.sagemath.org/ticket/13973
+Bug: https://sourceforge.net/p/maxima/bugs/2596/
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/share/linearalgebra/matrixexp.lisp
++++ b/share/linearalgebra/matrixexp.lisp
+@@ -138,8 +138,8 @@
+ 	   (print `(ratvars = ,$ratvars gcd = '$gcd algebraic = ,$algebraic))
+ 	   (print `(ratfac = ,$ratfac))
+ 	   (merror "Unable to find the spectrum")))
+-   
+-    (setq res ($fullratsimp (ncpower (sub (mult z ($ident n)) mat) -1) z))
++
++    (setq res ($fullratsimp ($invert_by_lu (sub (mult z ($ident n)) mat) '$crering) z))
+     (setq m (length sp))
+     (dotimes (i m)
+       (setq zi (nth i sp))
diff --git a/srcpkgs/maxima/template b/srcpkgs/maxima/template
index 3a95e3706447..798b4f9f00de 100644
--- a/srcpkgs/maxima/template
+++ b/srcpkgs/maxima/template
@@ -1,11 +1,11 @@
 # Template file for 'maxima'
 pkgname=maxima
 version=5.45.1
-revision=1
+revision=2
 build_style=gnu-configure
-configure_args="$(vopt_enable clisp) $(vopt_enable sbcl sbcl-exec)"
+configure_args="$(vopt_enable clisp) $(vopt_enable sbcl sbcl-exec) $(vopt_enable ecl)"
 hostmakedepends="python3 perl emacs texinfo"
-makedepends="$(vopt_if clisp clisp) $(vopt_if sbcl sbcl)"
+makedepends="$(vopt_if clisp clisp) $(vopt_if sbcl sbcl) $(vopt_if ecl ecl)"
 depends="$(vopt_if clisp clisp) rlwrap"
 checkdepends="gnuplot"
 short_desc="Computer Algebra System"
@@ -17,10 +17,11 @@ checksum=fe9016276970bef214a1a244348558644514d7fdfaa4fc8b9d0e87afcbb4e7dc
 
 nostrip=yes
 nopie=yes
-build_options="clisp sbcl"
+build_options="clisp sbcl ecl"
 desc_option_clisp="Build with CLISP"
 desc_option_sbcl="Build with SBCL"
-build_options_default="sbcl"
+desc_option_ecl="Build with ECL"
+build_options_default="sbcl ecl"
 vopt_conflict clisp sbcl
 
 post_install() {
@@ -66,3 +67,26 @@ xmaxima_package() {
 			${PKGDESTDIR}/usr/share/pixmaps/maxima
 	}
 }
+
+subpackages="maxima-src maxima-emacs xmaxima"
+
+if [ "$build_option_ecl" ]; then
+	subpackages+=" maxima-ecl"
+fi
+
+maxima-ecl_package() {
+	short_desc+=" - compiled with ECL"
+	depends="${sourcepkg}-${version}_${revision}"
+	pkg_install() {
+		# this is /usr/lib/ecl-${ecl_version}
+		# ideally we would just place it in /usr/lib/ecl but this
+		# doesn't just work
+		# Maybe we can have the ecl package ship a symlink:
+		#     /usr/lib/ecl -> /usr/lib/ecl-${ecl_version}
+		# and have this package just install in /usr/lib/ecl
+		ECLDIR=$(ecl -eval "(princ (SI:GET-LIBRARY-PATHNAME))" -eval "(quit)")
+		vmkdir $ECLDIR
+		vinstall src/binary-ecl/maxima.fas 755 $ECLDIR
+		vmove usr/lib/maxima/${version}/binary-ecl
+	}
+}

From 149d2bfba753d5c3ae6d9ff5546330a83979d721 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 10 Dec 2021 14:01:01 -0300
Subject: [PATCH 03/16] maxima: use a shared lib

---
 .../maxima/patches/use-shared-library.patch   | 21 ++++++++
 srcpkgs/maxima/template                       | 50 +++++++++++++------
 2 files changed, 55 insertions(+), 16 deletions(-)
 create mode 100644 srcpkgs/maxima/patches/use-shared-library.patch

diff --git a/srcpkgs/maxima/patches/use-shared-library.patch b/srcpkgs/maxima/patches/use-shared-library.patch
new file mode 100644
index 000000000000..a8f986ac7033
--- /dev/null
+++ b/srcpkgs/maxima/patches/use-shared-library.patch
@@ -0,0 +1,21 @@
+--- a/src/maxima.system	2021-12-02 00:26:23.955984864 -0300
++++ b/src/maxima.system	2021-12-02 00:31:22.299541969 -0300
+@@ -87,13 +87,15 @@
+       (let ((obj (mapcar #'(lambda (p)
+ 			     ;; Convert dir/foo.fas to dir/foo.o
+ 			     (make-pathname :type "o" :defaults p))
+-			 files)))
+-	(c::build-fasl "binary-ecl/maxima" :lisp-files obj
++			 files))
++			(lib '("binary-ecl/libmaxima-ecl.so")))
++	(c::build-shared-library "binary-ecl/maxima-ecl" :lisp-files obj)
++	(c::build-fasl "binary-ecl/maxima" :lisp-files lib
+ 			  :ld-flags
+ 			  (let ((x (symbol-value (find-symbol "*AUTOCONF-LD-FLAGS*"
+ 							      (find-package "MAXIMA")))))
+ 			    (if (and x (not (string= x ""))) (split-string x))))
+-	(c::build-program "binary-ecl/maxima" :lisp-files obj
++	(c::build-program "binary-ecl/maxima" :lisp-files lib
+ 			  :ld-flags
+ 			  (let ((x (symbol-value (find-symbol "*AUTOCONF-LD-FLAGS*"
+ 							      (find-package "MAXIMA")))))
diff --git a/srcpkgs/maxima/template b/srcpkgs/maxima/template
index 798b4f9f00de..1a4bec0dba18 100644
--- a/srcpkgs/maxima/template
+++ b/srcpkgs/maxima/template
@@ -4,7 +4,7 @@ version=5.45.1
 revision=2
 build_style=gnu-configure
 configure_args="$(vopt_enable clisp) $(vopt_enable sbcl sbcl-exec) $(vopt_enable ecl)"
-hostmakedepends="python3 perl emacs texinfo"
+hostmakedepends="python3 perl emacs texinfo patchelf"
 makedepends="$(vopt_if clisp clisp) $(vopt_if sbcl sbcl) $(vopt_if ecl ecl)"
 depends="$(vopt_if clisp clisp) rlwrap"
 checkdepends="gnuplot"
@@ -24,6 +24,29 @@ desc_option_ecl="Build with ECL"
 build_options_default="sbcl ecl"
 vopt_conflict clisp sbcl
 
+post_build() {
+	if [ "$build_option_ecl" ]; then
+		# everything will go in the same directory, use rpath=$ORIGIN
+		patchelf --remove-rpath src/binary-ecl/libmaxima-ecl.so
+		patchelf --set-rpath \$ORIGIN \
+			src/binary-ecl/{maxima,maxima.fas}
+		patchelf \
+			--replace-needed  binary-ecl/libmaxima-ecl.so libmaxima-ecl.so \
+			src/binary-ecl/{maxima,maxima.fas}
+	fi
+}
+
+do_check() {
+	if [ "$build_option_ecl" ]; then
+		echo "Check that maxima.fas works"
+		ecl --eval "(require 'maxima \"src/binary-ecl/maxima.fas\")" \
+			--eval "(quit)"
+	fi
+
+	# now run the testsuite
+	make ${makejobs} check
+}
+
 post_install() {
 	vmkdir usr/share/doc
 	ln -sf ../maxima/${version}/doc ${DESTDIR}/usr/share/doc/maxima
@@ -68,25 +91,20 @@ xmaxima_package() {
 	}
 }
 
-subpackages="maxima-src maxima-emacs xmaxima"
-
-if [ "$build_option_ecl" ]; then
-	subpackages+=" maxima-ecl"
-fi
-
 maxima-ecl_package() {
 	short_desc+=" - compiled with ECL"
 	depends="${sourcepkg}-${version}_${revision}"
 	pkg_install() {
-		# this is /usr/lib/ecl-${ecl_version}
-		# ideally we would just place it in /usr/lib/ecl but this
-		# doesn't just work
-		# Maybe we can have the ecl package ship a symlink:
-		#     /usr/lib/ecl -> /usr/lib/ecl-${ecl_version}
-		# and have this package just install in /usr/lib/ecl
+		BINARY_ECL=/usr/lib/maxima/${version}/binary-ecl
+		vmove ${BINARY_ECL}
+		vinstall src/binary-ecl/libmaxima-ecl.so 755 ${BINARY_ECL}
+		vinstall src/binary-ecl/maxima.fas 755 ${BINARY_ECL}
+
+		# symlink maxima.fas in ECLDIR
 		ECLDIR=$(ecl -eval "(princ (SI:GET-LIBRARY-PATHNAME))" -eval "(quit)")
-		vmkdir $ECLDIR
-		vinstall src/binary-ecl/maxima.fas 755 $ECLDIR
-		vmove usr/lib/maxima/${version}/binary-ecl
+		vmkdir ${ECLDIR}
+		ln -sr ${PKGDESTDIR}/${BINARY_ECL}/maxima.fas ${PKGDESTDIR}/${ECLDIR}
 	}
 }
+
+subpackages="maxima-src maxima-emacs xmaxima $(vopt_if ecl maxima-ecl)"

From 4b426ad0c3e51a463ef9c119fa6c35b8f40481d3 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 04/16] 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 7936855b5fe7bbf54d2f4a55832922e7c07bc4e2 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 05/16] 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 d27a563a4374451664923772538688816b3ca48d 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 06/16] 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 098706fa64fe0dc4f7e2a8d406c9b0ed320bdc27 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 07/16] 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 634604d7f7e083f406460417cccc86f7f5a3ef04 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 08/16] 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 1771a89590bd776acd43d41412e8f952383b2330 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 09/16] 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 65df16d42f5385b99fbd86134bedd8378dd58fa7 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 10/16] 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 dbb2a4203aeccc98bccd13bad86c80cc216a319c 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 11/16] 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 49e2f1d4463d61271631be6ba59ddd3d9448144b 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 12/16] 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 444cab6f23d6e81923fcfd6ca1dcd6c20ac2ee8d 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 13/16] 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 72ecdcd38a897d601d37c46be74e588d74bd5bd4 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 14/16] 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 260018422bfeb8e1447d943d796d4de770990fb2 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 15/16] 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 152d9a34c6e0feb307f421516e82c099bed2cc65 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 16/16] 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

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (96 preceding siblings ...)
  2021-12-13  3:13 ` [PR PATCH] [Updated] " tornaria
@ 2021-12-13  9:25 ` dkwo
  2021-12-13 13:17 ` tornaria
                   ` (150 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-12-13  9:25 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-992267726

Comment:
Maybe the problem is with maxima?
From the log here in musl ci:
```
Trying to install dependants of maxima-ecl:
MISSING: glibc>=2.32_1
Transaction aborted due to unresolved dependencies.
```
Btw, it seems Arch has it working with python3.10, shall we try as well?

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (97 preceding siblings ...)
  2021-12-13  9:25 ` dkwo
@ 2021-12-13 13:17 ` tornaria
  2021-12-13 13:28 ` dkwo
                   ` (149 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-12-13 13:17 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-992467442

Comment:
> Maybe the problem is with maxima? From the log here in musl ci:
> 
> ```
> Trying to install dependants of maxima-ecl:
> MISSING: glibc>=2.32_1
> Transaction aborted due to unresolved dependencies.
> ```

I don't see anything like that here or in github CI. Maybe you have a broken maxima-ecl from an old compilation in your binpkgs? Can you try repackaging maxima in your xbps-src? Note that these packages are changing but I'm not incrementing revision so you must ensure they are recompiled to the current version. At this time the PR includes maxima-ecl (from #34273, IMO ready to merge) and updated lcalc (#34503, should be straightforward to merge).

In my xbps-src musl chroot everything looks ok:
```
$ xbps-query -S maxima-ecl
architecture: x86_64-musl
automatic-install: yes
build-options: ecl sbcl ~clisp 
filename-sha256: f89b6e1e219df1168fa03f41c256dc9138567413dbcfb86ca3d13593e54e4fc9
filename-size: 3646KB
homepage: http://maxima.sourceforge.net
install-date: 2021-12-13 04:12 UTC
installed_size: 13MB
license: GPL-2.0-only
maintainer: Bosco Garcia <jboscogg@gmail.org>
metafile-sha256: 1d32aff1ce855c398975ea20e5a6ebffec68ace62e28aec46ce6bb28d293c090
pkgname: maxima-ecl
pkgver: maxima-ecl-5.45.1_2
repository: /host/binpkgs/sagemath
run_depends:
	maxima-5.45.1_2
	ecl>=21.2.1_1
	musl>=1.1.24_7
shlib-requires:
	libecl.so.21.2
	libc.so
short_desc: Computer Algebra System - compiled with ECL
state: installed
$ xbps-query -f maxima-ecl
/usr/lib/maxima/5.45.1/binary-ecl/libmaxima-ecl.so
/usr/lib/maxima/5.45.1/binary-ecl/maxima
/usr/lib/maxima/5.45.1/binary-ecl/maxima.fas
/usr/lib/ecl-21.2.1/maxima.fas -> /usr/lib/maxima/5.45.1/binary-ecl/maxima.fas
$ ldd /usr/lib/maxima/5.45.1/binary-ecl/libmaxima-ecl.so 
	ldd (0x7f23a7c7b000)
	libecl.so.21.2 => /lib/libecl.so.21.2 (0x7f23a6c67000)
	libc.so => ldd (0x7f23a7c7b000)
	libgmp.so.10 => /usr/lib64//libgmp.so.10 (0x7f23a6bea000)
	libgc.so.1 => /usr/lib64//libgc.so.1 (0x7f23a6b73000)
	libffi.so.7 => /usr/lib64//libffi.so.7 (0x7f23a6b67000)
$ ldd /usr/lib/maxima/5.45.1/binary-ecl/maxima           
	/lib/ld-musl-x86_64.so.1 (0x7f511e95f000)
	libmaxima-ecl.so => /usr/lib/maxima/5.45.1/binary-ecl/libmaxima-ecl.so (0x7f511dcba000)
	libecl.so.21.2 => /lib/libecl.so.21.2 (0x7f511d94b000)
	libc.so => /lib/ld-musl-x86_64.so.1 (0x7f511e95f000)
	libgmp.so.10 => /usr/lib64//libgmp.so.10 (0x7f511d8ce000)
	libgc.so.1 => /usr/lib64//libgc.so.1 (0x7f511d857000)
	libffi.so.7 => /usr/lib64//libffi.so.7 (0x7f511d84b000)
$ ldd /usr/lib/maxima/5.45.1/binary-ecl/maxima.fas 
	ldd (0x7efff7437000)
	libmaxima-ecl.so => /usr/lib/maxima/5.45.1/binary-ecl/libmaxima-ecl.so (0x7efff678c000)
	libecl.so.21.2 => /lib/libecl.so.21.2 (0x7efff641d000)
	libc.so => ldd (0x7efff7437000)
	libgmp.so.10 => /usr/lib64//libgmp.so.10 (0x7efff63a0000)
	libgc.so.1 => /usr/lib64//libgc.so.1 (0x7efff6329000)
	libffi.so.7 => /usr/lib64//libffi.so.7 (0x7efff631d000)
```


> 
> Btw, it seems Arch has it working with python3.10, shall we try as well?

I'll try it again soon. Now that 9.5.beta8 merged a few required tickets it seems we need:
 - https://trac.sagemath.org/ticket/30766
 - https://trac.sagemath.org/ticket/33013
Although there are still some issues (see https://trac.sagemath.org/ticket/30766#comment:67 and preceding comments).

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (98 preceding siblings ...)
  2021-12-13 13:17 ` tornaria
@ 2021-12-13 13:28 ` dkwo
  2021-12-13 15:25 ` dkwo
                   ` (148 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-12-13 13:28 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-992476894

Comment:
The last quote is from the github ci, not from my local system.
But I will try again repackaging maxima.
Great, I think not much is missing for 3.10


^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (99 preceding siblings ...)
  2021-12-13 13:28 ` dkwo
@ 2021-12-13 15:25 ` dkwo
  2021-12-13 17:10 ` tornaria
                   ` (147 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-12-13 15:25 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-992590035

Comment:
I get the same behavior after deleting all artifacts in binpkgs folder.
It seems to me also CI sees the same issue.
Could you try xbps-query on sagemath as well?
Anyone else using musl who could check?

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (100 preceding siblings ...)
  2021-12-13 15:25 ` dkwo
@ 2021-12-13 17:10 ` tornaria
  2021-12-13 17:48 ` tornaria
                   ` (146 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-12-13 17:10 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-992689211

Comment:
This is caused by prebuilt binaries linked with glibc being shipped by debugpy inside sagemath. See https://trac.sagemath.org/ticket/33020.

A workaround might be adding to the template:
```
skiprdeps="attach_linux_amd64.so attach_linux_x86.so"
```
so those binaries are skipped when looking for shlib_rdeps.

Can you try that?

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (101 preceding siblings ...)
  2021-12-13 17:10 ` tornaria
@ 2021-12-13 17:48 ` tornaria
  2021-12-13 20:34 ` dkwo
                   ` (145 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-12-13 17:48 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-992720951

Comment:
This is what you actually need for `skiprdeps`:
```
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -43,6 +43,11 @@ nostrip=yes
 # don't shlib_provide anything
 noshlibprovides=yes
 
+# skip bad shlib rdeps for precompiled binaries
+skiprdeps="
+ ${_SAGE_ROOT}/local/var/lib/sage/venv-python3.9.7/lib/python3.9/site-packages/debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_linux_amd64.so
+ ${_SAGE_ROOT}/local/var/lib/sage/venv-python3.9.7/lib/python3.9/site-packages/debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_linux_x86.so"
+
 # don't rewrite python shebang as sage uses its own python (for now)
 _no_python_shebang=yes
 
```

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (102 preceding siblings ...)
  2021-12-13 17:48 ` tornaria
@ 2021-12-13 20:34 ` dkwo
  2021-12-13 21:00 ` dkwo
                   ` (144 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-12-13 20:34 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-992872304

Comment:
With that it installs, thank you, but then it segfaults:
```
$ sage-9.5.beta8_1
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 9.5.beta8, Release Date: 2021-12-12               │
│ Using Python 3.9.7. Type "help()" for help.                        │
└────────────────────────────────────────────────────────────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Warning: this is a prerelease version, and it may be unstable.     ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
------------------------------------------------------------------------
Attaching gdb to process id 6962.
Cannot find gdb installed
GDB is not installed.
Install gdb for enhanced tracebacks.
------------------------------------------------------------------------
Unhandled SIGSEGV: A segmentation fault occurred.
This probably occurred because a *compiled* module has a bug
in it and is not properly wrapped with sig_on(), sig_off().
Python will now terminate.
------------------------------------------------------------------------
Segmentation fault
```

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (103 preceding siblings ...)
  2021-12-13 20:34 ` dkwo
@ 2021-12-13 21:00 ` dkwo
  2021-12-13 21:13 ` dkwo
                   ` (143 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-12-13 21:00 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-992904887

Comment:
Btw, besides the link to sagemath kernel, I use `jupyter lab --app-dir /usr/lib/python3.10/site-packages/jupyterlab`

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (104 preceding siblings ...)
  2021-12-13 21:00 ` dkwo
@ 2021-12-13 21:13 ` dkwo
  2021-12-14 17:36 ` ericonr
                   ` (142 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-12-13 21:13 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-992914948

Comment:
The segfault goes away if I use musl from the repo, as opposed to newer self-built one.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (105 preceding siblings ...)
  2021-12-13 21:13 ` dkwo
@ 2021-12-14 17:36 ` ericonr
  2021-12-15 10:41 ` dkwo
                   ` (141 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: ericonr @ 2021-12-14 17:36 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-993818190

Comment:
Can you get a backtrace of the segfault on newer musl? Chances are some overflow issue is being caught by newer musl, but would be good to confirm.

Running with valgrind might help, though it might also complain about the other libraries involved.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (106 preceding siblings ...)
  2021-12-14 17:36 ` ericonr
@ 2021-12-15 10:41 ` dkwo
  2021-12-15 14:57 ` tornaria
                   ` (140 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-12-15 10:41 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-994663537

Comment:
Does this help?
```
Attaching gdb to process id 21891.
GNU gdb (GDB) 11.1
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-musl".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
[New LWP 21956]
0x00007fc45a241388 in __cp_end () from /lib/ld-musl-x86_64.so.1

Stack backtrace
---------------
No symbol table info available.
#1  0x00007fc45a232fc1 in __syscall_cp_c () from /lib/ld-musl-x86_64.so.1
No symbol table info available.
#2  0x00007fc45a27cb44 in builtin_tls () from /lib/ld-musl-x86_64.so.1
No symbol table info available.
#3  0x0000000000000000 in ?? ()
No symbol table info available.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
[Inferior 1 (process 21891) detached]
Traceback (most recent call last):
  File "<string>", line 25, in <module>
ModuleNotFoundError: No module named 'Cython'
Error while executing Python code.
Saved trace to /home/nicolo/.sage/crash_logs/crash_552os0mo.log
------------------------------------------------------------------------
Unhandled SIGSEGV: A segmentation fault occurred.
This probably occurred because a *compiled* module has a bug
in it and is not properly wrapped with sig_on(), sig_off().
Python will now terminate.
------------------------------------------------------------------------
Segmentation fault
```
or what should I do?

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (107 preceding siblings ...)
  2021-12-15 10:41 ` dkwo
@ 2021-12-15 14:57 ` tornaria
  2021-12-15 14:59 ` tornaria
                   ` (139 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-12-15 14:57 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-994872906

Comment:
@dkwo can you try running `sage --valgrind`?

See: https://doc.sagemath.org/html/en/developer/doctesting.html#debugging-tools

There are more options there. I'm not sure if we have to add some flag to get sage compiled with debug symbols to get better stack traces.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (108 preceding siblings ...)
  2021-12-15 14:57 ` tornaria
@ 2021-12-15 14:59 ` tornaria
  2021-12-15 15:04 ` dkwo
                   ` (138 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-12-15 14:59 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-994872906

Comment:
@dkwo can you try running `sage --valgrind`?

See: https://doc.sagemath.org/html/en/developer/doctesting.html#debugging-tools

There are more options there. I'm not sure if we have to add some flag to get sage compiled with debug symbols to get better stack traces.

Edit: possibly need to install valgrind with xbps.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (109 preceding siblings ...)
  2021-12-15 14:59 ` tornaria
@ 2021-12-15 15:04 ` dkwo
  2021-12-15 15:19 ` dkwo
                   ` (137 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-12-15 15:04 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-994879784

Comment:
I installed valgrind. I get
```
$ sage-9.5.beta8_1 --valgrind
Python suppressions not found (not installed?), skipping
Using default flags: --leak-resolution=high --leak-check=full --num-callers=25  --suppressions=/usr/lib/sage-9.5.beta8/local/var/lib/sage/venv-python3.9.7/lib/python3.9/site-packages/sage/ext_data/valgrind/pyalloc.supp --suppressions=/usr/lib/sage-9.5.beta8/local/var/lib/sage/venv-python3.9.7/lib/python3.9/site-packages/sage/ext_data/valgrind/sage.supp --suppressions=/usr/lib/sage-9.5.beta8/local/var/lib/sage/venv-python3.9.7/lib/python3.9/site-packages/sage/ext_data/valgrind/sage-additional.supp
==21873== Memcheck, a memory error detector
==21873== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==21873== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
==21873== Command: /usr/lib/sage-9.5.beta8/src/bin/sage-ipython -i
==21873==
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 9.5.beta8, Release Date: 2021-12-12               │
│ Using Python 3.9.7. Type "help()" for help.                        │
└────────────────────────────────────────────────────────────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Warning: this is a prerelease version, and it may be unstable.     ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
------------------------------------------------------------------------
Attaching gdb to process id 21877.
GNU gdb (GDB) 11.1
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-musl".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
[New LWP 21912]
0x00007efe91cac388 in __cp_end () from /lib/ld-musl-x86_64.so.1

Stack backtrace
---------------
No symbol table info available.
#1  0x00007efe91c9dfc1 in __syscall_cp_c () from /lib/ld-musl-x86_64.so.1
No symbol table info available.
#2  0x00007efe91ce7b44 in builtin_tls () from /lib/ld-musl-x86_64.so.1
No symbol table info available.
#3  0x0000000000000000 in ?? ()
No symbol table info available.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
[Inferior 1 (process 21877) detached]
Traceback (most recent call last):
  File "<string>", line 25, in <module>
ModuleNotFoundError: No module named 'Cython'
Error while executing Python code.
Saved trace to /home/nicolo/.sage/crash_logs/crash_6nnbkql4.log
------------------------------------------------------------------------
Unhandled SIGSEGV: A segmentation fault occurred.
This probably occurred because a *compiled* module has a bug
in it and is not properly wrapped with sig_on(), sig_off().
Python will now terminate.
------------------------------------------------------------------------
Segmentation fault
```

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (110 preceding siblings ...)
  2021-12-15 15:04 ` dkwo
@ 2021-12-15 15:19 ` dkwo
  2021-12-16 23:11 ` tornaria
                   ` (136 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-12-15 15:19 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-994893356

Comment:
sage-9.5.beta8_1 --massif
```
==26499== Massif, a heap profiler
==26499== Copyright (C) 2003-2017, and GNU GPL'd, by Nicholas Nethercote
==26499== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
==26499== Command: /usr/lib/sage-9.5.beta8/src/bin/sage-python -i
==26499== Parent PID: 26394
==26499==

valgrind: m_mallocfree.c:278 (mk_plain_bszB): Assertion 'bszB != 0' failed.
valgrind: This is probably caused by your program erroneously writing past the
end of a heap block and corrupting heap metadata.  If you fix any
invalid writes reported by Memcheck, this assertion failure will
probably go away.  Please try that before reporting this as a bug.


host stacktrace:
==26499==    at 0x580F9061: ??? (in /usr/libexec/valgrind/massif-amd64-linux)
==26499==    by 0x580F90A7: ??? (in /usr/libexec/valgrind/massif-amd64-linux)
==26499==    by 0x580F9228: ??? (in /usr/libexec/valgrind/massif-amd64-linux)
==26499==    by 0x5813FCE4: ??? (in /usr/libexec/valgrind/massif-amd64-linux)
==26499==    by 0x581B772C: ??? (in /usr/libexec/valgrind/massif-amd64-linux)
==26499==    by 0x581B7CAB: ??? (in /usr/libexec/valgrind/massif-amd64-linux)

sched status:
  running_tid=1

Thread 1: status = VgTs_Runnable (lwpid 26499)
==26499==    at 0x48BE17B: free (in /usr/libexec/valgrind/vgpreload_massif-amd64-linux.so)
==26499==    by 0x11DF10: ??? (in /usr/bin/dash)
==26499==    by 0x10F445: ??? (in /usr/bin/dash)
==26499==    by 0x10E2B0: ??? (in /usr/bin/dash)
==26499==    by 0x115C0B: ??? (in /usr/bin/dash)
==26499==    by 0x10C6B2: ??? (in /usr/bin/dash)
==26499==    by 0x401E5E9: libc_start_main_stage2 (in /usr/lib/libc.so)
client stack range: [0x1FFEFFE000 0x1FFF000FFF] client SP: 0x1FFEFFFB80
valgrind stack range: [0x100268E000 0x100278DFFF] top usage: 8896 of 1048576


Note: see also the FAQ in the source distribution.
It contains workarounds to several common problems.
In particular, if Valgrind aborted or crashed after
identifying problems in your program, there's a good chance
that fixing those problems will prevent Valgrind aborting or
crashing, especially if it happened in m_mallocfree.c.

If that doesn't help, please report this bug to: www.valgrind.org

In the bug report, send all the above text, the valgrind
version, and what OS and version you are using.  Thanks.
```

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (111 preceding siblings ...)
  2021-12-15 15:19 ` dkwo
@ 2021-12-16 23:11 ` tornaria
  2021-12-17 20:08 ` dkwo
                   ` (135 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-12-16 23:11 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-996264540

Comment:
Maybe using `nostrip=yes` in the template will keep symbols and give some clue? I don't see anything of help in those backtraces without symbols.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (112 preceding siblings ...)
  2021-12-16 23:11 ` tornaria
@ 2021-12-17 20:08 ` dkwo
  2021-12-20  2:23 ` tornaria
                   ` (134 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-12-17 20:08 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-997002822

Comment:
Even with that, I'm still getting `No symbol table info available.`

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (113 preceding siblings ...)
  2021-12-17 20:08 ` dkwo
@ 2021-12-20  2:23 ` tornaria
  2021-12-20  2:35 ` [PR PATCH] [Updated] " tornaria
                   ` (133 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-12-20  2:23 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-997538738

Comment:
> Even with that, I'm still getting `No symbol table info available.`

I think you have to `export SAGE_DEBUG=yes` before running configure. I think you can add that to `pre_configure()` right after calling `./bootstrap`.

The template is already using `nostrip=yes` so that should be all.

Maybe we could add a build option `debug` to enable debug symbols.
 

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: sagemath-9.5.beta7
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (114 preceding siblings ...)
  2021-12-20  2:23 ` tornaria
@ 2021-12-20  2:35 ` tornaria
  2021-12-23 17:18 ` [WIP] New package: sagemath-9.5.beta8 dkwo
                   ` (132 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-12-20  2:35 UTC (permalink / raw)
  To: ml

[-- 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.beta7
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: 193080 bytes --]

From 0eaf48ba14f273d11431caf54e160c22292d7214 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 13 Dec 2021 15:40:18 -0300
Subject: [PATCH 01/19] New package: primesieve-7.7

---
 common/shlibs               |  1 +
 srcpkgs/primesieve-devel    |  1 +
 srcpkgs/primesieve/template | 31 +++++++++++++++++++++++++++++++
 3 files changed, 33 insertions(+)
 create mode 120000 srcpkgs/primesieve-devel
 create mode 100644 srcpkgs/primesieve/template

diff --git a/common/shlibs b/common/shlibs
index 4edfe7d909d7..9fafd98bca29 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4052,6 +4052,7 @@ libqrtr-glib.so.0 libqrtr-glib-1.0.0_1
 libbraiding.so.0 libbraiding-1.1_1
 libstemmer.so.2 libstemmer-2.1.0_1
 libdecor-0.so.0 libdecor-0.1.0_1
+libprimesieve.so.9 primesieve-7.7_1
 libavif.so.13 libavif-0.9.3_1
 libkdumpfile.so.9 libkdumpfile-0.4.1_1
 libamd.so.2 SuiteSparse-5.10.1_1
diff --git a/srcpkgs/primesieve-devel b/srcpkgs/primesieve-devel
new file mode 120000
index 000000000000..f4ffe288e787
--- /dev/null
+++ b/srcpkgs/primesieve-devel
@@ -0,0 +1 @@
+primesieve
\ No newline at end of file
diff --git a/srcpkgs/primesieve/template b/srcpkgs/primesieve/template
new file mode 100644
index 000000000000..d023f7f1e884
--- /dev/null
+++ b/srcpkgs/primesieve/template
@@ -0,0 +1,31 @@
+# Template file for 'primesieve'
+pkgname=primesieve
+version=7.7
+revision=1
+build_style=cmake
+configure_args="-DBUILD_TESTS=ON -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=OFF"
+short_desc="Fast prime number generator"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="BSD-2-Clause"
+homepage="https://github.com/kimwalisch/primesieve"
+distfiles="https://github.com/kimwalisch/primesieve/archive/refs/tags/v${version}.tar.gz"
+checksum=fcb3f25e68081c54e5d560d6d1f6448d384a7051e9c56d56ee0d65d6d7954db1
+
+if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
+	makedepends+=" libatomic-devel"
+fi
+
+post_install() {
+	vlicense COPYING
+}
+
+primesieve-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision} ${makedepends}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/cmake
+		vmove usr/lib/pkgconfig
+		vmove "usr/lib/*.so"
+	}
+}

From 58ce3c4da37b7b964d740fc11f52188561a374ad Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 13 Dec 2021 17:08:11 -0300
Subject: [PATCH 02/19] New package: primecount-7.2

---
 common/shlibs               |  1 +
 srcpkgs/primecount-devel    |  1 +
 srcpkgs/primecount/template | 34 ++++++++++++++++++++++++++++++++++
 3 files changed, 36 insertions(+)
 create mode 120000 srcpkgs/primecount-devel
 create mode 100644 srcpkgs/primecount/template

diff --git a/common/shlibs b/common/shlibs
index 9fafd98bca29..b936d7bae7e7 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4052,6 +4052,7 @@ libqrtr-glib.so.0 libqrtr-glib-1.0.0_1
 libbraiding.so.0 libbraiding-1.1_1
 libstemmer.so.2 libstemmer-2.1.0_1
 libdecor-0.so.0 libdecor-0.1.0_1
+libprimecount.so.7 primecount-7.2_1
 libprimesieve.so.9 primesieve-7.7_1
 libavif.so.13 libavif-0.9.3_1
 libkdumpfile.so.9 libkdumpfile-0.4.1_1
diff --git a/srcpkgs/primecount-devel b/srcpkgs/primecount-devel
new file mode 120000
index 000000000000..f5356598687b
--- /dev/null
+++ b/srcpkgs/primecount-devel
@@ -0,0 +1 @@
+primecount
\ No newline at end of file
diff --git a/srcpkgs/primecount/template b/srcpkgs/primecount/template
new file mode 100644
index 000000000000..09a43b602f19
--- /dev/null
+++ b/srcpkgs/primecount/template
@@ -0,0 +1,34 @@
+# Template file for 'primecount'
+pkgname=primecount
+version=7.2
+revision=1
+build_style=cmake
+configure_args="-DBUILD_TESTS=ON -DBUILD_LIBPRIMESIEVE=OFF
+ -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=OFF"
+makedepends="primesieve-devel libgomp-devel"
+short_desc="Fast prime counting function"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="BSD-2-Clause"
+homepage="https://github.com/kimwalisch/primecount/"
+distfiles="https://github.com/kimwalisch/primecount/archive/refs/tags/v${version}.tar.gz"
+checksum=54c1eec33e665a780002dda20cf39ba0cefa8e846fdeda44734fb2265cba9257
+
+build_options="native_build"
+
+if [ -z "$build_option_native_build" ]; then
+	configure_args+=" -DWITH_POPCNT=OFF"
+fi
+
+post_install() {
+	vlicense COPYING
+}
+
+primecount-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision} ${makedepends}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove "usr/lib/*.so"
+	}
+}

From 11976cc732fecd92a057bcd6b2868e8c47cc20a6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 27 Nov 2021 19:38:48 -0300
Subject: [PATCH 03/19] maxima: add a subpkg maxima-ecl needed for sagemath

 - Added a build option 'ecl' (enabled by default)
 - The ecl binary and library will be in a subpkg maxima-ecl so this
   should not affect current users of maxima
 - new patches:
   - a0d7a43...: build a FASL library for ECL (this is merged upstream)
   - handle-multiple-ldflags.patch: otherwise compilation with multiple
     options in LDFLAGS fails (taken from debian)
   - matrixexp.patch: fixes an error in matrix exponentiation (taken
     from debian, this originates in sagemath)

A weak point is that the library maxima.fas is installed in
/usr/lib/ecl-${ecl_version} which is where ecl looks for them, but this
doesn't seem right.

Maybe an alternative would be to have the ecl package ship a symlink at
/usr/lib/ecl pointing to the versioned directory, then have the
maxima-ecl package place its library in the non-versioned directory.
---
 srcpkgs/maxima-ecl                            |  1 +
 ...a43e5234305bd6f1de5909d4ce5d7e1ea864.patch | 24 +++++++++++
 .../patches/handle-multiple-ldflags.patch     | 43 +++++++++++++++++++
 srcpkgs/maxima/patches/matrixexp.patch        | 23 ++++++++++
 srcpkgs/maxima/template                       | 34 ++++++++++++---
 5 files changed, 120 insertions(+), 5 deletions(-)
 create mode 120000 srcpkgs/maxima-ecl
 create mode 100644 srcpkgs/maxima/patches/a0d7a43e5234305bd6f1de5909d4ce5d7e1ea864.patch
 create mode 100644 srcpkgs/maxima/patches/handle-multiple-ldflags.patch
 create mode 100644 srcpkgs/maxima/patches/matrixexp.patch

diff --git a/srcpkgs/maxima-ecl b/srcpkgs/maxima-ecl
new file mode 120000
index 000000000000..b8b0e8240fa4
--- /dev/null
+++ b/srcpkgs/maxima-ecl
@@ -0,0 +1 @@
+maxima
\ No newline at end of file
diff --git a/srcpkgs/maxima/patches/a0d7a43e5234305bd6f1de5909d4ce5d7e1ea864.patch b/srcpkgs/maxima/patches/a0d7a43e5234305bd6f1de5909d4ce5d7e1ea864.patch
new file mode 100644
index 000000000000..e1ac1e5f6086
--- /dev/null
+++ b/srcpkgs/maxima/patches/a0d7a43e5234305bd6f1de5909d4ce5d7e1ea864.patch
@@ -0,0 +1,24 @@
+commit a0d7a43e5234305bd6f1de5909d4ce5d7e1ea864
+Author: Robert Dodier <robert_dodier@users.sourceforge.net>
+Date:   Mon Oct 11 22:40:13 2021 -0700
+
+    Apply patch #80: "Build a FASL library, needed by SageMath"
+    
+    This modifies maxima.system for ECL only.
+
+diff --git a/src/maxima.system b/src/maxima.system
+index d954bc2b9..525fb778e 100644
+--- a/src/maxima.system
++++ b/src/maxima.system
+@@ -75,6 +75,11 @@
+ 			     ;; Convert dir/foo.fas to dir/foo.o
+ 			     (make-pathname :type "o" :defaults p))
+ 			 files)))
++	(c::build-fasl "binary-ecl/maxima" :lisp-files obj
++			  :ld-flags
++			  (let ((x (symbol-value (find-symbol "*AUTOCONF-LD-FLAGS*"
++							      (find-package "MAXIMA")))))
++			    (if (and x (not (string= x ""))) (list x))))
+ 	(c::build-program "binary-ecl/maxima" :lisp-files obj
+ 			  :ld-flags
+ 			  (let ((x (symbol-value (find-symbol "*AUTOCONF-LD-FLAGS*"
diff --git a/srcpkgs/maxima/patches/handle-multiple-ldflags.patch b/srcpkgs/maxima/patches/handle-multiple-ldflags.patch
new file mode 100644
index 000000000000..799fc15f9185
--- /dev/null
+++ b/srcpkgs/maxima/patches/handle-multiple-ldflags.patch
@@ -0,0 +1,43 @@
+Description: Handle multiple LDFLAGS
+ Without this patch, building with LDFLAGS containing more than one flag results 
+ in flags being dropped.
+Author: Graham Inggs <ginggs@debian.org>
+Bug-Debian: http://bugs.debian.org/847925
+
+--- a/src/maxima.system
++++ b/src/maxima.system
+@@ -58,6 +58,19 @@
+     (and (apply #'compile-file file :output-file object-output args)
+ 	 (c:build-fasl output :lisp-files (list object-output)))))
+ 
++(defun split-string (string &key (item #\space) (test #'char=))
++  ;; Splits the string into substrings at spaces.
++  (let ((len (length string))
++	(index 0) result)
++    (dotimes (i len
++		(progn (unless (= index len)
++			 (push (subseq string index) result))
++		       (reverse result)))
++      (when (funcall test (char string i) item)
++	(unless (= index i);; two spaces in a row
++	  (push (subseq string index i) result))
++	(setf index (1+ i))))))
++
+ #+ecl
+ (defun build-maxima-lib ()
+   (labels ((list-all-objects (module)
+@@ -79,12 +92,12 @@
+ 			  :ld-flags
+ 			  (let ((x (symbol-value (find-symbol "*AUTOCONF-LD-FLAGS*"
+ 							      (find-package "MAXIMA")))))
+-			    (if (and x (not (string= x ""))) (list x))))
++			    (if (and x (not (string= x ""))) (split-string x))))
+ 	(c::build-program "binary-ecl/maxima" :lisp-files obj
+ 			  :ld-flags
+ 			  (let ((x (symbol-value (find-symbol "*AUTOCONF-LD-FLAGS*"
+ 							      (find-package "MAXIMA")))))
+-			    (if (and x (not (string= x ""))) (list x)))
++			    (if (and x (not (string= x ""))) (split-string x)))
+ 			  :epilogue-code '(progn (cl-user::run)))))))
+ 
+ (defun maxima-binary-pathname ()
diff --git a/srcpkgs/maxima/patches/matrixexp.patch b/srcpkgs/maxima/patches/matrixexp.patch
new file mode 100644
index 000000000000..7cbd9ccac089
--- /dev/null
+++ b/srcpkgs/maxima/patches/matrixexp.patch
@@ -0,0 +1,23 @@
+Description: Fix error in matrix exponentiation
+ This patch was written by SageMath but not yet committed into Maxima releases.
+ However, it is needed for SageMath to work correctly:
+ .
+ https://git.sagemath.org/sage.git/tree/build/pkgs/maxima/patches/matrixexp.patch
+Author: Peter Bruin <P.J.Bruin@math.leidenuniv.nl>
+Bug-Sage: http://trac.sagemath.org/ticket/13973
+Bug: https://sourceforge.net/p/maxima/bugs/2596/
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/share/linearalgebra/matrixexp.lisp
++++ b/share/linearalgebra/matrixexp.lisp
+@@ -138,8 +138,8 @@
+ 	   (print `(ratvars = ,$ratvars gcd = '$gcd algebraic = ,$algebraic))
+ 	   (print `(ratfac = ,$ratfac))
+ 	   (merror "Unable to find the spectrum")))
+-   
+-    (setq res ($fullratsimp (ncpower (sub (mult z ($ident n)) mat) -1) z))
++
++    (setq res ($fullratsimp ($invert_by_lu (sub (mult z ($ident n)) mat) '$crering) z))
+     (setq m (length sp))
+     (dotimes (i m)
+       (setq zi (nth i sp))
diff --git a/srcpkgs/maxima/template b/srcpkgs/maxima/template
index 3a95e3706447..798b4f9f00de 100644
--- a/srcpkgs/maxima/template
+++ b/srcpkgs/maxima/template
@@ -1,11 +1,11 @@
 # Template file for 'maxima'
 pkgname=maxima
 version=5.45.1
-revision=1
+revision=2
 build_style=gnu-configure
-configure_args="$(vopt_enable clisp) $(vopt_enable sbcl sbcl-exec)"
+configure_args="$(vopt_enable clisp) $(vopt_enable sbcl sbcl-exec) $(vopt_enable ecl)"
 hostmakedepends="python3 perl emacs texinfo"
-makedepends="$(vopt_if clisp clisp) $(vopt_if sbcl sbcl)"
+makedepends="$(vopt_if clisp clisp) $(vopt_if sbcl sbcl) $(vopt_if ecl ecl)"
 depends="$(vopt_if clisp clisp) rlwrap"
 checkdepends="gnuplot"
 short_desc="Computer Algebra System"
@@ -17,10 +17,11 @@ checksum=fe9016276970bef214a1a244348558644514d7fdfaa4fc8b9d0e87afcbb4e7dc
 
 nostrip=yes
 nopie=yes
-build_options="clisp sbcl"
+build_options="clisp sbcl ecl"
 desc_option_clisp="Build with CLISP"
 desc_option_sbcl="Build with SBCL"
-build_options_default="sbcl"
+desc_option_ecl="Build with ECL"
+build_options_default="sbcl ecl"
 vopt_conflict clisp sbcl
 
 post_install() {
@@ -66,3 +67,26 @@ xmaxima_package() {
 			${PKGDESTDIR}/usr/share/pixmaps/maxima
 	}
 }
+
+subpackages="maxima-src maxima-emacs xmaxima"
+
+if [ "$build_option_ecl" ]; then
+	subpackages+=" maxima-ecl"
+fi
+
+maxima-ecl_package() {
+	short_desc+=" - compiled with ECL"
+	depends="${sourcepkg}-${version}_${revision}"
+	pkg_install() {
+		# this is /usr/lib/ecl-${ecl_version}
+		# ideally we would just place it in /usr/lib/ecl but this
+		# doesn't just work
+		# Maybe we can have the ecl package ship a symlink:
+		#     /usr/lib/ecl -> /usr/lib/ecl-${ecl_version}
+		# and have this package just install in /usr/lib/ecl
+		ECLDIR=$(ecl -eval "(princ (SI:GET-LIBRARY-PATHNAME))" -eval "(quit)")
+		vmkdir $ECLDIR
+		vinstall src/binary-ecl/maxima.fas 755 $ECLDIR
+		vmove usr/lib/maxima/${version}/binary-ecl
+	}
+}

From 35dd3d7ecb28703f69a6ca40b6845b47397e9078 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 10 Dec 2021 14:01:01 -0300
Subject: [PATCH 04/19] maxima: use a shared lib

---
 .../maxima/patches/use-shared-library.patch   | 21 ++++++++
 srcpkgs/maxima/template                       | 50 +++++++++++++------
 2 files changed, 55 insertions(+), 16 deletions(-)
 create mode 100644 srcpkgs/maxima/patches/use-shared-library.patch

diff --git a/srcpkgs/maxima/patches/use-shared-library.patch b/srcpkgs/maxima/patches/use-shared-library.patch
new file mode 100644
index 000000000000..a8f986ac7033
--- /dev/null
+++ b/srcpkgs/maxima/patches/use-shared-library.patch
@@ -0,0 +1,21 @@
+--- a/src/maxima.system	2021-12-02 00:26:23.955984864 -0300
++++ b/src/maxima.system	2021-12-02 00:31:22.299541969 -0300
+@@ -87,13 +87,15 @@
+       (let ((obj (mapcar #'(lambda (p)
+ 			     ;; Convert dir/foo.fas to dir/foo.o
+ 			     (make-pathname :type "o" :defaults p))
+-			 files)))
+-	(c::build-fasl "binary-ecl/maxima" :lisp-files obj
++			 files))
++			(lib '("binary-ecl/libmaxima-ecl.so")))
++	(c::build-shared-library "binary-ecl/maxima-ecl" :lisp-files obj)
++	(c::build-fasl "binary-ecl/maxima" :lisp-files lib
+ 			  :ld-flags
+ 			  (let ((x (symbol-value (find-symbol "*AUTOCONF-LD-FLAGS*"
+ 							      (find-package "MAXIMA")))))
+ 			    (if (and x (not (string= x ""))) (split-string x))))
+-	(c::build-program "binary-ecl/maxima" :lisp-files obj
++	(c::build-program "binary-ecl/maxima" :lisp-files lib
+ 			  :ld-flags
+ 			  (let ((x (symbol-value (find-symbol "*AUTOCONF-LD-FLAGS*"
+ 							      (find-package "MAXIMA")))))
diff --git a/srcpkgs/maxima/template b/srcpkgs/maxima/template
index 798b4f9f00de..1a4bec0dba18 100644
--- a/srcpkgs/maxima/template
+++ b/srcpkgs/maxima/template
@@ -4,7 +4,7 @@ version=5.45.1
 revision=2
 build_style=gnu-configure
 configure_args="$(vopt_enable clisp) $(vopt_enable sbcl sbcl-exec) $(vopt_enable ecl)"
-hostmakedepends="python3 perl emacs texinfo"
+hostmakedepends="python3 perl emacs texinfo patchelf"
 makedepends="$(vopt_if clisp clisp) $(vopt_if sbcl sbcl) $(vopt_if ecl ecl)"
 depends="$(vopt_if clisp clisp) rlwrap"
 checkdepends="gnuplot"
@@ -24,6 +24,29 @@ desc_option_ecl="Build with ECL"
 build_options_default="sbcl ecl"
 vopt_conflict clisp sbcl
 
+post_build() {
+	if [ "$build_option_ecl" ]; then
+		# everything will go in the same directory, use rpath=$ORIGIN
+		patchelf --remove-rpath src/binary-ecl/libmaxima-ecl.so
+		patchelf --set-rpath \$ORIGIN \
+			src/binary-ecl/{maxima,maxima.fas}
+		patchelf \
+			--replace-needed  binary-ecl/libmaxima-ecl.so libmaxima-ecl.so \
+			src/binary-ecl/{maxima,maxima.fas}
+	fi
+}
+
+do_check() {
+	if [ "$build_option_ecl" ]; then
+		echo "Check that maxima.fas works"
+		ecl --eval "(require 'maxima \"src/binary-ecl/maxima.fas\")" \
+			--eval "(quit)"
+	fi
+
+	# now run the testsuite
+	make ${makejobs} check
+}
+
 post_install() {
 	vmkdir usr/share/doc
 	ln -sf ../maxima/${version}/doc ${DESTDIR}/usr/share/doc/maxima
@@ -68,25 +91,20 @@ xmaxima_package() {
 	}
 }
 
-subpackages="maxima-src maxima-emacs xmaxima"
-
-if [ "$build_option_ecl" ]; then
-	subpackages+=" maxima-ecl"
-fi
-
 maxima-ecl_package() {
 	short_desc+=" - compiled with ECL"
 	depends="${sourcepkg}-${version}_${revision}"
 	pkg_install() {
-		# this is /usr/lib/ecl-${ecl_version}
-		# ideally we would just place it in /usr/lib/ecl but this
-		# doesn't just work
-		# Maybe we can have the ecl package ship a symlink:
-		#     /usr/lib/ecl -> /usr/lib/ecl-${ecl_version}
-		# and have this package just install in /usr/lib/ecl
+		BINARY_ECL=/usr/lib/maxima/${version}/binary-ecl
+		vmove ${BINARY_ECL}
+		vinstall src/binary-ecl/libmaxima-ecl.so 755 ${BINARY_ECL}
+		vinstall src/binary-ecl/maxima.fas 755 ${BINARY_ECL}
+
+		# symlink maxima.fas in ECLDIR
 		ECLDIR=$(ecl -eval "(princ (SI:GET-LIBRARY-PATHNAME))" -eval "(quit)")
-		vmkdir $ECLDIR
-		vinstall src/binary-ecl/maxima.fas 755 $ECLDIR
-		vmove usr/lib/maxima/${version}/binary-ecl
+		vmkdir ${ECLDIR}
+		ln -sr ${PKGDESTDIR}/${BINARY_ECL}/maxima.fas ${PKGDESTDIR}/${ECLDIR}
 	}
 }
+
+subpackages="maxima-src maxima-emacs xmaxima $(vopt_if ecl maxima-ecl)"

From 4b631d17779cace25533a2590af849fc64ec824e 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 05/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 99f6bd814d2aa6664ca83647c54474d28d130d46 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 06/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 9c76d4c1345460a97ffd71b5b686529865dd8e41 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 07/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 856417f1d85f98127aa243da90eddb568035e165 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 08/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 e3c8d4e42ea65d184779be38223b6c22183bd3a8 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 09/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 251fe2e7955d588221dc61cbd4634247e39b8d74 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 10/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 d07cb571d0977f9681ae7571f3eec03914586cf9 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 11/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 0f737f38782286f1fdf0a2dcb34caee4dfec0eee 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 12/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 1334c1512b205f2669a4bc1e752e9bb52fd1a086 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 13/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 037dd0a6397ddd0a2ec01a223c1018c66609cc7f 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 14/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 a96570d6c0926108bcbb89b6da354189d93a52cf 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 15/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 93016f8f392c66478957182e0ae1e0746b5aa9e2 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 16/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 5d6191ddc7b2772528935544f4eb5620698a8b6b 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 17/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 fc94c4d1e79f1d7252b5a7ee2f2908fbc4d5affe 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 18/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 96eba896c8784bba244e0e827e8a6b3917332301 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 19/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

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta8
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (115 preceding siblings ...)
  2021-12-20  2:35 ` [PR PATCH] [Updated] " tornaria
@ 2021-12-23 17:18 ` dkwo
  2021-12-23 17:47 ` dkwo
                   ` (131 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-12-23 17:18 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1000434912

Comment:
The new version builds and works fine on newer musl, no more segfaults.
However, I'm unable to use it from `jupyterlab`: since we're now using system python, should the link be changed?
I tried `/usr/local/share/jupyter -> /usr/lib/sage-9.5.beta8/local/var/lib/sage/venv-python3.10/share/jupyter` @leahneukirchen 

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta8
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (116 preceding siblings ...)
  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
                   ` (130 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-12-23 17:47 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1000447788

Comment:
OK, I take it back.

Jupyterlab still works, provided I also use
`jupyter lab --app-dir /usr/lib/python3.10/site-packages/jupyterlab`
(I'll look into that later.)

As for segfaults, it goes a bit further, but e.g.
```
sage: V = var('r1, r2, u, v, m')
sage: r1 = exp(m*(u^2-v^2))*u
sage: r2 = exp(m*(v^2-u^2))*v
sage: Jac = jacobian((r1,r2),(u,v)).inverse().simplify_full()

*** SIG 11 *** inside sig_on
do_raise_exception(sig=11)
PyErr_Occurred() = 0
Raising Python exception 0 ms after signal...
---------------------------------------------------------------------------
SignalError                               Traceback (most recent call last)
<ipython-input-5-5a754cefa940> in <module>
----> 1 Jac = jacobian((r1,r2),(u,v)).inverse().simplify_full()

(stuff)

/usr/lib/sage-9.5.beta8/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages/sage/rings/integer.pyx in sage.rings.integer.Integer.factorial (build/c
ythonized/sage/rings/integer.c:29386)()
   4476         cdef Integer z = PY_NEW(Integer)
   4477
-> 4478         sig_on()
   4479         mpz_fac_ui(z.value, mpz_get_ui(self.value))
   4480         sig_off()

SignalError: Segmentation fault
```
Does this work on glibc with new version of template?

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta8
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (117 preceding siblings ...)
  2021-12-23 17:47 ` dkwo
@ 2021-12-23 18:28 ` tornaria
  2021-12-23 19:20 ` dkwo
                   ` (129 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-12-23 18:28 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1000466098

Comment:
Works for me on glibc and also on a xbps-src chroot with musl libc, in fact all tests pass on x86_64 and x86_64-musl.
```
$ ./xbps-src -m masterdir.musl -Ct chroot
[...]
[.../masterdir.musl /]$ /usr/lib/sage-9.5.beta8/sage 
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 9.5.beta8, Release Date: 2021-12-12               │
│ Using Python 3.10.1. Type "help()" for help.                       │
└────────────────────────────────────────────────────────────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Warning: this is a prerelease version, and it may be unstable.     ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
sage: V = var('r1, r2, u, v, m')
sage: r1 = exp(m*(u^2-v^2))*u
sage: r2 = exp(m*(v^2-u^2))*v
sage: Jac = jacobian((r1,r2),(u,v)).inverse().simplify_full()
sage: Jac
[(2*m*v^2 + 1)*e^(m*v^2)/(2*m*v^2*e^(m*u^2) + (2*m*u^2 + 1)*e^(m*u^2))                     2*m*u*v*e^(m*u^2 - m*v^2)/(2*m*u^2 + 2*m*v^2 + 1)]
[      2*m*u*v*e^(m*v^2)/(2*m*v^2*e^(m*u^2) + (2*m*u^2 + 1)*e^(m*u^2))               (2*m*u^2 + 1)*e^(m*u^2 - m*v^2)/(2*m*u^2 + 2*m*v^2 + 1)]
```

Did you manage to compile with debug symbols to see if we can get a better stack trace?

Does this happen always exactly the same, at the same point? A segmentation fault is very weird at that point...

As for the jupyterlab stuff... for now it's bound to be inconvenient. Sage installs python modules in its own venv which is isolated from system site-packages, but now that system python 3.10 is working we'll eventually try https://trac.sagemath.org/ticket/29665 which will allow us to configure the sage venv to default to system site-packages so we can use system python modules.

We are really close to having a working modular sagemath. Then we can start to think about the venv and integration.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta8
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (118 preceding siblings ...)
  2021-12-23 18:28 ` tornaria
@ 2021-12-23 19:20 ` dkwo
  2021-12-23 19:39 ` tornaria
                   ` (128 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-12-23 19:20 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1000486115

Comment:
I agree about jupyterlab.

I did manage to compile with debug, as you suggested.
With gdb installed, I get
```
$ sage-9.5.beta8_1 -t --all
no stored timings available
Running doctests with ID 2021-12-23-20-18-29-7fa0c985.
Git branch: develop
Using --optional=build,dochtml,pip,sage,sage.geometry.polyhedron,sage.rings.real_double,sage_spkg,void
Doctesting entire Sage library.
Doctesting 4410 files.
Traceback (most recent call last):
  File "/usr/lib/sage-9.5.beta8/src/bin/sage-runtests", line 155, in <module>
    err = DC.run()
  File "/usr/lib/sage-9.5.beta8/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages/sage/doctest/control.py", line 1257, in run
    self.run_doctests()
  File "/usr/lib/sage-9.5.beta8/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages/sage/doctest/control.py", line 954, in run_doctests
    self.dispatcher = DocTestDispatcher(self)
  File "/usr/lib/sage-9.5.beta8/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages/sage/doctest/forker.py", line 1614, in __init__
    init_sage(controller)
  File "/usr/lib/sage-9.5.beta8/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages/sage/doctest/forker.py", line 224, in init_sage
    import sympy
  File "/usr/lib/sage-9.5.beta8/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages/sympy/__init__.py", line 22, in <module>
    import mpmath
  File "/usr/lib/sage-9.5.beta8/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages/mpmath/__init__.py", line 5, in <module>
    from .ctx_fp import FPContext
  File "/usr/lib/sage-9.5.beta8/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages/mpmath/ctx_fp.py", line 1, in <module>
    from .ctx_base import StandardBaseContext
  File "/usr/lib/sage-9.5.beta8/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages/mpmath/ctx_base.py", line 3, in <module>
    from .libmp.backend import xrange
  File "/usr/lib/sage-9.5.beta8/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages/mpmath/libmp/__init__.py", line 40, in <module>
    from .libhyper import (NoConvergence, make_hyp_summator,
  File "/usr/lib/sage-9.5.beta8/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages/mpmath/libmp/libhyper.py", line 41, in <module>
    from .gammazeta import mpf_gamma_int, mpf_euler, euler_fixed
  File "/usr/lib/sage-9.5.beta8/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages/mpmath/libmp/gammazeta.py", line 1371, in <module>
    small_factorial_cache = [from_int(ifac(n)) for \
  File "/usr/lib/sage-9.5.beta8/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages/mpmath/libmp/gammazeta.py", line 1371, in <listcomp>
    small_factorial_cache = [from_int(ifac(n)) for \
  File "/usr/lib/sage-9.5.beta8/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages/mpmath/libmp/libintmath.py", line 387, in <lambda>
    ifac = lambda n: int(sage.factorial(n))
  File "sage/symbolic/function.pyx", line 1026, in sage.symbolic.function.BuiltinFunction.__call__ (build/cythonized/sage/symbolic/function.c:10701)
  File "sage/rings/integer.pyx", line 4478, in sage.rings.integer.Integer.factorial (build/cythonized/sage/rings/integer.c:29386)
cysignals.signals.SignalError: Segmentation fault
------------------------------------------------------------------------
Unhandled SIGSEGV: A segmentation fault occurred.
This probably occurred because a *compiled* module has a bug
in it and is not properly wrapped with sig_on(), sig_off().
Python will now terminate.
------------------------------------------------------------------------
Segmentation fault
```
Not sure if this is more informative.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta8
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (119 preceding siblings ...)
  2021-12-23 19:20 ` dkwo
@ 2021-12-23 19:39 ` tornaria
  2021-12-23 19:50 ` tornaria
                   ` (127 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-12-23 19:39 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1000492922

Comment:
> File "sage/rings/integer.pyx", line 4478, in sage.rings.integer.Integer.factorial (build/cythonized/sage/rings/integer.c:29386)

At least it's consistently failing always on `sage.rings.integer.Integer.factorial()`. I don't think this is related to cysignals, rather it seems the call to `mpz_fac_ui(z.value, mpz_get_ui(self.value))` is segfaulting and this is catched by cysignals.

Can you try something like:
```
sage: for i in srange(1000000): print(sage.rings.integer.Integer.factorial(i))
1
1
2
6
24
120
720
5040
40320
362880
3628800
39916800
479001600
6227020800
87178291200
1307674368000
20922789888000
355687428096000
6402373705728000
121645100408832000
...
```



^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta8
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (120 preceding siblings ...)
  2021-12-23 19:39 ` tornaria
@ 2021-12-23 19:50 ` tornaria
  2021-12-23 20:41 ` dkwo
                   ` (126 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-12-23 19:50 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1000496931

Comment:
Otherwise, you can try to patch `Integer.factorial` to print out some debug information, like the `self` and `z.value` right after the call to `PY_NEW()`. I wonder if for some reason `PY_NEW(Integer)` is failing and it's returning 0. This would give a segfault since I think `mpz_fac_ui` assumes its arguments are non-null.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta8
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (121 preceding siblings ...)
  2021-12-23 19:50 ` tornaria
@ 2021-12-23 20:41 ` dkwo
  2021-12-23 22:08 ` tornaria
                   ` (125 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-12-23 20:41 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1000515210

Comment:
The first gives
```
$ sage-9.5.beta8_1
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 9.5.beta8, Release Date: 2021-12-12               │
│ Using Python 3.10.1. Type "help()" for help.                       │
└────────────────────────────────────────────────────────────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Warning: this is a prerelease version, and it may be unstable.     ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
sage: for i in srange(1000000): print(sage.rings.integer.Integer.factorial(i))
1
1
2
6
24
120
720
5040
40320
362880
3628800
39916800
479001600
6227020800
87178291200
1307674368000
20922789888000
355687428096000
6402373705728000
121645100408832000
2432902008176640000
51090942171709440000
1124000727777607680000
25852016738884976640000
620448401733239439360000
15511210043330985984000000
403291461126605635584000000

*** SIG 11 *** inside sig_on
do_raise_exception(sig=11)
PyErr_Occurred() = 0
Raising Python exception 0 ms after signal...
---------------------------------------------------------------------------
SignalError                               Traceback (most recent call last)
<ipython-input-1-c100b531baa5> in <module>
----> 1 for i in srange(Integer(1000000)): print(sage.rings.integer.Integer.fac
torial(i))

/usr/lib/sage-9.5.beta8/local/var/lib/sage/venv-python3.10/lib/python3.10/site-
packages/sage/rings/integer.pyx in sage.rings.integer.Integer.factorial (build/
cythonized/sage/rings/integer.c:29386)()
   4476         cdef Integer z = PY_NEW(Integer)
   4477
-> 4478         sig_on()
   4479         mpz_fac_ui(z.value, mpz_get_ui(self.value))
   4480         sig_off()

SignalError: Segmentation fault
sage: quit
Exiting Sage (CPU time 0m0.81s, Wall time 0m59.58s).
------------------------------------------------------------------------
Unhandled SIGSEGV: A segmentation fault occurred.
This probably occurred because a *compiled* module has a bug
in it and is not properly wrapped with sig_on(), sig_off().
Python will now terminate.
------------------------------------------------------------------------
Segmentation fault
```
I'll try the other tomorrow.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta8
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (122 preceding siblings ...)
  2021-12-23 20:41 ` dkwo
@ 2021-12-23 22:08 ` tornaria
  2021-12-24  9:08 ` dkwo
                   ` (124 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-12-23 22:08 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1000542791

Comment:
Can you check if always <= 26 succeds and >= 27 fails? Does it fail If you start sage from scratch and just do `sage.rings.integer.Integer.factorial(27)`?

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta8
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (123 preceding siblings ...)
  2021-12-23 22:08 ` tornaria
@ 2021-12-24  9:08 ` dkwo
  2021-12-24 11:36 ` tornaria
                   ` (123 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-12-24  9:08 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1000739079

Comment:
Indeed, as you said:
```
sage: sage.rings.integer.Integer.factorial(26)
403291461126605635584000000
sage: sage.rings.integer.Integer.factorial(27)

*** SIG 11 *** inside sig_on
do_raise_exception(sig=11)
PyErr_Occurred() = 0
Raising Python exception 0 ms after signal...
---------------------------------------------------------------------------
SignalError                               Traceback (most recent call last)
<ipython-input-2-a9e8bb93f078> in <module>
----> 1 sage.rings.integer.Integer.factorial(Integer(27))

/usr/lib/sage-9.5.beta8/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages/sage/rings/integer.pyx in sage.rings.integer.Integer.factorial (build/cythonized/sage/rings/integer.c:29386)()
   4476         cdef Integer z = PY_NEW(Integer)
   4477
-> 4478         sig_on()
   4479         mpz_fac_ui(z.value, mpz_get_ui(self.value))
   4480         sig_off()

SignalError: Segmentation fault
sage: quit
Exiting Sage (CPU time 0m2.72s, Wall time 0m53.56s).
------------------------------------------------------------------------
Unhandled SIGSEGV: A segmentation fault occurred.
This probably occurred because a *compiled* module has a bug
in it and is not properly wrapped with sig_on(), sig_off().
Python will now terminate.
------------------------------------------------------------------------
Segmentation fault
```

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta8
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (124 preceding siblings ...)
  2021-12-24  9:08 ` dkwo
@ 2021-12-24 11:36 ` tornaria
  2021-12-24 11:53 ` dkwo
                   ` (122 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-12-24 11:36 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1000804239

Comment:
The 27 seems to be a threshold for `mpz_fac_ui()`. Just to be sure, try your gmp library, e.g.
```c
#include <gmp.h>
#include <stdio.h>

int main()
{
    mpz_t x;

    mpz_init(x);

    mpz_fac_ui(x, 26);
    mpz_out_str(stdout, 10, x);
    puts("");

    mpz_fac_ui(x, 27);
    mpz_out_str(stdout, 10, x);
    puts("");
}
```
Here I get
```
$ cc fact.c -lgmp -ofact && ./fact 
403291461126605635584000000
10888869450418352160768000000
```

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta8
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (125 preceding siblings ...)
  2021-12-24 11:36 ` tornaria
@ 2021-12-24 11:53 ` dkwo
  2021-12-24 12:15 ` tornaria
                   ` (121 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-12-24 11:53 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1000808741

Comment:
I do get the same:
```
$ cc fact.c -lgmp -ofact && ./fact
403291461126605635584000000
10888869450418352160768000000
```

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta8
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (126 preceding siblings ...)
  2021-12-24 11:53 ` dkwo
@ 2021-12-24 12:15 ` tornaria
  2021-12-24 16:10 ` tornaria
                   ` (120 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-12-24 12:15 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1000816549

Comment:
Then the library is ok, so this points to an issue with `PY_NEW()` not allocating properly, in such a way that it only triggers the second branch of `mpz_fac_ui`...

Try `sage.rings.integer.Integer.factorial(27)` on `sage --valgrind`; but if that doesn't give good information the only thing I can think of is to patch the function to print stuff about z.value after `PY_NEW(Integer)` but before `sig_on()`.

Maybe something like (untested):
```
cdef mpz_ptr zz
zz = <mpz_ptr>(z.value)
print(zz._mp_alloc, zz._mp_size, zz._mp_d)
```

I don't know if we can use `print()` on these C types. Maybe the way is something like `printf("%d %d %p\n", zz._mp_alloc, zz._mp_size, zz._mp_d)`.

Alternatively, try to step this function in gdb and look at these values.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta8
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (127 preceding siblings ...)
  2021-12-24 12:15 ` tornaria
@ 2021-12-24 16:10 ` tornaria
  2021-12-24 16:35 ` tornaria
                   ` (119 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-12-24 16:10 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1000816549

Comment:
Then the library is ok, so this points to an issue with `PY_NEW()` not allocating properly, in such a way that it only triggers the second branch of `mpz_fac_ui`...

Try `sage.rings.integer.Integer.factorial(27)` on `sage --valgrind`; but if that doesn't give good information the only thing I can think of is to patch the function to print stuff about z.value after `PY_NEW(Integer)` but before `sig_on()`.

Maybe something like:
```
cdef mpz_ptr zz
zz = <mpz_ptr>(z.value)
print(zz._mp_alloc, zz._mp_size, <long>zz._mp_d)
```
Alternatively, try to step this function in gdb and look at these values.

Edit: add cast to `<long>` so it works.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta8
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (128 preceding siblings ...)
  2021-12-24 16:10 ` tornaria
@ 2021-12-24 16:35 ` tornaria
  2021-12-24 17:39 ` tornaria
                   ` (118 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-12-24 16:35 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1000894040

Comment:
Using this patch
```diff
--- a/src/sage/rings/integer.pyx	2021-12-12 07:19:28.000000000 -0300
+++ b/src/sage/rings/integer.pyx	2021-12-24 13:09:22.860265615 -0300
@@ -4475,10 +4475,19 @@
 
         cdef Integer z = PY_NEW(Integer)
 
+        cdef mpz_ptr zz
+        zz = <mpz_ptr>(z.value)
+        print(zz._mp_alloc, zz._mp_size, <long>zz._mp_d)
+        print([(<unsigned long *>zz._mp_d)[i] for i in range(zz._mp_size)])
+
         sig_on()
         mpz_fac_ui(z.value, mpz_get_ui(self.value))
         sig_off()
 
+        zz = <mpz_ptr>(z.value)
+        print(zz._mp_alloc, zz._mp_size, <long>zz._mp_d)
+        print([(<unsigned long *>zz._mp_d)[i] for i in range(zz._mp_size)])
+
         return z
 
     def multifactorial(self, long k):
```

I get
```sage
sage: sage.rings.integer.Integer.factorial(26)
2 0 94045612553408
[]
2 2 94045612553408
[16877220553537093632, 21862473]
403291461126605635584000000
sage: sage.rings.integer.Integer.factorial(27)
2 0 94045618588208
[]
3 2 94045618588208
[12963097176472289280, 590286795]
10888869450418352160768000000
```
Note: the `940456...` are allocated pointers, so random; everything else should be similar I guess.

Note 2: if you already have sage compiled, you can just patch the file and run `./sage -br` to recompile just this file. Not in the system installed version because that's readonly, but it works ok in the chroot.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta8
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (129 preceding siblings ...)
  2021-12-24 16:35 ` tornaria
@ 2021-12-24 17:39 ` tornaria
  2021-12-25  8:44 ` dkwo
                   ` (117 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-12-24 17:39 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1000906806

Comment:
@dkwo: can you instruct me how to bootstrap void with the exact version of musl you are using? Would that be 1.2.2? Why is musl stuck at 1.1.24?

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta8
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (130 preceding siblings ...)
  2021-12-24 17:39 ` tornaria
@ 2021-12-25  8:44 ` dkwo
  2021-12-25 13:33 ` tornaria
                   ` (116 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-12-25  8:44 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1000992932

Comment:
Thanks for helping.
I'm using https://github.com/dkwo/void-packages/commit/8af9d11b25126191ea7ec4c2f70100b27768a478
which is musl 1.2.2 as you said.
It has to do with a change in time format, which requires rebuild of everything for certain archs.

I have this pr installed on my system: what should I do exactly?
```
./xbps-src -m masterdir.musl -Ct chroot
apply patch
./sage -br
```

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta8
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (131 preceding siblings ...)
  2021-12-25  8:44 ` dkwo
@ 2021-12-25 13:33 ` tornaria
  2021-12-25 15:29 ` tornaria
                   ` (115 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-12-25 13:33 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1001018636

Comment:
> ```
> ./xbps-src -m masterdir.musl -Ct chroot
> apply patch
> ./sage -br
> ```

Yes, precisely. I find convenient to patch/edit files in masterdir.musl from outside the chroot (where I have my editor configuration, etc) and run `./sage -br` from `/build/sage-9.5.beta8` inside the chroot.

BTW, "-br" means "build and run", there's also "-bt" for "build and test".

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta8
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (132 preceding siblings ...)
  2021-12-25 13:33 ` tornaria
@ 2021-12-25 15:29 ` tornaria
  2021-12-25 15:59 ` ericonr
                   ` (114 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-12-25 15:29 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1001036749

Comment:
Using `sage -gdb` I can get a backtrace which shows the segfault has something to do with realloc, but I don't know how to get a good backtrace, even though I built and installed `musl-dbg`. I'm guessing all those `??` are traces in musl libc (???)

It seems only factorial between 27 and 35 call realloc so those are the values failing (makes sense because of the default thresholds).
```
$ sage -gdb
[...]
sage: Integer.factorial(27)
[LWP 343 exited]

Thread 1 "python" received signal SIGSEGV, Segmentation fault.
0x00007ffff7f77886 in __libc_realloc () from /lib/ld-musl-x86_64.so.1
(gdb) backtrace 
#0  0x00007ffff7f77886 in __libc_realloc () from /lib/ld-musl-x86_64.so.1
#1  0x00007fff62d628d0 in ?? ()
#2  0x0000000000000001 in ?? ()
#3  0x00007fff62b91930 in ?? ()
#4  0x00007fff62d95f40 in ?? ()
#5  0x0000000000000018 in ?? ()
#6  0x0000000000000017 in ?? ()
#7  0x00007fff62d95f40 in ?? ()
#8  0x00007fff62d95f40 in ?? ()
#9  0x00007fff62bd9d50 in ?? ()
#10 0x00007fffafe986ec in sig_realloc (__pyx_v_size=140734942737072, __pyx_v_ptr=<optimized out>) at build/cythonized/sage/ext/memory.c:1816
#11 __pyx_f_4sage_3ext_6memory_sage_sig_realloc (__pyx_v_ptr=<optimized out>, __pyx_v_old_size=<optimized out>, __pyx_v_new_size=140734942737072)
    at build/cythonized/sage/ext/memory.c:1446
#12 0x00007ffff49a5c5e in __gmpz_realloc (m=0x55555556cc70, new_alloc=new_alloc@entry=3) at realloc.c:67
#13 0x00007ffff49a26b2 in __gmpz_mul_2exp (r=r@entry=0x7fff62d95f40, u=0x7fff6844f2b8, u@entry=0x7fff62d95f40, cnt=23) at mul_2exp.c:51
#14 0x00007ffff499c42a in __gmpz_fac_ui (x=x@entry=0x7fff62d95f40, n=<optimized out>) at fac_ui.c:103
#15 0x00007fffb0b6e5b4 in __pyx_pf_4sage_5rings_7integer_7Integer_168factorial (__pyx_v_self=<optimized out>) at build/cythonized/sage/rings/integer.c:29395
```

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta8
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (133 preceding siblings ...)
  2021-12-25 15:29 ` tornaria
@ 2021-12-25 15:59 ` ericonr
  2021-12-25 15:59 ` ericonr
                   ` (113 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: ericonr @ 2021-12-25 15:59 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1001040506

Comment:
Did you remember to build musl with `-g` and install `musl-dbg` from your local binpkgs instead of the version from void repos?

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta8
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (134 preceding siblings ...)
  2021-12-25 15:59 ` ericonr
@ 2021-12-25 15:59 ` ericonr
  2021-12-25 16:21 ` tornaria
                   ` (112 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: ericonr @ 2021-12-25 15:59 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1001040561

Comment:
You shouldn't even need `musl-dbg`, actually. We don't strip libc. It just needs to be built with debug info.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta8
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (135 preceding siblings ...)
  2021-12-25 15:59 ` ericonr
@ 2021-12-25 16:21 ` tornaria
  2021-12-26  2:11 ` ericonr
                   ` (111 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-12-25 16:21 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1001042266

Comment:
> You shouldn't even need `musl-dbg`, actually. We don't strip libc. It just needs to be built with debug info.

Hmm... I rebuilt musl using `./xbps-src -t -g pkg musl` and then I installed `musl-dbg` on the chroot. Maybe what happened is that I did not reinstall `musl` in the chroot so I'm using the old (built without -g) one.

In any case, here's a temporary patch for sagemath that seems to fix the issue (at least `Integer.factorial(27)` works now). I'll submit something more robust (and less overhead since this is *really* an important hotpath for computations: allocation of integers no less) to sage trac, but at least you can try to see if this fixes doctests.

```diff
--- a/src/sage/rings/integer.pyx       2021-12-12 07:19:28.000000000 -0300
+++ b/src/sage/rings/integer.pyx        2021-12-25 13:00:21.719904604 -0300
@@ -7345,7 +7349,7 @@
         #  Applications expecting to be compatible with future releases should use
         #  only the documented interfaces described in previous chapters."
         new_mpz = <mpz_ptr>((<Integer>new).value)
-        new_mpz._mp_d = <mp_ptr>check_malloc(GMP_LIMB_BITS >> 3)
+        new_mpz._mp_d = <mp_ptr>check_malloc((new_mpz._mp_alloc)*(GMP_LIMB_BITS >> 3))
 
     # This line is only needed if Python is compiled in debugging mode
     # './configure --with-pydebug' or SAGE_DEBUG=yes. If that is the
```
Oh, yes, yes, they are assuming `_mp_alloc=1` so they only allocate 8 bytes but in fact `_mp_alloc=2` so gmp (rightly) uses 16 bytes! It seems glibc and old musl allocate at least 16 bytes anyway so it hasn't developed into a problem, but new musl allocates exactly 8 bytes and uses the next 8 bytes for some malloc data that later makes realloc to segfault. The fact that `_mp_alloc=2` has nothing to do with musl libc and this bug is present in sage 9.4 without biting AFAIK so it really means typical allocators are very lenient on this.

@dkwo can you try again with this patch and see if now doctests pass or is there another issue?


^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta8
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (136 preceding siblings ...)
  2021-12-25 16:21 ` tornaria
@ 2021-12-26  2:11 ` ericonr
  2021-12-26  9:28 ` dkwo
                   ` (110 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: ericonr @ 2021-12-26  2:11 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1001094822

Comment:
> but new musl allocates exactly 8 bytes and uses the next 8 bytes for some malloc data that later makes realloc to segfault

Yeah, it's where mallocng stores the canary for buffer overflows.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta8
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (137 preceding siblings ...)
  2021-12-26  2:11 ` ericonr
@ 2021-12-26  9:28 ` dkwo
  2021-12-26 10:33 ` dkwo
                   ` (109 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-12-26  9:28 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1001137617

Comment:
Your patch solves the issue, thank you.
I'm now running doctests.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta8
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (138 preceding siblings ...)
  2021-12-26  9:28 ` dkwo
@ 2021-12-26 10:33 ` dkwo
  2021-12-26 10:34 ` dkwo
                   ` (108 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-12-26 10:33 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1001150946

Comment:
Running `sage-9.5.beta8_1 -tp 4 --all` gives
```
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/arith/long.pxd  # 14 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/cpython/cython_metaclass.pyx  # 4 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/cpython/getattr.pyx  # 4 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/cpython/string.pyx  # 1 doctest failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/cpython/wrapperdescr.pxd  # 6 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/docs/conf.py  # 1 doctest failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/docs/instancedoc.pyx  # 4 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/env.py  # 1 doctest failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/ext/memory_allocator.pxd  # 6 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/ext/memory_allocator.pyx  # 9 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/features/__init__.py  # 2 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/graphs/connectivity.pyx  # 2 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/graphs/graph_decompositions/fast_digraph.pyx  # 5 doctests faile
d
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/matrix/matrix_mod2_dense.pyx  # 1 doctest failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/misc/cachefunc.pyx  # 54 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/misc/cython.py  # 18 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/misc/inherit_comparison.pyx  # 5 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/misc/inline_fortran.py  # 3 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/misc/lazy_attribute.pyx  # 3 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/misc/nested_class.pyx  # 6 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/misc/persist.pyx  # 2 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/misc/sagedoc.py  # 6 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/misc/session.pyx  # 2 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/misc/superseded.py  # 6 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/misc/sageinspect.py  # 35 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/parallel/decorate.py  # 2 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/repl/ipython_kernel/install.py  # 1 doctest failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/repl/load.py  # 2 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/repl/ipython_extension.py  # 6 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/rings/integer_fake.pxd  # 1 doctest failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/rings/polynomial/ore_polynomial_element.pyx  # 6 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/rings/tate_algebra_ideal.pyx  # 6 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/structure/element.pyx  # 37 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/structure/factory.pyx  # 8 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/symbolic/pynac.pxi  # 1 doctest failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage_docbuild/__init__.py  # 5 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage_setup/find.py  # 4 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/tests/cmdline.py  # 5 doctests failed
```
Is there anything unexpected here that I should investigate?

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta8
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (139 preceding siblings ...)
  2021-12-26 10:33 ` dkwo
@ 2021-12-26 10:34 ` dkwo
  2021-12-26 10:36 ` dkwo
                   ` (107 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-12-26 10:34 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1001150946

Comment:
Running `sage-9.5.beta8_1 -tp 4 --all` gives
```
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/arith/long.pxd  # 14 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/cpython/cython_metaclass.pyx  # 4 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/cpython/getattr.pyx  # 4 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/cpython/string.pyx  # 1 doctest failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/cpython/wrapperdescr.pxd  # 6 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/docs/conf.py  # 1 doctest failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/docs/instancedoc.pyx  # 4 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/env.py  # 1 doctest failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/ext/memory_allocator.pxd  # 6 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/ext/memory_allocator.pyx  # 9 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/features/__init__.py  # 2 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/graphs/connectivity.pyx  # 2 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/graphs/graph_decompositions/fast_digraph.pyx  # 5 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/matrix/matrix_mod2_dense.pyx  # 1 doctest failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/misc/cachefunc.pyx  # 54 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/misc/cython.py  # 18 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/misc/inherit_comparison.pyx  # 5 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/misc/inline_fortran.py  # 3 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/misc/lazy_attribute.pyx  # 3 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/misc/nested_class.pyx  # 6 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/misc/persist.pyx  # 2 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/misc/sagedoc.py  # 6 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/misc/session.pyx  # 2 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/misc/superseded.py  # 6 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/misc/sageinspect.py  # 35 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/parallel/decorate.py  # 2 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/repl/ipython_kernel/install.py  # 1 doctest failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/repl/load.py  # 2 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/repl/ipython_extension.py  # 6 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/rings/integer_fake.pxd  # 1 doctest failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/rings/polynomial/ore_polynomial_element.pyx  # 6 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/rings/tate_algebra_ideal.pyx  # 6 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/structure/element.pyx  # 37 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/structure/factory.pyx  # 8 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/symbolic/pynac.pxi  # 1 doctest failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage_docbuild/__init__.py  # 5 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage_setup/find.py  # 4 doctests failed
sage -t --random-seed=194742339583714872644641637571103129375 /usr/lib/sage-9.5.beta8/src/sage/tests/cmdline.py  # 5 doctests failed
```
Is there anything unexpected here that I should investigate?

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta8
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (140 preceding siblings ...)
  2021-12-26 10:34 ` dkwo
@ 2021-12-26 10:36 ` dkwo
  2021-12-27  0:08 ` [PR PATCH] [Updated] " tornaria
                   ` (106 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-12-26 10:36 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1001151272

Comment:
Could you rebase on master and update to beta9?

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: sagemath-9.5.beta8
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (141 preceding siblings ...)
  2021-12-26 10:36 ` dkwo
@ 2021-12-27  0:08 ` tornaria
  2021-12-27  4:12 ` tornaria
                   ` (105 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-12-27  0:08 UTC (permalink / raw)
  To: ml

[-- 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: 281099 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/18] 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/18] 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/18] 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/18] 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/18] 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/18] 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/18] 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/18] 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/18] 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/18] 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/18] 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/18] 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/18] 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/18] 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/18] 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/18] 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/18] 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/18] 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

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: sagemath-9.5.beta8
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (142 preceding siblings ...)
  2021-12-27  0:08 ` [PR PATCH] [Updated] " tornaria
@ 2021-12-27  4:12 ` tornaria
  2021-12-27 16:28 ` dkwo
                   ` (104 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-12-27  4:12 UTC (permalink / raw)
  To: ml

[-- 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

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta8
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (143 preceding siblings ...)
  2021-12-27  4:12 ` tornaria
@ 2021-12-27 16:28 ` dkwo
  2021-12-27 16:29 ` dkwo
                   ` (103 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-12-27 16:28 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1001645075

Comment:
`sage-9.5.beta9_1 --testall` on x86_64-musl (1.2.2) gives
```
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/env.py  # 1 doctest failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/structure/factory.pyx  # 8 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/structure/element.pyx  # 37 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/symbolic/pynac.pxi  # 1 doctest failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/rings/integer_fake.pxd  # 1 doctest failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/rings/tate_algebra_ideal.pyx  # 6 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/rings/polynomial/ore_polynomial_element.pyx  # 6 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/docs/instancedoc.pyx  # 4 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/features/__init__.py  # 2 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/matrix/matrix_mod2_dense.pyx  # 1 doctest failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/arith/long.pxd  # 14 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/graphs/connectivity.pyx  # 2 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/graphs/graph_decompositions/fast_digraph.pyx  # 5 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/ext/memory_allocator.pxd  # 6 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/ext/memory_allocator.pyx  # 9 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/repl/ipython_extension.py  # 6 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/repl/load.py  # 2 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/parallel/decorate.py  # 2 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/cpython/getattr.pyx  # 4 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/cpython/string.pyx  # 1 doctest failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/cpython/cython_metaclass.pyx  # 4 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/cpython/wrapperdescr.pxd  # 6 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/misc/lazy_attribute.pyx  # 3 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/misc/session.pyx  # 2 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/misc/inherit_comparison.pyx  # 5 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/misc/persist.pyx  # 2 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/misc/superseded.py  # 6 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/misc/nested_class.pyx  # 6 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/misc/cachefunc.pyx  # 54 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/misc/sageinspect.py  # 35 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/misc/sagedoc.py  # 2 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/misc/inline_fortran.py  # 3 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/misc/cython.py  # 18 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/tests/cmdline.py  # 4 doctests failed
```

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta8
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (144 preceding siblings ...)
  2021-12-27 16:28 ` dkwo
@ 2021-12-27 16:29 ` dkwo
  2021-12-27 16:37 ` tornaria
                   ` (102 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-12-27 16:29 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1001645075

Comment:
Outside of the chroot, `sage-9.5.beta9_1 --testall` on x86_64-musl (1.2.2) gives
```
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/env.py  # 1 doctest failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/structure/factory.pyx  # 8 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/structure/element.pyx  # 37 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/symbolic/pynac.pxi  # 1 doctest failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/rings/integer_fake.pxd  # 1 doctest failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/rings/tate_algebra_ideal.pyx  # 6 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/rings/polynomial/ore_polynomial_element.pyx  # 6 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/docs/instancedoc.pyx  # 4 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/features/__init__.py  # 2 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/matrix/matrix_mod2_dense.pyx  # 1 doctest failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/arith/long.pxd  # 14 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/graphs/connectivity.pyx  # 2 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/graphs/graph_decompositions/fast_digraph.pyx  # 5 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/ext/memory_allocator.pxd  # 6 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/ext/memory_allocator.pyx  # 9 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/repl/ipython_extension.py  # 6 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/repl/load.py  # 2 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/parallel/decorate.py  # 2 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/cpython/getattr.pyx  # 4 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/cpython/string.pyx  # 1 doctest failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/cpython/cython_metaclass.pyx  # 4 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/cpython/wrapperdescr.pxd  # 6 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/misc/lazy_attribute.pyx  # 3 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/misc/session.pyx  # 2 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/misc/inherit_comparison.pyx  # 5 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/misc/persist.pyx  # 2 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/misc/superseded.py  # 6 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/misc/nested_class.pyx  # 6 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/misc/cachefunc.pyx  # 54 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/misc/sageinspect.py  # 35 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/misc/sagedoc.py  # 2 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/misc/inline_fortran.py  # 3 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/misc/cython.py  # 18 doctests failed
sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/tests/cmdline.py  # 4 doctests failed
```

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta8
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (145 preceding siblings ...)
  2021-12-27 16:29 ` dkwo
@ 2021-12-27 16:37 ` tornaria
  2021-12-27 17:15 ` tornaria
                   ` (101 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-12-27 16:37 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1001648521

Comment:
> Outside of the chroot, `sage-9.5.beta9_1 --testall` on x86_64-musl (1.2.2) gives

But does `./xbps-src check sagemath` pass all doctests (inside the chroot)?

I haven't tried testing x86_64-musl with 1.1.24 outside the chroot since I don't have a musl box. Inside the chroot everything passes, I even run --long tests and everything passes (takes 2.5x time so I won't enable it by default, but I'll probably add a build option to run long tests).

I hope all those failures are not malloc stuff...

@ericonr Do you know if there's a way to disable malloc canaries in musl 1.2.2 or use the old malloc to see to what extent the issues are due to malloc or due to something else?


^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta8
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (146 preceding siblings ...)
  2021-12-27 16:37 ` tornaria
@ 2021-12-27 17:15 ` tornaria
  2021-12-27 21:52 ` ericonr
                   ` (100 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-12-27 17:15 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1001663451

Comment:
Question about license (since xlint complained). What shall we use?

The full `COPYING.txt` can be found here: https://git.sagemath.org/sage.git/tree/COPYING.txt

The gist of it is:
 1. The whole Sage software distribution is GPL-3.0-only.
 2. All Sage documentation is licensed under CC-BY-SA-3.0.
 3. All original Sage code is GPL-2.0-or-later.
 4. Components of Sage are licensed under various licenses as documented in COPYING.txt.
 5. The individual copyright notices are also in that file.

Notes:

2: at this time we don't build the documentation (eventually we might ship it in a subpkg) but we still ship the documentation sources (probably we don't have to).

4, 5: of course many components we don't build or ship together but as separate xbps packages.

----

My thoughts:
- The file `COPYING.txt` definitely needs to be shipped (I'd rather ship it as-is even if some components we don't ship).
- Maybe "custom:Various free" or "custom:Various GPL-compatible" ?
- It still feels useful to mention GPL-3.0-only, GPL-2.0-or-later, and CC-BY-SA-3.0 (at least in sagemath-doc).

Maybe a reasonable license string could be
```
license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
```

Any comments?

This is the only change needed for CI to pass; the failures in x86_64 and aarch64 look transient; the previous run passed everything but one test on i686 and the last commit has the fix for that one.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta8
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (147 preceding siblings ...)
  2021-12-27 17:15 ` tornaria
@ 2021-12-27 21:52 ` ericonr
  2021-12-27 23:21 ` [PR PATCH] [Updated] " tornaria
                   ` (99 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: ericonr @ 2021-12-27 21:52 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1001773753

Comment:
> takes 2.5x time so I won't enable it by default, but I'll probably add a build option to run long tests).

`XBPS_CHECK_PKGS=full` is the shorthand for that, don't need a build option.

> Do you know if there's a way to disable malloc canaries in musl 1.2.2 or use the old malloc to see to what extent the issues are due to malloc or due to something else?

There is a way to build with old malloc, but it's a build time choice `--with-malloc=oldmalloc`. But unless the tests are segfaulting instead of just failing, it shouldn't be an issue; all musl does is call `a_crash` when it detects something is wrong, which is an asm block that derefs a null pointer. So either it crashes or malloc isn't an issue, at least for most cases.

Re licensing:

> license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various Free"

would follow the `foomatic-db-nonfree` case, and I think it fits.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: sagemath-9.5.beta8
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (148 preceding siblings ...)
  2021-12-27 21:52 ` ericonr
@ 2021-12-27 23:21 ` tornaria
  2021-12-28 15:50 ` [WIP] New package: sagemath-9.5.beta9 dkwo
                   ` (98 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-12-27 23:21 UTC (permalink / raw)
  To: ml

[-- 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: 289523 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/20] 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/20] 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/20] 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/20] 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/20] 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/20] 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/20] 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/20] 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/20] 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/20] 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/20] 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/20] 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/20] 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/20] 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/20] 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/20] 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/20] 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/20] 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/20] 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

From df29bca89a6d6ad18cfbf4f33cf7bd5e530c02e7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 27 Dec 2021 20:19:19 -0300
Subject: [PATCH 20/20] sagemath: fix license and tests

Now tests can be run with -Q (normal) or -K (--long)
---
 srcpkgs/sagemath/template | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index c5009269c7fc..33b40acbabeb 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -16,7 +16,7 @@ depends="giac git FlintQS zn_poly sympow
  "
 short_desc="Open source mathematics software"
 maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
-license="GPL-3.0-or-later"
+license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
 checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
@@ -155,15 +155,17 @@ do_install() {
 }
 
 do_check() {
-	TEST=--all
 	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
-		TEST="$(sed -e 's/#.*//' ${XBPS_DISTDIR}/sagemath-check)"
+		_test_args=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	fi
+	if [ -z "$_test_args" ]; then
+		_test_args=--all
+	fi
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args="--long $_test_args"
 	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} ${OPT} ${TEST}
-	#./sage -t ${OPT} ${TEST}
+	./sage -tp ${XBPS_MAKEJOBS} ${_test_args}
 }
 
 ### copied from sage-deps, to be kept in sync

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta9
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (149 preceding siblings ...)
  2021-12-27 23:21 ` [PR PATCH] [Updated] " tornaria
@ 2021-12-28 15:50 ` dkwo
  2021-12-28 17:37 ` tornaria
                   ` (97 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-12-28 15:50 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1002169013

Comment:
I've repeated `sage-9.5.beta9_1 --testall` (again outside of the chroot) with musl from void repo (1.1.x), and I still get all of the failures above, except for `sage -t --random-seed=148013641059529951746972411435795753776 /usr/lib/sage-9.5.beta9/src/sage/matrix/matrix_mod2_dense.pyx  # 1 doctest failed`
In more detail
```
File "/usr/lib/sage-9.5.beta9/src/sage/matrix/matrix_mod2_dense.pyx", line 187, in sage.matrix.matrix_mod2_dense.Matrix_mod2_dense.__cinit__
Failed example:
    if system() != "Linux":
        raise RuntimeError("matrix allocation failed")
    else:
        four_GiB = 4*1024^3
        resource.setrlimit(resource.RLIMIT_AS, (four_GiB, orig_hard))
        MatrixSpace(GF(2), 2^30)(1)
Expected:
    Traceback (most recent call last):
    ...
    RuntimeError: matrix allocation failed
Got:
    <BLANKLINE>
    Traceback (most recent call last):
      File "/usr/lib/sage-9.5.beta9/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages/sage/doctest/forker.py", line 694, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/usr/lib/sage-9.5.beta9/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages/sage/doctest/forker.py", line 1088, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.matrix.matrix_mod2_dense.Matrix_mod2_dense.__cinit__[6]>", line 6, in <module>
        MatrixSpace(GF(Integer(2)), Integer(2)**Integer(30))(Integer(1))
      File "sage/structure/parent.pyx", line 898, in sage.structure.parent.Parent.__call__ (build/cythonized/sage/structure/parent.c:9388)
        return mor._call_(x)
      File "sage/categories/map.pyx", line 1692, in sage.categories.map.FormalCompositeMap._call_ (build/cythonized/sage/categories/map.c:11869)
        x = f._call_(x)
      File "sage/structure/coerce_maps.pyx", line 153, in sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (build/cythonized/sage/structure/coerce_ma
ps.c:4737)
        cpdef Element _call_(self, x):
      File "sage/structure/coerce_maps.pyx", line 156, in sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (build/cythonized/sage/structure/coerce_ma
ps.c:4557)
        return C._element_constructor(x)
      File "/usr/lib/sage-9.5.beta9/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages/sage/matrix/matrix_space.py", line 925, in _element_constru
ctor_
        return self.element_class(self, entries, **kwds)
      File "sage/matrix/matrix_mod2_dense.pyx", line 209, in sage.matrix.matrix_mod2_dense.Matrix_mod2_dense.__cinit__ (build/cythonized/sage/matrix/matrix_mod
2_dense.cpp:3883)
        sig_str("matrix allocation failed")
    cysignals.signals.SignalError: matrix allocation failed
```
so this may be the only one left for musl 1.2.2.
One way to know for sure would be to test inside of the chroot with new musl, which I can do later.

Moreover, for i686 only one failure is left
`sage -t --random-seed=39014585829676668007219039140784171913 src/sage/matrix/matrix2.pyx  # Timed out`

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta9
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (150 preceding siblings ...)
  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
                   ` (96 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-12-28 17:37 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1002212369

Comment:
@dkwo: are you using `m4ri` from the repo with musl 1.2.2? If that is the case, can you recompile it and try again with the one built for 1.2.2?

This is what should happen:
 - The test is makes `m4ri` to allocate more memory than available.
 - On failure to allocate `m4ri` calls `abort()` which signals `SIGABRT`.
 - cysignals traps the `SIGABRT` signal and then it uses `longjmp(3)` to roll back to the `sig_str()` function which then raises `RuntimeError` with the given error message.

I don't know why cysignals is raising a different exception than `RuntimeError`; I wonder if there's any reason for `abort()` to behave different on musl-1.2.2 (perhaps when the program was compiled on musl-1.1).

As for the timeout in matrix2.py, it's just a test that is intended to be labeled `# long` so it shouldn't run, but it runs nevertheless (reported it upstream: https://trac.sagemath.org/ticket/33091). It's very easy to workaround just for that test, which I'll do in the next update.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta9
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (151 preceding siblings ...)
  2021-12-28 17:37 ` tornaria
@ 2021-12-28 18:31 ` dkwo
  2021-12-28 18:55 ` dkwo
                   ` (95 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-12-28 18:31 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1002231716

Comment:
Very well.

Yes, I was using m4ri from the repos.
I rebuilt m4ri with `makedepends+="musl>=1.2.2"` and installed it, as well as the -devel part.
If I run that test, i still get the same result, which ends with `cysignals.signals.SignalError: matrix allocation failed`

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta9
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (152 preceding siblings ...)
  2021-12-28 18:31 ` dkwo
@ 2021-12-28 18:55 ` dkwo
  2021-12-28 21:23 ` tornaria
                   ` (94 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-12-28 18:55 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1002239573

Comment:
I've asked on the Alpine trac ticket, cc'd you.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta9
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (153 preceding siblings ...)
  2021-12-28 18:55 ` dkwo
@ 2021-12-28 21:23 ` tornaria
  2021-12-28 22:08 ` tornaria
                   ` (93 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-12-28 21:23 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1002287099

Comment:
Somehow it seems `abort()` is raising a `SIGSEGV` instead of a `SIGABRT`. You can see the different behaviour doing:
```
sage: from cysignals.signals import sig_print_exception
sage: import signal
sage: sig_print_exception(signal.SIGABRT, "matrix allocation failed")
RuntimeError: matrix allocation failed
sage: sig_print_exception(signal.SIGSEGV, "matrix allocation failed")
cysignals.signals.SignalError: matrix allocation failed
```

Now if I comment out the `_sig_str(...)` line in `matrix_mod2_dense.pyx` this happens:
```
sage: import resource
sage: resource.setrlimit(resource.RLIMIT_AS, (4*1024^3, -1))
sage: MatrixSpace(GF(2), 2^30)(1)
------------------------------------------------------------------------
/usr/lib/sage-9.5.beta9/local/var/lib/sage/venv-python3.10/bin/cysignals-CSI:42: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  from distutils.spawn import find_executable
Attaching gdb to process id 1026.
Cannot find gdb installed
GDB is not installed.
Install gdb for enhanced tracebacks.
------------------------------------------------------------------------
Unhandled SIGSEGV: A segmentation fault occurred.
This probably occurred because a *compiled* module has a bug
in it and is not properly wrapped with sig_on(), sig_off().
Python will now terminate.
------------------------------------------------------------------------
```

Looking at the backtrace (after installing `gdb` and `musl-devel`) seems to imply that `posix_memalign()` never returns, instead segfaulting, so that the `abort()` in `m4ri` code is never called:
```
Stack backtrace
---------------
No locals.
#1  0x00007f22c9707fc1 in __syscall_cp_c (nr=61, u=1878, v=0, 
    w=<optimized out>, x=<optimized out>, y=<optimized out>, z=0)
    at src/thread/pthread_cancel.c:33
        self = 0x7f22c9751b08 <builtin_tls+136>
        r = <optimized out>
        st = <optimized out>
#2  0x00007f22c96edf72 in waitpid (pid=<optimized out>, 
    status=status@entry=0x0, options=options@entry=0)
    at src/process/waitpid.c:6
No locals.
#3  0x00007f22c695e774 in print_enhanced_backtrace ()
    at build/src/cysignals/implementation.c:586
        parent_pid = 1813
        pid = <optimized out>
#4  0x00007f22c695e8d9 in sigdie (sig=sig@entry=11, 
    s=s@entry=0x7f22c69660b0 "Unhandled SIGSEGV: A segmentation fault occurred.") at build/src/cysignals/implementation.c:612
No locals.
#5  0x00007f22c6961e33 in sigdie_for_sig (inside=0, sig=11)
    at build/src/cysignals/implementation.c:179
No locals.
#6  cysigs_signal_handler (sig=11) at build/src/cysignals/implementation.c:278
        inside = <optimized out>
#7  <signal handler called>
No locals.
#8  get_meta (p=0x0) at src/malloc/mallocng/meta.h:132
        offset = <optimized out>
        index = <optimized out>
        base = <optimized out>
        meta = <optimized out>
        area = <optimized out>
        offset = <optimized out>
        index = <optimized out>
        base = <optimized out>
        meta = <optimized out>
        area = <optimized out>
#9  aligned_alloc (align=64, len=8589934600)
    at src/malloc/mallocng/aligned_alloc.c:25
        p = 0x0
        g = <optimized out>
        idx = <optimized out>
        stride = <optimized out>
        start = <optimized out>
        end = <optimized out>
        adj = <optimized out>
        offset = <optimized out>
#10 0x00007f22c96cbb7a in posix_memalign (res=0x7ffdd6f1bc70, 
    align=<optimized out>, len=<optimized out>)
    at src/malloc/posix_memalign.c:7
        mem = <optimized out>
#11 0x00007f223b02ddfb in m4ri_mmc_malloc () from /lib/libm4ri-0.0.20200125.so
No symbol table info available.
#12 0x00007f223b015a7a in mzd_init () from /lib/libm4ri-0.0.20200125.so
No symbol table info available.
...
```
```

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta9
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (154 preceding siblings ...)
  2021-12-28 21:23 ` tornaria
@ 2021-12-28 22:08 ` tornaria
  2021-12-28 22:12 ` tornaria
                   ` (92 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-12-28 22:08 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1002300676

Comment:
It's looking like a bug in musl `posix_memalign()`
```c
$ cat a.c
#include <stdio.h>
#include <stdlib.h>
#include <sys/resource.h>

int main(int argc, char ** argv)
{ 
  int res;
  void * memptr = (void *)0xbadbeef;
  long size = 1L<<20;
  struct rlimit r = { 1L<<20, -1 };
  
  if (argc > 1)
    size = atol(argv[1]);
  
  if (argc > 2)
    r.rlim_cur = atol(argv[2]);
  
  printf("memptr = %p, size = %ld, limit = %ld\n", memptr, size, r.rlim_cur);
  setrlimit(RLIMIT_AS, &r);
  res = posix_memalign(&memptr, size, 64);
  printf("res = %d, memptr = %p\n", res, memptr);
  
  return 0;
}
$ cc a.c -o a && ./a
memptr = 0xbadbeef, size = 1048576, limit = 1048576
Segmentation fault
```
The expected behaviour from `posix_memalign(3p)` is:
```
RETURN VALUE
       Upon successful completion, posix_memalign() shall return zero;
       otherwise, an error number shall be returned to indicate the error and
       the contents of memptr shall either be left unmodified or be set to a
       null pointer.
```

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta9
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (155 preceding siblings ...)
  2021-12-28 22:08 ` tornaria
@ 2021-12-28 22:12 ` tornaria
  2021-12-28 22:15 ` tornaria
                   ` (91 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-12-28 22:12 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1002300676

Comment:
It's looking like a bug in musl `posix_memalign()`
```c
$ cat a.c
#include <stdio.h>
#include <stdlib.h>
#include <sys/resource.h>

int main(int argc, char ** argv)
{ 
  int res;
  void * memptr = (void *)0xbadbeef;
  long size = 1L<<20;
  struct rlimit r = { 1L<<20, -1 };
  
  if (argc > 1)
    size = atol(argv[1]);
  
  if (argc > 2)
    r.rlim_cur = atol(argv[2]);
  
  printf("memptr = %p, size = %ld, limit = %ld\n", memptr, size, r.rlim_cur);
  setrlimit(RLIMIT_AS, &r);
  res = posix_memalign(&memptr, size, 64);
  printf("res = %d, memptr = %p\n", res, memptr);
  
  return 0;
}
$ cc a.c -o a && ./a
memptr = 0xbadbeef, size = 1048576, limit = 1048576
Segmentation fault
```
The expected behaviour from `posix_memalign(3p)` is:
```
RETURN VALUE
       Upon successful completion, posix_memalign() shall return zero;
       otherwise, an error number shall be returned to indicate the error and
       the contents of memptr shall either be left unmodified or be set to a
       null pointer.
```

Edit: my code is ok as you can see if you change the rlimit so that enough memory is available:
```
$ ./a $[2**20] $[2**21]        
memptr = 0xbadbeef, size = 1048576, limit = 2097152
res = 0, memptr = 0x7feab0d00000
```

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta9
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (156 preceding siblings ...)
  2021-12-28 22:12 ` tornaria
@ 2021-12-28 22:15 ` tornaria
  2021-12-28 23:22 ` tornaria
                   ` (90 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-12-28 22:15 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1002300676

Comment:
It's looking like a bug in musl `posix_memalign()`
```c
$ cat a.c
#include <stdio.h>
#include <stdlib.h>
#include <sys/resource.h>

int main(int argc, char ** argv)
{ 
  int res;
  void * memptr = (void *)0xbadbeef;
  long size = 1L<<20;
  struct rlimit r = { 1L<<20, -1 };
  
  if (argc > 1)
    size = atol(argv[1]);
  
  if (argc > 2)
    r.rlim_cur = atol(argv[2]);
  
  printf("memptr = %p, size = %ld, limit = %ld\n", memptr, size, r.rlim_cur);
  setrlimit(RLIMIT_AS, &r);
  res = posix_memalign(&memptr, size, 64);
  printf("res = %d, memptr = %p\n", res, memptr);
  
  return 0;
}
$ cc a.c -o a && ./a
memptr = 0xbadbeef, size = 1048576, limit = 1048576
Segmentation fault
```
The expected behaviour from `posix_memalign(3p)` is:
```
RETURN VALUE
       Upon successful completion, posix_memalign() shall return zero;
       otherwise, an error number shall be returned to indicate the error and
       the contents of memptr shall either be left unmodified or be set to a
       null pointer.
```

Edit: my code is ok as you can see if you change the rlimit so that enough memory is available:
```
$ ./a $[2**20] $[2**21]        
memptr = 0xbadbeef, size = 1048576, limit = 2097152
res = 0, memptr = 0x7feab0d00000
```
OTOH if you ask for a much larger amount of memory, it fails as expected (12 is ENOMEM)
```
$ ./a $[2**35] $[2**20]                              
memptr = 0xbadbeef, size = 34359738368, limit = 1048576
res = 12, memptr = 0xbadbeef
```

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta9
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (157 preceding siblings ...)
  2021-12-28 22:15 ` tornaria
@ 2021-12-28 23:22 ` tornaria
  2021-12-29 12:37 ` dkwo
                   ` (89 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2021-12-28 23:22 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1002319603

Comment:
> It's looking like a bug in musl `posix_memalign()`

Known bug, known fix:
https://github.com/ifduyue/musl/commit/95a540e176b3ebd57d6033fd23cf9fec8a5ddbe8
Not in any release yet, should make it to musl-1.2.3.

Just add that patch to your build of musl meanwhile.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta9
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (158 preceding siblings ...)
  2021-12-28 23:22 ` tornaria
@ 2021-12-29 12:37 ` dkwo
  2022-01-03 20:02 ` [PR PATCH] [Updated] " tornaria
                   ` (88 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2021-12-29 12:37 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1002574562

Comment:
Thank you, with that patch from upstream the test passes.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: sagemath-9.5.beta9
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (159 preceding siblings ...)
  2021-12-29 12:37 ` dkwo
@ 2022-01-03 20:02 ` tornaria
  2022-01-03 20:50 ` tornaria
                   ` (87 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-03 20:02 UTC (permalink / raw)
  To: ml

[-- 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.beta9
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: 495839 bytes --]

From 7f63c36120ed1a961ca405f0fef8b678fdff4ba4 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/23] 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 8a78f7d1106e4b45e5e0508a517a13d6ed056438 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/23] 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 6be2ecbfd6e4e4b4d4b435390df9a8a460e771e8 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/23] 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 01d01f3ac06f464cca4edb9f7adf280db09e030a 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/23] 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 9c5e8047ad620a012d0fee8e31e13768d9fd7494 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/23] 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 1160c79162b4a93f3b13e2f92563774a56ec36c4 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/23] 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 48c8fe383ba2d84719a17ea1dd04b7a2cabd3014 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/23] 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 53545e89650ef1a051bd34b323fae41a2f58df89 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/23] 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 77c5da63467ffcabfa80adc4fe8c6f729936fad7 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/23] 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 bfc7649439a32d8d3f51a76885f6649e8d78cff3 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/23] 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 a346e9e9d3129b7d33c65e7eec96ec38706637e9 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/23] 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 4218d92fb0878a44ec7ba95ca7b56d242888dac9 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/23] 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 9b43265e57b4b2aeec3bd4ad26414df464413b41 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/23] 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 362ddd3ff4982ed7e8ef7d70d4b7452ee11a87be 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/23] 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 7164cb73ac5fbeffdfffa392f6ff82f94baea157 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/23] 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 d46f73c53217fc1fc2cb9769a2b8a210adbfded0 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/23] 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 de113ca5ec0b90736e2119ae1770c13e5f816041 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/23] 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 9d19e2a7a3801d7e374d02b01302e68bbcdb4c03 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/23] 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 55481696efa77aa5e7abe250eae5b962ce63a879 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/23] 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

From d78abd3ada138f45abb018a5db2be17b2270465e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 27 Dec 2021 20:19:19 -0300
Subject: [PATCH 20/23] sagemath: fix license and tests

Now tests can be run with -Q (normal) or -K (--long)
---
 srcpkgs/sagemath/template | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index c5009269c7fc..33b40acbabeb 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -16,7 +16,7 @@ depends="giac git FlintQS zn_poly sympow
  "
 short_desc="Open source mathematics software"
 maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
-license="GPL-3.0-or-later"
+license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
 checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
@@ -155,15 +155,17 @@ do_install() {
 }
 
 do_check() {
-	TEST=--all
 	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
-		TEST="$(sed -e 's/#.*//' ${XBPS_DISTDIR}/sagemath-check)"
+		_test_args=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	fi
+	if [ -z "$_test_args" ]; then
+		_test_args=--all
+	fi
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args="--long $_test_args"
 	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} ${OPT} ${TEST}
-	#./sage -t ${OPT} ${TEST}
+	./sage -tp ${XBPS_MAKEJOBS} ${_test_args}
 }
 
 ### copied from sage-deps, to be kept in sync

From e18030929631af5e2444b27c1b7a4aacea2db1b8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 28 Dec 2021 23:08:17 -0300
Subject: [PATCH 21/23] sagemath: fix long time test

---
 .../patches/zzz-fix_long_time_test--see_33091.patch | 13 +++++++++++++
 ...=> zzz-skip_doctest_giac-1.7.0--see_31563.patch} |  0
 2 files changed, 13 insertions(+)
 create mode 100644 srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
 rename srcpkgs/sagemath/patches/{skip-doctest-giac-1.7.0--see-trac-31563.patch => zzz-skip_doctest_giac-1.7.0--see_31563.patch} (100%)

diff --git a/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch b/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
new file mode 100644
index 000000000000..ca360dee9f6e
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage/matrix/matrix2.pyx b/src/sage/matrix/matrix2.pyx
+index 7d319bd54b..c1a2eed6f1 100644
+--- a/src/sage/matrix/matrix2.pyx
++++ b/src/sage/matrix/matrix2.pyx
+@@ -17215,7 +17215,7 @@ cdef class Matrix(Matrix1):
+ 
+             sage: set_random_seed()
+             sage: K = random_cone(max_ambient_dim=5)
+-            sage: all(L.change_ring(SR).is_Z_operator_on(K)
++            sage: all(L.change_ring(SR).is_Z_operator_on(K) # long time
+             ....:     for L in K.Z_operators_gens())  # long time
+             True
+ 
diff --git a/srcpkgs/sagemath/patches/skip-doctest-giac-1.7.0--see-trac-31563.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_31563.patch
similarity index 100%
rename from srcpkgs/sagemath/patches/skip-doctest-giac-1.7.0--see-trac-31563.patch
rename to srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_31563.patch

From 41a17965c0545b17c6882ecfe407600a5bdcfa4e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 31 Dec 2021 13:52:34 -0300
Subject: [PATCH 22/23] python3-Sphinx: update to 4.3.2.

---
 srcpkgs/python3-Sphinx/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/python3-Sphinx/template b/srcpkgs/python3-Sphinx/template
index 8b0493c1f92c..29f892d16157 100644
--- a/srcpkgs/python3-Sphinx/template
+++ b/srcpkgs/python3-Sphinx/template
@@ -1,6 +1,6 @@
 # Template file for 'python3-Sphinx'
 pkgname=python3-Sphinx
-version=4.2.0
+version=4.3.2
 revision=1
 wrksrc=Sphinx-${version}
 build_style=python3-module
@@ -17,8 +17,9 @@ short_desc="Python 3 documentation generator"
 maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
 license="BSD-3-Clause"
 homepage="http://sphinx-doc.org"
+changelog="https://www.sphinx-doc.org/en/master/changes.html"
 distfiles="${PYPI_SITE}/S/Sphinx/Sphinx-${version}.tar.gz"
-checksum=94078db9184491e15bce0a56d9186e0aec95f16ac20b12d00e06d4e36f1058a6
+checksum=0a8836751a68306b3fe97ecbe44db786f8479c3bf4b80e3a7f5c838657b4698c
 conflicts="python-Sphinx>=0"
 
 post_install() {

From 8467b37115a5292b33b38e414d433c94388c741f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 28 Dec 2021 23:08:17 -0300
Subject: [PATCH 23/23] sagemath: use system python site-packages

 - patch from #29665 for that
 - patch on top of that to allow a few more python packages:
   gmpy2, sphinx, typing_extensions, ptyprocess
 - add all available python packages to makedepends and depends
 - add ffmpeg and ImageMagick to makedepends
 - in standard check (-Q) warn if individual test > 5.0s
---
 ...184f7498a2046065e669723e68efe2d65cee.patch | 5629 +++++++++++++++++
 .../zzz-dont_run_pytest--see_31924.patch      |   27 +
 .../zzz-more_site_packages_not_in_29665.patch |   42 +
 srcpkgs/sagemath/template                     |   52 +-
 4 files changed, 5747 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch

diff --git a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
new file mode 100644
index 000000000000..b641113927e7
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
@@ -0,0 +1,5629 @@
+From 05fcaabe95082f42ba134780d579390d7b6153e2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 19:30:58 -0400
+Subject: Trac #29665: add --enable-system-site-packages option to ./configure.
+
+This new option is experimental and disabled by default. When it is
+enabled, the string "--system-site-packages" is appended to a new
+environment variable SAGE_VENV_FLAGS that is then passed to the
+sage-venv command during the build using autoconf substitution.
+Thusly the correct setting finds its way into local/pyvenv.cfg.
+---
+ build/make/Makefile.in |  2 +-
+ configure.ac           | 11 +++++++++++
+ 2 files changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/build/make/Makefile.in b/build/make/Makefile.in
+index f870cc3..68627ab 100644
+--- a/build/make/Makefile.in
++++ b/build/make/Makefile.in
+@@ -211,7 +211,7 @@ endif
+ inst_python3_venv = $(SAGE_VENV)/pyvenv.cfg
+ 
+ $(inst_python3_venv):
+-	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv "$(SAGE_VENV)"
++	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv @SAGE_VENV_FLAGS@ "$(SAGE_VENV)"
+ endif
+ 
+ # Build everything and start Sage.
+diff --git a/configure.ac b/configure.ac
+index 351f487..db30a91 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -435,6 +435,17 @@ AC_ARG_ENABLE([download-from-upstream-url],
+   [AS_HELP_STRING([--enable-download-from-upstream-url],
+     [allow downloading packages from their upstream URL if they cannot be found on the Sage mirrors])])
+ 
++AC_ARG_ENABLE(
++  [system-site-packages], [AS_HELP_STRING(
++    [--enable-system-site-packages],
++    [allow sage to use python packages from the system (experimental; default: no)]
++  )], [
++  AS_IF([test "x$enable_system_site_packages" = "xyes"], [
++    SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
++  ])
++])
++AC_SUBST([SAGE_VENV_FLAGS])
++
+ SAGE_SPKG_OPTIONS=""
+ AS_IF([test "x$enable_experimental_packages" = "xyes"], [
+   AS_VAR_APPEND([SAGE_SPKG_OPTIONS], [" -y"])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9372d1f663edf4e89f9c186336815ca04cff59dc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 19:41:14 -0400
+Subject: Trac #29665: new SAGE_PYTHON_PACKAGE_CHECK() autoconf macro.
+
+This new macro encapsulates the check for system installations of
+python packages. It uses setuptools.version's pkg_resources to
+check if the contents of install-requires.txt are satisfied for
+the given package; and if not, tells the build system to install
+the SPKG instead.
+---
+ m4/sage_python_package_check.m4 | 49 +++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 49 insertions(+)
+ create mode 100644 m4/sage_python_package_check.m4
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+new file mode 100644
+index 00000000..77b0a0c
+--- /dev/null
++++ b/m4/sage_python_package_check.m4
+@@ -0,0 +1,49 @@
++#
++# SYNOPSIS
++#
++#   SAGE_PYTHON_PACKAGE_CHECK(package)
++#
++# DESCRIPTION
++#
++#   Determine if the system copy of a python package can be used by sage.
++#
++#   This macro uses setuptools.version's pkg_resources to check that the
++#   "install-requires.txt" file for the named package is satisfied, and
++#   it can typically fail in four ways:
++#
++#     1. If --enable-system-site-packages was not passed to ./configure,
++#
++#     2. If we are not using the system python (no $PYTHON_FOR_VENV),
++#
++#     3. If setuptools is not available to the system python,
++#
++#     4. If the contents of install-requires.txt are not met (wrong
++#        version, no version, etc.) by the system python.
++#
++#   In any of those cases, we set sage_spkg_install_$package to "yes"
++#   so that the corresponding SPKG is installed. Otherwise, we do
++#   nothing, since the default value of sage_spkg_install_$package
++#   is "no" (to use the system copy).
++#
++#   The SAGE_SPKG_CONFIGURE_PYTHON3() macro is AC_REQUIRE'd to ensure
++#   that $PYTHON_FOR_VENV is available, if it is going to be available.
++#
++
++AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
++  AS_IF([test "${enable_system_site_packages}" = "yes"], [
++    AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
++
++    dnl strip all comments from install-requires.txt; this should leave
++    dnl only a single line containing the version specification for this
++    dnl package.
++    SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
++    AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++    AS_IF(
++      ["${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())"],
++      [AC_MSG_RESULT(yes)],
++      [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
++    )
++  ], [
++    sage_spkg_install_$1=yes
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a0dac8ad81ad6369d479bba30d2388de59e5cecb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:21:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for py.
+
+---
+ build/pkgs/py/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/py/spkg-configure.m4
+
+diff --git a/build/pkgs/py/spkg-configure.m4 b/build/pkgs/py/spkg-configure.m4
+new file mode 100644
+index 00000000..ded7034
+--- /dev/null
++++ b/build/pkgs/py/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([py], [SAGE_PYTHON_PACKAGE_CHECK([py])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 87c463a25ab4432dc1fba4f7a9703284e5b8f620 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:24:15 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for wheel.
+
+---
+ build/pkgs/wheel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wheel/spkg-configure.m4
+
+diff --git a/build/pkgs/wheel/spkg-configure.m4 b/build/pkgs/wheel/spkg-configure.m4
+new file mode 100644
+index 00000000..7897ea9
+--- /dev/null
++++ b/build/pkgs/wheel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([wheel], [SAGE_PYTHON_PACKAGE_CHECK([wheel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 804094b3a980f262f4d53d7be8b1be43ac0c55e0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:25:15 -0400
+Subject: Trac #29665: new spkg-configure.m4 for cvxopt.
+
+This includes a SAGE_SPKG_DEPCHECK([gsl glpk suitesparse],... because
+those C dependencies wind up linked into shared libraries like,
+
+  /usr/.../cvxopt/glpk.cpython-39-x86_64-linux-gnu.so
+
+that could potentially conflict with (for example) the glpk SPKG.
+---
+ build/pkgs/cvxopt/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/cvxopt/spkg-configure.m4
+
+diff --git a/build/pkgs/cvxopt/spkg-configure.m4 b/build/pkgs/cvxopt/spkg-configure.m4
+new file mode 100644
+index 00000000..c4aa619
+--- /dev/null
++++ b/build/pkgs/cvxopt/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([cvxopt], [
++  SAGE_SPKG_DEPCHECK([gsl glpk suitesparse], [
++    SAGE_PYTHON_PACKAGE_CHECK([cvxopt])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3f171955ff8d15da2c98aee0d2e254e95a55a2b5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:28:10 -0400
+Subject: Trac #29665: new spkg-configure.m4 for pyzmq.
+
+This includes a SAGE_SPKG_DEPCHECK([zeromq],... because libzmq winds
+up linked into shared libraries like,
+
+  /usr/.../zmq/backend/cython/message.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the zeromq SPKG.
+---
+ build/pkgs/pyzmq/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/pyzmq/spkg-configure.m4
+
+diff --git a/build/pkgs/pyzmq/spkg-configure.m4 b/build/pkgs/pyzmq/spkg-configure.m4
+new file mode 100644
+index 00000000..ae2b126
+--- /dev/null
++++ b/build/pkgs/pyzmq/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([pyzmq], [
++  SAGE_SPKG_DEPCHECK([zeromq], [
++    SAGE_PYTHON_PACKAGE_CHECK([pyzmq])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20d3aa9da9fc98a6e6a47599cd1b6d1d3785a4c4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:31:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for requests.
+
+---
+ build/pkgs/requests/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/requests/spkg-configure.m4
+
+diff --git a/build/pkgs/requests/spkg-configure.m4 b/build/pkgs/requests/spkg-configure.m4
+new file mode 100644
+index 00000000..f50a66c
+--- /dev/null
++++ b/build/pkgs/requests/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([requests], [SAGE_PYTHON_PACKAGE_CHECK([requests])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4df57ee47f2576b6b7bf9265248e06e90616b689 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:13:34 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for six.
+
+---
+ build/pkgs/six/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/six/spkg-configure.m4
+
+diff --git a/build/pkgs/six/spkg-configure.m4 b/build/pkgs/six/spkg-configure.m4
+new file mode 100644
+index 00000000..a382b81
+--- /dev/null
++++ b/build/pkgs/six/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([six], [SAGE_PYTHON_PACKAGE_CHECK([six])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f4462652d02ca729cc6d7cb36ee4d7d662deafb0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:14:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for packaging.
+
+---
+ build/pkgs/packaging/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/packaging/spkg-configure.m4
+
+diff --git a/build/pkgs/packaging/spkg-configure.m4 b/build/pkgs/packaging/spkg-configure.m4
+new file mode 100644
+index 00000000..398f9e1
+--- /dev/null
++++ b/build/pkgs/packaging/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([packaging], [SAGE_PYTHON_PACKAGE_CHECK([packaging])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4d64677fffce48077e4bc3e20ec833c70e6e9b65 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:18:53 -0400
+Subject: Trac #29665: new spkg-configure.m4 for numpy.
+
+This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack
+wind up linked into shared libraries like,
+
+  /usr/.../numpy/linalg/lapack_lite.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the openblas SPKG.
+---
+ build/pkgs/numpy/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/numpy/spkg-configure.m4
+
+diff --git a/build/pkgs/numpy/spkg-configure.m4 b/build/pkgs/numpy/spkg-configure.m4
+new file mode 100644
+index 00000000..16f9a90
+--- /dev/null
++++ b/build/pkgs/numpy/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([numpy], [
++  SAGE_SPKG_DEPCHECK([openblas], [
++   SAGE_PYTHON_PACKAGE_CHECK([numpy])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 85dfe5bb32f3c470966b477bae68a921e846d11f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:58:48 -0400
+Subject: Trac #29665: new spkg-configure.m4 for scipy.
+
+This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack
+wind up linked into shared libraries like,
+
+  /usr/.../scipy/linalg/_flinalg.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the openblas SPKG.
+---
+ build/pkgs/scipy/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/scipy/spkg-configure.m4
+
+diff --git a/build/pkgs/scipy/spkg-configure.m4 b/build/pkgs/scipy/spkg-configure.m4
+new file mode 100644
+index 00000000..0b7294a
+--- /dev/null
++++ b/build/pkgs/scipy/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([scipy], [
++  SAGE_SPKG_DEPCHECK([openblas], [
++    SAGE_PYTHON_PACKAGE_CHECK([scipy])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5616f1491036fda95f4d3e840c8c8b531c97323b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 07:19:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pluggy.
+
+---
+ build/pkgs/pluggy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pluggy/spkg-configure.m4
+
+diff --git a/build/pkgs/pluggy/spkg-configure.m4 b/build/pkgs/pluggy/spkg-configure.m4
+new file mode 100644
+index 00000000..11b1fce
+--- /dev/null
++++ b/build/pkgs/pluggy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pluggy], [SAGE_PYTHON_PACKAGE_CHECK([pluggy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6bceae3d356878cfe5fce40c9998dead003a3844 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 07:24:12 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pickleshare.
+
+---
+ build/pkgs/pickleshare/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pickleshare/spkg-configure.m4
+
+diff --git a/build/pkgs/pickleshare/spkg-configure.m4 b/build/pkgs/pickleshare/spkg-configure.m4
+new file mode 100644
+index 00000000..80e9b7c
+--- /dev/null
++++ b/build/pkgs/pickleshare/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pickleshare], [SAGE_PYTHON_PACKAGE_CHECK([pickleshare])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From da2ab534f4a256c82ed4f1c5f0f5c320529b5e9f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 08:53:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for html5lib.
+
+---
+ build/pkgs/html5lib/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/html5lib/spkg-configure.m4
+
+diff --git a/build/pkgs/html5lib/spkg-configure.m4 b/build/pkgs/html5lib/spkg-configure.m4
+new file mode 100644
+index 00000000..f421b7e
+--- /dev/null
++++ b/build/pkgs/html5lib/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([html5lib], [SAGE_PYTHON_PACKAGE_CHECK([html5lib])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5e464134afdf6055b7b5804208f759561c5435cd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 18:30:47 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for networkx.
+
+---
+ build/pkgs/networkx/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/networkx/spkg-configure.m4
+
+diff --git a/build/pkgs/networkx/spkg-configure.m4 b/build/pkgs/networkx/spkg-configure.m4
+new file mode 100644
+index 00000000..926671e
+--- /dev/null
++++ b/build/pkgs/networkx/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([networkx], [SAGE_PYTHON_PACKAGE_CHECK([networkx])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c4d40770cd9c7fda811e31759a5f4aedc320f3f9 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:33:24 -0400
+Subject: Trac #29665: new spkg-configure.m4 for matplotlib.
+
+This includes a SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull],...
+because those dependencies wind up linked into shared libraries like,
+
+  /usr/lib/.../matplotlib/ft2font.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with their SPKG counterparts.
+---
+ build/pkgs/matplotlib/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/matplotlib/spkg-configure.m4
+
+diff --git a/build/pkgs/matplotlib/spkg-configure.m4 b/build/pkgs/matplotlib/spkg-configure.m4
+new file mode 100644
+index 00000000..39c2d29
+--- /dev/null
++++ b/build/pkgs/matplotlib/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([matplotlib], [
++  SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull], [
++    SAGE_PYTHON_PACKAGE_CHECK([matplotlib])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7834dc3ac349201af632f89a9de7cd1967931010 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:35:00 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for bleach.
+
+---
+ build/pkgs/bleach/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/bleach/spkg-configure.m4
+
+diff --git a/build/pkgs/bleach/spkg-configure.m4 b/build/pkgs/bleach/spkg-configure.m4
+new file mode 100644
+index 00000000..3c9bb26
+--- /dev/null
++++ b/build/pkgs/bleach/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([bleach], [SAGE_PYTHON_PACKAGE_CHECK([bleach])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 84cad343287a2c69a4a21b9fa3b92301ff88645b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:37:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for decorator.
+
+---
+ build/pkgs/decorator/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/decorator/spkg-configure.m4
+
+diff --git a/build/pkgs/decorator/spkg-configure.m4 b/build/pkgs/decorator/spkg-configure.m4
+new file mode 100644
+index 00000000..e062778
+--- /dev/null
++++ b/build/pkgs/decorator/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([decorator], [SAGE_PYTHON_PACKAGE_CHECK([decorator])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 25693212572e69d452bc95c923ada13744359eb7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:38:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for idna.
+
+---
+ build/pkgs/idna/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/idna/spkg-configure.m4
+
+diff --git a/build/pkgs/idna/spkg-configure.m4 b/build/pkgs/idna/spkg-configure.m4
+new file mode 100644
+index 00000000..9d363f2
+--- /dev/null
++++ b/build/pkgs/idna/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([idna], [SAGE_PYTHON_PACKAGE_CHECK([idna])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6d5616472f6cdc6cf496bba6fe07bd4ef44dfdaf Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:39:23 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for certifi.
+
+---
+ build/pkgs/certifi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/certifi/spkg-configure.m4
+
+diff --git a/build/pkgs/certifi/spkg-configure.m4 b/build/pkgs/certifi/spkg-configure.m4
+new file mode 100644
+index 00000000..ddd4061
+--- /dev/null
++++ b/build/pkgs/certifi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([certifi], [SAGE_PYTHON_PACKAGE_CHECK([certifi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9412a07023b275e29e8d1af9b8ee3e767042e7fd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:40:59 -0400
+Subject: Trac #29665: new spkg-configure.m4 for pillow.
+
+This includes an SAGE_SPKG_DEPCHECK([bzip2 freetype libpng zlib],...
+because those dependencies wind up linked into shared libraries like,
+
+  /usr/.../PIL/_imagingft.cpython-39-x86_64-linux-gnu.so
+
+and potentially conflict with their SPKG counterparts.
+---
+ build/pkgs/pillow/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/pillow/spkg-configure.m4
+
+diff --git a/build/pkgs/pillow/spkg-configure.m4 b/build/pkgs/pillow/spkg-configure.m4
+new file mode 100644
+index 00000000..f2e68e2
+--- /dev/null
++++ b/build/pkgs/pillow/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([pillow], [
++  SAGE_SPKG_DEPCHECK([bzip2 freetype libpng zlib], [
++    SAGE_PYTHON_PACKAGE_CHECK([pillow])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From eede914311481fdb75b363b7a799075e876a2b4f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:44:13 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for mpmath.
+
+---
+ build/pkgs/mpmath/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mpmath/spkg-configure.m4
+
+diff --git a/build/pkgs/mpmath/spkg-configure.m4 b/build/pkgs/mpmath/spkg-configure.m4
+new file mode 100644
+index 00000000..f43c838
+--- /dev/null
++++ b/build/pkgs/mpmath/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([mpmath], [SAGE_PYTHON_PACKAGE_CHECK([mpmath])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 363a825885832c0b580ff53fe61f5c79e70c4728 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:44:56 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for sympy.
+
+---
+ build/pkgs/sympy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sympy/spkg-configure.m4
+
+diff --git a/build/pkgs/sympy/spkg-configure.m4 b/build/pkgs/sympy/spkg-configure.m4
+new file mode 100644
+index 00000000..fa0f1f5
+--- /dev/null
++++ b/build/pkgs/sympy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([sympy], [SAGE_PYTHON_PACKAGE_CHECK([sympy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0667964c914e4a01dda697190a054ff96cea92d6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:47:06 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pygments.
+
+---
+ build/pkgs/pygments/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pygments/spkg-configure.m4
+
+diff --git a/build/pkgs/pygments/spkg-configure.m4 b/build/pkgs/pygments/spkg-configure.m4
+new file mode 100644
+index 00000000..99f29e3
+--- /dev/null
++++ b/build/pkgs/pygments/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pygments], [SAGE_PYTHON_PACKAGE_CHECK([pygments])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f787c233aa05d8e90f7c6ad18f76bd2fa36bfbfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:48:50 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for jinja2.
+
+---
+ build/pkgs/jinja2/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jinja2/spkg-configure.m4
+
+diff --git a/build/pkgs/jinja2/spkg-configure.m4 b/build/pkgs/jinja2/spkg-configure.m4
+new file mode 100644
+index 00000000..0970d1c
+--- /dev/null
++++ b/build/pkgs/jinja2/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jinja2], [SAGE_PYTHON_PACKAGE_CHECK([jinja2])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 309d8f8e2b7078b5efbbe824b69ec1d9b1e639f0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:43:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pandocfilters.
+
+---
+ build/pkgs/pandocfilters/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/pandocfilters/spkg-configure.m4
+
+diff --git a/build/pkgs/pandocfilters/spkg-configure.m4 b/build/pkgs/pandocfilters/spkg-configure.m4
+new file mode 100644
+index 00000000..3e9537f
+--- /dev/null
++++ b/build/pkgs/pandocfilters/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([pandocfilters], [
++  SAGE_PYTHON_PACKAGE_CHECK([pandocfilters])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f57bfda49777a6ba1cd123553acd75dc347c5521 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:44:46 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for webencodings.
+
+---
+ build/pkgs/webencodings/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/webencodings/spkg-configure.m4
+
+diff --git a/build/pkgs/webencodings/spkg-configure.m4 b/build/pkgs/webencodings/spkg-configure.m4
+new file mode 100644
+index 00000000..1b9a5c4
+--- /dev/null
++++ b/build/pkgs/webencodings/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([webencodings], [
++  SAGE_PYTHON_PACKAGE_CHECK([webencodings])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7f193a62d7a2ea0b6a3ca6beb12390d91c25bbfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:48:26 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pytz.
+
+---
+ build/pkgs/pytz/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pytz/spkg-configure.m4
+
+diff --git a/build/pkgs/pytz/spkg-configure.m4 b/build/pkgs/pytz/spkg-configure.m4
+new file mode 100644
+index 00000000..366521b
+--- /dev/null
++++ b/build/pkgs/pytz/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pytz], [SAGE_PYTHON_PACKAGE_CHECK([pytz])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bfd3fdd887c3465c03465248de4997eed4a82915 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:51:16 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for texttable.
+
+---
+ build/pkgs/texttable/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/texttable/spkg-configure.m4
+
+diff --git a/build/pkgs/texttable/spkg-configure.m4 b/build/pkgs/texttable/spkg-configure.m4
+new file mode 100644
+index 00000000..42a3de1
+--- /dev/null
++++ b/build/pkgs/texttable/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([texttable], [SAGE_PYTHON_PACKAGE_CHECK([texttable])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 914bf0cc57abc46129b27c1525782dbe16da31a2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:53:41 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for babel.
+
+---
+ build/pkgs/babel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/babel/spkg-configure.m4
+
+diff --git a/build/pkgs/babel/spkg-configure.m4 b/build/pkgs/babel/spkg-configure.m4
+new file mode 100644
+index 00000000..d7b9a71
+--- /dev/null
++++ b/build/pkgs/babel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([babel], [SAGE_PYTHON_PACKAGE_CHECK([babel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 56977abd1eafbc87c765a2892cfe525382648259 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 14 Oct 2021 08:06:59 -0400
+Subject: Trac #29665: force system python3 with --enable-system-site-packages.
+
+When the python SPKG is used, the --enable-system-site-packages flag
+will essentially do nothing, and that may confuse users who have
+wasted a few hours building sage. (Generally, they will want to fix
+detection of their system python3 first.)
+
+To forestall that, we now set "--with-system-python3=force" whenever
+the "--enable-system-site-packages" flag is passed.
+---
+ configure.ac | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index db30a91..6fafb83 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -438,10 +438,19 @@ AC_ARG_ENABLE([download-from-upstream-url],
+ AC_ARG_ENABLE(
+   [system-site-packages], [AS_HELP_STRING(
+     [--enable-system-site-packages],
+-    [allow sage to use python packages from the system (experimental; default: no)]
++    [allow the use of python packages from the system (experimental; default: no)]
+   )], [
+   AS_IF([test "x$enable_system_site_packages" = "xyes"], [
+     SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
++
++    dnl We want to raise an error if the user asked for "system site
++    dnl packages" but the system python will not be used. Technically
++    dnl that causes no problems (SAGE_PYTHON_PACKAGE_CHECK always fails,
++    dnl so SPKGs are used for all python packages), but it may be confusing
++    dnl to end users who expect the flag to actually give them access to
++    dnl their system python packages and who may not be paying close
++    dnl attention to their ./configure output.
++    with_system_python3="force"
+   ])
+ ])
+ AC_SUBST([SAGE_VENV_FLAGS])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 02b369fd24ef7cf8997082e7850b9cf022cae34b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 01:18:35 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for setuptools.
+
+---
+ build/pkgs/setuptools/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/setuptools/spkg-configure.m4
+
+diff --git a/build/pkgs/setuptools/spkg-configure.m4 b/build/pkgs/setuptools/spkg-configure.m4
+new file mode 100644
+index 00000000..a2ad811
+--- /dev/null
++++ b/build/pkgs/setuptools/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([setuptools], [SAGE_PYTHON_PACKAGE_CHECK([setuptools])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 05117317d38693978efaf36e81d8b02bae44b257 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 01:15:48 -0400
+Subject: Trac #29665: poison PYTHONUSERBASE when testing for "system"
+ packages.
+
+When we're detecting system installations of python packages, we want
+to hide anything that was installed with e.g. "pip install --user". To
+accomplish that, we mimic the PYTHONUSERBASE poisoning from sage-env
+within the SAGE_PYTHON_PACKAGE_CHECK() macro.
+---
+ m4/sage_python_package_check.m4 | 18 +++++++++++++++++-
+ 1 file changed, 17 insertions(+), 1 deletion(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 77b0a0c..b8cdba4 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -38,11 +38,27 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     dnl package.
+     SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
+     AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++
++    dnl To prevent user-site (pip install --user) packages from being
++    dnl detected as "system" packages, we poison PYTHONUSERBASE. The
++    dnl sage-env script also does this at runtime; we mimic that
++    dnl implementation to ensure that the behaviors at ./configure and
++    dnl runtime are identical. Beware that (as in sage-env) the poisoning
++    dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
++    dnl user points PYTHONUSERBASE to any path (even the default), then
++    dnl his local pip packages will be detected.
++    PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
++    AS_IF([test -z "${PYTHONUSERBASE}"], [
++      PYTHONUSERBASE="${HOME}/.sage/local"
++    ])
++
+     AS_IF(
+-      ["${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())"],
++      [PYTHONUSERBASE="${PYTHONUSERBASE}" "${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" 2>/dev/null],
+       [AC_MSG_RESULT(yes)],
+       [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+     )
++
++    PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d75c1492f63a584b5ec5f424ddd7f7c4a6d502d3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:20:04 -0400
+Subject: Trac #29665: run SAGE_PYTHON_PACKAGE_CHECK() inside a venv.
+
+To recreate the runtime environment as closely as possible, we now use
+a venv (with system site packages enabled) when checking for system
+copies of python packages.
+---
+ m4/sage_python_package_check.m4 | 76 +++++++++++++++++++++++++++--------------
+ 1 file changed, 51 insertions(+), 25 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index b8cdba4..7cbd6c0 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -15,9 +15,11 @@
+ #
+ #     2. If we are not using the system python (no $PYTHON_FOR_VENV),
+ #
+-#     3. If setuptools is not available to the system python,
++#     3. If we are unable to create a venv with the system python,
+ #
+-#     4. If the contents of install-requires.txt are not met (wrong
++#     4. If setuptools is not available to the system python,
++#
++#     5. If the contents of install-requires.txt are not met (wrong
+ #        version, no version, etc.) by the system python.
+ #
+ #   In any of those cases, we set sage_spkg_install_$package to "yes"
+@@ -27,38 +29,62 @@
+ #
+ #   The SAGE_SPKG_CONFIGURE_PYTHON3() macro is AC_REQUIRE'd to ensure
+ #   that $PYTHON_FOR_VENV is available, if it is going to be available.
++#   The check is run inside a new venv, and with the PYTHONUSERBASE
++#   variable poisoned in the same manner as sage-env poisons it, to
++#   ensure that the ./configure- and run-time views of the system
++#   are as similar as possible.
+ #
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
+     AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
+ 
+-    dnl strip all comments from install-requires.txt; this should leave
+-    dnl only a single line containing the version specification for this
+-    dnl package.
+-    SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
+-    AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++    dnl We run this check inside a python venv, because that's ultimately
++    dnl how the system $PYTHON_FOR_VENV will be used.
++    AC_MSG_CHECKING([if we can create a python venv in config.venv])
+ 
+-    dnl To prevent user-site (pip install --user) packages from being
+-    dnl detected as "system" packages, we poison PYTHONUSERBASE. The
+-    dnl sage-env script also does this at runtime; we mimic that
+-    dnl implementation to ensure that the behaviors at ./configure and
+-    dnl runtime are identical. Beware that (as in sage-env) the poisoning
+-    dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
+-    dnl user points PYTHONUSERBASE to any path (even the default), then
+-    dnl his local pip packages will be detected.
+-    PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
+-    AS_IF([test -z "${PYTHONUSERBASE}"], [
+-      PYTHONUSERBASE="${HOME}/.sage/local"
+-    ])
++    dnl Use --clear because ./configure typically clobbers its output files.
++    AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
++                                        --clear                dnl
++                                        --without-pip          dnl
++					config.venv], [
++      AC_MSG_RESULT(yes)
++      dnl strip all comments from install-requires.txt; this should leave
++      dnl only a single line containing the version specification for this
++      dnl package.
++      SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
++      AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++
++      dnl To prevent user-site (pip install --user) packages from being
++      dnl detected as "system" packages, we poison PYTHONUSERBASE. The
++      dnl sage-env script also does this at runtime; we mimic that
++      dnl implementation to ensure that the behaviors at ./configure and
++      dnl runtime are identical. Beware that (as in sage-env) the poisoning
++      dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
++      dnl user points PYTHONUSERBASE to any path (even the default), then
++      dnl his local pip packages will be detected.
++      PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
++      AS_IF([test -z "${PYTHONUSERBASE}"], [
++        PYTHONUSERBASE="${HOME}/.sage/local"
++      ])
+ 
+-    AS_IF(
+-      [PYTHONUSERBASE="${PYTHONUSERBASE}" "${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" 2>/dev/null],
+-      [AC_MSG_RESULT(yes)],
+-      [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+-    )
++      AS_IF(
++        [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
++           "from setuptools.version import pkg_resources;              dnl
++            pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" dnl
++	 2>/dev/null],
++        [AC_MSG_RESULT(yes)],
++        [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
++      )
++
++      PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
++    ], [
++      dnl failed to create a venv for some reason
++      AC_MSG_RESULT(no)
++      sage_spkg_install_$1=yes
++    ])
+ 
+-    PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
++    rm -rf config.venv
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 87646c3264a04ffd98a12d67074f93e1943a1e96 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:38:08 -0400
+Subject: Trac #29665: log SAGE_PYTHON_PACKAGE_CHECK() failures to config.log.
+
+---
+ m4/sage_python_package_check.m4 | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 7cbd6c0..e0e0b9f 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -47,7 +47,8 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
+                                         --clear                dnl
+                                         --without-pip          dnl
+-					config.venv], [
++                                        config.venv            dnl
++                                        2>&AS_MESSAGE_LOG_FD], [
+       AC_MSG_RESULT(yes)
+       dnl strip all comments from install-requires.txt; this should leave
+       dnl only a single line containing the version specification for this
+@@ -72,7 +73,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+         [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
+            "from setuptools.version import pkg_resources;              dnl
+             pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" dnl
+-	 2>/dev/null],
++	 2>&AS_MESSAGE_LOG_FD],
+         [AC_MSG_RESULT(yes)],
+         [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+       )
+-- 
+cgit v1.0-1-gd88e
+
+
+From f7dfffd1c64816e2ae4e0f420b22065c5c5bf2cb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:45:37 -0400
+Subject: Trac #29665: don't clobber a plain file named config.venv.
+
+When SAGE_PYTHON_PACKAGE_CHECK() is cleaning up, we no longer remove
+"config.venv" unconditionally. Instead, we remove it only if it is a
+directory. This is also how "pyvenv --clear" works.
+---
+ m4/sage_python_package_check.m4 | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index e0e0b9f..127a078 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -85,7 +85,9 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+       sage_spkg_install_$1=yes
+     ])
+ 
+-    rm -rf config.venv
++    dnl Clean up config.venv, but only if we could have created it.
++    dnl (The --clear flag to pyvenv will not clobber a plain file.)
++    AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9849c77313b895dcfb786d2ea54e36585bd31ce2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 16 Oct 2021 08:14:42 -0400
+Subject: Trac #29665: don't announce system python packages that won't be
+ used.
+
+When --enable-system-site-packages was not given, the python packages
+using SAGE_PYTHON_PACKAGE_CHECK() in spkg-configure.m4 cannot be used.
+Rather than suggest that users install them anyway, that macro now
+hacks the value of sage_use_system_$package to be "no" when the use
+of system site packages is disabled at the python level.
+---
+ m4/sage_python_package_check.m4 | 17 +++++++++++++++++
+ 1 file changed, 17 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 127a078..7ee82a7 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -89,6 +89,23 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     dnl (The --clear flag to pyvenv will not clobber a plain file.)
+     AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
++    dnl System site packages are disabled.
+     sage_spkg_install_$1=yes
++
++    dnl We have to retroactively hack the --with-system-foo={no,yes,force}
++    dnl mechanism here because it wasn't designed with the ability to
++    dnl disable arbitrary chunks of system packages in mind. The easy cases
++    dnl are "no" and "force" which require no action; "no" means we won't
++    dnl suggest the package anyway, and "force" will raise an error when
++    dnl the system-package check fails.
++    dnl
++    dnl The default of "yes" is more troubling because it is the default. To
++    dnl avoid prompting users to install packages that won't be used, we want
++    dnl to ignore "yes" when reporting the "hint: install these packages..."
++    dnl at the end of ./configure. To accomplish that, we change "yes" to
++    dnl "no" here, essentially changing the default for packages using this
++    dnl macro when --enable-system-site-packages is disabled. Packages with
++    dnl "no" are not suggested to the user.
++    AS_IF([test "${sage_use_system_$1}" = "yes"],[sage_use_system_$1=no])
+   ])
+ ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3e6ad737b94aaac234d615ecaf1a2455eb607f1a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 17 Oct 2021 06:16:21 -0400
+Subject: Trac #29665: add Gentoo package information for python packages.
+
+---
+ build/pkgs/babel/distros/gentoo.txt         | 1 +
+ build/pkgs/bleach/distros/gentoo.txt        | 1 +
+ build/pkgs/certifi/distros/gentoo.txt       | 1 +
+ build/pkgs/cvxopt/distros/gentoo.txt        | 1 +
+ build/pkgs/decorator/distros/gentoo.txt     | 1 +
+ build/pkgs/html5lib/distros/gentoo.txt      | 1 +
+ build/pkgs/idna/distros/gentoo.txt          | 1 +
+ build/pkgs/jinja2/distros/gentoo.txt        | 1 +
+ build/pkgs/matplotlib/distros/gentoo.txt    | 1 +
+ build/pkgs/mpmath/distros/gentoo.txt        | 1 +
+ build/pkgs/networkx/distros/gentoo.txt      | 1 +
+ build/pkgs/numpy/distros/gentoo.txt         | 1 +
+ build/pkgs/packaging/distros/gentoo.txt     | 1 +
+ build/pkgs/pandocfilters/distros/gentoo.txt | 1 +
+ build/pkgs/pickleshare/distros/gentoo.txt   | 1 +
+ build/pkgs/pillow/distros/gentoo.txt        | 1 +
+ build/pkgs/pluggy/distros/gentoo.txt        | 1 +
+ build/pkgs/pygments/distros/gentoo.txt      | 1 +
+ build/pkgs/pytz/distros/gentoo.txt          | 1 +
+ build/pkgs/pyzmq/distros/gentoo.txt         | 1 +
+ build/pkgs/requests/distros/gentoo.txt      | 1 +
+ build/pkgs/scipy/distros/gentoo.txt         | 1 +
+ build/pkgs/setuptools/distros/gentoo.txt    | 1 +
+ build/pkgs/six/distros/gentoo.txt           | 1 +
+ build/pkgs/sympy/distros/gentoo.txt         | 1 +
+ build/pkgs/texttable/distros/gentoo.txt     | 1 +
+ build/pkgs/toml/distros/gentoo.txt          | 1 +
+ build/pkgs/webencodings/distros/gentoo.txt  | 1 +
+ 28 files changed, 28 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/gentoo.txt
+ create mode 100644 build/pkgs/bleach/distros/gentoo.txt
+ create mode 100644 build/pkgs/certifi/distros/gentoo.txt
+ create mode 100644 build/pkgs/cvxopt/distros/gentoo.txt
+ create mode 100644 build/pkgs/decorator/distros/gentoo.txt
+ create mode 100644 build/pkgs/html5lib/distros/gentoo.txt
+ create mode 100644 build/pkgs/idna/distros/gentoo.txt
+ create mode 100644 build/pkgs/jinja2/distros/gentoo.txt
+ create mode 100644 build/pkgs/matplotlib/distros/gentoo.txt
+ create mode 100644 build/pkgs/mpmath/distros/gentoo.txt
+ create mode 100644 build/pkgs/networkx/distros/gentoo.txt
+ create mode 100644 build/pkgs/numpy/distros/gentoo.txt
+ create mode 100644 build/pkgs/packaging/distros/gentoo.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/gentoo.txt
+ create mode 100644 build/pkgs/pickleshare/distros/gentoo.txt
+ create mode 100644 build/pkgs/pillow/distros/gentoo.txt
+ create mode 100644 build/pkgs/pluggy/distros/gentoo.txt
+ create mode 100644 build/pkgs/pygments/distros/gentoo.txt
+ create mode 100644 build/pkgs/pytz/distros/gentoo.txt
+ create mode 100644 build/pkgs/pyzmq/distros/gentoo.txt
+ create mode 100644 build/pkgs/requests/distros/gentoo.txt
+ create mode 100644 build/pkgs/scipy/distros/gentoo.txt
+ create mode 100644 build/pkgs/setuptools/distros/gentoo.txt
+ create mode 100644 build/pkgs/six/distros/gentoo.txt
+ create mode 100644 build/pkgs/sympy/distros/gentoo.txt
+ create mode 100644 build/pkgs/texttable/distros/gentoo.txt
+ create mode 100644 build/pkgs/toml/distros/gentoo.txt
+ create mode 100644 build/pkgs/webencodings/distros/gentoo.txt
+
+diff --git a/build/pkgs/babel/distros/gentoo.txt b/build/pkgs/babel/distros/gentoo.txt
+new file mode 100644
+index 00000000..2d2c34f
+--- /dev/null
++++ b/build/pkgs/babel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/Babel
+diff --git a/build/pkgs/bleach/distros/gentoo.txt b/build/pkgs/bleach/distros/gentoo.txt
+new file mode 100644
+index 00000000..b4f9744
+--- /dev/null
++++ b/build/pkgs/bleach/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/bleach
+diff --git a/build/pkgs/certifi/distros/gentoo.txt b/build/pkgs/certifi/distros/gentoo.txt
+new file mode 100644
+index 00000000..72e2e91
+--- /dev/null
++++ b/build/pkgs/certifi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/certifi
+diff --git a/build/pkgs/cvxopt/distros/gentoo.txt b/build/pkgs/cvxopt/distros/gentoo.txt
+new file mode 100644
+index 00000000..b312391
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/cvxopt
+diff --git a/build/pkgs/decorator/distros/gentoo.txt b/build/pkgs/decorator/distros/gentoo.txt
+new file mode 100644
+index 00000000..fea5a67
+--- /dev/null
++++ b/build/pkgs/decorator/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/decorator
+diff --git a/build/pkgs/html5lib/distros/gentoo.txt b/build/pkgs/html5lib/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c2be76
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/html5lib
+diff --git a/build/pkgs/idna/distros/gentoo.txt b/build/pkgs/idna/distros/gentoo.txt
+new file mode 100644
+index 00000000..68ef51c
+--- /dev/null
++++ b/build/pkgs/idna/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/idna
+diff --git a/build/pkgs/jinja2/distros/gentoo.txt b/build/pkgs/jinja2/distros/gentoo.txt
+new file mode 100644
+index 00000000..15a27ae
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jinja
+diff --git a/build/pkgs/matplotlib/distros/gentoo.txt b/build/pkgs/matplotlib/distros/gentoo.txt
+new file mode 100644
+index 00000000..bcfefb5
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/matplotlib
+diff --git a/build/pkgs/mpmath/distros/gentoo.txt b/build/pkgs/mpmath/distros/gentoo.txt
+new file mode 100644
+index 00000000..946c62d
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/mpmath
+diff --git a/build/pkgs/networkx/distros/gentoo.txt b/build/pkgs/networkx/distros/gentoo.txt
+new file mode 100644
+index 00000000..dd97742
+--- /dev/null
++++ b/build/pkgs/networkx/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/networkx
+diff --git a/build/pkgs/numpy/distros/gentoo.txt b/build/pkgs/numpy/distros/gentoo.txt
+new file mode 100644
+index 00000000..d2179d4
+--- /dev/null
++++ b/build/pkgs/numpy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/numpy
+diff --git a/build/pkgs/packaging/distros/gentoo.txt b/build/pkgs/packaging/distros/gentoo.txt
+new file mode 100644
+index 00000000..e5309ed
+--- /dev/null
++++ b/build/pkgs/packaging/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/packaging
+diff --git a/build/pkgs/pandocfilters/distros/gentoo.txt b/build/pkgs/pandocfilters/distros/gentoo.txt
+new file mode 100644
+index 00000000..a726fda
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/gentoo.txt b/build/pkgs/pickleshare/distros/gentoo.txt
+new file mode 100644
+index 00000000..14fad0f
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pickleshare
+diff --git a/build/pkgs/pillow/distros/gentoo.txt b/build/pkgs/pillow/distros/gentoo.txt
+new file mode 100644
+index 00000000..1243649
+--- /dev/null
++++ b/build/pkgs/pillow/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pillow
+diff --git a/build/pkgs/pluggy/distros/gentoo.txt b/build/pkgs/pluggy/distros/gentoo.txt
+new file mode 100644
+index 00000000..7b33876
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pluggy
+diff --git a/build/pkgs/pygments/distros/gentoo.txt b/build/pkgs/pygments/distros/gentoo.txt
+new file mode 100644
+index 00000000..a584f32
+--- /dev/null
++++ b/build/pkgs/pygments/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pygments
+diff --git a/build/pkgs/pytz/distros/gentoo.txt b/build/pkgs/pytz/distros/gentoo.txt
+new file mode 100644
+index 00000000..902a18b
+--- /dev/null
++++ b/build/pkgs/pytz/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pytz
+diff --git a/build/pkgs/pyzmq/distros/gentoo.txt b/build/pkgs/pyzmq/distros/gentoo.txt
+new file mode 100644
+index 00000000..77c2429
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyzmq
+diff --git a/build/pkgs/requests/distros/gentoo.txt b/build/pkgs/requests/distros/gentoo.txt
+new file mode 100644
+index 00000000..d3dc941
+--- /dev/null
++++ b/build/pkgs/requests/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/requests
+diff --git a/build/pkgs/scipy/distros/gentoo.txt b/build/pkgs/scipy/distros/gentoo.txt
+new file mode 100644
+index 00000000..11dabd2
+--- /dev/null
++++ b/build/pkgs/scipy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/scipy
+diff --git a/build/pkgs/setuptools/distros/gentoo.txt b/build/pkgs/setuptools/distros/gentoo.txt
+new file mode 100644
+index 00000000..3a4fa34
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/setuptools
+diff --git a/build/pkgs/six/distros/gentoo.txt b/build/pkgs/six/distros/gentoo.txt
+new file mode 100644
+index 00000000..f73f648
+--- /dev/null
++++ b/build/pkgs/six/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/six
+diff --git a/build/pkgs/sympy/distros/gentoo.txt b/build/pkgs/sympy/distros/gentoo.txt
+new file mode 100644
+index 00000000..b5a5034
+--- /dev/null
++++ b/build/pkgs/sympy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sympy
+diff --git a/build/pkgs/texttable/distros/gentoo.txt b/build/pkgs/texttable/distros/gentoo.txt
+new file mode 100644
+index 00000000..b33a7a7
+--- /dev/null
++++ b/build/pkgs/texttable/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/texttable
+diff --git a/build/pkgs/toml/distros/gentoo.txt b/build/pkgs/toml/distros/gentoo.txt
+new file mode 100644
+index 00000000..64fcea3
+--- /dev/null
++++ b/build/pkgs/toml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/toml
+diff --git a/build/pkgs/webencodings/distros/gentoo.txt b/build/pkgs/webencodings/distros/gentoo.txt
+new file mode 100644
+index 00000000..7539b0f
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/webencodings
+-- 
+cgit v1.0-1-gd88e
+
+
+From 088380f884124c9608160b613ba031c5f023f604 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 18:43:04 -0700
+Subject: build/pkgs: Add distros/fedora.txt for Python packages
+
+---
+ build/pkgs/babel/distros/fedora.txt         | 1 +
+ build/pkgs/bleach/distros/fedora.txt        | 1 +
+ build/pkgs/certifi/distros/fedora.txt       | 1 +
+ build/pkgs/cvxopt/distros/fedora.txt        | 1 +
+ build/pkgs/decorator/distros/fedora.txt     | 1 +
+ build/pkgs/html5lib/distros/fedora.txt      | 1 +
+ build/pkgs/idna/distros/fedora.txt          | 1 +
+ build/pkgs/jinja2/distros/fedora.txt        | 1 +
+ build/pkgs/matplotlib/distros/fedora.txt    | 1 +
+ build/pkgs/mpmath/distros/fedora.txt        | 1 +
+ build/pkgs/networkx/distros/fedora.txt      | 1 +
+ build/pkgs/numpy/distros/fedora.txt         | 1 +
+ build/pkgs/packaging/distros/fedora.txt     | 1 +
+ build/pkgs/pandocfilters/distros/fedora.txt | 1 +
+ build/pkgs/pickleshare/distros/fedora.txt   | 1 +
+ build/pkgs/pillow/distros/fedora.txt        | 1 +
+ build/pkgs/pluggy/distros/fedora.txt        | 1 +
+ build/pkgs/py/distros/fedora.txt            | 1 +
+ build/pkgs/pygments/distros/fedora.txt      | 1 +
+ build/pkgs/pytz/distros/fedora.txt          | 1 +
+ build/pkgs/pyzmq/distros/fedora.txt         | 1 +
+ build/pkgs/requests/distros/fedora.txt      | 1 +
+ build/pkgs/scipy/distros/fedora.txt         | 1 +
+ build/pkgs/setuptools/distros/fedora.txt    | 1 +
+ build/pkgs/six/distros/fedora.txt           | 1 +
+ build/pkgs/sympy/distros/fedora.txt         | 1 +
+ build/pkgs/texttable/distros/fedora.txt     | 1 +
+ build/pkgs/toml/distros/fedora.txt          | 1 +
+ build/pkgs/webencodings/distros/fedora.txt  | 1 +
+ build/pkgs/wheel/distros/fedora.txt         | 1 +
+ 30 files changed, 30 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/fedora.txt
+ create mode 100644 build/pkgs/bleach/distros/fedora.txt
+ create mode 100644 build/pkgs/certifi/distros/fedora.txt
+ create mode 100644 build/pkgs/cvxopt/distros/fedora.txt
+ create mode 100644 build/pkgs/decorator/distros/fedora.txt
+ create mode 100644 build/pkgs/html5lib/distros/fedora.txt
+ create mode 100644 build/pkgs/idna/distros/fedora.txt
+ create mode 100644 build/pkgs/jinja2/distros/fedora.txt
+ create mode 100644 build/pkgs/matplotlib/distros/fedora.txt
+ create mode 100644 build/pkgs/mpmath/distros/fedora.txt
+ create mode 100644 build/pkgs/networkx/distros/fedora.txt
+ create mode 100644 build/pkgs/numpy/distros/fedora.txt
+ create mode 100644 build/pkgs/packaging/distros/fedora.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/fedora.txt
+ create mode 100644 build/pkgs/pickleshare/distros/fedora.txt
+ create mode 100644 build/pkgs/pillow/distros/fedora.txt
+ create mode 100644 build/pkgs/pluggy/distros/fedora.txt
+ create mode 100644 build/pkgs/py/distros/fedora.txt
+ create mode 100644 build/pkgs/pygments/distros/fedora.txt
+ create mode 100644 build/pkgs/pytz/distros/fedora.txt
+ create mode 100644 build/pkgs/pyzmq/distros/fedora.txt
+ create mode 100644 build/pkgs/requests/distros/fedora.txt
+ create mode 100644 build/pkgs/scipy/distros/fedora.txt
+ create mode 100644 build/pkgs/setuptools/distros/fedora.txt
+ create mode 100644 build/pkgs/six/distros/fedora.txt
+ create mode 100644 build/pkgs/sympy/distros/fedora.txt
+ create mode 100644 build/pkgs/texttable/distros/fedora.txt
+ create mode 100644 build/pkgs/toml/distros/fedora.txt
+ create mode 100644 build/pkgs/webencodings/distros/fedora.txt
+ create mode 100644 build/pkgs/wheel/distros/fedora.txt
+
+diff --git a/build/pkgs/babel/distros/fedora.txt b/build/pkgs/babel/distros/fedora.txt
+new file mode 100644
+index 00000000..98f6593
+--- /dev/null
++++ b/build/pkgs/babel/distros/fedora.txt
+@@ -0,0 +1 @@
++babel
+diff --git a/build/pkgs/bleach/distros/fedora.txt b/build/pkgs/bleach/distros/fedora.txt
+new file mode 100644
+index 00000000..c5422cc
+--- /dev/null
++++ b/build/pkgs/bleach/distros/fedora.txt
+@@ -0,0 +1 @@
++python-bleach
+diff --git a/build/pkgs/certifi/distros/fedora.txt b/build/pkgs/certifi/distros/fedora.txt
+new file mode 100644
+index 00000000..be421c8
+--- /dev/null
++++ b/build/pkgs/certifi/distros/fedora.txt
+@@ -0,0 +1 @@
++python-certifi
+diff --git a/build/pkgs/cvxopt/distros/fedora.txt b/build/pkgs/cvxopt/distros/fedora.txt
+new file mode 100644
+index 00000000..f15770f
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/fedora.txt
+@@ -0,0 +1 @@
++python-cvxopt
+diff --git a/build/pkgs/decorator/distros/fedora.txt b/build/pkgs/decorator/distros/fedora.txt
+new file mode 100644
+index 00000000..0795604
+--- /dev/null
++++ b/build/pkgs/decorator/distros/fedora.txt
+@@ -0,0 +1 @@
++python-decorator
+diff --git a/build/pkgs/html5lib/distros/fedora.txt b/build/pkgs/html5lib/distros/fedora.txt
+new file mode 100644
+index 00000000..b821491
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/fedora.txt
+@@ -0,0 +1 @@
++python-html5lib
+diff --git a/build/pkgs/idna/distros/fedora.txt b/build/pkgs/idna/distros/fedora.txt
+new file mode 100644
+index 00000000..a73e70c
+--- /dev/null
++++ b/build/pkgs/idna/distros/fedora.txt
+@@ -0,0 +1 @@
++python-idna
+diff --git a/build/pkgs/jinja2/distros/fedora.txt b/build/pkgs/jinja2/distros/fedora.txt
+new file mode 100644
+index 00000000..f5f3caf
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/fedora.txt
+@@ -0,0 +1 @@
++python-jinja2
+diff --git a/build/pkgs/matplotlib/distros/fedora.txt b/build/pkgs/matplotlib/distros/fedora.txt
+new file mode 100644
+index 00000000..f6d856e
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/fedora.txt
+@@ -0,0 +1 @@
++python-matplotlib
+diff --git a/build/pkgs/mpmath/distros/fedora.txt b/build/pkgs/mpmath/distros/fedora.txt
+new file mode 100644
+index 00000000..a7dc8d5
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/fedora.txt
+@@ -0,0 +1 @@
++python-mpmath
+diff --git a/build/pkgs/networkx/distros/fedora.txt b/build/pkgs/networkx/distros/fedora.txt
+new file mode 100644
+index 00000000..293f943
+--- /dev/null
++++ b/build/pkgs/networkx/distros/fedora.txt
+@@ -0,0 +1 @@
++python-networkx
+diff --git a/build/pkgs/numpy/distros/fedora.txt b/build/pkgs/numpy/distros/fedora.txt
+new file mode 100644
+index 00000000..c8722b9
+--- /dev/null
++++ b/build/pkgs/numpy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-numpy
+diff --git a/build/pkgs/packaging/distros/fedora.txt b/build/pkgs/packaging/distros/fedora.txt
+new file mode 100644
+index 00000000..02ad855
+--- /dev/null
++++ b/build/pkgs/packaging/distros/fedora.txt
+@@ -0,0 +1 @@
++python-packaging
+diff --git a/build/pkgs/pandocfilters/distros/fedora.txt b/build/pkgs/pandocfilters/distros/fedora.txt
+new file mode 100644
+index 00000000..e7a86d0
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/fedora.txt b/build/pkgs/pickleshare/distros/fedora.txt
+new file mode 100644
+index 00000000..6d991a2
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pickleshare
+diff --git a/build/pkgs/pillow/distros/fedora.txt b/build/pkgs/pillow/distros/fedora.txt
+new file mode 100644
+index 00000000..86dbb1d
+--- /dev/null
++++ b/build/pkgs/pillow/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pillow
+diff --git a/build/pkgs/pluggy/distros/fedora.txt b/build/pkgs/pluggy/distros/fedora.txt
+new file mode 100644
+index 00000000..c869e54
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pluggy
+diff --git a/build/pkgs/py/distros/fedora.txt b/build/pkgs/py/distros/fedora.txt
+new file mode 100644
+index 00000000..b348d39
+--- /dev/null
++++ b/build/pkgs/py/distros/fedora.txt
+@@ -0,0 +1 @@
++python-py
+diff --git a/build/pkgs/pygments/distros/fedora.txt b/build/pkgs/pygments/distros/fedora.txt
+new file mode 100644
+index 00000000..f3e72a8
+--- /dev/null
++++ b/build/pkgs/pygments/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pygments
+diff --git a/build/pkgs/pytz/distros/fedora.txt b/build/pkgs/pytz/distros/fedora.txt
+new file mode 100644
+index 00000000..2cccc9e
+--- /dev/null
++++ b/build/pkgs/pytz/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pytz
+diff --git a/build/pkgs/pyzmq/distros/fedora.txt b/build/pkgs/pyzmq/distros/fedora.txt
+new file mode 100644
+index 00000000..23f64d1
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pyzmq
+diff --git a/build/pkgs/requests/distros/fedora.txt b/build/pkgs/requests/distros/fedora.txt
+new file mode 100644
+index 00000000..93a7bc1
+--- /dev/null
++++ b/build/pkgs/requests/distros/fedora.txt
+@@ -0,0 +1 @@
++python-requests
+diff --git a/build/pkgs/scipy/distros/fedora.txt b/build/pkgs/scipy/distros/fedora.txt
+new file mode 100644
+index 00000000..7ff2882
+--- /dev/null
++++ b/build/pkgs/scipy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-scipy
+diff --git a/build/pkgs/setuptools/distros/fedora.txt b/build/pkgs/setuptools/distros/fedora.txt
+new file mode 100644
+index 00000000..e1ad178
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/fedora.txt
+@@ -0,0 +1 @@
++python-setuptools
+diff --git a/build/pkgs/six/distros/fedora.txt b/build/pkgs/six/distros/fedora.txt
+new file mode 100644
+index 00000000..787c530
+--- /dev/null
++++ b/build/pkgs/six/distros/fedora.txt
+@@ -0,0 +1 @@
++python-six
+diff --git a/build/pkgs/sympy/distros/fedora.txt b/build/pkgs/sympy/distros/fedora.txt
+new file mode 100644
+index 00000000..126c88a
+--- /dev/null
++++ b/build/pkgs/sympy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-sympy
+diff --git a/build/pkgs/texttable/distros/fedora.txt b/build/pkgs/texttable/distros/fedora.txt
+new file mode 100644
+index 00000000..8d1ccec
+--- /dev/null
++++ b/build/pkgs/texttable/distros/fedora.txt
+@@ -0,0 +1 @@
++python-texttable
+diff --git a/build/pkgs/toml/distros/fedora.txt b/build/pkgs/toml/distros/fedora.txt
+new file mode 100644
+index 00000000..821ee77
+--- /dev/null
++++ b/build/pkgs/toml/distros/fedora.txt
+@@ -0,0 +1 @@
++python-toml
+diff --git a/build/pkgs/webencodings/distros/fedora.txt b/build/pkgs/webencodings/distros/fedora.txt
+new file mode 100644
+index 00000000..12ddba9
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/fedora.txt
+@@ -0,0 +1 @@
++python-webencodings
+diff --git a/build/pkgs/wheel/distros/fedora.txt b/build/pkgs/wheel/distros/fedora.txt
+new file mode 100644
+index 00000000..ae4cbb9
+--- /dev/null
++++ b/build/pkgs/wheel/distros/fedora.txt
+@@ -0,0 +1 @@
++python-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From ad1d5a20380b147c774903066031442f31094626 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 21:04:04 -0700
+Subject: build/pkgs: Add distros/arch.txt for Python packages
+
+---
+ build/pkgs/babel/distros/arch.txt         | 1 +
+ build/pkgs/bleach/distros/arch.txt        | 1 +
+ build/pkgs/certifi/distros/arch.txt       | 1 +
+ build/pkgs/cvxopt/distros/arch.txt        | 1 +
+ build/pkgs/decorator/distros/arch.txt     | 1 +
+ build/pkgs/html5lib/distros/arch.txt      | 1 +
+ build/pkgs/idna/distros/arch.txt          | 1 +
+ build/pkgs/matplotlib/distros/arch.txt    | 1 +
+ build/pkgs/mpmath/distros/arch.txt        | 1 +
+ build/pkgs/networkx/distros/arch.txt      | 1 +
+ build/pkgs/numpy/distros/arch.txt         | 1 +
+ build/pkgs/packaging/distros/arch.txt     | 1 +
+ build/pkgs/pandocfilters/distros/arch.txt | 1 +
+ build/pkgs/pickleshare/distros/arch.txt   | 1 +
+ build/pkgs/pillow/distros/arch.txt        | 1 +
+ build/pkgs/pluggy/distros/arch.txt        | 1 +
+ build/pkgs/py/distros/arch.txt            | 1 +
+ build/pkgs/pygments/distros/arch.txt      | 1 +
+ build/pkgs/pytz/distros/arch.txt          | 1 +
+ build/pkgs/pyzmq/distros/arch.txt         | 1 +
+ build/pkgs/requests/distros/arch.txt      | 1 +
+ build/pkgs/scipy/distros/arch.txt         | 1 +
+ build/pkgs/setuptools/distros/arch.txt    | 1 +
+ build/pkgs/six/distros/arch.txt           | 1 +
+ build/pkgs/sympy/distros/arch.txt         | 1 +
+ build/pkgs/texttable/distros/arch.txt     | 1 +
+ build/pkgs/toml/distros/arch.txt          | 1 +
+ build/pkgs/webencodings/distros/arch.txt  | 1 +
+ build/pkgs/wheel/distros/arch.txt         | 1 +
+ 29 files changed, 29 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/arch.txt
+ create mode 100644 build/pkgs/bleach/distros/arch.txt
+ create mode 100644 build/pkgs/certifi/distros/arch.txt
+ create mode 100644 build/pkgs/cvxopt/distros/arch.txt
+ create mode 100644 build/pkgs/decorator/distros/arch.txt
+ create mode 100644 build/pkgs/html5lib/distros/arch.txt
+ create mode 100644 build/pkgs/idna/distros/arch.txt
+ create mode 100644 build/pkgs/matplotlib/distros/arch.txt
+ create mode 100644 build/pkgs/mpmath/distros/arch.txt
+ create mode 100644 build/pkgs/networkx/distros/arch.txt
+ create mode 100644 build/pkgs/numpy/distros/arch.txt
+ create mode 100644 build/pkgs/packaging/distros/arch.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/arch.txt
+ create mode 100644 build/pkgs/pickleshare/distros/arch.txt
+ create mode 100644 build/pkgs/pillow/distros/arch.txt
+ create mode 100644 build/pkgs/pluggy/distros/arch.txt
+ create mode 100644 build/pkgs/py/distros/arch.txt
+ create mode 100644 build/pkgs/pygments/distros/arch.txt
+ create mode 100644 build/pkgs/pytz/distros/arch.txt
+ create mode 100644 build/pkgs/pyzmq/distros/arch.txt
+ create mode 100644 build/pkgs/requests/distros/arch.txt
+ create mode 100644 build/pkgs/scipy/distros/arch.txt
+ create mode 100644 build/pkgs/setuptools/distros/arch.txt
+ create mode 100644 build/pkgs/six/distros/arch.txt
+ create mode 100644 build/pkgs/sympy/distros/arch.txt
+ create mode 100644 build/pkgs/texttable/distros/arch.txt
+ create mode 100644 build/pkgs/toml/distros/arch.txt
+ create mode 100644 build/pkgs/webencodings/distros/arch.txt
+ create mode 100644 build/pkgs/wheel/distros/arch.txt
+
+diff --git a/build/pkgs/babel/distros/arch.txt b/build/pkgs/babel/distros/arch.txt
+new file mode 100644
+index 00000000..f2d828c
+--- /dev/null
++++ b/build/pkgs/babel/distros/arch.txt
+@@ -0,0 +1 @@
++python-babel
+diff --git a/build/pkgs/bleach/distros/arch.txt b/build/pkgs/bleach/distros/arch.txt
+new file mode 100644
+index 00000000..c5422cc
+--- /dev/null
++++ b/build/pkgs/bleach/distros/arch.txt
+@@ -0,0 +1 @@
++python-bleach
+diff --git a/build/pkgs/certifi/distros/arch.txt b/build/pkgs/certifi/distros/arch.txt
+new file mode 100644
+index 00000000..be421c8
+--- /dev/null
++++ b/build/pkgs/certifi/distros/arch.txt
+@@ -0,0 +1 @@
++python-certifi
+diff --git a/build/pkgs/cvxopt/distros/arch.txt b/build/pkgs/cvxopt/distros/arch.txt
+new file mode 100644
+index 00000000..f15770f
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/arch.txt
+@@ -0,0 +1 @@
++python-cvxopt
+diff --git a/build/pkgs/decorator/distros/arch.txt b/build/pkgs/decorator/distros/arch.txt
+new file mode 100644
+index 00000000..0795604
+--- /dev/null
++++ b/build/pkgs/decorator/distros/arch.txt
+@@ -0,0 +1 @@
++python-decorator
+diff --git a/build/pkgs/html5lib/distros/arch.txt b/build/pkgs/html5lib/distros/arch.txt
+new file mode 100644
+index 00000000..b821491
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/arch.txt
+@@ -0,0 +1 @@
++python-html5lib
+diff --git a/build/pkgs/idna/distros/arch.txt b/build/pkgs/idna/distros/arch.txt
+new file mode 100644
+index 00000000..a73e70c
+--- /dev/null
++++ b/build/pkgs/idna/distros/arch.txt
+@@ -0,0 +1 @@
++python-idna
+diff --git a/build/pkgs/matplotlib/distros/arch.txt b/build/pkgs/matplotlib/distros/arch.txt
+new file mode 100644
+index 00000000..f6d856e
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/arch.txt
+@@ -0,0 +1 @@
++python-matplotlib
+diff --git a/build/pkgs/mpmath/distros/arch.txt b/build/pkgs/mpmath/distros/arch.txt
+new file mode 100644
+index 00000000..a7dc8d5
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/arch.txt
+@@ -0,0 +1 @@
++python-mpmath
+diff --git a/build/pkgs/networkx/distros/arch.txt b/build/pkgs/networkx/distros/arch.txt
+new file mode 100644
+index 00000000..293f943
+--- /dev/null
++++ b/build/pkgs/networkx/distros/arch.txt
+@@ -0,0 +1 @@
++python-networkx
+diff --git a/build/pkgs/numpy/distros/arch.txt b/build/pkgs/numpy/distros/arch.txt
+new file mode 100644
+index 00000000..c8722b9
+--- /dev/null
++++ b/build/pkgs/numpy/distros/arch.txt
+@@ -0,0 +1 @@
++python-numpy
+diff --git a/build/pkgs/packaging/distros/arch.txt b/build/pkgs/packaging/distros/arch.txt
+new file mode 100644
+index 00000000..02ad855
+--- /dev/null
++++ b/build/pkgs/packaging/distros/arch.txt
+@@ -0,0 +1 @@
++python-packaging
+diff --git a/build/pkgs/pandocfilters/distros/arch.txt b/build/pkgs/pandocfilters/distros/arch.txt
+new file mode 100644
+index 00000000..e7a86d0
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/arch.txt
+@@ -0,0 +1 @@
++python-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/arch.txt b/build/pkgs/pickleshare/distros/arch.txt
+new file mode 100644
+index 00000000..6d991a2
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/arch.txt
+@@ -0,0 +1 @@
++python-pickleshare
+diff --git a/build/pkgs/pillow/distros/arch.txt b/build/pkgs/pillow/distros/arch.txt
+new file mode 100644
+index 00000000..86dbb1d
+--- /dev/null
++++ b/build/pkgs/pillow/distros/arch.txt
+@@ -0,0 +1 @@
++python-pillow
+diff --git a/build/pkgs/pluggy/distros/arch.txt b/build/pkgs/pluggy/distros/arch.txt
+new file mode 100644
+index 00000000..c869e54
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/arch.txt
+@@ -0,0 +1 @@
++python-pluggy
+diff --git a/build/pkgs/py/distros/arch.txt b/build/pkgs/py/distros/arch.txt
+new file mode 100644
+index 00000000..b348d39
+--- /dev/null
++++ b/build/pkgs/py/distros/arch.txt
+@@ -0,0 +1 @@
++python-py
+diff --git a/build/pkgs/pygments/distros/arch.txt b/build/pkgs/pygments/distros/arch.txt
+new file mode 100644
+index 00000000..f3e72a8
+--- /dev/null
++++ b/build/pkgs/pygments/distros/arch.txt
+@@ -0,0 +1 @@
++python-pygments
+diff --git a/build/pkgs/pytz/distros/arch.txt b/build/pkgs/pytz/distros/arch.txt
+new file mode 100644
+index 00000000..2cccc9e
+--- /dev/null
++++ b/build/pkgs/pytz/distros/arch.txt
+@@ -0,0 +1 @@
++python-pytz
+diff --git a/build/pkgs/pyzmq/distros/arch.txt b/build/pkgs/pyzmq/distros/arch.txt
+new file mode 100644
+index 00000000..23f64d1
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/arch.txt
+@@ -0,0 +1 @@
++python-pyzmq
+diff --git a/build/pkgs/requests/distros/arch.txt b/build/pkgs/requests/distros/arch.txt
+new file mode 100644
+index 00000000..93a7bc1
+--- /dev/null
++++ b/build/pkgs/requests/distros/arch.txt
+@@ -0,0 +1 @@
++python-requests
+diff --git a/build/pkgs/scipy/distros/arch.txt b/build/pkgs/scipy/distros/arch.txt
+new file mode 100644
+index 00000000..7ff2882
+--- /dev/null
++++ b/build/pkgs/scipy/distros/arch.txt
+@@ -0,0 +1 @@
++python-scipy
+diff --git a/build/pkgs/setuptools/distros/arch.txt b/build/pkgs/setuptools/distros/arch.txt
+new file mode 100644
+index 00000000..e1ad178
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/arch.txt
+@@ -0,0 +1 @@
++python-setuptools
+diff --git a/build/pkgs/six/distros/arch.txt b/build/pkgs/six/distros/arch.txt
+new file mode 100644
+index 00000000..787c530
+--- /dev/null
++++ b/build/pkgs/six/distros/arch.txt
+@@ -0,0 +1 @@
++python-six
+diff --git a/build/pkgs/sympy/distros/arch.txt b/build/pkgs/sympy/distros/arch.txt
+new file mode 100644
+index 00000000..126c88a
+--- /dev/null
++++ b/build/pkgs/sympy/distros/arch.txt
+@@ -0,0 +1 @@
++python-sympy
+diff --git a/build/pkgs/texttable/distros/arch.txt b/build/pkgs/texttable/distros/arch.txt
+new file mode 100644
+index 00000000..8d1ccec
+--- /dev/null
++++ b/build/pkgs/texttable/distros/arch.txt
+@@ -0,0 +1 @@
++python-texttable
+diff --git a/build/pkgs/toml/distros/arch.txt b/build/pkgs/toml/distros/arch.txt
+new file mode 100644
+index 00000000..821ee77
+--- /dev/null
++++ b/build/pkgs/toml/distros/arch.txt
+@@ -0,0 +1 @@
++python-toml
+diff --git a/build/pkgs/webencodings/distros/arch.txt b/build/pkgs/webencodings/distros/arch.txt
+new file mode 100644
+index 00000000..12ddba9
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/arch.txt
+@@ -0,0 +1 @@
++python-webencodings
+diff --git a/build/pkgs/wheel/distros/arch.txt b/build/pkgs/wheel/distros/arch.txt
+new file mode 100644
+index 00000000..ae4cbb9
+--- /dev/null
++++ b/build/pkgs/wheel/distros/arch.txt
+@@ -0,0 +1 @@
++python-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5087abee08f2a89ddaf422ec72a84575fe724a79 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 21:20:56 -0700
+Subject: build/pkgs: Add distros/opensuse.txt for Python packages
+
+---
+ build/pkgs/bleach/distros/opensuse.txt        | 1 +
+ build/pkgs/cvxopt/distros/opensuse.txt        | 1 +
+ build/pkgs/html5lib/distros/opensuse.txt      | 1 +
+ build/pkgs/idna/distros/opensuse.txt          | 1 +
+ build/pkgs/jinja2/distros/opensuse.txt        | 2 +-
+ build/pkgs/mpmath/distros/opensuse.txt        | 1 +
+ build/pkgs/numpy/distros/opensuse.txt         | 1 +
+ build/pkgs/packaging/distros/opensuse.txt     | 1 +
+ build/pkgs/pandocfilters/distros/opensuse.txt | 1 +
+ build/pkgs/pluggy/distros/opensuse.txt        | 1 +
+ build/pkgs/py/distros/opensuse.txt            | 1 +
+ build/pkgs/pygments/distros/opensuse.txt      | 2 +-
+ build/pkgs/sympy/distros/opensuse.txt         | 1 +
+ build/pkgs/texttable/distros/opensuse.txt     | 1 +
+ build/pkgs/toml/distros/opensuse.txt          | 1 +
+ 15 files changed, 15 insertions(+), 2 deletions(-)
+ create mode 100644 build/pkgs/bleach/distros/opensuse.txt
+ create mode 100644 build/pkgs/cvxopt/distros/opensuse.txt
+ create mode 100644 build/pkgs/html5lib/distros/opensuse.txt
+ create mode 100644 build/pkgs/idna/distros/opensuse.txt
+ create mode 100644 build/pkgs/mpmath/distros/opensuse.txt
+ create mode 100644 build/pkgs/numpy/distros/opensuse.txt
+ create mode 100644 build/pkgs/packaging/distros/opensuse.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/opensuse.txt
+ create mode 100644 build/pkgs/pluggy/distros/opensuse.txt
+ create mode 100644 build/pkgs/py/distros/opensuse.txt
+ create mode 100644 build/pkgs/sympy/distros/opensuse.txt
+ create mode 100644 build/pkgs/texttable/distros/opensuse.txt
+ create mode 100644 build/pkgs/toml/distros/opensuse.txt
+
+diff --git a/build/pkgs/bleach/distros/opensuse.txt b/build/pkgs/bleach/distros/opensuse.txt
+new file mode 100644
+index 00000000..6d37c4c
+--- /dev/null
++++ b/build/pkgs/bleach/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-bleach
+diff --git a/build/pkgs/cvxopt/distros/opensuse.txt b/build/pkgs/cvxopt/distros/opensuse.txt
+new file mode 100644
+index 00000000..2bb6ad1
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-cvxopt
+diff --git a/build/pkgs/html5lib/distros/opensuse.txt b/build/pkgs/html5lib/distros/opensuse.txt
+new file mode 100644
+index 00000000..6d7b8df
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-html5lib
+diff --git a/build/pkgs/idna/distros/opensuse.txt b/build/pkgs/idna/distros/opensuse.txt
+new file mode 100644
+index 00000000..de48e70
+--- /dev/null
++++ b/build/pkgs/idna/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-idna
+diff --git a/build/pkgs/jinja2/distros/opensuse.txt b/build/pkgs/jinja2/distros/opensuse.txt
+index 5d90a22..f2db865 100644
+--- a/build/pkgs/jinja2/distros/opensuse.txt
++++ b/build/pkgs/jinja2/distros/opensuse.txt
+@@ -1 +1 @@
+-python3-Jinja2
++python3-jinja2
+diff --git a/build/pkgs/mpmath/distros/opensuse.txt b/build/pkgs/mpmath/distros/opensuse.txt
+new file mode 100644
+index 00000000..fbc82a9
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-mpmath
+diff --git a/build/pkgs/numpy/distros/opensuse.txt b/build/pkgs/numpy/distros/opensuse.txt
+new file mode 100644
+index 00000000..79d5c5a
+--- /dev/null
++++ b/build/pkgs/numpy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-numpy
+diff --git a/build/pkgs/packaging/distros/opensuse.txt b/build/pkgs/packaging/distros/opensuse.txt
+new file mode 100644
+index 00000000..8f1c0ff
+--- /dev/null
++++ b/build/pkgs/packaging/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-packaging
+diff --git a/build/pkgs/pandocfilters/distros/opensuse.txt b/build/pkgs/pandocfilters/distros/opensuse.txt
+new file mode 100644
+index 00000000..d0d4c24
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-pandocfilters
+diff --git a/build/pkgs/pluggy/distros/opensuse.txt b/build/pkgs/pluggy/distros/opensuse.txt
+new file mode 100644
+index 00000000..43a3acf
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-pluggy
+diff --git a/build/pkgs/py/distros/opensuse.txt b/build/pkgs/py/distros/opensuse.txt
+new file mode 100644
+index 00000000..81fefe6
+--- /dev/null
++++ b/build/pkgs/py/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-py
+diff --git a/build/pkgs/pygments/distros/opensuse.txt b/build/pkgs/pygments/distros/opensuse.txt
+index 9ff5740..3ab3792 100644
+--- a/build/pkgs/pygments/distros/opensuse.txt
++++ b/build/pkgs/pygments/distros/opensuse.txt
+@@ -1 +1 @@
+-python3-Pygments
++python3-pygments
+diff --git a/build/pkgs/sympy/distros/opensuse.txt b/build/pkgs/sympy/distros/opensuse.txt
+new file mode 100644
+index 00000000..db423c8
+--- /dev/null
++++ b/build/pkgs/sympy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-sympy
+diff --git a/build/pkgs/texttable/distros/opensuse.txt b/build/pkgs/texttable/distros/opensuse.txt
+new file mode 100644
+index 00000000..8f8e7e2
+--- /dev/null
++++ b/build/pkgs/texttable/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-texttable
+diff --git a/build/pkgs/toml/distros/opensuse.txt b/build/pkgs/toml/distros/opensuse.txt
+new file mode 100644
+index 00000000..543e89d
+--- /dev/null
++++ b/build/pkgs/toml/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-toml
+-- 
+cgit v1.0-1-gd88e
+
+
+From a480ba7ace1370d106ae831e904ea22b72af1be7 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 22:45:04 -0700
+Subject: build/pkgs: Add distros/debian.txt for Python packages
+
+---
+ build/pkgs/babel/distros/debian.txt         | 1 +
+ build/pkgs/bleach/distros/debian.txt        | 1 +
+ build/pkgs/certifi/distros/debian.txt       | 1 +
+ build/pkgs/cvxopt/distros/debian.txt        | 1 +
+ build/pkgs/decorator/distros/debian.txt     | 1 +
+ build/pkgs/html5lib/distros/debian.txt      | 1 +
+ build/pkgs/idna/distros/debian.txt          | 1 +
+ build/pkgs/jinja2/distros/debian.txt        | 1 +
+ build/pkgs/matplotlib/distros/debian.txt    | 1 +
+ build/pkgs/mpmath/distros/debian.txt        | 1 +
+ build/pkgs/networkx/distros/debian.txt      | 1 +
+ build/pkgs/numpy/distros/debian.txt         | 1 +
+ build/pkgs/packaging/distros/debian.txt     | 1 +
+ build/pkgs/pandocfilters/distros/debian.txt | 1 +
+ build/pkgs/pickleshare/distros/debian.txt   | 1 +
+ build/pkgs/pillow/distros/debian.txt        | 1 +
+ build/pkgs/pluggy/distros/debian.txt        | 1 +
+ build/pkgs/py/distros/debian.txt            | 1 +
+ build/pkgs/pygments/distros/debian.txt      | 1 +
+ build/pkgs/pytz/distros/debian.txt          | 1 +
+ build/pkgs/requests/distros/debian.txt      | 1 +
+ build/pkgs/scipy/distros/debian.txt         | 1 +
+ build/pkgs/setuptools/distros/debian.txt    | 1 +
+ build/pkgs/six/distros/debian.txt           | 1 +
+ build/pkgs/sympy/distros/debian.txt         | 1 +
+ build/pkgs/texttable/distros/debian.txt     | 1 +
+ build/pkgs/toml/distros/debian.txt          | 1 +
+ build/pkgs/webencodings/distros/debian.txt  | 1 +
+ build/pkgs/wheel/distros/debian.txt         | 1 +
+ 29 files changed, 29 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/debian.txt
+ create mode 100644 build/pkgs/bleach/distros/debian.txt
+ create mode 100644 build/pkgs/certifi/distros/debian.txt
+ create mode 100644 build/pkgs/cvxopt/distros/debian.txt
+ create mode 100644 build/pkgs/decorator/distros/debian.txt
+ create mode 100644 build/pkgs/html5lib/distros/debian.txt
+ create mode 100644 build/pkgs/idna/distros/debian.txt
+ create mode 100644 build/pkgs/jinja2/distros/debian.txt
+ create mode 100644 build/pkgs/matplotlib/distros/debian.txt
+ create mode 100644 build/pkgs/mpmath/distros/debian.txt
+ create mode 100644 build/pkgs/networkx/distros/debian.txt
+ create mode 100644 build/pkgs/numpy/distros/debian.txt
+ create mode 100644 build/pkgs/packaging/distros/debian.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/debian.txt
+ create mode 100644 build/pkgs/pickleshare/distros/debian.txt
+ create mode 100644 build/pkgs/pillow/distros/debian.txt
+ create mode 100644 build/pkgs/pluggy/distros/debian.txt
+ create mode 100644 build/pkgs/py/distros/debian.txt
+ create mode 100644 build/pkgs/pygments/distros/debian.txt
+ create mode 100644 build/pkgs/pytz/distros/debian.txt
+ create mode 100644 build/pkgs/requests/distros/debian.txt
+ create mode 100644 build/pkgs/scipy/distros/debian.txt
+ create mode 100644 build/pkgs/setuptools/distros/debian.txt
+ create mode 100644 build/pkgs/six/distros/debian.txt
+ create mode 100644 build/pkgs/sympy/distros/debian.txt
+ create mode 100644 build/pkgs/texttable/distros/debian.txt
+ create mode 100644 build/pkgs/toml/distros/debian.txt
+ create mode 100644 build/pkgs/webencodings/distros/debian.txt
+ create mode 100644 build/pkgs/wheel/distros/debian.txt
+
+diff --git a/build/pkgs/babel/distros/debian.txt b/build/pkgs/babel/distros/debian.txt
+new file mode 100644
+index 00000000..e623eb6
+--- /dev/null
++++ b/build/pkgs/babel/distros/debian.txt
+@@ -0,0 +1 @@
++python3-babel
+diff --git a/build/pkgs/bleach/distros/debian.txt b/build/pkgs/bleach/distros/debian.txt
+new file mode 100644
+index 00000000..6d37c4c
+--- /dev/null
++++ b/build/pkgs/bleach/distros/debian.txt
+@@ -0,0 +1 @@
++python3-bleach
+diff --git a/build/pkgs/certifi/distros/debian.txt b/build/pkgs/certifi/distros/debian.txt
+new file mode 100644
+index 00000000..f585a82
+--- /dev/null
++++ b/build/pkgs/certifi/distros/debian.txt
+@@ -0,0 +1 @@
++python3-certifi
+diff --git a/build/pkgs/cvxopt/distros/debian.txt b/build/pkgs/cvxopt/distros/debian.txt
+new file mode 100644
+index 00000000..2bb6ad1
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/debian.txt
+@@ -0,0 +1 @@
++python3-cvxopt
+diff --git a/build/pkgs/decorator/distros/debian.txt b/build/pkgs/decorator/distros/debian.txt
+new file mode 100644
+index 00000000..46c478e
+--- /dev/null
++++ b/build/pkgs/decorator/distros/debian.txt
+@@ -0,0 +1 @@
++python3-decorator
+diff --git a/build/pkgs/html5lib/distros/debian.txt b/build/pkgs/html5lib/distros/debian.txt
+new file mode 100644
+index 00000000..6d7b8df
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/debian.txt
+@@ -0,0 +1 @@
++python3-html5lib
+diff --git a/build/pkgs/idna/distros/debian.txt b/build/pkgs/idna/distros/debian.txt
+new file mode 100644
+index 00000000..de48e70
+--- /dev/null
++++ b/build/pkgs/idna/distros/debian.txt
+@@ -0,0 +1 @@
++python3-idna
+diff --git a/build/pkgs/jinja2/distros/debian.txt b/build/pkgs/jinja2/distros/debian.txt
+new file mode 100644
+index 00000000..f2db865
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/debian.txt
+@@ -0,0 +1 @@
++python3-jinja2
+diff --git a/build/pkgs/matplotlib/distros/debian.txt b/build/pkgs/matplotlib/distros/debian.txt
+new file mode 100644
+index 00000000..1374329
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/debian.txt
+@@ -0,0 +1 @@
++python3-matplotlib
+diff --git a/build/pkgs/mpmath/distros/debian.txt b/build/pkgs/mpmath/distros/debian.txt
+new file mode 100644
+index 00000000..fbc82a9
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/debian.txt
+@@ -0,0 +1 @@
++python3-mpmath
+diff --git a/build/pkgs/networkx/distros/debian.txt b/build/pkgs/networkx/distros/debian.txt
+new file mode 100644
+index 00000000..6779066
+--- /dev/null
++++ b/build/pkgs/networkx/distros/debian.txt
+@@ -0,0 +1 @@
++python3-networkx
+diff --git a/build/pkgs/numpy/distros/debian.txt b/build/pkgs/numpy/distros/debian.txt
+new file mode 100644
+index 00000000..79d5c5a
+--- /dev/null
++++ b/build/pkgs/numpy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-numpy
+diff --git a/build/pkgs/packaging/distros/debian.txt b/build/pkgs/packaging/distros/debian.txt
+new file mode 100644
+index 00000000..8f1c0ff
+--- /dev/null
++++ b/build/pkgs/packaging/distros/debian.txt
+@@ -0,0 +1 @@
++python3-packaging
+diff --git a/build/pkgs/pandocfilters/distros/debian.txt b/build/pkgs/pandocfilters/distros/debian.txt
+new file mode 100644
+index 00000000..d0d4c24
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/debian.txt b/build/pkgs/pickleshare/distros/debian.txt
+new file mode 100644
+index 00000000..a00907d
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pickleshare
+diff --git a/build/pkgs/pillow/distros/debian.txt b/build/pkgs/pillow/distros/debian.txt
+new file mode 100644
+index 00000000..3319fcd
+--- /dev/null
++++ b/build/pkgs/pillow/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pillow
+diff --git a/build/pkgs/pluggy/distros/debian.txt b/build/pkgs/pluggy/distros/debian.txt
+new file mode 100644
+index 00000000..43a3acf
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pluggy
+diff --git a/build/pkgs/py/distros/debian.txt b/build/pkgs/py/distros/debian.txt
+new file mode 100644
+index 00000000..81fefe6
+--- /dev/null
++++ b/build/pkgs/py/distros/debian.txt
+@@ -0,0 +1 @@
++python3-py
+diff --git a/build/pkgs/pygments/distros/debian.txt b/build/pkgs/pygments/distros/debian.txt
+new file mode 100644
+index 00000000..3ab3792
+--- /dev/null
++++ b/build/pkgs/pygments/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pygments
+diff --git a/build/pkgs/pytz/distros/debian.txt b/build/pkgs/pytz/distros/debian.txt
+new file mode 100644
+index 00000000..db20908
+--- /dev/null
++++ b/build/pkgs/pytz/distros/debian.txt
+@@ -0,0 +1 @@
++python3-tz
+diff --git a/build/pkgs/requests/distros/debian.txt b/build/pkgs/requests/distros/debian.txt
+new file mode 100644
+index 00000000..43147b2
+--- /dev/null
++++ b/build/pkgs/requests/distros/debian.txt
+@@ -0,0 +1 @@
++python3-requests
+diff --git a/build/pkgs/scipy/distros/debian.txt b/build/pkgs/scipy/distros/debian.txt
+new file mode 100644
+index 00000000..12b3666
+--- /dev/null
++++ b/build/pkgs/scipy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-scipy
+diff --git a/build/pkgs/setuptools/distros/debian.txt b/build/pkgs/setuptools/distros/debian.txt
+new file mode 100644
+index 00000000..1c0901c
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/debian.txt
+@@ -0,0 +1 @@
++python3-setuptools
+diff --git a/build/pkgs/six/distros/debian.txt b/build/pkgs/six/distros/debian.txt
+new file mode 100644
+index 00000000..68ff859
+--- /dev/null
++++ b/build/pkgs/six/distros/debian.txt
+@@ -0,0 +1 @@
++python3-six
+diff --git a/build/pkgs/sympy/distros/debian.txt b/build/pkgs/sympy/distros/debian.txt
+new file mode 100644
+index 00000000..db423c8
+--- /dev/null
++++ b/build/pkgs/sympy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-sympy
+diff --git a/build/pkgs/texttable/distros/debian.txt b/build/pkgs/texttable/distros/debian.txt
+new file mode 100644
+index 00000000..8f8e7e2
+--- /dev/null
++++ b/build/pkgs/texttable/distros/debian.txt
+@@ -0,0 +1 @@
++python3-texttable
+diff --git a/build/pkgs/toml/distros/debian.txt b/build/pkgs/toml/distros/debian.txt
+new file mode 100644
+index 00000000..543e89d
+--- /dev/null
++++ b/build/pkgs/toml/distros/debian.txt
+@@ -0,0 +1 @@
++python3-toml
+diff --git a/build/pkgs/webencodings/distros/debian.txt b/build/pkgs/webencodings/distros/debian.txt
+new file mode 100644
+index 00000000..ac30c2f
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/debian.txt
+@@ -0,0 +1 @@
++python3-webencodings
+diff --git a/build/pkgs/wheel/distros/debian.txt b/build/pkgs/wheel/distros/debian.txt
+new file mode 100644
+index 00000000..3c066725
+--- /dev/null
++++ b/build/pkgs/wheel/distros/debian.txt
+@@ -0,0 +1 @@
++python3-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 93bf30d7de292551c3050e2dd74651d69ba4bd46 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 18 Oct 2021 07:50:34 -0400
+Subject: Trac #29665: add more documentation for SAGE_PYTHON_PACKAGE_CHECK().
+
+An earlier commit allows SAGE_PYTHON_PACKAGE_CHECK(package) to tweak the
+value of sage_use_system_$package if --enable-system-site-packages was
+not used. This essentially changes the default --with-system-$package=yes
+to "no" in that case. Here we update the documentation to reflect it.
+---
+ m4/sage_python_package_check.m4 | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 7ee82a7..95eefd0 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -34,6 +34,10 @@
+ #   ensure that the ./configure- and run-time views of the system
+ #   are as similar as possible.
+ #
++#   To avoid suggesting these system packages to users who have not
++#   set --enable-system-site-packages, this macro also changes the
++#   default for --with-system-foo from "yes" to "no" in that case.
++#
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
+-- 
+cgit v1.0-1-gd88e
+
+
+From d771e49d57ecdf3622434bc09cbfb87ad3bb7744 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 18 Oct 2021 07:42:46 -0400
+Subject: Trac #29665: improve SAGE_PYTHON_PACKAGE_CHECK() failure message.
+
+When --enable-system-site-packages is off, SAGE_PYTHON_PACKAGE_CHECK()
+will always install the corresponding SPKG. We improve the ./configure
+output in that case to make it clear that the decision was based on
+the value of --enable-system-site-packages and not the "real" check.
+---
+ m4/sage_python_package_check.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 95eefd0..5f0f084 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -40,7 +40,9 @@
+ #
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
++  AC_MSG_CHECKING([if --enable-system-site-packages was used])
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
++    AC_MSG_RESULT(yes)
+     AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
+ 
+     dnl We run this check inside a python venv, because that's ultimately
+@@ -94,6 +96,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
+     dnl System site packages are disabled.
++    AC_MSG_RESULT(no; skipping check)
+     sage_spkg_install_$1=yes
+ 
+     dnl We have to retroactively hack the --with-system-foo={no,yes,force}
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5bb43c1b78a1deb3364f235305937c2f823e5e18 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 24 Oct 2021 20:29:25 -0400
+Subject: Trac #29665: use sage-venv in SAGE_PYTHON_PACKAGE_CHECK().
+
+For consistency with the rest of the build system, we now use the
+build/bin/sage-venv script to create the venv in this autoconf macro
+rather than invoking $PYTHON_FOR_VENV with "-m venv" directly.
+---
+ m4/sage_python_package_check.m4 | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 5f0f084..5547b35 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -50,11 +50,11 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AC_MSG_CHECKING([if we can create a python venv in config.venv])
+ 
+     dnl Use --clear because ./configure typically clobbers its output files.
+-    AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
+-                                        --clear                dnl
+-                                        --without-pip          dnl
+-                                        config.venv            dnl
+-                                        2>&AS_MESSAGE_LOG_FD], [
++    AS_IF(["${PYTHON_FOR_VENV}" build/bin/sage-venv      dnl
++                                  --system-site-packages dnl
++                                  --clear                dnl
++                                  config.venv            dnl
++                                  2>&AS_MESSAGE_LOG_FD], [
+       AC_MSG_RESULT(yes)
+       dnl strip all comments from install-requires.txt; this should leave
+       dnl only a single line containing the version specification for this
+-- 
+cgit v1.0-1-gd88e
+
+
+From c78363d6326addff16ca5abac897949a6be72bf4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:10:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for urllib3.
+
+---
+ build/pkgs/urllib3/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/urllib3/spkg-configure.m4
+
+diff --git a/build/pkgs/urllib3/spkg-configure.m4 b/build/pkgs/urllib3/spkg-configure.m4
+new file mode 100644
+index 00000000..d7ef3e1
+--- /dev/null
++++ b/build/pkgs/urllib3/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([urllib3], [SAGE_PYTHON_PACKAGE_CHECK([urllib3])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f416d5abcae495ea8301fad024b279ea9e997b29 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:15:18 -0400
+Subject: Trac #29665: add Gentoo package information for urllib3.
+
+---
+ build/pkgs/urllib3/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/urllib3/distros/gentoo.txt
+
+diff --git a/build/pkgs/urllib3/distros/gentoo.txt b/build/pkgs/urllib3/distros/gentoo.txt
+new file mode 100644
+index 00000000..172a535
+--- /dev/null
++++ b/build/pkgs/urllib3/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/urllib3
+-- 
+cgit v1.0-1-gd88e
+
+
+From 852068b992bf7959500c650f54cb92e5b68d7ef8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:15:58 -0400
+Subject: Trac #29665: add Gentoo package information for nbformat.
+
+---
+ build/pkgs/nbformat/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbformat/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbformat/distros/gentoo.txt b/build/pkgs/nbformat/distros/gentoo.txt
+new file mode 100644
+index 00000000..006b1f2
+--- /dev/null
++++ b/build/pkgs/nbformat/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbformat
+-- 
+cgit v1.0-1-gd88e
+
+
+From 66179fd28fcc92ee840dcd87bb4db25cea968d66 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:34:16 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for nbformat.
+
+---
+ build/pkgs/nbformat/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbformat/spkg-configure.m4
+
+diff --git a/build/pkgs/nbformat/spkg-configure.m4 b/build/pkgs/nbformat/spkg-configure.m4
+new file mode 100644
+index 00000000..5a7f8c4
+--- /dev/null
++++ b/build/pkgs/nbformat/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbformat], [SAGE_PYTHON_PACKAGE_CHECK([nbformat])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 874005e81ed20f27a5f895030dcdbdfc5f73ad80 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:47:01 -0400
+Subject: Trac #29665: add Gentoo package information for zipp.
+
+---
+ build/pkgs/zipp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/zipp/distros/gentoo.txt
+
+diff --git a/build/pkgs/zipp/distros/gentoo.txt b/build/pkgs/zipp/distros/gentoo.txt
+new file mode 100644
+index 00000000..7f59450
+--- /dev/null
++++ b/build/pkgs/zipp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/zipp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0cc2a7355b5554c1fb79c742ebf02eff54465b3e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:47:35 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for zipp.
+
+---
+ build/pkgs/zipp/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/zipp/spkg-configure.m4
+
+diff --git a/build/pkgs/zipp/spkg-configure.m4 b/build/pkgs/zipp/spkg-configure.m4
+new file mode 100644
+index 00000000..0fe3a9c
+--- /dev/null
++++ b/build/pkgs/zipp/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([zipp], [SAGE_PYTHON_PACKAGE_CHECK([zipp])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6073ad8e56c21fc862749bbd84a56d543fb9458c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:48:37 -0400
+Subject: Trac #29665: add Gentoo package information for wcwidth.
+
+---
+ build/pkgs/wcwidth/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wcwidth/distros/gentoo.txt
+
+diff --git a/build/pkgs/wcwidth/distros/gentoo.txt b/build/pkgs/wcwidth/distros/gentoo.txt
+new file mode 100644
+index 00000000..edeb80b
+--- /dev/null
++++ b/build/pkgs/wcwidth/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/wcwidth
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9793d6172c64d61a015fbe61bd45863759124fad Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:51:10 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for wcwidth.
+
+---
+ build/pkgs/wcwidth/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wcwidth/spkg-configure.m4
+
+diff --git a/build/pkgs/wcwidth/spkg-configure.m4 b/build/pkgs/wcwidth/spkg-configure.m4
+new file mode 100644
+index 00000000..5bde15a
+--- /dev/null
++++ b/build/pkgs/wcwidth/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([wcwidth], [SAGE_PYTHON_PACKAGE_CHECK([wcwidth])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20232f370a43c146ca4e696c72a2cbcc498db060 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:52:36 -0400
+Subject: Trac #29665: add Gentoo package information for testpath.
+
+---
+ build/pkgs/testpath/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/testpath/distros/gentoo.txt
+
+diff --git a/build/pkgs/testpath/distros/gentoo.txt b/build/pkgs/testpath/distros/gentoo.txt
+new file mode 100644
+index 00000000..efa10a0
+--- /dev/null
++++ b/build/pkgs/testpath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/testpath
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1b0785b2aad8844e74345fe950baf097e2b43d24 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:55:22 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for testpath.
+
+---
+ build/pkgs/testpath/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/testpath/spkg-configure.m4
+
+diff --git a/build/pkgs/testpath/spkg-configure.m4 b/build/pkgs/testpath/spkg-configure.m4
+new file mode 100644
+index 00000000..d8fc2a7
+--- /dev/null
++++ b/build/pkgs/testpath/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([testpath], [SAGE_PYTHON_PACKAGE_CHECK([testpath])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 10fc3829ecd956d732b1b069fdfe81f0d6d5cdc2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:56:06 -0400
+Subject: Trac #29665: add Gentoo package information for jedi.
+
+---
+ build/pkgs/jedi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jedi/distros/gentoo.txt
+
+diff --git a/build/pkgs/jedi/distros/gentoo.txt b/build/pkgs/jedi/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c85a46
+--- /dev/null
++++ b/build/pkgs/jedi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jedi
+-- 
+cgit v1.0-1-gd88e
+
+
+From a75824d74c281c7639028ca01dabeed266f56998 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:06:37 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for jedi.
+
+---
+ build/pkgs/jedi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jedi/spkg-configure.m4
+
+diff --git a/build/pkgs/jedi/spkg-configure.m4 b/build/pkgs/jedi/spkg-configure.m4
+new file mode 100644
+index 00000000..a37dbcc
+--- /dev/null
++++ b/build/pkgs/jedi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jedi], [SAGE_PYTHON_PACKAGE_CHECK([jedi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 17af01373d43f6acbbdbc23e073e372d3fdadf8b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:07:47 -0400
+Subject: Trac #29665: add Gentoo package information for tomli.
+
+---
+ build/pkgs/tomli/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tomli/distros/gentoo.txt
+
+diff --git a/build/pkgs/tomli/distros/gentoo.txt b/build/pkgs/tomli/distros/gentoo.txt
+new file mode 100644
+index 00000000..0458e25
+--- /dev/null
++++ b/build/pkgs/tomli/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/tomli
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0d3b5994ae612be11992467c4a3f1a74b81400fe Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:08:12 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for tomli.
+
+---
+ build/pkgs/tomli/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tomli/spkg-configure.m4
+
+diff --git a/build/pkgs/tomli/spkg-configure.m4 b/build/pkgs/tomli/spkg-configure.m4
+new file mode 100644
+index 00000000..95a8b8b
+--- /dev/null
++++ b/build/pkgs/tomli/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tomli], [SAGE_PYTHON_PACKAGE_CHECK([tomli])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From dce1c515781b0eeb8eb9c2bc7aba581560c1fac1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:09:22 -0400
+Subject: Trac #29665: add Gentoo package information for defusedxml.
+
+---
+ build/pkgs/defusedxml/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/defusedxml/distros/gentoo.txt
+
+diff --git a/build/pkgs/defusedxml/distros/gentoo.txt b/build/pkgs/defusedxml/distros/gentoo.txt
+new file mode 100644
+index 00000000..2804214
+--- /dev/null
++++ b/build/pkgs/defusedxml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/defusedxml
+-- 
+cgit v1.0-1-gd88e
+
+
+From 02e1e1cd7f8bdae3ca5b7d35ce70af28a44e9b7c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:11:14 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for defusedxml.
+
+---
+ build/pkgs/defusedxml/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/defusedxml/spkg-configure.m4
+
+diff --git a/build/pkgs/defusedxml/spkg-configure.m4 b/build/pkgs/defusedxml/spkg-configure.m4
+new file mode 100644
+index 00000000..e02f345
+--- /dev/null
++++ b/build/pkgs/defusedxml/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([defusedxml], [SAGE_PYTHON_PACKAGE_CHECK([defusedxml])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e0ba4ebb5cfc637b5d26b85de9f34e0a160d2b9c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:12:22 -0400
+Subject: Trac #29665: add Gentoo package information for ipywidgets.
+
+---
+ build/pkgs/ipywidgets/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipywidgets/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipywidgets/distros/gentoo.txt b/build/pkgs/ipywidgets/distros/gentoo.txt
+new file mode 100644
+index 00000000..7c76967
+--- /dev/null
++++ b/build/pkgs/ipywidgets/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipywidgets
+-- 
+cgit v1.0-1-gd88e
+
+
+From 49df7e7d93c7a31b7c46d5d224a35fd313a29a32 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:15:53 -0400
+Subject: Trac #29665: add Gentoo package information for simplegeneric.
+
+---
+ build/pkgs/simplegeneric/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/simplegeneric/distros/gentoo.txt
+
+diff --git a/build/pkgs/simplegeneric/distros/gentoo.txt b/build/pkgs/simplegeneric/distros/gentoo.txt
+new file mode 100644
+index 00000000..a86e90d
+--- /dev/null
++++ b/build/pkgs/simplegeneric/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/simplegeneric
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2a893635d5804749e6fec7ed7289c921ecb5300a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:16:33 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for simplegeneric.
+
+---
+ build/pkgs/simplegeneric/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/simplegeneric/spkg-configure.m4
+
+diff --git a/build/pkgs/simplegeneric/spkg-configure.m4 b/build/pkgs/simplegeneric/spkg-configure.m4
+new file mode 100644
+index 00000000..13715ab
+--- /dev/null
++++ b/build/pkgs/simplegeneric/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([simplegeneric], [SAGE_PYTHON_PACKAGE_CHECK([simplegeneric])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a8fe7ecd6e3163e7d01261e5497ac452a8cc95ab Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:17:18 -0400
+Subject: Trac #29665: add Gentoo package information for imagesize.
+
+---
+ build/pkgs/imagesize/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/imagesize/distros/gentoo.txt
+
+diff --git a/build/pkgs/imagesize/distros/gentoo.txt b/build/pkgs/imagesize/distros/gentoo.txt
+new file mode 100644
+index 00000000..54350ba
+--- /dev/null
++++ b/build/pkgs/imagesize/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/imagesize
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2ad837c5dd1fca0f50ce6d5042a9344210a54f84 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:17:48 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for imagesize.
+
+---
+ build/pkgs/imagesize/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/imagesize/spkg-configure.m4
+
+diff --git a/build/pkgs/imagesize/spkg-configure.m4 b/build/pkgs/imagesize/spkg-configure.m4
+new file mode 100644
+index 00000000..20210ef
+--- /dev/null
++++ b/build/pkgs/imagesize/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([imagesize], [SAGE_PYTHON_PACKAGE_CHECK([imagesize])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bf47415b5bfca2d7bf24e20de35662bf331623b9 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:18:49 -0400
+Subject: Trac #29665: add Gentoo package information for mistune.
+
+---
+ build/pkgs/mistune/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mistune/distros/gentoo.txt
+
+diff --git a/build/pkgs/mistune/distros/gentoo.txt b/build/pkgs/mistune/distros/gentoo.txt
+new file mode 100644
+index 00000000..56f0a4e
+--- /dev/null
++++ b/build/pkgs/mistune/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/mistune
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6898a74fd0c65a40c5220ba68b4062ac6fe060c6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:21:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for mistune.
+
+---
+ build/pkgs/mistune/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mistune/spkg-configure.m4
+
+diff --git a/build/pkgs/mistune/spkg-configure.m4 b/build/pkgs/mistune/spkg-configure.m4
+new file mode 100644
+index 00000000..972f33d
+--- /dev/null
++++ b/build/pkgs/mistune/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([mistune], [SAGE_PYTHON_PACKAGE_CHECK([mistune])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 62735e4ccf2031cd39eb5e04b03bdfd97005d808 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:22:48 -0400
+Subject: Trac #29665: add Gentoo package information for backcall.
+
+---
+ build/pkgs/backcall/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/backcall/distros/gentoo.txt
+
+diff --git a/build/pkgs/backcall/distros/gentoo.txt b/build/pkgs/backcall/distros/gentoo.txt
+new file mode 100644
+index 00000000..266a222
+--- /dev/null
++++ b/build/pkgs/backcall/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/backcall
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9ef3ea42d4a33c7cdb623fa5417ae300cf323183 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:25:10 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for backcall.
+
+---
+ build/pkgs/backcall/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/backcall/spkg-configure.m4
+
+diff --git a/build/pkgs/backcall/spkg-configure.m4 b/build/pkgs/backcall/spkg-configure.m4
+new file mode 100644
+index 00000000..d6b11c4
+--- /dev/null
++++ b/build/pkgs/backcall/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([backcall], [SAGE_PYTHON_PACKAGE_CHECK([backcall])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1b3ea2a3c40fea0fb58435f5e5304368ea58dff8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:25:58 -0400
+Subject: Trac #29665: add Gentoo package information for parso.
+
+---
+ build/pkgs/parso/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/parso/distros/gentoo.txt
+
+diff --git a/build/pkgs/parso/distros/gentoo.txt b/build/pkgs/parso/distros/gentoo.txt
+new file mode 100644
+index 00000000..f9ce4c7
+--- /dev/null
++++ b/build/pkgs/parso/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/parso
+-- 
+cgit v1.0-1-gd88e
+
+
+From 963a3a2c563ec71a1f5be2395722d0e824cb0b11 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:26:22 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for parso.
+
+---
+ build/pkgs/parso/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/parso/spkg-configure.m4
+
+diff --git a/build/pkgs/parso/spkg-configure.m4 b/build/pkgs/parso/spkg-configure.m4
+new file mode 100644
+index 00000000..1ca6f1b
+--- /dev/null
++++ b/build/pkgs/parso/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([parso], [SAGE_PYTHON_PACKAGE_CHECK([parso])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 943053dfc474b6549bcc7d6ef2971ea43588b35c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:27:00 -0400
+Subject: Trac #29665: add Gentoo package information for pyparsing.
+
+---
+ build/pkgs/pyparsing/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyparsing/distros/gentoo.txt
+
+diff --git a/build/pkgs/pyparsing/distros/gentoo.txt b/build/pkgs/pyparsing/distros/gentoo.txt
+new file mode 100644
+index 00000000..ef0419f
+--- /dev/null
++++ b/build/pkgs/pyparsing/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyparsing
+-- 
+cgit v1.0-1-gd88e
+
+
+From bd682eaa2ac41dd84e7a52e2b0c5442fc8fd8919 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:27:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pyparsing.
+
+---
+ build/pkgs/pyparsing/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyparsing/spkg-configure.m4
+
+diff --git a/build/pkgs/pyparsing/spkg-configure.m4 b/build/pkgs/pyparsing/spkg-configure.m4
+new file mode 100644
+index 00000000..d2b4c00
+--- /dev/null
++++ b/build/pkgs/pyparsing/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pyparsing], [SAGE_PYTHON_PACKAGE_CHECK([pyparsing])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 74f36a9c0ec7c63b7e6c40066e42f4b15c2f978e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:17:42 -0400
+Subject: Trac #29665: add Gentoo package information for debugpy.
+
+---
+ build/pkgs/debugpy/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/debugpy/distros/gentoo.txt
+
+diff --git a/build/pkgs/debugpy/distros/gentoo.txt b/build/pkgs/debugpy/distros/gentoo.txt
+new file mode 100644
+index 00000000..8b797ce
+--- /dev/null
++++ b/build/pkgs/debugpy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/debugpy
+-- 
+cgit v1.0-1-gd88e
+
+
+From be072fa87ac5c373d9dc9b54c0bd68734d5709bc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:21:17 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for debugpy.
+
+---
+ build/pkgs/debugpy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/debugpy/spkg-configure.m4
+
+diff --git a/build/pkgs/debugpy/spkg-configure.m4 b/build/pkgs/debugpy/spkg-configure.m4
+new file mode 100644
+index 00000000..db605ff
+--- /dev/null
++++ b/build/pkgs/debugpy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([debugpy], [SAGE_PYTHON_PACKAGE_CHECK([debugpy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6f777ce2f2e14b94e91c8b7bbac82f9017460aba Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:23:56 -0400
+Subject: Trac #29665: add Gentoo package information for tzlocal.
+
+---
+ build/pkgs/tzlocal/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tzlocal/distros/gentoo.txt
+
+diff --git a/build/pkgs/tzlocal/distros/gentoo.txt b/build/pkgs/tzlocal/distros/gentoo.txt
+new file mode 100644
+index 00000000..2018442
+--- /dev/null
++++ b/build/pkgs/tzlocal/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/tzlocal
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3bd078fc15ae13982249452711baafae91038191 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:24:51 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for tzlocal.
+
+---
+ build/pkgs/tzlocal/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tzlocal/spkg-configure.m4
+
+diff --git a/build/pkgs/tzlocal/spkg-configure.m4 b/build/pkgs/tzlocal/spkg-configure.m4
+new file mode 100644
+index 00000000..e020b28
+--- /dev/null
++++ b/build/pkgs/tzlocal/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tzlocal], [SAGE_PYTHON_PACKAGE_CHECK([tzlocal])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 91b0882fc62214923da9ee7b6dccb05d8a1d11d1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:26:13 -0400
+Subject: Trac #29665: add Gentoo package information for pycparser.
+
+---
+ build/pkgs/pycparser/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pycparser/distros/gentoo.txt
+
+diff --git a/build/pkgs/pycparser/distros/gentoo.txt b/build/pkgs/pycparser/distros/gentoo.txt
+new file mode 100644
+index 00000000..5e87307
+--- /dev/null
++++ b/build/pkgs/pycparser/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pycparser
+-- 
+cgit v1.0-1-gd88e
+
+
+From beabde92fe6e057faf516fe82d27f1e903e55ce6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:27:27 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pycparser.
+
+---
+ build/pkgs/pycparser/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pycparser/spkg-configure.m4
+
+diff --git a/build/pkgs/pycparser/spkg-configure.m4 b/build/pkgs/pycparser/spkg-configure.m4
+new file mode 100644
+index 00000000..4b9b900
+--- /dev/null
++++ b/build/pkgs/pycparser/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pycparser], [SAGE_PYTHON_PACKAGE_CHECK([pycparser])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 86c2788dc7fd1169314e9598c91fa81045553677 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:29:36 -0400
+Subject: Trac #29665: add Gentoo package information for cycler.
+
+---
+ build/pkgs/cycler/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cycler/distros/gentoo.txt
+
+diff --git a/build/pkgs/cycler/distros/gentoo.txt b/build/pkgs/cycler/distros/gentoo.txt
+new file mode 100644
+index 00000000..4b21543
+--- /dev/null
++++ b/build/pkgs/cycler/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/cycler
+-- 
+cgit v1.0-1-gd88e
+
+
+From 67c5a944101ddf329f0a61c61d4e784f58a5c5b0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:30:27 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for cycler.
+
+---
+ build/pkgs/cycler/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cycler/spkg-configure.m4
+
+diff --git a/build/pkgs/cycler/spkg-configure.m4 b/build/pkgs/cycler/spkg-configure.m4
+new file mode 100644
+index 00000000..239571a
+--- /dev/null
++++ b/build/pkgs/cycler/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([cycler], [SAGE_PYTHON_PACKAGE_CHECK([cycler])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ef6d490251abfa41f7a0910274700a8a6a65f629 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:31:19 -0400
+Subject: Trac #29665: add Gentoo package information for traitlets.
+
+---
+ build/pkgs/traitlets/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/traitlets/distros/gentoo.txt
+
+diff --git a/build/pkgs/traitlets/distros/gentoo.txt b/build/pkgs/traitlets/distros/gentoo.txt
+new file mode 100644
+index 00000000..46bfaab
+--- /dev/null
++++ b/build/pkgs/traitlets/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/traitlets
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1f922b458d34088d9f6773312209e69f19ee45dc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:31:50 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for traitlets.
+
+---
+ build/pkgs/traitlets/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/traitlets/spkg-configure.m4
+
+diff --git a/build/pkgs/traitlets/spkg-configure.m4 b/build/pkgs/traitlets/spkg-configure.m4
+new file mode 100644
+index 00000000..df2382b
+--- /dev/null
++++ b/build/pkgs/traitlets/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([traitlets], [SAGE_PYTHON_PACKAGE_CHECK([traitlets])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 95b89a9ced0acb6d971a27fa63b97ea58a11f4e1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:33:35 -0400
+Subject: Trac #29665: add Gentoo package information for argcomplete.
+
+---
+ build/pkgs/argcomplete/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argcomplete/distros/gentoo.txt
+
+diff --git a/build/pkgs/argcomplete/distros/gentoo.txt b/build/pkgs/argcomplete/distros/gentoo.txt
+new file mode 100644
+index 00000000..b150949
+--- /dev/null
++++ b/build/pkgs/argcomplete/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/argcomplete
+-- 
+cgit v1.0-1-gd88e
+
+
+From b4cd8ef384e6e5bae0de0f3c113fb5f9e6e1a71e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:34:14 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for argcomplete.
+
+---
+ build/pkgs/argcomplete/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argcomplete/spkg-configure.m4
+
+diff --git a/build/pkgs/argcomplete/spkg-configure.m4 b/build/pkgs/argcomplete/spkg-configure.m4
+new file mode 100644
+index 00000000..cbd7ccf
+--- /dev/null
++++ b/build/pkgs/argcomplete/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([argcomplete], [SAGE_PYTHON_PACKAGE_CHECK([argcomplete])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4cc610e8331970cc018d7ea87af928fa73a292c1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:36:21 -0400
+Subject: Trac #29665: add Gentoo package information for ptyprocess.
+
+---
+ build/pkgs/ptyprocess/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ptyprocess/distros/gentoo.txt
+
+diff --git a/build/pkgs/ptyprocess/distros/gentoo.txt b/build/pkgs/ptyprocess/distros/gentoo.txt
+new file mode 100644
+index 00000000..571a851
+--- /dev/null
++++ b/build/pkgs/ptyprocess/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ptyprocess
+-- 
+cgit v1.0-1-gd88e
+
+
+From cd15f97221bf5933b07900e4f77cb55401eede26 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:37:02 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ptyprocess.
+
+---
+ build/pkgs/ptyprocess/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ptyprocess/spkg-configure.m4
+
+diff --git a/build/pkgs/ptyprocess/spkg-configure.m4 b/build/pkgs/ptyprocess/spkg-configure.m4
+new file mode 100644
+index 00000000..bfacbae
+--- /dev/null
++++ b/build/pkgs/ptyprocess/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ptyprocess], [SAGE_PYTHON_PACKAGE_CHECK([ptyprocess])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb5f45b15f99e4ba28e1b1f6042a0e8ea17f1dfc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:38:22 -0400
+Subject: Trac #29665: add Gentoo package information for attrs.
+
+---
+ build/pkgs/attrs/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/attrs/distros/gentoo.txt
+
+diff --git a/build/pkgs/attrs/distros/gentoo.txt b/build/pkgs/attrs/distros/gentoo.txt
+new file mode 100644
+index 00000000..3b906fa
+--- /dev/null
++++ b/build/pkgs/attrs/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/attrs
+-- 
+cgit v1.0-1-gd88e
+
+
+From 321707ebf8e9af1e4ac3a5b5b094b4226bb3a7a5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:38:55 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for attrs.
+
+---
+ build/pkgs/attrs/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/attrs/spkg-configure.m4
+
+diff --git a/build/pkgs/attrs/spkg-configure.m4 b/build/pkgs/attrs/spkg-configure.m4
+new file mode 100644
+index 00000000..ba6a9b7
+--- /dev/null
++++ b/build/pkgs/attrs/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([attrs], [SAGE_PYTHON_PACKAGE_CHECK([attrs])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 69a498a4e8854ecdfc2f1a134104983c0dcb9e32 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:40:09 -0400
+Subject: Trac #29665: add Gentoo package information for send2trash.
+
+---
+ build/pkgs/send2trash/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/send2trash/distros/gentoo.txt
+
+diff --git a/build/pkgs/send2trash/distros/gentoo.txt b/build/pkgs/send2trash/distros/gentoo.txt
+new file mode 100644
+index 00000000..a89b179
+--- /dev/null
++++ b/build/pkgs/send2trash/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/send2trash
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9baed17c84e1bdf5abd17c20766e5cd7dddc5b53 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:41:45 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for send2trash.
+
+---
+ build/pkgs/send2trash/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/send2trash/spkg-configure.m4
+
+diff --git a/build/pkgs/send2trash/spkg-configure.m4 b/build/pkgs/send2trash/spkg-configure.m4
+new file mode 100644
+index 00000000..3bbb727
+--- /dev/null
++++ b/build/pkgs/send2trash/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([send2trash], [SAGE_PYTHON_PACKAGE_CHECK([send2trash])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b9b552b2a2aaccaeb7c5b25be0b681f107522d09 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:43:27 -0400
+Subject: Trac #29665: add Gentoo package information for pyrsistent.
+
+---
+ build/pkgs/pyrsistent/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyrsistent/distros/gentoo.txt
+
+diff --git a/build/pkgs/pyrsistent/distros/gentoo.txt b/build/pkgs/pyrsistent/distros/gentoo.txt
+new file mode 100644
+index 00000000..83439ce
+--- /dev/null
++++ b/build/pkgs/pyrsistent/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyrsistent
+-- 
+cgit v1.0-1-gd88e
+
+
+From a17b31fac6104852762f57daa749443147bdf121 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:44:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pyrsistent.
+
+---
+ build/pkgs/pyrsistent/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyrsistent/spkg-configure.m4
+
+diff --git a/build/pkgs/pyrsistent/spkg-configure.m4 b/build/pkgs/pyrsistent/spkg-configure.m4
+new file mode 100644
+index 00000000..f7ca75d
+--- /dev/null
++++ b/build/pkgs/pyrsistent/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pyrsistent], [SAGE_PYTHON_PACKAGE_CHECK([pyrsistent])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 68520decad6d6937918d7a6af65ca5bd476e5d02 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:45:45 -0400
+Subject: Trac #29665: add Gentoo package information for entrypoints.
+
+---
+ build/pkgs/entrypoints/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/entrypoints/distros/gentoo.txt
+
+diff --git a/build/pkgs/entrypoints/distros/gentoo.txt b/build/pkgs/entrypoints/distros/gentoo.txt
+new file mode 100644
+index 00000000..684ddd0
+--- /dev/null
++++ b/build/pkgs/entrypoints/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/entrypoints
+-- 
+cgit v1.0-1-gd88e
+
+
+From 34213eccb642a6bad64d89acaefa83ee702cb483 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:46:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for entrypoints.
+
+---
+ build/pkgs/entrypoints/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/entrypoints/spkg-configure.m4
+
+diff --git a/build/pkgs/entrypoints/spkg-configure.m4 b/build/pkgs/entrypoints/spkg-configure.m4
+new file mode 100644
+index 00000000..caed658
+--- /dev/null
++++ b/build/pkgs/entrypoints/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([entrypoints], [SAGE_PYTHON_PACKAGE_CHECK([entrypoints])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8e985614345da1a58fcdc127a9c0ddd790f9b5d2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:48:26 -0400
+Subject: Trac #29665: add Gentoo package information for markupsafe.
+
+---
+ build/pkgs/markupsafe/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/markupsafe/distros/gentoo.txt
+
+diff --git a/build/pkgs/markupsafe/distros/gentoo.txt b/build/pkgs/markupsafe/distros/gentoo.txt
+new file mode 100644
+index 00000000..9654e35
+--- /dev/null
++++ b/build/pkgs/markupsafe/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/markupsafe
+-- 
+cgit v1.0-1-gd88e
+
+
+From d370f229ae0988856f2e0d1f6ee2df2c47169106 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:48:55 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for markupsafe.
+
+---
+ build/pkgs/markupsafe/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/markupsafe/spkg-configure.m4
+
+diff --git a/build/pkgs/markupsafe/spkg-configure.m4 b/build/pkgs/markupsafe/spkg-configure.m4
+new file mode 100644
+index 00000000..79eb8db
+--- /dev/null
++++ b/build/pkgs/markupsafe/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([markupsafe], [SAGE_PYTHON_PACKAGE_CHECK([markupsafe])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c49b285ad9e25e6bc81a7e75d461d234fdd3ea68 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:30:49 -0400
+Subject: Trac #29665: add Gentoo package information for flit_core.
+
+---
+ build/pkgs/flit_core/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/flit_core/distros/gentoo.txt
+
+diff --git a/build/pkgs/flit_core/distros/gentoo.txt b/build/pkgs/flit_core/distros/gentoo.txt
+new file mode 100644
+index 00000000..fe6bea9
+--- /dev/null
++++ b/build/pkgs/flit_core/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/flit_core
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b0ce1c4f23cd9fc4316e1eb2b9b4bde394957f3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:32:11 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for flit_core.
+
+---
+ build/pkgs/flit_core/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/flit_core/spkg-configure.m4
+
+diff --git a/build/pkgs/flit_core/spkg-configure.m4 b/build/pkgs/flit_core/spkg-configure.m4
+new file mode 100644
+index 00000000..ee67557
+--- /dev/null
++++ b/build/pkgs/flit_core/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([flit_core], [SAGE_PYTHON_PACKAGE_CHECK([flit_core])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f006c231a81428b1e1e792f889bf974f90e3c831 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:34:06 -0400
+Subject: Trac #29665: add Gentoo package information for nest_asyncio.
+
+---
+ build/pkgs/nest_asyncio/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nest_asyncio/distros/gentoo.txt
+
+diff --git a/build/pkgs/nest_asyncio/distros/gentoo.txt b/build/pkgs/nest_asyncio/distros/gentoo.txt
+new file mode 100644
+index 00000000..ab742d2
+--- /dev/null
++++ b/build/pkgs/nest_asyncio/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nest_asyncio
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4a58d0a96a84475e765a01a64f5f44c48a317e0b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:34:43 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for nest_asyncio.
+
+---
+ build/pkgs/nest_asyncio/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nest_asyncio/spkg-configure.m4
+
+diff --git a/build/pkgs/nest_asyncio/spkg-configure.m4 b/build/pkgs/nest_asyncio/spkg-configure.m4
+new file mode 100644
+index 00000000..4d81527
+--- /dev/null
++++ b/build/pkgs/nest_asyncio/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nest_asyncio], [SAGE_PYTHON_PACKAGE_CHECK([nest_asyncio])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e50af937777ea778908bc09a7a79db3dd80fdf25 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:37:02 -0400
+Subject: Trac #29665: add Gentoo package information for ipython_genutils.
+
+---
+ build/pkgs/ipython_genutils/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython_genutils/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipython_genutils/distros/gentoo.txt b/build/pkgs/ipython_genutils/distros/gentoo.txt
+new file mode 100644
+index 00000000..01bc49d
+--- /dev/null
++++ b/build/pkgs/ipython_genutils/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipython_genutils
+-- 
+cgit v1.0-1-gd88e
+
+
+From ec3c0ce9db2ba13c1a49d1bcfb7a4b249cb7ae83 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:39:20 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipython_genutils.
+
+---
+ build/pkgs/ipython_genutils/spkg-configure.m4 | 4 ++++
+ 1 file changed, 4 insertions(+)
+ create mode 100644 build/pkgs/ipython_genutils/spkg-configure.m4
+
+diff --git a/build/pkgs/ipython_genutils/spkg-configure.m4 b/build/pkgs/ipython_genutils/spkg-configure.m4
+new file mode 100644
+index 00000000..b0ba86a
+--- /dev/null
++++ b/build/pkgs/ipython_genutils/spkg-configure.m4
+@@ -0,0 +1,4 @@
++SAGE_SPKG_CONFIGURE(
++  [ipython_genutils],
++  [SAGE_PYTHON_PACKAGE_CHECK([ipython_genutils])]
++)
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5c9e2e265115e5f10d4b459a475467e30b4bddde Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:40:03 -0400
+Subject: Trac #29665: add Gentoo package information for ipython.
+
+---
+ build/pkgs/ipython/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipython/distros/gentoo.txt b/build/pkgs/ipython/distros/gentoo.txt
+new file mode 100644
+index 00000000..8b76f18
+--- /dev/null
++++ b/build/pkgs/ipython/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipython
+-- 
+cgit v1.0-1-gd88e
+
+
+From 621e707ddd040a902d7dddf0bed1de2b54ab22f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 07:37:56 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipython.
+
+---
+ build/pkgs/ipython/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython/spkg-configure.m4
+
+diff --git a/build/pkgs/ipython/spkg-configure.m4 b/build/pkgs/ipython/spkg-configure.m4
+new file mode 100644
+index 00000000..02ab89f
+--- /dev/null
++++ b/build/pkgs/ipython/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipython], [SAGE_PYTHON_PACKAGE_CHECK([ipython])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20a0613f6d441da436f3e7b8047a72bf490882bd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 07:51:11 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipywidgets.
+
+---
+ build/pkgs/ipywidgets/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipywidgets/spkg-configure.m4
+
+diff --git a/build/pkgs/ipywidgets/spkg-configure.m4 b/build/pkgs/ipywidgets/spkg-configure.m4
+new file mode 100644
+index 00000000..51ca9be
+--- /dev/null
++++ b/build/pkgs/ipywidgets/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipywidgets], [SAGE_PYTHON_PACKAGE_CHECK([ipywidgets])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 76bcd386633acc02a1a3026339d0cbd258ada04e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 10:05:16 -0400
+Subject: Trac #29665: add Gentoo package information for wheel.
+
+---
+ build/pkgs/wheel/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wheel/distros/gentoo.txt
+
+diff --git a/build/pkgs/wheel/distros/gentoo.txt b/build/pkgs/wheel/distros/gentoo.txt
+new file mode 100644
+index 00000000..ec571d5
+--- /dev/null
++++ b/build/pkgs/wheel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 96c2dd2ca7812f5333bb9d45eadb7ac408e364ce Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:51:44 -0500
+Subject: Trac #29665: add Gentoo package information for terminado.
+
+---
+ build/pkgs/terminado/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/terminado/distros/gentoo.txt
+
+diff --git a/build/pkgs/terminado/distros/gentoo.txt b/build/pkgs/terminado/distros/gentoo.txt
+new file mode 100644
+index 00000000..1df16f1
+--- /dev/null
++++ b/build/pkgs/terminado/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/terminado
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0de0f5f3d235a4339b21e37ea13c9f5e59a82e59 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:52:35 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for terminado.
+
+---
+ build/pkgs/terminado/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/terminado/spkg-configure.m4
+
+diff --git a/build/pkgs/terminado/spkg-configure.m4 b/build/pkgs/terminado/spkg-configure.m4
+new file mode 100644
+index 00000000..5defc2f
+--- /dev/null
++++ b/build/pkgs/terminado/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([terminado], [SAGE_PYTHON_PACKAGE_CHECK([terminado])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d14a745c770b02822557e7cee0a98de1cb2f3a12 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:56:15 -0500
+Subject: Trac #29665: add Gentoo package information for cffi.
+
+---
+ build/pkgs/cffi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cffi/distros/gentoo.txt
+
+diff --git a/build/pkgs/cffi/distros/gentoo.txt b/build/pkgs/cffi/distros/gentoo.txt
+new file mode 100644
+index 00000000..81eeb81
+--- /dev/null
++++ b/build/pkgs/cffi/distros/gentoo.txt
+@@ -0,0 +1 @@
++virtual/python-cffi
+-- 
+cgit v1.0-1-gd88e
+
+
+From ce393c04afc69fe050e38f780d4e117164687d80 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:57:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for cffi.
+
+---
+ build/pkgs/cffi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cffi/spkg-configure.m4
+
+diff --git a/build/pkgs/cffi/spkg-configure.m4 b/build/pkgs/cffi/spkg-configure.m4
+new file mode 100644
+index 00000000..dc81875
+--- /dev/null
++++ b/build/pkgs/cffi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([cffi], [SAGE_PYTHON_PACKAGE_CHECK([cffi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 467093315b3fdd57c8caa2f95cf99ad52b0b84fb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:57:57 -0500
+Subject: Trac #29665: add Gentoo package information for pip.
+
+---
+ build/pkgs/pip/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pip/distros/gentoo.txt
+
+diff --git a/build/pkgs/pip/distros/gentoo.txt b/build/pkgs/pip/distros/gentoo.txt
+new file mode 100644
+index 00000000..1845454
+--- /dev/null
++++ b/build/pkgs/pip/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pip[vanilla]
+-- 
+cgit v1.0-1-gd88e
+
+
+From c597fd23f9f68dabbcb7e698d0569c3e6458f6d1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 09:07:26 -0500
+Subject: Trac #29665: new spkg-configure.m4 for pip.
+
+---
+ build/pkgs/pip/spkg-configure.m4 | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+ create mode 100644 build/pkgs/pip/spkg-configure.m4
+
+diff --git a/build/pkgs/pip/spkg-configure.m4 b/build/pkgs/pip/spkg-configure.m4
+new file mode 100644
+index 00000000..c7a5562
+--- /dev/null
++++ b/build/pkgs/pip/spkg-configure.m4
+@@ -0,0 +1,12 @@
++SAGE_SPKG_CONFIGURE([pip], [
++  dnl always run this macro because it changes the default value of
++  dnl the --with-system-<package> option.
++  SAGE_PYTHON_PACKAGE_CHECK([pip])
++
++  dnl if we might not install the spkg, make sure that "pip" is in
++  dnl the user's PATH, too.
++  AS_IF([test "x$sage_spkg_install_pip" != "xyes"], [
++    AC_CHECK_PROG(HAVE_PIP, pip, yes, no)
++    AS_IF([test "x$HAVE_PIP" = "xno"], [sage_spkg_install_pip=yes])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ef8f1e807bc55d7b8321777486fa867a7c135419 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 9 Nov 2021 09:09:04 -0500
+Subject: Trac #29665: set $SAGE_PIP_INSTALL_FLAGS for
+ --enable-system-site-packages.
+
+We need to pass some special flags to "pip install" to make it do the
+right thing in the precence of system-site packages. Here we introduce
+a new autoconf variable, SAGE_PIP_INSTALL_FLAGS, that will be used
+to pass those flags to the build system.
+
+With autoconf aware of the variable, we substitute its value into the
+sage-build-env-config script for use in spkg-install.in.
+---
+ build/bin/sage-build-env-config.in | 1 +
+ configure.ac                       | 9 +++++++++
+ 2 files changed, 10 insertions(+)
+
+diff --git a/build/bin/sage-build-env-config.in b/build/bin/sage-build-env-config.in
+index 92e7dad..ad62e5f 100644
+--- a/build/bin/sage-build-env-config.in
++++ b/build/bin/sage-build-env-config.in
+@@ -53,6 +53,7 @@ export SAGE_PARI_CFG="@SAGE_PARI_CFG@"
+ 
+ export SAGE_GLPK_PREFIX="@SAGE_GLPK_PREFIX@"
+ export SAGE_FREETYPE_PREFIX="@SAGE_FREETYPE_PREFIX@"
++export SAGE_PIP_INSTALL_FLAGS="@SAGE_PIP_INSTALL_FLAGS@"
+ export SAGE_SUITESPARSE_PREFIX="@SAGE_SUITESPARSE_PREFIX@"
+ 
+ export SAGE_CONFIGURE_FFLAS_FFPACK="@SAGE_CONFIGURE_FFLAS_FFPACK@"
+diff --git a/configure.ac b/configure.ac
+index 6fafb83..6ed07ac 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -441,6 +441,14 @@ AC_ARG_ENABLE(
+     [allow the use of python packages from the system (experimental; default: no)]
+   )], [
+   AS_IF([test "x$enable_system_site_packages" = "xyes"], [
++    dnl When installing python SPKGs in the presence of system-site
++    dnl packages, we need to --ignore-installed so that a patched SPKG
++    dnl can be installed in the presence of an unpatched system package
++    dnl that appears (to pip) to be identical. The --no-deps flag is
++    dnl then needed because --ignore-installed will make any installed
++    dnl dependencies invisible to pip, who does not appreciate that.
++    SAGE_PIP_INSTALL_FLAGS="${SAGE_PIP_INSTALL_FLAGS} --no-deps --ignore-installed"
++
+     SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
+ 
+     dnl We want to raise an error if the user asked for "system site
+@@ -453,6 +461,7 @@ AC_ARG_ENABLE(
+     with_system_python3="force"
+   ])
+ ])
++AC_SUBST([SAGE_PIP_INSTALL_FLAGS])
+ AC_SUBST([SAGE_VENV_FLAGS])
+ 
+ SAGE_SPKG_OPTIONS=""
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3cf365fef84e809e74abd2eb388e7a8e9af9d739 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 9 Nov 2021 21:01:58 -0500
+Subject: Trac #29665: pass $SAGE_PIP_INSTALL_FLAGS to sdh_pip_install.
+
+Since sdh_pip_install is usually called from spkg-install.in, the
+variables from sage-build-env-config will be available. Here we pass
+the contents of $SAGE_PIP_INSTALL_FLAGS to sage-pip-install
+unconditionally, and hope that the user ignores this variable unless
+he truly knows what he is doing.
+---
+ build/bin/sage-dist-helpers | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/build/bin/sage-dist-helpers b/build/bin/sage-dist-helpers
+index fe364e5..1032ac3 100644
+--- a/build/bin/sage-dist-helpers
++++ b/build/bin/sage-dist-helpers
+@@ -303,7 +303,11 @@ sdh_store_wheel() {
+ }
+ 
+ sdh_store_and_pip_install_wheel() {
+-    local pip_options=""
++    # The $SAGE_PIP_INSTALL_FLAGS variable is set by sage-build-env-config.
++    # We skip sanity checking its contents since you should either let sage
++    # decide what it contains, or really know what you are doing.
++    local pip_options="${SAGE_PIP_INSTALL_FLAGS}"
++
+     while [ $# -gt 0 ]; do
+         case $1 in
+             -*) pip_options="$pip_options $1"
+-- 
+cgit v1.0-1-gd88e
+
+
+From 50f0438ee857b8f0b7d7ad924e6bba9c5e1bc033 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:10:46 -0500
+Subject: Trac #29665: add Gentoo package information for pexpect.
+
+---
+ build/pkgs/pexpect/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pexpect/distros/gentoo.txt
+
+diff --git a/build/pkgs/pexpect/distros/gentoo.txt b/build/pkgs/pexpect/distros/gentoo.txt
+new file mode 100644
+index 00000000..30c4b60
+--- /dev/null
++++ b/build/pkgs/pexpect/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pexpect
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4d784688d997290b462646fa7f36114a41f3f453 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:11:25 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pexpect.
+
+---
+ build/pkgs/pexpect/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pexpect/spkg-configure.m4
+
+diff --git a/build/pkgs/pexpect/spkg-configure.m4 b/build/pkgs/pexpect/spkg-configure.m4
+new file mode 100644
+index 00000000..6520856
+--- /dev/null
++++ b/build/pkgs/pexpect/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pexpect], [SAGE_PYTHON_PACKAGE_CHECK([pexpect])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6447122dc76a3b7a58340dbed942db66530b5b07 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:12:05 -0500
+Subject: Trac #29665: add Gentoo package information for docutils.
+
+---
+ build/pkgs/docutils/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/docutils/distros/gentoo.txt
+
+diff --git a/build/pkgs/docutils/distros/gentoo.txt b/build/pkgs/docutils/distros/gentoo.txt
+new file mode 100644
+index 00000000..fe4a452
+--- /dev/null
++++ b/build/pkgs/docutils/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/docutils
+-- 
+cgit v1.0-1-gd88e
+
+
+From 709041480a5fc729b0ee7f1a8a3b16d4d65321b5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:12:38 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for docutils.
+
+---
+ build/pkgs/docutils/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/docutils/spkg-configure.m4
+
+diff --git a/build/pkgs/docutils/spkg-configure.m4 b/build/pkgs/docutils/spkg-configure.m4
+new file mode 100644
+index 00000000..3584e45
+--- /dev/null
++++ b/build/pkgs/docutils/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([docutils], [SAGE_PYTHON_PACKAGE_CHECK([docutils])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 782d38b48ab87afccc43fbc071e7b7ed48fb0a20 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:14:37 -0500
+Subject: Trac #29665: add Gentoo package information for nbclient.
+
+---
+ build/pkgs/nbclient/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbclient/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbclient/distros/gentoo.txt b/build/pkgs/nbclient/distros/gentoo.txt
+new file mode 100644
+index 00000000..06ff18d
+--- /dev/null
++++ b/build/pkgs/nbclient/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbclient
+-- 
+cgit v1.0-1-gd88e
+
+
+From 19ce09336532336f69db74381932d51a429dfaca Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:15:11 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for nbclient.
+
+---
+ build/pkgs/nbclient/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbclient/spkg-configure.m4
+
+diff --git a/build/pkgs/nbclient/spkg-configure.m4 b/build/pkgs/nbclient/spkg-configure.m4
+new file mode 100644
+index 00000000..14178b7
+--- /dev/null
++++ b/build/pkgs/nbclient/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbclient], [SAGE_PYTHON_PACKAGE_CHECK([nbclient])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c063b9de42c1780368000a563d0dbe80b6fff169 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:17:36 -0500
+Subject: Trac #29665: add Gentoo package information for argon2_cffi.
+
+---
+ build/pkgs/argon2_cffi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argon2_cffi/distros/gentoo.txt
+
+diff --git a/build/pkgs/argon2_cffi/distros/gentoo.txt b/build/pkgs/argon2_cffi/distros/gentoo.txt
+new file mode 100644
+index 00000000..2f12ca8
+--- /dev/null
++++ b/build/pkgs/argon2_cffi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/argon2-cffi
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0b4d5699dd51ea52550fba7db9e1cbb8bbac1892 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:18:35 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for argon2_cffi.
+
+---
+ build/pkgs/argon2_cffi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argon2_cffi/spkg-configure.m4
+
+diff --git a/build/pkgs/argon2_cffi/spkg-configure.m4 b/build/pkgs/argon2_cffi/spkg-configure.m4
+new file mode 100644
+index 00000000..03ebc63
+--- /dev/null
++++ b/build/pkgs/argon2_cffi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([argon2_cffi], [SAGE_PYTHON_PACKAGE_CHECK([argon2_cffi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2b4119558a6e0b1aa512848539a237676b035c83 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:30:48 -0500
+Subject: Trac #29665: fix package name in dateutil's install-requires.txt.
+
+---
+ build/pkgs/dateutil/install-requires.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/build/pkgs/dateutil/install-requires.txt b/build/pkgs/dateutil/install-requires.txt
+index 0ae93da..face537 100644
+--- a/build/pkgs/dateutil/install-requires.txt
++++ b/build/pkgs/dateutil/install-requires.txt
+@@ -1 +1 @@
+-dateutil >=2.8.1
++python-dateutil >=2.8.1
+-- 
+cgit v1.0-1-gd88e
+
+
+From df371b7c4d20a3353d43940306ad22e11aba29da Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:31:41 -0500
+Subject: Trac #29665: add Gentoo package information for dateutil.
+
+---
+ build/pkgs/dateutil/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/dateutil/distros/gentoo.txt
+
+diff --git a/build/pkgs/dateutil/distros/gentoo.txt b/build/pkgs/dateutil/distros/gentoo.txt
+new file mode 100644
+index 00000000..e129df7
+--- /dev/null
++++ b/build/pkgs/dateutil/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/python-dateutil
+-- 
+cgit v1.0-1-gd88e
+
+
+From 577695dfdf661ee26c0ffd767bdbf479d95f7fb4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:32:21 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for dateutil.
+
+---
+ build/pkgs/dateutil/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/dateutil/spkg-configure.m4
+
+diff --git a/build/pkgs/dateutil/spkg-configure.m4 b/build/pkgs/dateutil/spkg-configure.m4
+new file mode 100644
+index 00000000..fdcd127
+--- /dev/null
++++ b/build/pkgs/dateutil/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([dateutil], [SAGE_PYTHON_PACKAGE_CHECK([dateutil])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1984651caac624ec4bb58814ca1d57fe66f9881a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:33:51 -0500
+Subject: Trac #29665: add Gentoo package information for setuptools_scm.
+
+---
+ build/pkgs/setuptools_scm/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/setuptools_scm/distros/gentoo.txt
+
+diff --git a/build/pkgs/setuptools_scm/distros/gentoo.txt b/build/pkgs/setuptools_scm/distros/gentoo.txt
+new file mode 100644
+index 00000000..8989597
+--- /dev/null
++++ b/build/pkgs/setuptools_scm/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/setuptools_scm
+-- 
+cgit v1.0-1-gd88e
+
+
+From ebf7c854ed966e7353759be485c4f5a57b9a10fa Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:34:49 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for setuptools_scm.
+
+---
+ build/pkgs/setuptools_scm/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/setuptools_scm/spkg-configure.m4
+
+diff --git a/build/pkgs/setuptools_scm/spkg-configure.m4 b/build/pkgs/setuptools_scm/spkg-configure.m4
+new file mode 100644
+index 00000000..437148c
+--- /dev/null
++++ b/build/pkgs/setuptools_scm/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([setuptools_scm], [
++  SAGE_PYTHON_PACKAGE_CHECK([setuptools_scm])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0dee0d0c28f31b1f619e44c710a3c9e22d2b2544 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:36:33 -0500
+Subject: Trac #29665: add Gentoo package information for nbconvert.
+
+---
+ build/pkgs/nbconvert/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbconvert/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbconvert/distros/gentoo.txt b/build/pkgs/nbconvert/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c45a10
+--- /dev/null
++++ b/build/pkgs/nbconvert/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbconvert
+-- 
+cgit v1.0-1-gd88e
+
+
+From 473789eb11b1838bc32dc8a63509ee199afc8912 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:37:37 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for nbconvert.
+
+---
+ build/pkgs/nbconvert/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbconvert/spkg-configure.m4
+
+diff --git a/build/pkgs/nbconvert/spkg-configure.m4 b/build/pkgs/nbconvert/spkg-configure.m4
+new file mode 100644
+index 00000000..9b5dee3
+--- /dev/null
++++ b/build/pkgs/nbconvert/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbconvert], [SAGE_PYTHON_PACKAGE_CHECK([nbconvert])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f0703b594e57c980d605aa9bc8316c45a7858b3b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:41:51 -0500
+Subject: Trac #29665: add Gentoo package information for jupyter_core.
+
+---
+ build/pkgs/jupyter_core/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyter_core/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyter_core/distros/gentoo.txt b/build/pkgs/jupyter_core/distros/gentoo.txt
+new file mode 100644
+index 00000000..f168c5a
+--- /dev/null
++++ b/build/pkgs/jupyter_core/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyter_core
+-- 
+cgit v1.0-1-gd88e
+
+
+From 061a307cc4a6680d8500fde834975064e59540d5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:42:48 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jupyter_core.
+
+---
+ build/pkgs/jupyter_core/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyter_core/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyter_core/spkg-configure.m4 b/build/pkgs/jupyter_core/spkg-configure.m4
+new file mode 100644
+index 00000000..67df9c3
+--- /dev/null
++++ b/build/pkgs/jupyter_core/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyter_core], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyter_core])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b85abe964ce0b98b5842efe9cbad9bdb1c89202f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:47:08 -0500
+Subject: Trac #29665: add Gentoo package information for jupyter_client.
+
+---
+ build/pkgs/jupyter_client/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyter_client/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyter_client/distros/gentoo.txt b/build/pkgs/jupyter_client/distros/gentoo.txt
+new file mode 100644
+index 00000000..4f1de88
+--- /dev/null
++++ b/build/pkgs/jupyter_client/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyter_client
+-- 
+cgit v1.0-1-gd88e
+
+
+From 86323ff1e0b2507933df6bc2a96c9175957640c5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:48:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jupyter_client.
+
+---
+ build/pkgs/jupyter_client/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyter_client/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyter_client/spkg-configure.m4 b/build/pkgs/jupyter_client/spkg-configure.m4
+new file mode 100644
+index 00000000..fbd3498
+--- /dev/null
++++ b/build/pkgs/jupyter_client/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyter_client], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyter_client])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a8475e27dd30d752d05ab6fea6579e8623501d82 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:48:58 -0500
+Subject: Trac #29665: add Gentoo package information for snowballstemmer.
+
+---
+ build/pkgs/snowballstemmer/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/snowballstemmer/distros/gentoo.txt
+
+diff --git a/build/pkgs/snowballstemmer/distros/gentoo.txt b/build/pkgs/snowballstemmer/distros/gentoo.txt
+new file mode 100644
+index 00000000..63fd851
+--- /dev/null
++++ b/build/pkgs/snowballstemmer/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/snowballstemmer
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0833c9b781062b4ed86d619e050a6f5d60e36080 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:49:38 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for snowballstemmer.
+
+---
+ build/pkgs/snowballstemmer/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/snowballstemmer/spkg-configure.m4
+
+diff --git a/build/pkgs/snowballstemmer/spkg-configure.m4 b/build/pkgs/snowballstemmer/spkg-configure.m4
+new file mode 100644
+index 00000000..6aa0882
+--- /dev/null
++++ b/build/pkgs/snowballstemmer/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([snowballstemmer], [
++  SAGE_PYTHON_PACKAGE_CHECK([snowballstemmer])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 50a1cf2a2bcd7eeec64cbc3f70e3e9fbe5d850fe Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:50:47 -0500
+Subject: Trac #29665: add Gentoo package information for tornado.
+
+---
+ build/pkgs/tornado/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tornado/distros/gentoo.txt
+
+diff --git a/build/pkgs/tornado/distros/gentoo.txt b/build/pkgs/tornado/distros/gentoo.txt
+new file mode 100644
+index 00000000..6ae4b9f
+--- /dev/null
++++ b/build/pkgs/tornado/distros/gentoo.txt
+@@ -0,0 +1 @@
++www-servers/tornado
+-- 
+cgit v1.0-1-gd88e
+
+
+From 118f4da6e03476c726363e8e22ecda32f13bfc33 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:51:26 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for tornado.
+
+---
+ build/pkgs/tornado/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tornado/spkg-configure.m4
+
+diff --git a/build/pkgs/tornado/spkg-configure.m4 b/build/pkgs/tornado/spkg-configure.m4
+new file mode 100644
+index 00000000..1ee5bc9
+--- /dev/null
++++ b/build/pkgs/tornado/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tornado], [SAGE_PYTHON_PACKAGE_CHECK([tornado])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3850701747a6c8ef60840bdfdb589b28d4cd2b9a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:52:21 -0500
+Subject: Trac #29665: add Gentoo package information for jsonschema.
+
+---
+ build/pkgs/jsonschema/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jsonschema/distros/gentoo.txt
+
+diff --git a/build/pkgs/jsonschema/distros/gentoo.txt b/build/pkgs/jsonschema/distros/gentoo.txt
+new file mode 100644
+index 00000000..d708e4c
+--- /dev/null
++++ b/build/pkgs/jsonschema/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jsonschema
+-- 
+cgit v1.0-1-gd88e
+
+
+From 76e3917c8af781af00f642cfada7a79594429e30 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:54:03 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jsonschema.
+
+---
+ build/pkgs/jsonschema/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jsonschema/spkg-configure.m4
+
+diff --git a/build/pkgs/jsonschema/spkg-configure.m4 b/build/pkgs/jsonschema/spkg-configure.m4
+new file mode 100644
+index 00000000..b9e5e21
+--- /dev/null
++++ b/build/pkgs/jsonschema/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jsonschema], [SAGE_PYTHON_PACKAGE_CHECK([jsonschema])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From fd4a16c11669b6dd73ac6325bca820e76db00402 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:55:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ widgetsnbextension.
+
+---
+ build/pkgs/widgetsnbextension/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/widgetsnbextension/spkg-configure.m4
+
+diff --git a/build/pkgs/widgetsnbextension/spkg-configure.m4 b/build/pkgs/widgetsnbextension/spkg-configure.m4
+new file mode 100644
+index 00000000..bf82daf
+--- /dev/null
++++ b/build/pkgs/widgetsnbextension/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([widgetsnbextension], [
++  SAGE_PYTHON_PACKAGE_CHECK([widgetsnbextension])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8079a9f384e3c8480e157dd98c3db2f43c987f4e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:57:20 -0500
+Subject: Trac #29665: add Gentoo package information for importlib_resources.
+
+---
+ build/pkgs/importlib_resources/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/importlib_resources/distros/gentoo.txt
+
+diff --git a/build/pkgs/importlib_resources/distros/gentoo.txt b/build/pkgs/importlib_resources/distros/gentoo.txt
+new file mode 100644
+index 00000000..d5e1f2c
+--- /dev/null
++++ b/build/pkgs/importlib_resources/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/importlib_resources
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2c430d7c52f02779a6c41b98ac2f4edd8b6759c3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:58:00 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ importlib_resources.
+
+---
+ build/pkgs/importlib_resources/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/importlib_resources/spkg-configure.m4
+
+diff --git a/build/pkgs/importlib_resources/spkg-configure.m4 b/build/pkgs/importlib_resources/spkg-configure.m4
+new file mode 100644
+index 00000000..50df55b
+--- /dev/null
++++ b/build/pkgs/importlib_resources/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([importlib_resources], [
++  SAGE_PYTHON_PACKAGE_CHECK([importlib_resources])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 00d13d7bf2e50aae2ccef3b2b30293c70a922af2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:58:38 -0500
+Subject: Trac #29665: add Gentoo package information for kiwisolver.
+
+---
+ build/pkgs/kiwisolver/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/kiwisolver/distros/gentoo.txt
+
+diff --git a/build/pkgs/kiwisolver/distros/gentoo.txt b/build/pkgs/kiwisolver/distros/gentoo.txt
+new file mode 100644
+index 00000000..7b30c95
+--- /dev/null
++++ b/build/pkgs/kiwisolver/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/kiwisolver
+-- 
+cgit v1.0-1-gd88e
+
+
+From 72b7907ef7ea9fa4ff6948ea34cfe2f693ee6c31 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:59:09 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for kiwisolver.
+
+---
+ build/pkgs/kiwisolver/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/kiwisolver/spkg-configure.m4
+
+diff --git a/build/pkgs/kiwisolver/spkg-configure.m4 b/build/pkgs/kiwisolver/spkg-configure.m4
+new file mode 100644
+index 00000000..4e7ac97
+--- /dev/null
++++ b/build/pkgs/kiwisolver/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([kiwisolver], [SAGE_PYTHON_PACKAGE_CHECK([kiwisolver])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 479351279e4e0ea7e2d146434f0daba038765cfd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:00:04 -0500
+Subject: Trac #29665: add Gentoo package information for notebook.
+
+---
+ build/pkgs/notebook/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/notebook/distros/gentoo.txt
+
+diff --git a/build/pkgs/notebook/distros/gentoo.txt b/build/pkgs/notebook/distros/gentoo.txt
+new file mode 100644
+index 00000000..6475d72
+--- /dev/null
++++ b/build/pkgs/notebook/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/notebook
+-- 
+cgit v1.0-1-gd88e
+
+
+From f4d9242ea654977f8ad7865c82eec593e11a36bc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:01:42 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for notebook.
+
+---
+ build/pkgs/notebook/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/notebook/spkg-configure.m4
+
+diff --git a/build/pkgs/notebook/spkg-configure.m4 b/build/pkgs/notebook/spkg-configure.m4
+new file mode 100644
+index 00000000..a17ba95
+--- /dev/null
++++ b/build/pkgs/notebook/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([notebook], [SAGE_PYTHON_PACKAGE_CHECK([notebook])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9837070c7f8e9a71283b84d49d4fd2c94b78a464 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:02:38 -0500
+Subject: Trac #29665: add Gentoo package information for matplotlib_inline.
+
+---
+ build/pkgs/matplotlib_inline/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/matplotlib_inline/distros/gentoo.txt
+
+diff --git a/build/pkgs/matplotlib_inline/distros/gentoo.txt b/build/pkgs/matplotlib_inline/distros/gentoo.txt
+new file mode 100644
+index 00000000..6a5859c
+--- /dev/null
++++ b/build/pkgs/matplotlib_inline/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/matplotlib-inline
+-- 
+cgit v1.0-1-gd88e
+
+
+From 750be73b25b92b4875e47d044360ac0e1116ec3e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:03:28 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for matplotlib_inline.
+
+---
+ build/pkgs/matplotlib_inline/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/matplotlib_inline/spkg-configure.m4
+
+diff --git a/build/pkgs/matplotlib_inline/spkg-configure.m4 b/build/pkgs/matplotlib_inline/spkg-configure.m4
+new file mode 100644
+index 00000000..e59658f
+--- /dev/null
++++ b/build/pkgs/matplotlib_inline/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([matplotlib_inline], [
++  SAGE_PYTHON_PACKAGE_CHECK([matplotlib_inline])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 273505f49698dcd2ab30c2756b07113c9b7e7791 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:04:10 -0500
+Subject: Trac #29665: add Gentoo package information for ipykernel.
+
+---
+ build/pkgs/ipykernel/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipykernel/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipykernel/distros/gentoo.txt b/build/pkgs/ipykernel/distros/gentoo.txt
+new file mode 100644
+index 00000000..88aab61
+--- /dev/null
++++ b/build/pkgs/ipykernel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipykernel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 629ad36c9e4ae0cdff4a013289b4f2911442445e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:04:46 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for ipykernel.
+
+---
+ build/pkgs/ipykernel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipykernel/spkg-configure.m4
+
+diff --git a/build/pkgs/ipykernel/spkg-configure.m4 b/build/pkgs/ipykernel/spkg-configure.m4
+new file mode 100644
+index 00000000..94ecc2d
+--- /dev/null
++++ b/build/pkgs/ipykernel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipykernel], [SAGE_PYTHON_PACKAGE_CHECK([ipykernel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b8d709edb6a24fd5868ee2818b56e78257b2eafa Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:05:26 -0500
+Subject: Trac #29665: add Gentoo package information for prompt_toolkit.
+
+---
+ build/pkgs/prompt_toolkit/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/prompt_toolkit/distros/gentoo.txt
+
+diff --git a/build/pkgs/prompt_toolkit/distros/gentoo.txt b/build/pkgs/prompt_toolkit/distros/gentoo.txt
+new file mode 100644
+index 00000000..6902484
+--- /dev/null
++++ b/build/pkgs/prompt_toolkit/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/prompt_toolkit
+-- 
+cgit v1.0-1-gd88e
+
+
+From 16c0b5e767ae4dac4440510b7253e5c8642b7d2c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:10:39 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for prompt_toolkit.
+
+---
+ build/pkgs/prompt_toolkit/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/prompt_toolkit/spkg-configure.m4
+
+diff --git a/build/pkgs/prompt_toolkit/spkg-configure.m4 b/build/pkgs/prompt_toolkit/spkg-configure.m4
+new file mode 100644
+index 00000000..fd8c1a6
+--- /dev/null
++++ b/build/pkgs/prompt_toolkit/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([prompt_toolkit], [
++  SAGE_PYTHON_PACKAGE_CHECK([prompt_toolkit])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0cd9283e8bb6c8ae413fc8f715c021f7ec3ca2c8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:12:10 -0500
+Subject: Trac #29665: add Gentoo package information for charset_normalizer.
+
+---
+ build/pkgs/charset_normalizer/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/charset_normalizer/distros/gentoo.txt
+
+diff --git a/build/pkgs/charset_normalizer/distros/gentoo.txt b/build/pkgs/charset_normalizer/distros/gentoo.txt
+new file mode 100644
+index 00000000..eefeb89
+--- /dev/null
++++ b/build/pkgs/charset_normalizer/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/charset_normalizer
+-- 
+cgit v1.0-1-gd88e
+
+
+From a04b01a9ab59097d189edcc5ddcb461faede83b2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:12:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ charset_normalizer.
+
+---
+ build/pkgs/charset_normalizer/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/charset_normalizer/spkg-configure.m4
+
+diff --git a/build/pkgs/charset_normalizer/spkg-configure.m4 b/build/pkgs/charset_normalizer/spkg-configure.m4
+new file mode 100644
+index 00000000..18b18cf
+--- /dev/null
++++ b/build/pkgs/charset_normalizer/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([charset_normalizer], [
++  SAGE_PYTHON_PACKAGE_CHECK([charset_normalizer])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d2ea08138711c53046f977b586f33b09b176b2e3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:13:37 -0500
+Subject: Trac #29665: add Gentoo package information for prometheus_client.
+
+---
+ build/pkgs/prometheus_client/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/prometheus_client/distros/gentoo.txt
+
+diff --git a/build/pkgs/prometheus_client/distros/gentoo.txt b/build/pkgs/prometheus_client/distros/gentoo.txt
+new file mode 100644
+index 00000000..aa2889c
+--- /dev/null
++++ b/build/pkgs/prometheus_client/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/prometheus_client
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b0393200e9edd3e26b8a55ba67e5710e7403fcb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:15:09 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for prometheus_client.
+
+---
+ build/pkgs/prometheus_client/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/prometheus_client/spkg-configure.m4
+
+diff --git a/build/pkgs/prometheus_client/spkg-configure.m4 b/build/pkgs/prometheus_client/spkg-configure.m4
+new file mode 100644
+index 00000000..b494588
+--- /dev/null
++++ b/build/pkgs/prometheus_client/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([prometheus_client], [
++  SAGE_PYTHON_PACKAGE_CHECK([prometheus_client])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From cdcd85284f43ca4ad18353ec3527b2901e57b788 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:17:23 -0500
+Subject: Trac #29665: add Gentoo package information for pybind11.
+
+---
+ build/pkgs/pybind11/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pybind11/distros/gentoo.txt
+
+diff --git a/build/pkgs/pybind11/distros/gentoo.txt b/build/pkgs/pybind11/distros/gentoo.txt
+new file mode 100644
+index 00000000..0c500b3
+--- /dev/null
++++ b/build/pkgs/pybind11/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pybind11
+-- 
+cgit v1.0-1-gd88e
+
+
+From efdd1eb64c4799fe3cdf2221824182941b3fda2d Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:17:51 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pybind11.
+
+---
+ build/pkgs/pybind11/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pybind11/spkg-configure.m4
+
+diff --git a/build/pkgs/pybind11/spkg-configure.m4 b/build/pkgs/pybind11/spkg-configure.m4
+new file mode 100644
+index 00000000..cce1cf5
+--- /dev/null
++++ b/build/pkgs/pybind11/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pybind11], [SAGE_PYTHON_PACKAGE_CHECK([pybind11])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b2128f33b68ea33927284116ea598dd186902400 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:19:23 -0500
+Subject: Trac #29665: add Gentoo package information for pkgconfig.
+
+---
+ build/pkgs/pkgconfig/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pkgconfig/distros/gentoo.txt
+
+diff --git a/build/pkgs/pkgconfig/distros/gentoo.txt b/build/pkgs/pkgconfig/distros/gentoo.txt
+new file mode 100644
+index 00000000..32e8618
+--- /dev/null
++++ b/build/pkgs/pkgconfig/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pkgconfig
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b373b49e06aadeb36dc57e500da9a322460e658 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:19:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pkgconfig.
+
+---
+ build/pkgs/pkgconfig/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pkgconfig/spkg-configure.m4
+
+diff --git a/build/pkgs/pkgconfig/spkg-configure.m4 b/build/pkgs/pkgconfig/spkg-configure.m4
+new file mode 100644
+index 00000000..6708293
+--- /dev/null
++++ b/build/pkgs/pkgconfig/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pkgconfig], [SAGE_PYTHON_PACKAGE_CHECK([pkgconfig])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ce578729eb0d14baab365351ba9a9ffffb7b79f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:21:10 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_serializinghtml.
+
+---
+ build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt b/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+new file mode 100644
+index 00000000..38bca8f
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-serializinghtml
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb0f42c32bbce0e4488678312f5e2d88c6f42c9b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:21:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_serializinghtml.
+
+---
+ build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4 b/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+new file mode 100644
+index 00000000..be8e625
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_serializinghtml], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_serializinghtml])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e47dcf985e40475de85c9436a85537751318bc3d Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:22:54 -0500
+Subject: Trac #29665: add Gentoo package information for sphinxcontrib_jsmath.
+
+---
+ build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt b/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+new file mode 100644
+index 00000000..041a471
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-jsmath
+-- 
+cgit v1.0-1-gd88e
+
+
+From 72cff6fd35f93de4fa855bc870569dd733ff5c24 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:23:49 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_jsmath.
+
+---
+ build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4 b/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+new file mode 100644
+index 00000000..e46bde2
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_jsmath], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_jsmath])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a36395d70f759449cd63c1b0990fbdcb4cb25ca0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:24:26 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_devhelp.
+
+---
+ build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..9b5c899
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-devhelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9953a5dd1646ed0ad51d2e3935cf609bc9e7fd1c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:25:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_devhelp.
+
+---
+ build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+new file mode 100644
+index 00000000..8728136
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_devhelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_devhelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b199d5363aad93f3cb23f7904c9553a28b06348f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:25:53 -0500
+Subject: Trac #29665: add Gentoo package information for sphinxcontrib_qthelp.
+
+---
+ build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..7210099
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-qthelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 94ac8806739f3938e73f5857328e91e0d42e98d2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:26:28 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_qthelp.
+
+---
+ build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+new file mode 100644
+index 00000000..81ea5e1
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_qthelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_qthelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From beedc154aa405e8a58aee8889f510db07adc89a7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:26:54 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_applehelp.
+
+---
+ build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..66ac8da
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-applehelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 07d47c3673d6b35423b71f621cb400989c0101c2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:27:19 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_applehelp.
+
+---
+ build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+new file mode 100644
+index 00000000..e834aed
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_applehelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_applehelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 333a66546c5d421735c49dbafd7370a827f22781 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:27:46 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_htmlhelp.
+
+---
+ build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..e080bac
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-htmlhelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From bfaeb3962254439b63f1f2e0e883de462c7831be Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:29:18 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_htmlhelp.
+
+---
+ build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+new file mode 100644
+index 00000000..c77b003
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_htmlhelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_htmlhelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 782cde13da06e8b85806cb7cbc8aceee0364e639 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:30:23 -0500
+Subject: Trac #29665: add Gentoo package information for jupyterlab_pygments.
+
+---
+ build/pkgs/jupyterlab_pygments/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyterlab_pygments/distros/gentoo.txt b/build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+new file mode 100644
+index 00000000..c57b4f1
+--- /dev/null
++++ b/build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyterlab_pygments
+-- 
+cgit v1.0-1-gd88e
+
+
+From 39f974cfa4a8c6e5dd897f152f83ec82f40ee9f7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:31:13 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ jupyterlab_pygments.
+
+---
+ build/pkgs/jupyterlab_pygments/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyterlab_pygments/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyterlab_pygments/spkg-configure.m4 b/build/pkgs/jupyterlab_pygments/spkg-configure.m4
+new file mode 100644
+index 00000000..e46e21f
+--- /dev/null
++++ b/build/pkgs/jupyterlab_pygments/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyterlab_pygments], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyterlab_pygments])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From db704620700fd36cec3bf6125938f3ee00a9eb5e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:29:15 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for ply.
+
+---
+ build/pkgs/ply/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ply/spkg-configure.m4
+
+diff --git a/build/pkgs/ply/spkg-configure.m4 b/build/pkgs/ply/spkg-configure.m4
+new file mode 100644
+index 00000000..ffb0030
+--- /dev/null
++++ b/build/pkgs/ply/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ply], [SAGE_PYTHON_PACKAGE_CHECK([ply])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6aac31dabcdfdef228d7780398a3fda1a4cc566f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:29:51 -0500
+Subject: Trac #29665: add Gentoo package information for ply.
+
+---
+ build/pkgs/ply/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ply/distros/gentoo.txt
+
+diff --git a/build/pkgs/ply/distros/gentoo.txt b/build/pkgs/ply/distros/gentoo.txt
+new file mode 100644
+index 00000000..c8b1630
+--- /dev/null
++++ b/build/pkgs/ply/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ply
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb8d3372936ec37470d69687a0f91592129460ae Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:30:33 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for gast.
+
+---
+ build/pkgs/gast/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/gast/spkg-configure.m4
+
+diff --git a/build/pkgs/gast/spkg-configure.m4 b/build/pkgs/gast/spkg-configure.m4
+new file mode 100644
+index 00000000..26ec59f
+--- /dev/null
++++ b/build/pkgs/gast/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([gast], [SAGE_PYTHON_PACKAGE_CHECK([gast])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1cdc4046a88f1c2b4e5c162f66c6db6090b24194 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:31:15 -0500
+Subject: Trac #29665: add Gentoo package information for gast.
+
+---
+ build/pkgs/gast/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/gast/distros/gentoo.txt
+
+diff --git a/build/pkgs/gast/distros/gentoo.txt b/build/pkgs/gast/distros/gentoo.txt
+new file mode 100644
+index 00000000..3be5e7e
+--- /dev/null
++++ b/build/pkgs/gast/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/gast
+-- 
+cgit v1.0-1-gd88e
+
+
+From 96068b8a3742b65d619190e1d9fa5db399e6b4f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:32:20 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pythran.
+
+---
+ build/pkgs/pythran/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pythran/spkg-configure.m4
+
+diff --git a/build/pkgs/pythran/spkg-configure.m4 b/build/pkgs/pythran/spkg-configure.m4
+new file mode 100644
+index 00000000..592e95b
+--- /dev/null
++++ b/build/pkgs/pythran/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pythran], [SAGE_PYTHON_PACKAGE_CHECK([pythran])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1fa0fad3ae8f7e559c6fc315c6773a7d8aac0bfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:32:55 -0500
+Subject: Trac #29665: add Gentoo package information for pythran.
+
+---
+ build/pkgs/pythran/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pythran/distros/gentoo.txt
+
+diff --git a/build/pkgs/pythran/distros/gentoo.txt b/build/pkgs/pythran/distros/gentoo.txt
+new file mode 100644
+index 00000000..1bb7cdc
+--- /dev/null
++++ b/build/pkgs/pythran/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pythran
+-- 
+cgit v1.0-1-gd88e
+
+
+From d26370e5b8c88e76abfb7c27e3defb71c9e9f711 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:33:50 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for beniget.
+
+---
+ build/pkgs/beniget/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/beniget/spkg-configure.m4
+
+diff --git a/build/pkgs/beniget/spkg-configure.m4 b/build/pkgs/beniget/spkg-configure.m4
+new file mode 100644
+index 00000000..8ae6101
+--- /dev/null
++++ b/build/pkgs/beniget/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([beniget], [SAGE_PYTHON_PACKAGE_CHECK([beniget])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From eeeb296ed9b9694a865534103fd58e62a151ef5e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:34:22 -0500
+Subject: Trac #29665: add Gentoo package information for beniget.
+
+---
+ build/pkgs/beniget/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/beniget/distros/gentoo.txt
+
+diff --git a/build/pkgs/beniget/distros/gentoo.txt b/build/pkgs/beniget/distros/gentoo.txt
+new file mode 100644
+index 00000000..1a5972c
+--- /dev/null
++++ b/build/pkgs/beniget/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/beniget
+-- 
+cgit v1.0-1-gd88e
+
+
+From 078b2ff272d0eeff5cce40ad7eb176d9ddd7bdff Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:35:37 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for alabaster.
+
+---
+ build/pkgs/alabaster/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/alabaster/spkg-configure.m4
+
+diff --git a/build/pkgs/alabaster/spkg-configure.m4 b/build/pkgs/alabaster/spkg-configure.m4
+new file mode 100644
+index 00000000..4eca6e0
+--- /dev/null
++++ b/build/pkgs/alabaster/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([alabaster], [SAGE_PYTHON_PACKAGE_CHECK([alabaster])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7dc264353e5f64110431ff28c1b8b7e89699e9bd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:36:06 -0500
+Subject: Trac #29665: add Gentoo package information for alabaster.
+
+---
+ build/pkgs/alabaster/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/alabaster/distros/gentoo.txt
+
+diff --git a/build/pkgs/alabaster/distros/gentoo.txt b/build/pkgs/alabaster/distros/gentoo.txt
+new file mode 100644
+index 00000000..cffece6
+--- /dev/null
++++ b/build/pkgs/alabaster/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/alabaster
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8011a5e675e7e61a77ce34a299ee961a9f44253f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:43:59 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ importlib_metadata.
+
+---
+ build/pkgs/importlib_metadata/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/importlib_metadata/spkg-configure.m4
+
+diff --git a/build/pkgs/importlib_metadata/spkg-configure.m4 b/build/pkgs/importlib_metadata/spkg-configure.m4
+new file mode 100644
+index 00000000..0554e52
+--- /dev/null
++++ b/build/pkgs/importlib_metadata/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([importlib_metadata], [
++  SAGE_PYTHON_PACKAGE_CHECK([importlib_metadata])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 928ca0019e3ec6c4541a16b28bcc6710df6d010b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:44:28 -0500
+Subject: Trac #29665: add Gentoo package information for importlib_metadata.
+
+---
+ build/pkgs/importlib_metadata/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/importlib_metadata/distros/gentoo.txt
+
+diff --git a/build/pkgs/importlib_metadata/distros/gentoo.txt b/build/pkgs/importlib_metadata/distros/gentoo.txt
+new file mode 100644
+index 00000000..4f92786
+--- /dev/null
++++ b/build/pkgs/importlib_metadata/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/importlib_metadata
+-- 
+cgit v1.0-1-gd88e
+
+
+From 135f184f7498a2046065e669723e68efe2d65cee Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 21:16:58 -0500
+Subject: Trac #29665: fix sage.misc.package doctest with system alabaster.
+
+When alabaster from the system is used, these tests won't be able to
+find its SPKG installed. Add some ellipses, and switch one test to
+look for sage_conf instead.
+---
+ src/sage/misc/package.py | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/sage/misc/package.py b/src/sage/misc/package.py
+index 84f3d50..c7ad206 100644
+--- a/src/sage/misc/package.py
++++ b/src/sage/misc/package.py
+@@ -386,9 +386,9 @@ def installed_packages(exclude_pip=True):
+     EXAMPLES::
+ 
+         sage: sorted(installed_packages().keys())  # optional - build
+-        [...'alabaster', ...'sage_conf', ...]
+-        sage: installed_packages()['alabaster']  # optional - build, random
+-        '0.7.12'
++        [...'sage_conf', ...]
++        sage: installed_packages()['sage_conf']  # optional - build, random
++        '9.5'
+ 
+     .. SEEALSO::
+ 
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch b/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
new file mode 100644
index 000000000000..7ef3826aa4d2
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
@@ -0,0 +1,27 @@
+diff --git a/src/bin/sage-runtests b/src/bin/sage-runtests
+index 589dc8cd37..6bb8bf99a4 100755
+--- a/src/bin/sage-runtests
++++ b/src/bin/sage-runtests
+@@ -154,21 +154,4 @@ if __name__ == "__main__":
+     DC = DocTestController(args, args.filenames)
+     err = DC.run()
+ 
+-    try:
+-        exit_code_pytest = 0
+-        import pytest
+-        pytest_options = ["--import-mode", "importlib"]
+-        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.")
+-
+-    if err == 0:
+-        sys.exit(exit_code_pytest)
+-    else:
+-        sys.exit(err)
++    sys.exit(err)
diff --git a/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch b/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
new file mode 100644
index 000000000000..093e3d56eb33
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
@@ -0,0 +1,42 @@
+More site packages not included in trac 29665
+
+diff --git a/build/pkgs/gmpy2/spkg-configure.m4 b/build/pkgs/gmpy2/spkg-configure.m4
+new file mode 100644
+index 0000000000..2d0390f7db
+--- /dev/null
++++ b/build/pkgs/gmpy2/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([gmpy2], [SAGE_PYTHON_PACKAGE_CHECK([gmpy2])])
+diff --git a/build/pkgs/sphinx/spkg-configure.m4 b/build/pkgs/sphinx/spkg-configure.m4
+new file mode 100644
+index 0000000000..e149fbb2cf
+--- /dev/null
++++ b/build/pkgs/sphinx/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([sphinx], [SAGE_PYTHON_PACKAGE_CHECK([sphinx])])
+diff --git a/build/pkgs/typing_extensions/spkg-configure.m4 b/build/pkgs/typing_extensions/spkg-configure.m4
+new file mode 100644
+index 0000000000..d475fd8257
+--- /dev/null
++++ b/build/pkgs/typing_extensions/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([typing_extensions], [SAGE_PYTHON_PACKAGE_CHECK([typing_extensions])])
+-- 
+diff --git a/build/pkgs/gmpy2/install-requires.txt b/build/pkgs/gmpy2/install-requires.txt
+index 51d24518ef..c25feff557 100644
+--- a/build/pkgs/gmpy2/install-requires.txt
++++ b/build/pkgs/gmpy2/install-requires.txt
+@@ -1,3 +1 @@
+-# We would like to write gmpy2 >=2.1.0b5, but pipenv does not accept prereleases in version ranges
+-# https://github.com/pypa/pipenv/issues/1760
+-gmpy2 ==2.1.0rc1
++gmpy2 >=2.1
+diff --git a/build/pkgs/ptyprocess/install-requires.txt b/build/pkgs/ptyprocess/install-requires.txt
+index de89260872..7c336f636c 100644
+--- a/build/pkgs/ptyprocess/install-requires.txt
++++ b/build/pkgs/ptyprocess/install-requires.txt
+@@ -1,3 +1,3 @@
+-ptyprocess ==0.5.1
++ptyprocess
+ # https://trac.sagemath.org/ticket/31280#comment:42 and following
+ # sagelib is not compatible with ptyprocess 0.5.2, 0.6, and 0.7
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 33b40acbabeb..a32c5d18f378 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -22,11 +22,13 @@ distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
 checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
 python_version=3
 
-build_options="debug system_python3"
+build_options="debug system_python3 system_site_packages"
 desc_option_debug="Build with debug symbols"
 desc_option_system_python="Build using system python 3"
-build_options_default="system_python3"
+desc_option_system_python="Build using system python site-packages"
+build_options_default="system_python3 system_site_packages"
 configure_args+=" $(vopt_with system_python3)"
+configure_args+=" $(vopt_enable system_site_packages)"
 
 # path where sage will be installed
 _SAGE_ROOT=/usr/lib/sage-${version}
@@ -163,6 +165,8 @@ do_check() {
 	fi
 	if [ "$XBPS_CHECK_PKGS" = full ]; then
 		_test_args="--long $_test_args"
+	else
+		_test_args="--warn-long 5.0 $_test_args"
 	fi
 	# since make check will build the docs, run test like this instead
 	./sage -tp ${XBPS_MAKEJOBS} ${_test_args}
@@ -182,7 +186,7 @@ makedepends+=" automake gettext gettext-devel"
 # other host dependencies
 makedepends+=" cmake curl git ninja pandoc patch pkg-config python3 tox"
 
-# already in void
+# standard dependencies
 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
@@ -202,7 +206,49 @@ makedepends+="
  brial-devel cliquer-devel gfan libbraiding-devel libhomfly-devel
  lrcalc-devel nauty-devel palp tachyon
  maxima-ecl primesieve-devel primecount-devel
+ ffmpeg ImageMagick
 "
 
 # TODO: optional
 # 4ti2 coxeter3 libsemigroups lrslib pdf2svg perl_mongodb polymake
+
+# TODO: standard
+# cvxopt importlib_resources
+
+# python packages for trac-29665
+_sage_python3_modules="
+ python3-Babel python3-Jinja2 python3-MarkupSafe python3-Pillow
+ python3-Pygments python3-Sphinx python3-alabaster python3-argcomplete
+ python3-argon2 python3-attrs python3-backcall python3-beniget
+ python3-bleach python3-certifi python3-cffi python3-charset-normalizer
+ python3-cycler python3-dateutil python3-decorator python3-defusedxml
+ python3-docutils python3-entrypoints python3-flit_core python3-gast
+ python3-gmpy2 python3-html5lib python3-idna python3-imagesize
+ python3-importlib_metadata python3-ipython python3-ipython_genutils
+ python3-ipython_ipykernel python3-jedi python3-jsonschema
+ python3-jupyter_client python3-jupyter_core python3-jupyter_ipywidgets
+ python3-jupyter_nbconvert python3-jupyter_nbformat
+ python3-jupyter_notebook python3-jupyterlab_pygments python3-kiwisolver
+ python3-matplotlib python3-matplotlib-inline python3-mistune
+ python3-mpmath python3-nbclient python3-nest_asyncio python3-networkx
+ python3-numpy python3-packaging python3-pandocfilters python3-parsing
+ python3-parso python3-pexpect python3-pickleshare python3-pip
+ python3-pkgconfig python3-pluggy python3-ply python3-prometheus_client
+ python3-prompt_toolkit python3-ptyprocess python3-py python3-pybind11
+ python3-pycparser python3-pyrsistent python3-pytz python3-pyzmq
+ python3-requests python3-scipy python3-send2trash python3-setuptools
+ python3-setuptools_scm python3-simplegeneric python3-six
+ python3-snowballstemmer python3-sphinxcontrib-applehelp
+ python3-sphinxcontrib-devhelp python3-sphinxcontrib-htmlhelp
+ python3-sphinxcontrib-jsmath python3-sphinxcontrib-qthelp
+ python3-sphinxcontrib-serializinghtml python3-sympy python3-terminado
+ python3-testpath python3-texttable python3-toml python3-tomli
+ python3-tornado python3-traitlets python3-typing_extensions
+ python3-tzlocal python3-urllib3 python3-wcwidth python3-webencodings
+ python3-wheel python3-zipp pythran
+ "
+
+if [ "$build_option_system_site_packages" ]; then
+	makedepends+=" $_sage_python3_modules"
+	depends+=" $_sage_python3_modules"
+fi

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta9
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (160 preceding siblings ...)
  2022-01-03 20:02 ` [PR PATCH] [Updated] " tornaria
@ 2022-01-03 20:50 ` tornaria
  2022-01-04 17:52 ` dkwo
                   ` (86 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-03 20:50 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1004350340

Comment:
#### Rebased to master with 3 new commits:
 - Main change: it now uses  ~ 100 python packages from system using patch from https://trac.sagemath.org/ticket/29665
 - patch to fix a long time test in `matrix2.pyx` that was causing a timeout on i686 (see https://trac.sagemath.org/ticket/33091)
 - include sphinx update (#34789)

#### Doctest status:
 - occasional 1 doctest failed in `src/sage/schemes/toric/sheaf/klyachko.py` (https://trac.sagemath.org/ticket/32773)
 - occasional 1 doctest failed in `src/sage/schemes/cyclic_covers/cycliccover_finite_field.py` (https://trac.sagemath.org/ticket/30419)
 -  for i686: 2 or 3 doctests failed in `src/sage/interfaces/maxima.py`, I have to investigate since I had not seen this before.

The first two are not very common, but the last one is happening almost always (IIRC only since the switch to system site-packages, may be some package version incompatibility --- perhaps `ptyprocess` which I patched it to use the void package at version 0.7.0 but stock sage accepts only 0.5.1).

#### Sources:
 - The current template is still using the whole huge tarball for sage which includes all upstream sources, git, etc. For the next version I'll switch to the clean sources of sagemath + just the required packages. At this point we only need 30 out of 200 that are included in the huge tarball.

It would be really convenient if we could split gap to a separate package since that's by far the largest package remaining (~500M source compressed) and it's quite useful independent from sage (will need https://trac.sagemath.org/ticket/29644 and https://trac.sagemath.org/ticket/31761).

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta9
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (161 preceding siblings ...)
  2022-01-03 20:50 ` tornaria
@ 2022-01-04 17:52 ` dkwo
  2022-01-04 17:57 ` dkwo
                   ` (85 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2022-01-04 17:52 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1005040902

Comment:
Very well, great work.
On my musl build (inside the chroot, so old musl) these two failed:
```
sage -t --warn-long 5.0 --random-seed=152811365814192554661782902878649203456 src/sage/matrix/matrix_mod2_dense.pyx  # 1 doctest failed
sage -t --warn-long 5.0 --random-seed=152811365814192554661782902878649203456 src/sage/quadratic_forms/binary_qf.py  # 1 doctest failed
```
Somehow in ci they don't fail, though
```
2022-01-03T22:05:39.2997090Z sage -t --warn-long 5.0 --random-seed=262463563747542995961554231591031840987 src/sage/matrix/matrix_mod2_dense.pxd
2022-01-03T22:05:39.2997845Z     [0 tests, 0.00 s]
```
I'll try again later.

I agree about gap, we should package it. I have a template, but some packages were failing, will try again after Jan 7th.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta9
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (162 preceding siblings ...)
  2022-01-04 17:52 ` dkwo
@ 2022-01-04 17:57 ` dkwo
  2022-01-04 18:14 ` tornaria
                   ` (84 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2022-01-04 17:57 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1005044538

Comment:
Now both tests pass (outside of build chroot), so forget about them.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta9
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (163 preceding siblings ...)
  2022-01-04 17:57 ` dkwo
@ 2022-01-04 18:14 ` tornaria
  2022-01-04 18:14 ` [PR PATCH] [Closed]: " tornaria
                   ` (83 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-04 18:14 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1005056372

Comment:
> Very well, great work. On my musl build (inside the chroot, so old musl) these two failed:
> 
> ```
> sage -t --warn-long 5.0 --random-seed=152811365814192554661782902878649203456 src/sage/matrix/matrix_mod2_dense.pyx  # 1 doctest failed
> sage -t --warn-long 5.0 --random-seed=152811365814192554661782902878649203456 src/sage/quadratic_forms/binary_qf.py  # 1 doctest failed
> ```
> 
> Somehow in ci they don't fail, though
> 
> ```
> 2022-01-03T22:05:39.2997090Z sage -t --warn-long 5.0 --random-seed=262463563747542995961554231591031840987 src/sage/matrix/matrix_mod2_dense.pxd
> 2022-01-03T22:05:39.2997845Z     [0 tests, 0.00 s]
> ```
> 
> I'll try again later.
> 
> I agree about gap, we should package it. I have a template, but some packages were failing, will try again after Jan 7th.



^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [PR PATCH] [Closed]: [WIP] New package: sagemath-9.5.beta9
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (164 preceding siblings ...)
  2022-01-04 18:14 ` tornaria
@ 2022-01-04 18:14 ` tornaria
  2022-01-04 18:17 ` tornaria
                   ` (82 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-04 18:14 UTC (permalink / raw)
  To: ml

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

There's a closed pull request on the void-packages repository

[WIP] New package: sagemath-9.5.beta9
https://github.com/void-linux/void-packages/pull/34030

Description:
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`.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta9
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (165 preceding siblings ...)
  2022-01-04 18:14 ` [PR PATCH] [Closed]: " tornaria
@ 2022-01-04 18:17 ` tornaria
  2022-01-04 18:17 ` tornaria
                   ` (81 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-04 18:17 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1005058692

Comment:
> Now both tests pass (outside of build chroot), so forget about them.

Most probably these are occasional (random) failures. The one on binary_qf.py I think has a patch with positive_review.

If you want to reproduce, use the "--random-seed=..." parameter, In principle, if you repeat the test command with the same random-seed, you should get the same failure on random tests (assuming everything else stays the same).

Sorry about the close-then-open, that was a silly mistake on my part (click the wrong button).

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta9
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (166 preceding siblings ...)
  2022-01-04 18:17 ` tornaria
@ 2022-01-04 18:17 ` tornaria
  2022-01-04 18:28 ` tornaria
                   ` (80 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-04 18:17 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1005056372

Comment:
> Very well, great work. On my musl build (inside the chroot, so old musl) these two failed:
> 
> ```
> sage -t --warn-long 5.0 --random-seed=152811365814192554661782902878649203456 src/sage/matrix/matrix_mod2_dense.pyx  # 1 doctest failed
> sage -t --warn-long 5.0 --random-seed=152811365814192554661782902878649203456 src/sage/quadratic_forms/binary_qf.py  # 1 doctest failed
> ```
> 
> Somehow in ci they don't fail, though
> 
> ```
> 2022-01-03T22:05:39.2997090Z sage -t --warn-long 5.0 --random-seed=262463563747542995961554231591031840987 src/sage/matrix/matrix_mod2_dense.pxd
> 2022-01-03T22:05:39.2997845Z     [0 tests, 0.00 s]
> ```
> 
> I'll try again later.
> 
> I agree about gap, we should package it. I have a template, but some packages were failing, will try again after Jan 7th.



^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta9
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (167 preceding siblings ...)
  2022-01-04 18:17 ` tornaria
@ 2022-01-04 18:28 ` tornaria
  2022-01-04 18:48 ` tornaria
                   ` (79 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-04 18:28 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1005066334

Comment:
> Very well, great work. On my musl build (inside the chroot, so old musl) these two failed:
> 
> ```
> sage -t --warn-long 5.0 --random-seed=152811365814192554661782902878649203456 src/sage/matrix/matrix_mod2_dense.pyx  # 1 doctest failed
> ```

Please post the details.



> ```
> sage -t --warn-long 5.0 --random-seed=152811365814192554661782902878649203456 src/sage/quadratic_forms/binary_qf.py  # 1 doctest failed
> ```

Can you confirm is the same as this: https://trac.sagemath.org/ticket/33057

> 
> Somehow in ci they don't fail, though
> 
> ```
> 2022-01-03T22:05:39.2997090Z sage -t --warn-long 5.0 --random-seed=262463563747542995961554231591031840987 src/sage/matrix/matrix_mod2_dense.pxd
> 2022-01-03T22:05:39.2997845Z     [0 tests, 0.00 s]
> ```

Can you try again with the same random-seed as above to see if it always fails on the same input?


^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta9
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (168 preceding siblings ...)
  2022-01-04 18:28 ` tornaria
@ 2022-01-04 18:48 ` tornaria
  2022-01-05  9:56 ` dkwo
                   ` (78 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-04 18:48 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1005080267

Comment:
>     * for i686: 2 or 3 doctests failed in `src/sage/interfaces/maxima.py`, I have to investigate since I had not seen this before.
> 
> 
> ... the last one is happening almost always (IIRC only since the switch to system site-packages, may be some package version incompatibility --- perhaps `ptyprocess` which I patched it to use the void package at version 0.7.0 but stock sage accepts only 0.5.1).

I stand corrected: this issue was present since we switched to system maxima, but it only manifest itself when running long tests (which only recently I started running).

In fact, the failing tests are not long tests, but before them there's a long test which allocates 256M to test the heap. It succeeds but the next time maxima tries to allocate it crashes.

This is looking like a bug in our own maxima (ecl version). More precisely, on i686 this fails:

```
$ maxima -l ecl 
;;; Loading #P"/usr/lib32/ecl-21.2.1/sb-bsd-sockets.fas"
;;; Loading #P"/usr/lib32/ecl-21.2.1/sockets.fas"
Maxima 5.45.1 https://maxima.sourceforge.io
using Lisp ECL 21.2.1
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) :lisp (ext:set-limit 'ext:heap-size 0)

0
(%i1) a : 10^(10^5) $

(%i2) b : a^600 $

(%i3) c : a^600 $
Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS
Aborted
```

The same using maxima as compiled by sage works:

```
$ /usr/lib/sage-9.5.beta9/local/bin/maxima
;;; Loading #P"/usr/lib32/ecl-21.2.1/sb-bsd-sockets.fas"
;;; Loading #P"/usr/lib32/ecl-21.2.1/sockets.fas"
Maxima 5.45.0 https://maxima.sourceforge.io
using Lisp ECL 21.2.1
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) :lisp (ext:set-limit 'ext:heap-size 0)

0
(%i1) a : 10^(10^5) $

(%i2) b : a^600 $

(%i3) c : a^600 $

(%i4) d : a^600 $

(%i5) e : a^600 $

(%i6)
```

Note: this maxima is compiled by sage using the same system `ecl` and `gc` as the system `maxima-ecl`. The source tarball is identical, using slightly different patches and compile options.


^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta9
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (169 preceding siblings ...)
  2022-01-04 18:48 ` tornaria
@ 2022-01-05  9:56 ` dkwo
  2022-01-07 10:55 ` dkwo
                   ` (77 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2022-01-05  9:56 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1005538497

Comment:
With that particular seed, I can only reprodice one of the two failures:
```
$ sage-9.5.beta9_1 -t --warn-long 5.0 --random-seed=152811365814192554661782902878649203456 /usr/lib/sage-9.5.beta9/src/sage/quadratic_forms/binary_qf.py
Running doctests with ID 2022-01-05-10-53-26-6839f337.
Using --optional=pip,sage
Features to be detected: 4ti2,benzene,bliss,buckygen,conway_polynomials,csdp,database_cremona_ellcurve,database_cremona_mini_ellcurve,database_jones_numfield,database_knotinfo,dvipng,ffmpeg,graphviz,imagemagick,jupymake,kenzo,latte_int,lrslib,mcqd,meataxe,pandoc,pdf2svg,plantri,pynormaliz,rubiks,sage.combinat,sage.geometry.polyhedron,sage.graphs,sage.plot,sage.rings.number_field,sage.rings.real_double,sage.symbolic,sage_numerical_backends_coin,tdlib
Doctesting 1 file.
sage -t --warn-long 5.0 --random-seed=152811365814192554661782902878649203456 /usr/lib/sage-9.5.beta9/src/sage/quadratic_forms/binary_qf.py
**********************************************************************
File "/usr/lib/sage-9.5.beta9/src/sage/quadratic_forms/binary_qf.py", line 1498, in sage.quadratic_forms.binary_qf.BinaryQF.solve_integer
Failed example:
    xy is None or Q(*xy) == 0
Expected:
    True
Got:
    False
**********************************************************************
1 item had failures:
   1 of  12 in sage.quadratic_forms.binary_qf.BinaryQF.solve_integer
    [282 tests, 1 failure, 0.59 s]
----------------------------------------------------------------------
sage -t --warn-long 5.0 --random-seed=152811365814192554661782902878649203456 /usr/lib/sage-9.5.beta9/src/sage/quadratic_forms/binary_qf.py  # 1 doctest failed
----------------------------------------------------------------------
Total time for all tests: 0.7 seconds
    cpu time: 0.6 seconds
    cumulative wall time: 0.6 seconds
Features detected for doctesting:
```
which indeed seems related to the ticked you mention.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta9
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (170 preceding siblings ...)
  2022-01-05  9:56 ` dkwo
@ 2022-01-07 10:55 ` dkwo
  2022-01-07 10:57 ` dkwo
                   ` (76 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2022-01-07 10:55 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1005538497

Comment:
With that particular seed, I can only reproduce one of the two failures:
```
$ sage-9.5.beta9_1 -t --warn-long 5.0 --random-seed=152811365814192554661782902878649203456 /usr/lib/sage-9.5.beta9/src/sage/quadratic_forms/binary_qf.py
Running doctests with ID 2022-01-05-10-53-26-6839f337.
Using --optional=pip,sage
Features to be detected: 4ti2,benzene,bliss,buckygen,conway_polynomials,csdp,database_cremona_ellcurve,database_cremona_mini_ellcurve,database_jones_numfield,database_knotinfo,dvipng,ffmpeg,graphviz,imagemagick,jupymake,kenzo,latte_int,lrslib,mcqd,meataxe,pandoc,pdf2svg,plantri,pynormaliz,rubiks,sage.combinat,sage.geometry.polyhedron,sage.graphs,sage.plot,sage.rings.number_field,sage.rings.real_double,sage.symbolic,sage_numerical_backends_coin,tdlib
Doctesting 1 file.
sage -t --warn-long 5.0 --random-seed=152811365814192554661782902878649203456 /usr/lib/sage-9.5.beta9/src/sage/quadratic_forms/binary_qf.py
**********************************************************************
File "/usr/lib/sage-9.5.beta9/src/sage/quadratic_forms/binary_qf.py", line 1498, in sage.quadratic_forms.binary_qf.BinaryQF.solve_integer
Failed example:
    xy is None or Q(*xy) == 0
Expected:
    True
Got:
    False
**********************************************************************
1 item had failures:
   1 of  12 in sage.quadratic_forms.binary_qf.BinaryQF.solve_integer
    [282 tests, 1 failure, 0.59 s]
----------------------------------------------------------------------
sage -t --warn-long 5.0 --random-seed=152811365814192554661782902878649203456 /usr/lib/sage-9.5.beta9/src/sage/quadratic_forms/binary_qf.py  # 1 doctest failed
----------------------------------------------------------------------
Total time for all tests: 0.7 seconds
    cpu time: 0.6 seconds
    cumulative wall time: 0.6 seconds
Features detected for doctesting:
```
which indeed seems related to the ticked you mention.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta9
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (171 preceding siblings ...)
  2022-01-07 10:55 ` dkwo
@ 2022-01-07 10:57 ` dkwo
  2022-01-07 10:59 ` dkwo
                   ` (75 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2022-01-07 10:57 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1007318164

Comment:
@tornaria Do you think the issue with gamma in musl of https://trac.sagemath.org/ticket/33083#comment:25 should be reported upstream?

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta9
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (172 preceding siblings ...)
  2022-01-07 10:57 ` dkwo
@ 2022-01-07 10:59 ` dkwo
  2022-01-07 15:04 ` tornaria
                   ` (74 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2022-01-07 10:59 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1007319171

Comment:
Could anyone with docker experience help with `docker-voidlinux-standard: commands failed` in https://trac.sagemath.org/ticket/33084 ?

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta9
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (173 preceding siblings ...)
  2022-01-07 10:59 ` dkwo
@ 2022-01-07 15:04 ` tornaria
  2022-01-07 15:13 ` tornaria
                   ` (73 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-07 15:04 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1007478143

Comment:
On CI there was one test failure on x86_64:
```
sage -t --warn-long 5.0 --random-seed=330089004362074246536289428114933481910 src/sage/geometry/hyperbolic_space/hyperbolic_model.py  # 1 doctest failed
```
This is already fixed upstream https://trac.sagemath.org/ticket/32891.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.beta9
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (174 preceding siblings ...)
  2022-01-07 15:04 ` tornaria
@ 2022-01-07 15:13 ` tornaria
  2022-01-08 16:51 ` [PR PATCH] [Updated] " tornaria
                   ` (72 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-07 15:13 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1007485274

Comment:
> @tornaria Do you think the issue with gamma in musl of https://trac.sagemath.org/ticket/33083#comment:25 should be reported upstream?

It's already reported: https://trac.sagemath.org/ticket/33083#comment:22 and it's an issue on glibc since `gamma()` there is not true gamma (at least musl catches the ambiguity with `gamma()` by not defining it).


^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: sagemath-9.5.beta9
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (175 preceding siblings ...)
  2022-01-07 15:13 ` tornaria
@ 2022-01-08 16:51 ` tornaria
  2022-01-10  3:22 ` tornaria
                   ` (71 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-08 16:51 UTC (permalink / raw)
  To: ml

[-- 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.beta9
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: 519910 bytes --]

From abc21384815dcbefcc02b204ffd66e014ce08c71 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/29] 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 b1343bd6abbe85ede7d45d848d249c3536db88ba 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/29] 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 a0a763f3da7ab0080fab39d1ad45637f7dec8a55 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/29] 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 d9ad53208b8516e1bd56975995f3b29dde3288aa 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/29] 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 de71e3fa264f8ca5fe69b22f8c0c78dce6cf557a 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/29] 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 23bcfb0a4007bbba72a3d81ff63de538226d1e8d 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/29] 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 793ec1e84c6169cbf7bfe408ddd4f3595ead3237 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/29] 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 a86e23d181d999be91fd6287a7f3fa7531d89360 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/29] 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 a22c26c35c82fd3a60545c70e50dbf052bd80c95 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/29] 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 831e7ec62fbcaa49fe5ae570824e73c6c76acadd 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/29] 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 3063b8fd058dca304531aba7adef54ab4b1486b1 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/29] 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 3fc82d82bde14c1fa6a7f9e9da5c4dd7641e5007 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/29] 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 5342f60828d772532b5baba153808a9c3b2adc07 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/29] 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 56b6856449d4d564121bf162b04c75b97746e060 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/29] 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 d034deb384e3151340af73bdfb866ea646cc0aca 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/29] 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 ea7a716e8bd51a90ad196fd15bd47a3635c0319c 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/29] 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 c6805b3427d3dae692362f9916d57ad76c999f0f 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/29] 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 00e51a57ddff90e06756b60009477e502b931c89 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/29] 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 34362e99064f0a489dca897efd31bf0117bd7ad1 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/29] 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

From 70446840a361922c3aee4a20811d60eeae69b555 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 27 Dec 2021 20:19:19 -0300
Subject: [PATCH 20/29] sagemath: fix license and tests

Now tests can be run with -Q (normal) or -K (--long)
---
 srcpkgs/sagemath/template | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index c5009269c7fc..33b40acbabeb 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -16,7 +16,7 @@ depends="giac git FlintQS zn_poly sympow
  "
 short_desc="Open source mathematics software"
 maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
-license="GPL-3.0-or-later"
+license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
 checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
@@ -155,15 +155,17 @@ do_install() {
 }
 
 do_check() {
-	TEST=--all
 	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
-		TEST="$(sed -e 's/#.*//' ${XBPS_DISTDIR}/sagemath-check)"
+		_test_args=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	fi
+	if [ -z "$_test_args" ]; then
+		_test_args=--all
+	fi
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args="--long $_test_args"
 	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} ${OPT} ${TEST}
-	#./sage -t ${OPT} ${TEST}
+	./sage -tp ${XBPS_MAKEJOBS} ${_test_args}
 }
 
 ### copied from sage-deps, to be kept in sync

From 288dd0afd2ff71a4aa5b1c89df26aa057f30cf52 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 28 Dec 2021 23:08:17 -0300
Subject: [PATCH 21/29] sagemath: fix long time test

---
 .../patches/zzz-fix_long_time_test--see_33091.patch | 13 +++++++++++++
 ...=> zzz-skip_doctest_giac-1.7.0--see_31563.patch} |  0
 2 files changed, 13 insertions(+)
 create mode 100644 srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
 rename srcpkgs/sagemath/patches/{skip-doctest-giac-1.7.0--see-trac-31563.patch => zzz-skip_doctest_giac-1.7.0--see_31563.patch} (100%)

diff --git a/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch b/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
new file mode 100644
index 000000000000..ca360dee9f6e
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage/matrix/matrix2.pyx b/src/sage/matrix/matrix2.pyx
+index 7d319bd54b..c1a2eed6f1 100644
+--- a/src/sage/matrix/matrix2.pyx
++++ b/src/sage/matrix/matrix2.pyx
+@@ -17215,7 +17215,7 @@ cdef class Matrix(Matrix1):
+ 
+             sage: set_random_seed()
+             sage: K = random_cone(max_ambient_dim=5)
+-            sage: all(L.change_ring(SR).is_Z_operator_on(K)
++            sage: all(L.change_ring(SR).is_Z_operator_on(K) # long time
+             ....:     for L in K.Z_operators_gens())  # long time
+             True
+ 
diff --git a/srcpkgs/sagemath/patches/skip-doctest-giac-1.7.0--see-trac-31563.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_31563.patch
similarity index 100%
rename from srcpkgs/sagemath/patches/skip-doctest-giac-1.7.0--see-trac-31563.patch
rename to srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_31563.patch

From 27e639b88bb74c7a77ce41b1aa6f8b85873ff2b9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 31 Dec 2021 13:52:34 -0300
Subject: [PATCH 22/29] python3-Sphinx: update to 4.3.2.

---
 srcpkgs/python3-Sphinx/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/python3-Sphinx/template b/srcpkgs/python3-Sphinx/template
index 8b0493c1f92c..29f892d16157 100644
--- a/srcpkgs/python3-Sphinx/template
+++ b/srcpkgs/python3-Sphinx/template
@@ -1,6 +1,6 @@
 # Template file for 'python3-Sphinx'
 pkgname=python3-Sphinx
-version=4.2.0
+version=4.3.2
 revision=1
 wrksrc=Sphinx-${version}
 build_style=python3-module
@@ -17,8 +17,9 @@ short_desc="Python 3 documentation generator"
 maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
 license="BSD-3-Clause"
 homepage="http://sphinx-doc.org"
+changelog="https://www.sphinx-doc.org/en/master/changes.html"
 distfiles="${PYPI_SITE}/S/Sphinx/Sphinx-${version}.tar.gz"
-checksum=94078db9184491e15bce0a56d9186e0aec95f16ac20b12d00e06d4e36f1058a6
+checksum=0a8836751a68306b3fe97ecbe44db786f8479c3bf4b80e3a7f5c838657b4698c
 conflicts="python-Sphinx>=0"
 
 post_install() {

From 0fb9de8d39fed9a7012030fc3733f561bf273729 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 28 Dec 2021 23:08:17 -0300
Subject: [PATCH 23/29] sagemath: use system python site-packages

 - patch from #29665 for that
 - patch on top of that to allow a few more python packages:
   gmpy2, sphinx, typing_extensions, ptyprocess
 - add all available python packages to makedepends and depends
 - add ffmpeg and ImageMagick to makedepends
 - in standard check (-Q) warn if individual test > 5.0s
---
 ...184f7498a2046065e669723e68efe2d65cee.patch | 5629 +++++++++++++++++
 .../zzz-dont_run_pytest--see_31924.patch      |   27 +
 .../zzz-more_site_packages_not_in_29665.patch |   42 +
 srcpkgs/sagemath/template                     |   52 +-
 4 files changed, 5747 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch

diff --git a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
new file mode 100644
index 000000000000..b641113927e7
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
@@ -0,0 +1,5629 @@
+From 05fcaabe95082f42ba134780d579390d7b6153e2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 19:30:58 -0400
+Subject: Trac #29665: add --enable-system-site-packages option to ./configure.
+
+This new option is experimental and disabled by default. When it is
+enabled, the string "--system-site-packages" is appended to a new
+environment variable SAGE_VENV_FLAGS that is then passed to the
+sage-venv command during the build using autoconf substitution.
+Thusly the correct setting finds its way into local/pyvenv.cfg.
+---
+ build/make/Makefile.in |  2 +-
+ configure.ac           | 11 +++++++++++
+ 2 files changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/build/make/Makefile.in b/build/make/Makefile.in
+index f870cc3..68627ab 100644
+--- a/build/make/Makefile.in
++++ b/build/make/Makefile.in
+@@ -211,7 +211,7 @@ endif
+ inst_python3_venv = $(SAGE_VENV)/pyvenv.cfg
+ 
+ $(inst_python3_venv):
+-	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv "$(SAGE_VENV)"
++	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv @SAGE_VENV_FLAGS@ "$(SAGE_VENV)"
+ endif
+ 
+ # Build everything and start Sage.
+diff --git a/configure.ac b/configure.ac
+index 351f487..db30a91 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -435,6 +435,17 @@ AC_ARG_ENABLE([download-from-upstream-url],
+   [AS_HELP_STRING([--enable-download-from-upstream-url],
+     [allow downloading packages from their upstream URL if they cannot be found on the Sage mirrors])])
+ 
++AC_ARG_ENABLE(
++  [system-site-packages], [AS_HELP_STRING(
++    [--enable-system-site-packages],
++    [allow sage to use python packages from the system (experimental; default: no)]
++  )], [
++  AS_IF([test "x$enable_system_site_packages" = "xyes"], [
++    SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
++  ])
++])
++AC_SUBST([SAGE_VENV_FLAGS])
++
+ SAGE_SPKG_OPTIONS=""
+ AS_IF([test "x$enable_experimental_packages" = "xyes"], [
+   AS_VAR_APPEND([SAGE_SPKG_OPTIONS], [" -y"])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9372d1f663edf4e89f9c186336815ca04cff59dc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 19:41:14 -0400
+Subject: Trac #29665: new SAGE_PYTHON_PACKAGE_CHECK() autoconf macro.
+
+This new macro encapsulates the check for system installations of
+python packages. It uses setuptools.version's pkg_resources to
+check if the contents of install-requires.txt are satisfied for
+the given package; and if not, tells the build system to install
+the SPKG instead.
+---
+ m4/sage_python_package_check.m4 | 49 +++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 49 insertions(+)
+ create mode 100644 m4/sage_python_package_check.m4
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+new file mode 100644
+index 00000000..77b0a0c
+--- /dev/null
++++ b/m4/sage_python_package_check.m4
+@@ -0,0 +1,49 @@
++#
++# SYNOPSIS
++#
++#   SAGE_PYTHON_PACKAGE_CHECK(package)
++#
++# DESCRIPTION
++#
++#   Determine if the system copy of a python package can be used by sage.
++#
++#   This macro uses setuptools.version's pkg_resources to check that the
++#   "install-requires.txt" file for the named package is satisfied, and
++#   it can typically fail in four ways:
++#
++#     1. If --enable-system-site-packages was not passed to ./configure,
++#
++#     2. If we are not using the system python (no $PYTHON_FOR_VENV),
++#
++#     3. If setuptools is not available to the system python,
++#
++#     4. If the contents of install-requires.txt are not met (wrong
++#        version, no version, etc.) by the system python.
++#
++#   In any of those cases, we set sage_spkg_install_$package to "yes"
++#   so that the corresponding SPKG is installed. Otherwise, we do
++#   nothing, since the default value of sage_spkg_install_$package
++#   is "no" (to use the system copy).
++#
++#   The SAGE_SPKG_CONFIGURE_PYTHON3() macro is AC_REQUIRE'd to ensure
++#   that $PYTHON_FOR_VENV is available, if it is going to be available.
++#
++
++AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
++  AS_IF([test "${enable_system_site_packages}" = "yes"], [
++    AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
++
++    dnl strip all comments from install-requires.txt; this should leave
++    dnl only a single line containing the version specification for this
++    dnl package.
++    SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
++    AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++    AS_IF(
++      ["${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())"],
++      [AC_MSG_RESULT(yes)],
++      [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
++    )
++  ], [
++    sage_spkg_install_$1=yes
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a0dac8ad81ad6369d479bba30d2388de59e5cecb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:21:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for py.
+
+---
+ build/pkgs/py/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/py/spkg-configure.m4
+
+diff --git a/build/pkgs/py/spkg-configure.m4 b/build/pkgs/py/spkg-configure.m4
+new file mode 100644
+index 00000000..ded7034
+--- /dev/null
++++ b/build/pkgs/py/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([py], [SAGE_PYTHON_PACKAGE_CHECK([py])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 87c463a25ab4432dc1fba4f7a9703284e5b8f620 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:24:15 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for wheel.
+
+---
+ build/pkgs/wheel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wheel/spkg-configure.m4
+
+diff --git a/build/pkgs/wheel/spkg-configure.m4 b/build/pkgs/wheel/spkg-configure.m4
+new file mode 100644
+index 00000000..7897ea9
+--- /dev/null
++++ b/build/pkgs/wheel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([wheel], [SAGE_PYTHON_PACKAGE_CHECK([wheel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 804094b3a980f262f4d53d7be8b1be43ac0c55e0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:25:15 -0400
+Subject: Trac #29665: new spkg-configure.m4 for cvxopt.
+
+This includes a SAGE_SPKG_DEPCHECK([gsl glpk suitesparse],... because
+those C dependencies wind up linked into shared libraries like,
+
+  /usr/.../cvxopt/glpk.cpython-39-x86_64-linux-gnu.so
+
+that could potentially conflict with (for example) the glpk SPKG.
+---
+ build/pkgs/cvxopt/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/cvxopt/spkg-configure.m4
+
+diff --git a/build/pkgs/cvxopt/spkg-configure.m4 b/build/pkgs/cvxopt/spkg-configure.m4
+new file mode 100644
+index 00000000..c4aa619
+--- /dev/null
++++ b/build/pkgs/cvxopt/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([cvxopt], [
++  SAGE_SPKG_DEPCHECK([gsl glpk suitesparse], [
++    SAGE_PYTHON_PACKAGE_CHECK([cvxopt])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3f171955ff8d15da2c98aee0d2e254e95a55a2b5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:28:10 -0400
+Subject: Trac #29665: new spkg-configure.m4 for pyzmq.
+
+This includes a SAGE_SPKG_DEPCHECK([zeromq],... because libzmq winds
+up linked into shared libraries like,
+
+  /usr/.../zmq/backend/cython/message.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the zeromq SPKG.
+---
+ build/pkgs/pyzmq/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/pyzmq/spkg-configure.m4
+
+diff --git a/build/pkgs/pyzmq/spkg-configure.m4 b/build/pkgs/pyzmq/spkg-configure.m4
+new file mode 100644
+index 00000000..ae2b126
+--- /dev/null
++++ b/build/pkgs/pyzmq/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([pyzmq], [
++  SAGE_SPKG_DEPCHECK([zeromq], [
++    SAGE_PYTHON_PACKAGE_CHECK([pyzmq])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20d3aa9da9fc98a6e6a47599cd1b6d1d3785a4c4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:31:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for requests.
+
+---
+ build/pkgs/requests/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/requests/spkg-configure.m4
+
+diff --git a/build/pkgs/requests/spkg-configure.m4 b/build/pkgs/requests/spkg-configure.m4
+new file mode 100644
+index 00000000..f50a66c
+--- /dev/null
++++ b/build/pkgs/requests/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([requests], [SAGE_PYTHON_PACKAGE_CHECK([requests])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4df57ee47f2576b6b7bf9265248e06e90616b689 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:13:34 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for six.
+
+---
+ build/pkgs/six/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/six/spkg-configure.m4
+
+diff --git a/build/pkgs/six/spkg-configure.m4 b/build/pkgs/six/spkg-configure.m4
+new file mode 100644
+index 00000000..a382b81
+--- /dev/null
++++ b/build/pkgs/six/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([six], [SAGE_PYTHON_PACKAGE_CHECK([six])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f4462652d02ca729cc6d7cb36ee4d7d662deafb0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:14:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for packaging.
+
+---
+ build/pkgs/packaging/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/packaging/spkg-configure.m4
+
+diff --git a/build/pkgs/packaging/spkg-configure.m4 b/build/pkgs/packaging/spkg-configure.m4
+new file mode 100644
+index 00000000..398f9e1
+--- /dev/null
++++ b/build/pkgs/packaging/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([packaging], [SAGE_PYTHON_PACKAGE_CHECK([packaging])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4d64677fffce48077e4bc3e20ec833c70e6e9b65 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:18:53 -0400
+Subject: Trac #29665: new spkg-configure.m4 for numpy.
+
+This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack
+wind up linked into shared libraries like,
+
+  /usr/.../numpy/linalg/lapack_lite.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the openblas SPKG.
+---
+ build/pkgs/numpy/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/numpy/spkg-configure.m4
+
+diff --git a/build/pkgs/numpy/spkg-configure.m4 b/build/pkgs/numpy/spkg-configure.m4
+new file mode 100644
+index 00000000..16f9a90
+--- /dev/null
++++ b/build/pkgs/numpy/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([numpy], [
++  SAGE_SPKG_DEPCHECK([openblas], [
++   SAGE_PYTHON_PACKAGE_CHECK([numpy])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 85dfe5bb32f3c470966b477bae68a921e846d11f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:58:48 -0400
+Subject: Trac #29665: new spkg-configure.m4 for scipy.
+
+This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack
+wind up linked into shared libraries like,
+
+  /usr/.../scipy/linalg/_flinalg.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the openblas SPKG.
+---
+ build/pkgs/scipy/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/scipy/spkg-configure.m4
+
+diff --git a/build/pkgs/scipy/spkg-configure.m4 b/build/pkgs/scipy/spkg-configure.m4
+new file mode 100644
+index 00000000..0b7294a
+--- /dev/null
++++ b/build/pkgs/scipy/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([scipy], [
++  SAGE_SPKG_DEPCHECK([openblas], [
++    SAGE_PYTHON_PACKAGE_CHECK([scipy])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5616f1491036fda95f4d3e840c8c8b531c97323b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 07:19:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pluggy.
+
+---
+ build/pkgs/pluggy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pluggy/spkg-configure.m4
+
+diff --git a/build/pkgs/pluggy/spkg-configure.m4 b/build/pkgs/pluggy/spkg-configure.m4
+new file mode 100644
+index 00000000..11b1fce
+--- /dev/null
++++ b/build/pkgs/pluggy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pluggy], [SAGE_PYTHON_PACKAGE_CHECK([pluggy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6bceae3d356878cfe5fce40c9998dead003a3844 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 07:24:12 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pickleshare.
+
+---
+ build/pkgs/pickleshare/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pickleshare/spkg-configure.m4
+
+diff --git a/build/pkgs/pickleshare/spkg-configure.m4 b/build/pkgs/pickleshare/spkg-configure.m4
+new file mode 100644
+index 00000000..80e9b7c
+--- /dev/null
++++ b/build/pkgs/pickleshare/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pickleshare], [SAGE_PYTHON_PACKAGE_CHECK([pickleshare])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From da2ab534f4a256c82ed4f1c5f0f5c320529b5e9f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 08:53:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for html5lib.
+
+---
+ build/pkgs/html5lib/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/html5lib/spkg-configure.m4
+
+diff --git a/build/pkgs/html5lib/spkg-configure.m4 b/build/pkgs/html5lib/spkg-configure.m4
+new file mode 100644
+index 00000000..f421b7e
+--- /dev/null
++++ b/build/pkgs/html5lib/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([html5lib], [SAGE_PYTHON_PACKAGE_CHECK([html5lib])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5e464134afdf6055b7b5804208f759561c5435cd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 18:30:47 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for networkx.
+
+---
+ build/pkgs/networkx/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/networkx/spkg-configure.m4
+
+diff --git a/build/pkgs/networkx/spkg-configure.m4 b/build/pkgs/networkx/spkg-configure.m4
+new file mode 100644
+index 00000000..926671e
+--- /dev/null
++++ b/build/pkgs/networkx/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([networkx], [SAGE_PYTHON_PACKAGE_CHECK([networkx])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c4d40770cd9c7fda811e31759a5f4aedc320f3f9 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:33:24 -0400
+Subject: Trac #29665: new spkg-configure.m4 for matplotlib.
+
+This includes a SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull],...
+because those dependencies wind up linked into shared libraries like,
+
+  /usr/lib/.../matplotlib/ft2font.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with their SPKG counterparts.
+---
+ build/pkgs/matplotlib/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/matplotlib/spkg-configure.m4
+
+diff --git a/build/pkgs/matplotlib/spkg-configure.m4 b/build/pkgs/matplotlib/spkg-configure.m4
+new file mode 100644
+index 00000000..39c2d29
+--- /dev/null
++++ b/build/pkgs/matplotlib/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([matplotlib], [
++  SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull], [
++    SAGE_PYTHON_PACKAGE_CHECK([matplotlib])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7834dc3ac349201af632f89a9de7cd1967931010 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:35:00 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for bleach.
+
+---
+ build/pkgs/bleach/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/bleach/spkg-configure.m4
+
+diff --git a/build/pkgs/bleach/spkg-configure.m4 b/build/pkgs/bleach/spkg-configure.m4
+new file mode 100644
+index 00000000..3c9bb26
+--- /dev/null
++++ b/build/pkgs/bleach/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([bleach], [SAGE_PYTHON_PACKAGE_CHECK([bleach])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 84cad343287a2c69a4a21b9fa3b92301ff88645b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:37:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for decorator.
+
+---
+ build/pkgs/decorator/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/decorator/spkg-configure.m4
+
+diff --git a/build/pkgs/decorator/spkg-configure.m4 b/build/pkgs/decorator/spkg-configure.m4
+new file mode 100644
+index 00000000..e062778
+--- /dev/null
++++ b/build/pkgs/decorator/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([decorator], [SAGE_PYTHON_PACKAGE_CHECK([decorator])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 25693212572e69d452bc95c923ada13744359eb7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:38:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for idna.
+
+---
+ build/pkgs/idna/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/idna/spkg-configure.m4
+
+diff --git a/build/pkgs/idna/spkg-configure.m4 b/build/pkgs/idna/spkg-configure.m4
+new file mode 100644
+index 00000000..9d363f2
+--- /dev/null
++++ b/build/pkgs/idna/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([idna], [SAGE_PYTHON_PACKAGE_CHECK([idna])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6d5616472f6cdc6cf496bba6fe07bd4ef44dfdaf Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:39:23 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for certifi.
+
+---
+ build/pkgs/certifi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/certifi/spkg-configure.m4
+
+diff --git a/build/pkgs/certifi/spkg-configure.m4 b/build/pkgs/certifi/spkg-configure.m4
+new file mode 100644
+index 00000000..ddd4061
+--- /dev/null
++++ b/build/pkgs/certifi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([certifi], [SAGE_PYTHON_PACKAGE_CHECK([certifi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9412a07023b275e29e8d1af9b8ee3e767042e7fd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:40:59 -0400
+Subject: Trac #29665: new spkg-configure.m4 for pillow.
+
+This includes an SAGE_SPKG_DEPCHECK([bzip2 freetype libpng zlib],...
+because those dependencies wind up linked into shared libraries like,
+
+  /usr/.../PIL/_imagingft.cpython-39-x86_64-linux-gnu.so
+
+and potentially conflict with their SPKG counterparts.
+---
+ build/pkgs/pillow/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/pillow/spkg-configure.m4
+
+diff --git a/build/pkgs/pillow/spkg-configure.m4 b/build/pkgs/pillow/spkg-configure.m4
+new file mode 100644
+index 00000000..f2e68e2
+--- /dev/null
++++ b/build/pkgs/pillow/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([pillow], [
++  SAGE_SPKG_DEPCHECK([bzip2 freetype libpng zlib], [
++    SAGE_PYTHON_PACKAGE_CHECK([pillow])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From eede914311481fdb75b363b7a799075e876a2b4f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:44:13 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for mpmath.
+
+---
+ build/pkgs/mpmath/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mpmath/spkg-configure.m4
+
+diff --git a/build/pkgs/mpmath/spkg-configure.m4 b/build/pkgs/mpmath/spkg-configure.m4
+new file mode 100644
+index 00000000..f43c838
+--- /dev/null
++++ b/build/pkgs/mpmath/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([mpmath], [SAGE_PYTHON_PACKAGE_CHECK([mpmath])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 363a825885832c0b580ff53fe61f5c79e70c4728 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:44:56 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for sympy.
+
+---
+ build/pkgs/sympy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sympy/spkg-configure.m4
+
+diff --git a/build/pkgs/sympy/spkg-configure.m4 b/build/pkgs/sympy/spkg-configure.m4
+new file mode 100644
+index 00000000..fa0f1f5
+--- /dev/null
++++ b/build/pkgs/sympy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([sympy], [SAGE_PYTHON_PACKAGE_CHECK([sympy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0667964c914e4a01dda697190a054ff96cea92d6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:47:06 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pygments.
+
+---
+ build/pkgs/pygments/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pygments/spkg-configure.m4
+
+diff --git a/build/pkgs/pygments/spkg-configure.m4 b/build/pkgs/pygments/spkg-configure.m4
+new file mode 100644
+index 00000000..99f29e3
+--- /dev/null
++++ b/build/pkgs/pygments/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pygments], [SAGE_PYTHON_PACKAGE_CHECK([pygments])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f787c233aa05d8e90f7c6ad18f76bd2fa36bfbfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:48:50 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for jinja2.
+
+---
+ build/pkgs/jinja2/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jinja2/spkg-configure.m4
+
+diff --git a/build/pkgs/jinja2/spkg-configure.m4 b/build/pkgs/jinja2/spkg-configure.m4
+new file mode 100644
+index 00000000..0970d1c
+--- /dev/null
++++ b/build/pkgs/jinja2/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jinja2], [SAGE_PYTHON_PACKAGE_CHECK([jinja2])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 309d8f8e2b7078b5efbbe824b69ec1d9b1e639f0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:43:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pandocfilters.
+
+---
+ build/pkgs/pandocfilters/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/pandocfilters/spkg-configure.m4
+
+diff --git a/build/pkgs/pandocfilters/spkg-configure.m4 b/build/pkgs/pandocfilters/spkg-configure.m4
+new file mode 100644
+index 00000000..3e9537f
+--- /dev/null
++++ b/build/pkgs/pandocfilters/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([pandocfilters], [
++  SAGE_PYTHON_PACKAGE_CHECK([pandocfilters])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f57bfda49777a6ba1cd123553acd75dc347c5521 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:44:46 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for webencodings.
+
+---
+ build/pkgs/webencodings/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/webencodings/spkg-configure.m4
+
+diff --git a/build/pkgs/webencodings/spkg-configure.m4 b/build/pkgs/webencodings/spkg-configure.m4
+new file mode 100644
+index 00000000..1b9a5c4
+--- /dev/null
++++ b/build/pkgs/webencodings/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([webencodings], [
++  SAGE_PYTHON_PACKAGE_CHECK([webencodings])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7f193a62d7a2ea0b6a3ca6beb12390d91c25bbfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:48:26 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pytz.
+
+---
+ build/pkgs/pytz/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pytz/spkg-configure.m4
+
+diff --git a/build/pkgs/pytz/spkg-configure.m4 b/build/pkgs/pytz/spkg-configure.m4
+new file mode 100644
+index 00000000..366521b
+--- /dev/null
++++ b/build/pkgs/pytz/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pytz], [SAGE_PYTHON_PACKAGE_CHECK([pytz])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bfd3fdd887c3465c03465248de4997eed4a82915 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:51:16 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for texttable.
+
+---
+ build/pkgs/texttable/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/texttable/spkg-configure.m4
+
+diff --git a/build/pkgs/texttable/spkg-configure.m4 b/build/pkgs/texttable/spkg-configure.m4
+new file mode 100644
+index 00000000..42a3de1
+--- /dev/null
++++ b/build/pkgs/texttable/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([texttable], [SAGE_PYTHON_PACKAGE_CHECK([texttable])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 914bf0cc57abc46129b27c1525782dbe16da31a2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:53:41 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for babel.
+
+---
+ build/pkgs/babel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/babel/spkg-configure.m4
+
+diff --git a/build/pkgs/babel/spkg-configure.m4 b/build/pkgs/babel/spkg-configure.m4
+new file mode 100644
+index 00000000..d7b9a71
+--- /dev/null
++++ b/build/pkgs/babel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([babel], [SAGE_PYTHON_PACKAGE_CHECK([babel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 56977abd1eafbc87c765a2892cfe525382648259 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 14 Oct 2021 08:06:59 -0400
+Subject: Trac #29665: force system python3 with --enable-system-site-packages.
+
+When the python SPKG is used, the --enable-system-site-packages flag
+will essentially do nothing, and that may confuse users who have
+wasted a few hours building sage. (Generally, they will want to fix
+detection of their system python3 first.)
+
+To forestall that, we now set "--with-system-python3=force" whenever
+the "--enable-system-site-packages" flag is passed.
+---
+ configure.ac | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index db30a91..6fafb83 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -438,10 +438,19 @@ AC_ARG_ENABLE([download-from-upstream-url],
+ AC_ARG_ENABLE(
+   [system-site-packages], [AS_HELP_STRING(
+     [--enable-system-site-packages],
+-    [allow sage to use python packages from the system (experimental; default: no)]
++    [allow the use of python packages from the system (experimental; default: no)]
+   )], [
+   AS_IF([test "x$enable_system_site_packages" = "xyes"], [
+     SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
++
++    dnl We want to raise an error if the user asked for "system site
++    dnl packages" but the system python will not be used. Technically
++    dnl that causes no problems (SAGE_PYTHON_PACKAGE_CHECK always fails,
++    dnl so SPKGs are used for all python packages), but it may be confusing
++    dnl to end users who expect the flag to actually give them access to
++    dnl their system python packages and who may not be paying close
++    dnl attention to their ./configure output.
++    with_system_python3="force"
+   ])
+ ])
+ AC_SUBST([SAGE_VENV_FLAGS])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 02b369fd24ef7cf8997082e7850b9cf022cae34b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 01:18:35 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for setuptools.
+
+---
+ build/pkgs/setuptools/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/setuptools/spkg-configure.m4
+
+diff --git a/build/pkgs/setuptools/spkg-configure.m4 b/build/pkgs/setuptools/spkg-configure.m4
+new file mode 100644
+index 00000000..a2ad811
+--- /dev/null
++++ b/build/pkgs/setuptools/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([setuptools], [SAGE_PYTHON_PACKAGE_CHECK([setuptools])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 05117317d38693978efaf36e81d8b02bae44b257 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 01:15:48 -0400
+Subject: Trac #29665: poison PYTHONUSERBASE when testing for "system"
+ packages.
+
+When we're detecting system installations of python packages, we want
+to hide anything that was installed with e.g. "pip install --user". To
+accomplish that, we mimic the PYTHONUSERBASE poisoning from sage-env
+within the SAGE_PYTHON_PACKAGE_CHECK() macro.
+---
+ m4/sage_python_package_check.m4 | 18 +++++++++++++++++-
+ 1 file changed, 17 insertions(+), 1 deletion(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 77b0a0c..b8cdba4 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -38,11 +38,27 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     dnl package.
+     SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
+     AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++
++    dnl To prevent user-site (pip install --user) packages from being
++    dnl detected as "system" packages, we poison PYTHONUSERBASE. The
++    dnl sage-env script also does this at runtime; we mimic that
++    dnl implementation to ensure that the behaviors at ./configure and
++    dnl runtime are identical. Beware that (as in sage-env) the poisoning
++    dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
++    dnl user points PYTHONUSERBASE to any path (even the default), then
++    dnl his local pip packages will be detected.
++    PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
++    AS_IF([test -z "${PYTHONUSERBASE}"], [
++      PYTHONUSERBASE="${HOME}/.sage/local"
++    ])
++
+     AS_IF(
+-      ["${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())"],
++      [PYTHONUSERBASE="${PYTHONUSERBASE}" "${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" 2>/dev/null],
+       [AC_MSG_RESULT(yes)],
+       [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+     )
++
++    PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d75c1492f63a584b5ec5f424ddd7f7c4a6d502d3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:20:04 -0400
+Subject: Trac #29665: run SAGE_PYTHON_PACKAGE_CHECK() inside a venv.
+
+To recreate the runtime environment as closely as possible, we now use
+a venv (with system site packages enabled) when checking for system
+copies of python packages.
+---
+ m4/sage_python_package_check.m4 | 76 +++++++++++++++++++++++++++--------------
+ 1 file changed, 51 insertions(+), 25 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index b8cdba4..7cbd6c0 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -15,9 +15,11 @@
+ #
+ #     2. If we are not using the system python (no $PYTHON_FOR_VENV),
+ #
+-#     3. If setuptools is not available to the system python,
++#     3. If we are unable to create a venv with the system python,
+ #
+-#     4. If the contents of install-requires.txt are not met (wrong
++#     4. If setuptools is not available to the system python,
++#
++#     5. If the contents of install-requires.txt are not met (wrong
+ #        version, no version, etc.) by the system python.
+ #
+ #   In any of those cases, we set sage_spkg_install_$package to "yes"
+@@ -27,38 +29,62 @@
+ #
+ #   The SAGE_SPKG_CONFIGURE_PYTHON3() macro is AC_REQUIRE'd to ensure
+ #   that $PYTHON_FOR_VENV is available, if it is going to be available.
++#   The check is run inside a new venv, and with the PYTHONUSERBASE
++#   variable poisoned in the same manner as sage-env poisons it, to
++#   ensure that the ./configure- and run-time views of the system
++#   are as similar as possible.
+ #
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
+     AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
+ 
+-    dnl strip all comments from install-requires.txt; this should leave
+-    dnl only a single line containing the version specification for this
+-    dnl package.
+-    SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
+-    AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++    dnl We run this check inside a python venv, because that's ultimately
++    dnl how the system $PYTHON_FOR_VENV will be used.
++    AC_MSG_CHECKING([if we can create a python venv in config.venv])
+ 
+-    dnl To prevent user-site (pip install --user) packages from being
+-    dnl detected as "system" packages, we poison PYTHONUSERBASE. The
+-    dnl sage-env script also does this at runtime; we mimic that
+-    dnl implementation to ensure that the behaviors at ./configure and
+-    dnl runtime are identical. Beware that (as in sage-env) the poisoning
+-    dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
+-    dnl user points PYTHONUSERBASE to any path (even the default), then
+-    dnl his local pip packages will be detected.
+-    PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
+-    AS_IF([test -z "${PYTHONUSERBASE}"], [
+-      PYTHONUSERBASE="${HOME}/.sage/local"
+-    ])
++    dnl Use --clear because ./configure typically clobbers its output files.
++    AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
++                                        --clear                dnl
++                                        --without-pip          dnl
++					config.venv], [
++      AC_MSG_RESULT(yes)
++      dnl strip all comments from install-requires.txt; this should leave
++      dnl only a single line containing the version specification for this
++      dnl package.
++      SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
++      AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++
++      dnl To prevent user-site (pip install --user) packages from being
++      dnl detected as "system" packages, we poison PYTHONUSERBASE. The
++      dnl sage-env script also does this at runtime; we mimic that
++      dnl implementation to ensure that the behaviors at ./configure and
++      dnl runtime are identical. Beware that (as in sage-env) the poisoning
++      dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
++      dnl user points PYTHONUSERBASE to any path (even the default), then
++      dnl his local pip packages will be detected.
++      PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
++      AS_IF([test -z "${PYTHONUSERBASE}"], [
++        PYTHONUSERBASE="${HOME}/.sage/local"
++      ])
+ 
+-    AS_IF(
+-      [PYTHONUSERBASE="${PYTHONUSERBASE}" "${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" 2>/dev/null],
+-      [AC_MSG_RESULT(yes)],
+-      [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+-    )
++      AS_IF(
++        [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
++           "from setuptools.version import pkg_resources;              dnl
++            pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" dnl
++	 2>/dev/null],
++        [AC_MSG_RESULT(yes)],
++        [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
++      )
++
++      PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
++    ], [
++      dnl failed to create a venv for some reason
++      AC_MSG_RESULT(no)
++      sage_spkg_install_$1=yes
++    ])
+ 
+-    PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
++    rm -rf config.venv
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 87646c3264a04ffd98a12d67074f93e1943a1e96 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:38:08 -0400
+Subject: Trac #29665: log SAGE_PYTHON_PACKAGE_CHECK() failures to config.log.
+
+---
+ m4/sage_python_package_check.m4 | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 7cbd6c0..e0e0b9f 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -47,7 +47,8 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
+                                         --clear                dnl
+                                         --without-pip          dnl
+-					config.venv], [
++                                        config.venv            dnl
++                                        2>&AS_MESSAGE_LOG_FD], [
+       AC_MSG_RESULT(yes)
+       dnl strip all comments from install-requires.txt; this should leave
+       dnl only a single line containing the version specification for this
+@@ -72,7 +73,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+         [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
+            "from setuptools.version import pkg_resources;              dnl
+             pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" dnl
+-	 2>/dev/null],
++	 2>&AS_MESSAGE_LOG_FD],
+         [AC_MSG_RESULT(yes)],
+         [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+       )
+-- 
+cgit v1.0-1-gd88e
+
+
+From f7dfffd1c64816e2ae4e0f420b22065c5c5bf2cb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:45:37 -0400
+Subject: Trac #29665: don't clobber a plain file named config.venv.
+
+When SAGE_PYTHON_PACKAGE_CHECK() is cleaning up, we no longer remove
+"config.venv" unconditionally. Instead, we remove it only if it is a
+directory. This is also how "pyvenv --clear" works.
+---
+ m4/sage_python_package_check.m4 | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index e0e0b9f..127a078 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -85,7 +85,9 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+       sage_spkg_install_$1=yes
+     ])
+ 
+-    rm -rf config.venv
++    dnl Clean up config.venv, but only if we could have created it.
++    dnl (The --clear flag to pyvenv will not clobber a plain file.)
++    AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9849c77313b895dcfb786d2ea54e36585bd31ce2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 16 Oct 2021 08:14:42 -0400
+Subject: Trac #29665: don't announce system python packages that won't be
+ used.
+
+When --enable-system-site-packages was not given, the python packages
+using SAGE_PYTHON_PACKAGE_CHECK() in spkg-configure.m4 cannot be used.
+Rather than suggest that users install them anyway, that macro now
+hacks the value of sage_use_system_$package to be "no" when the use
+of system site packages is disabled at the python level.
+---
+ m4/sage_python_package_check.m4 | 17 +++++++++++++++++
+ 1 file changed, 17 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 127a078..7ee82a7 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -89,6 +89,23 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     dnl (The --clear flag to pyvenv will not clobber a plain file.)
+     AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
++    dnl System site packages are disabled.
+     sage_spkg_install_$1=yes
++
++    dnl We have to retroactively hack the --with-system-foo={no,yes,force}
++    dnl mechanism here because it wasn't designed with the ability to
++    dnl disable arbitrary chunks of system packages in mind. The easy cases
++    dnl are "no" and "force" which require no action; "no" means we won't
++    dnl suggest the package anyway, and "force" will raise an error when
++    dnl the system-package check fails.
++    dnl
++    dnl The default of "yes" is more troubling because it is the default. To
++    dnl avoid prompting users to install packages that won't be used, we want
++    dnl to ignore "yes" when reporting the "hint: install these packages..."
++    dnl at the end of ./configure. To accomplish that, we change "yes" to
++    dnl "no" here, essentially changing the default for packages using this
++    dnl macro when --enable-system-site-packages is disabled. Packages with
++    dnl "no" are not suggested to the user.
++    AS_IF([test "${sage_use_system_$1}" = "yes"],[sage_use_system_$1=no])
+   ])
+ ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3e6ad737b94aaac234d615ecaf1a2455eb607f1a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 17 Oct 2021 06:16:21 -0400
+Subject: Trac #29665: add Gentoo package information for python packages.
+
+---
+ build/pkgs/babel/distros/gentoo.txt         | 1 +
+ build/pkgs/bleach/distros/gentoo.txt        | 1 +
+ build/pkgs/certifi/distros/gentoo.txt       | 1 +
+ build/pkgs/cvxopt/distros/gentoo.txt        | 1 +
+ build/pkgs/decorator/distros/gentoo.txt     | 1 +
+ build/pkgs/html5lib/distros/gentoo.txt      | 1 +
+ build/pkgs/idna/distros/gentoo.txt          | 1 +
+ build/pkgs/jinja2/distros/gentoo.txt        | 1 +
+ build/pkgs/matplotlib/distros/gentoo.txt    | 1 +
+ build/pkgs/mpmath/distros/gentoo.txt        | 1 +
+ build/pkgs/networkx/distros/gentoo.txt      | 1 +
+ build/pkgs/numpy/distros/gentoo.txt         | 1 +
+ build/pkgs/packaging/distros/gentoo.txt     | 1 +
+ build/pkgs/pandocfilters/distros/gentoo.txt | 1 +
+ build/pkgs/pickleshare/distros/gentoo.txt   | 1 +
+ build/pkgs/pillow/distros/gentoo.txt        | 1 +
+ build/pkgs/pluggy/distros/gentoo.txt        | 1 +
+ build/pkgs/pygments/distros/gentoo.txt      | 1 +
+ build/pkgs/pytz/distros/gentoo.txt          | 1 +
+ build/pkgs/pyzmq/distros/gentoo.txt         | 1 +
+ build/pkgs/requests/distros/gentoo.txt      | 1 +
+ build/pkgs/scipy/distros/gentoo.txt         | 1 +
+ build/pkgs/setuptools/distros/gentoo.txt    | 1 +
+ build/pkgs/six/distros/gentoo.txt           | 1 +
+ build/pkgs/sympy/distros/gentoo.txt         | 1 +
+ build/pkgs/texttable/distros/gentoo.txt     | 1 +
+ build/pkgs/toml/distros/gentoo.txt          | 1 +
+ build/pkgs/webencodings/distros/gentoo.txt  | 1 +
+ 28 files changed, 28 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/gentoo.txt
+ create mode 100644 build/pkgs/bleach/distros/gentoo.txt
+ create mode 100644 build/pkgs/certifi/distros/gentoo.txt
+ create mode 100644 build/pkgs/cvxopt/distros/gentoo.txt
+ create mode 100644 build/pkgs/decorator/distros/gentoo.txt
+ create mode 100644 build/pkgs/html5lib/distros/gentoo.txt
+ create mode 100644 build/pkgs/idna/distros/gentoo.txt
+ create mode 100644 build/pkgs/jinja2/distros/gentoo.txt
+ create mode 100644 build/pkgs/matplotlib/distros/gentoo.txt
+ create mode 100644 build/pkgs/mpmath/distros/gentoo.txt
+ create mode 100644 build/pkgs/networkx/distros/gentoo.txt
+ create mode 100644 build/pkgs/numpy/distros/gentoo.txt
+ create mode 100644 build/pkgs/packaging/distros/gentoo.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/gentoo.txt
+ create mode 100644 build/pkgs/pickleshare/distros/gentoo.txt
+ create mode 100644 build/pkgs/pillow/distros/gentoo.txt
+ create mode 100644 build/pkgs/pluggy/distros/gentoo.txt
+ create mode 100644 build/pkgs/pygments/distros/gentoo.txt
+ create mode 100644 build/pkgs/pytz/distros/gentoo.txt
+ create mode 100644 build/pkgs/pyzmq/distros/gentoo.txt
+ create mode 100644 build/pkgs/requests/distros/gentoo.txt
+ create mode 100644 build/pkgs/scipy/distros/gentoo.txt
+ create mode 100644 build/pkgs/setuptools/distros/gentoo.txt
+ create mode 100644 build/pkgs/six/distros/gentoo.txt
+ create mode 100644 build/pkgs/sympy/distros/gentoo.txt
+ create mode 100644 build/pkgs/texttable/distros/gentoo.txt
+ create mode 100644 build/pkgs/toml/distros/gentoo.txt
+ create mode 100644 build/pkgs/webencodings/distros/gentoo.txt
+
+diff --git a/build/pkgs/babel/distros/gentoo.txt b/build/pkgs/babel/distros/gentoo.txt
+new file mode 100644
+index 00000000..2d2c34f
+--- /dev/null
++++ b/build/pkgs/babel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/Babel
+diff --git a/build/pkgs/bleach/distros/gentoo.txt b/build/pkgs/bleach/distros/gentoo.txt
+new file mode 100644
+index 00000000..b4f9744
+--- /dev/null
++++ b/build/pkgs/bleach/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/bleach
+diff --git a/build/pkgs/certifi/distros/gentoo.txt b/build/pkgs/certifi/distros/gentoo.txt
+new file mode 100644
+index 00000000..72e2e91
+--- /dev/null
++++ b/build/pkgs/certifi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/certifi
+diff --git a/build/pkgs/cvxopt/distros/gentoo.txt b/build/pkgs/cvxopt/distros/gentoo.txt
+new file mode 100644
+index 00000000..b312391
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/cvxopt
+diff --git a/build/pkgs/decorator/distros/gentoo.txt b/build/pkgs/decorator/distros/gentoo.txt
+new file mode 100644
+index 00000000..fea5a67
+--- /dev/null
++++ b/build/pkgs/decorator/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/decorator
+diff --git a/build/pkgs/html5lib/distros/gentoo.txt b/build/pkgs/html5lib/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c2be76
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/html5lib
+diff --git a/build/pkgs/idna/distros/gentoo.txt b/build/pkgs/idna/distros/gentoo.txt
+new file mode 100644
+index 00000000..68ef51c
+--- /dev/null
++++ b/build/pkgs/idna/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/idna
+diff --git a/build/pkgs/jinja2/distros/gentoo.txt b/build/pkgs/jinja2/distros/gentoo.txt
+new file mode 100644
+index 00000000..15a27ae
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jinja
+diff --git a/build/pkgs/matplotlib/distros/gentoo.txt b/build/pkgs/matplotlib/distros/gentoo.txt
+new file mode 100644
+index 00000000..bcfefb5
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/matplotlib
+diff --git a/build/pkgs/mpmath/distros/gentoo.txt b/build/pkgs/mpmath/distros/gentoo.txt
+new file mode 100644
+index 00000000..946c62d
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/mpmath
+diff --git a/build/pkgs/networkx/distros/gentoo.txt b/build/pkgs/networkx/distros/gentoo.txt
+new file mode 100644
+index 00000000..dd97742
+--- /dev/null
++++ b/build/pkgs/networkx/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/networkx
+diff --git a/build/pkgs/numpy/distros/gentoo.txt b/build/pkgs/numpy/distros/gentoo.txt
+new file mode 100644
+index 00000000..d2179d4
+--- /dev/null
++++ b/build/pkgs/numpy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/numpy
+diff --git a/build/pkgs/packaging/distros/gentoo.txt b/build/pkgs/packaging/distros/gentoo.txt
+new file mode 100644
+index 00000000..e5309ed
+--- /dev/null
++++ b/build/pkgs/packaging/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/packaging
+diff --git a/build/pkgs/pandocfilters/distros/gentoo.txt b/build/pkgs/pandocfilters/distros/gentoo.txt
+new file mode 100644
+index 00000000..a726fda
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/gentoo.txt b/build/pkgs/pickleshare/distros/gentoo.txt
+new file mode 100644
+index 00000000..14fad0f
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pickleshare
+diff --git a/build/pkgs/pillow/distros/gentoo.txt b/build/pkgs/pillow/distros/gentoo.txt
+new file mode 100644
+index 00000000..1243649
+--- /dev/null
++++ b/build/pkgs/pillow/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pillow
+diff --git a/build/pkgs/pluggy/distros/gentoo.txt b/build/pkgs/pluggy/distros/gentoo.txt
+new file mode 100644
+index 00000000..7b33876
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pluggy
+diff --git a/build/pkgs/pygments/distros/gentoo.txt b/build/pkgs/pygments/distros/gentoo.txt
+new file mode 100644
+index 00000000..a584f32
+--- /dev/null
++++ b/build/pkgs/pygments/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pygments
+diff --git a/build/pkgs/pytz/distros/gentoo.txt b/build/pkgs/pytz/distros/gentoo.txt
+new file mode 100644
+index 00000000..902a18b
+--- /dev/null
++++ b/build/pkgs/pytz/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pytz
+diff --git a/build/pkgs/pyzmq/distros/gentoo.txt b/build/pkgs/pyzmq/distros/gentoo.txt
+new file mode 100644
+index 00000000..77c2429
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyzmq
+diff --git a/build/pkgs/requests/distros/gentoo.txt b/build/pkgs/requests/distros/gentoo.txt
+new file mode 100644
+index 00000000..d3dc941
+--- /dev/null
++++ b/build/pkgs/requests/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/requests
+diff --git a/build/pkgs/scipy/distros/gentoo.txt b/build/pkgs/scipy/distros/gentoo.txt
+new file mode 100644
+index 00000000..11dabd2
+--- /dev/null
++++ b/build/pkgs/scipy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/scipy
+diff --git a/build/pkgs/setuptools/distros/gentoo.txt b/build/pkgs/setuptools/distros/gentoo.txt
+new file mode 100644
+index 00000000..3a4fa34
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/setuptools
+diff --git a/build/pkgs/six/distros/gentoo.txt b/build/pkgs/six/distros/gentoo.txt
+new file mode 100644
+index 00000000..f73f648
+--- /dev/null
++++ b/build/pkgs/six/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/six
+diff --git a/build/pkgs/sympy/distros/gentoo.txt b/build/pkgs/sympy/distros/gentoo.txt
+new file mode 100644
+index 00000000..b5a5034
+--- /dev/null
++++ b/build/pkgs/sympy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sympy
+diff --git a/build/pkgs/texttable/distros/gentoo.txt b/build/pkgs/texttable/distros/gentoo.txt
+new file mode 100644
+index 00000000..b33a7a7
+--- /dev/null
++++ b/build/pkgs/texttable/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/texttable
+diff --git a/build/pkgs/toml/distros/gentoo.txt b/build/pkgs/toml/distros/gentoo.txt
+new file mode 100644
+index 00000000..64fcea3
+--- /dev/null
++++ b/build/pkgs/toml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/toml
+diff --git a/build/pkgs/webencodings/distros/gentoo.txt b/build/pkgs/webencodings/distros/gentoo.txt
+new file mode 100644
+index 00000000..7539b0f
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/webencodings
+-- 
+cgit v1.0-1-gd88e
+
+
+From 088380f884124c9608160b613ba031c5f023f604 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 18:43:04 -0700
+Subject: build/pkgs: Add distros/fedora.txt for Python packages
+
+---
+ build/pkgs/babel/distros/fedora.txt         | 1 +
+ build/pkgs/bleach/distros/fedora.txt        | 1 +
+ build/pkgs/certifi/distros/fedora.txt       | 1 +
+ build/pkgs/cvxopt/distros/fedora.txt        | 1 +
+ build/pkgs/decorator/distros/fedora.txt     | 1 +
+ build/pkgs/html5lib/distros/fedora.txt      | 1 +
+ build/pkgs/idna/distros/fedora.txt          | 1 +
+ build/pkgs/jinja2/distros/fedora.txt        | 1 +
+ build/pkgs/matplotlib/distros/fedora.txt    | 1 +
+ build/pkgs/mpmath/distros/fedora.txt        | 1 +
+ build/pkgs/networkx/distros/fedora.txt      | 1 +
+ build/pkgs/numpy/distros/fedora.txt         | 1 +
+ build/pkgs/packaging/distros/fedora.txt     | 1 +
+ build/pkgs/pandocfilters/distros/fedora.txt | 1 +
+ build/pkgs/pickleshare/distros/fedora.txt   | 1 +
+ build/pkgs/pillow/distros/fedora.txt        | 1 +
+ build/pkgs/pluggy/distros/fedora.txt        | 1 +
+ build/pkgs/py/distros/fedora.txt            | 1 +
+ build/pkgs/pygments/distros/fedora.txt      | 1 +
+ build/pkgs/pytz/distros/fedora.txt          | 1 +
+ build/pkgs/pyzmq/distros/fedora.txt         | 1 +
+ build/pkgs/requests/distros/fedora.txt      | 1 +
+ build/pkgs/scipy/distros/fedora.txt         | 1 +
+ build/pkgs/setuptools/distros/fedora.txt    | 1 +
+ build/pkgs/six/distros/fedora.txt           | 1 +
+ build/pkgs/sympy/distros/fedora.txt         | 1 +
+ build/pkgs/texttable/distros/fedora.txt     | 1 +
+ build/pkgs/toml/distros/fedora.txt          | 1 +
+ build/pkgs/webencodings/distros/fedora.txt  | 1 +
+ build/pkgs/wheel/distros/fedora.txt         | 1 +
+ 30 files changed, 30 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/fedora.txt
+ create mode 100644 build/pkgs/bleach/distros/fedora.txt
+ create mode 100644 build/pkgs/certifi/distros/fedora.txt
+ create mode 100644 build/pkgs/cvxopt/distros/fedora.txt
+ create mode 100644 build/pkgs/decorator/distros/fedora.txt
+ create mode 100644 build/pkgs/html5lib/distros/fedora.txt
+ create mode 100644 build/pkgs/idna/distros/fedora.txt
+ create mode 100644 build/pkgs/jinja2/distros/fedora.txt
+ create mode 100644 build/pkgs/matplotlib/distros/fedora.txt
+ create mode 100644 build/pkgs/mpmath/distros/fedora.txt
+ create mode 100644 build/pkgs/networkx/distros/fedora.txt
+ create mode 100644 build/pkgs/numpy/distros/fedora.txt
+ create mode 100644 build/pkgs/packaging/distros/fedora.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/fedora.txt
+ create mode 100644 build/pkgs/pickleshare/distros/fedora.txt
+ create mode 100644 build/pkgs/pillow/distros/fedora.txt
+ create mode 100644 build/pkgs/pluggy/distros/fedora.txt
+ create mode 100644 build/pkgs/py/distros/fedora.txt
+ create mode 100644 build/pkgs/pygments/distros/fedora.txt
+ create mode 100644 build/pkgs/pytz/distros/fedora.txt
+ create mode 100644 build/pkgs/pyzmq/distros/fedora.txt
+ create mode 100644 build/pkgs/requests/distros/fedora.txt
+ create mode 100644 build/pkgs/scipy/distros/fedora.txt
+ create mode 100644 build/pkgs/setuptools/distros/fedora.txt
+ create mode 100644 build/pkgs/six/distros/fedora.txt
+ create mode 100644 build/pkgs/sympy/distros/fedora.txt
+ create mode 100644 build/pkgs/texttable/distros/fedora.txt
+ create mode 100644 build/pkgs/toml/distros/fedora.txt
+ create mode 100644 build/pkgs/webencodings/distros/fedora.txt
+ create mode 100644 build/pkgs/wheel/distros/fedora.txt
+
+diff --git a/build/pkgs/babel/distros/fedora.txt b/build/pkgs/babel/distros/fedora.txt
+new file mode 100644
+index 00000000..98f6593
+--- /dev/null
++++ b/build/pkgs/babel/distros/fedora.txt
+@@ -0,0 +1 @@
++babel
+diff --git a/build/pkgs/bleach/distros/fedora.txt b/build/pkgs/bleach/distros/fedora.txt
+new file mode 100644
+index 00000000..c5422cc
+--- /dev/null
++++ b/build/pkgs/bleach/distros/fedora.txt
+@@ -0,0 +1 @@
++python-bleach
+diff --git a/build/pkgs/certifi/distros/fedora.txt b/build/pkgs/certifi/distros/fedora.txt
+new file mode 100644
+index 00000000..be421c8
+--- /dev/null
++++ b/build/pkgs/certifi/distros/fedora.txt
+@@ -0,0 +1 @@
++python-certifi
+diff --git a/build/pkgs/cvxopt/distros/fedora.txt b/build/pkgs/cvxopt/distros/fedora.txt
+new file mode 100644
+index 00000000..f15770f
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/fedora.txt
+@@ -0,0 +1 @@
++python-cvxopt
+diff --git a/build/pkgs/decorator/distros/fedora.txt b/build/pkgs/decorator/distros/fedora.txt
+new file mode 100644
+index 00000000..0795604
+--- /dev/null
++++ b/build/pkgs/decorator/distros/fedora.txt
+@@ -0,0 +1 @@
++python-decorator
+diff --git a/build/pkgs/html5lib/distros/fedora.txt b/build/pkgs/html5lib/distros/fedora.txt
+new file mode 100644
+index 00000000..b821491
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/fedora.txt
+@@ -0,0 +1 @@
++python-html5lib
+diff --git a/build/pkgs/idna/distros/fedora.txt b/build/pkgs/idna/distros/fedora.txt
+new file mode 100644
+index 00000000..a73e70c
+--- /dev/null
++++ b/build/pkgs/idna/distros/fedora.txt
+@@ -0,0 +1 @@
++python-idna
+diff --git a/build/pkgs/jinja2/distros/fedora.txt b/build/pkgs/jinja2/distros/fedora.txt
+new file mode 100644
+index 00000000..f5f3caf
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/fedora.txt
+@@ -0,0 +1 @@
++python-jinja2
+diff --git a/build/pkgs/matplotlib/distros/fedora.txt b/build/pkgs/matplotlib/distros/fedora.txt
+new file mode 100644
+index 00000000..f6d856e
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/fedora.txt
+@@ -0,0 +1 @@
++python-matplotlib
+diff --git a/build/pkgs/mpmath/distros/fedora.txt b/build/pkgs/mpmath/distros/fedora.txt
+new file mode 100644
+index 00000000..a7dc8d5
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/fedora.txt
+@@ -0,0 +1 @@
++python-mpmath
+diff --git a/build/pkgs/networkx/distros/fedora.txt b/build/pkgs/networkx/distros/fedora.txt
+new file mode 100644
+index 00000000..293f943
+--- /dev/null
++++ b/build/pkgs/networkx/distros/fedora.txt
+@@ -0,0 +1 @@
++python-networkx
+diff --git a/build/pkgs/numpy/distros/fedora.txt b/build/pkgs/numpy/distros/fedora.txt
+new file mode 100644
+index 00000000..c8722b9
+--- /dev/null
++++ b/build/pkgs/numpy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-numpy
+diff --git a/build/pkgs/packaging/distros/fedora.txt b/build/pkgs/packaging/distros/fedora.txt
+new file mode 100644
+index 00000000..02ad855
+--- /dev/null
++++ b/build/pkgs/packaging/distros/fedora.txt
+@@ -0,0 +1 @@
++python-packaging
+diff --git a/build/pkgs/pandocfilters/distros/fedora.txt b/build/pkgs/pandocfilters/distros/fedora.txt
+new file mode 100644
+index 00000000..e7a86d0
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/fedora.txt b/build/pkgs/pickleshare/distros/fedora.txt
+new file mode 100644
+index 00000000..6d991a2
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pickleshare
+diff --git a/build/pkgs/pillow/distros/fedora.txt b/build/pkgs/pillow/distros/fedora.txt
+new file mode 100644
+index 00000000..86dbb1d
+--- /dev/null
++++ b/build/pkgs/pillow/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pillow
+diff --git a/build/pkgs/pluggy/distros/fedora.txt b/build/pkgs/pluggy/distros/fedora.txt
+new file mode 100644
+index 00000000..c869e54
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pluggy
+diff --git a/build/pkgs/py/distros/fedora.txt b/build/pkgs/py/distros/fedora.txt
+new file mode 100644
+index 00000000..b348d39
+--- /dev/null
++++ b/build/pkgs/py/distros/fedora.txt
+@@ -0,0 +1 @@
++python-py
+diff --git a/build/pkgs/pygments/distros/fedora.txt b/build/pkgs/pygments/distros/fedora.txt
+new file mode 100644
+index 00000000..f3e72a8
+--- /dev/null
++++ b/build/pkgs/pygments/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pygments
+diff --git a/build/pkgs/pytz/distros/fedora.txt b/build/pkgs/pytz/distros/fedora.txt
+new file mode 100644
+index 00000000..2cccc9e
+--- /dev/null
++++ b/build/pkgs/pytz/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pytz
+diff --git a/build/pkgs/pyzmq/distros/fedora.txt b/build/pkgs/pyzmq/distros/fedora.txt
+new file mode 100644
+index 00000000..23f64d1
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pyzmq
+diff --git a/build/pkgs/requests/distros/fedora.txt b/build/pkgs/requests/distros/fedora.txt
+new file mode 100644
+index 00000000..93a7bc1
+--- /dev/null
++++ b/build/pkgs/requests/distros/fedora.txt
+@@ -0,0 +1 @@
++python-requests
+diff --git a/build/pkgs/scipy/distros/fedora.txt b/build/pkgs/scipy/distros/fedora.txt
+new file mode 100644
+index 00000000..7ff2882
+--- /dev/null
++++ b/build/pkgs/scipy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-scipy
+diff --git a/build/pkgs/setuptools/distros/fedora.txt b/build/pkgs/setuptools/distros/fedora.txt
+new file mode 100644
+index 00000000..e1ad178
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/fedora.txt
+@@ -0,0 +1 @@
++python-setuptools
+diff --git a/build/pkgs/six/distros/fedora.txt b/build/pkgs/six/distros/fedora.txt
+new file mode 100644
+index 00000000..787c530
+--- /dev/null
++++ b/build/pkgs/six/distros/fedora.txt
+@@ -0,0 +1 @@
++python-six
+diff --git a/build/pkgs/sympy/distros/fedora.txt b/build/pkgs/sympy/distros/fedora.txt
+new file mode 100644
+index 00000000..126c88a
+--- /dev/null
++++ b/build/pkgs/sympy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-sympy
+diff --git a/build/pkgs/texttable/distros/fedora.txt b/build/pkgs/texttable/distros/fedora.txt
+new file mode 100644
+index 00000000..8d1ccec
+--- /dev/null
++++ b/build/pkgs/texttable/distros/fedora.txt
+@@ -0,0 +1 @@
++python-texttable
+diff --git a/build/pkgs/toml/distros/fedora.txt b/build/pkgs/toml/distros/fedora.txt
+new file mode 100644
+index 00000000..821ee77
+--- /dev/null
++++ b/build/pkgs/toml/distros/fedora.txt
+@@ -0,0 +1 @@
++python-toml
+diff --git a/build/pkgs/webencodings/distros/fedora.txt b/build/pkgs/webencodings/distros/fedora.txt
+new file mode 100644
+index 00000000..12ddba9
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/fedora.txt
+@@ -0,0 +1 @@
++python-webencodings
+diff --git a/build/pkgs/wheel/distros/fedora.txt b/build/pkgs/wheel/distros/fedora.txt
+new file mode 100644
+index 00000000..ae4cbb9
+--- /dev/null
++++ b/build/pkgs/wheel/distros/fedora.txt
+@@ -0,0 +1 @@
++python-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From ad1d5a20380b147c774903066031442f31094626 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 21:04:04 -0700
+Subject: build/pkgs: Add distros/arch.txt for Python packages
+
+---
+ build/pkgs/babel/distros/arch.txt         | 1 +
+ build/pkgs/bleach/distros/arch.txt        | 1 +
+ build/pkgs/certifi/distros/arch.txt       | 1 +
+ build/pkgs/cvxopt/distros/arch.txt        | 1 +
+ build/pkgs/decorator/distros/arch.txt     | 1 +
+ build/pkgs/html5lib/distros/arch.txt      | 1 +
+ build/pkgs/idna/distros/arch.txt          | 1 +
+ build/pkgs/matplotlib/distros/arch.txt    | 1 +
+ build/pkgs/mpmath/distros/arch.txt        | 1 +
+ build/pkgs/networkx/distros/arch.txt      | 1 +
+ build/pkgs/numpy/distros/arch.txt         | 1 +
+ build/pkgs/packaging/distros/arch.txt     | 1 +
+ build/pkgs/pandocfilters/distros/arch.txt | 1 +
+ build/pkgs/pickleshare/distros/arch.txt   | 1 +
+ build/pkgs/pillow/distros/arch.txt        | 1 +
+ build/pkgs/pluggy/distros/arch.txt        | 1 +
+ build/pkgs/py/distros/arch.txt            | 1 +
+ build/pkgs/pygments/distros/arch.txt      | 1 +
+ build/pkgs/pytz/distros/arch.txt          | 1 +
+ build/pkgs/pyzmq/distros/arch.txt         | 1 +
+ build/pkgs/requests/distros/arch.txt      | 1 +
+ build/pkgs/scipy/distros/arch.txt         | 1 +
+ build/pkgs/setuptools/distros/arch.txt    | 1 +
+ build/pkgs/six/distros/arch.txt           | 1 +
+ build/pkgs/sympy/distros/arch.txt         | 1 +
+ build/pkgs/texttable/distros/arch.txt     | 1 +
+ build/pkgs/toml/distros/arch.txt          | 1 +
+ build/pkgs/webencodings/distros/arch.txt  | 1 +
+ build/pkgs/wheel/distros/arch.txt         | 1 +
+ 29 files changed, 29 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/arch.txt
+ create mode 100644 build/pkgs/bleach/distros/arch.txt
+ create mode 100644 build/pkgs/certifi/distros/arch.txt
+ create mode 100644 build/pkgs/cvxopt/distros/arch.txt
+ create mode 100644 build/pkgs/decorator/distros/arch.txt
+ create mode 100644 build/pkgs/html5lib/distros/arch.txt
+ create mode 100644 build/pkgs/idna/distros/arch.txt
+ create mode 100644 build/pkgs/matplotlib/distros/arch.txt
+ create mode 100644 build/pkgs/mpmath/distros/arch.txt
+ create mode 100644 build/pkgs/networkx/distros/arch.txt
+ create mode 100644 build/pkgs/numpy/distros/arch.txt
+ create mode 100644 build/pkgs/packaging/distros/arch.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/arch.txt
+ create mode 100644 build/pkgs/pickleshare/distros/arch.txt
+ create mode 100644 build/pkgs/pillow/distros/arch.txt
+ create mode 100644 build/pkgs/pluggy/distros/arch.txt
+ create mode 100644 build/pkgs/py/distros/arch.txt
+ create mode 100644 build/pkgs/pygments/distros/arch.txt
+ create mode 100644 build/pkgs/pytz/distros/arch.txt
+ create mode 100644 build/pkgs/pyzmq/distros/arch.txt
+ create mode 100644 build/pkgs/requests/distros/arch.txt
+ create mode 100644 build/pkgs/scipy/distros/arch.txt
+ create mode 100644 build/pkgs/setuptools/distros/arch.txt
+ create mode 100644 build/pkgs/six/distros/arch.txt
+ create mode 100644 build/pkgs/sympy/distros/arch.txt
+ create mode 100644 build/pkgs/texttable/distros/arch.txt
+ create mode 100644 build/pkgs/toml/distros/arch.txt
+ create mode 100644 build/pkgs/webencodings/distros/arch.txt
+ create mode 100644 build/pkgs/wheel/distros/arch.txt
+
+diff --git a/build/pkgs/babel/distros/arch.txt b/build/pkgs/babel/distros/arch.txt
+new file mode 100644
+index 00000000..f2d828c
+--- /dev/null
++++ b/build/pkgs/babel/distros/arch.txt
+@@ -0,0 +1 @@
++python-babel
+diff --git a/build/pkgs/bleach/distros/arch.txt b/build/pkgs/bleach/distros/arch.txt
+new file mode 100644
+index 00000000..c5422cc
+--- /dev/null
++++ b/build/pkgs/bleach/distros/arch.txt
+@@ -0,0 +1 @@
++python-bleach
+diff --git a/build/pkgs/certifi/distros/arch.txt b/build/pkgs/certifi/distros/arch.txt
+new file mode 100644
+index 00000000..be421c8
+--- /dev/null
++++ b/build/pkgs/certifi/distros/arch.txt
+@@ -0,0 +1 @@
++python-certifi
+diff --git a/build/pkgs/cvxopt/distros/arch.txt b/build/pkgs/cvxopt/distros/arch.txt
+new file mode 100644
+index 00000000..f15770f
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/arch.txt
+@@ -0,0 +1 @@
++python-cvxopt
+diff --git a/build/pkgs/decorator/distros/arch.txt b/build/pkgs/decorator/distros/arch.txt
+new file mode 100644
+index 00000000..0795604
+--- /dev/null
++++ b/build/pkgs/decorator/distros/arch.txt
+@@ -0,0 +1 @@
++python-decorator
+diff --git a/build/pkgs/html5lib/distros/arch.txt b/build/pkgs/html5lib/distros/arch.txt
+new file mode 100644
+index 00000000..b821491
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/arch.txt
+@@ -0,0 +1 @@
++python-html5lib
+diff --git a/build/pkgs/idna/distros/arch.txt b/build/pkgs/idna/distros/arch.txt
+new file mode 100644
+index 00000000..a73e70c
+--- /dev/null
++++ b/build/pkgs/idna/distros/arch.txt
+@@ -0,0 +1 @@
++python-idna
+diff --git a/build/pkgs/matplotlib/distros/arch.txt b/build/pkgs/matplotlib/distros/arch.txt
+new file mode 100644
+index 00000000..f6d856e
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/arch.txt
+@@ -0,0 +1 @@
++python-matplotlib
+diff --git a/build/pkgs/mpmath/distros/arch.txt b/build/pkgs/mpmath/distros/arch.txt
+new file mode 100644
+index 00000000..a7dc8d5
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/arch.txt
+@@ -0,0 +1 @@
++python-mpmath
+diff --git a/build/pkgs/networkx/distros/arch.txt b/build/pkgs/networkx/distros/arch.txt
+new file mode 100644
+index 00000000..293f943
+--- /dev/null
++++ b/build/pkgs/networkx/distros/arch.txt
+@@ -0,0 +1 @@
++python-networkx
+diff --git a/build/pkgs/numpy/distros/arch.txt b/build/pkgs/numpy/distros/arch.txt
+new file mode 100644
+index 00000000..c8722b9
+--- /dev/null
++++ b/build/pkgs/numpy/distros/arch.txt
+@@ -0,0 +1 @@
++python-numpy
+diff --git a/build/pkgs/packaging/distros/arch.txt b/build/pkgs/packaging/distros/arch.txt
+new file mode 100644
+index 00000000..02ad855
+--- /dev/null
++++ b/build/pkgs/packaging/distros/arch.txt
+@@ -0,0 +1 @@
++python-packaging
+diff --git a/build/pkgs/pandocfilters/distros/arch.txt b/build/pkgs/pandocfilters/distros/arch.txt
+new file mode 100644
+index 00000000..e7a86d0
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/arch.txt
+@@ -0,0 +1 @@
++python-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/arch.txt b/build/pkgs/pickleshare/distros/arch.txt
+new file mode 100644
+index 00000000..6d991a2
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/arch.txt
+@@ -0,0 +1 @@
++python-pickleshare
+diff --git a/build/pkgs/pillow/distros/arch.txt b/build/pkgs/pillow/distros/arch.txt
+new file mode 100644
+index 00000000..86dbb1d
+--- /dev/null
++++ b/build/pkgs/pillow/distros/arch.txt
+@@ -0,0 +1 @@
++python-pillow
+diff --git a/build/pkgs/pluggy/distros/arch.txt b/build/pkgs/pluggy/distros/arch.txt
+new file mode 100644
+index 00000000..c869e54
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/arch.txt
+@@ -0,0 +1 @@
++python-pluggy
+diff --git a/build/pkgs/py/distros/arch.txt b/build/pkgs/py/distros/arch.txt
+new file mode 100644
+index 00000000..b348d39
+--- /dev/null
++++ b/build/pkgs/py/distros/arch.txt
+@@ -0,0 +1 @@
++python-py
+diff --git a/build/pkgs/pygments/distros/arch.txt b/build/pkgs/pygments/distros/arch.txt
+new file mode 100644
+index 00000000..f3e72a8
+--- /dev/null
++++ b/build/pkgs/pygments/distros/arch.txt
+@@ -0,0 +1 @@
++python-pygments
+diff --git a/build/pkgs/pytz/distros/arch.txt b/build/pkgs/pytz/distros/arch.txt
+new file mode 100644
+index 00000000..2cccc9e
+--- /dev/null
++++ b/build/pkgs/pytz/distros/arch.txt
+@@ -0,0 +1 @@
++python-pytz
+diff --git a/build/pkgs/pyzmq/distros/arch.txt b/build/pkgs/pyzmq/distros/arch.txt
+new file mode 100644
+index 00000000..23f64d1
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/arch.txt
+@@ -0,0 +1 @@
++python-pyzmq
+diff --git a/build/pkgs/requests/distros/arch.txt b/build/pkgs/requests/distros/arch.txt
+new file mode 100644
+index 00000000..93a7bc1
+--- /dev/null
++++ b/build/pkgs/requests/distros/arch.txt
+@@ -0,0 +1 @@
++python-requests
+diff --git a/build/pkgs/scipy/distros/arch.txt b/build/pkgs/scipy/distros/arch.txt
+new file mode 100644
+index 00000000..7ff2882
+--- /dev/null
++++ b/build/pkgs/scipy/distros/arch.txt
+@@ -0,0 +1 @@
++python-scipy
+diff --git a/build/pkgs/setuptools/distros/arch.txt b/build/pkgs/setuptools/distros/arch.txt
+new file mode 100644
+index 00000000..e1ad178
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/arch.txt
+@@ -0,0 +1 @@
++python-setuptools
+diff --git a/build/pkgs/six/distros/arch.txt b/build/pkgs/six/distros/arch.txt
+new file mode 100644
+index 00000000..787c530
+--- /dev/null
++++ b/build/pkgs/six/distros/arch.txt
+@@ -0,0 +1 @@
++python-six
+diff --git a/build/pkgs/sympy/distros/arch.txt b/build/pkgs/sympy/distros/arch.txt
+new file mode 100644
+index 00000000..126c88a
+--- /dev/null
++++ b/build/pkgs/sympy/distros/arch.txt
+@@ -0,0 +1 @@
++python-sympy
+diff --git a/build/pkgs/texttable/distros/arch.txt b/build/pkgs/texttable/distros/arch.txt
+new file mode 100644
+index 00000000..8d1ccec
+--- /dev/null
++++ b/build/pkgs/texttable/distros/arch.txt
+@@ -0,0 +1 @@
++python-texttable
+diff --git a/build/pkgs/toml/distros/arch.txt b/build/pkgs/toml/distros/arch.txt
+new file mode 100644
+index 00000000..821ee77
+--- /dev/null
++++ b/build/pkgs/toml/distros/arch.txt
+@@ -0,0 +1 @@
++python-toml
+diff --git a/build/pkgs/webencodings/distros/arch.txt b/build/pkgs/webencodings/distros/arch.txt
+new file mode 100644
+index 00000000..12ddba9
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/arch.txt
+@@ -0,0 +1 @@
++python-webencodings
+diff --git a/build/pkgs/wheel/distros/arch.txt b/build/pkgs/wheel/distros/arch.txt
+new file mode 100644
+index 00000000..ae4cbb9
+--- /dev/null
++++ b/build/pkgs/wheel/distros/arch.txt
+@@ -0,0 +1 @@
++python-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5087abee08f2a89ddaf422ec72a84575fe724a79 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 21:20:56 -0700
+Subject: build/pkgs: Add distros/opensuse.txt for Python packages
+
+---
+ build/pkgs/bleach/distros/opensuse.txt        | 1 +
+ build/pkgs/cvxopt/distros/opensuse.txt        | 1 +
+ build/pkgs/html5lib/distros/opensuse.txt      | 1 +
+ build/pkgs/idna/distros/opensuse.txt          | 1 +
+ build/pkgs/jinja2/distros/opensuse.txt        | 2 +-
+ build/pkgs/mpmath/distros/opensuse.txt        | 1 +
+ build/pkgs/numpy/distros/opensuse.txt         | 1 +
+ build/pkgs/packaging/distros/opensuse.txt     | 1 +
+ build/pkgs/pandocfilters/distros/opensuse.txt | 1 +
+ build/pkgs/pluggy/distros/opensuse.txt        | 1 +
+ build/pkgs/py/distros/opensuse.txt            | 1 +
+ build/pkgs/pygments/distros/opensuse.txt      | 2 +-
+ build/pkgs/sympy/distros/opensuse.txt         | 1 +
+ build/pkgs/texttable/distros/opensuse.txt     | 1 +
+ build/pkgs/toml/distros/opensuse.txt          | 1 +
+ 15 files changed, 15 insertions(+), 2 deletions(-)
+ create mode 100644 build/pkgs/bleach/distros/opensuse.txt
+ create mode 100644 build/pkgs/cvxopt/distros/opensuse.txt
+ create mode 100644 build/pkgs/html5lib/distros/opensuse.txt
+ create mode 100644 build/pkgs/idna/distros/opensuse.txt
+ create mode 100644 build/pkgs/mpmath/distros/opensuse.txt
+ create mode 100644 build/pkgs/numpy/distros/opensuse.txt
+ create mode 100644 build/pkgs/packaging/distros/opensuse.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/opensuse.txt
+ create mode 100644 build/pkgs/pluggy/distros/opensuse.txt
+ create mode 100644 build/pkgs/py/distros/opensuse.txt
+ create mode 100644 build/pkgs/sympy/distros/opensuse.txt
+ create mode 100644 build/pkgs/texttable/distros/opensuse.txt
+ create mode 100644 build/pkgs/toml/distros/opensuse.txt
+
+diff --git a/build/pkgs/bleach/distros/opensuse.txt b/build/pkgs/bleach/distros/opensuse.txt
+new file mode 100644
+index 00000000..6d37c4c
+--- /dev/null
++++ b/build/pkgs/bleach/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-bleach
+diff --git a/build/pkgs/cvxopt/distros/opensuse.txt b/build/pkgs/cvxopt/distros/opensuse.txt
+new file mode 100644
+index 00000000..2bb6ad1
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-cvxopt
+diff --git a/build/pkgs/html5lib/distros/opensuse.txt b/build/pkgs/html5lib/distros/opensuse.txt
+new file mode 100644
+index 00000000..6d7b8df
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-html5lib
+diff --git a/build/pkgs/idna/distros/opensuse.txt b/build/pkgs/idna/distros/opensuse.txt
+new file mode 100644
+index 00000000..de48e70
+--- /dev/null
++++ b/build/pkgs/idna/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-idna
+diff --git a/build/pkgs/jinja2/distros/opensuse.txt b/build/pkgs/jinja2/distros/opensuse.txt
+index 5d90a22..f2db865 100644
+--- a/build/pkgs/jinja2/distros/opensuse.txt
++++ b/build/pkgs/jinja2/distros/opensuse.txt
+@@ -1 +1 @@
+-python3-Jinja2
++python3-jinja2
+diff --git a/build/pkgs/mpmath/distros/opensuse.txt b/build/pkgs/mpmath/distros/opensuse.txt
+new file mode 100644
+index 00000000..fbc82a9
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-mpmath
+diff --git a/build/pkgs/numpy/distros/opensuse.txt b/build/pkgs/numpy/distros/opensuse.txt
+new file mode 100644
+index 00000000..79d5c5a
+--- /dev/null
++++ b/build/pkgs/numpy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-numpy
+diff --git a/build/pkgs/packaging/distros/opensuse.txt b/build/pkgs/packaging/distros/opensuse.txt
+new file mode 100644
+index 00000000..8f1c0ff
+--- /dev/null
++++ b/build/pkgs/packaging/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-packaging
+diff --git a/build/pkgs/pandocfilters/distros/opensuse.txt b/build/pkgs/pandocfilters/distros/opensuse.txt
+new file mode 100644
+index 00000000..d0d4c24
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-pandocfilters
+diff --git a/build/pkgs/pluggy/distros/opensuse.txt b/build/pkgs/pluggy/distros/opensuse.txt
+new file mode 100644
+index 00000000..43a3acf
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-pluggy
+diff --git a/build/pkgs/py/distros/opensuse.txt b/build/pkgs/py/distros/opensuse.txt
+new file mode 100644
+index 00000000..81fefe6
+--- /dev/null
++++ b/build/pkgs/py/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-py
+diff --git a/build/pkgs/pygments/distros/opensuse.txt b/build/pkgs/pygments/distros/opensuse.txt
+index 9ff5740..3ab3792 100644
+--- a/build/pkgs/pygments/distros/opensuse.txt
++++ b/build/pkgs/pygments/distros/opensuse.txt
+@@ -1 +1 @@
+-python3-Pygments
++python3-pygments
+diff --git a/build/pkgs/sympy/distros/opensuse.txt b/build/pkgs/sympy/distros/opensuse.txt
+new file mode 100644
+index 00000000..db423c8
+--- /dev/null
++++ b/build/pkgs/sympy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-sympy
+diff --git a/build/pkgs/texttable/distros/opensuse.txt b/build/pkgs/texttable/distros/opensuse.txt
+new file mode 100644
+index 00000000..8f8e7e2
+--- /dev/null
++++ b/build/pkgs/texttable/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-texttable
+diff --git a/build/pkgs/toml/distros/opensuse.txt b/build/pkgs/toml/distros/opensuse.txt
+new file mode 100644
+index 00000000..543e89d
+--- /dev/null
++++ b/build/pkgs/toml/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-toml
+-- 
+cgit v1.0-1-gd88e
+
+
+From a480ba7ace1370d106ae831e904ea22b72af1be7 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 22:45:04 -0700
+Subject: build/pkgs: Add distros/debian.txt for Python packages
+
+---
+ build/pkgs/babel/distros/debian.txt         | 1 +
+ build/pkgs/bleach/distros/debian.txt        | 1 +
+ build/pkgs/certifi/distros/debian.txt       | 1 +
+ build/pkgs/cvxopt/distros/debian.txt        | 1 +
+ build/pkgs/decorator/distros/debian.txt     | 1 +
+ build/pkgs/html5lib/distros/debian.txt      | 1 +
+ build/pkgs/idna/distros/debian.txt          | 1 +
+ build/pkgs/jinja2/distros/debian.txt        | 1 +
+ build/pkgs/matplotlib/distros/debian.txt    | 1 +
+ build/pkgs/mpmath/distros/debian.txt        | 1 +
+ build/pkgs/networkx/distros/debian.txt      | 1 +
+ build/pkgs/numpy/distros/debian.txt         | 1 +
+ build/pkgs/packaging/distros/debian.txt     | 1 +
+ build/pkgs/pandocfilters/distros/debian.txt | 1 +
+ build/pkgs/pickleshare/distros/debian.txt   | 1 +
+ build/pkgs/pillow/distros/debian.txt        | 1 +
+ build/pkgs/pluggy/distros/debian.txt        | 1 +
+ build/pkgs/py/distros/debian.txt            | 1 +
+ build/pkgs/pygments/distros/debian.txt      | 1 +
+ build/pkgs/pytz/distros/debian.txt          | 1 +
+ build/pkgs/requests/distros/debian.txt      | 1 +
+ build/pkgs/scipy/distros/debian.txt         | 1 +
+ build/pkgs/setuptools/distros/debian.txt    | 1 +
+ build/pkgs/six/distros/debian.txt           | 1 +
+ build/pkgs/sympy/distros/debian.txt         | 1 +
+ build/pkgs/texttable/distros/debian.txt     | 1 +
+ build/pkgs/toml/distros/debian.txt          | 1 +
+ build/pkgs/webencodings/distros/debian.txt  | 1 +
+ build/pkgs/wheel/distros/debian.txt         | 1 +
+ 29 files changed, 29 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/debian.txt
+ create mode 100644 build/pkgs/bleach/distros/debian.txt
+ create mode 100644 build/pkgs/certifi/distros/debian.txt
+ create mode 100644 build/pkgs/cvxopt/distros/debian.txt
+ create mode 100644 build/pkgs/decorator/distros/debian.txt
+ create mode 100644 build/pkgs/html5lib/distros/debian.txt
+ create mode 100644 build/pkgs/idna/distros/debian.txt
+ create mode 100644 build/pkgs/jinja2/distros/debian.txt
+ create mode 100644 build/pkgs/matplotlib/distros/debian.txt
+ create mode 100644 build/pkgs/mpmath/distros/debian.txt
+ create mode 100644 build/pkgs/networkx/distros/debian.txt
+ create mode 100644 build/pkgs/numpy/distros/debian.txt
+ create mode 100644 build/pkgs/packaging/distros/debian.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/debian.txt
+ create mode 100644 build/pkgs/pickleshare/distros/debian.txt
+ create mode 100644 build/pkgs/pillow/distros/debian.txt
+ create mode 100644 build/pkgs/pluggy/distros/debian.txt
+ create mode 100644 build/pkgs/py/distros/debian.txt
+ create mode 100644 build/pkgs/pygments/distros/debian.txt
+ create mode 100644 build/pkgs/pytz/distros/debian.txt
+ create mode 100644 build/pkgs/requests/distros/debian.txt
+ create mode 100644 build/pkgs/scipy/distros/debian.txt
+ create mode 100644 build/pkgs/setuptools/distros/debian.txt
+ create mode 100644 build/pkgs/six/distros/debian.txt
+ create mode 100644 build/pkgs/sympy/distros/debian.txt
+ create mode 100644 build/pkgs/texttable/distros/debian.txt
+ create mode 100644 build/pkgs/toml/distros/debian.txt
+ create mode 100644 build/pkgs/webencodings/distros/debian.txt
+ create mode 100644 build/pkgs/wheel/distros/debian.txt
+
+diff --git a/build/pkgs/babel/distros/debian.txt b/build/pkgs/babel/distros/debian.txt
+new file mode 100644
+index 00000000..e623eb6
+--- /dev/null
++++ b/build/pkgs/babel/distros/debian.txt
+@@ -0,0 +1 @@
++python3-babel
+diff --git a/build/pkgs/bleach/distros/debian.txt b/build/pkgs/bleach/distros/debian.txt
+new file mode 100644
+index 00000000..6d37c4c
+--- /dev/null
++++ b/build/pkgs/bleach/distros/debian.txt
+@@ -0,0 +1 @@
++python3-bleach
+diff --git a/build/pkgs/certifi/distros/debian.txt b/build/pkgs/certifi/distros/debian.txt
+new file mode 100644
+index 00000000..f585a82
+--- /dev/null
++++ b/build/pkgs/certifi/distros/debian.txt
+@@ -0,0 +1 @@
++python3-certifi
+diff --git a/build/pkgs/cvxopt/distros/debian.txt b/build/pkgs/cvxopt/distros/debian.txt
+new file mode 100644
+index 00000000..2bb6ad1
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/debian.txt
+@@ -0,0 +1 @@
++python3-cvxopt
+diff --git a/build/pkgs/decorator/distros/debian.txt b/build/pkgs/decorator/distros/debian.txt
+new file mode 100644
+index 00000000..46c478e
+--- /dev/null
++++ b/build/pkgs/decorator/distros/debian.txt
+@@ -0,0 +1 @@
++python3-decorator
+diff --git a/build/pkgs/html5lib/distros/debian.txt b/build/pkgs/html5lib/distros/debian.txt
+new file mode 100644
+index 00000000..6d7b8df
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/debian.txt
+@@ -0,0 +1 @@
++python3-html5lib
+diff --git a/build/pkgs/idna/distros/debian.txt b/build/pkgs/idna/distros/debian.txt
+new file mode 100644
+index 00000000..de48e70
+--- /dev/null
++++ b/build/pkgs/idna/distros/debian.txt
+@@ -0,0 +1 @@
++python3-idna
+diff --git a/build/pkgs/jinja2/distros/debian.txt b/build/pkgs/jinja2/distros/debian.txt
+new file mode 100644
+index 00000000..f2db865
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/debian.txt
+@@ -0,0 +1 @@
++python3-jinja2
+diff --git a/build/pkgs/matplotlib/distros/debian.txt b/build/pkgs/matplotlib/distros/debian.txt
+new file mode 100644
+index 00000000..1374329
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/debian.txt
+@@ -0,0 +1 @@
++python3-matplotlib
+diff --git a/build/pkgs/mpmath/distros/debian.txt b/build/pkgs/mpmath/distros/debian.txt
+new file mode 100644
+index 00000000..fbc82a9
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/debian.txt
+@@ -0,0 +1 @@
++python3-mpmath
+diff --git a/build/pkgs/networkx/distros/debian.txt b/build/pkgs/networkx/distros/debian.txt
+new file mode 100644
+index 00000000..6779066
+--- /dev/null
++++ b/build/pkgs/networkx/distros/debian.txt
+@@ -0,0 +1 @@
++python3-networkx
+diff --git a/build/pkgs/numpy/distros/debian.txt b/build/pkgs/numpy/distros/debian.txt
+new file mode 100644
+index 00000000..79d5c5a
+--- /dev/null
++++ b/build/pkgs/numpy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-numpy
+diff --git a/build/pkgs/packaging/distros/debian.txt b/build/pkgs/packaging/distros/debian.txt
+new file mode 100644
+index 00000000..8f1c0ff
+--- /dev/null
++++ b/build/pkgs/packaging/distros/debian.txt
+@@ -0,0 +1 @@
++python3-packaging
+diff --git a/build/pkgs/pandocfilters/distros/debian.txt b/build/pkgs/pandocfilters/distros/debian.txt
+new file mode 100644
+index 00000000..d0d4c24
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/debian.txt b/build/pkgs/pickleshare/distros/debian.txt
+new file mode 100644
+index 00000000..a00907d
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pickleshare
+diff --git a/build/pkgs/pillow/distros/debian.txt b/build/pkgs/pillow/distros/debian.txt
+new file mode 100644
+index 00000000..3319fcd
+--- /dev/null
++++ b/build/pkgs/pillow/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pillow
+diff --git a/build/pkgs/pluggy/distros/debian.txt b/build/pkgs/pluggy/distros/debian.txt
+new file mode 100644
+index 00000000..43a3acf
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pluggy
+diff --git a/build/pkgs/py/distros/debian.txt b/build/pkgs/py/distros/debian.txt
+new file mode 100644
+index 00000000..81fefe6
+--- /dev/null
++++ b/build/pkgs/py/distros/debian.txt
+@@ -0,0 +1 @@
++python3-py
+diff --git a/build/pkgs/pygments/distros/debian.txt b/build/pkgs/pygments/distros/debian.txt
+new file mode 100644
+index 00000000..3ab3792
+--- /dev/null
++++ b/build/pkgs/pygments/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pygments
+diff --git a/build/pkgs/pytz/distros/debian.txt b/build/pkgs/pytz/distros/debian.txt
+new file mode 100644
+index 00000000..db20908
+--- /dev/null
++++ b/build/pkgs/pytz/distros/debian.txt
+@@ -0,0 +1 @@
++python3-tz
+diff --git a/build/pkgs/requests/distros/debian.txt b/build/pkgs/requests/distros/debian.txt
+new file mode 100644
+index 00000000..43147b2
+--- /dev/null
++++ b/build/pkgs/requests/distros/debian.txt
+@@ -0,0 +1 @@
++python3-requests
+diff --git a/build/pkgs/scipy/distros/debian.txt b/build/pkgs/scipy/distros/debian.txt
+new file mode 100644
+index 00000000..12b3666
+--- /dev/null
++++ b/build/pkgs/scipy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-scipy
+diff --git a/build/pkgs/setuptools/distros/debian.txt b/build/pkgs/setuptools/distros/debian.txt
+new file mode 100644
+index 00000000..1c0901c
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/debian.txt
+@@ -0,0 +1 @@
++python3-setuptools
+diff --git a/build/pkgs/six/distros/debian.txt b/build/pkgs/six/distros/debian.txt
+new file mode 100644
+index 00000000..68ff859
+--- /dev/null
++++ b/build/pkgs/six/distros/debian.txt
+@@ -0,0 +1 @@
++python3-six
+diff --git a/build/pkgs/sympy/distros/debian.txt b/build/pkgs/sympy/distros/debian.txt
+new file mode 100644
+index 00000000..db423c8
+--- /dev/null
++++ b/build/pkgs/sympy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-sympy
+diff --git a/build/pkgs/texttable/distros/debian.txt b/build/pkgs/texttable/distros/debian.txt
+new file mode 100644
+index 00000000..8f8e7e2
+--- /dev/null
++++ b/build/pkgs/texttable/distros/debian.txt
+@@ -0,0 +1 @@
++python3-texttable
+diff --git a/build/pkgs/toml/distros/debian.txt b/build/pkgs/toml/distros/debian.txt
+new file mode 100644
+index 00000000..543e89d
+--- /dev/null
++++ b/build/pkgs/toml/distros/debian.txt
+@@ -0,0 +1 @@
++python3-toml
+diff --git a/build/pkgs/webencodings/distros/debian.txt b/build/pkgs/webencodings/distros/debian.txt
+new file mode 100644
+index 00000000..ac30c2f
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/debian.txt
+@@ -0,0 +1 @@
++python3-webencodings
+diff --git a/build/pkgs/wheel/distros/debian.txt b/build/pkgs/wheel/distros/debian.txt
+new file mode 100644
+index 00000000..3c066725
+--- /dev/null
++++ b/build/pkgs/wheel/distros/debian.txt
+@@ -0,0 +1 @@
++python3-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 93bf30d7de292551c3050e2dd74651d69ba4bd46 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 18 Oct 2021 07:50:34 -0400
+Subject: Trac #29665: add more documentation for SAGE_PYTHON_PACKAGE_CHECK().
+
+An earlier commit allows SAGE_PYTHON_PACKAGE_CHECK(package) to tweak the
+value of sage_use_system_$package if --enable-system-site-packages was
+not used. This essentially changes the default --with-system-$package=yes
+to "no" in that case. Here we update the documentation to reflect it.
+---
+ m4/sage_python_package_check.m4 | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 7ee82a7..95eefd0 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -34,6 +34,10 @@
+ #   ensure that the ./configure- and run-time views of the system
+ #   are as similar as possible.
+ #
++#   To avoid suggesting these system packages to users who have not
++#   set --enable-system-site-packages, this macro also changes the
++#   default for --with-system-foo from "yes" to "no" in that case.
++#
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
+-- 
+cgit v1.0-1-gd88e
+
+
+From d771e49d57ecdf3622434bc09cbfb87ad3bb7744 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 18 Oct 2021 07:42:46 -0400
+Subject: Trac #29665: improve SAGE_PYTHON_PACKAGE_CHECK() failure message.
+
+When --enable-system-site-packages is off, SAGE_PYTHON_PACKAGE_CHECK()
+will always install the corresponding SPKG. We improve the ./configure
+output in that case to make it clear that the decision was based on
+the value of --enable-system-site-packages and not the "real" check.
+---
+ m4/sage_python_package_check.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 95eefd0..5f0f084 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -40,7 +40,9 @@
+ #
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
++  AC_MSG_CHECKING([if --enable-system-site-packages was used])
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
++    AC_MSG_RESULT(yes)
+     AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
+ 
+     dnl We run this check inside a python venv, because that's ultimately
+@@ -94,6 +96,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
+     dnl System site packages are disabled.
++    AC_MSG_RESULT(no; skipping check)
+     sage_spkg_install_$1=yes
+ 
+     dnl We have to retroactively hack the --with-system-foo={no,yes,force}
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5bb43c1b78a1deb3364f235305937c2f823e5e18 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 24 Oct 2021 20:29:25 -0400
+Subject: Trac #29665: use sage-venv in SAGE_PYTHON_PACKAGE_CHECK().
+
+For consistency with the rest of the build system, we now use the
+build/bin/sage-venv script to create the venv in this autoconf macro
+rather than invoking $PYTHON_FOR_VENV with "-m venv" directly.
+---
+ m4/sage_python_package_check.m4 | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 5f0f084..5547b35 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -50,11 +50,11 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AC_MSG_CHECKING([if we can create a python venv in config.venv])
+ 
+     dnl Use --clear because ./configure typically clobbers its output files.
+-    AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
+-                                        --clear                dnl
+-                                        --without-pip          dnl
+-                                        config.venv            dnl
+-                                        2>&AS_MESSAGE_LOG_FD], [
++    AS_IF(["${PYTHON_FOR_VENV}" build/bin/sage-venv      dnl
++                                  --system-site-packages dnl
++                                  --clear                dnl
++                                  config.venv            dnl
++                                  2>&AS_MESSAGE_LOG_FD], [
+       AC_MSG_RESULT(yes)
+       dnl strip all comments from install-requires.txt; this should leave
+       dnl only a single line containing the version specification for this
+-- 
+cgit v1.0-1-gd88e
+
+
+From c78363d6326addff16ca5abac897949a6be72bf4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:10:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for urllib3.
+
+---
+ build/pkgs/urllib3/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/urllib3/spkg-configure.m4
+
+diff --git a/build/pkgs/urllib3/spkg-configure.m4 b/build/pkgs/urllib3/spkg-configure.m4
+new file mode 100644
+index 00000000..d7ef3e1
+--- /dev/null
++++ b/build/pkgs/urllib3/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([urllib3], [SAGE_PYTHON_PACKAGE_CHECK([urllib3])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f416d5abcae495ea8301fad024b279ea9e997b29 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:15:18 -0400
+Subject: Trac #29665: add Gentoo package information for urllib3.
+
+---
+ build/pkgs/urllib3/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/urllib3/distros/gentoo.txt
+
+diff --git a/build/pkgs/urllib3/distros/gentoo.txt b/build/pkgs/urllib3/distros/gentoo.txt
+new file mode 100644
+index 00000000..172a535
+--- /dev/null
++++ b/build/pkgs/urllib3/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/urllib3
+-- 
+cgit v1.0-1-gd88e
+
+
+From 852068b992bf7959500c650f54cb92e5b68d7ef8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:15:58 -0400
+Subject: Trac #29665: add Gentoo package information for nbformat.
+
+---
+ build/pkgs/nbformat/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbformat/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbformat/distros/gentoo.txt b/build/pkgs/nbformat/distros/gentoo.txt
+new file mode 100644
+index 00000000..006b1f2
+--- /dev/null
++++ b/build/pkgs/nbformat/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbformat
+-- 
+cgit v1.0-1-gd88e
+
+
+From 66179fd28fcc92ee840dcd87bb4db25cea968d66 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:34:16 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for nbformat.
+
+---
+ build/pkgs/nbformat/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbformat/spkg-configure.m4
+
+diff --git a/build/pkgs/nbformat/spkg-configure.m4 b/build/pkgs/nbformat/spkg-configure.m4
+new file mode 100644
+index 00000000..5a7f8c4
+--- /dev/null
++++ b/build/pkgs/nbformat/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbformat], [SAGE_PYTHON_PACKAGE_CHECK([nbformat])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 874005e81ed20f27a5f895030dcdbdfc5f73ad80 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:47:01 -0400
+Subject: Trac #29665: add Gentoo package information for zipp.
+
+---
+ build/pkgs/zipp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/zipp/distros/gentoo.txt
+
+diff --git a/build/pkgs/zipp/distros/gentoo.txt b/build/pkgs/zipp/distros/gentoo.txt
+new file mode 100644
+index 00000000..7f59450
+--- /dev/null
++++ b/build/pkgs/zipp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/zipp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0cc2a7355b5554c1fb79c742ebf02eff54465b3e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:47:35 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for zipp.
+
+---
+ build/pkgs/zipp/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/zipp/spkg-configure.m4
+
+diff --git a/build/pkgs/zipp/spkg-configure.m4 b/build/pkgs/zipp/spkg-configure.m4
+new file mode 100644
+index 00000000..0fe3a9c
+--- /dev/null
++++ b/build/pkgs/zipp/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([zipp], [SAGE_PYTHON_PACKAGE_CHECK([zipp])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6073ad8e56c21fc862749bbd84a56d543fb9458c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:48:37 -0400
+Subject: Trac #29665: add Gentoo package information for wcwidth.
+
+---
+ build/pkgs/wcwidth/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wcwidth/distros/gentoo.txt
+
+diff --git a/build/pkgs/wcwidth/distros/gentoo.txt b/build/pkgs/wcwidth/distros/gentoo.txt
+new file mode 100644
+index 00000000..edeb80b
+--- /dev/null
++++ b/build/pkgs/wcwidth/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/wcwidth
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9793d6172c64d61a015fbe61bd45863759124fad Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:51:10 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for wcwidth.
+
+---
+ build/pkgs/wcwidth/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wcwidth/spkg-configure.m4
+
+diff --git a/build/pkgs/wcwidth/spkg-configure.m4 b/build/pkgs/wcwidth/spkg-configure.m4
+new file mode 100644
+index 00000000..5bde15a
+--- /dev/null
++++ b/build/pkgs/wcwidth/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([wcwidth], [SAGE_PYTHON_PACKAGE_CHECK([wcwidth])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20232f370a43c146ca4e696c72a2cbcc498db060 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:52:36 -0400
+Subject: Trac #29665: add Gentoo package information for testpath.
+
+---
+ build/pkgs/testpath/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/testpath/distros/gentoo.txt
+
+diff --git a/build/pkgs/testpath/distros/gentoo.txt b/build/pkgs/testpath/distros/gentoo.txt
+new file mode 100644
+index 00000000..efa10a0
+--- /dev/null
++++ b/build/pkgs/testpath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/testpath
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1b0785b2aad8844e74345fe950baf097e2b43d24 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:55:22 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for testpath.
+
+---
+ build/pkgs/testpath/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/testpath/spkg-configure.m4
+
+diff --git a/build/pkgs/testpath/spkg-configure.m4 b/build/pkgs/testpath/spkg-configure.m4
+new file mode 100644
+index 00000000..d8fc2a7
+--- /dev/null
++++ b/build/pkgs/testpath/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([testpath], [SAGE_PYTHON_PACKAGE_CHECK([testpath])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 10fc3829ecd956d732b1b069fdfe81f0d6d5cdc2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:56:06 -0400
+Subject: Trac #29665: add Gentoo package information for jedi.
+
+---
+ build/pkgs/jedi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jedi/distros/gentoo.txt
+
+diff --git a/build/pkgs/jedi/distros/gentoo.txt b/build/pkgs/jedi/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c85a46
+--- /dev/null
++++ b/build/pkgs/jedi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jedi
+-- 
+cgit v1.0-1-gd88e
+
+
+From a75824d74c281c7639028ca01dabeed266f56998 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:06:37 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for jedi.
+
+---
+ build/pkgs/jedi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jedi/spkg-configure.m4
+
+diff --git a/build/pkgs/jedi/spkg-configure.m4 b/build/pkgs/jedi/spkg-configure.m4
+new file mode 100644
+index 00000000..a37dbcc
+--- /dev/null
++++ b/build/pkgs/jedi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jedi], [SAGE_PYTHON_PACKAGE_CHECK([jedi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 17af01373d43f6acbbdbc23e073e372d3fdadf8b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:07:47 -0400
+Subject: Trac #29665: add Gentoo package information for tomli.
+
+---
+ build/pkgs/tomli/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tomli/distros/gentoo.txt
+
+diff --git a/build/pkgs/tomli/distros/gentoo.txt b/build/pkgs/tomli/distros/gentoo.txt
+new file mode 100644
+index 00000000..0458e25
+--- /dev/null
++++ b/build/pkgs/tomli/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/tomli
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0d3b5994ae612be11992467c4a3f1a74b81400fe Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:08:12 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for tomli.
+
+---
+ build/pkgs/tomli/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tomli/spkg-configure.m4
+
+diff --git a/build/pkgs/tomli/spkg-configure.m4 b/build/pkgs/tomli/spkg-configure.m4
+new file mode 100644
+index 00000000..95a8b8b
+--- /dev/null
++++ b/build/pkgs/tomli/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tomli], [SAGE_PYTHON_PACKAGE_CHECK([tomli])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From dce1c515781b0eeb8eb9c2bc7aba581560c1fac1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:09:22 -0400
+Subject: Trac #29665: add Gentoo package information for defusedxml.
+
+---
+ build/pkgs/defusedxml/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/defusedxml/distros/gentoo.txt
+
+diff --git a/build/pkgs/defusedxml/distros/gentoo.txt b/build/pkgs/defusedxml/distros/gentoo.txt
+new file mode 100644
+index 00000000..2804214
+--- /dev/null
++++ b/build/pkgs/defusedxml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/defusedxml
+-- 
+cgit v1.0-1-gd88e
+
+
+From 02e1e1cd7f8bdae3ca5b7d35ce70af28a44e9b7c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:11:14 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for defusedxml.
+
+---
+ build/pkgs/defusedxml/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/defusedxml/spkg-configure.m4
+
+diff --git a/build/pkgs/defusedxml/spkg-configure.m4 b/build/pkgs/defusedxml/spkg-configure.m4
+new file mode 100644
+index 00000000..e02f345
+--- /dev/null
++++ b/build/pkgs/defusedxml/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([defusedxml], [SAGE_PYTHON_PACKAGE_CHECK([defusedxml])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e0ba4ebb5cfc637b5d26b85de9f34e0a160d2b9c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:12:22 -0400
+Subject: Trac #29665: add Gentoo package information for ipywidgets.
+
+---
+ build/pkgs/ipywidgets/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipywidgets/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipywidgets/distros/gentoo.txt b/build/pkgs/ipywidgets/distros/gentoo.txt
+new file mode 100644
+index 00000000..7c76967
+--- /dev/null
++++ b/build/pkgs/ipywidgets/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipywidgets
+-- 
+cgit v1.0-1-gd88e
+
+
+From 49df7e7d93c7a31b7c46d5d224a35fd313a29a32 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:15:53 -0400
+Subject: Trac #29665: add Gentoo package information for simplegeneric.
+
+---
+ build/pkgs/simplegeneric/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/simplegeneric/distros/gentoo.txt
+
+diff --git a/build/pkgs/simplegeneric/distros/gentoo.txt b/build/pkgs/simplegeneric/distros/gentoo.txt
+new file mode 100644
+index 00000000..a86e90d
+--- /dev/null
++++ b/build/pkgs/simplegeneric/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/simplegeneric
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2a893635d5804749e6fec7ed7289c921ecb5300a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:16:33 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for simplegeneric.
+
+---
+ build/pkgs/simplegeneric/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/simplegeneric/spkg-configure.m4
+
+diff --git a/build/pkgs/simplegeneric/spkg-configure.m4 b/build/pkgs/simplegeneric/spkg-configure.m4
+new file mode 100644
+index 00000000..13715ab
+--- /dev/null
++++ b/build/pkgs/simplegeneric/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([simplegeneric], [SAGE_PYTHON_PACKAGE_CHECK([simplegeneric])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a8fe7ecd6e3163e7d01261e5497ac452a8cc95ab Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:17:18 -0400
+Subject: Trac #29665: add Gentoo package information for imagesize.
+
+---
+ build/pkgs/imagesize/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/imagesize/distros/gentoo.txt
+
+diff --git a/build/pkgs/imagesize/distros/gentoo.txt b/build/pkgs/imagesize/distros/gentoo.txt
+new file mode 100644
+index 00000000..54350ba
+--- /dev/null
++++ b/build/pkgs/imagesize/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/imagesize
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2ad837c5dd1fca0f50ce6d5042a9344210a54f84 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:17:48 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for imagesize.
+
+---
+ build/pkgs/imagesize/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/imagesize/spkg-configure.m4
+
+diff --git a/build/pkgs/imagesize/spkg-configure.m4 b/build/pkgs/imagesize/spkg-configure.m4
+new file mode 100644
+index 00000000..20210ef
+--- /dev/null
++++ b/build/pkgs/imagesize/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([imagesize], [SAGE_PYTHON_PACKAGE_CHECK([imagesize])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bf47415b5bfca2d7bf24e20de35662bf331623b9 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:18:49 -0400
+Subject: Trac #29665: add Gentoo package information for mistune.
+
+---
+ build/pkgs/mistune/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mistune/distros/gentoo.txt
+
+diff --git a/build/pkgs/mistune/distros/gentoo.txt b/build/pkgs/mistune/distros/gentoo.txt
+new file mode 100644
+index 00000000..56f0a4e
+--- /dev/null
++++ b/build/pkgs/mistune/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/mistune
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6898a74fd0c65a40c5220ba68b4062ac6fe060c6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:21:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for mistune.
+
+---
+ build/pkgs/mistune/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mistune/spkg-configure.m4
+
+diff --git a/build/pkgs/mistune/spkg-configure.m4 b/build/pkgs/mistune/spkg-configure.m4
+new file mode 100644
+index 00000000..972f33d
+--- /dev/null
++++ b/build/pkgs/mistune/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([mistune], [SAGE_PYTHON_PACKAGE_CHECK([mistune])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 62735e4ccf2031cd39eb5e04b03bdfd97005d808 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:22:48 -0400
+Subject: Trac #29665: add Gentoo package information for backcall.
+
+---
+ build/pkgs/backcall/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/backcall/distros/gentoo.txt
+
+diff --git a/build/pkgs/backcall/distros/gentoo.txt b/build/pkgs/backcall/distros/gentoo.txt
+new file mode 100644
+index 00000000..266a222
+--- /dev/null
++++ b/build/pkgs/backcall/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/backcall
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9ef3ea42d4a33c7cdb623fa5417ae300cf323183 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:25:10 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for backcall.
+
+---
+ build/pkgs/backcall/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/backcall/spkg-configure.m4
+
+diff --git a/build/pkgs/backcall/spkg-configure.m4 b/build/pkgs/backcall/spkg-configure.m4
+new file mode 100644
+index 00000000..d6b11c4
+--- /dev/null
++++ b/build/pkgs/backcall/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([backcall], [SAGE_PYTHON_PACKAGE_CHECK([backcall])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1b3ea2a3c40fea0fb58435f5e5304368ea58dff8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:25:58 -0400
+Subject: Trac #29665: add Gentoo package information for parso.
+
+---
+ build/pkgs/parso/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/parso/distros/gentoo.txt
+
+diff --git a/build/pkgs/parso/distros/gentoo.txt b/build/pkgs/parso/distros/gentoo.txt
+new file mode 100644
+index 00000000..f9ce4c7
+--- /dev/null
++++ b/build/pkgs/parso/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/parso
+-- 
+cgit v1.0-1-gd88e
+
+
+From 963a3a2c563ec71a1f5be2395722d0e824cb0b11 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:26:22 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for parso.
+
+---
+ build/pkgs/parso/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/parso/spkg-configure.m4
+
+diff --git a/build/pkgs/parso/spkg-configure.m4 b/build/pkgs/parso/spkg-configure.m4
+new file mode 100644
+index 00000000..1ca6f1b
+--- /dev/null
++++ b/build/pkgs/parso/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([parso], [SAGE_PYTHON_PACKAGE_CHECK([parso])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 943053dfc474b6549bcc7d6ef2971ea43588b35c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:27:00 -0400
+Subject: Trac #29665: add Gentoo package information for pyparsing.
+
+---
+ build/pkgs/pyparsing/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyparsing/distros/gentoo.txt
+
+diff --git a/build/pkgs/pyparsing/distros/gentoo.txt b/build/pkgs/pyparsing/distros/gentoo.txt
+new file mode 100644
+index 00000000..ef0419f
+--- /dev/null
++++ b/build/pkgs/pyparsing/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyparsing
+-- 
+cgit v1.0-1-gd88e
+
+
+From bd682eaa2ac41dd84e7a52e2b0c5442fc8fd8919 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:27:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pyparsing.
+
+---
+ build/pkgs/pyparsing/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyparsing/spkg-configure.m4
+
+diff --git a/build/pkgs/pyparsing/spkg-configure.m4 b/build/pkgs/pyparsing/spkg-configure.m4
+new file mode 100644
+index 00000000..d2b4c00
+--- /dev/null
++++ b/build/pkgs/pyparsing/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pyparsing], [SAGE_PYTHON_PACKAGE_CHECK([pyparsing])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 74f36a9c0ec7c63b7e6c40066e42f4b15c2f978e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:17:42 -0400
+Subject: Trac #29665: add Gentoo package information for debugpy.
+
+---
+ build/pkgs/debugpy/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/debugpy/distros/gentoo.txt
+
+diff --git a/build/pkgs/debugpy/distros/gentoo.txt b/build/pkgs/debugpy/distros/gentoo.txt
+new file mode 100644
+index 00000000..8b797ce
+--- /dev/null
++++ b/build/pkgs/debugpy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/debugpy
+-- 
+cgit v1.0-1-gd88e
+
+
+From be072fa87ac5c373d9dc9b54c0bd68734d5709bc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:21:17 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for debugpy.
+
+---
+ build/pkgs/debugpy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/debugpy/spkg-configure.m4
+
+diff --git a/build/pkgs/debugpy/spkg-configure.m4 b/build/pkgs/debugpy/spkg-configure.m4
+new file mode 100644
+index 00000000..db605ff
+--- /dev/null
++++ b/build/pkgs/debugpy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([debugpy], [SAGE_PYTHON_PACKAGE_CHECK([debugpy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6f777ce2f2e14b94e91c8b7bbac82f9017460aba Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:23:56 -0400
+Subject: Trac #29665: add Gentoo package information for tzlocal.
+
+---
+ build/pkgs/tzlocal/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tzlocal/distros/gentoo.txt
+
+diff --git a/build/pkgs/tzlocal/distros/gentoo.txt b/build/pkgs/tzlocal/distros/gentoo.txt
+new file mode 100644
+index 00000000..2018442
+--- /dev/null
++++ b/build/pkgs/tzlocal/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/tzlocal
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3bd078fc15ae13982249452711baafae91038191 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:24:51 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for tzlocal.
+
+---
+ build/pkgs/tzlocal/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tzlocal/spkg-configure.m4
+
+diff --git a/build/pkgs/tzlocal/spkg-configure.m4 b/build/pkgs/tzlocal/spkg-configure.m4
+new file mode 100644
+index 00000000..e020b28
+--- /dev/null
++++ b/build/pkgs/tzlocal/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tzlocal], [SAGE_PYTHON_PACKAGE_CHECK([tzlocal])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 91b0882fc62214923da9ee7b6dccb05d8a1d11d1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:26:13 -0400
+Subject: Trac #29665: add Gentoo package information for pycparser.
+
+---
+ build/pkgs/pycparser/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pycparser/distros/gentoo.txt
+
+diff --git a/build/pkgs/pycparser/distros/gentoo.txt b/build/pkgs/pycparser/distros/gentoo.txt
+new file mode 100644
+index 00000000..5e87307
+--- /dev/null
++++ b/build/pkgs/pycparser/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pycparser
+-- 
+cgit v1.0-1-gd88e
+
+
+From beabde92fe6e057faf516fe82d27f1e903e55ce6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:27:27 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pycparser.
+
+---
+ build/pkgs/pycparser/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pycparser/spkg-configure.m4
+
+diff --git a/build/pkgs/pycparser/spkg-configure.m4 b/build/pkgs/pycparser/spkg-configure.m4
+new file mode 100644
+index 00000000..4b9b900
+--- /dev/null
++++ b/build/pkgs/pycparser/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pycparser], [SAGE_PYTHON_PACKAGE_CHECK([pycparser])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 86c2788dc7fd1169314e9598c91fa81045553677 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:29:36 -0400
+Subject: Trac #29665: add Gentoo package information for cycler.
+
+---
+ build/pkgs/cycler/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cycler/distros/gentoo.txt
+
+diff --git a/build/pkgs/cycler/distros/gentoo.txt b/build/pkgs/cycler/distros/gentoo.txt
+new file mode 100644
+index 00000000..4b21543
+--- /dev/null
++++ b/build/pkgs/cycler/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/cycler
+-- 
+cgit v1.0-1-gd88e
+
+
+From 67c5a944101ddf329f0a61c61d4e784f58a5c5b0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:30:27 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for cycler.
+
+---
+ build/pkgs/cycler/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cycler/spkg-configure.m4
+
+diff --git a/build/pkgs/cycler/spkg-configure.m4 b/build/pkgs/cycler/spkg-configure.m4
+new file mode 100644
+index 00000000..239571a
+--- /dev/null
++++ b/build/pkgs/cycler/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([cycler], [SAGE_PYTHON_PACKAGE_CHECK([cycler])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ef6d490251abfa41f7a0910274700a8a6a65f629 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:31:19 -0400
+Subject: Trac #29665: add Gentoo package information for traitlets.
+
+---
+ build/pkgs/traitlets/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/traitlets/distros/gentoo.txt
+
+diff --git a/build/pkgs/traitlets/distros/gentoo.txt b/build/pkgs/traitlets/distros/gentoo.txt
+new file mode 100644
+index 00000000..46bfaab
+--- /dev/null
++++ b/build/pkgs/traitlets/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/traitlets
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1f922b458d34088d9f6773312209e69f19ee45dc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:31:50 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for traitlets.
+
+---
+ build/pkgs/traitlets/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/traitlets/spkg-configure.m4
+
+diff --git a/build/pkgs/traitlets/spkg-configure.m4 b/build/pkgs/traitlets/spkg-configure.m4
+new file mode 100644
+index 00000000..df2382b
+--- /dev/null
++++ b/build/pkgs/traitlets/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([traitlets], [SAGE_PYTHON_PACKAGE_CHECK([traitlets])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 95b89a9ced0acb6d971a27fa63b97ea58a11f4e1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:33:35 -0400
+Subject: Trac #29665: add Gentoo package information for argcomplete.
+
+---
+ build/pkgs/argcomplete/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argcomplete/distros/gentoo.txt
+
+diff --git a/build/pkgs/argcomplete/distros/gentoo.txt b/build/pkgs/argcomplete/distros/gentoo.txt
+new file mode 100644
+index 00000000..b150949
+--- /dev/null
++++ b/build/pkgs/argcomplete/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/argcomplete
+-- 
+cgit v1.0-1-gd88e
+
+
+From b4cd8ef384e6e5bae0de0f3c113fb5f9e6e1a71e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:34:14 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for argcomplete.
+
+---
+ build/pkgs/argcomplete/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argcomplete/spkg-configure.m4
+
+diff --git a/build/pkgs/argcomplete/spkg-configure.m4 b/build/pkgs/argcomplete/spkg-configure.m4
+new file mode 100644
+index 00000000..cbd7ccf
+--- /dev/null
++++ b/build/pkgs/argcomplete/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([argcomplete], [SAGE_PYTHON_PACKAGE_CHECK([argcomplete])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4cc610e8331970cc018d7ea87af928fa73a292c1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:36:21 -0400
+Subject: Trac #29665: add Gentoo package information for ptyprocess.
+
+---
+ build/pkgs/ptyprocess/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ptyprocess/distros/gentoo.txt
+
+diff --git a/build/pkgs/ptyprocess/distros/gentoo.txt b/build/pkgs/ptyprocess/distros/gentoo.txt
+new file mode 100644
+index 00000000..571a851
+--- /dev/null
++++ b/build/pkgs/ptyprocess/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ptyprocess
+-- 
+cgit v1.0-1-gd88e
+
+
+From cd15f97221bf5933b07900e4f77cb55401eede26 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:37:02 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ptyprocess.
+
+---
+ build/pkgs/ptyprocess/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ptyprocess/spkg-configure.m4
+
+diff --git a/build/pkgs/ptyprocess/spkg-configure.m4 b/build/pkgs/ptyprocess/spkg-configure.m4
+new file mode 100644
+index 00000000..bfacbae
+--- /dev/null
++++ b/build/pkgs/ptyprocess/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ptyprocess], [SAGE_PYTHON_PACKAGE_CHECK([ptyprocess])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb5f45b15f99e4ba28e1b1f6042a0e8ea17f1dfc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:38:22 -0400
+Subject: Trac #29665: add Gentoo package information for attrs.
+
+---
+ build/pkgs/attrs/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/attrs/distros/gentoo.txt
+
+diff --git a/build/pkgs/attrs/distros/gentoo.txt b/build/pkgs/attrs/distros/gentoo.txt
+new file mode 100644
+index 00000000..3b906fa
+--- /dev/null
++++ b/build/pkgs/attrs/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/attrs
+-- 
+cgit v1.0-1-gd88e
+
+
+From 321707ebf8e9af1e4ac3a5b5b094b4226bb3a7a5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:38:55 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for attrs.
+
+---
+ build/pkgs/attrs/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/attrs/spkg-configure.m4
+
+diff --git a/build/pkgs/attrs/spkg-configure.m4 b/build/pkgs/attrs/spkg-configure.m4
+new file mode 100644
+index 00000000..ba6a9b7
+--- /dev/null
++++ b/build/pkgs/attrs/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([attrs], [SAGE_PYTHON_PACKAGE_CHECK([attrs])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 69a498a4e8854ecdfc2f1a134104983c0dcb9e32 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:40:09 -0400
+Subject: Trac #29665: add Gentoo package information for send2trash.
+
+---
+ build/pkgs/send2trash/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/send2trash/distros/gentoo.txt
+
+diff --git a/build/pkgs/send2trash/distros/gentoo.txt b/build/pkgs/send2trash/distros/gentoo.txt
+new file mode 100644
+index 00000000..a89b179
+--- /dev/null
++++ b/build/pkgs/send2trash/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/send2trash
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9baed17c84e1bdf5abd17c20766e5cd7dddc5b53 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:41:45 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for send2trash.
+
+---
+ build/pkgs/send2trash/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/send2trash/spkg-configure.m4
+
+diff --git a/build/pkgs/send2trash/spkg-configure.m4 b/build/pkgs/send2trash/spkg-configure.m4
+new file mode 100644
+index 00000000..3bbb727
+--- /dev/null
++++ b/build/pkgs/send2trash/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([send2trash], [SAGE_PYTHON_PACKAGE_CHECK([send2trash])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b9b552b2a2aaccaeb7c5b25be0b681f107522d09 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:43:27 -0400
+Subject: Trac #29665: add Gentoo package information for pyrsistent.
+
+---
+ build/pkgs/pyrsistent/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyrsistent/distros/gentoo.txt
+
+diff --git a/build/pkgs/pyrsistent/distros/gentoo.txt b/build/pkgs/pyrsistent/distros/gentoo.txt
+new file mode 100644
+index 00000000..83439ce
+--- /dev/null
++++ b/build/pkgs/pyrsistent/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyrsistent
+-- 
+cgit v1.0-1-gd88e
+
+
+From a17b31fac6104852762f57daa749443147bdf121 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:44:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pyrsistent.
+
+---
+ build/pkgs/pyrsistent/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyrsistent/spkg-configure.m4
+
+diff --git a/build/pkgs/pyrsistent/spkg-configure.m4 b/build/pkgs/pyrsistent/spkg-configure.m4
+new file mode 100644
+index 00000000..f7ca75d
+--- /dev/null
++++ b/build/pkgs/pyrsistent/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pyrsistent], [SAGE_PYTHON_PACKAGE_CHECK([pyrsistent])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 68520decad6d6937918d7a6af65ca5bd476e5d02 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:45:45 -0400
+Subject: Trac #29665: add Gentoo package information for entrypoints.
+
+---
+ build/pkgs/entrypoints/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/entrypoints/distros/gentoo.txt
+
+diff --git a/build/pkgs/entrypoints/distros/gentoo.txt b/build/pkgs/entrypoints/distros/gentoo.txt
+new file mode 100644
+index 00000000..684ddd0
+--- /dev/null
++++ b/build/pkgs/entrypoints/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/entrypoints
+-- 
+cgit v1.0-1-gd88e
+
+
+From 34213eccb642a6bad64d89acaefa83ee702cb483 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:46:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for entrypoints.
+
+---
+ build/pkgs/entrypoints/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/entrypoints/spkg-configure.m4
+
+diff --git a/build/pkgs/entrypoints/spkg-configure.m4 b/build/pkgs/entrypoints/spkg-configure.m4
+new file mode 100644
+index 00000000..caed658
+--- /dev/null
++++ b/build/pkgs/entrypoints/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([entrypoints], [SAGE_PYTHON_PACKAGE_CHECK([entrypoints])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8e985614345da1a58fcdc127a9c0ddd790f9b5d2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:48:26 -0400
+Subject: Trac #29665: add Gentoo package information for markupsafe.
+
+---
+ build/pkgs/markupsafe/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/markupsafe/distros/gentoo.txt
+
+diff --git a/build/pkgs/markupsafe/distros/gentoo.txt b/build/pkgs/markupsafe/distros/gentoo.txt
+new file mode 100644
+index 00000000..9654e35
+--- /dev/null
++++ b/build/pkgs/markupsafe/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/markupsafe
+-- 
+cgit v1.0-1-gd88e
+
+
+From d370f229ae0988856f2e0d1f6ee2df2c47169106 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:48:55 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for markupsafe.
+
+---
+ build/pkgs/markupsafe/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/markupsafe/spkg-configure.m4
+
+diff --git a/build/pkgs/markupsafe/spkg-configure.m4 b/build/pkgs/markupsafe/spkg-configure.m4
+new file mode 100644
+index 00000000..79eb8db
+--- /dev/null
++++ b/build/pkgs/markupsafe/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([markupsafe], [SAGE_PYTHON_PACKAGE_CHECK([markupsafe])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c49b285ad9e25e6bc81a7e75d461d234fdd3ea68 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:30:49 -0400
+Subject: Trac #29665: add Gentoo package information for flit_core.
+
+---
+ build/pkgs/flit_core/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/flit_core/distros/gentoo.txt
+
+diff --git a/build/pkgs/flit_core/distros/gentoo.txt b/build/pkgs/flit_core/distros/gentoo.txt
+new file mode 100644
+index 00000000..fe6bea9
+--- /dev/null
++++ b/build/pkgs/flit_core/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/flit_core
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b0ce1c4f23cd9fc4316e1eb2b9b4bde394957f3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:32:11 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for flit_core.
+
+---
+ build/pkgs/flit_core/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/flit_core/spkg-configure.m4
+
+diff --git a/build/pkgs/flit_core/spkg-configure.m4 b/build/pkgs/flit_core/spkg-configure.m4
+new file mode 100644
+index 00000000..ee67557
+--- /dev/null
++++ b/build/pkgs/flit_core/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([flit_core], [SAGE_PYTHON_PACKAGE_CHECK([flit_core])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f006c231a81428b1e1e792f889bf974f90e3c831 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:34:06 -0400
+Subject: Trac #29665: add Gentoo package information for nest_asyncio.
+
+---
+ build/pkgs/nest_asyncio/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nest_asyncio/distros/gentoo.txt
+
+diff --git a/build/pkgs/nest_asyncio/distros/gentoo.txt b/build/pkgs/nest_asyncio/distros/gentoo.txt
+new file mode 100644
+index 00000000..ab742d2
+--- /dev/null
++++ b/build/pkgs/nest_asyncio/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nest_asyncio
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4a58d0a96a84475e765a01a64f5f44c48a317e0b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:34:43 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for nest_asyncio.
+
+---
+ build/pkgs/nest_asyncio/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nest_asyncio/spkg-configure.m4
+
+diff --git a/build/pkgs/nest_asyncio/spkg-configure.m4 b/build/pkgs/nest_asyncio/spkg-configure.m4
+new file mode 100644
+index 00000000..4d81527
+--- /dev/null
++++ b/build/pkgs/nest_asyncio/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nest_asyncio], [SAGE_PYTHON_PACKAGE_CHECK([nest_asyncio])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e50af937777ea778908bc09a7a79db3dd80fdf25 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:37:02 -0400
+Subject: Trac #29665: add Gentoo package information for ipython_genutils.
+
+---
+ build/pkgs/ipython_genutils/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython_genutils/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipython_genutils/distros/gentoo.txt b/build/pkgs/ipython_genutils/distros/gentoo.txt
+new file mode 100644
+index 00000000..01bc49d
+--- /dev/null
++++ b/build/pkgs/ipython_genutils/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipython_genutils
+-- 
+cgit v1.0-1-gd88e
+
+
+From ec3c0ce9db2ba13c1a49d1bcfb7a4b249cb7ae83 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:39:20 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipython_genutils.
+
+---
+ build/pkgs/ipython_genutils/spkg-configure.m4 | 4 ++++
+ 1 file changed, 4 insertions(+)
+ create mode 100644 build/pkgs/ipython_genutils/spkg-configure.m4
+
+diff --git a/build/pkgs/ipython_genutils/spkg-configure.m4 b/build/pkgs/ipython_genutils/spkg-configure.m4
+new file mode 100644
+index 00000000..b0ba86a
+--- /dev/null
++++ b/build/pkgs/ipython_genutils/spkg-configure.m4
+@@ -0,0 +1,4 @@
++SAGE_SPKG_CONFIGURE(
++  [ipython_genutils],
++  [SAGE_PYTHON_PACKAGE_CHECK([ipython_genutils])]
++)
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5c9e2e265115e5f10d4b459a475467e30b4bddde Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:40:03 -0400
+Subject: Trac #29665: add Gentoo package information for ipython.
+
+---
+ build/pkgs/ipython/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipython/distros/gentoo.txt b/build/pkgs/ipython/distros/gentoo.txt
+new file mode 100644
+index 00000000..8b76f18
+--- /dev/null
++++ b/build/pkgs/ipython/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipython
+-- 
+cgit v1.0-1-gd88e
+
+
+From 621e707ddd040a902d7dddf0bed1de2b54ab22f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 07:37:56 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipython.
+
+---
+ build/pkgs/ipython/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython/spkg-configure.m4
+
+diff --git a/build/pkgs/ipython/spkg-configure.m4 b/build/pkgs/ipython/spkg-configure.m4
+new file mode 100644
+index 00000000..02ab89f
+--- /dev/null
++++ b/build/pkgs/ipython/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipython], [SAGE_PYTHON_PACKAGE_CHECK([ipython])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20a0613f6d441da436f3e7b8047a72bf490882bd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 07:51:11 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipywidgets.
+
+---
+ build/pkgs/ipywidgets/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipywidgets/spkg-configure.m4
+
+diff --git a/build/pkgs/ipywidgets/spkg-configure.m4 b/build/pkgs/ipywidgets/spkg-configure.m4
+new file mode 100644
+index 00000000..51ca9be
+--- /dev/null
++++ b/build/pkgs/ipywidgets/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipywidgets], [SAGE_PYTHON_PACKAGE_CHECK([ipywidgets])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 76bcd386633acc02a1a3026339d0cbd258ada04e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 10:05:16 -0400
+Subject: Trac #29665: add Gentoo package information for wheel.
+
+---
+ build/pkgs/wheel/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wheel/distros/gentoo.txt
+
+diff --git a/build/pkgs/wheel/distros/gentoo.txt b/build/pkgs/wheel/distros/gentoo.txt
+new file mode 100644
+index 00000000..ec571d5
+--- /dev/null
++++ b/build/pkgs/wheel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 96c2dd2ca7812f5333bb9d45eadb7ac408e364ce Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:51:44 -0500
+Subject: Trac #29665: add Gentoo package information for terminado.
+
+---
+ build/pkgs/terminado/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/terminado/distros/gentoo.txt
+
+diff --git a/build/pkgs/terminado/distros/gentoo.txt b/build/pkgs/terminado/distros/gentoo.txt
+new file mode 100644
+index 00000000..1df16f1
+--- /dev/null
++++ b/build/pkgs/terminado/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/terminado
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0de0f5f3d235a4339b21e37ea13c9f5e59a82e59 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:52:35 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for terminado.
+
+---
+ build/pkgs/terminado/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/terminado/spkg-configure.m4
+
+diff --git a/build/pkgs/terminado/spkg-configure.m4 b/build/pkgs/terminado/spkg-configure.m4
+new file mode 100644
+index 00000000..5defc2f
+--- /dev/null
++++ b/build/pkgs/terminado/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([terminado], [SAGE_PYTHON_PACKAGE_CHECK([terminado])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d14a745c770b02822557e7cee0a98de1cb2f3a12 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:56:15 -0500
+Subject: Trac #29665: add Gentoo package information for cffi.
+
+---
+ build/pkgs/cffi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cffi/distros/gentoo.txt
+
+diff --git a/build/pkgs/cffi/distros/gentoo.txt b/build/pkgs/cffi/distros/gentoo.txt
+new file mode 100644
+index 00000000..81eeb81
+--- /dev/null
++++ b/build/pkgs/cffi/distros/gentoo.txt
+@@ -0,0 +1 @@
++virtual/python-cffi
+-- 
+cgit v1.0-1-gd88e
+
+
+From ce393c04afc69fe050e38f780d4e117164687d80 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:57:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for cffi.
+
+---
+ build/pkgs/cffi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cffi/spkg-configure.m4
+
+diff --git a/build/pkgs/cffi/spkg-configure.m4 b/build/pkgs/cffi/spkg-configure.m4
+new file mode 100644
+index 00000000..dc81875
+--- /dev/null
++++ b/build/pkgs/cffi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([cffi], [SAGE_PYTHON_PACKAGE_CHECK([cffi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 467093315b3fdd57c8caa2f95cf99ad52b0b84fb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:57:57 -0500
+Subject: Trac #29665: add Gentoo package information for pip.
+
+---
+ build/pkgs/pip/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pip/distros/gentoo.txt
+
+diff --git a/build/pkgs/pip/distros/gentoo.txt b/build/pkgs/pip/distros/gentoo.txt
+new file mode 100644
+index 00000000..1845454
+--- /dev/null
++++ b/build/pkgs/pip/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pip[vanilla]
+-- 
+cgit v1.0-1-gd88e
+
+
+From c597fd23f9f68dabbcb7e698d0569c3e6458f6d1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 09:07:26 -0500
+Subject: Trac #29665: new spkg-configure.m4 for pip.
+
+---
+ build/pkgs/pip/spkg-configure.m4 | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+ create mode 100644 build/pkgs/pip/spkg-configure.m4
+
+diff --git a/build/pkgs/pip/spkg-configure.m4 b/build/pkgs/pip/spkg-configure.m4
+new file mode 100644
+index 00000000..c7a5562
+--- /dev/null
++++ b/build/pkgs/pip/spkg-configure.m4
+@@ -0,0 +1,12 @@
++SAGE_SPKG_CONFIGURE([pip], [
++  dnl always run this macro because it changes the default value of
++  dnl the --with-system-<package> option.
++  SAGE_PYTHON_PACKAGE_CHECK([pip])
++
++  dnl if we might not install the spkg, make sure that "pip" is in
++  dnl the user's PATH, too.
++  AS_IF([test "x$sage_spkg_install_pip" != "xyes"], [
++    AC_CHECK_PROG(HAVE_PIP, pip, yes, no)
++    AS_IF([test "x$HAVE_PIP" = "xno"], [sage_spkg_install_pip=yes])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ef8f1e807bc55d7b8321777486fa867a7c135419 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 9 Nov 2021 09:09:04 -0500
+Subject: Trac #29665: set $SAGE_PIP_INSTALL_FLAGS for
+ --enable-system-site-packages.
+
+We need to pass some special flags to "pip install" to make it do the
+right thing in the precence of system-site packages. Here we introduce
+a new autoconf variable, SAGE_PIP_INSTALL_FLAGS, that will be used
+to pass those flags to the build system.
+
+With autoconf aware of the variable, we substitute its value into the
+sage-build-env-config script for use in spkg-install.in.
+---
+ build/bin/sage-build-env-config.in | 1 +
+ configure.ac                       | 9 +++++++++
+ 2 files changed, 10 insertions(+)
+
+diff --git a/build/bin/sage-build-env-config.in b/build/bin/sage-build-env-config.in
+index 92e7dad..ad62e5f 100644
+--- a/build/bin/sage-build-env-config.in
++++ b/build/bin/sage-build-env-config.in
+@@ -53,6 +53,7 @@ export SAGE_PARI_CFG="@SAGE_PARI_CFG@"
+ 
+ export SAGE_GLPK_PREFIX="@SAGE_GLPK_PREFIX@"
+ export SAGE_FREETYPE_PREFIX="@SAGE_FREETYPE_PREFIX@"
++export SAGE_PIP_INSTALL_FLAGS="@SAGE_PIP_INSTALL_FLAGS@"
+ export SAGE_SUITESPARSE_PREFIX="@SAGE_SUITESPARSE_PREFIX@"
+ 
+ export SAGE_CONFIGURE_FFLAS_FFPACK="@SAGE_CONFIGURE_FFLAS_FFPACK@"
+diff --git a/configure.ac b/configure.ac
+index 6fafb83..6ed07ac 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -441,6 +441,14 @@ AC_ARG_ENABLE(
+     [allow the use of python packages from the system (experimental; default: no)]
+   )], [
+   AS_IF([test "x$enable_system_site_packages" = "xyes"], [
++    dnl When installing python SPKGs in the presence of system-site
++    dnl packages, we need to --ignore-installed so that a patched SPKG
++    dnl can be installed in the presence of an unpatched system package
++    dnl that appears (to pip) to be identical. The --no-deps flag is
++    dnl then needed because --ignore-installed will make any installed
++    dnl dependencies invisible to pip, who does not appreciate that.
++    SAGE_PIP_INSTALL_FLAGS="${SAGE_PIP_INSTALL_FLAGS} --no-deps --ignore-installed"
++
+     SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
+ 
+     dnl We want to raise an error if the user asked for "system site
+@@ -453,6 +461,7 @@ AC_ARG_ENABLE(
+     with_system_python3="force"
+   ])
+ ])
++AC_SUBST([SAGE_PIP_INSTALL_FLAGS])
+ AC_SUBST([SAGE_VENV_FLAGS])
+ 
+ SAGE_SPKG_OPTIONS=""
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3cf365fef84e809e74abd2eb388e7a8e9af9d739 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 9 Nov 2021 21:01:58 -0500
+Subject: Trac #29665: pass $SAGE_PIP_INSTALL_FLAGS to sdh_pip_install.
+
+Since sdh_pip_install is usually called from spkg-install.in, the
+variables from sage-build-env-config will be available. Here we pass
+the contents of $SAGE_PIP_INSTALL_FLAGS to sage-pip-install
+unconditionally, and hope that the user ignores this variable unless
+he truly knows what he is doing.
+---
+ build/bin/sage-dist-helpers | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/build/bin/sage-dist-helpers b/build/bin/sage-dist-helpers
+index fe364e5..1032ac3 100644
+--- a/build/bin/sage-dist-helpers
++++ b/build/bin/sage-dist-helpers
+@@ -303,7 +303,11 @@ sdh_store_wheel() {
+ }
+ 
+ sdh_store_and_pip_install_wheel() {
+-    local pip_options=""
++    # The $SAGE_PIP_INSTALL_FLAGS variable is set by sage-build-env-config.
++    # We skip sanity checking its contents since you should either let sage
++    # decide what it contains, or really know what you are doing.
++    local pip_options="${SAGE_PIP_INSTALL_FLAGS}"
++
+     while [ $# -gt 0 ]; do
+         case $1 in
+             -*) pip_options="$pip_options $1"
+-- 
+cgit v1.0-1-gd88e
+
+
+From 50f0438ee857b8f0b7d7ad924e6bba9c5e1bc033 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:10:46 -0500
+Subject: Trac #29665: add Gentoo package information for pexpect.
+
+---
+ build/pkgs/pexpect/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pexpect/distros/gentoo.txt
+
+diff --git a/build/pkgs/pexpect/distros/gentoo.txt b/build/pkgs/pexpect/distros/gentoo.txt
+new file mode 100644
+index 00000000..30c4b60
+--- /dev/null
++++ b/build/pkgs/pexpect/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pexpect
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4d784688d997290b462646fa7f36114a41f3f453 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:11:25 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pexpect.
+
+---
+ build/pkgs/pexpect/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pexpect/spkg-configure.m4
+
+diff --git a/build/pkgs/pexpect/spkg-configure.m4 b/build/pkgs/pexpect/spkg-configure.m4
+new file mode 100644
+index 00000000..6520856
+--- /dev/null
++++ b/build/pkgs/pexpect/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pexpect], [SAGE_PYTHON_PACKAGE_CHECK([pexpect])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6447122dc76a3b7a58340dbed942db66530b5b07 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:12:05 -0500
+Subject: Trac #29665: add Gentoo package information for docutils.
+
+---
+ build/pkgs/docutils/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/docutils/distros/gentoo.txt
+
+diff --git a/build/pkgs/docutils/distros/gentoo.txt b/build/pkgs/docutils/distros/gentoo.txt
+new file mode 100644
+index 00000000..fe4a452
+--- /dev/null
++++ b/build/pkgs/docutils/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/docutils
+-- 
+cgit v1.0-1-gd88e
+
+
+From 709041480a5fc729b0ee7f1a8a3b16d4d65321b5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:12:38 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for docutils.
+
+---
+ build/pkgs/docutils/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/docutils/spkg-configure.m4
+
+diff --git a/build/pkgs/docutils/spkg-configure.m4 b/build/pkgs/docutils/spkg-configure.m4
+new file mode 100644
+index 00000000..3584e45
+--- /dev/null
++++ b/build/pkgs/docutils/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([docutils], [SAGE_PYTHON_PACKAGE_CHECK([docutils])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 782d38b48ab87afccc43fbc071e7b7ed48fb0a20 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:14:37 -0500
+Subject: Trac #29665: add Gentoo package information for nbclient.
+
+---
+ build/pkgs/nbclient/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbclient/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbclient/distros/gentoo.txt b/build/pkgs/nbclient/distros/gentoo.txt
+new file mode 100644
+index 00000000..06ff18d
+--- /dev/null
++++ b/build/pkgs/nbclient/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbclient
+-- 
+cgit v1.0-1-gd88e
+
+
+From 19ce09336532336f69db74381932d51a429dfaca Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:15:11 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for nbclient.
+
+---
+ build/pkgs/nbclient/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbclient/spkg-configure.m4
+
+diff --git a/build/pkgs/nbclient/spkg-configure.m4 b/build/pkgs/nbclient/spkg-configure.m4
+new file mode 100644
+index 00000000..14178b7
+--- /dev/null
++++ b/build/pkgs/nbclient/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbclient], [SAGE_PYTHON_PACKAGE_CHECK([nbclient])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c063b9de42c1780368000a563d0dbe80b6fff169 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:17:36 -0500
+Subject: Trac #29665: add Gentoo package information for argon2_cffi.
+
+---
+ build/pkgs/argon2_cffi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argon2_cffi/distros/gentoo.txt
+
+diff --git a/build/pkgs/argon2_cffi/distros/gentoo.txt b/build/pkgs/argon2_cffi/distros/gentoo.txt
+new file mode 100644
+index 00000000..2f12ca8
+--- /dev/null
++++ b/build/pkgs/argon2_cffi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/argon2-cffi
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0b4d5699dd51ea52550fba7db9e1cbb8bbac1892 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:18:35 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for argon2_cffi.
+
+---
+ build/pkgs/argon2_cffi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argon2_cffi/spkg-configure.m4
+
+diff --git a/build/pkgs/argon2_cffi/spkg-configure.m4 b/build/pkgs/argon2_cffi/spkg-configure.m4
+new file mode 100644
+index 00000000..03ebc63
+--- /dev/null
++++ b/build/pkgs/argon2_cffi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([argon2_cffi], [SAGE_PYTHON_PACKAGE_CHECK([argon2_cffi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2b4119558a6e0b1aa512848539a237676b035c83 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:30:48 -0500
+Subject: Trac #29665: fix package name in dateutil's install-requires.txt.
+
+---
+ build/pkgs/dateutil/install-requires.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/build/pkgs/dateutil/install-requires.txt b/build/pkgs/dateutil/install-requires.txt
+index 0ae93da..face537 100644
+--- a/build/pkgs/dateutil/install-requires.txt
++++ b/build/pkgs/dateutil/install-requires.txt
+@@ -1 +1 @@
+-dateutil >=2.8.1
++python-dateutil >=2.8.1
+-- 
+cgit v1.0-1-gd88e
+
+
+From df371b7c4d20a3353d43940306ad22e11aba29da Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:31:41 -0500
+Subject: Trac #29665: add Gentoo package information for dateutil.
+
+---
+ build/pkgs/dateutil/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/dateutil/distros/gentoo.txt
+
+diff --git a/build/pkgs/dateutil/distros/gentoo.txt b/build/pkgs/dateutil/distros/gentoo.txt
+new file mode 100644
+index 00000000..e129df7
+--- /dev/null
++++ b/build/pkgs/dateutil/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/python-dateutil
+-- 
+cgit v1.0-1-gd88e
+
+
+From 577695dfdf661ee26c0ffd767bdbf479d95f7fb4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:32:21 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for dateutil.
+
+---
+ build/pkgs/dateutil/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/dateutil/spkg-configure.m4
+
+diff --git a/build/pkgs/dateutil/spkg-configure.m4 b/build/pkgs/dateutil/spkg-configure.m4
+new file mode 100644
+index 00000000..fdcd127
+--- /dev/null
++++ b/build/pkgs/dateutil/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([dateutil], [SAGE_PYTHON_PACKAGE_CHECK([dateutil])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1984651caac624ec4bb58814ca1d57fe66f9881a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:33:51 -0500
+Subject: Trac #29665: add Gentoo package information for setuptools_scm.
+
+---
+ build/pkgs/setuptools_scm/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/setuptools_scm/distros/gentoo.txt
+
+diff --git a/build/pkgs/setuptools_scm/distros/gentoo.txt b/build/pkgs/setuptools_scm/distros/gentoo.txt
+new file mode 100644
+index 00000000..8989597
+--- /dev/null
++++ b/build/pkgs/setuptools_scm/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/setuptools_scm
+-- 
+cgit v1.0-1-gd88e
+
+
+From ebf7c854ed966e7353759be485c4f5a57b9a10fa Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:34:49 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for setuptools_scm.
+
+---
+ build/pkgs/setuptools_scm/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/setuptools_scm/spkg-configure.m4
+
+diff --git a/build/pkgs/setuptools_scm/spkg-configure.m4 b/build/pkgs/setuptools_scm/spkg-configure.m4
+new file mode 100644
+index 00000000..437148c
+--- /dev/null
++++ b/build/pkgs/setuptools_scm/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([setuptools_scm], [
++  SAGE_PYTHON_PACKAGE_CHECK([setuptools_scm])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0dee0d0c28f31b1f619e44c710a3c9e22d2b2544 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:36:33 -0500
+Subject: Trac #29665: add Gentoo package information for nbconvert.
+
+---
+ build/pkgs/nbconvert/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbconvert/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbconvert/distros/gentoo.txt b/build/pkgs/nbconvert/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c45a10
+--- /dev/null
++++ b/build/pkgs/nbconvert/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbconvert
+-- 
+cgit v1.0-1-gd88e
+
+
+From 473789eb11b1838bc32dc8a63509ee199afc8912 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:37:37 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for nbconvert.
+
+---
+ build/pkgs/nbconvert/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbconvert/spkg-configure.m4
+
+diff --git a/build/pkgs/nbconvert/spkg-configure.m4 b/build/pkgs/nbconvert/spkg-configure.m4
+new file mode 100644
+index 00000000..9b5dee3
+--- /dev/null
++++ b/build/pkgs/nbconvert/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbconvert], [SAGE_PYTHON_PACKAGE_CHECK([nbconvert])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f0703b594e57c980d605aa9bc8316c45a7858b3b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:41:51 -0500
+Subject: Trac #29665: add Gentoo package information for jupyter_core.
+
+---
+ build/pkgs/jupyter_core/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyter_core/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyter_core/distros/gentoo.txt b/build/pkgs/jupyter_core/distros/gentoo.txt
+new file mode 100644
+index 00000000..f168c5a
+--- /dev/null
++++ b/build/pkgs/jupyter_core/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyter_core
+-- 
+cgit v1.0-1-gd88e
+
+
+From 061a307cc4a6680d8500fde834975064e59540d5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:42:48 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jupyter_core.
+
+---
+ build/pkgs/jupyter_core/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyter_core/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyter_core/spkg-configure.m4 b/build/pkgs/jupyter_core/spkg-configure.m4
+new file mode 100644
+index 00000000..67df9c3
+--- /dev/null
++++ b/build/pkgs/jupyter_core/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyter_core], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyter_core])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b85abe964ce0b98b5842efe9cbad9bdb1c89202f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:47:08 -0500
+Subject: Trac #29665: add Gentoo package information for jupyter_client.
+
+---
+ build/pkgs/jupyter_client/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyter_client/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyter_client/distros/gentoo.txt b/build/pkgs/jupyter_client/distros/gentoo.txt
+new file mode 100644
+index 00000000..4f1de88
+--- /dev/null
++++ b/build/pkgs/jupyter_client/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyter_client
+-- 
+cgit v1.0-1-gd88e
+
+
+From 86323ff1e0b2507933df6bc2a96c9175957640c5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:48:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jupyter_client.
+
+---
+ build/pkgs/jupyter_client/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyter_client/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyter_client/spkg-configure.m4 b/build/pkgs/jupyter_client/spkg-configure.m4
+new file mode 100644
+index 00000000..fbd3498
+--- /dev/null
++++ b/build/pkgs/jupyter_client/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyter_client], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyter_client])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a8475e27dd30d752d05ab6fea6579e8623501d82 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:48:58 -0500
+Subject: Trac #29665: add Gentoo package information for snowballstemmer.
+
+---
+ build/pkgs/snowballstemmer/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/snowballstemmer/distros/gentoo.txt
+
+diff --git a/build/pkgs/snowballstemmer/distros/gentoo.txt b/build/pkgs/snowballstemmer/distros/gentoo.txt
+new file mode 100644
+index 00000000..63fd851
+--- /dev/null
++++ b/build/pkgs/snowballstemmer/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/snowballstemmer
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0833c9b781062b4ed86d619e050a6f5d60e36080 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:49:38 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for snowballstemmer.
+
+---
+ build/pkgs/snowballstemmer/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/snowballstemmer/spkg-configure.m4
+
+diff --git a/build/pkgs/snowballstemmer/spkg-configure.m4 b/build/pkgs/snowballstemmer/spkg-configure.m4
+new file mode 100644
+index 00000000..6aa0882
+--- /dev/null
++++ b/build/pkgs/snowballstemmer/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([snowballstemmer], [
++  SAGE_PYTHON_PACKAGE_CHECK([snowballstemmer])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 50a1cf2a2bcd7eeec64cbc3f70e3e9fbe5d850fe Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:50:47 -0500
+Subject: Trac #29665: add Gentoo package information for tornado.
+
+---
+ build/pkgs/tornado/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tornado/distros/gentoo.txt
+
+diff --git a/build/pkgs/tornado/distros/gentoo.txt b/build/pkgs/tornado/distros/gentoo.txt
+new file mode 100644
+index 00000000..6ae4b9f
+--- /dev/null
++++ b/build/pkgs/tornado/distros/gentoo.txt
+@@ -0,0 +1 @@
++www-servers/tornado
+-- 
+cgit v1.0-1-gd88e
+
+
+From 118f4da6e03476c726363e8e22ecda32f13bfc33 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:51:26 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for tornado.
+
+---
+ build/pkgs/tornado/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tornado/spkg-configure.m4
+
+diff --git a/build/pkgs/tornado/spkg-configure.m4 b/build/pkgs/tornado/spkg-configure.m4
+new file mode 100644
+index 00000000..1ee5bc9
+--- /dev/null
++++ b/build/pkgs/tornado/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tornado], [SAGE_PYTHON_PACKAGE_CHECK([tornado])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3850701747a6c8ef60840bdfdb589b28d4cd2b9a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:52:21 -0500
+Subject: Trac #29665: add Gentoo package information for jsonschema.
+
+---
+ build/pkgs/jsonschema/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jsonschema/distros/gentoo.txt
+
+diff --git a/build/pkgs/jsonschema/distros/gentoo.txt b/build/pkgs/jsonschema/distros/gentoo.txt
+new file mode 100644
+index 00000000..d708e4c
+--- /dev/null
++++ b/build/pkgs/jsonschema/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jsonschema
+-- 
+cgit v1.0-1-gd88e
+
+
+From 76e3917c8af781af00f642cfada7a79594429e30 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:54:03 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jsonschema.
+
+---
+ build/pkgs/jsonschema/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jsonschema/spkg-configure.m4
+
+diff --git a/build/pkgs/jsonschema/spkg-configure.m4 b/build/pkgs/jsonschema/spkg-configure.m4
+new file mode 100644
+index 00000000..b9e5e21
+--- /dev/null
++++ b/build/pkgs/jsonschema/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jsonschema], [SAGE_PYTHON_PACKAGE_CHECK([jsonschema])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From fd4a16c11669b6dd73ac6325bca820e76db00402 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:55:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ widgetsnbextension.
+
+---
+ build/pkgs/widgetsnbextension/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/widgetsnbextension/spkg-configure.m4
+
+diff --git a/build/pkgs/widgetsnbextension/spkg-configure.m4 b/build/pkgs/widgetsnbextension/spkg-configure.m4
+new file mode 100644
+index 00000000..bf82daf
+--- /dev/null
++++ b/build/pkgs/widgetsnbextension/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([widgetsnbextension], [
++  SAGE_PYTHON_PACKAGE_CHECK([widgetsnbextension])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8079a9f384e3c8480e157dd98c3db2f43c987f4e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:57:20 -0500
+Subject: Trac #29665: add Gentoo package information for importlib_resources.
+
+---
+ build/pkgs/importlib_resources/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/importlib_resources/distros/gentoo.txt
+
+diff --git a/build/pkgs/importlib_resources/distros/gentoo.txt b/build/pkgs/importlib_resources/distros/gentoo.txt
+new file mode 100644
+index 00000000..d5e1f2c
+--- /dev/null
++++ b/build/pkgs/importlib_resources/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/importlib_resources
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2c430d7c52f02779a6c41b98ac2f4edd8b6759c3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:58:00 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ importlib_resources.
+
+---
+ build/pkgs/importlib_resources/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/importlib_resources/spkg-configure.m4
+
+diff --git a/build/pkgs/importlib_resources/spkg-configure.m4 b/build/pkgs/importlib_resources/spkg-configure.m4
+new file mode 100644
+index 00000000..50df55b
+--- /dev/null
++++ b/build/pkgs/importlib_resources/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([importlib_resources], [
++  SAGE_PYTHON_PACKAGE_CHECK([importlib_resources])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 00d13d7bf2e50aae2ccef3b2b30293c70a922af2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:58:38 -0500
+Subject: Trac #29665: add Gentoo package information for kiwisolver.
+
+---
+ build/pkgs/kiwisolver/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/kiwisolver/distros/gentoo.txt
+
+diff --git a/build/pkgs/kiwisolver/distros/gentoo.txt b/build/pkgs/kiwisolver/distros/gentoo.txt
+new file mode 100644
+index 00000000..7b30c95
+--- /dev/null
++++ b/build/pkgs/kiwisolver/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/kiwisolver
+-- 
+cgit v1.0-1-gd88e
+
+
+From 72b7907ef7ea9fa4ff6948ea34cfe2f693ee6c31 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:59:09 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for kiwisolver.
+
+---
+ build/pkgs/kiwisolver/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/kiwisolver/spkg-configure.m4
+
+diff --git a/build/pkgs/kiwisolver/spkg-configure.m4 b/build/pkgs/kiwisolver/spkg-configure.m4
+new file mode 100644
+index 00000000..4e7ac97
+--- /dev/null
++++ b/build/pkgs/kiwisolver/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([kiwisolver], [SAGE_PYTHON_PACKAGE_CHECK([kiwisolver])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 479351279e4e0ea7e2d146434f0daba038765cfd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:00:04 -0500
+Subject: Trac #29665: add Gentoo package information for notebook.
+
+---
+ build/pkgs/notebook/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/notebook/distros/gentoo.txt
+
+diff --git a/build/pkgs/notebook/distros/gentoo.txt b/build/pkgs/notebook/distros/gentoo.txt
+new file mode 100644
+index 00000000..6475d72
+--- /dev/null
++++ b/build/pkgs/notebook/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/notebook
+-- 
+cgit v1.0-1-gd88e
+
+
+From f4d9242ea654977f8ad7865c82eec593e11a36bc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:01:42 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for notebook.
+
+---
+ build/pkgs/notebook/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/notebook/spkg-configure.m4
+
+diff --git a/build/pkgs/notebook/spkg-configure.m4 b/build/pkgs/notebook/spkg-configure.m4
+new file mode 100644
+index 00000000..a17ba95
+--- /dev/null
++++ b/build/pkgs/notebook/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([notebook], [SAGE_PYTHON_PACKAGE_CHECK([notebook])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9837070c7f8e9a71283b84d49d4fd2c94b78a464 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:02:38 -0500
+Subject: Trac #29665: add Gentoo package information for matplotlib_inline.
+
+---
+ build/pkgs/matplotlib_inline/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/matplotlib_inline/distros/gentoo.txt
+
+diff --git a/build/pkgs/matplotlib_inline/distros/gentoo.txt b/build/pkgs/matplotlib_inline/distros/gentoo.txt
+new file mode 100644
+index 00000000..6a5859c
+--- /dev/null
++++ b/build/pkgs/matplotlib_inline/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/matplotlib-inline
+-- 
+cgit v1.0-1-gd88e
+
+
+From 750be73b25b92b4875e47d044360ac0e1116ec3e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:03:28 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for matplotlib_inline.
+
+---
+ build/pkgs/matplotlib_inline/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/matplotlib_inline/spkg-configure.m4
+
+diff --git a/build/pkgs/matplotlib_inline/spkg-configure.m4 b/build/pkgs/matplotlib_inline/spkg-configure.m4
+new file mode 100644
+index 00000000..e59658f
+--- /dev/null
++++ b/build/pkgs/matplotlib_inline/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([matplotlib_inline], [
++  SAGE_PYTHON_PACKAGE_CHECK([matplotlib_inline])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 273505f49698dcd2ab30c2756b07113c9b7e7791 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:04:10 -0500
+Subject: Trac #29665: add Gentoo package information for ipykernel.
+
+---
+ build/pkgs/ipykernel/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipykernel/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipykernel/distros/gentoo.txt b/build/pkgs/ipykernel/distros/gentoo.txt
+new file mode 100644
+index 00000000..88aab61
+--- /dev/null
++++ b/build/pkgs/ipykernel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipykernel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 629ad36c9e4ae0cdff4a013289b4f2911442445e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:04:46 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for ipykernel.
+
+---
+ build/pkgs/ipykernel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipykernel/spkg-configure.m4
+
+diff --git a/build/pkgs/ipykernel/spkg-configure.m4 b/build/pkgs/ipykernel/spkg-configure.m4
+new file mode 100644
+index 00000000..94ecc2d
+--- /dev/null
++++ b/build/pkgs/ipykernel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipykernel], [SAGE_PYTHON_PACKAGE_CHECK([ipykernel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b8d709edb6a24fd5868ee2818b56e78257b2eafa Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:05:26 -0500
+Subject: Trac #29665: add Gentoo package information for prompt_toolkit.
+
+---
+ build/pkgs/prompt_toolkit/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/prompt_toolkit/distros/gentoo.txt
+
+diff --git a/build/pkgs/prompt_toolkit/distros/gentoo.txt b/build/pkgs/prompt_toolkit/distros/gentoo.txt
+new file mode 100644
+index 00000000..6902484
+--- /dev/null
++++ b/build/pkgs/prompt_toolkit/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/prompt_toolkit
+-- 
+cgit v1.0-1-gd88e
+
+
+From 16c0b5e767ae4dac4440510b7253e5c8642b7d2c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:10:39 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for prompt_toolkit.
+
+---
+ build/pkgs/prompt_toolkit/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/prompt_toolkit/spkg-configure.m4
+
+diff --git a/build/pkgs/prompt_toolkit/spkg-configure.m4 b/build/pkgs/prompt_toolkit/spkg-configure.m4
+new file mode 100644
+index 00000000..fd8c1a6
+--- /dev/null
++++ b/build/pkgs/prompt_toolkit/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([prompt_toolkit], [
++  SAGE_PYTHON_PACKAGE_CHECK([prompt_toolkit])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0cd9283e8bb6c8ae413fc8f715c021f7ec3ca2c8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:12:10 -0500
+Subject: Trac #29665: add Gentoo package information for charset_normalizer.
+
+---
+ build/pkgs/charset_normalizer/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/charset_normalizer/distros/gentoo.txt
+
+diff --git a/build/pkgs/charset_normalizer/distros/gentoo.txt b/build/pkgs/charset_normalizer/distros/gentoo.txt
+new file mode 100644
+index 00000000..eefeb89
+--- /dev/null
++++ b/build/pkgs/charset_normalizer/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/charset_normalizer
+-- 
+cgit v1.0-1-gd88e
+
+
+From a04b01a9ab59097d189edcc5ddcb461faede83b2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:12:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ charset_normalizer.
+
+---
+ build/pkgs/charset_normalizer/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/charset_normalizer/spkg-configure.m4
+
+diff --git a/build/pkgs/charset_normalizer/spkg-configure.m4 b/build/pkgs/charset_normalizer/spkg-configure.m4
+new file mode 100644
+index 00000000..18b18cf
+--- /dev/null
++++ b/build/pkgs/charset_normalizer/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([charset_normalizer], [
++  SAGE_PYTHON_PACKAGE_CHECK([charset_normalizer])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d2ea08138711c53046f977b586f33b09b176b2e3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:13:37 -0500
+Subject: Trac #29665: add Gentoo package information for prometheus_client.
+
+---
+ build/pkgs/prometheus_client/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/prometheus_client/distros/gentoo.txt
+
+diff --git a/build/pkgs/prometheus_client/distros/gentoo.txt b/build/pkgs/prometheus_client/distros/gentoo.txt
+new file mode 100644
+index 00000000..aa2889c
+--- /dev/null
++++ b/build/pkgs/prometheus_client/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/prometheus_client
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b0393200e9edd3e26b8a55ba67e5710e7403fcb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:15:09 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for prometheus_client.
+
+---
+ build/pkgs/prometheus_client/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/prometheus_client/spkg-configure.m4
+
+diff --git a/build/pkgs/prometheus_client/spkg-configure.m4 b/build/pkgs/prometheus_client/spkg-configure.m4
+new file mode 100644
+index 00000000..b494588
+--- /dev/null
++++ b/build/pkgs/prometheus_client/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([prometheus_client], [
++  SAGE_PYTHON_PACKAGE_CHECK([prometheus_client])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From cdcd85284f43ca4ad18353ec3527b2901e57b788 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:17:23 -0500
+Subject: Trac #29665: add Gentoo package information for pybind11.
+
+---
+ build/pkgs/pybind11/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pybind11/distros/gentoo.txt
+
+diff --git a/build/pkgs/pybind11/distros/gentoo.txt b/build/pkgs/pybind11/distros/gentoo.txt
+new file mode 100644
+index 00000000..0c500b3
+--- /dev/null
++++ b/build/pkgs/pybind11/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pybind11
+-- 
+cgit v1.0-1-gd88e
+
+
+From efdd1eb64c4799fe3cdf2221824182941b3fda2d Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:17:51 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pybind11.
+
+---
+ build/pkgs/pybind11/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pybind11/spkg-configure.m4
+
+diff --git a/build/pkgs/pybind11/spkg-configure.m4 b/build/pkgs/pybind11/spkg-configure.m4
+new file mode 100644
+index 00000000..cce1cf5
+--- /dev/null
++++ b/build/pkgs/pybind11/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pybind11], [SAGE_PYTHON_PACKAGE_CHECK([pybind11])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b2128f33b68ea33927284116ea598dd186902400 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:19:23 -0500
+Subject: Trac #29665: add Gentoo package information for pkgconfig.
+
+---
+ build/pkgs/pkgconfig/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pkgconfig/distros/gentoo.txt
+
+diff --git a/build/pkgs/pkgconfig/distros/gentoo.txt b/build/pkgs/pkgconfig/distros/gentoo.txt
+new file mode 100644
+index 00000000..32e8618
+--- /dev/null
++++ b/build/pkgs/pkgconfig/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pkgconfig
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b373b49e06aadeb36dc57e500da9a322460e658 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:19:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pkgconfig.
+
+---
+ build/pkgs/pkgconfig/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pkgconfig/spkg-configure.m4
+
+diff --git a/build/pkgs/pkgconfig/spkg-configure.m4 b/build/pkgs/pkgconfig/spkg-configure.m4
+new file mode 100644
+index 00000000..6708293
+--- /dev/null
++++ b/build/pkgs/pkgconfig/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pkgconfig], [SAGE_PYTHON_PACKAGE_CHECK([pkgconfig])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ce578729eb0d14baab365351ba9a9ffffb7b79f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:21:10 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_serializinghtml.
+
+---
+ build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt b/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+new file mode 100644
+index 00000000..38bca8f
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-serializinghtml
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb0f42c32bbce0e4488678312f5e2d88c6f42c9b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:21:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_serializinghtml.
+
+---
+ build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4 b/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+new file mode 100644
+index 00000000..be8e625
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_serializinghtml], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_serializinghtml])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e47dcf985e40475de85c9436a85537751318bc3d Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:22:54 -0500
+Subject: Trac #29665: add Gentoo package information for sphinxcontrib_jsmath.
+
+---
+ build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt b/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+new file mode 100644
+index 00000000..041a471
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-jsmath
+-- 
+cgit v1.0-1-gd88e
+
+
+From 72cff6fd35f93de4fa855bc870569dd733ff5c24 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:23:49 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_jsmath.
+
+---
+ build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4 b/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+new file mode 100644
+index 00000000..e46bde2
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_jsmath], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_jsmath])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a36395d70f759449cd63c1b0990fbdcb4cb25ca0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:24:26 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_devhelp.
+
+---
+ build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..9b5c899
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-devhelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9953a5dd1646ed0ad51d2e3935cf609bc9e7fd1c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:25:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_devhelp.
+
+---
+ build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+new file mode 100644
+index 00000000..8728136
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_devhelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_devhelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b199d5363aad93f3cb23f7904c9553a28b06348f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:25:53 -0500
+Subject: Trac #29665: add Gentoo package information for sphinxcontrib_qthelp.
+
+---
+ build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..7210099
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-qthelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 94ac8806739f3938e73f5857328e91e0d42e98d2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:26:28 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_qthelp.
+
+---
+ build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+new file mode 100644
+index 00000000..81ea5e1
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_qthelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_qthelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From beedc154aa405e8a58aee8889f510db07adc89a7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:26:54 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_applehelp.
+
+---
+ build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..66ac8da
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-applehelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 07d47c3673d6b35423b71f621cb400989c0101c2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:27:19 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_applehelp.
+
+---
+ build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+new file mode 100644
+index 00000000..e834aed
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_applehelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_applehelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 333a66546c5d421735c49dbafd7370a827f22781 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:27:46 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_htmlhelp.
+
+---
+ build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..e080bac
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-htmlhelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From bfaeb3962254439b63f1f2e0e883de462c7831be Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:29:18 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_htmlhelp.
+
+---
+ build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+new file mode 100644
+index 00000000..c77b003
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_htmlhelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_htmlhelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 782cde13da06e8b85806cb7cbc8aceee0364e639 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:30:23 -0500
+Subject: Trac #29665: add Gentoo package information for jupyterlab_pygments.
+
+---
+ build/pkgs/jupyterlab_pygments/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyterlab_pygments/distros/gentoo.txt b/build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+new file mode 100644
+index 00000000..c57b4f1
+--- /dev/null
++++ b/build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyterlab_pygments
+-- 
+cgit v1.0-1-gd88e
+
+
+From 39f974cfa4a8c6e5dd897f152f83ec82f40ee9f7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:31:13 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ jupyterlab_pygments.
+
+---
+ build/pkgs/jupyterlab_pygments/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyterlab_pygments/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyterlab_pygments/spkg-configure.m4 b/build/pkgs/jupyterlab_pygments/spkg-configure.m4
+new file mode 100644
+index 00000000..e46e21f
+--- /dev/null
++++ b/build/pkgs/jupyterlab_pygments/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyterlab_pygments], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyterlab_pygments])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From db704620700fd36cec3bf6125938f3ee00a9eb5e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:29:15 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for ply.
+
+---
+ build/pkgs/ply/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ply/spkg-configure.m4
+
+diff --git a/build/pkgs/ply/spkg-configure.m4 b/build/pkgs/ply/spkg-configure.m4
+new file mode 100644
+index 00000000..ffb0030
+--- /dev/null
++++ b/build/pkgs/ply/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ply], [SAGE_PYTHON_PACKAGE_CHECK([ply])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6aac31dabcdfdef228d7780398a3fda1a4cc566f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:29:51 -0500
+Subject: Trac #29665: add Gentoo package information for ply.
+
+---
+ build/pkgs/ply/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ply/distros/gentoo.txt
+
+diff --git a/build/pkgs/ply/distros/gentoo.txt b/build/pkgs/ply/distros/gentoo.txt
+new file mode 100644
+index 00000000..c8b1630
+--- /dev/null
++++ b/build/pkgs/ply/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ply
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb8d3372936ec37470d69687a0f91592129460ae Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:30:33 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for gast.
+
+---
+ build/pkgs/gast/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/gast/spkg-configure.m4
+
+diff --git a/build/pkgs/gast/spkg-configure.m4 b/build/pkgs/gast/spkg-configure.m4
+new file mode 100644
+index 00000000..26ec59f
+--- /dev/null
++++ b/build/pkgs/gast/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([gast], [SAGE_PYTHON_PACKAGE_CHECK([gast])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1cdc4046a88f1c2b4e5c162f66c6db6090b24194 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:31:15 -0500
+Subject: Trac #29665: add Gentoo package information for gast.
+
+---
+ build/pkgs/gast/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/gast/distros/gentoo.txt
+
+diff --git a/build/pkgs/gast/distros/gentoo.txt b/build/pkgs/gast/distros/gentoo.txt
+new file mode 100644
+index 00000000..3be5e7e
+--- /dev/null
++++ b/build/pkgs/gast/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/gast
+-- 
+cgit v1.0-1-gd88e
+
+
+From 96068b8a3742b65d619190e1d9fa5db399e6b4f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:32:20 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pythran.
+
+---
+ build/pkgs/pythran/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pythran/spkg-configure.m4
+
+diff --git a/build/pkgs/pythran/spkg-configure.m4 b/build/pkgs/pythran/spkg-configure.m4
+new file mode 100644
+index 00000000..592e95b
+--- /dev/null
++++ b/build/pkgs/pythran/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pythran], [SAGE_PYTHON_PACKAGE_CHECK([pythran])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1fa0fad3ae8f7e559c6fc315c6773a7d8aac0bfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:32:55 -0500
+Subject: Trac #29665: add Gentoo package information for pythran.
+
+---
+ build/pkgs/pythran/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pythran/distros/gentoo.txt
+
+diff --git a/build/pkgs/pythran/distros/gentoo.txt b/build/pkgs/pythran/distros/gentoo.txt
+new file mode 100644
+index 00000000..1bb7cdc
+--- /dev/null
++++ b/build/pkgs/pythran/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pythran
+-- 
+cgit v1.0-1-gd88e
+
+
+From d26370e5b8c88e76abfb7c27e3defb71c9e9f711 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:33:50 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for beniget.
+
+---
+ build/pkgs/beniget/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/beniget/spkg-configure.m4
+
+diff --git a/build/pkgs/beniget/spkg-configure.m4 b/build/pkgs/beniget/spkg-configure.m4
+new file mode 100644
+index 00000000..8ae6101
+--- /dev/null
++++ b/build/pkgs/beniget/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([beniget], [SAGE_PYTHON_PACKAGE_CHECK([beniget])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From eeeb296ed9b9694a865534103fd58e62a151ef5e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:34:22 -0500
+Subject: Trac #29665: add Gentoo package information for beniget.
+
+---
+ build/pkgs/beniget/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/beniget/distros/gentoo.txt
+
+diff --git a/build/pkgs/beniget/distros/gentoo.txt b/build/pkgs/beniget/distros/gentoo.txt
+new file mode 100644
+index 00000000..1a5972c
+--- /dev/null
++++ b/build/pkgs/beniget/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/beniget
+-- 
+cgit v1.0-1-gd88e
+
+
+From 078b2ff272d0eeff5cce40ad7eb176d9ddd7bdff Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:35:37 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for alabaster.
+
+---
+ build/pkgs/alabaster/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/alabaster/spkg-configure.m4
+
+diff --git a/build/pkgs/alabaster/spkg-configure.m4 b/build/pkgs/alabaster/spkg-configure.m4
+new file mode 100644
+index 00000000..4eca6e0
+--- /dev/null
++++ b/build/pkgs/alabaster/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([alabaster], [SAGE_PYTHON_PACKAGE_CHECK([alabaster])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7dc264353e5f64110431ff28c1b8b7e89699e9bd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:36:06 -0500
+Subject: Trac #29665: add Gentoo package information for alabaster.
+
+---
+ build/pkgs/alabaster/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/alabaster/distros/gentoo.txt
+
+diff --git a/build/pkgs/alabaster/distros/gentoo.txt b/build/pkgs/alabaster/distros/gentoo.txt
+new file mode 100644
+index 00000000..cffece6
+--- /dev/null
++++ b/build/pkgs/alabaster/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/alabaster
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8011a5e675e7e61a77ce34a299ee961a9f44253f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:43:59 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ importlib_metadata.
+
+---
+ build/pkgs/importlib_metadata/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/importlib_metadata/spkg-configure.m4
+
+diff --git a/build/pkgs/importlib_metadata/spkg-configure.m4 b/build/pkgs/importlib_metadata/spkg-configure.m4
+new file mode 100644
+index 00000000..0554e52
+--- /dev/null
++++ b/build/pkgs/importlib_metadata/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([importlib_metadata], [
++  SAGE_PYTHON_PACKAGE_CHECK([importlib_metadata])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 928ca0019e3ec6c4541a16b28bcc6710df6d010b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:44:28 -0500
+Subject: Trac #29665: add Gentoo package information for importlib_metadata.
+
+---
+ build/pkgs/importlib_metadata/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/importlib_metadata/distros/gentoo.txt
+
+diff --git a/build/pkgs/importlib_metadata/distros/gentoo.txt b/build/pkgs/importlib_metadata/distros/gentoo.txt
+new file mode 100644
+index 00000000..4f92786
+--- /dev/null
++++ b/build/pkgs/importlib_metadata/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/importlib_metadata
+-- 
+cgit v1.0-1-gd88e
+
+
+From 135f184f7498a2046065e669723e68efe2d65cee Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 21:16:58 -0500
+Subject: Trac #29665: fix sage.misc.package doctest with system alabaster.
+
+When alabaster from the system is used, these tests won't be able to
+find its SPKG installed. Add some ellipses, and switch one test to
+look for sage_conf instead.
+---
+ src/sage/misc/package.py | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/sage/misc/package.py b/src/sage/misc/package.py
+index 84f3d50..c7ad206 100644
+--- a/src/sage/misc/package.py
++++ b/src/sage/misc/package.py
+@@ -386,9 +386,9 @@ def installed_packages(exclude_pip=True):
+     EXAMPLES::
+ 
+         sage: sorted(installed_packages().keys())  # optional - build
+-        [...'alabaster', ...'sage_conf', ...]
+-        sage: installed_packages()['alabaster']  # optional - build, random
+-        '0.7.12'
++        [...'sage_conf', ...]
++        sage: installed_packages()['sage_conf']  # optional - build, random
++        '9.5'
+ 
+     .. SEEALSO::
+ 
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch b/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
new file mode 100644
index 000000000000..7ef3826aa4d2
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
@@ -0,0 +1,27 @@
+diff --git a/src/bin/sage-runtests b/src/bin/sage-runtests
+index 589dc8cd37..6bb8bf99a4 100755
+--- a/src/bin/sage-runtests
++++ b/src/bin/sage-runtests
+@@ -154,21 +154,4 @@ if __name__ == "__main__":
+     DC = DocTestController(args, args.filenames)
+     err = DC.run()
+ 
+-    try:
+-        exit_code_pytest = 0
+-        import pytest
+-        pytest_options = ["--import-mode", "importlib"]
+-        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.")
+-
+-    if err == 0:
+-        sys.exit(exit_code_pytest)
+-    else:
+-        sys.exit(err)
++    sys.exit(err)
diff --git a/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch b/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
new file mode 100644
index 000000000000..093e3d56eb33
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
@@ -0,0 +1,42 @@
+More site packages not included in trac 29665
+
+diff --git a/build/pkgs/gmpy2/spkg-configure.m4 b/build/pkgs/gmpy2/spkg-configure.m4
+new file mode 100644
+index 0000000000..2d0390f7db
+--- /dev/null
++++ b/build/pkgs/gmpy2/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([gmpy2], [SAGE_PYTHON_PACKAGE_CHECK([gmpy2])])
+diff --git a/build/pkgs/sphinx/spkg-configure.m4 b/build/pkgs/sphinx/spkg-configure.m4
+new file mode 100644
+index 0000000000..e149fbb2cf
+--- /dev/null
++++ b/build/pkgs/sphinx/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([sphinx], [SAGE_PYTHON_PACKAGE_CHECK([sphinx])])
+diff --git a/build/pkgs/typing_extensions/spkg-configure.m4 b/build/pkgs/typing_extensions/spkg-configure.m4
+new file mode 100644
+index 0000000000..d475fd8257
+--- /dev/null
++++ b/build/pkgs/typing_extensions/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([typing_extensions], [SAGE_PYTHON_PACKAGE_CHECK([typing_extensions])])
+-- 
+diff --git a/build/pkgs/gmpy2/install-requires.txt b/build/pkgs/gmpy2/install-requires.txt
+index 51d24518ef..c25feff557 100644
+--- a/build/pkgs/gmpy2/install-requires.txt
++++ b/build/pkgs/gmpy2/install-requires.txt
+@@ -1,3 +1 @@
+-# We would like to write gmpy2 >=2.1.0b5, but pipenv does not accept prereleases in version ranges
+-# https://github.com/pypa/pipenv/issues/1760
+-gmpy2 ==2.1.0rc1
++gmpy2 >=2.1
+diff --git a/build/pkgs/ptyprocess/install-requires.txt b/build/pkgs/ptyprocess/install-requires.txt
+index de89260872..7c336f636c 100644
+--- a/build/pkgs/ptyprocess/install-requires.txt
++++ b/build/pkgs/ptyprocess/install-requires.txt
+@@ -1,3 +1,3 @@
+-ptyprocess ==0.5.1
++ptyprocess
+ # https://trac.sagemath.org/ticket/31280#comment:42 and following
+ # sagelib is not compatible with ptyprocess 0.5.2, 0.6, and 0.7
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 33b40acbabeb..a32c5d18f378 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -22,11 +22,13 @@ distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
 checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
 python_version=3
 
-build_options="debug system_python3"
+build_options="debug system_python3 system_site_packages"
 desc_option_debug="Build with debug symbols"
 desc_option_system_python="Build using system python 3"
-build_options_default="system_python3"
+desc_option_system_python="Build using system python site-packages"
+build_options_default="system_python3 system_site_packages"
 configure_args+=" $(vopt_with system_python3)"
+configure_args+=" $(vopt_enable system_site_packages)"
 
 # path where sage will be installed
 _SAGE_ROOT=/usr/lib/sage-${version}
@@ -163,6 +165,8 @@ do_check() {
 	fi
 	if [ "$XBPS_CHECK_PKGS" = full ]; then
 		_test_args="--long $_test_args"
+	else
+		_test_args="--warn-long 5.0 $_test_args"
 	fi
 	# since make check will build the docs, run test like this instead
 	./sage -tp ${XBPS_MAKEJOBS} ${_test_args}
@@ -182,7 +186,7 @@ makedepends+=" automake gettext gettext-devel"
 # other host dependencies
 makedepends+=" cmake curl git ninja pandoc patch pkg-config python3 tox"
 
-# already in void
+# standard dependencies
 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
@@ -202,7 +206,49 @@ makedepends+="
  brial-devel cliquer-devel gfan libbraiding-devel libhomfly-devel
  lrcalc-devel nauty-devel palp tachyon
  maxima-ecl primesieve-devel primecount-devel
+ ffmpeg ImageMagick
 "
 
 # TODO: optional
 # 4ti2 coxeter3 libsemigroups lrslib pdf2svg perl_mongodb polymake
+
+# TODO: standard
+# cvxopt importlib_resources
+
+# python packages for trac-29665
+_sage_python3_modules="
+ python3-Babel python3-Jinja2 python3-MarkupSafe python3-Pillow
+ python3-Pygments python3-Sphinx python3-alabaster python3-argcomplete
+ python3-argon2 python3-attrs python3-backcall python3-beniget
+ python3-bleach python3-certifi python3-cffi python3-charset-normalizer
+ python3-cycler python3-dateutil python3-decorator python3-defusedxml
+ python3-docutils python3-entrypoints python3-flit_core python3-gast
+ python3-gmpy2 python3-html5lib python3-idna python3-imagesize
+ python3-importlib_metadata python3-ipython python3-ipython_genutils
+ python3-ipython_ipykernel python3-jedi python3-jsonschema
+ python3-jupyter_client python3-jupyter_core python3-jupyter_ipywidgets
+ python3-jupyter_nbconvert python3-jupyter_nbformat
+ python3-jupyter_notebook python3-jupyterlab_pygments python3-kiwisolver
+ python3-matplotlib python3-matplotlib-inline python3-mistune
+ python3-mpmath python3-nbclient python3-nest_asyncio python3-networkx
+ python3-numpy python3-packaging python3-pandocfilters python3-parsing
+ python3-parso python3-pexpect python3-pickleshare python3-pip
+ python3-pkgconfig python3-pluggy python3-ply python3-prometheus_client
+ python3-prompt_toolkit python3-ptyprocess python3-py python3-pybind11
+ python3-pycparser python3-pyrsistent python3-pytz python3-pyzmq
+ python3-requests python3-scipy python3-send2trash python3-setuptools
+ python3-setuptools_scm python3-simplegeneric python3-six
+ python3-snowballstemmer python3-sphinxcontrib-applehelp
+ python3-sphinxcontrib-devhelp python3-sphinxcontrib-htmlhelp
+ python3-sphinxcontrib-jsmath python3-sphinxcontrib-qthelp
+ python3-sphinxcontrib-serializinghtml python3-sympy python3-terminado
+ python3-testpath python3-texttable python3-toml python3-tomli
+ python3-tornado python3-traitlets python3-typing_extensions
+ python3-tzlocal python3-urllib3 python3-wcwidth python3-webencodings
+ python3-wheel python3-zipp pythran
+ "
+
+if [ "$build_option_system_site_packages" ]; then
+	makedepends+=" $_sage_python3_modules"
+	depends+=" $_sage_python3_modules"
+fi

From 7fa60ecc0315237f838dbefc6a3effc1a5718eea Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 3 Jan 2022 20:47:52 -0300
Subject: [PATCH 24/29] sagemath: use small source tarball + upstream packages

---
 srcpkgs/sagemath/template | 97 ++++++++++++++++++++++++++-------------
 1 file changed, 64 insertions(+), 33 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index a32c5d18f378..0de0061b09df 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -18,8 +18,8 @@ short_desc="Open source mathematics software"
 maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
-distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
-checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
+distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
+checksum=aea4c5a8d3b32af2fba644269b9daf4f62471471ba2d7d83da0f8098a5f53225
 python_version=3
 
 build_options="debug system_python3 system_site_packages"
@@ -33,42 +33,72 @@ configure_args+=" $(vopt_enable system_site_packages)"
 # 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} ;;
-esac
+_SAGE_UPSTREAM_MIRROR=https://mirrors.mit.edu/sage/spkg/upstream
 
-# extra upstream packages (trac-32968 / trac-33040)
 _upstream="
- https://pypi.io/packages/source/s/sphinx/Sphinx-4.3.1.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
+${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
+${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
+${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
+${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
+${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
+${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
+${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
+https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
+https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
+http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
+${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
+${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
+${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
+${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
+${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
+https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
+${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
+https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
+${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
 "
 
 checksum+="
- 32a5b3e9a1b176cc25ed048557d4d3d01af635e6b76c5bc7a43b0a34447fbd45
-
- 9c87405839a19696e837b3b818fed3f5f69f16f1eec1a1ad77e043dcea9c772f
- fc4453705b81d03568d5b808ad8f09c77c47534f6ac2e72e733f9ca4714aa75c
- acad2d8b20a1af07d4e4c9d2e9285c5ed9104354062f275f3fcd88dcef4f1326
- 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
- 78884e7c1d4b00ce3cea67b44566851c4343c120abd683433ce934a68ea58872
- 0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86
- b8e2f83c56e141920c39464b852de3719dfbfb6e3c99a2d8da0edf4fb33176ed
- d9bdec0013ef1eb5a84ab39a3b3868911598afa494f5faa038647101504e2b81
- b2e9810e09c3a47b73ce9cab5a72243a1258f61e7900969097a817232246ce1c
- 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
- 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
+c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
+d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
+4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
+3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
+03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
+5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
+cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
+5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
+581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
+6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
+07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
+a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
+ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
+d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
+169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
+5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
+cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
+471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
+78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
+edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
+b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
+3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
+545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
+cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
+718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
+dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
 "
 
 for u in ${_upstream}; do
@@ -101,6 +131,7 @@ post_extract() {
 	mv -T $wrksrc $_SAGE_ROOT
 	ln -srfT $_SAGE_ROOT $wrksrc
 
+	mkdir -p $wrksrc/upstream
 	for u in ${_upstream}; do
 		cp "$XBPS_SRCDISTDIR/${pkgname}-${version}/${u##*[/>]}" $wrksrc/upstream
 	done

From 5ccd622765be67e815ecf9339866328168e0cc60 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 13:38:02 -0300
Subject: [PATCH 25/29] sagemath: for CI use fixed random-seed=0

---
 srcpkgs/sagemath/template | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 0de0061b09df..b5b99d2c122d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -194,6 +194,10 @@ do_check() {
 	if [ -z "$_test_args" ]; then
 		_test_args=--all
 	fi
+	if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
+		# for CI use a predictable random seed
+		_test_args="--random-seed=0 $_test_args"
+	fi
 	if [ "$XBPS_CHECK_PKGS" = full ]; then
 		_test_args="--long $_test_args"
 	else

From b8bb6bf65c13d1330bcb99e39bd50bc8fcdcec45 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Wed, 5 Jan 2022 20:59:20 -0300
Subject: [PATCH 26/29] nostrip_files: allow full path

The option `nostrip_files` takes a filename without path, in contrast to
option `nopie_files` which takes only full path.

This commit makes it so that `nostrip_files` can take either the
filename or the full path.
---
 common/hooks/post-install/06-strip-and-debug-pkgs.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/hooks/post-install/06-strip-and-debug-pkgs.sh b/common/hooks/post-install/06-strip-and-debug-pkgs.sh
index 2cec68412c50..191c025e552c 100644
--- a/common/hooks/post-install/06-strip-and-debug-pkgs.sh
+++ b/common/hooks/post-install/06-strip-and-debug-pkgs.sh
@@ -72,7 +72,7 @@ hook() {
 
 		fname=${f##*/}
 		for x in ${nostrip_files}; do
-			if [ "$x" = "$fname" ]; then
+			if [ "$x" = "$fname" -o "$x" = "${f#$PKGDESTDIR}" ]; then
 				found=1
 				break
 			fi

From 4704c3b65a5c7bc8e4ee94d0cf2b2ac06a7523f6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Wed, 5 Jan 2022 16:51:00 -0300
Subject: [PATCH 27/29] maxima: fix #34849 and #34861

 - patch maxima-sbcl so it uses gmp for arithmetic (closes #34849)
   also add libgmp to shlib_requires since it won't be detected
 - remove `nopie=yes` to fix #34861, replace by `nopie_files`
 - remove `nostrip=yes`, replace by `nostrip_files`
 - add checks for #34849 and #34861
 - run testsuite only for full check (not in CI)
 - some html and info files are shipped with source: do not rebuild
---
 .../maxima/patches/maxima-sbcl-with-gmp.patch | 19 +++++++
 srcpkgs/maxima/template                       | 52 ++++++++++++++++---
 2 files changed, 63 insertions(+), 8 deletions(-)
 create mode 100644 srcpkgs/maxima/patches/maxima-sbcl-with-gmp.patch

diff --git a/srcpkgs/maxima/patches/maxima-sbcl-with-gmp.patch b/srcpkgs/maxima/patches/maxima-sbcl-with-gmp.patch
new file mode 100644
index 000000000000..074631ea2ba0
--- /dev/null
+++ b/srcpkgs/maxima/patches/maxima-sbcl-with-gmp.patch
@@ -0,0 +1,19 @@
+Patch maxima initialization for sbcl so it uses gmp for arithmetic
+
+
+--- a/src/init-cl.lisp	2021-05-15 20:20:53.000000000 -0300
++++ b/src/init-cl.lisp	2022-01-04 17:45:03.838273626 -0300
+@@ -574,8 +574,13 @@
+ 			 (delete-file file)))))
+ 	   *temp-files-list*))
+ 
++#+sbcl
++(eval-when (:compile-toplevel :load-toplevel :execute)
++  (require 'sb-gmp))
++
+ (defun cl-user::run ()
+   "Run Maxima in its own package."
++  #+sbcl (sb-gmp:install-gmp-funs)
+   (in-package :maxima)
+   (initialize-runtime-globals)
+   (let ((input-stream *standard-input*)
diff --git a/srcpkgs/maxima/template b/srcpkgs/maxima/template
index 1a4bec0dba18..69af367ca11d 100644
--- a/srcpkgs/maxima/template
+++ b/srcpkgs/maxima/template
@@ -1,7 +1,7 @@
 # Template file for 'maxima'
 pkgname=maxima
 version=5.45.1
-revision=2
+revision=3
 build_style=gnu-configure
 configure_args="$(vopt_enable clisp) $(vopt_enable sbcl sbcl-exec) $(vopt_enable ecl)"
 hostmakedepends="python3 perl emacs texinfo patchelf"
@@ -15,8 +15,15 @@ homepage="http://maxima.sourceforge.net"
 distfiles="${SOURCEFORGE_SITE}/maxima/maxima-${version}.tar.gz"
 checksum=fe9016276970bef214a1a244348558644514d7fdfaa4fc8b9d0e87afcbb4e7dc
 
-nostrip=yes
-nopie=yes
+# maxima-sbcl is nopie and should NOT be stripped or it won't work
+nostrip_files=/usr/lib/maxima/$version/binary-sbcl/maxima
+nopie_files=/usr/lib/maxima/$version/binary-sbcl/maxima
+
+if [ "$build_option_sbcl" ]; then
+	# binary-sbcl/maxima uses libgmp but this won't show up in objdump
+	shlib_requires=libgmp.so.10
+fi
+
 build_options="clisp sbcl ecl"
 desc_option_clisp="Build with CLISP"
 desc_option_sbcl="Build with SBCL"
@@ -24,6 +31,14 @@ desc_option_ecl="Build with ECL"
 build_options_default="sbcl ecl"
 vopt_conflict clisp sbcl
 
+post_configure() {
+	# do not rebuild these files if they exist
+	touch -c doc/info/*.html
+	touch -c doc/info/maxima.info*
+	touch -c doc/info/maxima_toc.html
+	touch -c interfaces/xmaxima/doc/xmaxima.html
+}
+
 post_build() {
 	if [ "$build_option_ecl" ]; then
 		# everything will go in the same directory, use rpath=$ORIGIN
@@ -38,13 +53,34 @@ post_build() {
 
 do_check() {
 	if [ "$build_option_ecl" ]; then
-		echo "Check that maxima.fas works"
-		ecl --eval "(require 'maxima \"src/binary-ecl/maxima.fas\")" \
-			--eval "(quit)"
+		echo "maxima-ecl: check that maxima.fas works (#34273)"
+		ecl --eval '(require :maxima "src/binary-ecl/maxima.fas")' \
+		    --eval '(quit)'
+		echo PASS
+		echo "maxima-ecl: check that unlimited heap-size works (#34861)"
+		./maxima-local -q -l ecl --batch-string=":lisp \
+			(ext:set-limit 'ext:heap-size 0)
+			showtime : true $
+			a : 10^(10^5) $
+			b : a^600 $
+			c : a^600 $
+			"
+		echo PASS
+	fi
+	if [ "$build_option_sbcl" ]; then
+		echo "maxima-sbcl: check that long arithmetic is fast (#34849)"
+		timeout -v 30s ./maxima-local -q -l sbcl --batch-string="
+			showtime : true $
+			a : 10^(10^5) $
+			b : a^1000 $
+			"
+		echo PASS
 	fi
 
-	# now run the testsuite
-	make ${makejobs} check
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		# run the testsuite for all versions enabled
+		make ${makejobs} check
+	fi
 }
 
 post_install() {

From a505ea62582459acb1a218ed687d553d7902b6de Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 14:40:27 -0300
Subject: [PATCH 28/29] sagemath: upstream two patches

---
 ...ble-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch} |  6 +++---
 ...rse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch} | 10 +++++-----
 2 files changed, 8 insertions(+), 8 deletions(-)
 rename srcpkgs/sagemath/patches/{0001-sage-site-exec-only-if-it-is-executable.patch => trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch} (94%)
 rename srcpkgs/sagemath/patches/{0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch => trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch} (81%)

diff --git a/srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch b/srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
similarity index 94%
rename from srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch
rename to srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
index ce17c6d6e954..7fdb3d697222 100644
--- a/srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch
+++ b/srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
@@ -1,14 +1,14 @@
 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
+Subject: 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
+index 4c0fa17..153e610 100755
 --- a/src/bin/sage
 +++ b/src/bin/sage
 @@ -129,7 +129,7 @@ usage() {
@@ -39,5 +39,5 @@ index 4c0fa17426..153e610a2e 100755
              # fallthrough if there is no sage-site script
          fi
 -- 
-2.34.1
+cgit v1.0-1-gd88e
 
diff --git a/srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch b/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
similarity index 81%
rename from srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch
rename to srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
index bab6d8441d42..350c41ac3928 100644
--- a/srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch
+++ b/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
@@ -1,16 +1,16 @@
-From 57e3eba28c9b4ee6bd3407d0715b8bd00aaf04a7 Mon Sep 17 00:00:00 2001
+From 53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6 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
+Subject: sagetex: Fix a warning when byte-compiling sagetexparse.py
 
 ---
- .../sagetex/patches/sagetex-fix-warning.patch    | 16 ++++++++++++++++
+ build/pkgs/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
+index 00000000..d82ab67
 --- /dev/null
 +++ b/build/pkgs/sagetex/patches/sagetex-fix-warning.patch
 @@ -0,0 +1,16 @@
@@ -31,5 +31,5 @@ index 0000000000..d82ab675dd
 +     self.result += t.code[1:-1] + '\n\n'
 + 
 -- 
-2.34.1
+cgit v1.0-1-gd88e
 

From a70a21a57f4ad984e3b92acbbe95e3f09aac1b2d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 19:57:59 -0300
Subject: [PATCH 29/29] sagemath: reorder upstream sources and add two missing
 ones

---
 srcpkgs/sagemath/template | 60 ++++++++++++++++++++++-----------------
 1 file changed, 34 insertions(+), 26 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index b5b99d2c122d..f53cba947c88 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -36,69 +36,77 @@ _SAGE_ROOT=/usr/lib/sage-${version}
 _SAGE_UPSTREAM_MIRROR=https://mirrors.mit.edu/sage/spkg/upstream
 
 _upstream="
-${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
 ${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
 ${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
+
+${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
 ${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
 ${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
 ${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
 ${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
 ${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
 ${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
-https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
-https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
-http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
 ${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
 ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
 ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
 ${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
 ${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${PYPI_SITE}/P/PyCygwin/PyCygwin-0.1.tar.gz
 ${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
-https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+${PYPI_SITE}/s/setuptools/setuptools-59.2.0.tar.gz
 ${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
 ${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
-https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
 ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
+
+https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
+https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
+http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
+https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
 "
 
 checksum+="
-dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
 c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
 d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
+5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
+ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
+169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
+cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
+edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
+cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
+
+dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
 3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
 03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
 5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
 cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
-5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
-c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
-6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
-07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
 a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
-ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
 d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
-169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
 5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
-cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
 471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
 78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
-edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+45a5e295590c469a49b2804bfdb89059e942d768ad3b813f484d7b5bff48d226
 ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
-b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
-3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+157d21de9d055ab9e8ea3186d91e7f4f865e11f42deafa952d90842671fc2576
 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
 545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
-cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
-718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
 dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
+
+c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
+6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
+07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
+3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
 "
 
 for u in ${_upstream}; do

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: sagemath-9.5.beta9
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (176 preceding siblings ...)
  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
                   ` (70 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-10  3:22 UTC (permalink / raw)
  To: ml

[-- 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.beta9
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: 597683 bytes --]

From 8b97e64d28422831520ad94e67717d9a07ad5965 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/30] 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 1ef685fb1edb6629702ada1be0225f789870d4d5 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/30] 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 194629adaeeb8cb440f853cc984a71ce195beec7 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/30] 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 65bf9e9e1b817761acc3dcaf225e9fa46cb0f0ce 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/30] 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 76a183bc3df16856520e69598dd9ccd4ab8a3547 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/30] 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 b5426b5ad627f4012dd6c14303de96e1082e64b6 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/30] 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 c8df7ee4a90a665f64968952bdfaf14586e57cc9 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/30] 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 e4b1db0963a6b266407fed761c3a550a6331919b 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/30] 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 b8e52590892069ab84940f127bb3772ea233f62c 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/30] 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 a761aaad2172ca5ea3ff4facc4ddecb0a1f96422 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/30] 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 1be3dbc2d2e02e7a856d4a07380e6402746d9bb0 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/30] 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 d4acfdc11964682cc07b3828e9f7570201e62f4e 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/30] 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 de4d2b7817a002853f948a68c10043e52df2908c 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/30] 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 b1e44a105a9e6a6b77fb87f7d5b95610e96ee6f5 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/30] 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 22eb847cea0b7d8647b87c5865c1bc83daa9c038 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/30] 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 02490c5830fb1892f7592e490645ae0118c0a1b5 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/30] 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 9a8f76d82be115763d6908bc47a652b173f9d9e7 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/30] 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 0fd73cfdcf9ff572ea266492736fe5f4544f67e1 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/30] 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 eabe739fdaafa11a37c8a3a0fac92cd1e3d2d61d 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/30] 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

From aa3f135c2dfed347d570da6d990e2b15b2403305 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 27 Dec 2021 20:19:19 -0300
Subject: [PATCH 20/30] sagemath: fix license and tests

Now tests can be run with -Q (normal) or -K (--long)
---
 srcpkgs/sagemath/template | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index c5009269c7fc..33b40acbabeb 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -16,7 +16,7 @@ depends="giac git FlintQS zn_poly sympow
  "
 short_desc="Open source mathematics software"
 maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
-license="GPL-3.0-or-later"
+license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
 checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
@@ -155,15 +155,17 @@ do_install() {
 }
 
 do_check() {
-	TEST=--all
 	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
-		TEST="$(sed -e 's/#.*//' ${XBPS_DISTDIR}/sagemath-check)"
+		_test_args=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	fi
+	if [ -z "$_test_args" ]; then
+		_test_args=--all
+	fi
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args="--long $_test_args"
 	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} ${OPT} ${TEST}
-	#./sage -t ${OPT} ${TEST}
+	./sage -tp ${XBPS_MAKEJOBS} ${_test_args}
 }
 
 ### copied from sage-deps, to be kept in sync

From 021930f8846ee3f2502fd3faf2d889b46a592173 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 28 Dec 2021 23:08:17 -0300
Subject: [PATCH 21/30] sagemath: fix long time test

---
 .../patches/zzz-fix_long_time_test--see_33091.patch | 13 +++++++++++++
 ...=> zzz-skip_doctest_giac-1.7.0--see_31563.patch} |  0
 2 files changed, 13 insertions(+)
 create mode 100644 srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
 rename srcpkgs/sagemath/patches/{skip-doctest-giac-1.7.0--see-trac-31563.patch => zzz-skip_doctest_giac-1.7.0--see_31563.patch} (100%)

diff --git a/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch b/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
new file mode 100644
index 000000000000..ca360dee9f6e
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage/matrix/matrix2.pyx b/src/sage/matrix/matrix2.pyx
+index 7d319bd54b..c1a2eed6f1 100644
+--- a/src/sage/matrix/matrix2.pyx
++++ b/src/sage/matrix/matrix2.pyx
+@@ -17215,7 +17215,7 @@ cdef class Matrix(Matrix1):
+ 
+             sage: set_random_seed()
+             sage: K = random_cone(max_ambient_dim=5)
+-            sage: all(L.change_ring(SR).is_Z_operator_on(K)
++            sage: all(L.change_ring(SR).is_Z_operator_on(K) # long time
+             ....:     for L in K.Z_operators_gens())  # long time
+             True
+ 
diff --git a/srcpkgs/sagemath/patches/skip-doctest-giac-1.7.0--see-trac-31563.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_31563.patch
similarity index 100%
rename from srcpkgs/sagemath/patches/skip-doctest-giac-1.7.0--see-trac-31563.patch
rename to srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_31563.patch

From 20545b197488f4ccbb1cef359deb43844406f380 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 31 Dec 2021 13:52:34 -0300
Subject: [PATCH 22/30] python3-Sphinx: update to 4.3.2.

---
 srcpkgs/python3-Sphinx/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/python3-Sphinx/template b/srcpkgs/python3-Sphinx/template
index 8b0493c1f92c..29f892d16157 100644
--- a/srcpkgs/python3-Sphinx/template
+++ b/srcpkgs/python3-Sphinx/template
@@ -1,6 +1,6 @@
 # Template file for 'python3-Sphinx'
 pkgname=python3-Sphinx
-version=4.2.0
+version=4.3.2
 revision=1
 wrksrc=Sphinx-${version}
 build_style=python3-module
@@ -17,8 +17,9 @@ short_desc="Python 3 documentation generator"
 maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
 license="BSD-3-Clause"
 homepage="http://sphinx-doc.org"
+changelog="https://www.sphinx-doc.org/en/master/changes.html"
 distfiles="${PYPI_SITE}/S/Sphinx/Sphinx-${version}.tar.gz"
-checksum=94078db9184491e15bce0a56d9186e0aec95f16ac20b12d00e06d4e36f1058a6
+checksum=0a8836751a68306b3fe97ecbe44db786f8479c3bf4b80e3a7f5c838657b4698c
 conflicts="python-Sphinx>=0"
 
 post_install() {

From db69788fcc0fb1f1696d757f9a134e76cf50f43a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 28 Dec 2021 23:08:17 -0300
Subject: [PATCH 23/30] sagemath: use system python site-packages

 - patch from #29665 for that
 - patch on top of that to allow a few more python packages:
   gmpy2, sphinx, typing_extensions, ptyprocess
 - add all available python packages to makedepends and depends
 - add ffmpeg and ImageMagick to makedepends
 - in standard check (-Q) warn if individual test > 5.0s
---
 ...184f7498a2046065e669723e68efe2d65cee.patch | 5629 +++++++++++++++++
 .../zzz-dont_run_pytest--see_31924.patch      |   27 +
 .../zzz-more_site_packages_not_in_29665.patch |   42 +
 srcpkgs/sagemath/template                     |   52 +-
 4 files changed, 5747 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch

diff --git a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
new file mode 100644
index 000000000000..b641113927e7
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
@@ -0,0 +1,5629 @@
+From 05fcaabe95082f42ba134780d579390d7b6153e2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 19:30:58 -0400
+Subject: Trac #29665: add --enable-system-site-packages option to ./configure.
+
+This new option is experimental and disabled by default. When it is
+enabled, the string "--system-site-packages" is appended to a new
+environment variable SAGE_VENV_FLAGS that is then passed to the
+sage-venv command during the build using autoconf substitution.
+Thusly the correct setting finds its way into local/pyvenv.cfg.
+---
+ build/make/Makefile.in |  2 +-
+ configure.ac           | 11 +++++++++++
+ 2 files changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/build/make/Makefile.in b/build/make/Makefile.in
+index f870cc3..68627ab 100644
+--- a/build/make/Makefile.in
++++ b/build/make/Makefile.in
+@@ -211,7 +211,7 @@ endif
+ inst_python3_venv = $(SAGE_VENV)/pyvenv.cfg
+ 
+ $(inst_python3_venv):
+-	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv "$(SAGE_VENV)"
++	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv @SAGE_VENV_FLAGS@ "$(SAGE_VENV)"
+ endif
+ 
+ # Build everything and start Sage.
+diff --git a/configure.ac b/configure.ac
+index 351f487..db30a91 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -435,6 +435,17 @@ AC_ARG_ENABLE([download-from-upstream-url],
+   [AS_HELP_STRING([--enable-download-from-upstream-url],
+     [allow downloading packages from their upstream URL if they cannot be found on the Sage mirrors])])
+ 
++AC_ARG_ENABLE(
++  [system-site-packages], [AS_HELP_STRING(
++    [--enable-system-site-packages],
++    [allow sage to use python packages from the system (experimental; default: no)]
++  )], [
++  AS_IF([test "x$enable_system_site_packages" = "xyes"], [
++    SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
++  ])
++])
++AC_SUBST([SAGE_VENV_FLAGS])
++
+ SAGE_SPKG_OPTIONS=""
+ AS_IF([test "x$enable_experimental_packages" = "xyes"], [
+   AS_VAR_APPEND([SAGE_SPKG_OPTIONS], [" -y"])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9372d1f663edf4e89f9c186336815ca04cff59dc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 19:41:14 -0400
+Subject: Trac #29665: new SAGE_PYTHON_PACKAGE_CHECK() autoconf macro.
+
+This new macro encapsulates the check for system installations of
+python packages. It uses setuptools.version's pkg_resources to
+check if the contents of install-requires.txt are satisfied for
+the given package; and if not, tells the build system to install
+the SPKG instead.
+---
+ m4/sage_python_package_check.m4 | 49 +++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 49 insertions(+)
+ create mode 100644 m4/sage_python_package_check.m4
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+new file mode 100644
+index 00000000..77b0a0c
+--- /dev/null
++++ b/m4/sage_python_package_check.m4
+@@ -0,0 +1,49 @@
++#
++# SYNOPSIS
++#
++#   SAGE_PYTHON_PACKAGE_CHECK(package)
++#
++# DESCRIPTION
++#
++#   Determine if the system copy of a python package can be used by sage.
++#
++#   This macro uses setuptools.version's pkg_resources to check that the
++#   "install-requires.txt" file for the named package is satisfied, and
++#   it can typically fail in four ways:
++#
++#     1. If --enable-system-site-packages was not passed to ./configure,
++#
++#     2. If we are not using the system python (no $PYTHON_FOR_VENV),
++#
++#     3. If setuptools is not available to the system python,
++#
++#     4. If the contents of install-requires.txt are not met (wrong
++#        version, no version, etc.) by the system python.
++#
++#   In any of those cases, we set sage_spkg_install_$package to "yes"
++#   so that the corresponding SPKG is installed. Otherwise, we do
++#   nothing, since the default value of sage_spkg_install_$package
++#   is "no" (to use the system copy).
++#
++#   The SAGE_SPKG_CONFIGURE_PYTHON3() macro is AC_REQUIRE'd to ensure
++#   that $PYTHON_FOR_VENV is available, if it is going to be available.
++#
++
++AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
++  AS_IF([test "${enable_system_site_packages}" = "yes"], [
++    AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
++
++    dnl strip all comments from install-requires.txt; this should leave
++    dnl only a single line containing the version specification for this
++    dnl package.
++    SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
++    AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++    AS_IF(
++      ["${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())"],
++      [AC_MSG_RESULT(yes)],
++      [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
++    )
++  ], [
++    sage_spkg_install_$1=yes
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a0dac8ad81ad6369d479bba30d2388de59e5cecb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:21:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for py.
+
+---
+ build/pkgs/py/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/py/spkg-configure.m4
+
+diff --git a/build/pkgs/py/spkg-configure.m4 b/build/pkgs/py/spkg-configure.m4
+new file mode 100644
+index 00000000..ded7034
+--- /dev/null
++++ b/build/pkgs/py/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([py], [SAGE_PYTHON_PACKAGE_CHECK([py])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 87c463a25ab4432dc1fba4f7a9703284e5b8f620 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:24:15 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for wheel.
+
+---
+ build/pkgs/wheel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wheel/spkg-configure.m4
+
+diff --git a/build/pkgs/wheel/spkg-configure.m4 b/build/pkgs/wheel/spkg-configure.m4
+new file mode 100644
+index 00000000..7897ea9
+--- /dev/null
++++ b/build/pkgs/wheel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([wheel], [SAGE_PYTHON_PACKAGE_CHECK([wheel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 804094b3a980f262f4d53d7be8b1be43ac0c55e0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:25:15 -0400
+Subject: Trac #29665: new spkg-configure.m4 for cvxopt.
+
+This includes a SAGE_SPKG_DEPCHECK([gsl glpk suitesparse],... because
+those C dependencies wind up linked into shared libraries like,
+
+  /usr/.../cvxopt/glpk.cpython-39-x86_64-linux-gnu.so
+
+that could potentially conflict with (for example) the glpk SPKG.
+---
+ build/pkgs/cvxopt/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/cvxopt/spkg-configure.m4
+
+diff --git a/build/pkgs/cvxopt/spkg-configure.m4 b/build/pkgs/cvxopt/spkg-configure.m4
+new file mode 100644
+index 00000000..c4aa619
+--- /dev/null
++++ b/build/pkgs/cvxopt/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([cvxopt], [
++  SAGE_SPKG_DEPCHECK([gsl glpk suitesparse], [
++    SAGE_PYTHON_PACKAGE_CHECK([cvxopt])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3f171955ff8d15da2c98aee0d2e254e95a55a2b5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:28:10 -0400
+Subject: Trac #29665: new spkg-configure.m4 for pyzmq.
+
+This includes a SAGE_SPKG_DEPCHECK([zeromq],... because libzmq winds
+up linked into shared libraries like,
+
+  /usr/.../zmq/backend/cython/message.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the zeromq SPKG.
+---
+ build/pkgs/pyzmq/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/pyzmq/spkg-configure.m4
+
+diff --git a/build/pkgs/pyzmq/spkg-configure.m4 b/build/pkgs/pyzmq/spkg-configure.m4
+new file mode 100644
+index 00000000..ae2b126
+--- /dev/null
++++ b/build/pkgs/pyzmq/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([pyzmq], [
++  SAGE_SPKG_DEPCHECK([zeromq], [
++    SAGE_PYTHON_PACKAGE_CHECK([pyzmq])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20d3aa9da9fc98a6e6a47599cd1b6d1d3785a4c4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:31:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for requests.
+
+---
+ build/pkgs/requests/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/requests/spkg-configure.m4
+
+diff --git a/build/pkgs/requests/spkg-configure.m4 b/build/pkgs/requests/spkg-configure.m4
+new file mode 100644
+index 00000000..f50a66c
+--- /dev/null
++++ b/build/pkgs/requests/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([requests], [SAGE_PYTHON_PACKAGE_CHECK([requests])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4df57ee47f2576b6b7bf9265248e06e90616b689 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:13:34 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for six.
+
+---
+ build/pkgs/six/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/six/spkg-configure.m4
+
+diff --git a/build/pkgs/six/spkg-configure.m4 b/build/pkgs/six/spkg-configure.m4
+new file mode 100644
+index 00000000..a382b81
+--- /dev/null
++++ b/build/pkgs/six/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([six], [SAGE_PYTHON_PACKAGE_CHECK([six])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f4462652d02ca729cc6d7cb36ee4d7d662deafb0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:14:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for packaging.
+
+---
+ build/pkgs/packaging/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/packaging/spkg-configure.m4
+
+diff --git a/build/pkgs/packaging/spkg-configure.m4 b/build/pkgs/packaging/spkg-configure.m4
+new file mode 100644
+index 00000000..398f9e1
+--- /dev/null
++++ b/build/pkgs/packaging/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([packaging], [SAGE_PYTHON_PACKAGE_CHECK([packaging])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4d64677fffce48077e4bc3e20ec833c70e6e9b65 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:18:53 -0400
+Subject: Trac #29665: new spkg-configure.m4 for numpy.
+
+This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack
+wind up linked into shared libraries like,
+
+  /usr/.../numpy/linalg/lapack_lite.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the openblas SPKG.
+---
+ build/pkgs/numpy/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/numpy/spkg-configure.m4
+
+diff --git a/build/pkgs/numpy/spkg-configure.m4 b/build/pkgs/numpy/spkg-configure.m4
+new file mode 100644
+index 00000000..16f9a90
+--- /dev/null
++++ b/build/pkgs/numpy/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([numpy], [
++  SAGE_SPKG_DEPCHECK([openblas], [
++   SAGE_PYTHON_PACKAGE_CHECK([numpy])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 85dfe5bb32f3c470966b477bae68a921e846d11f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:58:48 -0400
+Subject: Trac #29665: new spkg-configure.m4 for scipy.
+
+This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack
+wind up linked into shared libraries like,
+
+  /usr/.../scipy/linalg/_flinalg.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the openblas SPKG.
+---
+ build/pkgs/scipy/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/scipy/spkg-configure.m4
+
+diff --git a/build/pkgs/scipy/spkg-configure.m4 b/build/pkgs/scipy/spkg-configure.m4
+new file mode 100644
+index 00000000..0b7294a
+--- /dev/null
++++ b/build/pkgs/scipy/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([scipy], [
++  SAGE_SPKG_DEPCHECK([openblas], [
++    SAGE_PYTHON_PACKAGE_CHECK([scipy])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5616f1491036fda95f4d3e840c8c8b531c97323b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 07:19:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pluggy.
+
+---
+ build/pkgs/pluggy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pluggy/spkg-configure.m4
+
+diff --git a/build/pkgs/pluggy/spkg-configure.m4 b/build/pkgs/pluggy/spkg-configure.m4
+new file mode 100644
+index 00000000..11b1fce
+--- /dev/null
++++ b/build/pkgs/pluggy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pluggy], [SAGE_PYTHON_PACKAGE_CHECK([pluggy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6bceae3d356878cfe5fce40c9998dead003a3844 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 07:24:12 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pickleshare.
+
+---
+ build/pkgs/pickleshare/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pickleshare/spkg-configure.m4
+
+diff --git a/build/pkgs/pickleshare/spkg-configure.m4 b/build/pkgs/pickleshare/spkg-configure.m4
+new file mode 100644
+index 00000000..80e9b7c
+--- /dev/null
++++ b/build/pkgs/pickleshare/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pickleshare], [SAGE_PYTHON_PACKAGE_CHECK([pickleshare])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From da2ab534f4a256c82ed4f1c5f0f5c320529b5e9f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 08:53:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for html5lib.
+
+---
+ build/pkgs/html5lib/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/html5lib/spkg-configure.m4
+
+diff --git a/build/pkgs/html5lib/spkg-configure.m4 b/build/pkgs/html5lib/spkg-configure.m4
+new file mode 100644
+index 00000000..f421b7e
+--- /dev/null
++++ b/build/pkgs/html5lib/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([html5lib], [SAGE_PYTHON_PACKAGE_CHECK([html5lib])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5e464134afdf6055b7b5804208f759561c5435cd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 18:30:47 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for networkx.
+
+---
+ build/pkgs/networkx/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/networkx/spkg-configure.m4
+
+diff --git a/build/pkgs/networkx/spkg-configure.m4 b/build/pkgs/networkx/spkg-configure.m4
+new file mode 100644
+index 00000000..926671e
+--- /dev/null
++++ b/build/pkgs/networkx/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([networkx], [SAGE_PYTHON_PACKAGE_CHECK([networkx])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c4d40770cd9c7fda811e31759a5f4aedc320f3f9 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:33:24 -0400
+Subject: Trac #29665: new spkg-configure.m4 for matplotlib.
+
+This includes a SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull],...
+because those dependencies wind up linked into shared libraries like,
+
+  /usr/lib/.../matplotlib/ft2font.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with their SPKG counterparts.
+---
+ build/pkgs/matplotlib/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/matplotlib/spkg-configure.m4
+
+diff --git a/build/pkgs/matplotlib/spkg-configure.m4 b/build/pkgs/matplotlib/spkg-configure.m4
+new file mode 100644
+index 00000000..39c2d29
+--- /dev/null
++++ b/build/pkgs/matplotlib/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([matplotlib], [
++  SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull], [
++    SAGE_PYTHON_PACKAGE_CHECK([matplotlib])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7834dc3ac349201af632f89a9de7cd1967931010 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:35:00 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for bleach.
+
+---
+ build/pkgs/bleach/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/bleach/spkg-configure.m4
+
+diff --git a/build/pkgs/bleach/spkg-configure.m4 b/build/pkgs/bleach/spkg-configure.m4
+new file mode 100644
+index 00000000..3c9bb26
+--- /dev/null
++++ b/build/pkgs/bleach/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([bleach], [SAGE_PYTHON_PACKAGE_CHECK([bleach])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 84cad343287a2c69a4a21b9fa3b92301ff88645b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:37:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for decorator.
+
+---
+ build/pkgs/decorator/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/decorator/spkg-configure.m4
+
+diff --git a/build/pkgs/decorator/spkg-configure.m4 b/build/pkgs/decorator/spkg-configure.m4
+new file mode 100644
+index 00000000..e062778
+--- /dev/null
++++ b/build/pkgs/decorator/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([decorator], [SAGE_PYTHON_PACKAGE_CHECK([decorator])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 25693212572e69d452bc95c923ada13744359eb7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:38:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for idna.
+
+---
+ build/pkgs/idna/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/idna/spkg-configure.m4
+
+diff --git a/build/pkgs/idna/spkg-configure.m4 b/build/pkgs/idna/spkg-configure.m4
+new file mode 100644
+index 00000000..9d363f2
+--- /dev/null
++++ b/build/pkgs/idna/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([idna], [SAGE_PYTHON_PACKAGE_CHECK([idna])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6d5616472f6cdc6cf496bba6fe07bd4ef44dfdaf Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:39:23 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for certifi.
+
+---
+ build/pkgs/certifi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/certifi/spkg-configure.m4
+
+diff --git a/build/pkgs/certifi/spkg-configure.m4 b/build/pkgs/certifi/spkg-configure.m4
+new file mode 100644
+index 00000000..ddd4061
+--- /dev/null
++++ b/build/pkgs/certifi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([certifi], [SAGE_PYTHON_PACKAGE_CHECK([certifi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9412a07023b275e29e8d1af9b8ee3e767042e7fd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:40:59 -0400
+Subject: Trac #29665: new spkg-configure.m4 for pillow.
+
+This includes an SAGE_SPKG_DEPCHECK([bzip2 freetype libpng zlib],...
+because those dependencies wind up linked into shared libraries like,
+
+  /usr/.../PIL/_imagingft.cpython-39-x86_64-linux-gnu.so
+
+and potentially conflict with their SPKG counterparts.
+---
+ build/pkgs/pillow/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/pillow/spkg-configure.m4
+
+diff --git a/build/pkgs/pillow/spkg-configure.m4 b/build/pkgs/pillow/spkg-configure.m4
+new file mode 100644
+index 00000000..f2e68e2
+--- /dev/null
++++ b/build/pkgs/pillow/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([pillow], [
++  SAGE_SPKG_DEPCHECK([bzip2 freetype libpng zlib], [
++    SAGE_PYTHON_PACKAGE_CHECK([pillow])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From eede914311481fdb75b363b7a799075e876a2b4f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:44:13 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for mpmath.
+
+---
+ build/pkgs/mpmath/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mpmath/spkg-configure.m4
+
+diff --git a/build/pkgs/mpmath/spkg-configure.m4 b/build/pkgs/mpmath/spkg-configure.m4
+new file mode 100644
+index 00000000..f43c838
+--- /dev/null
++++ b/build/pkgs/mpmath/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([mpmath], [SAGE_PYTHON_PACKAGE_CHECK([mpmath])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 363a825885832c0b580ff53fe61f5c79e70c4728 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:44:56 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for sympy.
+
+---
+ build/pkgs/sympy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sympy/spkg-configure.m4
+
+diff --git a/build/pkgs/sympy/spkg-configure.m4 b/build/pkgs/sympy/spkg-configure.m4
+new file mode 100644
+index 00000000..fa0f1f5
+--- /dev/null
++++ b/build/pkgs/sympy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([sympy], [SAGE_PYTHON_PACKAGE_CHECK([sympy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0667964c914e4a01dda697190a054ff96cea92d6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:47:06 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pygments.
+
+---
+ build/pkgs/pygments/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pygments/spkg-configure.m4
+
+diff --git a/build/pkgs/pygments/spkg-configure.m4 b/build/pkgs/pygments/spkg-configure.m4
+new file mode 100644
+index 00000000..99f29e3
+--- /dev/null
++++ b/build/pkgs/pygments/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pygments], [SAGE_PYTHON_PACKAGE_CHECK([pygments])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f787c233aa05d8e90f7c6ad18f76bd2fa36bfbfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:48:50 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for jinja2.
+
+---
+ build/pkgs/jinja2/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jinja2/spkg-configure.m4
+
+diff --git a/build/pkgs/jinja2/spkg-configure.m4 b/build/pkgs/jinja2/spkg-configure.m4
+new file mode 100644
+index 00000000..0970d1c
+--- /dev/null
++++ b/build/pkgs/jinja2/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jinja2], [SAGE_PYTHON_PACKAGE_CHECK([jinja2])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 309d8f8e2b7078b5efbbe824b69ec1d9b1e639f0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:43:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pandocfilters.
+
+---
+ build/pkgs/pandocfilters/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/pandocfilters/spkg-configure.m4
+
+diff --git a/build/pkgs/pandocfilters/spkg-configure.m4 b/build/pkgs/pandocfilters/spkg-configure.m4
+new file mode 100644
+index 00000000..3e9537f
+--- /dev/null
++++ b/build/pkgs/pandocfilters/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([pandocfilters], [
++  SAGE_PYTHON_PACKAGE_CHECK([pandocfilters])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f57bfda49777a6ba1cd123553acd75dc347c5521 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:44:46 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for webencodings.
+
+---
+ build/pkgs/webencodings/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/webencodings/spkg-configure.m4
+
+diff --git a/build/pkgs/webencodings/spkg-configure.m4 b/build/pkgs/webencodings/spkg-configure.m4
+new file mode 100644
+index 00000000..1b9a5c4
+--- /dev/null
++++ b/build/pkgs/webencodings/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([webencodings], [
++  SAGE_PYTHON_PACKAGE_CHECK([webencodings])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7f193a62d7a2ea0b6a3ca6beb12390d91c25bbfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:48:26 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pytz.
+
+---
+ build/pkgs/pytz/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pytz/spkg-configure.m4
+
+diff --git a/build/pkgs/pytz/spkg-configure.m4 b/build/pkgs/pytz/spkg-configure.m4
+new file mode 100644
+index 00000000..366521b
+--- /dev/null
++++ b/build/pkgs/pytz/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pytz], [SAGE_PYTHON_PACKAGE_CHECK([pytz])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bfd3fdd887c3465c03465248de4997eed4a82915 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:51:16 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for texttable.
+
+---
+ build/pkgs/texttable/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/texttable/spkg-configure.m4
+
+diff --git a/build/pkgs/texttable/spkg-configure.m4 b/build/pkgs/texttable/spkg-configure.m4
+new file mode 100644
+index 00000000..42a3de1
+--- /dev/null
++++ b/build/pkgs/texttable/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([texttable], [SAGE_PYTHON_PACKAGE_CHECK([texttable])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 914bf0cc57abc46129b27c1525782dbe16da31a2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:53:41 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for babel.
+
+---
+ build/pkgs/babel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/babel/spkg-configure.m4
+
+diff --git a/build/pkgs/babel/spkg-configure.m4 b/build/pkgs/babel/spkg-configure.m4
+new file mode 100644
+index 00000000..d7b9a71
+--- /dev/null
++++ b/build/pkgs/babel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([babel], [SAGE_PYTHON_PACKAGE_CHECK([babel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 56977abd1eafbc87c765a2892cfe525382648259 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 14 Oct 2021 08:06:59 -0400
+Subject: Trac #29665: force system python3 with --enable-system-site-packages.
+
+When the python SPKG is used, the --enable-system-site-packages flag
+will essentially do nothing, and that may confuse users who have
+wasted a few hours building sage. (Generally, they will want to fix
+detection of their system python3 first.)
+
+To forestall that, we now set "--with-system-python3=force" whenever
+the "--enable-system-site-packages" flag is passed.
+---
+ configure.ac | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index db30a91..6fafb83 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -438,10 +438,19 @@ AC_ARG_ENABLE([download-from-upstream-url],
+ AC_ARG_ENABLE(
+   [system-site-packages], [AS_HELP_STRING(
+     [--enable-system-site-packages],
+-    [allow sage to use python packages from the system (experimental; default: no)]
++    [allow the use of python packages from the system (experimental; default: no)]
+   )], [
+   AS_IF([test "x$enable_system_site_packages" = "xyes"], [
+     SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
++
++    dnl We want to raise an error if the user asked for "system site
++    dnl packages" but the system python will not be used. Technically
++    dnl that causes no problems (SAGE_PYTHON_PACKAGE_CHECK always fails,
++    dnl so SPKGs are used for all python packages), but it may be confusing
++    dnl to end users who expect the flag to actually give them access to
++    dnl their system python packages and who may not be paying close
++    dnl attention to their ./configure output.
++    with_system_python3="force"
+   ])
+ ])
+ AC_SUBST([SAGE_VENV_FLAGS])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 02b369fd24ef7cf8997082e7850b9cf022cae34b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 01:18:35 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for setuptools.
+
+---
+ build/pkgs/setuptools/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/setuptools/spkg-configure.m4
+
+diff --git a/build/pkgs/setuptools/spkg-configure.m4 b/build/pkgs/setuptools/spkg-configure.m4
+new file mode 100644
+index 00000000..a2ad811
+--- /dev/null
++++ b/build/pkgs/setuptools/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([setuptools], [SAGE_PYTHON_PACKAGE_CHECK([setuptools])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 05117317d38693978efaf36e81d8b02bae44b257 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 01:15:48 -0400
+Subject: Trac #29665: poison PYTHONUSERBASE when testing for "system"
+ packages.
+
+When we're detecting system installations of python packages, we want
+to hide anything that was installed with e.g. "pip install --user". To
+accomplish that, we mimic the PYTHONUSERBASE poisoning from sage-env
+within the SAGE_PYTHON_PACKAGE_CHECK() macro.
+---
+ m4/sage_python_package_check.m4 | 18 +++++++++++++++++-
+ 1 file changed, 17 insertions(+), 1 deletion(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 77b0a0c..b8cdba4 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -38,11 +38,27 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     dnl package.
+     SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
+     AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++
++    dnl To prevent user-site (pip install --user) packages from being
++    dnl detected as "system" packages, we poison PYTHONUSERBASE. The
++    dnl sage-env script also does this at runtime; we mimic that
++    dnl implementation to ensure that the behaviors at ./configure and
++    dnl runtime are identical. Beware that (as in sage-env) the poisoning
++    dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
++    dnl user points PYTHONUSERBASE to any path (even the default), then
++    dnl his local pip packages will be detected.
++    PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
++    AS_IF([test -z "${PYTHONUSERBASE}"], [
++      PYTHONUSERBASE="${HOME}/.sage/local"
++    ])
++
+     AS_IF(
+-      ["${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())"],
++      [PYTHONUSERBASE="${PYTHONUSERBASE}" "${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" 2>/dev/null],
+       [AC_MSG_RESULT(yes)],
+       [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+     )
++
++    PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d75c1492f63a584b5ec5f424ddd7f7c4a6d502d3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:20:04 -0400
+Subject: Trac #29665: run SAGE_PYTHON_PACKAGE_CHECK() inside a venv.
+
+To recreate the runtime environment as closely as possible, we now use
+a venv (with system site packages enabled) when checking for system
+copies of python packages.
+---
+ m4/sage_python_package_check.m4 | 76 +++++++++++++++++++++++++++--------------
+ 1 file changed, 51 insertions(+), 25 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index b8cdba4..7cbd6c0 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -15,9 +15,11 @@
+ #
+ #     2. If we are not using the system python (no $PYTHON_FOR_VENV),
+ #
+-#     3. If setuptools is not available to the system python,
++#     3. If we are unable to create a venv with the system python,
+ #
+-#     4. If the contents of install-requires.txt are not met (wrong
++#     4. If setuptools is not available to the system python,
++#
++#     5. If the contents of install-requires.txt are not met (wrong
+ #        version, no version, etc.) by the system python.
+ #
+ #   In any of those cases, we set sage_spkg_install_$package to "yes"
+@@ -27,38 +29,62 @@
+ #
+ #   The SAGE_SPKG_CONFIGURE_PYTHON3() macro is AC_REQUIRE'd to ensure
+ #   that $PYTHON_FOR_VENV is available, if it is going to be available.
++#   The check is run inside a new venv, and with the PYTHONUSERBASE
++#   variable poisoned in the same manner as sage-env poisons it, to
++#   ensure that the ./configure- and run-time views of the system
++#   are as similar as possible.
+ #
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
+     AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
+ 
+-    dnl strip all comments from install-requires.txt; this should leave
+-    dnl only a single line containing the version specification for this
+-    dnl package.
+-    SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
+-    AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++    dnl We run this check inside a python venv, because that's ultimately
++    dnl how the system $PYTHON_FOR_VENV will be used.
++    AC_MSG_CHECKING([if we can create a python venv in config.venv])
+ 
+-    dnl To prevent user-site (pip install --user) packages from being
+-    dnl detected as "system" packages, we poison PYTHONUSERBASE. The
+-    dnl sage-env script also does this at runtime; we mimic that
+-    dnl implementation to ensure that the behaviors at ./configure and
+-    dnl runtime are identical. Beware that (as in sage-env) the poisoning
+-    dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
+-    dnl user points PYTHONUSERBASE to any path (even the default), then
+-    dnl his local pip packages will be detected.
+-    PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
+-    AS_IF([test -z "${PYTHONUSERBASE}"], [
+-      PYTHONUSERBASE="${HOME}/.sage/local"
+-    ])
++    dnl Use --clear because ./configure typically clobbers its output files.
++    AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
++                                        --clear                dnl
++                                        --without-pip          dnl
++					config.venv], [
++      AC_MSG_RESULT(yes)
++      dnl strip all comments from install-requires.txt; this should leave
++      dnl only a single line containing the version specification for this
++      dnl package.
++      SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
++      AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++
++      dnl To prevent user-site (pip install --user) packages from being
++      dnl detected as "system" packages, we poison PYTHONUSERBASE. The
++      dnl sage-env script also does this at runtime; we mimic that
++      dnl implementation to ensure that the behaviors at ./configure and
++      dnl runtime are identical. Beware that (as in sage-env) the poisoning
++      dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
++      dnl user points PYTHONUSERBASE to any path (even the default), then
++      dnl his local pip packages will be detected.
++      PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
++      AS_IF([test -z "${PYTHONUSERBASE}"], [
++        PYTHONUSERBASE="${HOME}/.sage/local"
++      ])
+ 
+-    AS_IF(
+-      [PYTHONUSERBASE="${PYTHONUSERBASE}" "${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" 2>/dev/null],
+-      [AC_MSG_RESULT(yes)],
+-      [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+-    )
++      AS_IF(
++        [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
++           "from setuptools.version import pkg_resources;              dnl
++            pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" dnl
++	 2>/dev/null],
++        [AC_MSG_RESULT(yes)],
++        [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
++      )
++
++      PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
++    ], [
++      dnl failed to create a venv for some reason
++      AC_MSG_RESULT(no)
++      sage_spkg_install_$1=yes
++    ])
+ 
+-    PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
++    rm -rf config.venv
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 87646c3264a04ffd98a12d67074f93e1943a1e96 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:38:08 -0400
+Subject: Trac #29665: log SAGE_PYTHON_PACKAGE_CHECK() failures to config.log.
+
+---
+ m4/sage_python_package_check.m4 | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 7cbd6c0..e0e0b9f 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -47,7 +47,8 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
+                                         --clear                dnl
+                                         --without-pip          dnl
+-					config.venv], [
++                                        config.venv            dnl
++                                        2>&AS_MESSAGE_LOG_FD], [
+       AC_MSG_RESULT(yes)
+       dnl strip all comments from install-requires.txt; this should leave
+       dnl only a single line containing the version specification for this
+@@ -72,7 +73,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+         [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
+            "from setuptools.version import pkg_resources;              dnl
+             pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" dnl
+-	 2>/dev/null],
++	 2>&AS_MESSAGE_LOG_FD],
+         [AC_MSG_RESULT(yes)],
+         [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+       )
+-- 
+cgit v1.0-1-gd88e
+
+
+From f7dfffd1c64816e2ae4e0f420b22065c5c5bf2cb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:45:37 -0400
+Subject: Trac #29665: don't clobber a plain file named config.venv.
+
+When SAGE_PYTHON_PACKAGE_CHECK() is cleaning up, we no longer remove
+"config.venv" unconditionally. Instead, we remove it only if it is a
+directory. This is also how "pyvenv --clear" works.
+---
+ m4/sage_python_package_check.m4 | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index e0e0b9f..127a078 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -85,7 +85,9 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+       sage_spkg_install_$1=yes
+     ])
+ 
+-    rm -rf config.venv
++    dnl Clean up config.venv, but only if we could have created it.
++    dnl (The --clear flag to pyvenv will not clobber a plain file.)
++    AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9849c77313b895dcfb786d2ea54e36585bd31ce2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 16 Oct 2021 08:14:42 -0400
+Subject: Trac #29665: don't announce system python packages that won't be
+ used.
+
+When --enable-system-site-packages was not given, the python packages
+using SAGE_PYTHON_PACKAGE_CHECK() in spkg-configure.m4 cannot be used.
+Rather than suggest that users install them anyway, that macro now
+hacks the value of sage_use_system_$package to be "no" when the use
+of system site packages is disabled at the python level.
+---
+ m4/sage_python_package_check.m4 | 17 +++++++++++++++++
+ 1 file changed, 17 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 127a078..7ee82a7 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -89,6 +89,23 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     dnl (The --clear flag to pyvenv will not clobber a plain file.)
+     AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
++    dnl System site packages are disabled.
+     sage_spkg_install_$1=yes
++
++    dnl We have to retroactively hack the --with-system-foo={no,yes,force}
++    dnl mechanism here because it wasn't designed with the ability to
++    dnl disable arbitrary chunks of system packages in mind. The easy cases
++    dnl are "no" and "force" which require no action; "no" means we won't
++    dnl suggest the package anyway, and "force" will raise an error when
++    dnl the system-package check fails.
++    dnl
++    dnl The default of "yes" is more troubling because it is the default. To
++    dnl avoid prompting users to install packages that won't be used, we want
++    dnl to ignore "yes" when reporting the "hint: install these packages..."
++    dnl at the end of ./configure. To accomplish that, we change "yes" to
++    dnl "no" here, essentially changing the default for packages using this
++    dnl macro when --enable-system-site-packages is disabled. Packages with
++    dnl "no" are not suggested to the user.
++    AS_IF([test "${sage_use_system_$1}" = "yes"],[sage_use_system_$1=no])
+   ])
+ ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3e6ad737b94aaac234d615ecaf1a2455eb607f1a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 17 Oct 2021 06:16:21 -0400
+Subject: Trac #29665: add Gentoo package information for python packages.
+
+---
+ build/pkgs/babel/distros/gentoo.txt         | 1 +
+ build/pkgs/bleach/distros/gentoo.txt        | 1 +
+ build/pkgs/certifi/distros/gentoo.txt       | 1 +
+ build/pkgs/cvxopt/distros/gentoo.txt        | 1 +
+ build/pkgs/decorator/distros/gentoo.txt     | 1 +
+ build/pkgs/html5lib/distros/gentoo.txt      | 1 +
+ build/pkgs/idna/distros/gentoo.txt          | 1 +
+ build/pkgs/jinja2/distros/gentoo.txt        | 1 +
+ build/pkgs/matplotlib/distros/gentoo.txt    | 1 +
+ build/pkgs/mpmath/distros/gentoo.txt        | 1 +
+ build/pkgs/networkx/distros/gentoo.txt      | 1 +
+ build/pkgs/numpy/distros/gentoo.txt         | 1 +
+ build/pkgs/packaging/distros/gentoo.txt     | 1 +
+ build/pkgs/pandocfilters/distros/gentoo.txt | 1 +
+ build/pkgs/pickleshare/distros/gentoo.txt   | 1 +
+ build/pkgs/pillow/distros/gentoo.txt        | 1 +
+ build/pkgs/pluggy/distros/gentoo.txt        | 1 +
+ build/pkgs/pygments/distros/gentoo.txt      | 1 +
+ build/pkgs/pytz/distros/gentoo.txt          | 1 +
+ build/pkgs/pyzmq/distros/gentoo.txt         | 1 +
+ build/pkgs/requests/distros/gentoo.txt      | 1 +
+ build/pkgs/scipy/distros/gentoo.txt         | 1 +
+ build/pkgs/setuptools/distros/gentoo.txt    | 1 +
+ build/pkgs/six/distros/gentoo.txt           | 1 +
+ build/pkgs/sympy/distros/gentoo.txt         | 1 +
+ build/pkgs/texttable/distros/gentoo.txt     | 1 +
+ build/pkgs/toml/distros/gentoo.txt          | 1 +
+ build/pkgs/webencodings/distros/gentoo.txt  | 1 +
+ 28 files changed, 28 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/gentoo.txt
+ create mode 100644 build/pkgs/bleach/distros/gentoo.txt
+ create mode 100644 build/pkgs/certifi/distros/gentoo.txt
+ create mode 100644 build/pkgs/cvxopt/distros/gentoo.txt
+ create mode 100644 build/pkgs/decorator/distros/gentoo.txt
+ create mode 100644 build/pkgs/html5lib/distros/gentoo.txt
+ create mode 100644 build/pkgs/idna/distros/gentoo.txt
+ create mode 100644 build/pkgs/jinja2/distros/gentoo.txt
+ create mode 100644 build/pkgs/matplotlib/distros/gentoo.txt
+ create mode 100644 build/pkgs/mpmath/distros/gentoo.txt
+ create mode 100644 build/pkgs/networkx/distros/gentoo.txt
+ create mode 100644 build/pkgs/numpy/distros/gentoo.txt
+ create mode 100644 build/pkgs/packaging/distros/gentoo.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/gentoo.txt
+ create mode 100644 build/pkgs/pickleshare/distros/gentoo.txt
+ create mode 100644 build/pkgs/pillow/distros/gentoo.txt
+ create mode 100644 build/pkgs/pluggy/distros/gentoo.txt
+ create mode 100644 build/pkgs/pygments/distros/gentoo.txt
+ create mode 100644 build/pkgs/pytz/distros/gentoo.txt
+ create mode 100644 build/pkgs/pyzmq/distros/gentoo.txt
+ create mode 100644 build/pkgs/requests/distros/gentoo.txt
+ create mode 100644 build/pkgs/scipy/distros/gentoo.txt
+ create mode 100644 build/pkgs/setuptools/distros/gentoo.txt
+ create mode 100644 build/pkgs/six/distros/gentoo.txt
+ create mode 100644 build/pkgs/sympy/distros/gentoo.txt
+ create mode 100644 build/pkgs/texttable/distros/gentoo.txt
+ create mode 100644 build/pkgs/toml/distros/gentoo.txt
+ create mode 100644 build/pkgs/webencodings/distros/gentoo.txt
+
+diff --git a/build/pkgs/babel/distros/gentoo.txt b/build/pkgs/babel/distros/gentoo.txt
+new file mode 100644
+index 00000000..2d2c34f
+--- /dev/null
++++ b/build/pkgs/babel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/Babel
+diff --git a/build/pkgs/bleach/distros/gentoo.txt b/build/pkgs/bleach/distros/gentoo.txt
+new file mode 100644
+index 00000000..b4f9744
+--- /dev/null
++++ b/build/pkgs/bleach/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/bleach
+diff --git a/build/pkgs/certifi/distros/gentoo.txt b/build/pkgs/certifi/distros/gentoo.txt
+new file mode 100644
+index 00000000..72e2e91
+--- /dev/null
++++ b/build/pkgs/certifi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/certifi
+diff --git a/build/pkgs/cvxopt/distros/gentoo.txt b/build/pkgs/cvxopt/distros/gentoo.txt
+new file mode 100644
+index 00000000..b312391
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/cvxopt
+diff --git a/build/pkgs/decorator/distros/gentoo.txt b/build/pkgs/decorator/distros/gentoo.txt
+new file mode 100644
+index 00000000..fea5a67
+--- /dev/null
++++ b/build/pkgs/decorator/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/decorator
+diff --git a/build/pkgs/html5lib/distros/gentoo.txt b/build/pkgs/html5lib/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c2be76
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/html5lib
+diff --git a/build/pkgs/idna/distros/gentoo.txt b/build/pkgs/idna/distros/gentoo.txt
+new file mode 100644
+index 00000000..68ef51c
+--- /dev/null
++++ b/build/pkgs/idna/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/idna
+diff --git a/build/pkgs/jinja2/distros/gentoo.txt b/build/pkgs/jinja2/distros/gentoo.txt
+new file mode 100644
+index 00000000..15a27ae
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jinja
+diff --git a/build/pkgs/matplotlib/distros/gentoo.txt b/build/pkgs/matplotlib/distros/gentoo.txt
+new file mode 100644
+index 00000000..bcfefb5
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/matplotlib
+diff --git a/build/pkgs/mpmath/distros/gentoo.txt b/build/pkgs/mpmath/distros/gentoo.txt
+new file mode 100644
+index 00000000..946c62d
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/mpmath
+diff --git a/build/pkgs/networkx/distros/gentoo.txt b/build/pkgs/networkx/distros/gentoo.txt
+new file mode 100644
+index 00000000..dd97742
+--- /dev/null
++++ b/build/pkgs/networkx/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/networkx
+diff --git a/build/pkgs/numpy/distros/gentoo.txt b/build/pkgs/numpy/distros/gentoo.txt
+new file mode 100644
+index 00000000..d2179d4
+--- /dev/null
++++ b/build/pkgs/numpy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/numpy
+diff --git a/build/pkgs/packaging/distros/gentoo.txt b/build/pkgs/packaging/distros/gentoo.txt
+new file mode 100644
+index 00000000..e5309ed
+--- /dev/null
++++ b/build/pkgs/packaging/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/packaging
+diff --git a/build/pkgs/pandocfilters/distros/gentoo.txt b/build/pkgs/pandocfilters/distros/gentoo.txt
+new file mode 100644
+index 00000000..a726fda
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/gentoo.txt b/build/pkgs/pickleshare/distros/gentoo.txt
+new file mode 100644
+index 00000000..14fad0f
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pickleshare
+diff --git a/build/pkgs/pillow/distros/gentoo.txt b/build/pkgs/pillow/distros/gentoo.txt
+new file mode 100644
+index 00000000..1243649
+--- /dev/null
++++ b/build/pkgs/pillow/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pillow
+diff --git a/build/pkgs/pluggy/distros/gentoo.txt b/build/pkgs/pluggy/distros/gentoo.txt
+new file mode 100644
+index 00000000..7b33876
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pluggy
+diff --git a/build/pkgs/pygments/distros/gentoo.txt b/build/pkgs/pygments/distros/gentoo.txt
+new file mode 100644
+index 00000000..a584f32
+--- /dev/null
++++ b/build/pkgs/pygments/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pygments
+diff --git a/build/pkgs/pytz/distros/gentoo.txt b/build/pkgs/pytz/distros/gentoo.txt
+new file mode 100644
+index 00000000..902a18b
+--- /dev/null
++++ b/build/pkgs/pytz/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pytz
+diff --git a/build/pkgs/pyzmq/distros/gentoo.txt b/build/pkgs/pyzmq/distros/gentoo.txt
+new file mode 100644
+index 00000000..77c2429
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyzmq
+diff --git a/build/pkgs/requests/distros/gentoo.txt b/build/pkgs/requests/distros/gentoo.txt
+new file mode 100644
+index 00000000..d3dc941
+--- /dev/null
++++ b/build/pkgs/requests/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/requests
+diff --git a/build/pkgs/scipy/distros/gentoo.txt b/build/pkgs/scipy/distros/gentoo.txt
+new file mode 100644
+index 00000000..11dabd2
+--- /dev/null
++++ b/build/pkgs/scipy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/scipy
+diff --git a/build/pkgs/setuptools/distros/gentoo.txt b/build/pkgs/setuptools/distros/gentoo.txt
+new file mode 100644
+index 00000000..3a4fa34
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/setuptools
+diff --git a/build/pkgs/six/distros/gentoo.txt b/build/pkgs/six/distros/gentoo.txt
+new file mode 100644
+index 00000000..f73f648
+--- /dev/null
++++ b/build/pkgs/six/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/six
+diff --git a/build/pkgs/sympy/distros/gentoo.txt b/build/pkgs/sympy/distros/gentoo.txt
+new file mode 100644
+index 00000000..b5a5034
+--- /dev/null
++++ b/build/pkgs/sympy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sympy
+diff --git a/build/pkgs/texttable/distros/gentoo.txt b/build/pkgs/texttable/distros/gentoo.txt
+new file mode 100644
+index 00000000..b33a7a7
+--- /dev/null
++++ b/build/pkgs/texttable/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/texttable
+diff --git a/build/pkgs/toml/distros/gentoo.txt b/build/pkgs/toml/distros/gentoo.txt
+new file mode 100644
+index 00000000..64fcea3
+--- /dev/null
++++ b/build/pkgs/toml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/toml
+diff --git a/build/pkgs/webencodings/distros/gentoo.txt b/build/pkgs/webencodings/distros/gentoo.txt
+new file mode 100644
+index 00000000..7539b0f
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/webencodings
+-- 
+cgit v1.0-1-gd88e
+
+
+From 088380f884124c9608160b613ba031c5f023f604 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 18:43:04 -0700
+Subject: build/pkgs: Add distros/fedora.txt for Python packages
+
+---
+ build/pkgs/babel/distros/fedora.txt         | 1 +
+ build/pkgs/bleach/distros/fedora.txt        | 1 +
+ build/pkgs/certifi/distros/fedora.txt       | 1 +
+ build/pkgs/cvxopt/distros/fedora.txt        | 1 +
+ build/pkgs/decorator/distros/fedora.txt     | 1 +
+ build/pkgs/html5lib/distros/fedora.txt      | 1 +
+ build/pkgs/idna/distros/fedora.txt          | 1 +
+ build/pkgs/jinja2/distros/fedora.txt        | 1 +
+ build/pkgs/matplotlib/distros/fedora.txt    | 1 +
+ build/pkgs/mpmath/distros/fedora.txt        | 1 +
+ build/pkgs/networkx/distros/fedora.txt      | 1 +
+ build/pkgs/numpy/distros/fedora.txt         | 1 +
+ build/pkgs/packaging/distros/fedora.txt     | 1 +
+ build/pkgs/pandocfilters/distros/fedora.txt | 1 +
+ build/pkgs/pickleshare/distros/fedora.txt   | 1 +
+ build/pkgs/pillow/distros/fedora.txt        | 1 +
+ build/pkgs/pluggy/distros/fedora.txt        | 1 +
+ build/pkgs/py/distros/fedora.txt            | 1 +
+ build/pkgs/pygments/distros/fedora.txt      | 1 +
+ build/pkgs/pytz/distros/fedora.txt          | 1 +
+ build/pkgs/pyzmq/distros/fedora.txt         | 1 +
+ build/pkgs/requests/distros/fedora.txt      | 1 +
+ build/pkgs/scipy/distros/fedora.txt         | 1 +
+ build/pkgs/setuptools/distros/fedora.txt    | 1 +
+ build/pkgs/six/distros/fedora.txt           | 1 +
+ build/pkgs/sympy/distros/fedora.txt         | 1 +
+ build/pkgs/texttable/distros/fedora.txt     | 1 +
+ build/pkgs/toml/distros/fedora.txt          | 1 +
+ build/pkgs/webencodings/distros/fedora.txt  | 1 +
+ build/pkgs/wheel/distros/fedora.txt         | 1 +
+ 30 files changed, 30 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/fedora.txt
+ create mode 100644 build/pkgs/bleach/distros/fedora.txt
+ create mode 100644 build/pkgs/certifi/distros/fedora.txt
+ create mode 100644 build/pkgs/cvxopt/distros/fedora.txt
+ create mode 100644 build/pkgs/decorator/distros/fedora.txt
+ create mode 100644 build/pkgs/html5lib/distros/fedora.txt
+ create mode 100644 build/pkgs/idna/distros/fedora.txt
+ create mode 100644 build/pkgs/jinja2/distros/fedora.txt
+ create mode 100644 build/pkgs/matplotlib/distros/fedora.txt
+ create mode 100644 build/pkgs/mpmath/distros/fedora.txt
+ create mode 100644 build/pkgs/networkx/distros/fedora.txt
+ create mode 100644 build/pkgs/numpy/distros/fedora.txt
+ create mode 100644 build/pkgs/packaging/distros/fedora.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/fedora.txt
+ create mode 100644 build/pkgs/pickleshare/distros/fedora.txt
+ create mode 100644 build/pkgs/pillow/distros/fedora.txt
+ create mode 100644 build/pkgs/pluggy/distros/fedora.txt
+ create mode 100644 build/pkgs/py/distros/fedora.txt
+ create mode 100644 build/pkgs/pygments/distros/fedora.txt
+ create mode 100644 build/pkgs/pytz/distros/fedora.txt
+ create mode 100644 build/pkgs/pyzmq/distros/fedora.txt
+ create mode 100644 build/pkgs/requests/distros/fedora.txt
+ create mode 100644 build/pkgs/scipy/distros/fedora.txt
+ create mode 100644 build/pkgs/setuptools/distros/fedora.txt
+ create mode 100644 build/pkgs/six/distros/fedora.txt
+ create mode 100644 build/pkgs/sympy/distros/fedora.txt
+ create mode 100644 build/pkgs/texttable/distros/fedora.txt
+ create mode 100644 build/pkgs/toml/distros/fedora.txt
+ create mode 100644 build/pkgs/webencodings/distros/fedora.txt
+ create mode 100644 build/pkgs/wheel/distros/fedora.txt
+
+diff --git a/build/pkgs/babel/distros/fedora.txt b/build/pkgs/babel/distros/fedora.txt
+new file mode 100644
+index 00000000..98f6593
+--- /dev/null
++++ b/build/pkgs/babel/distros/fedora.txt
+@@ -0,0 +1 @@
++babel
+diff --git a/build/pkgs/bleach/distros/fedora.txt b/build/pkgs/bleach/distros/fedora.txt
+new file mode 100644
+index 00000000..c5422cc
+--- /dev/null
++++ b/build/pkgs/bleach/distros/fedora.txt
+@@ -0,0 +1 @@
++python-bleach
+diff --git a/build/pkgs/certifi/distros/fedora.txt b/build/pkgs/certifi/distros/fedora.txt
+new file mode 100644
+index 00000000..be421c8
+--- /dev/null
++++ b/build/pkgs/certifi/distros/fedora.txt
+@@ -0,0 +1 @@
++python-certifi
+diff --git a/build/pkgs/cvxopt/distros/fedora.txt b/build/pkgs/cvxopt/distros/fedora.txt
+new file mode 100644
+index 00000000..f15770f
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/fedora.txt
+@@ -0,0 +1 @@
++python-cvxopt
+diff --git a/build/pkgs/decorator/distros/fedora.txt b/build/pkgs/decorator/distros/fedora.txt
+new file mode 100644
+index 00000000..0795604
+--- /dev/null
++++ b/build/pkgs/decorator/distros/fedora.txt
+@@ -0,0 +1 @@
++python-decorator
+diff --git a/build/pkgs/html5lib/distros/fedora.txt b/build/pkgs/html5lib/distros/fedora.txt
+new file mode 100644
+index 00000000..b821491
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/fedora.txt
+@@ -0,0 +1 @@
++python-html5lib
+diff --git a/build/pkgs/idna/distros/fedora.txt b/build/pkgs/idna/distros/fedora.txt
+new file mode 100644
+index 00000000..a73e70c
+--- /dev/null
++++ b/build/pkgs/idna/distros/fedora.txt
+@@ -0,0 +1 @@
++python-idna
+diff --git a/build/pkgs/jinja2/distros/fedora.txt b/build/pkgs/jinja2/distros/fedora.txt
+new file mode 100644
+index 00000000..f5f3caf
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/fedora.txt
+@@ -0,0 +1 @@
++python-jinja2
+diff --git a/build/pkgs/matplotlib/distros/fedora.txt b/build/pkgs/matplotlib/distros/fedora.txt
+new file mode 100644
+index 00000000..f6d856e
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/fedora.txt
+@@ -0,0 +1 @@
++python-matplotlib
+diff --git a/build/pkgs/mpmath/distros/fedora.txt b/build/pkgs/mpmath/distros/fedora.txt
+new file mode 100644
+index 00000000..a7dc8d5
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/fedora.txt
+@@ -0,0 +1 @@
++python-mpmath
+diff --git a/build/pkgs/networkx/distros/fedora.txt b/build/pkgs/networkx/distros/fedora.txt
+new file mode 100644
+index 00000000..293f943
+--- /dev/null
++++ b/build/pkgs/networkx/distros/fedora.txt
+@@ -0,0 +1 @@
++python-networkx
+diff --git a/build/pkgs/numpy/distros/fedora.txt b/build/pkgs/numpy/distros/fedora.txt
+new file mode 100644
+index 00000000..c8722b9
+--- /dev/null
++++ b/build/pkgs/numpy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-numpy
+diff --git a/build/pkgs/packaging/distros/fedora.txt b/build/pkgs/packaging/distros/fedora.txt
+new file mode 100644
+index 00000000..02ad855
+--- /dev/null
++++ b/build/pkgs/packaging/distros/fedora.txt
+@@ -0,0 +1 @@
++python-packaging
+diff --git a/build/pkgs/pandocfilters/distros/fedora.txt b/build/pkgs/pandocfilters/distros/fedora.txt
+new file mode 100644
+index 00000000..e7a86d0
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/fedora.txt b/build/pkgs/pickleshare/distros/fedora.txt
+new file mode 100644
+index 00000000..6d991a2
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pickleshare
+diff --git a/build/pkgs/pillow/distros/fedora.txt b/build/pkgs/pillow/distros/fedora.txt
+new file mode 100644
+index 00000000..86dbb1d
+--- /dev/null
++++ b/build/pkgs/pillow/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pillow
+diff --git a/build/pkgs/pluggy/distros/fedora.txt b/build/pkgs/pluggy/distros/fedora.txt
+new file mode 100644
+index 00000000..c869e54
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pluggy
+diff --git a/build/pkgs/py/distros/fedora.txt b/build/pkgs/py/distros/fedora.txt
+new file mode 100644
+index 00000000..b348d39
+--- /dev/null
++++ b/build/pkgs/py/distros/fedora.txt
+@@ -0,0 +1 @@
++python-py
+diff --git a/build/pkgs/pygments/distros/fedora.txt b/build/pkgs/pygments/distros/fedora.txt
+new file mode 100644
+index 00000000..f3e72a8
+--- /dev/null
++++ b/build/pkgs/pygments/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pygments
+diff --git a/build/pkgs/pytz/distros/fedora.txt b/build/pkgs/pytz/distros/fedora.txt
+new file mode 100644
+index 00000000..2cccc9e
+--- /dev/null
++++ b/build/pkgs/pytz/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pytz
+diff --git a/build/pkgs/pyzmq/distros/fedora.txt b/build/pkgs/pyzmq/distros/fedora.txt
+new file mode 100644
+index 00000000..23f64d1
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pyzmq
+diff --git a/build/pkgs/requests/distros/fedora.txt b/build/pkgs/requests/distros/fedora.txt
+new file mode 100644
+index 00000000..93a7bc1
+--- /dev/null
++++ b/build/pkgs/requests/distros/fedora.txt
+@@ -0,0 +1 @@
++python-requests
+diff --git a/build/pkgs/scipy/distros/fedora.txt b/build/pkgs/scipy/distros/fedora.txt
+new file mode 100644
+index 00000000..7ff2882
+--- /dev/null
++++ b/build/pkgs/scipy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-scipy
+diff --git a/build/pkgs/setuptools/distros/fedora.txt b/build/pkgs/setuptools/distros/fedora.txt
+new file mode 100644
+index 00000000..e1ad178
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/fedora.txt
+@@ -0,0 +1 @@
++python-setuptools
+diff --git a/build/pkgs/six/distros/fedora.txt b/build/pkgs/six/distros/fedora.txt
+new file mode 100644
+index 00000000..787c530
+--- /dev/null
++++ b/build/pkgs/six/distros/fedora.txt
+@@ -0,0 +1 @@
++python-six
+diff --git a/build/pkgs/sympy/distros/fedora.txt b/build/pkgs/sympy/distros/fedora.txt
+new file mode 100644
+index 00000000..126c88a
+--- /dev/null
++++ b/build/pkgs/sympy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-sympy
+diff --git a/build/pkgs/texttable/distros/fedora.txt b/build/pkgs/texttable/distros/fedora.txt
+new file mode 100644
+index 00000000..8d1ccec
+--- /dev/null
++++ b/build/pkgs/texttable/distros/fedora.txt
+@@ -0,0 +1 @@
++python-texttable
+diff --git a/build/pkgs/toml/distros/fedora.txt b/build/pkgs/toml/distros/fedora.txt
+new file mode 100644
+index 00000000..821ee77
+--- /dev/null
++++ b/build/pkgs/toml/distros/fedora.txt
+@@ -0,0 +1 @@
++python-toml
+diff --git a/build/pkgs/webencodings/distros/fedora.txt b/build/pkgs/webencodings/distros/fedora.txt
+new file mode 100644
+index 00000000..12ddba9
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/fedora.txt
+@@ -0,0 +1 @@
++python-webencodings
+diff --git a/build/pkgs/wheel/distros/fedora.txt b/build/pkgs/wheel/distros/fedora.txt
+new file mode 100644
+index 00000000..ae4cbb9
+--- /dev/null
++++ b/build/pkgs/wheel/distros/fedora.txt
+@@ -0,0 +1 @@
++python-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From ad1d5a20380b147c774903066031442f31094626 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 21:04:04 -0700
+Subject: build/pkgs: Add distros/arch.txt for Python packages
+
+---
+ build/pkgs/babel/distros/arch.txt         | 1 +
+ build/pkgs/bleach/distros/arch.txt        | 1 +
+ build/pkgs/certifi/distros/arch.txt       | 1 +
+ build/pkgs/cvxopt/distros/arch.txt        | 1 +
+ build/pkgs/decorator/distros/arch.txt     | 1 +
+ build/pkgs/html5lib/distros/arch.txt      | 1 +
+ build/pkgs/idna/distros/arch.txt          | 1 +
+ build/pkgs/matplotlib/distros/arch.txt    | 1 +
+ build/pkgs/mpmath/distros/arch.txt        | 1 +
+ build/pkgs/networkx/distros/arch.txt      | 1 +
+ build/pkgs/numpy/distros/arch.txt         | 1 +
+ build/pkgs/packaging/distros/arch.txt     | 1 +
+ build/pkgs/pandocfilters/distros/arch.txt | 1 +
+ build/pkgs/pickleshare/distros/arch.txt   | 1 +
+ build/pkgs/pillow/distros/arch.txt        | 1 +
+ build/pkgs/pluggy/distros/arch.txt        | 1 +
+ build/pkgs/py/distros/arch.txt            | 1 +
+ build/pkgs/pygments/distros/arch.txt      | 1 +
+ build/pkgs/pytz/distros/arch.txt          | 1 +
+ build/pkgs/pyzmq/distros/arch.txt         | 1 +
+ build/pkgs/requests/distros/arch.txt      | 1 +
+ build/pkgs/scipy/distros/arch.txt         | 1 +
+ build/pkgs/setuptools/distros/arch.txt    | 1 +
+ build/pkgs/six/distros/arch.txt           | 1 +
+ build/pkgs/sympy/distros/arch.txt         | 1 +
+ build/pkgs/texttable/distros/arch.txt     | 1 +
+ build/pkgs/toml/distros/arch.txt          | 1 +
+ build/pkgs/webencodings/distros/arch.txt  | 1 +
+ build/pkgs/wheel/distros/arch.txt         | 1 +
+ 29 files changed, 29 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/arch.txt
+ create mode 100644 build/pkgs/bleach/distros/arch.txt
+ create mode 100644 build/pkgs/certifi/distros/arch.txt
+ create mode 100644 build/pkgs/cvxopt/distros/arch.txt
+ create mode 100644 build/pkgs/decorator/distros/arch.txt
+ create mode 100644 build/pkgs/html5lib/distros/arch.txt
+ create mode 100644 build/pkgs/idna/distros/arch.txt
+ create mode 100644 build/pkgs/matplotlib/distros/arch.txt
+ create mode 100644 build/pkgs/mpmath/distros/arch.txt
+ create mode 100644 build/pkgs/networkx/distros/arch.txt
+ create mode 100644 build/pkgs/numpy/distros/arch.txt
+ create mode 100644 build/pkgs/packaging/distros/arch.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/arch.txt
+ create mode 100644 build/pkgs/pickleshare/distros/arch.txt
+ create mode 100644 build/pkgs/pillow/distros/arch.txt
+ create mode 100644 build/pkgs/pluggy/distros/arch.txt
+ create mode 100644 build/pkgs/py/distros/arch.txt
+ create mode 100644 build/pkgs/pygments/distros/arch.txt
+ create mode 100644 build/pkgs/pytz/distros/arch.txt
+ create mode 100644 build/pkgs/pyzmq/distros/arch.txt
+ create mode 100644 build/pkgs/requests/distros/arch.txt
+ create mode 100644 build/pkgs/scipy/distros/arch.txt
+ create mode 100644 build/pkgs/setuptools/distros/arch.txt
+ create mode 100644 build/pkgs/six/distros/arch.txt
+ create mode 100644 build/pkgs/sympy/distros/arch.txt
+ create mode 100644 build/pkgs/texttable/distros/arch.txt
+ create mode 100644 build/pkgs/toml/distros/arch.txt
+ create mode 100644 build/pkgs/webencodings/distros/arch.txt
+ create mode 100644 build/pkgs/wheel/distros/arch.txt
+
+diff --git a/build/pkgs/babel/distros/arch.txt b/build/pkgs/babel/distros/arch.txt
+new file mode 100644
+index 00000000..f2d828c
+--- /dev/null
++++ b/build/pkgs/babel/distros/arch.txt
+@@ -0,0 +1 @@
++python-babel
+diff --git a/build/pkgs/bleach/distros/arch.txt b/build/pkgs/bleach/distros/arch.txt
+new file mode 100644
+index 00000000..c5422cc
+--- /dev/null
++++ b/build/pkgs/bleach/distros/arch.txt
+@@ -0,0 +1 @@
++python-bleach
+diff --git a/build/pkgs/certifi/distros/arch.txt b/build/pkgs/certifi/distros/arch.txt
+new file mode 100644
+index 00000000..be421c8
+--- /dev/null
++++ b/build/pkgs/certifi/distros/arch.txt
+@@ -0,0 +1 @@
++python-certifi
+diff --git a/build/pkgs/cvxopt/distros/arch.txt b/build/pkgs/cvxopt/distros/arch.txt
+new file mode 100644
+index 00000000..f15770f
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/arch.txt
+@@ -0,0 +1 @@
++python-cvxopt
+diff --git a/build/pkgs/decorator/distros/arch.txt b/build/pkgs/decorator/distros/arch.txt
+new file mode 100644
+index 00000000..0795604
+--- /dev/null
++++ b/build/pkgs/decorator/distros/arch.txt
+@@ -0,0 +1 @@
++python-decorator
+diff --git a/build/pkgs/html5lib/distros/arch.txt b/build/pkgs/html5lib/distros/arch.txt
+new file mode 100644
+index 00000000..b821491
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/arch.txt
+@@ -0,0 +1 @@
++python-html5lib
+diff --git a/build/pkgs/idna/distros/arch.txt b/build/pkgs/idna/distros/arch.txt
+new file mode 100644
+index 00000000..a73e70c
+--- /dev/null
++++ b/build/pkgs/idna/distros/arch.txt
+@@ -0,0 +1 @@
++python-idna
+diff --git a/build/pkgs/matplotlib/distros/arch.txt b/build/pkgs/matplotlib/distros/arch.txt
+new file mode 100644
+index 00000000..f6d856e
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/arch.txt
+@@ -0,0 +1 @@
++python-matplotlib
+diff --git a/build/pkgs/mpmath/distros/arch.txt b/build/pkgs/mpmath/distros/arch.txt
+new file mode 100644
+index 00000000..a7dc8d5
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/arch.txt
+@@ -0,0 +1 @@
++python-mpmath
+diff --git a/build/pkgs/networkx/distros/arch.txt b/build/pkgs/networkx/distros/arch.txt
+new file mode 100644
+index 00000000..293f943
+--- /dev/null
++++ b/build/pkgs/networkx/distros/arch.txt
+@@ -0,0 +1 @@
++python-networkx
+diff --git a/build/pkgs/numpy/distros/arch.txt b/build/pkgs/numpy/distros/arch.txt
+new file mode 100644
+index 00000000..c8722b9
+--- /dev/null
++++ b/build/pkgs/numpy/distros/arch.txt
+@@ -0,0 +1 @@
++python-numpy
+diff --git a/build/pkgs/packaging/distros/arch.txt b/build/pkgs/packaging/distros/arch.txt
+new file mode 100644
+index 00000000..02ad855
+--- /dev/null
++++ b/build/pkgs/packaging/distros/arch.txt
+@@ -0,0 +1 @@
++python-packaging
+diff --git a/build/pkgs/pandocfilters/distros/arch.txt b/build/pkgs/pandocfilters/distros/arch.txt
+new file mode 100644
+index 00000000..e7a86d0
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/arch.txt
+@@ -0,0 +1 @@
++python-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/arch.txt b/build/pkgs/pickleshare/distros/arch.txt
+new file mode 100644
+index 00000000..6d991a2
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/arch.txt
+@@ -0,0 +1 @@
++python-pickleshare
+diff --git a/build/pkgs/pillow/distros/arch.txt b/build/pkgs/pillow/distros/arch.txt
+new file mode 100644
+index 00000000..86dbb1d
+--- /dev/null
++++ b/build/pkgs/pillow/distros/arch.txt
+@@ -0,0 +1 @@
++python-pillow
+diff --git a/build/pkgs/pluggy/distros/arch.txt b/build/pkgs/pluggy/distros/arch.txt
+new file mode 100644
+index 00000000..c869e54
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/arch.txt
+@@ -0,0 +1 @@
++python-pluggy
+diff --git a/build/pkgs/py/distros/arch.txt b/build/pkgs/py/distros/arch.txt
+new file mode 100644
+index 00000000..b348d39
+--- /dev/null
++++ b/build/pkgs/py/distros/arch.txt
+@@ -0,0 +1 @@
++python-py
+diff --git a/build/pkgs/pygments/distros/arch.txt b/build/pkgs/pygments/distros/arch.txt
+new file mode 100644
+index 00000000..f3e72a8
+--- /dev/null
++++ b/build/pkgs/pygments/distros/arch.txt
+@@ -0,0 +1 @@
++python-pygments
+diff --git a/build/pkgs/pytz/distros/arch.txt b/build/pkgs/pytz/distros/arch.txt
+new file mode 100644
+index 00000000..2cccc9e
+--- /dev/null
++++ b/build/pkgs/pytz/distros/arch.txt
+@@ -0,0 +1 @@
++python-pytz
+diff --git a/build/pkgs/pyzmq/distros/arch.txt b/build/pkgs/pyzmq/distros/arch.txt
+new file mode 100644
+index 00000000..23f64d1
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/arch.txt
+@@ -0,0 +1 @@
++python-pyzmq
+diff --git a/build/pkgs/requests/distros/arch.txt b/build/pkgs/requests/distros/arch.txt
+new file mode 100644
+index 00000000..93a7bc1
+--- /dev/null
++++ b/build/pkgs/requests/distros/arch.txt
+@@ -0,0 +1 @@
++python-requests
+diff --git a/build/pkgs/scipy/distros/arch.txt b/build/pkgs/scipy/distros/arch.txt
+new file mode 100644
+index 00000000..7ff2882
+--- /dev/null
++++ b/build/pkgs/scipy/distros/arch.txt
+@@ -0,0 +1 @@
++python-scipy
+diff --git a/build/pkgs/setuptools/distros/arch.txt b/build/pkgs/setuptools/distros/arch.txt
+new file mode 100644
+index 00000000..e1ad178
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/arch.txt
+@@ -0,0 +1 @@
++python-setuptools
+diff --git a/build/pkgs/six/distros/arch.txt b/build/pkgs/six/distros/arch.txt
+new file mode 100644
+index 00000000..787c530
+--- /dev/null
++++ b/build/pkgs/six/distros/arch.txt
+@@ -0,0 +1 @@
++python-six
+diff --git a/build/pkgs/sympy/distros/arch.txt b/build/pkgs/sympy/distros/arch.txt
+new file mode 100644
+index 00000000..126c88a
+--- /dev/null
++++ b/build/pkgs/sympy/distros/arch.txt
+@@ -0,0 +1 @@
++python-sympy
+diff --git a/build/pkgs/texttable/distros/arch.txt b/build/pkgs/texttable/distros/arch.txt
+new file mode 100644
+index 00000000..8d1ccec
+--- /dev/null
++++ b/build/pkgs/texttable/distros/arch.txt
+@@ -0,0 +1 @@
++python-texttable
+diff --git a/build/pkgs/toml/distros/arch.txt b/build/pkgs/toml/distros/arch.txt
+new file mode 100644
+index 00000000..821ee77
+--- /dev/null
++++ b/build/pkgs/toml/distros/arch.txt
+@@ -0,0 +1 @@
++python-toml
+diff --git a/build/pkgs/webencodings/distros/arch.txt b/build/pkgs/webencodings/distros/arch.txt
+new file mode 100644
+index 00000000..12ddba9
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/arch.txt
+@@ -0,0 +1 @@
++python-webencodings
+diff --git a/build/pkgs/wheel/distros/arch.txt b/build/pkgs/wheel/distros/arch.txt
+new file mode 100644
+index 00000000..ae4cbb9
+--- /dev/null
++++ b/build/pkgs/wheel/distros/arch.txt
+@@ -0,0 +1 @@
++python-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5087abee08f2a89ddaf422ec72a84575fe724a79 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 21:20:56 -0700
+Subject: build/pkgs: Add distros/opensuse.txt for Python packages
+
+---
+ build/pkgs/bleach/distros/opensuse.txt        | 1 +
+ build/pkgs/cvxopt/distros/opensuse.txt        | 1 +
+ build/pkgs/html5lib/distros/opensuse.txt      | 1 +
+ build/pkgs/idna/distros/opensuse.txt          | 1 +
+ build/pkgs/jinja2/distros/opensuse.txt        | 2 +-
+ build/pkgs/mpmath/distros/opensuse.txt        | 1 +
+ build/pkgs/numpy/distros/opensuse.txt         | 1 +
+ build/pkgs/packaging/distros/opensuse.txt     | 1 +
+ build/pkgs/pandocfilters/distros/opensuse.txt | 1 +
+ build/pkgs/pluggy/distros/opensuse.txt        | 1 +
+ build/pkgs/py/distros/opensuse.txt            | 1 +
+ build/pkgs/pygments/distros/opensuse.txt      | 2 +-
+ build/pkgs/sympy/distros/opensuse.txt         | 1 +
+ build/pkgs/texttable/distros/opensuse.txt     | 1 +
+ build/pkgs/toml/distros/opensuse.txt          | 1 +
+ 15 files changed, 15 insertions(+), 2 deletions(-)
+ create mode 100644 build/pkgs/bleach/distros/opensuse.txt
+ create mode 100644 build/pkgs/cvxopt/distros/opensuse.txt
+ create mode 100644 build/pkgs/html5lib/distros/opensuse.txt
+ create mode 100644 build/pkgs/idna/distros/opensuse.txt
+ create mode 100644 build/pkgs/mpmath/distros/opensuse.txt
+ create mode 100644 build/pkgs/numpy/distros/opensuse.txt
+ create mode 100644 build/pkgs/packaging/distros/opensuse.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/opensuse.txt
+ create mode 100644 build/pkgs/pluggy/distros/opensuse.txt
+ create mode 100644 build/pkgs/py/distros/opensuse.txt
+ create mode 100644 build/pkgs/sympy/distros/opensuse.txt
+ create mode 100644 build/pkgs/texttable/distros/opensuse.txt
+ create mode 100644 build/pkgs/toml/distros/opensuse.txt
+
+diff --git a/build/pkgs/bleach/distros/opensuse.txt b/build/pkgs/bleach/distros/opensuse.txt
+new file mode 100644
+index 00000000..6d37c4c
+--- /dev/null
++++ b/build/pkgs/bleach/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-bleach
+diff --git a/build/pkgs/cvxopt/distros/opensuse.txt b/build/pkgs/cvxopt/distros/opensuse.txt
+new file mode 100644
+index 00000000..2bb6ad1
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-cvxopt
+diff --git a/build/pkgs/html5lib/distros/opensuse.txt b/build/pkgs/html5lib/distros/opensuse.txt
+new file mode 100644
+index 00000000..6d7b8df
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-html5lib
+diff --git a/build/pkgs/idna/distros/opensuse.txt b/build/pkgs/idna/distros/opensuse.txt
+new file mode 100644
+index 00000000..de48e70
+--- /dev/null
++++ b/build/pkgs/idna/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-idna
+diff --git a/build/pkgs/jinja2/distros/opensuse.txt b/build/pkgs/jinja2/distros/opensuse.txt
+index 5d90a22..f2db865 100644
+--- a/build/pkgs/jinja2/distros/opensuse.txt
++++ b/build/pkgs/jinja2/distros/opensuse.txt
+@@ -1 +1 @@
+-python3-Jinja2
++python3-jinja2
+diff --git a/build/pkgs/mpmath/distros/opensuse.txt b/build/pkgs/mpmath/distros/opensuse.txt
+new file mode 100644
+index 00000000..fbc82a9
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-mpmath
+diff --git a/build/pkgs/numpy/distros/opensuse.txt b/build/pkgs/numpy/distros/opensuse.txt
+new file mode 100644
+index 00000000..79d5c5a
+--- /dev/null
++++ b/build/pkgs/numpy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-numpy
+diff --git a/build/pkgs/packaging/distros/opensuse.txt b/build/pkgs/packaging/distros/opensuse.txt
+new file mode 100644
+index 00000000..8f1c0ff
+--- /dev/null
++++ b/build/pkgs/packaging/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-packaging
+diff --git a/build/pkgs/pandocfilters/distros/opensuse.txt b/build/pkgs/pandocfilters/distros/opensuse.txt
+new file mode 100644
+index 00000000..d0d4c24
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-pandocfilters
+diff --git a/build/pkgs/pluggy/distros/opensuse.txt b/build/pkgs/pluggy/distros/opensuse.txt
+new file mode 100644
+index 00000000..43a3acf
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-pluggy
+diff --git a/build/pkgs/py/distros/opensuse.txt b/build/pkgs/py/distros/opensuse.txt
+new file mode 100644
+index 00000000..81fefe6
+--- /dev/null
++++ b/build/pkgs/py/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-py
+diff --git a/build/pkgs/pygments/distros/opensuse.txt b/build/pkgs/pygments/distros/opensuse.txt
+index 9ff5740..3ab3792 100644
+--- a/build/pkgs/pygments/distros/opensuse.txt
++++ b/build/pkgs/pygments/distros/opensuse.txt
+@@ -1 +1 @@
+-python3-Pygments
++python3-pygments
+diff --git a/build/pkgs/sympy/distros/opensuse.txt b/build/pkgs/sympy/distros/opensuse.txt
+new file mode 100644
+index 00000000..db423c8
+--- /dev/null
++++ b/build/pkgs/sympy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-sympy
+diff --git a/build/pkgs/texttable/distros/opensuse.txt b/build/pkgs/texttable/distros/opensuse.txt
+new file mode 100644
+index 00000000..8f8e7e2
+--- /dev/null
++++ b/build/pkgs/texttable/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-texttable
+diff --git a/build/pkgs/toml/distros/opensuse.txt b/build/pkgs/toml/distros/opensuse.txt
+new file mode 100644
+index 00000000..543e89d
+--- /dev/null
++++ b/build/pkgs/toml/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-toml
+-- 
+cgit v1.0-1-gd88e
+
+
+From a480ba7ace1370d106ae831e904ea22b72af1be7 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 22:45:04 -0700
+Subject: build/pkgs: Add distros/debian.txt for Python packages
+
+---
+ build/pkgs/babel/distros/debian.txt         | 1 +
+ build/pkgs/bleach/distros/debian.txt        | 1 +
+ build/pkgs/certifi/distros/debian.txt       | 1 +
+ build/pkgs/cvxopt/distros/debian.txt        | 1 +
+ build/pkgs/decorator/distros/debian.txt     | 1 +
+ build/pkgs/html5lib/distros/debian.txt      | 1 +
+ build/pkgs/idna/distros/debian.txt          | 1 +
+ build/pkgs/jinja2/distros/debian.txt        | 1 +
+ build/pkgs/matplotlib/distros/debian.txt    | 1 +
+ build/pkgs/mpmath/distros/debian.txt        | 1 +
+ build/pkgs/networkx/distros/debian.txt      | 1 +
+ build/pkgs/numpy/distros/debian.txt         | 1 +
+ build/pkgs/packaging/distros/debian.txt     | 1 +
+ build/pkgs/pandocfilters/distros/debian.txt | 1 +
+ build/pkgs/pickleshare/distros/debian.txt   | 1 +
+ build/pkgs/pillow/distros/debian.txt        | 1 +
+ build/pkgs/pluggy/distros/debian.txt        | 1 +
+ build/pkgs/py/distros/debian.txt            | 1 +
+ build/pkgs/pygments/distros/debian.txt      | 1 +
+ build/pkgs/pytz/distros/debian.txt          | 1 +
+ build/pkgs/requests/distros/debian.txt      | 1 +
+ build/pkgs/scipy/distros/debian.txt         | 1 +
+ build/pkgs/setuptools/distros/debian.txt    | 1 +
+ build/pkgs/six/distros/debian.txt           | 1 +
+ build/pkgs/sympy/distros/debian.txt         | 1 +
+ build/pkgs/texttable/distros/debian.txt     | 1 +
+ build/pkgs/toml/distros/debian.txt          | 1 +
+ build/pkgs/webencodings/distros/debian.txt  | 1 +
+ build/pkgs/wheel/distros/debian.txt         | 1 +
+ 29 files changed, 29 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/debian.txt
+ create mode 100644 build/pkgs/bleach/distros/debian.txt
+ create mode 100644 build/pkgs/certifi/distros/debian.txt
+ create mode 100644 build/pkgs/cvxopt/distros/debian.txt
+ create mode 100644 build/pkgs/decorator/distros/debian.txt
+ create mode 100644 build/pkgs/html5lib/distros/debian.txt
+ create mode 100644 build/pkgs/idna/distros/debian.txt
+ create mode 100644 build/pkgs/jinja2/distros/debian.txt
+ create mode 100644 build/pkgs/matplotlib/distros/debian.txt
+ create mode 100644 build/pkgs/mpmath/distros/debian.txt
+ create mode 100644 build/pkgs/networkx/distros/debian.txt
+ create mode 100644 build/pkgs/numpy/distros/debian.txt
+ create mode 100644 build/pkgs/packaging/distros/debian.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/debian.txt
+ create mode 100644 build/pkgs/pickleshare/distros/debian.txt
+ create mode 100644 build/pkgs/pillow/distros/debian.txt
+ create mode 100644 build/pkgs/pluggy/distros/debian.txt
+ create mode 100644 build/pkgs/py/distros/debian.txt
+ create mode 100644 build/pkgs/pygments/distros/debian.txt
+ create mode 100644 build/pkgs/pytz/distros/debian.txt
+ create mode 100644 build/pkgs/requests/distros/debian.txt
+ create mode 100644 build/pkgs/scipy/distros/debian.txt
+ create mode 100644 build/pkgs/setuptools/distros/debian.txt
+ create mode 100644 build/pkgs/six/distros/debian.txt
+ create mode 100644 build/pkgs/sympy/distros/debian.txt
+ create mode 100644 build/pkgs/texttable/distros/debian.txt
+ create mode 100644 build/pkgs/toml/distros/debian.txt
+ create mode 100644 build/pkgs/webencodings/distros/debian.txt
+ create mode 100644 build/pkgs/wheel/distros/debian.txt
+
+diff --git a/build/pkgs/babel/distros/debian.txt b/build/pkgs/babel/distros/debian.txt
+new file mode 100644
+index 00000000..e623eb6
+--- /dev/null
++++ b/build/pkgs/babel/distros/debian.txt
+@@ -0,0 +1 @@
++python3-babel
+diff --git a/build/pkgs/bleach/distros/debian.txt b/build/pkgs/bleach/distros/debian.txt
+new file mode 100644
+index 00000000..6d37c4c
+--- /dev/null
++++ b/build/pkgs/bleach/distros/debian.txt
+@@ -0,0 +1 @@
++python3-bleach
+diff --git a/build/pkgs/certifi/distros/debian.txt b/build/pkgs/certifi/distros/debian.txt
+new file mode 100644
+index 00000000..f585a82
+--- /dev/null
++++ b/build/pkgs/certifi/distros/debian.txt
+@@ -0,0 +1 @@
++python3-certifi
+diff --git a/build/pkgs/cvxopt/distros/debian.txt b/build/pkgs/cvxopt/distros/debian.txt
+new file mode 100644
+index 00000000..2bb6ad1
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/debian.txt
+@@ -0,0 +1 @@
++python3-cvxopt
+diff --git a/build/pkgs/decorator/distros/debian.txt b/build/pkgs/decorator/distros/debian.txt
+new file mode 100644
+index 00000000..46c478e
+--- /dev/null
++++ b/build/pkgs/decorator/distros/debian.txt
+@@ -0,0 +1 @@
++python3-decorator
+diff --git a/build/pkgs/html5lib/distros/debian.txt b/build/pkgs/html5lib/distros/debian.txt
+new file mode 100644
+index 00000000..6d7b8df
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/debian.txt
+@@ -0,0 +1 @@
++python3-html5lib
+diff --git a/build/pkgs/idna/distros/debian.txt b/build/pkgs/idna/distros/debian.txt
+new file mode 100644
+index 00000000..de48e70
+--- /dev/null
++++ b/build/pkgs/idna/distros/debian.txt
+@@ -0,0 +1 @@
++python3-idna
+diff --git a/build/pkgs/jinja2/distros/debian.txt b/build/pkgs/jinja2/distros/debian.txt
+new file mode 100644
+index 00000000..f2db865
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/debian.txt
+@@ -0,0 +1 @@
++python3-jinja2
+diff --git a/build/pkgs/matplotlib/distros/debian.txt b/build/pkgs/matplotlib/distros/debian.txt
+new file mode 100644
+index 00000000..1374329
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/debian.txt
+@@ -0,0 +1 @@
++python3-matplotlib
+diff --git a/build/pkgs/mpmath/distros/debian.txt b/build/pkgs/mpmath/distros/debian.txt
+new file mode 100644
+index 00000000..fbc82a9
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/debian.txt
+@@ -0,0 +1 @@
++python3-mpmath
+diff --git a/build/pkgs/networkx/distros/debian.txt b/build/pkgs/networkx/distros/debian.txt
+new file mode 100644
+index 00000000..6779066
+--- /dev/null
++++ b/build/pkgs/networkx/distros/debian.txt
+@@ -0,0 +1 @@
++python3-networkx
+diff --git a/build/pkgs/numpy/distros/debian.txt b/build/pkgs/numpy/distros/debian.txt
+new file mode 100644
+index 00000000..79d5c5a
+--- /dev/null
++++ b/build/pkgs/numpy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-numpy
+diff --git a/build/pkgs/packaging/distros/debian.txt b/build/pkgs/packaging/distros/debian.txt
+new file mode 100644
+index 00000000..8f1c0ff
+--- /dev/null
++++ b/build/pkgs/packaging/distros/debian.txt
+@@ -0,0 +1 @@
++python3-packaging
+diff --git a/build/pkgs/pandocfilters/distros/debian.txt b/build/pkgs/pandocfilters/distros/debian.txt
+new file mode 100644
+index 00000000..d0d4c24
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/debian.txt b/build/pkgs/pickleshare/distros/debian.txt
+new file mode 100644
+index 00000000..a00907d
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pickleshare
+diff --git a/build/pkgs/pillow/distros/debian.txt b/build/pkgs/pillow/distros/debian.txt
+new file mode 100644
+index 00000000..3319fcd
+--- /dev/null
++++ b/build/pkgs/pillow/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pillow
+diff --git a/build/pkgs/pluggy/distros/debian.txt b/build/pkgs/pluggy/distros/debian.txt
+new file mode 100644
+index 00000000..43a3acf
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pluggy
+diff --git a/build/pkgs/py/distros/debian.txt b/build/pkgs/py/distros/debian.txt
+new file mode 100644
+index 00000000..81fefe6
+--- /dev/null
++++ b/build/pkgs/py/distros/debian.txt
+@@ -0,0 +1 @@
++python3-py
+diff --git a/build/pkgs/pygments/distros/debian.txt b/build/pkgs/pygments/distros/debian.txt
+new file mode 100644
+index 00000000..3ab3792
+--- /dev/null
++++ b/build/pkgs/pygments/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pygments
+diff --git a/build/pkgs/pytz/distros/debian.txt b/build/pkgs/pytz/distros/debian.txt
+new file mode 100644
+index 00000000..db20908
+--- /dev/null
++++ b/build/pkgs/pytz/distros/debian.txt
+@@ -0,0 +1 @@
++python3-tz
+diff --git a/build/pkgs/requests/distros/debian.txt b/build/pkgs/requests/distros/debian.txt
+new file mode 100644
+index 00000000..43147b2
+--- /dev/null
++++ b/build/pkgs/requests/distros/debian.txt
+@@ -0,0 +1 @@
++python3-requests
+diff --git a/build/pkgs/scipy/distros/debian.txt b/build/pkgs/scipy/distros/debian.txt
+new file mode 100644
+index 00000000..12b3666
+--- /dev/null
++++ b/build/pkgs/scipy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-scipy
+diff --git a/build/pkgs/setuptools/distros/debian.txt b/build/pkgs/setuptools/distros/debian.txt
+new file mode 100644
+index 00000000..1c0901c
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/debian.txt
+@@ -0,0 +1 @@
++python3-setuptools
+diff --git a/build/pkgs/six/distros/debian.txt b/build/pkgs/six/distros/debian.txt
+new file mode 100644
+index 00000000..68ff859
+--- /dev/null
++++ b/build/pkgs/six/distros/debian.txt
+@@ -0,0 +1 @@
++python3-six
+diff --git a/build/pkgs/sympy/distros/debian.txt b/build/pkgs/sympy/distros/debian.txt
+new file mode 100644
+index 00000000..db423c8
+--- /dev/null
++++ b/build/pkgs/sympy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-sympy
+diff --git a/build/pkgs/texttable/distros/debian.txt b/build/pkgs/texttable/distros/debian.txt
+new file mode 100644
+index 00000000..8f8e7e2
+--- /dev/null
++++ b/build/pkgs/texttable/distros/debian.txt
+@@ -0,0 +1 @@
++python3-texttable
+diff --git a/build/pkgs/toml/distros/debian.txt b/build/pkgs/toml/distros/debian.txt
+new file mode 100644
+index 00000000..543e89d
+--- /dev/null
++++ b/build/pkgs/toml/distros/debian.txt
+@@ -0,0 +1 @@
++python3-toml
+diff --git a/build/pkgs/webencodings/distros/debian.txt b/build/pkgs/webencodings/distros/debian.txt
+new file mode 100644
+index 00000000..ac30c2f
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/debian.txt
+@@ -0,0 +1 @@
++python3-webencodings
+diff --git a/build/pkgs/wheel/distros/debian.txt b/build/pkgs/wheel/distros/debian.txt
+new file mode 100644
+index 00000000..3c066725
+--- /dev/null
++++ b/build/pkgs/wheel/distros/debian.txt
+@@ -0,0 +1 @@
++python3-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 93bf30d7de292551c3050e2dd74651d69ba4bd46 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 18 Oct 2021 07:50:34 -0400
+Subject: Trac #29665: add more documentation for SAGE_PYTHON_PACKAGE_CHECK().
+
+An earlier commit allows SAGE_PYTHON_PACKAGE_CHECK(package) to tweak the
+value of sage_use_system_$package if --enable-system-site-packages was
+not used. This essentially changes the default --with-system-$package=yes
+to "no" in that case. Here we update the documentation to reflect it.
+---
+ m4/sage_python_package_check.m4 | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 7ee82a7..95eefd0 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -34,6 +34,10 @@
+ #   ensure that the ./configure- and run-time views of the system
+ #   are as similar as possible.
+ #
++#   To avoid suggesting these system packages to users who have not
++#   set --enable-system-site-packages, this macro also changes the
++#   default for --with-system-foo from "yes" to "no" in that case.
++#
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
+-- 
+cgit v1.0-1-gd88e
+
+
+From d771e49d57ecdf3622434bc09cbfb87ad3bb7744 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 18 Oct 2021 07:42:46 -0400
+Subject: Trac #29665: improve SAGE_PYTHON_PACKAGE_CHECK() failure message.
+
+When --enable-system-site-packages is off, SAGE_PYTHON_PACKAGE_CHECK()
+will always install the corresponding SPKG. We improve the ./configure
+output in that case to make it clear that the decision was based on
+the value of --enable-system-site-packages and not the "real" check.
+---
+ m4/sage_python_package_check.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 95eefd0..5f0f084 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -40,7 +40,9 @@
+ #
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
++  AC_MSG_CHECKING([if --enable-system-site-packages was used])
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
++    AC_MSG_RESULT(yes)
+     AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
+ 
+     dnl We run this check inside a python venv, because that's ultimately
+@@ -94,6 +96,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
+     dnl System site packages are disabled.
++    AC_MSG_RESULT(no; skipping check)
+     sage_spkg_install_$1=yes
+ 
+     dnl We have to retroactively hack the --with-system-foo={no,yes,force}
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5bb43c1b78a1deb3364f235305937c2f823e5e18 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 24 Oct 2021 20:29:25 -0400
+Subject: Trac #29665: use sage-venv in SAGE_PYTHON_PACKAGE_CHECK().
+
+For consistency with the rest of the build system, we now use the
+build/bin/sage-venv script to create the venv in this autoconf macro
+rather than invoking $PYTHON_FOR_VENV with "-m venv" directly.
+---
+ m4/sage_python_package_check.m4 | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 5f0f084..5547b35 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -50,11 +50,11 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AC_MSG_CHECKING([if we can create a python venv in config.venv])
+ 
+     dnl Use --clear because ./configure typically clobbers its output files.
+-    AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
+-                                        --clear                dnl
+-                                        --without-pip          dnl
+-                                        config.venv            dnl
+-                                        2>&AS_MESSAGE_LOG_FD], [
++    AS_IF(["${PYTHON_FOR_VENV}" build/bin/sage-venv      dnl
++                                  --system-site-packages dnl
++                                  --clear                dnl
++                                  config.venv            dnl
++                                  2>&AS_MESSAGE_LOG_FD], [
+       AC_MSG_RESULT(yes)
+       dnl strip all comments from install-requires.txt; this should leave
+       dnl only a single line containing the version specification for this
+-- 
+cgit v1.0-1-gd88e
+
+
+From c78363d6326addff16ca5abac897949a6be72bf4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:10:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for urllib3.
+
+---
+ build/pkgs/urllib3/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/urllib3/spkg-configure.m4
+
+diff --git a/build/pkgs/urllib3/spkg-configure.m4 b/build/pkgs/urllib3/spkg-configure.m4
+new file mode 100644
+index 00000000..d7ef3e1
+--- /dev/null
++++ b/build/pkgs/urllib3/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([urllib3], [SAGE_PYTHON_PACKAGE_CHECK([urllib3])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f416d5abcae495ea8301fad024b279ea9e997b29 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:15:18 -0400
+Subject: Trac #29665: add Gentoo package information for urllib3.
+
+---
+ build/pkgs/urllib3/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/urllib3/distros/gentoo.txt
+
+diff --git a/build/pkgs/urllib3/distros/gentoo.txt b/build/pkgs/urllib3/distros/gentoo.txt
+new file mode 100644
+index 00000000..172a535
+--- /dev/null
++++ b/build/pkgs/urllib3/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/urllib3
+-- 
+cgit v1.0-1-gd88e
+
+
+From 852068b992bf7959500c650f54cb92e5b68d7ef8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:15:58 -0400
+Subject: Trac #29665: add Gentoo package information for nbformat.
+
+---
+ build/pkgs/nbformat/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbformat/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbformat/distros/gentoo.txt b/build/pkgs/nbformat/distros/gentoo.txt
+new file mode 100644
+index 00000000..006b1f2
+--- /dev/null
++++ b/build/pkgs/nbformat/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbformat
+-- 
+cgit v1.0-1-gd88e
+
+
+From 66179fd28fcc92ee840dcd87bb4db25cea968d66 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:34:16 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for nbformat.
+
+---
+ build/pkgs/nbformat/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbformat/spkg-configure.m4
+
+diff --git a/build/pkgs/nbformat/spkg-configure.m4 b/build/pkgs/nbformat/spkg-configure.m4
+new file mode 100644
+index 00000000..5a7f8c4
+--- /dev/null
++++ b/build/pkgs/nbformat/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbformat], [SAGE_PYTHON_PACKAGE_CHECK([nbformat])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 874005e81ed20f27a5f895030dcdbdfc5f73ad80 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:47:01 -0400
+Subject: Trac #29665: add Gentoo package information for zipp.
+
+---
+ build/pkgs/zipp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/zipp/distros/gentoo.txt
+
+diff --git a/build/pkgs/zipp/distros/gentoo.txt b/build/pkgs/zipp/distros/gentoo.txt
+new file mode 100644
+index 00000000..7f59450
+--- /dev/null
++++ b/build/pkgs/zipp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/zipp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0cc2a7355b5554c1fb79c742ebf02eff54465b3e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:47:35 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for zipp.
+
+---
+ build/pkgs/zipp/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/zipp/spkg-configure.m4
+
+diff --git a/build/pkgs/zipp/spkg-configure.m4 b/build/pkgs/zipp/spkg-configure.m4
+new file mode 100644
+index 00000000..0fe3a9c
+--- /dev/null
++++ b/build/pkgs/zipp/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([zipp], [SAGE_PYTHON_PACKAGE_CHECK([zipp])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6073ad8e56c21fc862749bbd84a56d543fb9458c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:48:37 -0400
+Subject: Trac #29665: add Gentoo package information for wcwidth.
+
+---
+ build/pkgs/wcwidth/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wcwidth/distros/gentoo.txt
+
+diff --git a/build/pkgs/wcwidth/distros/gentoo.txt b/build/pkgs/wcwidth/distros/gentoo.txt
+new file mode 100644
+index 00000000..edeb80b
+--- /dev/null
++++ b/build/pkgs/wcwidth/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/wcwidth
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9793d6172c64d61a015fbe61bd45863759124fad Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:51:10 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for wcwidth.
+
+---
+ build/pkgs/wcwidth/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wcwidth/spkg-configure.m4
+
+diff --git a/build/pkgs/wcwidth/spkg-configure.m4 b/build/pkgs/wcwidth/spkg-configure.m4
+new file mode 100644
+index 00000000..5bde15a
+--- /dev/null
++++ b/build/pkgs/wcwidth/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([wcwidth], [SAGE_PYTHON_PACKAGE_CHECK([wcwidth])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20232f370a43c146ca4e696c72a2cbcc498db060 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:52:36 -0400
+Subject: Trac #29665: add Gentoo package information for testpath.
+
+---
+ build/pkgs/testpath/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/testpath/distros/gentoo.txt
+
+diff --git a/build/pkgs/testpath/distros/gentoo.txt b/build/pkgs/testpath/distros/gentoo.txt
+new file mode 100644
+index 00000000..efa10a0
+--- /dev/null
++++ b/build/pkgs/testpath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/testpath
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1b0785b2aad8844e74345fe950baf097e2b43d24 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:55:22 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for testpath.
+
+---
+ build/pkgs/testpath/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/testpath/spkg-configure.m4
+
+diff --git a/build/pkgs/testpath/spkg-configure.m4 b/build/pkgs/testpath/spkg-configure.m4
+new file mode 100644
+index 00000000..d8fc2a7
+--- /dev/null
++++ b/build/pkgs/testpath/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([testpath], [SAGE_PYTHON_PACKAGE_CHECK([testpath])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 10fc3829ecd956d732b1b069fdfe81f0d6d5cdc2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:56:06 -0400
+Subject: Trac #29665: add Gentoo package information for jedi.
+
+---
+ build/pkgs/jedi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jedi/distros/gentoo.txt
+
+diff --git a/build/pkgs/jedi/distros/gentoo.txt b/build/pkgs/jedi/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c85a46
+--- /dev/null
++++ b/build/pkgs/jedi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jedi
+-- 
+cgit v1.0-1-gd88e
+
+
+From a75824d74c281c7639028ca01dabeed266f56998 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:06:37 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for jedi.
+
+---
+ build/pkgs/jedi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jedi/spkg-configure.m4
+
+diff --git a/build/pkgs/jedi/spkg-configure.m4 b/build/pkgs/jedi/spkg-configure.m4
+new file mode 100644
+index 00000000..a37dbcc
+--- /dev/null
++++ b/build/pkgs/jedi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jedi], [SAGE_PYTHON_PACKAGE_CHECK([jedi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 17af01373d43f6acbbdbc23e073e372d3fdadf8b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:07:47 -0400
+Subject: Trac #29665: add Gentoo package information for tomli.
+
+---
+ build/pkgs/tomli/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tomli/distros/gentoo.txt
+
+diff --git a/build/pkgs/tomli/distros/gentoo.txt b/build/pkgs/tomli/distros/gentoo.txt
+new file mode 100644
+index 00000000..0458e25
+--- /dev/null
++++ b/build/pkgs/tomli/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/tomli
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0d3b5994ae612be11992467c4a3f1a74b81400fe Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:08:12 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for tomli.
+
+---
+ build/pkgs/tomli/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tomli/spkg-configure.m4
+
+diff --git a/build/pkgs/tomli/spkg-configure.m4 b/build/pkgs/tomli/spkg-configure.m4
+new file mode 100644
+index 00000000..95a8b8b
+--- /dev/null
++++ b/build/pkgs/tomli/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tomli], [SAGE_PYTHON_PACKAGE_CHECK([tomli])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From dce1c515781b0eeb8eb9c2bc7aba581560c1fac1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:09:22 -0400
+Subject: Trac #29665: add Gentoo package information for defusedxml.
+
+---
+ build/pkgs/defusedxml/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/defusedxml/distros/gentoo.txt
+
+diff --git a/build/pkgs/defusedxml/distros/gentoo.txt b/build/pkgs/defusedxml/distros/gentoo.txt
+new file mode 100644
+index 00000000..2804214
+--- /dev/null
++++ b/build/pkgs/defusedxml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/defusedxml
+-- 
+cgit v1.0-1-gd88e
+
+
+From 02e1e1cd7f8bdae3ca5b7d35ce70af28a44e9b7c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:11:14 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for defusedxml.
+
+---
+ build/pkgs/defusedxml/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/defusedxml/spkg-configure.m4
+
+diff --git a/build/pkgs/defusedxml/spkg-configure.m4 b/build/pkgs/defusedxml/spkg-configure.m4
+new file mode 100644
+index 00000000..e02f345
+--- /dev/null
++++ b/build/pkgs/defusedxml/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([defusedxml], [SAGE_PYTHON_PACKAGE_CHECK([defusedxml])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e0ba4ebb5cfc637b5d26b85de9f34e0a160d2b9c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:12:22 -0400
+Subject: Trac #29665: add Gentoo package information for ipywidgets.
+
+---
+ build/pkgs/ipywidgets/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipywidgets/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipywidgets/distros/gentoo.txt b/build/pkgs/ipywidgets/distros/gentoo.txt
+new file mode 100644
+index 00000000..7c76967
+--- /dev/null
++++ b/build/pkgs/ipywidgets/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipywidgets
+-- 
+cgit v1.0-1-gd88e
+
+
+From 49df7e7d93c7a31b7c46d5d224a35fd313a29a32 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:15:53 -0400
+Subject: Trac #29665: add Gentoo package information for simplegeneric.
+
+---
+ build/pkgs/simplegeneric/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/simplegeneric/distros/gentoo.txt
+
+diff --git a/build/pkgs/simplegeneric/distros/gentoo.txt b/build/pkgs/simplegeneric/distros/gentoo.txt
+new file mode 100644
+index 00000000..a86e90d
+--- /dev/null
++++ b/build/pkgs/simplegeneric/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/simplegeneric
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2a893635d5804749e6fec7ed7289c921ecb5300a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:16:33 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for simplegeneric.
+
+---
+ build/pkgs/simplegeneric/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/simplegeneric/spkg-configure.m4
+
+diff --git a/build/pkgs/simplegeneric/spkg-configure.m4 b/build/pkgs/simplegeneric/spkg-configure.m4
+new file mode 100644
+index 00000000..13715ab
+--- /dev/null
++++ b/build/pkgs/simplegeneric/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([simplegeneric], [SAGE_PYTHON_PACKAGE_CHECK([simplegeneric])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a8fe7ecd6e3163e7d01261e5497ac452a8cc95ab Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:17:18 -0400
+Subject: Trac #29665: add Gentoo package information for imagesize.
+
+---
+ build/pkgs/imagesize/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/imagesize/distros/gentoo.txt
+
+diff --git a/build/pkgs/imagesize/distros/gentoo.txt b/build/pkgs/imagesize/distros/gentoo.txt
+new file mode 100644
+index 00000000..54350ba
+--- /dev/null
++++ b/build/pkgs/imagesize/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/imagesize
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2ad837c5dd1fca0f50ce6d5042a9344210a54f84 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:17:48 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for imagesize.
+
+---
+ build/pkgs/imagesize/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/imagesize/spkg-configure.m4
+
+diff --git a/build/pkgs/imagesize/spkg-configure.m4 b/build/pkgs/imagesize/spkg-configure.m4
+new file mode 100644
+index 00000000..20210ef
+--- /dev/null
++++ b/build/pkgs/imagesize/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([imagesize], [SAGE_PYTHON_PACKAGE_CHECK([imagesize])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bf47415b5bfca2d7bf24e20de35662bf331623b9 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:18:49 -0400
+Subject: Trac #29665: add Gentoo package information for mistune.
+
+---
+ build/pkgs/mistune/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mistune/distros/gentoo.txt
+
+diff --git a/build/pkgs/mistune/distros/gentoo.txt b/build/pkgs/mistune/distros/gentoo.txt
+new file mode 100644
+index 00000000..56f0a4e
+--- /dev/null
++++ b/build/pkgs/mistune/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/mistune
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6898a74fd0c65a40c5220ba68b4062ac6fe060c6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:21:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for mistune.
+
+---
+ build/pkgs/mistune/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mistune/spkg-configure.m4
+
+diff --git a/build/pkgs/mistune/spkg-configure.m4 b/build/pkgs/mistune/spkg-configure.m4
+new file mode 100644
+index 00000000..972f33d
+--- /dev/null
++++ b/build/pkgs/mistune/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([mistune], [SAGE_PYTHON_PACKAGE_CHECK([mistune])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 62735e4ccf2031cd39eb5e04b03bdfd97005d808 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:22:48 -0400
+Subject: Trac #29665: add Gentoo package information for backcall.
+
+---
+ build/pkgs/backcall/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/backcall/distros/gentoo.txt
+
+diff --git a/build/pkgs/backcall/distros/gentoo.txt b/build/pkgs/backcall/distros/gentoo.txt
+new file mode 100644
+index 00000000..266a222
+--- /dev/null
++++ b/build/pkgs/backcall/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/backcall
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9ef3ea42d4a33c7cdb623fa5417ae300cf323183 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:25:10 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for backcall.
+
+---
+ build/pkgs/backcall/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/backcall/spkg-configure.m4
+
+diff --git a/build/pkgs/backcall/spkg-configure.m4 b/build/pkgs/backcall/spkg-configure.m4
+new file mode 100644
+index 00000000..d6b11c4
+--- /dev/null
++++ b/build/pkgs/backcall/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([backcall], [SAGE_PYTHON_PACKAGE_CHECK([backcall])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1b3ea2a3c40fea0fb58435f5e5304368ea58dff8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:25:58 -0400
+Subject: Trac #29665: add Gentoo package information for parso.
+
+---
+ build/pkgs/parso/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/parso/distros/gentoo.txt
+
+diff --git a/build/pkgs/parso/distros/gentoo.txt b/build/pkgs/parso/distros/gentoo.txt
+new file mode 100644
+index 00000000..f9ce4c7
+--- /dev/null
++++ b/build/pkgs/parso/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/parso
+-- 
+cgit v1.0-1-gd88e
+
+
+From 963a3a2c563ec71a1f5be2395722d0e824cb0b11 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:26:22 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for parso.
+
+---
+ build/pkgs/parso/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/parso/spkg-configure.m4
+
+diff --git a/build/pkgs/parso/spkg-configure.m4 b/build/pkgs/parso/spkg-configure.m4
+new file mode 100644
+index 00000000..1ca6f1b
+--- /dev/null
++++ b/build/pkgs/parso/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([parso], [SAGE_PYTHON_PACKAGE_CHECK([parso])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 943053dfc474b6549bcc7d6ef2971ea43588b35c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:27:00 -0400
+Subject: Trac #29665: add Gentoo package information for pyparsing.
+
+---
+ build/pkgs/pyparsing/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyparsing/distros/gentoo.txt
+
+diff --git a/build/pkgs/pyparsing/distros/gentoo.txt b/build/pkgs/pyparsing/distros/gentoo.txt
+new file mode 100644
+index 00000000..ef0419f
+--- /dev/null
++++ b/build/pkgs/pyparsing/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyparsing
+-- 
+cgit v1.0-1-gd88e
+
+
+From bd682eaa2ac41dd84e7a52e2b0c5442fc8fd8919 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:27:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pyparsing.
+
+---
+ build/pkgs/pyparsing/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyparsing/spkg-configure.m4
+
+diff --git a/build/pkgs/pyparsing/spkg-configure.m4 b/build/pkgs/pyparsing/spkg-configure.m4
+new file mode 100644
+index 00000000..d2b4c00
+--- /dev/null
++++ b/build/pkgs/pyparsing/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pyparsing], [SAGE_PYTHON_PACKAGE_CHECK([pyparsing])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 74f36a9c0ec7c63b7e6c40066e42f4b15c2f978e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:17:42 -0400
+Subject: Trac #29665: add Gentoo package information for debugpy.
+
+---
+ build/pkgs/debugpy/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/debugpy/distros/gentoo.txt
+
+diff --git a/build/pkgs/debugpy/distros/gentoo.txt b/build/pkgs/debugpy/distros/gentoo.txt
+new file mode 100644
+index 00000000..8b797ce
+--- /dev/null
++++ b/build/pkgs/debugpy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/debugpy
+-- 
+cgit v1.0-1-gd88e
+
+
+From be072fa87ac5c373d9dc9b54c0bd68734d5709bc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:21:17 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for debugpy.
+
+---
+ build/pkgs/debugpy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/debugpy/spkg-configure.m4
+
+diff --git a/build/pkgs/debugpy/spkg-configure.m4 b/build/pkgs/debugpy/spkg-configure.m4
+new file mode 100644
+index 00000000..db605ff
+--- /dev/null
++++ b/build/pkgs/debugpy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([debugpy], [SAGE_PYTHON_PACKAGE_CHECK([debugpy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6f777ce2f2e14b94e91c8b7bbac82f9017460aba Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:23:56 -0400
+Subject: Trac #29665: add Gentoo package information for tzlocal.
+
+---
+ build/pkgs/tzlocal/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tzlocal/distros/gentoo.txt
+
+diff --git a/build/pkgs/tzlocal/distros/gentoo.txt b/build/pkgs/tzlocal/distros/gentoo.txt
+new file mode 100644
+index 00000000..2018442
+--- /dev/null
++++ b/build/pkgs/tzlocal/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/tzlocal
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3bd078fc15ae13982249452711baafae91038191 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:24:51 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for tzlocal.
+
+---
+ build/pkgs/tzlocal/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tzlocal/spkg-configure.m4
+
+diff --git a/build/pkgs/tzlocal/spkg-configure.m4 b/build/pkgs/tzlocal/spkg-configure.m4
+new file mode 100644
+index 00000000..e020b28
+--- /dev/null
++++ b/build/pkgs/tzlocal/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tzlocal], [SAGE_PYTHON_PACKAGE_CHECK([tzlocal])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 91b0882fc62214923da9ee7b6dccb05d8a1d11d1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:26:13 -0400
+Subject: Trac #29665: add Gentoo package information for pycparser.
+
+---
+ build/pkgs/pycparser/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pycparser/distros/gentoo.txt
+
+diff --git a/build/pkgs/pycparser/distros/gentoo.txt b/build/pkgs/pycparser/distros/gentoo.txt
+new file mode 100644
+index 00000000..5e87307
+--- /dev/null
++++ b/build/pkgs/pycparser/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pycparser
+-- 
+cgit v1.0-1-gd88e
+
+
+From beabde92fe6e057faf516fe82d27f1e903e55ce6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:27:27 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pycparser.
+
+---
+ build/pkgs/pycparser/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pycparser/spkg-configure.m4
+
+diff --git a/build/pkgs/pycparser/spkg-configure.m4 b/build/pkgs/pycparser/spkg-configure.m4
+new file mode 100644
+index 00000000..4b9b900
+--- /dev/null
++++ b/build/pkgs/pycparser/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pycparser], [SAGE_PYTHON_PACKAGE_CHECK([pycparser])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 86c2788dc7fd1169314e9598c91fa81045553677 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:29:36 -0400
+Subject: Trac #29665: add Gentoo package information for cycler.
+
+---
+ build/pkgs/cycler/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cycler/distros/gentoo.txt
+
+diff --git a/build/pkgs/cycler/distros/gentoo.txt b/build/pkgs/cycler/distros/gentoo.txt
+new file mode 100644
+index 00000000..4b21543
+--- /dev/null
++++ b/build/pkgs/cycler/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/cycler
+-- 
+cgit v1.0-1-gd88e
+
+
+From 67c5a944101ddf329f0a61c61d4e784f58a5c5b0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:30:27 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for cycler.
+
+---
+ build/pkgs/cycler/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cycler/spkg-configure.m4
+
+diff --git a/build/pkgs/cycler/spkg-configure.m4 b/build/pkgs/cycler/spkg-configure.m4
+new file mode 100644
+index 00000000..239571a
+--- /dev/null
++++ b/build/pkgs/cycler/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([cycler], [SAGE_PYTHON_PACKAGE_CHECK([cycler])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ef6d490251abfa41f7a0910274700a8a6a65f629 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:31:19 -0400
+Subject: Trac #29665: add Gentoo package information for traitlets.
+
+---
+ build/pkgs/traitlets/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/traitlets/distros/gentoo.txt
+
+diff --git a/build/pkgs/traitlets/distros/gentoo.txt b/build/pkgs/traitlets/distros/gentoo.txt
+new file mode 100644
+index 00000000..46bfaab
+--- /dev/null
++++ b/build/pkgs/traitlets/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/traitlets
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1f922b458d34088d9f6773312209e69f19ee45dc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:31:50 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for traitlets.
+
+---
+ build/pkgs/traitlets/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/traitlets/spkg-configure.m4
+
+diff --git a/build/pkgs/traitlets/spkg-configure.m4 b/build/pkgs/traitlets/spkg-configure.m4
+new file mode 100644
+index 00000000..df2382b
+--- /dev/null
++++ b/build/pkgs/traitlets/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([traitlets], [SAGE_PYTHON_PACKAGE_CHECK([traitlets])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 95b89a9ced0acb6d971a27fa63b97ea58a11f4e1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:33:35 -0400
+Subject: Trac #29665: add Gentoo package information for argcomplete.
+
+---
+ build/pkgs/argcomplete/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argcomplete/distros/gentoo.txt
+
+diff --git a/build/pkgs/argcomplete/distros/gentoo.txt b/build/pkgs/argcomplete/distros/gentoo.txt
+new file mode 100644
+index 00000000..b150949
+--- /dev/null
++++ b/build/pkgs/argcomplete/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/argcomplete
+-- 
+cgit v1.0-1-gd88e
+
+
+From b4cd8ef384e6e5bae0de0f3c113fb5f9e6e1a71e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:34:14 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for argcomplete.
+
+---
+ build/pkgs/argcomplete/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argcomplete/spkg-configure.m4
+
+diff --git a/build/pkgs/argcomplete/spkg-configure.m4 b/build/pkgs/argcomplete/spkg-configure.m4
+new file mode 100644
+index 00000000..cbd7ccf
+--- /dev/null
++++ b/build/pkgs/argcomplete/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([argcomplete], [SAGE_PYTHON_PACKAGE_CHECK([argcomplete])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4cc610e8331970cc018d7ea87af928fa73a292c1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:36:21 -0400
+Subject: Trac #29665: add Gentoo package information for ptyprocess.
+
+---
+ build/pkgs/ptyprocess/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ptyprocess/distros/gentoo.txt
+
+diff --git a/build/pkgs/ptyprocess/distros/gentoo.txt b/build/pkgs/ptyprocess/distros/gentoo.txt
+new file mode 100644
+index 00000000..571a851
+--- /dev/null
++++ b/build/pkgs/ptyprocess/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ptyprocess
+-- 
+cgit v1.0-1-gd88e
+
+
+From cd15f97221bf5933b07900e4f77cb55401eede26 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:37:02 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ptyprocess.
+
+---
+ build/pkgs/ptyprocess/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ptyprocess/spkg-configure.m4
+
+diff --git a/build/pkgs/ptyprocess/spkg-configure.m4 b/build/pkgs/ptyprocess/spkg-configure.m4
+new file mode 100644
+index 00000000..bfacbae
+--- /dev/null
++++ b/build/pkgs/ptyprocess/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ptyprocess], [SAGE_PYTHON_PACKAGE_CHECK([ptyprocess])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb5f45b15f99e4ba28e1b1f6042a0e8ea17f1dfc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:38:22 -0400
+Subject: Trac #29665: add Gentoo package information for attrs.
+
+---
+ build/pkgs/attrs/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/attrs/distros/gentoo.txt
+
+diff --git a/build/pkgs/attrs/distros/gentoo.txt b/build/pkgs/attrs/distros/gentoo.txt
+new file mode 100644
+index 00000000..3b906fa
+--- /dev/null
++++ b/build/pkgs/attrs/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/attrs
+-- 
+cgit v1.0-1-gd88e
+
+
+From 321707ebf8e9af1e4ac3a5b5b094b4226bb3a7a5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:38:55 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for attrs.
+
+---
+ build/pkgs/attrs/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/attrs/spkg-configure.m4
+
+diff --git a/build/pkgs/attrs/spkg-configure.m4 b/build/pkgs/attrs/spkg-configure.m4
+new file mode 100644
+index 00000000..ba6a9b7
+--- /dev/null
++++ b/build/pkgs/attrs/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([attrs], [SAGE_PYTHON_PACKAGE_CHECK([attrs])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 69a498a4e8854ecdfc2f1a134104983c0dcb9e32 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:40:09 -0400
+Subject: Trac #29665: add Gentoo package information for send2trash.
+
+---
+ build/pkgs/send2trash/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/send2trash/distros/gentoo.txt
+
+diff --git a/build/pkgs/send2trash/distros/gentoo.txt b/build/pkgs/send2trash/distros/gentoo.txt
+new file mode 100644
+index 00000000..a89b179
+--- /dev/null
++++ b/build/pkgs/send2trash/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/send2trash
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9baed17c84e1bdf5abd17c20766e5cd7dddc5b53 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:41:45 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for send2trash.
+
+---
+ build/pkgs/send2trash/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/send2trash/spkg-configure.m4
+
+diff --git a/build/pkgs/send2trash/spkg-configure.m4 b/build/pkgs/send2trash/spkg-configure.m4
+new file mode 100644
+index 00000000..3bbb727
+--- /dev/null
++++ b/build/pkgs/send2trash/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([send2trash], [SAGE_PYTHON_PACKAGE_CHECK([send2trash])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b9b552b2a2aaccaeb7c5b25be0b681f107522d09 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:43:27 -0400
+Subject: Trac #29665: add Gentoo package information for pyrsistent.
+
+---
+ build/pkgs/pyrsistent/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyrsistent/distros/gentoo.txt
+
+diff --git a/build/pkgs/pyrsistent/distros/gentoo.txt b/build/pkgs/pyrsistent/distros/gentoo.txt
+new file mode 100644
+index 00000000..83439ce
+--- /dev/null
++++ b/build/pkgs/pyrsistent/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyrsistent
+-- 
+cgit v1.0-1-gd88e
+
+
+From a17b31fac6104852762f57daa749443147bdf121 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:44:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pyrsistent.
+
+---
+ build/pkgs/pyrsistent/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyrsistent/spkg-configure.m4
+
+diff --git a/build/pkgs/pyrsistent/spkg-configure.m4 b/build/pkgs/pyrsistent/spkg-configure.m4
+new file mode 100644
+index 00000000..f7ca75d
+--- /dev/null
++++ b/build/pkgs/pyrsistent/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pyrsistent], [SAGE_PYTHON_PACKAGE_CHECK([pyrsistent])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 68520decad6d6937918d7a6af65ca5bd476e5d02 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:45:45 -0400
+Subject: Trac #29665: add Gentoo package information for entrypoints.
+
+---
+ build/pkgs/entrypoints/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/entrypoints/distros/gentoo.txt
+
+diff --git a/build/pkgs/entrypoints/distros/gentoo.txt b/build/pkgs/entrypoints/distros/gentoo.txt
+new file mode 100644
+index 00000000..684ddd0
+--- /dev/null
++++ b/build/pkgs/entrypoints/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/entrypoints
+-- 
+cgit v1.0-1-gd88e
+
+
+From 34213eccb642a6bad64d89acaefa83ee702cb483 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:46:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for entrypoints.
+
+---
+ build/pkgs/entrypoints/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/entrypoints/spkg-configure.m4
+
+diff --git a/build/pkgs/entrypoints/spkg-configure.m4 b/build/pkgs/entrypoints/spkg-configure.m4
+new file mode 100644
+index 00000000..caed658
+--- /dev/null
++++ b/build/pkgs/entrypoints/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([entrypoints], [SAGE_PYTHON_PACKAGE_CHECK([entrypoints])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8e985614345da1a58fcdc127a9c0ddd790f9b5d2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:48:26 -0400
+Subject: Trac #29665: add Gentoo package information for markupsafe.
+
+---
+ build/pkgs/markupsafe/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/markupsafe/distros/gentoo.txt
+
+diff --git a/build/pkgs/markupsafe/distros/gentoo.txt b/build/pkgs/markupsafe/distros/gentoo.txt
+new file mode 100644
+index 00000000..9654e35
+--- /dev/null
++++ b/build/pkgs/markupsafe/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/markupsafe
+-- 
+cgit v1.0-1-gd88e
+
+
+From d370f229ae0988856f2e0d1f6ee2df2c47169106 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:48:55 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for markupsafe.
+
+---
+ build/pkgs/markupsafe/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/markupsafe/spkg-configure.m4
+
+diff --git a/build/pkgs/markupsafe/spkg-configure.m4 b/build/pkgs/markupsafe/spkg-configure.m4
+new file mode 100644
+index 00000000..79eb8db
+--- /dev/null
++++ b/build/pkgs/markupsafe/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([markupsafe], [SAGE_PYTHON_PACKAGE_CHECK([markupsafe])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c49b285ad9e25e6bc81a7e75d461d234fdd3ea68 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:30:49 -0400
+Subject: Trac #29665: add Gentoo package information for flit_core.
+
+---
+ build/pkgs/flit_core/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/flit_core/distros/gentoo.txt
+
+diff --git a/build/pkgs/flit_core/distros/gentoo.txt b/build/pkgs/flit_core/distros/gentoo.txt
+new file mode 100644
+index 00000000..fe6bea9
+--- /dev/null
++++ b/build/pkgs/flit_core/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/flit_core
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b0ce1c4f23cd9fc4316e1eb2b9b4bde394957f3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:32:11 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for flit_core.
+
+---
+ build/pkgs/flit_core/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/flit_core/spkg-configure.m4
+
+diff --git a/build/pkgs/flit_core/spkg-configure.m4 b/build/pkgs/flit_core/spkg-configure.m4
+new file mode 100644
+index 00000000..ee67557
+--- /dev/null
++++ b/build/pkgs/flit_core/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([flit_core], [SAGE_PYTHON_PACKAGE_CHECK([flit_core])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f006c231a81428b1e1e792f889bf974f90e3c831 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:34:06 -0400
+Subject: Trac #29665: add Gentoo package information for nest_asyncio.
+
+---
+ build/pkgs/nest_asyncio/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nest_asyncio/distros/gentoo.txt
+
+diff --git a/build/pkgs/nest_asyncio/distros/gentoo.txt b/build/pkgs/nest_asyncio/distros/gentoo.txt
+new file mode 100644
+index 00000000..ab742d2
+--- /dev/null
++++ b/build/pkgs/nest_asyncio/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nest_asyncio
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4a58d0a96a84475e765a01a64f5f44c48a317e0b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:34:43 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for nest_asyncio.
+
+---
+ build/pkgs/nest_asyncio/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nest_asyncio/spkg-configure.m4
+
+diff --git a/build/pkgs/nest_asyncio/spkg-configure.m4 b/build/pkgs/nest_asyncio/spkg-configure.m4
+new file mode 100644
+index 00000000..4d81527
+--- /dev/null
++++ b/build/pkgs/nest_asyncio/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nest_asyncio], [SAGE_PYTHON_PACKAGE_CHECK([nest_asyncio])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e50af937777ea778908bc09a7a79db3dd80fdf25 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:37:02 -0400
+Subject: Trac #29665: add Gentoo package information for ipython_genutils.
+
+---
+ build/pkgs/ipython_genutils/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython_genutils/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipython_genutils/distros/gentoo.txt b/build/pkgs/ipython_genutils/distros/gentoo.txt
+new file mode 100644
+index 00000000..01bc49d
+--- /dev/null
++++ b/build/pkgs/ipython_genutils/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipython_genutils
+-- 
+cgit v1.0-1-gd88e
+
+
+From ec3c0ce9db2ba13c1a49d1bcfb7a4b249cb7ae83 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:39:20 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipython_genutils.
+
+---
+ build/pkgs/ipython_genutils/spkg-configure.m4 | 4 ++++
+ 1 file changed, 4 insertions(+)
+ create mode 100644 build/pkgs/ipython_genutils/spkg-configure.m4
+
+diff --git a/build/pkgs/ipython_genutils/spkg-configure.m4 b/build/pkgs/ipython_genutils/spkg-configure.m4
+new file mode 100644
+index 00000000..b0ba86a
+--- /dev/null
++++ b/build/pkgs/ipython_genutils/spkg-configure.m4
+@@ -0,0 +1,4 @@
++SAGE_SPKG_CONFIGURE(
++  [ipython_genutils],
++  [SAGE_PYTHON_PACKAGE_CHECK([ipython_genutils])]
++)
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5c9e2e265115e5f10d4b459a475467e30b4bddde Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:40:03 -0400
+Subject: Trac #29665: add Gentoo package information for ipython.
+
+---
+ build/pkgs/ipython/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipython/distros/gentoo.txt b/build/pkgs/ipython/distros/gentoo.txt
+new file mode 100644
+index 00000000..8b76f18
+--- /dev/null
++++ b/build/pkgs/ipython/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipython
+-- 
+cgit v1.0-1-gd88e
+
+
+From 621e707ddd040a902d7dddf0bed1de2b54ab22f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 07:37:56 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipython.
+
+---
+ build/pkgs/ipython/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython/spkg-configure.m4
+
+diff --git a/build/pkgs/ipython/spkg-configure.m4 b/build/pkgs/ipython/spkg-configure.m4
+new file mode 100644
+index 00000000..02ab89f
+--- /dev/null
++++ b/build/pkgs/ipython/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipython], [SAGE_PYTHON_PACKAGE_CHECK([ipython])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20a0613f6d441da436f3e7b8047a72bf490882bd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 07:51:11 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipywidgets.
+
+---
+ build/pkgs/ipywidgets/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipywidgets/spkg-configure.m4
+
+diff --git a/build/pkgs/ipywidgets/spkg-configure.m4 b/build/pkgs/ipywidgets/spkg-configure.m4
+new file mode 100644
+index 00000000..51ca9be
+--- /dev/null
++++ b/build/pkgs/ipywidgets/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipywidgets], [SAGE_PYTHON_PACKAGE_CHECK([ipywidgets])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 76bcd386633acc02a1a3026339d0cbd258ada04e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 10:05:16 -0400
+Subject: Trac #29665: add Gentoo package information for wheel.
+
+---
+ build/pkgs/wheel/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wheel/distros/gentoo.txt
+
+diff --git a/build/pkgs/wheel/distros/gentoo.txt b/build/pkgs/wheel/distros/gentoo.txt
+new file mode 100644
+index 00000000..ec571d5
+--- /dev/null
++++ b/build/pkgs/wheel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 96c2dd2ca7812f5333bb9d45eadb7ac408e364ce Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:51:44 -0500
+Subject: Trac #29665: add Gentoo package information for terminado.
+
+---
+ build/pkgs/terminado/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/terminado/distros/gentoo.txt
+
+diff --git a/build/pkgs/terminado/distros/gentoo.txt b/build/pkgs/terminado/distros/gentoo.txt
+new file mode 100644
+index 00000000..1df16f1
+--- /dev/null
++++ b/build/pkgs/terminado/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/terminado
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0de0f5f3d235a4339b21e37ea13c9f5e59a82e59 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:52:35 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for terminado.
+
+---
+ build/pkgs/terminado/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/terminado/spkg-configure.m4
+
+diff --git a/build/pkgs/terminado/spkg-configure.m4 b/build/pkgs/terminado/spkg-configure.m4
+new file mode 100644
+index 00000000..5defc2f
+--- /dev/null
++++ b/build/pkgs/terminado/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([terminado], [SAGE_PYTHON_PACKAGE_CHECK([terminado])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d14a745c770b02822557e7cee0a98de1cb2f3a12 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:56:15 -0500
+Subject: Trac #29665: add Gentoo package information for cffi.
+
+---
+ build/pkgs/cffi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cffi/distros/gentoo.txt
+
+diff --git a/build/pkgs/cffi/distros/gentoo.txt b/build/pkgs/cffi/distros/gentoo.txt
+new file mode 100644
+index 00000000..81eeb81
+--- /dev/null
++++ b/build/pkgs/cffi/distros/gentoo.txt
+@@ -0,0 +1 @@
++virtual/python-cffi
+-- 
+cgit v1.0-1-gd88e
+
+
+From ce393c04afc69fe050e38f780d4e117164687d80 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:57:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for cffi.
+
+---
+ build/pkgs/cffi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cffi/spkg-configure.m4
+
+diff --git a/build/pkgs/cffi/spkg-configure.m4 b/build/pkgs/cffi/spkg-configure.m4
+new file mode 100644
+index 00000000..dc81875
+--- /dev/null
++++ b/build/pkgs/cffi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([cffi], [SAGE_PYTHON_PACKAGE_CHECK([cffi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 467093315b3fdd57c8caa2f95cf99ad52b0b84fb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:57:57 -0500
+Subject: Trac #29665: add Gentoo package information for pip.
+
+---
+ build/pkgs/pip/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pip/distros/gentoo.txt
+
+diff --git a/build/pkgs/pip/distros/gentoo.txt b/build/pkgs/pip/distros/gentoo.txt
+new file mode 100644
+index 00000000..1845454
+--- /dev/null
++++ b/build/pkgs/pip/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pip[vanilla]
+-- 
+cgit v1.0-1-gd88e
+
+
+From c597fd23f9f68dabbcb7e698d0569c3e6458f6d1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 09:07:26 -0500
+Subject: Trac #29665: new spkg-configure.m4 for pip.
+
+---
+ build/pkgs/pip/spkg-configure.m4 | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+ create mode 100644 build/pkgs/pip/spkg-configure.m4
+
+diff --git a/build/pkgs/pip/spkg-configure.m4 b/build/pkgs/pip/spkg-configure.m4
+new file mode 100644
+index 00000000..c7a5562
+--- /dev/null
++++ b/build/pkgs/pip/spkg-configure.m4
+@@ -0,0 +1,12 @@
++SAGE_SPKG_CONFIGURE([pip], [
++  dnl always run this macro because it changes the default value of
++  dnl the --with-system-<package> option.
++  SAGE_PYTHON_PACKAGE_CHECK([pip])
++
++  dnl if we might not install the spkg, make sure that "pip" is in
++  dnl the user's PATH, too.
++  AS_IF([test "x$sage_spkg_install_pip" != "xyes"], [
++    AC_CHECK_PROG(HAVE_PIP, pip, yes, no)
++    AS_IF([test "x$HAVE_PIP" = "xno"], [sage_spkg_install_pip=yes])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ef8f1e807bc55d7b8321777486fa867a7c135419 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 9 Nov 2021 09:09:04 -0500
+Subject: Trac #29665: set $SAGE_PIP_INSTALL_FLAGS for
+ --enable-system-site-packages.
+
+We need to pass some special flags to "pip install" to make it do the
+right thing in the precence of system-site packages. Here we introduce
+a new autoconf variable, SAGE_PIP_INSTALL_FLAGS, that will be used
+to pass those flags to the build system.
+
+With autoconf aware of the variable, we substitute its value into the
+sage-build-env-config script for use in spkg-install.in.
+---
+ build/bin/sage-build-env-config.in | 1 +
+ configure.ac                       | 9 +++++++++
+ 2 files changed, 10 insertions(+)
+
+diff --git a/build/bin/sage-build-env-config.in b/build/bin/sage-build-env-config.in
+index 92e7dad..ad62e5f 100644
+--- a/build/bin/sage-build-env-config.in
++++ b/build/bin/sage-build-env-config.in
+@@ -53,6 +53,7 @@ export SAGE_PARI_CFG="@SAGE_PARI_CFG@"
+ 
+ export SAGE_GLPK_PREFIX="@SAGE_GLPK_PREFIX@"
+ export SAGE_FREETYPE_PREFIX="@SAGE_FREETYPE_PREFIX@"
++export SAGE_PIP_INSTALL_FLAGS="@SAGE_PIP_INSTALL_FLAGS@"
+ export SAGE_SUITESPARSE_PREFIX="@SAGE_SUITESPARSE_PREFIX@"
+ 
+ export SAGE_CONFIGURE_FFLAS_FFPACK="@SAGE_CONFIGURE_FFLAS_FFPACK@"
+diff --git a/configure.ac b/configure.ac
+index 6fafb83..6ed07ac 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -441,6 +441,14 @@ AC_ARG_ENABLE(
+     [allow the use of python packages from the system (experimental; default: no)]
+   )], [
+   AS_IF([test "x$enable_system_site_packages" = "xyes"], [
++    dnl When installing python SPKGs in the presence of system-site
++    dnl packages, we need to --ignore-installed so that a patched SPKG
++    dnl can be installed in the presence of an unpatched system package
++    dnl that appears (to pip) to be identical. The --no-deps flag is
++    dnl then needed because --ignore-installed will make any installed
++    dnl dependencies invisible to pip, who does not appreciate that.
++    SAGE_PIP_INSTALL_FLAGS="${SAGE_PIP_INSTALL_FLAGS} --no-deps --ignore-installed"
++
+     SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
+ 
+     dnl We want to raise an error if the user asked for "system site
+@@ -453,6 +461,7 @@ AC_ARG_ENABLE(
+     with_system_python3="force"
+   ])
+ ])
++AC_SUBST([SAGE_PIP_INSTALL_FLAGS])
+ AC_SUBST([SAGE_VENV_FLAGS])
+ 
+ SAGE_SPKG_OPTIONS=""
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3cf365fef84e809e74abd2eb388e7a8e9af9d739 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 9 Nov 2021 21:01:58 -0500
+Subject: Trac #29665: pass $SAGE_PIP_INSTALL_FLAGS to sdh_pip_install.
+
+Since sdh_pip_install is usually called from spkg-install.in, the
+variables from sage-build-env-config will be available. Here we pass
+the contents of $SAGE_PIP_INSTALL_FLAGS to sage-pip-install
+unconditionally, and hope that the user ignores this variable unless
+he truly knows what he is doing.
+---
+ build/bin/sage-dist-helpers | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/build/bin/sage-dist-helpers b/build/bin/sage-dist-helpers
+index fe364e5..1032ac3 100644
+--- a/build/bin/sage-dist-helpers
++++ b/build/bin/sage-dist-helpers
+@@ -303,7 +303,11 @@ sdh_store_wheel() {
+ }
+ 
+ sdh_store_and_pip_install_wheel() {
+-    local pip_options=""
++    # The $SAGE_PIP_INSTALL_FLAGS variable is set by sage-build-env-config.
++    # We skip sanity checking its contents since you should either let sage
++    # decide what it contains, or really know what you are doing.
++    local pip_options="${SAGE_PIP_INSTALL_FLAGS}"
++
+     while [ $# -gt 0 ]; do
+         case $1 in
+             -*) pip_options="$pip_options $1"
+-- 
+cgit v1.0-1-gd88e
+
+
+From 50f0438ee857b8f0b7d7ad924e6bba9c5e1bc033 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:10:46 -0500
+Subject: Trac #29665: add Gentoo package information for pexpect.
+
+---
+ build/pkgs/pexpect/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pexpect/distros/gentoo.txt
+
+diff --git a/build/pkgs/pexpect/distros/gentoo.txt b/build/pkgs/pexpect/distros/gentoo.txt
+new file mode 100644
+index 00000000..30c4b60
+--- /dev/null
++++ b/build/pkgs/pexpect/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pexpect
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4d784688d997290b462646fa7f36114a41f3f453 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:11:25 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pexpect.
+
+---
+ build/pkgs/pexpect/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pexpect/spkg-configure.m4
+
+diff --git a/build/pkgs/pexpect/spkg-configure.m4 b/build/pkgs/pexpect/spkg-configure.m4
+new file mode 100644
+index 00000000..6520856
+--- /dev/null
++++ b/build/pkgs/pexpect/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pexpect], [SAGE_PYTHON_PACKAGE_CHECK([pexpect])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6447122dc76a3b7a58340dbed942db66530b5b07 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:12:05 -0500
+Subject: Trac #29665: add Gentoo package information for docutils.
+
+---
+ build/pkgs/docutils/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/docutils/distros/gentoo.txt
+
+diff --git a/build/pkgs/docutils/distros/gentoo.txt b/build/pkgs/docutils/distros/gentoo.txt
+new file mode 100644
+index 00000000..fe4a452
+--- /dev/null
++++ b/build/pkgs/docutils/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/docutils
+-- 
+cgit v1.0-1-gd88e
+
+
+From 709041480a5fc729b0ee7f1a8a3b16d4d65321b5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:12:38 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for docutils.
+
+---
+ build/pkgs/docutils/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/docutils/spkg-configure.m4
+
+diff --git a/build/pkgs/docutils/spkg-configure.m4 b/build/pkgs/docutils/spkg-configure.m4
+new file mode 100644
+index 00000000..3584e45
+--- /dev/null
++++ b/build/pkgs/docutils/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([docutils], [SAGE_PYTHON_PACKAGE_CHECK([docutils])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 782d38b48ab87afccc43fbc071e7b7ed48fb0a20 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:14:37 -0500
+Subject: Trac #29665: add Gentoo package information for nbclient.
+
+---
+ build/pkgs/nbclient/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbclient/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbclient/distros/gentoo.txt b/build/pkgs/nbclient/distros/gentoo.txt
+new file mode 100644
+index 00000000..06ff18d
+--- /dev/null
++++ b/build/pkgs/nbclient/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbclient
+-- 
+cgit v1.0-1-gd88e
+
+
+From 19ce09336532336f69db74381932d51a429dfaca Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:15:11 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for nbclient.
+
+---
+ build/pkgs/nbclient/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbclient/spkg-configure.m4
+
+diff --git a/build/pkgs/nbclient/spkg-configure.m4 b/build/pkgs/nbclient/spkg-configure.m4
+new file mode 100644
+index 00000000..14178b7
+--- /dev/null
++++ b/build/pkgs/nbclient/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbclient], [SAGE_PYTHON_PACKAGE_CHECK([nbclient])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c063b9de42c1780368000a563d0dbe80b6fff169 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:17:36 -0500
+Subject: Trac #29665: add Gentoo package information for argon2_cffi.
+
+---
+ build/pkgs/argon2_cffi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argon2_cffi/distros/gentoo.txt
+
+diff --git a/build/pkgs/argon2_cffi/distros/gentoo.txt b/build/pkgs/argon2_cffi/distros/gentoo.txt
+new file mode 100644
+index 00000000..2f12ca8
+--- /dev/null
++++ b/build/pkgs/argon2_cffi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/argon2-cffi
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0b4d5699dd51ea52550fba7db9e1cbb8bbac1892 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:18:35 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for argon2_cffi.
+
+---
+ build/pkgs/argon2_cffi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argon2_cffi/spkg-configure.m4
+
+diff --git a/build/pkgs/argon2_cffi/spkg-configure.m4 b/build/pkgs/argon2_cffi/spkg-configure.m4
+new file mode 100644
+index 00000000..03ebc63
+--- /dev/null
++++ b/build/pkgs/argon2_cffi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([argon2_cffi], [SAGE_PYTHON_PACKAGE_CHECK([argon2_cffi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2b4119558a6e0b1aa512848539a237676b035c83 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:30:48 -0500
+Subject: Trac #29665: fix package name in dateutil's install-requires.txt.
+
+---
+ build/pkgs/dateutil/install-requires.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/build/pkgs/dateutil/install-requires.txt b/build/pkgs/dateutil/install-requires.txt
+index 0ae93da..face537 100644
+--- a/build/pkgs/dateutil/install-requires.txt
++++ b/build/pkgs/dateutil/install-requires.txt
+@@ -1 +1 @@
+-dateutil >=2.8.1
++python-dateutil >=2.8.1
+-- 
+cgit v1.0-1-gd88e
+
+
+From df371b7c4d20a3353d43940306ad22e11aba29da Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:31:41 -0500
+Subject: Trac #29665: add Gentoo package information for dateutil.
+
+---
+ build/pkgs/dateutil/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/dateutil/distros/gentoo.txt
+
+diff --git a/build/pkgs/dateutil/distros/gentoo.txt b/build/pkgs/dateutil/distros/gentoo.txt
+new file mode 100644
+index 00000000..e129df7
+--- /dev/null
++++ b/build/pkgs/dateutil/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/python-dateutil
+-- 
+cgit v1.0-1-gd88e
+
+
+From 577695dfdf661ee26c0ffd767bdbf479d95f7fb4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:32:21 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for dateutil.
+
+---
+ build/pkgs/dateutil/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/dateutil/spkg-configure.m4
+
+diff --git a/build/pkgs/dateutil/spkg-configure.m4 b/build/pkgs/dateutil/spkg-configure.m4
+new file mode 100644
+index 00000000..fdcd127
+--- /dev/null
++++ b/build/pkgs/dateutil/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([dateutil], [SAGE_PYTHON_PACKAGE_CHECK([dateutil])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1984651caac624ec4bb58814ca1d57fe66f9881a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:33:51 -0500
+Subject: Trac #29665: add Gentoo package information for setuptools_scm.
+
+---
+ build/pkgs/setuptools_scm/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/setuptools_scm/distros/gentoo.txt
+
+diff --git a/build/pkgs/setuptools_scm/distros/gentoo.txt b/build/pkgs/setuptools_scm/distros/gentoo.txt
+new file mode 100644
+index 00000000..8989597
+--- /dev/null
++++ b/build/pkgs/setuptools_scm/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/setuptools_scm
+-- 
+cgit v1.0-1-gd88e
+
+
+From ebf7c854ed966e7353759be485c4f5a57b9a10fa Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:34:49 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for setuptools_scm.
+
+---
+ build/pkgs/setuptools_scm/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/setuptools_scm/spkg-configure.m4
+
+diff --git a/build/pkgs/setuptools_scm/spkg-configure.m4 b/build/pkgs/setuptools_scm/spkg-configure.m4
+new file mode 100644
+index 00000000..437148c
+--- /dev/null
++++ b/build/pkgs/setuptools_scm/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([setuptools_scm], [
++  SAGE_PYTHON_PACKAGE_CHECK([setuptools_scm])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0dee0d0c28f31b1f619e44c710a3c9e22d2b2544 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:36:33 -0500
+Subject: Trac #29665: add Gentoo package information for nbconvert.
+
+---
+ build/pkgs/nbconvert/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbconvert/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbconvert/distros/gentoo.txt b/build/pkgs/nbconvert/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c45a10
+--- /dev/null
++++ b/build/pkgs/nbconvert/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbconvert
+-- 
+cgit v1.0-1-gd88e
+
+
+From 473789eb11b1838bc32dc8a63509ee199afc8912 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:37:37 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for nbconvert.
+
+---
+ build/pkgs/nbconvert/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbconvert/spkg-configure.m4
+
+diff --git a/build/pkgs/nbconvert/spkg-configure.m4 b/build/pkgs/nbconvert/spkg-configure.m4
+new file mode 100644
+index 00000000..9b5dee3
+--- /dev/null
++++ b/build/pkgs/nbconvert/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbconvert], [SAGE_PYTHON_PACKAGE_CHECK([nbconvert])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f0703b594e57c980d605aa9bc8316c45a7858b3b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:41:51 -0500
+Subject: Trac #29665: add Gentoo package information for jupyter_core.
+
+---
+ build/pkgs/jupyter_core/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyter_core/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyter_core/distros/gentoo.txt b/build/pkgs/jupyter_core/distros/gentoo.txt
+new file mode 100644
+index 00000000..f168c5a
+--- /dev/null
++++ b/build/pkgs/jupyter_core/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyter_core
+-- 
+cgit v1.0-1-gd88e
+
+
+From 061a307cc4a6680d8500fde834975064e59540d5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:42:48 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jupyter_core.
+
+---
+ build/pkgs/jupyter_core/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyter_core/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyter_core/spkg-configure.m4 b/build/pkgs/jupyter_core/spkg-configure.m4
+new file mode 100644
+index 00000000..67df9c3
+--- /dev/null
++++ b/build/pkgs/jupyter_core/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyter_core], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyter_core])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b85abe964ce0b98b5842efe9cbad9bdb1c89202f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:47:08 -0500
+Subject: Trac #29665: add Gentoo package information for jupyter_client.
+
+---
+ build/pkgs/jupyter_client/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyter_client/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyter_client/distros/gentoo.txt b/build/pkgs/jupyter_client/distros/gentoo.txt
+new file mode 100644
+index 00000000..4f1de88
+--- /dev/null
++++ b/build/pkgs/jupyter_client/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyter_client
+-- 
+cgit v1.0-1-gd88e
+
+
+From 86323ff1e0b2507933df6bc2a96c9175957640c5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:48:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jupyter_client.
+
+---
+ build/pkgs/jupyter_client/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyter_client/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyter_client/spkg-configure.m4 b/build/pkgs/jupyter_client/spkg-configure.m4
+new file mode 100644
+index 00000000..fbd3498
+--- /dev/null
++++ b/build/pkgs/jupyter_client/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyter_client], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyter_client])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a8475e27dd30d752d05ab6fea6579e8623501d82 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:48:58 -0500
+Subject: Trac #29665: add Gentoo package information for snowballstemmer.
+
+---
+ build/pkgs/snowballstemmer/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/snowballstemmer/distros/gentoo.txt
+
+diff --git a/build/pkgs/snowballstemmer/distros/gentoo.txt b/build/pkgs/snowballstemmer/distros/gentoo.txt
+new file mode 100644
+index 00000000..63fd851
+--- /dev/null
++++ b/build/pkgs/snowballstemmer/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/snowballstemmer
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0833c9b781062b4ed86d619e050a6f5d60e36080 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:49:38 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for snowballstemmer.
+
+---
+ build/pkgs/snowballstemmer/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/snowballstemmer/spkg-configure.m4
+
+diff --git a/build/pkgs/snowballstemmer/spkg-configure.m4 b/build/pkgs/snowballstemmer/spkg-configure.m4
+new file mode 100644
+index 00000000..6aa0882
+--- /dev/null
++++ b/build/pkgs/snowballstemmer/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([snowballstemmer], [
++  SAGE_PYTHON_PACKAGE_CHECK([snowballstemmer])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 50a1cf2a2bcd7eeec64cbc3f70e3e9fbe5d850fe Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:50:47 -0500
+Subject: Trac #29665: add Gentoo package information for tornado.
+
+---
+ build/pkgs/tornado/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tornado/distros/gentoo.txt
+
+diff --git a/build/pkgs/tornado/distros/gentoo.txt b/build/pkgs/tornado/distros/gentoo.txt
+new file mode 100644
+index 00000000..6ae4b9f
+--- /dev/null
++++ b/build/pkgs/tornado/distros/gentoo.txt
+@@ -0,0 +1 @@
++www-servers/tornado
+-- 
+cgit v1.0-1-gd88e
+
+
+From 118f4da6e03476c726363e8e22ecda32f13bfc33 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:51:26 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for tornado.
+
+---
+ build/pkgs/tornado/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tornado/spkg-configure.m4
+
+diff --git a/build/pkgs/tornado/spkg-configure.m4 b/build/pkgs/tornado/spkg-configure.m4
+new file mode 100644
+index 00000000..1ee5bc9
+--- /dev/null
++++ b/build/pkgs/tornado/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tornado], [SAGE_PYTHON_PACKAGE_CHECK([tornado])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3850701747a6c8ef60840bdfdb589b28d4cd2b9a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:52:21 -0500
+Subject: Trac #29665: add Gentoo package information for jsonschema.
+
+---
+ build/pkgs/jsonschema/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jsonschema/distros/gentoo.txt
+
+diff --git a/build/pkgs/jsonschema/distros/gentoo.txt b/build/pkgs/jsonschema/distros/gentoo.txt
+new file mode 100644
+index 00000000..d708e4c
+--- /dev/null
++++ b/build/pkgs/jsonschema/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jsonschema
+-- 
+cgit v1.0-1-gd88e
+
+
+From 76e3917c8af781af00f642cfada7a79594429e30 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:54:03 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jsonschema.
+
+---
+ build/pkgs/jsonschema/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jsonschema/spkg-configure.m4
+
+diff --git a/build/pkgs/jsonschema/spkg-configure.m4 b/build/pkgs/jsonschema/spkg-configure.m4
+new file mode 100644
+index 00000000..b9e5e21
+--- /dev/null
++++ b/build/pkgs/jsonschema/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jsonschema], [SAGE_PYTHON_PACKAGE_CHECK([jsonschema])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From fd4a16c11669b6dd73ac6325bca820e76db00402 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:55:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ widgetsnbextension.
+
+---
+ build/pkgs/widgetsnbextension/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/widgetsnbextension/spkg-configure.m4
+
+diff --git a/build/pkgs/widgetsnbextension/spkg-configure.m4 b/build/pkgs/widgetsnbextension/spkg-configure.m4
+new file mode 100644
+index 00000000..bf82daf
+--- /dev/null
++++ b/build/pkgs/widgetsnbextension/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([widgetsnbextension], [
++  SAGE_PYTHON_PACKAGE_CHECK([widgetsnbextension])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8079a9f384e3c8480e157dd98c3db2f43c987f4e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:57:20 -0500
+Subject: Trac #29665: add Gentoo package information for importlib_resources.
+
+---
+ build/pkgs/importlib_resources/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/importlib_resources/distros/gentoo.txt
+
+diff --git a/build/pkgs/importlib_resources/distros/gentoo.txt b/build/pkgs/importlib_resources/distros/gentoo.txt
+new file mode 100644
+index 00000000..d5e1f2c
+--- /dev/null
++++ b/build/pkgs/importlib_resources/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/importlib_resources
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2c430d7c52f02779a6c41b98ac2f4edd8b6759c3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:58:00 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ importlib_resources.
+
+---
+ build/pkgs/importlib_resources/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/importlib_resources/spkg-configure.m4
+
+diff --git a/build/pkgs/importlib_resources/spkg-configure.m4 b/build/pkgs/importlib_resources/spkg-configure.m4
+new file mode 100644
+index 00000000..50df55b
+--- /dev/null
++++ b/build/pkgs/importlib_resources/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([importlib_resources], [
++  SAGE_PYTHON_PACKAGE_CHECK([importlib_resources])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 00d13d7bf2e50aae2ccef3b2b30293c70a922af2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:58:38 -0500
+Subject: Trac #29665: add Gentoo package information for kiwisolver.
+
+---
+ build/pkgs/kiwisolver/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/kiwisolver/distros/gentoo.txt
+
+diff --git a/build/pkgs/kiwisolver/distros/gentoo.txt b/build/pkgs/kiwisolver/distros/gentoo.txt
+new file mode 100644
+index 00000000..7b30c95
+--- /dev/null
++++ b/build/pkgs/kiwisolver/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/kiwisolver
+-- 
+cgit v1.0-1-gd88e
+
+
+From 72b7907ef7ea9fa4ff6948ea34cfe2f693ee6c31 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:59:09 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for kiwisolver.
+
+---
+ build/pkgs/kiwisolver/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/kiwisolver/spkg-configure.m4
+
+diff --git a/build/pkgs/kiwisolver/spkg-configure.m4 b/build/pkgs/kiwisolver/spkg-configure.m4
+new file mode 100644
+index 00000000..4e7ac97
+--- /dev/null
++++ b/build/pkgs/kiwisolver/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([kiwisolver], [SAGE_PYTHON_PACKAGE_CHECK([kiwisolver])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 479351279e4e0ea7e2d146434f0daba038765cfd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:00:04 -0500
+Subject: Trac #29665: add Gentoo package information for notebook.
+
+---
+ build/pkgs/notebook/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/notebook/distros/gentoo.txt
+
+diff --git a/build/pkgs/notebook/distros/gentoo.txt b/build/pkgs/notebook/distros/gentoo.txt
+new file mode 100644
+index 00000000..6475d72
+--- /dev/null
++++ b/build/pkgs/notebook/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/notebook
+-- 
+cgit v1.0-1-gd88e
+
+
+From f4d9242ea654977f8ad7865c82eec593e11a36bc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:01:42 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for notebook.
+
+---
+ build/pkgs/notebook/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/notebook/spkg-configure.m4
+
+diff --git a/build/pkgs/notebook/spkg-configure.m4 b/build/pkgs/notebook/spkg-configure.m4
+new file mode 100644
+index 00000000..a17ba95
+--- /dev/null
++++ b/build/pkgs/notebook/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([notebook], [SAGE_PYTHON_PACKAGE_CHECK([notebook])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9837070c7f8e9a71283b84d49d4fd2c94b78a464 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:02:38 -0500
+Subject: Trac #29665: add Gentoo package information for matplotlib_inline.
+
+---
+ build/pkgs/matplotlib_inline/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/matplotlib_inline/distros/gentoo.txt
+
+diff --git a/build/pkgs/matplotlib_inline/distros/gentoo.txt b/build/pkgs/matplotlib_inline/distros/gentoo.txt
+new file mode 100644
+index 00000000..6a5859c
+--- /dev/null
++++ b/build/pkgs/matplotlib_inline/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/matplotlib-inline
+-- 
+cgit v1.0-1-gd88e
+
+
+From 750be73b25b92b4875e47d044360ac0e1116ec3e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:03:28 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for matplotlib_inline.
+
+---
+ build/pkgs/matplotlib_inline/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/matplotlib_inline/spkg-configure.m4
+
+diff --git a/build/pkgs/matplotlib_inline/spkg-configure.m4 b/build/pkgs/matplotlib_inline/spkg-configure.m4
+new file mode 100644
+index 00000000..e59658f
+--- /dev/null
++++ b/build/pkgs/matplotlib_inline/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([matplotlib_inline], [
++  SAGE_PYTHON_PACKAGE_CHECK([matplotlib_inline])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 273505f49698dcd2ab30c2756b07113c9b7e7791 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:04:10 -0500
+Subject: Trac #29665: add Gentoo package information for ipykernel.
+
+---
+ build/pkgs/ipykernel/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipykernel/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipykernel/distros/gentoo.txt b/build/pkgs/ipykernel/distros/gentoo.txt
+new file mode 100644
+index 00000000..88aab61
+--- /dev/null
++++ b/build/pkgs/ipykernel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipykernel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 629ad36c9e4ae0cdff4a013289b4f2911442445e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:04:46 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for ipykernel.
+
+---
+ build/pkgs/ipykernel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipykernel/spkg-configure.m4
+
+diff --git a/build/pkgs/ipykernel/spkg-configure.m4 b/build/pkgs/ipykernel/spkg-configure.m4
+new file mode 100644
+index 00000000..94ecc2d
+--- /dev/null
++++ b/build/pkgs/ipykernel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipykernel], [SAGE_PYTHON_PACKAGE_CHECK([ipykernel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b8d709edb6a24fd5868ee2818b56e78257b2eafa Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:05:26 -0500
+Subject: Trac #29665: add Gentoo package information for prompt_toolkit.
+
+---
+ build/pkgs/prompt_toolkit/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/prompt_toolkit/distros/gentoo.txt
+
+diff --git a/build/pkgs/prompt_toolkit/distros/gentoo.txt b/build/pkgs/prompt_toolkit/distros/gentoo.txt
+new file mode 100644
+index 00000000..6902484
+--- /dev/null
++++ b/build/pkgs/prompt_toolkit/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/prompt_toolkit
+-- 
+cgit v1.0-1-gd88e
+
+
+From 16c0b5e767ae4dac4440510b7253e5c8642b7d2c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:10:39 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for prompt_toolkit.
+
+---
+ build/pkgs/prompt_toolkit/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/prompt_toolkit/spkg-configure.m4
+
+diff --git a/build/pkgs/prompt_toolkit/spkg-configure.m4 b/build/pkgs/prompt_toolkit/spkg-configure.m4
+new file mode 100644
+index 00000000..fd8c1a6
+--- /dev/null
++++ b/build/pkgs/prompt_toolkit/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([prompt_toolkit], [
++  SAGE_PYTHON_PACKAGE_CHECK([prompt_toolkit])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0cd9283e8bb6c8ae413fc8f715c021f7ec3ca2c8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:12:10 -0500
+Subject: Trac #29665: add Gentoo package information for charset_normalizer.
+
+---
+ build/pkgs/charset_normalizer/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/charset_normalizer/distros/gentoo.txt
+
+diff --git a/build/pkgs/charset_normalizer/distros/gentoo.txt b/build/pkgs/charset_normalizer/distros/gentoo.txt
+new file mode 100644
+index 00000000..eefeb89
+--- /dev/null
++++ b/build/pkgs/charset_normalizer/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/charset_normalizer
+-- 
+cgit v1.0-1-gd88e
+
+
+From a04b01a9ab59097d189edcc5ddcb461faede83b2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:12:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ charset_normalizer.
+
+---
+ build/pkgs/charset_normalizer/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/charset_normalizer/spkg-configure.m4
+
+diff --git a/build/pkgs/charset_normalizer/spkg-configure.m4 b/build/pkgs/charset_normalizer/spkg-configure.m4
+new file mode 100644
+index 00000000..18b18cf
+--- /dev/null
++++ b/build/pkgs/charset_normalizer/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([charset_normalizer], [
++  SAGE_PYTHON_PACKAGE_CHECK([charset_normalizer])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d2ea08138711c53046f977b586f33b09b176b2e3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:13:37 -0500
+Subject: Trac #29665: add Gentoo package information for prometheus_client.
+
+---
+ build/pkgs/prometheus_client/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/prometheus_client/distros/gentoo.txt
+
+diff --git a/build/pkgs/prometheus_client/distros/gentoo.txt b/build/pkgs/prometheus_client/distros/gentoo.txt
+new file mode 100644
+index 00000000..aa2889c
+--- /dev/null
++++ b/build/pkgs/prometheus_client/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/prometheus_client
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b0393200e9edd3e26b8a55ba67e5710e7403fcb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:15:09 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for prometheus_client.
+
+---
+ build/pkgs/prometheus_client/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/prometheus_client/spkg-configure.m4
+
+diff --git a/build/pkgs/prometheus_client/spkg-configure.m4 b/build/pkgs/prometheus_client/spkg-configure.m4
+new file mode 100644
+index 00000000..b494588
+--- /dev/null
++++ b/build/pkgs/prometheus_client/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([prometheus_client], [
++  SAGE_PYTHON_PACKAGE_CHECK([prometheus_client])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From cdcd85284f43ca4ad18353ec3527b2901e57b788 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:17:23 -0500
+Subject: Trac #29665: add Gentoo package information for pybind11.
+
+---
+ build/pkgs/pybind11/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pybind11/distros/gentoo.txt
+
+diff --git a/build/pkgs/pybind11/distros/gentoo.txt b/build/pkgs/pybind11/distros/gentoo.txt
+new file mode 100644
+index 00000000..0c500b3
+--- /dev/null
++++ b/build/pkgs/pybind11/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pybind11
+-- 
+cgit v1.0-1-gd88e
+
+
+From efdd1eb64c4799fe3cdf2221824182941b3fda2d Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:17:51 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pybind11.
+
+---
+ build/pkgs/pybind11/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pybind11/spkg-configure.m4
+
+diff --git a/build/pkgs/pybind11/spkg-configure.m4 b/build/pkgs/pybind11/spkg-configure.m4
+new file mode 100644
+index 00000000..cce1cf5
+--- /dev/null
++++ b/build/pkgs/pybind11/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pybind11], [SAGE_PYTHON_PACKAGE_CHECK([pybind11])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b2128f33b68ea33927284116ea598dd186902400 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:19:23 -0500
+Subject: Trac #29665: add Gentoo package information for pkgconfig.
+
+---
+ build/pkgs/pkgconfig/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pkgconfig/distros/gentoo.txt
+
+diff --git a/build/pkgs/pkgconfig/distros/gentoo.txt b/build/pkgs/pkgconfig/distros/gentoo.txt
+new file mode 100644
+index 00000000..32e8618
+--- /dev/null
++++ b/build/pkgs/pkgconfig/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pkgconfig
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b373b49e06aadeb36dc57e500da9a322460e658 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:19:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pkgconfig.
+
+---
+ build/pkgs/pkgconfig/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pkgconfig/spkg-configure.m4
+
+diff --git a/build/pkgs/pkgconfig/spkg-configure.m4 b/build/pkgs/pkgconfig/spkg-configure.m4
+new file mode 100644
+index 00000000..6708293
+--- /dev/null
++++ b/build/pkgs/pkgconfig/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pkgconfig], [SAGE_PYTHON_PACKAGE_CHECK([pkgconfig])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ce578729eb0d14baab365351ba9a9ffffb7b79f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:21:10 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_serializinghtml.
+
+---
+ build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt b/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+new file mode 100644
+index 00000000..38bca8f
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-serializinghtml
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb0f42c32bbce0e4488678312f5e2d88c6f42c9b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:21:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_serializinghtml.
+
+---
+ build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4 b/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+new file mode 100644
+index 00000000..be8e625
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_serializinghtml], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_serializinghtml])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e47dcf985e40475de85c9436a85537751318bc3d Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:22:54 -0500
+Subject: Trac #29665: add Gentoo package information for sphinxcontrib_jsmath.
+
+---
+ build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt b/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+new file mode 100644
+index 00000000..041a471
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-jsmath
+-- 
+cgit v1.0-1-gd88e
+
+
+From 72cff6fd35f93de4fa855bc870569dd733ff5c24 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:23:49 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_jsmath.
+
+---
+ build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4 b/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+new file mode 100644
+index 00000000..e46bde2
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_jsmath], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_jsmath])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a36395d70f759449cd63c1b0990fbdcb4cb25ca0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:24:26 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_devhelp.
+
+---
+ build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..9b5c899
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-devhelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9953a5dd1646ed0ad51d2e3935cf609bc9e7fd1c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:25:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_devhelp.
+
+---
+ build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+new file mode 100644
+index 00000000..8728136
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_devhelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_devhelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b199d5363aad93f3cb23f7904c9553a28b06348f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:25:53 -0500
+Subject: Trac #29665: add Gentoo package information for sphinxcontrib_qthelp.
+
+---
+ build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..7210099
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-qthelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 94ac8806739f3938e73f5857328e91e0d42e98d2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:26:28 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_qthelp.
+
+---
+ build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+new file mode 100644
+index 00000000..81ea5e1
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_qthelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_qthelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From beedc154aa405e8a58aee8889f510db07adc89a7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:26:54 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_applehelp.
+
+---
+ build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..66ac8da
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-applehelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 07d47c3673d6b35423b71f621cb400989c0101c2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:27:19 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_applehelp.
+
+---
+ build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+new file mode 100644
+index 00000000..e834aed
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_applehelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_applehelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 333a66546c5d421735c49dbafd7370a827f22781 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:27:46 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_htmlhelp.
+
+---
+ build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..e080bac
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-htmlhelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From bfaeb3962254439b63f1f2e0e883de462c7831be Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:29:18 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_htmlhelp.
+
+---
+ build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+new file mode 100644
+index 00000000..c77b003
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_htmlhelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_htmlhelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 782cde13da06e8b85806cb7cbc8aceee0364e639 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:30:23 -0500
+Subject: Trac #29665: add Gentoo package information for jupyterlab_pygments.
+
+---
+ build/pkgs/jupyterlab_pygments/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyterlab_pygments/distros/gentoo.txt b/build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+new file mode 100644
+index 00000000..c57b4f1
+--- /dev/null
++++ b/build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyterlab_pygments
+-- 
+cgit v1.0-1-gd88e
+
+
+From 39f974cfa4a8c6e5dd897f152f83ec82f40ee9f7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:31:13 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ jupyterlab_pygments.
+
+---
+ build/pkgs/jupyterlab_pygments/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyterlab_pygments/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyterlab_pygments/spkg-configure.m4 b/build/pkgs/jupyterlab_pygments/spkg-configure.m4
+new file mode 100644
+index 00000000..e46e21f
+--- /dev/null
++++ b/build/pkgs/jupyterlab_pygments/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyterlab_pygments], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyterlab_pygments])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From db704620700fd36cec3bf6125938f3ee00a9eb5e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:29:15 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for ply.
+
+---
+ build/pkgs/ply/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ply/spkg-configure.m4
+
+diff --git a/build/pkgs/ply/spkg-configure.m4 b/build/pkgs/ply/spkg-configure.m4
+new file mode 100644
+index 00000000..ffb0030
+--- /dev/null
++++ b/build/pkgs/ply/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ply], [SAGE_PYTHON_PACKAGE_CHECK([ply])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6aac31dabcdfdef228d7780398a3fda1a4cc566f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:29:51 -0500
+Subject: Trac #29665: add Gentoo package information for ply.
+
+---
+ build/pkgs/ply/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ply/distros/gentoo.txt
+
+diff --git a/build/pkgs/ply/distros/gentoo.txt b/build/pkgs/ply/distros/gentoo.txt
+new file mode 100644
+index 00000000..c8b1630
+--- /dev/null
++++ b/build/pkgs/ply/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ply
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb8d3372936ec37470d69687a0f91592129460ae Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:30:33 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for gast.
+
+---
+ build/pkgs/gast/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/gast/spkg-configure.m4
+
+diff --git a/build/pkgs/gast/spkg-configure.m4 b/build/pkgs/gast/spkg-configure.m4
+new file mode 100644
+index 00000000..26ec59f
+--- /dev/null
++++ b/build/pkgs/gast/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([gast], [SAGE_PYTHON_PACKAGE_CHECK([gast])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1cdc4046a88f1c2b4e5c162f66c6db6090b24194 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:31:15 -0500
+Subject: Trac #29665: add Gentoo package information for gast.
+
+---
+ build/pkgs/gast/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/gast/distros/gentoo.txt
+
+diff --git a/build/pkgs/gast/distros/gentoo.txt b/build/pkgs/gast/distros/gentoo.txt
+new file mode 100644
+index 00000000..3be5e7e
+--- /dev/null
++++ b/build/pkgs/gast/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/gast
+-- 
+cgit v1.0-1-gd88e
+
+
+From 96068b8a3742b65d619190e1d9fa5db399e6b4f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:32:20 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pythran.
+
+---
+ build/pkgs/pythran/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pythran/spkg-configure.m4
+
+diff --git a/build/pkgs/pythran/spkg-configure.m4 b/build/pkgs/pythran/spkg-configure.m4
+new file mode 100644
+index 00000000..592e95b
+--- /dev/null
++++ b/build/pkgs/pythran/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pythran], [SAGE_PYTHON_PACKAGE_CHECK([pythran])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1fa0fad3ae8f7e559c6fc315c6773a7d8aac0bfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:32:55 -0500
+Subject: Trac #29665: add Gentoo package information for pythran.
+
+---
+ build/pkgs/pythran/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pythran/distros/gentoo.txt
+
+diff --git a/build/pkgs/pythran/distros/gentoo.txt b/build/pkgs/pythran/distros/gentoo.txt
+new file mode 100644
+index 00000000..1bb7cdc
+--- /dev/null
++++ b/build/pkgs/pythran/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pythran
+-- 
+cgit v1.0-1-gd88e
+
+
+From d26370e5b8c88e76abfb7c27e3defb71c9e9f711 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:33:50 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for beniget.
+
+---
+ build/pkgs/beniget/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/beniget/spkg-configure.m4
+
+diff --git a/build/pkgs/beniget/spkg-configure.m4 b/build/pkgs/beniget/spkg-configure.m4
+new file mode 100644
+index 00000000..8ae6101
+--- /dev/null
++++ b/build/pkgs/beniget/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([beniget], [SAGE_PYTHON_PACKAGE_CHECK([beniget])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From eeeb296ed9b9694a865534103fd58e62a151ef5e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:34:22 -0500
+Subject: Trac #29665: add Gentoo package information for beniget.
+
+---
+ build/pkgs/beniget/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/beniget/distros/gentoo.txt
+
+diff --git a/build/pkgs/beniget/distros/gentoo.txt b/build/pkgs/beniget/distros/gentoo.txt
+new file mode 100644
+index 00000000..1a5972c
+--- /dev/null
++++ b/build/pkgs/beniget/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/beniget
+-- 
+cgit v1.0-1-gd88e
+
+
+From 078b2ff272d0eeff5cce40ad7eb176d9ddd7bdff Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:35:37 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for alabaster.
+
+---
+ build/pkgs/alabaster/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/alabaster/spkg-configure.m4
+
+diff --git a/build/pkgs/alabaster/spkg-configure.m4 b/build/pkgs/alabaster/spkg-configure.m4
+new file mode 100644
+index 00000000..4eca6e0
+--- /dev/null
++++ b/build/pkgs/alabaster/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([alabaster], [SAGE_PYTHON_PACKAGE_CHECK([alabaster])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7dc264353e5f64110431ff28c1b8b7e89699e9bd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:36:06 -0500
+Subject: Trac #29665: add Gentoo package information for alabaster.
+
+---
+ build/pkgs/alabaster/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/alabaster/distros/gentoo.txt
+
+diff --git a/build/pkgs/alabaster/distros/gentoo.txt b/build/pkgs/alabaster/distros/gentoo.txt
+new file mode 100644
+index 00000000..cffece6
+--- /dev/null
++++ b/build/pkgs/alabaster/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/alabaster
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8011a5e675e7e61a77ce34a299ee961a9f44253f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:43:59 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ importlib_metadata.
+
+---
+ build/pkgs/importlib_metadata/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/importlib_metadata/spkg-configure.m4
+
+diff --git a/build/pkgs/importlib_metadata/spkg-configure.m4 b/build/pkgs/importlib_metadata/spkg-configure.m4
+new file mode 100644
+index 00000000..0554e52
+--- /dev/null
++++ b/build/pkgs/importlib_metadata/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([importlib_metadata], [
++  SAGE_PYTHON_PACKAGE_CHECK([importlib_metadata])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 928ca0019e3ec6c4541a16b28bcc6710df6d010b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:44:28 -0500
+Subject: Trac #29665: add Gentoo package information for importlib_metadata.
+
+---
+ build/pkgs/importlib_metadata/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/importlib_metadata/distros/gentoo.txt
+
+diff --git a/build/pkgs/importlib_metadata/distros/gentoo.txt b/build/pkgs/importlib_metadata/distros/gentoo.txt
+new file mode 100644
+index 00000000..4f92786
+--- /dev/null
++++ b/build/pkgs/importlib_metadata/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/importlib_metadata
+-- 
+cgit v1.0-1-gd88e
+
+
+From 135f184f7498a2046065e669723e68efe2d65cee Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 21:16:58 -0500
+Subject: Trac #29665: fix sage.misc.package doctest with system alabaster.
+
+When alabaster from the system is used, these tests won't be able to
+find its SPKG installed. Add some ellipses, and switch one test to
+look for sage_conf instead.
+---
+ src/sage/misc/package.py | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/sage/misc/package.py b/src/sage/misc/package.py
+index 84f3d50..c7ad206 100644
+--- a/src/sage/misc/package.py
++++ b/src/sage/misc/package.py
+@@ -386,9 +386,9 @@ def installed_packages(exclude_pip=True):
+     EXAMPLES::
+ 
+         sage: sorted(installed_packages().keys())  # optional - build
+-        [...'alabaster', ...'sage_conf', ...]
+-        sage: installed_packages()['alabaster']  # optional - build, random
+-        '0.7.12'
++        [...'sage_conf', ...]
++        sage: installed_packages()['sage_conf']  # optional - build, random
++        '9.5'
+ 
+     .. SEEALSO::
+ 
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch b/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
new file mode 100644
index 000000000000..7ef3826aa4d2
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
@@ -0,0 +1,27 @@
+diff --git a/src/bin/sage-runtests b/src/bin/sage-runtests
+index 589dc8cd37..6bb8bf99a4 100755
+--- a/src/bin/sage-runtests
++++ b/src/bin/sage-runtests
+@@ -154,21 +154,4 @@ if __name__ == "__main__":
+     DC = DocTestController(args, args.filenames)
+     err = DC.run()
+ 
+-    try:
+-        exit_code_pytest = 0
+-        import pytest
+-        pytest_options = ["--import-mode", "importlib"]
+-        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.")
+-
+-    if err == 0:
+-        sys.exit(exit_code_pytest)
+-    else:
+-        sys.exit(err)
++    sys.exit(err)
diff --git a/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch b/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
new file mode 100644
index 000000000000..093e3d56eb33
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
@@ -0,0 +1,42 @@
+More site packages not included in trac 29665
+
+diff --git a/build/pkgs/gmpy2/spkg-configure.m4 b/build/pkgs/gmpy2/spkg-configure.m4
+new file mode 100644
+index 0000000000..2d0390f7db
+--- /dev/null
++++ b/build/pkgs/gmpy2/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([gmpy2], [SAGE_PYTHON_PACKAGE_CHECK([gmpy2])])
+diff --git a/build/pkgs/sphinx/spkg-configure.m4 b/build/pkgs/sphinx/spkg-configure.m4
+new file mode 100644
+index 0000000000..e149fbb2cf
+--- /dev/null
++++ b/build/pkgs/sphinx/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([sphinx], [SAGE_PYTHON_PACKAGE_CHECK([sphinx])])
+diff --git a/build/pkgs/typing_extensions/spkg-configure.m4 b/build/pkgs/typing_extensions/spkg-configure.m4
+new file mode 100644
+index 0000000000..d475fd8257
+--- /dev/null
++++ b/build/pkgs/typing_extensions/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([typing_extensions], [SAGE_PYTHON_PACKAGE_CHECK([typing_extensions])])
+-- 
+diff --git a/build/pkgs/gmpy2/install-requires.txt b/build/pkgs/gmpy2/install-requires.txt
+index 51d24518ef..c25feff557 100644
+--- a/build/pkgs/gmpy2/install-requires.txt
++++ b/build/pkgs/gmpy2/install-requires.txt
+@@ -1,3 +1 @@
+-# We would like to write gmpy2 >=2.1.0b5, but pipenv does not accept prereleases in version ranges
+-# https://github.com/pypa/pipenv/issues/1760
+-gmpy2 ==2.1.0rc1
++gmpy2 >=2.1
+diff --git a/build/pkgs/ptyprocess/install-requires.txt b/build/pkgs/ptyprocess/install-requires.txt
+index de89260872..7c336f636c 100644
+--- a/build/pkgs/ptyprocess/install-requires.txt
++++ b/build/pkgs/ptyprocess/install-requires.txt
+@@ -1,3 +1,3 @@
+-ptyprocess ==0.5.1
++ptyprocess
+ # https://trac.sagemath.org/ticket/31280#comment:42 and following
+ # sagelib is not compatible with ptyprocess 0.5.2, 0.6, and 0.7
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 33b40acbabeb..a32c5d18f378 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -22,11 +22,13 @@ distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
 checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
 python_version=3
 
-build_options="debug system_python3"
+build_options="debug system_python3 system_site_packages"
 desc_option_debug="Build with debug symbols"
 desc_option_system_python="Build using system python 3"
-build_options_default="system_python3"
+desc_option_system_python="Build using system python site-packages"
+build_options_default="system_python3 system_site_packages"
 configure_args+=" $(vopt_with system_python3)"
+configure_args+=" $(vopt_enable system_site_packages)"
 
 # path where sage will be installed
 _SAGE_ROOT=/usr/lib/sage-${version}
@@ -163,6 +165,8 @@ do_check() {
 	fi
 	if [ "$XBPS_CHECK_PKGS" = full ]; then
 		_test_args="--long $_test_args"
+	else
+		_test_args="--warn-long 5.0 $_test_args"
 	fi
 	# since make check will build the docs, run test like this instead
 	./sage -tp ${XBPS_MAKEJOBS} ${_test_args}
@@ -182,7 +186,7 @@ makedepends+=" automake gettext gettext-devel"
 # other host dependencies
 makedepends+=" cmake curl git ninja pandoc patch pkg-config python3 tox"
 
-# already in void
+# standard dependencies
 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
@@ -202,7 +206,49 @@ makedepends+="
  brial-devel cliquer-devel gfan libbraiding-devel libhomfly-devel
  lrcalc-devel nauty-devel palp tachyon
  maxima-ecl primesieve-devel primecount-devel
+ ffmpeg ImageMagick
 "
 
 # TODO: optional
 # 4ti2 coxeter3 libsemigroups lrslib pdf2svg perl_mongodb polymake
+
+# TODO: standard
+# cvxopt importlib_resources
+
+# python packages for trac-29665
+_sage_python3_modules="
+ python3-Babel python3-Jinja2 python3-MarkupSafe python3-Pillow
+ python3-Pygments python3-Sphinx python3-alabaster python3-argcomplete
+ python3-argon2 python3-attrs python3-backcall python3-beniget
+ python3-bleach python3-certifi python3-cffi python3-charset-normalizer
+ python3-cycler python3-dateutil python3-decorator python3-defusedxml
+ python3-docutils python3-entrypoints python3-flit_core python3-gast
+ python3-gmpy2 python3-html5lib python3-idna python3-imagesize
+ python3-importlib_metadata python3-ipython python3-ipython_genutils
+ python3-ipython_ipykernel python3-jedi python3-jsonschema
+ python3-jupyter_client python3-jupyter_core python3-jupyter_ipywidgets
+ python3-jupyter_nbconvert python3-jupyter_nbformat
+ python3-jupyter_notebook python3-jupyterlab_pygments python3-kiwisolver
+ python3-matplotlib python3-matplotlib-inline python3-mistune
+ python3-mpmath python3-nbclient python3-nest_asyncio python3-networkx
+ python3-numpy python3-packaging python3-pandocfilters python3-parsing
+ python3-parso python3-pexpect python3-pickleshare python3-pip
+ python3-pkgconfig python3-pluggy python3-ply python3-prometheus_client
+ python3-prompt_toolkit python3-ptyprocess python3-py python3-pybind11
+ python3-pycparser python3-pyrsistent python3-pytz python3-pyzmq
+ python3-requests python3-scipy python3-send2trash python3-setuptools
+ python3-setuptools_scm python3-simplegeneric python3-six
+ python3-snowballstemmer python3-sphinxcontrib-applehelp
+ python3-sphinxcontrib-devhelp python3-sphinxcontrib-htmlhelp
+ python3-sphinxcontrib-jsmath python3-sphinxcontrib-qthelp
+ python3-sphinxcontrib-serializinghtml python3-sympy python3-terminado
+ python3-testpath python3-texttable python3-toml python3-tomli
+ python3-tornado python3-traitlets python3-typing_extensions
+ python3-tzlocal python3-urllib3 python3-wcwidth python3-webencodings
+ python3-wheel python3-zipp pythran
+ "
+
+if [ "$build_option_system_site_packages" ]; then
+	makedepends+=" $_sage_python3_modules"
+	depends+=" $_sage_python3_modules"
+fi

From 9c55422571932af2ae46bb79dd0784b8b27e6d28 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 3 Jan 2022 20:47:52 -0300
Subject: [PATCH 24/30] sagemath: use small source tarball + upstream packages

---
 srcpkgs/sagemath/template | 97 ++++++++++++++++++++++++++-------------
 1 file changed, 64 insertions(+), 33 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index a32c5d18f378..0de0061b09df 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -18,8 +18,8 @@ short_desc="Open source mathematics software"
 maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
-distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
-checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
+distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
+checksum=aea4c5a8d3b32af2fba644269b9daf4f62471471ba2d7d83da0f8098a5f53225
 python_version=3
 
 build_options="debug system_python3 system_site_packages"
@@ -33,42 +33,72 @@ configure_args+=" $(vopt_enable system_site_packages)"
 # 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} ;;
-esac
+_SAGE_UPSTREAM_MIRROR=https://mirrors.mit.edu/sage/spkg/upstream
 
-# extra upstream packages (trac-32968 / trac-33040)
 _upstream="
- https://pypi.io/packages/source/s/sphinx/Sphinx-4.3.1.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
+${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
+${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
+${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
+${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
+${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
+${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
+${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
+https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
+https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
+http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
+${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
+${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
+${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
+${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
+${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
+https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
+${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
+https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
+${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
 "
 
 checksum+="
- 32a5b3e9a1b176cc25ed048557d4d3d01af635e6b76c5bc7a43b0a34447fbd45
-
- 9c87405839a19696e837b3b818fed3f5f69f16f1eec1a1ad77e043dcea9c772f
- fc4453705b81d03568d5b808ad8f09c77c47534f6ac2e72e733f9ca4714aa75c
- acad2d8b20a1af07d4e4c9d2e9285c5ed9104354062f275f3fcd88dcef4f1326
- 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
- 78884e7c1d4b00ce3cea67b44566851c4343c120abd683433ce934a68ea58872
- 0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86
- b8e2f83c56e141920c39464b852de3719dfbfb6e3c99a2d8da0edf4fb33176ed
- d9bdec0013ef1eb5a84ab39a3b3868911598afa494f5faa038647101504e2b81
- b2e9810e09c3a47b73ce9cab5a72243a1258f61e7900969097a817232246ce1c
- 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
- 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
+c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
+d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
+4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
+3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
+03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
+5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
+cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
+5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
+581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
+6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
+07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
+a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
+ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
+d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
+169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
+5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
+cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
+471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
+78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
+edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
+b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
+3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
+545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
+cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
+718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
+dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
 "
 
 for u in ${_upstream}; do
@@ -101,6 +131,7 @@ post_extract() {
 	mv -T $wrksrc $_SAGE_ROOT
 	ln -srfT $_SAGE_ROOT $wrksrc
 
+	mkdir -p $wrksrc/upstream
 	for u in ${_upstream}; do
 		cp "$XBPS_SRCDISTDIR/${pkgname}-${version}/${u##*[/>]}" $wrksrc/upstream
 	done

From 7fea01823e6ed5f35323e86d912c26560e8ea481 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 13:38:02 -0300
Subject: [PATCH 25/30] sagemath: for CI use fixed random-seed=0

---
 srcpkgs/sagemath/template | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 0de0061b09df..b5b99d2c122d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -194,6 +194,10 @@ do_check() {
 	if [ -z "$_test_args" ]; then
 		_test_args=--all
 	fi
+	if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
+		# for CI use a predictable random seed
+		_test_args="--random-seed=0 $_test_args"
+	fi
 	if [ "$XBPS_CHECK_PKGS" = full ]; then
 		_test_args="--long $_test_args"
 	else

From de85f38fc5424357c6fe3dfeae6a8553494b1623 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Wed, 5 Jan 2022 16:51:00 -0300
Subject: [PATCH 26/30] maxima: fix #34849 and #34861

 - patch maxima-sbcl so it uses gmp for arithmetic (closes #34849)
   also add libgmp to shlib_requires since it won't be detected
 - remove `nopie=yes` to fix #34861, replace by `nopie_files`
 - remove `nostrip=yes`, replace by `nostrip_files`
 - add checks for #34849 and #34861
 - run testsuite only for full check (not in CI)
 - some html and info files are shipped with source: do not rebuild
---
 .../maxima/patches/maxima-sbcl-with-gmp.patch | 19 +++++++
 srcpkgs/maxima/template                       | 52 ++++++++++++++++---
 2 files changed, 63 insertions(+), 8 deletions(-)
 create mode 100644 srcpkgs/maxima/patches/maxima-sbcl-with-gmp.patch

diff --git a/srcpkgs/maxima/patches/maxima-sbcl-with-gmp.patch b/srcpkgs/maxima/patches/maxima-sbcl-with-gmp.patch
new file mode 100644
index 000000000000..074631ea2ba0
--- /dev/null
+++ b/srcpkgs/maxima/patches/maxima-sbcl-with-gmp.patch
@@ -0,0 +1,19 @@
+Patch maxima initialization for sbcl so it uses gmp for arithmetic
+
+
+--- a/src/init-cl.lisp	2021-05-15 20:20:53.000000000 -0300
++++ b/src/init-cl.lisp	2022-01-04 17:45:03.838273626 -0300
+@@ -574,8 +574,13 @@
+ 			 (delete-file file)))))
+ 	   *temp-files-list*))
+ 
++#+sbcl
++(eval-when (:compile-toplevel :load-toplevel :execute)
++  (require 'sb-gmp))
++
+ (defun cl-user::run ()
+   "Run Maxima in its own package."
++  #+sbcl (sb-gmp:install-gmp-funs)
+   (in-package :maxima)
+   (initialize-runtime-globals)
+   (let ((input-stream *standard-input*)
diff --git a/srcpkgs/maxima/template b/srcpkgs/maxima/template
index 1a4bec0dba18..69af367ca11d 100644
--- a/srcpkgs/maxima/template
+++ b/srcpkgs/maxima/template
@@ -1,7 +1,7 @@
 # Template file for 'maxima'
 pkgname=maxima
 version=5.45.1
-revision=2
+revision=3
 build_style=gnu-configure
 configure_args="$(vopt_enable clisp) $(vopt_enable sbcl sbcl-exec) $(vopt_enable ecl)"
 hostmakedepends="python3 perl emacs texinfo patchelf"
@@ -15,8 +15,15 @@ homepage="http://maxima.sourceforge.net"
 distfiles="${SOURCEFORGE_SITE}/maxima/maxima-${version}.tar.gz"
 checksum=fe9016276970bef214a1a244348558644514d7fdfaa4fc8b9d0e87afcbb4e7dc
 
-nostrip=yes
-nopie=yes
+# maxima-sbcl is nopie and should NOT be stripped or it won't work
+nostrip_files=/usr/lib/maxima/$version/binary-sbcl/maxima
+nopie_files=/usr/lib/maxima/$version/binary-sbcl/maxima
+
+if [ "$build_option_sbcl" ]; then
+	# binary-sbcl/maxima uses libgmp but this won't show up in objdump
+	shlib_requires=libgmp.so.10
+fi
+
 build_options="clisp sbcl ecl"
 desc_option_clisp="Build with CLISP"
 desc_option_sbcl="Build with SBCL"
@@ -24,6 +31,14 @@ desc_option_ecl="Build with ECL"
 build_options_default="sbcl ecl"
 vopt_conflict clisp sbcl
 
+post_configure() {
+	# do not rebuild these files if they exist
+	touch -c doc/info/*.html
+	touch -c doc/info/maxima.info*
+	touch -c doc/info/maxima_toc.html
+	touch -c interfaces/xmaxima/doc/xmaxima.html
+}
+
 post_build() {
 	if [ "$build_option_ecl" ]; then
 		# everything will go in the same directory, use rpath=$ORIGIN
@@ -38,13 +53,34 @@ post_build() {
 
 do_check() {
 	if [ "$build_option_ecl" ]; then
-		echo "Check that maxima.fas works"
-		ecl --eval "(require 'maxima \"src/binary-ecl/maxima.fas\")" \
-			--eval "(quit)"
+		echo "maxima-ecl: check that maxima.fas works (#34273)"
+		ecl --eval '(require :maxima "src/binary-ecl/maxima.fas")' \
+		    --eval '(quit)'
+		echo PASS
+		echo "maxima-ecl: check that unlimited heap-size works (#34861)"
+		./maxima-local -q -l ecl --batch-string=":lisp \
+			(ext:set-limit 'ext:heap-size 0)
+			showtime : true $
+			a : 10^(10^5) $
+			b : a^600 $
+			c : a^600 $
+			"
+		echo PASS
+	fi
+	if [ "$build_option_sbcl" ]; then
+		echo "maxima-sbcl: check that long arithmetic is fast (#34849)"
+		timeout -v 30s ./maxima-local -q -l sbcl --batch-string="
+			showtime : true $
+			a : 10^(10^5) $
+			b : a^1000 $
+			"
+		echo PASS
 	fi
 
-	# now run the testsuite
-	make ${makejobs} check
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		# run the testsuite for all versions enabled
+		make ${makejobs} check
+	fi
 }
 
 post_install() {

From f56646a1aaa1cefead9802ea2228464adc2b3aac Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 14:40:27 -0300
Subject: [PATCH 27/30] sagemath: upstream two patches

---
 ...ble-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch} |  6 +++---
 ...rse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch} | 10 +++++-----
 2 files changed, 8 insertions(+), 8 deletions(-)
 rename srcpkgs/sagemath/patches/{0001-sage-site-exec-only-if-it-is-executable.patch => trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch} (94%)
 rename srcpkgs/sagemath/patches/{0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch => trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch} (81%)

diff --git a/srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch b/srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
similarity index 94%
rename from srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch
rename to srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
index ce17c6d6e954..7fdb3d697222 100644
--- a/srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch
+++ b/srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
@@ -1,14 +1,14 @@
 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
+Subject: 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
+index 4c0fa17..153e610 100755
 --- a/src/bin/sage
 +++ b/src/bin/sage
 @@ -129,7 +129,7 @@ usage() {
@@ -39,5 +39,5 @@ index 4c0fa17426..153e610a2e 100755
              # fallthrough if there is no sage-site script
          fi
 -- 
-2.34.1
+cgit v1.0-1-gd88e
 
diff --git a/srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch b/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
similarity index 81%
rename from srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch
rename to srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
index bab6d8441d42..350c41ac3928 100644
--- a/srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch
+++ b/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
@@ -1,16 +1,16 @@
-From 57e3eba28c9b4ee6bd3407d0715b8bd00aaf04a7 Mon Sep 17 00:00:00 2001
+From 53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6 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
+Subject: sagetex: Fix a warning when byte-compiling sagetexparse.py
 
 ---
- .../sagetex/patches/sagetex-fix-warning.patch    | 16 ++++++++++++++++
+ build/pkgs/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
+index 00000000..d82ab67
 --- /dev/null
 +++ b/build/pkgs/sagetex/patches/sagetex-fix-warning.patch
 @@ -0,0 +1,16 @@
@@ -31,5 +31,5 @@ index 0000000000..d82ab675dd
 +     self.result += t.code[1:-1] + '\n\n'
 + 
 -- 
-2.34.1
+cgit v1.0-1-gd88e
 

From 604418d1ec4bf4d3f37fcae5c315847e96cb93ec Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 19:57:59 -0300
Subject: [PATCH 28/30] sagemath: reorder upstream sources and add two missing
 ones

---
 srcpkgs/sagemath/template | 60 ++++++++++++++++++++++-----------------
 1 file changed, 34 insertions(+), 26 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index b5b99d2c122d..f53cba947c88 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -36,69 +36,77 @@ _SAGE_ROOT=/usr/lib/sage-${version}
 _SAGE_UPSTREAM_MIRROR=https://mirrors.mit.edu/sage/spkg/upstream
 
 _upstream="
-${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
 ${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
 ${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
+
+${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
 ${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
 ${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
 ${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
 ${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
 ${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
 ${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
-https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
-https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
-http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
 ${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
 ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
 ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
 ${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
 ${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${PYPI_SITE}/P/PyCygwin/PyCygwin-0.1.tar.gz
 ${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
-https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+${PYPI_SITE}/s/setuptools/setuptools-59.2.0.tar.gz
 ${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
 ${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
-https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
 ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
+
+https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
+https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
+http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
+https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
 "
 
 checksum+="
-dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
 c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
 d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
+5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
+ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
+169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
+cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
+edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
+cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
+
+dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
 3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
 03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
 5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
 cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
-5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
-c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
-6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
-07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
 a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
-ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
 d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
-169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
 5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
-cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
 471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
 78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
-edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+45a5e295590c469a49b2804bfdb89059e942d768ad3b813f484d7b5bff48d226
 ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
-b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
-3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+157d21de9d055ab9e8ea3186d91e7f4f865e11f42deafa952d90842671fc2576
 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
 545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
-cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
-718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
 dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
+
+c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
+6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
+07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
+3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
 "
 
 for u in ${_upstream}; do

From ebca76f02a113ce939f531b32fbcf254d78944d9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 9 Jan 2022 12:45:47 -0300
Subject: [PATCH 29/30] sagemath: do not download anything patch

---
 .../patches/00-Do_not_download_anything.patch         | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 srcpkgs/sagemath/patches/00-Do_not_download_anything.patch

diff --git a/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch b/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch
new file mode 100644
index 000000000000..35aef7b8d456
--- /dev/null
+++ b/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch
@@ -0,0 +1,11 @@
+--- a/build/sage_bootstrap/tarball.py	2022-01-07 19:17:06.754747955 -0300
++++ b/build/sage_bootstrap/tarball.py	2022-01-07 19:25:31.844139381 -0300
+@@ -158,6 +158,8 @@
+                             .format(destination=destination))
+         successful_download = False
+         log.info('Attempting to download package {0} from mirrors'.format(self.filename))
++        log.info('ERROR: downloading is disabled, add file to template instead')
++        return
+         for mirror in MirrorList():
+             url = mirror + '/'.join(['spkg', 'upstream', self.package.name, self.filename])
+             log.info(url)

From 633f05aa538909a499fc0ab245227a125bb85e31 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 9 Jan 2022 13:27:49 -0300
Subject: [PATCH 30/30] sagemath: update to 9.5.rc0.

---
 ...184f7498a2046065e669723e68efe2d65cee.patch |    6 +-
 ...1d4ced4264f65ab704f725f6f5879b012796.patch |  263 ----
 ...a54526829b79d5d236a40f83ddc6ce7b2696.patch | 1196 -----------------
 ...9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch |   27 -
 ...3f4f32246ad9ded6d37f1f2f12a589a81f4.patch} |    4 +-
 ...03138d0403be7c7cb303de2bc0a0e0b6793c.patch |   82 --
 ...f3a1611fed0cc66fb838eb85739646dd34d.patch} |   94 +-
 ...49c415e11d0522bff9013bc1509264b26ebf.patch |   27 +
 ...ip_doctest_singular_4.2.1--see_33134.patch |   13 +
 srcpkgs/sagemath/template                     |    6 +-
 10 files changed, 72 insertions(+), 1646 deletions(-)
 delete mode 100644 srcpkgs/sagemath/patches/trac-30766-system_python_3.10-df9f1d4ced4264f65ab704f725f6f5879b012796.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
 rename srcpkgs/sagemath/patches/{trac-33064-sage_docbuild_ignore_cache_save_permission_error-f767cf1eadfd8ab540a31c5c5ef09d56df09b90e.patch => trac-33064-sage_docbuild_ignore_cache_save_permission_error-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch} (92%)
 delete mode 100644 srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
 rename srcpkgs/sagemath/patches/{trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch => trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch} (63%)
 create mode 100644 srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch

diff --git a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
index b641113927e7..0ecb27c593cd 100644
--- a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
+++ b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
@@ -5615,9 +5615,9 @@ index 84f3d50..c7ad206 100644
      EXAMPLES::
  
          sage: sorted(installed_packages().keys())  # optional - build
--        [...'alabaster', ...'sage_conf', ...]
--        sage: installed_packages()['alabaster']  # optional - build, random
--        '0.7.12'
+-        [...'gmpy2', ...'sage_conf', ...]
+-        sage: installed_packages()['gmpy2']  # optional - build, random
+-        '2.1.0b5'
 +        [...'sage_conf', ...]
 +        sage: installed_packages()['sage_conf']  # optional - build, random
 +        '9.5'
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
deleted file mode 100644
index a1cb4c834482..000000000000
--- a/srcpkgs/sagemath/patches/trac-30766-system_python_3.10-df9f1d4ced4264f65ab704f725f6f5879b012796.patch
+++ /dev/null
@@ -1,263 +0,0 @@
-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-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch b/srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
deleted file mode 100644
index 3ae6fe01822d..000000000000
--- a/srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
+++ /dev/null
@@ -1,1196 +0,0 @@
-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/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch b/srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
deleted file mode 100644
index 485fb0176f45..000000000000
--- a/srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-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: 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 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"
- 
- # 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)
--- 
-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-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
similarity index 92%
rename from srcpkgs/sagemath/patches/trac-33064-sage_docbuild_ignore_cache_save_permission_error-f767cf1eadfd8ab540a31c5c5ef09d56df09b90e.patch
rename to srcpkgs/sagemath/patches/trac-33064-sage_docbuild_ignore_cache_save_permission_error-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
index 20fa12e570eb..04f04cfd6718 100644
--- 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-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
@@ -1,4 +1,4 @@
-From f767cf1eadfd8ab540a31c5c5ef09d56df09b90e Mon Sep 17 00:00:00 2001
+From e89193f4f32246ad9ded6d37f1f2f12a589a81f4 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
@@ -8,7 +8,7 @@ Subject: sage_docbuild: do not fail when cache cannot be saved
  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
+index 466ca82..f8c8ebd 100644
 --- a/src/sage_docbuild/__init__.py
 +++ b/src/sage_docbuild/__init__.py
 @@ -856,9 +856,12 @@ class ReferenceSubBuilder(DocBuilder):
diff --git a/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch b/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
deleted file mode 100644
index 6bc5193b75ee..000000000000
--- a/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-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
-
-
-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/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch b/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
similarity index 63%
rename from srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch
rename to srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
index 3794aa7f019b..04fca4815a00 100644
--- a/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch
+++ b/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
@@ -1,4 +1,4 @@
-From 7d3381b21e4716cfa8a33915621a12f0eba74233 Mon Sep 17 00:00:00 2001
+From 18d0477153af6f453a0e84f78030535f6a36ce87 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
@@ -10,56 +10,56 @@ Subject: doctests: remove dochtml label from some tests that don't need docs
  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
+index c788623..527ed90 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  # optional - sagemath_doc_html
+-        sage: thematic_index = os.path.join(SAGE_DOC, "html", "en", "thematic_tutorials", "index.html")  # optional - sagemath_doc_html
 +        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
+         sage: for line in open(thematic_index).readlines():  # optional - sagemath_doc_html
          ....:     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
+index 4c56aea..583ca06 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  # optional - sagemath_doc_html
+-    sage: docfilename = os.path.join(SAGE_DOC, 'html', 'en', 'reference', 'calculus', 'sage', 'symbolic', 'expression.html')  # optional - sagemath_doc_html
 +    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
+     sage: with open(docfilename) as fobj:  # optional - sagemath_doc_html
      ....:     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='',
+@@ -845,12 +845,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  # optional - sagemath_doc_html
+-        sage: len(_search_src_or_doc('src', r'matrix\(', 'incidence_structures', 'self', 'combinat', interact=False).splitlines()) > 1  # optional - sagemath_doc_html
 +        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)
+         sage: 'abvar/homology' in _search_src_or_doc('doc', 'homology', 'variety', interact=False)  # optional - sagemath_doc_html, 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)  # optional - sagemath_doc_html
 +        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:
+@@ -1369,7 +1369,7 @@ class _sage_doc:
  
-         sage: browse_sage_doc._open("reference", testing=True)[0]  # optional - dochtml, indirect doctest
+         sage: browse_sage_doc._open("reference", testing=True)[0]  # optional - sagemath_doc_html, 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]  # optional - sagemath_doc_html
 +        sage: browse_sage_doc(identity_matrix, 'rst')[-107:-47]
          'Full MatrixSpace of 3 by 3 sparse matrices over Integer Ring'
      """
@@ -68,7 +68,7 @@ index eb70516..b4848ed 100644
 cgit v1.0-1-gd88e
 
 
-From 42a76c3f82edecc9c6c53c661251677e3e907584 Mon Sep 17 00:00:00 2001
+From 88dd9f3a1611fed0cc66fb838eb85739646dd34d 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
@@ -78,7 +78,7 @@ Subject: doctests: add dochtml label to some tests that need docs installed
  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
+index f8c8ebd..d329009 100644
 --- a/src/sage_docbuild/__init__.py
 +++ b/src/sage_docbuild/__init__.py
 @@ -105,7 +105,7 @@ def builder_helper(type):
@@ -86,7 +86,7 @@ index 4a71c91..dd233bd 100644
          sage: from sage_docbuild import _build_many as build_many
          sage: helper = builder_helper("html")
 -        sage: try:
-+        sage: try:  # optional - dochtml
++        sage: try:  # optional - sagemath_doc_html
          ....:     build_many(build_ref_doc, [("docname", "en", "html", {})])
          ....: except Exception as E:
          ....:     "Non-exception during docbuild: abort pool operation" in str(E)
@@ -95,7 +95,7 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import DocBuilder
              sage: b = DocBuilder('tutorial')
 -            sage: b._output_dir('html')
-+            sage: b._output_dir('html')         # optional - dochtml
++            sage: b._output_dir('html')         # optional - sagemath_doc_html
              '.../html/en/tutorial'
          """
          d = os.path.join(SAGE_DOC, type, self.lang, self.name)
@@ -104,7 +104,7 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import DocBuilder
              sage: b = DocBuilder('tutorial')
 -            sage: b._doctrees_dir()
-+            sage: b._doctrees_dir()             # optional - docthml
++            sage: b._doctrees_dir()             # optional - sagemath_doc_html
              '.../doctrees/en/tutorial'
          """
          d = os.path.join(SAGE_DOC, 'doctrees', self.lang, self.name)
@@ -113,7 +113,7 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import ReferenceBuilder
              sage: b = ReferenceBuilder('reference')
 -            sage: b._output_dir('html')
-+            sage: b._output_dir('html')         # optional - dochtml
++            sage: b._output_dir('html')         # optional - sagemath_doc_html
              '.../html/en/reference'
          """
          if lang is None:
@@ -122,56 +122,10 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import ReferenceTopBuilder
              sage: b = ReferenceTopBuilder('reference')
 -            sage: b._output_dir('html')
-+            sage: b._output_dir('html')         # optional - dochtml
++            sage: b._output_dir('html')         # optional - sagemath_doc_html
              '.../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/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch b/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
new file mode 100644
index 000000000000..d32f1e4d5e9f
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
@@ -0,0 +1,27 @@
+From 836249c415e11d0522bff9013bc1509264b26ebf Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Sun, 9 Jan 2022 16:51:22 -0300
+Subject: trac 33135: add filter to ignore deprecation warnings
+
+---
+ src/sage/all.py | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/sage/all.py b/src/sage/all.py
+index 01ef327..19ca3d4 100644
+--- a/src/sage/all.py
++++ b/src/sage/all.py
+@@ -96,6 +96,10 @@ warnings.filterwarnings('ignore', category=DeprecationWarning,
+ warnings.filterwarnings('ignore', category=DeprecationWarning,
+                         module='pythran')
+ 
++warnings.filterwarnings('ignore', category=DeprecationWarning,
++                        message='The distutils(.sysconfig module| package) is deprecated',
++                        module='numpy|sage.env|sage.features')
++
+ ################ end setup warnings ###############################
+ 
+ 
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
new file mode 100644
index 000000000000..438078a92036
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage/rings/polynomial/hilbert.pyx b/src/sage/rings/polynomial/hilbert.pyx
+index 4cd91d0a46..323b168c4e 100644
+--- a/src/sage/rings/polynomial/hilbert.pyx
++++ b/src/sage/rings/polynomial/hilbert.pyx
+@@ -578,7 +578,7 @@ def hilbert_poincare_series(I, grading=None):
+ 
+     This example exceeded the capabilities of Singular before version 4.2.1p2::
+ 
+-        sage: J.hilbert_numerator(algorithm='singular')
++        sage: J.hilbert_numerator(algorithm='singular')   # not tested - requires singular 4.2.1p2
+         120*t^33 - 3465*t^32 + 48180*t^31 - 429374*t^30 + 2753520*t^29 - 13522410*t^28 + 52832780*t^27 - 168384150*t^26 + 445188744*t^25 - 987193350*t^24 + 1847488500*t^23 + 1372406746*t^22 - 403422496*t^21 - 8403314*t^20 - 471656596*t^19 + 1806623746*t^18 + 752776200*t^17 + 752776200*t^16 - 1580830020*t^15 + 1673936550*t^14 - 1294246800*t^13 + 786893250*t^12 - 382391100*t^11 + 146679390*t^10 - 42299400*t^9 + 7837830*t^8 - 172260*t^7 - 468930*t^6 + 183744*t^5 - 39270*t^4 + 5060*t^3 - 330*t^2 + 1
+ 
+     """
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f53cba947c88..f688629fc26d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -1,6 +1,6 @@
 # Template file for 'sagemath'
 pkgname=sagemath
-version=9.5.beta9
+version=9.5.rc0
 revision=1
 wrksrc=sage-$version
 build_style=configure
@@ -19,7 +19,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
-checksum=aea4c5a8d3b32af2fba644269b9daf4f62471471ba2d7d83da0f8098a5f53225
+checksum=8012e3ac35290fa9b2cb837eeca149925784c2378b486731226944e4afd8a4e6
 python_version=3
 
 build_options="debug system_python3 system_site_packages"
@@ -128,7 +128,7 @@ nostrip=yes
 noshlibprovides=yes
 
 # don't rewrite python shebang as sage uses its own python (for now)
-_no_python_shebang=yes
+#_no_python_shebang=yes
 
 # compile python code in sage venv
 pycompile_dirs="$_SAGE_ROOT/venv/"

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.rc0
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (177 preceding siblings ...)
  2022-01-10  3:22 ` tornaria
@ 2022-01-11 13:00 ` dkwo
  2022-01-11 13:39 ` tornaria
                   ` (69 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2022-01-11 13:00 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1009941448

Comment:
@tornaria It looks they're preparing for singular 4.3.0 on github, so I'll try to update it soon, as well as try something for gap.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.rc0
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (178 preceding siblings ...)
  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
                   ` (68 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-11 13:39 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1009973422

Comment:
I have gap working, now trying to make sage use it.

Saludos,
Gonzalo

On Tue, Jan 11, 2022, 10:00 dkwo ***@***.***> wrote:

> @tornaria <https://github.com/tornaria> It looks they're preparing for
> singular 4.3.0 on github, so I'll try to update it soon, as well as try
> something for gap.
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/void-linux/void-packages/pull/34030#issuecomment-1009941448>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAMCC25R24AJDORIYBTKEQTUVQSXPANCNFSM5H2R2OIA>
> .
> Triage notifications on the go with GitHub Mobile for iOS
> <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
> or Android
> <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
>
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>


^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.rc0
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (179 preceding siblings ...)
  2022-01-11 13:39 ` tornaria
@ 2022-01-11 14:39 ` tornaria
  2022-01-12 23:43 ` [PR PATCH] [Updated] " tornaria
                   ` (67 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-11 14:39 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1009973422

Comment:
> It looks they're preparing for singular 4.3.0 on github, so I'll try to update it soon, as well as try
> something for gap.
I have gap working (see #34995), I'm now trying to make sage use it.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: sagemath-9.5.rc0
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (180 preceding siblings ...)
  2022-01-11 14:39 ` tornaria
@ 2022-01-12 23:43 ` tornaria
  2022-01-12 23:47 ` tornaria
                   ` (66 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-12 23:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 627 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.rc0
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: 607207 bytes --]

From 964f7cc73a6b1e670745e1f25184363e0220b6ce 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/32] 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 c01a730bdfadd0f13ebeac8dfaf754be38407dbf 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/32] 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 b4d69ec8010b59ca7fc0babd20bc06accbaad6fc 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/32] 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 3256617cb4bd185bb09ee3e08609a7ddc1a519d1 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/32] 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 ca327d5de85638ebf0a180088d3d2e50f3ce42d4 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/32] 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 08883c805dbb31f2bbc7dc8db2b18bcdf7db5758 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/32] 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 fc7a49e60bf48f5ec46c8f821d71b33d32baf61c 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/32] 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 c26faa61b649a702e2e4bbc7c520be1b5e0c4764 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/32] 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 a6354c57d6613afa1f481ea58aa4d6f6ebba2052 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/32] 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 aa3b8c89a7be02031dc2689f58428a5d5760b204 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/32] 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 39a48a614c22078299bd6fd4d08bae8817c55f81 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/32] 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 22e7e728c02b3ad5472406c6b9c105f041105910 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/32] 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 0b5934cb9f1851a5cfb942db4b968ecdc1785989 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/32] 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 ee4e2cfead3168dba491d5a035c576c3665c9d32 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/32] 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 9157b4b9c72a7d72ba4073601de6e1b9773bedf2 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/32] 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 61159641b73a050ff1e1b7385a960dfa221c988b 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/32] 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 f436adc41d77f196ac460efaa044b4cc4b4cfd8d 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/32] 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 3d31425b573e5de1f5506e7738e946a3bc7e4ee0 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/32] 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 c24b6b8ce52c08236f7f11fcb2b95d52b1534c98 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/32] 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

From de9c2348d51a771eb4745304120e25ccc21ce647 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 27 Dec 2021 20:19:19 -0300
Subject: [PATCH 20/32] sagemath: fix license and tests

Now tests can be run with -Q (normal) or -K (--long)
---
 srcpkgs/sagemath/template | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index c5009269c7fc..33b40acbabeb 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -16,7 +16,7 @@ depends="giac git FlintQS zn_poly sympow
  "
 short_desc="Open source mathematics software"
 maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
-license="GPL-3.0-or-later"
+license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
 checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
@@ -155,15 +155,17 @@ do_install() {
 }
 
 do_check() {
-	TEST=--all
 	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
-		TEST="$(sed -e 's/#.*//' ${XBPS_DISTDIR}/sagemath-check)"
+		_test_args=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	fi
+	if [ -z "$_test_args" ]; then
+		_test_args=--all
+	fi
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args="--long $_test_args"
 	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} ${OPT} ${TEST}
-	#./sage -t ${OPT} ${TEST}
+	./sage -tp ${XBPS_MAKEJOBS} ${_test_args}
 }
 
 ### copied from sage-deps, to be kept in sync

From 118b34ff455ab7142674c24829f97fac85bf1b2c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 28 Dec 2021 23:08:17 -0300
Subject: [PATCH 21/32] sagemath: fix long time test

---
 .../patches/zzz-fix_long_time_test--see_33091.patch | 13 +++++++++++++
 ...=> zzz-skip_doctest_giac-1.7.0--see_31563.patch} |  0
 2 files changed, 13 insertions(+)
 create mode 100644 srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
 rename srcpkgs/sagemath/patches/{skip-doctest-giac-1.7.0--see-trac-31563.patch => zzz-skip_doctest_giac-1.7.0--see_31563.patch} (100%)

diff --git a/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch b/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
new file mode 100644
index 000000000000..ca360dee9f6e
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage/matrix/matrix2.pyx b/src/sage/matrix/matrix2.pyx
+index 7d319bd54b..c1a2eed6f1 100644
+--- a/src/sage/matrix/matrix2.pyx
++++ b/src/sage/matrix/matrix2.pyx
+@@ -17215,7 +17215,7 @@ cdef class Matrix(Matrix1):
+ 
+             sage: set_random_seed()
+             sage: K = random_cone(max_ambient_dim=5)
+-            sage: all(L.change_ring(SR).is_Z_operator_on(K)
++            sage: all(L.change_ring(SR).is_Z_operator_on(K) # long time
+             ....:     for L in K.Z_operators_gens())  # long time
+             True
+ 
diff --git a/srcpkgs/sagemath/patches/skip-doctest-giac-1.7.0--see-trac-31563.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_31563.patch
similarity index 100%
rename from srcpkgs/sagemath/patches/skip-doctest-giac-1.7.0--see-trac-31563.patch
rename to srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_31563.patch

From 1cddea24c476dd276cf30939df6ac13ef6a2f53a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 31 Dec 2021 13:52:34 -0300
Subject: [PATCH 22/32] python3-Sphinx: update to 4.3.2.

---
 srcpkgs/python3-Sphinx/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/python3-Sphinx/template b/srcpkgs/python3-Sphinx/template
index 8b0493c1f92c..29f892d16157 100644
--- a/srcpkgs/python3-Sphinx/template
+++ b/srcpkgs/python3-Sphinx/template
@@ -1,6 +1,6 @@
 # Template file for 'python3-Sphinx'
 pkgname=python3-Sphinx
-version=4.2.0
+version=4.3.2
 revision=1
 wrksrc=Sphinx-${version}
 build_style=python3-module
@@ -17,8 +17,9 @@ short_desc="Python 3 documentation generator"
 maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
 license="BSD-3-Clause"
 homepage="http://sphinx-doc.org"
+changelog="https://www.sphinx-doc.org/en/master/changes.html"
 distfiles="${PYPI_SITE}/S/Sphinx/Sphinx-${version}.tar.gz"
-checksum=94078db9184491e15bce0a56d9186e0aec95f16ac20b12d00e06d4e36f1058a6
+checksum=0a8836751a68306b3fe97ecbe44db786f8479c3bf4b80e3a7f5c838657b4698c
 conflicts="python-Sphinx>=0"
 
 post_install() {

From 53f6a896b2d1fb7f088e5b6ff93104b6966b99d3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 28 Dec 2021 23:08:17 -0300
Subject: [PATCH 23/32] sagemath: use system python site-packages

 - patch from #29665 for that
 - patch on top of that to allow a few more python packages:
   gmpy2, sphinx, typing_extensions, ptyprocess
 - add all available python packages to makedepends and depends
 - add ffmpeg and ImageMagick to makedepends
 - in standard check (-Q) warn if individual test > 5.0s
---
 ...184f7498a2046065e669723e68efe2d65cee.patch | 5629 +++++++++++++++++
 .../zzz-dont_run_pytest--see_31924.patch      |   27 +
 .../zzz-more_site_packages_not_in_29665.patch |   42 +
 srcpkgs/sagemath/template                     |   52 +-
 4 files changed, 5747 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch

diff --git a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
new file mode 100644
index 000000000000..b641113927e7
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
@@ -0,0 +1,5629 @@
+From 05fcaabe95082f42ba134780d579390d7b6153e2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 19:30:58 -0400
+Subject: Trac #29665: add --enable-system-site-packages option to ./configure.
+
+This new option is experimental and disabled by default. When it is
+enabled, the string "--system-site-packages" is appended to a new
+environment variable SAGE_VENV_FLAGS that is then passed to the
+sage-venv command during the build using autoconf substitution.
+Thusly the correct setting finds its way into local/pyvenv.cfg.
+---
+ build/make/Makefile.in |  2 +-
+ configure.ac           | 11 +++++++++++
+ 2 files changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/build/make/Makefile.in b/build/make/Makefile.in
+index f870cc3..68627ab 100644
+--- a/build/make/Makefile.in
++++ b/build/make/Makefile.in
+@@ -211,7 +211,7 @@ endif
+ inst_python3_venv = $(SAGE_VENV)/pyvenv.cfg
+ 
+ $(inst_python3_venv):
+-	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv "$(SAGE_VENV)"
++	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv @SAGE_VENV_FLAGS@ "$(SAGE_VENV)"
+ endif
+ 
+ # Build everything and start Sage.
+diff --git a/configure.ac b/configure.ac
+index 351f487..db30a91 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -435,6 +435,17 @@ AC_ARG_ENABLE([download-from-upstream-url],
+   [AS_HELP_STRING([--enable-download-from-upstream-url],
+     [allow downloading packages from their upstream URL if they cannot be found on the Sage mirrors])])
+ 
++AC_ARG_ENABLE(
++  [system-site-packages], [AS_HELP_STRING(
++    [--enable-system-site-packages],
++    [allow sage to use python packages from the system (experimental; default: no)]
++  )], [
++  AS_IF([test "x$enable_system_site_packages" = "xyes"], [
++    SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
++  ])
++])
++AC_SUBST([SAGE_VENV_FLAGS])
++
+ SAGE_SPKG_OPTIONS=""
+ AS_IF([test "x$enable_experimental_packages" = "xyes"], [
+   AS_VAR_APPEND([SAGE_SPKG_OPTIONS], [" -y"])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9372d1f663edf4e89f9c186336815ca04cff59dc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 19:41:14 -0400
+Subject: Trac #29665: new SAGE_PYTHON_PACKAGE_CHECK() autoconf macro.
+
+This new macro encapsulates the check for system installations of
+python packages. It uses setuptools.version's pkg_resources to
+check if the contents of install-requires.txt are satisfied for
+the given package; and if not, tells the build system to install
+the SPKG instead.
+---
+ m4/sage_python_package_check.m4 | 49 +++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 49 insertions(+)
+ create mode 100644 m4/sage_python_package_check.m4
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+new file mode 100644
+index 00000000..77b0a0c
+--- /dev/null
++++ b/m4/sage_python_package_check.m4
+@@ -0,0 +1,49 @@
++#
++# SYNOPSIS
++#
++#   SAGE_PYTHON_PACKAGE_CHECK(package)
++#
++# DESCRIPTION
++#
++#   Determine if the system copy of a python package can be used by sage.
++#
++#   This macro uses setuptools.version's pkg_resources to check that the
++#   "install-requires.txt" file for the named package is satisfied, and
++#   it can typically fail in four ways:
++#
++#     1. If --enable-system-site-packages was not passed to ./configure,
++#
++#     2. If we are not using the system python (no $PYTHON_FOR_VENV),
++#
++#     3. If setuptools is not available to the system python,
++#
++#     4. If the contents of install-requires.txt are not met (wrong
++#        version, no version, etc.) by the system python.
++#
++#   In any of those cases, we set sage_spkg_install_$package to "yes"
++#   so that the corresponding SPKG is installed. Otherwise, we do
++#   nothing, since the default value of sage_spkg_install_$package
++#   is "no" (to use the system copy).
++#
++#   The SAGE_SPKG_CONFIGURE_PYTHON3() macro is AC_REQUIRE'd to ensure
++#   that $PYTHON_FOR_VENV is available, if it is going to be available.
++#
++
++AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
++  AS_IF([test "${enable_system_site_packages}" = "yes"], [
++    AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
++
++    dnl strip all comments from install-requires.txt; this should leave
++    dnl only a single line containing the version specification for this
++    dnl package.
++    SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
++    AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++    AS_IF(
++      ["${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())"],
++      [AC_MSG_RESULT(yes)],
++      [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
++    )
++  ], [
++    sage_spkg_install_$1=yes
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a0dac8ad81ad6369d479bba30d2388de59e5cecb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:21:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for py.
+
+---
+ build/pkgs/py/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/py/spkg-configure.m4
+
+diff --git a/build/pkgs/py/spkg-configure.m4 b/build/pkgs/py/spkg-configure.m4
+new file mode 100644
+index 00000000..ded7034
+--- /dev/null
++++ b/build/pkgs/py/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([py], [SAGE_PYTHON_PACKAGE_CHECK([py])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 87c463a25ab4432dc1fba4f7a9703284e5b8f620 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:24:15 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for wheel.
+
+---
+ build/pkgs/wheel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wheel/spkg-configure.m4
+
+diff --git a/build/pkgs/wheel/spkg-configure.m4 b/build/pkgs/wheel/spkg-configure.m4
+new file mode 100644
+index 00000000..7897ea9
+--- /dev/null
++++ b/build/pkgs/wheel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([wheel], [SAGE_PYTHON_PACKAGE_CHECK([wheel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 804094b3a980f262f4d53d7be8b1be43ac0c55e0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:25:15 -0400
+Subject: Trac #29665: new spkg-configure.m4 for cvxopt.
+
+This includes a SAGE_SPKG_DEPCHECK([gsl glpk suitesparse],... because
+those C dependencies wind up linked into shared libraries like,
+
+  /usr/.../cvxopt/glpk.cpython-39-x86_64-linux-gnu.so
+
+that could potentially conflict with (for example) the glpk SPKG.
+---
+ build/pkgs/cvxopt/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/cvxopt/spkg-configure.m4
+
+diff --git a/build/pkgs/cvxopt/spkg-configure.m4 b/build/pkgs/cvxopt/spkg-configure.m4
+new file mode 100644
+index 00000000..c4aa619
+--- /dev/null
++++ b/build/pkgs/cvxopt/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([cvxopt], [
++  SAGE_SPKG_DEPCHECK([gsl glpk suitesparse], [
++    SAGE_PYTHON_PACKAGE_CHECK([cvxopt])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3f171955ff8d15da2c98aee0d2e254e95a55a2b5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:28:10 -0400
+Subject: Trac #29665: new spkg-configure.m4 for pyzmq.
+
+This includes a SAGE_SPKG_DEPCHECK([zeromq],... because libzmq winds
+up linked into shared libraries like,
+
+  /usr/.../zmq/backend/cython/message.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the zeromq SPKG.
+---
+ build/pkgs/pyzmq/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/pyzmq/spkg-configure.m4
+
+diff --git a/build/pkgs/pyzmq/spkg-configure.m4 b/build/pkgs/pyzmq/spkg-configure.m4
+new file mode 100644
+index 00000000..ae2b126
+--- /dev/null
++++ b/build/pkgs/pyzmq/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([pyzmq], [
++  SAGE_SPKG_DEPCHECK([zeromq], [
++    SAGE_PYTHON_PACKAGE_CHECK([pyzmq])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20d3aa9da9fc98a6e6a47599cd1b6d1d3785a4c4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:31:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for requests.
+
+---
+ build/pkgs/requests/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/requests/spkg-configure.m4
+
+diff --git a/build/pkgs/requests/spkg-configure.m4 b/build/pkgs/requests/spkg-configure.m4
+new file mode 100644
+index 00000000..f50a66c
+--- /dev/null
++++ b/build/pkgs/requests/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([requests], [SAGE_PYTHON_PACKAGE_CHECK([requests])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4df57ee47f2576b6b7bf9265248e06e90616b689 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:13:34 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for six.
+
+---
+ build/pkgs/six/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/six/spkg-configure.m4
+
+diff --git a/build/pkgs/six/spkg-configure.m4 b/build/pkgs/six/spkg-configure.m4
+new file mode 100644
+index 00000000..a382b81
+--- /dev/null
++++ b/build/pkgs/six/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([six], [SAGE_PYTHON_PACKAGE_CHECK([six])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f4462652d02ca729cc6d7cb36ee4d7d662deafb0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:14:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for packaging.
+
+---
+ build/pkgs/packaging/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/packaging/spkg-configure.m4
+
+diff --git a/build/pkgs/packaging/spkg-configure.m4 b/build/pkgs/packaging/spkg-configure.m4
+new file mode 100644
+index 00000000..398f9e1
+--- /dev/null
++++ b/build/pkgs/packaging/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([packaging], [SAGE_PYTHON_PACKAGE_CHECK([packaging])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4d64677fffce48077e4bc3e20ec833c70e6e9b65 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:18:53 -0400
+Subject: Trac #29665: new spkg-configure.m4 for numpy.
+
+This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack
+wind up linked into shared libraries like,
+
+  /usr/.../numpy/linalg/lapack_lite.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the openblas SPKG.
+---
+ build/pkgs/numpy/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/numpy/spkg-configure.m4
+
+diff --git a/build/pkgs/numpy/spkg-configure.m4 b/build/pkgs/numpy/spkg-configure.m4
+new file mode 100644
+index 00000000..16f9a90
+--- /dev/null
++++ b/build/pkgs/numpy/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([numpy], [
++  SAGE_SPKG_DEPCHECK([openblas], [
++   SAGE_PYTHON_PACKAGE_CHECK([numpy])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 85dfe5bb32f3c470966b477bae68a921e846d11f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:58:48 -0400
+Subject: Trac #29665: new spkg-configure.m4 for scipy.
+
+This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack
+wind up linked into shared libraries like,
+
+  /usr/.../scipy/linalg/_flinalg.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the openblas SPKG.
+---
+ build/pkgs/scipy/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/scipy/spkg-configure.m4
+
+diff --git a/build/pkgs/scipy/spkg-configure.m4 b/build/pkgs/scipy/spkg-configure.m4
+new file mode 100644
+index 00000000..0b7294a
+--- /dev/null
++++ b/build/pkgs/scipy/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([scipy], [
++  SAGE_SPKG_DEPCHECK([openblas], [
++    SAGE_PYTHON_PACKAGE_CHECK([scipy])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5616f1491036fda95f4d3e840c8c8b531c97323b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 07:19:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pluggy.
+
+---
+ build/pkgs/pluggy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pluggy/spkg-configure.m4
+
+diff --git a/build/pkgs/pluggy/spkg-configure.m4 b/build/pkgs/pluggy/spkg-configure.m4
+new file mode 100644
+index 00000000..11b1fce
+--- /dev/null
++++ b/build/pkgs/pluggy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pluggy], [SAGE_PYTHON_PACKAGE_CHECK([pluggy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6bceae3d356878cfe5fce40c9998dead003a3844 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 07:24:12 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pickleshare.
+
+---
+ build/pkgs/pickleshare/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pickleshare/spkg-configure.m4
+
+diff --git a/build/pkgs/pickleshare/spkg-configure.m4 b/build/pkgs/pickleshare/spkg-configure.m4
+new file mode 100644
+index 00000000..80e9b7c
+--- /dev/null
++++ b/build/pkgs/pickleshare/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pickleshare], [SAGE_PYTHON_PACKAGE_CHECK([pickleshare])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From da2ab534f4a256c82ed4f1c5f0f5c320529b5e9f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 08:53:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for html5lib.
+
+---
+ build/pkgs/html5lib/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/html5lib/spkg-configure.m4
+
+diff --git a/build/pkgs/html5lib/spkg-configure.m4 b/build/pkgs/html5lib/spkg-configure.m4
+new file mode 100644
+index 00000000..f421b7e
+--- /dev/null
++++ b/build/pkgs/html5lib/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([html5lib], [SAGE_PYTHON_PACKAGE_CHECK([html5lib])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5e464134afdf6055b7b5804208f759561c5435cd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 18:30:47 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for networkx.
+
+---
+ build/pkgs/networkx/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/networkx/spkg-configure.m4
+
+diff --git a/build/pkgs/networkx/spkg-configure.m4 b/build/pkgs/networkx/spkg-configure.m4
+new file mode 100644
+index 00000000..926671e
+--- /dev/null
++++ b/build/pkgs/networkx/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([networkx], [SAGE_PYTHON_PACKAGE_CHECK([networkx])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c4d40770cd9c7fda811e31759a5f4aedc320f3f9 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:33:24 -0400
+Subject: Trac #29665: new spkg-configure.m4 for matplotlib.
+
+This includes a SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull],...
+because those dependencies wind up linked into shared libraries like,
+
+  /usr/lib/.../matplotlib/ft2font.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with their SPKG counterparts.
+---
+ build/pkgs/matplotlib/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/matplotlib/spkg-configure.m4
+
+diff --git a/build/pkgs/matplotlib/spkg-configure.m4 b/build/pkgs/matplotlib/spkg-configure.m4
+new file mode 100644
+index 00000000..39c2d29
+--- /dev/null
++++ b/build/pkgs/matplotlib/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([matplotlib], [
++  SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull], [
++    SAGE_PYTHON_PACKAGE_CHECK([matplotlib])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7834dc3ac349201af632f89a9de7cd1967931010 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:35:00 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for bleach.
+
+---
+ build/pkgs/bleach/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/bleach/spkg-configure.m4
+
+diff --git a/build/pkgs/bleach/spkg-configure.m4 b/build/pkgs/bleach/spkg-configure.m4
+new file mode 100644
+index 00000000..3c9bb26
+--- /dev/null
++++ b/build/pkgs/bleach/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([bleach], [SAGE_PYTHON_PACKAGE_CHECK([bleach])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 84cad343287a2c69a4a21b9fa3b92301ff88645b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:37:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for decorator.
+
+---
+ build/pkgs/decorator/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/decorator/spkg-configure.m4
+
+diff --git a/build/pkgs/decorator/spkg-configure.m4 b/build/pkgs/decorator/spkg-configure.m4
+new file mode 100644
+index 00000000..e062778
+--- /dev/null
++++ b/build/pkgs/decorator/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([decorator], [SAGE_PYTHON_PACKAGE_CHECK([decorator])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 25693212572e69d452bc95c923ada13744359eb7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:38:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for idna.
+
+---
+ build/pkgs/idna/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/idna/spkg-configure.m4
+
+diff --git a/build/pkgs/idna/spkg-configure.m4 b/build/pkgs/idna/spkg-configure.m4
+new file mode 100644
+index 00000000..9d363f2
+--- /dev/null
++++ b/build/pkgs/idna/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([idna], [SAGE_PYTHON_PACKAGE_CHECK([idna])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6d5616472f6cdc6cf496bba6fe07bd4ef44dfdaf Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:39:23 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for certifi.
+
+---
+ build/pkgs/certifi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/certifi/spkg-configure.m4
+
+diff --git a/build/pkgs/certifi/spkg-configure.m4 b/build/pkgs/certifi/spkg-configure.m4
+new file mode 100644
+index 00000000..ddd4061
+--- /dev/null
++++ b/build/pkgs/certifi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([certifi], [SAGE_PYTHON_PACKAGE_CHECK([certifi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9412a07023b275e29e8d1af9b8ee3e767042e7fd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:40:59 -0400
+Subject: Trac #29665: new spkg-configure.m4 for pillow.
+
+This includes an SAGE_SPKG_DEPCHECK([bzip2 freetype libpng zlib],...
+because those dependencies wind up linked into shared libraries like,
+
+  /usr/.../PIL/_imagingft.cpython-39-x86_64-linux-gnu.so
+
+and potentially conflict with their SPKG counterparts.
+---
+ build/pkgs/pillow/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/pillow/spkg-configure.m4
+
+diff --git a/build/pkgs/pillow/spkg-configure.m4 b/build/pkgs/pillow/spkg-configure.m4
+new file mode 100644
+index 00000000..f2e68e2
+--- /dev/null
++++ b/build/pkgs/pillow/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([pillow], [
++  SAGE_SPKG_DEPCHECK([bzip2 freetype libpng zlib], [
++    SAGE_PYTHON_PACKAGE_CHECK([pillow])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From eede914311481fdb75b363b7a799075e876a2b4f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:44:13 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for mpmath.
+
+---
+ build/pkgs/mpmath/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mpmath/spkg-configure.m4
+
+diff --git a/build/pkgs/mpmath/spkg-configure.m4 b/build/pkgs/mpmath/spkg-configure.m4
+new file mode 100644
+index 00000000..f43c838
+--- /dev/null
++++ b/build/pkgs/mpmath/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([mpmath], [SAGE_PYTHON_PACKAGE_CHECK([mpmath])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 363a825885832c0b580ff53fe61f5c79e70c4728 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:44:56 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for sympy.
+
+---
+ build/pkgs/sympy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sympy/spkg-configure.m4
+
+diff --git a/build/pkgs/sympy/spkg-configure.m4 b/build/pkgs/sympy/spkg-configure.m4
+new file mode 100644
+index 00000000..fa0f1f5
+--- /dev/null
++++ b/build/pkgs/sympy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([sympy], [SAGE_PYTHON_PACKAGE_CHECK([sympy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0667964c914e4a01dda697190a054ff96cea92d6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:47:06 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pygments.
+
+---
+ build/pkgs/pygments/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pygments/spkg-configure.m4
+
+diff --git a/build/pkgs/pygments/spkg-configure.m4 b/build/pkgs/pygments/spkg-configure.m4
+new file mode 100644
+index 00000000..99f29e3
+--- /dev/null
++++ b/build/pkgs/pygments/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pygments], [SAGE_PYTHON_PACKAGE_CHECK([pygments])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f787c233aa05d8e90f7c6ad18f76bd2fa36bfbfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:48:50 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for jinja2.
+
+---
+ build/pkgs/jinja2/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jinja2/spkg-configure.m4
+
+diff --git a/build/pkgs/jinja2/spkg-configure.m4 b/build/pkgs/jinja2/spkg-configure.m4
+new file mode 100644
+index 00000000..0970d1c
+--- /dev/null
++++ b/build/pkgs/jinja2/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jinja2], [SAGE_PYTHON_PACKAGE_CHECK([jinja2])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 309d8f8e2b7078b5efbbe824b69ec1d9b1e639f0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:43:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pandocfilters.
+
+---
+ build/pkgs/pandocfilters/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/pandocfilters/spkg-configure.m4
+
+diff --git a/build/pkgs/pandocfilters/spkg-configure.m4 b/build/pkgs/pandocfilters/spkg-configure.m4
+new file mode 100644
+index 00000000..3e9537f
+--- /dev/null
++++ b/build/pkgs/pandocfilters/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([pandocfilters], [
++  SAGE_PYTHON_PACKAGE_CHECK([pandocfilters])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f57bfda49777a6ba1cd123553acd75dc347c5521 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:44:46 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for webencodings.
+
+---
+ build/pkgs/webencodings/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/webencodings/spkg-configure.m4
+
+diff --git a/build/pkgs/webencodings/spkg-configure.m4 b/build/pkgs/webencodings/spkg-configure.m4
+new file mode 100644
+index 00000000..1b9a5c4
+--- /dev/null
++++ b/build/pkgs/webencodings/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([webencodings], [
++  SAGE_PYTHON_PACKAGE_CHECK([webencodings])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7f193a62d7a2ea0b6a3ca6beb12390d91c25bbfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:48:26 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pytz.
+
+---
+ build/pkgs/pytz/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pytz/spkg-configure.m4
+
+diff --git a/build/pkgs/pytz/spkg-configure.m4 b/build/pkgs/pytz/spkg-configure.m4
+new file mode 100644
+index 00000000..366521b
+--- /dev/null
++++ b/build/pkgs/pytz/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pytz], [SAGE_PYTHON_PACKAGE_CHECK([pytz])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bfd3fdd887c3465c03465248de4997eed4a82915 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:51:16 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for texttable.
+
+---
+ build/pkgs/texttable/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/texttable/spkg-configure.m4
+
+diff --git a/build/pkgs/texttable/spkg-configure.m4 b/build/pkgs/texttable/spkg-configure.m4
+new file mode 100644
+index 00000000..42a3de1
+--- /dev/null
++++ b/build/pkgs/texttable/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([texttable], [SAGE_PYTHON_PACKAGE_CHECK([texttable])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 914bf0cc57abc46129b27c1525782dbe16da31a2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:53:41 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for babel.
+
+---
+ build/pkgs/babel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/babel/spkg-configure.m4
+
+diff --git a/build/pkgs/babel/spkg-configure.m4 b/build/pkgs/babel/spkg-configure.m4
+new file mode 100644
+index 00000000..d7b9a71
+--- /dev/null
++++ b/build/pkgs/babel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([babel], [SAGE_PYTHON_PACKAGE_CHECK([babel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 56977abd1eafbc87c765a2892cfe525382648259 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 14 Oct 2021 08:06:59 -0400
+Subject: Trac #29665: force system python3 with --enable-system-site-packages.
+
+When the python SPKG is used, the --enable-system-site-packages flag
+will essentially do nothing, and that may confuse users who have
+wasted a few hours building sage. (Generally, they will want to fix
+detection of their system python3 first.)
+
+To forestall that, we now set "--with-system-python3=force" whenever
+the "--enable-system-site-packages" flag is passed.
+---
+ configure.ac | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index db30a91..6fafb83 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -438,10 +438,19 @@ AC_ARG_ENABLE([download-from-upstream-url],
+ AC_ARG_ENABLE(
+   [system-site-packages], [AS_HELP_STRING(
+     [--enable-system-site-packages],
+-    [allow sage to use python packages from the system (experimental; default: no)]
++    [allow the use of python packages from the system (experimental; default: no)]
+   )], [
+   AS_IF([test "x$enable_system_site_packages" = "xyes"], [
+     SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
++
++    dnl We want to raise an error if the user asked for "system site
++    dnl packages" but the system python will not be used. Technically
++    dnl that causes no problems (SAGE_PYTHON_PACKAGE_CHECK always fails,
++    dnl so SPKGs are used for all python packages), but it may be confusing
++    dnl to end users who expect the flag to actually give them access to
++    dnl their system python packages and who may not be paying close
++    dnl attention to their ./configure output.
++    with_system_python3="force"
+   ])
+ ])
+ AC_SUBST([SAGE_VENV_FLAGS])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 02b369fd24ef7cf8997082e7850b9cf022cae34b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 01:18:35 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for setuptools.
+
+---
+ build/pkgs/setuptools/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/setuptools/spkg-configure.m4
+
+diff --git a/build/pkgs/setuptools/spkg-configure.m4 b/build/pkgs/setuptools/spkg-configure.m4
+new file mode 100644
+index 00000000..a2ad811
+--- /dev/null
++++ b/build/pkgs/setuptools/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([setuptools], [SAGE_PYTHON_PACKAGE_CHECK([setuptools])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 05117317d38693978efaf36e81d8b02bae44b257 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 01:15:48 -0400
+Subject: Trac #29665: poison PYTHONUSERBASE when testing for "system"
+ packages.
+
+When we're detecting system installations of python packages, we want
+to hide anything that was installed with e.g. "pip install --user". To
+accomplish that, we mimic the PYTHONUSERBASE poisoning from sage-env
+within the SAGE_PYTHON_PACKAGE_CHECK() macro.
+---
+ m4/sage_python_package_check.m4 | 18 +++++++++++++++++-
+ 1 file changed, 17 insertions(+), 1 deletion(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 77b0a0c..b8cdba4 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -38,11 +38,27 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     dnl package.
+     SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
+     AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++
++    dnl To prevent user-site (pip install --user) packages from being
++    dnl detected as "system" packages, we poison PYTHONUSERBASE. The
++    dnl sage-env script also does this at runtime; we mimic that
++    dnl implementation to ensure that the behaviors at ./configure and
++    dnl runtime are identical. Beware that (as in sage-env) the poisoning
++    dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
++    dnl user points PYTHONUSERBASE to any path (even the default), then
++    dnl his local pip packages will be detected.
++    PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
++    AS_IF([test -z "${PYTHONUSERBASE}"], [
++      PYTHONUSERBASE="${HOME}/.sage/local"
++    ])
++
+     AS_IF(
+-      ["${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())"],
++      [PYTHONUSERBASE="${PYTHONUSERBASE}" "${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" 2>/dev/null],
+       [AC_MSG_RESULT(yes)],
+       [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+     )
++
++    PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d75c1492f63a584b5ec5f424ddd7f7c4a6d502d3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:20:04 -0400
+Subject: Trac #29665: run SAGE_PYTHON_PACKAGE_CHECK() inside a venv.
+
+To recreate the runtime environment as closely as possible, we now use
+a venv (with system site packages enabled) when checking for system
+copies of python packages.
+---
+ m4/sage_python_package_check.m4 | 76 +++++++++++++++++++++++++++--------------
+ 1 file changed, 51 insertions(+), 25 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index b8cdba4..7cbd6c0 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -15,9 +15,11 @@
+ #
+ #     2. If we are not using the system python (no $PYTHON_FOR_VENV),
+ #
+-#     3. If setuptools is not available to the system python,
++#     3. If we are unable to create a venv with the system python,
+ #
+-#     4. If the contents of install-requires.txt are not met (wrong
++#     4. If setuptools is not available to the system python,
++#
++#     5. If the contents of install-requires.txt are not met (wrong
+ #        version, no version, etc.) by the system python.
+ #
+ #   In any of those cases, we set sage_spkg_install_$package to "yes"
+@@ -27,38 +29,62 @@
+ #
+ #   The SAGE_SPKG_CONFIGURE_PYTHON3() macro is AC_REQUIRE'd to ensure
+ #   that $PYTHON_FOR_VENV is available, if it is going to be available.
++#   The check is run inside a new venv, and with the PYTHONUSERBASE
++#   variable poisoned in the same manner as sage-env poisons it, to
++#   ensure that the ./configure- and run-time views of the system
++#   are as similar as possible.
+ #
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
+     AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
+ 
+-    dnl strip all comments from install-requires.txt; this should leave
+-    dnl only a single line containing the version specification for this
+-    dnl package.
+-    SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
+-    AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++    dnl We run this check inside a python venv, because that's ultimately
++    dnl how the system $PYTHON_FOR_VENV will be used.
++    AC_MSG_CHECKING([if we can create a python venv in config.venv])
+ 
+-    dnl To prevent user-site (pip install --user) packages from being
+-    dnl detected as "system" packages, we poison PYTHONUSERBASE. The
+-    dnl sage-env script also does this at runtime; we mimic that
+-    dnl implementation to ensure that the behaviors at ./configure and
+-    dnl runtime are identical. Beware that (as in sage-env) the poisoning
+-    dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
+-    dnl user points PYTHONUSERBASE to any path (even the default), then
+-    dnl his local pip packages will be detected.
+-    PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
+-    AS_IF([test -z "${PYTHONUSERBASE}"], [
+-      PYTHONUSERBASE="${HOME}/.sage/local"
+-    ])
++    dnl Use --clear because ./configure typically clobbers its output files.
++    AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
++                                        --clear                dnl
++                                        --without-pip          dnl
++					config.venv], [
++      AC_MSG_RESULT(yes)
++      dnl strip all comments from install-requires.txt; this should leave
++      dnl only a single line containing the version specification for this
++      dnl package.
++      SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
++      AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++
++      dnl To prevent user-site (pip install --user) packages from being
++      dnl detected as "system" packages, we poison PYTHONUSERBASE. The
++      dnl sage-env script also does this at runtime; we mimic that
++      dnl implementation to ensure that the behaviors at ./configure and
++      dnl runtime are identical. Beware that (as in sage-env) the poisoning
++      dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
++      dnl user points PYTHONUSERBASE to any path (even the default), then
++      dnl his local pip packages will be detected.
++      PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
++      AS_IF([test -z "${PYTHONUSERBASE}"], [
++        PYTHONUSERBASE="${HOME}/.sage/local"
++      ])
+ 
+-    AS_IF(
+-      [PYTHONUSERBASE="${PYTHONUSERBASE}" "${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" 2>/dev/null],
+-      [AC_MSG_RESULT(yes)],
+-      [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+-    )
++      AS_IF(
++        [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
++           "from setuptools.version import pkg_resources;              dnl
++            pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" dnl
++	 2>/dev/null],
++        [AC_MSG_RESULT(yes)],
++        [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
++      )
++
++      PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
++    ], [
++      dnl failed to create a venv for some reason
++      AC_MSG_RESULT(no)
++      sage_spkg_install_$1=yes
++    ])
+ 
+-    PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
++    rm -rf config.venv
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 87646c3264a04ffd98a12d67074f93e1943a1e96 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:38:08 -0400
+Subject: Trac #29665: log SAGE_PYTHON_PACKAGE_CHECK() failures to config.log.
+
+---
+ m4/sage_python_package_check.m4 | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 7cbd6c0..e0e0b9f 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -47,7 +47,8 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
+                                         --clear                dnl
+                                         --without-pip          dnl
+-					config.venv], [
++                                        config.venv            dnl
++                                        2>&AS_MESSAGE_LOG_FD], [
+       AC_MSG_RESULT(yes)
+       dnl strip all comments from install-requires.txt; this should leave
+       dnl only a single line containing the version specification for this
+@@ -72,7 +73,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+         [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
+            "from setuptools.version import pkg_resources;              dnl
+             pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" dnl
+-	 2>/dev/null],
++	 2>&AS_MESSAGE_LOG_FD],
+         [AC_MSG_RESULT(yes)],
+         [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+       )
+-- 
+cgit v1.0-1-gd88e
+
+
+From f7dfffd1c64816e2ae4e0f420b22065c5c5bf2cb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:45:37 -0400
+Subject: Trac #29665: don't clobber a plain file named config.venv.
+
+When SAGE_PYTHON_PACKAGE_CHECK() is cleaning up, we no longer remove
+"config.venv" unconditionally. Instead, we remove it only if it is a
+directory. This is also how "pyvenv --clear" works.
+---
+ m4/sage_python_package_check.m4 | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index e0e0b9f..127a078 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -85,7 +85,9 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+       sage_spkg_install_$1=yes
+     ])
+ 
+-    rm -rf config.venv
++    dnl Clean up config.venv, but only if we could have created it.
++    dnl (The --clear flag to pyvenv will not clobber a plain file.)
++    AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9849c77313b895dcfb786d2ea54e36585bd31ce2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 16 Oct 2021 08:14:42 -0400
+Subject: Trac #29665: don't announce system python packages that won't be
+ used.
+
+When --enable-system-site-packages was not given, the python packages
+using SAGE_PYTHON_PACKAGE_CHECK() in spkg-configure.m4 cannot be used.
+Rather than suggest that users install them anyway, that macro now
+hacks the value of sage_use_system_$package to be "no" when the use
+of system site packages is disabled at the python level.
+---
+ m4/sage_python_package_check.m4 | 17 +++++++++++++++++
+ 1 file changed, 17 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 127a078..7ee82a7 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -89,6 +89,23 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     dnl (The --clear flag to pyvenv will not clobber a plain file.)
+     AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
++    dnl System site packages are disabled.
+     sage_spkg_install_$1=yes
++
++    dnl We have to retroactively hack the --with-system-foo={no,yes,force}
++    dnl mechanism here because it wasn't designed with the ability to
++    dnl disable arbitrary chunks of system packages in mind. The easy cases
++    dnl are "no" and "force" which require no action; "no" means we won't
++    dnl suggest the package anyway, and "force" will raise an error when
++    dnl the system-package check fails.
++    dnl
++    dnl The default of "yes" is more troubling because it is the default. To
++    dnl avoid prompting users to install packages that won't be used, we want
++    dnl to ignore "yes" when reporting the "hint: install these packages..."
++    dnl at the end of ./configure. To accomplish that, we change "yes" to
++    dnl "no" here, essentially changing the default for packages using this
++    dnl macro when --enable-system-site-packages is disabled. Packages with
++    dnl "no" are not suggested to the user.
++    AS_IF([test "${sage_use_system_$1}" = "yes"],[sage_use_system_$1=no])
+   ])
+ ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3e6ad737b94aaac234d615ecaf1a2455eb607f1a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 17 Oct 2021 06:16:21 -0400
+Subject: Trac #29665: add Gentoo package information for python packages.
+
+---
+ build/pkgs/babel/distros/gentoo.txt         | 1 +
+ build/pkgs/bleach/distros/gentoo.txt        | 1 +
+ build/pkgs/certifi/distros/gentoo.txt       | 1 +
+ build/pkgs/cvxopt/distros/gentoo.txt        | 1 +
+ build/pkgs/decorator/distros/gentoo.txt     | 1 +
+ build/pkgs/html5lib/distros/gentoo.txt      | 1 +
+ build/pkgs/idna/distros/gentoo.txt          | 1 +
+ build/pkgs/jinja2/distros/gentoo.txt        | 1 +
+ build/pkgs/matplotlib/distros/gentoo.txt    | 1 +
+ build/pkgs/mpmath/distros/gentoo.txt        | 1 +
+ build/pkgs/networkx/distros/gentoo.txt      | 1 +
+ build/pkgs/numpy/distros/gentoo.txt         | 1 +
+ build/pkgs/packaging/distros/gentoo.txt     | 1 +
+ build/pkgs/pandocfilters/distros/gentoo.txt | 1 +
+ build/pkgs/pickleshare/distros/gentoo.txt   | 1 +
+ build/pkgs/pillow/distros/gentoo.txt        | 1 +
+ build/pkgs/pluggy/distros/gentoo.txt        | 1 +
+ build/pkgs/pygments/distros/gentoo.txt      | 1 +
+ build/pkgs/pytz/distros/gentoo.txt          | 1 +
+ build/pkgs/pyzmq/distros/gentoo.txt         | 1 +
+ build/pkgs/requests/distros/gentoo.txt      | 1 +
+ build/pkgs/scipy/distros/gentoo.txt         | 1 +
+ build/pkgs/setuptools/distros/gentoo.txt    | 1 +
+ build/pkgs/six/distros/gentoo.txt           | 1 +
+ build/pkgs/sympy/distros/gentoo.txt         | 1 +
+ build/pkgs/texttable/distros/gentoo.txt     | 1 +
+ build/pkgs/toml/distros/gentoo.txt          | 1 +
+ build/pkgs/webencodings/distros/gentoo.txt  | 1 +
+ 28 files changed, 28 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/gentoo.txt
+ create mode 100644 build/pkgs/bleach/distros/gentoo.txt
+ create mode 100644 build/pkgs/certifi/distros/gentoo.txt
+ create mode 100644 build/pkgs/cvxopt/distros/gentoo.txt
+ create mode 100644 build/pkgs/decorator/distros/gentoo.txt
+ create mode 100644 build/pkgs/html5lib/distros/gentoo.txt
+ create mode 100644 build/pkgs/idna/distros/gentoo.txt
+ create mode 100644 build/pkgs/jinja2/distros/gentoo.txt
+ create mode 100644 build/pkgs/matplotlib/distros/gentoo.txt
+ create mode 100644 build/pkgs/mpmath/distros/gentoo.txt
+ create mode 100644 build/pkgs/networkx/distros/gentoo.txt
+ create mode 100644 build/pkgs/numpy/distros/gentoo.txt
+ create mode 100644 build/pkgs/packaging/distros/gentoo.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/gentoo.txt
+ create mode 100644 build/pkgs/pickleshare/distros/gentoo.txt
+ create mode 100644 build/pkgs/pillow/distros/gentoo.txt
+ create mode 100644 build/pkgs/pluggy/distros/gentoo.txt
+ create mode 100644 build/pkgs/pygments/distros/gentoo.txt
+ create mode 100644 build/pkgs/pytz/distros/gentoo.txt
+ create mode 100644 build/pkgs/pyzmq/distros/gentoo.txt
+ create mode 100644 build/pkgs/requests/distros/gentoo.txt
+ create mode 100644 build/pkgs/scipy/distros/gentoo.txt
+ create mode 100644 build/pkgs/setuptools/distros/gentoo.txt
+ create mode 100644 build/pkgs/six/distros/gentoo.txt
+ create mode 100644 build/pkgs/sympy/distros/gentoo.txt
+ create mode 100644 build/pkgs/texttable/distros/gentoo.txt
+ create mode 100644 build/pkgs/toml/distros/gentoo.txt
+ create mode 100644 build/pkgs/webencodings/distros/gentoo.txt
+
+diff --git a/build/pkgs/babel/distros/gentoo.txt b/build/pkgs/babel/distros/gentoo.txt
+new file mode 100644
+index 00000000..2d2c34f
+--- /dev/null
++++ b/build/pkgs/babel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/Babel
+diff --git a/build/pkgs/bleach/distros/gentoo.txt b/build/pkgs/bleach/distros/gentoo.txt
+new file mode 100644
+index 00000000..b4f9744
+--- /dev/null
++++ b/build/pkgs/bleach/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/bleach
+diff --git a/build/pkgs/certifi/distros/gentoo.txt b/build/pkgs/certifi/distros/gentoo.txt
+new file mode 100644
+index 00000000..72e2e91
+--- /dev/null
++++ b/build/pkgs/certifi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/certifi
+diff --git a/build/pkgs/cvxopt/distros/gentoo.txt b/build/pkgs/cvxopt/distros/gentoo.txt
+new file mode 100644
+index 00000000..b312391
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/cvxopt
+diff --git a/build/pkgs/decorator/distros/gentoo.txt b/build/pkgs/decorator/distros/gentoo.txt
+new file mode 100644
+index 00000000..fea5a67
+--- /dev/null
++++ b/build/pkgs/decorator/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/decorator
+diff --git a/build/pkgs/html5lib/distros/gentoo.txt b/build/pkgs/html5lib/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c2be76
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/html5lib
+diff --git a/build/pkgs/idna/distros/gentoo.txt b/build/pkgs/idna/distros/gentoo.txt
+new file mode 100644
+index 00000000..68ef51c
+--- /dev/null
++++ b/build/pkgs/idna/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/idna
+diff --git a/build/pkgs/jinja2/distros/gentoo.txt b/build/pkgs/jinja2/distros/gentoo.txt
+new file mode 100644
+index 00000000..15a27ae
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jinja
+diff --git a/build/pkgs/matplotlib/distros/gentoo.txt b/build/pkgs/matplotlib/distros/gentoo.txt
+new file mode 100644
+index 00000000..bcfefb5
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/matplotlib
+diff --git a/build/pkgs/mpmath/distros/gentoo.txt b/build/pkgs/mpmath/distros/gentoo.txt
+new file mode 100644
+index 00000000..946c62d
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/mpmath
+diff --git a/build/pkgs/networkx/distros/gentoo.txt b/build/pkgs/networkx/distros/gentoo.txt
+new file mode 100644
+index 00000000..dd97742
+--- /dev/null
++++ b/build/pkgs/networkx/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/networkx
+diff --git a/build/pkgs/numpy/distros/gentoo.txt b/build/pkgs/numpy/distros/gentoo.txt
+new file mode 100644
+index 00000000..d2179d4
+--- /dev/null
++++ b/build/pkgs/numpy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/numpy
+diff --git a/build/pkgs/packaging/distros/gentoo.txt b/build/pkgs/packaging/distros/gentoo.txt
+new file mode 100644
+index 00000000..e5309ed
+--- /dev/null
++++ b/build/pkgs/packaging/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/packaging
+diff --git a/build/pkgs/pandocfilters/distros/gentoo.txt b/build/pkgs/pandocfilters/distros/gentoo.txt
+new file mode 100644
+index 00000000..a726fda
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/gentoo.txt b/build/pkgs/pickleshare/distros/gentoo.txt
+new file mode 100644
+index 00000000..14fad0f
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pickleshare
+diff --git a/build/pkgs/pillow/distros/gentoo.txt b/build/pkgs/pillow/distros/gentoo.txt
+new file mode 100644
+index 00000000..1243649
+--- /dev/null
++++ b/build/pkgs/pillow/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pillow
+diff --git a/build/pkgs/pluggy/distros/gentoo.txt b/build/pkgs/pluggy/distros/gentoo.txt
+new file mode 100644
+index 00000000..7b33876
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pluggy
+diff --git a/build/pkgs/pygments/distros/gentoo.txt b/build/pkgs/pygments/distros/gentoo.txt
+new file mode 100644
+index 00000000..a584f32
+--- /dev/null
++++ b/build/pkgs/pygments/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pygments
+diff --git a/build/pkgs/pytz/distros/gentoo.txt b/build/pkgs/pytz/distros/gentoo.txt
+new file mode 100644
+index 00000000..902a18b
+--- /dev/null
++++ b/build/pkgs/pytz/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pytz
+diff --git a/build/pkgs/pyzmq/distros/gentoo.txt b/build/pkgs/pyzmq/distros/gentoo.txt
+new file mode 100644
+index 00000000..77c2429
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyzmq
+diff --git a/build/pkgs/requests/distros/gentoo.txt b/build/pkgs/requests/distros/gentoo.txt
+new file mode 100644
+index 00000000..d3dc941
+--- /dev/null
++++ b/build/pkgs/requests/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/requests
+diff --git a/build/pkgs/scipy/distros/gentoo.txt b/build/pkgs/scipy/distros/gentoo.txt
+new file mode 100644
+index 00000000..11dabd2
+--- /dev/null
++++ b/build/pkgs/scipy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/scipy
+diff --git a/build/pkgs/setuptools/distros/gentoo.txt b/build/pkgs/setuptools/distros/gentoo.txt
+new file mode 100644
+index 00000000..3a4fa34
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/setuptools
+diff --git a/build/pkgs/six/distros/gentoo.txt b/build/pkgs/six/distros/gentoo.txt
+new file mode 100644
+index 00000000..f73f648
+--- /dev/null
++++ b/build/pkgs/six/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/six
+diff --git a/build/pkgs/sympy/distros/gentoo.txt b/build/pkgs/sympy/distros/gentoo.txt
+new file mode 100644
+index 00000000..b5a5034
+--- /dev/null
++++ b/build/pkgs/sympy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sympy
+diff --git a/build/pkgs/texttable/distros/gentoo.txt b/build/pkgs/texttable/distros/gentoo.txt
+new file mode 100644
+index 00000000..b33a7a7
+--- /dev/null
++++ b/build/pkgs/texttable/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/texttable
+diff --git a/build/pkgs/toml/distros/gentoo.txt b/build/pkgs/toml/distros/gentoo.txt
+new file mode 100644
+index 00000000..64fcea3
+--- /dev/null
++++ b/build/pkgs/toml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/toml
+diff --git a/build/pkgs/webencodings/distros/gentoo.txt b/build/pkgs/webencodings/distros/gentoo.txt
+new file mode 100644
+index 00000000..7539b0f
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/webencodings
+-- 
+cgit v1.0-1-gd88e
+
+
+From 088380f884124c9608160b613ba031c5f023f604 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 18:43:04 -0700
+Subject: build/pkgs: Add distros/fedora.txt for Python packages
+
+---
+ build/pkgs/babel/distros/fedora.txt         | 1 +
+ build/pkgs/bleach/distros/fedora.txt        | 1 +
+ build/pkgs/certifi/distros/fedora.txt       | 1 +
+ build/pkgs/cvxopt/distros/fedora.txt        | 1 +
+ build/pkgs/decorator/distros/fedora.txt     | 1 +
+ build/pkgs/html5lib/distros/fedora.txt      | 1 +
+ build/pkgs/idna/distros/fedora.txt          | 1 +
+ build/pkgs/jinja2/distros/fedora.txt        | 1 +
+ build/pkgs/matplotlib/distros/fedora.txt    | 1 +
+ build/pkgs/mpmath/distros/fedora.txt        | 1 +
+ build/pkgs/networkx/distros/fedora.txt      | 1 +
+ build/pkgs/numpy/distros/fedora.txt         | 1 +
+ build/pkgs/packaging/distros/fedora.txt     | 1 +
+ build/pkgs/pandocfilters/distros/fedora.txt | 1 +
+ build/pkgs/pickleshare/distros/fedora.txt   | 1 +
+ build/pkgs/pillow/distros/fedora.txt        | 1 +
+ build/pkgs/pluggy/distros/fedora.txt        | 1 +
+ build/pkgs/py/distros/fedora.txt            | 1 +
+ build/pkgs/pygments/distros/fedora.txt      | 1 +
+ build/pkgs/pytz/distros/fedora.txt          | 1 +
+ build/pkgs/pyzmq/distros/fedora.txt         | 1 +
+ build/pkgs/requests/distros/fedora.txt      | 1 +
+ build/pkgs/scipy/distros/fedora.txt         | 1 +
+ build/pkgs/setuptools/distros/fedora.txt    | 1 +
+ build/pkgs/six/distros/fedora.txt           | 1 +
+ build/pkgs/sympy/distros/fedora.txt         | 1 +
+ build/pkgs/texttable/distros/fedora.txt     | 1 +
+ build/pkgs/toml/distros/fedora.txt          | 1 +
+ build/pkgs/webencodings/distros/fedora.txt  | 1 +
+ build/pkgs/wheel/distros/fedora.txt         | 1 +
+ 30 files changed, 30 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/fedora.txt
+ create mode 100644 build/pkgs/bleach/distros/fedora.txt
+ create mode 100644 build/pkgs/certifi/distros/fedora.txt
+ create mode 100644 build/pkgs/cvxopt/distros/fedora.txt
+ create mode 100644 build/pkgs/decorator/distros/fedora.txt
+ create mode 100644 build/pkgs/html5lib/distros/fedora.txt
+ create mode 100644 build/pkgs/idna/distros/fedora.txt
+ create mode 100644 build/pkgs/jinja2/distros/fedora.txt
+ create mode 100644 build/pkgs/matplotlib/distros/fedora.txt
+ create mode 100644 build/pkgs/mpmath/distros/fedora.txt
+ create mode 100644 build/pkgs/networkx/distros/fedora.txt
+ create mode 100644 build/pkgs/numpy/distros/fedora.txt
+ create mode 100644 build/pkgs/packaging/distros/fedora.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/fedora.txt
+ create mode 100644 build/pkgs/pickleshare/distros/fedora.txt
+ create mode 100644 build/pkgs/pillow/distros/fedora.txt
+ create mode 100644 build/pkgs/pluggy/distros/fedora.txt
+ create mode 100644 build/pkgs/py/distros/fedora.txt
+ create mode 100644 build/pkgs/pygments/distros/fedora.txt
+ create mode 100644 build/pkgs/pytz/distros/fedora.txt
+ create mode 100644 build/pkgs/pyzmq/distros/fedora.txt
+ create mode 100644 build/pkgs/requests/distros/fedora.txt
+ create mode 100644 build/pkgs/scipy/distros/fedora.txt
+ create mode 100644 build/pkgs/setuptools/distros/fedora.txt
+ create mode 100644 build/pkgs/six/distros/fedora.txt
+ create mode 100644 build/pkgs/sympy/distros/fedora.txt
+ create mode 100644 build/pkgs/texttable/distros/fedora.txt
+ create mode 100644 build/pkgs/toml/distros/fedora.txt
+ create mode 100644 build/pkgs/webencodings/distros/fedora.txt
+ create mode 100644 build/pkgs/wheel/distros/fedora.txt
+
+diff --git a/build/pkgs/babel/distros/fedora.txt b/build/pkgs/babel/distros/fedora.txt
+new file mode 100644
+index 00000000..98f6593
+--- /dev/null
++++ b/build/pkgs/babel/distros/fedora.txt
+@@ -0,0 +1 @@
++babel
+diff --git a/build/pkgs/bleach/distros/fedora.txt b/build/pkgs/bleach/distros/fedora.txt
+new file mode 100644
+index 00000000..c5422cc
+--- /dev/null
++++ b/build/pkgs/bleach/distros/fedora.txt
+@@ -0,0 +1 @@
++python-bleach
+diff --git a/build/pkgs/certifi/distros/fedora.txt b/build/pkgs/certifi/distros/fedora.txt
+new file mode 100644
+index 00000000..be421c8
+--- /dev/null
++++ b/build/pkgs/certifi/distros/fedora.txt
+@@ -0,0 +1 @@
++python-certifi
+diff --git a/build/pkgs/cvxopt/distros/fedora.txt b/build/pkgs/cvxopt/distros/fedora.txt
+new file mode 100644
+index 00000000..f15770f
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/fedora.txt
+@@ -0,0 +1 @@
++python-cvxopt
+diff --git a/build/pkgs/decorator/distros/fedora.txt b/build/pkgs/decorator/distros/fedora.txt
+new file mode 100644
+index 00000000..0795604
+--- /dev/null
++++ b/build/pkgs/decorator/distros/fedora.txt
+@@ -0,0 +1 @@
++python-decorator
+diff --git a/build/pkgs/html5lib/distros/fedora.txt b/build/pkgs/html5lib/distros/fedora.txt
+new file mode 100644
+index 00000000..b821491
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/fedora.txt
+@@ -0,0 +1 @@
++python-html5lib
+diff --git a/build/pkgs/idna/distros/fedora.txt b/build/pkgs/idna/distros/fedora.txt
+new file mode 100644
+index 00000000..a73e70c
+--- /dev/null
++++ b/build/pkgs/idna/distros/fedora.txt
+@@ -0,0 +1 @@
++python-idna
+diff --git a/build/pkgs/jinja2/distros/fedora.txt b/build/pkgs/jinja2/distros/fedora.txt
+new file mode 100644
+index 00000000..f5f3caf
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/fedora.txt
+@@ -0,0 +1 @@
++python-jinja2
+diff --git a/build/pkgs/matplotlib/distros/fedora.txt b/build/pkgs/matplotlib/distros/fedora.txt
+new file mode 100644
+index 00000000..f6d856e
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/fedora.txt
+@@ -0,0 +1 @@
++python-matplotlib
+diff --git a/build/pkgs/mpmath/distros/fedora.txt b/build/pkgs/mpmath/distros/fedora.txt
+new file mode 100644
+index 00000000..a7dc8d5
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/fedora.txt
+@@ -0,0 +1 @@
++python-mpmath
+diff --git a/build/pkgs/networkx/distros/fedora.txt b/build/pkgs/networkx/distros/fedora.txt
+new file mode 100644
+index 00000000..293f943
+--- /dev/null
++++ b/build/pkgs/networkx/distros/fedora.txt
+@@ -0,0 +1 @@
++python-networkx
+diff --git a/build/pkgs/numpy/distros/fedora.txt b/build/pkgs/numpy/distros/fedora.txt
+new file mode 100644
+index 00000000..c8722b9
+--- /dev/null
++++ b/build/pkgs/numpy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-numpy
+diff --git a/build/pkgs/packaging/distros/fedora.txt b/build/pkgs/packaging/distros/fedora.txt
+new file mode 100644
+index 00000000..02ad855
+--- /dev/null
++++ b/build/pkgs/packaging/distros/fedora.txt
+@@ -0,0 +1 @@
++python-packaging
+diff --git a/build/pkgs/pandocfilters/distros/fedora.txt b/build/pkgs/pandocfilters/distros/fedora.txt
+new file mode 100644
+index 00000000..e7a86d0
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/fedora.txt b/build/pkgs/pickleshare/distros/fedora.txt
+new file mode 100644
+index 00000000..6d991a2
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pickleshare
+diff --git a/build/pkgs/pillow/distros/fedora.txt b/build/pkgs/pillow/distros/fedora.txt
+new file mode 100644
+index 00000000..86dbb1d
+--- /dev/null
++++ b/build/pkgs/pillow/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pillow
+diff --git a/build/pkgs/pluggy/distros/fedora.txt b/build/pkgs/pluggy/distros/fedora.txt
+new file mode 100644
+index 00000000..c869e54
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pluggy
+diff --git a/build/pkgs/py/distros/fedora.txt b/build/pkgs/py/distros/fedora.txt
+new file mode 100644
+index 00000000..b348d39
+--- /dev/null
++++ b/build/pkgs/py/distros/fedora.txt
+@@ -0,0 +1 @@
++python-py
+diff --git a/build/pkgs/pygments/distros/fedora.txt b/build/pkgs/pygments/distros/fedora.txt
+new file mode 100644
+index 00000000..f3e72a8
+--- /dev/null
++++ b/build/pkgs/pygments/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pygments
+diff --git a/build/pkgs/pytz/distros/fedora.txt b/build/pkgs/pytz/distros/fedora.txt
+new file mode 100644
+index 00000000..2cccc9e
+--- /dev/null
++++ b/build/pkgs/pytz/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pytz
+diff --git a/build/pkgs/pyzmq/distros/fedora.txt b/build/pkgs/pyzmq/distros/fedora.txt
+new file mode 100644
+index 00000000..23f64d1
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pyzmq
+diff --git a/build/pkgs/requests/distros/fedora.txt b/build/pkgs/requests/distros/fedora.txt
+new file mode 100644
+index 00000000..93a7bc1
+--- /dev/null
++++ b/build/pkgs/requests/distros/fedora.txt
+@@ -0,0 +1 @@
++python-requests
+diff --git a/build/pkgs/scipy/distros/fedora.txt b/build/pkgs/scipy/distros/fedora.txt
+new file mode 100644
+index 00000000..7ff2882
+--- /dev/null
++++ b/build/pkgs/scipy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-scipy
+diff --git a/build/pkgs/setuptools/distros/fedora.txt b/build/pkgs/setuptools/distros/fedora.txt
+new file mode 100644
+index 00000000..e1ad178
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/fedora.txt
+@@ -0,0 +1 @@
++python-setuptools
+diff --git a/build/pkgs/six/distros/fedora.txt b/build/pkgs/six/distros/fedora.txt
+new file mode 100644
+index 00000000..787c530
+--- /dev/null
++++ b/build/pkgs/six/distros/fedora.txt
+@@ -0,0 +1 @@
++python-six
+diff --git a/build/pkgs/sympy/distros/fedora.txt b/build/pkgs/sympy/distros/fedora.txt
+new file mode 100644
+index 00000000..126c88a
+--- /dev/null
++++ b/build/pkgs/sympy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-sympy
+diff --git a/build/pkgs/texttable/distros/fedora.txt b/build/pkgs/texttable/distros/fedora.txt
+new file mode 100644
+index 00000000..8d1ccec
+--- /dev/null
++++ b/build/pkgs/texttable/distros/fedora.txt
+@@ -0,0 +1 @@
++python-texttable
+diff --git a/build/pkgs/toml/distros/fedora.txt b/build/pkgs/toml/distros/fedora.txt
+new file mode 100644
+index 00000000..821ee77
+--- /dev/null
++++ b/build/pkgs/toml/distros/fedora.txt
+@@ -0,0 +1 @@
++python-toml
+diff --git a/build/pkgs/webencodings/distros/fedora.txt b/build/pkgs/webencodings/distros/fedora.txt
+new file mode 100644
+index 00000000..12ddba9
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/fedora.txt
+@@ -0,0 +1 @@
++python-webencodings
+diff --git a/build/pkgs/wheel/distros/fedora.txt b/build/pkgs/wheel/distros/fedora.txt
+new file mode 100644
+index 00000000..ae4cbb9
+--- /dev/null
++++ b/build/pkgs/wheel/distros/fedora.txt
+@@ -0,0 +1 @@
++python-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From ad1d5a20380b147c774903066031442f31094626 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 21:04:04 -0700
+Subject: build/pkgs: Add distros/arch.txt for Python packages
+
+---
+ build/pkgs/babel/distros/arch.txt         | 1 +
+ build/pkgs/bleach/distros/arch.txt        | 1 +
+ build/pkgs/certifi/distros/arch.txt       | 1 +
+ build/pkgs/cvxopt/distros/arch.txt        | 1 +
+ build/pkgs/decorator/distros/arch.txt     | 1 +
+ build/pkgs/html5lib/distros/arch.txt      | 1 +
+ build/pkgs/idna/distros/arch.txt          | 1 +
+ build/pkgs/matplotlib/distros/arch.txt    | 1 +
+ build/pkgs/mpmath/distros/arch.txt        | 1 +
+ build/pkgs/networkx/distros/arch.txt      | 1 +
+ build/pkgs/numpy/distros/arch.txt         | 1 +
+ build/pkgs/packaging/distros/arch.txt     | 1 +
+ build/pkgs/pandocfilters/distros/arch.txt | 1 +
+ build/pkgs/pickleshare/distros/arch.txt   | 1 +
+ build/pkgs/pillow/distros/arch.txt        | 1 +
+ build/pkgs/pluggy/distros/arch.txt        | 1 +
+ build/pkgs/py/distros/arch.txt            | 1 +
+ build/pkgs/pygments/distros/arch.txt      | 1 +
+ build/pkgs/pytz/distros/arch.txt          | 1 +
+ build/pkgs/pyzmq/distros/arch.txt         | 1 +
+ build/pkgs/requests/distros/arch.txt      | 1 +
+ build/pkgs/scipy/distros/arch.txt         | 1 +
+ build/pkgs/setuptools/distros/arch.txt    | 1 +
+ build/pkgs/six/distros/arch.txt           | 1 +
+ build/pkgs/sympy/distros/arch.txt         | 1 +
+ build/pkgs/texttable/distros/arch.txt     | 1 +
+ build/pkgs/toml/distros/arch.txt          | 1 +
+ build/pkgs/webencodings/distros/arch.txt  | 1 +
+ build/pkgs/wheel/distros/arch.txt         | 1 +
+ 29 files changed, 29 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/arch.txt
+ create mode 100644 build/pkgs/bleach/distros/arch.txt
+ create mode 100644 build/pkgs/certifi/distros/arch.txt
+ create mode 100644 build/pkgs/cvxopt/distros/arch.txt
+ create mode 100644 build/pkgs/decorator/distros/arch.txt
+ create mode 100644 build/pkgs/html5lib/distros/arch.txt
+ create mode 100644 build/pkgs/idna/distros/arch.txt
+ create mode 100644 build/pkgs/matplotlib/distros/arch.txt
+ create mode 100644 build/pkgs/mpmath/distros/arch.txt
+ create mode 100644 build/pkgs/networkx/distros/arch.txt
+ create mode 100644 build/pkgs/numpy/distros/arch.txt
+ create mode 100644 build/pkgs/packaging/distros/arch.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/arch.txt
+ create mode 100644 build/pkgs/pickleshare/distros/arch.txt
+ create mode 100644 build/pkgs/pillow/distros/arch.txt
+ create mode 100644 build/pkgs/pluggy/distros/arch.txt
+ create mode 100644 build/pkgs/py/distros/arch.txt
+ create mode 100644 build/pkgs/pygments/distros/arch.txt
+ create mode 100644 build/pkgs/pytz/distros/arch.txt
+ create mode 100644 build/pkgs/pyzmq/distros/arch.txt
+ create mode 100644 build/pkgs/requests/distros/arch.txt
+ create mode 100644 build/pkgs/scipy/distros/arch.txt
+ create mode 100644 build/pkgs/setuptools/distros/arch.txt
+ create mode 100644 build/pkgs/six/distros/arch.txt
+ create mode 100644 build/pkgs/sympy/distros/arch.txt
+ create mode 100644 build/pkgs/texttable/distros/arch.txt
+ create mode 100644 build/pkgs/toml/distros/arch.txt
+ create mode 100644 build/pkgs/webencodings/distros/arch.txt
+ create mode 100644 build/pkgs/wheel/distros/arch.txt
+
+diff --git a/build/pkgs/babel/distros/arch.txt b/build/pkgs/babel/distros/arch.txt
+new file mode 100644
+index 00000000..f2d828c
+--- /dev/null
++++ b/build/pkgs/babel/distros/arch.txt
+@@ -0,0 +1 @@
++python-babel
+diff --git a/build/pkgs/bleach/distros/arch.txt b/build/pkgs/bleach/distros/arch.txt
+new file mode 100644
+index 00000000..c5422cc
+--- /dev/null
++++ b/build/pkgs/bleach/distros/arch.txt
+@@ -0,0 +1 @@
++python-bleach
+diff --git a/build/pkgs/certifi/distros/arch.txt b/build/pkgs/certifi/distros/arch.txt
+new file mode 100644
+index 00000000..be421c8
+--- /dev/null
++++ b/build/pkgs/certifi/distros/arch.txt
+@@ -0,0 +1 @@
++python-certifi
+diff --git a/build/pkgs/cvxopt/distros/arch.txt b/build/pkgs/cvxopt/distros/arch.txt
+new file mode 100644
+index 00000000..f15770f
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/arch.txt
+@@ -0,0 +1 @@
++python-cvxopt
+diff --git a/build/pkgs/decorator/distros/arch.txt b/build/pkgs/decorator/distros/arch.txt
+new file mode 100644
+index 00000000..0795604
+--- /dev/null
++++ b/build/pkgs/decorator/distros/arch.txt
+@@ -0,0 +1 @@
++python-decorator
+diff --git a/build/pkgs/html5lib/distros/arch.txt b/build/pkgs/html5lib/distros/arch.txt
+new file mode 100644
+index 00000000..b821491
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/arch.txt
+@@ -0,0 +1 @@
++python-html5lib
+diff --git a/build/pkgs/idna/distros/arch.txt b/build/pkgs/idna/distros/arch.txt
+new file mode 100644
+index 00000000..a73e70c
+--- /dev/null
++++ b/build/pkgs/idna/distros/arch.txt
+@@ -0,0 +1 @@
++python-idna
+diff --git a/build/pkgs/matplotlib/distros/arch.txt b/build/pkgs/matplotlib/distros/arch.txt
+new file mode 100644
+index 00000000..f6d856e
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/arch.txt
+@@ -0,0 +1 @@
++python-matplotlib
+diff --git a/build/pkgs/mpmath/distros/arch.txt b/build/pkgs/mpmath/distros/arch.txt
+new file mode 100644
+index 00000000..a7dc8d5
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/arch.txt
+@@ -0,0 +1 @@
++python-mpmath
+diff --git a/build/pkgs/networkx/distros/arch.txt b/build/pkgs/networkx/distros/arch.txt
+new file mode 100644
+index 00000000..293f943
+--- /dev/null
++++ b/build/pkgs/networkx/distros/arch.txt
+@@ -0,0 +1 @@
++python-networkx
+diff --git a/build/pkgs/numpy/distros/arch.txt b/build/pkgs/numpy/distros/arch.txt
+new file mode 100644
+index 00000000..c8722b9
+--- /dev/null
++++ b/build/pkgs/numpy/distros/arch.txt
+@@ -0,0 +1 @@
++python-numpy
+diff --git a/build/pkgs/packaging/distros/arch.txt b/build/pkgs/packaging/distros/arch.txt
+new file mode 100644
+index 00000000..02ad855
+--- /dev/null
++++ b/build/pkgs/packaging/distros/arch.txt
+@@ -0,0 +1 @@
++python-packaging
+diff --git a/build/pkgs/pandocfilters/distros/arch.txt b/build/pkgs/pandocfilters/distros/arch.txt
+new file mode 100644
+index 00000000..e7a86d0
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/arch.txt
+@@ -0,0 +1 @@
++python-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/arch.txt b/build/pkgs/pickleshare/distros/arch.txt
+new file mode 100644
+index 00000000..6d991a2
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/arch.txt
+@@ -0,0 +1 @@
++python-pickleshare
+diff --git a/build/pkgs/pillow/distros/arch.txt b/build/pkgs/pillow/distros/arch.txt
+new file mode 100644
+index 00000000..86dbb1d
+--- /dev/null
++++ b/build/pkgs/pillow/distros/arch.txt
+@@ -0,0 +1 @@
++python-pillow
+diff --git a/build/pkgs/pluggy/distros/arch.txt b/build/pkgs/pluggy/distros/arch.txt
+new file mode 100644
+index 00000000..c869e54
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/arch.txt
+@@ -0,0 +1 @@
++python-pluggy
+diff --git a/build/pkgs/py/distros/arch.txt b/build/pkgs/py/distros/arch.txt
+new file mode 100644
+index 00000000..b348d39
+--- /dev/null
++++ b/build/pkgs/py/distros/arch.txt
+@@ -0,0 +1 @@
++python-py
+diff --git a/build/pkgs/pygments/distros/arch.txt b/build/pkgs/pygments/distros/arch.txt
+new file mode 100644
+index 00000000..f3e72a8
+--- /dev/null
++++ b/build/pkgs/pygments/distros/arch.txt
+@@ -0,0 +1 @@
++python-pygments
+diff --git a/build/pkgs/pytz/distros/arch.txt b/build/pkgs/pytz/distros/arch.txt
+new file mode 100644
+index 00000000..2cccc9e
+--- /dev/null
++++ b/build/pkgs/pytz/distros/arch.txt
+@@ -0,0 +1 @@
++python-pytz
+diff --git a/build/pkgs/pyzmq/distros/arch.txt b/build/pkgs/pyzmq/distros/arch.txt
+new file mode 100644
+index 00000000..23f64d1
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/arch.txt
+@@ -0,0 +1 @@
++python-pyzmq
+diff --git a/build/pkgs/requests/distros/arch.txt b/build/pkgs/requests/distros/arch.txt
+new file mode 100644
+index 00000000..93a7bc1
+--- /dev/null
++++ b/build/pkgs/requests/distros/arch.txt
+@@ -0,0 +1 @@
++python-requests
+diff --git a/build/pkgs/scipy/distros/arch.txt b/build/pkgs/scipy/distros/arch.txt
+new file mode 100644
+index 00000000..7ff2882
+--- /dev/null
++++ b/build/pkgs/scipy/distros/arch.txt
+@@ -0,0 +1 @@
++python-scipy
+diff --git a/build/pkgs/setuptools/distros/arch.txt b/build/pkgs/setuptools/distros/arch.txt
+new file mode 100644
+index 00000000..e1ad178
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/arch.txt
+@@ -0,0 +1 @@
++python-setuptools
+diff --git a/build/pkgs/six/distros/arch.txt b/build/pkgs/six/distros/arch.txt
+new file mode 100644
+index 00000000..787c530
+--- /dev/null
++++ b/build/pkgs/six/distros/arch.txt
+@@ -0,0 +1 @@
++python-six
+diff --git a/build/pkgs/sympy/distros/arch.txt b/build/pkgs/sympy/distros/arch.txt
+new file mode 100644
+index 00000000..126c88a
+--- /dev/null
++++ b/build/pkgs/sympy/distros/arch.txt
+@@ -0,0 +1 @@
++python-sympy
+diff --git a/build/pkgs/texttable/distros/arch.txt b/build/pkgs/texttable/distros/arch.txt
+new file mode 100644
+index 00000000..8d1ccec
+--- /dev/null
++++ b/build/pkgs/texttable/distros/arch.txt
+@@ -0,0 +1 @@
++python-texttable
+diff --git a/build/pkgs/toml/distros/arch.txt b/build/pkgs/toml/distros/arch.txt
+new file mode 100644
+index 00000000..821ee77
+--- /dev/null
++++ b/build/pkgs/toml/distros/arch.txt
+@@ -0,0 +1 @@
++python-toml
+diff --git a/build/pkgs/webencodings/distros/arch.txt b/build/pkgs/webencodings/distros/arch.txt
+new file mode 100644
+index 00000000..12ddba9
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/arch.txt
+@@ -0,0 +1 @@
++python-webencodings
+diff --git a/build/pkgs/wheel/distros/arch.txt b/build/pkgs/wheel/distros/arch.txt
+new file mode 100644
+index 00000000..ae4cbb9
+--- /dev/null
++++ b/build/pkgs/wheel/distros/arch.txt
+@@ -0,0 +1 @@
++python-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5087abee08f2a89ddaf422ec72a84575fe724a79 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 21:20:56 -0700
+Subject: build/pkgs: Add distros/opensuse.txt for Python packages
+
+---
+ build/pkgs/bleach/distros/opensuse.txt        | 1 +
+ build/pkgs/cvxopt/distros/opensuse.txt        | 1 +
+ build/pkgs/html5lib/distros/opensuse.txt      | 1 +
+ build/pkgs/idna/distros/opensuse.txt          | 1 +
+ build/pkgs/jinja2/distros/opensuse.txt        | 2 +-
+ build/pkgs/mpmath/distros/opensuse.txt        | 1 +
+ build/pkgs/numpy/distros/opensuse.txt         | 1 +
+ build/pkgs/packaging/distros/opensuse.txt     | 1 +
+ build/pkgs/pandocfilters/distros/opensuse.txt | 1 +
+ build/pkgs/pluggy/distros/opensuse.txt        | 1 +
+ build/pkgs/py/distros/opensuse.txt            | 1 +
+ build/pkgs/pygments/distros/opensuse.txt      | 2 +-
+ build/pkgs/sympy/distros/opensuse.txt         | 1 +
+ build/pkgs/texttable/distros/opensuse.txt     | 1 +
+ build/pkgs/toml/distros/opensuse.txt          | 1 +
+ 15 files changed, 15 insertions(+), 2 deletions(-)
+ create mode 100644 build/pkgs/bleach/distros/opensuse.txt
+ create mode 100644 build/pkgs/cvxopt/distros/opensuse.txt
+ create mode 100644 build/pkgs/html5lib/distros/opensuse.txt
+ create mode 100644 build/pkgs/idna/distros/opensuse.txt
+ create mode 100644 build/pkgs/mpmath/distros/opensuse.txt
+ create mode 100644 build/pkgs/numpy/distros/opensuse.txt
+ create mode 100644 build/pkgs/packaging/distros/opensuse.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/opensuse.txt
+ create mode 100644 build/pkgs/pluggy/distros/opensuse.txt
+ create mode 100644 build/pkgs/py/distros/opensuse.txt
+ create mode 100644 build/pkgs/sympy/distros/opensuse.txt
+ create mode 100644 build/pkgs/texttable/distros/opensuse.txt
+ create mode 100644 build/pkgs/toml/distros/opensuse.txt
+
+diff --git a/build/pkgs/bleach/distros/opensuse.txt b/build/pkgs/bleach/distros/opensuse.txt
+new file mode 100644
+index 00000000..6d37c4c
+--- /dev/null
++++ b/build/pkgs/bleach/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-bleach
+diff --git a/build/pkgs/cvxopt/distros/opensuse.txt b/build/pkgs/cvxopt/distros/opensuse.txt
+new file mode 100644
+index 00000000..2bb6ad1
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-cvxopt
+diff --git a/build/pkgs/html5lib/distros/opensuse.txt b/build/pkgs/html5lib/distros/opensuse.txt
+new file mode 100644
+index 00000000..6d7b8df
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-html5lib
+diff --git a/build/pkgs/idna/distros/opensuse.txt b/build/pkgs/idna/distros/opensuse.txt
+new file mode 100644
+index 00000000..de48e70
+--- /dev/null
++++ b/build/pkgs/idna/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-idna
+diff --git a/build/pkgs/jinja2/distros/opensuse.txt b/build/pkgs/jinja2/distros/opensuse.txt
+index 5d90a22..f2db865 100644
+--- a/build/pkgs/jinja2/distros/opensuse.txt
++++ b/build/pkgs/jinja2/distros/opensuse.txt
+@@ -1 +1 @@
+-python3-Jinja2
++python3-jinja2
+diff --git a/build/pkgs/mpmath/distros/opensuse.txt b/build/pkgs/mpmath/distros/opensuse.txt
+new file mode 100644
+index 00000000..fbc82a9
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-mpmath
+diff --git a/build/pkgs/numpy/distros/opensuse.txt b/build/pkgs/numpy/distros/opensuse.txt
+new file mode 100644
+index 00000000..79d5c5a
+--- /dev/null
++++ b/build/pkgs/numpy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-numpy
+diff --git a/build/pkgs/packaging/distros/opensuse.txt b/build/pkgs/packaging/distros/opensuse.txt
+new file mode 100644
+index 00000000..8f1c0ff
+--- /dev/null
++++ b/build/pkgs/packaging/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-packaging
+diff --git a/build/pkgs/pandocfilters/distros/opensuse.txt b/build/pkgs/pandocfilters/distros/opensuse.txt
+new file mode 100644
+index 00000000..d0d4c24
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-pandocfilters
+diff --git a/build/pkgs/pluggy/distros/opensuse.txt b/build/pkgs/pluggy/distros/opensuse.txt
+new file mode 100644
+index 00000000..43a3acf
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-pluggy
+diff --git a/build/pkgs/py/distros/opensuse.txt b/build/pkgs/py/distros/opensuse.txt
+new file mode 100644
+index 00000000..81fefe6
+--- /dev/null
++++ b/build/pkgs/py/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-py
+diff --git a/build/pkgs/pygments/distros/opensuse.txt b/build/pkgs/pygments/distros/opensuse.txt
+index 9ff5740..3ab3792 100644
+--- a/build/pkgs/pygments/distros/opensuse.txt
++++ b/build/pkgs/pygments/distros/opensuse.txt
+@@ -1 +1 @@
+-python3-Pygments
++python3-pygments
+diff --git a/build/pkgs/sympy/distros/opensuse.txt b/build/pkgs/sympy/distros/opensuse.txt
+new file mode 100644
+index 00000000..db423c8
+--- /dev/null
++++ b/build/pkgs/sympy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-sympy
+diff --git a/build/pkgs/texttable/distros/opensuse.txt b/build/pkgs/texttable/distros/opensuse.txt
+new file mode 100644
+index 00000000..8f8e7e2
+--- /dev/null
++++ b/build/pkgs/texttable/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-texttable
+diff --git a/build/pkgs/toml/distros/opensuse.txt b/build/pkgs/toml/distros/opensuse.txt
+new file mode 100644
+index 00000000..543e89d
+--- /dev/null
++++ b/build/pkgs/toml/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-toml
+-- 
+cgit v1.0-1-gd88e
+
+
+From a480ba7ace1370d106ae831e904ea22b72af1be7 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 22:45:04 -0700
+Subject: build/pkgs: Add distros/debian.txt for Python packages
+
+---
+ build/pkgs/babel/distros/debian.txt         | 1 +
+ build/pkgs/bleach/distros/debian.txt        | 1 +
+ build/pkgs/certifi/distros/debian.txt       | 1 +
+ build/pkgs/cvxopt/distros/debian.txt        | 1 +
+ build/pkgs/decorator/distros/debian.txt     | 1 +
+ build/pkgs/html5lib/distros/debian.txt      | 1 +
+ build/pkgs/idna/distros/debian.txt          | 1 +
+ build/pkgs/jinja2/distros/debian.txt        | 1 +
+ build/pkgs/matplotlib/distros/debian.txt    | 1 +
+ build/pkgs/mpmath/distros/debian.txt        | 1 +
+ build/pkgs/networkx/distros/debian.txt      | 1 +
+ build/pkgs/numpy/distros/debian.txt         | 1 +
+ build/pkgs/packaging/distros/debian.txt     | 1 +
+ build/pkgs/pandocfilters/distros/debian.txt | 1 +
+ build/pkgs/pickleshare/distros/debian.txt   | 1 +
+ build/pkgs/pillow/distros/debian.txt        | 1 +
+ build/pkgs/pluggy/distros/debian.txt        | 1 +
+ build/pkgs/py/distros/debian.txt            | 1 +
+ build/pkgs/pygments/distros/debian.txt      | 1 +
+ build/pkgs/pytz/distros/debian.txt          | 1 +
+ build/pkgs/requests/distros/debian.txt      | 1 +
+ build/pkgs/scipy/distros/debian.txt         | 1 +
+ build/pkgs/setuptools/distros/debian.txt    | 1 +
+ build/pkgs/six/distros/debian.txt           | 1 +
+ build/pkgs/sympy/distros/debian.txt         | 1 +
+ build/pkgs/texttable/distros/debian.txt     | 1 +
+ build/pkgs/toml/distros/debian.txt          | 1 +
+ build/pkgs/webencodings/distros/debian.txt  | 1 +
+ build/pkgs/wheel/distros/debian.txt         | 1 +
+ 29 files changed, 29 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/debian.txt
+ create mode 100644 build/pkgs/bleach/distros/debian.txt
+ create mode 100644 build/pkgs/certifi/distros/debian.txt
+ create mode 100644 build/pkgs/cvxopt/distros/debian.txt
+ create mode 100644 build/pkgs/decorator/distros/debian.txt
+ create mode 100644 build/pkgs/html5lib/distros/debian.txt
+ create mode 100644 build/pkgs/idna/distros/debian.txt
+ create mode 100644 build/pkgs/jinja2/distros/debian.txt
+ create mode 100644 build/pkgs/matplotlib/distros/debian.txt
+ create mode 100644 build/pkgs/mpmath/distros/debian.txt
+ create mode 100644 build/pkgs/networkx/distros/debian.txt
+ create mode 100644 build/pkgs/numpy/distros/debian.txt
+ create mode 100644 build/pkgs/packaging/distros/debian.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/debian.txt
+ create mode 100644 build/pkgs/pickleshare/distros/debian.txt
+ create mode 100644 build/pkgs/pillow/distros/debian.txt
+ create mode 100644 build/pkgs/pluggy/distros/debian.txt
+ create mode 100644 build/pkgs/py/distros/debian.txt
+ create mode 100644 build/pkgs/pygments/distros/debian.txt
+ create mode 100644 build/pkgs/pytz/distros/debian.txt
+ create mode 100644 build/pkgs/requests/distros/debian.txt
+ create mode 100644 build/pkgs/scipy/distros/debian.txt
+ create mode 100644 build/pkgs/setuptools/distros/debian.txt
+ create mode 100644 build/pkgs/six/distros/debian.txt
+ create mode 100644 build/pkgs/sympy/distros/debian.txt
+ create mode 100644 build/pkgs/texttable/distros/debian.txt
+ create mode 100644 build/pkgs/toml/distros/debian.txt
+ create mode 100644 build/pkgs/webencodings/distros/debian.txt
+ create mode 100644 build/pkgs/wheel/distros/debian.txt
+
+diff --git a/build/pkgs/babel/distros/debian.txt b/build/pkgs/babel/distros/debian.txt
+new file mode 100644
+index 00000000..e623eb6
+--- /dev/null
++++ b/build/pkgs/babel/distros/debian.txt
+@@ -0,0 +1 @@
++python3-babel
+diff --git a/build/pkgs/bleach/distros/debian.txt b/build/pkgs/bleach/distros/debian.txt
+new file mode 100644
+index 00000000..6d37c4c
+--- /dev/null
++++ b/build/pkgs/bleach/distros/debian.txt
+@@ -0,0 +1 @@
++python3-bleach
+diff --git a/build/pkgs/certifi/distros/debian.txt b/build/pkgs/certifi/distros/debian.txt
+new file mode 100644
+index 00000000..f585a82
+--- /dev/null
++++ b/build/pkgs/certifi/distros/debian.txt
+@@ -0,0 +1 @@
++python3-certifi
+diff --git a/build/pkgs/cvxopt/distros/debian.txt b/build/pkgs/cvxopt/distros/debian.txt
+new file mode 100644
+index 00000000..2bb6ad1
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/debian.txt
+@@ -0,0 +1 @@
++python3-cvxopt
+diff --git a/build/pkgs/decorator/distros/debian.txt b/build/pkgs/decorator/distros/debian.txt
+new file mode 100644
+index 00000000..46c478e
+--- /dev/null
++++ b/build/pkgs/decorator/distros/debian.txt
+@@ -0,0 +1 @@
++python3-decorator
+diff --git a/build/pkgs/html5lib/distros/debian.txt b/build/pkgs/html5lib/distros/debian.txt
+new file mode 100644
+index 00000000..6d7b8df
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/debian.txt
+@@ -0,0 +1 @@
++python3-html5lib
+diff --git a/build/pkgs/idna/distros/debian.txt b/build/pkgs/idna/distros/debian.txt
+new file mode 100644
+index 00000000..de48e70
+--- /dev/null
++++ b/build/pkgs/idna/distros/debian.txt
+@@ -0,0 +1 @@
++python3-idna
+diff --git a/build/pkgs/jinja2/distros/debian.txt b/build/pkgs/jinja2/distros/debian.txt
+new file mode 100644
+index 00000000..f2db865
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/debian.txt
+@@ -0,0 +1 @@
++python3-jinja2
+diff --git a/build/pkgs/matplotlib/distros/debian.txt b/build/pkgs/matplotlib/distros/debian.txt
+new file mode 100644
+index 00000000..1374329
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/debian.txt
+@@ -0,0 +1 @@
++python3-matplotlib
+diff --git a/build/pkgs/mpmath/distros/debian.txt b/build/pkgs/mpmath/distros/debian.txt
+new file mode 100644
+index 00000000..fbc82a9
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/debian.txt
+@@ -0,0 +1 @@
++python3-mpmath
+diff --git a/build/pkgs/networkx/distros/debian.txt b/build/pkgs/networkx/distros/debian.txt
+new file mode 100644
+index 00000000..6779066
+--- /dev/null
++++ b/build/pkgs/networkx/distros/debian.txt
+@@ -0,0 +1 @@
++python3-networkx
+diff --git a/build/pkgs/numpy/distros/debian.txt b/build/pkgs/numpy/distros/debian.txt
+new file mode 100644
+index 00000000..79d5c5a
+--- /dev/null
++++ b/build/pkgs/numpy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-numpy
+diff --git a/build/pkgs/packaging/distros/debian.txt b/build/pkgs/packaging/distros/debian.txt
+new file mode 100644
+index 00000000..8f1c0ff
+--- /dev/null
++++ b/build/pkgs/packaging/distros/debian.txt
+@@ -0,0 +1 @@
++python3-packaging
+diff --git a/build/pkgs/pandocfilters/distros/debian.txt b/build/pkgs/pandocfilters/distros/debian.txt
+new file mode 100644
+index 00000000..d0d4c24
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/debian.txt b/build/pkgs/pickleshare/distros/debian.txt
+new file mode 100644
+index 00000000..a00907d
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pickleshare
+diff --git a/build/pkgs/pillow/distros/debian.txt b/build/pkgs/pillow/distros/debian.txt
+new file mode 100644
+index 00000000..3319fcd
+--- /dev/null
++++ b/build/pkgs/pillow/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pillow
+diff --git a/build/pkgs/pluggy/distros/debian.txt b/build/pkgs/pluggy/distros/debian.txt
+new file mode 100644
+index 00000000..43a3acf
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pluggy
+diff --git a/build/pkgs/py/distros/debian.txt b/build/pkgs/py/distros/debian.txt
+new file mode 100644
+index 00000000..81fefe6
+--- /dev/null
++++ b/build/pkgs/py/distros/debian.txt
+@@ -0,0 +1 @@
++python3-py
+diff --git a/build/pkgs/pygments/distros/debian.txt b/build/pkgs/pygments/distros/debian.txt
+new file mode 100644
+index 00000000..3ab3792
+--- /dev/null
++++ b/build/pkgs/pygments/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pygments
+diff --git a/build/pkgs/pytz/distros/debian.txt b/build/pkgs/pytz/distros/debian.txt
+new file mode 100644
+index 00000000..db20908
+--- /dev/null
++++ b/build/pkgs/pytz/distros/debian.txt
+@@ -0,0 +1 @@
++python3-tz
+diff --git a/build/pkgs/requests/distros/debian.txt b/build/pkgs/requests/distros/debian.txt
+new file mode 100644
+index 00000000..43147b2
+--- /dev/null
++++ b/build/pkgs/requests/distros/debian.txt
+@@ -0,0 +1 @@
++python3-requests
+diff --git a/build/pkgs/scipy/distros/debian.txt b/build/pkgs/scipy/distros/debian.txt
+new file mode 100644
+index 00000000..12b3666
+--- /dev/null
++++ b/build/pkgs/scipy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-scipy
+diff --git a/build/pkgs/setuptools/distros/debian.txt b/build/pkgs/setuptools/distros/debian.txt
+new file mode 100644
+index 00000000..1c0901c
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/debian.txt
+@@ -0,0 +1 @@
++python3-setuptools
+diff --git a/build/pkgs/six/distros/debian.txt b/build/pkgs/six/distros/debian.txt
+new file mode 100644
+index 00000000..68ff859
+--- /dev/null
++++ b/build/pkgs/six/distros/debian.txt
+@@ -0,0 +1 @@
++python3-six
+diff --git a/build/pkgs/sympy/distros/debian.txt b/build/pkgs/sympy/distros/debian.txt
+new file mode 100644
+index 00000000..db423c8
+--- /dev/null
++++ b/build/pkgs/sympy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-sympy
+diff --git a/build/pkgs/texttable/distros/debian.txt b/build/pkgs/texttable/distros/debian.txt
+new file mode 100644
+index 00000000..8f8e7e2
+--- /dev/null
++++ b/build/pkgs/texttable/distros/debian.txt
+@@ -0,0 +1 @@
++python3-texttable
+diff --git a/build/pkgs/toml/distros/debian.txt b/build/pkgs/toml/distros/debian.txt
+new file mode 100644
+index 00000000..543e89d
+--- /dev/null
++++ b/build/pkgs/toml/distros/debian.txt
+@@ -0,0 +1 @@
++python3-toml
+diff --git a/build/pkgs/webencodings/distros/debian.txt b/build/pkgs/webencodings/distros/debian.txt
+new file mode 100644
+index 00000000..ac30c2f
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/debian.txt
+@@ -0,0 +1 @@
++python3-webencodings
+diff --git a/build/pkgs/wheel/distros/debian.txt b/build/pkgs/wheel/distros/debian.txt
+new file mode 100644
+index 00000000..3c066725
+--- /dev/null
++++ b/build/pkgs/wheel/distros/debian.txt
+@@ -0,0 +1 @@
++python3-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 93bf30d7de292551c3050e2dd74651d69ba4bd46 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 18 Oct 2021 07:50:34 -0400
+Subject: Trac #29665: add more documentation for SAGE_PYTHON_PACKAGE_CHECK().
+
+An earlier commit allows SAGE_PYTHON_PACKAGE_CHECK(package) to tweak the
+value of sage_use_system_$package if --enable-system-site-packages was
+not used. This essentially changes the default --with-system-$package=yes
+to "no" in that case. Here we update the documentation to reflect it.
+---
+ m4/sage_python_package_check.m4 | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 7ee82a7..95eefd0 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -34,6 +34,10 @@
+ #   ensure that the ./configure- and run-time views of the system
+ #   are as similar as possible.
+ #
++#   To avoid suggesting these system packages to users who have not
++#   set --enable-system-site-packages, this macro also changes the
++#   default for --with-system-foo from "yes" to "no" in that case.
++#
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
+-- 
+cgit v1.0-1-gd88e
+
+
+From d771e49d57ecdf3622434bc09cbfb87ad3bb7744 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 18 Oct 2021 07:42:46 -0400
+Subject: Trac #29665: improve SAGE_PYTHON_PACKAGE_CHECK() failure message.
+
+When --enable-system-site-packages is off, SAGE_PYTHON_PACKAGE_CHECK()
+will always install the corresponding SPKG. We improve the ./configure
+output in that case to make it clear that the decision was based on
+the value of --enable-system-site-packages and not the "real" check.
+---
+ m4/sage_python_package_check.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 95eefd0..5f0f084 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -40,7 +40,9 @@
+ #
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
++  AC_MSG_CHECKING([if --enable-system-site-packages was used])
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
++    AC_MSG_RESULT(yes)
+     AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
+ 
+     dnl We run this check inside a python venv, because that's ultimately
+@@ -94,6 +96,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
+     dnl System site packages are disabled.
++    AC_MSG_RESULT(no; skipping check)
+     sage_spkg_install_$1=yes
+ 
+     dnl We have to retroactively hack the --with-system-foo={no,yes,force}
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5bb43c1b78a1deb3364f235305937c2f823e5e18 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 24 Oct 2021 20:29:25 -0400
+Subject: Trac #29665: use sage-venv in SAGE_PYTHON_PACKAGE_CHECK().
+
+For consistency with the rest of the build system, we now use the
+build/bin/sage-venv script to create the venv in this autoconf macro
+rather than invoking $PYTHON_FOR_VENV with "-m venv" directly.
+---
+ m4/sage_python_package_check.m4 | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 5f0f084..5547b35 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -50,11 +50,11 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AC_MSG_CHECKING([if we can create a python venv in config.venv])
+ 
+     dnl Use --clear because ./configure typically clobbers its output files.
+-    AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
+-                                        --clear                dnl
+-                                        --without-pip          dnl
+-                                        config.venv            dnl
+-                                        2>&AS_MESSAGE_LOG_FD], [
++    AS_IF(["${PYTHON_FOR_VENV}" build/bin/sage-venv      dnl
++                                  --system-site-packages dnl
++                                  --clear                dnl
++                                  config.venv            dnl
++                                  2>&AS_MESSAGE_LOG_FD], [
+       AC_MSG_RESULT(yes)
+       dnl strip all comments from install-requires.txt; this should leave
+       dnl only a single line containing the version specification for this
+-- 
+cgit v1.0-1-gd88e
+
+
+From c78363d6326addff16ca5abac897949a6be72bf4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:10:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for urllib3.
+
+---
+ build/pkgs/urllib3/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/urllib3/spkg-configure.m4
+
+diff --git a/build/pkgs/urllib3/spkg-configure.m4 b/build/pkgs/urllib3/spkg-configure.m4
+new file mode 100644
+index 00000000..d7ef3e1
+--- /dev/null
++++ b/build/pkgs/urllib3/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([urllib3], [SAGE_PYTHON_PACKAGE_CHECK([urllib3])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f416d5abcae495ea8301fad024b279ea9e997b29 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:15:18 -0400
+Subject: Trac #29665: add Gentoo package information for urllib3.
+
+---
+ build/pkgs/urllib3/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/urllib3/distros/gentoo.txt
+
+diff --git a/build/pkgs/urllib3/distros/gentoo.txt b/build/pkgs/urllib3/distros/gentoo.txt
+new file mode 100644
+index 00000000..172a535
+--- /dev/null
++++ b/build/pkgs/urllib3/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/urllib3
+-- 
+cgit v1.0-1-gd88e
+
+
+From 852068b992bf7959500c650f54cb92e5b68d7ef8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:15:58 -0400
+Subject: Trac #29665: add Gentoo package information for nbformat.
+
+---
+ build/pkgs/nbformat/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbformat/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbformat/distros/gentoo.txt b/build/pkgs/nbformat/distros/gentoo.txt
+new file mode 100644
+index 00000000..006b1f2
+--- /dev/null
++++ b/build/pkgs/nbformat/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbformat
+-- 
+cgit v1.0-1-gd88e
+
+
+From 66179fd28fcc92ee840dcd87bb4db25cea968d66 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:34:16 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for nbformat.
+
+---
+ build/pkgs/nbformat/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbformat/spkg-configure.m4
+
+diff --git a/build/pkgs/nbformat/spkg-configure.m4 b/build/pkgs/nbformat/spkg-configure.m4
+new file mode 100644
+index 00000000..5a7f8c4
+--- /dev/null
++++ b/build/pkgs/nbformat/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbformat], [SAGE_PYTHON_PACKAGE_CHECK([nbformat])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 874005e81ed20f27a5f895030dcdbdfc5f73ad80 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:47:01 -0400
+Subject: Trac #29665: add Gentoo package information for zipp.
+
+---
+ build/pkgs/zipp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/zipp/distros/gentoo.txt
+
+diff --git a/build/pkgs/zipp/distros/gentoo.txt b/build/pkgs/zipp/distros/gentoo.txt
+new file mode 100644
+index 00000000..7f59450
+--- /dev/null
++++ b/build/pkgs/zipp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/zipp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0cc2a7355b5554c1fb79c742ebf02eff54465b3e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:47:35 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for zipp.
+
+---
+ build/pkgs/zipp/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/zipp/spkg-configure.m4
+
+diff --git a/build/pkgs/zipp/spkg-configure.m4 b/build/pkgs/zipp/spkg-configure.m4
+new file mode 100644
+index 00000000..0fe3a9c
+--- /dev/null
++++ b/build/pkgs/zipp/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([zipp], [SAGE_PYTHON_PACKAGE_CHECK([zipp])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6073ad8e56c21fc862749bbd84a56d543fb9458c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:48:37 -0400
+Subject: Trac #29665: add Gentoo package information for wcwidth.
+
+---
+ build/pkgs/wcwidth/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wcwidth/distros/gentoo.txt
+
+diff --git a/build/pkgs/wcwidth/distros/gentoo.txt b/build/pkgs/wcwidth/distros/gentoo.txt
+new file mode 100644
+index 00000000..edeb80b
+--- /dev/null
++++ b/build/pkgs/wcwidth/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/wcwidth
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9793d6172c64d61a015fbe61bd45863759124fad Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:51:10 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for wcwidth.
+
+---
+ build/pkgs/wcwidth/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wcwidth/spkg-configure.m4
+
+diff --git a/build/pkgs/wcwidth/spkg-configure.m4 b/build/pkgs/wcwidth/spkg-configure.m4
+new file mode 100644
+index 00000000..5bde15a
+--- /dev/null
++++ b/build/pkgs/wcwidth/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([wcwidth], [SAGE_PYTHON_PACKAGE_CHECK([wcwidth])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20232f370a43c146ca4e696c72a2cbcc498db060 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:52:36 -0400
+Subject: Trac #29665: add Gentoo package information for testpath.
+
+---
+ build/pkgs/testpath/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/testpath/distros/gentoo.txt
+
+diff --git a/build/pkgs/testpath/distros/gentoo.txt b/build/pkgs/testpath/distros/gentoo.txt
+new file mode 100644
+index 00000000..efa10a0
+--- /dev/null
++++ b/build/pkgs/testpath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/testpath
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1b0785b2aad8844e74345fe950baf097e2b43d24 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:55:22 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for testpath.
+
+---
+ build/pkgs/testpath/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/testpath/spkg-configure.m4
+
+diff --git a/build/pkgs/testpath/spkg-configure.m4 b/build/pkgs/testpath/spkg-configure.m4
+new file mode 100644
+index 00000000..d8fc2a7
+--- /dev/null
++++ b/build/pkgs/testpath/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([testpath], [SAGE_PYTHON_PACKAGE_CHECK([testpath])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 10fc3829ecd956d732b1b069fdfe81f0d6d5cdc2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:56:06 -0400
+Subject: Trac #29665: add Gentoo package information for jedi.
+
+---
+ build/pkgs/jedi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jedi/distros/gentoo.txt
+
+diff --git a/build/pkgs/jedi/distros/gentoo.txt b/build/pkgs/jedi/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c85a46
+--- /dev/null
++++ b/build/pkgs/jedi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jedi
+-- 
+cgit v1.0-1-gd88e
+
+
+From a75824d74c281c7639028ca01dabeed266f56998 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:06:37 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for jedi.
+
+---
+ build/pkgs/jedi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jedi/spkg-configure.m4
+
+diff --git a/build/pkgs/jedi/spkg-configure.m4 b/build/pkgs/jedi/spkg-configure.m4
+new file mode 100644
+index 00000000..a37dbcc
+--- /dev/null
++++ b/build/pkgs/jedi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jedi], [SAGE_PYTHON_PACKAGE_CHECK([jedi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 17af01373d43f6acbbdbc23e073e372d3fdadf8b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:07:47 -0400
+Subject: Trac #29665: add Gentoo package information for tomli.
+
+---
+ build/pkgs/tomli/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tomli/distros/gentoo.txt
+
+diff --git a/build/pkgs/tomli/distros/gentoo.txt b/build/pkgs/tomli/distros/gentoo.txt
+new file mode 100644
+index 00000000..0458e25
+--- /dev/null
++++ b/build/pkgs/tomli/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/tomli
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0d3b5994ae612be11992467c4a3f1a74b81400fe Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:08:12 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for tomli.
+
+---
+ build/pkgs/tomli/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tomli/spkg-configure.m4
+
+diff --git a/build/pkgs/tomli/spkg-configure.m4 b/build/pkgs/tomli/spkg-configure.m4
+new file mode 100644
+index 00000000..95a8b8b
+--- /dev/null
++++ b/build/pkgs/tomli/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tomli], [SAGE_PYTHON_PACKAGE_CHECK([tomli])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From dce1c515781b0eeb8eb9c2bc7aba581560c1fac1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:09:22 -0400
+Subject: Trac #29665: add Gentoo package information for defusedxml.
+
+---
+ build/pkgs/defusedxml/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/defusedxml/distros/gentoo.txt
+
+diff --git a/build/pkgs/defusedxml/distros/gentoo.txt b/build/pkgs/defusedxml/distros/gentoo.txt
+new file mode 100644
+index 00000000..2804214
+--- /dev/null
++++ b/build/pkgs/defusedxml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/defusedxml
+-- 
+cgit v1.0-1-gd88e
+
+
+From 02e1e1cd7f8bdae3ca5b7d35ce70af28a44e9b7c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:11:14 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for defusedxml.
+
+---
+ build/pkgs/defusedxml/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/defusedxml/spkg-configure.m4
+
+diff --git a/build/pkgs/defusedxml/spkg-configure.m4 b/build/pkgs/defusedxml/spkg-configure.m4
+new file mode 100644
+index 00000000..e02f345
+--- /dev/null
++++ b/build/pkgs/defusedxml/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([defusedxml], [SAGE_PYTHON_PACKAGE_CHECK([defusedxml])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e0ba4ebb5cfc637b5d26b85de9f34e0a160d2b9c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:12:22 -0400
+Subject: Trac #29665: add Gentoo package information for ipywidgets.
+
+---
+ build/pkgs/ipywidgets/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipywidgets/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipywidgets/distros/gentoo.txt b/build/pkgs/ipywidgets/distros/gentoo.txt
+new file mode 100644
+index 00000000..7c76967
+--- /dev/null
++++ b/build/pkgs/ipywidgets/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipywidgets
+-- 
+cgit v1.0-1-gd88e
+
+
+From 49df7e7d93c7a31b7c46d5d224a35fd313a29a32 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:15:53 -0400
+Subject: Trac #29665: add Gentoo package information for simplegeneric.
+
+---
+ build/pkgs/simplegeneric/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/simplegeneric/distros/gentoo.txt
+
+diff --git a/build/pkgs/simplegeneric/distros/gentoo.txt b/build/pkgs/simplegeneric/distros/gentoo.txt
+new file mode 100644
+index 00000000..a86e90d
+--- /dev/null
++++ b/build/pkgs/simplegeneric/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/simplegeneric
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2a893635d5804749e6fec7ed7289c921ecb5300a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:16:33 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for simplegeneric.
+
+---
+ build/pkgs/simplegeneric/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/simplegeneric/spkg-configure.m4
+
+diff --git a/build/pkgs/simplegeneric/spkg-configure.m4 b/build/pkgs/simplegeneric/spkg-configure.m4
+new file mode 100644
+index 00000000..13715ab
+--- /dev/null
++++ b/build/pkgs/simplegeneric/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([simplegeneric], [SAGE_PYTHON_PACKAGE_CHECK([simplegeneric])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a8fe7ecd6e3163e7d01261e5497ac452a8cc95ab Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:17:18 -0400
+Subject: Trac #29665: add Gentoo package information for imagesize.
+
+---
+ build/pkgs/imagesize/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/imagesize/distros/gentoo.txt
+
+diff --git a/build/pkgs/imagesize/distros/gentoo.txt b/build/pkgs/imagesize/distros/gentoo.txt
+new file mode 100644
+index 00000000..54350ba
+--- /dev/null
++++ b/build/pkgs/imagesize/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/imagesize
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2ad837c5dd1fca0f50ce6d5042a9344210a54f84 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:17:48 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for imagesize.
+
+---
+ build/pkgs/imagesize/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/imagesize/spkg-configure.m4
+
+diff --git a/build/pkgs/imagesize/spkg-configure.m4 b/build/pkgs/imagesize/spkg-configure.m4
+new file mode 100644
+index 00000000..20210ef
+--- /dev/null
++++ b/build/pkgs/imagesize/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([imagesize], [SAGE_PYTHON_PACKAGE_CHECK([imagesize])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bf47415b5bfca2d7bf24e20de35662bf331623b9 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:18:49 -0400
+Subject: Trac #29665: add Gentoo package information for mistune.
+
+---
+ build/pkgs/mistune/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mistune/distros/gentoo.txt
+
+diff --git a/build/pkgs/mistune/distros/gentoo.txt b/build/pkgs/mistune/distros/gentoo.txt
+new file mode 100644
+index 00000000..56f0a4e
+--- /dev/null
++++ b/build/pkgs/mistune/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/mistune
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6898a74fd0c65a40c5220ba68b4062ac6fe060c6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:21:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for mistune.
+
+---
+ build/pkgs/mistune/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mistune/spkg-configure.m4
+
+diff --git a/build/pkgs/mistune/spkg-configure.m4 b/build/pkgs/mistune/spkg-configure.m4
+new file mode 100644
+index 00000000..972f33d
+--- /dev/null
++++ b/build/pkgs/mistune/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([mistune], [SAGE_PYTHON_PACKAGE_CHECK([mistune])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 62735e4ccf2031cd39eb5e04b03bdfd97005d808 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:22:48 -0400
+Subject: Trac #29665: add Gentoo package information for backcall.
+
+---
+ build/pkgs/backcall/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/backcall/distros/gentoo.txt
+
+diff --git a/build/pkgs/backcall/distros/gentoo.txt b/build/pkgs/backcall/distros/gentoo.txt
+new file mode 100644
+index 00000000..266a222
+--- /dev/null
++++ b/build/pkgs/backcall/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/backcall
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9ef3ea42d4a33c7cdb623fa5417ae300cf323183 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:25:10 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for backcall.
+
+---
+ build/pkgs/backcall/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/backcall/spkg-configure.m4
+
+diff --git a/build/pkgs/backcall/spkg-configure.m4 b/build/pkgs/backcall/spkg-configure.m4
+new file mode 100644
+index 00000000..d6b11c4
+--- /dev/null
++++ b/build/pkgs/backcall/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([backcall], [SAGE_PYTHON_PACKAGE_CHECK([backcall])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1b3ea2a3c40fea0fb58435f5e5304368ea58dff8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:25:58 -0400
+Subject: Trac #29665: add Gentoo package information for parso.
+
+---
+ build/pkgs/parso/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/parso/distros/gentoo.txt
+
+diff --git a/build/pkgs/parso/distros/gentoo.txt b/build/pkgs/parso/distros/gentoo.txt
+new file mode 100644
+index 00000000..f9ce4c7
+--- /dev/null
++++ b/build/pkgs/parso/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/parso
+-- 
+cgit v1.0-1-gd88e
+
+
+From 963a3a2c563ec71a1f5be2395722d0e824cb0b11 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:26:22 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for parso.
+
+---
+ build/pkgs/parso/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/parso/spkg-configure.m4
+
+diff --git a/build/pkgs/parso/spkg-configure.m4 b/build/pkgs/parso/spkg-configure.m4
+new file mode 100644
+index 00000000..1ca6f1b
+--- /dev/null
++++ b/build/pkgs/parso/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([parso], [SAGE_PYTHON_PACKAGE_CHECK([parso])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 943053dfc474b6549bcc7d6ef2971ea43588b35c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:27:00 -0400
+Subject: Trac #29665: add Gentoo package information for pyparsing.
+
+---
+ build/pkgs/pyparsing/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyparsing/distros/gentoo.txt
+
+diff --git a/build/pkgs/pyparsing/distros/gentoo.txt b/build/pkgs/pyparsing/distros/gentoo.txt
+new file mode 100644
+index 00000000..ef0419f
+--- /dev/null
++++ b/build/pkgs/pyparsing/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyparsing
+-- 
+cgit v1.0-1-gd88e
+
+
+From bd682eaa2ac41dd84e7a52e2b0c5442fc8fd8919 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:27:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pyparsing.
+
+---
+ build/pkgs/pyparsing/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyparsing/spkg-configure.m4
+
+diff --git a/build/pkgs/pyparsing/spkg-configure.m4 b/build/pkgs/pyparsing/spkg-configure.m4
+new file mode 100644
+index 00000000..d2b4c00
+--- /dev/null
++++ b/build/pkgs/pyparsing/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pyparsing], [SAGE_PYTHON_PACKAGE_CHECK([pyparsing])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 74f36a9c0ec7c63b7e6c40066e42f4b15c2f978e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:17:42 -0400
+Subject: Trac #29665: add Gentoo package information for debugpy.
+
+---
+ build/pkgs/debugpy/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/debugpy/distros/gentoo.txt
+
+diff --git a/build/pkgs/debugpy/distros/gentoo.txt b/build/pkgs/debugpy/distros/gentoo.txt
+new file mode 100644
+index 00000000..8b797ce
+--- /dev/null
++++ b/build/pkgs/debugpy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/debugpy
+-- 
+cgit v1.0-1-gd88e
+
+
+From be072fa87ac5c373d9dc9b54c0bd68734d5709bc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:21:17 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for debugpy.
+
+---
+ build/pkgs/debugpy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/debugpy/spkg-configure.m4
+
+diff --git a/build/pkgs/debugpy/spkg-configure.m4 b/build/pkgs/debugpy/spkg-configure.m4
+new file mode 100644
+index 00000000..db605ff
+--- /dev/null
++++ b/build/pkgs/debugpy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([debugpy], [SAGE_PYTHON_PACKAGE_CHECK([debugpy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6f777ce2f2e14b94e91c8b7bbac82f9017460aba Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:23:56 -0400
+Subject: Trac #29665: add Gentoo package information for tzlocal.
+
+---
+ build/pkgs/tzlocal/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tzlocal/distros/gentoo.txt
+
+diff --git a/build/pkgs/tzlocal/distros/gentoo.txt b/build/pkgs/tzlocal/distros/gentoo.txt
+new file mode 100644
+index 00000000..2018442
+--- /dev/null
++++ b/build/pkgs/tzlocal/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/tzlocal
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3bd078fc15ae13982249452711baafae91038191 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:24:51 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for tzlocal.
+
+---
+ build/pkgs/tzlocal/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tzlocal/spkg-configure.m4
+
+diff --git a/build/pkgs/tzlocal/spkg-configure.m4 b/build/pkgs/tzlocal/spkg-configure.m4
+new file mode 100644
+index 00000000..e020b28
+--- /dev/null
++++ b/build/pkgs/tzlocal/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tzlocal], [SAGE_PYTHON_PACKAGE_CHECK([tzlocal])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 91b0882fc62214923da9ee7b6dccb05d8a1d11d1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:26:13 -0400
+Subject: Trac #29665: add Gentoo package information for pycparser.
+
+---
+ build/pkgs/pycparser/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pycparser/distros/gentoo.txt
+
+diff --git a/build/pkgs/pycparser/distros/gentoo.txt b/build/pkgs/pycparser/distros/gentoo.txt
+new file mode 100644
+index 00000000..5e87307
+--- /dev/null
++++ b/build/pkgs/pycparser/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pycparser
+-- 
+cgit v1.0-1-gd88e
+
+
+From beabde92fe6e057faf516fe82d27f1e903e55ce6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:27:27 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pycparser.
+
+---
+ build/pkgs/pycparser/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pycparser/spkg-configure.m4
+
+diff --git a/build/pkgs/pycparser/spkg-configure.m4 b/build/pkgs/pycparser/spkg-configure.m4
+new file mode 100644
+index 00000000..4b9b900
+--- /dev/null
++++ b/build/pkgs/pycparser/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pycparser], [SAGE_PYTHON_PACKAGE_CHECK([pycparser])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 86c2788dc7fd1169314e9598c91fa81045553677 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:29:36 -0400
+Subject: Trac #29665: add Gentoo package information for cycler.
+
+---
+ build/pkgs/cycler/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cycler/distros/gentoo.txt
+
+diff --git a/build/pkgs/cycler/distros/gentoo.txt b/build/pkgs/cycler/distros/gentoo.txt
+new file mode 100644
+index 00000000..4b21543
+--- /dev/null
++++ b/build/pkgs/cycler/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/cycler
+-- 
+cgit v1.0-1-gd88e
+
+
+From 67c5a944101ddf329f0a61c61d4e784f58a5c5b0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:30:27 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for cycler.
+
+---
+ build/pkgs/cycler/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cycler/spkg-configure.m4
+
+diff --git a/build/pkgs/cycler/spkg-configure.m4 b/build/pkgs/cycler/spkg-configure.m4
+new file mode 100644
+index 00000000..239571a
+--- /dev/null
++++ b/build/pkgs/cycler/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([cycler], [SAGE_PYTHON_PACKAGE_CHECK([cycler])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ef6d490251abfa41f7a0910274700a8a6a65f629 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:31:19 -0400
+Subject: Trac #29665: add Gentoo package information for traitlets.
+
+---
+ build/pkgs/traitlets/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/traitlets/distros/gentoo.txt
+
+diff --git a/build/pkgs/traitlets/distros/gentoo.txt b/build/pkgs/traitlets/distros/gentoo.txt
+new file mode 100644
+index 00000000..46bfaab
+--- /dev/null
++++ b/build/pkgs/traitlets/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/traitlets
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1f922b458d34088d9f6773312209e69f19ee45dc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:31:50 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for traitlets.
+
+---
+ build/pkgs/traitlets/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/traitlets/spkg-configure.m4
+
+diff --git a/build/pkgs/traitlets/spkg-configure.m4 b/build/pkgs/traitlets/spkg-configure.m4
+new file mode 100644
+index 00000000..df2382b
+--- /dev/null
++++ b/build/pkgs/traitlets/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([traitlets], [SAGE_PYTHON_PACKAGE_CHECK([traitlets])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 95b89a9ced0acb6d971a27fa63b97ea58a11f4e1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:33:35 -0400
+Subject: Trac #29665: add Gentoo package information for argcomplete.
+
+---
+ build/pkgs/argcomplete/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argcomplete/distros/gentoo.txt
+
+diff --git a/build/pkgs/argcomplete/distros/gentoo.txt b/build/pkgs/argcomplete/distros/gentoo.txt
+new file mode 100644
+index 00000000..b150949
+--- /dev/null
++++ b/build/pkgs/argcomplete/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/argcomplete
+-- 
+cgit v1.0-1-gd88e
+
+
+From b4cd8ef384e6e5bae0de0f3c113fb5f9e6e1a71e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:34:14 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for argcomplete.
+
+---
+ build/pkgs/argcomplete/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argcomplete/spkg-configure.m4
+
+diff --git a/build/pkgs/argcomplete/spkg-configure.m4 b/build/pkgs/argcomplete/spkg-configure.m4
+new file mode 100644
+index 00000000..cbd7ccf
+--- /dev/null
++++ b/build/pkgs/argcomplete/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([argcomplete], [SAGE_PYTHON_PACKAGE_CHECK([argcomplete])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4cc610e8331970cc018d7ea87af928fa73a292c1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:36:21 -0400
+Subject: Trac #29665: add Gentoo package information for ptyprocess.
+
+---
+ build/pkgs/ptyprocess/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ptyprocess/distros/gentoo.txt
+
+diff --git a/build/pkgs/ptyprocess/distros/gentoo.txt b/build/pkgs/ptyprocess/distros/gentoo.txt
+new file mode 100644
+index 00000000..571a851
+--- /dev/null
++++ b/build/pkgs/ptyprocess/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ptyprocess
+-- 
+cgit v1.0-1-gd88e
+
+
+From cd15f97221bf5933b07900e4f77cb55401eede26 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:37:02 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ptyprocess.
+
+---
+ build/pkgs/ptyprocess/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ptyprocess/spkg-configure.m4
+
+diff --git a/build/pkgs/ptyprocess/spkg-configure.m4 b/build/pkgs/ptyprocess/spkg-configure.m4
+new file mode 100644
+index 00000000..bfacbae
+--- /dev/null
++++ b/build/pkgs/ptyprocess/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ptyprocess], [SAGE_PYTHON_PACKAGE_CHECK([ptyprocess])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb5f45b15f99e4ba28e1b1f6042a0e8ea17f1dfc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:38:22 -0400
+Subject: Trac #29665: add Gentoo package information for attrs.
+
+---
+ build/pkgs/attrs/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/attrs/distros/gentoo.txt
+
+diff --git a/build/pkgs/attrs/distros/gentoo.txt b/build/pkgs/attrs/distros/gentoo.txt
+new file mode 100644
+index 00000000..3b906fa
+--- /dev/null
++++ b/build/pkgs/attrs/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/attrs
+-- 
+cgit v1.0-1-gd88e
+
+
+From 321707ebf8e9af1e4ac3a5b5b094b4226bb3a7a5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:38:55 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for attrs.
+
+---
+ build/pkgs/attrs/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/attrs/spkg-configure.m4
+
+diff --git a/build/pkgs/attrs/spkg-configure.m4 b/build/pkgs/attrs/spkg-configure.m4
+new file mode 100644
+index 00000000..ba6a9b7
+--- /dev/null
++++ b/build/pkgs/attrs/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([attrs], [SAGE_PYTHON_PACKAGE_CHECK([attrs])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 69a498a4e8854ecdfc2f1a134104983c0dcb9e32 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:40:09 -0400
+Subject: Trac #29665: add Gentoo package information for send2trash.
+
+---
+ build/pkgs/send2trash/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/send2trash/distros/gentoo.txt
+
+diff --git a/build/pkgs/send2trash/distros/gentoo.txt b/build/pkgs/send2trash/distros/gentoo.txt
+new file mode 100644
+index 00000000..a89b179
+--- /dev/null
++++ b/build/pkgs/send2trash/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/send2trash
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9baed17c84e1bdf5abd17c20766e5cd7dddc5b53 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:41:45 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for send2trash.
+
+---
+ build/pkgs/send2trash/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/send2trash/spkg-configure.m4
+
+diff --git a/build/pkgs/send2trash/spkg-configure.m4 b/build/pkgs/send2trash/spkg-configure.m4
+new file mode 100644
+index 00000000..3bbb727
+--- /dev/null
++++ b/build/pkgs/send2trash/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([send2trash], [SAGE_PYTHON_PACKAGE_CHECK([send2trash])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b9b552b2a2aaccaeb7c5b25be0b681f107522d09 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:43:27 -0400
+Subject: Trac #29665: add Gentoo package information for pyrsistent.
+
+---
+ build/pkgs/pyrsistent/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyrsistent/distros/gentoo.txt
+
+diff --git a/build/pkgs/pyrsistent/distros/gentoo.txt b/build/pkgs/pyrsistent/distros/gentoo.txt
+new file mode 100644
+index 00000000..83439ce
+--- /dev/null
++++ b/build/pkgs/pyrsistent/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyrsistent
+-- 
+cgit v1.0-1-gd88e
+
+
+From a17b31fac6104852762f57daa749443147bdf121 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:44:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pyrsistent.
+
+---
+ build/pkgs/pyrsistent/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyrsistent/spkg-configure.m4
+
+diff --git a/build/pkgs/pyrsistent/spkg-configure.m4 b/build/pkgs/pyrsistent/spkg-configure.m4
+new file mode 100644
+index 00000000..f7ca75d
+--- /dev/null
++++ b/build/pkgs/pyrsistent/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pyrsistent], [SAGE_PYTHON_PACKAGE_CHECK([pyrsistent])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 68520decad6d6937918d7a6af65ca5bd476e5d02 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:45:45 -0400
+Subject: Trac #29665: add Gentoo package information for entrypoints.
+
+---
+ build/pkgs/entrypoints/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/entrypoints/distros/gentoo.txt
+
+diff --git a/build/pkgs/entrypoints/distros/gentoo.txt b/build/pkgs/entrypoints/distros/gentoo.txt
+new file mode 100644
+index 00000000..684ddd0
+--- /dev/null
++++ b/build/pkgs/entrypoints/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/entrypoints
+-- 
+cgit v1.0-1-gd88e
+
+
+From 34213eccb642a6bad64d89acaefa83ee702cb483 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:46:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for entrypoints.
+
+---
+ build/pkgs/entrypoints/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/entrypoints/spkg-configure.m4
+
+diff --git a/build/pkgs/entrypoints/spkg-configure.m4 b/build/pkgs/entrypoints/spkg-configure.m4
+new file mode 100644
+index 00000000..caed658
+--- /dev/null
++++ b/build/pkgs/entrypoints/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([entrypoints], [SAGE_PYTHON_PACKAGE_CHECK([entrypoints])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8e985614345da1a58fcdc127a9c0ddd790f9b5d2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:48:26 -0400
+Subject: Trac #29665: add Gentoo package information for markupsafe.
+
+---
+ build/pkgs/markupsafe/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/markupsafe/distros/gentoo.txt
+
+diff --git a/build/pkgs/markupsafe/distros/gentoo.txt b/build/pkgs/markupsafe/distros/gentoo.txt
+new file mode 100644
+index 00000000..9654e35
+--- /dev/null
++++ b/build/pkgs/markupsafe/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/markupsafe
+-- 
+cgit v1.0-1-gd88e
+
+
+From d370f229ae0988856f2e0d1f6ee2df2c47169106 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:48:55 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for markupsafe.
+
+---
+ build/pkgs/markupsafe/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/markupsafe/spkg-configure.m4
+
+diff --git a/build/pkgs/markupsafe/spkg-configure.m4 b/build/pkgs/markupsafe/spkg-configure.m4
+new file mode 100644
+index 00000000..79eb8db
+--- /dev/null
++++ b/build/pkgs/markupsafe/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([markupsafe], [SAGE_PYTHON_PACKAGE_CHECK([markupsafe])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c49b285ad9e25e6bc81a7e75d461d234fdd3ea68 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:30:49 -0400
+Subject: Trac #29665: add Gentoo package information for flit_core.
+
+---
+ build/pkgs/flit_core/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/flit_core/distros/gentoo.txt
+
+diff --git a/build/pkgs/flit_core/distros/gentoo.txt b/build/pkgs/flit_core/distros/gentoo.txt
+new file mode 100644
+index 00000000..fe6bea9
+--- /dev/null
++++ b/build/pkgs/flit_core/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/flit_core
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b0ce1c4f23cd9fc4316e1eb2b9b4bde394957f3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:32:11 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for flit_core.
+
+---
+ build/pkgs/flit_core/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/flit_core/spkg-configure.m4
+
+diff --git a/build/pkgs/flit_core/spkg-configure.m4 b/build/pkgs/flit_core/spkg-configure.m4
+new file mode 100644
+index 00000000..ee67557
+--- /dev/null
++++ b/build/pkgs/flit_core/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([flit_core], [SAGE_PYTHON_PACKAGE_CHECK([flit_core])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f006c231a81428b1e1e792f889bf974f90e3c831 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:34:06 -0400
+Subject: Trac #29665: add Gentoo package information for nest_asyncio.
+
+---
+ build/pkgs/nest_asyncio/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nest_asyncio/distros/gentoo.txt
+
+diff --git a/build/pkgs/nest_asyncio/distros/gentoo.txt b/build/pkgs/nest_asyncio/distros/gentoo.txt
+new file mode 100644
+index 00000000..ab742d2
+--- /dev/null
++++ b/build/pkgs/nest_asyncio/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nest_asyncio
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4a58d0a96a84475e765a01a64f5f44c48a317e0b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:34:43 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for nest_asyncio.
+
+---
+ build/pkgs/nest_asyncio/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nest_asyncio/spkg-configure.m4
+
+diff --git a/build/pkgs/nest_asyncio/spkg-configure.m4 b/build/pkgs/nest_asyncio/spkg-configure.m4
+new file mode 100644
+index 00000000..4d81527
+--- /dev/null
++++ b/build/pkgs/nest_asyncio/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nest_asyncio], [SAGE_PYTHON_PACKAGE_CHECK([nest_asyncio])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e50af937777ea778908bc09a7a79db3dd80fdf25 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:37:02 -0400
+Subject: Trac #29665: add Gentoo package information for ipython_genutils.
+
+---
+ build/pkgs/ipython_genutils/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython_genutils/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipython_genutils/distros/gentoo.txt b/build/pkgs/ipython_genutils/distros/gentoo.txt
+new file mode 100644
+index 00000000..01bc49d
+--- /dev/null
++++ b/build/pkgs/ipython_genutils/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipython_genutils
+-- 
+cgit v1.0-1-gd88e
+
+
+From ec3c0ce9db2ba13c1a49d1bcfb7a4b249cb7ae83 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:39:20 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipython_genutils.
+
+---
+ build/pkgs/ipython_genutils/spkg-configure.m4 | 4 ++++
+ 1 file changed, 4 insertions(+)
+ create mode 100644 build/pkgs/ipython_genutils/spkg-configure.m4
+
+diff --git a/build/pkgs/ipython_genutils/spkg-configure.m4 b/build/pkgs/ipython_genutils/spkg-configure.m4
+new file mode 100644
+index 00000000..b0ba86a
+--- /dev/null
++++ b/build/pkgs/ipython_genutils/spkg-configure.m4
+@@ -0,0 +1,4 @@
++SAGE_SPKG_CONFIGURE(
++  [ipython_genutils],
++  [SAGE_PYTHON_PACKAGE_CHECK([ipython_genutils])]
++)
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5c9e2e265115e5f10d4b459a475467e30b4bddde Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:40:03 -0400
+Subject: Trac #29665: add Gentoo package information for ipython.
+
+---
+ build/pkgs/ipython/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipython/distros/gentoo.txt b/build/pkgs/ipython/distros/gentoo.txt
+new file mode 100644
+index 00000000..8b76f18
+--- /dev/null
++++ b/build/pkgs/ipython/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipython
+-- 
+cgit v1.0-1-gd88e
+
+
+From 621e707ddd040a902d7dddf0bed1de2b54ab22f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 07:37:56 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipython.
+
+---
+ build/pkgs/ipython/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython/spkg-configure.m4
+
+diff --git a/build/pkgs/ipython/spkg-configure.m4 b/build/pkgs/ipython/spkg-configure.m4
+new file mode 100644
+index 00000000..02ab89f
+--- /dev/null
++++ b/build/pkgs/ipython/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipython], [SAGE_PYTHON_PACKAGE_CHECK([ipython])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20a0613f6d441da436f3e7b8047a72bf490882bd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 07:51:11 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipywidgets.
+
+---
+ build/pkgs/ipywidgets/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipywidgets/spkg-configure.m4
+
+diff --git a/build/pkgs/ipywidgets/spkg-configure.m4 b/build/pkgs/ipywidgets/spkg-configure.m4
+new file mode 100644
+index 00000000..51ca9be
+--- /dev/null
++++ b/build/pkgs/ipywidgets/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipywidgets], [SAGE_PYTHON_PACKAGE_CHECK([ipywidgets])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 76bcd386633acc02a1a3026339d0cbd258ada04e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 10:05:16 -0400
+Subject: Trac #29665: add Gentoo package information for wheel.
+
+---
+ build/pkgs/wheel/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wheel/distros/gentoo.txt
+
+diff --git a/build/pkgs/wheel/distros/gentoo.txt b/build/pkgs/wheel/distros/gentoo.txt
+new file mode 100644
+index 00000000..ec571d5
+--- /dev/null
++++ b/build/pkgs/wheel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 96c2dd2ca7812f5333bb9d45eadb7ac408e364ce Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:51:44 -0500
+Subject: Trac #29665: add Gentoo package information for terminado.
+
+---
+ build/pkgs/terminado/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/terminado/distros/gentoo.txt
+
+diff --git a/build/pkgs/terminado/distros/gentoo.txt b/build/pkgs/terminado/distros/gentoo.txt
+new file mode 100644
+index 00000000..1df16f1
+--- /dev/null
++++ b/build/pkgs/terminado/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/terminado
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0de0f5f3d235a4339b21e37ea13c9f5e59a82e59 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:52:35 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for terminado.
+
+---
+ build/pkgs/terminado/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/terminado/spkg-configure.m4
+
+diff --git a/build/pkgs/terminado/spkg-configure.m4 b/build/pkgs/terminado/spkg-configure.m4
+new file mode 100644
+index 00000000..5defc2f
+--- /dev/null
++++ b/build/pkgs/terminado/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([terminado], [SAGE_PYTHON_PACKAGE_CHECK([terminado])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d14a745c770b02822557e7cee0a98de1cb2f3a12 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:56:15 -0500
+Subject: Trac #29665: add Gentoo package information for cffi.
+
+---
+ build/pkgs/cffi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cffi/distros/gentoo.txt
+
+diff --git a/build/pkgs/cffi/distros/gentoo.txt b/build/pkgs/cffi/distros/gentoo.txt
+new file mode 100644
+index 00000000..81eeb81
+--- /dev/null
++++ b/build/pkgs/cffi/distros/gentoo.txt
+@@ -0,0 +1 @@
++virtual/python-cffi
+-- 
+cgit v1.0-1-gd88e
+
+
+From ce393c04afc69fe050e38f780d4e117164687d80 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:57:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for cffi.
+
+---
+ build/pkgs/cffi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cffi/spkg-configure.m4
+
+diff --git a/build/pkgs/cffi/spkg-configure.m4 b/build/pkgs/cffi/spkg-configure.m4
+new file mode 100644
+index 00000000..dc81875
+--- /dev/null
++++ b/build/pkgs/cffi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([cffi], [SAGE_PYTHON_PACKAGE_CHECK([cffi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 467093315b3fdd57c8caa2f95cf99ad52b0b84fb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:57:57 -0500
+Subject: Trac #29665: add Gentoo package information for pip.
+
+---
+ build/pkgs/pip/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pip/distros/gentoo.txt
+
+diff --git a/build/pkgs/pip/distros/gentoo.txt b/build/pkgs/pip/distros/gentoo.txt
+new file mode 100644
+index 00000000..1845454
+--- /dev/null
++++ b/build/pkgs/pip/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pip[vanilla]
+-- 
+cgit v1.0-1-gd88e
+
+
+From c597fd23f9f68dabbcb7e698d0569c3e6458f6d1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 09:07:26 -0500
+Subject: Trac #29665: new spkg-configure.m4 for pip.
+
+---
+ build/pkgs/pip/spkg-configure.m4 | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+ create mode 100644 build/pkgs/pip/spkg-configure.m4
+
+diff --git a/build/pkgs/pip/spkg-configure.m4 b/build/pkgs/pip/spkg-configure.m4
+new file mode 100644
+index 00000000..c7a5562
+--- /dev/null
++++ b/build/pkgs/pip/spkg-configure.m4
+@@ -0,0 +1,12 @@
++SAGE_SPKG_CONFIGURE([pip], [
++  dnl always run this macro because it changes the default value of
++  dnl the --with-system-<package> option.
++  SAGE_PYTHON_PACKAGE_CHECK([pip])
++
++  dnl if we might not install the spkg, make sure that "pip" is in
++  dnl the user's PATH, too.
++  AS_IF([test "x$sage_spkg_install_pip" != "xyes"], [
++    AC_CHECK_PROG(HAVE_PIP, pip, yes, no)
++    AS_IF([test "x$HAVE_PIP" = "xno"], [sage_spkg_install_pip=yes])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ef8f1e807bc55d7b8321777486fa867a7c135419 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 9 Nov 2021 09:09:04 -0500
+Subject: Trac #29665: set $SAGE_PIP_INSTALL_FLAGS for
+ --enable-system-site-packages.
+
+We need to pass some special flags to "pip install" to make it do the
+right thing in the precence of system-site packages. Here we introduce
+a new autoconf variable, SAGE_PIP_INSTALL_FLAGS, that will be used
+to pass those flags to the build system.
+
+With autoconf aware of the variable, we substitute its value into the
+sage-build-env-config script for use in spkg-install.in.
+---
+ build/bin/sage-build-env-config.in | 1 +
+ configure.ac                       | 9 +++++++++
+ 2 files changed, 10 insertions(+)
+
+diff --git a/build/bin/sage-build-env-config.in b/build/bin/sage-build-env-config.in
+index 92e7dad..ad62e5f 100644
+--- a/build/bin/sage-build-env-config.in
++++ b/build/bin/sage-build-env-config.in
+@@ -53,6 +53,7 @@ export SAGE_PARI_CFG="@SAGE_PARI_CFG@"
+ 
+ export SAGE_GLPK_PREFIX="@SAGE_GLPK_PREFIX@"
+ export SAGE_FREETYPE_PREFIX="@SAGE_FREETYPE_PREFIX@"
++export SAGE_PIP_INSTALL_FLAGS="@SAGE_PIP_INSTALL_FLAGS@"
+ export SAGE_SUITESPARSE_PREFIX="@SAGE_SUITESPARSE_PREFIX@"
+ 
+ export SAGE_CONFIGURE_FFLAS_FFPACK="@SAGE_CONFIGURE_FFLAS_FFPACK@"
+diff --git a/configure.ac b/configure.ac
+index 6fafb83..6ed07ac 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -441,6 +441,14 @@ AC_ARG_ENABLE(
+     [allow the use of python packages from the system (experimental; default: no)]
+   )], [
+   AS_IF([test "x$enable_system_site_packages" = "xyes"], [
++    dnl When installing python SPKGs in the presence of system-site
++    dnl packages, we need to --ignore-installed so that a patched SPKG
++    dnl can be installed in the presence of an unpatched system package
++    dnl that appears (to pip) to be identical. The --no-deps flag is
++    dnl then needed because --ignore-installed will make any installed
++    dnl dependencies invisible to pip, who does not appreciate that.
++    SAGE_PIP_INSTALL_FLAGS="${SAGE_PIP_INSTALL_FLAGS} --no-deps --ignore-installed"
++
+     SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
+ 
+     dnl We want to raise an error if the user asked for "system site
+@@ -453,6 +461,7 @@ AC_ARG_ENABLE(
+     with_system_python3="force"
+   ])
+ ])
++AC_SUBST([SAGE_PIP_INSTALL_FLAGS])
+ AC_SUBST([SAGE_VENV_FLAGS])
+ 
+ SAGE_SPKG_OPTIONS=""
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3cf365fef84e809e74abd2eb388e7a8e9af9d739 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 9 Nov 2021 21:01:58 -0500
+Subject: Trac #29665: pass $SAGE_PIP_INSTALL_FLAGS to sdh_pip_install.
+
+Since sdh_pip_install is usually called from spkg-install.in, the
+variables from sage-build-env-config will be available. Here we pass
+the contents of $SAGE_PIP_INSTALL_FLAGS to sage-pip-install
+unconditionally, and hope that the user ignores this variable unless
+he truly knows what he is doing.
+---
+ build/bin/sage-dist-helpers | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/build/bin/sage-dist-helpers b/build/bin/sage-dist-helpers
+index fe364e5..1032ac3 100644
+--- a/build/bin/sage-dist-helpers
++++ b/build/bin/sage-dist-helpers
+@@ -303,7 +303,11 @@ sdh_store_wheel() {
+ }
+ 
+ sdh_store_and_pip_install_wheel() {
+-    local pip_options=""
++    # The $SAGE_PIP_INSTALL_FLAGS variable is set by sage-build-env-config.
++    # We skip sanity checking its contents since you should either let sage
++    # decide what it contains, or really know what you are doing.
++    local pip_options="${SAGE_PIP_INSTALL_FLAGS}"
++
+     while [ $# -gt 0 ]; do
+         case $1 in
+             -*) pip_options="$pip_options $1"
+-- 
+cgit v1.0-1-gd88e
+
+
+From 50f0438ee857b8f0b7d7ad924e6bba9c5e1bc033 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:10:46 -0500
+Subject: Trac #29665: add Gentoo package information for pexpect.
+
+---
+ build/pkgs/pexpect/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pexpect/distros/gentoo.txt
+
+diff --git a/build/pkgs/pexpect/distros/gentoo.txt b/build/pkgs/pexpect/distros/gentoo.txt
+new file mode 100644
+index 00000000..30c4b60
+--- /dev/null
++++ b/build/pkgs/pexpect/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pexpect
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4d784688d997290b462646fa7f36114a41f3f453 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:11:25 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pexpect.
+
+---
+ build/pkgs/pexpect/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pexpect/spkg-configure.m4
+
+diff --git a/build/pkgs/pexpect/spkg-configure.m4 b/build/pkgs/pexpect/spkg-configure.m4
+new file mode 100644
+index 00000000..6520856
+--- /dev/null
++++ b/build/pkgs/pexpect/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pexpect], [SAGE_PYTHON_PACKAGE_CHECK([pexpect])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6447122dc76a3b7a58340dbed942db66530b5b07 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:12:05 -0500
+Subject: Trac #29665: add Gentoo package information for docutils.
+
+---
+ build/pkgs/docutils/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/docutils/distros/gentoo.txt
+
+diff --git a/build/pkgs/docutils/distros/gentoo.txt b/build/pkgs/docutils/distros/gentoo.txt
+new file mode 100644
+index 00000000..fe4a452
+--- /dev/null
++++ b/build/pkgs/docutils/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/docutils
+-- 
+cgit v1.0-1-gd88e
+
+
+From 709041480a5fc729b0ee7f1a8a3b16d4d65321b5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:12:38 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for docutils.
+
+---
+ build/pkgs/docutils/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/docutils/spkg-configure.m4
+
+diff --git a/build/pkgs/docutils/spkg-configure.m4 b/build/pkgs/docutils/spkg-configure.m4
+new file mode 100644
+index 00000000..3584e45
+--- /dev/null
++++ b/build/pkgs/docutils/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([docutils], [SAGE_PYTHON_PACKAGE_CHECK([docutils])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 782d38b48ab87afccc43fbc071e7b7ed48fb0a20 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:14:37 -0500
+Subject: Trac #29665: add Gentoo package information for nbclient.
+
+---
+ build/pkgs/nbclient/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbclient/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbclient/distros/gentoo.txt b/build/pkgs/nbclient/distros/gentoo.txt
+new file mode 100644
+index 00000000..06ff18d
+--- /dev/null
++++ b/build/pkgs/nbclient/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbclient
+-- 
+cgit v1.0-1-gd88e
+
+
+From 19ce09336532336f69db74381932d51a429dfaca Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:15:11 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for nbclient.
+
+---
+ build/pkgs/nbclient/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbclient/spkg-configure.m4
+
+diff --git a/build/pkgs/nbclient/spkg-configure.m4 b/build/pkgs/nbclient/spkg-configure.m4
+new file mode 100644
+index 00000000..14178b7
+--- /dev/null
++++ b/build/pkgs/nbclient/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbclient], [SAGE_PYTHON_PACKAGE_CHECK([nbclient])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c063b9de42c1780368000a563d0dbe80b6fff169 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:17:36 -0500
+Subject: Trac #29665: add Gentoo package information for argon2_cffi.
+
+---
+ build/pkgs/argon2_cffi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argon2_cffi/distros/gentoo.txt
+
+diff --git a/build/pkgs/argon2_cffi/distros/gentoo.txt b/build/pkgs/argon2_cffi/distros/gentoo.txt
+new file mode 100644
+index 00000000..2f12ca8
+--- /dev/null
++++ b/build/pkgs/argon2_cffi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/argon2-cffi
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0b4d5699dd51ea52550fba7db9e1cbb8bbac1892 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:18:35 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for argon2_cffi.
+
+---
+ build/pkgs/argon2_cffi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argon2_cffi/spkg-configure.m4
+
+diff --git a/build/pkgs/argon2_cffi/spkg-configure.m4 b/build/pkgs/argon2_cffi/spkg-configure.m4
+new file mode 100644
+index 00000000..03ebc63
+--- /dev/null
++++ b/build/pkgs/argon2_cffi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([argon2_cffi], [SAGE_PYTHON_PACKAGE_CHECK([argon2_cffi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2b4119558a6e0b1aa512848539a237676b035c83 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:30:48 -0500
+Subject: Trac #29665: fix package name in dateutil's install-requires.txt.
+
+---
+ build/pkgs/dateutil/install-requires.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/build/pkgs/dateutil/install-requires.txt b/build/pkgs/dateutil/install-requires.txt
+index 0ae93da..face537 100644
+--- a/build/pkgs/dateutil/install-requires.txt
++++ b/build/pkgs/dateutil/install-requires.txt
+@@ -1 +1 @@
+-dateutil >=2.8.1
++python-dateutil >=2.8.1
+-- 
+cgit v1.0-1-gd88e
+
+
+From df371b7c4d20a3353d43940306ad22e11aba29da Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:31:41 -0500
+Subject: Trac #29665: add Gentoo package information for dateutil.
+
+---
+ build/pkgs/dateutil/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/dateutil/distros/gentoo.txt
+
+diff --git a/build/pkgs/dateutil/distros/gentoo.txt b/build/pkgs/dateutil/distros/gentoo.txt
+new file mode 100644
+index 00000000..e129df7
+--- /dev/null
++++ b/build/pkgs/dateutil/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/python-dateutil
+-- 
+cgit v1.0-1-gd88e
+
+
+From 577695dfdf661ee26c0ffd767bdbf479d95f7fb4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:32:21 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for dateutil.
+
+---
+ build/pkgs/dateutil/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/dateutil/spkg-configure.m4
+
+diff --git a/build/pkgs/dateutil/spkg-configure.m4 b/build/pkgs/dateutil/spkg-configure.m4
+new file mode 100644
+index 00000000..fdcd127
+--- /dev/null
++++ b/build/pkgs/dateutil/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([dateutil], [SAGE_PYTHON_PACKAGE_CHECK([dateutil])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1984651caac624ec4bb58814ca1d57fe66f9881a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:33:51 -0500
+Subject: Trac #29665: add Gentoo package information for setuptools_scm.
+
+---
+ build/pkgs/setuptools_scm/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/setuptools_scm/distros/gentoo.txt
+
+diff --git a/build/pkgs/setuptools_scm/distros/gentoo.txt b/build/pkgs/setuptools_scm/distros/gentoo.txt
+new file mode 100644
+index 00000000..8989597
+--- /dev/null
++++ b/build/pkgs/setuptools_scm/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/setuptools_scm
+-- 
+cgit v1.0-1-gd88e
+
+
+From ebf7c854ed966e7353759be485c4f5a57b9a10fa Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:34:49 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for setuptools_scm.
+
+---
+ build/pkgs/setuptools_scm/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/setuptools_scm/spkg-configure.m4
+
+diff --git a/build/pkgs/setuptools_scm/spkg-configure.m4 b/build/pkgs/setuptools_scm/spkg-configure.m4
+new file mode 100644
+index 00000000..437148c
+--- /dev/null
++++ b/build/pkgs/setuptools_scm/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([setuptools_scm], [
++  SAGE_PYTHON_PACKAGE_CHECK([setuptools_scm])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0dee0d0c28f31b1f619e44c710a3c9e22d2b2544 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:36:33 -0500
+Subject: Trac #29665: add Gentoo package information for nbconvert.
+
+---
+ build/pkgs/nbconvert/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbconvert/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbconvert/distros/gentoo.txt b/build/pkgs/nbconvert/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c45a10
+--- /dev/null
++++ b/build/pkgs/nbconvert/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbconvert
+-- 
+cgit v1.0-1-gd88e
+
+
+From 473789eb11b1838bc32dc8a63509ee199afc8912 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:37:37 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for nbconvert.
+
+---
+ build/pkgs/nbconvert/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbconvert/spkg-configure.m4
+
+diff --git a/build/pkgs/nbconvert/spkg-configure.m4 b/build/pkgs/nbconvert/spkg-configure.m4
+new file mode 100644
+index 00000000..9b5dee3
+--- /dev/null
++++ b/build/pkgs/nbconvert/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbconvert], [SAGE_PYTHON_PACKAGE_CHECK([nbconvert])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f0703b594e57c980d605aa9bc8316c45a7858b3b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:41:51 -0500
+Subject: Trac #29665: add Gentoo package information for jupyter_core.
+
+---
+ build/pkgs/jupyter_core/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyter_core/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyter_core/distros/gentoo.txt b/build/pkgs/jupyter_core/distros/gentoo.txt
+new file mode 100644
+index 00000000..f168c5a
+--- /dev/null
++++ b/build/pkgs/jupyter_core/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyter_core
+-- 
+cgit v1.0-1-gd88e
+
+
+From 061a307cc4a6680d8500fde834975064e59540d5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:42:48 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jupyter_core.
+
+---
+ build/pkgs/jupyter_core/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyter_core/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyter_core/spkg-configure.m4 b/build/pkgs/jupyter_core/spkg-configure.m4
+new file mode 100644
+index 00000000..67df9c3
+--- /dev/null
++++ b/build/pkgs/jupyter_core/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyter_core], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyter_core])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b85abe964ce0b98b5842efe9cbad9bdb1c89202f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:47:08 -0500
+Subject: Trac #29665: add Gentoo package information for jupyter_client.
+
+---
+ build/pkgs/jupyter_client/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyter_client/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyter_client/distros/gentoo.txt b/build/pkgs/jupyter_client/distros/gentoo.txt
+new file mode 100644
+index 00000000..4f1de88
+--- /dev/null
++++ b/build/pkgs/jupyter_client/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyter_client
+-- 
+cgit v1.0-1-gd88e
+
+
+From 86323ff1e0b2507933df6bc2a96c9175957640c5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:48:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jupyter_client.
+
+---
+ build/pkgs/jupyter_client/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyter_client/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyter_client/spkg-configure.m4 b/build/pkgs/jupyter_client/spkg-configure.m4
+new file mode 100644
+index 00000000..fbd3498
+--- /dev/null
++++ b/build/pkgs/jupyter_client/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyter_client], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyter_client])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a8475e27dd30d752d05ab6fea6579e8623501d82 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:48:58 -0500
+Subject: Trac #29665: add Gentoo package information for snowballstemmer.
+
+---
+ build/pkgs/snowballstemmer/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/snowballstemmer/distros/gentoo.txt
+
+diff --git a/build/pkgs/snowballstemmer/distros/gentoo.txt b/build/pkgs/snowballstemmer/distros/gentoo.txt
+new file mode 100644
+index 00000000..63fd851
+--- /dev/null
++++ b/build/pkgs/snowballstemmer/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/snowballstemmer
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0833c9b781062b4ed86d619e050a6f5d60e36080 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:49:38 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for snowballstemmer.
+
+---
+ build/pkgs/snowballstemmer/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/snowballstemmer/spkg-configure.m4
+
+diff --git a/build/pkgs/snowballstemmer/spkg-configure.m4 b/build/pkgs/snowballstemmer/spkg-configure.m4
+new file mode 100644
+index 00000000..6aa0882
+--- /dev/null
++++ b/build/pkgs/snowballstemmer/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([snowballstemmer], [
++  SAGE_PYTHON_PACKAGE_CHECK([snowballstemmer])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 50a1cf2a2bcd7eeec64cbc3f70e3e9fbe5d850fe Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:50:47 -0500
+Subject: Trac #29665: add Gentoo package information for tornado.
+
+---
+ build/pkgs/tornado/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tornado/distros/gentoo.txt
+
+diff --git a/build/pkgs/tornado/distros/gentoo.txt b/build/pkgs/tornado/distros/gentoo.txt
+new file mode 100644
+index 00000000..6ae4b9f
+--- /dev/null
++++ b/build/pkgs/tornado/distros/gentoo.txt
+@@ -0,0 +1 @@
++www-servers/tornado
+-- 
+cgit v1.0-1-gd88e
+
+
+From 118f4da6e03476c726363e8e22ecda32f13bfc33 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:51:26 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for tornado.
+
+---
+ build/pkgs/tornado/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tornado/spkg-configure.m4
+
+diff --git a/build/pkgs/tornado/spkg-configure.m4 b/build/pkgs/tornado/spkg-configure.m4
+new file mode 100644
+index 00000000..1ee5bc9
+--- /dev/null
++++ b/build/pkgs/tornado/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tornado], [SAGE_PYTHON_PACKAGE_CHECK([tornado])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3850701747a6c8ef60840bdfdb589b28d4cd2b9a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:52:21 -0500
+Subject: Trac #29665: add Gentoo package information for jsonschema.
+
+---
+ build/pkgs/jsonschema/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jsonschema/distros/gentoo.txt
+
+diff --git a/build/pkgs/jsonschema/distros/gentoo.txt b/build/pkgs/jsonschema/distros/gentoo.txt
+new file mode 100644
+index 00000000..d708e4c
+--- /dev/null
++++ b/build/pkgs/jsonschema/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jsonschema
+-- 
+cgit v1.0-1-gd88e
+
+
+From 76e3917c8af781af00f642cfada7a79594429e30 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:54:03 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jsonschema.
+
+---
+ build/pkgs/jsonschema/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jsonschema/spkg-configure.m4
+
+diff --git a/build/pkgs/jsonschema/spkg-configure.m4 b/build/pkgs/jsonschema/spkg-configure.m4
+new file mode 100644
+index 00000000..b9e5e21
+--- /dev/null
++++ b/build/pkgs/jsonschema/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jsonschema], [SAGE_PYTHON_PACKAGE_CHECK([jsonschema])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From fd4a16c11669b6dd73ac6325bca820e76db00402 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:55:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ widgetsnbextension.
+
+---
+ build/pkgs/widgetsnbextension/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/widgetsnbextension/spkg-configure.m4
+
+diff --git a/build/pkgs/widgetsnbextension/spkg-configure.m4 b/build/pkgs/widgetsnbextension/spkg-configure.m4
+new file mode 100644
+index 00000000..bf82daf
+--- /dev/null
++++ b/build/pkgs/widgetsnbextension/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([widgetsnbextension], [
++  SAGE_PYTHON_PACKAGE_CHECK([widgetsnbextension])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8079a9f384e3c8480e157dd98c3db2f43c987f4e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:57:20 -0500
+Subject: Trac #29665: add Gentoo package information for importlib_resources.
+
+---
+ build/pkgs/importlib_resources/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/importlib_resources/distros/gentoo.txt
+
+diff --git a/build/pkgs/importlib_resources/distros/gentoo.txt b/build/pkgs/importlib_resources/distros/gentoo.txt
+new file mode 100644
+index 00000000..d5e1f2c
+--- /dev/null
++++ b/build/pkgs/importlib_resources/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/importlib_resources
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2c430d7c52f02779a6c41b98ac2f4edd8b6759c3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:58:00 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ importlib_resources.
+
+---
+ build/pkgs/importlib_resources/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/importlib_resources/spkg-configure.m4
+
+diff --git a/build/pkgs/importlib_resources/spkg-configure.m4 b/build/pkgs/importlib_resources/spkg-configure.m4
+new file mode 100644
+index 00000000..50df55b
+--- /dev/null
++++ b/build/pkgs/importlib_resources/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([importlib_resources], [
++  SAGE_PYTHON_PACKAGE_CHECK([importlib_resources])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 00d13d7bf2e50aae2ccef3b2b30293c70a922af2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:58:38 -0500
+Subject: Trac #29665: add Gentoo package information for kiwisolver.
+
+---
+ build/pkgs/kiwisolver/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/kiwisolver/distros/gentoo.txt
+
+diff --git a/build/pkgs/kiwisolver/distros/gentoo.txt b/build/pkgs/kiwisolver/distros/gentoo.txt
+new file mode 100644
+index 00000000..7b30c95
+--- /dev/null
++++ b/build/pkgs/kiwisolver/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/kiwisolver
+-- 
+cgit v1.0-1-gd88e
+
+
+From 72b7907ef7ea9fa4ff6948ea34cfe2f693ee6c31 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:59:09 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for kiwisolver.
+
+---
+ build/pkgs/kiwisolver/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/kiwisolver/spkg-configure.m4
+
+diff --git a/build/pkgs/kiwisolver/spkg-configure.m4 b/build/pkgs/kiwisolver/spkg-configure.m4
+new file mode 100644
+index 00000000..4e7ac97
+--- /dev/null
++++ b/build/pkgs/kiwisolver/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([kiwisolver], [SAGE_PYTHON_PACKAGE_CHECK([kiwisolver])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 479351279e4e0ea7e2d146434f0daba038765cfd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:00:04 -0500
+Subject: Trac #29665: add Gentoo package information for notebook.
+
+---
+ build/pkgs/notebook/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/notebook/distros/gentoo.txt
+
+diff --git a/build/pkgs/notebook/distros/gentoo.txt b/build/pkgs/notebook/distros/gentoo.txt
+new file mode 100644
+index 00000000..6475d72
+--- /dev/null
++++ b/build/pkgs/notebook/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/notebook
+-- 
+cgit v1.0-1-gd88e
+
+
+From f4d9242ea654977f8ad7865c82eec593e11a36bc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:01:42 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for notebook.
+
+---
+ build/pkgs/notebook/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/notebook/spkg-configure.m4
+
+diff --git a/build/pkgs/notebook/spkg-configure.m4 b/build/pkgs/notebook/spkg-configure.m4
+new file mode 100644
+index 00000000..a17ba95
+--- /dev/null
++++ b/build/pkgs/notebook/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([notebook], [SAGE_PYTHON_PACKAGE_CHECK([notebook])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9837070c7f8e9a71283b84d49d4fd2c94b78a464 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:02:38 -0500
+Subject: Trac #29665: add Gentoo package information for matplotlib_inline.
+
+---
+ build/pkgs/matplotlib_inline/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/matplotlib_inline/distros/gentoo.txt
+
+diff --git a/build/pkgs/matplotlib_inline/distros/gentoo.txt b/build/pkgs/matplotlib_inline/distros/gentoo.txt
+new file mode 100644
+index 00000000..6a5859c
+--- /dev/null
++++ b/build/pkgs/matplotlib_inline/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/matplotlib-inline
+-- 
+cgit v1.0-1-gd88e
+
+
+From 750be73b25b92b4875e47d044360ac0e1116ec3e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:03:28 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for matplotlib_inline.
+
+---
+ build/pkgs/matplotlib_inline/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/matplotlib_inline/spkg-configure.m4
+
+diff --git a/build/pkgs/matplotlib_inline/spkg-configure.m4 b/build/pkgs/matplotlib_inline/spkg-configure.m4
+new file mode 100644
+index 00000000..e59658f
+--- /dev/null
++++ b/build/pkgs/matplotlib_inline/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([matplotlib_inline], [
++  SAGE_PYTHON_PACKAGE_CHECK([matplotlib_inline])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 273505f49698dcd2ab30c2756b07113c9b7e7791 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:04:10 -0500
+Subject: Trac #29665: add Gentoo package information for ipykernel.
+
+---
+ build/pkgs/ipykernel/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipykernel/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipykernel/distros/gentoo.txt b/build/pkgs/ipykernel/distros/gentoo.txt
+new file mode 100644
+index 00000000..88aab61
+--- /dev/null
++++ b/build/pkgs/ipykernel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipykernel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 629ad36c9e4ae0cdff4a013289b4f2911442445e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:04:46 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for ipykernel.
+
+---
+ build/pkgs/ipykernel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipykernel/spkg-configure.m4
+
+diff --git a/build/pkgs/ipykernel/spkg-configure.m4 b/build/pkgs/ipykernel/spkg-configure.m4
+new file mode 100644
+index 00000000..94ecc2d
+--- /dev/null
++++ b/build/pkgs/ipykernel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipykernel], [SAGE_PYTHON_PACKAGE_CHECK([ipykernel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b8d709edb6a24fd5868ee2818b56e78257b2eafa Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:05:26 -0500
+Subject: Trac #29665: add Gentoo package information for prompt_toolkit.
+
+---
+ build/pkgs/prompt_toolkit/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/prompt_toolkit/distros/gentoo.txt
+
+diff --git a/build/pkgs/prompt_toolkit/distros/gentoo.txt b/build/pkgs/prompt_toolkit/distros/gentoo.txt
+new file mode 100644
+index 00000000..6902484
+--- /dev/null
++++ b/build/pkgs/prompt_toolkit/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/prompt_toolkit
+-- 
+cgit v1.0-1-gd88e
+
+
+From 16c0b5e767ae4dac4440510b7253e5c8642b7d2c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:10:39 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for prompt_toolkit.
+
+---
+ build/pkgs/prompt_toolkit/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/prompt_toolkit/spkg-configure.m4
+
+diff --git a/build/pkgs/prompt_toolkit/spkg-configure.m4 b/build/pkgs/prompt_toolkit/spkg-configure.m4
+new file mode 100644
+index 00000000..fd8c1a6
+--- /dev/null
++++ b/build/pkgs/prompt_toolkit/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([prompt_toolkit], [
++  SAGE_PYTHON_PACKAGE_CHECK([prompt_toolkit])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0cd9283e8bb6c8ae413fc8f715c021f7ec3ca2c8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:12:10 -0500
+Subject: Trac #29665: add Gentoo package information for charset_normalizer.
+
+---
+ build/pkgs/charset_normalizer/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/charset_normalizer/distros/gentoo.txt
+
+diff --git a/build/pkgs/charset_normalizer/distros/gentoo.txt b/build/pkgs/charset_normalizer/distros/gentoo.txt
+new file mode 100644
+index 00000000..eefeb89
+--- /dev/null
++++ b/build/pkgs/charset_normalizer/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/charset_normalizer
+-- 
+cgit v1.0-1-gd88e
+
+
+From a04b01a9ab59097d189edcc5ddcb461faede83b2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:12:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ charset_normalizer.
+
+---
+ build/pkgs/charset_normalizer/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/charset_normalizer/spkg-configure.m4
+
+diff --git a/build/pkgs/charset_normalizer/spkg-configure.m4 b/build/pkgs/charset_normalizer/spkg-configure.m4
+new file mode 100644
+index 00000000..18b18cf
+--- /dev/null
++++ b/build/pkgs/charset_normalizer/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([charset_normalizer], [
++  SAGE_PYTHON_PACKAGE_CHECK([charset_normalizer])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d2ea08138711c53046f977b586f33b09b176b2e3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:13:37 -0500
+Subject: Trac #29665: add Gentoo package information for prometheus_client.
+
+---
+ build/pkgs/prometheus_client/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/prometheus_client/distros/gentoo.txt
+
+diff --git a/build/pkgs/prometheus_client/distros/gentoo.txt b/build/pkgs/prometheus_client/distros/gentoo.txt
+new file mode 100644
+index 00000000..aa2889c
+--- /dev/null
++++ b/build/pkgs/prometheus_client/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/prometheus_client
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b0393200e9edd3e26b8a55ba67e5710e7403fcb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:15:09 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for prometheus_client.
+
+---
+ build/pkgs/prometheus_client/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/prometheus_client/spkg-configure.m4
+
+diff --git a/build/pkgs/prometheus_client/spkg-configure.m4 b/build/pkgs/prometheus_client/spkg-configure.m4
+new file mode 100644
+index 00000000..b494588
+--- /dev/null
++++ b/build/pkgs/prometheus_client/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([prometheus_client], [
++  SAGE_PYTHON_PACKAGE_CHECK([prometheus_client])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From cdcd85284f43ca4ad18353ec3527b2901e57b788 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:17:23 -0500
+Subject: Trac #29665: add Gentoo package information for pybind11.
+
+---
+ build/pkgs/pybind11/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pybind11/distros/gentoo.txt
+
+diff --git a/build/pkgs/pybind11/distros/gentoo.txt b/build/pkgs/pybind11/distros/gentoo.txt
+new file mode 100644
+index 00000000..0c500b3
+--- /dev/null
++++ b/build/pkgs/pybind11/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pybind11
+-- 
+cgit v1.0-1-gd88e
+
+
+From efdd1eb64c4799fe3cdf2221824182941b3fda2d Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:17:51 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pybind11.
+
+---
+ build/pkgs/pybind11/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pybind11/spkg-configure.m4
+
+diff --git a/build/pkgs/pybind11/spkg-configure.m4 b/build/pkgs/pybind11/spkg-configure.m4
+new file mode 100644
+index 00000000..cce1cf5
+--- /dev/null
++++ b/build/pkgs/pybind11/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pybind11], [SAGE_PYTHON_PACKAGE_CHECK([pybind11])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b2128f33b68ea33927284116ea598dd186902400 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:19:23 -0500
+Subject: Trac #29665: add Gentoo package information for pkgconfig.
+
+---
+ build/pkgs/pkgconfig/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pkgconfig/distros/gentoo.txt
+
+diff --git a/build/pkgs/pkgconfig/distros/gentoo.txt b/build/pkgs/pkgconfig/distros/gentoo.txt
+new file mode 100644
+index 00000000..32e8618
+--- /dev/null
++++ b/build/pkgs/pkgconfig/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pkgconfig
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b373b49e06aadeb36dc57e500da9a322460e658 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:19:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pkgconfig.
+
+---
+ build/pkgs/pkgconfig/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pkgconfig/spkg-configure.m4
+
+diff --git a/build/pkgs/pkgconfig/spkg-configure.m4 b/build/pkgs/pkgconfig/spkg-configure.m4
+new file mode 100644
+index 00000000..6708293
+--- /dev/null
++++ b/build/pkgs/pkgconfig/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pkgconfig], [SAGE_PYTHON_PACKAGE_CHECK([pkgconfig])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ce578729eb0d14baab365351ba9a9ffffb7b79f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:21:10 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_serializinghtml.
+
+---
+ build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt b/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+new file mode 100644
+index 00000000..38bca8f
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-serializinghtml
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb0f42c32bbce0e4488678312f5e2d88c6f42c9b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:21:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_serializinghtml.
+
+---
+ build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4 b/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+new file mode 100644
+index 00000000..be8e625
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_serializinghtml], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_serializinghtml])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e47dcf985e40475de85c9436a85537751318bc3d Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:22:54 -0500
+Subject: Trac #29665: add Gentoo package information for sphinxcontrib_jsmath.
+
+---
+ build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt b/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+new file mode 100644
+index 00000000..041a471
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-jsmath
+-- 
+cgit v1.0-1-gd88e
+
+
+From 72cff6fd35f93de4fa855bc870569dd733ff5c24 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:23:49 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_jsmath.
+
+---
+ build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4 b/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+new file mode 100644
+index 00000000..e46bde2
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_jsmath], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_jsmath])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a36395d70f759449cd63c1b0990fbdcb4cb25ca0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:24:26 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_devhelp.
+
+---
+ build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..9b5c899
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-devhelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9953a5dd1646ed0ad51d2e3935cf609bc9e7fd1c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:25:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_devhelp.
+
+---
+ build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+new file mode 100644
+index 00000000..8728136
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_devhelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_devhelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b199d5363aad93f3cb23f7904c9553a28b06348f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:25:53 -0500
+Subject: Trac #29665: add Gentoo package information for sphinxcontrib_qthelp.
+
+---
+ build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..7210099
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-qthelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 94ac8806739f3938e73f5857328e91e0d42e98d2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:26:28 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_qthelp.
+
+---
+ build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+new file mode 100644
+index 00000000..81ea5e1
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_qthelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_qthelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From beedc154aa405e8a58aee8889f510db07adc89a7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:26:54 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_applehelp.
+
+---
+ build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..66ac8da
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-applehelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 07d47c3673d6b35423b71f621cb400989c0101c2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:27:19 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_applehelp.
+
+---
+ build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+new file mode 100644
+index 00000000..e834aed
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_applehelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_applehelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 333a66546c5d421735c49dbafd7370a827f22781 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:27:46 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_htmlhelp.
+
+---
+ build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..e080bac
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-htmlhelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From bfaeb3962254439b63f1f2e0e883de462c7831be Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:29:18 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_htmlhelp.
+
+---
+ build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+new file mode 100644
+index 00000000..c77b003
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_htmlhelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_htmlhelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 782cde13da06e8b85806cb7cbc8aceee0364e639 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:30:23 -0500
+Subject: Trac #29665: add Gentoo package information for jupyterlab_pygments.
+
+---
+ build/pkgs/jupyterlab_pygments/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyterlab_pygments/distros/gentoo.txt b/build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+new file mode 100644
+index 00000000..c57b4f1
+--- /dev/null
++++ b/build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyterlab_pygments
+-- 
+cgit v1.0-1-gd88e
+
+
+From 39f974cfa4a8c6e5dd897f152f83ec82f40ee9f7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:31:13 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ jupyterlab_pygments.
+
+---
+ build/pkgs/jupyterlab_pygments/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyterlab_pygments/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyterlab_pygments/spkg-configure.m4 b/build/pkgs/jupyterlab_pygments/spkg-configure.m4
+new file mode 100644
+index 00000000..e46e21f
+--- /dev/null
++++ b/build/pkgs/jupyterlab_pygments/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyterlab_pygments], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyterlab_pygments])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From db704620700fd36cec3bf6125938f3ee00a9eb5e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:29:15 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for ply.
+
+---
+ build/pkgs/ply/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ply/spkg-configure.m4
+
+diff --git a/build/pkgs/ply/spkg-configure.m4 b/build/pkgs/ply/spkg-configure.m4
+new file mode 100644
+index 00000000..ffb0030
+--- /dev/null
++++ b/build/pkgs/ply/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ply], [SAGE_PYTHON_PACKAGE_CHECK([ply])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6aac31dabcdfdef228d7780398a3fda1a4cc566f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:29:51 -0500
+Subject: Trac #29665: add Gentoo package information for ply.
+
+---
+ build/pkgs/ply/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ply/distros/gentoo.txt
+
+diff --git a/build/pkgs/ply/distros/gentoo.txt b/build/pkgs/ply/distros/gentoo.txt
+new file mode 100644
+index 00000000..c8b1630
+--- /dev/null
++++ b/build/pkgs/ply/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ply
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb8d3372936ec37470d69687a0f91592129460ae Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:30:33 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for gast.
+
+---
+ build/pkgs/gast/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/gast/spkg-configure.m4
+
+diff --git a/build/pkgs/gast/spkg-configure.m4 b/build/pkgs/gast/spkg-configure.m4
+new file mode 100644
+index 00000000..26ec59f
+--- /dev/null
++++ b/build/pkgs/gast/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([gast], [SAGE_PYTHON_PACKAGE_CHECK([gast])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1cdc4046a88f1c2b4e5c162f66c6db6090b24194 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:31:15 -0500
+Subject: Trac #29665: add Gentoo package information for gast.
+
+---
+ build/pkgs/gast/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/gast/distros/gentoo.txt
+
+diff --git a/build/pkgs/gast/distros/gentoo.txt b/build/pkgs/gast/distros/gentoo.txt
+new file mode 100644
+index 00000000..3be5e7e
+--- /dev/null
++++ b/build/pkgs/gast/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/gast
+-- 
+cgit v1.0-1-gd88e
+
+
+From 96068b8a3742b65d619190e1d9fa5db399e6b4f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:32:20 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pythran.
+
+---
+ build/pkgs/pythran/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pythran/spkg-configure.m4
+
+diff --git a/build/pkgs/pythran/spkg-configure.m4 b/build/pkgs/pythran/spkg-configure.m4
+new file mode 100644
+index 00000000..592e95b
+--- /dev/null
++++ b/build/pkgs/pythran/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pythran], [SAGE_PYTHON_PACKAGE_CHECK([pythran])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1fa0fad3ae8f7e559c6fc315c6773a7d8aac0bfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:32:55 -0500
+Subject: Trac #29665: add Gentoo package information for pythran.
+
+---
+ build/pkgs/pythran/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pythran/distros/gentoo.txt
+
+diff --git a/build/pkgs/pythran/distros/gentoo.txt b/build/pkgs/pythran/distros/gentoo.txt
+new file mode 100644
+index 00000000..1bb7cdc
+--- /dev/null
++++ b/build/pkgs/pythran/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pythran
+-- 
+cgit v1.0-1-gd88e
+
+
+From d26370e5b8c88e76abfb7c27e3defb71c9e9f711 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:33:50 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for beniget.
+
+---
+ build/pkgs/beniget/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/beniget/spkg-configure.m4
+
+diff --git a/build/pkgs/beniget/spkg-configure.m4 b/build/pkgs/beniget/spkg-configure.m4
+new file mode 100644
+index 00000000..8ae6101
+--- /dev/null
++++ b/build/pkgs/beniget/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([beniget], [SAGE_PYTHON_PACKAGE_CHECK([beniget])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From eeeb296ed9b9694a865534103fd58e62a151ef5e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:34:22 -0500
+Subject: Trac #29665: add Gentoo package information for beniget.
+
+---
+ build/pkgs/beniget/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/beniget/distros/gentoo.txt
+
+diff --git a/build/pkgs/beniget/distros/gentoo.txt b/build/pkgs/beniget/distros/gentoo.txt
+new file mode 100644
+index 00000000..1a5972c
+--- /dev/null
++++ b/build/pkgs/beniget/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/beniget
+-- 
+cgit v1.0-1-gd88e
+
+
+From 078b2ff272d0eeff5cce40ad7eb176d9ddd7bdff Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:35:37 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for alabaster.
+
+---
+ build/pkgs/alabaster/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/alabaster/spkg-configure.m4
+
+diff --git a/build/pkgs/alabaster/spkg-configure.m4 b/build/pkgs/alabaster/spkg-configure.m4
+new file mode 100644
+index 00000000..4eca6e0
+--- /dev/null
++++ b/build/pkgs/alabaster/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([alabaster], [SAGE_PYTHON_PACKAGE_CHECK([alabaster])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7dc264353e5f64110431ff28c1b8b7e89699e9bd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:36:06 -0500
+Subject: Trac #29665: add Gentoo package information for alabaster.
+
+---
+ build/pkgs/alabaster/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/alabaster/distros/gentoo.txt
+
+diff --git a/build/pkgs/alabaster/distros/gentoo.txt b/build/pkgs/alabaster/distros/gentoo.txt
+new file mode 100644
+index 00000000..cffece6
+--- /dev/null
++++ b/build/pkgs/alabaster/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/alabaster
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8011a5e675e7e61a77ce34a299ee961a9f44253f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:43:59 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ importlib_metadata.
+
+---
+ build/pkgs/importlib_metadata/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/importlib_metadata/spkg-configure.m4
+
+diff --git a/build/pkgs/importlib_metadata/spkg-configure.m4 b/build/pkgs/importlib_metadata/spkg-configure.m4
+new file mode 100644
+index 00000000..0554e52
+--- /dev/null
++++ b/build/pkgs/importlib_metadata/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([importlib_metadata], [
++  SAGE_PYTHON_PACKAGE_CHECK([importlib_metadata])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 928ca0019e3ec6c4541a16b28bcc6710df6d010b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:44:28 -0500
+Subject: Trac #29665: add Gentoo package information for importlib_metadata.
+
+---
+ build/pkgs/importlib_metadata/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/importlib_metadata/distros/gentoo.txt
+
+diff --git a/build/pkgs/importlib_metadata/distros/gentoo.txt b/build/pkgs/importlib_metadata/distros/gentoo.txt
+new file mode 100644
+index 00000000..4f92786
+--- /dev/null
++++ b/build/pkgs/importlib_metadata/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/importlib_metadata
+-- 
+cgit v1.0-1-gd88e
+
+
+From 135f184f7498a2046065e669723e68efe2d65cee Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 21:16:58 -0500
+Subject: Trac #29665: fix sage.misc.package doctest with system alabaster.
+
+When alabaster from the system is used, these tests won't be able to
+find its SPKG installed. Add some ellipses, and switch one test to
+look for sage_conf instead.
+---
+ src/sage/misc/package.py | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/sage/misc/package.py b/src/sage/misc/package.py
+index 84f3d50..c7ad206 100644
+--- a/src/sage/misc/package.py
++++ b/src/sage/misc/package.py
+@@ -386,9 +386,9 @@ def installed_packages(exclude_pip=True):
+     EXAMPLES::
+ 
+         sage: sorted(installed_packages().keys())  # optional - build
+-        [...'alabaster', ...'sage_conf', ...]
+-        sage: installed_packages()['alabaster']  # optional - build, random
+-        '0.7.12'
++        [...'sage_conf', ...]
++        sage: installed_packages()['sage_conf']  # optional - build, random
++        '9.5'
+ 
+     .. SEEALSO::
+ 
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch b/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
new file mode 100644
index 000000000000..7ef3826aa4d2
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
@@ -0,0 +1,27 @@
+diff --git a/src/bin/sage-runtests b/src/bin/sage-runtests
+index 589dc8cd37..6bb8bf99a4 100755
+--- a/src/bin/sage-runtests
++++ b/src/bin/sage-runtests
+@@ -154,21 +154,4 @@ if __name__ == "__main__":
+     DC = DocTestController(args, args.filenames)
+     err = DC.run()
+ 
+-    try:
+-        exit_code_pytest = 0
+-        import pytest
+-        pytest_options = ["--import-mode", "importlib"]
+-        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.")
+-
+-    if err == 0:
+-        sys.exit(exit_code_pytest)
+-    else:
+-        sys.exit(err)
++    sys.exit(err)
diff --git a/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch b/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
new file mode 100644
index 000000000000..093e3d56eb33
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
@@ -0,0 +1,42 @@
+More site packages not included in trac 29665
+
+diff --git a/build/pkgs/gmpy2/spkg-configure.m4 b/build/pkgs/gmpy2/spkg-configure.m4
+new file mode 100644
+index 0000000000..2d0390f7db
+--- /dev/null
++++ b/build/pkgs/gmpy2/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([gmpy2], [SAGE_PYTHON_PACKAGE_CHECK([gmpy2])])
+diff --git a/build/pkgs/sphinx/spkg-configure.m4 b/build/pkgs/sphinx/spkg-configure.m4
+new file mode 100644
+index 0000000000..e149fbb2cf
+--- /dev/null
++++ b/build/pkgs/sphinx/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([sphinx], [SAGE_PYTHON_PACKAGE_CHECK([sphinx])])
+diff --git a/build/pkgs/typing_extensions/spkg-configure.m4 b/build/pkgs/typing_extensions/spkg-configure.m4
+new file mode 100644
+index 0000000000..d475fd8257
+--- /dev/null
++++ b/build/pkgs/typing_extensions/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([typing_extensions], [SAGE_PYTHON_PACKAGE_CHECK([typing_extensions])])
+-- 
+diff --git a/build/pkgs/gmpy2/install-requires.txt b/build/pkgs/gmpy2/install-requires.txt
+index 51d24518ef..c25feff557 100644
+--- a/build/pkgs/gmpy2/install-requires.txt
++++ b/build/pkgs/gmpy2/install-requires.txt
+@@ -1,3 +1 @@
+-# We would like to write gmpy2 >=2.1.0b5, but pipenv does not accept prereleases in version ranges
+-# https://github.com/pypa/pipenv/issues/1760
+-gmpy2 ==2.1.0rc1
++gmpy2 >=2.1
+diff --git a/build/pkgs/ptyprocess/install-requires.txt b/build/pkgs/ptyprocess/install-requires.txt
+index de89260872..7c336f636c 100644
+--- a/build/pkgs/ptyprocess/install-requires.txt
++++ b/build/pkgs/ptyprocess/install-requires.txt
+@@ -1,3 +1,3 @@
+-ptyprocess ==0.5.1
++ptyprocess
+ # https://trac.sagemath.org/ticket/31280#comment:42 and following
+ # sagelib is not compatible with ptyprocess 0.5.2, 0.6, and 0.7
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 33b40acbabeb..a32c5d18f378 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -22,11 +22,13 @@ distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
 checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
 python_version=3
 
-build_options="debug system_python3"
+build_options="debug system_python3 system_site_packages"
 desc_option_debug="Build with debug symbols"
 desc_option_system_python="Build using system python 3"
-build_options_default="system_python3"
+desc_option_system_python="Build using system python site-packages"
+build_options_default="system_python3 system_site_packages"
 configure_args+=" $(vopt_with system_python3)"
+configure_args+=" $(vopt_enable system_site_packages)"
 
 # path where sage will be installed
 _SAGE_ROOT=/usr/lib/sage-${version}
@@ -163,6 +165,8 @@ do_check() {
 	fi
 	if [ "$XBPS_CHECK_PKGS" = full ]; then
 		_test_args="--long $_test_args"
+	else
+		_test_args="--warn-long 5.0 $_test_args"
 	fi
 	# since make check will build the docs, run test like this instead
 	./sage -tp ${XBPS_MAKEJOBS} ${_test_args}
@@ -182,7 +186,7 @@ makedepends+=" automake gettext gettext-devel"
 # other host dependencies
 makedepends+=" cmake curl git ninja pandoc patch pkg-config python3 tox"
 
-# already in void
+# standard dependencies
 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
@@ -202,7 +206,49 @@ makedepends+="
  brial-devel cliquer-devel gfan libbraiding-devel libhomfly-devel
  lrcalc-devel nauty-devel palp tachyon
  maxima-ecl primesieve-devel primecount-devel
+ ffmpeg ImageMagick
 "
 
 # TODO: optional
 # 4ti2 coxeter3 libsemigroups lrslib pdf2svg perl_mongodb polymake
+
+# TODO: standard
+# cvxopt importlib_resources
+
+# python packages for trac-29665
+_sage_python3_modules="
+ python3-Babel python3-Jinja2 python3-MarkupSafe python3-Pillow
+ python3-Pygments python3-Sphinx python3-alabaster python3-argcomplete
+ python3-argon2 python3-attrs python3-backcall python3-beniget
+ python3-bleach python3-certifi python3-cffi python3-charset-normalizer
+ python3-cycler python3-dateutil python3-decorator python3-defusedxml
+ python3-docutils python3-entrypoints python3-flit_core python3-gast
+ python3-gmpy2 python3-html5lib python3-idna python3-imagesize
+ python3-importlib_metadata python3-ipython python3-ipython_genutils
+ python3-ipython_ipykernel python3-jedi python3-jsonschema
+ python3-jupyter_client python3-jupyter_core python3-jupyter_ipywidgets
+ python3-jupyter_nbconvert python3-jupyter_nbformat
+ python3-jupyter_notebook python3-jupyterlab_pygments python3-kiwisolver
+ python3-matplotlib python3-matplotlib-inline python3-mistune
+ python3-mpmath python3-nbclient python3-nest_asyncio python3-networkx
+ python3-numpy python3-packaging python3-pandocfilters python3-parsing
+ python3-parso python3-pexpect python3-pickleshare python3-pip
+ python3-pkgconfig python3-pluggy python3-ply python3-prometheus_client
+ python3-prompt_toolkit python3-ptyprocess python3-py python3-pybind11
+ python3-pycparser python3-pyrsistent python3-pytz python3-pyzmq
+ python3-requests python3-scipy python3-send2trash python3-setuptools
+ python3-setuptools_scm python3-simplegeneric python3-six
+ python3-snowballstemmer python3-sphinxcontrib-applehelp
+ python3-sphinxcontrib-devhelp python3-sphinxcontrib-htmlhelp
+ python3-sphinxcontrib-jsmath python3-sphinxcontrib-qthelp
+ python3-sphinxcontrib-serializinghtml python3-sympy python3-terminado
+ python3-testpath python3-texttable python3-toml python3-tomli
+ python3-tornado python3-traitlets python3-typing_extensions
+ python3-tzlocal python3-urllib3 python3-wcwidth python3-webencodings
+ python3-wheel python3-zipp pythran
+ "
+
+if [ "$build_option_system_site_packages" ]; then
+	makedepends+=" $_sage_python3_modules"
+	depends+=" $_sage_python3_modules"
+fi

From b2e9db0e870741e345986267f339af3dfb6883b2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 3 Jan 2022 20:47:52 -0300
Subject: [PATCH 24/32] sagemath: use small source tarball + upstream packages

---
 srcpkgs/sagemath/template | 97 ++++++++++++++++++++++++++-------------
 1 file changed, 64 insertions(+), 33 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index a32c5d18f378..0de0061b09df 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -18,8 +18,8 @@ short_desc="Open source mathematics software"
 maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
-distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
-checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
+distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
+checksum=aea4c5a8d3b32af2fba644269b9daf4f62471471ba2d7d83da0f8098a5f53225
 python_version=3
 
 build_options="debug system_python3 system_site_packages"
@@ -33,42 +33,72 @@ configure_args+=" $(vopt_enable system_site_packages)"
 # 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} ;;
-esac
+_SAGE_UPSTREAM_MIRROR=https://mirrors.mit.edu/sage/spkg/upstream
 
-# extra upstream packages (trac-32968 / trac-33040)
 _upstream="
- https://pypi.io/packages/source/s/sphinx/Sphinx-4.3.1.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
+${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
+${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
+${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
+${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
+${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
+${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
+${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
+https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
+https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
+http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
+${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
+${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
+${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
+${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
+${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
+https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
+${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
+https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
+${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
 "
 
 checksum+="
- 32a5b3e9a1b176cc25ed048557d4d3d01af635e6b76c5bc7a43b0a34447fbd45
-
- 9c87405839a19696e837b3b818fed3f5f69f16f1eec1a1ad77e043dcea9c772f
- fc4453705b81d03568d5b808ad8f09c77c47534f6ac2e72e733f9ca4714aa75c
- acad2d8b20a1af07d4e4c9d2e9285c5ed9104354062f275f3fcd88dcef4f1326
- 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
- 78884e7c1d4b00ce3cea67b44566851c4343c120abd683433ce934a68ea58872
- 0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86
- b8e2f83c56e141920c39464b852de3719dfbfb6e3c99a2d8da0edf4fb33176ed
- d9bdec0013ef1eb5a84ab39a3b3868911598afa494f5faa038647101504e2b81
- b2e9810e09c3a47b73ce9cab5a72243a1258f61e7900969097a817232246ce1c
- 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
- 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
+c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
+d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
+4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
+3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
+03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
+5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
+cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
+5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
+581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
+6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
+07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
+a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
+ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
+d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
+169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
+5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
+cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
+471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
+78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
+edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
+b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
+3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
+545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
+cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
+718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
+dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
 "
 
 for u in ${_upstream}; do
@@ -101,6 +131,7 @@ post_extract() {
 	mv -T $wrksrc $_SAGE_ROOT
 	ln -srfT $_SAGE_ROOT $wrksrc
 
+	mkdir -p $wrksrc/upstream
 	for u in ${_upstream}; do
 		cp "$XBPS_SRCDISTDIR/${pkgname}-${version}/${u##*[/>]}" $wrksrc/upstream
 	done

From d17835a4aba77b66a0ae4a22042cfa23b8b5ada5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 13:38:02 -0300
Subject: [PATCH 25/32] sagemath: for CI use fixed random-seed=0

---
 srcpkgs/sagemath/template | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 0de0061b09df..b5b99d2c122d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -194,6 +194,10 @@ do_check() {
 	if [ -z "$_test_args" ]; then
 		_test_args=--all
 	fi
+	if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
+		# for CI use a predictable random seed
+		_test_args="--random-seed=0 $_test_args"
+	fi
 	if [ "$XBPS_CHECK_PKGS" = full ]; then
 		_test_args="--long $_test_args"
 	else

From 24f554a2ffa5e3abee0c4928f2d1e86dd2420a93 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 14:40:27 -0300
Subject: [PATCH 26/32] sagemath: upstream two patches

---
 ...ble-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch} |  6 +++---
 ...rse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch} | 10 +++++-----
 2 files changed, 8 insertions(+), 8 deletions(-)
 rename srcpkgs/sagemath/patches/{0001-sage-site-exec-only-if-it-is-executable.patch => trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch} (94%)
 rename srcpkgs/sagemath/patches/{0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch => trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch} (81%)

diff --git a/srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch b/srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
similarity index 94%
rename from srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch
rename to srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
index ce17c6d6e954..7fdb3d697222 100644
--- a/srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch
+++ b/srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
@@ -1,14 +1,14 @@
 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
+Subject: 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
+index 4c0fa17..153e610 100755
 --- a/src/bin/sage
 +++ b/src/bin/sage
 @@ -129,7 +129,7 @@ usage() {
@@ -39,5 +39,5 @@ index 4c0fa17426..153e610a2e 100755
              # fallthrough if there is no sage-site script
          fi
 -- 
-2.34.1
+cgit v1.0-1-gd88e
 
diff --git a/srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch b/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
similarity index 81%
rename from srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch
rename to srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
index bab6d8441d42..350c41ac3928 100644
--- a/srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch
+++ b/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
@@ -1,16 +1,16 @@
-From 57e3eba28c9b4ee6bd3407d0715b8bd00aaf04a7 Mon Sep 17 00:00:00 2001
+From 53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6 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
+Subject: sagetex: Fix a warning when byte-compiling sagetexparse.py
 
 ---
- .../sagetex/patches/sagetex-fix-warning.patch    | 16 ++++++++++++++++
+ build/pkgs/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
+index 00000000..d82ab67
 --- /dev/null
 +++ b/build/pkgs/sagetex/patches/sagetex-fix-warning.patch
 @@ -0,0 +1,16 @@
@@ -31,5 +31,5 @@ index 0000000000..d82ab675dd
 +     self.result += t.code[1:-1] + '\n\n'
 + 
 -- 
-2.34.1
+cgit v1.0-1-gd88e
 

From 475f7c32457c7721f6f193504665018dafff5c7f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 19:57:59 -0300
Subject: [PATCH 27/32] sagemath: reorder upstream sources and add two missing
 ones

---
 srcpkgs/sagemath/template | 60 ++++++++++++++++++++++-----------------
 1 file changed, 34 insertions(+), 26 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index b5b99d2c122d..f53cba947c88 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -36,69 +36,77 @@ _SAGE_ROOT=/usr/lib/sage-${version}
 _SAGE_UPSTREAM_MIRROR=https://mirrors.mit.edu/sage/spkg/upstream
 
 _upstream="
-${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
 ${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
 ${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
+
+${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
 ${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
 ${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
 ${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
 ${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
 ${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
 ${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
-https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
-https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
-http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
 ${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
 ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
 ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
 ${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
 ${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${PYPI_SITE}/P/PyCygwin/PyCygwin-0.1.tar.gz
 ${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
-https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+${PYPI_SITE}/s/setuptools/setuptools-59.2.0.tar.gz
 ${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
 ${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
-https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
 ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
+
+https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
+https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
+http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
+https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
 "
 
 checksum+="
-dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
 c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
 d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
+5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
+ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
+169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
+cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
+edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
+cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
+
+dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
 3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
 03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
 5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
 cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
-5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
-c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
-6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
-07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
 a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
-ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
 d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
-169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
 5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
-cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
 471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
 78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
-edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+45a5e295590c469a49b2804bfdb89059e942d768ad3b813f484d7b5bff48d226
 ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
-b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
-3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+157d21de9d055ab9e8ea3186d91e7f4f865e11f42deafa952d90842671fc2576
 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
 545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
-cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
-718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
 dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
+
+c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
+6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
+07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
+3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
 "
 
 for u in ${_upstream}; do

From 4cc3a9be97ff03c6b3afa635fab9c65b94fab469 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 9 Jan 2022 12:45:47 -0300
Subject: [PATCH 28/32] sagemath: do not download anything patch

---
 .../patches/00-Do_not_download_anything.patch         | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 srcpkgs/sagemath/patches/00-Do_not_download_anything.patch

diff --git a/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch b/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch
new file mode 100644
index 000000000000..35aef7b8d456
--- /dev/null
+++ b/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch
@@ -0,0 +1,11 @@
+--- a/build/sage_bootstrap/tarball.py	2022-01-07 19:17:06.754747955 -0300
++++ b/build/sage_bootstrap/tarball.py	2022-01-07 19:25:31.844139381 -0300
+@@ -158,6 +158,8 @@
+                             .format(destination=destination))
+         successful_download = False
+         log.info('Attempting to download package {0} from mirrors'.format(self.filename))
++        log.info('ERROR: downloading is disabled, add file to template instead')
++        return
+         for mirror in MirrorList():
+             url = mirror + '/'.join(['spkg', 'upstream', self.package.name, self.filename])
+             log.info(url)

From e3d3adfe98840fd0b2f90a8784f9c18776d6ecd1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 9 Jan 2022 13:27:49 -0300
Subject: [PATCH 29/32] sagemath: update to 9.5.rc0.

---
 ...184f7498a2046065e669723e68efe2d65cee.patch |    6 +-
 ...1d4ced4264f65ab704f725f6f5879b012796.patch |  263 ----
 ...a54526829b79d5d236a40f83ddc6ce7b2696.patch | 1196 -----------------
 ...9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch |   27 -
 ...3f4f32246ad9ded6d37f1f2f12a589a81f4.patch} |    4 +-
 ...03138d0403be7c7cb303de2bc0a0e0b6793c.patch |   82 --
 ...f3a1611fed0cc66fb838eb85739646dd34d.patch} |   94 +-
 ...49c415e11d0522bff9013bc1509264b26ebf.patch |   27 +
 ...ip_doctest_singular_4.2.1--see_33134.patch |   13 +
 srcpkgs/sagemath/template                     |    6 +-
 10 files changed, 72 insertions(+), 1646 deletions(-)
 delete mode 100644 srcpkgs/sagemath/patches/trac-30766-system_python_3.10-df9f1d4ced4264f65ab704f725f6f5879b012796.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
 rename srcpkgs/sagemath/patches/{trac-33064-sage_docbuild_ignore_cache_save_permission_error-f767cf1eadfd8ab540a31c5c5ef09d56df09b90e.patch => trac-33064-sage_docbuild_ignore_cache_save_permission_error-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch} (92%)
 delete mode 100644 srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
 rename srcpkgs/sagemath/patches/{trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch => trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch} (63%)
 create mode 100644 srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch

diff --git a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
index b641113927e7..0ecb27c593cd 100644
--- a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
+++ b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
@@ -5615,9 +5615,9 @@ index 84f3d50..c7ad206 100644
      EXAMPLES::
  
          sage: sorted(installed_packages().keys())  # optional - build
--        [...'alabaster', ...'sage_conf', ...]
--        sage: installed_packages()['alabaster']  # optional - build, random
--        '0.7.12'
+-        [...'gmpy2', ...'sage_conf', ...]
+-        sage: installed_packages()['gmpy2']  # optional - build, random
+-        '2.1.0b5'
 +        [...'sage_conf', ...]
 +        sage: installed_packages()['sage_conf']  # optional - build, random
 +        '9.5'
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
deleted file mode 100644
index a1cb4c834482..000000000000
--- a/srcpkgs/sagemath/patches/trac-30766-system_python_3.10-df9f1d4ced4264f65ab704f725f6f5879b012796.patch
+++ /dev/null
@@ -1,263 +0,0 @@
-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-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch b/srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
deleted file mode 100644
index 3ae6fe01822d..000000000000
--- a/srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
+++ /dev/null
@@ -1,1196 +0,0 @@
-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/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch b/srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
deleted file mode 100644
index 485fb0176f45..000000000000
--- a/srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-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: 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 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"
- 
- # 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)
--- 
-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-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
similarity index 92%
rename from srcpkgs/sagemath/patches/trac-33064-sage_docbuild_ignore_cache_save_permission_error-f767cf1eadfd8ab540a31c5c5ef09d56df09b90e.patch
rename to srcpkgs/sagemath/patches/trac-33064-sage_docbuild_ignore_cache_save_permission_error-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
index 20fa12e570eb..04f04cfd6718 100644
--- 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-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
@@ -1,4 +1,4 @@
-From f767cf1eadfd8ab540a31c5c5ef09d56df09b90e Mon Sep 17 00:00:00 2001
+From e89193f4f32246ad9ded6d37f1f2f12a589a81f4 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
@@ -8,7 +8,7 @@ Subject: sage_docbuild: do not fail when cache cannot be saved
  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
+index 466ca82..f8c8ebd 100644
 --- a/src/sage_docbuild/__init__.py
 +++ b/src/sage_docbuild/__init__.py
 @@ -856,9 +856,12 @@ class ReferenceSubBuilder(DocBuilder):
diff --git a/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch b/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
deleted file mode 100644
index 6bc5193b75ee..000000000000
--- a/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-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
-
-
-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/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch b/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
similarity index 63%
rename from srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch
rename to srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
index 3794aa7f019b..04fca4815a00 100644
--- a/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch
+++ b/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
@@ -1,4 +1,4 @@
-From 7d3381b21e4716cfa8a33915621a12f0eba74233 Mon Sep 17 00:00:00 2001
+From 18d0477153af6f453a0e84f78030535f6a36ce87 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
@@ -10,56 +10,56 @@ Subject: doctests: remove dochtml label from some tests that don't need docs
  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
+index c788623..527ed90 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  # optional - sagemath_doc_html
+-        sage: thematic_index = os.path.join(SAGE_DOC, "html", "en", "thematic_tutorials", "index.html")  # optional - sagemath_doc_html
 +        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
+         sage: for line in open(thematic_index).readlines():  # optional - sagemath_doc_html
          ....:     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
+index 4c56aea..583ca06 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  # optional - sagemath_doc_html
+-    sage: docfilename = os.path.join(SAGE_DOC, 'html', 'en', 'reference', 'calculus', 'sage', 'symbolic', 'expression.html')  # optional - sagemath_doc_html
 +    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
+     sage: with open(docfilename) as fobj:  # optional - sagemath_doc_html
      ....:     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='',
+@@ -845,12 +845,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  # optional - sagemath_doc_html
+-        sage: len(_search_src_or_doc('src', r'matrix\(', 'incidence_structures', 'self', 'combinat', interact=False).splitlines()) > 1  # optional - sagemath_doc_html
 +        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)
+         sage: 'abvar/homology' in _search_src_or_doc('doc', 'homology', 'variety', interact=False)  # optional - sagemath_doc_html, 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)  # optional - sagemath_doc_html
 +        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:
+@@ -1369,7 +1369,7 @@ class _sage_doc:
  
-         sage: browse_sage_doc._open("reference", testing=True)[0]  # optional - dochtml, indirect doctest
+         sage: browse_sage_doc._open("reference", testing=True)[0]  # optional - sagemath_doc_html, 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]  # optional - sagemath_doc_html
 +        sage: browse_sage_doc(identity_matrix, 'rst')[-107:-47]
          'Full MatrixSpace of 3 by 3 sparse matrices over Integer Ring'
      """
@@ -68,7 +68,7 @@ index eb70516..b4848ed 100644
 cgit v1.0-1-gd88e
 
 
-From 42a76c3f82edecc9c6c53c661251677e3e907584 Mon Sep 17 00:00:00 2001
+From 88dd9f3a1611fed0cc66fb838eb85739646dd34d 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
@@ -78,7 +78,7 @@ Subject: doctests: add dochtml label to some tests that need docs installed
  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
+index f8c8ebd..d329009 100644
 --- a/src/sage_docbuild/__init__.py
 +++ b/src/sage_docbuild/__init__.py
 @@ -105,7 +105,7 @@ def builder_helper(type):
@@ -86,7 +86,7 @@ index 4a71c91..dd233bd 100644
          sage: from sage_docbuild import _build_many as build_many
          sage: helper = builder_helper("html")
 -        sage: try:
-+        sage: try:  # optional - dochtml
++        sage: try:  # optional - sagemath_doc_html
          ....:     build_many(build_ref_doc, [("docname", "en", "html", {})])
          ....: except Exception as E:
          ....:     "Non-exception during docbuild: abort pool operation" in str(E)
@@ -95,7 +95,7 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import DocBuilder
              sage: b = DocBuilder('tutorial')
 -            sage: b._output_dir('html')
-+            sage: b._output_dir('html')         # optional - dochtml
++            sage: b._output_dir('html')         # optional - sagemath_doc_html
              '.../html/en/tutorial'
          """
          d = os.path.join(SAGE_DOC, type, self.lang, self.name)
@@ -104,7 +104,7 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import DocBuilder
              sage: b = DocBuilder('tutorial')
 -            sage: b._doctrees_dir()
-+            sage: b._doctrees_dir()             # optional - docthml
++            sage: b._doctrees_dir()             # optional - sagemath_doc_html
              '.../doctrees/en/tutorial'
          """
          d = os.path.join(SAGE_DOC, 'doctrees', self.lang, self.name)
@@ -113,7 +113,7 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import ReferenceBuilder
              sage: b = ReferenceBuilder('reference')
 -            sage: b._output_dir('html')
-+            sage: b._output_dir('html')         # optional - dochtml
++            sage: b._output_dir('html')         # optional - sagemath_doc_html
              '.../html/en/reference'
          """
          if lang is None:
@@ -122,56 +122,10 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import ReferenceTopBuilder
              sage: b = ReferenceTopBuilder('reference')
 -            sage: b._output_dir('html')
-+            sage: b._output_dir('html')         # optional - dochtml
++            sage: b._output_dir('html')         # optional - sagemath_doc_html
              '.../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/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch b/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
new file mode 100644
index 000000000000..d32f1e4d5e9f
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
@@ -0,0 +1,27 @@
+From 836249c415e11d0522bff9013bc1509264b26ebf Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Sun, 9 Jan 2022 16:51:22 -0300
+Subject: trac 33135: add filter to ignore deprecation warnings
+
+---
+ src/sage/all.py | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/sage/all.py b/src/sage/all.py
+index 01ef327..19ca3d4 100644
+--- a/src/sage/all.py
++++ b/src/sage/all.py
+@@ -96,6 +96,10 @@ warnings.filterwarnings('ignore', category=DeprecationWarning,
+ warnings.filterwarnings('ignore', category=DeprecationWarning,
+                         module='pythran')
+ 
++warnings.filterwarnings('ignore', category=DeprecationWarning,
++                        message='The distutils(.sysconfig module| package) is deprecated',
++                        module='numpy|sage.env|sage.features')
++
+ ################ end setup warnings ###############################
+ 
+ 
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
new file mode 100644
index 000000000000..438078a92036
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage/rings/polynomial/hilbert.pyx b/src/sage/rings/polynomial/hilbert.pyx
+index 4cd91d0a46..323b168c4e 100644
+--- a/src/sage/rings/polynomial/hilbert.pyx
++++ b/src/sage/rings/polynomial/hilbert.pyx
+@@ -578,7 +578,7 @@ def hilbert_poincare_series(I, grading=None):
+ 
+     This example exceeded the capabilities of Singular before version 4.2.1p2::
+ 
+-        sage: J.hilbert_numerator(algorithm='singular')
++        sage: J.hilbert_numerator(algorithm='singular')   # not tested - requires singular 4.2.1p2
+         120*t^33 - 3465*t^32 + 48180*t^31 - 429374*t^30 + 2753520*t^29 - 13522410*t^28 + 52832780*t^27 - 168384150*t^26 + 445188744*t^25 - 987193350*t^24 + 1847488500*t^23 + 1372406746*t^22 - 403422496*t^21 - 8403314*t^20 - 471656596*t^19 + 1806623746*t^18 + 752776200*t^17 + 752776200*t^16 - 1580830020*t^15 + 1673936550*t^14 - 1294246800*t^13 + 786893250*t^12 - 382391100*t^11 + 146679390*t^10 - 42299400*t^9 + 7837830*t^8 - 172260*t^7 - 468930*t^6 + 183744*t^5 - 39270*t^4 + 5060*t^3 - 330*t^2 + 1
+ 
+     """
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f53cba947c88..f688629fc26d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -1,6 +1,6 @@
 # Template file for 'sagemath'
 pkgname=sagemath
-version=9.5.beta9
+version=9.5.rc0
 revision=1
 wrksrc=sage-$version
 build_style=configure
@@ -19,7 +19,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
-checksum=aea4c5a8d3b32af2fba644269b9daf4f62471471ba2d7d83da0f8098a5f53225
+checksum=8012e3ac35290fa9b2cb837eeca149925784c2378b486731226944e4afd8a4e6
 python_version=3
 
 build_options="debug system_python3 system_site_packages"
@@ -128,7 +128,7 @@ nostrip=yes
 noshlibprovides=yes
 
 # don't rewrite python shebang as sage uses its own python (for now)
-_no_python_shebang=yes
+#_no_python_shebang=yes
 
 # compile python code in sage venv
 pycompile_dirs="$_SAGE_ROOT/venv/"

From d5cce5d9acee7e70b9a35e9595c8a5c374996716 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 10 Jan 2022 16:18:04 -0300
Subject: [PATCH 30/32] New package: gap-4.11.1

---
 common/shlibs        |  1 +
 srcpkgs/gap-devel    |  1 +
 srcpkgs/gap/template | 47 ++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 49 insertions(+)
 create mode 120000 srcpkgs/gap-devel
 create mode 100644 srcpkgs/gap/template

diff --git a/common/shlibs b/common/shlibs
index ebbd48a3d84c..c4b2c348f6f3 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4021,6 +4021,7 @@ libpari-gmp.so.7 pari-2.13.0_1
 libpari-gmp-tls.so.7 pari-2.13.2_1
 libtree-sitter.so.0 tree-sitter-0.19.0_1
 libplanarity.so.0 planarity-3.0.1.1_1
+libgap.so.0 gap-4.11.1_1
 libgtkdatabox.so.1 gtkdatabox3-1.0.0_1
 libgf2x.so.3 gf2x-1.3.0_1
 libntl.so.44 ntl-11.5.1_1
diff --git a/srcpkgs/gap-devel b/srcpkgs/gap-devel
new file mode 120000
index 000000000000..e195f60d0b1a
--- /dev/null
+++ b/srcpkgs/gap-devel
@@ -0,0 +1 @@
+gap
\ No newline at end of file
diff --git a/srcpkgs/gap/template b/srcpkgs/gap/template
new file mode 100644
index 000000000000..7bc7d13ace20
--- /dev/null
+++ b/srcpkgs/gap/template
@@ -0,0 +1,47 @@
+# Template file for 'gap'
+pkgname=gap
+version=4.11.1
+revision=1
+build_style=gnu-configure
+make_install_target="install-bin install-gaproot install-headers install-libgap"
+makedepends="gmp-devel zlib-devel readline-devel"
+checkdepends="perl"
+short_desc="Groups, Algorithms, Programming - computational discrete algebra"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-2.0-or-later"
+homepage="http://www.gap-system.org/"
+distfiles="https://github.com/gap-system/gap/releases/download/v${version}/gap-${version}.tar.gz"
+checksum=6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
+
+if [ "$XBPS_CHECK_PKGS" = full ]; then
+	# not sure about this -- takes about 25 minutes
+	make_check_target=teststandard
+fi
+
+_GAPROOT=/usr/share/gap/
+
+# minimal required packages
+_GAPPKGS="GAPDoc primgrp SmallGrp transgrp"
+
+# other expected packages
+_GAPPKGS+=" atlasrep autpgrp alnuth crisp ctbllib FactInt fga irredsol laguna
+ polenta polycyclic resclasses sophus tomlib"
+
+post_install() {
+	vmkdir ${_GAPROOT}/pkg
+	for p in ${_GAPPKGS}; do
+		[ -d pkg/$p ] || p="$p-*"
+		vcopy "pkg/$p" ${_GAPROOT}/pkg
+	done
+	# not handled by make install-headers
+	vcopy gen/config.h /usr/include/gap
+}
+
+gap-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.so"
+	}
+}

From 3f700355c457c1dd14d0cb237120559507946cca Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 10 Jan 2022 16:32:54 -0300
Subject: [PATCH 31/32] sagemath: use system gap

---
 ...f491e5ce599ba185f5e93f02e0fcebd76c9e.patch | 57 +++++++++++++++++++
 .../patches/zzz-skip_doctest_system_gap.patch | 13 +++++
 srcpkgs/sagemath/template                     | 15 ++++-
 3 files changed, 82 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch

diff --git a/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch b/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
new file mode 100644
index 000000000000..da88a369db0d
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
@@ -0,0 +1,57 @@
+From 2c981351bb60089530b0598d3e9a909a23d4d4d8 Mon Sep 17 00:00:00 2001
+From: Thierry Thomas <thierry@FreeBSD.org>
+Date: Mon, 22 Mar 2021 03:04:12 +0100
+Subject: 29644: Add spkg-configure.m4 for gap
+
+---
+ build/pkgs/gap/spkg-configure.m4 | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+ create mode 100644 build/pkgs/gap/spkg-configure.m4
+
+diff --git a/build/pkgs/gap/spkg-configure.m4 b/build/pkgs/gap/spkg-configure.m4
+new file mode 100644
+index 00000000..91cd089
+--- /dev/null
++++ b/build/pkgs/gap/spkg-configure.m4
+@@ -0,0 +1,8 @@
++SAGE_SPKG_CONFIGURE([gap], [
++    SAGE_SPKG_DEPCHECK([gmp], [
++       AC_CHECK_HEADER([gap/system.h], [
++        AC_SEARCH_LIBS([GAP_COMM], [gap], [
++        ], [sage_spkg_install_gap=yes])
++       ], [sage_spkg_install_gap=yes])
++    ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2a41f491e5ce599ba185f5e93f02e0fcebd76c9e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Samuel=20Leli=C3=A8vre?= <samuel.lelievre@gmail.com>
+Date: Mon, 22 Mar 2021 03:05:31 +0100
+Subject: 29644: Add distro information for gap
+
+---
+ build/pkgs/gap/distros/fedora.txt | 1 +
+ build/pkgs/gap/distros/gentoo.txt | 1 +
+ 2 files changed, 2 insertions(+)
+ create mode 100644 build/pkgs/gap/distros/fedora.txt
+ create mode 100644 build/pkgs/gap/distros/gentoo.txt
+
+diff --git a/build/pkgs/gap/distros/fedora.txt b/build/pkgs/gap/distros/fedora.txt
+new file mode 100644
+index 00000000..ea4feae
+--- /dev/null
++++ b/build/pkgs/gap/distros/fedora.txt
+@@ -0,0 +1 @@
++gap
+diff --git a/build/pkgs/gap/distros/gentoo.txt b/build/pkgs/gap/distros/gentoo.txt
+new file mode 100644
+index 00000000..ea64ec9
+--- /dev/null
++++ b/build/pkgs/gap/distros/gentoo.txt
+@@ -0,0 +1 @@
++sci-mathematics/gap
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
new file mode 100644
index 000000000000..f132591d48ac
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage_setup/optional_extension.py b/src/sage_setup/optional_extension.py
+index f252849384..4034e3e196 100644
+--- a/src/sage_setup/optional_extension.py
++++ b/src/sage_setup/optional_extension.py
+@@ -80,7 +80,7 @@ def OptionalExtension(*args, **kwds):
+         sage: print(ext.__class__.__name__)
+         CythonizeExtension
+         sage: ext = OptionalExtension("foo", ["foo.c"], package="gap")
+-        sage: print(ext.__class__.__name__)
++        sage: print(ext.__class__.__name__)     # not tested - fails with system gap
+         Extension
+     """
+     try:
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f688629fc26d..bc273bd89786 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -66,7 +66,6 @@ ${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
 ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
 
 https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
-https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
 http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
 https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
 https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
@@ -103,7 +102,6 @@ ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
 dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
 
 c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
-6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
 07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
 3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
 718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
@@ -159,6 +157,13 @@ pre_configure() {
 	export MAKE="make -j ${XBPS_MAKEJOBS}"
 }
 
+post_configure()  {
+	# we set some variables, right after configure has created sage_conf.py
+	cat <<-EOF >> pkgs/sage-conf/sage_conf.py
+	GAP_ROOT_DIR = "/usr/share/gap"
+	EOF
+}
+
 # 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
@@ -248,7 +253,11 @@ makedepends+="
  gengetopt texinfo
  brial-devel cliquer-devel gfan libbraiding-devel libhomfly-devel
  lrcalc-devel nauty-devel palp tachyon
- maxima-ecl primesieve-devel primecount-devel
+ maxima-ecl primesieve-devel primecount-devel gap-devel
+"
+
+# optional dependencies
+makedepends+="
  ffmpeg ImageMagick
 "
 

From 625424c33f5bab5468475b444ae742d77676a77f Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Wed, 12 Jan 2022 16:33:19 +0100
Subject: [PATCH 32/32] singular: update to 4.3.0

---
 common/shlibs                                 | 10 ++---
 .../patches/upstream_omalloc_new_musl.patch   | 40 -------------------
 .../patches/upstream_polys_test_musl.patch    | 22 ----------
 srcpkgs/singular/template                     |  7 ++--
 4 files changed, 9 insertions(+), 70 deletions(-)
 delete mode 100644 srcpkgs/singular/patches/upstream_omalloc_new_musl.patch
 delete mode 100644 srcpkgs/singular/patches/upstream_polys_test_musl.patch

diff --git a/common/shlibs b/common/shlibs
index c4b2c348f6f3..d35944228287 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4066,11 +4066,11 @@ libumfpack.so.5 SuiteSparse-5.10.1_1
 libecl.so.21.2 ecl-21.2.1_1
 libecm.so.1 ecm-7.0.4_3
 libcliquer.so.1 cliquer-1.22_1
-libSingular-4.2.1.so singular-4.2.1_1
-libfactory-4.2.1.so singular-4.2.1_1
-libpolys-4.2.1.so singular-4.2.1_1
-libomalloc-0.9.6.so singular-4.2.1_1
-libsingular_resources-4.2.1.so singular-4.2.1_1
+libSingular-4.3.0.so singular-4.3.0_1
+libfactory-4.3.0.so singular-4.3.0_1
+libpolys-4.3.0.so singular-4.3.0_1
+libomalloc-0.9.6.so singular-4.3.0_1
+libsingular_resources-4.3.0.so singular-4.3.0_1
 libbrial.so.3 brial-1.2.10_1
 libbrial_groebner.so.3 brial-1.2.10_1
 libm4ri-0.0.20200125.so m4ri-20200125_1
diff --git a/srcpkgs/singular/patches/upstream_omalloc_new_musl.patch b/srcpkgs/singular/patches/upstream_omalloc_new_musl.patch
deleted file mode 100644
index 354603bb2c44..000000000000
--- a/srcpkgs/singular/patches/upstream_omalloc_new_musl.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From e1643135645a3cc97af8659018defd2b8617bb4e Mon Sep 17 00:00:00 2001
-From: Hans Schoenemann <hannes@mathematik.uni-kl.de>
-Date: Thu, 23 Sep 2021 10:57:25 +0200
-Subject: [PATCH] omalloc: fix alignment stuff for "make check"
-
----
- omalloc/omtTest.c | 6 ------
- omalloc/omtTest.h | 2 +-
- 2 files changed, 1 insertion(+), 7 deletions(-)
-
-diff --git a/omalloc/omtTest.c b/omalloc/omtTest.c
-index 715fbb113c..75c8cdb210 100644
---- a/omalloc/omtTest.c
-+++ b/omalloc/omtTest.c
-@@ -70,12 +70,6 @@ void omtTestDebug(omMemCell cell)
-   }
- 
-   is_size = omSizeOfAddr(cell->addr);
--  if (!OM_IS_ALIGNED(is_size))
--  {
--    omReportError(omError_Unknown, omError_NoError, OM_FLR,
--                  "is_size == %u is unaligned", is_size);
--    return;
--  }
-   if (is_size < size)
-   {
-     omReportError(omError_Unknown, omError_NoError, OM_FLR,
-diff --git a/omalloc/omtTest.h b/omalloc/omtTest.h
-index a579d88011..6faa099c89 100644
---- a/omalloc/omtTest.h
-+++ b/omalloc/omtTest.h
-@@ -48,7 +48,7 @@ void TestFree(omMemCell cell);
- 
- #define IS_STICKY_BIN(spec) (spec & 1)
- // #define IS_STICKY_BIN(spec) (0)
--#define GET_SIZE(spec)      (spec & ((((unsigned long) 1) << 14) -1))
-+#define GET_SIZE(spec)      OM_ALIGN_SIZE((spec & ((((unsigned long) 1) << 14) -1)))
- #define SET_SIZE(spec, size) spec = ((spec & ~((((unsigned long) 1) << 14) -1)) | (size))
- #define IS_ALIGNED(spec)    (spec & (((unsigned long) 1) << 15))
- #define IS_ZERO(spec)       (spec & (((unsigned long) 1) << 16))
diff --git a/srcpkgs/singular/patches/upstream_polys_test_musl.patch b/srcpkgs/singular/patches/upstream_polys_test_musl.patch
deleted file mode 100644
index 73ee062e2f89..000000000000
--- a/srcpkgs/singular/patches/upstream_polys_test_musl.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From 6e2383111a18b2fa2d3421045625d1d424eb1e25 Mon Sep 17 00:00:00 2001
-From: Hans Schoenemann <hannes@mathematik.uni-kl.de>
-Date: Mon, 20 Sep 2021 15:13:36 +0200
-Subject: [PATCH] fix: make check: polys_test
-
----
- libpolys/tests/polys_test.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libpolys/tests/polys_test.h b/libpolys/tests/polys_test.h
-index 5526aa5a6b..5b4c561238 100644
---- a/libpolys/tests/polys_test.h
-+++ b/libpolys/tests/polys_test.h
-@@ -2481,7 +2481,7 @@ class PolysTestSuite : public CxxTest::TestSuite
-     {
-       for (int qi = 0; qi <= 100; qi++)
-       {
--        int c = rand() % 1000000;
-+        int c = rand() % 1000000+1; /* c must not be 0 */
-         poly qterm = p_ISet(c, r); p_SetExp(qterm, 1, qi, r);
-         p_Setm(qterm, r);
-         number qtermAsN = toFractionNumber(qterm, cf);
diff --git a/srcpkgs/singular/template b/srcpkgs/singular/template
index d3af1c8b919b..a3e1dcc0b35f 100644
--- a/srcpkgs/singular/template
+++ b/srcpkgs/singular/template
@@ -1,6 +1,6 @@
 # Template file for 'singular'
 pkgname=singular
-version=4.2.1
+version=4.3.0
 revision=1
 build_style=gnu-configure
 configure_args="--with-readline=ncurses
@@ -18,8 +18,9 @@ short_desc="Computer algebra system for polynomial computations"
 maintainer="dkwo <nicolopiazzalunga@gmail.com>"
 license="GPL-2.0-or-later"
 homepage="https://www.singular.uni-kl.de"
-distfiles="https://service.mathematik.uni-kl.de/ftp/pub/Math/Singular/src/${version//./-}/singular-${version}.tar.gz"
-checksum=28a56df84f85b116e0068ffecf92fbe08fc27bd4c5ba902997f1a367db0bfe8d
+# distfiles="https://service.mathematik.uni-kl.de/ftp/pub/Math/Singular/src/${version//./-}/singular-${version}.tar.gz"
+distfiles="ftp://jim.mathematik.uni-kl.de/pub/Math/Singular/SOURCES/${version//./-}/singular-${version}.tar.gz"
+checksum=74f38288203720e3f280256f2f8deb94030dd032b4237d844652aff0faab36e7
 
 if [ -z "$CROSS_BUILD" ]; then
 	makedepends+=" ntl-devel"

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.rc0
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (181 preceding siblings ...)
  2022-01-12 23:43 ` [PR PATCH] [Updated] " tornaria
@ 2022-01-12 23:47 ` tornaria
  2022-01-13  2:34 ` tornaria
                   ` (65 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-12 23:47 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1011554701

Comment:
New in the last push:
 - gap package from #34995
 - use system gap for sagemath
 - singular update to 4.3.0 from #35012

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.rc0
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (182 preceding siblings ...)
  2022-01-12 23:47 ` tornaria
@ 2022-01-13  2:34 ` tornaria
  2022-01-13 18:50 ` [PR PATCH] [Updated] " tornaria
                   ` (64 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-13  2:34 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1011699631

Comment:
FTR, everything passes in the chroot, but I'm getting tons of errors when running doctests on an installed sage. Presumably a misconfiguration of gap, I'll investigate and push up a fix.

I'm thinking of adding a meta-package `sagemath-test` which would just checkdepends on sagemath and run tests on the installed sagemath. This might also help streamline the dependencies of sagemath to what is really necessary.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: sagemath-9.5.rc0
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (183 preceding siblings ...)
  2022-01-13  2:34 ` tornaria
@ 2022-01-13 18:50 ` tornaria
  2022-01-13 19:11 ` tornaria
                   ` (63 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-13 18:50 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 627 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.rc0
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: 615710 bytes --]

From 203fe17bb92c602d5cacabdd9cf0771ace783a7d 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/34] 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 d67d1e5b269cbdd77f2b88f3828bda8b8c53fe66 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/34] 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 3915f0e063d96a689f623882012ae168bc903f55 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/34] 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 70209cdd42838bb9dc56a954ce3c60688c2f430c 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/34] 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 a3c6f0dff0bf1309f9c57a20f0cd08bced972153 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/34] 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 1dcc771f319e71e02a3bc1d0d3fd78d5cbb89604 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/34] 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 d407afedacfccf400a5eb64a5588872b3589143c 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/34] 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 dc907b67721b7db35e578d6af8f4361f6061dea6 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/34] 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 ea3f1adcf3427a499a2caf1530dce814e0fa5d25 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/34] 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 95d8e39c8c5f8b755132d8732d2ce51a62261953 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/34] 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 7a833ec6e7f69cbdcb75abfefe2fdcc7460d465e 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/34] 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 b983d52ccb4a827afc149b9e8196741bcfebb44e 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/34] 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 1f9df89079147514cebe48eace3ed64e581f94d6 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/34] 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 b8ea6b0aa139c39cd52a9becf547d9b824942cc4 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/34] 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 3819c6786b7482f48859d7682507a4f1ee0b1441 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/34] 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 acf07fc760f0ffac4f6822d689d9962fd5824fc1 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/34] 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 5c0e6b497238533f396511ac727087d035b32f5a 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/34] 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 b699534047c2765c7ecfd7bd7c0380ed00f855c5 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/34] 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 adbbaed8500af993ceee33d7a1458deeebba2969 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/34] 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

From f6ece4606a6ebc9040d6451f3abd0dfe91de21c7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 27 Dec 2021 20:19:19 -0300
Subject: [PATCH 20/34] sagemath: fix license and tests

Now tests can be run with -Q (normal) or -K (--long)
---
 srcpkgs/sagemath/template | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index c5009269c7fc..33b40acbabeb 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -16,7 +16,7 @@ depends="giac git FlintQS zn_poly sympow
  "
 short_desc="Open source mathematics software"
 maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
-license="GPL-3.0-or-later"
+license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
 checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
@@ -155,15 +155,17 @@ do_install() {
 }
 
 do_check() {
-	TEST=--all
 	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
-		TEST="$(sed -e 's/#.*//' ${XBPS_DISTDIR}/sagemath-check)"
+		_test_args=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	fi
+	if [ -z "$_test_args" ]; then
+		_test_args=--all
+	fi
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args="--long $_test_args"
 	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} ${OPT} ${TEST}
-	#./sage -t ${OPT} ${TEST}
+	./sage -tp ${XBPS_MAKEJOBS} ${_test_args}
 }
 
 ### copied from sage-deps, to be kept in sync

From bac65ad140b40643a62039f7c56f2285dc7dfa20 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 28 Dec 2021 23:08:17 -0300
Subject: [PATCH 21/34] sagemath: fix long time test

---
 .../patches/zzz-fix_long_time_test--see_33091.patch | 13 +++++++++++++
 ...=> zzz-skip_doctest_giac-1.7.0--see_31563.patch} |  0
 2 files changed, 13 insertions(+)
 create mode 100644 srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
 rename srcpkgs/sagemath/patches/{skip-doctest-giac-1.7.0--see-trac-31563.patch => zzz-skip_doctest_giac-1.7.0--see_31563.patch} (100%)

diff --git a/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch b/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
new file mode 100644
index 000000000000..ca360dee9f6e
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage/matrix/matrix2.pyx b/src/sage/matrix/matrix2.pyx
+index 7d319bd54b..c1a2eed6f1 100644
+--- a/src/sage/matrix/matrix2.pyx
++++ b/src/sage/matrix/matrix2.pyx
+@@ -17215,7 +17215,7 @@ cdef class Matrix(Matrix1):
+ 
+             sage: set_random_seed()
+             sage: K = random_cone(max_ambient_dim=5)
+-            sage: all(L.change_ring(SR).is_Z_operator_on(K)
++            sage: all(L.change_ring(SR).is_Z_operator_on(K) # long time
+             ....:     for L in K.Z_operators_gens())  # long time
+             True
+ 
diff --git a/srcpkgs/sagemath/patches/skip-doctest-giac-1.7.0--see-trac-31563.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_31563.patch
similarity index 100%
rename from srcpkgs/sagemath/patches/skip-doctest-giac-1.7.0--see-trac-31563.patch
rename to srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_31563.patch

From 463dcc1b7973508e4e4984d8973bbb53ba6a3ae3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 31 Dec 2021 13:52:34 -0300
Subject: [PATCH 22/34] python3-Sphinx: update to 4.3.2.

---
 srcpkgs/python3-Sphinx/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/python3-Sphinx/template b/srcpkgs/python3-Sphinx/template
index 8b0493c1f92c..29f892d16157 100644
--- a/srcpkgs/python3-Sphinx/template
+++ b/srcpkgs/python3-Sphinx/template
@@ -1,6 +1,6 @@
 # Template file for 'python3-Sphinx'
 pkgname=python3-Sphinx
-version=4.2.0
+version=4.3.2
 revision=1
 wrksrc=Sphinx-${version}
 build_style=python3-module
@@ -17,8 +17,9 @@ short_desc="Python 3 documentation generator"
 maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
 license="BSD-3-Clause"
 homepage="http://sphinx-doc.org"
+changelog="https://www.sphinx-doc.org/en/master/changes.html"
 distfiles="${PYPI_SITE}/S/Sphinx/Sphinx-${version}.tar.gz"
-checksum=94078db9184491e15bce0a56d9186e0aec95f16ac20b12d00e06d4e36f1058a6
+checksum=0a8836751a68306b3fe97ecbe44db786f8479c3bf4b80e3a7f5c838657b4698c
 conflicts="python-Sphinx>=0"
 
 post_install() {

From 3f4f586355eef536594f6689429409d3d49ffad9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 28 Dec 2021 23:08:17 -0300
Subject: [PATCH 23/34] sagemath: use system python site-packages

 - patch from #29665 for that
 - patch on top of that to allow a few more python packages:
   gmpy2, sphinx, typing_extensions, ptyprocess
 - add all available python packages to makedepends and depends
 - add ffmpeg and ImageMagick to makedepends
 - in standard check (-Q) warn if individual test > 5.0s
---
 ...184f7498a2046065e669723e68efe2d65cee.patch | 5629 +++++++++++++++++
 .../zzz-dont_run_pytest--see_31924.patch      |   27 +
 .../zzz-more_site_packages_not_in_29665.patch |   42 +
 srcpkgs/sagemath/template                     |   52 +-
 4 files changed, 5747 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch

diff --git a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
new file mode 100644
index 000000000000..b641113927e7
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
@@ -0,0 +1,5629 @@
+From 05fcaabe95082f42ba134780d579390d7b6153e2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 19:30:58 -0400
+Subject: Trac #29665: add --enable-system-site-packages option to ./configure.
+
+This new option is experimental and disabled by default. When it is
+enabled, the string "--system-site-packages" is appended to a new
+environment variable SAGE_VENV_FLAGS that is then passed to the
+sage-venv command during the build using autoconf substitution.
+Thusly the correct setting finds its way into local/pyvenv.cfg.
+---
+ build/make/Makefile.in |  2 +-
+ configure.ac           | 11 +++++++++++
+ 2 files changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/build/make/Makefile.in b/build/make/Makefile.in
+index f870cc3..68627ab 100644
+--- a/build/make/Makefile.in
++++ b/build/make/Makefile.in
+@@ -211,7 +211,7 @@ endif
+ inst_python3_venv = $(SAGE_VENV)/pyvenv.cfg
+ 
+ $(inst_python3_venv):
+-	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv "$(SAGE_VENV)"
++	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv @SAGE_VENV_FLAGS@ "$(SAGE_VENV)"
+ endif
+ 
+ # Build everything and start Sage.
+diff --git a/configure.ac b/configure.ac
+index 351f487..db30a91 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -435,6 +435,17 @@ AC_ARG_ENABLE([download-from-upstream-url],
+   [AS_HELP_STRING([--enable-download-from-upstream-url],
+     [allow downloading packages from their upstream URL if they cannot be found on the Sage mirrors])])
+ 
++AC_ARG_ENABLE(
++  [system-site-packages], [AS_HELP_STRING(
++    [--enable-system-site-packages],
++    [allow sage to use python packages from the system (experimental; default: no)]
++  )], [
++  AS_IF([test "x$enable_system_site_packages" = "xyes"], [
++    SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
++  ])
++])
++AC_SUBST([SAGE_VENV_FLAGS])
++
+ SAGE_SPKG_OPTIONS=""
+ AS_IF([test "x$enable_experimental_packages" = "xyes"], [
+   AS_VAR_APPEND([SAGE_SPKG_OPTIONS], [" -y"])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9372d1f663edf4e89f9c186336815ca04cff59dc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 19:41:14 -0400
+Subject: Trac #29665: new SAGE_PYTHON_PACKAGE_CHECK() autoconf macro.
+
+This new macro encapsulates the check for system installations of
+python packages. It uses setuptools.version's pkg_resources to
+check if the contents of install-requires.txt are satisfied for
+the given package; and if not, tells the build system to install
+the SPKG instead.
+---
+ m4/sage_python_package_check.m4 | 49 +++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 49 insertions(+)
+ create mode 100644 m4/sage_python_package_check.m4
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+new file mode 100644
+index 00000000..77b0a0c
+--- /dev/null
++++ b/m4/sage_python_package_check.m4
+@@ -0,0 +1,49 @@
++#
++# SYNOPSIS
++#
++#   SAGE_PYTHON_PACKAGE_CHECK(package)
++#
++# DESCRIPTION
++#
++#   Determine if the system copy of a python package can be used by sage.
++#
++#   This macro uses setuptools.version's pkg_resources to check that the
++#   "install-requires.txt" file for the named package is satisfied, and
++#   it can typically fail in four ways:
++#
++#     1. If --enable-system-site-packages was not passed to ./configure,
++#
++#     2. If we are not using the system python (no $PYTHON_FOR_VENV),
++#
++#     3. If setuptools is not available to the system python,
++#
++#     4. If the contents of install-requires.txt are not met (wrong
++#        version, no version, etc.) by the system python.
++#
++#   In any of those cases, we set sage_spkg_install_$package to "yes"
++#   so that the corresponding SPKG is installed. Otherwise, we do
++#   nothing, since the default value of sage_spkg_install_$package
++#   is "no" (to use the system copy).
++#
++#   The SAGE_SPKG_CONFIGURE_PYTHON3() macro is AC_REQUIRE'd to ensure
++#   that $PYTHON_FOR_VENV is available, if it is going to be available.
++#
++
++AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
++  AS_IF([test "${enable_system_site_packages}" = "yes"], [
++    AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
++
++    dnl strip all comments from install-requires.txt; this should leave
++    dnl only a single line containing the version specification for this
++    dnl package.
++    SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
++    AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++    AS_IF(
++      ["${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())"],
++      [AC_MSG_RESULT(yes)],
++      [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
++    )
++  ], [
++    sage_spkg_install_$1=yes
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a0dac8ad81ad6369d479bba30d2388de59e5cecb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:21:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for py.
+
+---
+ build/pkgs/py/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/py/spkg-configure.m4
+
+diff --git a/build/pkgs/py/spkg-configure.m4 b/build/pkgs/py/spkg-configure.m4
+new file mode 100644
+index 00000000..ded7034
+--- /dev/null
++++ b/build/pkgs/py/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([py], [SAGE_PYTHON_PACKAGE_CHECK([py])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 87c463a25ab4432dc1fba4f7a9703284e5b8f620 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:24:15 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for wheel.
+
+---
+ build/pkgs/wheel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wheel/spkg-configure.m4
+
+diff --git a/build/pkgs/wheel/spkg-configure.m4 b/build/pkgs/wheel/spkg-configure.m4
+new file mode 100644
+index 00000000..7897ea9
+--- /dev/null
++++ b/build/pkgs/wheel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([wheel], [SAGE_PYTHON_PACKAGE_CHECK([wheel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 804094b3a980f262f4d53d7be8b1be43ac0c55e0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:25:15 -0400
+Subject: Trac #29665: new spkg-configure.m4 for cvxopt.
+
+This includes a SAGE_SPKG_DEPCHECK([gsl glpk suitesparse],... because
+those C dependencies wind up linked into shared libraries like,
+
+  /usr/.../cvxopt/glpk.cpython-39-x86_64-linux-gnu.so
+
+that could potentially conflict with (for example) the glpk SPKG.
+---
+ build/pkgs/cvxopt/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/cvxopt/spkg-configure.m4
+
+diff --git a/build/pkgs/cvxopt/spkg-configure.m4 b/build/pkgs/cvxopt/spkg-configure.m4
+new file mode 100644
+index 00000000..c4aa619
+--- /dev/null
++++ b/build/pkgs/cvxopt/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([cvxopt], [
++  SAGE_SPKG_DEPCHECK([gsl glpk suitesparse], [
++    SAGE_PYTHON_PACKAGE_CHECK([cvxopt])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3f171955ff8d15da2c98aee0d2e254e95a55a2b5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:28:10 -0400
+Subject: Trac #29665: new spkg-configure.m4 for pyzmq.
+
+This includes a SAGE_SPKG_DEPCHECK([zeromq],... because libzmq winds
+up linked into shared libraries like,
+
+  /usr/.../zmq/backend/cython/message.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the zeromq SPKG.
+---
+ build/pkgs/pyzmq/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/pyzmq/spkg-configure.m4
+
+diff --git a/build/pkgs/pyzmq/spkg-configure.m4 b/build/pkgs/pyzmq/spkg-configure.m4
+new file mode 100644
+index 00000000..ae2b126
+--- /dev/null
++++ b/build/pkgs/pyzmq/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([pyzmq], [
++  SAGE_SPKG_DEPCHECK([zeromq], [
++    SAGE_PYTHON_PACKAGE_CHECK([pyzmq])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20d3aa9da9fc98a6e6a47599cd1b6d1d3785a4c4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:31:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for requests.
+
+---
+ build/pkgs/requests/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/requests/spkg-configure.m4
+
+diff --git a/build/pkgs/requests/spkg-configure.m4 b/build/pkgs/requests/spkg-configure.m4
+new file mode 100644
+index 00000000..f50a66c
+--- /dev/null
++++ b/build/pkgs/requests/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([requests], [SAGE_PYTHON_PACKAGE_CHECK([requests])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4df57ee47f2576b6b7bf9265248e06e90616b689 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:13:34 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for six.
+
+---
+ build/pkgs/six/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/six/spkg-configure.m4
+
+diff --git a/build/pkgs/six/spkg-configure.m4 b/build/pkgs/six/spkg-configure.m4
+new file mode 100644
+index 00000000..a382b81
+--- /dev/null
++++ b/build/pkgs/six/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([six], [SAGE_PYTHON_PACKAGE_CHECK([six])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f4462652d02ca729cc6d7cb36ee4d7d662deafb0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:14:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for packaging.
+
+---
+ build/pkgs/packaging/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/packaging/spkg-configure.m4
+
+diff --git a/build/pkgs/packaging/spkg-configure.m4 b/build/pkgs/packaging/spkg-configure.m4
+new file mode 100644
+index 00000000..398f9e1
+--- /dev/null
++++ b/build/pkgs/packaging/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([packaging], [SAGE_PYTHON_PACKAGE_CHECK([packaging])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4d64677fffce48077e4bc3e20ec833c70e6e9b65 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:18:53 -0400
+Subject: Trac #29665: new spkg-configure.m4 for numpy.
+
+This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack
+wind up linked into shared libraries like,
+
+  /usr/.../numpy/linalg/lapack_lite.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the openblas SPKG.
+---
+ build/pkgs/numpy/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/numpy/spkg-configure.m4
+
+diff --git a/build/pkgs/numpy/spkg-configure.m4 b/build/pkgs/numpy/spkg-configure.m4
+new file mode 100644
+index 00000000..16f9a90
+--- /dev/null
++++ b/build/pkgs/numpy/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([numpy], [
++  SAGE_SPKG_DEPCHECK([openblas], [
++   SAGE_PYTHON_PACKAGE_CHECK([numpy])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 85dfe5bb32f3c470966b477bae68a921e846d11f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:58:48 -0400
+Subject: Trac #29665: new spkg-configure.m4 for scipy.
+
+This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack
+wind up linked into shared libraries like,
+
+  /usr/.../scipy/linalg/_flinalg.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the openblas SPKG.
+---
+ build/pkgs/scipy/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/scipy/spkg-configure.m4
+
+diff --git a/build/pkgs/scipy/spkg-configure.m4 b/build/pkgs/scipy/spkg-configure.m4
+new file mode 100644
+index 00000000..0b7294a
+--- /dev/null
++++ b/build/pkgs/scipy/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([scipy], [
++  SAGE_SPKG_DEPCHECK([openblas], [
++    SAGE_PYTHON_PACKAGE_CHECK([scipy])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5616f1491036fda95f4d3e840c8c8b531c97323b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 07:19:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pluggy.
+
+---
+ build/pkgs/pluggy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pluggy/spkg-configure.m4
+
+diff --git a/build/pkgs/pluggy/spkg-configure.m4 b/build/pkgs/pluggy/spkg-configure.m4
+new file mode 100644
+index 00000000..11b1fce
+--- /dev/null
++++ b/build/pkgs/pluggy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pluggy], [SAGE_PYTHON_PACKAGE_CHECK([pluggy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6bceae3d356878cfe5fce40c9998dead003a3844 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 07:24:12 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pickleshare.
+
+---
+ build/pkgs/pickleshare/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pickleshare/spkg-configure.m4
+
+diff --git a/build/pkgs/pickleshare/spkg-configure.m4 b/build/pkgs/pickleshare/spkg-configure.m4
+new file mode 100644
+index 00000000..80e9b7c
+--- /dev/null
++++ b/build/pkgs/pickleshare/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pickleshare], [SAGE_PYTHON_PACKAGE_CHECK([pickleshare])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From da2ab534f4a256c82ed4f1c5f0f5c320529b5e9f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 08:53:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for html5lib.
+
+---
+ build/pkgs/html5lib/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/html5lib/spkg-configure.m4
+
+diff --git a/build/pkgs/html5lib/spkg-configure.m4 b/build/pkgs/html5lib/spkg-configure.m4
+new file mode 100644
+index 00000000..f421b7e
+--- /dev/null
++++ b/build/pkgs/html5lib/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([html5lib], [SAGE_PYTHON_PACKAGE_CHECK([html5lib])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5e464134afdf6055b7b5804208f759561c5435cd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 18:30:47 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for networkx.
+
+---
+ build/pkgs/networkx/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/networkx/spkg-configure.m4
+
+diff --git a/build/pkgs/networkx/spkg-configure.m4 b/build/pkgs/networkx/spkg-configure.m4
+new file mode 100644
+index 00000000..926671e
+--- /dev/null
++++ b/build/pkgs/networkx/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([networkx], [SAGE_PYTHON_PACKAGE_CHECK([networkx])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c4d40770cd9c7fda811e31759a5f4aedc320f3f9 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:33:24 -0400
+Subject: Trac #29665: new spkg-configure.m4 for matplotlib.
+
+This includes a SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull],...
+because those dependencies wind up linked into shared libraries like,
+
+  /usr/lib/.../matplotlib/ft2font.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with their SPKG counterparts.
+---
+ build/pkgs/matplotlib/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/matplotlib/spkg-configure.m4
+
+diff --git a/build/pkgs/matplotlib/spkg-configure.m4 b/build/pkgs/matplotlib/spkg-configure.m4
+new file mode 100644
+index 00000000..39c2d29
+--- /dev/null
++++ b/build/pkgs/matplotlib/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([matplotlib], [
++  SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull], [
++    SAGE_PYTHON_PACKAGE_CHECK([matplotlib])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7834dc3ac349201af632f89a9de7cd1967931010 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:35:00 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for bleach.
+
+---
+ build/pkgs/bleach/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/bleach/spkg-configure.m4
+
+diff --git a/build/pkgs/bleach/spkg-configure.m4 b/build/pkgs/bleach/spkg-configure.m4
+new file mode 100644
+index 00000000..3c9bb26
+--- /dev/null
++++ b/build/pkgs/bleach/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([bleach], [SAGE_PYTHON_PACKAGE_CHECK([bleach])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 84cad343287a2c69a4a21b9fa3b92301ff88645b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:37:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for decorator.
+
+---
+ build/pkgs/decorator/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/decorator/spkg-configure.m4
+
+diff --git a/build/pkgs/decorator/spkg-configure.m4 b/build/pkgs/decorator/spkg-configure.m4
+new file mode 100644
+index 00000000..e062778
+--- /dev/null
++++ b/build/pkgs/decorator/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([decorator], [SAGE_PYTHON_PACKAGE_CHECK([decorator])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 25693212572e69d452bc95c923ada13744359eb7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:38:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for idna.
+
+---
+ build/pkgs/idna/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/idna/spkg-configure.m4
+
+diff --git a/build/pkgs/idna/spkg-configure.m4 b/build/pkgs/idna/spkg-configure.m4
+new file mode 100644
+index 00000000..9d363f2
+--- /dev/null
++++ b/build/pkgs/idna/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([idna], [SAGE_PYTHON_PACKAGE_CHECK([idna])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6d5616472f6cdc6cf496bba6fe07bd4ef44dfdaf Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:39:23 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for certifi.
+
+---
+ build/pkgs/certifi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/certifi/spkg-configure.m4
+
+diff --git a/build/pkgs/certifi/spkg-configure.m4 b/build/pkgs/certifi/spkg-configure.m4
+new file mode 100644
+index 00000000..ddd4061
+--- /dev/null
++++ b/build/pkgs/certifi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([certifi], [SAGE_PYTHON_PACKAGE_CHECK([certifi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9412a07023b275e29e8d1af9b8ee3e767042e7fd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:40:59 -0400
+Subject: Trac #29665: new spkg-configure.m4 for pillow.
+
+This includes an SAGE_SPKG_DEPCHECK([bzip2 freetype libpng zlib],...
+because those dependencies wind up linked into shared libraries like,
+
+  /usr/.../PIL/_imagingft.cpython-39-x86_64-linux-gnu.so
+
+and potentially conflict with their SPKG counterparts.
+---
+ build/pkgs/pillow/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/pillow/spkg-configure.m4
+
+diff --git a/build/pkgs/pillow/spkg-configure.m4 b/build/pkgs/pillow/spkg-configure.m4
+new file mode 100644
+index 00000000..f2e68e2
+--- /dev/null
++++ b/build/pkgs/pillow/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([pillow], [
++  SAGE_SPKG_DEPCHECK([bzip2 freetype libpng zlib], [
++    SAGE_PYTHON_PACKAGE_CHECK([pillow])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From eede914311481fdb75b363b7a799075e876a2b4f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:44:13 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for mpmath.
+
+---
+ build/pkgs/mpmath/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mpmath/spkg-configure.m4
+
+diff --git a/build/pkgs/mpmath/spkg-configure.m4 b/build/pkgs/mpmath/spkg-configure.m4
+new file mode 100644
+index 00000000..f43c838
+--- /dev/null
++++ b/build/pkgs/mpmath/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([mpmath], [SAGE_PYTHON_PACKAGE_CHECK([mpmath])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 363a825885832c0b580ff53fe61f5c79e70c4728 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:44:56 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for sympy.
+
+---
+ build/pkgs/sympy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sympy/spkg-configure.m4
+
+diff --git a/build/pkgs/sympy/spkg-configure.m4 b/build/pkgs/sympy/spkg-configure.m4
+new file mode 100644
+index 00000000..fa0f1f5
+--- /dev/null
++++ b/build/pkgs/sympy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([sympy], [SAGE_PYTHON_PACKAGE_CHECK([sympy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0667964c914e4a01dda697190a054ff96cea92d6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:47:06 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pygments.
+
+---
+ build/pkgs/pygments/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pygments/spkg-configure.m4
+
+diff --git a/build/pkgs/pygments/spkg-configure.m4 b/build/pkgs/pygments/spkg-configure.m4
+new file mode 100644
+index 00000000..99f29e3
+--- /dev/null
++++ b/build/pkgs/pygments/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pygments], [SAGE_PYTHON_PACKAGE_CHECK([pygments])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f787c233aa05d8e90f7c6ad18f76bd2fa36bfbfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:48:50 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for jinja2.
+
+---
+ build/pkgs/jinja2/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jinja2/spkg-configure.m4
+
+diff --git a/build/pkgs/jinja2/spkg-configure.m4 b/build/pkgs/jinja2/spkg-configure.m4
+new file mode 100644
+index 00000000..0970d1c
+--- /dev/null
++++ b/build/pkgs/jinja2/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jinja2], [SAGE_PYTHON_PACKAGE_CHECK([jinja2])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 309d8f8e2b7078b5efbbe824b69ec1d9b1e639f0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:43:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pandocfilters.
+
+---
+ build/pkgs/pandocfilters/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/pandocfilters/spkg-configure.m4
+
+diff --git a/build/pkgs/pandocfilters/spkg-configure.m4 b/build/pkgs/pandocfilters/spkg-configure.m4
+new file mode 100644
+index 00000000..3e9537f
+--- /dev/null
++++ b/build/pkgs/pandocfilters/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([pandocfilters], [
++  SAGE_PYTHON_PACKAGE_CHECK([pandocfilters])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f57bfda49777a6ba1cd123553acd75dc347c5521 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:44:46 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for webencodings.
+
+---
+ build/pkgs/webencodings/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/webencodings/spkg-configure.m4
+
+diff --git a/build/pkgs/webencodings/spkg-configure.m4 b/build/pkgs/webencodings/spkg-configure.m4
+new file mode 100644
+index 00000000..1b9a5c4
+--- /dev/null
++++ b/build/pkgs/webencodings/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([webencodings], [
++  SAGE_PYTHON_PACKAGE_CHECK([webencodings])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7f193a62d7a2ea0b6a3ca6beb12390d91c25bbfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:48:26 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pytz.
+
+---
+ build/pkgs/pytz/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pytz/spkg-configure.m4
+
+diff --git a/build/pkgs/pytz/spkg-configure.m4 b/build/pkgs/pytz/spkg-configure.m4
+new file mode 100644
+index 00000000..366521b
+--- /dev/null
++++ b/build/pkgs/pytz/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pytz], [SAGE_PYTHON_PACKAGE_CHECK([pytz])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bfd3fdd887c3465c03465248de4997eed4a82915 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:51:16 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for texttable.
+
+---
+ build/pkgs/texttable/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/texttable/spkg-configure.m4
+
+diff --git a/build/pkgs/texttable/spkg-configure.m4 b/build/pkgs/texttable/spkg-configure.m4
+new file mode 100644
+index 00000000..42a3de1
+--- /dev/null
++++ b/build/pkgs/texttable/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([texttable], [SAGE_PYTHON_PACKAGE_CHECK([texttable])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 914bf0cc57abc46129b27c1525782dbe16da31a2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:53:41 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for babel.
+
+---
+ build/pkgs/babel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/babel/spkg-configure.m4
+
+diff --git a/build/pkgs/babel/spkg-configure.m4 b/build/pkgs/babel/spkg-configure.m4
+new file mode 100644
+index 00000000..d7b9a71
+--- /dev/null
++++ b/build/pkgs/babel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([babel], [SAGE_PYTHON_PACKAGE_CHECK([babel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 56977abd1eafbc87c765a2892cfe525382648259 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 14 Oct 2021 08:06:59 -0400
+Subject: Trac #29665: force system python3 with --enable-system-site-packages.
+
+When the python SPKG is used, the --enable-system-site-packages flag
+will essentially do nothing, and that may confuse users who have
+wasted a few hours building sage. (Generally, they will want to fix
+detection of their system python3 first.)
+
+To forestall that, we now set "--with-system-python3=force" whenever
+the "--enable-system-site-packages" flag is passed.
+---
+ configure.ac | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index db30a91..6fafb83 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -438,10 +438,19 @@ AC_ARG_ENABLE([download-from-upstream-url],
+ AC_ARG_ENABLE(
+   [system-site-packages], [AS_HELP_STRING(
+     [--enable-system-site-packages],
+-    [allow sage to use python packages from the system (experimental; default: no)]
++    [allow the use of python packages from the system (experimental; default: no)]
+   )], [
+   AS_IF([test "x$enable_system_site_packages" = "xyes"], [
+     SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
++
++    dnl We want to raise an error if the user asked for "system site
++    dnl packages" but the system python will not be used. Technically
++    dnl that causes no problems (SAGE_PYTHON_PACKAGE_CHECK always fails,
++    dnl so SPKGs are used for all python packages), but it may be confusing
++    dnl to end users who expect the flag to actually give them access to
++    dnl their system python packages and who may not be paying close
++    dnl attention to their ./configure output.
++    with_system_python3="force"
+   ])
+ ])
+ AC_SUBST([SAGE_VENV_FLAGS])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 02b369fd24ef7cf8997082e7850b9cf022cae34b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 01:18:35 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for setuptools.
+
+---
+ build/pkgs/setuptools/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/setuptools/spkg-configure.m4
+
+diff --git a/build/pkgs/setuptools/spkg-configure.m4 b/build/pkgs/setuptools/spkg-configure.m4
+new file mode 100644
+index 00000000..a2ad811
+--- /dev/null
++++ b/build/pkgs/setuptools/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([setuptools], [SAGE_PYTHON_PACKAGE_CHECK([setuptools])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 05117317d38693978efaf36e81d8b02bae44b257 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 01:15:48 -0400
+Subject: Trac #29665: poison PYTHONUSERBASE when testing for "system"
+ packages.
+
+When we're detecting system installations of python packages, we want
+to hide anything that was installed with e.g. "pip install --user". To
+accomplish that, we mimic the PYTHONUSERBASE poisoning from sage-env
+within the SAGE_PYTHON_PACKAGE_CHECK() macro.
+---
+ m4/sage_python_package_check.m4 | 18 +++++++++++++++++-
+ 1 file changed, 17 insertions(+), 1 deletion(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 77b0a0c..b8cdba4 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -38,11 +38,27 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     dnl package.
+     SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
+     AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++
++    dnl To prevent user-site (pip install --user) packages from being
++    dnl detected as "system" packages, we poison PYTHONUSERBASE. The
++    dnl sage-env script also does this at runtime; we mimic that
++    dnl implementation to ensure that the behaviors at ./configure and
++    dnl runtime are identical. Beware that (as in sage-env) the poisoning
++    dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
++    dnl user points PYTHONUSERBASE to any path (even the default), then
++    dnl his local pip packages will be detected.
++    PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
++    AS_IF([test -z "${PYTHONUSERBASE}"], [
++      PYTHONUSERBASE="${HOME}/.sage/local"
++    ])
++
+     AS_IF(
+-      ["${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())"],
++      [PYTHONUSERBASE="${PYTHONUSERBASE}" "${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" 2>/dev/null],
+       [AC_MSG_RESULT(yes)],
+       [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+     )
++
++    PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d75c1492f63a584b5ec5f424ddd7f7c4a6d502d3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:20:04 -0400
+Subject: Trac #29665: run SAGE_PYTHON_PACKAGE_CHECK() inside a venv.
+
+To recreate the runtime environment as closely as possible, we now use
+a venv (with system site packages enabled) when checking for system
+copies of python packages.
+---
+ m4/sage_python_package_check.m4 | 76 +++++++++++++++++++++++++++--------------
+ 1 file changed, 51 insertions(+), 25 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index b8cdba4..7cbd6c0 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -15,9 +15,11 @@
+ #
+ #     2. If we are not using the system python (no $PYTHON_FOR_VENV),
+ #
+-#     3. If setuptools is not available to the system python,
++#     3. If we are unable to create a venv with the system python,
+ #
+-#     4. If the contents of install-requires.txt are not met (wrong
++#     4. If setuptools is not available to the system python,
++#
++#     5. If the contents of install-requires.txt are not met (wrong
+ #        version, no version, etc.) by the system python.
+ #
+ #   In any of those cases, we set sage_spkg_install_$package to "yes"
+@@ -27,38 +29,62 @@
+ #
+ #   The SAGE_SPKG_CONFIGURE_PYTHON3() macro is AC_REQUIRE'd to ensure
+ #   that $PYTHON_FOR_VENV is available, if it is going to be available.
++#   The check is run inside a new venv, and with the PYTHONUSERBASE
++#   variable poisoned in the same manner as sage-env poisons it, to
++#   ensure that the ./configure- and run-time views of the system
++#   are as similar as possible.
+ #
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
+     AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
+ 
+-    dnl strip all comments from install-requires.txt; this should leave
+-    dnl only a single line containing the version specification for this
+-    dnl package.
+-    SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
+-    AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++    dnl We run this check inside a python venv, because that's ultimately
++    dnl how the system $PYTHON_FOR_VENV will be used.
++    AC_MSG_CHECKING([if we can create a python venv in config.venv])
+ 
+-    dnl To prevent user-site (pip install --user) packages from being
+-    dnl detected as "system" packages, we poison PYTHONUSERBASE. The
+-    dnl sage-env script also does this at runtime; we mimic that
+-    dnl implementation to ensure that the behaviors at ./configure and
+-    dnl runtime are identical. Beware that (as in sage-env) the poisoning
+-    dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
+-    dnl user points PYTHONUSERBASE to any path (even the default), then
+-    dnl his local pip packages will be detected.
+-    PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
+-    AS_IF([test -z "${PYTHONUSERBASE}"], [
+-      PYTHONUSERBASE="${HOME}/.sage/local"
+-    ])
++    dnl Use --clear because ./configure typically clobbers its output files.
++    AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
++                                        --clear                dnl
++                                        --without-pip          dnl
++					config.venv], [
++      AC_MSG_RESULT(yes)
++      dnl strip all comments from install-requires.txt; this should leave
++      dnl only a single line containing the version specification for this
++      dnl package.
++      SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
++      AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++
++      dnl To prevent user-site (pip install --user) packages from being
++      dnl detected as "system" packages, we poison PYTHONUSERBASE. The
++      dnl sage-env script also does this at runtime; we mimic that
++      dnl implementation to ensure that the behaviors at ./configure and
++      dnl runtime are identical. Beware that (as in sage-env) the poisoning
++      dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
++      dnl user points PYTHONUSERBASE to any path (even the default), then
++      dnl his local pip packages will be detected.
++      PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
++      AS_IF([test -z "${PYTHONUSERBASE}"], [
++        PYTHONUSERBASE="${HOME}/.sage/local"
++      ])
+ 
+-    AS_IF(
+-      [PYTHONUSERBASE="${PYTHONUSERBASE}" "${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" 2>/dev/null],
+-      [AC_MSG_RESULT(yes)],
+-      [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+-    )
++      AS_IF(
++        [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
++           "from setuptools.version import pkg_resources;              dnl
++            pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" dnl
++	 2>/dev/null],
++        [AC_MSG_RESULT(yes)],
++        [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
++      )
++
++      PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
++    ], [
++      dnl failed to create a venv for some reason
++      AC_MSG_RESULT(no)
++      sage_spkg_install_$1=yes
++    ])
+ 
+-    PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
++    rm -rf config.venv
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 87646c3264a04ffd98a12d67074f93e1943a1e96 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:38:08 -0400
+Subject: Trac #29665: log SAGE_PYTHON_PACKAGE_CHECK() failures to config.log.
+
+---
+ m4/sage_python_package_check.m4 | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 7cbd6c0..e0e0b9f 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -47,7 +47,8 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
+                                         --clear                dnl
+                                         --without-pip          dnl
+-					config.venv], [
++                                        config.venv            dnl
++                                        2>&AS_MESSAGE_LOG_FD], [
+       AC_MSG_RESULT(yes)
+       dnl strip all comments from install-requires.txt; this should leave
+       dnl only a single line containing the version specification for this
+@@ -72,7 +73,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+         [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
+            "from setuptools.version import pkg_resources;              dnl
+             pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" dnl
+-	 2>/dev/null],
++	 2>&AS_MESSAGE_LOG_FD],
+         [AC_MSG_RESULT(yes)],
+         [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+       )
+-- 
+cgit v1.0-1-gd88e
+
+
+From f7dfffd1c64816e2ae4e0f420b22065c5c5bf2cb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:45:37 -0400
+Subject: Trac #29665: don't clobber a plain file named config.venv.
+
+When SAGE_PYTHON_PACKAGE_CHECK() is cleaning up, we no longer remove
+"config.venv" unconditionally. Instead, we remove it only if it is a
+directory. This is also how "pyvenv --clear" works.
+---
+ m4/sage_python_package_check.m4 | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index e0e0b9f..127a078 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -85,7 +85,9 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+       sage_spkg_install_$1=yes
+     ])
+ 
+-    rm -rf config.venv
++    dnl Clean up config.venv, but only if we could have created it.
++    dnl (The --clear flag to pyvenv will not clobber a plain file.)
++    AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9849c77313b895dcfb786d2ea54e36585bd31ce2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 16 Oct 2021 08:14:42 -0400
+Subject: Trac #29665: don't announce system python packages that won't be
+ used.
+
+When --enable-system-site-packages was not given, the python packages
+using SAGE_PYTHON_PACKAGE_CHECK() in spkg-configure.m4 cannot be used.
+Rather than suggest that users install them anyway, that macro now
+hacks the value of sage_use_system_$package to be "no" when the use
+of system site packages is disabled at the python level.
+---
+ m4/sage_python_package_check.m4 | 17 +++++++++++++++++
+ 1 file changed, 17 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 127a078..7ee82a7 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -89,6 +89,23 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     dnl (The --clear flag to pyvenv will not clobber a plain file.)
+     AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
++    dnl System site packages are disabled.
+     sage_spkg_install_$1=yes
++
++    dnl We have to retroactively hack the --with-system-foo={no,yes,force}
++    dnl mechanism here because it wasn't designed with the ability to
++    dnl disable arbitrary chunks of system packages in mind. The easy cases
++    dnl are "no" and "force" which require no action; "no" means we won't
++    dnl suggest the package anyway, and "force" will raise an error when
++    dnl the system-package check fails.
++    dnl
++    dnl The default of "yes" is more troubling because it is the default. To
++    dnl avoid prompting users to install packages that won't be used, we want
++    dnl to ignore "yes" when reporting the "hint: install these packages..."
++    dnl at the end of ./configure. To accomplish that, we change "yes" to
++    dnl "no" here, essentially changing the default for packages using this
++    dnl macro when --enable-system-site-packages is disabled. Packages with
++    dnl "no" are not suggested to the user.
++    AS_IF([test "${sage_use_system_$1}" = "yes"],[sage_use_system_$1=no])
+   ])
+ ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3e6ad737b94aaac234d615ecaf1a2455eb607f1a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 17 Oct 2021 06:16:21 -0400
+Subject: Trac #29665: add Gentoo package information for python packages.
+
+---
+ build/pkgs/babel/distros/gentoo.txt         | 1 +
+ build/pkgs/bleach/distros/gentoo.txt        | 1 +
+ build/pkgs/certifi/distros/gentoo.txt       | 1 +
+ build/pkgs/cvxopt/distros/gentoo.txt        | 1 +
+ build/pkgs/decorator/distros/gentoo.txt     | 1 +
+ build/pkgs/html5lib/distros/gentoo.txt      | 1 +
+ build/pkgs/idna/distros/gentoo.txt          | 1 +
+ build/pkgs/jinja2/distros/gentoo.txt        | 1 +
+ build/pkgs/matplotlib/distros/gentoo.txt    | 1 +
+ build/pkgs/mpmath/distros/gentoo.txt        | 1 +
+ build/pkgs/networkx/distros/gentoo.txt      | 1 +
+ build/pkgs/numpy/distros/gentoo.txt         | 1 +
+ build/pkgs/packaging/distros/gentoo.txt     | 1 +
+ build/pkgs/pandocfilters/distros/gentoo.txt | 1 +
+ build/pkgs/pickleshare/distros/gentoo.txt   | 1 +
+ build/pkgs/pillow/distros/gentoo.txt        | 1 +
+ build/pkgs/pluggy/distros/gentoo.txt        | 1 +
+ build/pkgs/pygments/distros/gentoo.txt      | 1 +
+ build/pkgs/pytz/distros/gentoo.txt          | 1 +
+ build/pkgs/pyzmq/distros/gentoo.txt         | 1 +
+ build/pkgs/requests/distros/gentoo.txt      | 1 +
+ build/pkgs/scipy/distros/gentoo.txt         | 1 +
+ build/pkgs/setuptools/distros/gentoo.txt    | 1 +
+ build/pkgs/six/distros/gentoo.txt           | 1 +
+ build/pkgs/sympy/distros/gentoo.txt         | 1 +
+ build/pkgs/texttable/distros/gentoo.txt     | 1 +
+ build/pkgs/toml/distros/gentoo.txt          | 1 +
+ build/pkgs/webencodings/distros/gentoo.txt  | 1 +
+ 28 files changed, 28 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/gentoo.txt
+ create mode 100644 build/pkgs/bleach/distros/gentoo.txt
+ create mode 100644 build/pkgs/certifi/distros/gentoo.txt
+ create mode 100644 build/pkgs/cvxopt/distros/gentoo.txt
+ create mode 100644 build/pkgs/decorator/distros/gentoo.txt
+ create mode 100644 build/pkgs/html5lib/distros/gentoo.txt
+ create mode 100644 build/pkgs/idna/distros/gentoo.txt
+ create mode 100644 build/pkgs/jinja2/distros/gentoo.txt
+ create mode 100644 build/pkgs/matplotlib/distros/gentoo.txt
+ create mode 100644 build/pkgs/mpmath/distros/gentoo.txt
+ create mode 100644 build/pkgs/networkx/distros/gentoo.txt
+ create mode 100644 build/pkgs/numpy/distros/gentoo.txt
+ create mode 100644 build/pkgs/packaging/distros/gentoo.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/gentoo.txt
+ create mode 100644 build/pkgs/pickleshare/distros/gentoo.txt
+ create mode 100644 build/pkgs/pillow/distros/gentoo.txt
+ create mode 100644 build/pkgs/pluggy/distros/gentoo.txt
+ create mode 100644 build/pkgs/pygments/distros/gentoo.txt
+ create mode 100644 build/pkgs/pytz/distros/gentoo.txt
+ create mode 100644 build/pkgs/pyzmq/distros/gentoo.txt
+ create mode 100644 build/pkgs/requests/distros/gentoo.txt
+ create mode 100644 build/pkgs/scipy/distros/gentoo.txt
+ create mode 100644 build/pkgs/setuptools/distros/gentoo.txt
+ create mode 100644 build/pkgs/six/distros/gentoo.txt
+ create mode 100644 build/pkgs/sympy/distros/gentoo.txt
+ create mode 100644 build/pkgs/texttable/distros/gentoo.txt
+ create mode 100644 build/pkgs/toml/distros/gentoo.txt
+ create mode 100644 build/pkgs/webencodings/distros/gentoo.txt
+
+diff --git a/build/pkgs/babel/distros/gentoo.txt b/build/pkgs/babel/distros/gentoo.txt
+new file mode 100644
+index 00000000..2d2c34f
+--- /dev/null
++++ b/build/pkgs/babel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/Babel
+diff --git a/build/pkgs/bleach/distros/gentoo.txt b/build/pkgs/bleach/distros/gentoo.txt
+new file mode 100644
+index 00000000..b4f9744
+--- /dev/null
++++ b/build/pkgs/bleach/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/bleach
+diff --git a/build/pkgs/certifi/distros/gentoo.txt b/build/pkgs/certifi/distros/gentoo.txt
+new file mode 100644
+index 00000000..72e2e91
+--- /dev/null
++++ b/build/pkgs/certifi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/certifi
+diff --git a/build/pkgs/cvxopt/distros/gentoo.txt b/build/pkgs/cvxopt/distros/gentoo.txt
+new file mode 100644
+index 00000000..b312391
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/cvxopt
+diff --git a/build/pkgs/decorator/distros/gentoo.txt b/build/pkgs/decorator/distros/gentoo.txt
+new file mode 100644
+index 00000000..fea5a67
+--- /dev/null
++++ b/build/pkgs/decorator/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/decorator
+diff --git a/build/pkgs/html5lib/distros/gentoo.txt b/build/pkgs/html5lib/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c2be76
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/html5lib
+diff --git a/build/pkgs/idna/distros/gentoo.txt b/build/pkgs/idna/distros/gentoo.txt
+new file mode 100644
+index 00000000..68ef51c
+--- /dev/null
++++ b/build/pkgs/idna/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/idna
+diff --git a/build/pkgs/jinja2/distros/gentoo.txt b/build/pkgs/jinja2/distros/gentoo.txt
+new file mode 100644
+index 00000000..15a27ae
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jinja
+diff --git a/build/pkgs/matplotlib/distros/gentoo.txt b/build/pkgs/matplotlib/distros/gentoo.txt
+new file mode 100644
+index 00000000..bcfefb5
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/matplotlib
+diff --git a/build/pkgs/mpmath/distros/gentoo.txt b/build/pkgs/mpmath/distros/gentoo.txt
+new file mode 100644
+index 00000000..946c62d
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/mpmath
+diff --git a/build/pkgs/networkx/distros/gentoo.txt b/build/pkgs/networkx/distros/gentoo.txt
+new file mode 100644
+index 00000000..dd97742
+--- /dev/null
++++ b/build/pkgs/networkx/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/networkx
+diff --git a/build/pkgs/numpy/distros/gentoo.txt b/build/pkgs/numpy/distros/gentoo.txt
+new file mode 100644
+index 00000000..d2179d4
+--- /dev/null
++++ b/build/pkgs/numpy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/numpy
+diff --git a/build/pkgs/packaging/distros/gentoo.txt b/build/pkgs/packaging/distros/gentoo.txt
+new file mode 100644
+index 00000000..e5309ed
+--- /dev/null
++++ b/build/pkgs/packaging/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/packaging
+diff --git a/build/pkgs/pandocfilters/distros/gentoo.txt b/build/pkgs/pandocfilters/distros/gentoo.txt
+new file mode 100644
+index 00000000..a726fda
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/gentoo.txt b/build/pkgs/pickleshare/distros/gentoo.txt
+new file mode 100644
+index 00000000..14fad0f
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pickleshare
+diff --git a/build/pkgs/pillow/distros/gentoo.txt b/build/pkgs/pillow/distros/gentoo.txt
+new file mode 100644
+index 00000000..1243649
+--- /dev/null
++++ b/build/pkgs/pillow/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pillow
+diff --git a/build/pkgs/pluggy/distros/gentoo.txt b/build/pkgs/pluggy/distros/gentoo.txt
+new file mode 100644
+index 00000000..7b33876
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pluggy
+diff --git a/build/pkgs/pygments/distros/gentoo.txt b/build/pkgs/pygments/distros/gentoo.txt
+new file mode 100644
+index 00000000..a584f32
+--- /dev/null
++++ b/build/pkgs/pygments/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pygments
+diff --git a/build/pkgs/pytz/distros/gentoo.txt b/build/pkgs/pytz/distros/gentoo.txt
+new file mode 100644
+index 00000000..902a18b
+--- /dev/null
++++ b/build/pkgs/pytz/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pytz
+diff --git a/build/pkgs/pyzmq/distros/gentoo.txt b/build/pkgs/pyzmq/distros/gentoo.txt
+new file mode 100644
+index 00000000..77c2429
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyzmq
+diff --git a/build/pkgs/requests/distros/gentoo.txt b/build/pkgs/requests/distros/gentoo.txt
+new file mode 100644
+index 00000000..d3dc941
+--- /dev/null
++++ b/build/pkgs/requests/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/requests
+diff --git a/build/pkgs/scipy/distros/gentoo.txt b/build/pkgs/scipy/distros/gentoo.txt
+new file mode 100644
+index 00000000..11dabd2
+--- /dev/null
++++ b/build/pkgs/scipy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/scipy
+diff --git a/build/pkgs/setuptools/distros/gentoo.txt b/build/pkgs/setuptools/distros/gentoo.txt
+new file mode 100644
+index 00000000..3a4fa34
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/setuptools
+diff --git a/build/pkgs/six/distros/gentoo.txt b/build/pkgs/six/distros/gentoo.txt
+new file mode 100644
+index 00000000..f73f648
+--- /dev/null
++++ b/build/pkgs/six/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/six
+diff --git a/build/pkgs/sympy/distros/gentoo.txt b/build/pkgs/sympy/distros/gentoo.txt
+new file mode 100644
+index 00000000..b5a5034
+--- /dev/null
++++ b/build/pkgs/sympy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sympy
+diff --git a/build/pkgs/texttable/distros/gentoo.txt b/build/pkgs/texttable/distros/gentoo.txt
+new file mode 100644
+index 00000000..b33a7a7
+--- /dev/null
++++ b/build/pkgs/texttable/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/texttable
+diff --git a/build/pkgs/toml/distros/gentoo.txt b/build/pkgs/toml/distros/gentoo.txt
+new file mode 100644
+index 00000000..64fcea3
+--- /dev/null
++++ b/build/pkgs/toml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/toml
+diff --git a/build/pkgs/webencodings/distros/gentoo.txt b/build/pkgs/webencodings/distros/gentoo.txt
+new file mode 100644
+index 00000000..7539b0f
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/webencodings
+-- 
+cgit v1.0-1-gd88e
+
+
+From 088380f884124c9608160b613ba031c5f023f604 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 18:43:04 -0700
+Subject: build/pkgs: Add distros/fedora.txt for Python packages
+
+---
+ build/pkgs/babel/distros/fedora.txt         | 1 +
+ build/pkgs/bleach/distros/fedora.txt        | 1 +
+ build/pkgs/certifi/distros/fedora.txt       | 1 +
+ build/pkgs/cvxopt/distros/fedora.txt        | 1 +
+ build/pkgs/decorator/distros/fedora.txt     | 1 +
+ build/pkgs/html5lib/distros/fedora.txt      | 1 +
+ build/pkgs/idna/distros/fedora.txt          | 1 +
+ build/pkgs/jinja2/distros/fedora.txt        | 1 +
+ build/pkgs/matplotlib/distros/fedora.txt    | 1 +
+ build/pkgs/mpmath/distros/fedora.txt        | 1 +
+ build/pkgs/networkx/distros/fedora.txt      | 1 +
+ build/pkgs/numpy/distros/fedora.txt         | 1 +
+ build/pkgs/packaging/distros/fedora.txt     | 1 +
+ build/pkgs/pandocfilters/distros/fedora.txt | 1 +
+ build/pkgs/pickleshare/distros/fedora.txt   | 1 +
+ build/pkgs/pillow/distros/fedora.txt        | 1 +
+ build/pkgs/pluggy/distros/fedora.txt        | 1 +
+ build/pkgs/py/distros/fedora.txt            | 1 +
+ build/pkgs/pygments/distros/fedora.txt      | 1 +
+ build/pkgs/pytz/distros/fedora.txt          | 1 +
+ build/pkgs/pyzmq/distros/fedora.txt         | 1 +
+ build/pkgs/requests/distros/fedora.txt      | 1 +
+ build/pkgs/scipy/distros/fedora.txt         | 1 +
+ build/pkgs/setuptools/distros/fedora.txt    | 1 +
+ build/pkgs/six/distros/fedora.txt           | 1 +
+ build/pkgs/sympy/distros/fedora.txt         | 1 +
+ build/pkgs/texttable/distros/fedora.txt     | 1 +
+ build/pkgs/toml/distros/fedora.txt          | 1 +
+ build/pkgs/webencodings/distros/fedora.txt  | 1 +
+ build/pkgs/wheel/distros/fedora.txt         | 1 +
+ 30 files changed, 30 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/fedora.txt
+ create mode 100644 build/pkgs/bleach/distros/fedora.txt
+ create mode 100644 build/pkgs/certifi/distros/fedora.txt
+ create mode 100644 build/pkgs/cvxopt/distros/fedora.txt
+ create mode 100644 build/pkgs/decorator/distros/fedora.txt
+ create mode 100644 build/pkgs/html5lib/distros/fedora.txt
+ create mode 100644 build/pkgs/idna/distros/fedora.txt
+ create mode 100644 build/pkgs/jinja2/distros/fedora.txt
+ create mode 100644 build/pkgs/matplotlib/distros/fedora.txt
+ create mode 100644 build/pkgs/mpmath/distros/fedora.txt
+ create mode 100644 build/pkgs/networkx/distros/fedora.txt
+ create mode 100644 build/pkgs/numpy/distros/fedora.txt
+ create mode 100644 build/pkgs/packaging/distros/fedora.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/fedora.txt
+ create mode 100644 build/pkgs/pickleshare/distros/fedora.txt
+ create mode 100644 build/pkgs/pillow/distros/fedora.txt
+ create mode 100644 build/pkgs/pluggy/distros/fedora.txt
+ create mode 100644 build/pkgs/py/distros/fedora.txt
+ create mode 100644 build/pkgs/pygments/distros/fedora.txt
+ create mode 100644 build/pkgs/pytz/distros/fedora.txt
+ create mode 100644 build/pkgs/pyzmq/distros/fedora.txt
+ create mode 100644 build/pkgs/requests/distros/fedora.txt
+ create mode 100644 build/pkgs/scipy/distros/fedora.txt
+ create mode 100644 build/pkgs/setuptools/distros/fedora.txt
+ create mode 100644 build/pkgs/six/distros/fedora.txt
+ create mode 100644 build/pkgs/sympy/distros/fedora.txt
+ create mode 100644 build/pkgs/texttable/distros/fedora.txt
+ create mode 100644 build/pkgs/toml/distros/fedora.txt
+ create mode 100644 build/pkgs/webencodings/distros/fedora.txt
+ create mode 100644 build/pkgs/wheel/distros/fedora.txt
+
+diff --git a/build/pkgs/babel/distros/fedora.txt b/build/pkgs/babel/distros/fedora.txt
+new file mode 100644
+index 00000000..98f6593
+--- /dev/null
++++ b/build/pkgs/babel/distros/fedora.txt
+@@ -0,0 +1 @@
++babel
+diff --git a/build/pkgs/bleach/distros/fedora.txt b/build/pkgs/bleach/distros/fedora.txt
+new file mode 100644
+index 00000000..c5422cc
+--- /dev/null
++++ b/build/pkgs/bleach/distros/fedora.txt
+@@ -0,0 +1 @@
++python-bleach
+diff --git a/build/pkgs/certifi/distros/fedora.txt b/build/pkgs/certifi/distros/fedora.txt
+new file mode 100644
+index 00000000..be421c8
+--- /dev/null
++++ b/build/pkgs/certifi/distros/fedora.txt
+@@ -0,0 +1 @@
++python-certifi
+diff --git a/build/pkgs/cvxopt/distros/fedora.txt b/build/pkgs/cvxopt/distros/fedora.txt
+new file mode 100644
+index 00000000..f15770f
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/fedora.txt
+@@ -0,0 +1 @@
++python-cvxopt
+diff --git a/build/pkgs/decorator/distros/fedora.txt b/build/pkgs/decorator/distros/fedora.txt
+new file mode 100644
+index 00000000..0795604
+--- /dev/null
++++ b/build/pkgs/decorator/distros/fedora.txt
+@@ -0,0 +1 @@
++python-decorator
+diff --git a/build/pkgs/html5lib/distros/fedora.txt b/build/pkgs/html5lib/distros/fedora.txt
+new file mode 100644
+index 00000000..b821491
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/fedora.txt
+@@ -0,0 +1 @@
++python-html5lib
+diff --git a/build/pkgs/idna/distros/fedora.txt b/build/pkgs/idna/distros/fedora.txt
+new file mode 100644
+index 00000000..a73e70c
+--- /dev/null
++++ b/build/pkgs/idna/distros/fedora.txt
+@@ -0,0 +1 @@
++python-idna
+diff --git a/build/pkgs/jinja2/distros/fedora.txt b/build/pkgs/jinja2/distros/fedora.txt
+new file mode 100644
+index 00000000..f5f3caf
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/fedora.txt
+@@ -0,0 +1 @@
++python-jinja2
+diff --git a/build/pkgs/matplotlib/distros/fedora.txt b/build/pkgs/matplotlib/distros/fedora.txt
+new file mode 100644
+index 00000000..f6d856e
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/fedora.txt
+@@ -0,0 +1 @@
++python-matplotlib
+diff --git a/build/pkgs/mpmath/distros/fedora.txt b/build/pkgs/mpmath/distros/fedora.txt
+new file mode 100644
+index 00000000..a7dc8d5
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/fedora.txt
+@@ -0,0 +1 @@
++python-mpmath
+diff --git a/build/pkgs/networkx/distros/fedora.txt b/build/pkgs/networkx/distros/fedora.txt
+new file mode 100644
+index 00000000..293f943
+--- /dev/null
++++ b/build/pkgs/networkx/distros/fedora.txt
+@@ -0,0 +1 @@
++python-networkx
+diff --git a/build/pkgs/numpy/distros/fedora.txt b/build/pkgs/numpy/distros/fedora.txt
+new file mode 100644
+index 00000000..c8722b9
+--- /dev/null
++++ b/build/pkgs/numpy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-numpy
+diff --git a/build/pkgs/packaging/distros/fedora.txt b/build/pkgs/packaging/distros/fedora.txt
+new file mode 100644
+index 00000000..02ad855
+--- /dev/null
++++ b/build/pkgs/packaging/distros/fedora.txt
+@@ -0,0 +1 @@
++python-packaging
+diff --git a/build/pkgs/pandocfilters/distros/fedora.txt b/build/pkgs/pandocfilters/distros/fedora.txt
+new file mode 100644
+index 00000000..e7a86d0
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/fedora.txt b/build/pkgs/pickleshare/distros/fedora.txt
+new file mode 100644
+index 00000000..6d991a2
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pickleshare
+diff --git a/build/pkgs/pillow/distros/fedora.txt b/build/pkgs/pillow/distros/fedora.txt
+new file mode 100644
+index 00000000..86dbb1d
+--- /dev/null
++++ b/build/pkgs/pillow/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pillow
+diff --git a/build/pkgs/pluggy/distros/fedora.txt b/build/pkgs/pluggy/distros/fedora.txt
+new file mode 100644
+index 00000000..c869e54
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pluggy
+diff --git a/build/pkgs/py/distros/fedora.txt b/build/pkgs/py/distros/fedora.txt
+new file mode 100644
+index 00000000..b348d39
+--- /dev/null
++++ b/build/pkgs/py/distros/fedora.txt
+@@ -0,0 +1 @@
++python-py
+diff --git a/build/pkgs/pygments/distros/fedora.txt b/build/pkgs/pygments/distros/fedora.txt
+new file mode 100644
+index 00000000..f3e72a8
+--- /dev/null
++++ b/build/pkgs/pygments/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pygments
+diff --git a/build/pkgs/pytz/distros/fedora.txt b/build/pkgs/pytz/distros/fedora.txt
+new file mode 100644
+index 00000000..2cccc9e
+--- /dev/null
++++ b/build/pkgs/pytz/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pytz
+diff --git a/build/pkgs/pyzmq/distros/fedora.txt b/build/pkgs/pyzmq/distros/fedora.txt
+new file mode 100644
+index 00000000..23f64d1
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pyzmq
+diff --git a/build/pkgs/requests/distros/fedora.txt b/build/pkgs/requests/distros/fedora.txt
+new file mode 100644
+index 00000000..93a7bc1
+--- /dev/null
++++ b/build/pkgs/requests/distros/fedora.txt
+@@ -0,0 +1 @@
++python-requests
+diff --git a/build/pkgs/scipy/distros/fedora.txt b/build/pkgs/scipy/distros/fedora.txt
+new file mode 100644
+index 00000000..7ff2882
+--- /dev/null
++++ b/build/pkgs/scipy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-scipy
+diff --git a/build/pkgs/setuptools/distros/fedora.txt b/build/pkgs/setuptools/distros/fedora.txt
+new file mode 100644
+index 00000000..e1ad178
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/fedora.txt
+@@ -0,0 +1 @@
++python-setuptools
+diff --git a/build/pkgs/six/distros/fedora.txt b/build/pkgs/six/distros/fedora.txt
+new file mode 100644
+index 00000000..787c530
+--- /dev/null
++++ b/build/pkgs/six/distros/fedora.txt
+@@ -0,0 +1 @@
++python-six
+diff --git a/build/pkgs/sympy/distros/fedora.txt b/build/pkgs/sympy/distros/fedora.txt
+new file mode 100644
+index 00000000..126c88a
+--- /dev/null
++++ b/build/pkgs/sympy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-sympy
+diff --git a/build/pkgs/texttable/distros/fedora.txt b/build/pkgs/texttable/distros/fedora.txt
+new file mode 100644
+index 00000000..8d1ccec
+--- /dev/null
++++ b/build/pkgs/texttable/distros/fedora.txt
+@@ -0,0 +1 @@
++python-texttable
+diff --git a/build/pkgs/toml/distros/fedora.txt b/build/pkgs/toml/distros/fedora.txt
+new file mode 100644
+index 00000000..821ee77
+--- /dev/null
++++ b/build/pkgs/toml/distros/fedora.txt
+@@ -0,0 +1 @@
++python-toml
+diff --git a/build/pkgs/webencodings/distros/fedora.txt b/build/pkgs/webencodings/distros/fedora.txt
+new file mode 100644
+index 00000000..12ddba9
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/fedora.txt
+@@ -0,0 +1 @@
++python-webencodings
+diff --git a/build/pkgs/wheel/distros/fedora.txt b/build/pkgs/wheel/distros/fedora.txt
+new file mode 100644
+index 00000000..ae4cbb9
+--- /dev/null
++++ b/build/pkgs/wheel/distros/fedora.txt
+@@ -0,0 +1 @@
++python-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From ad1d5a20380b147c774903066031442f31094626 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 21:04:04 -0700
+Subject: build/pkgs: Add distros/arch.txt for Python packages
+
+---
+ build/pkgs/babel/distros/arch.txt         | 1 +
+ build/pkgs/bleach/distros/arch.txt        | 1 +
+ build/pkgs/certifi/distros/arch.txt       | 1 +
+ build/pkgs/cvxopt/distros/arch.txt        | 1 +
+ build/pkgs/decorator/distros/arch.txt     | 1 +
+ build/pkgs/html5lib/distros/arch.txt      | 1 +
+ build/pkgs/idna/distros/arch.txt          | 1 +
+ build/pkgs/matplotlib/distros/arch.txt    | 1 +
+ build/pkgs/mpmath/distros/arch.txt        | 1 +
+ build/pkgs/networkx/distros/arch.txt      | 1 +
+ build/pkgs/numpy/distros/arch.txt         | 1 +
+ build/pkgs/packaging/distros/arch.txt     | 1 +
+ build/pkgs/pandocfilters/distros/arch.txt | 1 +
+ build/pkgs/pickleshare/distros/arch.txt   | 1 +
+ build/pkgs/pillow/distros/arch.txt        | 1 +
+ build/pkgs/pluggy/distros/arch.txt        | 1 +
+ build/pkgs/py/distros/arch.txt            | 1 +
+ build/pkgs/pygments/distros/arch.txt      | 1 +
+ build/pkgs/pytz/distros/arch.txt          | 1 +
+ build/pkgs/pyzmq/distros/arch.txt         | 1 +
+ build/pkgs/requests/distros/arch.txt      | 1 +
+ build/pkgs/scipy/distros/arch.txt         | 1 +
+ build/pkgs/setuptools/distros/arch.txt    | 1 +
+ build/pkgs/six/distros/arch.txt           | 1 +
+ build/pkgs/sympy/distros/arch.txt         | 1 +
+ build/pkgs/texttable/distros/arch.txt     | 1 +
+ build/pkgs/toml/distros/arch.txt          | 1 +
+ build/pkgs/webencodings/distros/arch.txt  | 1 +
+ build/pkgs/wheel/distros/arch.txt         | 1 +
+ 29 files changed, 29 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/arch.txt
+ create mode 100644 build/pkgs/bleach/distros/arch.txt
+ create mode 100644 build/pkgs/certifi/distros/arch.txt
+ create mode 100644 build/pkgs/cvxopt/distros/arch.txt
+ create mode 100644 build/pkgs/decorator/distros/arch.txt
+ create mode 100644 build/pkgs/html5lib/distros/arch.txt
+ create mode 100644 build/pkgs/idna/distros/arch.txt
+ create mode 100644 build/pkgs/matplotlib/distros/arch.txt
+ create mode 100644 build/pkgs/mpmath/distros/arch.txt
+ create mode 100644 build/pkgs/networkx/distros/arch.txt
+ create mode 100644 build/pkgs/numpy/distros/arch.txt
+ create mode 100644 build/pkgs/packaging/distros/arch.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/arch.txt
+ create mode 100644 build/pkgs/pickleshare/distros/arch.txt
+ create mode 100644 build/pkgs/pillow/distros/arch.txt
+ create mode 100644 build/pkgs/pluggy/distros/arch.txt
+ create mode 100644 build/pkgs/py/distros/arch.txt
+ create mode 100644 build/pkgs/pygments/distros/arch.txt
+ create mode 100644 build/pkgs/pytz/distros/arch.txt
+ create mode 100644 build/pkgs/pyzmq/distros/arch.txt
+ create mode 100644 build/pkgs/requests/distros/arch.txt
+ create mode 100644 build/pkgs/scipy/distros/arch.txt
+ create mode 100644 build/pkgs/setuptools/distros/arch.txt
+ create mode 100644 build/pkgs/six/distros/arch.txt
+ create mode 100644 build/pkgs/sympy/distros/arch.txt
+ create mode 100644 build/pkgs/texttable/distros/arch.txt
+ create mode 100644 build/pkgs/toml/distros/arch.txt
+ create mode 100644 build/pkgs/webencodings/distros/arch.txt
+ create mode 100644 build/pkgs/wheel/distros/arch.txt
+
+diff --git a/build/pkgs/babel/distros/arch.txt b/build/pkgs/babel/distros/arch.txt
+new file mode 100644
+index 00000000..f2d828c
+--- /dev/null
++++ b/build/pkgs/babel/distros/arch.txt
+@@ -0,0 +1 @@
++python-babel
+diff --git a/build/pkgs/bleach/distros/arch.txt b/build/pkgs/bleach/distros/arch.txt
+new file mode 100644
+index 00000000..c5422cc
+--- /dev/null
++++ b/build/pkgs/bleach/distros/arch.txt
+@@ -0,0 +1 @@
++python-bleach
+diff --git a/build/pkgs/certifi/distros/arch.txt b/build/pkgs/certifi/distros/arch.txt
+new file mode 100644
+index 00000000..be421c8
+--- /dev/null
++++ b/build/pkgs/certifi/distros/arch.txt
+@@ -0,0 +1 @@
++python-certifi
+diff --git a/build/pkgs/cvxopt/distros/arch.txt b/build/pkgs/cvxopt/distros/arch.txt
+new file mode 100644
+index 00000000..f15770f
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/arch.txt
+@@ -0,0 +1 @@
++python-cvxopt
+diff --git a/build/pkgs/decorator/distros/arch.txt b/build/pkgs/decorator/distros/arch.txt
+new file mode 100644
+index 00000000..0795604
+--- /dev/null
++++ b/build/pkgs/decorator/distros/arch.txt
+@@ -0,0 +1 @@
++python-decorator
+diff --git a/build/pkgs/html5lib/distros/arch.txt b/build/pkgs/html5lib/distros/arch.txt
+new file mode 100644
+index 00000000..b821491
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/arch.txt
+@@ -0,0 +1 @@
++python-html5lib
+diff --git a/build/pkgs/idna/distros/arch.txt b/build/pkgs/idna/distros/arch.txt
+new file mode 100644
+index 00000000..a73e70c
+--- /dev/null
++++ b/build/pkgs/idna/distros/arch.txt
+@@ -0,0 +1 @@
++python-idna
+diff --git a/build/pkgs/matplotlib/distros/arch.txt b/build/pkgs/matplotlib/distros/arch.txt
+new file mode 100644
+index 00000000..f6d856e
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/arch.txt
+@@ -0,0 +1 @@
++python-matplotlib
+diff --git a/build/pkgs/mpmath/distros/arch.txt b/build/pkgs/mpmath/distros/arch.txt
+new file mode 100644
+index 00000000..a7dc8d5
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/arch.txt
+@@ -0,0 +1 @@
++python-mpmath
+diff --git a/build/pkgs/networkx/distros/arch.txt b/build/pkgs/networkx/distros/arch.txt
+new file mode 100644
+index 00000000..293f943
+--- /dev/null
++++ b/build/pkgs/networkx/distros/arch.txt
+@@ -0,0 +1 @@
++python-networkx
+diff --git a/build/pkgs/numpy/distros/arch.txt b/build/pkgs/numpy/distros/arch.txt
+new file mode 100644
+index 00000000..c8722b9
+--- /dev/null
++++ b/build/pkgs/numpy/distros/arch.txt
+@@ -0,0 +1 @@
++python-numpy
+diff --git a/build/pkgs/packaging/distros/arch.txt b/build/pkgs/packaging/distros/arch.txt
+new file mode 100644
+index 00000000..02ad855
+--- /dev/null
++++ b/build/pkgs/packaging/distros/arch.txt
+@@ -0,0 +1 @@
++python-packaging
+diff --git a/build/pkgs/pandocfilters/distros/arch.txt b/build/pkgs/pandocfilters/distros/arch.txt
+new file mode 100644
+index 00000000..e7a86d0
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/arch.txt
+@@ -0,0 +1 @@
++python-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/arch.txt b/build/pkgs/pickleshare/distros/arch.txt
+new file mode 100644
+index 00000000..6d991a2
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/arch.txt
+@@ -0,0 +1 @@
++python-pickleshare
+diff --git a/build/pkgs/pillow/distros/arch.txt b/build/pkgs/pillow/distros/arch.txt
+new file mode 100644
+index 00000000..86dbb1d
+--- /dev/null
++++ b/build/pkgs/pillow/distros/arch.txt
+@@ -0,0 +1 @@
++python-pillow
+diff --git a/build/pkgs/pluggy/distros/arch.txt b/build/pkgs/pluggy/distros/arch.txt
+new file mode 100644
+index 00000000..c869e54
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/arch.txt
+@@ -0,0 +1 @@
++python-pluggy
+diff --git a/build/pkgs/py/distros/arch.txt b/build/pkgs/py/distros/arch.txt
+new file mode 100644
+index 00000000..b348d39
+--- /dev/null
++++ b/build/pkgs/py/distros/arch.txt
+@@ -0,0 +1 @@
++python-py
+diff --git a/build/pkgs/pygments/distros/arch.txt b/build/pkgs/pygments/distros/arch.txt
+new file mode 100644
+index 00000000..f3e72a8
+--- /dev/null
++++ b/build/pkgs/pygments/distros/arch.txt
+@@ -0,0 +1 @@
++python-pygments
+diff --git a/build/pkgs/pytz/distros/arch.txt b/build/pkgs/pytz/distros/arch.txt
+new file mode 100644
+index 00000000..2cccc9e
+--- /dev/null
++++ b/build/pkgs/pytz/distros/arch.txt
+@@ -0,0 +1 @@
++python-pytz
+diff --git a/build/pkgs/pyzmq/distros/arch.txt b/build/pkgs/pyzmq/distros/arch.txt
+new file mode 100644
+index 00000000..23f64d1
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/arch.txt
+@@ -0,0 +1 @@
++python-pyzmq
+diff --git a/build/pkgs/requests/distros/arch.txt b/build/pkgs/requests/distros/arch.txt
+new file mode 100644
+index 00000000..93a7bc1
+--- /dev/null
++++ b/build/pkgs/requests/distros/arch.txt
+@@ -0,0 +1 @@
++python-requests
+diff --git a/build/pkgs/scipy/distros/arch.txt b/build/pkgs/scipy/distros/arch.txt
+new file mode 100644
+index 00000000..7ff2882
+--- /dev/null
++++ b/build/pkgs/scipy/distros/arch.txt
+@@ -0,0 +1 @@
++python-scipy
+diff --git a/build/pkgs/setuptools/distros/arch.txt b/build/pkgs/setuptools/distros/arch.txt
+new file mode 100644
+index 00000000..e1ad178
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/arch.txt
+@@ -0,0 +1 @@
++python-setuptools
+diff --git a/build/pkgs/six/distros/arch.txt b/build/pkgs/six/distros/arch.txt
+new file mode 100644
+index 00000000..787c530
+--- /dev/null
++++ b/build/pkgs/six/distros/arch.txt
+@@ -0,0 +1 @@
++python-six
+diff --git a/build/pkgs/sympy/distros/arch.txt b/build/pkgs/sympy/distros/arch.txt
+new file mode 100644
+index 00000000..126c88a
+--- /dev/null
++++ b/build/pkgs/sympy/distros/arch.txt
+@@ -0,0 +1 @@
++python-sympy
+diff --git a/build/pkgs/texttable/distros/arch.txt b/build/pkgs/texttable/distros/arch.txt
+new file mode 100644
+index 00000000..8d1ccec
+--- /dev/null
++++ b/build/pkgs/texttable/distros/arch.txt
+@@ -0,0 +1 @@
++python-texttable
+diff --git a/build/pkgs/toml/distros/arch.txt b/build/pkgs/toml/distros/arch.txt
+new file mode 100644
+index 00000000..821ee77
+--- /dev/null
++++ b/build/pkgs/toml/distros/arch.txt
+@@ -0,0 +1 @@
++python-toml
+diff --git a/build/pkgs/webencodings/distros/arch.txt b/build/pkgs/webencodings/distros/arch.txt
+new file mode 100644
+index 00000000..12ddba9
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/arch.txt
+@@ -0,0 +1 @@
++python-webencodings
+diff --git a/build/pkgs/wheel/distros/arch.txt b/build/pkgs/wheel/distros/arch.txt
+new file mode 100644
+index 00000000..ae4cbb9
+--- /dev/null
++++ b/build/pkgs/wheel/distros/arch.txt
+@@ -0,0 +1 @@
++python-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5087abee08f2a89ddaf422ec72a84575fe724a79 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 21:20:56 -0700
+Subject: build/pkgs: Add distros/opensuse.txt for Python packages
+
+---
+ build/pkgs/bleach/distros/opensuse.txt        | 1 +
+ build/pkgs/cvxopt/distros/opensuse.txt        | 1 +
+ build/pkgs/html5lib/distros/opensuse.txt      | 1 +
+ build/pkgs/idna/distros/opensuse.txt          | 1 +
+ build/pkgs/jinja2/distros/opensuse.txt        | 2 +-
+ build/pkgs/mpmath/distros/opensuse.txt        | 1 +
+ build/pkgs/numpy/distros/opensuse.txt         | 1 +
+ build/pkgs/packaging/distros/opensuse.txt     | 1 +
+ build/pkgs/pandocfilters/distros/opensuse.txt | 1 +
+ build/pkgs/pluggy/distros/opensuse.txt        | 1 +
+ build/pkgs/py/distros/opensuse.txt            | 1 +
+ build/pkgs/pygments/distros/opensuse.txt      | 2 +-
+ build/pkgs/sympy/distros/opensuse.txt         | 1 +
+ build/pkgs/texttable/distros/opensuse.txt     | 1 +
+ build/pkgs/toml/distros/opensuse.txt          | 1 +
+ 15 files changed, 15 insertions(+), 2 deletions(-)
+ create mode 100644 build/pkgs/bleach/distros/opensuse.txt
+ create mode 100644 build/pkgs/cvxopt/distros/opensuse.txt
+ create mode 100644 build/pkgs/html5lib/distros/opensuse.txt
+ create mode 100644 build/pkgs/idna/distros/opensuse.txt
+ create mode 100644 build/pkgs/mpmath/distros/opensuse.txt
+ create mode 100644 build/pkgs/numpy/distros/opensuse.txt
+ create mode 100644 build/pkgs/packaging/distros/opensuse.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/opensuse.txt
+ create mode 100644 build/pkgs/pluggy/distros/opensuse.txt
+ create mode 100644 build/pkgs/py/distros/opensuse.txt
+ create mode 100644 build/pkgs/sympy/distros/opensuse.txt
+ create mode 100644 build/pkgs/texttable/distros/opensuse.txt
+ create mode 100644 build/pkgs/toml/distros/opensuse.txt
+
+diff --git a/build/pkgs/bleach/distros/opensuse.txt b/build/pkgs/bleach/distros/opensuse.txt
+new file mode 100644
+index 00000000..6d37c4c
+--- /dev/null
++++ b/build/pkgs/bleach/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-bleach
+diff --git a/build/pkgs/cvxopt/distros/opensuse.txt b/build/pkgs/cvxopt/distros/opensuse.txt
+new file mode 100644
+index 00000000..2bb6ad1
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-cvxopt
+diff --git a/build/pkgs/html5lib/distros/opensuse.txt b/build/pkgs/html5lib/distros/opensuse.txt
+new file mode 100644
+index 00000000..6d7b8df
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-html5lib
+diff --git a/build/pkgs/idna/distros/opensuse.txt b/build/pkgs/idna/distros/opensuse.txt
+new file mode 100644
+index 00000000..de48e70
+--- /dev/null
++++ b/build/pkgs/idna/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-idna
+diff --git a/build/pkgs/jinja2/distros/opensuse.txt b/build/pkgs/jinja2/distros/opensuse.txt
+index 5d90a22..f2db865 100644
+--- a/build/pkgs/jinja2/distros/opensuse.txt
++++ b/build/pkgs/jinja2/distros/opensuse.txt
+@@ -1 +1 @@
+-python3-Jinja2
++python3-jinja2
+diff --git a/build/pkgs/mpmath/distros/opensuse.txt b/build/pkgs/mpmath/distros/opensuse.txt
+new file mode 100644
+index 00000000..fbc82a9
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-mpmath
+diff --git a/build/pkgs/numpy/distros/opensuse.txt b/build/pkgs/numpy/distros/opensuse.txt
+new file mode 100644
+index 00000000..79d5c5a
+--- /dev/null
++++ b/build/pkgs/numpy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-numpy
+diff --git a/build/pkgs/packaging/distros/opensuse.txt b/build/pkgs/packaging/distros/opensuse.txt
+new file mode 100644
+index 00000000..8f1c0ff
+--- /dev/null
++++ b/build/pkgs/packaging/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-packaging
+diff --git a/build/pkgs/pandocfilters/distros/opensuse.txt b/build/pkgs/pandocfilters/distros/opensuse.txt
+new file mode 100644
+index 00000000..d0d4c24
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-pandocfilters
+diff --git a/build/pkgs/pluggy/distros/opensuse.txt b/build/pkgs/pluggy/distros/opensuse.txt
+new file mode 100644
+index 00000000..43a3acf
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-pluggy
+diff --git a/build/pkgs/py/distros/opensuse.txt b/build/pkgs/py/distros/opensuse.txt
+new file mode 100644
+index 00000000..81fefe6
+--- /dev/null
++++ b/build/pkgs/py/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-py
+diff --git a/build/pkgs/pygments/distros/opensuse.txt b/build/pkgs/pygments/distros/opensuse.txt
+index 9ff5740..3ab3792 100644
+--- a/build/pkgs/pygments/distros/opensuse.txt
++++ b/build/pkgs/pygments/distros/opensuse.txt
+@@ -1 +1 @@
+-python3-Pygments
++python3-pygments
+diff --git a/build/pkgs/sympy/distros/opensuse.txt b/build/pkgs/sympy/distros/opensuse.txt
+new file mode 100644
+index 00000000..db423c8
+--- /dev/null
++++ b/build/pkgs/sympy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-sympy
+diff --git a/build/pkgs/texttable/distros/opensuse.txt b/build/pkgs/texttable/distros/opensuse.txt
+new file mode 100644
+index 00000000..8f8e7e2
+--- /dev/null
++++ b/build/pkgs/texttable/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-texttable
+diff --git a/build/pkgs/toml/distros/opensuse.txt b/build/pkgs/toml/distros/opensuse.txt
+new file mode 100644
+index 00000000..543e89d
+--- /dev/null
++++ b/build/pkgs/toml/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-toml
+-- 
+cgit v1.0-1-gd88e
+
+
+From a480ba7ace1370d106ae831e904ea22b72af1be7 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 22:45:04 -0700
+Subject: build/pkgs: Add distros/debian.txt for Python packages
+
+---
+ build/pkgs/babel/distros/debian.txt         | 1 +
+ build/pkgs/bleach/distros/debian.txt        | 1 +
+ build/pkgs/certifi/distros/debian.txt       | 1 +
+ build/pkgs/cvxopt/distros/debian.txt        | 1 +
+ build/pkgs/decorator/distros/debian.txt     | 1 +
+ build/pkgs/html5lib/distros/debian.txt      | 1 +
+ build/pkgs/idna/distros/debian.txt          | 1 +
+ build/pkgs/jinja2/distros/debian.txt        | 1 +
+ build/pkgs/matplotlib/distros/debian.txt    | 1 +
+ build/pkgs/mpmath/distros/debian.txt        | 1 +
+ build/pkgs/networkx/distros/debian.txt      | 1 +
+ build/pkgs/numpy/distros/debian.txt         | 1 +
+ build/pkgs/packaging/distros/debian.txt     | 1 +
+ build/pkgs/pandocfilters/distros/debian.txt | 1 +
+ build/pkgs/pickleshare/distros/debian.txt   | 1 +
+ build/pkgs/pillow/distros/debian.txt        | 1 +
+ build/pkgs/pluggy/distros/debian.txt        | 1 +
+ build/pkgs/py/distros/debian.txt            | 1 +
+ build/pkgs/pygments/distros/debian.txt      | 1 +
+ build/pkgs/pytz/distros/debian.txt          | 1 +
+ build/pkgs/requests/distros/debian.txt      | 1 +
+ build/pkgs/scipy/distros/debian.txt         | 1 +
+ build/pkgs/setuptools/distros/debian.txt    | 1 +
+ build/pkgs/six/distros/debian.txt           | 1 +
+ build/pkgs/sympy/distros/debian.txt         | 1 +
+ build/pkgs/texttable/distros/debian.txt     | 1 +
+ build/pkgs/toml/distros/debian.txt          | 1 +
+ build/pkgs/webencodings/distros/debian.txt  | 1 +
+ build/pkgs/wheel/distros/debian.txt         | 1 +
+ 29 files changed, 29 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/debian.txt
+ create mode 100644 build/pkgs/bleach/distros/debian.txt
+ create mode 100644 build/pkgs/certifi/distros/debian.txt
+ create mode 100644 build/pkgs/cvxopt/distros/debian.txt
+ create mode 100644 build/pkgs/decorator/distros/debian.txt
+ create mode 100644 build/pkgs/html5lib/distros/debian.txt
+ create mode 100644 build/pkgs/idna/distros/debian.txt
+ create mode 100644 build/pkgs/jinja2/distros/debian.txt
+ create mode 100644 build/pkgs/matplotlib/distros/debian.txt
+ create mode 100644 build/pkgs/mpmath/distros/debian.txt
+ create mode 100644 build/pkgs/networkx/distros/debian.txt
+ create mode 100644 build/pkgs/numpy/distros/debian.txt
+ create mode 100644 build/pkgs/packaging/distros/debian.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/debian.txt
+ create mode 100644 build/pkgs/pickleshare/distros/debian.txt
+ create mode 100644 build/pkgs/pillow/distros/debian.txt
+ create mode 100644 build/pkgs/pluggy/distros/debian.txt
+ create mode 100644 build/pkgs/py/distros/debian.txt
+ create mode 100644 build/pkgs/pygments/distros/debian.txt
+ create mode 100644 build/pkgs/pytz/distros/debian.txt
+ create mode 100644 build/pkgs/requests/distros/debian.txt
+ create mode 100644 build/pkgs/scipy/distros/debian.txt
+ create mode 100644 build/pkgs/setuptools/distros/debian.txt
+ create mode 100644 build/pkgs/six/distros/debian.txt
+ create mode 100644 build/pkgs/sympy/distros/debian.txt
+ create mode 100644 build/pkgs/texttable/distros/debian.txt
+ create mode 100644 build/pkgs/toml/distros/debian.txt
+ create mode 100644 build/pkgs/webencodings/distros/debian.txt
+ create mode 100644 build/pkgs/wheel/distros/debian.txt
+
+diff --git a/build/pkgs/babel/distros/debian.txt b/build/pkgs/babel/distros/debian.txt
+new file mode 100644
+index 00000000..e623eb6
+--- /dev/null
++++ b/build/pkgs/babel/distros/debian.txt
+@@ -0,0 +1 @@
++python3-babel
+diff --git a/build/pkgs/bleach/distros/debian.txt b/build/pkgs/bleach/distros/debian.txt
+new file mode 100644
+index 00000000..6d37c4c
+--- /dev/null
++++ b/build/pkgs/bleach/distros/debian.txt
+@@ -0,0 +1 @@
++python3-bleach
+diff --git a/build/pkgs/certifi/distros/debian.txt b/build/pkgs/certifi/distros/debian.txt
+new file mode 100644
+index 00000000..f585a82
+--- /dev/null
++++ b/build/pkgs/certifi/distros/debian.txt
+@@ -0,0 +1 @@
++python3-certifi
+diff --git a/build/pkgs/cvxopt/distros/debian.txt b/build/pkgs/cvxopt/distros/debian.txt
+new file mode 100644
+index 00000000..2bb6ad1
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/debian.txt
+@@ -0,0 +1 @@
++python3-cvxopt
+diff --git a/build/pkgs/decorator/distros/debian.txt b/build/pkgs/decorator/distros/debian.txt
+new file mode 100644
+index 00000000..46c478e
+--- /dev/null
++++ b/build/pkgs/decorator/distros/debian.txt
+@@ -0,0 +1 @@
++python3-decorator
+diff --git a/build/pkgs/html5lib/distros/debian.txt b/build/pkgs/html5lib/distros/debian.txt
+new file mode 100644
+index 00000000..6d7b8df
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/debian.txt
+@@ -0,0 +1 @@
++python3-html5lib
+diff --git a/build/pkgs/idna/distros/debian.txt b/build/pkgs/idna/distros/debian.txt
+new file mode 100644
+index 00000000..de48e70
+--- /dev/null
++++ b/build/pkgs/idna/distros/debian.txt
+@@ -0,0 +1 @@
++python3-idna
+diff --git a/build/pkgs/jinja2/distros/debian.txt b/build/pkgs/jinja2/distros/debian.txt
+new file mode 100644
+index 00000000..f2db865
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/debian.txt
+@@ -0,0 +1 @@
++python3-jinja2
+diff --git a/build/pkgs/matplotlib/distros/debian.txt b/build/pkgs/matplotlib/distros/debian.txt
+new file mode 100644
+index 00000000..1374329
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/debian.txt
+@@ -0,0 +1 @@
++python3-matplotlib
+diff --git a/build/pkgs/mpmath/distros/debian.txt b/build/pkgs/mpmath/distros/debian.txt
+new file mode 100644
+index 00000000..fbc82a9
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/debian.txt
+@@ -0,0 +1 @@
++python3-mpmath
+diff --git a/build/pkgs/networkx/distros/debian.txt b/build/pkgs/networkx/distros/debian.txt
+new file mode 100644
+index 00000000..6779066
+--- /dev/null
++++ b/build/pkgs/networkx/distros/debian.txt
+@@ -0,0 +1 @@
++python3-networkx
+diff --git a/build/pkgs/numpy/distros/debian.txt b/build/pkgs/numpy/distros/debian.txt
+new file mode 100644
+index 00000000..79d5c5a
+--- /dev/null
++++ b/build/pkgs/numpy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-numpy
+diff --git a/build/pkgs/packaging/distros/debian.txt b/build/pkgs/packaging/distros/debian.txt
+new file mode 100644
+index 00000000..8f1c0ff
+--- /dev/null
++++ b/build/pkgs/packaging/distros/debian.txt
+@@ -0,0 +1 @@
++python3-packaging
+diff --git a/build/pkgs/pandocfilters/distros/debian.txt b/build/pkgs/pandocfilters/distros/debian.txt
+new file mode 100644
+index 00000000..d0d4c24
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/debian.txt b/build/pkgs/pickleshare/distros/debian.txt
+new file mode 100644
+index 00000000..a00907d
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pickleshare
+diff --git a/build/pkgs/pillow/distros/debian.txt b/build/pkgs/pillow/distros/debian.txt
+new file mode 100644
+index 00000000..3319fcd
+--- /dev/null
++++ b/build/pkgs/pillow/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pillow
+diff --git a/build/pkgs/pluggy/distros/debian.txt b/build/pkgs/pluggy/distros/debian.txt
+new file mode 100644
+index 00000000..43a3acf
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pluggy
+diff --git a/build/pkgs/py/distros/debian.txt b/build/pkgs/py/distros/debian.txt
+new file mode 100644
+index 00000000..81fefe6
+--- /dev/null
++++ b/build/pkgs/py/distros/debian.txt
+@@ -0,0 +1 @@
++python3-py
+diff --git a/build/pkgs/pygments/distros/debian.txt b/build/pkgs/pygments/distros/debian.txt
+new file mode 100644
+index 00000000..3ab3792
+--- /dev/null
++++ b/build/pkgs/pygments/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pygments
+diff --git a/build/pkgs/pytz/distros/debian.txt b/build/pkgs/pytz/distros/debian.txt
+new file mode 100644
+index 00000000..db20908
+--- /dev/null
++++ b/build/pkgs/pytz/distros/debian.txt
+@@ -0,0 +1 @@
++python3-tz
+diff --git a/build/pkgs/requests/distros/debian.txt b/build/pkgs/requests/distros/debian.txt
+new file mode 100644
+index 00000000..43147b2
+--- /dev/null
++++ b/build/pkgs/requests/distros/debian.txt
+@@ -0,0 +1 @@
++python3-requests
+diff --git a/build/pkgs/scipy/distros/debian.txt b/build/pkgs/scipy/distros/debian.txt
+new file mode 100644
+index 00000000..12b3666
+--- /dev/null
++++ b/build/pkgs/scipy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-scipy
+diff --git a/build/pkgs/setuptools/distros/debian.txt b/build/pkgs/setuptools/distros/debian.txt
+new file mode 100644
+index 00000000..1c0901c
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/debian.txt
+@@ -0,0 +1 @@
++python3-setuptools
+diff --git a/build/pkgs/six/distros/debian.txt b/build/pkgs/six/distros/debian.txt
+new file mode 100644
+index 00000000..68ff859
+--- /dev/null
++++ b/build/pkgs/six/distros/debian.txt
+@@ -0,0 +1 @@
++python3-six
+diff --git a/build/pkgs/sympy/distros/debian.txt b/build/pkgs/sympy/distros/debian.txt
+new file mode 100644
+index 00000000..db423c8
+--- /dev/null
++++ b/build/pkgs/sympy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-sympy
+diff --git a/build/pkgs/texttable/distros/debian.txt b/build/pkgs/texttable/distros/debian.txt
+new file mode 100644
+index 00000000..8f8e7e2
+--- /dev/null
++++ b/build/pkgs/texttable/distros/debian.txt
+@@ -0,0 +1 @@
++python3-texttable
+diff --git a/build/pkgs/toml/distros/debian.txt b/build/pkgs/toml/distros/debian.txt
+new file mode 100644
+index 00000000..543e89d
+--- /dev/null
++++ b/build/pkgs/toml/distros/debian.txt
+@@ -0,0 +1 @@
++python3-toml
+diff --git a/build/pkgs/webencodings/distros/debian.txt b/build/pkgs/webencodings/distros/debian.txt
+new file mode 100644
+index 00000000..ac30c2f
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/debian.txt
+@@ -0,0 +1 @@
++python3-webencodings
+diff --git a/build/pkgs/wheel/distros/debian.txt b/build/pkgs/wheel/distros/debian.txt
+new file mode 100644
+index 00000000..3c066725
+--- /dev/null
++++ b/build/pkgs/wheel/distros/debian.txt
+@@ -0,0 +1 @@
++python3-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 93bf30d7de292551c3050e2dd74651d69ba4bd46 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 18 Oct 2021 07:50:34 -0400
+Subject: Trac #29665: add more documentation for SAGE_PYTHON_PACKAGE_CHECK().
+
+An earlier commit allows SAGE_PYTHON_PACKAGE_CHECK(package) to tweak the
+value of sage_use_system_$package if --enable-system-site-packages was
+not used. This essentially changes the default --with-system-$package=yes
+to "no" in that case. Here we update the documentation to reflect it.
+---
+ m4/sage_python_package_check.m4 | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 7ee82a7..95eefd0 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -34,6 +34,10 @@
+ #   ensure that the ./configure- and run-time views of the system
+ #   are as similar as possible.
+ #
++#   To avoid suggesting these system packages to users who have not
++#   set --enable-system-site-packages, this macro also changes the
++#   default for --with-system-foo from "yes" to "no" in that case.
++#
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
+-- 
+cgit v1.0-1-gd88e
+
+
+From d771e49d57ecdf3622434bc09cbfb87ad3bb7744 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 18 Oct 2021 07:42:46 -0400
+Subject: Trac #29665: improve SAGE_PYTHON_PACKAGE_CHECK() failure message.
+
+When --enable-system-site-packages is off, SAGE_PYTHON_PACKAGE_CHECK()
+will always install the corresponding SPKG. We improve the ./configure
+output in that case to make it clear that the decision was based on
+the value of --enable-system-site-packages and not the "real" check.
+---
+ m4/sage_python_package_check.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 95eefd0..5f0f084 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -40,7 +40,9 @@
+ #
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
++  AC_MSG_CHECKING([if --enable-system-site-packages was used])
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
++    AC_MSG_RESULT(yes)
+     AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
+ 
+     dnl We run this check inside a python venv, because that's ultimately
+@@ -94,6 +96,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
+     dnl System site packages are disabled.
++    AC_MSG_RESULT(no; skipping check)
+     sage_spkg_install_$1=yes
+ 
+     dnl We have to retroactively hack the --with-system-foo={no,yes,force}
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5bb43c1b78a1deb3364f235305937c2f823e5e18 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 24 Oct 2021 20:29:25 -0400
+Subject: Trac #29665: use sage-venv in SAGE_PYTHON_PACKAGE_CHECK().
+
+For consistency with the rest of the build system, we now use the
+build/bin/sage-venv script to create the venv in this autoconf macro
+rather than invoking $PYTHON_FOR_VENV with "-m venv" directly.
+---
+ m4/sage_python_package_check.m4 | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 5f0f084..5547b35 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -50,11 +50,11 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AC_MSG_CHECKING([if we can create a python venv in config.venv])
+ 
+     dnl Use --clear because ./configure typically clobbers its output files.
+-    AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
+-                                        --clear                dnl
+-                                        --without-pip          dnl
+-                                        config.venv            dnl
+-                                        2>&AS_MESSAGE_LOG_FD], [
++    AS_IF(["${PYTHON_FOR_VENV}" build/bin/sage-venv      dnl
++                                  --system-site-packages dnl
++                                  --clear                dnl
++                                  config.venv            dnl
++                                  2>&AS_MESSAGE_LOG_FD], [
+       AC_MSG_RESULT(yes)
+       dnl strip all comments from install-requires.txt; this should leave
+       dnl only a single line containing the version specification for this
+-- 
+cgit v1.0-1-gd88e
+
+
+From c78363d6326addff16ca5abac897949a6be72bf4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:10:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for urllib3.
+
+---
+ build/pkgs/urllib3/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/urllib3/spkg-configure.m4
+
+diff --git a/build/pkgs/urllib3/spkg-configure.m4 b/build/pkgs/urllib3/spkg-configure.m4
+new file mode 100644
+index 00000000..d7ef3e1
+--- /dev/null
++++ b/build/pkgs/urllib3/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([urllib3], [SAGE_PYTHON_PACKAGE_CHECK([urllib3])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f416d5abcae495ea8301fad024b279ea9e997b29 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:15:18 -0400
+Subject: Trac #29665: add Gentoo package information for urllib3.
+
+---
+ build/pkgs/urllib3/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/urllib3/distros/gentoo.txt
+
+diff --git a/build/pkgs/urllib3/distros/gentoo.txt b/build/pkgs/urllib3/distros/gentoo.txt
+new file mode 100644
+index 00000000..172a535
+--- /dev/null
++++ b/build/pkgs/urllib3/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/urllib3
+-- 
+cgit v1.0-1-gd88e
+
+
+From 852068b992bf7959500c650f54cb92e5b68d7ef8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:15:58 -0400
+Subject: Trac #29665: add Gentoo package information for nbformat.
+
+---
+ build/pkgs/nbformat/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbformat/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbformat/distros/gentoo.txt b/build/pkgs/nbformat/distros/gentoo.txt
+new file mode 100644
+index 00000000..006b1f2
+--- /dev/null
++++ b/build/pkgs/nbformat/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbformat
+-- 
+cgit v1.0-1-gd88e
+
+
+From 66179fd28fcc92ee840dcd87bb4db25cea968d66 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:34:16 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for nbformat.
+
+---
+ build/pkgs/nbformat/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbformat/spkg-configure.m4
+
+diff --git a/build/pkgs/nbformat/spkg-configure.m4 b/build/pkgs/nbformat/spkg-configure.m4
+new file mode 100644
+index 00000000..5a7f8c4
+--- /dev/null
++++ b/build/pkgs/nbformat/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbformat], [SAGE_PYTHON_PACKAGE_CHECK([nbformat])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 874005e81ed20f27a5f895030dcdbdfc5f73ad80 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:47:01 -0400
+Subject: Trac #29665: add Gentoo package information for zipp.
+
+---
+ build/pkgs/zipp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/zipp/distros/gentoo.txt
+
+diff --git a/build/pkgs/zipp/distros/gentoo.txt b/build/pkgs/zipp/distros/gentoo.txt
+new file mode 100644
+index 00000000..7f59450
+--- /dev/null
++++ b/build/pkgs/zipp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/zipp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0cc2a7355b5554c1fb79c742ebf02eff54465b3e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:47:35 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for zipp.
+
+---
+ build/pkgs/zipp/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/zipp/spkg-configure.m4
+
+diff --git a/build/pkgs/zipp/spkg-configure.m4 b/build/pkgs/zipp/spkg-configure.m4
+new file mode 100644
+index 00000000..0fe3a9c
+--- /dev/null
++++ b/build/pkgs/zipp/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([zipp], [SAGE_PYTHON_PACKAGE_CHECK([zipp])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6073ad8e56c21fc862749bbd84a56d543fb9458c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:48:37 -0400
+Subject: Trac #29665: add Gentoo package information for wcwidth.
+
+---
+ build/pkgs/wcwidth/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wcwidth/distros/gentoo.txt
+
+diff --git a/build/pkgs/wcwidth/distros/gentoo.txt b/build/pkgs/wcwidth/distros/gentoo.txt
+new file mode 100644
+index 00000000..edeb80b
+--- /dev/null
++++ b/build/pkgs/wcwidth/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/wcwidth
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9793d6172c64d61a015fbe61bd45863759124fad Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:51:10 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for wcwidth.
+
+---
+ build/pkgs/wcwidth/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wcwidth/spkg-configure.m4
+
+diff --git a/build/pkgs/wcwidth/spkg-configure.m4 b/build/pkgs/wcwidth/spkg-configure.m4
+new file mode 100644
+index 00000000..5bde15a
+--- /dev/null
++++ b/build/pkgs/wcwidth/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([wcwidth], [SAGE_PYTHON_PACKAGE_CHECK([wcwidth])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20232f370a43c146ca4e696c72a2cbcc498db060 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:52:36 -0400
+Subject: Trac #29665: add Gentoo package information for testpath.
+
+---
+ build/pkgs/testpath/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/testpath/distros/gentoo.txt
+
+diff --git a/build/pkgs/testpath/distros/gentoo.txt b/build/pkgs/testpath/distros/gentoo.txt
+new file mode 100644
+index 00000000..efa10a0
+--- /dev/null
++++ b/build/pkgs/testpath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/testpath
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1b0785b2aad8844e74345fe950baf097e2b43d24 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:55:22 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for testpath.
+
+---
+ build/pkgs/testpath/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/testpath/spkg-configure.m4
+
+diff --git a/build/pkgs/testpath/spkg-configure.m4 b/build/pkgs/testpath/spkg-configure.m4
+new file mode 100644
+index 00000000..d8fc2a7
+--- /dev/null
++++ b/build/pkgs/testpath/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([testpath], [SAGE_PYTHON_PACKAGE_CHECK([testpath])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 10fc3829ecd956d732b1b069fdfe81f0d6d5cdc2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:56:06 -0400
+Subject: Trac #29665: add Gentoo package information for jedi.
+
+---
+ build/pkgs/jedi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jedi/distros/gentoo.txt
+
+diff --git a/build/pkgs/jedi/distros/gentoo.txt b/build/pkgs/jedi/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c85a46
+--- /dev/null
++++ b/build/pkgs/jedi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jedi
+-- 
+cgit v1.0-1-gd88e
+
+
+From a75824d74c281c7639028ca01dabeed266f56998 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:06:37 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for jedi.
+
+---
+ build/pkgs/jedi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jedi/spkg-configure.m4
+
+diff --git a/build/pkgs/jedi/spkg-configure.m4 b/build/pkgs/jedi/spkg-configure.m4
+new file mode 100644
+index 00000000..a37dbcc
+--- /dev/null
++++ b/build/pkgs/jedi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jedi], [SAGE_PYTHON_PACKAGE_CHECK([jedi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 17af01373d43f6acbbdbc23e073e372d3fdadf8b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:07:47 -0400
+Subject: Trac #29665: add Gentoo package information for tomli.
+
+---
+ build/pkgs/tomli/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tomli/distros/gentoo.txt
+
+diff --git a/build/pkgs/tomli/distros/gentoo.txt b/build/pkgs/tomli/distros/gentoo.txt
+new file mode 100644
+index 00000000..0458e25
+--- /dev/null
++++ b/build/pkgs/tomli/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/tomli
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0d3b5994ae612be11992467c4a3f1a74b81400fe Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:08:12 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for tomli.
+
+---
+ build/pkgs/tomli/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tomli/spkg-configure.m4
+
+diff --git a/build/pkgs/tomli/spkg-configure.m4 b/build/pkgs/tomli/spkg-configure.m4
+new file mode 100644
+index 00000000..95a8b8b
+--- /dev/null
++++ b/build/pkgs/tomli/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tomli], [SAGE_PYTHON_PACKAGE_CHECK([tomli])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From dce1c515781b0eeb8eb9c2bc7aba581560c1fac1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:09:22 -0400
+Subject: Trac #29665: add Gentoo package information for defusedxml.
+
+---
+ build/pkgs/defusedxml/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/defusedxml/distros/gentoo.txt
+
+diff --git a/build/pkgs/defusedxml/distros/gentoo.txt b/build/pkgs/defusedxml/distros/gentoo.txt
+new file mode 100644
+index 00000000..2804214
+--- /dev/null
++++ b/build/pkgs/defusedxml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/defusedxml
+-- 
+cgit v1.0-1-gd88e
+
+
+From 02e1e1cd7f8bdae3ca5b7d35ce70af28a44e9b7c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:11:14 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for defusedxml.
+
+---
+ build/pkgs/defusedxml/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/defusedxml/spkg-configure.m4
+
+diff --git a/build/pkgs/defusedxml/spkg-configure.m4 b/build/pkgs/defusedxml/spkg-configure.m4
+new file mode 100644
+index 00000000..e02f345
+--- /dev/null
++++ b/build/pkgs/defusedxml/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([defusedxml], [SAGE_PYTHON_PACKAGE_CHECK([defusedxml])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e0ba4ebb5cfc637b5d26b85de9f34e0a160d2b9c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:12:22 -0400
+Subject: Trac #29665: add Gentoo package information for ipywidgets.
+
+---
+ build/pkgs/ipywidgets/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipywidgets/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipywidgets/distros/gentoo.txt b/build/pkgs/ipywidgets/distros/gentoo.txt
+new file mode 100644
+index 00000000..7c76967
+--- /dev/null
++++ b/build/pkgs/ipywidgets/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipywidgets
+-- 
+cgit v1.0-1-gd88e
+
+
+From 49df7e7d93c7a31b7c46d5d224a35fd313a29a32 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:15:53 -0400
+Subject: Trac #29665: add Gentoo package information for simplegeneric.
+
+---
+ build/pkgs/simplegeneric/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/simplegeneric/distros/gentoo.txt
+
+diff --git a/build/pkgs/simplegeneric/distros/gentoo.txt b/build/pkgs/simplegeneric/distros/gentoo.txt
+new file mode 100644
+index 00000000..a86e90d
+--- /dev/null
++++ b/build/pkgs/simplegeneric/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/simplegeneric
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2a893635d5804749e6fec7ed7289c921ecb5300a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:16:33 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for simplegeneric.
+
+---
+ build/pkgs/simplegeneric/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/simplegeneric/spkg-configure.m4
+
+diff --git a/build/pkgs/simplegeneric/spkg-configure.m4 b/build/pkgs/simplegeneric/spkg-configure.m4
+new file mode 100644
+index 00000000..13715ab
+--- /dev/null
++++ b/build/pkgs/simplegeneric/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([simplegeneric], [SAGE_PYTHON_PACKAGE_CHECK([simplegeneric])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a8fe7ecd6e3163e7d01261e5497ac452a8cc95ab Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:17:18 -0400
+Subject: Trac #29665: add Gentoo package information for imagesize.
+
+---
+ build/pkgs/imagesize/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/imagesize/distros/gentoo.txt
+
+diff --git a/build/pkgs/imagesize/distros/gentoo.txt b/build/pkgs/imagesize/distros/gentoo.txt
+new file mode 100644
+index 00000000..54350ba
+--- /dev/null
++++ b/build/pkgs/imagesize/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/imagesize
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2ad837c5dd1fca0f50ce6d5042a9344210a54f84 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:17:48 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for imagesize.
+
+---
+ build/pkgs/imagesize/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/imagesize/spkg-configure.m4
+
+diff --git a/build/pkgs/imagesize/spkg-configure.m4 b/build/pkgs/imagesize/spkg-configure.m4
+new file mode 100644
+index 00000000..20210ef
+--- /dev/null
++++ b/build/pkgs/imagesize/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([imagesize], [SAGE_PYTHON_PACKAGE_CHECK([imagesize])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bf47415b5bfca2d7bf24e20de35662bf331623b9 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:18:49 -0400
+Subject: Trac #29665: add Gentoo package information for mistune.
+
+---
+ build/pkgs/mistune/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mistune/distros/gentoo.txt
+
+diff --git a/build/pkgs/mistune/distros/gentoo.txt b/build/pkgs/mistune/distros/gentoo.txt
+new file mode 100644
+index 00000000..56f0a4e
+--- /dev/null
++++ b/build/pkgs/mistune/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/mistune
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6898a74fd0c65a40c5220ba68b4062ac6fe060c6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:21:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for mistune.
+
+---
+ build/pkgs/mistune/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mistune/spkg-configure.m4
+
+diff --git a/build/pkgs/mistune/spkg-configure.m4 b/build/pkgs/mistune/spkg-configure.m4
+new file mode 100644
+index 00000000..972f33d
+--- /dev/null
++++ b/build/pkgs/mistune/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([mistune], [SAGE_PYTHON_PACKAGE_CHECK([mistune])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 62735e4ccf2031cd39eb5e04b03bdfd97005d808 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:22:48 -0400
+Subject: Trac #29665: add Gentoo package information for backcall.
+
+---
+ build/pkgs/backcall/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/backcall/distros/gentoo.txt
+
+diff --git a/build/pkgs/backcall/distros/gentoo.txt b/build/pkgs/backcall/distros/gentoo.txt
+new file mode 100644
+index 00000000..266a222
+--- /dev/null
++++ b/build/pkgs/backcall/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/backcall
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9ef3ea42d4a33c7cdb623fa5417ae300cf323183 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:25:10 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for backcall.
+
+---
+ build/pkgs/backcall/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/backcall/spkg-configure.m4
+
+diff --git a/build/pkgs/backcall/spkg-configure.m4 b/build/pkgs/backcall/spkg-configure.m4
+new file mode 100644
+index 00000000..d6b11c4
+--- /dev/null
++++ b/build/pkgs/backcall/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([backcall], [SAGE_PYTHON_PACKAGE_CHECK([backcall])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1b3ea2a3c40fea0fb58435f5e5304368ea58dff8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:25:58 -0400
+Subject: Trac #29665: add Gentoo package information for parso.
+
+---
+ build/pkgs/parso/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/parso/distros/gentoo.txt
+
+diff --git a/build/pkgs/parso/distros/gentoo.txt b/build/pkgs/parso/distros/gentoo.txt
+new file mode 100644
+index 00000000..f9ce4c7
+--- /dev/null
++++ b/build/pkgs/parso/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/parso
+-- 
+cgit v1.0-1-gd88e
+
+
+From 963a3a2c563ec71a1f5be2395722d0e824cb0b11 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:26:22 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for parso.
+
+---
+ build/pkgs/parso/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/parso/spkg-configure.m4
+
+diff --git a/build/pkgs/parso/spkg-configure.m4 b/build/pkgs/parso/spkg-configure.m4
+new file mode 100644
+index 00000000..1ca6f1b
+--- /dev/null
++++ b/build/pkgs/parso/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([parso], [SAGE_PYTHON_PACKAGE_CHECK([parso])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 943053dfc474b6549bcc7d6ef2971ea43588b35c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:27:00 -0400
+Subject: Trac #29665: add Gentoo package information for pyparsing.
+
+---
+ build/pkgs/pyparsing/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyparsing/distros/gentoo.txt
+
+diff --git a/build/pkgs/pyparsing/distros/gentoo.txt b/build/pkgs/pyparsing/distros/gentoo.txt
+new file mode 100644
+index 00000000..ef0419f
+--- /dev/null
++++ b/build/pkgs/pyparsing/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyparsing
+-- 
+cgit v1.0-1-gd88e
+
+
+From bd682eaa2ac41dd84e7a52e2b0c5442fc8fd8919 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:27:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pyparsing.
+
+---
+ build/pkgs/pyparsing/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyparsing/spkg-configure.m4
+
+diff --git a/build/pkgs/pyparsing/spkg-configure.m4 b/build/pkgs/pyparsing/spkg-configure.m4
+new file mode 100644
+index 00000000..d2b4c00
+--- /dev/null
++++ b/build/pkgs/pyparsing/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pyparsing], [SAGE_PYTHON_PACKAGE_CHECK([pyparsing])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 74f36a9c0ec7c63b7e6c40066e42f4b15c2f978e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:17:42 -0400
+Subject: Trac #29665: add Gentoo package information for debugpy.
+
+---
+ build/pkgs/debugpy/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/debugpy/distros/gentoo.txt
+
+diff --git a/build/pkgs/debugpy/distros/gentoo.txt b/build/pkgs/debugpy/distros/gentoo.txt
+new file mode 100644
+index 00000000..8b797ce
+--- /dev/null
++++ b/build/pkgs/debugpy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/debugpy
+-- 
+cgit v1.0-1-gd88e
+
+
+From be072fa87ac5c373d9dc9b54c0bd68734d5709bc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:21:17 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for debugpy.
+
+---
+ build/pkgs/debugpy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/debugpy/spkg-configure.m4
+
+diff --git a/build/pkgs/debugpy/spkg-configure.m4 b/build/pkgs/debugpy/spkg-configure.m4
+new file mode 100644
+index 00000000..db605ff
+--- /dev/null
++++ b/build/pkgs/debugpy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([debugpy], [SAGE_PYTHON_PACKAGE_CHECK([debugpy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6f777ce2f2e14b94e91c8b7bbac82f9017460aba Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:23:56 -0400
+Subject: Trac #29665: add Gentoo package information for tzlocal.
+
+---
+ build/pkgs/tzlocal/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tzlocal/distros/gentoo.txt
+
+diff --git a/build/pkgs/tzlocal/distros/gentoo.txt b/build/pkgs/tzlocal/distros/gentoo.txt
+new file mode 100644
+index 00000000..2018442
+--- /dev/null
++++ b/build/pkgs/tzlocal/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/tzlocal
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3bd078fc15ae13982249452711baafae91038191 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:24:51 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for tzlocal.
+
+---
+ build/pkgs/tzlocal/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tzlocal/spkg-configure.m4
+
+diff --git a/build/pkgs/tzlocal/spkg-configure.m4 b/build/pkgs/tzlocal/spkg-configure.m4
+new file mode 100644
+index 00000000..e020b28
+--- /dev/null
++++ b/build/pkgs/tzlocal/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tzlocal], [SAGE_PYTHON_PACKAGE_CHECK([tzlocal])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 91b0882fc62214923da9ee7b6dccb05d8a1d11d1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:26:13 -0400
+Subject: Trac #29665: add Gentoo package information for pycparser.
+
+---
+ build/pkgs/pycparser/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pycparser/distros/gentoo.txt
+
+diff --git a/build/pkgs/pycparser/distros/gentoo.txt b/build/pkgs/pycparser/distros/gentoo.txt
+new file mode 100644
+index 00000000..5e87307
+--- /dev/null
++++ b/build/pkgs/pycparser/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pycparser
+-- 
+cgit v1.0-1-gd88e
+
+
+From beabde92fe6e057faf516fe82d27f1e903e55ce6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:27:27 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pycparser.
+
+---
+ build/pkgs/pycparser/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pycparser/spkg-configure.m4
+
+diff --git a/build/pkgs/pycparser/spkg-configure.m4 b/build/pkgs/pycparser/spkg-configure.m4
+new file mode 100644
+index 00000000..4b9b900
+--- /dev/null
++++ b/build/pkgs/pycparser/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pycparser], [SAGE_PYTHON_PACKAGE_CHECK([pycparser])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 86c2788dc7fd1169314e9598c91fa81045553677 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:29:36 -0400
+Subject: Trac #29665: add Gentoo package information for cycler.
+
+---
+ build/pkgs/cycler/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cycler/distros/gentoo.txt
+
+diff --git a/build/pkgs/cycler/distros/gentoo.txt b/build/pkgs/cycler/distros/gentoo.txt
+new file mode 100644
+index 00000000..4b21543
+--- /dev/null
++++ b/build/pkgs/cycler/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/cycler
+-- 
+cgit v1.0-1-gd88e
+
+
+From 67c5a944101ddf329f0a61c61d4e784f58a5c5b0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:30:27 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for cycler.
+
+---
+ build/pkgs/cycler/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cycler/spkg-configure.m4
+
+diff --git a/build/pkgs/cycler/spkg-configure.m4 b/build/pkgs/cycler/spkg-configure.m4
+new file mode 100644
+index 00000000..239571a
+--- /dev/null
++++ b/build/pkgs/cycler/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([cycler], [SAGE_PYTHON_PACKAGE_CHECK([cycler])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ef6d490251abfa41f7a0910274700a8a6a65f629 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:31:19 -0400
+Subject: Trac #29665: add Gentoo package information for traitlets.
+
+---
+ build/pkgs/traitlets/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/traitlets/distros/gentoo.txt
+
+diff --git a/build/pkgs/traitlets/distros/gentoo.txt b/build/pkgs/traitlets/distros/gentoo.txt
+new file mode 100644
+index 00000000..46bfaab
+--- /dev/null
++++ b/build/pkgs/traitlets/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/traitlets
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1f922b458d34088d9f6773312209e69f19ee45dc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:31:50 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for traitlets.
+
+---
+ build/pkgs/traitlets/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/traitlets/spkg-configure.m4
+
+diff --git a/build/pkgs/traitlets/spkg-configure.m4 b/build/pkgs/traitlets/spkg-configure.m4
+new file mode 100644
+index 00000000..df2382b
+--- /dev/null
++++ b/build/pkgs/traitlets/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([traitlets], [SAGE_PYTHON_PACKAGE_CHECK([traitlets])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 95b89a9ced0acb6d971a27fa63b97ea58a11f4e1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:33:35 -0400
+Subject: Trac #29665: add Gentoo package information for argcomplete.
+
+---
+ build/pkgs/argcomplete/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argcomplete/distros/gentoo.txt
+
+diff --git a/build/pkgs/argcomplete/distros/gentoo.txt b/build/pkgs/argcomplete/distros/gentoo.txt
+new file mode 100644
+index 00000000..b150949
+--- /dev/null
++++ b/build/pkgs/argcomplete/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/argcomplete
+-- 
+cgit v1.0-1-gd88e
+
+
+From b4cd8ef384e6e5bae0de0f3c113fb5f9e6e1a71e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:34:14 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for argcomplete.
+
+---
+ build/pkgs/argcomplete/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argcomplete/spkg-configure.m4
+
+diff --git a/build/pkgs/argcomplete/spkg-configure.m4 b/build/pkgs/argcomplete/spkg-configure.m4
+new file mode 100644
+index 00000000..cbd7ccf
+--- /dev/null
++++ b/build/pkgs/argcomplete/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([argcomplete], [SAGE_PYTHON_PACKAGE_CHECK([argcomplete])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4cc610e8331970cc018d7ea87af928fa73a292c1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:36:21 -0400
+Subject: Trac #29665: add Gentoo package information for ptyprocess.
+
+---
+ build/pkgs/ptyprocess/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ptyprocess/distros/gentoo.txt
+
+diff --git a/build/pkgs/ptyprocess/distros/gentoo.txt b/build/pkgs/ptyprocess/distros/gentoo.txt
+new file mode 100644
+index 00000000..571a851
+--- /dev/null
++++ b/build/pkgs/ptyprocess/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ptyprocess
+-- 
+cgit v1.0-1-gd88e
+
+
+From cd15f97221bf5933b07900e4f77cb55401eede26 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:37:02 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ptyprocess.
+
+---
+ build/pkgs/ptyprocess/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ptyprocess/spkg-configure.m4
+
+diff --git a/build/pkgs/ptyprocess/spkg-configure.m4 b/build/pkgs/ptyprocess/spkg-configure.m4
+new file mode 100644
+index 00000000..bfacbae
+--- /dev/null
++++ b/build/pkgs/ptyprocess/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ptyprocess], [SAGE_PYTHON_PACKAGE_CHECK([ptyprocess])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb5f45b15f99e4ba28e1b1f6042a0e8ea17f1dfc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:38:22 -0400
+Subject: Trac #29665: add Gentoo package information for attrs.
+
+---
+ build/pkgs/attrs/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/attrs/distros/gentoo.txt
+
+diff --git a/build/pkgs/attrs/distros/gentoo.txt b/build/pkgs/attrs/distros/gentoo.txt
+new file mode 100644
+index 00000000..3b906fa
+--- /dev/null
++++ b/build/pkgs/attrs/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/attrs
+-- 
+cgit v1.0-1-gd88e
+
+
+From 321707ebf8e9af1e4ac3a5b5b094b4226bb3a7a5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:38:55 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for attrs.
+
+---
+ build/pkgs/attrs/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/attrs/spkg-configure.m4
+
+diff --git a/build/pkgs/attrs/spkg-configure.m4 b/build/pkgs/attrs/spkg-configure.m4
+new file mode 100644
+index 00000000..ba6a9b7
+--- /dev/null
++++ b/build/pkgs/attrs/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([attrs], [SAGE_PYTHON_PACKAGE_CHECK([attrs])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 69a498a4e8854ecdfc2f1a134104983c0dcb9e32 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:40:09 -0400
+Subject: Trac #29665: add Gentoo package information for send2trash.
+
+---
+ build/pkgs/send2trash/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/send2trash/distros/gentoo.txt
+
+diff --git a/build/pkgs/send2trash/distros/gentoo.txt b/build/pkgs/send2trash/distros/gentoo.txt
+new file mode 100644
+index 00000000..a89b179
+--- /dev/null
++++ b/build/pkgs/send2trash/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/send2trash
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9baed17c84e1bdf5abd17c20766e5cd7dddc5b53 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:41:45 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for send2trash.
+
+---
+ build/pkgs/send2trash/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/send2trash/spkg-configure.m4
+
+diff --git a/build/pkgs/send2trash/spkg-configure.m4 b/build/pkgs/send2trash/spkg-configure.m4
+new file mode 100644
+index 00000000..3bbb727
+--- /dev/null
++++ b/build/pkgs/send2trash/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([send2trash], [SAGE_PYTHON_PACKAGE_CHECK([send2trash])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b9b552b2a2aaccaeb7c5b25be0b681f107522d09 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:43:27 -0400
+Subject: Trac #29665: add Gentoo package information for pyrsistent.
+
+---
+ build/pkgs/pyrsistent/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyrsistent/distros/gentoo.txt
+
+diff --git a/build/pkgs/pyrsistent/distros/gentoo.txt b/build/pkgs/pyrsistent/distros/gentoo.txt
+new file mode 100644
+index 00000000..83439ce
+--- /dev/null
++++ b/build/pkgs/pyrsistent/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyrsistent
+-- 
+cgit v1.0-1-gd88e
+
+
+From a17b31fac6104852762f57daa749443147bdf121 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:44:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pyrsistent.
+
+---
+ build/pkgs/pyrsistent/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyrsistent/spkg-configure.m4
+
+diff --git a/build/pkgs/pyrsistent/spkg-configure.m4 b/build/pkgs/pyrsistent/spkg-configure.m4
+new file mode 100644
+index 00000000..f7ca75d
+--- /dev/null
++++ b/build/pkgs/pyrsistent/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pyrsistent], [SAGE_PYTHON_PACKAGE_CHECK([pyrsistent])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 68520decad6d6937918d7a6af65ca5bd476e5d02 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:45:45 -0400
+Subject: Trac #29665: add Gentoo package information for entrypoints.
+
+---
+ build/pkgs/entrypoints/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/entrypoints/distros/gentoo.txt
+
+diff --git a/build/pkgs/entrypoints/distros/gentoo.txt b/build/pkgs/entrypoints/distros/gentoo.txt
+new file mode 100644
+index 00000000..684ddd0
+--- /dev/null
++++ b/build/pkgs/entrypoints/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/entrypoints
+-- 
+cgit v1.0-1-gd88e
+
+
+From 34213eccb642a6bad64d89acaefa83ee702cb483 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:46:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for entrypoints.
+
+---
+ build/pkgs/entrypoints/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/entrypoints/spkg-configure.m4
+
+diff --git a/build/pkgs/entrypoints/spkg-configure.m4 b/build/pkgs/entrypoints/spkg-configure.m4
+new file mode 100644
+index 00000000..caed658
+--- /dev/null
++++ b/build/pkgs/entrypoints/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([entrypoints], [SAGE_PYTHON_PACKAGE_CHECK([entrypoints])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8e985614345da1a58fcdc127a9c0ddd790f9b5d2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:48:26 -0400
+Subject: Trac #29665: add Gentoo package information for markupsafe.
+
+---
+ build/pkgs/markupsafe/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/markupsafe/distros/gentoo.txt
+
+diff --git a/build/pkgs/markupsafe/distros/gentoo.txt b/build/pkgs/markupsafe/distros/gentoo.txt
+new file mode 100644
+index 00000000..9654e35
+--- /dev/null
++++ b/build/pkgs/markupsafe/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/markupsafe
+-- 
+cgit v1.0-1-gd88e
+
+
+From d370f229ae0988856f2e0d1f6ee2df2c47169106 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:48:55 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for markupsafe.
+
+---
+ build/pkgs/markupsafe/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/markupsafe/spkg-configure.m4
+
+diff --git a/build/pkgs/markupsafe/spkg-configure.m4 b/build/pkgs/markupsafe/spkg-configure.m4
+new file mode 100644
+index 00000000..79eb8db
+--- /dev/null
++++ b/build/pkgs/markupsafe/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([markupsafe], [SAGE_PYTHON_PACKAGE_CHECK([markupsafe])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c49b285ad9e25e6bc81a7e75d461d234fdd3ea68 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:30:49 -0400
+Subject: Trac #29665: add Gentoo package information for flit_core.
+
+---
+ build/pkgs/flit_core/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/flit_core/distros/gentoo.txt
+
+diff --git a/build/pkgs/flit_core/distros/gentoo.txt b/build/pkgs/flit_core/distros/gentoo.txt
+new file mode 100644
+index 00000000..fe6bea9
+--- /dev/null
++++ b/build/pkgs/flit_core/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/flit_core
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b0ce1c4f23cd9fc4316e1eb2b9b4bde394957f3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:32:11 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for flit_core.
+
+---
+ build/pkgs/flit_core/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/flit_core/spkg-configure.m4
+
+diff --git a/build/pkgs/flit_core/spkg-configure.m4 b/build/pkgs/flit_core/spkg-configure.m4
+new file mode 100644
+index 00000000..ee67557
+--- /dev/null
++++ b/build/pkgs/flit_core/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([flit_core], [SAGE_PYTHON_PACKAGE_CHECK([flit_core])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f006c231a81428b1e1e792f889bf974f90e3c831 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:34:06 -0400
+Subject: Trac #29665: add Gentoo package information for nest_asyncio.
+
+---
+ build/pkgs/nest_asyncio/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nest_asyncio/distros/gentoo.txt
+
+diff --git a/build/pkgs/nest_asyncio/distros/gentoo.txt b/build/pkgs/nest_asyncio/distros/gentoo.txt
+new file mode 100644
+index 00000000..ab742d2
+--- /dev/null
++++ b/build/pkgs/nest_asyncio/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nest_asyncio
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4a58d0a96a84475e765a01a64f5f44c48a317e0b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:34:43 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for nest_asyncio.
+
+---
+ build/pkgs/nest_asyncio/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nest_asyncio/spkg-configure.m4
+
+diff --git a/build/pkgs/nest_asyncio/spkg-configure.m4 b/build/pkgs/nest_asyncio/spkg-configure.m4
+new file mode 100644
+index 00000000..4d81527
+--- /dev/null
++++ b/build/pkgs/nest_asyncio/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nest_asyncio], [SAGE_PYTHON_PACKAGE_CHECK([nest_asyncio])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e50af937777ea778908bc09a7a79db3dd80fdf25 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:37:02 -0400
+Subject: Trac #29665: add Gentoo package information for ipython_genutils.
+
+---
+ build/pkgs/ipython_genutils/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython_genutils/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipython_genutils/distros/gentoo.txt b/build/pkgs/ipython_genutils/distros/gentoo.txt
+new file mode 100644
+index 00000000..01bc49d
+--- /dev/null
++++ b/build/pkgs/ipython_genutils/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipython_genutils
+-- 
+cgit v1.0-1-gd88e
+
+
+From ec3c0ce9db2ba13c1a49d1bcfb7a4b249cb7ae83 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:39:20 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipython_genutils.
+
+---
+ build/pkgs/ipython_genutils/spkg-configure.m4 | 4 ++++
+ 1 file changed, 4 insertions(+)
+ create mode 100644 build/pkgs/ipython_genutils/spkg-configure.m4
+
+diff --git a/build/pkgs/ipython_genutils/spkg-configure.m4 b/build/pkgs/ipython_genutils/spkg-configure.m4
+new file mode 100644
+index 00000000..b0ba86a
+--- /dev/null
++++ b/build/pkgs/ipython_genutils/spkg-configure.m4
+@@ -0,0 +1,4 @@
++SAGE_SPKG_CONFIGURE(
++  [ipython_genutils],
++  [SAGE_PYTHON_PACKAGE_CHECK([ipython_genutils])]
++)
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5c9e2e265115e5f10d4b459a475467e30b4bddde Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:40:03 -0400
+Subject: Trac #29665: add Gentoo package information for ipython.
+
+---
+ build/pkgs/ipython/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipython/distros/gentoo.txt b/build/pkgs/ipython/distros/gentoo.txt
+new file mode 100644
+index 00000000..8b76f18
+--- /dev/null
++++ b/build/pkgs/ipython/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipython
+-- 
+cgit v1.0-1-gd88e
+
+
+From 621e707ddd040a902d7dddf0bed1de2b54ab22f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 07:37:56 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipython.
+
+---
+ build/pkgs/ipython/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython/spkg-configure.m4
+
+diff --git a/build/pkgs/ipython/spkg-configure.m4 b/build/pkgs/ipython/spkg-configure.m4
+new file mode 100644
+index 00000000..02ab89f
+--- /dev/null
++++ b/build/pkgs/ipython/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipython], [SAGE_PYTHON_PACKAGE_CHECK([ipython])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20a0613f6d441da436f3e7b8047a72bf490882bd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 07:51:11 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipywidgets.
+
+---
+ build/pkgs/ipywidgets/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipywidgets/spkg-configure.m4
+
+diff --git a/build/pkgs/ipywidgets/spkg-configure.m4 b/build/pkgs/ipywidgets/spkg-configure.m4
+new file mode 100644
+index 00000000..51ca9be
+--- /dev/null
++++ b/build/pkgs/ipywidgets/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipywidgets], [SAGE_PYTHON_PACKAGE_CHECK([ipywidgets])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 76bcd386633acc02a1a3026339d0cbd258ada04e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 10:05:16 -0400
+Subject: Trac #29665: add Gentoo package information for wheel.
+
+---
+ build/pkgs/wheel/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wheel/distros/gentoo.txt
+
+diff --git a/build/pkgs/wheel/distros/gentoo.txt b/build/pkgs/wheel/distros/gentoo.txt
+new file mode 100644
+index 00000000..ec571d5
+--- /dev/null
++++ b/build/pkgs/wheel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 96c2dd2ca7812f5333bb9d45eadb7ac408e364ce Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:51:44 -0500
+Subject: Trac #29665: add Gentoo package information for terminado.
+
+---
+ build/pkgs/terminado/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/terminado/distros/gentoo.txt
+
+diff --git a/build/pkgs/terminado/distros/gentoo.txt b/build/pkgs/terminado/distros/gentoo.txt
+new file mode 100644
+index 00000000..1df16f1
+--- /dev/null
++++ b/build/pkgs/terminado/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/terminado
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0de0f5f3d235a4339b21e37ea13c9f5e59a82e59 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:52:35 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for terminado.
+
+---
+ build/pkgs/terminado/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/terminado/spkg-configure.m4
+
+diff --git a/build/pkgs/terminado/spkg-configure.m4 b/build/pkgs/terminado/spkg-configure.m4
+new file mode 100644
+index 00000000..5defc2f
+--- /dev/null
++++ b/build/pkgs/terminado/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([terminado], [SAGE_PYTHON_PACKAGE_CHECK([terminado])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d14a745c770b02822557e7cee0a98de1cb2f3a12 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:56:15 -0500
+Subject: Trac #29665: add Gentoo package information for cffi.
+
+---
+ build/pkgs/cffi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cffi/distros/gentoo.txt
+
+diff --git a/build/pkgs/cffi/distros/gentoo.txt b/build/pkgs/cffi/distros/gentoo.txt
+new file mode 100644
+index 00000000..81eeb81
+--- /dev/null
++++ b/build/pkgs/cffi/distros/gentoo.txt
+@@ -0,0 +1 @@
++virtual/python-cffi
+-- 
+cgit v1.0-1-gd88e
+
+
+From ce393c04afc69fe050e38f780d4e117164687d80 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:57:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for cffi.
+
+---
+ build/pkgs/cffi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cffi/spkg-configure.m4
+
+diff --git a/build/pkgs/cffi/spkg-configure.m4 b/build/pkgs/cffi/spkg-configure.m4
+new file mode 100644
+index 00000000..dc81875
+--- /dev/null
++++ b/build/pkgs/cffi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([cffi], [SAGE_PYTHON_PACKAGE_CHECK([cffi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 467093315b3fdd57c8caa2f95cf99ad52b0b84fb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:57:57 -0500
+Subject: Trac #29665: add Gentoo package information for pip.
+
+---
+ build/pkgs/pip/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pip/distros/gentoo.txt
+
+diff --git a/build/pkgs/pip/distros/gentoo.txt b/build/pkgs/pip/distros/gentoo.txt
+new file mode 100644
+index 00000000..1845454
+--- /dev/null
++++ b/build/pkgs/pip/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pip[vanilla]
+-- 
+cgit v1.0-1-gd88e
+
+
+From c597fd23f9f68dabbcb7e698d0569c3e6458f6d1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 09:07:26 -0500
+Subject: Trac #29665: new spkg-configure.m4 for pip.
+
+---
+ build/pkgs/pip/spkg-configure.m4 | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+ create mode 100644 build/pkgs/pip/spkg-configure.m4
+
+diff --git a/build/pkgs/pip/spkg-configure.m4 b/build/pkgs/pip/spkg-configure.m4
+new file mode 100644
+index 00000000..c7a5562
+--- /dev/null
++++ b/build/pkgs/pip/spkg-configure.m4
+@@ -0,0 +1,12 @@
++SAGE_SPKG_CONFIGURE([pip], [
++  dnl always run this macro because it changes the default value of
++  dnl the --with-system-<package> option.
++  SAGE_PYTHON_PACKAGE_CHECK([pip])
++
++  dnl if we might not install the spkg, make sure that "pip" is in
++  dnl the user's PATH, too.
++  AS_IF([test "x$sage_spkg_install_pip" != "xyes"], [
++    AC_CHECK_PROG(HAVE_PIP, pip, yes, no)
++    AS_IF([test "x$HAVE_PIP" = "xno"], [sage_spkg_install_pip=yes])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ef8f1e807bc55d7b8321777486fa867a7c135419 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 9 Nov 2021 09:09:04 -0500
+Subject: Trac #29665: set $SAGE_PIP_INSTALL_FLAGS for
+ --enable-system-site-packages.
+
+We need to pass some special flags to "pip install" to make it do the
+right thing in the precence of system-site packages. Here we introduce
+a new autoconf variable, SAGE_PIP_INSTALL_FLAGS, that will be used
+to pass those flags to the build system.
+
+With autoconf aware of the variable, we substitute its value into the
+sage-build-env-config script for use in spkg-install.in.
+---
+ build/bin/sage-build-env-config.in | 1 +
+ configure.ac                       | 9 +++++++++
+ 2 files changed, 10 insertions(+)
+
+diff --git a/build/bin/sage-build-env-config.in b/build/bin/sage-build-env-config.in
+index 92e7dad..ad62e5f 100644
+--- a/build/bin/sage-build-env-config.in
++++ b/build/bin/sage-build-env-config.in
+@@ -53,6 +53,7 @@ export SAGE_PARI_CFG="@SAGE_PARI_CFG@"
+ 
+ export SAGE_GLPK_PREFIX="@SAGE_GLPK_PREFIX@"
+ export SAGE_FREETYPE_PREFIX="@SAGE_FREETYPE_PREFIX@"
++export SAGE_PIP_INSTALL_FLAGS="@SAGE_PIP_INSTALL_FLAGS@"
+ export SAGE_SUITESPARSE_PREFIX="@SAGE_SUITESPARSE_PREFIX@"
+ 
+ export SAGE_CONFIGURE_FFLAS_FFPACK="@SAGE_CONFIGURE_FFLAS_FFPACK@"
+diff --git a/configure.ac b/configure.ac
+index 6fafb83..6ed07ac 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -441,6 +441,14 @@ AC_ARG_ENABLE(
+     [allow the use of python packages from the system (experimental; default: no)]
+   )], [
+   AS_IF([test "x$enable_system_site_packages" = "xyes"], [
++    dnl When installing python SPKGs in the presence of system-site
++    dnl packages, we need to --ignore-installed so that a patched SPKG
++    dnl can be installed in the presence of an unpatched system package
++    dnl that appears (to pip) to be identical. The --no-deps flag is
++    dnl then needed because --ignore-installed will make any installed
++    dnl dependencies invisible to pip, who does not appreciate that.
++    SAGE_PIP_INSTALL_FLAGS="${SAGE_PIP_INSTALL_FLAGS} --no-deps --ignore-installed"
++
+     SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
+ 
+     dnl We want to raise an error if the user asked for "system site
+@@ -453,6 +461,7 @@ AC_ARG_ENABLE(
+     with_system_python3="force"
+   ])
+ ])
++AC_SUBST([SAGE_PIP_INSTALL_FLAGS])
+ AC_SUBST([SAGE_VENV_FLAGS])
+ 
+ SAGE_SPKG_OPTIONS=""
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3cf365fef84e809e74abd2eb388e7a8e9af9d739 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 9 Nov 2021 21:01:58 -0500
+Subject: Trac #29665: pass $SAGE_PIP_INSTALL_FLAGS to sdh_pip_install.
+
+Since sdh_pip_install is usually called from spkg-install.in, the
+variables from sage-build-env-config will be available. Here we pass
+the contents of $SAGE_PIP_INSTALL_FLAGS to sage-pip-install
+unconditionally, and hope that the user ignores this variable unless
+he truly knows what he is doing.
+---
+ build/bin/sage-dist-helpers | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/build/bin/sage-dist-helpers b/build/bin/sage-dist-helpers
+index fe364e5..1032ac3 100644
+--- a/build/bin/sage-dist-helpers
++++ b/build/bin/sage-dist-helpers
+@@ -303,7 +303,11 @@ sdh_store_wheel() {
+ }
+ 
+ sdh_store_and_pip_install_wheel() {
+-    local pip_options=""
++    # The $SAGE_PIP_INSTALL_FLAGS variable is set by sage-build-env-config.
++    # We skip sanity checking its contents since you should either let sage
++    # decide what it contains, or really know what you are doing.
++    local pip_options="${SAGE_PIP_INSTALL_FLAGS}"
++
+     while [ $# -gt 0 ]; do
+         case $1 in
+             -*) pip_options="$pip_options $1"
+-- 
+cgit v1.0-1-gd88e
+
+
+From 50f0438ee857b8f0b7d7ad924e6bba9c5e1bc033 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:10:46 -0500
+Subject: Trac #29665: add Gentoo package information for pexpect.
+
+---
+ build/pkgs/pexpect/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pexpect/distros/gentoo.txt
+
+diff --git a/build/pkgs/pexpect/distros/gentoo.txt b/build/pkgs/pexpect/distros/gentoo.txt
+new file mode 100644
+index 00000000..30c4b60
+--- /dev/null
++++ b/build/pkgs/pexpect/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pexpect
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4d784688d997290b462646fa7f36114a41f3f453 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:11:25 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pexpect.
+
+---
+ build/pkgs/pexpect/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pexpect/spkg-configure.m4
+
+diff --git a/build/pkgs/pexpect/spkg-configure.m4 b/build/pkgs/pexpect/spkg-configure.m4
+new file mode 100644
+index 00000000..6520856
+--- /dev/null
++++ b/build/pkgs/pexpect/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pexpect], [SAGE_PYTHON_PACKAGE_CHECK([pexpect])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6447122dc76a3b7a58340dbed942db66530b5b07 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:12:05 -0500
+Subject: Trac #29665: add Gentoo package information for docutils.
+
+---
+ build/pkgs/docutils/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/docutils/distros/gentoo.txt
+
+diff --git a/build/pkgs/docutils/distros/gentoo.txt b/build/pkgs/docutils/distros/gentoo.txt
+new file mode 100644
+index 00000000..fe4a452
+--- /dev/null
++++ b/build/pkgs/docutils/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/docutils
+-- 
+cgit v1.0-1-gd88e
+
+
+From 709041480a5fc729b0ee7f1a8a3b16d4d65321b5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:12:38 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for docutils.
+
+---
+ build/pkgs/docutils/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/docutils/spkg-configure.m4
+
+diff --git a/build/pkgs/docutils/spkg-configure.m4 b/build/pkgs/docutils/spkg-configure.m4
+new file mode 100644
+index 00000000..3584e45
+--- /dev/null
++++ b/build/pkgs/docutils/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([docutils], [SAGE_PYTHON_PACKAGE_CHECK([docutils])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 782d38b48ab87afccc43fbc071e7b7ed48fb0a20 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:14:37 -0500
+Subject: Trac #29665: add Gentoo package information for nbclient.
+
+---
+ build/pkgs/nbclient/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbclient/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbclient/distros/gentoo.txt b/build/pkgs/nbclient/distros/gentoo.txt
+new file mode 100644
+index 00000000..06ff18d
+--- /dev/null
++++ b/build/pkgs/nbclient/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbclient
+-- 
+cgit v1.0-1-gd88e
+
+
+From 19ce09336532336f69db74381932d51a429dfaca Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:15:11 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for nbclient.
+
+---
+ build/pkgs/nbclient/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbclient/spkg-configure.m4
+
+diff --git a/build/pkgs/nbclient/spkg-configure.m4 b/build/pkgs/nbclient/spkg-configure.m4
+new file mode 100644
+index 00000000..14178b7
+--- /dev/null
++++ b/build/pkgs/nbclient/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbclient], [SAGE_PYTHON_PACKAGE_CHECK([nbclient])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c063b9de42c1780368000a563d0dbe80b6fff169 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:17:36 -0500
+Subject: Trac #29665: add Gentoo package information for argon2_cffi.
+
+---
+ build/pkgs/argon2_cffi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argon2_cffi/distros/gentoo.txt
+
+diff --git a/build/pkgs/argon2_cffi/distros/gentoo.txt b/build/pkgs/argon2_cffi/distros/gentoo.txt
+new file mode 100644
+index 00000000..2f12ca8
+--- /dev/null
++++ b/build/pkgs/argon2_cffi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/argon2-cffi
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0b4d5699dd51ea52550fba7db9e1cbb8bbac1892 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:18:35 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for argon2_cffi.
+
+---
+ build/pkgs/argon2_cffi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argon2_cffi/spkg-configure.m4
+
+diff --git a/build/pkgs/argon2_cffi/spkg-configure.m4 b/build/pkgs/argon2_cffi/spkg-configure.m4
+new file mode 100644
+index 00000000..03ebc63
+--- /dev/null
++++ b/build/pkgs/argon2_cffi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([argon2_cffi], [SAGE_PYTHON_PACKAGE_CHECK([argon2_cffi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2b4119558a6e0b1aa512848539a237676b035c83 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:30:48 -0500
+Subject: Trac #29665: fix package name in dateutil's install-requires.txt.
+
+---
+ build/pkgs/dateutil/install-requires.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/build/pkgs/dateutil/install-requires.txt b/build/pkgs/dateutil/install-requires.txt
+index 0ae93da..face537 100644
+--- a/build/pkgs/dateutil/install-requires.txt
++++ b/build/pkgs/dateutil/install-requires.txt
+@@ -1 +1 @@
+-dateutil >=2.8.1
++python-dateutil >=2.8.1
+-- 
+cgit v1.0-1-gd88e
+
+
+From df371b7c4d20a3353d43940306ad22e11aba29da Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:31:41 -0500
+Subject: Trac #29665: add Gentoo package information for dateutil.
+
+---
+ build/pkgs/dateutil/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/dateutil/distros/gentoo.txt
+
+diff --git a/build/pkgs/dateutil/distros/gentoo.txt b/build/pkgs/dateutil/distros/gentoo.txt
+new file mode 100644
+index 00000000..e129df7
+--- /dev/null
++++ b/build/pkgs/dateutil/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/python-dateutil
+-- 
+cgit v1.0-1-gd88e
+
+
+From 577695dfdf661ee26c0ffd767bdbf479d95f7fb4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:32:21 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for dateutil.
+
+---
+ build/pkgs/dateutil/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/dateutil/spkg-configure.m4
+
+diff --git a/build/pkgs/dateutil/spkg-configure.m4 b/build/pkgs/dateutil/spkg-configure.m4
+new file mode 100644
+index 00000000..fdcd127
+--- /dev/null
++++ b/build/pkgs/dateutil/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([dateutil], [SAGE_PYTHON_PACKAGE_CHECK([dateutil])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1984651caac624ec4bb58814ca1d57fe66f9881a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:33:51 -0500
+Subject: Trac #29665: add Gentoo package information for setuptools_scm.
+
+---
+ build/pkgs/setuptools_scm/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/setuptools_scm/distros/gentoo.txt
+
+diff --git a/build/pkgs/setuptools_scm/distros/gentoo.txt b/build/pkgs/setuptools_scm/distros/gentoo.txt
+new file mode 100644
+index 00000000..8989597
+--- /dev/null
++++ b/build/pkgs/setuptools_scm/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/setuptools_scm
+-- 
+cgit v1.0-1-gd88e
+
+
+From ebf7c854ed966e7353759be485c4f5a57b9a10fa Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:34:49 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for setuptools_scm.
+
+---
+ build/pkgs/setuptools_scm/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/setuptools_scm/spkg-configure.m4
+
+diff --git a/build/pkgs/setuptools_scm/spkg-configure.m4 b/build/pkgs/setuptools_scm/spkg-configure.m4
+new file mode 100644
+index 00000000..437148c
+--- /dev/null
++++ b/build/pkgs/setuptools_scm/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([setuptools_scm], [
++  SAGE_PYTHON_PACKAGE_CHECK([setuptools_scm])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0dee0d0c28f31b1f619e44c710a3c9e22d2b2544 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:36:33 -0500
+Subject: Trac #29665: add Gentoo package information for nbconvert.
+
+---
+ build/pkgs/nbconvert/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbconvert/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbconvert/distros/gentoo.txt b/build/pkgs/nbconvert/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c45a10
+--- /dev/null
++++ b/build/pkgs/nbconvert/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbconvert
+-- 
+cgit v1.0-1-gd88e
+
+
+From 473789eb11b1838bc32dc8a63509ee199afc8912 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:37:37 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for nbconvert.
+
+---
+ build/pkgs/nbconvert/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbconvert/spkg-configure.m4
+
+diff --git a/build/pkgs/nbconvert/spkg-configure.m4 b/build/pkgs/nbconvert/spkg-configure.m4
+new file mode 100644
+index 00000000..9b5dee3
+--- /dev/null
++++ b/build/pkgs/nbconvert/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbconvert], [SAGE_PYTHON_PACKAGE_CHECK([nbconvert])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f0703b594e57c980d605aa9bc8316c45a7858b3b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:41:51 -0500
+Subject: Trac #29665: add Gentoo package information for jupyter_core.
+
+---
+ build/pkgs/jupyter_core/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyter_core/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyter_core/distros/gentoo.txt b/build/pkgs/jupyter_core/distros/gentoo.txt
+new file mode 100644
+index 00000000..f168c5a
+--- /dev/null
++++ b/build/pkgs/jupyter_core/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyter_core
+-- 
+cgit v1.0-1-gd88e
+
+
+From 061a307cc4a6680d8500fde834975064e59540d5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:42:48 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jupyter_core.
+
+---
+ build/pkgs/jupyter_core/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyter_core/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyter_core/spkg-configure.m4 b/build/pkgs/jupyter_core/spkg-configure.m4
+new file mode 100644
+index 00000000..67df9c3
+--- /dev/null
++++ b/build/pkgs/jupyter_core/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyter_core], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyter_core])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b85abe964ce0b98b5842efe9cbad9bdb1c89202f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:47:08 -0500
+Subject: Trac #29665: add Gentoo package information for jupyter_client.
+
+---
+ build/pkgs/jupyter_client/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyter_client/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyter_client/distros/gentoo.txt b/build/pkgs/jupyter_client/distros/gentoo.txt
+new file mode 100644
+index 00000000..4f1de88
+--- /dev/null
++++ b/build/pkgs/jupyter_client/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyter_client
+-- 
+cgit v1.0-1-gd88e
+
+
+From 86323ff1e0b2507933df6bc2a96c9175957640c5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:48:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jupyter_client.
+
+---
+ build/pkgs/jupyter_client/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyter_client/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyter_client/spkg-configure.m4 b/build/pkgs/jupyter_client/spkg-configure.m4
+new file mode 100644
+index 00000000..fbd3498
+--- /dev/null
++++ b/build/pkgs/jupyter_client/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyter_client], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyter_client])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a8475e27dd30d752d05ab6fea6579e8623501d82 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:48:58 -0500
+Subject: Trac #29665: add Gentoo package information for snowballstemmer.
+
+---
+ build/pkgs/snowballstemmer/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/snowballstemmer/distros/gentoo.txt
+
+diff --git a/build/pkgs/snowballstemmer/distros/gentoo.txt b/build/pkgs/snowballstemmer/distros/gentoo.txt
+new file mode 100644
+index 00000000..63fd851
+--- /dev/null
++++ b/build/pkgs/snowballstemmer/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/snowballstemmer
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0833c9b781062b4ed86d619e050a6f5d60e36080 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:49:38 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for snowballstemmer.
+
+---
+ build/pkgs/snowballstemmer/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/snowballstemmer/spkg-configure.m4
+
+diff --git a/build/pkgs/snowballstemmer/spkg-configure.m4 b/build/pkgs/snowballstemmer/spkg-configure.m4
+new file mode 100644
+index 00000000..6aa0882
+--- /dev/null
++++ b/build/pkgs/snowballstemmer/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([snowballstemmer], [
++  SAGE_PYTHON_PACKAGE_CHECK([snowballstemmer])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 50a1cf2a2bcd7eeec64cbc3f70e3e9fbe5d850fe Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:50:47 -0500
+Subject: Trac #29665: add Gentoo package information for tornado.
+
+---
+ build/pkgs/tornado/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tornado/distros/gentoo.txt
+
+diff --git a/build/pkgs/tornado/distros/gentoo.txt b/build/pkgs/tornado/distros/gentoo.txt
+new file mode 100644
+index 00000000..6ae4b9f
+--- /dev/null
++++ b/build/pkgs/tornado/distros/gentoo.txt
+@@ -0,0 +1 @@
++www-servers/tornado
+-- 
+cgit v1.0-1-gd88e
+
+
+From 118f4da6e03476c726363e8e22ecda32f13bfc33 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:51:26 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for tornado.
+
+---
+ build/pkgs/tornado/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tornado/spkg-configure.m4
+
+diff --git a/build/pkgs/tornado/spkg-configure.m4 b/build/pkgs/tornado/spkg-configure.m4
+new file mode 100644
+index 00000000..1ee5bc9
+--- /dev/null
++++ b/build/pkgs/tornado/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tornado], [SAGE_PYTHON_PACKAGE_CHECK([tornado])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3850701747a6c8ef60840bdfdb589b28d4cd2b9a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:52:21 -0500
+Subject: Trac #29665: add Gentoo package information for jsonschema.
+
+---
+ build/pkgs/jsonschema/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jsonschema/distros/gentoo.txt
+
+diff --git a/build/pkgs/jsonschema/distros/gentoo.txt b/build/pkgs/jsonschema/distros/gentoo.txt
+new file mode 100644
+index 00000000..d708e4c
+--- /dev/null
++++ b/build/pkgs/jsonschema/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jsonschema
+-- 
+cgit v1.0-1-gd88e
+
+
+From 76e3917c8af781af00f642cfada7a79594429e30 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:54:03 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jsonschema.
+
+---
+ build/pkgs/jsonschema/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jsonschema/spkg-configure.m4
+
+diff --git a/build/pkgs/jsonschema/spkg-configure.m4 b/build/pkgs/jsonschema/spkg-configure.m4
+new file mode 100644
+index 00000000..b9e5e21
+--- /dev/null
++++ b/build/pkgs/jsonschema/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jsonschema], [SAGE_PYTHON_PACKAGE_CHECK([jsonschema])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From fd4a16c11669b6dd73ac6325bca820e76db00402 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:55:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ widgetsnbextension.
+
+---
+ build/pkgs/widgetsnbextension/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/widgetsnbextension/spkg-configure.m4
+
+diff --git a/build/pkgs/widgetsnbextension/spkg-configure.m4 b/build/pkgs/widgetsnbextension/spkg-configure.m4
+new file mode 100644
+index 00000000..bf82daf
+--- /dev/null
++++ b/build/pkgs/widgetsnbextension/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([widgetsnbextension], [
++  SAGE_PYTHON_PACKAGE_CHECK([widgetsnbextension])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8079a9f384e3c8480e157dd98c3db2f43c987f4e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:57:20 -0500
+Subject: Trac #29665: add Gentoo package information for importlib_resources.
+
+---
+ build/pkgs/importlib_resources/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/importlib_resources/distros/gentoo.txt
+
+diff --git a/build/pkgs/importlib_resources/distros/gentoo.txt b/build/pkgs/importlib_resources/distros/gentoo.txt
+new file mode 100644
+index 00000000..d5e1f2c
+--- /dev/null
++++ b/build/pkgs/importlib_resources/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/importlib_resources
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2c430d7c52f02779a6c41b98ac2f4edd8b6759c3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:58:00 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ importlib_resources.
+
+---
+ build/pkgs/importlib_resources/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/importlib_resources/spkg-configure.m4
+
+diff --git a/build/pkgs/importlib_resources/spkg-configure.m4 b/build/pkgs/importlib_resources/spkg-configure.m4
+new file mode 100644
+index 00000000..50df55b
+--- /dev/null
++++ b/build/pkgs/importlib_resources/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([importlib_resources], [
++  SAGE_PYTHON_PACKAGE_CHECK([importlib_resources])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 00d13d7bf2e50aae2ccef3b2b30293c70a922af2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:58:38 -0500
+Subject: Trac #29665: add Gentoo package information for kiwisolver.
+
+---
+ build/pkgs/kiwisolver/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/kiwisolver/distros/gentoo.txt
+
+diff --git a/build/pkgs/kiwisolver/distros/gentoo.txt b/build/pkgs/kiwisolver/distros/gentoo.txt
+new file mode 100644
+index 00000000..7b30c95
+--- /dev/null
++++ b/build/pkgs/kiwisolver/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/kiwisolver
+-- 
+cgit v1.0-1-gd88e
+
+
+From 72b7907ef7ea9fa4ff6948ea34cfe2f693ee6c31 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:59:09 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for kiwisolver.
+
+---
+ build/pkgs/kiwisolver/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/kiwisolver/spkg-configure.m4
+
+diff --git a/build/pkgs/kiwisolver/spkg-configure.m4 b/build/pkgs/kiwisolver/spkg-configure.m4
+new file mode 100644
+index 00000000..4e7ac97
+--- /dev/null
++++ b/build/pkgs/kiwisolver/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([kiwisolver], [SAGE_PYTHON_PACKAGE_CHECK([kiwisolver])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 479351279e4e0ea7e2d146434f0daba038765cfd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:00:04 -0500
+Subject: Trac #29665: add Gentoo package information for notebook.
+
+---
+ build/pkgs/notebook/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/notebook/distros/gentoo.txt
+
+diff --git a/build/pkgs/notebook/distros/gentoo.txt b/build/pkgs/notebook/distros/gentoo.txt
+new file mode 100644
+index 00000000..6475d72
+--- /dev/null
++++ b/build/pkgs/notebook/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/notebook
+-- 
+cgit v1.0-1-gd88e
+
+
+From f4d9242ea654977f8ad7865c82eec593e11a36bc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:01:42 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for notebook.
+
+---
+ build/pkgs/notebook/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/notebook/spkg-configure.m4
+
+diff --git a/build/pkgs/notebook/spkg-configure.m4 b/build/pkgs/notebook/spkg-configure.m4
+new file mode 100644
+index 00000000..a17ba95
+--- /dev/null
++++ b/build/pkgs/notebook/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([notebook], [SAGE_PYTHON_PACKAGE_CHECK([notebook])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9837070c7f8e9a71283b84d49d4fd2c94b78a464 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:02:38 -0500
+Subject: Trac #29665: add Gentoo package information for matplotlib_inline.
+
+---
+ build/pkgs/matplotlib_inline/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/matplotlib_inline/distros/gentoo.txt
+
+diff --git a/build/pkgs/matplotlib_inline/distros/gentoo.txt b/build/pkgs/matplotlib_inline/distros/gentoo.txt
+new file mode 100644
+index 00000000..6a5859c
+--- /dev/null
++++ b/build/pkgs/matplotlib_inline/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/matplotlib-inline
+-- 
+cgit v1.0-1-gd88e
+
+
+From 750be73b25b92b4875e47d044360ac0e1116ec3e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:03:28 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for matplotlib_inline.
+
+---
+ build/pkgs/matplotlib_inline/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/matplotlib_inline/spkg-configure.m4
+
+diff --git a/build/pkgs/matplotlib_inline/spkg-configure.m4 b/build/pkgs/matplotlib_inline/spkg-configure.m4
+new file mode 100644
+index 00000000..e59658f
+--- /dev/null
++++ b/build/pkgs/matplotlib_inline/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([matplotlib_inline], [
++  SAGE_PYTHON_PACKAGE_CHECK([matplotlib_inline])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 273505f49698dcd2ab30c2756b07113c9b7e7791 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:04:10 -0500
+Subject: Trac #29665: add Gentoo package information for ipykernel.
+
+---
+ build/pkgs/ipykernel/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipykernel/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipykernel/distros/gentoo.txt b/build/pkgs/ipykernel/distros/gentoo.txt
+new file mode 100644
+index 00000000..88aab61
+--- /dev/null
++++ b/build/pkgs/ipykernel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipykernel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 629ad36c9e4ae0cdff4a013289b4f2911442445e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:04:46 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for ipykernel.
+
+---
+ build/pkgs/ipykernel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipykernel/spkg-configure.m4
+
+diff --git a/build/pkgs/ipykernel/spkg-configure.m4 b/build/pkgs/ipykernel/spkg-configure.m4
+new file mode 100644
+index 00000000..94ecc2d
+--- /dev/null
++++ b/build/pkgs/ipykernel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipykernel], [SAGE_PYTHON_PACKAGE_CHECK([ipykernel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b8d709edb6a24fd5868ee2818b56e78257b2eafa Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:05:26 -0500
+Subject: Trac #29665: add Gentoo package information for prompt_toolkit.
+
+---
+ build/pkgs/prompt_toolkit/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/prompt_toolkit/distros/gentoo.txt
+
+diff --git a/build/pkgs/prompt_toolkit/distros/gentoo.txt b/build/pkgs/prompt_toolkit/distros/gentoo.txt
+new file mode 100644
+index 00000000..6902484
+--- /dev/null
++++ b/build/pkgs/prompt_toolkit/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/prompt_toolkit
+-- 
+cgit v1.0-1-gd88e
+
+
+From 16c0b5e767ae4dac4440510b7253e5c8642b7d2c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:10:39 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for prompt_toolkit.
+
+---
+ build/pkgs/prompt_toolkit/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/prompt_toolkit/spkg-configure.m4
+
+diff --git a/build/pkgs/prompt_toolkit/spkg-configure.m4 b/build/pkgs/prompt_toolkit/spkg-configure.m4
+new file mode 100644
+index 00000000..fd8c1a6
+--- /dev/null
++++ b/build/pkgs/prompt_toolkit/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([prompt_toolkit], [
++  SAGE_PYTHON_PACKAGE_CHECK([prompt_toolkit])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0cd9283e8bb6c8ae413fc8f715c021f7ec3ca2c8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:12:10 -0500
+Subject: Trac #29665: add Gentoo package information for charset_normalizer.
+
+---
+ build/pkgs/charset_normalizer/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/charset_normalizer/distros/gentoo.txt
+
+diff --git a/build/pkgs/charset_normalizer/distros/gentoo.txt b/build/pkgs/charset_normalizer/distros/gentoo.txt
+new file mode 100644
+index 00000000..eefeb89
+--- /dev/null
++++ b/build/pkgs/charset_normalizer/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/charset_normalizer
+-- 
+cgit v1.0-1-gd88e
+
+
+From a04b01a9ab59097d189edcc5ddcb461faede83b2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:12:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ charset_normalizer.
+
+---
+ build/pkgs/charset_normalizer/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/charset_normalizer/spkg-configure.m4
+
+diff --git a/build/pkgs/charset_normalizer/spkg-configure.m4 b/build/pkgs/charset_normalizer/spkg-configure.m4
+new file mode 100644
+index 00000000..18b18cf
+--- /dev/null
++++ b/build/pkgs/charset_normalizer/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([charset_normalizer], [
++  SAGE_PYTHON_PACKAGE_CHECK([charset_normalizer])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d2ea08138711c53046f977b586f33b09b176b2e3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:13:37 -0500
+Subject: Trac #29665: add Gentoo package information for prometheus_client.
+
+---
+ build/pkgs/prometheus_client/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/prometheus_client/distros/gentoo.txt
+
+diff --git a/build/pkgs/prometheus_client/distros/gentoo.txt b/build/pkgs/prometheus_client/distros/gentoo.txt
+new file mode 100644
+index 00000000..aa2889c
+--- /dev/null
++++ b/build/pkgs/prometheus_client/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/prometheus_client
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b0393200e9edd3e26b8a55ba67e5710e7403fcb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:15:09 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for prometheus_client.
+
+---
+ build/pkgs/prometheus_client/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/prometheus_client/spkg-configure.m4
+
+diff --git a/build/pkgs/prometheus_client/spkg-configure.m4 b/build/pkgs/prometheus_client/spkg-configure.m4
+new file mode 100644
+index 00000000..b494588
+--- /dev/null
++++ b/build/pkgs/prometheus_client/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([prometheus_client], [
++  SAGE_PYTHON_PACKAGE_CHECK([prometheus_client])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From cdcd85284f43ca4ad18353ec3527b2901e57b788 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:17:23 -0500
+Subject: Trac #29665: add Gentoo package information for pybind11.
+
+---
+ build/pkgs/pybind11/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pybind11/distros/gentoo.txt
+
+diff --git a/build/pkgs/pybind11/distros/gentoo.txt b/build/pkgs/pybind11/distros/gentoo.txt
+new file mode 100644
+index 00000000..0c500b3
+--- /dev/null
++++ b/build/pkgs/pybind11/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pybind11
+-- 
+cgit v1.0-1-gd88e
+
+
+From efdd1eb64c4799fe3cdf2221824182941b3fda2d Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:17:51 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pybind11.
+
+---
+ build/pkgs/pybind11/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pybind11/spkg-configure.m4
+
+diff --git a/build/pkgs/pybind11/spkg-configure.m4 b/build/pkgs/pybind11/spkg-configure.m4
+new file mode 100644
+index 00000000..cce1cf5
+--- /dev/null
++++ b/build/pkgs/pybind11/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pybind11], [SAGE_PYTHON_PACKAGE_CHECK([pybind11])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b2128f33b68ea33927284116ea598dd186902400 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:19:23 -0500
+Subject: Trac #29665: add Gentoo package information for pkgconfig.
+
+---
+ build/pkgs/pkgconfig/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pkgconfig/distros/gentoo.txt
+
+diff --git a/build/pkgs/pkgconfig/distros/gentoo.txt b/build/pkgs/pkgconfig/distros/gentoo.txt
+new file mode 100644
+index 00000000..32e8618
+--- /dev/null
++++ b/build/pkgs/pkgconfig/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pkgconfig
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b373b49e06aadeb36dc57e500da9a322460e658 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:19:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pkgconfig.
+
+---
+ build/pkgs/pkgconfig/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pkgconfig/spkg-configure.m4
+
+diff --git a/build/pkgs/pkgconfig/spkg-configure.m4 b/build/pkgs/pkgconfig/spkg-configure.m4
+new file mode 100644
+index 00000000..6708293
+--- /dev/null
++++ b/build/pkgs/pkgconfig/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pkgconfig], [SAGE_PYTHON_PACKAGE_CHECK([pkgconfig])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ce578729eb0d14baab365351ba9a9ffffb7b79f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:21:10 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_serializinghtml.
+
+---
+ build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt b/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+new file mode 100644
+index 00000000..38bca8f
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-serializinghtml
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb0f42c32bbce0e4488678312f5e2d88c6f42c9b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:21:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_serializinghtml.
+
+---
+ build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4 b/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+new file mode 100644
+index 00000000..be8e625
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_serializinghtml], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_serializinghtml])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e47dcf985e40475de85c9436a85537751318bc3d Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:22:54 -0500
+Subject: Trac #29665: add Gentoo package information for sphinxcontrib_jsmath.
+
+---
+ build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt b/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+new file mode 100644
+index 00000000..041a471
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-jsmath
+-- 
+cgit v1.0-1-gd88e
+
+
+From 72cff6fd35f93de4fa855bc870569dd733ff5c24 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:23:49 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_jsmath.
+
+---
+ build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4 b/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+new file mode 100644
+index 00000000..e46bde2
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_jsmath], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_jsmath])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a36395d70f759449cd63c1b0990fbdcb4cb25ca0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:24:26 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_devhelp.
+
+---
+ build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..9b5c899
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-devhelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9953a5dd1646ed0ad51d2e3935cf609bc9e7fd1c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:25:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_devhelp.
+
+---
+ build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+new file mode 100644
+index 00000000..8728136
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_devhelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_devhelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b199d5363aad93f3cb23f7904c9553a28b06348f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:25:53 -0500
+Subject: Trac #29665: add Gentoo package information for sphinxcontrib_qthelp.
+
+---
+ build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..7210099
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-qthelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 94ac8806739f3938e73f5857328e91e0d42e98d2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:26:28 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_qthelp.
+
+---
+ build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+new file mode 100644
+index 00000000..81ea5e1
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_qthelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_qthelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From beedc154aa405e8a58aee8889f510db07adc89a7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:26:54 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_applehelp.
+
+---
+ build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..66ac8da
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-applehelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 07d47c3673d6b35423b71f621cb400989c0101c2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:27:19 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_applehelp.
+
+---
+ build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+new file mode 100644
+index 00000000..e834aed
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_applehelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_applehelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 333a66546c5d421735c49dbafd7370a827f22781 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:27:46 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_htmlhelp.
+
+---
+ build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..e080bac
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-htmlhelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From bfaeb3962254439b63f1f2e0e883de462c7831be Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:29:18 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_htmlhelp.
+
+---
+ build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+new file mode 100644
+index 00000000..c77b003
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_htmlhelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_htmlhelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 782cde13da06e8b85806cb7cbc8aceee0364e639 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:30:23 -0500
+Subject: Trac #29665: add Gentoo package information for jupyterlab_pygments.
+
+---
+ build/pkgs/jupyterlab_pygments/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyterlab_pygments/distros/gentoo.txt b/build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+new file mode 100644
+index 00000000..c57b4f1
+--- /dev/null
++++ b/build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyterlab_pygments
+-- 
+cgit v1.0-1-gd88e
+
+
+From 39f974cfa4a8c6e5dd897f152f83ec82f40ee9f7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:31:13 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ jupyterlab_pygments.
+
+---
+ build/pkgs/jupyterlab_pygments/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyterlab_pygments/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyterlab_pygments/spkg-configure.m4 b/build/pkgs/jupyterlab_pygments/spkg-configure.m4
+new file mode 100644
+index 00000000..e46e21f
+--- /dev/null
++++ b/build/pkgs/jupyterlab_pygments/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyterlab_pygments], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyterlab_pygments])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From db704620700fd36cec3bf6125938f3ee00a9eb5e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:29:15 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for ply.
+
+---
+ build/pkgs/ply/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ply/spkg-configure.m4
+
+diff --git a/build/pkgs/ply/spkg-configure.m4 b/build/pkgs/ply/spkg-configure.m4
+new file mode 100644
+index 00000000..ffb0030
+--- /dev/null
++++ b/build/pkgs/ply/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ply], [SAGE_PYTHON_PACKAGE_CHECK([ply])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6aac31dabcdfdef228d7780398a3fda1a4cc566f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:29:51 -0500
+Subject: Trac #29665: add Gentoo package information for ply.
+
+---
+ build/pkgs/ply/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ply/distros/gentoo.txt
+
+diff --git a/build/pkgs/ply/distros/gentoo.txt b/build/pkgs/ply/distros/gentoo.txt
+new file mode 100644
+index 00000000..c8b1630
+--- /dev/null
++++ b/build/pkgs/ply/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ply
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb8d3372936ec37470d69687a0f91592129460ae Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:30:33 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for gast.
+
+---
+ build/pkgs/gast/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/gast/spkg-configure.m4
+
+diff --git a/build/pkgs/gast/spkg-configure.m4 b/build/pkgs/gast/spkg-configure.m4
+new file mode 100644
+index 00000000..26ec59f
+--- /dev/null
++++ b/build/pkgs/gast/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([gast], [SAGE_PYTHON_PACKAGE_CHECK([gast])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1cdc4046a88f1c2b4e5c162f66c6db6090b24194 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:31:15 -0500
+Subject: Trac #29665: add Gentoo package information for gast.
+
+---
+ build/pkgs/gast/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/gast/distros/gentoo.txt
+
+diff --git a/build/pkgs/gast/distros/gentoo.txt b/build/pkgs/gast/distros/gentoo.txt
+new file mode 100644
+index 00000000..3be5e7e
+--- /dev/null
++++ b/build/pkgs/gast/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/gast
+-- 
+cgit v1.0-1-gd88e
+
+
+From 96068b8a3742b65d619190e1d9fa5db399e6b4f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:32:20 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pythran.
+
+---
+ build/pkgs/pythran/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pythran/spkg-configure.m4
+
+diff --git a/build/pkgs/pythran/spkg-configure.m4 b/build/pkgs/pythran/spkg-configure.m4
+new file mode 100644
+index 00000000..592e95b
+--- /dev/null
++++ b/build/pkgs/pythran/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pythran], [SAGE_PYTHON_PACKAGE_CHECK([pythran])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1fa0fad3ae8f7e559c6fc315c6773a7d8aac0bfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:32:55 -0500
+Subject: Trac #29665: add Gentoo package information for pythran.
+
+---
+ build/pkgs/pythran/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pythran/distros/gentoo.txt
+
+diff --git a/build/pkgs/pythran/distros/gentoo.txt b/build/pkgs/pythran/distros/gentoo.txt
+new file mode 100644
+index 00000000..1bb7cdc
+--- /dev/null
++++ b/build/pkgs/pythran/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pythran
+-- 
+cgit v1.0-1-gd88e
+
+
+From d26370e5b8c88e76abfb7c27e3defb71c9e9f711 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:33:50 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for beniget.
+
+---
+ build/pkgs/beniget/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/beniget/spkg-configure.m4
+
+diff --git a/build/pkgs/beniget/spkg-configure.m4 b/build/pkgs/beniget/spkg-configure.m4
+new file mode 100644
+index 00000000..8ae6101
+--- /dev/null
++++ b/build/pkgs/beniget/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([beniget], [SAGE_PYTHON_PACKAGE_CHECK([beniget])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From eeeb296ed9b9694a865534103fd58e62a151ef5e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:34:22 -0500
+Subject: Trac #29665: add Gentoo package information for beniget.
+
+---
+ build/pkgs/beniget/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/beniget/distros/gentoo.txt
+
+diff --git a/build/pkgs/beniget/distros/gentoo.txt b/build/pkgs/beniget/distros/gentoo.txt
+new file mode 100644
+index 00000000..1a5972c
+--- /dev/null
++++ b/build/pkgs/beniget/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/beniget
+-- 
+cgit v1.0-1-gd88e
+
+
+From 078b2ff272d0eeff5cce40ad7eb176d9ddd7bdff Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:35:37 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for alabaster.
+
+---
+ build/pkgs/alabaster/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/alabaster/spkg-configure.m4
+
+diff --git a/build/pkgs/alabaster/spkg-configure.m4 b/build/pkgs/alabaster/spkg-configure.m4
+new file mode 100644
+index 00000000..4eca6e0
+--- /dev/null
++++ b/build/pkgs/alabaster/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([alabaster], [SAGE_PYTHON_PACKAGE_CHECK([alabaster])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7dc264353e5f64110431ff28c1b8b7e89699e9bd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:36:06 -0500
+Subject: Trac #29665: add Gentoo package information for alabaster.
+
+---
+ build/pkgs/alabaster/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/alabaster/distros/gentoo.txt
+
+diff --git a/build/pkgs/alabaster/distros/gentoo.txt b/build/pkgs/alabaster/distros/gentoo.txt
+new file mode 100644
+index 00000000..cffece6
+--- /dev/null
++++ b/build/pkgs/alabaster/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/alabaster
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8011a5e675e7e61a77ce34a299ee961a9f44253f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:43:59 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ importlib_metadata.
+
+---
+ build/pkgs/importlib_metadata/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/importlib_metadata/spkg-configure.m4
+
+diff --git a/build/pkgs/importlib_metadata/spkg-configure.m4 b/build/pkgs/importlib_metadata/spkg-configure.m4
+new file mode 100644
+index 00000000..0554e52
+--- /dev/null
++++ b/build/pkgs/importlib_metadata/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([importlib_metadata], [
++  SAGE_PYTHON_PACKAGE_CHECK([importlib_metadata])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 928ca0019e3ec6c4541a16b28bcc6710df6d010b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:44:28 -0500
+Subject: Trac #29665: add Gentoo package information for importlib_metadata.
+
+---
+ build/pkgs/importlib_metadata/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/importlib_metadata/distros/gentoo.txt
+
+diff --git a/build/pkgs/importlib_metadata/distros/gentoo.txt b/build/pkgs/importlib_metadata/distros/gentoo.txt
+new file mode 100644
+index 00000000..4f92786
+--- /dev/null
++++ b/build/pkgs/importlib_metadata/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/importlib_metadata
+-- 
+cgit v1.0-1-gd88e
+
+
+From 135f184f7498a2046065e669723e68efe2d65cee Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 21:16:58 -0500
+Subject: Trac #29665: fix sage.misc.package doctest with system alabaster.
+
+When alabaster from the system is used, these tests won't be able to
+find its SPKG installed. Add some ellipses, and switch one test to
+look for sage_conf instead.
+---
+ src/sage/misc/package.py | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/sage/misc/package.py b/src/sage/misc/package.py
+index 84f3d50..c7ad206 100644
+--- a/src/sage/misc/package.py
++++ b/src/sage/misc/package.py
+@@ -386,9 +386,9 @@ def installed_packages(exclude_pip=True):
+     EXAMPLES::
+ 
+         sage: sorted(installed_packages().keys())  # optional - build
+-        [...'alabaster', ...'sage_conf', ...]
+-        sage: installed_packages()['alabaster']  # optional - build, random
+-        '0.7.12'
++        [...'sage_conf', ...]
++        sage: installed_packages()['sage_conf']  # optional - build, random
++        '9.5'
+ 
+     .. SEEALSO::
+ 
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch b/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
new file mode 100644
index 000000000000..7ef3826aa4d2
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
@@ -0,0 +1,27 @@
+diff --git a/src/bin/sage-runtests b/src/bin/sage-runtests
+index 589dc8cd37..6bb8bf99a4 100755
+--- a/src/bin/sage-runtests
++++ b/src/bin/sage-runtests
+@@ -154,21 +154,4 @@ if __name__ == "__main__":
+     DC = DocTestController(args, args.filenames)
+     err = DC.run()
+ 
+-    try:
+-        exit_code_pytest = 0
+-        import pytest
+-        pytest_options = ["--import-mode", "importlib"]
+-        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.")
+-
+-    if err == 0:
+-        sys.exit(exit_code_pytest)
+-    else:
+-        sys.exit(err)
++    sys.exit(err)
diff --git a/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch b/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
new file mode 100644
index 000000000000..093e3d56eb33
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
@@ -0,0 +1,42 @@
+More site packages not included in trac 29665
+
+diff --git a/build/pkgs/gmpy2/spkg-configure.m4 b/build/pkgs/gmpy2/spkg-configure.m4
+new file mode 100644
+index 0000000000..2d0390f7db
+--- /dev/null
++++ b/build/pkgs/gmpy2/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([gmpy2], [SAGE_PYTHON_PACKAGE_CHECK([gmpy2])])
+diff --git a/build/pkgs/sphinx/spkg-configure.m4 b/build/pkgs/sphinx/spkg-configure.m4
+new file mode 100644
+index 0000000000..e149fbb2cf
+--- /dev/null
++++ b/build/pkgs/sphinx/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([sphinx], [SAGE_PYTHON_PACKAGE_CHECK([sphinx])])
+diff --git a/build/pkgs/typing_extensions/spkg-configure.m4 b/build/pkgs/typing_extensions/spkg-configure.m4
+new file mode 100644
+index 0000000000..d475fd8257
+--- /dev/null
++++ b/build/pkgs/typing_extensions/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([typing_extensions], [SAGE_PYTHON_PACKAGE_CHECK([typing_extensions])])
+-- 
+diff --git a/build/pkgs/gmpy2/install-requires.txt b/build/pkgs/gmpy2/install-requires.txt
+index 51d24518ef..c25feff557 100644
+--- a/build/pkgs/gmpy2/install-requires.txt
++++ b/build/pkgs/gmpy2/install-requires.txt
+@@ -1,3 +1 @@
+-# We would like to write gmpy2 >=2.1.0b5, but pipenv does not accept prereleases in version ranges
+-# https://github.com/pypa/pipenv/issues/1760
+-gmpy2 ==2.1.0rc1
++gmpy2 >=2.1
+diff --git a/build/pkgs/ptyprocess/install-requires.txt b/build/pkgs/ptyprocess/install-requires.txt
+index de89260872..7c336f636c 100644
+--- a/build/pkgs/ptyprocess/install-requires.txt
++++ b/build/pkgs/ptyprocess/install-requires.txt
+@@ -1,3 +1,3 @@
+-ptyprocess ==0.5.1
++ptyprocess
+ # https://trac.sagemath.org/ticket/31280#comment:42 and following
+ # sagelib is not compatible with ptyprocess 0.5.2, 0.6, and 0.7
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 33b40acbabeb..a32c5d18f378 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -22,11 +22,13 @@ distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
 checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
 python_version=3
 
-build_options="debug system_python3"
+build_options="debug system_python3 system_site_packages"
 desc_option_debug="Build with debug symbols"
 desc_option_system_python="Build using system python 3"
-build_options_default="system_python3"
+desc_option_system_python="Build using system python site-packages"
+build_options_default="system_python3 system_site_packages"
 configure_args+=" $(vopt_with system_python3)"
+configure_args+=" $(vopt_enable system_site_packages)"
 
 # path where sage will be installed
 _SAGE_ROOT=/usr/lib/sage-${version}
@@ -163,6 +165,8 @@ do_check() {
 	fi
 	if [ "$XBPS_CHECK_PKGS" = full ]; then
 		_test_args="--long $_test_args"
+	else
+		_test_args="--warn-long 5.0 $_test_args"
 	fi
 	# since make check will build the docs, run test like this instead
 	./sage -tp ${XBPS_MAKEJOBS} ${_test_args}
@@ -182,7 +186,7 @@ makedepends+=" automake gettext gettext-devel"
 # other host dependencies
 makedepends+=" cmake curl git ninja pandoc patch pkg-config python3 tox"
 
-# already in void
+# standard dependencies
 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
@@ -202,7 +206,49 @@ makedepends+="
  brial-devel cliquer-devel gfan libbraiding-devel libhomfly-devel
  lrcalc-devel nauty-devel palp tachyon
  maxima-ecl primesieve-devel primecount-devel
+ ffmpeg ImageMagick
 "
 
 # TODO: optional
 # 4ti2 coxeter3 libsemigroups lrslib pdf2svg perl_mongodb polymake
+
+# TODO: standard
+# cvxopt importlib_resources
+
+# python packages for trac-29665
+_sage_python3_modules="
+ python3-Babel python3-Jinja2 python3-MarkupSafe python3-Pillow
+ python3-Pygments python3-Sphinx python3-alabaster python3-argcomplete
+ python3-argon2 python3-attrs python3-backcall python3-beniget
+ python3-bleach python3-certifi python3-cffi python3-charset-normalizer
+ python3-cycler python3-dateutil python3-decorator python3-defusedxml
+ python3-docutils python3-entrypoints python3-flit_core python3-gast
+ python3-gmpy2 python3-html5lib python3-idna python3-imagesize
+ python3-importlib_metadata python3-ipython python3-ipython_genutils
+ python3-ipython_ipykernel python3-jedi python3-jsonschema
+ python3-jupyter_client python3-jupyter_core python3-jupyter_ipywidgets
+ python3-jupyter_nbconvert python3-jupyter_nbformat
+ python3-jupyter_notebook python3-jupyterlab_pygments python3-kiwisolver
+ python3-matplotlib python3-matplotlib-inline python3-mistune
+ python3-mpmath python3-nbclient python3-nest_asyncio python3-networkx
+ python3-numpy python3-packaging python3-pandocfilters python3-parsing
+ python3-parso python3-pexpect python3-pickleshare python3-pip
+ python3-pkgconfig python3-pluggy python3-ply python3-prometheus_client
+ python3-prompt_toolkit python3-ptyprocess python3-py python3-pybind11
+ python3-pycparser python3-pyrsistent python3-pytz python3-pyzmq
+ python3-requests python3-scipy python3-send2trash python3-setuptools
+ python3-setuptools_scm python3-simplegeneric python3-six
+ python3-snowballstemmer python3-sphinxcontrib-applehelp
+ python3-sphinxcontrib-devhelp python3-sphinxcontrib-htmlhelp
+ python3-sphinxcontrib-jsmath python3-sphinxcontrib-qthelp
+ python3-sphinxcontrib-serializinghtml python3-sympy python3-terminado
+ python3-testpath python3-texttable python3-toml python3-tomli
+ python3-tornado python3-traitlets python3-typing_extensions
+ python3-tzlocal python3-urllib3 python3-wcwidth python3-webencodings
+ python3-wheel python3-zipp pythran
+ "
+
+if [ "$build_option_system_site_packages" ]; then
+	makedepends+=" $_sage_python3_modules"
+	depends+=" $_sage_python3_modules"
+fi

From aa3afbb7ecace93778636b5637fbd7cb5c3be805 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 3 Jan 2022 20:47:52 -0300
Subject: [PATCH 24/34] sagemath: use small source tarball + upstream packages

---
 srcpkgs/sagemath/template | 97 ++++++++++++++++++++++++++-------------
 1 file changed, 64 insertions(+), 33 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index a32c5d18f378..0de0061b09df 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -18,8 +18,8 @@ short_desc="Open source mathematics software"
 maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
-distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
-checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
+distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
+checksum=aea4c5a8d3b32af2fba644269b9daf4f62471471ba2d7d83da0f8098a5f53225
 python_version=3
 
 build_options="debug system_python3 system_site_packages"
@@ -33,42 +33,72 @@ configure_args+=" $(vopt_enable system_site_packages)"
 # 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} ;;
-esac
+_SAGE_UPSTREAM_MIRROR=https://mirrors.mit.edu/sage/spkg/upstream
 
-# extra upstream packages (trac-32968 / trac-33040)
 _upstream="
- https://pypi.io/packages/source/s/sphinx/Sphinx-4.3.1.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
+${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
+${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
+${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
+${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
+${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
+${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
+${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
+https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
+https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
+http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
+${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
+${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
+${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
+${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
+${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
+https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
+${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
+https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
+${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
 "
 
 checksum+="
- 32a5b3e9a1b176cc25ed048557d4d3d01af635e6b76c5bc7a43b0a34447fbd45
-
- 9c87405839a19696e837b3b818fed3f5f69f16f1eec1a1ad77e043dcea9c772f
- fc4453705b81d03568d5b808ad8f09c77c47534f6ac2e72e733f9ca4714aa75c
- acad2d8b20a1af07d4e4c9d2e9285c5ed9104354062f275f3fcd88dcef4f1326
- 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
- 78884e7c1d4b00ce3cea67b44566851c4343c120abd683433ce934a68ea58872
- 0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86
- b8e2f83c56e141920c39464b852de3719dfbfb6e3c99a2d8da0edf4fb33176ed
- d9bdec0013ef1eb5a84ab39a3b3868911598afa494f5faa038647101504e2b81
- b2e9810e09c3a47b73ce9cab5a72243a1258f61e7900969097a817232246ce1c
- 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
- 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
+c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
+d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
+4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
+3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
+03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
+5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
+cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
+5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
+581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
+6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
+07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
+a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
+ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
+d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
+169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
+5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
+cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
+471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
+78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
+edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
+b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
+3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
+545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
+cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
+718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
+dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
 "
 
 for u in ${_upstream}; do
@@ -101,6 +131,7 @@ post_extract() {
 	mv -T $wrksrc $_SAGE_ROOT
 	ln -srfT $_SAGE_ROOT $wrksrc
 
+	mkdir -p $wrksrc/upstream
 	for u in ${_upstream}; do
 		cp "$XBPS_SRCDISTDIR/${pkgname}-${version}/${u##*[/>]}" $wrksrc/upstream
 	done

From 7bcc0dee22bd31d332aae4c6fd813fe0baaa7351 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 13:38:02 -0300
Subject: [PATCH 25/34] sagemath: for CI use fixed random-seed=0

---
 srcpkgs/sagemath/template | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 0de0061b09df..b5b99d2c122d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -194,6 +194,10 @@ do_check() {
 	if [ -z "$_test_args" ]; then
 		_test_args=--all
 	fi
+	if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
+		# for CI use a predictable random seed
+		_test_args="--random-seed=0 $_test_args"
+	fi
 	if [ "$XBPS_CHECK_PKGS" = full ]; then
 		_test_args="--long $_test_args"
 	else

From 4717bec814c489ec1c073c6c062e064bdebc215f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 14:40:27 -0300
Subject: [PATCH 26/34] sagemath: upstream two patches

---
 ...ble-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch} |  6 +++---
 ...rse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch} | 10 +++++-----
 2 files changed, 8 insertions(+), 8 deletions(-)
 rename srcpkgs/sagemath/patches/{0001-sage-site-exec-only-if-it-is-executable.patch => trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch} (94%)
 rename srcpkgs/sagemath/patches/{0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch => trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch} (81%)

diff --git a/srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch b/srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
similarity index 94%
rename from srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch
rename to srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
index ce17c6d6e954..7fdb3d697222 100644
--- a/srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch
+++ b/srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
@@ -1,14 +1,14 @@
 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
+Subject: 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
+index 4c0fa17..153e610 100755
 --- a/src/bin/sage
 +++ b/src/bin/sage
 @@ -129,7 +129,7 @@ usage() {
@@ -39,5 +39,5 @@ index 4c0fa17426..153e610a2e 100755
              # fallthrough if there is no sage-site script
          fi
 -- 
-2.34.1
+cgit v1.0-1-gd88e
 
diff --git a/srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch b/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
similarity index 81%
rename from srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch
rename to srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
index bab6d8441d42..350c41ac3928 100644
--- a/srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch
+++ b/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
@@ -1,16 +1,16 @@
-From 57e3eba28c9b4ee6bd3407d0715b8bd00aaf04a7 Mon Sep 17 00:00:00 2001
+From 53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6 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
+Subject: sagetex: Fix a warning when byte-compiling sagetexparse.py
 
 ---
- .../sagetex/patches/sagetex-fix-warning.patch    | 16 ++++++++++++++++
+ build/pkgs/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
+index 00000000..d82ab67
 --- /dev/null
 +++ b/build/pkgs/sagetex/patches/sagetex-fix-warning.patch
 @@ -0,0 +1,16 @@
@@ -31,5 +31,5 @@ index 0000000000..d82ab675dd
 +     self.result += t.code[1:-1] + '\n\n'
 + 
 -- 
-2.34.1
+cgit v1.0-1-gd88e
 

From b7ed046847fb01165bb469a7d5f1d6600a4e12c2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 19:57:59 -0300
Subject: [PATCH 27/34] sagemath: reorder upstream sources and add two missing
 ones

---
 srcpkgs/sagemath/template | 60 ++++++++++++++++++++++-----------------
 1 file changed, 34 insertions(+), 26 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index b5b99d2c122d..f53cba947c88 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -36,69 +36,77 @@ _SAGE_ROOT=/usr/lib/sage-${version}
 _SAGE_UPSTREAM_MIRROR=https://mirrors.mit.edu/sage/spkg/upstream
 
 _upstream="
-${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
 ${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
 ${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
+
+${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
 ${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
 ${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
 ${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
 ${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
 ${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
 ${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
-https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
-https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
-http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
 ${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
 ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
 ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
 ${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
 ${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${PYPI_SITE}/P/PyCygwin/PyCygwin-0.1.tar.gz
 ${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
-https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+${PYPI_SITE}/s/setuptools/setuptools-59.2.0.tar.gz
 ${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
 ${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
-https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
 ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
+
+https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
+https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
+http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
+https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
 "
 
 checksum+="
-dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
 c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
 d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
+5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
+ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
+169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
+cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
+edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
+cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
+
+dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
 3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
 03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
 5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
 cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
-5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
-c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
-6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
-07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
 a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
-ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
 d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
-169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
 5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
-cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
 471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
 78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
-edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+45a5e295590c469a49b2804bfdb89059e942d768ad3b813f484d7b5bff48d226
 ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
-b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
-3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+157d21de9d055ab9e8ea3186d91e7f4f865e11f42deafa952d90842671fc2576
 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
 545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
-cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
-718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
 dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
+
+c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
+6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
+07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
+3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
 "
 
 for u in ${_upstream}; do

From 3a6e96918c218bae4e20f95552725b67a51d7238 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 9 Jan 2022 12:45:47 -0300
Subject: [PATCH 28/34] sagemath: do not download anything patch

---
 .../patches/00-Do_not_download_anything.patch         | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 srcpkgs/sagemath/patches/00-Do_not_download_anything.patch

diff --git a/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch b/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch
new file mode 100644
index 000000000000..35aef7b8d456
--- /dev/null
+++ b/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch
@@ -0,0 +1,11 @@
+--- a/build/sage_bootstrap/tarball.py	2022-01-07 19:17:06.754747955 -0300
++++ b/build/sage_bootstrap/tarball.py	2022-01-07 19:25:31.844139381 -0300
+@@ -158,6 +158,8 @@
+                             .format(destination=destination))
+         successful_download = False
+         log.info('Attempting to download package {0} from mirrors'.format(self.filename))
++        log.info('ERROR: downloading is disabled, add file to template instead')
++        return
+         for mirror in MirrorList():
+             url = mirror + '/'.join(['spkg', 'upstream', self.package.name, self.filename])
+             log.info(url)

From ed312895455ff690b2e8736085f72d9480504d3d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 9 Jan 2022 13:27:49 -0300
Subject: [PATCH 29/34] sagemath: update to 9.5.rc0.

---
 ...184f7498a2046065e669723e68efe2d65cee.patch |    6 +-
 ...1d4ced4264f65ab704f725f6f5879b012796.patch |  263 ----
 ...a54526829b79d5d236a40f83ddc6ce7b2696.patch | 1196 -----------------
 ...9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch |   27 -
 ...3f4f32246ad9ded6d37f1f2f12a589a81f4.patch} |    4 +-
 ...03138d0403be7c7cb303de2bc0a0e0b6793c.patch |   82 --
 ...f3a1611fed0cc66fb838eb85739646dd34d.patch} |   94 +-
 ...49c415e11d0522bff9013bc1509264b26ebf.patch |   27 +
 ...ip_doctest_singular_4.2.1--see_33134.patch |   13 +
 srcpkgs/sagemath/template                     |    6 +-
 10 files changed, 72 insertions(+), 1646 deletions(-)
 delete mode 100644 srcpkgs/sagemath/patches/trac-30766-system_python_3.10-df9f1d4ced4264f65ab704f725f6f5879b012796.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
 rename srcpkgs/sagemath/patches/{trac-33064-sage_docbuild_ignore_cache_save_permission_error-f767cf1eadfd8ab540a31c5c5ef09d56df09b90e.patch => trac-33064-sage_docbuild_ignore_cache_save_permission_error-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch} (92%)
 delete mode 100644 srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
 rename srcpkgs/sagemath/patches/{trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch => trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch} (63%)
 create mode 100644 srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch

diff --git a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
index b641113927e7..0ecb27c593cd 100644
--- a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
+++ b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
@@ -5615,9 +5615,9 @@ index 84f3d50..c7ad206 100644
      EXAMPLES::
  
          sage: sorted(installed_packages().keys())  # optional - build
--        [...'alabaster', ...'sage_conf', ...]
--        sage: installed_packages()['alabaster']  # optional - build, random
--        '0.7.12'
+-        [...'gmpy2', ...'sage_conf', ...]
+-        sage: installed_packages()['gmpy2']  # optional - build, random
+-        '2.1.0b5'
 +        [...'sage_conf', ...]
 +        sage: installed_packages()['sage_conf']  # optional - build, random
 +        '9.5'
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
deleted file mode 100644
index a1cb4c834482..000000000000
--- a/srcpkgs/sagemath/patches/trac-30766-system_python_3.10-df9f1d4ced4264f65ab704f725f6f5879b012796.patch
+++ /dev/null
@@ -1,263 +0,0 @@
-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-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch b/srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
deleted file mode 100644
index 3ae6fe01822d..000000000000
--- a/srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
+++ /dev/null
@@ -1,1196 +0,0 @@
-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/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch b/srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
deleted file mode 100644
index 485fb0176f45..000000000000
--- a/srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-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: 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 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"
- 
- # 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)
--- 
-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-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
similarity index 92%
rename from srcpkgs/sagemath/patches/trac-33064-sage_docbuild_ignore_cache_save_permission_error-f767cf1eadfd8ab540a31c5c5ef09d56df09b90e.patch
rename to srcpkgs/sagemath/patches/trac-33064-sage_docbuild_ignore_cache_save_permission_error-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
index 20fa12e570eb..04f04cfd6718 100644
--- 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-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
@@ -1,4 +1,4 @@
-From f767cf1eadfd8ab540a31c5c5ef09d56df09b90e Mon Sep 17 00:00:00 2001
+From e89193f4f32246ad9ded6d37f1f2f12a589a81f4 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
@@ -8,7 +8,7 @@ Subject: sage_docbuild: do not fail when cache cannot be saved
  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
+index 466ca82..f8c8ebd 100644
 --- a/src/sage_docbuild/__init__.py
 +++ b/src/sage_docbuild/__init__.py
 @@ -856,9 +856,12 @@ class ReferenceSubBuilder(DocBuilder):
diff --git a/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch b/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
deleted file mode 100644
index 6bc5193b75ee..000000000000
--- a/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-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
-
-
-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/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch b/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
similarity index 63%
rename from srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch
rename to srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
index 3794aa7f019b..04fca4815a00 100644
--- a/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch
+++ b/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
@@ -1,4 +1,4 @@
-From 7d3381b21e4716cfa8a33915621a12f0eba74233 Mon Sep 17 00:00:00 2001
+From 18d0477153af6f453a0e84f78030535f6a36ce87 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
@@ -10,56 +10,56 @@ Subject: doctests: remove dochtml label from some tests that don't need docs
  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
+index c788623..527ed90 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  # optional - sagemath_doc_html
+-        sage: thematic_index = os.path.join(SAGE_DOC, "html", "en", "thematic_tutorials", "index.html")  # optional - sagemath_doc_html
 +        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
+         sage: for line in open(thematic_index).readlines():  # optional - sagemath_doc_html
          ....:     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
+index 4c56aea..583ca06 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  # optional - sagemath_doc_html
+-    sage: docfilename = os.path.join(SAGE_DOC, 'html', 'en', 'reference', 'calculus', 'sage', 'symbolic', 'expression.html')  # optional - sagemath_doc_html
 +    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
+     sage: with open(docfilename) as fobj:  # optional - sagemath_doc_html
      ....:     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='',
+@@ -845,12 +845,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  # optional - sagemath_doc_html
+-        sage: len(_search_src_or_doc('src', r'matrix\(', 'incidence_structures', 'self', 'combinat', interact=False).splitlines()) > 1  # optional - sagemath_doc_html
 +        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)
+         sage: 'abvar/homology' in _search_src_or_doc('doc', 'homology', 'variety', interact=False)  # optional - sagemath_doc_html, 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)  # optional - sagemath_doc_html
 +        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:
+@@ -1369,7 +1369,7 @@ class _sage_doc:
  
-         sage: browse_sage_doc._open("reference", testing=True)[0]  # optional - dochtml, indirect doctest
+         sage: browse_sage_doc._open("reference", testing=True)[0]  # optional - sagemath_doc_html, 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]  # optional - sagemath_doc_html
 +        sage: browse_sage_doc(identity_matrix, 'rst')[-107:-47]
          'Full MatrixSpace of 3 by 3 sparse matrices over Integer Ring'
      """
@@ -68,7 +68,7 @@ index eb70516..b4848ed 100644
 cgit v1.0-1-gd88e
 
 
-From 42a76c3f82edecc9c6c53c661251677e3e907584 Mon Sep 17 00:00:00 2001
+From 88dd9f3a1611fed0cc66fb838eb85739646dd34d 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
@@ -78,7 +78,7 @@ Subject: doctests: add dochtml label to some tests that need docs installed
  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
+index f8c8ebd..d329009 100644
 --- a/src/sage_docbuild/__init__.py
 +++ b/src/sage_docbuild/__init__.py
 @@ -105,7 +105,7 @@ def builder_helper(type):
@@ -86,7 +86,7 @@ index 4a71c91..dd233bd 100644
          sage: from sage_docbuild import _build_many as build_many
          sage: helper = builder_helper("html")
 -        sage: try:
-+        sage: try:  # optional - dochtml
++        sage: try:  # optional - sagemath_doc_html
          ....:     build_many(build_ref_doc, [("docname", "en", "html", {})])
          ....: except Exception as E:
          ....:     "Non-exception during docbuild: abort pool operation" in str(E)
@@ -95,7 +95,7 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import DocBuilder
              sage: b = DocBuilder('tutorial')
 -            sage: b._output_dir('html')
-+            sage: b._output_dir('html')         # optional - dochtml
++            sage: b._output_dir('html')         # optional - sagemath_doc_html
              '.../html/en/tutorial'
          """
          d = os.path.join(SAGE_DOC, type, self.lang, self.name)
@@ -104,7 +104,7 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import DocBuilder
              sage: b = DocBuilder('tutorial')
 -            sage: b._doctrees_dir()
-+            sage: b._doctrees_dir()             # optional - docthml
++            sage: b._doctrees_dir()             # optional - sagemath_doc_html
              '.../doctrees/en/tutorial'
          """
          d = os.path.join(SAGE_DOC, 'doctrees', self.lang, self.name)
@@ -113,7 +113,7 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import ReferenceBuilder
              sage: b = ReferenceBuilder('reference')
 -            sage: b._output_dir('html')
-+            sage: b._output_dir('html')         # optional - dochtml
++            sage: b._output_dir('html')         # optional - sagemath_doc_html
              '.../html/en/reference'
          """
          if lang is None:
@@ -122,56 +122,10 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import ReferenceTopBuilder
              sage: b = ReferenceTopBuilder('reference')
 -            sage: b._output_dir('html')
-+            sage: b._output_dir('html')         # optional - dochtml
++            sage: b._output_dir('html')         # optional - sagemath_doc_html
              '.../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/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch b/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
new file mode 100644
index 000000000000..d32f1e4d5e9f
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
@@ -0,0 +1,27 @@
+From 836249c415e11d0522bff9013bc1509264b26ebf Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Sun, 9 Jan 2022 16:51:22 -0300
+Subject: trac 33135: add filter to ignore deprecation warnings
+
+---
+ src/sage/all.py | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/sage/all.py b/src/sage/all.py
+index 01ef327..19ca3d4 100644
+--- a/src/sage/all.py
++++ b/src/sage/all.py
+@@ -96,6 +96,10 @@ warnings.filterwarnings('ignore', category=DeprecationWarning,
+ warnings.filterwarnings('ignore', category=DeprecationWarning,
+                         module='pythran')
+ 
++warnings.filterwarnings('ignore', category=DeprecationWarning,
++                        message='The distutils(.sysconfig module| package) is deprecated',
++                        module='numpy|sage.env|sage.features')
++
+ ################ end setup warnings ###############################
+ 
+ 
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
new file mode 100644
index 000000000000..438078a92036
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage/rings/polynomial/hilbert.pyx b/src/sage/rings/polynomial/hilbert.pyx
+index 4cd91d0a46..323b168c4e 100644
+--- a/src/sage/rings/polynomial/hilbert.pyx
++++ b/src/sage/rings/polynomial/hilbert.pyx
+@@ -578,7 +578,7 @@ def hilbert_poincare_series(I, grading=None):
+ 
+     This example exceeded the capabilities of Singular before version 4.2.1p2::
+ 
+-        sage: J.hilbert_numerator(algorithm='singular')
++        sage: J.hilbert_numerator(algorithm='singular')   # not tested - requires singular 4.2.1p2
+         120*t^33 - 3465*t^32 + 48180*t^31 - 429374*t^30 + 2753520*t^29 - 13522410*t^28 + 52832780*t^27 - 168384150*t^26 + 445188744*t^25 - 987193350*t^24 + 1847488500*t^23 + 1372406746*t^22 - 403422496*t^21 - 8403314*t^20 - 471656596*t^19 + 1806623746*t^18 + 752776200*t^17 + 752776200*t^16 - 1580830020*t^15 + 1673936550*t^14 - 1294246800*t^13 + 786893250*t^12 - 382391100*t^11 + 146679390*t^10 - 42299400*t^9 + 7837830*t^8 - 172260*t^7 - 468930*t^6 + 183744*t^5 - 39270*t^4 + 5060*t^3 - 330*t^2 + 1
+ 
+     """
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f53cba947c88..f688629fc26d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -1,6 +1,6 @@
 # Template file for 'sagemath'
 pkgname=sagemath
-version=9.5.beta9
+version=9.5.rc0
 revision=1
 wrksrc=sage-$version
 build_style=configure
@@ -19,7 +19,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
-checksum=aea4c5a8d3b32af2fba644269b9daf4f62471471ba2d7d83da0f8098a5f53225
+checksum=8012e3ac35290fa9b2cb837eeca149925784c2378b486731226944e4afd8a4e6
 python_version=3
 
 build_options="debug system_python3 system_site_packages"
@@ -128,7 +128,7 @@ nostrip=yes
 noshlibprovides=yes
 
 # don't rewrite python shebang as sage uses its own python (for now)
-_no_python_shebang=yes
+#_no_python_shebang=yes
 
 # compile python code in sage venv
 pycompile_dirs="$_SAGE_ROOT/venv/"

From 5b64adda9e39287a0ba7c4b8b8b04f92c5cc125c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 10 Jan 2022 16:18:04 -0300
Subject: [PATCH 30/34] New package: gap-4.11.1

---
 common/shlibs        |  1 +
 srcpkgs/gap-devel    |  1 +
 srcpkgs/gap/template | 47 ++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 49 insertions(+)
 create mode 120000 srcpkgs/gap-devel
 create mode 100644 srcpkgs/gap/template

diff --git a/common/shlibs b/common/shlibs
index ebbd48a3d84c..c4b2c348f6f3 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4021,6 +4021,7 @@ libpari-gmp.so.7 pari-2.13.0_1
 libpari-gmp-tls.so.7 pari-2.13.2_1
 libtree-sitter.so.0 tree-sitter-0.19.0_1
 libplanarity.so.0 planarity-3.0.1.1_1
+libgap.so.0 gap-4.11.1_1
 libgtkdatabox.so.1 gtkdatabox3-1.0.0_1
 libgf2x.so.3 gf2x-1.3.0_1
 libntl.so.44 ntl-11.5.1_1
diff --git a/srcpkgs/gap-devel b/srcpkgs/gap-devel
new file mode 120000
index 000000000000..e195f60d0b1a
--- /dev/null
+++ b/srcpkgs/gap-devel
@@ -0,0 +1 @@
+gap
\ No newline at end of file
diff --git a/srcpkgs/gap/template b/srcpkgs/gap/template
new file mode 100644
index 000000000000..7bc7d13ace20
--- /dev/null
+++ b/srcpkgs/gap/template
@@ -0,0 +1,47 @@
+# Template file for 'gap'
+pkgname=gap
+version=4.11.1
+revision=1
+build_style=gnu-configure
+make_install_target="install-bin install-gaproot install-headers install-libgap"
+makedepends="gmp-devel zlib-devel readline-devel"
+checkdepends="perl"
+short_desc="Groups, Algorithms, Programming - computational discrete algebra"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-2.0-or-later"
+homepage="http://www.gap-system.org/"
+distfiles="https://github.com/gap-system/gap/releases/download/v${version}/gap-${version}.tar.gz"
+checksum=6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
+
+if [ "$XBPS_CHECK_PKGS" = full ]; then
+	# not sure about this -- takes about 25 minutes
+	make_check_target=teststandard
+fi
+
+_GAPROOT=/usr/share/gap/
+
+# minimal required packages
+_GAPPKGS="GAPDoc primgrp SmallGrp transgrp"
+
+# other expected packages
+_GAPPKGS+=" atlasrep autpgrp alnuth crisp ctbllib FactInt fga irredsol laguna
+ polenta polycyclic resclasses sophus tomlib"
+
+post_install() {
+	vmkdir ${_GAPROOT}/pkg
+	for p in ${_GAPPKGS}; do
+		[ -d pkg/$p ] || p="$p-*"
+		vcopy "pkg/$p" ${_GAPROOT}/pkg
+	done
+	# not handled by make install-headers
+	vcopy gen/config.h /usr/include/gap
+}
+
+gap-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.so"
+	}
+}

From dde46ab0eb08a47850df6217de5e482c7568e954 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 10 Jan 2022 16:32:54 -0300
Subject: [PATCH 31/34] sagemath: use system gap

---
 ...f491e5ce599ba185f5e93f02e0fcebd76c9e.patch | 57 +++++++++++++++++++
 .../patches/zzz-skip_doctest_system_gap.patch | 13 +++++
 srcpkgs/sagemath/template                     | 15 ++++-
 3 files changed, 82 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch

diff --git a/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch b/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
new file mode 100644
index 000000000000..da88a369db0d
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
@@ -0,0 +1,57 @@
+From 2c981351bb60089530b0598d3e9a909a23d4d4d8 Mon Sep 17 00:00:00 2001
+From: Thierry Thomas <thierry@FreeBSD.org>
+Date: Mon, 22 Mar 2021 03:04:12 +0100
+Subject: 29644: Add spkg-configure.m4 for gap
+
+---
+ build/pkgs/gap/spkg-configure.m4 | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+ create mode 100644 build/pkgs/gap/spkg-configure.m4
+
+diff --git a/build/pkgs/gap/spkg-configure.m4 b/build/pkgs/gap/spkg-configure.m4
+new file mode 100644
+index 00000000..91cd089
+--- /dev/null
++++ b/build/pkgs/gap/spkg-configure.m4
+@@ -0,0 +1,8 @@
++SAGE_SPKG_CONFIGURE([gap], [
++    SAGE_SPKG_DEPCHECK([gmp], [
++       AC_CHECK_HEADER([gap/system.h], [
++        AC_SEARCH_LIBS([GAP_COMM], [gap], [
++        ], [sage_spkg_install_gap=yes])
++       ], [sage_spkg_install_gap=yes])
++    ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2a41f491e5ce599ba185f5e93f02e0fcebd76c9e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Samuel=20Leli=C3=A8vre?= <samuel.lelievre@gmail.com>
+Date: Mon, 22 Mar 2021 03:05:31 +0100
+Subject: 29644: Add distro information for gap
+
+---
+ build/pkgs/gap/distros/fedora.txt | 1 +
+ build/pkgs/gap/distros/gentoo.txt | 1 +
+ 2 files changed, 2 insertions(+)
+ create mode 100644 build/pkgs/gap/distros/fedora.txt
+ create mode 100644 build/pkgs/gap/distros/gentoo.txt
+
+diff --git a/build/pkgs/gap/distros/fedora.txt b/build/pkgs/gap/distros/fedora.txt
+new file mode 100644
+index 00000000..ea4feae
+--- /dev/null
++++ b/build/pkgs/gap/distros/fedora.txt
+@@ -0,0 +1 @@
++gap
+diff --git a/build/pkgs/gap/distros/gentoo.txt b/build/pkgs/gap/distros/gentoo.txt
+new file mode 100644
+index 00000000..ea64ec9
+--- /dev/null
++++ b/build/pkgs/gap/distros/gentoo.txt
+@@ -0,0 +1 @@
++sci-mathematics/gap
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
new file mode 100644
index 000000000000..f132591d48ac
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage_setup/optional_extension.py b/src/sage_setup/optional_extension.py
+index f252849384..4034e3e196 100644
+--- a/src/sage_setup/optional_extension.py
++++ b/src/sage_setup/optional_extension.py
+@@ -80,7 +80,7 @@ def OptionalExtension(*args, **kwds):
+         sage: print(ext.__class__.__name__)
+         CythonizeExtension
+         sage: ext = OptionalExtension("foo", ["foo.c"], package="gap")
+-        sage: print(ext.__class__.__name__)
++        sage: print(ext.__class__.__name__)     # not tested - fails with system gap
+         Extension
+     """
+     try:
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f688629fc26d..02b0af4ad16d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -66,7 +66,6 @@ ${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
 ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
 
 https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
-https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
 http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
 https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
 https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
@@ -103,7 +102,6 @@ ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
 dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
 
 c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
-6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
 07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
 3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
 718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
@@ -159,6 +157,13 @@ pre_configure() {
 	export MAKE="make -j ${XBPS_MAKEJOBS}"
 }
 
+post_configure() {
+	# we set some variables, right after configure has created sage_conf.py
+	cat <<-EOF >> pkgs/sage-conf/sage_conf.py
+	GAP_ROOT_DIR = "/usr/share/gap"
+	EOF
+}
+
 # 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
@@ -248,7 +253,11 @@ makedepends+="
  gengetopt texinfo
  brial-devel cliquer-devel gfan libbraiding-devel libhomfly-devel
  lrcalc-devel nauty-devel palp tachyon
- maxima-ecl primesieve-devel primecount-devel
+ maxima-ecl primesieve-devel primecount-devel gap-devel
+"
+
+# optional dependencies
+makedepends+="
  ffmpeg ImageMagick
 "
 

From 361b3f9571ee8ef4715be0dfc850abd770b3c2ba Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Wed, 12 Jan 2022 16:33:19 +0100
Subject: [PATCH 32/34] singular: update to 4.3.0

---
 common/shlibs                                 | 10 ++---
 .../patches/upstream_omalloc_new_musl.patch   | 40 -------------------
 .../patches/upstream_polys_test_musl.patch    | 22 ----------
 srcpkgs/singular/template                     |  7 ++--
 4 files changed, 9 insertions(+), 70 deletions(-)
 delete mode 100644 srcpkgs/singular/patches/upstream_omalloc_new_musl.patch
 delete mode 100644 srcpkgs/singular/patches/upstream_polys_test_musl.patch

diff --git a/common/shlibs b/common/shlibs
index c4b2c348f6f3..d35944228287 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4066,11 +4066,11 @@ libumfpack.so.5 SuiteSparse-5.10.1_1
 libecl.so.21.2 ecl-21.2.1_1
 libecm.so.1 ecm-7.0.4_3
 libcliquer.so.1 cliquer-1.22_1
-libSingular-4.2.1.so singular-4.2.1_1
-libfactory-4.2.1.so singular-4.2.1_1
-libpolys-4.2.1.so singular-4.2.1_1
-libomalloc-0.9.6.so singular-4.2.1_1
-libsingular_resources-4.2.1.so singular-4.2.1_1
+libSingular-4.3.0.so singular-4.3.0_1
+libfactory-4.3.0.so singular-4.3.0_1
+libpolys-4.3.0.so singular-4.3.0_1
+libomalloc-0.9.6.so singular-4.3.0_1
+libsingular_resources-4.3.0.so singular-4.3.0_1
 libbrial.so.3 brial-1.2.10_1
 libbrial_groebner.so.3 brial-1.2.10_1
 libm4ri-0.0.20200125.so m4ri-20200125_1
diff --git a/srcpkgs/singular/patches/upstream_omalloc_new_musl.patch b/srcpkgs/singular/patches/upstream_omalloc_new_musl.patch
deleted file mode 100644
index 354603bb2c44..000000000000
--- a/srcpkgs/singular/patches/upstream_omalloc_new_musl.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From e1643135645a3cc97af8659018defd2b8617bb4e Mon Sep 17 00:00:00 2001
-From: Hans Schoenemann <hannes@mathematik.uni-kl.de>
-Date: Thu, 23 Sep 2021 10:57:25 +0200
-Subject: [PATCH] omalloc: fix alignment stuff for "make check"
-
----
- omalloc/omtTest.c | 6 ------
- omalloc/omtTest.h | 2 +-
- 2 files changed, 1 insertion(+), 7 deletions(-)
-
-diff --git a/omalloc/omtTest.c b/omalloc/omtTest.c
-index 715fbb113c..75c8cdb210 100644
---- a/omalloc/omtTest.c
-+++ b/omalloc/omtTest.c
-@@ -70,12 +70,6 @@ void omtTestDebug(omMemCell cell)
-   }
- 
-   is_size = omSizeOfAddr(cell->addr);
--  if (!OM_IS_ALIGNED(is_size))
--  {
--    omReportError(omError_Unknown, omError_NoError, OM_FLR,
--                  "is_size == %u is unaligned", is_size);
--    return;
--  }
-   if (is_size < size)
-   {
-     omReportError(omError_Unknown, omError_NoError, OM_FLR,
-diff --git a/omalloc/omtTest.h b/omalloc/omtTest.h
-index a579d88011..6faa099c89 100644
---- a/omalloc/omtTest.h
-+++ b/omalloc/omtTest.h
-@@ -48,7 +48,7 @@ void TestFree(omMemCell cell);
- 
- #define IS_STICKY_BIN(spec) (spec & 1)
- // #define IS_STICKY_BIN(spec) (0)
--#define GET_SIZE(spec)      (spec & ((((unsigned long) 1) << 14) -1))
-+#define GET_SIZE(spec)      OM_ALIGN_SIZE((spec & ((((unsigned long) 1) << 14) -1)))
- #define SET_SIZE(spec, size) spec = ((spec & ~((((unsigned long) 1) << 14) -1)) | (size))
- #define IS_ALIGNED(spec)    (spec & (((unsigned long) 1) << 15))
- #define IS_ZERO(spec)       (spec & (((unsigned long) 1) << 16))
diff --git a/srcpkgs/singular/patches/upstream_polys_test_musl.patch b/srcpkgs/singular/patches/upstream_polys_test_musl.patch
deleted file mode 100644
index 73ee062e2f89..000000000000
--- a/srcpkgs/singular/patches/upstream_polys_test_musl.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From 6e2383111a18b2fa2d3421045625d1d424eb1e25 Mon Sep 17 00:00:00 2001
-From: Hans Schoenemann <hannes@mathematik.uni-kl.de>
-Date: Mon, 20 Sep 2021 15:13:36 +0200
-Subject: [PATCH] fix: make check: polys_test
-
----
- libpolys/tests/polys_test.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libpolys/tests/polys_test.h b/libpolys/tests/polys_test.h
-index 5526aa5a6b..5b4c561238 100644
---- a/libpolys/tests/polys_test.h
-+++ b/libpolys/tests/polys_test.h
-@@ -2481,7 +2481,7 @@ class PolysTestSuite : public CxxTest::TestSuite
-     {
-       for (int qi = 0; qi <= 100; qi++)
-       {
--        int c = rand() % 1000000;
-+        int c = rand() % 1000000+1; /* c must not be 0 */
-         poly qterm = p_ISet(c, r); p_SetExp(qterm, 1, qi, r);
-         p_Setm(qterm, r);
-         number qtermAsN = toFractionNumber(qterm, cf);
diff --git a/srcpkgs/singular/template b/srcpkgs/singular/template
index d3af1c8b919b..a3e1dcc0b35f 100644
--- a/srcpkgs/singular/template
+++ b/srcpkgs/singular/template
@@ -1,6 +1,6 @@
 # Template file for 'singular'
 pkgname=singular
-version=4.2.1
+version=4.3.0
 revision=1
 build_style=gnu-configure
 configure_args="--with-readline=ncurses
@@ -18,8 +18,9 @@ short_desc="Computer algebra system for polynomial computations"
 maintainer="dkwo <nicolopiazzalunga@gmail.com>"
 license="GPL-2.0-or-later"
 homepage="https://www.singular.uni-kl.de"
-distfiles="https://service.mathematik.uni-kl.de/ftp/pub/Math/Singular/src/${version//./-}/singular-${version}.tar.gz"
-checksum=28a56df84f85b116e0068ffecf92fbe08fc27bd4c5ba902997f1a367db0bfe8d
+# distfiles="https://service.mathematik.uni-kl.de/ftp/pub/Math/Singular/src/${version//./-}/singular-${version}.tar.gz"
+distfiles="ftp://jim.mathematik.uni-kl.de/pub/Math/Singular/SOURCES/${version//./-}/singular-${version}.tar.gz"
+checksum=74f38288203720e3f280256f2f8deb94030dd032b4237d844652aff0faab36e7
 
 if [ -z "$CROSS_BUILD" ]; then
 	makedepends+=" ntl-devel"

From 04a0f2d37654374fc2a10048d1e8cf6781de92ae Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Thu, 13 Jan 2022 03:21:19 -0300
Subject: [PATCH 33/34] sagemath: fixes for system gap

---
 .../zzz-fixes_for_system_gap--see_29644.patch | 96 +++++++++++++++++++
 .../patches/zzz-skip_doctest_system_gap.patch | 13 ---
 srcpkgs/sagemath/template                     |  1 +
 3 files changed, 97 insertions(+), 13 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
 delete mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch

diff --git a/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch b/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
new file mode 100644
index 000000000000..741d2b23a7f5
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
@@ -0,0 +1,96 @@
+From 346b4ea4c92f4287d3c097b92817cf2abfcddd8c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Thu, 13 Jan 2022 01:41:31 -0300
+Subject: [PATCH] gap: fixes for using system gap
+
+ - fix _get_shared_lib_path() so we don't need to configure GAP_SO
+ - fix gap_root() so we don't need to configure GAP_ROOT_DIR
+ - skip a useless test that cannot succeed on system gap
+ - use gap_root() in saved_workspace.py instead of GAP_ROOT_DIR
+---
+ src/sage/env.py                      |  2 +-
+ src/sage/libs/gap/saved_workspace.py |  4 ++--
+ src/sage/libs/gap/util.pyx           | 11 +++++++++++
+ src/sage_setup/optional_extension.py |  2 +-
+ 4 files changed, 15 insertions(+), 4 deletions(-)
+
+diff --git a/src/sage/env.py b/src/sage/env.py
+index c4953cfa65..c16696d298 100644
+--- a/src/sage/env.py
++++ b/src/sage/env.py
+@@ -293,7 +293,7 @@ def _get_shared_lib_path(*libnames: str) -> Optional[str]:
+             if sys.platform == 'darwin':
+                 ext = 'dylib'
+             else:
+-                ext = 'so'
++                ext = 'so*'
+ 
+             if SAGE_LOCAL:
+                 search_directories.append(Path(SAGE_LOCAL) / 'lib')
+diff --git a/src/sage/libs/gap/saved_workspace.py b/src/sage/libs/gap/saved_workspace.py
+index ad5adec36d..59c498795f 100644
+--- a/src/sage/libs/gap/saved_workspace.py
++++ b/src/sage/libs/gap/saved_workspace.py
+@@ -8,7 +8,7 @@ workspaces.
+ 
+ import os
+ import glob
+-from sage.env import GAP_ROOT_DIR
++from sage.libs.gap.util import gap_root
+ from sage.interfaces.gap_workspace import gap_workspace_file
+ 
+ 
+@@ -31,7 +31,7 @@ def timestamp():
+     """
+     libgap_dir = os.path.dirname(__file__)
+     libgap_files = glob.glob(os.path.join(libgap_dir, '*'))
+-    gap_packages = glob.glob(os.path.join(GAP_ROOT_DIR, 'pkg', '*'))
++    gap_packages = glob.glob(os.path.join(gap_root(), 'pkg', '*'))
+     files = libgap_files + gap_packages
+     if len(files) == 0:
+         print('Unable to find LibGAP files.')
+diff --git a/src/sage/libs/gap/util.pyx b/src/sage/libs/gap/util.pyx
+index 08c4c40cc0..c7dd557c35 100644
+--- a/src/sage/libs/gap/util.pyx
++++ b/src/sage/libs/gap/util.pyx
+@@ -23,6 +23,7 @@ from cysignals.signals cimport sig_on, sig_off
+ import os
+ import warnings
+ import sage.env
++import subprocess
+ 
+ from .gap_includes cimport *
+ from .element cimport *
+@@ -178,6 +179,16 @@ def gap_root():
+     if os.path.exists(sage.env.GAP_ROOT_DIR):
+         return sage.env.GAP_ROOT_DIR
+ 
++    gap_expr = 'JoinStringsWithSeparator(KERNEL_INFO().GAP_ROOT_PATHS,";")'
++    gap_root_paths = subprocess.getoutput(
++        f"gap -r -q --bare --nointeract -c 'Display({gap_expr});'"
++        ).strip().split(';')
++
++    for gapdir in gap_root_paths:
++        if os.path.exists(os.path.join(gapdir, 'sysinfo.gap')):
++            sage.env.GAP_ROOT_DIR = gapdir
++            return gapdir
++
+     # Attempt to figure out the appropriate GAP_ROOT by reading the
+     # local/bin/gap shell script; this is an ugly hack that exists for
+     # historical reasons; the best approach to setting where Sage looks for
+diff --git a/src/sage_setup/optional_extension.py b/src/sage_setup/optional_extension.py
+index f252849384..4034e3e196 100644
+--- a/src/sage_setup/optional_extension.py
++++ b/src/sage_setup/optional_extension.py
+@@ -80,7 +80,7 @@ def OptionalExtension(*args, **kwds):
+         sage: print(ext.__class__.__name__)
+         CythonizeExtension
+         sage: ext = OptionalExtension("foo", ["foo.c"], package="gap")
+-        sage: print(ext.__class__.__name__)
++        sage: print(ext.__class__.__name__)     # not tested - fails with system gap
+         Extension
+     """
+     try:
+-- 
+2.34.1
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
deleted file mode 100644
index f132591d48ac..000000000000
--- a/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/src/sage_setup/optional_extension.py b/src/sage_setup/optional_extension.py
-index f252849384..4034e3e196 100644
---- a/src/sage_setup/optional_extension.py
-+++ b/src/sage_setup/optional_extension.py
-@@ -80,7 +80,7 @@ def OptionalExtension(*args, **kwds):
-         sage: print(ext.__class__.__name__)
-         CythonizeExtension
-         sage: ext = OptionalExtension("foo", ["foo.c"], package="gap")
--        sage: print(ext.__class__.__name__)
-+        sage: print(ext.__class__.__name__)     # not tested - fails with system gap
-         Extension
-     """
-     try:
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 02b0af4ad16d..0d8ce1f7a70a 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -161,6 +161,7 @@ post_configure() {
 	# we set some variables, right after configure has created sage_conf.py
 	cat <<-EOF >> pkgs/sage-conf/sage_conf.py
 	GAP_ROOT_DIR = "/usr/share/gap"
+	GAP_SO = "$(objdump -p /usr/lib/libgap.so | awk '/SONAME/{print $2}')"
 	EOF
 }
 

From 5dc98a7408b1f2f665c103a2a60d6dcb2bba1292 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Thu, 13 Jan 2022 15:47:33 -0300
Subject: [PATCH 34/34] New package: sagemath-test

---
 srcpkgs/sagemath-test/template                | 32 +++++++++++++++++++
 .../patches/zzz-skip_doctest_shebang.patch    | 11 +++++++
 2 files changed, 43 insertions(+)
 create mode 100644 srcpkgs/sagemath-test/template
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch

diff --git a/srcpkgs/sagemath-test/template b/srcpkgs/sagemath-test/template
new file mode 100644
index 000000000000..3e0b1c3233fd
--- /dev/null
+++ b/srcpkgs/sagemath-test/template
@@ -0,0 +1,32 @@
+# Template file for 'sagemath-test'
+pkgname=sagemath-test
+version=1
+revision=1
+build_style=meta
+checkdepends="sagemath"
+short_desc="Dummy package to test sagemath"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-2.0-or-later"
+homepage="none"
+
+# TODO: install base-voidstrap, uninstall base-chroot, and remove orphans
+# so we can check sagemath depends are enough to run sage on void
+
+do_check() {
+	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
+		_test_args=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	fi
+	if [ -z "$_test_args" ]; then
+		_test_args=--all
+	fi
+	if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
+		# for CI use a predictable random seed
+		_test_args="--random-seed=0 $_test_args"
+	fi
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args="--long $_test_args"
+	else
+		_test_args="--warn-long 5.0 $_test_args"
+	fi
+	/usr/bin/sage* -tp ${XBPS_MAKEJOBS} ${_test_args}
+}
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch
new file mode 100644
index 000000000000..04fa2acbf3ec
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch
@@ -0,0 +1,11 @@
+--- a/src/sage/tests/cmdline.py
++++ b/src/sage/tests/cmdline.py
+@@ -488,7 +488,7 @@ def test_executable(args, input="", timeout=100.0, pydebug_ignore_warnings=False
+         0
+ 
+         sage: (out, err, ret) = test_executable(["sage", "--cython"])
+-        sage: print(err)
++        sage: print(err)  # not tested - broken when shebang is rewritten
+         Cython (http://cython.org) is a compiler for code written in the
+         Cython language.  Cython is based on Pyrex by Greg Ewing.
+         ...

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.rc0
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (184 preceding siblings ...)
  2022-01-13 18:50 ` [PR PATCH] [Updated] " tornaria
@ 2022-01-13 19:11 ` tornaria
  2022-01-14 14:34 ` [PR PATCH] [Updated] " tornaria
                   ` (62 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-13 19:11 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1012429054

Comment:
New push includes fixes so that tests pass on installed sage.

All tests pass using gap from #34995 which is ready to merge. 

The package `sagemath-test` is a dummy package whose `do_check()` step installs and runs sagemath doctests, so CI will test this as well.

---

I wonder if there is an easy and safe way to modify the chroot to uninstall development packages; the sagemath package has to work when installed just by itself and if something like gcc is actually necessary to run it should be listed explicitly in the depends.

A minimal functional chroot should be I guess close to  the intersection of `base-chroot` and  `base-system`, e.g. maybe something like
```
base-files>=0
sed>=0
findutils>=0
gzip>=0
coreutils>=0
file>=0
bsdtar>=0
chroot-bash>=0
chroot-grep>=0
chroot-gawk>=0
chroot-util-linux>=0
tzdata>=0
```
I'm not sure how to acomplish this in a way the masterdir is still usable later. Could `xbps-remove -F` a bunch of pkgs, then force-reinstall `base-chroot` on the `do_clean()` step. 

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: sagemath-9.5.rc0
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (185 preceding siblings ...)
  2022-01-13 19:11 ` tornaria
@ 2022-01-14 14:34 ` tornaria
  2022-01-14 14:36 ` tornaria
                   ` (61 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-14 14:34 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 627 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.rc0
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: 620072 bytes --]

From 203fe17bb92c602d5cacabdd9cf0771ace783a7d 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/36] 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 d67d1e5b269cbdd77f2b88f3828bda8b8c53fe66 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/36] 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 3915f0e063d96a689f623882012ae168bc903f55 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/36] 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 70209cdd42838bb9dc56a954ce3c60688c2f430c 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/36] 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 a3c6f0dff0bf1309f9c57a20f0cd08bced972153 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/36] 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 1dcc771f319e71e02a3bc1d0d3fd78d5cbb89604 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/36] 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 d407afedacfccf400a5eb64a5588872b3589143c 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/36] 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 dc907b67721b7db35e578d6af8f4361f6061dea6 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/36] 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 ea3f1adcf3427a499a2caf1530dce814e0fa5d25 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/36] 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 95d8e39c8c5f8b755132d8732d2ce51a62261953 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/36] 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 7a833ec6e7f69cbdcb75abfefe2fdcc7460d465e 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/36] 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 b983d52ccb4a827afc149b9e8196741bcfebb44e 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/36] 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 1f9df89079147514cebe48eace3ed64e581f94d6 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/36] 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 b8ea6b0aa139c39cd52a9becf547d9b824942cc4 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/36] 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 3819c6786b7482f48859d7682507a4f1ee0b1441 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/36] 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 acf07fc760f0ffac4f6822d689d9962fd5824fc1 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/36] 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 5c0e6b497238533f396511ac727087d035b32f5a 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/36] 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 b699534047c2765c7ecfd7bd7c0380ed00f855c5 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/36] 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 adbbaed8500af993ceee33d7a1458deeebba2969 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/36] 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

From f6ece4606a6ebc9040d6451f3abd0dfe91de21c7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 27 Dec 2021 20:19:19 -0300
Subject: [PATCH 20/36] sagemath: fix license and tests

Now tests can be run with -Q (normal) or -K (--long)
---
 srcpkgs/sagemath/template | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index c5009269c7fc..33b40acbabeb 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -16,7 +16,7 @@ depends="giac git FlintQS zn_poly sympow
  "
 short_desc="Open source mathematics software"
 maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
-license="GPL-3.0-or-later"
+license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
 checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
@@ -155,15 +155,17 @@ do_install() {
 }
 
 do_check() {
-	TEST=--all
 	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
-		TEST="$(sed -e 's/#.*//' ${XBPS_DISTDIR}/sagemath-check)"
+		_test_args=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	fi
+	if [ -z "$_test_args" ]; then
+		_test_args=--all
+	fi
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args="--long $_test_args"
 	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} ${OPT} ${TEST}
-	#./sage -t ${OPT} ${TEST}
+	./sage -tp ${XBPS_MAKEJOBS} ${_test_args}
 }
 
 ### copied from sage-deps, to be kept in sync

From bac65ad140b40643a62039f7c56f2285dc7dfa20 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 28 Dec 2021 23:08:17 -0300
Subject: [PATCH 21/36] sagemath: fix long time test

---
 .../patches/zzz-fix_long_time_test--see_33091.patch | 13 +++++++++++++
 ...=> zzz-skip_doctest_giac-1.7.0--see_31563.patch} |  0
 2 files changed, 13 insertions(+)
 create mode 100644 srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
 rename srcpkgs/sagemath/patches/{skip-doctest-giac-1.7.0--see-trac-31563.patch => zzz-skip_doctest_giac-1.7.0--see_31563.patch} (100%)

diff --git a/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch b/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
new file mode 100644
index 000000000000..ca360dee9f6e
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage/matrix/matrix2.pyx b/src/sage/matrix/matrix2.pyx
+index 7d319bd54b..c1a2eed6f1 100644
+--- a/src/sage/matrix/matrix2.pyx
++++ b/src/sage/matrix/matrix2.pyx
+@@ -17215,7 +17215,7 @@ cdef class Matrix(Matrix1):
+ 
+             sage: set_random_seed()
+             sage: K = random_cone(max_ambient_dim=5)
+-            sage: all(L.change_ring(SR).is_Z_operator_on(K)
++            sage: all(L.change_ring(SR).is_Z_operator_on(K) # long time
+             ....:     for L in K.Z_operators_gens())  # long time
+             True
+ 
diff --git a/srcpkgs/sagemath/patches/skip-doctest-giac-1.7.0--see-trac-31563.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_31563.patch
similarity index 100%
rename from srcpkgs/sagemath/patches/skip-doctest-giac-1.7.0--see-trac-31563.patch
rename to srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_31563.patch

From 463dcc1b7973508e4e4984d8973bbb53ba6a3ae3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 31 Dec 2021 13:52:34 -0300
Subject: [PATCH 22/36] python3-Sphinx: update to 4.3.2.

---
 srcpkgs/python3-Sphinx/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/python3-Sphinx/template b/srcpkgs/python3-Sphinx/template
index 8b0493c1f92c..29f892d16157 100644
--- a/srcpkgs/python3-Sphinx/template
+++ b/srcpkgs/python3-Sphinx/template
@@ -1,6 +1,6 @@
 # Template file for 'python3-Sphinx'
 pkgname=python3-Sphinx
-version=4.2.0
+version=4.3.2
 revision=1
 wrksrc=Sphinx-${version}
 build_style=python3-module
@@ -17,8 +17,9 @@ short_desc="Python 3 documentation generator"
 maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
 license="BSD-3-Clause"
 homepage="http://sphinx-doc.org"
+changelog="https://www.sphinx-doc.org/en/master/changes.html"
 distfiles="${PYPI_SITE}/S/Sphinx/Sphinx-${version}.tar.gz"
-checksum=94078db9184491e15bce0a56d9186e0aec95f16ac20b12d00e06d4e36f1058a6
+checksum=0a8836751a68306b3fe97ecbe44db786f8479c3bf4b80e3a7f5c838657b4698c
 conflicts="python-Sphinx>=0"
 
 post_install() {

From 3f4f586355eef536594f6689429409d3d49ffad9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 28 Dec 2021 23:08:17 -0300
Subject: [PATCH 23/36] sagemath: use system python site-packages

 - patch from #29665 for that
 - patch on top of that to allow a few more python packages:
   gmpy2, sphinx, typing_extensions, ptyprocess
 - add all available python packages to makedepends and depends
 - add ffmpeg and ImageMagick to makedepends
 - in standard check (-Q) warn if individual test > 5.0s
---
 ...184f7498a2046065e669723e68efe2d65cee.patch | 5629 +++++++++++++++++
 .../zzz-dont_run_pytest--see_31924.patch      |   27 +
 .../zzz-more_site_packages_not_in_29665.patch |   42 +
 srcpkgs/sagemath/template                     |   52 +-
 4 files changed, 5747 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch

diff --git a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
new file mode 100644
index 000000000000..b641113927e7
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
@@ -0,0 +1,5629 @@
+From 05fcaabe95082f42ba134780d579390d7b6153e2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 19:30:58 -0400
+Subject: Trac #29665: add --enable-system-site-packages option to ./configure.
+
+This new option is experimental and disabled by default. When it is
+enabled, the string "--system-site-packages" is appended to a new
+environment variable SAGE_VENV_FLAGS that is then passed to the
+sage-venv command during the build using autoconf substitution.
+Thusly the correct setting finds its way into local/pyvenv.cfg.
+---
+ build/make/Makefile.in |  2 +-
+ configure.ac           | 11 +++++++++++
+ 2 files changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/build/make/Makefile.in b/build/make/Makefile.in
+index f870cc3..68627ab 100644
+--- a/build/make/Makefile.in
++++ b/build/make/Makefile.in
+@@ -211,7 +211,7 @@ endif
+ inst_python3_venv = $(SAGE_VENV)/pyvenv.cfg
+ 
+ $(inst_python3_venv):
+-	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv "$(SAGE_VENV)"
++	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv @SAGE_VENV_FLAGS@ "$(SAGE_VENV)"
+ endif
+ 
+ # Build everything and start Sage.
+diff --git a/configure.ac b/configure.ac
+index 351f487..db30a91 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -435,6 +435,17 @@ AC_ARG_ENABLE([download-from-upstream-url],
+   [AS_HELP_STRING([--enable-download-from-upstream-url],
+     [allow downloading packages from their upstream URL if they cannot be found on the Sage mirrors])])
+ 
++AC_ARG_ENABLE(
++  [system-site-packages], [AS_HELP_STRING(
++    [--enable-system-site-packages],
++    [allow sage to use python packages from the system (experimental; default: no)]
++  )], [
++  AS_IF([test "x$enable_system_site_packages" = "xyes"], [
++    SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
++  ])
++])
++AC_SUBST([SAGE_VENV_FLAGS])
++
+ SAGE_SPKG_OPTIONS=""
+ AS_IF([test "x$enable_experimental_packages" = "xyes"], [
+   AS_VAR_APPEND([SAGE_SPKG_OPTIONS], [" -y"])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9372d1f663edf4e89f9c186336815ca04cff59dc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 19:41:14 -0400
+Subject: Trac #29665: new SAGE_PYTHON_PACKAGE_CHECK() autoconf macro.
+
+This new macro encapsulates the check for system installations of
+python packages. It uses setuptools.version's pkg_resources to
+check if the contents of install-requires.txt are satisfied for
+the given package; and if not, tells the build system to install
+the SPKG instead.
+---
+ m4/sage_python_package_check.m4 | 49 +++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 49 insertions(+)
+ create mode 100644 m4/sage_python_package_check.m4
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+new file mode 100644
+index 00000000..77b0a0c
+--- /dev/null
++++ b/m4/sage_python_package_check.m4
+@@ -0,0 +1,49 @@
++#
++# SYNOPSIS
++#
++#   SAGE_PYTHON_PACKAGE_CHECK(package)
++#
++# DESCRIPTION
++#
++#   Determine if the system copy of a python package can be used by sage.
++#
++#   This macro uses setuptools.version's pkg_resources to check that the
++#   "install-requires.txt" file for the named package is satisfied, and
++#   it can typically fail in four ways:
++#
++#     1. If --enable-system-site-packages was not passed to ./configure,
++#
++#     2. If we are not using the system python (no $PYTHON_FOR_VENV),
++#
++#     3. If setuptools is not available to the system python,
++#
++#     4. If the contents of install-requires.txt are not met (wrong
++#        version, no version, etc.) by the system python.
++#
++#   In any of those cases, we set sage_spkg_install_$package to "yes"
++#   so that the corresponding SPKG is installed. Otherwise, we do
++#   nothing, since the default value of sage_spkg_install_$package
++#   is "no" (to use the system copy).
++#
++#   The SAGE_SPKG_CONFIGURE_PYTHON3() macro is AC_REQUIRE'd to ensure
++#   that $PYTHON_FOR_VENV is available, if it is going to be available.
++#
++
++AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
++  AS_IF([test "${enable_system_site_packages}" = "yes"], [
++    AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
++
++    dnl strip all comments from install-requires.txt; this should leave
++    dnl only a single line containing the version specification for this
++    dnl package.
++    SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
++    AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++    AS_IF(
++      ["${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())"],
++      [AC_MSG_RESULT(yes)],
++      [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
++    )
++  ], [
++    sage_spkg_install_$1=yes
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a0dac8ad81ad6369d479bba30d2388de59e5cecb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:21:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for py.
+
+---
+ build/pkgs/py/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/py/spkg-configure.m4
+
+diff --git a/build/pkgs/py/spkg-configure.m4 b/build/pkgs/py/spkg-configure.m4
+new file mode 100644
+index 00000000..ded7034
+--- /dev/null
++++ b/build/pkgs/py/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([py], [SAGE_PYTHON_PACKAGE_CHECK([py])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 87c463a25ab4432dc1fba4f7a9703284e5b8f620 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:24:15 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for wheel.
+
+---
+ build/pkgs/wheel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wheel/spkg-configure.m4
+
+diff --git a/build/pkgs/wheel/spkg-configure.m4 b/build/pkgs/wheel/spkg-configure.m4
+new file mode 100644
+index 00000000..7897ea9
+--- /dev/null
++++ b/build/pkgs/wheel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([wheel], [SAGE_PYTHON_PACKAGE_CHECK([wheel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 804094b3a980f262f4d53d7be8b1be43ac0c55e0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:25:15 -0400
+Subject: Trac #29665: new spkg-configure.m4 for cvxopt.
+
+This includes a SAGE_SPKG_DEPCHECK([gsl glpk suitesparse],... because
+those C dependencies wind up linked into shared libraries like,
+
+  /usr/.../cvxopt/glpk.cpython-39-x86_64-linux-gnu.so
+
+that could potentially conflict with (for example) the glpk SPKG.
+---
+ build/pkgs/cvxopt/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/cvxopt/spkg-configure.m4
+
+diff --git a/build/pkgs/cvxopt/spkg-configure.m4 b/build/pkgs/cvxopt/spkg-configure.m4
+new file mode 100644
+index 00000000..c4aa619
+--- /dev/null
++++ b/build/pkgs/cvxopt/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([cvxopt], [
++  SAGE_SPKG_DEPCHECK([gsl glpk suitesparse], [
++    SAGE_PYTHON_PACKAGE_CHECK([cvxopt])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3f171955ff8d15da2c98aee0d2e254e95a55a2b5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:28:10 -0400
+Subject: Trac #29665: new spkg-configure.m4 for pyzmq.
+
+This includes a SAGE_SPKG_DEPCHECK([zeromq],... because libzmq winds
+up linked into shared libraries like,
+
+  /usr/.../zmq/backend/cython/message.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the zeromq SPKG.
+---
+ build/pkgs/pyzmq/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/pyzmq/spkg-configure.m4
+
+diff --git a/build/pkgs/pyzmq/spkg-configure.m4 b/build/pkgs/pyzmq/spkg-configure.m4
+new file mode 100644
+index 00000000..ae2b126
+--- /dev/null
++++ b/build/pkgs/pyzmq/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([pyzmq], [
++  SAGE_SPKG_DEPCHECK([zeromq], [
++    SAGE_PYTHON_PACKAGE_CHECK([pyzmq])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20d3aa9da9fc98a6e6a47599cd1b6d1d3785a4c4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:31:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for requests.
+
+---
+ build/pkgs/requests/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/requests/spkg-configure.m4
+
+diff --git a/build/pkgs/requests/spkg-configure.m4 b/build/pkgs/requests/spkg-configure.m4
+new file mode 100644
+index 00000000..f50a66c
+--- /dev/null
++++ b/build/pkgs/requests/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([requests], [SAGE_PYTHON_PACKAGE_CHECK([requests])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4df57ee47f2576b6b7bf9265248e06e90616b689 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:13:34 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for six.
+
+---
+ build/pkgs/six/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/six/spkg-configure.m4
+
+diff --git a/build/pkgs/six/spkg-configure.m4 b/build/pkgs/six/spkg-configure.m4
+new file mode 100644
+index 00000000..a382b81
+--- /dev/null
++++ b/build/pkgs/six/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([six], [SAGE_PYTHON_PACKAGE_CHECK([six])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f4462652d02ca729cc6d7cb36ee4d7d662deafb0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:14:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for packaging.
+
+---
+ build/pkgs/packaging/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/packaging/spkg-configure.m4
+
+diff --git a/build/pkgs/packaging/spkg-configure.m4 b/build/pkgs/packaging/spkg-configure.m4
+new file mode 100644
+index 00000000..398f9e1
+--- /dev/null
++++ b/build/pkgs/packaging/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([packaging], [SAGE_PYTHON_PACKAGE_CHECK([packaging])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4d64677fffce48077e4bc3e20ec833c70e6e9b65 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:18:53 -0400
+Subject: Trac #29665: new spkg-configure.m4 for numpy.
+
+This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack
+wind up linked into shared libraries like,
+
+  /usr/.../numpy/linalg/lapack_lite.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the openblas SPKG.
+---
+ build/pkgs/numpy/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/numpy/spkg-configure.m4
+
+diff --git a/build/pkgs/numpy/spkg-configure.m4 b/build/pkgs/numpy/spkg-configure.m4
+new file mode 100644
+index 00000000..16f9a90
+--- /dev/null
++++ b/build/pkgs/numpy/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([numpy], [
++  SAGE_SPKG_DEPCHECK([openblas], [
++   SAGE_PYTHON_PACKAGE_CHECK([numpy])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 85dfe5bb32f3c470966b477bae68a921e846d11f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:58:48 -0400
+Subject: Trac #29665: new spkg-configure.m4 for scipy.
+
+This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack
+wind up linked into shared libraries like,
+
+  /usr/.../scipy/linalg/_flinalg.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the openblas SPKG.
+---
+ build/pkgs/scipy/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/scipy/spkg-configure.m4
+
+diff --git a/build/pkgs/scipy/spkg-configure.m4 b/build/pkgs/scipy/spkg-configure.m4
+new file mode 100644
+index 00000000..0b7294a
+--- /dev/null
++++ b/build/pkgs/scipy/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([scipy], [
++  SAGE_SPKG_DEPCHECK([openblas], [
++    SAGE_PYTHON_PACKAGE_CHECK([scipy])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5616f1491036fda95f4d3e840c8c8b531c97323b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 07:19:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pluggy.
+
+---
+ build/pkgs/pluggy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pluggy/spkg-configure.m4
+
+diff --git a/build/pkgs/pluggy/spkg-configure.m4 b/build/pkgs/pluggy/spkg-configure.m4
+new file mode 100644
+index 00000000..11b1fce
+--- /dev/null
++++ b/build/pkgs/pluggy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pluggy], [SAGE_PYTHON_PACKAGE_CHECK([pluggy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6bceae3d356878cfe5fce40c9998dead003a3844 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 07:24:12 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pickleshare.
+
+---
+ build/pkgs/pickleshare/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pickleshare/spkg-configure.m4
+
+diff --git a/build/pkgs/pickleshare/spkg-configure.m4 b/build/pkgs/pickleshare/spkg-configure.m4
+new file mode 100644
+index 00000000..80e9b7c
+--- /dev/null
++++ b/build/pkgs/pickleshare/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pickleshare], [SAGE_PYTHON_PACKAGE_CHECK([pickleshare])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From da2ab534f4a256c82ed4f1c5f0f5c320529b5e9f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 08:53:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for html5lib.
+
+---
+ build/pkgs/html5lib/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/html5lib/spkg-configure.m4
+
+diff --git a/build/pkgs/html5lib/spkg-configure.m4 b/build/pkgs/html5lib/spkg-configure.m4
+new file mode 100644
+index 00000000..f421b7e
+--- /dev/null
++++ b/build/pkgs/html5lib/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([html5lib], [SAGE_PYTHON_PACKAGE_CHECK([html5lib])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5e464134afdf6055b7b5804208f759561c5435cd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 18:30:47 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for networkx.
+
+---
+ build/pkgs/networkx/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/networkx/spkg-configure.m4
+
+diff --git a/build/pkgs/networkx/spkg-configure.m4 b/build/pkgs/networkx/spkg-configure.m4
+new file mode 100644
+index 00000000..926671e
+--- /dev/null
++++ b/build/pkgs/networkx/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([networkx], [SAGE_PYTHON_PACKAGE_CHECK([networkx])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c4d40770cd9c7fda811e31759a5f4aedc320f3f9 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:33:24 -0400
+Subject: Trac #29665: new spkg-configure.m4 for matplotlib.
+
+This includes a SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull],...
+because those dependencies wind up linked into shared libraries like,
+
+  /usr/lib/.../matplotlib/ft2font.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with their SPKG counterparts.
+---
+ build/pkgs/matplotlib/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/matplotlib/spkg-configure.m4
+
+diff --git a/build/pkgs/matplotlib/spkg-configure.m4 b/build/pkgs/matplotlib/spkg-configure.m4
+new file mode 100644
+index 00000000..39c2d29
+--- /dev/null
++++ b/build/pkgs/matplotlib/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([matplotlib], [
++  SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull], [
++    SAGE_PYTHON_PACKAGE_CHECK([matplotlib])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7834dc3ac349201af632f89a9de7cd1967931010 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:35:00 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for bleach.
+
+---
+ build/pkgs/bleach/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/bleach/spkg-configure.m4
+
+diff --git a/build/pkgs/bleach/spkg-configure.m4 b/build/pkgs/bleach/spkg-configure.m4
+new file mode 100644
+index 00000000..3c9bb26
+--- /dev/null
++++ b/build/pkgs/bleach/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([bleach], [SAGE_PYTHON_PACKAGE_CHECK([bleach])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 84cad343287a2c69a4a21b9fa3b92301ff88645b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:37:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for decorator.
+
+---
+ build/pkgs/decorator/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/decorator/spkg-configure.m4
+
+diff --git a/build/pkgs/decorator/spkg-configure.m4 b/build/pkgs/decorator/spkg-configure.m4
+new file mode 100644
+index 00000000..e062778
+--- /dev/null
++++ b/build/pkgs/decorator/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([decorator], [SAGE_PYTHON_PACKAGE_CHECK([decorator])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 25693212572e69d452bc95c923ada13744359eb7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:38:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for idna.
+
+---
+ build/pkgs/idna/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/idna/spkg-configure.m4
+
+diff --git a/build/pkgs/idna/spkg-configure.m4 b/build/pkgs/idna/spkg-configure.m4
+new file mode 100644
+index 00000000..9d363f2
+--- /dev/null
++++ b/build/pkgs/idna/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([idna], [SAGE_PYTHON_PACKAGE_CHECK([idna])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6d5616472f6cdc6cf496bba6fe07bd4ef44dfdaf Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:39:23 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for certifi.
+
+---
+ build/pkgs/certifi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/certifi/spkg-configure.m4
+
+diff --git a/build/pkgs/certifi/spkg-configure.m4 b/build/pkgs/certifi/spkg-configure.m4
+new file mode 100644
+index 00000000..ddd4061
+--- /dev/null
++++ b/build/pkgs/certifi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([certifi], [SAGE_PYTHON_PACKAGE_CHECK([certifi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9412a07023b275e29e8d1af9b8ee3e767042e7fd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:40:59 -0400
+Subject: Trac #29665: new spkg-configure.m4 for pillow.
+
+This includes an SAGE_SPKG_DEPCHECK([bzip2 freetype libpng zlib],...
+because those dependencies wind up linked into shared libraries like,
+
+  /usr/.../PIL/_imagingft.cpython-39-x86_64-linux-gnu.so
+
+and potentially conflict with their SPKG counterparts.
+---
+ build/pkgs/pillow/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/pillow/spkg-configure.m4
+
+diff --git a/build/pkgs/pillow/spkg-configure.m4 b/build/pkgs/pillow/spkg-configure.m4
+new file mode 100644
+index 00000000..f2e68e2
+--- /dev/null
++++ b/build/pkgs/pillow/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([pillow], [
++  SAGE_SPKG_DEPCHECK([bzip2 freetype libpng zlib], [
++    SAGE_PYTHON_PACKAGE_CHECK([pillow])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From eede914311481fdb75b363b7a799075e876a2b4f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:44:13 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for mpmath.
+
+---
+ build/pkgs/mpmath/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mpmath/spkg-configure.m4
+
+diff --git a/build/pkgs/mpmath/spkg-configure.m4 b/build/pkgs/mpmath/spkg-configure.m4
+new file mode 100644
+index 00000000..f43c838
+--- /dev/null
++++ b/build/pkgs/mpmath/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([mpmath], [SAGE_PYTHON_PACKAGE_CHECK([mpmath])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 363a825885832c0b580ff53fe61f5c79e70c4728 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:44:56 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for sympy.
+
+---
+ build/pkgs/sympy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sympy/spkg-configure.m4
+
+diff --git a/build/pkgs/sympy/spkg-configure.m4 b/build/pkgs/sympy/spkg-configure.m4
+new file mode 100644
+index 00000000..fa0f1f5
+--- /dev/null
++++ b/build/pkgs/sympy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([sympy], [SAGE_PYTHON_PACKAGE_CHECK([sympy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0667964c914e4a01dda697190a054ff96cea92d6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:47:06 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pygments.
+
+---
+ build/pkgs/pygments/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pygments/spkg-configure.m4
+
+diff --git a/build/pkgs/pygments/spkg-configure.m4 b/build/pkgs/pygments/spkg-configure.m4
+new file mode 100644
+index 00000000..99f29e3
+--- /dev/null
++++ b/build/pkgs/pygments/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pygments], [SAGE_PYTHON_PACKAGE_CHECK([pygments])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f787c233aa05d8e90f7c6ad18f76bd2fa36bfbfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:48:50 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for jinja2.
+
+---
+ build/pkgs/jinja2/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jinja2/spkg-configure.m4
+
+diff --git a/build/pkgs/jinja2/spkg-configure.m4 b/build/pkgs/jinja2/spkg-configure.m4
+new file mode 100644
+index 00000000..0970d1c
+--- /dev/null
++++ b/build/pkgs/jinja2/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jinja2], [SAGE_PYTHON_PACKAGE_CHECK([jinja2])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 309d8f8e2b7078b5efbbe824b69ec1d9b1e639f0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:43:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pandocfilters.
+
+---
+ build/pkgs/pandocfilters/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/pandocfilters/spkg-configure.m4
+
+diff --git a/build/pkgs/pandocfilters/spkg-configure.m4 b/build/pkgs/pandocfilters/spkg-configure.m4
+new file mode 100644
+index 00000000..3e9537f
+--- /dev/null
++++ b/build/pkgs/pandocfilters/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([pandocfilters], [
++  SAGE_PYTHON_PACKAGE_CHECK([pandocfilters])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f57bfda49777a6ba1cd123553acd75dc347c5521 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:44:46 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for webencodings.
+
+---
+ build/pkgs/webencodings/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/webencodings/spkg-configure.m4
+
+diff --git a/build/pkgs/webencodings/spkg-configure.m4 b/build/pkgs/webencodings/spkg-configure.m4
+new file mode 100644
+index 00000000..1b9a5c4
+--- /dev/null
++++ b/build/pkgs/webencodings/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([webencodings], [
++  SAGE_PYTHON_PACKAGE_CHECK([webencodings])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7f193a62d7a2ea0b6a3ca6beb12390d91c25bbfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:48:26 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pytz.
+
+---
+ build/pkgs/pytz/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pytz/spkg-configure.m4
+
+diff --git a/build/pkgs/pytz/spkg-configure.m4 b/build/pkgs/pytz/spkg-configure.m4
+new file mode 100644
+index 00000000..366521b
+--- /dev/null
++++ b/build/pkgs/pytz/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pytz], [SAGE_PYTHON_PACKAGE_CHECK([pytz])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bfd3fdd887c3465c03465248de4997eed4a82915 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:51:16 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for texttable.
+
+---
+ build/pkgs/texttable/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/texttable/spkg-configure.m4
+
+diff --git a/build/pkgs/texttable/spkg-configure.m4 b/build/pkgs/texttable/spkg-configure.m4
+new file mode 100644
+index 00000000..42a3de1
+--- /dev/null
++++ b/build/pkgs/texttable/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([texttable], [SAGE_PYTHON_PACKAGE_CHECK([texttable])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 914bf0cc57abc46129b27c1525782dbe16da31a2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:53:41 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for babel.
+
+---
+ build/pkgs/babel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/babel/spkg-configure.m4
+
+diff --git a/build/pkgs/babel/spkg-configure.m4 b/build/pkgs/babel/spkg-configure.m4
+new file mode 100644
+index 00000000..d7b9a71
+--- /dev/null
++++ b/build/pkgs/babel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([babel], [SAGE_PYTHON_PACKAGE_CHECK([babel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 56977abd1eafbc87c765a2892cfe525382648259 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 14 Oct 2021 08:06:59 -0400
+Subject: Trac #29665: force system python3 with --enable-system-site-packages.
+
+When the python SPKG is used, the --enable-system-site-packages flag
+will essentially do nothing, and that may confuse users who have
+wasted a few hours building sage. (Generally, they will want to fix
+detection of their system python3 first.)
+
+To forestall that, we now set "--with-system-python3=force" whenever
+the "--enable-system-site-packages" flag is passed.
+---
+ configure.ac | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index db30a91..6fafb83 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -438,10 +438,19 @@ AC_ARG_ENABLE([download-from-upstream-url],
+ AC_ARG_ENABLE(
+   [system-site-packages], [AS_HELP_STRING(
+     [--enable-system-site-packages],
+-    [allow sage to use python packages from the system (experimental; default: no)]
++    [allow the use of python packages from the system (experimental; default: no)]
+   )], [
+   AS_IF([test "x$enable_system_site_packages" = "xyes"], [
+     SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
++
++    dnl We want to raise an error if the user asked for "system site
++    dnl packages" but the system python will not be used. Technically
++    dnl that causes no problems (SAGE_PYTHON_PACKAGE_CHECK always fails,
++    dnl so SPKGs are used for all python packages), but it may be confusing
++    dnl to end users who expect the flag to actually give them access to
++    dnl their system python packages and who may not be paying close
++    dnl attention to their ./configure output.
++    with_system_python3="force"
+   ])
+ ])
+ AC_SUBST([SAGE_VENV_FLAGS])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 02b369fd24ef7cf8997082e7850b9cf022cae34b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 01:18:35 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for setuptools.
+
+---
+ build/pkgs/setuptools/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/setuptools/spkg-configure.m4
+
+diff --git a/build/pkgs/setuptools/spkg-configure.m4 b/build/pkgs/setuptools/spkg-configure.m4
+new file mode 100644
+index 00000000..a2ad811
+--- /dev/null
++++ b/build/pkgs/setuptools/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([setuptools], [SAGE_PYTHON_PACKAGE_CHECK([setuptools])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 05117317d38693978efaf36e81d8b02bae44b257 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 01:15:48 -0400
+Subject: Trac #29665: poison PYTHONUSERBASE when testing for "system"
+ packages.
+
+When we're detecting system installations of python packages, we want
+to hide anything that was installed with e.g. "pip install --user". To
+accomplish that, we mimic the PYTHONUSERBASE poisoning from sage-env
+within the SAGE_PYTHON_PACKAGE_CHECK() macro.
+---
+ m4/sage_python_package_check.m4 | 18 +++++++++++++++++-
+ 1 file changed, 17 insertions(+), 1 deletion(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 77b0a0c..b8cdba4 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -38,11 +38,27 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     dnl package.
+     SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
+     AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++
++    dnl To prevent user-site (pip install --user) packages from being
++    dnl detected as "system" packages, we poison PYTHONUSERBASE. The
++    dnl sage-env script also does this at runtime; we mimic that
++    dnl implementation to ensure that the behaviors at ./configure and
++    dnl runtime are identical. Beware that (as in sage-env) the poisoning
++    dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
++    dnl user points PYTHONUSERBASE to any path (even the default), then
++    dnl his local pip packages will be detected.
++    PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
++    AS_IF([test -z "${PYTHONUSERBASE}"], [
++      PYTHONUSERBASE="${HOME}/.sage/local"
++    ])
++
+     AS_IF(
+-      ["${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())"],
++      [PYTHONUSERBASE="${PYTHONUSERBASE}" "${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" 2>/dev/null],
+       [AC_MSG_RESULT(yes)],
+       [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+     )
++
++    PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d75c1492f63a584b5ec5f424ddd7f7c4a6d502d3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:20:04 -0400
+Subject: Trac #29665: run SAGE_PYTHON_PACKAGE_CHECK() inside a venv.
+
+To recreate the runtime environment as closely as possible, we now use
+a venv (with system site packages enabled) when checking for system
+copies of python packages.
+---
+ m4/sage_python_package_check.m4 | 76 +++++++++++++++++++++++++++--------------
+ 1 file changed, 51 insertions(+), 25 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index b8cdba4..7cbd6c0 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -15,9 +15,11 @@
+ #
+ #     2. If we are not using the system python (no $PYTHON_FOR_VENV),
+ #
+-#     3. If setuptools is not available to the system python,
++#     3. If we are unable to create a venv with the system python,
+ #
+-#     4. If the contents of install-requires.txt are not met (wrong
++#     4. If setuptools is not available to the system python,
++#
++#     5. If the contents of install-requires.txt are not met (wrong
+ #        version, no version, etc.) by the system python.
+ #
+ #   In any of those cases, we set sage_spkg_install_$package to "yes"
+@@ -27,38 +29,62 @@
+ #
+ #   The SAGE_SPKG_CONFIGURE_PYTHON3() macro is AC_REQUIRE'd to ensure
+ #   that $PYTHON_FOR_VENV is available, if it is going to be available.
++#   The check is run inside a new venv, and with the PYTHONUSERBASE
++#   variable poisoned in the same manner as sage-env poisons it, to
++#   ensure that the ./configure- and run-time views of the system
++#   are as similar as possible.
+ #
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
+     AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
+ 
+-    dnl strip all comments from install-requires.txt; this should leave
+-    dnl only a single line containing the version specification for this
+-    dnl package.
+-    SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
+-    AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++    dnl We run this check inside a python venv, because that's ultimately
++    dnl how the system $PYTHON_FOR_VENV will be used.
++    AC_MSG_CHECKING([if we can create a python venv in config.venv])
+ 
+-    dnl To prevent user-site (pip install --user) packages from being
+-    dnl detected as "system" packages, we poison PYTHONUSERBASE. The
+-    dnl sage-env script also does this at runtime; we mimic that
+-    dnl implementation to ensure that the behaviors at ./configure and
+-    dnl runtime are identical. Beware that (as in sage-env) the poisoning
+-    dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
+-    dnl user points PYTHONUSERBASE to any path (even the default), then
+-    dnl his local pip packages will be detected.
+-    PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
+-    AS_IF([test -z "${PYTHONUSERBASE}"], [
+-      PYTHONUSERBASE="${HOME}/.sage/local"
+-    ])
++    dnl Use --clear because ./configure typically clobbers its output files.
++    AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
++                                        --clear                dnl
++                                        --without-pip          dnl
++					config.venv], [
++      AC_MSG_RESULT(yes)
++      dnl strip all comments from install-requires.txt; this should leave
++      dnl only a single line containing the version specification for this
++      dnl package.
++      SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
++      AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++
++      dnl To prevent user-site (pip install --user) packages from being
++      dnl detected as "system" packages, we poison PYTHONUSERBASE. The
++      dnl sage-env script also does this at runtime; we mimic that
++      dnl implementation to ensure that the behaviors at ./configure and
++      dnl runtime are identical. Beware that (as in sage-env) the poisoning
++      dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
++      dnl user points PYTHONUSERBASE to any path (even the default), then
++      dnl his local pip packages will be detected.
++      PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
++      AS_IF([test -z "${PYTHONUSERBASE}"], [
++        PYTHONUSERBASE="${HOME}/.sage/local"
++      ])
+ 
+-    AS_IF(
+-      [PYTHONUSERBASE="${PYTHONUSERBASE}" "${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" 2>/dev/null],
+-      [AC_MSG_RESULT(yes)],
+-      [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+-    )
++      AS_IF(
++        [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
++           "from setuptools.version import pkg_resources;              dnl
++            pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" dnl
++	 2>/dev/null],
++        [AC_MSG_RESULT(yes)],
++        [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
++      )
++
++      PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
++    ], [
++      dnl failed to create a venv for some reason
++      AC_MSG_RESULT(no)
++      sage_spkg_install_$1=yes
++    ])
+ 
+-    PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
++    rm -rf config.venv
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 87646c3264a04ffd98a12d67074f93e1943a1e96 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:38:08 -0400
+Subject: Trac #29665: log SAGE_PYTHON_PACKAGE_CHECK() failures to config.log.
+
+---
+ m4/sage_python_package_check.m4 | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 7cbd6c0..e0e0b9f 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -47,7 +47,8 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
+                                         --clear                dnl
+                                         --without-pip          dnl
+-					config.venv], [
++                                        config.venv            dnl
++                                        2>&AS_MESSAGE_LOG_FD], [
+       AC_MSG_RESULT(yes)
+       dnl strip all comments from install-requires.txt; this should leave
+       dnl only a single line containing the version specification for this
+@@ -72,7 +73,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+         [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
+            "from setuptools.version import pkg_resources;              dnl
+             pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" dnl
+-	 2>/dev/null],
++	 2>&AS_MESSAGE_LOG_FD],
+         [AC_MSG_RESULT(yes)],
+         [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+       )
+-- 
+cgit v1.0-1-gd88e
+
+
+From f7dfffd1c64816e2ae4e0f420b22065c5c5bf2cb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:45:37 -0400
+Subject: Trac #29665: don't clobber a plain file named config.venv.
+
+When SAGE_PYTHON_PACKAGE_CHECK() is cleaning up, we no longer remove
+"config.venv" unconditionally. Instead, we remove it only if it is a
+directory. This is also how "pyvenv --clear" works.
+---
+ m4/sage_python_package_check.m4 | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index e0e0b9f..127a078 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -85,7 +85,9 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+       sage_spkg_install_$1=yes
+     ])
+ 
+-    rm -rf config.venv
++    dnl Clean up config.venv, but only if we could have created it.
++    dnl (The --clear flag to pyvenv will not clobber a plain file.)
++    AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9849c77313b895dcfb786d2ea54e36585bd31ce2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 16 Oct 2021 08:14:42 -0400
+Subject: Trac #29665: don't announce system python packages that won't be
+ used.
+
+When --enable-system-site-packages was not given, the python packages
+using SAGE_PYTHON_PACKAGE_CHECK() in spkg-configure.m4 cannot be used.
+Rather than suggest that users install them anyway, that macro now
+hacks the value of sage_use_system_$package to be "no" when the use
+of system site packages is disabled at the python level.
+---
+ m4/sage_python_package_check.m4 | 17 +++++++++++++++++
+ 1 file changed, 17 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 127a078..7ee82a7 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -89,6 +89,23 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     dnl (The --clear flag to pyvenv will not clobber a plain file.)
+     AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
++    dnl System site packages are disabled.
+     sage_spkg_install_$1=yes
++
++    dnl We have to retroactively hack the --with-system-foo={no,yes,force}
++    dnl mechanism here because it wasn't designed with the ability to
++    dnl disable arbitrary chunks of system packages in mind. The easy cases
++    dnl are "no" and "force" which require no action; "no" means we won't
++    dnl suggest the package anyway, and "force" will raise an error when
++    dnl the system-package check fails.
++    dnl
++    dnl The default of "yes" is more troubling because it is the default. To
++    dnl avoid prompting users to install packages that won't be used, we want
++    dnl to ignore "yes" when reporting the "hint: install these packages..."
++    dnl at the end of ./configure. To accomplish that, we change "yes" to
++    dnl "no" here, essentially changing the default for packages using this
++    dnl macro when --enable-system-site-packages is disabled. Packages with
++    dnl "no" are not suggested to the user.
++    AS_IF([test "${sage_use_system_$1}" = "yes"],[sage_use_system_$1=no])
+   ])
+ ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3e6ad737b94aaac234d615ecaf1a2455eb607f1a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 17 Oct 2021 06:16:21 -0400
+Subject: Trac #29665: add Gentoo package information for python packages.
+
+---
+ build/pkgs/babel/distros/gentoo.txt         | 1 +
+ build/pkgs/bleach/distros/gentoo.txt        | 1 +
+ build/pkgs/certifi/distros/gentoo.txt       | 1 +
+ build/pkgs/cvxopt/distros/gentoo.txt        | 1 +
+ build/pkgs/decorator/distros/gentoo.txt     | 1 +
+ build/pkgs/html5lib/distros/gentoo.txt      | 1 +
+ build/pkgs/idna/distros/gentoo.txt          | 1 +
+ build/pkgs/jinja2/distros/gentoo.txt        | 1 +
+ build/pkgs/matplotlib/distros/gentoo.txt    | 1 +
+ build/pkgs/mpmath/distros/gentoo.txt        | 1 +
+ build/pkgs/networkx/distros/gentoo.txt      | 1 +
+ build/pkgs/numpy/distros/gentoo.txt         | 1 +
+ build/pkgs/packaging/distros/gentoo.txt     | 1 +
+ build/pkgs/pandocfilters/distros/gentoo.txt | 1 +
+ build/pkgs/pickleshare/distros/gentoo.txt   | 1 +
+ build/pkgs/pillow/distros/gentoo.txt        | 1 +
+ build/pkgs/pluggy/distros/gentoo.txt        | 1 +
+ build/pkgs/pygments/distros/gentoo.txt      | 1 +
+ build/pkgs/pytz/distros/gentoo.txt          | 1 +
+ build/pkgs/pyzmq/distros/gentoo.txt         | 1 +
+ build/pkgs/requests/distros/gentoo.txt      | 1 +
+ build/pkgs/scipy/distros/gentoo.txt         | 1 +
+ build/pkgs/setuptools/distros/gentoo.txt    | 1 +
+ build/pkgs/six/distros/gentoo.txt           | 1 +
+ build/pkgs/sympy/distros/gentoo.txt         | 1 +
+ build/pkgs/texttable/distros/gentoo.txt     | 1 +
+ build/pkgs/toml/distros/gentoo.txt          | 1 +
+ build/pkgs/webencodings/distros/gentoo.txt  | 1 +
+ 28 files changed, 28 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/gentoo.txt
+ create mode 100644 build/pkgs/bleach/distros/gentoo.txt
+ create mode 100644 build/pkgs/certifi/distros/gentoo.txt
+ create mode 100644 build/pkgs/cvxopt/distros/gentoo.txt
+ create mode 100644 build/pkgs/decorator/distros/gentoo.txt
+ create mode 100644 build/pkgs/html5lib/distros/gentoo.txt
+ create mode 100644 build/pkgs/idna/distros/gentoo.txt
+ create mode 100644 build/pkgs/jinja2/distros/gentoo.txt
+ create mode 100644 build/pkgs/matplotlib/distros/gentoo.txt
+ create mode 100644 build/pkgs/mpmath/distros/gentoo.txt
+ create mode 100644 build/pkgs/networkx/distros/gentoo.txt
+ create mode 100644 build/pkgs/numpy/distros/gentoo.txt
+ create mode 100644 build/pkgs/packaging/distros/gentoo.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/gentoo.txt
+ create mode 100644 build/pkgs/pickleshare/distros/gentoo.txt
+ create mode 100644 build/pkgs/pillow/distros/gentoo.txt
+ create mode 100644 build/pkgs/pluggy/distros/gentoo.txt
+ create mode 100644 build/pkgs/pygments/distros/gentoo.txt
+ create mode 100644 build/pkgs/pytz/distros/gentoo.txt
+ create mode 100644 build/pkgs/pyzmq/distros/gentoo.txt
+ create mode 100644 build/pkgs/requests/distros/gentoo.txt
+ create mode 100644 build/pkgs/scipy/distros/gentoo.txt
+ create mode 100644 build/pkgs/setuptools/distros/gentoo.txt
+ create mode 100644 build/pkgs/six/distros/gentoo.txt
+ create mode 100644 build/pkgs/sympy/distros/gentoo.txt
+ create mode 100644 build/pkgs/texttable/distros/gentoo.txt
+ create mode 100644 build/pkgs/toml/distros/gentoo.txt
+ create mode 100644 build/pkgs/webencodings/distros/gentoo.txt
+
+diff --git a/build/pkgs/babel/distros/gentoo.txt b/build/pkgs/babel/distros/gentoo.txt
+new file mode 100644
+index 00000000..2d2c34f
+--- /dev/null
++++ b/build/pkgs/babel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/Babel
+diff --git a/build/pkgs/bleach/distros/gentoo.txt b/build/pkgs/bleach/distros/gentoo.txt
+new file mode 100644
+index 00000000..b4f9744
+--- /dev/null
++++ b/build/pkgs/bleach/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/bleach
+diff --git a/build/pkgs/certifi/distros/gentoo.txt b/build/pkgs/certifi/distros/gentoo.txt
+new file mode 100644
+index 00000000..72e2e91
+--- /dev/null
++++ b/build/pkgs/certifi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/certifi
+diff --git a/build/pkgs/cvxopt/distros/gentoo.txt b/build/pkgs/cvxopt/distros/gentoo.txt
+new file mode 100644
+index 00000000..b312391
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/cvxopt
+diff --git a/build/pkgs/decorator/distros/gentoo.txt b/build/pkgs/decorator/distros/gentoo.txt
+new file mode 100644
+index 00000000..fea5a67
+--- /dev/null
++++ b/build/pkgs/decorator/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/decorator
+diff --git a/build/pkgs/html5lib/distros/gentoo.txt b/build/pkgs/html5lib/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c2be76
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/html5lib
+diff --git a/build/pkgs/idna/distros/gentoo.txt b/build/pkgs/idna/distros/gentoo.txt
+new file mode 100644
+index 00000000..68ef51c
+--- /dev/null
++++ b/build/pkgs/idna/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/idna
+diff --git a/build/pkgs/jinja2/distros/gentoo.txt b/build/pkgs/jinja2/distros/gentoo.txt
+new file mode 100644
+index 00000000..15a27ae
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jinja
+diff --git a/build/pkgs/matplotlib/distros/gentoo.txt b/build/pkgs/matplotlib/distros/gentoo.txt
+new file mode 100644
+index 00000000..bcfefb5
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/matplotlib
+diff --git a/build/pkgs/mpmath/distros/gentoo.txt b/build/pkgs/mpmath/distros/gentoo.txt
+new file mode 100644
+index 00000000..946c62d
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/mpmath
+diff --git a/build/pkgs/networkx/distros/gentoo.txt b/build/pkgs/networkx/distros/gentoo.txt
+new file mode 100644
+index 00000000..dd97742
+--- /dev/null
++++ b/build/pkgs/networkx/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/networkx
+diff --git a/build/pkgs/numpy/distros/gentoo.txt b/build/pkgs/numpy/distros/gentoo.txt
+new file mode 100644
+index 00000000..d2179d4
+--- /dev/null
++++ b/build/pkgs/numpy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/numpy
+diff --git a/build/pkgs/packaging/distros/gentoo.txt b/build/pkgs/packaging/distros/gentoo.txt
+new file mode 100644
+index 00000000..e5309ed
+--- /dev/null
++++ b/build/pkgs/packaging/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/packaging
+diff --git a/build/pkgs/pandocfilters/distros/gentoo.txt b/build/pkgs/pandocfilters/distros/gentoo.txt
+new file mode 100644
+index 00000000..a726fda
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/gentoo.txt b/build/pkgs/pickleshare/distros/gentoo.txt
+new file mode 100644
+index 00000000..14fad0f
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pickleshare
+diff --git a/build/pkgs/pillow/distros/gentoo.txt b/build/pkgs/pillow/distros/gentoo.txt
+new file mode 100644
+index 00000000..1243649
+--- /dev/null
++++ b/build/pkgs/pillow/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pillow
+diff --git a/build/pkgs/pluggy/distros/gentoo.txt b/build/pkgs/pluggy/distros/gentoo.txt
+new file mode 100644
+index 00000000..7b33876
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pluggy
+diff --git a/build/pkgs/pygments/distros/gentoo.txt b/build/pkgs/pygments/distros/gentoo.txt
+new file mode 100644
+index 00000000..a584f32
+--- /dev/null
++++ b/build/pkgs/pygments/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pygments
+diff --git a/build/pkgs/pytz/distros/gentoo.txt b/build/pkgs/pytz/distros/gentoo.txt
+new file mode 100644
+index 00000000..902a18b
+--- /dev/null
++++ b/build/pkgs/pytz/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pytz
+diff --git a/build/pkgs/pyzmq/distros/gentoo.txt b/build/pkgs/pyzmq/distros/gentoo.txt
+new file mode 100644
+index 00000000..77c2429
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyzmq
+diff --git a/build/pkgs/requests/distros/gentoo.txt b/build/pkgs/requests/distros/gentoo.txt
+new file mode 100644
+index 00000000..d3dc941
+--- /dev/null
++++ b/build/pkgs/requests/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/requests
+diff --git a/build/pkgs/scipy/distros/gentoo.txt b/build/pkgs/scipy/distros/gentoo.txt
+new file mode 100644
+index 00000000..11dabd2
+--- /dev/null
++++ b/build/pkgs/scipy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/scipy
+diff --git a/build/pkgs/setuptools/distros/gentoo.txt b/build/pkgs/setuptools/distros/gentoo.txt
+new file mode 100644
+index 00000000..3a4fa34
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/setuptools
+diff --git a/build/pkgs/six/distros/gentoo.txt b/build/pkgs/six/distros/gentoo.txt
+new file mode 100644
+index 00000000..f73f648
+--- /dev/null
++++ b/build/pkgs/six/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/six
+diff --git a/build/pkgs/sympy/distros/gentoo.txt b/build/pkgs/sympy/distros/gentoo.txt
+new file mode 100644
+index 00000000..b5a5034
+--- /dev/null
++++ b/build/pkgs/sympy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sympy
+diff --git a/build/pkgs/texttable/distros/gentoo.txt b/build/pkgs/texttable/distros/gentoo.txt
+new file mode 100644
+index 00000000..b33a7a7
+--- /dev/null
++++ b/build/pkgs/texttable/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/texttable
+diff --git a/build/pkgs/toml/distros/gentoo.txt b/build/pkgs/toml/distros/gentoo.txt
+new file mode 100644
+index 00000000..64fcea3
+--- /dev/null
++++ b/build/pkgs/toml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/toml
+diff --git a/build/pkgs/webencodings/distros/gentoo.txt b/build/pkgs/webencodings/distros/gentoo.txt
+new file mode 100644
+index 00000000..7539b0f
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/webencodings
+-- 
+cgit v1.0-1-gd88e
+
+
+From 088380f884124c9608160b613ba031c5f023f604 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 18:43:04 -0700
+Subject: build/pkgs: Add distros/fedora.txt for Python packages
+
+---
+ build/pkgs/babel/distros/fedora.txt         | 1 +
+ build/pkgs/bleach/distros/fedora.txt        | 1 +
+ build/pkgs/certifi/distros/fedora.txt       | 1 +
+ build/pkgs/cvxopt/distros/fedora.txt        | 1 +
+ build/pkgs/decorator/distros/fedora.txt     | 1 +
+ build/pkgs/html5lib/distros/fedora.txt      | 1 +
+ build/pkgs/idna/distros/fedora.txt          | 1 +
+ build/pkgs/jinja2/distros/fedora.txt        | 1 +
+ build/pkgs/matplotlib/distros/fedora.txt    | 1 +
+ build/pkgs/mpmath/distros/fedora.txt        | 1 +
+ build/pkgs/networkx/distros/fedora.txt      | 1 +
+ build/pkgs/numpy/distros/fedora.txt         | 1 +
+ build/pkgs/packaging/distros/fedora.txt     | 1 +
+ build/pkgs/pandocfilters/distros/fedora.txt | 1 +
+ build/pkgs/pickleshare/distros/fedora.txt   | 1 +
+ build/pkgs/pillow/distros/fedora.txt        | 1 +
+ build/pkgs/pluggy/distros/fedora.txt        | 1 +
+ build/pkgs/py/distros/fedora.txt            | 1 +
+ build/pkgs/pygments/distros/fedora.txt      | 1 +
+ build/pkgs/pytz/distros/fedora.txt          | 1 +
+ build/pkgs/pyzmq/distros/fedora.txt         | 1 +
+ build/pkgs/requests/distros/fedora.txt      | 1 +
+ build/pkgs/scipy/distros/fedora.txt         | 1 +
+ build/pkgs/setuptools/distros/fedora.txt    | 1 +
+ build/pkgs/six/distros/fedora.txt           | 1 +
+ build/pkgs/sympy/distros/fedora.txt         | 1 +
+ build/pkgs/texttable/distros/fedora.txt     | 1 +
+ build/pkgs/toml/distros/fedora.txt          | 1 +
+ build/pkgs/webencodings/distros/fedora.txt  | 1 +
+ build/pkgs/wheel/distros/fedora.txt         | 1 +
+ 30 files changed, 30 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/fedora.txt
+ create mode 100644 build/pkgs/bleach/distros/fedora.txt
+ create mode 100644 build/pkgs/certifi/distros/fedora.txt
+ create mode 100644 build/pkgs/cvxopt/distros/fedora.txt
+ create mode 100644 build/pkgs/decorator/distros/fedora.txt
+ create mode 100644 build/pkgs/html5lib/distros/fedora.txt
+ create mode 100644 build/pkgs/idna/distros/fedora.txt
+ create mode 100644 build/pkgs/jinja2/distros/fedora.txt
+ create mode 100644 build/pkgs/matplotlib/distros/fedora.txt
+ create mode 100644 build/pkgs/mpmath/distros/fedora.txt
+ create mode 100644 build/pkgs/networkx/distros/fedora.txt
+ create mode 100644 build/pkgs/numpy/distros/fedora.txt
+ create mode 100644 build/pkgs/packaging/distros/fedora.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/fedora.txt
+ create mode 100644 build/pkgs/pickleshare/distros/fedora.txt
+ create mode 100644 build/pkgs/pillow/distros/fedora.txt
+ create mode 100644 build/pkgs/pluggy/distros/fedora.txt
+ create mode 100644 build/pkgs/py/distros/fedora.txt
+ create mode 100644 build/pkgs/pygments/distros/fedora.txt
+ create mode 100644 build/pkgs/pytz/distros/fedora.txt
+ create mode 100644 build/pkgs/pyzmq/distros/fedora.txt
+ create mode 100644 build/pkgs/requests/distros/fedora.txt
+ create mode 100644 build/pkgs/scipy/distros/fedora.txt
+ create mode 100644 build/pkgs/setuptools/distros/fedora.txt
+ create mode 100644 build/pkgs/six/distros/fedora.txt
+ create mode 100644 build/pkgs/sympy/distros/fedora.txt
+ create mode 100644 build/pkgs/texttable/distros/fedora.txt
+ create mode 100644 build/pkgs/toml/distros/fedora.txt
+ create mode 100644 build/pkgs/webencodings/distros/fedora.txt
+ create mode 100644 build/pkgs/wheel/distros/fedora.txt
+
+diff --git a/build/pkgs/babel/distros/fedora.txt b/build/pkgs/babel/distros/fedora.txt
+new file mode 100644
+index 00000000..98f6593
+--- /dev/null
++++ b/build/pkgs/babel/distros/fedora.txt
+@@ -0,0 +1 @@
++babel
+diff --git a/build/pkgs/bleach/distros/fedora.txt b/build/pkgs/bleach/distros/fedora.txt
+new file mode 100644
+index 00000000..c5422cc
+--- /dev/null
++++ b/build/pkgs/bleach/distros/fedora.txt
+@@ -0,0 +1 @@
++python-bleach
+diff --git a/build/pkgs/certifi/distros/fedora.txt b/build/pkgs/certifi/distros/fedora.txt
+new file mode 100644
+index 00000000..be421c8
+--- /dev/null
++++ b/build/pkgs/certifi/distros/fedora.txt
+@@ -0,0 +1 @@
++python-certifi
+diff --git a/build/pkgs/cvxopt/distros/fedora.txt b/build/pkgs/cvxopt/distros/fedora.txt
+new file mode 100644
+index 00000000..f15770f
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/fedora.txt
+@@ -0,0 +1 @@
++python-cvxopt
+diff --git a/build/pkgs/decorator/distros/fedora.txt b/build/pkgs/decorator/distros/fedora.txt
+new file mode 100644
+index 00000000..0795604
+--- /dev/null
++++ b/build/pkgs/decorator/distros/fedora.txt
+@@ -0,0 +1 @@
++python-decorator
+diff --git a/build/pkgs/html5lib/distros/fedora.txt b/build/pkgs/html5lib/distros/fedora.txt
+new file mode 100644
+index 00000000..b821491
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/fedora.txt
+@@ -0,0 +1 @@
++python-html5lib
+diff --git a/build/pkgs/idna/distros/fedora.txt b/build/pkgs/idna/distros/fedora.txt
+new file mode 100644
+index 00000000..a73e70c
+--- /dev/null
++++ b/build/pkgs/idna/distros/fedora.txt
+@@ -0,0 +1 @@
++python-idna
+diff --git a/build/pkgs/jinja2/distros/fedora.txt b/build/pkgs/jinja2/distros/fedora.txt
+new file mode 100644
+index 00000000..f5f3caf
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/fedora.txt
+@@ -0,0 +1 @@
++python-jinja2
+diff --git a/build/pkgs/matplotlib/distros/fedora.txt b/build/pkgs/matplotlib/distros/fedora.txt
+new file mode 100644
+index 00000000..f6d856e
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/fedora.txt
+@@ -0,0 +1 @@
++python-matplotlib
+diff --git a/build/pkgs/mpmath/distros/fedora.txt b/build/pkgs/mpmath/distros/fedora.txt
+new file mode 100644
+index 00000000..a7dc8d5
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/fedora.txt
+@@ -0,0 +1 @@
++python-mpmath
+diff --git a/build/pkgs/networkx/distros/fedora.txt b/build/pkgs/networkx/distros/fedora.txt
+new file mode 100644
+index 00000000..293f943
+--- /dev/null
++++ b/build/pkgs/networkx/distros/fedora.txt
+@@ -0,0 +1 @@
++python-networkx
+diff --git a/build/pkgs/numpy/distros/fedora.txt b/build/pkgs/numpy/distros/fedora.txt
+new file mode 100644
+index 00000000..c8722b9
+--- /dev/null
++++ b/build/pkgs/numpy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-numpy
+diff --git a/build/pkgs/packaging/distros/fedora.txt b/build/pkgs/packaging/distros/fedora.txt
+new file mode 100644
+index 00000000..02ad855
+--- /dev/null
++++ b/build/pkgs/packaging/distros/fedora.txt
+@@ -0,0 +1 @@
++python-packaging
+diff --git a/build/pkgs/pandocfilters/distros/fedora.txt b/build/pkgs/pandocfilters/distros/fedora.txt
+new file mode 100644
+index 00000000..e7a86d0
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/fedora.txt b/build/pkgs/pickleshare/distros/fedora.txt
+new file mode 100644
+index 00000000..6d991a2
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pickleshare
+diff --git a/build/pkgs/pillow/distros/fedora.txt b/build/pkgs/pillow/distros/fedora.txt
+new file mode 100644
+index 00000000..86dbb1d
+--- /dev/null
++++ b/build/pkgs/pillow/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pillow
+diff --git a/build/pkgs/pluggy/distros/fedora.txt b/build/pkgs/pluggy/distros/fedora.txt
+new file mode 100644
+index 00000000..c869e54
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pluggy
+diff --git a/build/pkgs/py/distros/fedora.txt b/build/pkgs/py/distros/fedora.txt
+new file mode 100644
+index 00000000..b348d39
+--- /dev/null
++++ b/build/pkgs/py/distros/fedora.txt
+@@ -0,0 +1 @@
++python-py
+diff --git a/build/pkgs/pygments/distros/fedora.txt b/build/pkgs/pygments/distros/fedora.txt
+new file mode 100644
+index 00000000..f3e72a8
+--- /dev/null
++++ b/build/pkgs/pygments/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pygments
+diff --git a/build/pkgs/pytz/distros/fedora.txt b/build/pkgs/pytz/distros/fedora.txt
+new file mode 100644
+index 00000000..2cccc9e
+--- /dev/null
++++ b/build/pkgs/pytz/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pytz
+diff --git a/build/pkgs/pyzmq/distros/fedora.txt b/build/pkgs/pyzmq/distros/fedora.txt
+new file mode 100644
+index 00000000..23f64d1
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pyzmq
+diff --git a/build/pkgs/requests/distros/fedora.txt b/build/pkgs/requests/distros/fedora.txt
+new file mode 100644
+index 00000000..93a7bc1
+--- /dev/null
++++ b/build/pkgs/requests/distros/fedora.txt
+@@ -0,0 +1 @@
++python-requests
+diff --git a/build/pkgs/scipy/distros/fedora.txt b/build/pkgs/scipy/distros/fedora.txt
+new file mode 100644
+index 00000000..7ff2882
+--- /dev/null
++++ b/build/pkgs/scipy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-scipy
+diff --git a/build/pkgs/setuptools/distros/fedora.txt b/build/pkgs/setuptools/distros/fedora.txt
+new file mode 100644
+index 00000000..e1ad178
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/fedora.txt
+@@ -0,0 +1 @@
++python-setuptools
+diff --git a/build/pkgs/six/distros/fedora.txt b/build/pkgs/six/distros/fedora.txt
+new file mode 100644
+index 00000000..787c530
+--- /dev/null
++++ b/build/pkgs/six/distros/fedora.txt
+@@ -0,0 +1 @@
++python-six
+diff --git a/build/pkgs/sympy/distros/fedora.txt b/build/pkgs/sympy/distros/fedora.txt
+new file mode 100644
+index 00000000..126c88a
+--- /dev/null
++++ b/build/pkgs/sympy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-sympy
+diff --git a/build/pkgs/texttable/distros/fedora.txt b/build/pkgs/texttable/distros/fedora.txt
+new file mode 100644
+index 00000000..8d1ccec
+--- /dev/null
++++ b/build/pkgs/texttable/distros/fedora.txt
+@@ -0,0 +1 @@
++python-texttable
+diff --git a/build/pkgs/toml/distros/fedora.txt b/build/pkgs/toml/distros/fedora.txt
+new file mode 100644
+index 00000000..821ee77
+--- /dev/null
++++ b/build/pkgs/toml/distros/fedora.txt
+@@ -0,0 +1 @@
++python-toml
+diff --git a/build/pkgs/webencodings/distros/fedora.txt b/build/pkgs/webencodings/distros/fedora.txt
+new file mode 100644
+index 00000000..12ddba9
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/fedora.txt
+@@ -0,0 +1 @@
++python-webencodings
+diff --git a/build/pkgs/wheel/distros/fedora.txt b/build/pkgs/wheel/distros/fedora.txt
+new file mode 100644
+index 00000000..ae4cbb9
+--- /dev/null
++++ b/build/pkgs/wheel/distros/fedora.txt
+@@ -0,0 +1 @@
++python-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From ad1d5a20380b147c774903066031442f31094626 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 21:04:04 -0700
+Subject: build/pkgs: Add distros/arch.txt for Python packages
+
+---
+ build/pkgs/babel/distros/arch.txt         | 1 +
+ build/pkgs/bleach/distros/arch.txt        | 1 +
+ build/pkgs/certifi/distros/arch.txt       | 1 +
+ build/pkgs/cvxopt/distros/arch.txt        | 1 +
+ build/pkgs/decorator/distros/arch.txt     | 1 +
+ build/pkgs/html5lib/distros/arch.txt      | 1 +
+ build/pkgs/idna/distros/arch.txt          | 1 +
+ build/pkgs/matplotlib/distros/arch.txt    | 1 +
+ build/pkgs/mpmath/distros/arch.txt        | 1 +
+ build/pkgs/networkx/distros/arch.txt      | 1 +
+ build/pkgs/numpy/distros/arch.txt         | 1 +
+ build/pkgs/packaging/distros/arch.txt     | 1 +
+ build/pkgs/pandocfilters/distros/arch.txt | 1 +
+ build/pkgs/pickleshare/distros/arch.txt   | 1 +
+ build/pkgs/pillow/distros/arch.txt        | 1 +
+ build/pkgs/pluggy/distros/arch.txt        | 1 +
+ build/pkgs/py/distros/arch.txt            | 1 +
+ build/pkgs/pygments/distros/arch.txt      | 1 +
+ build/pkgs/pytz/distros/arch.txt          | 1 +
+ build/pkgs/pyzmq/distros/arch.txt         | 1 +
+ build/pkgs/requests/distros/arch.txt      | 1 +
+ build/pkgs/scipy/distros/arch.txt         | 1 +
+ build/pkgs/setuptools/distros/arch.txt    | 1 +
+ build/pkgs/six/distros/arch.txt           | 1 +
+ build/pkgs/sympy/distros/arch.txt         | 1 +
+ build/pkgs/texttable/distros/arch.txt     | 1 +
+ build/pkgs/toml/distros/arch.txt          | 1 +
+ build/pkgs/webencodings/distros/arch.txt  | 1 +
+ build/pkgs/wheel/distros/arch.txt         | 1 +
+ 29 files changed, 29 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/arch.txt
+ create mode 100644 build/pkgs/bleach/distros/arch.txt
+ create mode 100644 build/pkgs/certifi/distros/arch.txt
+ create mode 100644 build/pkgs/cvxopt/distros/arch.txt
+ create mode 100644 build/pkgs/decorator/distros/arch.txt
+ create mode 100644 build/pkgs/html5lib/distros/arch.txt
+ create mode 100644 build/pkgs/idna/distros/arch.txt
+ create mode 100644 build/pkgs/matplotlib/distros/arch.txt
+ create mode 100644 build/pkgs/mpmath/distros/arch.txt
+ create mode 100644 build/pkgs/networkx/distros/arch.txt
+ create mode 100644 build/pkgs/numpy/distros/arch.txt
+ create mode 100644 build/pkgs/packaging/distros/arch.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/arch.txt
+ create mode 100644 build/pkgs/pickleshare/distros/arch.txt
+ create mode 100644 build/pkgs/pillow/distros/arch.txt
+ create mode 100644 build/pkgs/pluggy/distros/arch.txt
+ create mode 100644 build/pkgs/py/distros/arch.txt
+ create mode 100644 build/pkgs/pygments/distros/arch.txt
+ create mode 100644 build/pkgs/pytz/distros/arch.txt
+ create mode 100644 build/pkgs/pyzmq/distros/arch.txt
+ create mode 100644 build/pkgs/requests/distros/arch.txt
+ create mode 100644 build/pkgs/scipy/distros/arch.txt
+ create mode 100644 build/pkgs/setuptools/distros/arch.txt
+ create mode 100644 build/pkgs/six/distros/arch.txt
+ create mode 100644 build/pkgs/sympy/distros/arch.txt
+ create mode 100644 build/pkgs/texttable/distros/arch.txt
+ create mode 100644 build/pkgs/toml/distros/arch.txt
+ create mode 100644 build/pkgs/webencodings/distros/arch.txt
+ create mode 100644 build/pkgs/wheel/distros/arch.txt
+
+diff --git a/build/pkgs/babel/distros/arch.txt b/build/pkgs/babel/distros/arch.txt
+new file mode 100644
+index 00000000..f2d828c
+--- /dev/null
++++ b/build/pkgs/babel/distros/arch.txt
+@@ -0,0 +1 @@
++python-babel
+diff --git a/build/pkgs/bleach/distros/arch.txt b/build/pkgs/bleach/distros/arch.txt
+new file mode 100644
+index 00000000..c5422cc
+--- /dev/null
++++ b/build/pkgs/bleach/distros/arch.txt
+@@ -0,0 +1 @@
++python-bleach
+diff --git a/build/pkgs/certifi/distros/arch.txt b/build/pkgs/certifi/distros/arch.txt
+new file mode 100644
+index 00000000..be421c8
+--- /dev/null
++++ b/build/pkgs/certifi/distros/arch.txt
+@@ -0,0 +1 @@
++python-certifi
+diff --git a/build/pkgs/cvxopt/distros/arch.txt b/build/pkgs/cvxopt/distros/arch.txt
+new file mode 100644
+index 00000000..f15770f
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/arch.txt
+@@ -0,0 +1 @@
++python-cvxopt
+diff --git a/build/pkgs/decorator/distros/arch.txt b/build/pkgs/decorator/distros/arch.txt
+new file mode 100644
+index 00000000..0795604
+--- /dev/null
++++ b/build/pkgs/decorator/distros/arch.txt
+@@ -0,0 +1 @@
++python-decorator
+diff --git a/build/pkgs/html5lib/distros/arch.txt b/build/pkgs/html5lib/distros/arch.txt
+new file mode 100644
+index 00000000..b821491
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/arch.txt
+@@ -0,0 +1 @@
++python-html5lib
+diff --git a/build/pkgs/idna/distros/arch.txt b/build/pkgs/idna/distros/arch.txt
+new file mode 100644
+index 00000000..a73e70c
+--- /dev/null
++++ b/build/pkgs/idna/distros/arch.txt
+@@ -0,0 +1 @@
++python-idna
+diff --git a/build/pkgs/matplotlib/distros/arch.txt b/build/pkgs/matplotlib/distros/arch.txt
+new file mode 100644
+index 00000000..f6d856e
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/arch.txt
+@@ -0,0 +1 @@
++python-matplotlib
+diff --git a/build/pkgs/mpmath/distros/arch.txt b/build/pkgs/mpmath/distros/arch.txt
+new file mode 100644
+index 00000000..a7dc8d5
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/arch.txt
+@@ -0,0 +1 @@
++python-mpmath
+diff --git a/build/pkgs/networkx/distros/arch.txt b/build/pkgs/networkx/distros/arch.txt
+new file mode 100644
+index 00000000..293f943
+--- /dev/null
++++ b/build/pkgs/networkx/distros/arch.txt
+@@ -0,0 +1 @@
++python-networkx
+diff --git a/build/pkgs/numpy/distros/arch.txt b/build/pkgs/numpy/distros/arch.txt
+new file mode 100644
+index 00000000..c8722b9
+--- /dev/null
++++ b/build/pkgs/numpy/distros/arch.txt
+@@ -0,0 +1 @@
++python-numpy
+diff --git a/build/pkgs/packaging/distros/arch.txt b/build/pkgs/packaging/distros/arch.txt
+new file mode 100644
+index 00000000..02ad855
+--- /dev/null
++++ b/build/pkgs/packaging/distros/arch.txt
+@@ -0,0 +1 @@
++python-packaging
+diff --git a/build/pkgs/pandocfilters/distros/arch.txt b/build/pkgs/pandocfilters/distros/arch.txt
+new file mode 100644
+index 00000000..e7a86d0
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/arch.txt
+@@ -0,0 +1 @@
++python-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/arch.txt b/build/pkgs/pickleshare/distros/arch.txt
+new file mode 100644
+index 00000000..6d991a2
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/arch.txt
+@@ -0,0 +1 @@
++python-pickleshare
+diff --git a/build/pkgs/pillow/distros/arch.txt b/build/pkgs/pillow/distros/arch.txt
+new file mode 100644
+index 00000000..86dbb1d
+--- /dev/null
++++ b/build/pkgs/pillow/distros/arch.txt
+@@ -0,0 +1 @@
++python-pillow
+diff --git a/build/pkgs/pluggy/distros/arch.txt b/build/pkgs/pluggy/distros/arch.txt
+new file mode 100644
+index 00000000..c869e54
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/arch.txt
+@@ -0,0 +1 @@
++python-pluggy
+diff --git a/build/pkgs/py/distros/arch.txt b/build/pkgs/py/distros/arch.txt
+new file mode 100644
+index 00000000..b348d39
+--- /dev/null
++++ b/build/pkgs/py/distros/arch.txt
+@@ -0,0 +1 @@
++python-py
+diff --git a/build/pkgs/pygments/distros/arch.txt b/build/pkgs/pygments/distros/arch.txt
+new file mode 100644
+index 00000000..f3e72a8
+--- /dev/null
++++ b/build/pkgs/pygments/distros/arch.txt
+@@ -0,0 +1 @@
++python-pygments
+diff --git a/build/pkgs/pytz/distros/arch.txt b/build/pkgs/pytz/distros/arch.txt
+new file mode 100644
+index 00000000..2cccc9e
+--- /dev/null
++++ b/build/pkgs/pytz/distros/arch.txt
+@@ -0,0 +1 @@
++python-pytz
+diff --git a/build/pkgs/pyzmq/distros/arch.txt b/build/pkgs/pyzmq/distros/arch.txt
+new file mode 100644
+index 00000000..23f64d1
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/arch.txt
+@@ -0,0 +1 @@
++python-pyzmq
+diff --git a/build/pkgs/requests/distros/arch.txt b/build/pkgs/requests/distros/arch.txt
+new file mode 100644
+index 00000000..93a7bc1
+--- /dev/null
++++ b/build/pkgs/requests/distros/arch.txt
+@@ -0,0 +1 @@
++python-requests
+diff --git a/build/pkgs/scipy/distros/arch.txt b/build/pkgs/scipy/distros/arch.txt
+new file mode 100644
+index 00000000..7ff2882
+--- /dev/null
++++ b/build/pkgs/scipy/distros/arch.txt
+@@ -0,0 +1 @@
++python-scipy
+diff --git a/build/pkgs/setuptools/distros/arch.txt b/build/pkgs/setuptools/distros/arch.txt
+new file mode 100644
+index 00000000..e1ad178
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/arch.txt
+@@ -0,0 +1 @@
++python-setuptools
+diff --git a/build/pkgs/six/distros/arch.txt b/build/pkgs/six/distros/arch.txt
+new file mode 100644
+index 00000000..787c530
+--- /dev/null
++++ b/build/pkgs/six/distros/arch.txt
+@@ -0,0 +1 @@
++python-six
+diff --git a/build/pkgs/sympy/distros/arch.txt b/build/pkgs/sympy/distros/arch.txt
+new file mode 100644
+index 00000000..126c88a
+--- /dev/null
++++ b/build/pkgs/sympy/distros/arch.txt
+@@ -0,0 +1 @@
++python-sympy
+diff --git a/build/pkgs/texttable/distros/arch.txt b/build/pkgs/texttable/distros/arch.txt
+new file mode 100644
+index 00000000..8d1ccec
+--- /dev/null
++++ b/build/pkgs/texttable/distros/arch.txt
+@@ -0,0 +1 @@
++python-texttable
+diff --git a/build/pkgs/toml/distros/arch.txt b/build/pkgs/toml/distros/arch.txt
+new file mode 100644
+index 00000000..821ee77
+--- /dev/null
++++ b/build/pkgs/toml/distros/arch.txt
+@@ -0,0 +1 @@
++python-toml
+diff --git a/build/pkgs/webencodings/distros/arch.txt b/build/pkgs/webencodings/distros/arch.txt
+new file mode 100644
+index 00000000..12ddba9
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/arch.txt
+@@ -0,0 +1 @@
++python-webencodings
+diff --git a/build/pkgs/wheel/distros/arch.txt b/build/pkgs/wheel/distros/arch.txt
+new file mode 100644
+index 00000000..ae4cbb9
+--- /dev/null
++++ b/build/pkgs/wheel/distros/arch.txt
+@@ -0,0 +1 @@
++python-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5087abee08f2a89ddaf422ec72a84575fe724a79 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 21:20:56 -0700
+Subject: build/pkgs: Add distros/opensuse.txt for Python packages
+
+---
+ build/pkgs/bleach/distros/opensuse.txt        | 1 +
+ build/pkgs/cvxopt/distros/opensuse.txt        | 1 +
+ build/pkgs/html5lib/distros/opensuse.txt      | 1 +
+ build/pkgs/idna/distros/opensuse.txt          | 1 +
+ build/pkgs/jinja2/distros/opensuse.txt        | 2 +-
+ build/pkgs/mpmath/distros/opensuse.txt        | 1 +
+ build/pkgs/numpy/distros/opensuse.txt         | 1 +
+ build/pkgs/packaging/distros/opensuse.txt     | 1 +
+ build/pkgs/pandocfilters/distros/opensuse.txt | 1 +
+ build/pkgs/pluggy/distros/opensuse.txt        | 1 +
+ build/pkgs/py/distros/opensuse.txt            | 1 +
+ build/pkgs/pygments/distros/opensuse.txt      | 2 +-
+ build/pkgs/sympy/distros/opensuse.txt         | 1 +
+ build/pkgs/texttable/distros/opensuse.txt     | 1 +
+ build/pkgs/toml/distros/opensuse.txt          | 1 +
+ 15 files changed, 15 insertions(+), 2 deletions(-)
+ create mode 100644 build/pkgs/bleach/distros/opensuse.txt
+ create mode 100644 build/pkgs/cvxopt/distros/opensuse.txt
+ create mode 100644 build/pkgs/html5lib/distros/opensuse.txt
+ create mode 100644 build/pkgs/idna/distros/opensuse.txt
+ create mode 100644 build/pkgs/mpmath/distros/opensuse.txt
+ create mode 100644 build/pkgs/numpy/distros/opensuse.txt
+ create mode 100644 build/pkgs/packaging/distros/opensuse.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/opensuse.txt
+ create mode 100644 build/pkgs/pluggy/distros/opensuse.txt
+ create mode 100644 build/pkgs/py/distros/opensuse.txt
+ create mode 100644 build/pkgs/sympy/distros/opensuse.txt
+ create mode 100644 build/pkgs/texttable/distros/opensuse.txt
+ create mode 100644 build/pkgs/toml/distros/opensuse.txt
+
+diff --git a/build/pkgs/bleach/distros/opensuse.txt b/build/pkgs/bleach/distros/opensuse.txt
+new file mode 100644
+index 00000000..6d37c4c
+--- /dev/null
++++ b/build/pkgs/bleach/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-bleach
+diff --git a/build/pkgs/cvxopt/distros/opensuse.txt b/build/pkgs/cvxopt/distros/opensuse.txt
+new file mode 100644
+index 00000000..2bb6ad1
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-cvxopt
+diff --git a/build/pkgs/html5lib/distros/opensuse.txt b/build/pkgs/html5lib/distros/opensuse.txt
+new file mode 100644
+index 00000000..6d7b8df
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-html5lib
+diff --git a/build/pkgs/idna/distros/opensuse.txt b/build/pkgs/idna/distros/opensuse.txt
+new file mode 100644
+index 00000000..de48e70
+--- /dev/null
++++ b/build/pkgs/idna/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-idna
+diff --git a/build/pkgs/jinja2/distros/opensuse.txt b/build/pkgs/jinja2/distros/opensuse.txt
+index 5d90a22..f2db865 100644
+--- a/build/pkgs/jinja2/distros/opensuse.txt
++++ b/build/pkgs/jinja2/distros/opensuse.txt
+@@ -1 +1 @@
+-python3-Jinja2
++python3-jinja2
+diff --git a/build/pkgs/mpmath/distros/opensuse.txt b/build/pkgs/mpmath/distros/opensuse.txt
+new file mode 100644
+index 00000000..fbc82a9
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-mpmath
+diff --git a/build/pkgs/numpy/distros/opensuse.txt b/build/pkgs/numpy/distros/opensuse.txt
+new file mode 100644
+index 00000000..79d5c5a
+--- /dev/null
++++ b/build/pkgs/numpy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-numpy
+diff --git a/build/pkgs/packaging/distros/opensuse.txt b/build/pkgs/packaging/distros/opensuse.txt
+new file mode 100644
+index 00000000..8f1c0ff
+--- /dev/null
++++ b/build/pkgs/packaging/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-packaging
+diff --git a/build/pkgs/pandocfilters/distros/opensuse.txt b/build/pkgs/pandocfilters/distros/opensuse.txt
+new file mode 100644
+index 00000000..d0d4c24
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-pandocfilters
+diff --git a/build/pkgs/pluggy/distros/opensuse.txt b/build/pkgs/pluggy/distros/opensuse.txt
+new file mode 100644
+index 00000000..43a3acf
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-pluggy
+diff --git a/build/pkgs/py/distros/opensuse.txt b/build/pkgs/py/distros/opensuse.txt
+new file mode 100644
+index 00000000..81fefe6
+--- /dev/null
++++ b/build/pkgs/py/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-py
+diff --git a/build/pkgs/pygments/distros/opensuse.txt b/build/pkgs/pygments/distros/opensuse.txt
+index 9ff5740..3ab3792 100644
+--- a/build/pkgs/pygments/distros/opensuse.txt
++++ b/build/pkgs/pygments/distros/opensuse.txt
+@@ -1 +1 @@
+-python3-Pygments
++python3-pygments
+diff --git a/build/pkgs/sympy/distros/opensuse.txt b/build/pkgs/sympy/distros/opensuse.txt
+new file mode 100644
+index 00000000..db423c8
+--- /dev/null
++++ b/build/pkgs/sympy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-sympy
+diff --git a/build/pkgs/texttable/distros/opensuse.txt b/build/pkgs/texttable/distros/opensuse.txt
+new file mode 100644
+index 00000000..8f8e7e2
+--- /dev/null
++++ b/build/pkgs/texttable/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-texttable
+diff --git a/build/pkgs/toml/distros/opensuse.txt b/build/pkgs/toml/distros/opensuse.txt
+new file mode 100644
+index 00000000..543e89d
+--- /dev/null
++++ b/build/pkgs/toml/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-toml
+-- 
+cgit v1.0-1-gd88e
+
+
+From a480ba7ace1370d106ae831e904ea22b72af1be7 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 22:45:04 -0700
+Subject: build/pkgs: Add distros/debian.txt for Python packages
+
+---
+ build/pkgs/babel/distros/debian.txt         | 1 +
+ build/pkgs/bleach/distros/debian.txt        | 1 +
+ build/pkgs/certifi/distros/debian.txt       | 1 +
+ build/pkgs/cvxopt/distros/debian.txt        | 1 +
+ build/pkgs/decorator/distros/debian.txt     | 1 +
+ build/pkgs/html5lib/distros/debian.txt      | 1 +
+ build/pkgs/idna/distros/debian.txt          | 1 +
+ build/pkgs/jinja2/distros/debian.txt        | 1 +
+ build/pkgs/matplotlib/distros/debian.txt    | 1 +
+ build/pkgs/mpmath/distros/debian.txt        | 1 +
+ build/pkgs/networkx/distros/debian.txt      | 1 +
+ build/pkgs/numpy/distros/debian.txt         | 1 +
+ build/pkgs/packaging/distros/debian.txt     | 1 +
+ build/pkgs/pandocfilters/distros/debian.txt | 1 +
+ build/pkgs/pickleshare/distros/debian.txt   | 1 +
+ build/pkgs/pillow/distros/debian.txt        | 1 +
+ build/pkgs/pluggy/distros/debian.txt        | 1 +
+ build/pkgs/py/distros/debian.txt            | 1 +
+ build/pkgs/pygments/distros/debian.txt      | 1 +
+ build/pkgs/pytz/distros/debian.txt          | 1 +
+ build/pkgs/requests/distros/debian.txt      | 1 +
+ build/pkgs/scipy/distros/debian.txt         | 1 +
+ build/pkgs/setuptools/distros/debian.txt    | 1 +
+ build/pkgs/six/distros/debian.txt           | 1 +
+ build/pkgs/sympy/distros/debian.txt         | 1 +
+ build/pkgs/texttable/distros/debian.txt     | 1 +
+ build/pkgs/toml/distros/debian.txt          | 1 +
+ build/pkgs/webencodings/distros/debian.txt  | 1 +
+ build/pkgs/wheel/distros/debian.txt         | 1 +
+ 29 files changed, 29 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/debian.txt
+ create mode 100644 build/pkgs/bleach/distros/debian.txt
+ create mode 100644 build/pkgs/certifi/distros/debian.txt
+ create mode 100644 build/pkgs/cvxopt/distros/debian.txt
+ create mode 100644 build/pkgs/decorator/distros/debian.txt
+ create mode 100644 build/pkgs/html5lib/distros/debian.txt
+ create mode 100644 build/pkgs/idna/distros/debian.txt
+ create mode 100644 build/pkgs/jinja2/distros/debian.txt
+ create mode 100644 build/pkgs/matplotlib/distros/debian.txt
+ create mode 100644 build/pkgs/mpmath/distros/debian.txt
+ create mode 100644 build/pkgs/networkx/distros/debian.txt
+ create mode 100644 build/pkgs/numpy/distros/debian.txt
+ create mode 100644 build/pkgs/packaging/distros/debian.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/debian.txt
+ create mode 100644 build/pkgs/pickleshare/distros/debian.txt
+ create mode 100644 build/pkgs/pillow/distros/debian.txt
+ create mode 100644 build/pkgs/pluggy/distros/debian.txt
+ create mode 100644 build/pkgs/py/distros/debian.txt
+ create mode 100644 build/pkgs/pygments/distros/debian.txt
+ create mode 100644 build/pkgs/pytz/distros/debian.txt
+ create mode 100644 build/pkgs/requests/distros/debian.txt
+ create mode 100644 build/pkgs/scipy/distros/debian.txt
+ create mode 100644 build/pkgs/setuptools/distros/debian.txt
+ create mode 100644 build/pkgs/six/distros/debian.txt
+ create mode 100644 build/pkgs/sympy/distros/debian.txt
+ create mode 100644 build/pkgs/texttable/distros/debian.txt
+ create mode 100644 build/pkgs/toml/distros/debian.txt
+ create mode 100644 build/pkgs/webencodings/distros/debian.txt
+ create mode 100644 build/pkgs/wheel/distros/debian.txt
+
+diff --git a/build/pkgs/babel/distros/debian.txt b/build/pkgs/babel/distros/debian.txt
+new file mode 100644
+index 00000000..e623eb6
+--- /dev/null
++++ b/build/pkgs/babel/distros/debian.txt
+@@ -0,0 +1 @@
++python3-babel
+diff --git a/build/pkgs/bleach/distros/debian.txt b/build/pkgs/bleach/distros/debian.txt
+new file mode 100644
+index 00000000..6d37c4c
+--- /dev/null
++++ b/build/pkgs/bleach/distros/debian.txt
+@@ -0,0 +1 @@
++python3-bleach
+diff --git a/build/pkgs/certifi/distros/debian.txt b/build/pkgs/certifi/distros/debian.txt
+new file mode 100644
+index 00000000..f585a82
+--- /dev/null
++++ b/build/pkgs/certifi/distros/debian.txt
+@@ -0,0 +1 @@
++python3-certifi
+diff --git a/build/pkgs/cvxopt/distros/debian.txt b/build/pkgs/cvxopt/distros/debian.txt
+new file mode 100644
+index 00000000..2bb6ad1
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/debian.txt
+@@ -0,0 +1 @@
++python3-cvxopt
+diff --git a/build/pkgs/decorator/distros/debian.txt b/build/pkgs/decorator/distros/debian.txt
+new file mode 100644
+index 00000000..46c478e
+--- /dev/null
++++ b/build/pkgs/decorator/distros/debian.txt
+@@ -0,0 +1 @@
++python3-decorator
+diff --git a/build/pkgs/html5lib/distros/debian.txt b/build/pkgs/html5lib/distros/debian.txt
+new file mode 100644
+index 00000000..6d7b8df
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/debian.txt
+@@ -0,0 +1 @@
++python3-html5lib
+diff --git a/build/pkgs/idna/distros/debian.txt b/build/pkgs/idna/distros/debian.txt
+new file mode 100644
+index 00000000..de48e70
+--- /dev/null
++++ b/build/pkgs/idna/distros/debian.txt
+@@ -0,0 +1 @@
++python3-idna
+diff --git a/build/pkgs/jinja2/distros/debian.txt b/build/pkgs/jinja2/distros/debian.txt
+new file mode 100644
+index 00000000..f2db865
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/debian.txt
+@@ -0,0 +1 @@
++python3-jinja2
+diff --git a/build/pkgs/matplotlib/distros/debian.txt b/build/pkgs/matplotlib/distros/debian.txt
+new file mode 100644
+index 00000000..1374329
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/debian.txt
+@@ -0,0 +1 @@
++python3-matplotlib
+diff --git a/build/pkgs/mpmath/distros/debian.txt b/build/pkgs/mpmath/distros/debian.txt
+new file mode 100644
+index 00000000..fbc82a9
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/debian.txt
+@@ -0,0 +1 @@
++python3-mpmath
+diff --git a/build/pkgs/networkx/distros/debian.txt b/build/pkgs/networkx/distros/debian.txt
+new file mode 100644
+index 00000000..6779066
+--- /dev/null
++++ b/build/pkgs/networkx/distros/debian.txt
+@@ -0,0 +1 @@
++python3-networkx
+diff --git a/build/pkgs/numpy/distros/debian.txt b/build/pkgs/numpy/distros/debian.txt
+new file mode 100644
+index 00000000..79d5c5a
+--- /dev/null
++++ b/build/pkgs/numpy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-numpy
+diff --git a/build/pkgs/packaging/distros/debian.txt b/build/pkgs/packaging/distros/debian.txt
+new file mode 100644
+index 00000000..8f1c0ff
+--- /dev/null
++++ b/build/pkgs/packaging/distros/debian.txt
+@@ -0,0 +1 @@
++python3-packaging
+diff --git a/build/pkgs/pandocfilters/distros/debian.txt b/build/pkgs/pandocfilters/distros/debian.txt
+new file mode 100644
+index 00000000..d0d4c24
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/debian.txt b/build/pkgs/pickleshare/distros/debian.txt
+new file mode 100644
+index 00000000..a00907d
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pickleshare
+diff --git a/build/pkgs/pillow/distros/debian.txt b/build/pkgs/pillow/distros/debian.txt
+new file mode 100644
+index 00000000..3319fcd
+--- /dev/null
++++ b/build/pkgs/pillow/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pillow
+diff --git a/build/pkgs/pluggy/distros/debian.txt b/build/pkgs/pluggy/distros/debian.txt
+new file mode 100644
+index 00000000..43a3acf
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pluggy
+diff --git a/build/pkgs/py/distros/debian.txt b/build/pkgs/py/distros/debian.txt
+new file mode 100644
+index 00000000..81fefe6
+--- /dev/null
++++ b/build/pkgs/py/distros/debian.txt
+@@ -0,0 +1 @@
++python3-py
+diff --git a/build/pkgs/pygments/distros/debian.txt b/build/pkgs/pygments/distros/debian.txt
+new file mode 100644
+index 00000000..3ab3792
+--- /dev/null
++++ b/build/pkgs/pygments/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pygments
+diff --git a/build/pkgs/pytz/distros/debian.txt b/build/pkgs/pytz/distros/debian.txt
+new file mode 100644
+index 00000000..db20908
+--- /dev/null
++++ b/build/pkgs/pytz/distros/debian.txt
+@@ -0,0 +1 @@
++python3-tz
+diff --git a/build/pkgs/requests/distros/debian.txt b/build/pkgs/requests/distros/debian.txt
+new file mode 100644
+index 00000000..43147b2
+--- /dev/null
++++ b/build/pkgs/requests/distros/debian.txt
+@@ -0,0 +1 @@
++python3-requests
+diff --git a/build/pkgs/scipy/distros/debian.txt b/build/pkgs/scipy/distros/debian.txt
+new file mode 100644
+index 00000000..12b3666
+--- /dev/null
++++ b/build/pkgs/scipy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-scipy
+diff --git a/build/pkgs/setuptools/distros/debian.txt b/build/pkgs/setuptools/distros/debian.txt
+new file mode 100644
+index 00000000..1c0901c
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/debian.txt
+@@ -0,0 +1 @@
++python3-setuptools
+diff --git a/build/pkgs/six/distros/debian.txt b/build/pkgs/six/distros/debian.txt
+new file mode 100644
+index 00000000..68ff859
+--- /dev/null
++++ b/build/pkgs/six/distros/debian.txt
+@@ -0,0 +1 @@
++python3-six
+diff --git a/build/pkgs/sympy/distros/debian.txt b/build/pkgs/sympy/distros/debian.txt
+new file mode 100644
+index 00000000..db423c8
+--- /dev/null
++++ b/build/pkgs/sympy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-sympy
+diff --git a/build/pkgs/texttable/distros/debian.txt b/build/pkgs/texttable/distros/debian.txt
+new file mode 100644
+index 00000000..8f8e7e2
+--- /dev/null
++++ b/build/pkgs/texttable/distros/debian.txt
+@@ -0,0 +1 @@
++python3-texttable
+diff --git a/build/pkgs/toml/distros/debian.txt b/build/pkgs/toml/distros/debian.txt
+new file mode 100644
+index 00000000..543e89d
+--- /dev/null
++++ b/build/pkgs/toml/distros/debian.txt
+@@ -0,0 +1 @@
++python3-toml
+diff --git a/build/pkgs/webencodings/distros/debian.txt b/build/pkgs/webencodings/distros/debian.txt
+new file mode 100644
+index 00000000..ac30c2f
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/debian.txt
+@@ -0,0 +1 @@
++python3-webencodings
+diff --git a/build/pkgs/wheel/distros/debian.txt b/build/pkgs/wheel/distros/debian.txt
+new file mode 100644
+index 00000000..3c066725
+--- /dev/null
++++ b/build/pkgs/wheel/distros/debian.txt
+@@ -0,0 +1 @@
++python3-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 93bf30d7de292551c3050e2dd74651d69ba4bd46 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 18 Oct 2021 07:50:34 -0400
+Subject: Trac #29665: add more documentation for SAGE_PYTHON_PACKAGE_CHECK().
+
+An earlier commit allows SAGE_PYTHON_PACKAGE_CHECK(package) to tweak the
+value of sage_use_system_$package if --enable-system-site-packages was
+not used. This essentially changes the default --with-system-$package=yes
+to "no" in that case. Here we update the documentation to reflect it.
+---
+ m4/sage_python_package_check.m4 | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 7ee82a7..95eefd0 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -34,6 +34,10 @@
+ #   ensure that the ./configure- and run-time views of the system
+ #   are as similar as possible.
+ #
++#   To avoid suggesting these system packages to users who have not
++#   set --enable-system-site-packages, this macro also changes the
++#   default for --with-system-foo from "yes" to "no" in that case.
++#
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
+-- 
+cgit v1.0-1-gd88e
+
+
+From d771e49d57ecdf3622434bc09cbfb87ad3bb7744 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 18 Oct 2021 07:42:46 -0400
+Subject: Trac #29665: improve SAGE_PYTHON_PACKAGE_CHECK() failure message.
+
+When --enable-system-site-packages is off, SAGE_PYTHON_PACKAGE_CHECK()
+will always install the corresponding SPKG. We improve the ./configure
+output in that case to make it clear that the decision was based on
+the value of --enable-system-site-packages and not the "real" check.
+---
+ m4/sage_python_package_check.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 95eefd0..5f0f084 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -40,7 +40,9 @@
+ #
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
++  AC_MSG_CHECKING([if --enable-system-site-packages was used])
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
++    AC_MSG_RESULT(yes)
+     AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
+ 
+     dnl We run this check inside a python venv, because that's ultimately
+@@ -94,6 +96,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
+     dnl System site packages are disabled.
++    AC_MSG_RESULT(no; skipping check)
+     sage_spkg_install_$1=yes
+ 
+     dnl We have to retroactively hack the --with-system-foo={no,yes,force}
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5bb43c1b78a1deb3364f235305937c2f823e5e18 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 24 Oct 2021 20:29:25 -0400
+Subject: Trac #29665: use sage-venv in SAGE_PYTHON_PACKAGE_CHECK().
+
+For consistency with the rest of the build system, we now use the
+build/bin/sage-venv script to create the venv in this autoconf macro
+rather than invoking $PYTHON_FOR_VENV with "-m venv" directly.
+---
+ m4/sage_python_package_check.m4 | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 5f0f084..5547b35 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -50,11 +50,11 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AC_MSG_CHECKING([if we can create a python venv in config.venv])
+ 
+     dnl Use --clear because ./configure typically clobbers its output files.
+-    AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
+-                                        --clear                dnl
+-                                        --without-pip          dnl
+-                                        config.venv            dnl
+-                                        2>&AS_MESSAGE_LOG_FD], [
++    AS_IF(["${PYTHON_FOR_VENV}" build/bin/sage-venv      dnl
++                                  --system-site-packages dnl
++                                  --clear                dnl
++                                  config.venv            dnl
++                                  2>&AS_MESSAGE_LOG_FD], [
+       AC_MSG_RESULT(yes)
+       dnl strip all comments from install-requires.txt; this should leave
+       dnl only a single line containing the version specification for this
+-- 
+cgit v1.0-1-gd88e
+
+
+From c78363d6326addff16ca5abac897949a6be72bf4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:10:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for urllib3.
+
+---
+ build/pkgs/urllib3/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/urllib3/spkg-configure.m4
+
+diff --git a/build/pkgs/urllib3/spkg-configure.m4 b/build/pkgs/urllib3/spkg-configure.m4
+new file mode 100644
+index 00000000..d7ef3e1
+--- /dev/null
++++ b/build/pkgs/urllib3/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([urllib3], [SAGE_PYTHON_PACKAGE_CHECK([urllib3])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f416d5abcae495ea8301fad024b279ea9e997b29 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:15:18 -0400
+Subject: Trac #29665: add Gentoo package information for urllib3.
+
+---
+ build/pkgs/urllib3/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/urllib3/distros/gentoo.txt
+
+diff --git a/build/pkgs/urllib3/distros/gentoo.txt b/build/pkgs/urllib3/distros/gentoo.txt
+new file mode 100644
+index 00000000..172a535
+--- /dev/null
++++ b/build/pkgs/urllib3/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/urllib3
+-- 
+cgit v1.0-1-gd88e
+
+
+From 852068b992bf7959500c650f54cb92e5b68d7ef8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:15:58 -0400
+Subject: Trac #29665: add Gentoo package information for nbformat.
+
+---
+ build/pkgs/nbformat/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbformat/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbformat/distros/gentoo.txt b/build/pkgs/nbformat/distros/gentoo.txt
+new file mode 100644
+index 00000000..006b1f2
+--- /dev/null
++++ b/build/pkgs/nbformat/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbformat
+-- 
+cgit v1.0-1-gd88e
+
+
+From 66179fd28fcc92ee840dcd87bb4db25cea968d66 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:34:16 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for nbformat.
+
+---
+ build/pkgs/nbformat/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbformat/spkg-configure.m4
+
+diff --git a/build/pkgs/nbformat/spkg-configure.m4 b/build/pkgs/nbformat/spkg-configure.m4
+new file mode 100644
+index 00000000..5a7f8c4
+--- /dev/null
++++ b/build/pkgs/nbformat/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbformat], [SAGE_PYTHON_PACKAGE_CHECK([nbformat])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 874005e81ed20f27a5f895030dcdbdfc5f73ad80 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:47:01 -0400
+Subject: Trac #29665: add Gentoo package information for zipp.
+
+---
+ build/pkgs/zipp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/zipp/distros/gentoo.txt
+
+diff --git a/build/pkgs/zipp/distros/gentoo.txt b/build/pkgs/zipp/distros/gentoo.txt
+new file mode 100644
+index 00000000..7f59450
+--- /dev/null
++++ b/build/pkgs/zipp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/zipp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0cc2a7355b5554c1fb79c742ebf02eff54465b3e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:47:35 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for zipp.
+
+---
+ build/pkgs/zipp/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/zipp/spkg-configure.m4
+
+diff --git a/build/pkgs/zipp/spkg-configure.m4 b/build/pkgs/zipp/spkg-configure.m4
+new file mode 100644
+index 00000000..0fe3a9c
+--- /dev/null
++++ b/build/pkgs/zipp/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([zipp], [SAGE_PYTHON_PACKAGE_CHECK([zipp])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6073ad8e56c21fc862749bbd84a56d543fb9458c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:48:37 -0400
+Subject: Trac #29665: add Gentoo package information for wcwidth.
+
+---
+ build/pkgs/wcwidth/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wcwidth/distros/gentoo.txt
+
+diff --git a/build/pkgs/wcwidth/distros/gentoo.txt b/build/pkgs/wcwidth/distros/gentoo.txt
+new file mode 100644
+index 00000000..edeb80b
+--- /dev/null
++++ b/build/pkgs/wcwidth/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/wcwidth
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9793d6172c64d61a015fbe61bd45863759124fad Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:51:10 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for wcwidth.
+
+---
+ build/pkgs/wcwidth/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wcwidth/spkg-configure.m4
+
+diff --git a/build/pkgs/wcwidth/spkg-configure.m4 b/build/pkgs/wcwidth/spkg-configure.m4
+new file mode 100644
+index 00000000..5bde15a
+--- /dev/null
++++ b/build/pkgs/wcwidth/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([wcwidth], [SAGE_PYTHON_PACKAGE_CHECK([wcwidth])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20232f370a43c146ca4e696c72a2cbcc498db060 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:52:36 -0400
+Subject: Trac #29665: add Gentoo package information for testpath.
+
+---
+ build/pkgs/testpath/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/testpath/distros/gentoo.txt
+
+diff --git a/build/pkgs/testpath/distros/gentoo.txt b/build/pkgs/testpath/distros/gentoo.txt
+new file mode 100644
+index 00000000..efa10a0
+--- /dev/null
++++ b/build/pkgs/testpath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/testpath
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1b0785b2aad8844e74345fe950baf097e2b43d24 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:55:22 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for testpath.
+
+---
+ build/pkgs/testpath/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/testpath/spkg-configure.m4
+
+diff --git a/build/pkgs/testpath/spkg-configure.m4 b/build/pkgs/testpath/spkg-configure.m4
+new file mode 100644
+index 00000000..d8fc2a7
+--- /dev/null
++++ b/build/pkgs/testpath/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([testpath], [SAGE_PYTHON_PACKAGE_CHECK([testpath])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 10fc3829ecd956d732b1b069fdfe81f0d6d5cdc2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:56:06 -0400
+Subject: Trac #29665: add Gentoo package information for jedi.
+
+---
+ build/pkgs/jedi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jedi/distros/gentoo.txt
+
+diff --git a/build/pkgs/jedi/distros/gentoo.txt b/build/pkgs/jedi/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c85a46
+--- /dev/null
++++ b/build/pkgs/jedi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jedi
+-- 
+cgit v1.0-1-gd88e
+
+
+From a75824d74c281c7639028ca01dabeed266f56998 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:06:37 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for jedi.
+
+---
+ build/pkgs/jedi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jedi/spkg-configure.m4
+
+diff --git a/build/pkgs/jedi/spkg-configure.m4 b/build/pkgs/jedi/spkg-configure.m4
+new file mode 100644
+index 00000000..a37dbcc
+--- /dev/null
++++ b/build/pkgs/jedi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jedi], [SAGE_PYTHON_PACKAGE_CHECK([jedi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 17af01373d43f6acbbdbc23e073e372d3fdadf8b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:07:47 -0400
+Subject: Trac #29665: add Gentoo package information for tomli.
+
+---
+ build/pkgs/tomli/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tomli/distros/gentoo.txt
+
+diff --git a/build/pkgs/tomli/distros/gentoo.txt b/build/pkgs/tomli/distros/gentoo.txt
+new file mode 100644
+index 00000000..0458e25
+--- /dev/null
++++ b/build/pkgs/tomli/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/tomli
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0d3b5994ae612be11992467c4a3f1a74b81400fe Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:08:12 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for tomli.
+
+---
+ build/pkgs/tomli/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tomli/spkg-configure.m4
+
+diff --git a/build/pkgs/tomli/spkg-configure.m4 b/build/pkgs/tomli/spkg-configure.m4
+new file mode 100644
+index 00000000..95a8b8b
+--- /dev/null
++++ b/build/pkgs/tomli/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tomli], [SAGE_PYTHON_PACKAGE_CHECK([tomli])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From dce1c515781b0eeb8eb9c2bc7aba581560c1fac1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:09:22 -0400
+Subject: Trac #29665: add Gentoo package information for defusedxml.
+
+---
+ build/pkgs/defusedxml/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/defusedxml/distros/gentoo.txt
+
+diff --git a/build/pkgs/defusedxml/distros/gentoo.txt b/build/pkgs/defusedxml/distros/gentoo.txt
+new file mode 100644
+index 00000000..2804214
+--- /dev/null
++++ b/build/pkgs/defusedxml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/defusedxml
+-- 
+cgit v1.0-1-gd88e
+
+
+From 02e1e1cd7f8bdae3ca5b7d35ce70af28a44e9b7c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:11:14 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for defusedxml.
+
+---
+ build/pkgs/defusedxml/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/defusedxml/spkg-configure.m4
+
+diff --git a/build/pkgs/defusedxml/spkg-configure.m4 b/build/pkgs/defusedxml/spkg-configure.m4
+new file mode 100644
+index 00000000..e02f345
+--- /dev/null
++++ b/build/pkgs/defusedxml/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([defusedxml], [SAGE_PYTHON_PACKAGE_CHECK([defusedxml])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e0ba4ebb5cfc637b5d26b85de9f34e0a160d2b9c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:12:22 -0400
+Subject: Trac #29665: add Gentoo package information for ipywidgets.
+
+---
+ build/pkgs/ipywidgets/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipywidgets/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipywidgets/distros/gentoo.txt b/build/pkgs/ipywidgets/distros/gentoo.txt
+new file mode 100644
+index 00000000..7c76967
+--- /dev/null
++++ b/build/pkgs/ipywidgets/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipywidgets
+-- 
+cgit v1.0-1-gd88e
+
+
+From 49df7e7d93c7a31b7c46d5d224a35fd313a29a32 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:15:53 -0400
+Subject: Trac #29665: add Gentoo package information for simplegeneric.
+
+---
+ build/pkgs/simplegeneric/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/simplegeneric/distros/gentoo.txt
+
+diff --git a/build/pkgs/simplegeneric/distros/gentoo.txt b/build/pkgs/simplegeneric/distros/gentoo.txt
+new file mode 100644
+index 00000000..a86e90d
+--- /dev/null
++++ b/build/pkgs/simplegeneric/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/simplegeneric
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2a893635d5804749e6fec7ed7289c921ecb5300a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:16:33 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for simplegeneric.
+
+---
+ build/pkgs/simplegeneric/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/simplegeneric/spkg-configure.m4
+
+diff --git a/build/pkgs/simplegeneric/spkg-configure.m4 b/build/pkgs/simplegeneric/spkg-configure.m4
+new file mode 100644
+index 00000000..13715ab
+--- /dev/null
++++ b/build/pkgs/simplegeneric/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([simplegeneric], [SAGE_PYTHON_PACKAGE_CHECK([simplegeneric])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a8fe7ecd6e3163e7d01261e5497ac452a8cc95ab Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:17:18 -0400
+Subject: Trac #29665: add Gentoo package information for imagesize.
+
+---
+ build/pkgs/imagesize/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/imagesize/distros/gentoo.txt
+
+diff --git a/build/pkgs/imagesize/distros/gentoo.txt b/build/pkgs/imagesize/distros/gentoo.txt
+new file mode 100644
+index 00000000..54350ba
+--- /dev/null
++++ b/build/pkgs/imagesize/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/imagesize
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2ad837c5dd1fca0f50ce6d5042a9344210a54f84 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:17:48 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for imagesize.
+
+---
+ build/pkgs/imagesize/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/imagesize/spkg-configure.m4
+
+diff --git a/build/pkgs/imagesize/spkg-configure.m4 b/build/pkgs/imagesize/spkg-configure.m4
+new file mode 100644
+index 00000000..20210ef
+--- /dev/null
++++ b/build/pkgs/imagesize/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([imagesize], [SAGE_PYTHON_PACKAGE_CHECK([imagesize])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bf47415b5bfca2d7bf24e20de35662bf331623b9 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:18:49 -0400
+Subject: Trac #29665: add Gentoo package information for mistune.
+
+---
+ build/pkgs/mistune/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mistune/distros/gentoo.txt
+
+diff --git a/build/pkgs/mistune/distros/gentoo.txt b/build/pkgs/mistune/distros/gentoo.txt
+new file mode 100644
+index 00000000..56f0a4e
+--- /dev/null
++++ b/build/pkgs/mistune/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/mistune
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6898a74fd0c65a40c5220ba68b4062ac6fe060c6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:21:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for mistune.
+
+---
+ build/pkgs/mistune/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mistune/spkg-configure.m4
+
+diff --git a/build/pkgs/mistune/spkg-configure.m4 b/build/pkgs/mistune/spkg-configure.m4
+new file mode 100644
+index 00000000..972f33d
+--- /dev/null
++++ b/build/pkgs/mistune/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([mistune], [SAGE_PYTHON_PACKAGE_CHECK([mistune])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 62735e4ccf2031cd39eb5e04b03bdfd97005d808 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:22:48 -0400
+Subject: Trac #29665: add Gentoo package information for backcall.
+
+---
+ build/pkgs/backcall/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/backcall/distros/gentoo.txt
+
+diff --git a/build/pkgs/backcall/distros/gentoo.txt b/build/pkgs/backcall/distros/gentoo.txt
+new file mode 100644
+index 00000000..266a222
+--- /dev/null
++++ b/build/pkgs/backcall/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/backcall
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9ef3ea42d4a33c7cdb623fa5417ae300cf323183 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:25:10 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for backcall.
+
+---
+ build/pkgs/backcall/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/backcall/spkg-configure.m4
+
+diff --git a/build/pkgs/backcall/spkg-configure.m4 b/build/pkgs/backcall/spkg-configure.m4
+new file mode 100644
+index 00000000..d6b11c4
+--- /dev/null
++++ b/build/pkgs/backcall/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([backcall], [SAGE_PYTHON_PACKAGE_CHECK([backcall])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1b3ea2a3c40fea0fb58435f5e5304368ea58dff8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:25:58 -0400
+Subject: Trac #29665: add Gentoo package information for parso.
+
+---
+ build/pkgs/parso/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/parso/distros/gentoo.txt
+
+diff --git a/build/pkgs/parso/distros/gentoo.txt b/build/pkgs/parso/distros/gentoo.txt
+new file mode 100644
+index 00000000..f9ce4c7
+--- /dev/null
++++ b/build/pkgs/parso/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/parso
+-- 
+cgit v1.0-1-gd88e
+
+
+From 963a3a2c563ec71a1f5be2395722d0e824cb0b11 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:26:22 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for parso.
+
+---
+ build/pkgs/parso/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/parso/spkg-configure.m4
+
+diff --git a/build/pkgs/parso/spkg-configure.m4 b/build/pkgs/parso/spkg-configure.m4
+new file mode 100644
+index 00000000..1ca6f1b
+--- /dev/null
++++ b/build/pkgs/parso/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([parso], [SAGE_PYTHON_PACKAGE_CHECK([parso])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 943053dfc474b6549bcc7d6ef2971ea43588b35c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:27:00 -0400
+Subject: Trac #29665: add Gentoo package information for pyparsing.
+
+---
+ build/pkgs/pyparsing/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyparsing/distros/gentoo.txt
+
+diff --git a/build/pkgs/pyparsing/distros/gentoo.txt b/build/pkgs/pyparsing/distros/gentoo.txt
+new file mode 100644
+index 00000000..ef0419f
+--- /dev/null
++++ b/build/pkgs/pyparsing/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyparsing
+-- 
+cgit v1.0-1-gd88e
+
+
+From bd682eaa2ac41dd84e7a52e2b0c5442fc8fd8919 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:27:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pyparsing.
+
+---
+ build/pkgs/pyparsing/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyparsing/spkg-configure.m4
+
+diff --git a/build/pkgs/pyparsing/spkg-configure.m4 b/build/pkgs/pyparsing/spkg-configure.m4
+new file mode 100644
+index 00000000..d2b4c00
+--- /dev/null
++++ b/build/pkgs/pyparsing/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pyparsing], [SAGE_PYTHON_PACKAGE_CHECK([pyparsing])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 74f36a9c0ec7c63b7e6c40066e42f4b15c2f978e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:17:42 -0400
+Subject: Trac #29665: add Gentoo package information for debugpy.
+
+---
+ build/pkgs/debugpy/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/debugpy/distros/gentoo.txt
+
+diff --git a/build/pkgs/debugpy/distros/gentoo.txt b/build/pkgs/debugpy/distros/gentoo.txt
+new file mode 100644
+index 00000000..8b797ce
+--- /dev/null
++++ b/build/pkgs/debugpy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/debugpy
+-- 
+cgit v1.0-1-gd88e
+
+
+From be072fa87ac5c373d9dc9b54c0bd68734d5709bc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:21:17 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for debugpy.
+
+---
+ build/pkgs/debugpy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/debugpy/spkg-configure.m4
+
+diff --git a/build/pkgs/debugpy/spkg-configure.m4 b/build/pkgs/debugpy/spkg-configure.m4
+new file mode 100644
+index 00000000..db605ff
+--- /dev/null
++++ b/build/pkgs/debugpy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([debugpy], [SAGE_PYTHON_PACKAGE_CHECK([debugpy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6f777ce2f2e14b94e91c8b7bbac82f9017460aba Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:23:56 -0400
+Subject: Trac #29665: add Gentoo package information for tzlocal.
+
+---
+ build/pkgs/tzlocal/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tzlocal/distros/gentoo.txt
+
+diff --git a/build/pkgs/tzlocal/distros/gentoo.txt b/build/pkgs/tzlocal/distros/gentoo.txt
+new file mode 100644
+index 00000000..2018442
+--- /dev/null
++++ b/build/pkgs/tzlocal/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/tzlocal
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3bd078fc15ae13982249452711baafae91038191 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:24:51 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for tzlocal.
+
+---
+ build/pkgs/tzlocal/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tzlocal/spkg-configure.m4
+
+diff --git a/build/pkgs/tzlocal/spkg-configure.m4 b/build/pkgs/tzlocal/spkg-configure.m4
+new file mode 100644
+index 00000000..e020b28
+--- /dev/null
++++ b/build/pkgs/tzlocal/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tzlocal], [SAGE_PYTHON_PACKAGE_CHECK([tzlocal])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 91b0882fc62214923da9ee7b6dccb05d8a1d11d1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:26:13 -0400
+Subject: Trac #29665: add Gentoo package information for pycparser.
+
+---
+ build/pkgs/pycparser/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pycparser/distros/gentoo.txt
+
+diff --git a/build/pkgs/pycparser/distros/gentoo.txt b/build/pkgs/pycparser/distros/gentoo.txt
+new file mode 100644
+index 00000000..5e87307
+--- /dev/null
++++ b/build/pkgs/pycparser/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pycparser
+-- 
+cgit v1.0-1-gd88e
+
+
+From beabde92fe6e057faf516fe82d27f1e903e55ce6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:27:27 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pycparser.
+
+---
+ build/pkgs/pycparser/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pycparser/spkg-configure.m4
+
+diff --git a/build/pkgs/pycparser/spkg-configure.m4 b/build/pkgs/pycparser/spkg-configure.m4
+new file mode 100644
+index 00000000..4b9b900
+--- /dev/null
++++ b/build/pkgs/pycparser/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pycparser], [SAGE_PYTHON_PACKAGE_CHECK([pycparser])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 86c2788dc7fd1169314e9598c91fa81045553677 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:29:36 -0400
+Subject: Trac #29665: add Gentoo package information for cycler.
+
+---
+ build/pkgs/cycler/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cycler/distros/gentoo.txt
+
+diff --git a/build/pkgs/cycler/distros/gentoo.txt b/build/pkgs/cycler/distros/gentoo.txt
+new file mode 100644
+index 00000000..4b21543
+--- /dev/null
++++ b/build/pkgs/cycler/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/cycler
+-- 
+cgit v1.0-1-gd88e
+
+
+From 67c5a944101ddf329f0a61c61d4e784f58a5c5b0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:30:27 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for cycler.
+
+---
+ build/pkgs/cycler/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cycler/spkg-configure.m4
+
+diff --git a/build/pkgs/cycler/spkg-configure.m4 b/build/pkgs/cycler/spkg-configure.m4
+new file mode 100644
+index 00000000..239571a
+--- /dev/null
++++ b/build/pkgs/cycler/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([cycler], [SAGE_PYTHON_PACKAGE_CHECK([cycler])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ef6d490251abfa41f7a0910274700a8a6a65f629 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:31:19 -0400
+Subject: Trac #29665: add Gentoo package information for traitlets.
+
+---
+ build/pkgs/traitlets/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/traitlets/distros/gentoo.txt
+
+diff --git a/build/pkgs/traitlets/distros/gentoo.txt b/build/pkgs/traitlets/distros/gentoo.txt
+new file mode 100644
+index 00000000..46bfaab
+--- /dev/null
++++ b/build/pkgs/traitlets/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/traitlets
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1f922b458d34088d9f6773312209e69f19ee45dc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:31:50 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for traitlets.
+
+---
+ build/pkgs/traitlets/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/traitlets/spkg-configure.m4
+
+diff --git a/build/pkgs/traitlets/spkg-configure.m4 b/build/pkgs/traitlets/spkg-configure.m4
+new file mode 100644
+index 00000000..df2382b
+--- /dev/null
++++ b/build/pkgs/traitlets/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([traitlets], [SAGE_PYTHON_PACKAGE_CHECK([traitlets])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 95b89a9ced0acb6d971a27fa63b97ea58a11f4e1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:33:35 -0400
+Subject: Trac #29665: add Gentoo package information for argcomplete.
+
+---
+ build/pkgs/argcomplete/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argcomplete/distros/gentoo.txt
+
+diff --git a/build/pkgs/argcomplete/distros/gentoo.txt b/build/pkgs/argcomplete/distros/gentoo.txt
+new file mode 100644
+index 00000000..b150949
+--- /dev/null
++++ b/build/pkgs/argcomplete/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/argcomplete
+-- 
+cgit v1.0-1-gd88e
+
+
+From b4cd8ef384e6e5bae0de0f3c113fb5f9e6e1a71e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:34:14 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for argcomplete.
+
+---
+ build/pkgs/argcomplete/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argcomplete/spkg-configure.m4
+
+diff --git a/build/pkgs/argcomplete/spkg-configure.m4 b/build/pkgs/argcomplete/spkg-configure.m4
+new file mode 100644
+index 00000000..cbd7ccf
+--- /dev/null
++++ b/build/pkgs/argcomplete/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([argcomplete], [SAGE_PYTHON_PACKAGE_CHECK([argcomplete])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4cc610e8331970cc018d7ea87af928fa73a292c1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:36:21 -0400
+Subject: Trac #29665: add Gentoo package information for ptyprocess.
+
+---
+ build/pkgs/ptyprocess/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ptyprocess/distros/gentoo.txt
+
+diff --git a/build/pkgs/ptyprocess/distros/gentoo.txt b/build/pkgs/ptyprocess/distros/gentoo.txt
+new file mode 100644
+index 00000000..571a851
+--- /dev/null
++++ b/build/pkgs/ptyprocess/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ptyprocess
+-- 
+cgit v1.0-1-gd88e
+
+
+From cd15f97221bf5933b07900e4f77cb55401eede26 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:37:02 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ptyprocess.
+
+---
+ build/pkgs/ptyprocess/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ptyprocess/spkg-configure.m4
+
+diff --git a/build/pkgs/ptyprocess/spkg-configure.m4 b/build/pkgs/ptyprocess/spkg-configure.m4
+new file mode 100644
+index 00000000..bfacbae
+--- /dev/null
++++ b/build/pkgs/ptyprocess/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ptyprocess], [SAGE_PYTHON_PACKAGE_CHECK([ptyprocess])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb5f45b15f99e4ba28e1b1f6042a0e8ea17f1dfc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:38:22 -0400
+Subject: Trac #29665: add Gentoo package information for attrs.
+
+---
+ build/pkgs/attrs/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/attrs/distros/gentoo.txt
+
+diff --git a/build/pkgs/attrs/distros/gentoo.txt b/build/pkgs/attrs/distros/gentoo.txt
+new file mode 100644
+index 00000000..3b906fa
+--- /dev/null
++++ b/build/pkgs/attrs/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/attrs
+-- 
+cgit v1.0-1-gd88e
+
+
+From 321707ebf8e9af1e4ac3a5b5b094b4226bb3a7a5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:38:55 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for attrs.
+
+---
+ build/pkgs/attrs/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/attrs/spkg-configure.m4
+
+diff --git a/build/pkgs/attrs/spkg-configure.m4 b/build/pkgs/attrs/spkg-configure.m4
+new file mode 100644
+index 00000000..ba6a9b7
+--- /dev/null
++++ b/build/pkgs/attrs/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([attrs], [SAGE_PYTHON_PACKAGE_CHECK([attrs])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 69a498a4e8854ecdfc2f1a134104983c0dcb9e32 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:40:09 -0400
+Subject: Trac #29665: add Gentoo package information for send2trash.
+
+---
+ build/pkgs/send2trash/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/send2trash/distros/gentoo.txt
+
+diff --git a/build/pkgs/send2trash/distros/gentoo.txt b/build/pkgs/send2trash/distros/gentoo.txt
+new file mode 100644
+index 00000000..a89b179
+--- /dev/null
++++ b/build/pkgs/send2trash/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/send2trash
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9baed17c84e1bdf5abd17c20766e5cd7dddc5b53 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:41:45 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for send2trash.
+
+---
+ build/pkgs/send2trash/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/send2trash/spkg-configure.m4
+
+diff --git a/build/pkgs/send2trash/spkg-configure.m4 b/build/pkgs/send2trash/spkg-configure.m4
+new file mode 100644
+index 00000000..3bbb727
+--- /dev/null
++++ b/build/pkgs/send2trash/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([send2trash], [SAGE_PYTHON_PACKAGE_CHECK([send2trash])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b9b552b2a2aaccaeb7c5b25be0b681f107522d09 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:43:27 -0400
+Subject: Trac #29665: add Gentoo package information for pyrsistent.
+
+---
+ build/pkgs/pyrsistent/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyrsistent/distros/gentoo.txt
+
+diff --git a/build/pkgs/pyrsistent/distros/gentoo.txt b/build/pkgs/pyrsistent/distros/gentoo.txt
+new file mode 100644
+index 00000000..83439ce
+--- /dev/null
++++ b/build/pkgs/pyrsistent/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyrsistent
+-- 
+cgit v1.0-1-gd88e
+
+
+From a17b31fac6104852762f57daa749443147bdf121 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:44:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pyrsistent.
+
+---
+ build/pkgs/pyrsistent/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyrsistent/spkg-configure.m4
+
+diff --git a/build/pkgs/pyrsistent/spkg-configure.m4 b/build/pkgs/pyrsistent/spkg-configure.m4
+new file mode 100644
+index 00000000..f7ca75d
+--- /dev/null
++++ b/build/pkgs/pyrsistent/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pyrsistent], [SAGE_PYTHON_PACKAGE_CHECK([pyrsistent])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 68520decad6d6937918d7a6af65ca5bd476e5d02 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:45:45 -0400
+Subject: Trac #29665: add Gentoo package information for entrypoints.
+
+---
+ build/pkgs/entrypoints/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/entrypoints/distros/gentoo.txt
+
+diff --git a/build/pkgs/entrypoints/distros/gentoo.txt b/build/pkgs/entrypoints/distros/gentoo.txt
+new file mode 100644
+index 00000000..684ddd0
+--- /dev/null
++++ b/build/pkgs/entrypoints/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/entrypoints
+-- 
+cgit v1.0-1-gd88e
+
+
+From 34213eccb642a6bad64d89acaefa83ee702cb483 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:46:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for entrypoints.
+
+---
+ build/pkgs/entrypoints/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/entrypoints/spkg-configure.m4
+
+diff --git a/build/pkgs/entrypoints/spkg-configure.m4 b/build/pkgs/entrypoints/spkg-configure.m4
+new file mode 100644
+index 00000000..caed658
+--- /dev/null
++++ b/build/pkgs/entrypoints/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([entrypoints], [SAGE_PYTHON_PACKAGE_CHECK([entrypoints])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8e985614345da1a58fcdc127a9c0ddd790f9b5d2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:48:26 -0400
+Subject: Trac #29665: add Gentoo package information for markupsafe.
+
+---
+ build/pkgs/markupsafe/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/markupsafe/distros/gentoo.txt
+
+diff --git a/build/pkgs/markupsafe/distros/gentoo.txt b/build/pkgs/markupsafe/distros/gentoo.txt
+new file mode 100644
+index 00000000..9654e35
+--- /dev/null
++++ b/build/pkgs/markupsafe/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/markupsafe
+-- 
+cgit v1.0-1-gd88e
+
+
+From d370f229ae0988856f2e0d1f6ee2df2c47169106 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:48:55 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for markupsafe.
+
+---
+ build/pkgs/markupsafe/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/markupsafe/spkg-configure.m4
+
+diff --git a/build/pkgs/markupsafe/spkg-configure.m4 b/build/pkgs/markupsafe/spkg-configure.m4
+new file mode 100644
+index 00000000..79eb8db
+--- /dev/null
++++ b/build/pkgs/markupsafe/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([markupsafe], [SAGE_PYTHON_PACKAGE_CHECK([markupsafe])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c49b285ad9e25e6bc81a7e75d461d234fdd3ea68 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:30:49 -0400
+Subject: Trac #29665: add Gentoo package information for flit_core.
+
+---
+ build/pkgs/flit_core/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/flit_core/distros/gentoo.txt
+
+diff --git a/build/pkgs/flit_core/distros/gentoo.txt b/build/pkgs/flit_core/distros/gentoo.txt
+new file mode 100644
+index 00000000..fe6bea9
+--- /dev/null
++++ b/build/pkgs/flit_core/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/flit_core
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b0ce1c4f23cd9fc4316e1eb2b9b4bde394957f3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:32:11 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for flit_core.
+
+---
+ build/pkgs/flit_core/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/flit_core/spkg-configure.m4
+
+diff --git a/build/pkgs/flit_core/spkg-configure.m4 b/build/pkgs/flit_core/spkg-configure.m4
+new file mode 100644
+index 00000000..ee67557
+--- /dev/null
++++ b/build/pkgs/flit_core/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([flit_core], [SAGE_PYTHON_PACKAGE_CHECK([flit_core])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f006c231a81428b1e1e792f889bf974f90e3c831 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:34:06 -0400
+Subject: Trac #29665: add Gentoo package information for nest_asyncio.
+
+---
+ build/pkgs/nest_asyncio/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nest_asyncio/distros/gentoo.txt
+
+diff --git a/build/pkgs/nest_asyncio/distros/gentoo.txt b/build/pkgs/nest_asyncio/distros/gentoo.txt
+new file mode 100644
+index 00000000..ab742d2
+--- /dev/null
++++ b/build/pkgs/nest_asyncio/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nest_asyncio
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4a58d0a96a84475e765a01a64f5f44c48a317e0b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:34:43 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for nest_asyncio.
+
+---
+ build/pkgs/nest_asyncio/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nest_asyncio/spkg-configure.m4
+
+diff --git a/build/pkgs/nest_asyncio/spkg-configure.m4 b/build/pkgs/nest_asyncio/spkg-configure.m4
+new file mode 100644
+index 00000000..4d81527
+--- /dev/null
++++ b/build/pkgs/nest_asyncio/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nest_asyncio], [SAGE_PYTHON_PACKAGE_CHECK([nest_asyncio])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e50af937777ea778908bc09a7a79db3dd80fdf25 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:37:02 -0400
+Subject: Trac #29665: add Gentoo package information for ipython_genutils.
+
+---
+ build/pkgs/ipython_genutils/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython_genutils/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipython_genutils/distros/gentoo.txt b/build/pkgs/ipython_genutils/distros/gentoo.txt
+new file mode 100644
+index 00000000..01bc49d
+--- /dev/null
++++ b/build/pkgs/ipython_genutils/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipython_genutils
+-- 
+cgit v1.0-1-gd88e
+
+
+From ec3c0ce9db2ba13c1a49d1bcfb7a4b249cb7ae83 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:39:20 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipython_genutils.
+
+---
+ build/pkgs/ipython_genutils/spkg-configure.m4 | 4 ++++
+ 1 file changed, 4 insertions(+)
+ create mode 100644 build/pkgs/ipython_genutils/spkg-configure.m4
+
+diff --git a/build/pkgs/ipython_genutils/spkg-configure.m4 b/build/pkgs/ipython_genutils/spkg-configure.m4
+new file mode 100644
+index 00000000..b0ba86a
+--- /dev/null
++++ b/build/pkgs/ipython_genutils/spkg-configure.m4
+@@ -0,0 +1,4 @@
++SAGE_SPKG_CONFIGURE(
++  [ipython_genutils],
++  [SAGE_PYTHON_PACKAGE_CHECK([ipython_genutils])]
++)
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5c9e2e265115e5f10d4b459a475467e30b4bddde Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:40:03 -0400
+Subject: Trac #29665: add Gentoo package information for ipython.
+
+---
+ build/pkgs/ipython/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipython/distros/gentoo.txt b/build/pkgs/ipython/distros/gentoo.txt
+new file mode 100644
+index 00000000..8b76f18
+--- /dev/null
++++ b/build/pkgs/ipython/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipython
+-- 
+cgit v1.0-1-gd88e
+
+
+From 621e707ddd040a902d7dddf0bed1de2b54ab22f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 07:37:56 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipython.
+
+---
+ build/pkgs/ipython/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython/spkg-configure.m4
+
+diff --git a/build/pkgs/ipython/spkg-configure.m4 b/build/pkgs/ipython/spkg-configure.m4
+new file mode 100644
+index 00000000..02ab89f
+--- /dev/null
++++ b/build/pkgs/ipython/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipython], [SAGE_PYTHON_PACKAGE_CHECK([ipython])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20a0613f6d441da436f3e7b8047a72bf490882bd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 07:51:11 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipywidgets.
+
+---
+ build/pkgs/ipywidgets/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipywidgets/spkg-configure.m4
+
+diff --git a/build/pkgs/ipywidgets/spkg-configure.m4 b/build/pkgs/ipywidgets/spkg-configure.m4
+new file mode 100644
+index 00000000..51ca9be
+--- /dev/null
++++ b/build/pkgs/ipywidgets/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipywidgets], [SAGE_PYTHON_PACKAGE_CHECK([ipywidgets])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 76bcd386633acc02a1a3026339d0cbd258ada04e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 10:05:16 -0400
+Subject: Trac #29665: add Gentoo package information for wheel.
+
+---
+ build/pkgs/wheel/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wheel/distros/gentoo.txt
+
+diff --git a/build/pkgs/wheel/distros/gentoo.txt b/build/pkgs/wheel/distros/gentoo.txt
+new file mode 100644
+index 00000000..ec571d5
+--- /dev/null
++++ b/build/pkgs/wheel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 96c2dd2ca7812f5333bb9d45eadb7ac408e364ce Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:51:44 -0500
+Subject: Trac #29665: add Gentoo package information for terminado.
+
+---
+ build/pkgs/terminado/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/terminado/distros/gentoo.txt
+
+diff --git a/build/pkgs/terminado/distros/gentoo.txt b/build/pkgs/terminado/distros/gentoo.txt
+new file mode 100644
+index 00000000..1df16f1
+--- /dev/null
++++ b/build/pkgs/terminado/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/terminado
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0de0f5f3d235a4339b21e37ea13c9f5e59a82e59 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:52:35 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for terminado.
+
+---
+ build/pkgs/terminado/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/terminado/spkg-configure.m4
+
+diff --git a/build/pkgs/terminado/spkg-configure.m4 b/build/pkgs/terminado/spkg-configure.m4
+new file mode 100644
+index 00000000..5defc2f
+--- /dev/null
++++ b/build/pkgs/terminado/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([terminado], [SAGE_PYTHON_PACKAGE_CHECK([terminado])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d14a745c770b02822557e7cee0a98de1cb2f3a12 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:56:15 -0500
+Subject: Trac #29665: add Gentoo package information for cffi.
+
+---
+ build/pkgs/cffi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cffi/distros/gentoo.txt
+
+diff --git a/build/pkgs/cffi/distros/gentoo.txt b/build/pkgs/cffi/distros/gentoo.txt
+new file mode 100644
+index 00000000..81eeb81
+--- /dev/null
++++ b/build/pkgs/cffi/distros/gentoo.txt
+@@ -0,0 +1 @@
++virtual/python-cffi
+-- 
+cgit v1.0-1-gd88e
+
+
+From ce393c04afc69fe050e38f780d4e117164687d80 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:57:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for cffi.
+
+---
+ build/pkgs/cffi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cffi/spkg-configure.m4
+
+diff --git a/build/pkgs/cffi/spkg-configure.m4 b/build/pkgs/cffi/spkg-configure.m4
+new file mode 100644
+index 00000000..dc81875
+--- /dev/null
++++ b/build/pkgs/cffi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([cffi], [SAGE_PYTHON_PACKAGE_CHECK([cffi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 467093315b3fdd57c8caa2f95cf99ad52b0b84fb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:57:57 -0500
+Subject: Trac #29665: add Gentoo package information for pip.
+
+---
+ build/pkgs/pip/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pip/distros/gentoo.txt
+
+diff --git a/build/pkgs/pip/distros/gentoo.txt b/build/pkgs/pip/distros/gentoo.txt
+new file mode 100644
+index 00000000..1845454
+--- /dev/null
++++ b/build/pkgs/pip/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pip[vanilla]
+-- 
+cgit v1.0-1-gd88e
+
+
+From c597fd23f9f68dabbcb7e698d0569c3e6458f6d1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 09:07:26 -0500
+Subject: Trac #29665: new spkg-configure.m4 for pip.
+
+---
+ build/pkgs/pip/spkg-configure.m4 | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+ create mode 100644 build/pkgs/pip/spkg-configure.m4
+
+diff --git a/build/pkgs/pip/spkg-configure.m4 b/build/pkgs/pip/spkg-configure.m4
+new file mode 100644
+index 00000000..c7a5562
+--- /dev/null
++++ b/build/pkgs/pip/spkg-configure.m4
+@@ -0,0 +1,12 @@
++SAGE_SPKG_CONFIGURE([pip], [
++  dnl always run this macro because it changes the default value of
++  dnl the --with-system-<package> option.
++  SAGE_PYTHON_PACKAGE_CHECK([pip])
++
++  dnl if we might not install the spkg, make sure that "pip" is in
++  dnl the user's PATH, too.
++  AS_IF([test "x$sage_spkg_install_pip" != "xyes"], [
++    AC_CHECK_PROG(HAVE_PIP, pip, yes, no)
++    AS_IF([test "x$HAVE_PIP" = "xno"], [sage_spkg_install_pip=yes])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ef8f1e807bc55d7b8321777486fa867a7c135419 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 9 Nov 2021 09:09:04 -0500
+Subject: Trac #29665: set $SAGE_PIP_INSTALL_FLAGS for
+ --enable-system-site-packages.
+
+We need to pass some special flags to "pip install" to make it do the
+right thing in the precence of system-site packages. Here we introduce
+a new autoconf variable, SAGE_PIP_INSTALL_FLAGS, that will be used
+to pass those flags to the build system.
+
+With autoconf aware of the variable, we substitute its value into the
+sage-build-env-config script for use in spkg-install.in.
+---
+ build/bin/sage-build-env-config.in | 1 +
+ configure.ac                       | 9 +++++++++
+ 2 files changed, 10 insertions(+)
+
+diff --git a/build/bin/sage-build-env-config.in b/build/bin/sage-build-env-config.in
+index 92e7dad..ad62e5f 100644
+--- a/build/bin/sage-build-env-config.in
++++ b/build/bin/sage-build-env-config.in
+@@ -53,6 +53,7 @@ export SAGE_PARI_CFG="@SAGE_PARI_CFG@"
+ 
+ export SAGE_GLPK_PREFIX="@SAGE_GLPK_PREFIX@"
+ export SAGE_FREETYPE_PREFIX="@SAGE_FREETYPE_PREFIX@"
++export SAGE_PIP_INSTALL_FLAGS="@SAGE_PIP_INSTALL_FLAGS@"
+ export SAGE_SUITESPARSE_PREFIX="@SAGE_SUITESPARSE_PREFIX@"
+ 
+ export SAGE_CONFIGURE_FFLAS_FFPACK="@SAGE_CONFIGURE_FFLAS_FFPACK@"
+diff --git a/configure.ac b/configure.ac
+index 6fafb83..6ed07ac 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -441,6 +441,14 @@ AC_ARG_ENABLE(
+     [allow the use of python packages from the system (experimental; default: no)]
+   )], [
+   AS_IF([test "x$enable_system_site_packages" = "xyes"], [
++    dnl When installing python SPKGs in the presence of system-site
++    dnl packages, we need to --ignore-installed so that a patched SPKG
++    dnl can be installed in the presence of an unpatched system package
++    dnl that appears (to pip) to be identical. The --no-deps flag is
++    dnl then needed because --ignore-installed will make any installed
++    dnl dependencies invisible to pip, who does not appreciate that.
++    SAGE_PIP_INSTALL_FLAGS="${SAGE_PIP_INSTALL_FLAGS} --no-deps --ignore-installed"
++
+     SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
+ 
+     dnl We want to raise an error if the user asked for "system site
+@@ -453,6 +461,7 @@ AC_ARG_ENABLE(
+     with_system_python3="force"
+   ])
+ ])
++AC_SUBST([SAGE_PIP_INSTALL_FLAGS])
+ AC_SUBST([SAGE_VENV_FLAGS])
+ 
+ SAGE_SPKG_OPTIONS=""
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3cf365fef84e809e74abd2eb388e7a8e9af9d739 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 9 Nov 2021 21:01:58 -0500
+Subject: Trac #29665: pass $SAGE_PIP_INSTALL_FLAGS to sdh_pip_install.
+
+Since sdh_pip_install is usually called from spkg-install.in, the
+variables from sage-build-env-config will be available. Here we pass
+the contents of $SAGE_PIP_INSTALL_FLAGS to sage-pip-install
+unconditionally, and hope that the user ignores this variable unless
+he truly knows what he is doing.
+---
+ build/bin/sage-dist-helpers | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/build/bin/sage-dist-helpers b/build/bin/sage-dist-helpers
+index fe364e5..1032ac3 100644
+--- a/build/bin/sage-dist-helpers
++++ b/build/bin/sage-dist-helpers
+@@ -303,7 +303,11 @@ sdh_store_wheel() {
+ }
+ 
+ sdh_store_and_pip_install_wheel() {
+-    local pip_options=""
++    # The $SAGE_PIP_INSTALL_FLAGS variable is set by sage-build-env-config.
++    # We skip sanity checking its contents since you should either let sage
++    # decide what it contains, or really know what you are doing.
++    local pip_options="${SAGE_PIP_INSTALL_FLAGS}"
++
+     while [ $# -gt 0 ]; do
+         case $1 in
+             -*) pip_options="$pip_options $1"
+-- 
+cgit v1.0-1-gd88e
+
+
+From 50f0438ee857b8f0b7d7ad924e6bba9c5e1bc033 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:10:46 -0500
+Subject: Trac #29665: add Gentoo package information for pexpect.
+
+---
+ build/pkgs/pexpect/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pexpect/distros/gentoo.txt
+
+diff --git a/build/pkgs/pexpect/distros/gentoo.txt b/build/pkgs/pexpect/distros/gentoo.txt
+new file mode 100644
+index 00000000..30c4b60
+--- /dev/null
++++ b/build/pkgs/pexpect/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pexpect
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4d784688d997290b462646fa7f36114a41f3f453 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:11:25 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pexpect.
+
+---
+ build/pkgs/pexpect/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pexpect/spkg-configure.m4
+
+diff --git a/build/pkgs/pexpect/spkg-configure.m4 b/build/pkgs/pexpect/spkg-configure.m4
+new file mode 100644
+index 00000000..6520856
+--- /dev/null
++++ b/build/pkgs/pexpect/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pexpect], [SAGE_PYTHON_PACKAGE_CHECK([pexpect])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6447122dc76a3b7a58340dbed942db66530b5b07 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:12:05 -0500
+Subject: Trac #29665: add Gentoo package information for docutils.
+
+---
+ build/pkgs/docutils/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/docutils/distros/gentoo.txt
+
+diff --git a/build/pkgs/docutils/distros/gentoo.txt b/build/pkgs/docutils/distros/gentoo.txt
+new file mode 100644
+index 00000000..fe4a452
+--- /dev/null
++++ b/build/pkgs/docutils/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/docutils
+-- 
+cgit v1.0-1-gd88e
+
+
+From 709041480a5fc729b0ee7f1a8a3b16d4d65321b5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:12:38 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for docutils.
+
+---
+ build/pkgs/docutils/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/docutils/spkg-configure.m4
+
+diff --git a/build/pkgs/docutils/spkg-configure.m4 b/build/pkgs/docutils/spkg-configure.m4
+new file mode 100644
+index 00000000..3584e45
+--- /dev/null
++++ b/build/pkgs/docutils/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([docutils], [SAGE_PYTHON_PACKAGE_CHECK([docutils])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 782d38b48ab87afccc43fbc071e7b7ed48fb0a20 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:14:37 -0500
+Subject: Trac #29665: add Gentoo package information for nbclient.
+
+---
+ build/pkgs/nbclient/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbclient/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbclient/distros/gentoo.txt b/build/pkgs/nbclient/distros/gentoo.txt
+new file mode 100644
+index 00000000..06ff18d
+--- /dev/null
++++ b/build/pkgs/nbclient/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbclient
+-- 
+cgit v1.0-1-gd88e
+
+
+From 19ce09336532336f69db74381932d51a429dfaca Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:15:11 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for nbclient.
+
+---
+ build/pkgs/nbclient/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbclient/spkg-configure.m4
+
+diff --git a/build/pkgs/nbclient/spkg-configure.m4 b/build/pkgs/nbclient/spkg-configure.m4
+new file mode 100644
+index 00000000..14178b7
+--- /dev/null
++++ b/build/pkgs/nbclient/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbclient], [SAGE_PYTHON_PACKAGE_CHECK([nbclient])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c063b9de42c1780368000a563d0dbe80b6fff169 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:17:36 -0500
+Subject: Trac #29665: add Gentoo package information for argon2_cffi.
+
+---
+ build/pkgs/argon2_cffi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argon2_cffi/distros/gentoo.txt
+
+diff --git a/build/pkgs/argon2_cffi/distros/gentoo.txt b/build/pkgs/argon2_cffi/distros/gentoo.txt
+new file mode 100644
+index 00000000..2f12ca8
+--- /dev/null
++++ b/build/pkgs/argon2_cffi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/argon2-cffi
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0b4d5699dd51ea52550fba7db9e1cbb8bbac1892 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:18:35 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for argon2_cffi.
+
+---
+ build/pkgs/argon2_cffi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argon2_cffi/spkg-configure.m4
+
+diff --git a/build/pkgs/argon2_cffi/spkg-configure.m4 b/build/pkgs/argon2_cffi/spkg-configure.m4
+new file mode 100644
+index 00000000..03ebc63
+--- /dev/null
++++ b/build/pkgs/argon2_cffi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([argon2_cffi], [SAGE_PYTHON_PACKAGE_CHECK([argon2_cffi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2b4119558a6e0b1aa512848539a237676b035c83 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:30:48 -0500
+Subject: Trac #29665: fix package name in dateutil's install-requires.txt.
+
+---
+ build/pkgs/dateutil/install-requires.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/build/pkgs/dateutil/install-requires.txt b/build/pkgs/dateutil/install-requires.txt
+index 0ae93da..face537 100644
+--- a/build/pkgs/dateutil/install-requires.txt
++++ b/build/pkgs/dateutil/install-requires.txt
+@@ -1 +1 @@
+-dateutil >=2.8.1
++python-dateutil >=2.8.1
+-- 
+cgit v1.0-1-gd88e
+
+
+From df371b7c4d20a3353d43940306ad22e11aba29da Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:31:41 -0500
+Subject: Trac #29665: add Gentoo package information for dateutil.
+
+---
+ build/pkgs/dateutil/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/dateutil/distros/gentoo.txt
+
+diff --git a/build/pkgs/dateutil/distros/gentoo.txt b/build/pkgs/dateutil/distros/gentoo.txt
+new file mode 100644
+index 00000000..e129df7
+--- /dev/null
++++ b/build/pkgs/dateutil/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/python-dateutil
+-- 
+cgit v1.0-1-gd88e
+
+
+From 577695dfdf661ee26c0ffd767bdbf479d95f7fb4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:32:21 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for dateutil.
+
+---
+ build/pkgs/dateutil/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/dateutil/spkg-configure.m4
+
+diff --git a/build/pkgs/dateutil/spkg-configure.m4 b/build/pkgs/dateutil/spkg-configure.m4
+new file mode 100644
+index 00000000..fdcd127
+--- /dev/null
++++ b/build/pkgs/dateutil/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([dateutil], [SAGE_PYTHON_PACKAGE_CHECK([dateutil])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1984651caac624ec4bb58814ca1d57fe66f9881a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:33:51 -0500
+Subject: Trac #29665: add Gentoo package information for setuptools_scm.
+
+---
+ build/pkgs/setuptools_scm/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/setuptools_scm/distros/gentoo.txt
+
+diff --git a/build/pkgs/setuptools_scm/distros/gentoo.txt b/build/pkgs/setuptools_scm/distros/gentoo.txt
+new file mode 100644
+index 00000000..8989597
+--- /dev/null
++++ b/build/pkgs/setuptools_scm/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/setuptools_scm
+-- 
+cgit v1.0-1-gd88e
+
+
+From ebf7c854ed966e7353759be485c4f5a57b9a10fa Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:34:49 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for setuptools_scm.
+
+---
+ build/pkgs/setuptools_scm/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/setuptools_scm/spkg-configure.m4
+
+diff --git a/build/pkgs/setuptools_scm/spkg-configure.m4 b/build/pkgs/setuptools_scm/spkg-configure.m4
+new file mode 100644
+index 00000000..437148c
+--- /dev/null
++++ b/build/pkgs/setuptools_scm/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([setuptools_scm], [
++  SAGE_PYTHON_PACKAGE_CHECK([setuptools_scm])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0dee0d0c28f31b1f619e44c710a3c9e22d2b2544 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:36:33 -0500
+Subject: Trac #29665: add Gentoo package information for nbconvert.
+
+---
+ build/pkgs/nbconvert/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbconvert/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbconvert/distros/gentoo.txt b/build/pkgs/nbconvert/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c45a10
+--- /dev/null
++++ b/build/pkgs/nbconvert/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbconvert
+-- 
+cgit v1.0-1-gd88e
+
+
+From 473789eb11b1838bc32dc8a63509ee199afc8912 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:37:37 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for nbconvert.
+
+---
+ build/pkgs/nbconvert/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbconvert/spkg-configure.m4
+
+diff --git a/build/pkgs/nbconvert/spkg-configure.m4 b/build/pkgs/nbconvert/spkg-configure.m4
+new file mode 100644
+index 00000000..9b5dee3
+--- /dev/null
++++ b/build/pkgs/nbconvert/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbconvert], [SAGE_PYTHON_PACKAGE_CHECK([nbconvert])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f0703b594e57c980d605aa9bc8316c45a7858b3b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:41:51 -0500
+Subject: Trac #29665: add Gentoo package information for jupyter_core.
+
+---
+ build/pkgs/jupyter_core/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyter_core/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyter_core/distros/gentoo.txt b/build/pkgs/jupyter_core/distros/gentoo.txt
+new file mode 100644
+index 00000000..f168c5a
+--- /dev/null
++++ b/build/pkgs/jupyter_core/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyter_core
+-- 
+cgit v1.0-1-gd88e
+
+
+From 061a307cc4a6680d8500fde834975064e59540d5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:42:48 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jupyter_core.
+
+---
+ build/pkgs/jupyter_core/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyter_core/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyter_core/spkg-configure.m4 b/build/pkgs/jupyter_core/spkg-configure.m4
+new file mode 100644
+index 00000000..67df9c3
+--- /dev/null
++++ b/build/pkgs/jupyter_core/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyter_core], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyter_core])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b85abe964ce0b98b5842efe9cbad9bdb1c89202f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:47:08 -0500
+Subject: Trac #29665: add Gentoo package information for jupyter_client.
+
+---
+ build/pkgs/jupyter_client/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyter_client/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyter_client/distros/gentoo.txt b/build/pkgs/jupyter_client/distros/gentoo.txt
+new file mode 100644
+index 00000000..4f1de88
+--- /dev/null
++++ b/build/pkgs/jupyter_client/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyter_client
+-- 
+cgit v1.0-1-gd88e
+
+
+From 86323ff1e0b2507933df6bc2a96c9175957640c5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:48:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jupyter_client.
+
+---
+ build/pkgs/jupyter_client/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyter_client/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyter_client/spkg-configure.m4 b/build/pkgs/jupyter_client/spkg-configure.m4
+new file mode 100644
+index 00000000..fbd3498
+--- /dev/null
++++ b/build/pkgs/jupyter_client/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyter_client], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyter_client])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a8475e27dd30d752d05ab6fea6579e8623501d82 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:48:58 -0500
+Subject: Trac #29665: add Gentoo package information for snowballstemmer.
+
+---
+ build/pkgs/snowballstemmer/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/snowballstemmer/distros/gentoo.txt
+
+diff --git a/build/pkgs/snowballstemmer/distros/gentoo.txt b/build/pkgs/snowballstemmer/distros/gentoo.txt
+new file mode 100644
+index 00000000..63fd851
+--- /dev/null
++++ b/build/pkgs/snowballstemmer/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/snowballstemmer
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0833c9b781062b4ed86d619e050a6f5d60e36080 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:49:38 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for snowballstemmer.
+
+---
+ build/pkgs/snowballstemmer/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/snowballstemmer/spkg-configure.m4
+
+diff --git a/build/pkgs/snowballstemmer/spkg-configure.m4 b/build/pkgs/snowballstemmer/spkg-configure.m4
+new file mode 100644
+index 00000000..6aa0882
+--- /dev/null
++++ b/build/pkgs/snowballstemmer/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([snowballstemmer], [
++  SAGE_PYTHON_PACKAGE_CHECK([snowballstemmer])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 50a1cf2a2bcd7eeec64cbc3f70e3e9fbe5d850fe Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:50:47 -0500
+Subject: Trac #29665: add Gentoo package information for tornado.
+
+---
+ build/pkgs/tornado/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tornado/distros/gentoo.txt
+
+diff --git a/build/pkgs/tornado/distros/gentoo.txt b/build/pkgs/tornado/distros/gentoo.txt
+new file mode 100644
+index 00000000..6ae4b9f
+--- /dev/null
++++ b/build/pkgs/tornado/distros/gentoo.txt
+@@ -0,0 +1 @@
++www-servers/tornado
+-- 
+cgit v1.0-1-gd88e
+
+
+From 118f4da6e03476c726363e8e22ecda32f13bfc33 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:51:26 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for tornado.
+
+---
+ build/pkgs/tornado/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tornado/spkg-configure.m4
+
+diff --git a/build/pkgs/tornado/spkg-configure.m4 b/build/pkgs/tornado/spkg-configure.m4
+new file mode 100644
+index 00000000..1ee5bc9
+--- /dev/null
++++ b/build/pkgs/tornado/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tornado], [SAGE_PYTHON_PACKAGE_CHECK([tornado])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3850701747a6c8ef60840bdfdb589b28d4cd2b9a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:52:21 -0500
+Subject: Trac #29665: add Gentoo package information for jsonschema.
+
+---
+ build/pkgs/jsonschema/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jsonschema/distros/gentoo.txt
+
+diff --git a/build/pkgs/jsonschema/distros/gentoo.txt b/build/pkgs/jsonschema/distros/gentoo.txt
+new file mode 100644
+index 00000000..d708e4c
+--- /dev/null
++++ b/build/pkgs/jsonschema/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jsonschema
+-- 
+cgit v1.0-1-gd88e
+
+
+From 76e3917c8af781af00f642cfada7a79594429e30 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:54:03 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jsonschema.
+
+---
+ build/pkgs/jsonschema/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jsonschema/spkg-configure.m4
+
+diff --git a/build/pkgs/jsonschema/spkg-configure.m4 b/build/pkgs/jsonschema/spkg-configure.m4
+new file mode 100644
+index 00000000..b9e5e21
+--- /dev/null
++++ b/build/pkgs/jsonschema/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jsonschema], [SAGE_PYTHON_PACKAGE_CHECK([jsonschema])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From fd4a16c11669b6dd73ac6325bca820e76db00402 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:55:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ widgetsnbextension.
+
+---
+ build/pkgs/widgetsnbextension/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/widgetsnbextension/spkg-configure.m4
+
+diff --git a/build/pkgs/widgetsnbextension/spkg-configure.m4 b/build/pkgs/widgetsnbextension/spkg-configure.m4
+new file mode 100644
+index 00000000..bf82daf
+--- /dev/null
++++ b/build/pkgs/widgetsnbextension/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([widgetsnbextension], [
++  SAGE_PYTHON_PACKAGE_CHECK([widgetsnbextension])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8079a9f384e3c8480e157dd98c3db2f43c987f4e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:57:20 -0500
+Subject: Trac #29665: add Gentoo package information for importlib_resources.
+
+---
+ build/pkgs/importlib_resources/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/importlib_resources/distros/gentoo.txt
+
+diff --git a/build/pkgs/importlib_resources/distros/gentoo.txt b/build/pkgs/importlib_resources/distros/gentoo.txt
+new file mode 100644
+index 00000000..d5e1f2c
+--- /dev/null
++++ b/build/pkgs/importlib_resources/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/importlib_resources
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2c430d7c52f02779a6c41b98ac2f4edd8b6759c3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:58:00 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ importlib_resources.
+
+---
+ build/pkgs/importlib_resources/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/importlib_resources/spkg-configure.m4
+
+diff --git a/build/pkgs/importlib_resources/spkg-configure.m4 b/build/pkgs/importlib_resources/spkg-configure.m4
+new file mode 100644
+index 00000000..50df55b
+--- /dev/null
++++ b/build/pkgs/importlib_resources/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([importlib_resources], [
++  SAGE_PYTHON_PACKAGE_CHECK([importlib_resources])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 00d13d7bf2e50aae2ccef3b2b30293c70a922af2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:58:38 -0500
+Subject: Trac #29665: add Gentoo package information for kiwisolver.
+
+---
+ build/pkgs/kiwisolver/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/kiwisolver/distros/gentoo.txt
+
+diff --git a/build/pkgs/kiwisolver/distros/gentoo.txt b/build/pkgs/kiwisolver/distros/gentoo.txt
+new file mode 100644
+index 00000000..7b30c95
+--- /dev/null
++++ b/build/pkgs/kiwisolver/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/kiwisolver
+-- 
+cgit v1.0-1-gd88e
+
+
+From 72b7907ef7ea9fa4ff6948ea34cfe2f693ee6c31 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:59:09 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for kiwisolver.
+
+---
+ build/pkgs/kiwisolver/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/kiwisolver/spkg-configure.m4
+
+diff --git a/build/pkgs/kiwisolver/spkg-configure.m4 b/build/pkgs/kiwisolver/spkg-configure.m4
+new file mode 100644
+index 00000000..4e7ac97
+--- /dev/null
++++ b/build/pkgs/kiwisolver/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([kiwisolver], [SAGE_PYTHON_PACKAGE_CHECK([kiwisolver])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 479351279e4e0ea7e2d146434f0daba038765cfd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:00:04 -0500
+Subject: Trac #29665: add Gentoo package information for notebook.
+
+---
+ build/pkgs/notebook/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/notebook/distros/gentoo.txt
+
+diff --git a/build/pkgs/notebook/distros/gentoo.txt b/build/pkgs/notebook/distros/gentoo.txt
+new file mode 100644
+index 00000000..6475d72
+--- /dev/null
++++ b/build/pkgs/notebook/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/notebook
+-- 
+cgit v1.0-1-gd88e
+
+
+From f4d9242ea654977f8ad7865c82eec593e11a36bc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:01:42 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for notebook.
+
+---
+ build/pkgs/notebook/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/notebook/spkg-configure.m4
+
+diff --git a/build/pkgs/notebook/spkg-configure.m4 b/build/pkgs/notebook/spkg-configure.m4
+new file mode 100644
+index 00000000..a17ba95
+--- /dev/null
++++ b/build/pkgs/notebook/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([notebook], [SAGE_PYTHON_PACKAGE_CHECK([notebook])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9837070c7f8e9a71283b84d49d4fd2c94b78a464 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:02:38 -0500
+Subject: Trac #29665: add Gentoo package information for matplotlib_inline.
+
+---
+ build/pkgs/matplotlib_inline/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/matplotlib_inline/distros/gentoo.txt
+
+diff --git a/build/pkgs/matplotlib_inline/distros/gentoo.txt b/build/pkgs/matplotlib_inline/distros/gentoo.txt
+new file mode 100644
+index 00000000..6a5859c
+--- /dev/null
++++ b/build/pkgs/matplotlib_inline/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/matplotlib-inline
+-- 
+cgit v1.0-1-gd88e
+
+
+From 750be73b25b92b4875e47d044360ac0e1116ec3e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:03:28 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for matplotlib_inline.
+
+---
+ build/pkgs/matplotlib_inline/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/matplotlib_inline/spkg-configure.m4
+
+diff --git a/build/pkgs/matplotlib_inline/spkg-configure.m4 b/build/pkgs/matplotlib_inline/spkg-configure.m4
+new file mode 100644
+index 00000000..e59658f
+--- /dev/null
++++ b/build/pkgs/matplotlib_inline/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([matplotlib_inline], [
++  SAGE_PYTHON_PACKAGE_CHECK([matplotlib_inline])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 273505f49698dcd2ab30c2756b07113c9b7e7791 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:04:10 -0500
+Subject: Trac #29665: add Gentoo package information for ipykernel.
+
+---
+ build/pkgs/ipykernel/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipykernel/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipykernel/distros/gentoo.txt b/build/pkgs/ipykernel/distros/gentoo.txt
+new file mode 100644
+index 00000000..88aab61
+--- /dev/null
++++ b/build/pkgs/ipykernel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipykernel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 629ad36c9e4ae0cdff4a013289b4f2911442445e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:04:46 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for ipykernel.
+
+---
+ build/pkgs/ipykernel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipykernel/spkg-configure.m4
+
+diff --git a/build/pkgs/ipykernel/spkg-configure.m4 b/build/pkgs/ipykernel/spkg-configure.m4
+new file mode 100644
+index 00000000..94ecc2d
+--- /dev/null
++++ b/build/pkgs/ipykernel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipykernel], [SAGE_PYTHON_PACKAGE_CHECK([ipykernel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b8d709edb6a24fd5868ee2818b56e78257b2eafa Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:05:26 -0500
+Subject: Trac #29665: add Gentoo package information for prompt_toolkit.
+
+---
+ build/pkgs/prompt_toolkit/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/prompt_toolkit/distros/gentoo.txt
+
+diff --git a/build/pkgs/prompt_toolkit/distros/gentoo.txt b/build/pkgs/prompt_toolkit/distros/gentoo.txt
+new file mode 100644
+index 00000000..6902484
+--- /dev/null
++++ b/build/pkgs/prompt_toolkit/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/prompt_toolkit
+-- 
+cgit v1.0-1-gd88e
+
+
+From 16c0b5e767ae4dac4440510b7253e5c8642b7d2c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:10:39 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for prompt_toolkit.
+
+---
+ build/pkgs/prompt_toolkit/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/prompt_toolkit/spkg-configure.m4
+
+diff --git a/build/pkgs/prompt_toolkit/spkg-configure.m4 b/build/pkgs/prompt_toolkit/spkg-configure.m4
+new file mode 100644
+index 00000000..fd8c1a6
+--- /dev/null
++++ b/build/pkgs/prompt_toolkit/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([prompt_toolkit], [
++  SAGE_PYTHON_PACKAGE_CHECK([prompt_toolkit])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0cd9283e8bb6c8ae413fc8f715c021f7ec3ca2c8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:12:10 -0500
+Subject: Trac #29665: add Gentoo package information for charset_normalizer.
+
+---
+ build/pkgs/charset_normalizer/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/charset_normalizer/distros/gentoo.txt
+
+diff --git a/build/pkgs/charset_normalizer/distros/gentoo.txt b/build/pkgs/charset_normalizer/distros/gentoo.txt
+new file mode 100644
+index 00000000..eefeb89
+--- /dev/null
++++ b/build/pkgs/charset_normalizer/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/charset_normalizer
+-- 
+cgit v1.0-1-gd88e
+
+
+From a04b01a9ab59097d189edcc5ddcb461faede83b2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:12:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ charset_normalizer.
+
+---
+ build/pkgs/charset_normalizer/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/charset_normalizer/spkg-configure.m4
+
+diff --git a/build/pkgs/charset_normalizer/spkg-configure.m4 b/build/pkgs/charset_normalizer/spkg-configure.m4
+new file mode 100644
+index 00000000..18b18cf
+--- /dev/null
++++ b/build/pkgs/charset_normalizer/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([charset_normalizer], [
++  SAGE_PYTHON_PACKAGE_CHECK([charset_normalizer])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d2ea08138711c53046f977b586f33b09b176b2e3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:13:37 -0500
+Subject: Trac #29665: add Gentoo package information for prometheus_client.
+
+---
+ build/pkgs/prometheus_client/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/prometheus_client/distros/gentoo.txt
+
+diff --git a/build/pkgs/prometheus_client/distros/gentoo.txt b/build/pkgs/prometheus_client/distros/gentoo.txt
+new file mode 100644
+index 00000000..aa2889c
+--- /dev/null
++++ b/build/pkgs/prometheus_client/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/prometheus_client
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b0393200e9edd3e26b8a55ba67e5710e7403fcb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:15:09 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for prometheus_client.
+
+---
+ build/pkgs/prometheus_client/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/prometheus_client/spkg-configure.m4
+
+diff --git a/build/pkgs/prometheus_client/spkg-configure.m4 b/build/pkgs/prometheus_client/spkg-configure.m4
+new file mode 100644
+index 00000000..b494588
+--- /dev/null
++++ b/build/pkgs/prometheus_client/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([prometheus_client], [
++  SAGE_PYTHON_PACKAGE_CHECK([prometheus_client])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From cdcd85284f43ca4ad18353ec3527b2901e57b788 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:17:23 -0500
+Subject: Trac #29665: add Gentoo package information for pybind11.
+
+---
+ build/pkgs/pybind11/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pybind11/distros/gentoo.txt
+
+diff --git a/build/pkgs/pybind11/distros/gentoo.txt b/build/pkgs/pybind11/distros/gentoo.txt
+new file mode 100644
+index 00000000..0c500b3
+--- /dev/null
++++ b/build/pkgs/pybind11/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pybind11
+-- 
+cgit v1.0-1-gd88e
+
+
+From efdd1eb64c4799fe3cdf2221824182941b3fda2d Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:17:51 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pybind11.
+
+---
+ build/pkgs/pybind11/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pybind11/spkg-configure.m4
+
+diff --git a/build/pkgs/pybind11/spkg-configure.m4 b/build/pkgs/pybind11/spkg-configure.m4
+new file mode 100644
+index 00000000..cce1cf5
+--- /dev/null
++++ b/build/pkgs/pybind11/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pybind11], [SAGE_PYTHON_PACKAGE_CHECK([pybind11])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b2128f33b68ea33927284116ea598dd186902400 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:19:23 -0500
+Subject: Trac #29665: add Gentoo package information for pkgconfig.
+
+---
+ build/pkgs/pkgconfig/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pkgconfig/distros/gentoo.txt
+
+diff --git a/build/pkgs/pkgconfig/distros/gentoo.txt b/build/pkgs/pkgconfig/distros/gentoo.txt
+new file mode 100644
+index 00000000..32e8618
+--- /dev/null
++++ b/build/pkgs/pkgconfig/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pkgconfig
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b373b49e06aadeb36dc57e500da9a322460e658 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:19:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pkgconfig.
+
+---
+ build/pkgs/pkgconfig/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pkgconfig/spkg-configure.m4
+
+diff --git a/build/pkgs/pkgconfig/spkg-configure.m4 b/build/pkgs/pkgconfig/spkg-configure.m4
+new file mode 100644
+index 00000000..6708293
+--- /dev/null
++++ b/build/pkgs/pkgconfig/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pkgconfig], [SAGE_PYTHON_PACKAGE_CHECK([pkgconfig])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ce578729eb0d14baab365351ba9a9ffffb7b79f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:21:10 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_serializinghtml.
+
+---
+ build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt b/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+new file mode 100644
+index 00000000..38bca8f
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-serializinghtml
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb0f42c32bbce0e4488678312f5e2d88c6f42c9b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:21:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_serializinghtml.
+
+---
+ build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4 b/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+new file mode 100644
+index 00000000..be8e625
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_serializinghtml], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_serializinghtml])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e47dcf985e40475de85c9436a85537751318bc3d Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:22:54 -0500
+Subject: Trac #29665: add Gentoo package information for sphinxcontrib_jsmath.
+
+---
+ build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt b/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+new file mode 100644
+index 00000000..041a471
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-jsmath
+-- 
+cgit v1.0-1-gd88e
+
+
+From 72cff6fd35f93de4fa855bc870569dd733ff5c24 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:23:49 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_jsmath.
+
+---
+ build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4 b/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+new file mode 100644
+index 00000000..e46bde2
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_jsmath], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_jsmath])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a36395d70f759449cd63c1b0990fbdcb4cb25ca0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:24:26 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_devhelp.
+
+---
+ build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..9b5c899
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-devhelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9953a5dd1646ed0ad51d2e3935cf609bc9e7fd1c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:25:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_devhelp.
+
+---
+ build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+new file mode 100644
+index 00000000..8728136
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_devhelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_devhelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b199d5363aad93f3cb23f7904c9553a28b06348f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:25:53 -0500
+Subject: Trac #29665: add Gentoo package information for sphinxcontrib_qthelp.
+
+---
+ build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..7210099
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-qthelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 94ac8806739f3938e73f5857328e91e0d42e98d2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:26:28 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_qthelp.
+
+---
+ build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+new file mode 100644
+index 00000000..81ea5e1
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_qthelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_qthelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From beedc154aa405e8a58aee8889f510db07adc89a7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:26:54 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_applehelp.
+
+---
+ build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..66ac8da
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-applehelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 07d47c3673d6b35423b71f621cb400989c0101c2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:27:19 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_applehelp.
+
+---
+ build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+new file mode 100644
+index 00000000..e834aed
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_applehelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_applehelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 333a66546c5d421735c49dbafd7370a827f22781 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:27:46 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_htmlhelp.
+
+---
+ build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..e080bac
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-htmlhelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From bfaeb3962254439b63f1f2e0e883de462c7831be Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:29:18 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_htmlhelp.
+
+---
+ build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+new file mode 100644
+index 00000000..c77b003
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_htmlhelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_htmlhelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 782cde13da06e8b85806cb7cbc8aceee0364e639 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:30:23 -0500
+Subject: Trac #29665: add Gentoo package information for jupyterlab_pygments.
+
+---
+ build/pkgs/jupyterlab_pygments/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyterlab_pygments/distros/gentoo.txt b/build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+new file mode 100644
+index 00000000..c57b4f1
+--- /dev/null
++++ b/build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyterlab_pygments
+-- 
+cgit v1.0-1-gd88e
+
+
+From 39f974cfa4a8c6e5dd897f152f83ec82f40ee9f7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:31:13 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ jupyterlab_pygments.
+
+---
+ build/pkgs/jupyterlab_pygments/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyterlab_pygments/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyterlab_pygments/spkg-configure.m4 b/build/pkgs/jupyterlab_pygments/spkg-configure.m4
+new file mode 100644
+index 00000000..e46e21f
+--- /dev/null
++++ b/build/pkgs/jupyterlab_pygments/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyterlab_pygments], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyterlab_pygments])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From db704620700fd36cec3bf6125938f3ee00a9eb5e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:29:15 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for ply.
+
+---
+ build/pkgs/ply/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ply/spkg-configure.m4
+
+diff --git a/build/pkgs/ply/spkg-configure.m4 b/build/pkgs/ply/spkg-configure.m4
+new file mode 100644
+index 00000000..ffb0030
+--- /dev/null
++++ b/build/pkgs/ply/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ply], [SAGE_PYTHON_PACKAGE_CHECK([ply])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6aac31dabcdfdef228d7780398a3fda1a4cc566f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:29:51 -0500
+Subject: Trac #29665: add Gentoo package information for ply.
+
+---
+ build/pkgs/ply/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ply/distros/gentoo.txt
+
+diff --git a/build/pkgs/ply/distros/gentoo.txt b/build/pkgs/ply/distros/gentoo.txt
+new file mode 100644
+index 00000000..c8b1630
+--- /dev/null
++++ b/build/pkgs/ply/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ply
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb8d3372936ec37470d69687a0f91592129460ae Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:30:33 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for gast.
+
+---
+ build/pkgs/gast/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/gast/spkg-configure.m4
+
+diff --git a/build/pkgs/gast/spkg-configure.m4 b/build/pkgs/gast/spkg-configure.m4
+new file mode 100644
+index 00000000..26ec59f
+--- /dev/null
++++ b/build/pkgs/gast/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([gast], [SAGE_PYTHON_PACKAGE_CHECK([gast])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1cdc4046a88f1c2b4e5c162f66c6db6090b24194 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:31:15 -0500
+Subject: Trac #29665: add Gentoo package information for gast.
+
+---
+ build/pkgs/gast/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/gast/distros/gentoo.txt
+
+diff --git a/build/pkgs/gast/distros/gentoo.txt b/build/pkgs/gast/distros/gentoo.txt
+new file mode 100644
+index 00000000..3be5e7e
+--- /dev/null
++++ b/build/pkgs/gast/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/gast
+-- 
+cgit v1.0-1-gd88e
+
+
+From 96068b8a3742b65d619190e1d9fa5db399e6b4f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:32:20 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pythran.
+
+---
+ build/pkgs/pythran/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pythran/spkg-configure.m4
+
+diff --git a/build/pkgs/pythran/spkg-configure.m4 b/build/pkgs/pythran/spkg-configure.m4
+new file mode 100644
+index 00000000..592e95b
+--- /dev/null
++++ b/build/pkgs/pythran/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pythran], [SAGE_PYTHON_PACKAGE_CHECK([pythran])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1fa0fad3ae8f7e559c6fc315c6773a7d8aac0bfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:32:55 -0500
+Subject: Trac #29665: add Gentoo package information for pythran.
+
+---
+ build/pkgs/pythran/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pythran/distros/gentoo.txt
+
+diff --git a/build/pkgs/pythran/distros/gentoo.txt b/build/pkgs/pythran/distros/gentoo.txt
+new file mode 100644
+index 00000000..1bb7cdc
+--- /dev/null
++++ b/build/pkgs/pythran/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pythran
+-- 
+cgit v1.0-1-gd88e
+
+
+From d26370e5b8c88e76abfb7c27e3defb71c9e9f711 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:33:50 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for beniget.
+
+---
+ build/pkgs/beniget/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/beniget/spkg-configure.m4
+
+diff --git a/build/pkgs/beniget/spkg-configure.m4 b/build/pkgs/beniget/spkg-configure.m4
+new file mode 100644
+index 00000000..8ae6101
+--- /dev/null
++++ b/build/pkgs/beniget/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([beniget], [SAGE_PYTHON_PACKAGE_CHECK([beniget])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From eeeb296ed9b9694a865534103fd58e62a151ef5e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:34:22 -0500
+Subject: Trac #29665: add Gentoo package information for beniget.
+
+---
+ build/pkgs/beniget/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/beniget/distros/gentoo.txt
+
+diff --git a/build/pkgs/beniget/distros/gentoo.txt b/build/pkgs/beniget/distros/gentoo.txt
+new file mode 100644
+index 00000000..1a5972c
+--- /dev/null
++++ b/build/pkgs/beniget/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/beniget
+-- 
+cgit v1.0-1-gd88e
+
+
+From 078b2ff272d0eeff5cce40ad7eb176d9ddd7bdff Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:35:37 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for alabaster.
+
+---
+ build/pkgs/alabaster/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/alabaster/spkg-configure.m4
+
+diff --git a/build/pkgs/alabaster/spkg-configure.m4 b/build/pkgs/alabaster/spkg-configure.m4
+new file mode 100644
+index 00000000..4eca6e0
+--- /dev/null
++++ b/build/pkgs/alabaster/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([alabaster], [SAGE_PYTHON_PACKAGE_CHECK([alabaster])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7dc264353e5f64110431ff28c1b8b7e89699e9bd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:36:06 -0500
+Subject: Trac #29665: add Gentoo package information for alabaster.
+
+---
+ build/pkgs/alabaster/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/alabaster/distros/gentoo.txt
+
+diff --git a/build/pkgs/alabaster/distros/gentoo.txt b/build/pkgs/alabaster/distros/gentoo.txt
+new file mode 100644
+index 00000000..cffece6
+--- /dev/null
++++ b/build/pkgs/alabaster/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/alabaster
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8011a5e675e7e61a77ce34a299ee961a9f44253f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:43:59 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ importlib_metadata.
+
+---
+ build/pkgs/importlib_metadata/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/importlib_metadata/spkg-configure.m4
+
+diff --git a/build/pkgs/importlib_metadata/spkg-configure.m4 b/build/pkgs/importlib_metadata/spkg-configure.m4
+new file mode 100644
+index 00000000..0554e52
+--- /dev/null
++++ b/build/pkgs/importlib_metadata/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([importlib_metadata], [
++  SAGE_PYTHON_PACKAGE_CHECK([importlib_metadata])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 928ca0019e3ec6c4541a16b28bcc6710df6d010b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:44:28 -0500
+Subject: Trac #29665: add Gentoo package information for importlib_metadata.
+
+---
+ build/pkgs/importlib_metadata/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/importlib_metadata/distros/gentoo.txt
+
+diff --git a/build/pkgs/importlib_metadata/distros/gentoo.txt b/build/pkgs/importlib_metadata/distros/gentoo.txt
+new file mode 100644
+index 00000000..4f92786
+--- /dev/null
++++ b/build/pkgs/importlib_metadata/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/importlib_metadata
+-- 
+cgit v1.0-1-gd88e
+
+
+From 135f184f7498a2046065e669723e68efe2d65cee Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 21:16:58 -0500
+Subject: Trac #29665: fix sage.misc.package doctest with system alabaster.
+
+When alabaster from the system is used, these tests won't be able to
+find its SPKG installed. Add some ellipses, and switch one test to
+look for sage_conf instead.
+---
+ src/sage/misc/package.py | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/sage/misc/package.py b/src/sage/misc/package.py
+index 84f3d50..c7ad206 100644
+--- a/src/sage/misc/package.py
++++ b/src/sage/misc/package.py
+@@ -386,9 +386,9 @@ def installed_packages(exclude_pip=True):
+     EXAMPLES::
+ 
+         sage: sorted(installed_packages().keys())  # optional - build
+-        [...'alabaster', ...'sage_conf', ...]
+-        sage: installed_packages()['alabaster']  # optional - build, random
+-        '0.7.12'
++        [...'sage_conf', ...]
++        sage: installed_packages()['sage_conf']  # optional - build, random
++        '9.5'
+ 
+     .. SEEALSO::
+ 
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch b/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
new file mode 100644
index 000000000000..7ef3826aa4d2
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
@@ -0,0 +1,27 @@
+diff --git a/src/bin/sage-runtests b/src/bin/sage-runtests
+index 589dc8cd37..6bb8bf99a4 100755
+--- a/src/bin/sage-runtests
++++ b/src/bin/sage-runtests
+@@ -154,21 +154,4 @@ if __name__ == "__main__":
+     DC = DocTestController(args, args.filenames)
+     err = DC.run()
+ 
+-    try:
+-        exit_code_pytest = 0
+-        import pytest
+-        pytest_options = ["--import-mode", "importlib"]
+-        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.")
+-
+-    if err == 0:
+-        sys.exit(exit_code_pytest)
+-    else:
+-        sys.exit(err)
++    sys.exit(err)
diff --git a/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch b/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
new file mode 100644
index 000000000000..093e3d56eb33
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
@@ -0,0 +1,42 @@
+More site packages not included in trac 29665
+
+diff --git a/build/pkgs/gmpy2/spkg-configure.m4 b/build/pkgs/gmpy2/spkg-configure.m4
+new file mode 100644
+index 0000000000..2d0390f7db
+--- /dev/null
++++ b/build/pkgs/gmpy2/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([gmpy2], [SAGE_PYTHON_PACKAGE_CHECK([gmpy2])])
+diff --git a/build/pkgs/sphinx/spkg-configure.m4 b/build/pkgs/sphinx/spkg-configure.m4
+new file mode 100644
+index 0000000000..e149fbb2cf
+--- /dev/null
++++ b/build/pkgs/sphinx/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([sphinx], [SAGE_PYTHON_PACKAGE_CHECK([sphinx])])
+diff --git a/build/pkgs/typing_extensions/spkg-configure.m4 b/build/pkgs/typing_extensions/spkg-configure.m4
+new file mode 100644
+index 0000000000..d475fd8257
+--- /dev/null
++++ b/build/pkgs/typing_extensions/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([typing_extensions], [SAGE_PYTHON_PACKAGE_CHECK([typing_extensions])])
+-- 
+diff --git a/build/pkgs/gmpy2/install-requires.txt b/build/pkgs/gmpy2/install-requires.txt
+index 51d24518ef..c25feff557 100644
+--- a/build/pkgs/gmpy2/install-requires.txt
++++ b/build/pkgs/gmpy2/install-requires.txt
+@@ -1,3 +1 @@
+-# We would like to write gmpy2 >=2.1.0b5, but pipenv does not accept prereleases in version ranges
+-# https://github.com/pypa/pipenv/issues/1760
+-gmpy2 ==2.1.0rc1
++gmpy2 >=2.1
+diff --git a/build/pkgs/ptyprocess/install-requires.txt b/build/pkgs/ptyprocess/install-requires.txt
+index de89260872..7c336f636c 100644
+--- a/build/pkgs/ptyprocess/install-requires.txt
++++ b/build/pkgs/ptyprocess/install-requires.txt
+@@ -1,3 +1,3 @@
+-ptyprocess ==0.5.1
++ptyprocess
+ # https://trac.sagemath.org/ticket/31280#comment:42 and following
+ # sagelib is not compatible with ptyprocess 0.5.2, 0.6, and 0.7
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 33b40acbabeb..a32c5d18f378 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -22,11 +22,13 @@ distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
 checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
 python_version=3
 
-build_options="debug system_python3"
+build_options="debug system_python3 system_site_packages"
 desc_option_debug="Build with debug symbols"
 desc_option_system_python="Build using system python 3"
-build_options_default="system_python3"
+desc_option_system_python="Build using system python site-packages"
+build_options_default="system_python3 system_site_packages"
 configure_args+=" $(vopt_with system_python3)"
+configure_args+=" $(vopt_enable system_site_packages)"
 
 # path where sage will be installed
 _SAGE_ROOT=/usr/lib/sage-${version}
@@ -163,6 +165,8 @@ do_check() {
 	fi
 	if [ "$XBPS_CHECK_PKGS" = full ]; then
 		_test_args="--long $_test_args"
+	else
+		_test_args="--warn-long 5.0 $_test_args"
 	fi
 	# since make check will build the docs, run test like this instead
 	./sage -tp ${XBPS_MAKEJOBS} ${_test_args}
@@ -182,7 +186,7 @@ makedepends+=" automake gettext gettext-devel"
 # other host dependencies
 makedepends+=" cmake curl git ninja pandoc patch pkg-config python3 tox"
 
-# already in void
+# standard dependencies
 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
@@ -202,7 +206,49 @@ makedepends+="
  brial-devel cliquer-devel gfan libbraiding-devel libhomfly-devel
  lrcalc-devel nauty-devel palp tachyon
  maxima-ecl primesieve-devel primecount-devel
+ ffmpeg ImageMagick
 "
 
 # TODO: optional
 # 4ti2 coxeter3 libsemigroups lrslib pdf2svg perl_mongodb polymake
+
+# TODO: standard
+# cvxopt importlib_resources
+
+# python packages for trac-29665
+_sage_python3_modules="
+ python3-Babel python3-Jinja2 python3-MarkupSafe python3-Pillow
+ python3-Pygments python3-Sphinx python3-alabaster python3-argcomplete
+ python3-argon2 python3-attrs python3-backcall python3-beniget
+ python3-bleach python3-certifi python3-cffi python3-charset-normalizer
+ python3-cycler python3-dateutil python3-decorator python3-defusedxml
+ python3-docutils python3-entrypoints python3-flit_core python3-gast
+ python3-gmpy2 python3-html5lib python3-idna python3-imagesize
+ python3-importlib_metadata python3-ipython python3-ipython_genutils
+ python3-ipython_ipykernel python3-jedi python3-jsonschema
+ python3-jupyter_client python3-jupyter_core python3-jupyter_ipywidgets
+ python3-jupyter_nbconvert python3-jupyter_nbformat
+ python3-jupyter_notebook python3-jupyterlab_pygments python3-kiwisolver
+ python3-matplotlib python3-matplotlib-inline python3-mistune
+ python3-mpmath python3-nbclient python3-nest_asyncio python3-networkx
+ python3-numpy python3-packaging python3-pandocfilters python3-parsing
+ python3-parso python3-pexpect python3-pickleshare python3-pip
+ python3-pkgconfig python3-pluggy python3-ply python3-prometheus_client
+ python3-prompt_toolkit python3-ptyprocess python3-py python3-pybind11
+ python3-pycparser python3-pyrsistent python3-pytz python3-pyzmq
+ python3-requests python3-scipy python3-send2trash python3-setuptools
+ python3-setuptools_scm python3-simplegeneric python3-six
+ python3-snowballstemmer python3-sphinxcontrib-applehelp
+ python3-sphinxcontrib-devhelp python3-sphinxcontrib-htmlhelp
+ python3-sphinxcontrib-jsmath python3-sphinxcontrib-qthelp
+ python3-sphinxcontrib-serializinghtml python3-sympy python3-terminado
+ python3-testpath python3-texttable python3-toml python3-tomli
+ python3-tornado python3-traitlets python3-typing_extensions
+ python3-tzlocal python3-urllib3 python3-wcwidth python3-webencodings
+ python3-wheel python3-zipp pythran
+ "
+
+if [ "$build_option_system_site_packages" ]; then
+	makedepends+=" $_sage_python3_modules"
+	depends+=" $_sage_python3_modules"
+fi

From aa3afbb7ecace93778636b5637fbd7cb5c3be805 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 3 Jan 2022 20:47:52 -0300
Subject: [PATCH 24/36] sagemath: use small source tarball + upstream packages

---
 srcpkgs/sagemath/template | 97 ++++++++++++++++++++++++++-------------
 1 file changed, 64 insertions(+), 33 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index a32c5d18f378..0de0061b09df 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -18,8 +18,8 @@ short_desc="Open source mathematics software"
 maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
-distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
-checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
+distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
+checksum=aea4c5a8d3b32af2fba644269b9daf4f62471471ba2d7d83da0f8098a5f53225
 python_version=3
 
 build_options="debug system_python3 system_site_packages"
@@ -33,42 +33,72 @@ configure_args+=" $(vopt_enable system_site_packages)"
 # 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} ;;
-esac
+_SAGE_UPSTREAM_MIRROR=https://mirrors.mit.edu/sage/spkg/upstream
 
-# extra upstream packages (trac-32968 / trac-33040)
 _upstream="
- https://pypi.io/packages/source/s/sphinx/Sphinx-4.3.1.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
+${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
+${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
+${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
+${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
+${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
+${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
+${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
+https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
+https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
+http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
+${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
+${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
+${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
+${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
+${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
+https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
+${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
+https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
+${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
 "
 
 checksum+="
- 32a5b3e9a1b176cc25ed048557d4d3d01af635e6b76c5bc7a43b0a34447fbd45
-
- 9c87405839a19696e837b3b818fed3f5f69f16f1eec1a1ad77e043dcea9c772f
- fc4453705b81d03568d5b808ad8f09c77c47534f6ac2e72e733f9ca4714aa75c
- acad2d8b20a1af07d4e4c9d2e9285c5ed9104354062f275f3fcd88dcef4f1326
- 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
- 78884e7c1d4b00ce3cea67b44566851c4343c120abd683433ce934a68ea58872
- 0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86
- b8e2f83c56e141920c39464b852de3719dfbfb6e3c99a2d8da0edf4fb33176ed
- d9bdec0013ef1eb5a84ab39a3b3868911598afa494f5faa038647101504e2b81
- b2e9810e09c3a47b73ce9cab5a72243a1258f61e7900969097a817232246ce1c
- 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
- 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
+c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
+d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
+4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
+3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
+03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
+5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
+cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
+5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
+581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
+6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
+07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
+a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
+ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
+d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
+169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
+5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
+cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
+471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
+78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
+edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
+b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
+3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
+545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
+cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
+718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
+dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
 "
 
 for u in ${_upstream}; do
@@ -101,6 +131,7 @@ post_extract() {
 	mv -T $wrksrc $_SAGE_ROOT
 	ln -srfT $_SAGE_ROOT $wrksrc
 
+	mkdir -p $wrksrc/upstream
 	for u in ${_upstream}; do
 		cp "$XBPS_SRCDISTDIR/${pkgname}-${version}/${u##*[/>]}" $wrksrc/upstream
 	done

From 7bcc0dee22bd31d332aae4c6fd813fe0baaa7351 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 13:38:02 -0300
Subject: [PATCH 25/36] sagemath: for CI use fixed random-seed=0

---
 srcpkgs/sagemath/template | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 0de0061b09df..b5b99d2c122d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -194,6 +194,10 @@ do_check() {
 	if [ -z "$_test_args" ]; then
 		_test_args=--all
 	fi
+	if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
+		# for CI use a predictable random seed
+		_test_args="--random-seed=0 $_test_args"
+	fi
 	if [ "$XBPS_CHECK_PKGS" = full ]; then
 		_test_args="--long $_test_args"
 	else

From 4717bec814c489ec1c073c6c062e064bdebc215f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 14:40:27 -0300
Subject: [PATCH 26/36] sagemath: upstream two patches

---
 ...ble-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch} |  6 +++---
 ...rse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch} | 10 +++++-----
 2 files changed, 8 insertions(+), 8 deletions(-)
 rename srcpkgs/sagemath/patches/{0001-sage-site-exec-only-if-it-is-executable.patch => trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch} (94%)
 rename srcpkgs/sagemath/patches/{0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch => trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch} (81%)

diff --git a/srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch b/srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
similarity index 94%
rename from srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch
rename to srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
index ce17c6d6e954..7fdb3d697222 100644
--- a/srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch
+++ b/srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
@@ -1,14 +1,14 @@
 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
+Subject: 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
+index 4c0fa17..153e610 100755
 --- a/src/bin/sage
 +++ b/src/bin/sage
 @@ -129,7 +129,7 @@ usage() {
@@ -39,5 +39,5 @@ index 4c0fa17426..153e610a2e 100755
              # fallthrough if there is no sage-site script
          fi
 -- 
-2.34.1
+cgit v1.0-1-gd88e
 
diff --git a/srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch b/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
similarity index 81%
rename from srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch
rename to srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
index bab6d8441d42..350c41ac3928 100644
--- a/srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch
+++ b/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
@@ -1,16 +1,16 @@
-From 57e3eba28c9b4ee6bd3407d0715b8bd00aaf04a7 Mon Sep 17 00:00:00 2001
+From 53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6 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
+Subject: sagetex: Fix a warning when byte-compiling sagetexparse.py
 
 ---
- .../sagetex/patches/sagetex-fix-warning.patch    | 16 ++++++++++++++++
+ build/pkgs/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
+index 00000000..d82ab67
 --- /dev/null
 +++ b/build/pkgs/sagetex/patches/sagetex-fix-warning.patch
 @@ -0,0 +1,16 @@
@@ -31,5 +31,5 @@ index 0000000000..d82ab675dd
 +     self.result += t.code[1:-1] + '\n\n'
 + 
 -- 
-2.34.1
+cgit v1.0-1-gd88e
 

From b7ed046847fb01165bb469a7d5f1d6600a4e12c2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 19:57:59 -0300
Subject: [PATCH 27/36] sagemath: reorder upstream sources and add two missing
 ones

---
 srcpkgs/sagemath/template | 60 ++++++++++++++++++++++-----------------
 1 file changed, 34 insertions(+), 26 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index b5b99d2c122d..f53cba947c88 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -36,69 +36,77 @@ _SAGE_ROOT=/usr/lib/sage-${version}
 _SAGE_UPSTREAM_MIRROR=https://mirrors.mit.edu/sage/spkg/upstream
 
 _upstream="
-${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
 ${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
 ${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
+
+${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
 ${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
 ${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
 ${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
 ${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
 ${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
 ${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
-https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
-https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
-http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
 ${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
 ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
 ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
 ${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
 ${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${PYPI_SITE}/P/PyCygwin/PyCygwin-0.1.tar.gz
 ${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
-https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+${PYPI_SITE}/s/setuptools/setuptools-59.2.0.tar.gz
 ${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
 ${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
-https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
 ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
+
+https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
+https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
+http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
+https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
 "
 
 checksum+="
-dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
 c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
 d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
+5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
+ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
+169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
+cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
+edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
+cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
+
+dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
 3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
 03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
 5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
 cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
-5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
-c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
-6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
-07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
 a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
-ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
 d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
-169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
 5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
-cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
 471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
 78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
-edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+45a5e295590c469a49b2804bfdb89059e942d768ad3b813f484d7b5bff48d226
 ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
-b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
-3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+157d21de9d055ab9e8ea3186d91e7f4f865e11f42deafa952d90842671fc2576
 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
 545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
-cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
-718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
 dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
+
+c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
+6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
+07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
+3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
 "
 
 for u in ${_upstream}; do

From 3a6e96918c218bae4e20f95552725b67a51d7238 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 9 Jan 2022 12:45:47 -0300
Subject: [PATCH 28/36] sagemath: do not download anything patch

---
 .../patches/00-Do_not_download_anything.patch         | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 srcpkgs/sagemath/patches/00-Do_not_download_anything.patch

diff --git a/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch b/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch
new file mode 100644
index 000000000000..35aef7b8d456
--- /dev/null
+++ b/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch
@@ -0,0 +1,11 @@
+--- a/build/sage_bootstrap/tarball.py	2022-01-07 19:17:06.754747955 -0300
++++ b/build/sage_bootstrap/tarball.py	2022-01-07 19:25:31.844139381 -0300
+@@ -158,6 +158,8 @@
+                             .format(destination=destination))
+         successful_download = False
+         log.info('Attempting to download package {0} from mirrors'.format(self.filename))
++        log.info('ERROR: downloading is disabled, add file to template instead')
++        return
+         for mirror in MirrorList():
+             url = mirror + '/'.join(['spkg', 'upstream', self.package.name, self.filename])
+             log.info(url)

From ed312895455ff690b2e8736085f72d9480504d3d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 9 Jan 2022 13:27:49 -0300
Subject: [PATCH 29/36] sagemath: update to 9.5.rc0.

---
 ...184f7498a2046065e669723e68efe2d65cee.patch |    6 +-
 ...1d4ced4264f65ab704f725f6f5879b012796.patch |  263 ----
 ...a54526829b79d5d236a40f83ddc6ce7b2696.patch | 1196 -----------------
 ...9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch |   27 -
 ...3f4f32246ad9ded6d37f1f2f12a589a81f4.patch} |    4 +-
 ...03138d0403be7c7cb303de2bc0a0e0b6793c.patch |   82 --
 ...f3a1611fed0cc66fb838eb85739646dd34d.patch} |   94 +-
 ...49c415e11d0522bff9013bc1509264b26ebf.patch |   27 +
 ...ip_doctest_singular_4.2.1--see_33134.patch |   13 +
 srcpkgs/sagemath/template                     |    6 +-
 10 files changed, 72 insertions(+), 1646 deletions(-)
 delete mode 100644 srcpkgs/sagemath/patches/trac-30766-system_python_3.10-df9f1d4ced4264f65ab704f725f6f5879b012796.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
 rename srcpkgs/sagemath/patches/{trac-33064-sage_docbuild_ignore_cache_save_permission_error-f767cf1eadfd8ab540a31c5c5ef09d56df09b90e.patch => trac-33064-sage_docbuild_ignore_cache_save_permission_error-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch} (92%)
 delete mode 100644 srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
 rename srcpkgs/sagemath/patches/{trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch => trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch} (63%)
 create mode 100644 srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch

diff --git a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
index b641113927e7..0ecb27c593cd 100644
--- a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
+++ b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
@@ -5615,9 +5615,9 @@ index 84f3d50..c7ad206 100644
      EXAMPLES::
  
          sage: sorted(installed_packages().keys())  # optional - build
--        [...'alabaster', ...'sage_conf', ...]
--        sage: installed_packages()['alabaster']  # optional - build, random
--        '0.7.12'
+-        [...'gmpy2', ...'sage_conf', ...]
+-        sage: installed_packages()['gmpy2']  # optional - build, random
+-        '2.1.0b5'
 +        [...'sage_conf', ...]
 +        sage: installed_packages()['sage_conf']  # optional - build, random
 +        '9.5'
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
deleted file mode 100644
index a1cb4c834482..000000000000
--- a/srcpkgs/sagemath/patches/trac-30766-system_python_3.10-df9f1d4ced4264f65ab704f725f6f5879b012796.patch
+++ /dev/null
@@ -1,263 +0,0 @@
-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-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch b/srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
deleted file mode 100644
index 3ae6fe01822d..000000000000
--- a/srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
+++ /dev/null
@@ -1,1196 +0,0 @@
-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/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch b/srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
deleted file mode 100644
index 485fb0176f45..000000000000
--- a/srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-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: 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 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"
- 
- # 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)
--- 
-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-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
similarity index 92%
rename from srcpkgs/sagemath/patches/trac-33064-sage_docbuild_ignore_cache_save_permission_error-f767cf1eadfd8ab540a31c5c5ef09d56df09b90e.patch
rename to srcpkgs/sagemath/patches/trac-33064-sage_docbuild_ignore_cache_save_permission_error-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
index 20fa12e570eb..04f04cfd6718 100644
--- 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-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
@@ -1,4 +1,4 @@
-From f767cf1eadfd8ab540a31c5c5ef09d56df09b90e Mon Sep 17 00:00:00 2001
+From e89193f4f32246ad9ded6d37f1f2f12a589a81f4 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
@@ -8,7 +8,7 @@ Subject: sage_docbuild: do not fail when cache cannot be saved
  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
+index 466ca82..f8c8ebd 100644
 --- a/src/sage_docbuild/__init__.py
 +++ b/src/sage_docbuild/__init__.py
 @@ -856,9 +856,12 @@ class ReferenceSubBuilder(DocBuilder):
diff --git a/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch b/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
deleted file mode 100644
index 6bc5193b75ee..000000000000
--- a/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-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
-
-
-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/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch b/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
similarity index 63%
rename from srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch
rename to srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
index 3794aa7f019b..04fca4815a00 100644
--- a/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch
+++ b/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
@@ -1,4 +1,4 @@
-From 7d3381b21e4716cfa8a33915621a12f0eba74233 Mon Sep 17 00:00:00 2001
+From 18d0477153af6f453a0e84f78030535f6a36ce87 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
@@ -10,56 +10,56 @@ Subject: doctests: remove dochtml label from some tests that don't need docs
  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
+index c788623..527ed90 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  # optional - sagemath_doc_html
+-        sage: thematic_index = os.path.join(SAGE_DOC, "html", "en", "thematic_tutorials", "index.html")  # optional - sagemath_doc_html
 +        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
+         sage: for line in open(thematic_index).readlines():  # optional - sagemath_doc_html
          ....:     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
+index 4c56aea..583ca06 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  # optional - sagemath_doc_html
+-    sage: docfilename = os.path.join(SAGE_DOC, 'html', 'en', 'reference', 'calculus', 'sage', 'symbolic', 'expression.html')  # optional - sagemath_doc_html
 +    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
+     sage: with open(docfilename) as fobj:  # optional - sagemath_doc_html
      ....:     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='',
+@@ -845,12 +845,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  # optional - sagemath_doc_html
+-        sage: len(_search_src_or_doc('src', r'matrix\(', 'incidence_structures', 'self', 'combinat', interact=False).splitlines()) > 1  # optional - sagemath_doc_html
 +        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)
+         sage: 'abvar/homology' in _search_src_or_doc('doc', 'homology', 'variety', interact=False)  # optional - sagemath_doc_html, 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)  # optional - sagemath_doc_html
 +        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:
+@@ -1369,7 +1369,7 @@ class _sage_doc:
  
-         sage: browse_sage_doc._open("reference", testing=True)[0]  # optional - dochtml, indirect doctest
+         sage: browse_sage_doc._open("reference", testing=True)[0]  # optional - sagemath_doc_html, 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]  # optional - sagemath_doc_html
 +        sage: browse_sage_doc(identity_matrix, 'rst')[-107:-47]
          'Full MatrixSpace of 3 by 3 sparse matrices over Integer Ring'
      """
@@ -68,7 +68,7 @@ index eb70516..b4848ed 100644
 cgit v1.0-1-gd88e
 
 
-From 42a76c3f82edecc9c6c53c661251677e3e907584 Mon Sep 17 00:00:00 2001
+From 88dd9f3a1611fed0cc66fb838eb85739646dd34d 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
@@ -78,7 +78,7 @@ Subject: doctests: add dochtml label to some tests that need docs installed
  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
+index f8c8ebd..d329009 100644
 --- a/src/sage_docbuild/__init__.py
 +++ b/src/sage_docbuild/__init__.py
 @@ -105,7 +105,7 @@ def builder_helper(type):
@@ -86,7 +86,7 @@ index 4a71c91..dd233bd 100644
          sage: from sage_docbuild import _build_many as build_many
          sage: helper = builder_helper("html")
 -        sage: try:
-+        sage: try:  # optional - dochtml
++        sage: try:  # optional - sagemath_doc_html
          ....:     build_many(build_ref_doc, [("docname", "en", "html", {})])
          ....: except Exception as E:
          ....:     "Non-exception during docbuild: abort pool operation" in str(E)
@@ -95,7 +95,7 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import DocBuilder
              sage: b = DocBuilder('tutorial')
 -            sage: b._output_dir('html')
-+            sage: b._output_dir('html')         # optional - dochtml
++            sage: b._output_dir('html')         # optional - sagemath_doc_html
              '.../html/en/tutorial'
          """
          d = os.path.join(SAGE_DOC, type, self.lang, self.name)
@@ -104,7 +104,7 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import DocBuilder
              sage: b = DocBuilder('tutorial')
 -            sage: b._doctrees_dir()
-+            sage: b._doctrees_dir()             # optional - docthml
++            sage: b._doctrees_dir()             # optional - sagemath_doc_html
              '.../doctrees/en/tutorial'
          """
          d = os.path.join(SAGE_DOC, 'doctrees', self.lang, self.name)
@@ -113,7 +113,7 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import ReferenceBuilder
              sage: b = ReferenceBuilder('reference')
 -            sage: b._output_dir('html')
-+            sage: b._output_dir('html')         # optional - dochtml
++            sage: b._output_dir('html')         # optional - sagemath_doc_html
              '.../html/en/reference'
          """
          if lang is None:
@@ -122,56 +122,10 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import ReferenceTopBuilder
              sage: b = ReferenceTopBuilder('reference')
 -            sage: b._output_dir('html')
-+            sage: b._output_dir('html')         # optional - dochtml
++            sage: b._output_dir('html')         # optional - sagemath_doc_html
              '.../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/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch b/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
new file mode 100644
index 000000000000..d32f1e4d5e9f
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
@@ -0,0 +1,27 @@
+From 836249c415e11d0522bff9013bc1509264b26ebf Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Sun, 9 Jan 2022 16:51:22 -0300
+Subject: trac 33135: add filter to ignore deprecation warnings
+
+---
+ src/sage/all.py | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/sage/all.py b/src/sage/all.py
+index 01ef327..19ca3d4 100644
+--- a/src/sage/all.py
++++ b/src/sage/all.py
+@@ -96,6 +96,10 @@ warnings.filterwarnings('ignore', category=DeprecationWarning,
+ warnings.filterwarnings('ignore', category=DeprecationWarning,
+                         module='pythran')
+ 
++warnings.filterwarnings('ignore', category=DeprecationWarning,
++                        message='The distutils(.sysconfig module| package) is deprecated',
++                        module='numpy|sage.env|sage.features')
++
+ ################ end setup warnings ###############################
+ 
+ 
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
new file mode 100644
index 000000000000..438078a92036
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage/rings/polynomial/hilbert.pyx b/src/sage/rings/polynomial/hilbert.pyx
+index 4cd91d0a46..323b168c4e 100644
+--- a/src/sage/rings/polynomial/hilbert.pyx
++++ b/src/sage/rings/polynomial/hilbert.pyx
+@@ -578,7 +578,7 @@ def hilbert_poincare_series(I, grading=None):
+ 
+     This example exceeded the capabilities of Singular before version 4.2.1p2::
+ 
+-        sage: J.hilbert_numerator(algorithm='singular')
++        sage: J.hilbert_numerator(algorithm='singular')   # not tested - requires singular 4.2.1p2
+         120*t^33 - 3465*t^32 + 48180*t^31 - 429374*t^30 + 2753520*t^29 - 13522410*t^28 + 52832780*t^27 - 168384150*t^26 + 445188744*t^25 - 987193350*t^24 + 1847488500*t^23 + 1372406746*t^22 - 403422496*t^21 - 8403314*t^20 - 471656596*t^19 + 1806623746*t^18 + 752776200*t^17 + 752776200*t^16 - 1580830020*t^15 + 1673936550*t^14 - 1294246800*t^13 + 786893250*t^12 - 382391100*t^11 + 146679390*t^10 - 42299400*t^9 + 7837830*t^8 - 172260*t^7 - 468930*t^6 + 183744*t^5 - 39270*t^4 + 5060*t^3 - 330*t^2 + 1
+ 
+     """
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f53cba947c88..f688629fc26d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -1,6 +1,6 @@
 # Template file for 'sagemath'
 pkgname=sagemath
-version=9.5.beta9
+version=9.5.rc0
 revision=1
 wrksrc=sage-$version
 build_style=configure
@@ -19,7 +19,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
-checksum=aea4c5a8d3b32af2fba644269b9daf4f62471471ba2d7d83da0f8098a5f53225
+checksum=8012e3ac35290fa9b2cb837eeca149925784c2378b486731226944e4afd8a4e6
 python_version=3
 
 build_options="debug system_python3 system_site_packages"
@@ -128,7 +128,7 @@ nostrip=yes
 noshlibprovides=yes
 
 # don't rewrite python shebang as sage uses its own python (for now)
-_no_python_shebang=yes
+#_no_python_shebang=yes
 
 # compile python code in sage venv
 pycompile_dirs="$_SAGE_ROOT/venv/"

From 5b64adda9e39287a0ba7c4b8b8b04f92c5cc125c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 10 Jan 2022 16:18:04 -0300
Subject: [PATCH 30/36] New package: gap-4.11.1

---
 common/shlibs        |  1 +
 srcpkgs/gap-devel    |  1 +
 srcpkgs/gap/template | 47 ++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 49 insertions(+)
 create mode 120000 srcpkgs/gap-devel
 create mode 100644 srcpkgs/gap/template

diff --git a/common/shlibs b/common/shlibs
index ebbd48a3d84c..c4b2c348f6f3 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4021,6 +4021,7 @@ libpari-gmp.so.7 pari-2.13.0_1
 libpari-gmp-tls.so.7 pari-2.13.2_1
 libtree-sitter.so.0 tree-sitter-0.19.0_1
 libplanarity.so.0 planarity-3.0.1.1_1
+libgap.so.0 gap-4.11.1_1
 libgtkdatabox.so.1 gtkdatabox3-1.0.0_1
 libgf2x.so.3 gf2x-1.3.0_1
 libntl.so.44 ntl-11.5.1_1
diff --git a/srcpkgs/gap-devel b/srcpkgs/gap-devel
new file mode 120000
index 000000000000..e195f60d0b1a
--- /dev/null
+++ b/srcpkgs/gap-devel
@@ -0,0 +1 @@
+gap
\ No newline at end of file
diff --git a/srcpkgs/gap/template b/srcpkgs/gap/template
new file mode 100644
index 000000000000..7bc7d13ace20
--- /dev/null
+++ b/srcpkgs/gap/template
@@ -0,0 +1,47 @@
+# Template file for 'gap'
+pkgname=gap
+version=4.11.1
+revision=1
+build_style=gnu-configure
+make_install_target="install-bin install-gaproot install-headers install-libgap"
+makedepends="gmp-devel zlib-devel readline-devel"
+checkdepends="perl"
+short_desc="Groups, Algorithms, Programming - computational discrete algebra"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-2.0-or-later"
+homepage="http://www.gap-system.org/"
+distfiles="https://github.com/gap-system/gap/releases/download/v${version}/gap-${version}.tar.gz"
+checksum=6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
+
+if [ "$XBPS_CHECK_PKGS" = full ]; then
+	# not sure about this -- takes about 25 minutes
+	make_check_target=teststandard
+fi
+
+_GAPROOT=/usr/share/gap/
+
+# minimal required packages
+_GAPPKGS="GAPDoc primgrp SmallGrp transgrp"
+
+# other expected packages
+_GAPPKGS+=" atlasrep autpgrp alnuth crisp ctbllib FactInt fga irredsol laguna
+ polenta polycyclic resclasses sophus tomlib"
+
+post_install() {
+	vmkdir ${_GAPROOT}/pkg
+	for p in ${_GAPPKGS}; do
+		[ -d pkg/$p ] || p="$p-*"
+		vcopy "pkg/$p" ${_GAPROOT}/pkg
+	done
+	# not handled by make install-headers
+	vcopy gen/config.h /usr/include/gap
+}
+
+gap-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.so"
+	}
+}

From dde46ab0eb08a47850df6217de5e482c7568e954 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 10 Jan 2022 16:32:54 -0300
Subject: [PATCH 31/36] sagemath: use system gap

---
 ...f491e5ce599ba185f5e93f02e0fcebd76c9e.patch | 57 +++++++++++++++++++
 .../patches/zzz-skip_doctest_system_gap.patch | 13 +++++
 srcpkgs/sagemath/template                     | 15 ++++-
 3 files changed, 82 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch

diff --git a/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch b/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
new file mode 100644
index 000000000000..da88a369db0d
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
@@ -0,0 +1,57 @@
+From 2c981351bb60089530b0598d3e9a909a23d4d4d8 Mon Sep 17 00:00:00 2001
+From: Thierry Thomas <thierry@FreeBSD.org>
+Date: Mon, 22 Mar 2021 03:04:12 +0100
+Subject: 29644: Add spkg-configure.m4 for gap
+
+---
+ build/pkgs/gap/spkg-configure.m4 | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+ create mode 100644 build/pkgs/gap/spkg-configure.m4
+
+diff --git a/build/pkgs/gap/spkg-configure.m4 b/build/pkgs/gap/spkg-configure.m4
+new file mode 100644
+index 00000000..91cd089
+--- /dev/null
++++ b/build/pkgs/gap/spkg-configure.m4
+@@ -0,0 +1,8 @@
++SAGE_SPKG_CONFIGURE([gap], [
++    SAGE_SPKG_DEPCHECK([gmp], [
++       AC_CHECK_HEADER([gap/system.h], [
++        AC_SEARCH_LIBS([GAP_COMM], [gap], [
++        ], [sage_spkg_install_gap=yes])
++       ], [sage_spkg_install_gap=yes])
++    ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2a41f491e5ce599ba185f5e93f02e0fcebd76c9e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Samuel=20Leli=C3=A8vre?= <samuel.lelievre@gmail.com>
+Date: Mon, 22 Mar 2021 03:05:31 +0100
+Subject: 29644: Add distro information for gap
+
+---
+ build/pkgs/gap/distros/fedora.txt | 1 +
+ build/pkgs/gap/distros/gentoo.txt | 1 +
+ 2 files changed, 2 insertions(+)
+ create mode 100644 build/pkgs/gap/distros/fedora.txt
+ create mode 100644 build/pkgs/gap/distros/gentoo.txt
+
+diff --git a/build/pkgs/gap/distros/fedora.txt b/build/pkgs/gap/distros/fedora.txt
+new file mode 100644
+index 00000000..ea4feae
+--- /dev/null
++++ b/build/pkgs/gap/distros/fedora.txt
+@@ -0,0 +1 @@
++gap
+diff --git a/build/pkgs/gap/distros/gentoo.txt b/build/pkgs/gap/distros/gentoo.txt
+new file mode 100644
+index 00000000..ea64ec9
+--- /dev/null
++++ b/build/pkgs/gap/distros/gentoo.txt
+@@ -0,0 +1 @@
++sci-mathematics/gap
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
new file mode 100644
index 000000000000..f132591d48ac
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage_setup/optional_extension.py b/src/sage_setup/optional_extension.py
+index f252849384..4034e3e196 100644
+--- a/src/sage_setup/optional_extension.py
++++ b/src/sage_setup/optional_extension.py
+@@ -80,7 +80,7 @@ def OptionalExtension(*args, **kwds):
+         sage: print(ext.__class__.__name__)
+         CythonizeExtension
+         sage: ext = OptionalExtension("foo", ["foo.c"], package="gap")
+-        sage: print(ext.__class__.__name__)
++        sage: print(ext.__class__.__name__)     # not tested - fails with system gap
+         Extension
+     """
+     try:
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f688629fc26d..02b0af4ad16d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -66,7 +66,6 @@ ${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
 ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
 
 https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
-https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
 http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
 https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
 https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
@@ -103,7 +102,6 @@ ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
 dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
 
 c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
-6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
 07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
 3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
 718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
@@ -159,6 +157,13 @@ pre_configure() {
 	export MAKE="make -j ${XBPS_MAKEJOBS}"
 }
 
+post_configure() {
+	# we set some variables, right after configure has created sage_conf.py
+	cat <<-EOF >> pkgs/sage-conf/sage_conf.py
+	GAP_ROOT_DIR = "/usr/share/gap"
+	EOF
+}
+
 # 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
@@ -248,7 +253,11 @@ makedepends+="
  gengetopt texinfo
  brial-devel cliquer-devel gfan libbraiding-devel libhomfly-devel
  lrcalc-devel nauty-devel palp tachyon
- maxima-ecl primesieve-devel primecount-devel
+ maxima-ecl primesieve-devel primecount-devel gap-devel
+"
+
+# optional dependencies
+makedepends+="
  ffmpeg ImageMagick
 "
 

From 361b3f9571ee8ef4715be0dfc850abd770b3c2ba Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Wed, 12 Jan 2022 16:33:19 +0100
Subject: [PATCH 32/36] singular: update to 4.3.0

---
 common/shlibs                                 | 10 ++---
 .../patches/upstream_omalloc_new_musl.patch   | 40 -------------------
 .../patches/upstream_polys_test_musl.patch    | 22 ----------
 srcpkgs/singular/template                     |  7 ++--
 4 files changed, 9 insertions(+), 70 deletions(-)
 delete mode 100644 srcpkgs/singular/patches/upstream_omalloc_new_musl.patch
 delete mode 100644 srcpkgs/singular/patches/upstream_polys_test_musl.patch

diff --git a/common/shlibs b/common/shlibs
index c4b2c348f6f3..d35944228287 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4066,11 +4066,11 @@ libumfpack.so.5 SuiteSparse-5.10.1_1
 libecl.so.21.2 ecl-21.2.1_1
 libecm.so.1 ecm-7.0.4_3
 libcliquer.so.1 cliquer-1.22_1
-libSingular-4.2.1.so singular-4.2.1_1
-libfactory-4.2.1.so singular-4.2.1_1
-libpolys-4.2.1.so singular-4.2.1_1
-libomalloc-0.9.6.so singular-4.2.1_1
-libsingular_resources-4.2.1.so singular-4.2.1_1
+libSingular-4.3.0.so singular-4.3.0_1
+libfactory-4.3.0.so singular-4.3.0_1
+libpolys-4.3.0.so singular-4.3.0_1
+libomalloc-0.9.6.so singular-4.3.0_1
+libsingular_resources-4.3.0.so singular-4.3.0_1
 libbrial.so.3 brial-1.2.10_1
 libbrial_groebner.so.3 brial-1.2.10_1
 libm4ri-0.0.20200125.so m4ri-20200125_1
diff --git a/srcpkgs/singular/patches/upstream_omalloc_new_musl.patch b/srcpkgs/singular/patches/upstream_omalloc_new_musl.patch
deleted file mode 100644
index 354603bb2c44..000000000000
--- a/srcpkgs/singular/patches/upstream_omalloc_new_musl.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From e1643135645a3cc97af8659018defd2b8617bb4e Mon Sep 17 00:00:00 2001
-From: Hans Schoenemann <hannes@mathematik.uni-kl.de>
-Date: Thu, 23 Sep 2021 10:57:25 +0200
-Subject: [PATCH] omalloc: fix alignment stuff for "make check"
-
----
- omalloc/omtTest.c | 6 ------
- omalloc/omtTest.h | 2 +-
- 2 files changed, 1 insertion(+), 7 deletions(-)
-
-diff --git a/omalloc/omtTest.c b/omalloc/omtTest.c
-index 715fbb113c..75c8cdb210 100644
---- a/omalloc/omtTest.c
-+++ b/omalloc/omtTest.c
-@@ -70,12 +70,6 @@ void omtTestDebug(omMemCell cell)
-   }
- 
-   is_size = omSizeOfAddr(cell->addr);
--  if (!OM_IS_ALIGNED(is_size))
--  {
--    omReportError(omError_Unknown, omError_NoError, OM_FLR,
--                  "is_size == %u is unaligned", is_size);
--    return;
--  }
-   if (is_size < size)
-   {
-     omReportError(omError_Unknown, omError_NoError, OM_FLR,
-diff --git a/omalloc/omtTest.h b/omalloc/omtTest.h
-index a579d88011..6faa099c89 100644
---- a/omalloc/omtTest.h
-+++ b/omalloc/omtTest.h
-@@ -48,7 +48,7 @@ void TestFree(omMemCell cell);
- 
- #define IS_STICKY_BIN(spec) (spec & 1)
- // #define IS_STICKY_BIN(spec) (0)
--#define GET_SIZE(spec)      (spec & ((((unsigned long) 1) << 14) -1))
-+#define GET_SIZE(spec)      OM_ALIGN_SIZE((spec & ((((unsigned long) 1) << 14) -1)))
- #define SET_SIZE(spec, size) spec = ((spec & ~((((unsigned long) 1) << 14) -1)) | (size))
- #define IS_ALIGNED(spec)    (spec & (((unsigned long) 1) << 15))
- #define IS_ZERO(spec)       (spec & (((unsigned long) 1) << 16))
diff --git a/srcpkgs/singular/patches/upstream_polys_test_musl.patch b/srcpkgs/singular/patches/upstream_polys_test_musl.patch
deleted file mode 100644
index 73ee062e2f89..000000000000
--- a/srcpkgs/singular/patches/upstream_polys_test_musl.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From 6e2383111a18b2fa2d3421045625d1d424eb1e25 Mon Sep 17 00:00:00 2001
-From: Hans Schoenemann <hannes@mathematik.uni-kl.de>
-Date: Mon, 20 Sep 2021 15:13:36 +0200
-Subject: [PATCH] fix: make check: polys_test
-
----
- libpolys/tests/polys_test.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libpolys/tests/polys_test.h b/libpolys/tests/polys_test.h
-index 5526aa5a6b..5b4c561238 100644
---- a/libpolys/tests/polys_test.h
-+++ b/libpolys/tests/polys_test.h
-@@ -2481,7 +2481,7 @@ class PolysTestSuite : public CxxTest::TestSuite
-     {
-       for (int qi = 0; qi <= 100; qi++)
-       {
--        int c = rand() % 1000000;
-+        int c = rand() % 1000000+1; /* c must not be 0 */
-         poly qterm = p_ISet(c, r); p_SetExp(qterm, 1, qi, r);
-         p_Setm(qterm, r);
-         number qtermAsN = toFractionNumber(qterm, cf);
diff --git a/srcpkgs/singular/template b/srcpkgs/singular/template
index d3af1c8b919b..a3e1dcc0b35f 100644
--- a/srcpkgs/singular/template
+++ b/srcpkgs/singular/template
@@ -1,6 +1,6 @@
 # Template file for 'singular'
 pkgname=singular
-version=4.2.1
+version=4.3.0
 revision=1
 build_style=gnu-configure
 configure_args="--with-readline=ncurses
@@ -18,8 +18,9 @@ short_desc="Computer algebra system for polynomial computations"
 maintainer="dkwo <nicolopiazzalunga@gmail.com>"
 license="GPL-2.0-or-later"
 homepage="https://www.singular.uni-kl.de"
-distfiles="https://service.mathematik.uni-kl.de/ftp/pub/Math/Singular/src/${version//./-}/singular-${version}.tar.gz"
-checksum=28a56df84f85b116e0068ffecf92fbe08fc27bd4c5ba902997f1a367db0bfe8d
+# distfiles="https://service.mathematik.uni-kl.de/ftp/pub/Math/Singular/src/${version//./-}/singular-${version}.tar.gz"
+distfiles="ftp://jim.mathematik.uni-kl.de/pub/Math/Singular/SOURCES/${version//./-}/singular-${version}.tar.gz"
+checksum=74f38288203720e3f280256f2f8deb94030dd032b4237d844652aff0faab36e7
 
 if [ -z "$CROSS_BUILD" ]; then
 	makedepends+=" ntl-devel"

From 04a0f2d37654374fc2a10048d1e8cf6781de92ae Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Thu, 13 Jan 2022 03:21:19 -0300
Subject: [PATCH 33/36] sagemath: fixes for system gap

---
 .../zzz-fixes_for_system_gap--see_29644.patch | 96 +++++++++++++++++++
 .../patches/zzz-skip_doctest_system_gap.patch | 13 ---
 srcpkgs/sagemath/template                     |  1 +
 3 files changed, 97 insertions(+), 13 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
 delete mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch

diff --git a/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch b/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
new file mode 100644
index 000000000000..741d2b23a7f5
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
@@ -0,0 +1,96 @@
+From 346b4ea4c92f4287d3c097b92817cf2abfcddd8c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Thu, 13 Jan 2022 01:41:31 -0300
+Subject: [PATCH] gap: fixes for using system gap
+
+ - fix _get_shared_lib_path() so we don't need to configure GAP_SO
+ - fix gap_root() so we don't need to configure GAP_ROOT_DIR
+ - skip a useless test that cannot succeed on system gap
+ - use gap_root() in saved_workspace.py instead of GAP_ROOT_DIR
+---
+ src/sage/env.py                      |  2 +-
+ src/sage/libs/gap/saved_workspace.py |  4 ++--
+ src/sage/libs/gap/util.pyx           | 11 +++++++++++
+ src/sage_setup/optional_extension.py |  2 +-
+ 4 files changed, 15 insertions(+), 4 deletions(-)
+
+diff --git a/src/sage/env.py b/src/sage/env.py
+index c4953cfa65..c16696d298 100644
+--- a/src/sage/env.py
++++ b/src/sage/env.py
+@@ -293,7 +293,7 @@ def _get_shared_lib_path(*libnames: str) -> Optional[str]:
+             if sys.platform == 'darwin':
+                 ext = 'dylib'
+             else:
+-                ext = 'so'
++                ext = 'so*'
+ 
+             if SAGE_LOCAL:
+                 search_directories.append(Path(SAGE_LOCAL) / 'lib')
+diff --git a/src/sage/libs/gap/saved_workspace.py b/src/sage/libs/gap/saved_workspace.py
+index ad5adec36d..59c498795f 100644
+--- a/src/sage/libs/gap/saved_workspace.py
++++ b/src/sage/libs/gap/saved_workspace.py
+@@ -8,7 +8,7 @@ workspaces.
+ 
+ import os
+ import glob
+-from sage.env import GAP_ROOT_DIR
++from sage.libs.gap.util import gap_root
+ from sage.interfaces.gap_workspace import gap_workspace_file
+ 
+ 
+@@ -31,7 +31,7 @@ def timestamp():
+     """
+     libgap_dir = os.path.dirname(__file__)
+     libgap_files = glob.glob(os.path.join(libgap_dir, '*'))
+-    gap_packages = glob.glob(os.path.join(GAP_ROOT_DIR, 'pkg', '*'))
++    gap_packages = glob.glob(os.path.join(gap_root(), 'pkg', '*'))
+     files = libgap_files + gap_packages
+     if len(files) == 0:
+         print('Unable to find LibGAP files.')
+diff --git a/src/sage/libs/gap/util.pyx b/src/sage/libs/gap/util.pyx
+index 08c4c40cc0..c7dd557c35 100644
+--- a/src/sage/libs/gap/util.pyx
++++ b/src/sage/libs/gap/util.pyx
+@@ -23,6 +23,7 @@ from cysignals.signals cimport sig_on, sig_off
+ import os
+ import warnings
+ import sage.env
++import subprocess
+ 
+ from .gap_includes cimport *
+ from .element cimport *
+@@ -178,6 +179,16 @@ def gap_root():
+     if os.path.exists(sage.env.GAP_ROOT_DIR):
+         return sage.env.GAP_ROOT_DIR
+ 
++    gap_expr = 'JoinStringsWithSeparator(KERNEL_INFO().GAP_ROOT_PATHS,";")'
++    gap_root_paths = subprocess.getoutput(
++        f"gap -r -q --bare --nointeract -c 'Display({gap_expr});'"
++        ).strip().split(';')
++
++    for gapdir in gap_root_paths:
++        if os.path.exists(os.path.join(gapdir, 'sysinfo.gap')):
++            sage.env.GAP_ROOT_DIR = gapdir
++            return gapdir
++
+     # Attempt to figure out the appropriate GAP_ROOT by reading the
+     # local/bin/gap shell script; this is an ugly hack that exists for
+     # historical reasons; the best approach to setting where Sage looks for
+diff --git a/src/sage_setup/optional_extension.py b/src/sage_setup/optional_extension.py
+index f252849384..4034e3e196 100644
+--- a/src/sage_setup/optional_extension.py
++++ b/src/sage_setup/optional_extension.py
+@@ -80,7 +80,7 @@ def OptionalExtension(*args, **kwds):
+         sage: print(ext.__class__.__name__)
+         CythonizeExtension
+         sage: ext = OptionalExtension("foo", ["foo.c"], package="gap")
+-        sage: print(ext.__class__.__name__)
++        sage: print(ext.__class__.__name__)     # not tested - fails with system gap
+         Extension
+     """
+     try:
+-- 
+2.34.1
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
deleted file mode 100644
index f132591d48ac..000000000000
--- a/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/src/sage_setup/optional_extension.py b/src/sage_setup/optional_extension.py
-index f252849384..4034e3e196 100644
---- a/src/sage_setup/optional_extension.py
-+++ b/src/sage_setup/optional_extension.py
-@@ -80,7 +80,7 @@ def OptionalExtension(*args, **kwds):
-         sage: print(ext.__class__.__name__)
-         CythonizeExtension
-         sage: ext = OptionalExtension("foo", ["foo.c"], package="gap")
--        sage: print(ext.__class__.__name__)
-+        sage: print(ext.__class__.__name__)     # not tested - fails with system gap
-         Extension
-     """
-     try:
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 02b0af4ad16d..0d8ce1f7a70a 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -161,6 +161,7 @@ post_configure() {
 	# we set some variables, right after configure has created sage_conf.py
 	cat <<-EOF >> pkgs/sage-conf/sage_conf.py
 	GAP_ROOT_DIR = "/usr/share/gap"
+	GAP_SO = "$(objdump -p /usr/lib/libgap.so | awk '/SONAME/{print $2}')"
 	EOF
 }
 

From 5dc98a7408b1f2f665c103a2a60d6dcb2bba1292 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Thu, 13 Jan 2022 15:47:33 -0300
Subject: [PATCH 34/36] New package: sagemath-test

---
 srcpkgs/sagemath-test/template                | 32 +++++++++++++++++++
 .../patches/zzz-skip_doctest_shebang.patch    | 11 +++++++
 2 files changed, 43 insertions(+)
 create mode 100644 srcpkgs/sagemath-test/template
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch

diff --git a/srcpkgs/sagemath-test/template b/srcpkgs/sagemath-test/template
new file mode 100644
index 000000000000..3e0b1c3233fd
--- /dev/null
+++ b/srcpkgs/sagemath-test/template
@@ -0,0 +1,32 @@
+# Template file for 'sagemath-test'
+pkgname=sagemath-test
+version=1
+revision=1
+build_style=meta
+checkdepends="sagemath"
+short_desc="Dummy package to test sagemath"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-2.0-or-later"
+homepage="none"
+
+# TODO: install base-voidstrap, uninstall base-chroot, and remove orphans
+# so we can check sagemath depends are enough to run sage on void
+
+do_check() {
+	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
+		_test_args=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	fi
+	if [ -z "$_test_args" ]; then
+		_test_args=--all
+	fi
+	if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
+		# for CI use a predictable random seed
+		_test_args="--random-seed=0 $_test_args"
+	fi
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args="--long $_test_args"
+	else
+		_test_args="--warn-long 5.0 $_test_args"
+	fi
+	/usr/bin/sage* -tp ${XBPS_MAKEJOBS} ${_test_args}
+}
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch
new file mode 100644
index 000000000000..04fa2acbf3ec
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch
@@ -0,0 +1,11 @@
+--- a/src/sage/tests/cmdline.py
++++ b/src/sage/tests/cmdline.py
+@@ -488,7 +488,7 @@ def test_executable(args, input="", timeout=100.0, pydebug_ignore_warnings=False
+         0
+ 
+         sage: (out, err, ret) = test_executable(["sage", "--cython"])
+-        sage: print(err)
++        sage: print(err)  # not tested - broken when shebang is rewritten
+         Cython (http://cython.org) is a compiler for code written in the
+         Cython language.  Cython is based on Pyrex by Greg Ewing.
+         ...

From ec792686a89be11c232834e037ea17edc747546a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 11:34:23 -0300
Subject: [PATCH 35/36] sagemath: cleanup and one patch

---
 .../zzz-skip_doctest_sage_setup_find.patch    | 12 +++++++++
 srcpkgs/sagemath/template                     | 27 +++----------------
 2 files changed, 16 insertions(+), 23 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch

diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch
new file mode 100644
index 000000000000..15aed02f9aaa
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch
@@ -0,0 +1,12 @@
+--- a/src/sage_setup/find.py
++++ b/src/sage_setup/find.py
+@@ -301,7 +301,7 @@ def find_extra_files(src_dir, modules, cythonized_dir, special_filenames=[]):
+         sage: extras["sage/libs/mpfr"]
+         [...sage/libs/mpfr/types.pxd...]
+         sage: extras["sage/ext/interpreters"]
+-        ['.../src/sage/ext/interpreters/wrapper_cdf.pxd', ...wrapper_cdf.h...]
++        ['.../src/sage/ext/interpreters/wrapper_cdf.pxd', ...]
+     """
+     from Cython.Utils import is_package_dir
+ 
+--
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 0d8ce1f7a70a..3819fa261ce0 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -22,13 +22,8 @@ distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
 checksum=8012e3ac35290fa9b2cb837eeca149925784c2378b486731226944e4afd8a4e6
 python_version=3
 
-build_options="debug system_python3 system_site_packages"
+build_options="debug"
 desc_option_debug="Build with debug symbols"
-desc_option_system_python="Build using system python 3"
-desc_option_system_python="Build using system python site-packages"
-build_options_default="system_python3 system_site_packages"
-configure_args+=" $(vopt_with system_python3)"
-configure_args+=" $(vopt_enable system_site_packages)"
 
 # path where sage will be installed
 _SAGE_ROOT=/usr/lib/sage-${version}
@@ -112,9 +107,6 @@ for u in ${_upstream}; do
 	skip_extraction+=" ${u##*[/>]}"
 done
 
-# 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
@@ -165,16 +157,6 @@ post_configure() {
 	EOF
 }
 
-# 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() {
 	vlicense COPYING.txt
 	vdoc README.md
@@ -301,7 +283,6 @@ _sage_python3_modules="
  python3-wheel python3-zipp pythran
  "
 
-if [ "$build_option_system_site_packages" ]; then
-	makedepends+=" $_sage_python3_modules"
-	depends+=" $_sage_python3_modules"
-fi
+# python packages are build and runtime dependencies
+makedepends+=" $_sage_python3_modules"
+depends+=" $_sage_python3_modules"

From b92468e609aa0f739f5f837d3c74cf4047e4b3f0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 11:34:32 -0300
Subject: [PATCH 36/36] sagemath: update to 9.5.rc1.

---
 srcpkgs/sagemath/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 3819fa261ce0..4f379c81a950 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -1,6 +1,6 @@
 # Template file for 'sagemath'
 pkgname=sagemath
-version=9.5.rc0
+version=9.5.rc1
 revision=1
 wrksrc=sage-$version
 build_style=configure
@@ -19,7 +19,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
-checksum=8012e3ac35290fa9b2cb837eeca149925784c2378b486731226944e4afd8a4e6
+checksum=b015c54f7411669ef70bac2b2fde260e7f45724bcff170957b1f9fd08131f2c3
 python_version=3
 
 build_options="debug"

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: sagemath-9.5.rc0
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (186 preceding siblings ...)
  2022-01-14 14:34 ` [PR PATCH] [Updated] " tornaria
@ 2022-01-14 14:36 ` tornaria
  2022-01-14 14:48 ` tornaria
                   ` (60 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-14 14:36 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 627 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.rc0
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: 617412 bytes --]

From 04b92029403d4e821e420c537d5db0ad96ebac29 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/35] 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 a27e0f5fec84124b595dc5d73f68368880884218 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/35] 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 4bc8965fe4fc0f8c3fe01b250030349a613b48f7 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/35] 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 dc5f2a43a2b34aeb89608c88d0b0925c837a15f3 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/35] 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 aa4c7b4b60fe209a887af6bcf2c8a043dc1c40a9 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/35] 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 53017cc0122dcd0664bdb4d51c663ed46fdddad5 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/35] 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 c193edbb5a3c35dbd4bf82ca2e6a5c4bf9826a28 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/35] 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 585e92ca9970b626d0d2588a547d95acdefe63f7 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/35] 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 d3304fec4c4a9654331bc6cffd9d4d14100b2324 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/35] 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 7dd878f1d56f2928d63481ff3ee36380ce3f8bf0 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/35] 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 994be37f905da7325ddab983112f066ebfb7cf90 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/35] 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 1bce42706861ba56cda2956bbf8a19785a27d5fb 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/35] 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 2b9585cacf12f00cc2f8e8d9deca16529a9b3ec2 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/35] 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 e19ae01d85b30ef684edcc21dbd0fb06007cd2ef 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/35] 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 a9699c1f1c33882d852ed97feab1ce8bf7825b5f 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/35] 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 15eb42c54ade69f2f0d241e9496b5fcaa5b281b2 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/35] 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 abdeea21fbf3b3e6a6384df81c6f86b6f9256ab1 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/35] 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 39897943d63d360b1ab2aba9c4eaeab4fcef68cc 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/35] 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 957a1378d32aa66a6aca06e54ab0c5fe48f898dc 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/35] 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

From d8574311fa4f7fa51f145dd36c45b6c0ad7f2ef1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 27 Dec 2021 20:19:19 -0300
Subject: [PATCH 20/35] sagemath: fix license and tests

Now tests can be run with -Q (normal) or -K (--long)
---
 srcpkgs/sagemath/template | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index c5009269c7fc..33b40acbabeb 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -16,7 +16,7 @@ depends="giac git FlintQS zn_poly sympow
  "
 short_desc="Open source mathematics software"
 maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
-license="GPL-3.0-or-later"
+license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
 checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
@@ -155,15 +155,17 @@ do_install() {
 }
 
 do_check() {
-	TEST=--all
 	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
-		TEST="$(sed -e 's/#.*//' ${XBPS_DISTDIR}/sagemath-check)"
+		_test_args=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	fi
+	if [ -z "$_test_args" ]; then
+		_test_args=--all
+	fi
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args="--long $_test_args"
 	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} ${OPT} ${TEST}
-	#./sage -t ${OPT} ${TEST}
+	./sage -tp ${XBPS_MAKEJOBS} ${_test_args}
 }
 
 ### copied from sage-deps, to be kept in sync

From a80a492b4e3a6db8671f017d36c5cc09580733d8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 28 Dec 2021 23:08:17 -0300
Subject: [PATCH 21/35] sagemath: fix long time test

---
 .../patches/zzz-fix_long_time_test--see_33091.patch | 13 +++++++++++++
 ...=> zzz-skip_doctest_giac-1.7.0--see_31563.patch} |  0
 2 files changed, 13 insertions(+)
 create mode 100644 srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
 rename srcpkgs/sagemath/patches/{skip-doctest-giac-1.7.0--see-trac-31563.patch => zzz-skip_doctest_giac-1.7.0--see_31563.patch} (100%)

diff --git a/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch b/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
new file mode 100644
index 000000000000..ca360dee9f6e
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage/matrix/matrix2.pyx b/src/sage/matrix/matrix2.pyx
+index 7d319bd54b..c1a2eed6f1 100644
+--- a/src/sage/matrix/matrix2.pyx
++++ b/src/sage/matrix/matrix2.pyx
+@@ -17215,7 +17215,7 @@ cdef class Matrix(Matrix1):
+ 
+             sage: set_random_seed()
+             sage: K = random_cone(max_ambient_dim=5)
+-            sage: all(L.change_ring(SR).is_Z_operator_on(K)
++            sage: all(L.change_ring(SR).is_Z_operator_on(K) # long time
+             ....:     for L in K.Z_operators_gens())  # long time
+             True
+ 
diff --git a/srcpkgs/sagemath/patches/skip-doctest-giac-1.7.0--see-trac-31563.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_31563.patch
similarity index 100%
rename from srcpkgs/sagemath/patches/skip-doctest-giac-1.7.0--see-trac-31563.patch
rename to srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_31563.patch

From f41c60f4c510533562e12e7f2d14fb74a0e465ac Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 31 Dec 2021 13:52:34 -0300
Subject: [PATCH 22/35] python3-Sphinx: update to 4.3.2.

---
 srcpkgs/python3-Sphinx/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/python3-Sphinx/template b/srcpkgs/python3-Sphinx/template
index 8b0493c1f92c..29f892d16157 100644
--- a/srcpkgs/python3-Sphinx/template
+++ b/srcpkgs/python3-Sphinx/template
@@ -1,6 +1,6 @@
 # Template file for 'python3-Sphinx'
 pkgname=python3-Sphinx
-version=4.2.0
+version=4.3.2
 revision=1
 wrksrc=Sphinx-${version}
 build_style=python3-module
@@ -17,8 +17,9 @@ short_desc="Python 3 documentation generator"
 maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
 license="BSD-3-Clause"
 homepage="http://sphinx-doc.org"
+changelog="https://www.sphinx-doc.org/en/master/changes.html"
 distfiles="${PYPI_SITE}/S/Sphinx/Sphinx-${version}.tar.gz"
-checksum=94078db9184491e15bce0a56d9186e0aec95f16ac20b12d00e06d4e36f1058a6
+checksum=0a8836751a68306b3fe97ecbe44db786f8479c3bf4b80e3a7f5c838657b4698c
 conflicts="python-Sphinx>=0"
 
 post_install() {

From 6ecd365f42d0db5810b29f1bebcd59e9a2ea73d6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 28 Dec 2021 23:08:17 -0300
Subject: [PATCH 23/35] sagemath: use system python site-packages

 - patch from #29665 for that
 - patch on top of that to allow a few more python packages:
   gmpy2, sphinx, typing_extensions, ptyprocess
 - add all available python packages to makedepends and depends
 - add ffmpeg and ImageMagick to makedepends
 - in standard check (-Q) warn if individual test > 5.0s
---
 ...184f7498a2046065e669723e68efe2d65cee.patch | 5629 +++++++++++++++++
 .../zzz-dont_run_pytest--see_31924.patch      |   27 +
 .../zzz-more_site_packages_not_in_29665.patch |   42 +
 srcpkgs/sagemath/template                     |   52 +-
 4 files changed, 5747 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch

diff --git a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
new file mode 100644
index 000000000000..b641113927e7
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
@@ -0,0 +1,5629 @@
+From 05fcaabe95082f42ba134780d579390d7b6153e2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 19:30:58 -0400
+Subject: Trac #29665: add --enable-system-site-packages option to ./configure.
+
+This new option is experimental and disabled by default. When it is
+enabled, the string "--system-site-packages" is appended to a new
+environment variable SAGE_VENV_FLAGS that is then passed to the
+sage-venv command during the build using autoconf substitution.
+Thusly the correct setting finds its way into local/pyvenv.cfg.
+---
+ build/make/Makefile.in |  2 +-
+ configure.ac           | 11 +++++++++++
+ 2 files changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/build/make/Makefile.in b/build/make/Makefile.in
+index f870cc3..68627ab 100644
+--- a/build/make/Makefile.in
++++ b/build/make/Makefile.in
+@@ -211,7 +211,7 @@ endif
+ inst_python3_venv = $(SAGE_VENV)/pyvenv.cfg
+ 
+ $(inst_python3_venv):
+-	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv "$(SAGE_VENV)"
++	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv @SAGE_VENV_FLAGS@ "$(SAGE_VENV)"
+ endif
+ 
+ # Build everything and start Sage.
+diff --git a/configure.ac b/configure.ac
+index 351f487..db30a91 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -435,6 +435,17 @@ AC_ARG_ENABLE([download-from-upstream-url],
+   [AS_HELP_STRING([--enable-download-from-upstream-url],
+     [allow downloading packages from their upstream URL if they cannot be found on the Sage mirrors])])
+ 
++AC_ARG_ENABLE(
++  [system-site-packages], [AS_HELP_STRING(
++    [--enable-system-site-packages],
++    [allow sage to use python packages from the system (experimental; default: no)]
++  )], [
++  AS_IF([test "x$enable_system_site_packages" = "xyes"], [
++    SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
++  ])
++])
++AC_SUBST([SAGE_VENV_FLAGS])
++
+ SAGE_SPKG_OPTIONS=""
+ AS_IF([test "x$enable_experimental_packages" = "xyes"], [
+   AS_VAR_APPEND([SAGE_SPKG_OPTIONS], [" -y"])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9372d1f663edf4e89f9c186336815ca04cff59dc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 19:41:14 -0400
+Subject: Trac #29665: new SAGE_PYTHON_PACKAGE_CHECK() autoconf macro.
+
+This new macro encapsulates the check for system installations of
+python packages. It uses setuptools.version's pkg_resources to
+check if the contents of install-requires.txt are satisfied for
+the given package; and if not, tells the build system to install
+the SPKG instead.
+---
+ m4/sage_python_package_check.m4 | 49 +++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 49 insertions(+)
+ create mode 100644 m4/sage_python_package_check.m4
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+new file mode 100644
+index 00000000..77b0a0c
+--- /dev/null
++++ b/m4/sage_python_package_check.m4
+@@ -0,0 +1,49 @@
++#
++# SYNOPSIS
++#
++#   SAGE_PYTHON_PACKAGE_CHECK(package)
++#
++# DESCRIPTION
++#
++#   Determine if the system copy of a python package can be used by sage.
++#
++#   This macro uses setuptools.version's pkg_resources to check that the
++#   "install-requires.txt" file for the named package is satisfied, and
++#   it can typically fail in four ways:
++#
++#     1. If --enable-system-site-packages was not passed to ./configure,
++#
++#     2. If we are not using the system python (no $PYTHON_FOR_VENV),
++#
++#     3. If setuptools is not available to the system python,
++#
++#     4. If the contents of install-requires.txt are not met (wrong
++#        version, no version, etc.) by the system python.
++#
++#   In any of those cases, we set sage_spkg_install_$package to "yes"
++#   so that the corresponding SPKG is installed. Otherwise, we do
++#   nothing, since the default value of sage_spkg_install_$package
++#   is "no" (to use the system copy).
++#
++#   The SAGE_SPKG_CONFIGURE_PYTHON3() macro is AC_REQUIRE'd to ensure
++#   that $PYTHON_FOR_VENV is available, if it is going to be available.
++#
++
++AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
++  AS_IF([test "${enable_system_site_packages}" = "yes"], [
++    AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
++
++    dnl strip all comments from install-requires.txt; this should leave
++    dnl only a single line containing the version specification for this
++    dnl package.
++    SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
++    AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++    AS_IF(
++      ["${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())"],
++      [AC_MSG_RESULT(yes)],
++      [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
++    )
++  ], [
++    sage_spkg_install_$1=yes
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a0dac8ad81ad6369d479bba30d2388de59e5cecb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:21:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for py.
+
+---
+ build/pkgs/py/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/py/spkg-configure.m4
+
+diff --git a/build/pkgs/py/spkg-configure.m4 b/build/pkgs/py/spkg-configure.m4
+new file mode 100644
+index 00000000..ded7034
+--- /dev/null
++++ b/build/pkgs/py/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([py], [SAGE_PYTHON_PACKAGE_CHECK([py])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 87c463a25ab4432dc1fba4f7a9703284e5b8f620 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:24:15 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for wheel.
+
+---
+ build/pkgs/wheel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wheel/spkg-configure.m4
+
+diff --git a/build/pkgs/wheel/spkg-configure.m4 b/build/pkgs/wheel/spkg-configure.m4
+new file mode 100644
+index 00000000..7897ea9
+--- /dev/null
++++ b/build/pkgs/wheel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([wheel], [SAGE_PYTHON_PACKAGE_CHECK([wheel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 804094b3a980f262f4d53d7be8b1be43ac0c55e0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:25:15 -0400
+Subject: Trac #29665: new spkg-configure.m4 for cvxopt.
+
+This includes a SAGE_SPKG_DEPCHECK([gsl glpk suitesparse],... because
+those C dependencies wind up linked into shared libraries like,
+
+  /usr/.../cvxopt/glpk.cpython-39-x86_64-linux-gnu.so
+
+that could potentially conflict with (for example) the glpk SPKG.
+---
+ build/pkgs/cvxopt/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/cvxopt/spkg-configure.m4
+
+diff --git a/build/pkgs/cvxopt/spkg-configure.m4 b/build/pkgs/cvxopt/spkg-configure.m4
+new file mode 100644
+index 00000000..c4aa619
+--- /dev/null
++++ b/build/pkgs/cvxopt/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([cvxopt], [
++  SAGE_SPKG_DEPCHECK([gsl glpk suitesparse], [
++    SAGE_PYTHON_PACKAGE_CHECK([cvxopt])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3f171955ff8d15da2c98aee0d2e254e95a55a2b5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:28:10 -0400
+Subject: Trac #29665: new spkg-configure.m4 for pyzmq.
+
+This includes a SAGE_SPKG_DEPCHECK([zeromq],... because libzmq winds
+up linked into shared libraries like,
+
+  /usr/.../zmq/backend/cython/message.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the zeromq SPKG.
+---
+ build/pkgs/pyzmq/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/pyzmq/spkg-configure.m4
+
+diff --git a/build/pkgs/pyzmq/spkg-configure.m4 b/build/pkgs/pyzmq/spkg-configure.m4
+new file mode 100644
+index 00000000..ae2b126
+--- /dev/null
++++ b/build/pkgs/pyzmq/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([pyzmq], [
++  SAGE_SPKG_DEPCHECK([zeromq], [
++    SAGE_PYTHON_PACKAGE_CHECK([pyzmq])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20d3aa9da9fc98a6e6a47599cd1b6d1d3785a4c4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:31:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for requests.
+
+---
+ build/pkgs/requests/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/requests/spkg-configure.m4
+
+diff --git a/build/pkgs/requests/spkg-configure.m4 b/build/pkgs/requests/spkg-configure.m4
+new file mode 100644
+index 00000000..f50a66c
+--- /dev/null
++++ b/build/pkgs/requests/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([requests], [SAGE_PYTHON_PACKAGE_CHECK([requests])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4df57ee47f2576b6b7bf9265248e06e90616b689 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:13:34 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for six.
+
+---
+ build/pkgs/six/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/six/spkg-configure.m4
+
+diff --git a/build/pkgs/six/spkg-configure.m4 b/build/pkgs/six/spkg-configure.m4
+new file mode 100644
+index 00000000..a382b81
+--- /dev/null
++++ b/build/pkgs/six/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([six], [SAGE_PYTHON_PACKAGE_CHECK([six])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f4462652d02ca729cc6d7cb36ee4d7d662deafb0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:14:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for packaging.
+
+---
+ build/pkgs/packaging/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/packaging/spkg-configure.m4
+
+diff --git a/build/pkgs/packaging/spkg-configure.m4 b/build/pkgs/packaging/spkg-configure.m4
+new file mode 100644
+index 00000000..398f9e1
+--- /dev/null
++++ b/build/pkgs/packaging/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([packaging], [SAGE_PYTHON_PACKAGE_CHECK([packaging])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4d64677fffce48077e4bc3e20ec833c70e6e9b65 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:18:53 -0400
+Subject: Trac #29665: new spkg-configure.m4 for numpy.
+
+This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack
+wind up linked into shared libraries like,
+
+  /usr/.../numpy/linalg/lapack_lite.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the openblas SPKG.
+---
+ build/pkgs/numpy/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/numpy/spkg-configure.m4
+
+diff --git a/build/pkgs/numpy/spkg-configure.m4 b/build/pkgs/numpy/spkg-configure.m4
+new file mode 100644
+index 00000000..16f9a90
+--- /dev/null
++++ b/build/pkgs/numpy/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([numpy], [
++  SAGE_SPKG_DEPCHECK([openblas], [
++   SAGE_PYTHON_PACKAGE_CHECK([numpy])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 85dfe5bb32f3c470966b477bae68a921e846d11f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:58:48 -0400
+Subject: Trac #29665: new spkg-configure.m4 for scipy.
+
+This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack
+wind up linked into shared libraries like,
+
+  /usr/.../scipy/linalg/_flinalg.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the openblas SPKG.
+---
+ build/pkgs/scipy/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/scipy/spkg-configure.m4
+
+diff --git a/build/pkgs/scipy/spkg-configure.m4 b/build/pkgs/scipy/spkg-configure.m4
+new file mode 100644
+index 00000000..0b7294a
+--- /dev/null
++++ b/build/pkgs/scipy/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([scipy], [
++  SAGE_SPKG_DEPCHECK([openblas], [
++    SAGE_PYTHON_PACKAGE_CHECK([scipy])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5616f1491036fda95f4d3e840c8c8b531c97323b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 07:19:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pluggy.
+
+---
+ build/pkgs/pluggy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pluggy/spkg-configure.m4
+
+diff --git a/build/pkgs/pluggy/spkg-configure.m4 b/build/pkgs/pluggy/spkg-configure.m4
+new file mode 100644
+index 00000000..11b1fce
+--- /dev/null
++++ b/build/pkgs/pluggy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pluggy], [SAGE_PYTHON_PACKAGE_CHECK([pluggy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6bceae3d356878cfe5fce40c9998dead003a3844 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 07:24:12 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pickleshare.
+
+---
+ build/pkgs/pickleshare/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pickleshare/spkg-configure.m4
+
+diff --git a/build/pkgs/pickleshare/spkg-configure.m4 b/build/pkgs/pickleshare/spkg-configure.m4
+new file mode 100644
+index 00000000..80e9b7c
+--- /dev/null
++++ b/build/pkgs/pickleshare/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pickleshare], [SAGE_PYTHON_PACKAGE_CHECK([pickleshare])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From da2ab534f4a256c82ed4f1c5f0f5c320529b5e9f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 08:53:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for html5lib.
+
+---
+ build/pkgs/html5lib/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/html5lib/spkg-configure.m4
+
+diff --git a/build/pkgs/html5lib/spkg-configure.m4 b/build/pkgs/html5lib/spkg-configure.m4
+new file mode 100644
+index 00000000..f421b7e
+--- /dev/null
++++ b/build/pkgs/html5lib/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([html5lib], [SAGE_PYTHON_PACKAGE_CHECK([html5lib])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5e464134afdf6055b7b5804208f759561c5435cd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 18:30:47 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for networkx.
+
+---
+ build/pkgs/networkx/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/networkx/spkg-configure.m4
+
+diff --git a/build/pkgs/networkx/spkg-configure.m4 b/build/pkgs/networkx/spkg-configure.m4
+new file mode 100644
+index 00000000..926671e
+--- /dev/null
++++ b/build/pkgs/networkx/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([networkx], [SAGE_PYTHON_PACKAGE_CHECK([networkx])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c4d40770cd9c7fda811e31759a5f4aedc320f3f9 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:33:24 -0400
+Subject: Trac #29665: new spkg-configure.m4 for matplotlib.
+
+This includes a SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull],...
+because those dependencies wind up linked into shared libraries like,
+
+  /usr/lib/.../matplotlib/ft2font.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with their SPKG counterparts.
+---
+ build/pkgs/matplotlib/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/matplotlib/spkg-configure.m4
+
+diff --git a/build/pkgs/matplotlib/spkg-configure.m4 b/build/pkgs/matplotlib/spkg-configure.m4
+new file mode 100644
+index 00000000..39c2d29
+--- /dev/null
++++ b/build/pkgs/matplotlib/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([matplotlib], [
++  SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull], [
++    SAGE_PYTHON_PACKAGE_CHECK([matplotlib])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7834dc3ac349201af632f89a9de7cd1967931010 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:35:00 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for bleach.
+
+---
+ build/pkgs/bleach/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/bleach/spkg-configure.m4
+
+diff --git a/build/pkgs/bleach/spkg-configure.m4 b/build/pkgs/bleach/spkg-configure.m4
+new file mode 100644
+index 00000000..3c9bb26
+--- /dev/null
++++ b/build/pkgs/bleach/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([bleach], [SAGE_PYTHON_PACKAGE_CHECK([bleach])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 84cad343287a2c69a4a21b9fa3b92301ff88645b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:37:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for decorator.
+
+---
+ build/pkgs/decorator/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/decorator/spkg-configure.m4
+
+diff --git a/build/pkgs/decorator/spkg-configure.m4 b/build/pkgs/decorator/spkg-configure.m4
+new file mode 100644
+index 00000000..e062778
+--- /dev/null
++++ b/build/pkgs/decorator/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([decorator], [SAGE_PYTHON_PACKAGE_CHECK([decorator])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 25693212572e69d452bc95c923ada13744359eb7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:38:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for idna.
+
+---
+ build/pkgs/idna/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/idna/spkg-configure.m4
+
+diff --git a/build/pkgs/idna/spkg-configure.m4 b/build/pkgs/idna/spkg-configure.m4
+new file mode 100644
+index 00000000..9d363f2
+--- /dev/null
++++ b/build/pkgs/idna/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([idna], [SAGE_PYTHON_PACKAGE_CHECK([idna])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6d5616472f6cdc6cf496bba6fe07bd4ef44dfdaf Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:39:23 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for certifi.
+
+---
+ build/pkgs/certifi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/certifi/spkg-configure.m4
+
+diff --git a/build/pkgs/certifi/spkg-configure.m4 b/build/pkgs/certifi/spkg-configure.m4
+new file mode 100644
+index 00000000..ddd4061
+--- /dev/null
++++ b/build/pkgs/certifi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([certifi], [SAGE_PYTHON_PACKAGE_CHECK([certifi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9412a07023b275e29e8d1af9b8ee3e767042e7fd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:40:59 -0400
+Subject: Trac #29665: new spkg-configure.m4 for pillow.
+
+This includes an SAGE_SPKG_DEPCHECK([bzip2 freetype libpng zlib],...
+because those dependencies wind up linked into shared libraries like,
+
+  /usr/.../PIL/_imagingft.cpython-39-x86_64-linux-gnu.so
+
+and potentially conflict with their SPKG counterparts.
+---
+ build/pkgs/pillow/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/pillow/spkg-configure.m4
+
+diff --git a/build/pkgs/pillow/spkg-configure.m4 b/build/pkgs/pillow/spkg-configure.m4
+new file mode 100644
+index 00000000..f2e68e2
+--- /dev/null
++++ b/build/pkgs/pillow/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([pillow], [
++  SAGE_SPKG_DEPCHECK([bzip2 freetype libpng zlib], [
++    SAGE_PYTHON_PACKAGE_CHECK([pillow])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From eede914311481fdb75b363b7a799075e876a2b4f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:44:13 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for mpmath.
+
+---
+ build/pkgs/mpmath/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mpmath/spkg-configure.m4
+
+diff --git a/build/pkgs/mpmath/spkg-configure.m4 b/build/pkgs/mpmath/spkg-configure.m4
+new file mode 100644
+index 00000000..f43c838
+--- /dev/null
++++ b/build/pkgs/mpmath/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([mpmath], [SAGE_PYTHON_PACKAGE_CHECK([mpmath])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 363a825885832c0b580ff53fe61f5c79e70c4728 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:44:56 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for sympy.
+
+---
+ build/pkgs/sympy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sympy/spkg-configure.m4
+
+diff --git a/build/pkgs/sympy/spkg-configure.m4 b/build/pkgs/sympy/spkg-configure.m4
+new file mode 100644
+index 00000000..fa0f1f5
+--- /dev/null
++++ b/build/pkgs/sympy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([sympy], [SAGE_PYTHON_PACKAGE_CHECK([sympy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0667964c914e4a01dda697190a054ff96cea92d6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:47:06 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pygments.
+
+---
+ build/pkgs/pygments/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pygments/spkg-configure.m4
+
+diff --git a/build/pkgs/pygments/spkg-configure.m4 b/build/pkgs/pygments/spkg-configure.m4
+new file mode 100644
+index 00000000..99f29e3
+--- /dev/null
++++ b/build/pkgs/pygments/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pygments], [SAGE_PYTHON_PACKAGE_CHECK([pygments])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f787c233aa05d8e90f7c6ad18f76bd2fa36bfbfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:48:50 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for jinja2.
+
+---
+ build/pkgs/jinja2/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jinja2/spkg-configure.m4
+
+diff --git a/build/pkgs/jinja2/spkg-configure.m4 b/build/pkgs/jinja2/spkg-configure.m4
+new file mode 100644
+index 00000000..0970d1c
+--- /dev/null
++++ b/build/pkgs/jinja2/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jinja2], [SAGE_PYTHON_PACKAGE_CHECK([jinja2])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 309d8f8e2b7078b5efbbe824b69ec1d9b1e639f0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:43:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pandocfilters.
+
+---
+ build/pkgs/pandocfilters/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/pandocfilters/spkg-configure.m4
+
+diff --git a/build/pkgs/pandocfilters/spkg-configure.m4 b/build/pkgs/pandocfilters/spkg-configure.m4
+new file mode 100644
+index 00000000..3e9537f
+--- /dev/null
++++ b/build/pkgs/pandocfilters/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([pandocfilters], [
++  SAGE_PYTHON_PACKAGE_CHECK([pandocfilters])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f57bfda49777a6ba1cd123553acd75dc347c5521 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:44:46 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for webencodings.
+
+---
+ build/pkgs/webencodings/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/webencodings/spkg-configure.m4
+
+diff --git a/build/pkgs/webencodings/spkg-configure.m4 b/build/pkgs/webencodings/spkg-configure.m4
+new file mode 100644
+index 00000000..1b9a5c4
+--- /dev/null
++++ b/build/pkgs/webencodings/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([webencodings], [
++  SAGE_PYTHON_PACKAGE_CHECK([webencodings])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7f193a62d7a2ea0b6a3ca6beb12390d91c25bbfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:48:26 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pytz.
+
+---
+ build/pkgs/pytz/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pytz/spkg-configure.m4
+
+diff --git a/build/pkgs/pytz/spkg-configure.m4 b/build/pkgs/pytz/spkg-configure.m4
+new file mode 100644
+index 00000000..366521b
+--- /dev/null
++++ b/build/pkgs/pytz/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pytz], [SAGE_PYTHON_PACKAGE_CHECK([pytz])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bfd3fdd887c3465c03465248de4997eed4a82915 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:51:16 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for texttable.
+
+---
+ build/pkgs/texttable/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/texttable/spkg-configure.m4
+
+diff --git a/build/pkgs/texttable/spkg-configure.m4 b/build/pkgs/texttable/spkg-configure.m4
+new file mode 100644
+index 00000000..42a3de1
+--- /dev/null
++++ b/build/pkgs/texttable/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([texttable], [SAGE_PYTHON_PACKAGE_CHECK([texttable])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 914bf0cc57abc46129b27c1525782dbe16da31a2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:53:41 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for babel.
+
+---
+ build/pkgs/babel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/babel/spkg-configure.m4
+
+diff --git a/build/pkgs/babel/spkg-configure.m4 b/build/pkgs/babel/spkg-configure.m4
+new file mode 100644
+index 00000000..d7b9a71
+--- /dev/null
++++ b/build/pkgs/babel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([babel], [SAGE_PYTHON_PACKAGE_CHECK([babel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 56977abd1eafbc87c765a2892cfe525382648259 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 14 Oct 2021 08:06:59 -0400
+Subject: Trac #29665: force system python3 with --enable-system-site-packages.
+
+When the python SPKG is used, the --enable-system-site-packages flag
+will essentially do nothing, and that may confuse users who have
+wasted a few hours building sage. (Generally, they will want to fix
+detection of their system python3 first.)
+
+To forestall that, we now set "--with-system-python3=force" whenever
+the "--enable-system-site-packages" flag is passed.
+---
+ configure.ac | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index db30a91..6fafb83 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -438,10 +438,19 @@ AC_ARG_ENABLE([download-from-upstream-url],
+ AC_ARG_ENABLE(
+   [system-site-packages], [AS_HELP_STRING(
+     [--enable-system-site-packages],
+-    [allow sage to use python packages from the system (experimental; default: no)]
++    [allow the use of python packages from the system (experimental; default: no)]
+   )], [
+   AS_IF([test "x$enable_system_site_packages" = "xyes"], [
+     SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
++
++    dnl We want to raise an error if the user asked for "system site
++    dnl packages" but the system python will not be used. Technically
++    dnl that causes no problems (SAGE_PYTHON_PACKAGE_CHECK always fails,
++    dnl so SPKGs are used for all python packages), but it may be confusing
++    dnl to end users who expect the flag to actually give them access to
++    dnl their system python packages and who may not be paying close
++    dnl attention to their ./configure output.
++    with_system_python3="force"
+   ])
+ ])
+ AC_SUBST([SAGE_VENV_FLAGS])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 02b369fd24ef7cf8997082e7850b9cf022cae34b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 01:18:35 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for setuptools.
+
+---
+ build/pkgs/setuptools/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/setuptools/spkg-configure.m4
+
+diff --git a/build/pkgs/setuptools/spkg-configure.m4 b/build/pkgs/setuptools/spkg-configure.m4
+new file mode 100644
+index 00000000..a2ad811
+--- /dev/null
++++ b/build/pkgs/setuptools/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([setuptools], [SAGE_PYTHON_PACKAGE_CHECK([setuptools])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 05117317d38693978efaf36e81d8b02bae44b257 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 01:15:48 -0400
+Subject: Trac #29665: poison PYTHONUSERBASE when testing for "system"
+ packages.
+
+When we're detecting system installations of python packages, we want
+to hide anything that was installed with e.g. "pip install --user". To
+accomplish that, we mimic the PYTHONUSERBASE poisoning from sage-env
+within the SAGE_PYTHON_PACKAGE_CHECK() macro.
+---
+ m4/sage_python_package_check.m4 | 18 +++++++++++++++++-
+ 1 file changed, 17 insertions(+), 1 deletion(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 77b0a0c..b8cdba4 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -38,11 +38,27 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     dnl package.
+     SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
+     AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++
++    dnl To prevent user-site (pip install --user) packages from being
++    dnl detected as "system" packages, we poison PYTHONUSERBASE. The
++    dnl sage-env script also does this at runtime; we mimic that
++    dnl implementation to ensure that the behaviors at ./configure and
++    dnl runtime are identical. Beware that (as in sage-env) the poisoning
++    dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
++    dnl user points PYTHONUSERBASE to any path (even the default), then
++    dnl his local pip packages will be detected.
++    PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
++    AS_IF([test -z "${PYTHONUSERBASE}"], [
++      PYTHONUSERBASE="${HOME}/.sage/local"
++    ])
++
+     AS_IF(
+-      ["${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())"],
++      [PYTHONUSERBASE="${PYTHONUSERBASE}" "${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" 2>/dev/null],
+       [AC_MSG_RESULT(yes)],
+       [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+     )
++
++    PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d75c1492f63a584b5ec5f424ddd7f7c4a6d502d3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:20:04 -0400
+Subject: Trac #29665: run SAGE_PYTHON_PACKAGE_CHECK() inside a venv.
+
+To recreate the runtime environment as closely as possible, we now use
+a venv (with system site packages enabled) when checking for system
+copies of python packages.
+---
+ m4/sage_python_package_check.m4 | 76 +++++++++++++++++++++++++++--------------
+ 1 file changed, 51 insertions(+), 25 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index b8cdba4..7cbd6c0 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -15,9 +15,11 @@
+ #
+ #     2. If we are not using the system python (no $PYTHON_FOR_VENV),
+ #
+-#     3. If setuptools is not available to the system python,
++#     3. If we are unable to create a venv with the system python,
+ #
+-#     4. If the contents of install-requires.txt are not met (wrong
++#     4. If setuptools is not available to the system python,
++#
++#     5. If the contents of install-requires.txt are not met (wrong
+ #        version, no version, etc.) by the system python.
+ #
+ #   In any of those cases, we set sage_spkg_install_$package to "yes"
+@@ -27,38 +29,62 @@
+ #
+ #   The SAGE_SPKG_CONFIGURE_PYTHON3() macro is AC_REQUIRE'd to ensure
+ #   that $PYTHON_FOR_VENV is available, if it is going to be available.
++#   The check is run inside a new venv, and with the PYTHONUSERBASE
++#   variable poisoned in the same manner as sage-env poisons it, to
++#   ensure that the ./configure- and run-time views of the system
++#   are as similar as possible.
+ #
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
+     AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
+ 
+-    dnl strip all comments from install-requires.txt; this should leave
+-    dnl only a single line containing the version specification for this
+-    dnl package.
+-    SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
+-    AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++    dnl We run this check inside a python venv, because that's ultimately
++    dnl how the system $PYTHON_FOR_VENV will be used.
++    AC_MSG_CHECKING([if we can create a python venv in config.venv])
+ 
+-    dnl To prevent user-site (pip install --user) packages from being
+-    dnl detected as "system" packages, we poison PYTHONUSERBASE. The
+-    dnl sage-env script also does this at runtime; we mimic that
+-    dnl implementation to ensure that the behaviors at ./configure and
+-    dnl runtime are identical. Beware that (as in sage-env) the poisoning
+-    dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
+-    dnl user points PYTHONUSERBASE to any path (even the default), then
+-    dnl his local pip packages will be detected.
+-    PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
+-    AS_IF([test -z "${PYTHONUSERBASE}"], [
+-      PYTHONUSERBASE="${HOME}/.sage/local"
+-    ])
++    dnl Use --clear because ./configure typically clobbers its output files.
++    AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
++                                        --clear                dnl
++                                        --without-pip          dnl
++					config.venv], [
++      AC_MSG_RESULT(yes)
++      dnl strip all comments from install-requires.txt; this should leave
++      dnl only a single line containing the version specification for this
++      dnl package.
++      SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
++      AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++
++      dnl To prevent user-site (pip install --user) packages from being
++      dnl detected as "system" packages, we poison PYTHONUSERBASE. The
++      dnl sage-env script also does this at runtime; we mimic that
++      dnl implementation to ensure that the behaviors at ./configure and
++      dnl runtime are identical. Beware that (as in sage-env) the poisoning
++      dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
++      dnl user points PYTHONUSERBASE to any path (even the default), then
++      dnl his local pip packages will be detected.
++      PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
++      AS_IF([test -z "${PYTHONUSERBASE}"], [
++        PYTHONUSERBASE="${HOME}/.sage/local"
++      ])
+ 
+-    AS_IF(
+-      [PYTHONUSERBASE="${PYTHONUSERBASE}" "${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" 2>/dev/null],
+-      [AC_MSG_RESULT(yes)],
+-      [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+-    )
++      AS_IF(
++        [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
++           "from setuptools.version import pkg_resources;              dnl
++            pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" dnl
++	 2>/dev/null],
++        [AC_MSG_RESULT(yes)],
++        [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
++      )
++
++      PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
++    ], [
++      dnl failed to create a venv for some reason
++      AC_MSG_RESULT(no)
++      sage_spkg_install_$1=yes
++    ])
+ 
+-    PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
++    rm -rf config.venv
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 87646c3264a04ffd98a12d67074f93e1943a1e96 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:38:08 -0400
+Subject: Trac #29665: log SAGE_PYTHON_PACKAGE_CHECK() failures to config.log.
+
+---
+ m4/sage_python_package_check.m4 | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 7cbd6c0..e0e0b9f 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -47,7 +47,8 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
+                                         --clear                dnl
+                                         --without-pip          dnl
+-					config.venv], [
++                                        config.venv            dnl
++                                        2>&AS_MESSAGE_LOG_FD], [
+       AC_MSG_RESULT(yes)
+       dnl strip all comments from install-requires.txt; this should leave
+       dnl only a single line containing the version specification for this
+@@ -72,7 +73,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+         [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
+            "from setuptools.version import pkg_resources;              dnl
+             pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" dnl
+-	 2>/dev/null],
++	 2>&AS_MESSAGE_LOG_FD],
+         [AC_MSG_RESULT(yes)],
+         [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+       )
+-- 
+cgit v1.0-1-gd88e
+
+
+From f7dfffd1c64816e2ae4e0f420b22065c5c5bf2cb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:45:37 -0400
+Subject: Trac #29665: don't clobber a plain file named config.venv.
+
+When SAGE_PYTHON_PACKAGE_CHECK() is cleaning up, we no longer remove
+"config.venv" unconditionally. Instead, we remove it only if it is a
+directory. This is also how "pyvenv --clear" works.
+---
+ m4/sage_python_package_check.m4 | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index e0e0b9f..127a078 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -85,7 +85,9 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+       sage_spkg_install_$1=yes
+     ])
+ 
+-    rm -rf config.venv
++    dnl Clean up config.venv, but only if we could have created it.
++    dnl (The --clear flag to pyvenv will not clobber a plain file.)
++    AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9849c77313b895dcfb786d2ea54e36585bd31ce2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 16 Oct 2021 08:14:42 -0400
+Subject: Trac #29665: don't announce system python packages that won't be
+ used.
+
+When --enable-system-site-packages was not given, the python packages
+using SAGE_PYTHON_PACKAGE_CHECK() in spkg-configure.m4 cannot be used.
+Rather than suggest that users install them anyway, that macro now
+hacks the value of sage_use_system_$package to be "no" when the use
+of system site packages is disabled at the python level.
+---
+ m4/sage_python_package_check.m4 | 17 +++++++++++++++++
+ 1 file changed, 17 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 127a078..7ee82a7 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -89,6 +89,23 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     dnl (The --clear flag to pyvenv will not clobber a plain file.)
+     AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
++    dnl System site packages are disabled.
+     sage_spkg_install_$1=yes
++
++    dnl We have to retroactively hack the --with-system-foo={no,yes,force}
++    dnl mechanism here because it wasn't designed with the ability to
++    dnl disable arbitrary chunks of system packages in mind. The easy cases
++    dnl are "no" and "force" which require no action; "no" means we won't
++    dnl suggest the package anyway, and "force" will raise an error when
++    dnl the system-package check fails.
++    dnl
++    dnl The default of "yes" is more troubling because it is the default. To
++    dnl avoid prompting users to install packages that won't be used, we want
++    dnl to ignore "yes" when reporting the "hint: install these packages..."
++    dnl at the end of ./configure. To accomplish that, we change "yes" to
++    dnl "no" here, essentially changing the default for packages using this
++    dnl macro when --enable-system-site-packages is disabled. Packages with
++    dnl "no" are not suggested to the user.
++    AS_IF([test "${sage_use_system_$1}" = "yes"],[sage_use_system_$1=no])
+   ])
+ ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3e6ad737b94aaac234d615ecaf1a2455eb607f1a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 17 Oct 2021 06:16:21 -0400
+Subject: Trac #29665: add Gentoo package information for python packages.
+
+---
+ build/pkgs/babel/distros/gentoo.txt         | 1 +
+ build/pkgs/bleach/distros/gentoo.txt        | 1 +
+ build/pkgs/certifi/distros/gentoo.txt       | 1 +
+ build/pkgs/cvxopt/distros/gentoo.txt        | 1 +
+ build/pkgs/decorator/distros/gentoo.txt     | 1 +
+ build/pkgs/html5lib/distros/gentoo.txt      | 1 +
+ build/pkgs/idna/distros/gentoo.txt          | 1 +
+ build/pkgs/jinja2/distros/gentoo.txt        | 1 +
+ build/pkgs/matplotlib/distros/gentoo.txt    | 1 +
+ build/pkgs/mpmath/distros/gentoo.txt        | 1 +
+ build/pkgs/networkx/distros/gentoo.txt      | 1 +
+ build/pkgs/numpy/distros/gentoo.txt         | 1 +
+ build/pkgs/packaging/distros/gentoo.txt     | 1 +
+ build/pkgs/pandocfilters/distros/gentoo.txt | 1 +
+ build/pkgs/pickleshare/distros/gentoo.txt   | 1 +
+ build/pkgs/pillow/distros/gentoo.txt        | 1 +
+ build/pkgs/pluggy/distros/gentoo.txt        | 1 +
+ build/pkgs/pygments/distros/gentoo.txt      | 1 +
+ build/pkgs/pytz/distros/gentoo.txt          | 1 +
+ build/pkgs/pyzmq/distros/gentoo.txt         | 1 +
+ build/pkgs/requests/distros/gentoo.txt      | 1 +
+ build/pkgs/scipy/distros/gentoo.txt         | 1 +
+ build/pkgs/setuptools/distros/gentoo.txt    | 1 +
+ build/pkgs/six/distros/gentoo.txt           | 1 +
+ build/pkgs/sympy/distros/gentoo.txt         | 1 +
+ build/pkgs/texttable/distros/gentoo.txt     | 1 +
+ build/pkgs/toml/distros/gentoo.txt          | 1 +
+ build/pkgs/webencodings/distros/gentoo.txt  | 1 +
+ 28 files changed, 28 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/gentoo.txt
+ create mode 100644 build/pkgs/bleach/distros/gentoo.txt
+ create mode 100644 build/pkgs/certifi/distros/gentoo.txt
+ create mode 100644 build/pkgs/cvxopt/distros/gentoo.txt
+ create mode 100644 build/pkgs/decorator/distros/gentoo.txt
+ create mode 100644 build/pkgs/html5lib/distros/gentoo.txt
+ create mode 100644 build/pkgs/idna/distros/gentoo.txt
+ create mode 100644 build/pkgs/jinja2/distros/gentoo.txt
+ create mode 100644 build/pkgs/matplotlib/distros/gentoo.txt
+ create mode 100644 build/pkgs/mpmath/distros/gentoo.txt
+ create mode 100644 build/pkgs/networkx/distros/gentoo.txt
+ create mode 100644 build/pkgs/numpy/distros/gentoo.txt
+ create mode 100644 build/pkgs/packaging/distros/gentoo.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/gentoo.txt
+ create mode 100644 build/pkgs/pickleshare/distros/gentoo.txt
+ create mode 100644 build/pkgs/pillow/distros/gentoo.txt
+ create mode 100644 build/pkgs/pluggy/distros/gentoo.txt
+ create mode 100644 build/pkgs/pygments/distros/gentoo.txt
+ create mode 100644 build/pkgs/pytz/distros/gentoo.txt
+ create mode 100644 build/pkgs/pyzmq/distros/gentoo.txt
+ create mode 100644 build/pkgs/requests/distros/gentoo.txt
+ create mode 100644 build/pkgs/scipy/distros/gentoo.txt
+ create mode 100644 build/pkgs/setuptools/distros/gentoo.txt
+ create mode 100644 build/pkgs/six/distros/gentoo.txt
+ create mode 100644 build/pkgs/sympy/distros/gentoo.txt
+ create mode 100644 build/pkgs/texttable/distros/gentoo.txt
+ create mode 100644 build/pkgs/toml/distros/gentoo.txt
+ create mode 100644 build/pkgs/webencodings/distros/gentoo.txt
+
+diff --git a/build/pkgs/babel/distros/gentoo.txt b/build/pkgs/babel/distros/gentoo.txt
+new file mode 100644
+index 00000000..2d2c34f
+--- /dev/null
++++ b/build/pkgs/babel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/Babel
+diff --git a/build/pkgs/bleach/distros/gentoo.txt b/build/pkgs/bleach/distros/gentoo.txt
+new file mode 100644
+index 00000000..b4f9744
+--- /dev/null
++++ b/build/pkgs/bleach/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/bleach
+diff --git a/build/pkgs/certifi/distros/gentoo.txt b/build/pkgs/certifi/distros/gentoo.txt
+new file mode 100644
+index 00000000..72e2e91
+--- /dev/null
++++ b/build/pkgs/certifi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/certifi
+diff --git a/build/pkgs/cvxopt/distros/gentoo.txt b/build/pkgs/cvxopt/distros/gentoo.txt
+new file mode 100644
+index 00000000..b312391
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/cvxopt
+diff --git a/build/pkgs/decorator/distros/gentoo.txt b/build/pkgs/decorator/distros/gentoo.txt
+new file mode 100644
+index 00000000..fea5a67
+--- /dev/null
++++ b/build/pkgs/decorator/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/decorator
+diff --git a/build/pkgs/html5lib/distros/gentoo.txt b/build/pkgs/html5lib/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c2be76
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/html5lib
+diff --git a/build/pkgs/idna/distros/gentoo.txt b/build/pkgs/idna/distros/gentoo.txt
+new file mode 100644
+index 00000000..68ef51c
+--- /dev/null
++++ b/build/pkgs/idna/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/idna
+diff --git a/build/pkgs/jinja2/distros/gentoo.txt b/build/pkgs/jinja2/distros/gentoo.txt
+new file mode 100644
+index 00000000..15a27ae
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jinja
+diff --git a/build/pkgs/matplotlib/distros/gentoo.txt b/build/pkgs/matplotlib/distros/gentoo.txt
+new file mode 100644
+index 00000000..bcfefb5
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/matplotlib
+diff --git a/build/pkgs/mpmath/distros/gentoo.txt b/build/pkgs/mpmath/distros/gentoo.txt
+new file mode 100644
+index 00000000..946c62d
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/mpmath
+diff --git a/build/pkgs/networkx/distros/gentoo.txt b/build/pkgs/networkx/distros/gentoo.txt
+new file mode 100644
+index 00000000..dd97742
+--- /dev/null
++++ b/build/pkgs/networkx/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/networkx
+diff --git a/build/pkgs/numpy/distros/gentoo.txt b/build/pkgs/numpy/distros/gentoo.txt
+new file mode 100644
+index 00000000..d2179d4
+--- /dev/null
++++ b/build/pkgs/numpy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/numpy
+diff --git a/build/pkgs/packaging/distros/gentoo.txt b/build/pkgs/packaging/distros/gentoo.txt
+new file mode 100644
+index 00000000..e5309ed
+--- /dev/null
++++ b/build/pkgs/packaging/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/packaging
+diff --git a/build/pkgs/pandocfilters/distros/gentoo.txt b/build/pkgs/pandocfilters/distros/gentoo.txt
+new file mode 100644
+index 00000000..a726fda
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/gentoo.txt b/build/pkgs/pickleshare/distros/gentoo.txt
+new file mode 100644
+index 00000000..14fad0f
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pickleshare
+diff --git a/build/pkgs/pillow/distros/gentoo.txt b/build/pkgs/pillow/distros/gentoo.txt
+new file mode 100644
+index 00000000..1243649
+--- /dev/null
++++ b/build/pkgs/pillow/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pillow
+diff --git a/build/pkgs/pluggy/distros/gentoo.txt b/build/pkgs/pluggy/distros/gentoo.txt
+new file mode 100644
+index 00000000..7b33876
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pluggy
+diff --git a/build/pkgs/pygments/distros/gentoo.txt b/build/pkgs/pygments/distros/gentoo.txt
+new file mode 100644
+index 00000000..a584f32
+--- /dev/null
++++ b/build/pkgs/pygments/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pygments
+diff --git a/build/pkgs/pytz/distros/gentoo.txt b/build/pkgs/pytz/distros/gentoo.txt
+new file mode 100644
+index 00000000..902a18b
+--- /dev/null
++++ b/build/pkgs/pytz/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pytz
+diff --git a/build/pkgs/pyzmq/distros/gentoo.txt b/build/pkgs/pyzmq/distros/gentoo.txt
+new file mode 100644
+index 00000000..77c2429
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyzmq
+diff --git a/build/pkgs/requests/distros/gentoo.txt b/build/pkgs/requests/distros/gentoo.txt
+new file mode 100644
+index 00000000..d3dc941
+--- /dev/null
++++ b/build/pkgs/requests/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/requests
+diff --git a/build/pkgs/scipy/distros/gentoo.txt b/build/pkgs/scipy/distros/gentoo.txt
+new file mode 100644
+index 00000000..11dabd2
+--- /dev/null
++++ b/build/pkgs/scipy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/scipy
+diff --git a/build/pkgs/setuptools/distros/gentoo.txt b/build/pkgs/setuptools/distros/gentoo.txt
+new file mode 100644
+index 00000000..3a4fa34
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/setuptools
+diff --git a/build/pkgs/six/distros/gentoo.txt b/build/pkgs/six/distros/gentoo.txt
+new file mode 100644
+index 00000000..f73f648
+--- /dev/null
++++ b/build/pkgs/six/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/six
+diff --git a/build/pkgs/sympy/distros/gentoo.txt b/build/pkgs/sympy/distros/gentoo.txt
+new file mode 100644
+index 00000000..b5a5034
+--- /dev/null
++++ b/build/pkgs/sympy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sympy
+diff --git a/build/pkgs/texttable/distros/gentoo.txt b/build/pkgs/texttable/distros/gentoo.txt
+new file mode 100644
+index 00000000..b33a7a7
+--- /dev/null
++++ b/build/pkgs/texttable/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/texttable
+diff --git a/build/pkgs/toml/distros/gentoo.txt b/build/pkgs/toml/distros/gentoo.txt
+new file mode 100644
+index 00000000..64fcea3
+--- /dev/null
++++ b/build/pkgs/toml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/toml
+diff --git a/build/pkgs/webencodings/distros/gentoo.txt b/build/pkgs/webencodings/distros/gentoo.txt
+new file mode 100644
+index 00000000..7539b0f
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/webencodings
+-- 
+cgit v1.0-1-gd88e
+
+
+From 088380f884124c9608160b613ba031c5f023f604 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 18:43:04 -0700
+Subject: build/pkgs: Add distros/fedora.txt for Python packages
+
+---
+ build/pkgs/babel/distros/fedora.txt         | 1 +
+ build/pkgs/bleach/distros/fedora.txt        | 1 +
+ build/pkgs/certifi/distros/fedora.txt       | 1 +
+ build/pkgs/cvxopt/distros/fedora.txt        | 1 +
+ build/pkgs/decorator/distros/fedora.txt     | 1 +
+ build/pkgs/html5lib/distros/fedora.txt      | 1 +
+ build/pkgs/idna/distros/fedora.txt          | 1 +
+ build/pkgs/jinja2/distros/fedora.txt        | 1 +
+ build/pkgs/matplotlib/distros/fedora.txt    | 1 +
+ build/pkgs/mpmath/distros/fedora.txt        | 1 +
+ build/pkgs/networkx/distros/fedora.txt      | 1 +
+ build/pkgs/numpy/distros/fedora.txt         | 1 +
+ build/pkgs/packaging/distros/fedora.txt     | 1 +
+ build/pkgs/pandocfilters/distros/fedora.txt | 1 +
+ build/pkgs/pickleshare/distros/fedora.txt   | 1 +
+ build/pkgs/pillow/distros/fedora.txt        | 1 +
+ build/pkgs/pluggy/distros/fedora.txt        | 1 +
+ build/pkgs/py/distros/fedora.txt            | 1 +
+ build/pkgs/pygments/distros/fedora.txt      | 1 +
+ build/pkgs/pytz/distros/fedora.txt          | 1 +
+ build/pkgs/pyzmq/distros/fedora.txt         | 1 +
+ build/pkgs/requests/distros/fedora.txt      | 1 +
+ build/pkgs/scipy/distros/fedora.txt         | 1 +
+ build/pkgs/setuptools/distros/fedora.txt    | 1 +
+ build/pkgs/six/distros/fedora.txt           | 1 +
+ build/pkgs/sympy/distros/fedora.txt         | 1 +
+ build/pkgs/texttable/distros/fedora.txt     | 1 +
+ build/pkgs/toml/distros/fedora.txt          | 1 +
+ build/pkgs/webencodings/distros/fedora.txt  | 1 +
+ build/pkgs/wheel/distros/fedora.txt         | 1 +
+ 30 files changed, 30 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/fedora.txt
+ create mode 100644 build/pkgs/bleach/distros/fedora.txt
+ create mode 100644 build/pkgs/certifi/distros/fedora.txt
+ create mode 100644 build/pkgs/cvxopt/distros/fedora.txt
+ create mode 100644 build/pkgs/decorator/distros/fedora.txt
+ create mode 100644 build/pkgs/html5lib/distros/fedora.txt
+ create mode 100644 build/pkgs/idna/distros/fedora.txt
+ create mode 100644 build/pkgs/jinja2/distros/fedora.txt
+ create mode 100644 build/pkgs/matplotlib/distros/fedora.txt
+ create mode 100644 build/pkgs/mpmath/distros/fedora.txt
+ create mode 100644 build/pkgs/networkx/distros/fedora.txt
+ create mode 100644 build/pkgs/numpy/distros/fedora.txt
+ create mode 100644 build/pkgs/packaging/distros/fedora.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/fedora.txt
+ create mode 100644 build/pkgs/pickleshare/distros/fedora.txt
+ create mode 100644 build/pkgs/pillow/distros/fedora.txt
+ create mode 100644 build/pkgs/pluggy/distros/fedora.txt
+ create mode 100644 build/pkgs/py/distros/fedora.txt
+ create mode 100644 build/pkgs/pygments/distros/fedora.txt
+ create mode 100644 build/pkgs/pytz/distros/fedora.txt
+ create mode 100644 build/pkgs/pyzmq/distros/fedora.txt
+ create mode 100644 build/pkgs/requests/distros/fedora.txt
+ create mode 100644 build/pkgs/scipy/distros/fedora.txt
+ create mode 100644 build/pkgs/setuptools/distros/fedora.txt
+ create mode 100644 build/pkgs/six/distros/fedora.txt
+ create mode 100644 build/pkgs/sympy/distros/fedora.txt
+ create mode 100644 build/pkgs/texttable/distros/fedora.txt
+ create mode 100644 build/pkgs/toml/distros/fedora.txt
+ create mode 100644 build/pkgs/webencodings/distros/fedora.txt
+ create mode 100644 build/pkgs/wheel/distros/fedora.txt
+
+diff --git a/build/pkgs/babel/distros/fedora.txt b/build/pkgs/babel/distros/fedora.txt
+new file mode 100644
+index 00000000..98f6593
+--- /dev/null
++++ b/build/pkgs/babel/distros/fedora.txt
+@@ -0,0 +1 @@
++babel
+diff --git a/build/pkgs/bleach/distros/fedora.txt b/build/pkgs/bleach/distros/fedora.txt
+new file mode 100644
+index 00000000..c5422cc
+--- /dev/null
++++ b/build/pkgs/bleach/distros/fedora.txt
+@@ -0,0 +1 @@
++python-bleach
+diff --git a/build/pkgs/certifi/distros/fedora.txt b/build/pkgs/certifi/distros/fedora.txt
+new file mode 100644
+index 00000000..be421c8
+--- /dev/null
++++ b/build/pkgs/certifi/distros/fedora.txt
+@@ -0,0 +1 @@
++python-certifi
+diff --git a/build/pkgs/cvxopt/distros/fedora.txt b/build/pkgs/cvxopt/distros/fedora.txt
+new file mode 100644
+index 00000000..f15770f
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/fedora.txt
+@@ -0,0 +1 @@
++python-cvxopt
+diff --git a/build/pkgs/decorator/distros/fedora.txt b/build/pkgs/decorator/distros/fedora.txt
+new file mode 100644
+index 00000000..0795604
+--- /dev/null
++++ b/build/pkgs/decorator/distros/fedora.txt
+@@ -0,0 +1 @@
++python-decorator
+diff --git a/build/pkgs/html5lib/distros/fedora.txt b/build/pkgs/html5lib/distros/fedora.txt
+new file mode 100644
+index 00000000..b821491
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/fedora.txt
+@@ -0,0 +1 @@
++python-html5lib
+diff --git a/build/pkgs/idna/distros/fedora.txt b/build/pkgs/idna/distros/fedora.txt
+new file mode 100644
+index 00000000..a73e70c
+--- /dev/null
++++ b/build/pkgs/idna/distros/fedora.txt
+@@ -0,0 +1 @@
++python-idna
+diff --git a/build/pkgs/jinja2/distros/fedora.txt b/build/pkgs/jinja2/distros/fedora.txt
+new file mode 100644
+index 00000000..f5f3caf
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/fedora.txt
+@@ -0,0 +1 @@
++python-jinja2
+diff --git a/build/pkgs/matplotlib/distros/fedora.txt b/build/pkgs/matplotlib/distros/fedora.txt
+new file mode 100644
+index 00000000..f6d856e
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/fedora.txt
+@@ -0,0 +1 @@
++python-matplotlib
+diff --git a/build/pkgs/mpmath/distros/fedora.txt b/build/pkgs/mpmath/distros/fedora.txt
+new file mode 100644
+index 00000000..a7dc8d5
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/fedora.txt
+@@ -0,0 +1 @@
++python-mpmath
+diff --git a/build/pkgs/networkx/distros/fedora.txt b/build/pkgs/networkx/distros/fedora.txt
+new file mode 100644
+index 00000000..293f943
+--- /dev/null
++++ b/build/pkgs/networkx/distros/fedora.txt
+@@ -0,0 +1 @@
++python-networkx
+diff --git a/build/pkgs/numpy/distros/fedora.txt b/build/pkgs/numpy/distros/fedora.txt
+new file mode 100644
+index 00000000..c8722b9
+--- /dev/null
++++ b/build/pkgs/numpy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-numpy
+diff --git a/build/pkgs/packaging/distros/fedora.txt b/build/pkgs/packaging/distros/fedora.txt
+new file mode 100644
+index 00000000..02ad855
+--- /dev/null
++++ b/build/pkgs/packaging/distros/fedora.txt
+@@ -0,0 +1 @@
++python-packaging
+diff --git a/build/pkgs/pandocfilters/distros/fedora.txt b/build/pkgs/pandocfilters/distros/fedora.txt
+new file mode 100644
+index 00000000..e7a86d0
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/fedora.txt b/build/pkgs/pickleshare/distros/fedora.txt
+new file mode 100644
+index 00000000..6d991a2
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pickleshare
+diff --git a/build/pkgs/pillow/distros/fedora.txt b/build/pkgs/pillow/distros/fedora.txt
+new file mode 100644
+index 00000000..86dbb1d
+--- /dev/null
++++ b/build/pkgs/pillow/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pillow
+diff --git a/build/pkgs/pluggy/distros/fedora.txt b/build/pkgs/pluggy/distros/fedora.txt
+new file mode 100644
+index 00000000..c869e54
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pluggy
+diff --git a/build/pkgs/py/distros/fedora.txt b/build/pkgs/py/distros/fedora.txt
+new file mode 100644
+index 00000000..b348d39
+--- /dev/null
++++ b/build/pkgs/py/distros/fedora.txt
+@@ -0,0 +1 @@
++python-py
+diff --git a/build/pkgs/pygments/distros/fedora.txt b/build/pkgs/pygments/distros/fedora.txt
+new file mode 100644
+index 00000000..f3e72a8
+--- /dev/null
++++ b/build/pkgs/pygments/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pygments
+diff --git a/build/pkgs/pytz/distros/fedora.txt b/build/pkgs/pytz/distros/fedora.txt
+new file mode 100644
+index 00000000..2cccc9e
+--- /dev/null
++++ b/build/pkgs/pytz/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pytz
+diff --git a/build/pkgs/pyzmq/distros/fedora.txt b/build/pkgs/pyzmq/distros/fedora.txt
+new file mode 100644
+index 00000000..23f64d1
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pyzmq
+diff --git a/build/pkgs/requests/distros/fedora.txt b/build/pkgs/requests/distros/fedora.txt
+new file mode 100644
+index 00000000..93a7bc1
+--- /dev/null
++++ b/build/pkgs/requests/distros/fedora.txt
+@@ -0,0 +1 @@
++python-requests
+diff --git a/build/pkgs/scipy/distros/fedora.txt b/build/pkgs/scipy/distros/fedora.txt
+new file mode 100644
+index 00000000..7ff2882
+--- /dev/null
++++ b/build/pkgs/scipy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-scipy
+diff --git a/build/pkgs/setuptools/distros/fedora.txt b/build/pkgs/setuptools/distros/fedora.txt
+new file mode 100644
+index 00000000..e1ad178
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/fedora.txt
+@@ -0,0 +1 @@
++python-setuptools
+diff --git a/build/pkgs/six/distros/fedora.txt b/build/pkgs/six/distros/fedora.txt
+new file mode 100644
+index 00000000..787c530
+--- /dev/null
++++ b/build/pkgs/six/distros/fedora.txt
+@@ -0,0 +1 @@
++python-six
+diff --git a/build/pkgs/sympy/distros/fedora.txt b/build/pkgs/sympy/distros/fedora.txt
+new file mode 100644
+index 00000000..126c88a
+--- /dev/null
++++ b/build/pkgs/sympy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-sympy
+diff --git a/build/pkgs/texttable/distros/fedora.txt b/build/pkgs/texttable/distros/fedora.txt
+new file mode 100644
+index 00000000..8d1ccec
+--- /dev/null
++++ b/build/pkgs/texttable/distros/fedora.txt
+@@ -0,0 +1 @@
++python-texttable
+diff --git a/build/pkgs/toml/distros/fedora.txt b/build/pkgs/toml/distros/fedora.txt
+new file mode 100644
+index 00000000..821ee77
+--- /dev/null
++++ b/build/pkgs/toml/distros/fedora.txt
+@@ -0,0 +1 @@
++python-toml
+diff --git a/build/pkgs/webencodings/distros/fedora.txt b/build/pkgs/webencodings/distros/fedora.txt
+new file mode 100644
+index 00000000..12ddba9
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/fedora.txt
+@@ -0,0 +1 @@
++python-webencodings
+diff --git a/build/pkgs/wheel/distros/fedora.txt b/build/pkgs/wheel/distros/fedora.txt
+new file mode 100644
+index 00000000..ae4cbb9
+--- /dev/null
++++ b/build/pkgs/wheel/distros/fedora.txt
+@@ -0,0 +1 @@
++python-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From ad1d5a20380b147c774903066031442f31094626 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 21:04:04 -0700
+Subject: build/pkgs: Add distros/arch.txt for Python packages
+
+---
+ build/pkgs/babel/distros/arch.txt         | 1 +
+ build/pkgs/bleach/distros/arch.txt        | 1 +
+ build/pkgs/certifi/distros/arch.txt       | 1 +
+ build/pkgs/cvxopt/distros/arch.txt        | 1 +
+ build/pkgs/decorator/distros/arch.txt     | 1 +
+ build/pkgs/html5lib/distros/arch.txt      | 1 +
+ build/pkgs/idna/distros/arch.txt          | 1 +
+ build/pkgs/matplotlib/distros/arch.txt    | 1 +
+ build/pkgs/mpmath/distros/arch.txt        | 1 +
+ build/pkgs/networkx/distros/arch.txt      | 1 +
+ build/pkgs/numpy/distros/arch.txt         | 1 +
+ build/pkgs/packaging/distros/arch.txt     | 1 +
+ build/pkgs/pandocfilters/distros/arch.txt | 1 +
+ build/pkgs/pickleshare/distros/arch.txt   | 1 +
+ build/pkgs/pillow/distros/arch.txt        | 1 +
+ build/pkgs/pluggy/distros/arch.txt        | 1 +
+ build/pkgs/py/distros/arch.txt            | 1 +
+ build/pkgs/pygments/distros/arch.txt      | 1 +
+ build/pkgs/pytz/distros/arch.txt          | 1 +
+ build/pkgs/pyzmq/distros/arch.txt         | 1 +
+ build/pkgs/requests/distros/arch.txt      | 1 +
+ build/pkgs/scipy/distros/arch.txt         | 1 +
+ build/pkgs/setuptools/distros/arch.txt    | 1 +
+ build/pkgs/six/distros/arch.txt           | 1 +
+ build/pkgs/sympy/distros/arch.txt         | 1 +
+ build/pkgs/texttable/distros/arch.txt     | 1 +
+ build/pkgs/toml/distros/arch.txt          | 1 +
+ build/pkgs/webencodings/distros/arch.txt  | 1 +
+ build/pkgs/wheel/distros/arch.txt         | 1 +
+ 29 files changed, 29 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/arch.txt
+ create mode 100644 build/pkgs/bleach/distros/arch.txt
+ create mode 100644 build/pkgs/certifi/distros/arch.txt
+ create mode 100644 build/pkgs/cvxopt/distros/arch.txt
+ create mode 100644 build/pkgs/decorator/distros/arch.txt
+ create mode 100644 build/pkgs/html5lib/distros/arch.txt
+ create mode 100644 build/pkgs/idna/distros/arch.txt
+ create mode 100644 build/pkgs/matplotlib/distros/arch.txt
+ create mode 100644 build/pkgs/mpmath/distros/arch.txt
+ create mode 100644 build/pkgs/networkx/distros/arch.txt
+ create mode 100644 build/pkgs/numpy/distros/arch.txt
+ create mode 100644 build/pkgs/packaging/distros/arch.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/arch.txt
+ create mode 100644 build/pkgs/pickleshare/distros/arch.txt
+ create mode 100644 build/pkgs/pillow/distros/arch.txt
+ create mode 100644 build/pkgs/pluggy/distros/arch.txt
+ create mode 100644 build/pkgs/py/distros/arch.txt
+ create mode 100644 build/pkgs/pygments/distros/arch.txt
+ create mode 100644 build/pkgs/pytz/distros/arch.txt
+ create mode 100644 build/pkgs/pyzmq/distros/arch.txt
+ create mode 100644 build/pkgs/requests/distros/arch.txt
+ create mode 100644 build/pkgs/scipy/distros/arch.txt
+ create mode 100644 build/pkgs/setuptools/distros/arch.txt
+ create mode 100644 build/pkgs/six/distros/arch.txt
+ create mode 100644 build/pkgs/sympy/distros/arch.txt
+ create mode 100644 build/pkgs/texttable/distros/arch.txt
+ create mode 100644 build/pkgs/toml/distros/arch.txt
+ create mode 100644 build/pkgs/webencodings/distros/arch.txt
+ create mode 100644 build/pkgs/wheel/distros/arch.txt
+
+diff --git a/build/pkgs/babel/distros/arch.txt b/build/pkgs/babel/distros/arch.txt
+new file mode 100644
+index 00000000..f2d828c
+--- /dev/null
++++ b/build/pkgs/babel/distros/arch.txt
+@@ -0,0 +1 @@
++python-babel
+diff --git a/build/pkgs/bleach/distros/arch.txt b/build/pkgs/bleach/distros/arch.txt
+new file mode 100644
+index 00000000..c5422cc
+--- /dev/null
++++ b/build/pkgs/bleach/distros/arch.txt
+@@ -0,0 +1 @@
++python-bleach
+diff --git a/build/pkgs/certifi/distros/arch.txt b/build/pkgs/certifi/distros/arch.txt
+new file mode 100644
+index 00000000..be421c8
+--- /dev/null
++++ b/build/pkgs/certifi/distros/arch.txt
+@@ -0,0 +1 @@
++python-certifi
+diff --git a/build/pkgs/cvxopt/distros/arch.txt b/build/pkgs/cvxopt/distros/arch.txt
+new file mode 100644
+index 00000000..f15770f
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/arch.txt
+@@ -0,0 +1 @@
++python-cvxopt
+diff --git a/build/pkgs/decorator/distros/arch.txt b/build/pkgs/decorator/distros/arch.txt
+new file mode 100644
+index 00000000..0795604
+--- /dev/null
++++ b/build/pkgs/decorator/distros/arch.txt
+@@ -0,0 +1 @@
++python-decorator
+diff --git a/build/pkgs/html5lib/distros/arch.txt b/build/pkgs/html5lib/distros/arch.txt
+new file mode 100644
+index 00000000..b821491
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/arch.txt
+@@ -0,0 +1 @@
++python-html5lib
+diff --git a/build/pkgs/idna/distros/arch.txt b/build/pkgs/idna/distros/arch.txt
+new file mode 100644
+index 00000000..a73e70c
+--- /dev/null
++++ b/build/pkgs/idna/distros/arch.txt
+@@ -0,0 +1 @@
++python-idna
+diff --git a/build/pkgs/matplotlib/distros/arch.txt b/build/pkgs/matplotlib/distros/arch.txt
+new file mode 100644
+index 00000000..f6d856e
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/arch.txt
+@@ -0,0 +1 @@
++python-matplotlib
+diff --git a/build/pkgs/mpmath/distros/arch.txt b/build/pkgs/mpmath/distros/arch.txt
+new file mode 100644
+index 00000000..a7dc8d5
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/arch.txt
+@@ -0,0 +1 @@
++python-mpmath
+diff --git a/build/pkgs/networkx/distros/arch.txt b/build/pkgs/networkx/distros/arch.txt
+new file mode 100644
+index 00000000..293f943
+--- /dev/null
++++ b/build/pkgs/networkx/distros/arch.txt
+@@ -0,0 +1 @@
++python-networkx
+diff --git a/build/pkgs/numpy/distros/arch.txt b/build/pkgs/numpy/distros/arch.txt
+new file mode 100644
+index 00000000..c8722b9
+--- /dev/null
++++ b/build/pkgs/numpy/distros/arch.txt
+@@ -0,0 +1 @@
++python-numpy
+diff --git a/build/pkgs/packaging/distros/arch.txt b/build/pkgs/packaging/distros/arch.txt
+new file mode 100644
+index 00000000..02ad855
+--- /dev/null
++++ b/build/pkgs/packaging/distros/arch.txt
+@@ -0,0 +1 @@
++python-packaging
+diff --git a/build/pkgs/pandocfilters/distros/arch.txt b/build/pkgs/pandocfilters/distros/arch.txt
+new file mode 100644
+index 00000000..e7a86d0
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/arch.txt
+@@ -0,0 +1 @@
++python-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/arch.txt b/build/pkgs/pickleshare/distros/arch.txt
+new file mode 100644
+index 00000000..6d991a2
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/arch.txt
+@@ -0,0 +1 @@
++python-pickleshare
+diff --git a/build/pkgs/pillow/distros/arch.txt b/build/pkgs/pillow/distros/arch.txt
+new file mode 100644
+index 00000000..86dbb1d
+--- /dev/null
++++ b/build/pkgs/pillow/distros/arch.txt
+@@ -0,0 +1 @@
++python-pillow
+diff --git a/build/pkgs/pluggy/distros/arch.txt b/build/pkgs/pluggy/distros/arch.txt
+new file mode 100644
+index 00000000..c869e54
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/arch.txt
+@@ -0,0 +1 @@
++python-pluggy
+diff --git a/build/pkgs/py/distros/arch.txt b/build/pkgs/py/distros/arch.txt
+new file mode 100644
+index 00000000..b348d39
+--- /dev/null
++++ b/build/pkgs/py/distros/arch.txt
+@@ -0,0 +1 @@
++python-py
+diff --git a/build/pkgs/pygments/distros/arch.txt b/build/pkgs/pygments/distros/arch.txt
+new file mode 100644
+index 00000000..f3e72a8
+--- /dev/null
++++ b/build/pkgs/pygments/distros/arch.txt
+@@ -0,0 +1 @@
++python-pygments
+diff --git a/build/pkgs/pytz/distros/arch.txt b/build/pkgs/pytz/distros/arch.txt
+new file mode 100644
+index 00000000..2cccc9e
+--- /dev/null
++++ b/build/pkgs/pytz/distros/arch.txt
+@@ -0,0 +1 @@
++python-pytz
+diff --git a/build/pkgs/pyzmq/distros/arch.txt b/build/pkgs/pyzmq/distros/arch.txt
+new file mode 100644
+index 00000000..23f64d1
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/arch.txt
+@@ -0,0 +1 @@
++python-pyzmq
+diff --git a/build/pkgs/requests/distros/arch.txt b/build/pkgs/requests/distros/arch.txt
+new file mode 100644
+index 00000000..93a7bc1
+--- /dev/null
++++ b/build/pkgs/requests/distros/arch.txt
+@@ -0,0 +1 @@
++python-requests
+diff --git a/build/pkgs/scipy/distros/arch.txt b/build/pkgs/scipy/distros/arch.txt
+new file mode 100644
+index 00000000..7ff2882
+--- /dev/null
++++ b/build/pkgs/scipy/distros/arch.txt
+@@ -0,0 +1 @@
++python-scipy
+diff --git a/build/pkgs/setuptools/distros/arch.txt b/build/pkgs/setuptools/distros/arch.txt
+new file mode 100644
+index 00000000..e1ad178
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/arch.txt
+@@ -0,0 +1 @@
++python-setuptools
+diff --git a/build/pkgs/six/distros/arch.txt b/build/pkgs/six/distros/arch.txt
+new file mode 100644
+index 00000000..787c530
+--- /dev/null
++++ b/build/pkgs/six/distros/arch.txt
+@@ -0,0 +1 @@
++python-six
+diff --git a/build/pkgs/sympy/distros/arch.txt b/build/pkgs/sympy/distros/arch.txt
+new file mode 100644
+index 00000000..126c88a
+--- /dev/null
++++ b/build/pkgs/sympy/distros/arch.txt
+@@ -0,0 +1 @@
++python-sympy
+diff --git a/build/pkgs/texttable/distros/arch.txt b/build/pkgs/texttable/distros/arch.txt
+new file mode 100644
+index 00000000..8d1ccec
+--- /dev/null
++++ b/build/pkgs/texttable/distros/arch.txt
+@@ -0,0 +1 @@
++python-texttable
+diff --git a/build/pkgs/toml/distros/arch.txt b/build/pkgs/toml/distros/arch.txt
+new file mode 100644
+index 00000000..821ee77
+--- /dev/null
++++ b/build/pkgs/toml/distros/arch.txt
+@@ -0,0 +1 @@
++python-toml
+diff --git a/build/pkgs/webencodings/distros/arch.txt b/build/pkgs/webencodings/distros/arch.txt
+new file mode 100644
+index 00000000..12ddba9
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/arch.txt
+@@ -0,0 +1 @@
++python-webencodings
+diff --git a/build/pkgs/wheel/distros/arch.txt b/build/pkgs/wheel/distros/arch.txt
+new file mode 100644
+index 00000000..ae4cbb9
+--- /dev/null
++++ b/build/pkgs/wheel/distros/arch.txt
+@@ -0,0 +1 @@
++python-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5087abee08f2a89ddaf422ec72a84575fe724a79 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 21:20:56 -0700
+Subject: build/pkgs: Add distros/opensuse.txt for Python packages
+
+---
+ build/pkgs/bleach/distros/opensuse.txt        | 1 +
+ build/pkgs/cvxopt/distros/opensuse.txt        | 1 +
+ build/pkgs/html5lib/distros/opensuse.txt      | 1 +
+ build/pkgs/idna/distros/opensuse.txt          | 1 +
+ build/pkgs/jinja2/distros/opensuse.txt        | 2 +-
+ build/pkgs/mpmath/distros/opensuse.txt        | 1 +
+ build/pkgs/numpy/distros/opensuse.txt         | 1 +
+ build/pkgs/packaging/distros/opensuse.txt     | 1 +
+ build/pkgs/pandocfilters/distros/opensuse.txt | 1 +
+ build/pkgs/pluggy/distros/opensuse.txt        | 1 +
+ build/pkgs/py/distros/opensuse.txt            | 1 +
+ build/pkgs/pygments/distros/opensuse.txt      | 2 +-
+ build/pkgs/sympy/distros/opensuse.txt         | 1 +
+ build/pkgs/texttable/distros/opensuse.txt     | 1 +
+ build/pkgs/toml/distros/opensuse.txt          | 1 +
+ 15 files changed, 15 insertions(+), 2 deletions(-)
+ create mode 100644 build/pkgs/bleach/distros/opensuse.txt
+ create mode 100644 build/pkgs/cvxopt/distros/opensuse.txt
+ create mode 100644 build/pkgs/html5lib/distros/opensuse.txt
+ create mode 100644 build/pkgs/idna/distros/opensuse.txt
+ create mode 100644 build/pkgs/mpmath/distros/opensuse.txt
+ create mode 100644 build/pkgs/numpy/distros/opensuse.txt
+ create mode 100644 build/pkgs/packaging/distros/opensuse.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/opensuse.txt
+ create mode 100644 build/pkgs/pluggy/distros/opensuse.txt
+ create mode 100644 build/pkgs/py/distros/opensuse.txt
+ create mode 100644 build/pkgs/sympy/distros/opensuse.txt
+ create mode 100644 build/pkgs/texttable/distros/opensuse.txt
+ create mode 100644 build/pkgs/toml/distros/opensuse.txt
+
+diff --git a/build/pkgs/bleach/distros/opensuse.txt b/build/pkgs/bleach/distros/opensuse.txt
+new file mode 100644
+index 00000000..6d37c4c
+--- /dev/null
++++ b/build/pkgs/bleach/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-bleach
+diff --git a/build/pkgs/cvxopt/distros/opensuse.txt b/build/pkgs/cvxopt/distros/opensuse.txt
+new file mode 100644
+index 00000000..2bb6ad1
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-cvxopt
+diff --git a/build/pkgs/html5lib/distros/opensuse.txt b/build/pkgs/html5lib/distros/opensuse.txt
+new file mode 100644
+index 00000000..6d7b8df
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-html5lib
+diff --git a/build/pkgs/idna/distros/opensuse.txt b/build/pkgs/idna/distros/opensuse.txt
+new file mode 100644
+index 00000000..de48e70
+--- /dev/null
++++ b/build/pkgs/idna/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-idna
+diff --git a/build/pkgs/jinja2/distros/opensuse.txt b/build/pkgs/jinja2/distros/opensuse.txt
+index 5d90a22..f2db865 100644
+--- a/build/pkgs/jinja2/distros/opensuse.txt
++++ b/build/pkgs/jinja2/distros/opensuse.txt
+@@ -1 +1 @@
+-python3-Jinja2
++python3-jinja2
+diff --git a/build/pkgs/mpmath/distros/opensuse.txt b/build/pkgs/mpmath/distros/opensuse.txt
+new file mode 100644
+index 00000000..fbc82a9
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-mpmath
+diff --git a/build/pkgs/numpy/distros/opensuse.txt b/build/pkgs/numpy/distros/opensuse.txt
+new file mode 100644
+index 00000000..79d5c5a
+--- /dev/null
++++ b/build/pkgs/numpy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-numpy
+diff --git a/build/pkgs/packaging/distros/opensuse.txt b/build/pkgs/packaging/distros/opensuse.txt
+new file mode 100644
+index 00000000..8f1c0ff
+--- /dev/null
++++ b/build/pkgs/packaging/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-packaging
+diff --git a/build/pkgs/pandocfilters/distros/opensuse.txt b/build/pkgs/pandocfilters/distros/opensuse.txt
+new file mode 100644
+index 00000000..d0d4c24
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-pandocfilters
+diff --git a/build/pkgs/pluggy/distros/opensuse.txt b/build/pkgs/pluggy/distros/opensuse.txt
+new file mode 100644
+index 00000000..43a3acf
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-pluggy
+diff --git a/build/pkgs/py/distros/opensuse.txt b/build/pkgs/py/distros/opensuse.txt
+new file mode 100644
+index 00000000..81fefe6
+--- /dev/null
++++ b/build/pkgs/py/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-py
+diff --git a/build/pkgs/pygments/distros/opensuse.txt b/build/pkgs/pygments/distros/opensuse.txt
+index 9ff5740..3ab3792 100644
+--- a/build/pkgs/pygments/distros/opensuse.txt
++++ b/build/pkgs/pygments/distros/opensuse.txt
+@@ -1 +1 @@
+-python3-Pygments
++python3-pygments
+diff --git a/build/pkgs/sympy/distros/opensuse.txt b/build/pkgs/sympy/distros/opensuse.txt
+new file mode 100644
+index 00000000..db423c8
+--- /dev/null
++++ b/build/pkgs/sympy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-sympy
+diff --git a/build/pkgs/texttable/distros/opensuse.txt b/build/pkgs/texttable/distros/opensuse.txt
+new file mode 100644
+index 00000000..8f8e7e2
+--- /dev/null
++++ b/build/pkgs/texttable/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-texttable
+diff --git a/build/pkgs/toml/distros/opensuse.txt b/build/pkgs/toml/distros/opensuse.txt
+new file mode 100644
+index 00000000..543e89d
+--- /dev/null
++++ b/build/pkgs/toml/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-toml
+-- 
+cgit v1.0-1-gd88e
+
+
+From a480ba7ace1370d106ae831e904ea22b72af1be7 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 22:45:04 -0700
+Subject: build/pkgs: Add distros/debian.txt for Python packages
+
+---
+ build/pkgs/babel/distros/debian.txt         | 1 +
+ build/pkgs/bleach/distros/debian.txt        | 1 +
+ build/pkgs/certifi/distros/debian.txt       | 1 +
+ build/pkgs/cvxopt/distros/debian.txt        | 1 +
+ build/pkgs/decorator/distros/debian.txt     | 1 +
+ build/pkgs/html5lib/distros/debian.txt      | 1 +
+ build/pkgs/idna/distros/debian.txt          | 1 +
+ build/pkgs/jinja2/distros/debian.txt        | 1 +
+ build/pkgs/matplotlib/distros/debian.txt    | 1 +
+ build/pkgs/mpmath/distros/debian.txt        | 1 +
+ build/pkgs/networkx/distros/debian.txt      | 1 +
+ build/pkgs/numpy/distros/debian.txt         | 1 +
+ build/pkgs/packaging/distros/debian.txt     | 1 +
+ build/pkgs/pandocfilters/distros/debian.txt | 1 +
+ build/pkgs/pickleshare/distros/debian.txt   | 1 +
+ build/pkgs/pillow/distros/debian.txt        | 1 +
+ build/pkgs/pluggy/distros/debian.txt        | 1 +
+ build/pkgs/py/distros/debian.txt            | 1 +
+ build/pkgs/pygments/distros/debian.txt      | 1 +
+ build/pkgs/pytz/distros/debian.txt          | 1 +
+ build/pkgs/requests/distros/debian.txt      | 1 +
+ build/pkgs/scipy/distros/debian.txt         | 1 +
+ build/pkgs/setuptools/distros/debian.txt    | 1 +
+ build/pkgs/six/distros/debian.txt           | 1 +
+ build/pkgs/sympy/distros/debian.txt         | 1 +
+ build/pkgs/texttable/distros/debian.txt     | 1 +
+ build/pkgs/toml/distros/debian.txt          | 1 +
+ build/pkgs/webencodings/distros/debian.txt  | 1 +
+ build/pkgs/wheel/distros/debian.txt         | 1 +
+ 29 files changed, 29 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/debian.txt
+ create mode 100644 build/pkgs/bleach/distros/debian.txt
+ create mode 100644 build/pkgs/certifi/distros/debian.txt
+ create mode 100644 build/pkgs/cvxopt/distros/debian.txt
+ create mode 100644 build/pkgs/decorator/distros/debian.txt
+ create mode 100644 build/pkgs/html5lib/distros/debian.txt
+ create mode 100644 build/pkgs/idna/distros/debian.txt
+ create mode 100644 build/pkgs/jinja2/distros/debian.txt
+ create mode 100644 build/pkgs/matplotlib/distros/debian.txt
+ create mode 100644 build/pkgs/mpmath/distros/debian.txt
+ create mode 100644 build/pkgs/networkx/distros/debian.txt
+ create mode 100644 build/pkgs/numpy/distros/debian.txt
+ create mode 100644 build/pkgs/packaging/distros/debian.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/debian.txt
+ create mode 100644 build/pkgs/pickleshare/distros/debian.txt
+ create mode 100644 build/pkgs/pillow/distros/debian.txt
+ create mode 100644 build/pkgs/pluggy/distros/debian.txt
+ create mode 100644 build/pkgs/py/distros/debian.txt
+ create mode 100644 build/pkgs/pygments/distros/debian.txt
+ create mode 100644 build/pkgs/pytz/distros/debian.txt
+ create mode 100644 build/pkgs/requests/distros/debian.txt
+ create mode 100644 build/pkgs/scipy/distros/debian.txt
+ create mode 100644 build/pkgs/setuptools/distros/debian.txt
+ create mode 100644 build/pkgs/six/distros/debian.txt
+ create mode 100644 build/pkgs/sympy/distros/debian.txt
+ create mode 100644 build/pkgs/texttable/distros/debian.txt
+ create mode 100644 build/pkgs/toml/distros/debian.txt
+ create mode 100644 build/pkgs/webencodings/distros/debian.txt
+ create mode 100644 build/pkgs/wheel/distros/debian.txt
+
+diff --git a/build/pkgs/babel/distros/debian.txt b/build/pkgs/babel/distros/debian.txt
+new file mode 100644
+index 00000000..e623eb6
+--- /dev/null
++++ b/build/pkgs/babel/distros/debian.txt
+@@ -0,0 +1 @@
++python3-babel
+diff --git a/build/pkgs/bleach/distros/debian.txt b/build/pkgs/bleach/distros/debian.txt
+new file mode 100644
+index 00000000..6d37c4c
+--- /dev/null
++++ b/build/pkgs/bleach/distros/debian.txt
+@@ -0,0 +1 @@
++python3-bleach
+diff --git a/build/pkgs/certifi/distros/debian.txt b/build/pkgs/certifi/distros/debian.txt
+new file mode 100644
+index 00000000..f585a82
+--- /dev/null
++++ b/build/pkgs/certifi/distros/debian.txt
+@@ -0,0 +1 @@
++python3-certifi
+diff --git a/build/pkgs/cvxopt/distros/debian.txt b/build/pkgs/cvxopt/distros/debian.txt
+new file mode 100644
+index 00000000..2bb6ad1
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/debian.txt
+@@ -0,0 +1 @@
++python3-cvxopt
+diff --git a/build/pkgs/decorator/distros/debian.txt b/build/pkgs/decorator/distros/debian.txt
+new file mode 100644
+index 00000000..46c478e
+--- /dev/null
++++ b/build/pkgs/decorator/distros/debian.txt
+@@ -0,0 +1 @@
++python3-decorator
+diff --git a/build/pkgs/html5lib/distros/debian.txt b/build/pkgs/html5lib/distros/debian.txt
+new file mode 100644
+index 00000000..6d7b8df
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/debian.txt
+@@ -0,0 +1 @@
++python3-html5lib
+diff --git a/build/pkgs/idna/distros/debian.txt b/build/pkgs/idna/distros/debian.txt
+new file mode 100644
+index 00000000..de48e70
+--- /dev/null
++++ b/build/pkgs/idna/distros/debian.txt
+@@ -0,0 +1 @@
++python3-idna
+diff --git a/build/pkgs/jinja2/distros/debian.txt b/build/pkgs/jinja2/distros/debian.txt
+new file mode 100644
+index 00000000..f2db865
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/debian.txt
+@@ -0,0 +1 @@
++python3-jinja2
+diff --git a/build/pkgs/matplotlib/distros/debian.txt b/build/pkgs/matplotlib/distros/debian.txt
+new file mode 100644
+index 00000000..1374329
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/debian.txt
+@@ -0,0 +1 @@
++python3-matplotlib
+diff --git a/build/pkgs/mpmath/distros/debian.txt b/build/pkgs/mpmath/distros/debian.txt
+new file mode 100644
+index 00000000..fbc82a9
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/debian.txt
+@@ -0,0 +1 @@
++python3-mpmath
+diff --git a/build/pkgs/networkx/distros/debian.txt b/build/pkgs/networkx/distros/debian.txt
+new file mode 100644
+index 00000000..6779066
+--- /dev/null
++++ b/build/pkgs/networkx/distros/debian.txt
+@@ -0,0 +1 @@
++python3-networkx
+diff --git a/build/pkgs/numpy/distros/debian.txt b/build/pkgs/numpy/distros/debian.txt
+new file mode 100644
+index 00000000..79d5c5a
+--- /dev/null
++++ b/build/pkgs/numpy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-numpy
+diff --git a/build/pkgs/packaging/distros/debian.txt b/build/pkgs/packaging/distros/debian.txt
+new file mode 100644
+index 00000000..8f1c0ff
+--- /dev/null
++++ b/build/pkgs/packaging/distros/debian.txt
+@@ -0,0 +1 @@
++python3-packaging
+diff --git a/build/pkgs/pandocfilters/distros/debian.txt b/build/pkgs/pandocfilters/distros/debian.txt
+new file mode 100644
+index 00000000..d0d4c24
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/debian.txt b/build/pkgs/pickleshare/distros/debian.txt
+new file mode 100644
+index 00000000..a00907d
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pickleshare
+diff --git a/build/pkgs/pillow/distros/debian.txt b/build/pkgs/pillow/distros/debian.txt
+new file mode 100644
+index 00000000..3319fcd
+--- /dev/null
++++ b/build/pkgs/pillow/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pillow
+diff --git a/build/pkgs/pluggy/distros/debian.txt b/build/pkgs/pluggy/distros/debian.txt
+new file mode 100644
+index 00000000..43a3acf
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pluggy
+diff --git a/build/pkgs/py/distros/debian.txt b/build/pkgs/py/distros/debian.txt
+new file mode 100644
+index 00000000..81fefe6
+--- /dev/null
++++ b/build/pkgs/py/distros/debian.txt
+@@ -0,0 +1 @@
++python3-py
+diff --git a/build/pkgs/pygments/distros/debian.txt b/build/pkgs/pygments/distros/debian.txt
+new file mode 100644
+index 00000000..3ab3792
+--- /dev/null
++++ b/build/pkgs/pygments/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pygments
+diff --git a/build/pkgs/pytz/distros/debian.txt b/build/pkgs/pytz/distros/debian.txt
+new file mode 100644
+index 00000000..db20908
+--- /dev/null
++++ b/build/pkgs/pytz/distros/debian.txt
+@@ -0,0 +1 @@
++python3-tz
+diff --git a/build/pkgs/requests/distros/debian.txt b/build/pkgs/requests/distros/debian.txt
+new file mode 100644
+index 00000000..43147b2
+--- /dev/null
++++ b/build/pkgs/requests/distros/debian.txt
+@@ -0,0 +1 @@
++python3-requests
+diff --git a/build/pkgs/scipy/distros/debian.txt b/build/pkgs/scipy/distros/debian.txt
+new file mode 100644
+index 00000000..12b3666
+--- /dev/null
++++ b/build/pkgs/scipy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-scipy
+diff --git a/build/pkgs/setuptools/distros/debian.txt b/build/pkgs/setuptools/distros/debian.txt
+new file mode 100644
+index 00000000..1c0901c
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/debian.txt
+@@ -0,0 +1 @@
++python3-setuptools
+diff --git a/build/pkgs/six/distros/debian.txt b/build/pkgs/six/distros/debian.txt
+new file mode 100644
+index 00000000..68ff859
+--- /dev/null
++++ b/build/pkgs/six/distros/debian.txt
+@@ -0,0 +1 @@
++python3-six
+diff --git a/build/pkgs/sympy/distros/debian.txt b/build/pkgs/sympy/distros/debian.txt
+new file mode 100644
+index 00000000..db423c8
+--- /dev/null
++++ b/build/pkgs/sympy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-sympy
+diff --git a/build/pkgs/texttable/distros/debian.txt b/build/pkgs/texttable/distros/debian.txt
+new file mode 100644
+index 00000000..8f8e7e2
+--- /dev/null
++++ b/build/pkgs/texttable/distros/debian.txt
+@@ -0,0 +1 @@
++python3-texttable
+diff --git a/build/pkgs/toml/distros/debian.txt b/build/pkgs/toml/distros/debian.txt
+new file mode 100644
+index 00000000..543e89d
+--- /dev/null
++++ b/build/pkgs/toml/distros/debian.txt
+@@ -0,0 +1 @@
++python3-toml
+diff --git a/build/pkgs/webencodings/distros/debian.txt b/build/pkgs/webencodings/distros/debian.txt
+new file mode 100644
+index 00000000..ac30c2f
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/debian.txt
+@@ -0,0 +1 @@
++python3-webencodings
+diff --git a/build/pkgs/wheel/distros/debian.txt b/build/pkgs/wheel/distros/debian.txt
+new file mode 100644
+index 00000000..3c066725
+--- /dev/null
++++ b/build/pkgs/wheel/distros/debian.txt
+@@ -0,0 +1 @@
++python3-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 93bf30d7de292551c3050e2dd74651d69ba4bd46 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 18 Oct 2021 07:50:34 -0400
+Subject: Trac #29665: add more documentation for SAGE_PYTHON_PACKAGE_CHECK().
+
+An earlier commit allows SAGE_PYTHON_PACKAGE_CHECK(package) to tweak the
+value of sage_use_system_$package if --enable-system-site-packages was
+not used. This essentially changes the default --with-system-$package=yes
+to "no" in that case. Here we update the documentation to reflect it.
+---
+ m4/sage_python_package_check.m4 | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 7ee82a7..95eefd0 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -34,6 +34,10 @@
+ #   ensure that the ./configure- and run-time views of the system
+ #   are as similar as possible.
+ #
++#   To avoid suggesting these system packages to users who have not
++#   set --enable-system-site-packages, this macro also changes the
++#   default for --with-system-foo from "yes" to "no" in that case.
++#
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
+-- 
+cgit v1.0-1-gd88e
+
+
+From d771e49d57ecdf3622434bc09cbfb87ad3bb7744 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 18 Oct 2021 07:42:46 -0400
+Subject: Trac #29665: improve SAGE_PYTHON_PACKAGE_CHECK() failure message.
+
+When --enable-system-site-packages is off, SAGE_PYTHON_PACKAGE_CHECK()
+will always install the corresponding SPKG. We improve the ./configure
+output in that case to make it clear that the decision was based on
+the value of --enable-system-site-packages and not the "real" check.
+---
+ m4/sage_python_package_check.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 95eefd0..5f0f084 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -40,7 +40,9 @@
+ #
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
++  AC_MSG_CHECKING([if --enable-system-site-packages was used])
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
++    AC_MSG_RESULT(yes)
+     AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
+ 
+     dnl We run this check inside a python venv, because that's ultimately
+@@ -94,6 +96,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
+     dnl System site packages are disabled.
++    AC_MSG_RESULT(no; skipping check)
+     sage_spkg_install_$1=yes
+ 
+     dnl We have to retroactively hack the --with-system-foo={no,yes,force}
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5bb43c1b78a1deb3364f235305937c2f823e5e18 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 24 Oct 2021 20:29:25 -0400
+Subject: Trac #29665: use sage-venv in SAGE_PYTHON_PACKAGE_CHECK().
+
+For consistency with the rest of the build system, we now use the
+build/bin/sage-venv script to create the venv in this autoconf macro
+rather than invoking $PYTHON_FOR_VENV with "-m venv" directly.
+---
+ m4/sage_python_package_check.m4 | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 5f0f084..5547b35 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -50,11 +50,11 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AC_MSG_CHECKING([if we can create a python venv in config.venv])
+ 
+     dnl Use --clear because ./configure typically clobbers its output files.
+-    AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
+-                                        --clear                dnl
+-                                        --without-pip          dnl
+-                                        config.venv            dnl
+-                                        2>&AS_MESSAGE_LOG_FD], [
++    AS_IF(["${PYTHON_FOR_VENV}" build/bin/sage-venv      dnl
++                                  --system-site-packages dnl
++                                  --clear                dnl
++                                  config.venv            dnl
++                                  2>&AS_MESSAGE_LOG_FD], [
+       AC_MSG_RESULT(yes)
+       dnl strip all comments from install-requires.txt; this should leave
+       dnl only a single line containing the version specification for this
+-- 
+cgit v1.0-1-gd88e
+
+
+From c78363d6326addff16ca5abac897949a6be72bf4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:10:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for urllib3.
+
+---
+ build/pkgs/urllib3/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/urllib3/spkg-configure.m4
+
+diff --git a/build/pkgs/urllib3/spkg-configure.m4 b/build/pkgs/urllib3/spkg-configure.m4
+new file mode 100644
+index 00000000..d7ef3e1
+--- /dev/null
++++ b/build/pkgs/urllib3/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([urllib3], [SAGE_PYTHON_PACKAGE_CHECK([urllib3])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f416d5abcae495ea8301fad024b279ea9e997b29 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:15:18 -0400
+Subject: Trac #29665: add Gentoo package information for urllib3.
+
+---
+ build/pkgs/urllib3/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/urllib3/distros/gentoo.txt
+
+diff --git a/build/pkgs/urllib3/distros/gentoo.txt b/build/pkgs/urllib3/distros/gentoo.txt
+new file mode 100644
+index 00000000..172a535
+--- /dev/null
++++ b/build/pkgs/urllib3/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/urllib3
+-- 
+cgit v1.0-1-gd88e
+
+
+From 852068b992bf7959500c650f54cb92e5b68d7ef8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:15:58 -0400
+Subject: Trac #29665: add Gentoo package information for nbformat.
+
+---
+ build/pkgs/nbformat/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbformat/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbformat/distros/gentoo.txt b/build/pkgs/nbformat/distros/gentoo.txt
+new file mode 100644
+index 00000000..006b1f2
+--- /dev/null
++++ b/build/pkgs/nbformat/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbformat
+-- 
+cgit v1.0-1-gd88e
+
+
+From 66179fd28fcc92ee840dcd87bb4db25cea968d66 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:34:16 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for nbformat.
+
+---
+ build/pkgs/nbformat/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbformat/spkg-configure.m4
+
+diff --git a/build/pkgs/nbformat/spkg-configure.m4 b/build/pkgs/nbformat/spkg-configure.m4
+new file mode 100644
+index 00000000..5a7f8c4
+--- /dev/null
++++ b/build/pkgs/nbformat/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbformat], [SAGE_PYTHON_PACKAGE_CHECK([nbformat])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 874005e81ed20f27a5f895030dcdbdfc5f73ad80 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:47:01 -0400
+Subject: Trac #29665: add Gentoo package information for zipp.
+
+---
+ build/pkgs/zipp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/zipp/distros/gentoo.txt
+
+diff --git a/build/pkgs/zipp/distros/gentoo.txt b/build/pkgs/zipp/distros/gentoo.txt
+new file mode 100644
+index 00000000..7f59450
+--- /dev/null
++++ b/build/pkgs/zipp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/zipp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0cc2a7355b5554c1fb79c742ebf02eff54465b3e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:47:35 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for zipp.
+
+---
+ build/pkgs/zipp/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/zipp/spkg-configure.m4
+
+diff --git a/build/pkgs/zipp/spkg-configure.m4 b/build/pkgs/zipp/spkg-configure.m4
+new file mode 100644
+index 00000000..0fe3a9c
+--- /dev/null
++++ b/build/pkgs/zipp/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([zipp], [SAGE_PYTHON_PACKAGE_CHECK([zipp])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6073ad8e56c21fc862749bbd84a56d543fb9458c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:48:37 -0400
+Subject: Trac #29665: add Gentoo package information for wcwidth.
+
+---
+ build/pkgs/wcwidth/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wcwidth/distros/gentoo.txt
+
+diff --git a/build/pkgs/wcwidth/distros/gentoo.txt b/build/pkgs/wcwidth/distros/gentoo.txt
+new file mode 100644
+index 00000000..edeb80b
+--- /dev/null
++++ b/build/pkgs/wcwidth/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/wcwidth
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9793d6172c64d61a015fbe61bd45863759124fad Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:51:10 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for wcwidth.
+
+---
+ build/pkgs/wcwidth/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wcwidth/spkg-configure.m4
+
+diff --git a/build/pkgs/wcwidth/spkg-configure.m4 b/build/pkgs/wcwidth/spkg-configure.m4
+new file mode 100644
+index 00000000..5bde15a
+--- /dev/null
++++ b/build/pkgs/wcwidth/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([wcwidth], [SAGE_PYTHON_PACKAGE_CHECK([wcwidth])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20232f370a43c146ca4e696c72a2cbcc498db060 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:52:36 -0400
+Subject: Trac #29665: add Gentoo package information for testpath.
+
+---
+ build/pkgs/testpath/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/testpath/distros/gentoo.txt
+
+diff --git a/build/pkgs/testpath/distros/gentoo.txt b/build/pkgs/testpath/distros/gentoo.txt
+new file mode 100644
+index 00000000..efa10a0
+--- /dev/null
++++ b/build/pkgs/testpath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/testpath
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1b0785b2aad8844e74345fe950baf097e2b43d24 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:55:22 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for testpath.
+
+---
+ build/pkgs/testpath/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/testpath/spkg-configure.m4
+
+diff --git a/build/pkgs/testpath/spkg-configure.m4 b/build/pkgs/testpath/spkg-configure.m4
+new file mode 100644
+index 00000000..d8fc2a7
+--- /dev/null
++++ b/build/pkgs/testpath/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([testpath], [SAGE_PYTHON_PACKAGE_CHECK([testpath])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 10fc3829ecd956d732b1b069fdfe81f0d6d5cdc2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:56:06 -0400
+Subject: Trac #29665: add Gentoo package information for jedi.
+
+---
+ build/pkgs/jedi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jedi/distros/gentoo.txt
+
+diff --git a/build/pkgs/jedi/distros/gentoo.txt b/build/pkgs/jedi/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c85a46
+--- /dev/null
++++ b/build/pkgs/jedi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jedi
+-- 
+cgit v1.0-1-gd88e
+
+
+From a75824d74c281c7639028ca01dabeed266f56998 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:06:37 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for jedi.
+
+---
+ build/pkgs/jedi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jedi/spkg-configure.m4
+
+diff --git a/build/pkgs/jedi/spkg-configure.m4 b/build/pkgs/jedi/spkg-configure.m4
+new file mode 100644
+index 00000000..a37dbcc
+--- /dev/null
++++ b/build/pkgs/jedi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jedi], [SAGE_PYTHON_PACKAGE_CHECK([jedi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 17af01373d43f6acbbdbc23e073e372d3fdadf8b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:07:47 -0400
+Subject: Trac #29665: add Gentoo package information for tomli.
+
+---
+ build/pkgs/tomli/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tomli/distros/gentoo.txt
+
+diff --git a/build/pkgs/tomli/distros/gentoo.txt b/build/pkgs/tomli/distros/gentoo.txt
+new file mode 100644
+index 00000000..0458e25
+--- /dev/null
++++ b/build/pkgs/tomli/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/tomli
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0d3b5994ae612be11992467c4a3f1a74b81400fe Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:08:12 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for tomli.
+
+---
+ build/pkgs/tomli/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tomli/spkg-configure.m4
+
+diff --git a/build/pkgs/tomli/spkg-configure.m4 b/build/pkgs/tomli/spkg-configure.m4
+new file mode 100644
+index 00000000..95a8b8b
+--- /dev/null
++++ b/build/pkgs/tomli/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tomli], [SAGE_PYTHON_PACKAGE_CHECK([tomli])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From dce1c515781b0eeb8eb9c2bc7aba581560c1fac1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:09:22 -0400
+Subject: Trac #29665: add Gentoo package information for defusedxml.
+
+---
+ build/pkgs/defusedxml/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/defusedxml/distros/gentoo.txt
+
+diff --git a/build/pkgs/defusedxml/distros/gentoo.txt b/build/pkgs/defusedxml/distros/gentoo.txt
+new file mode 100644
+index 00000000..2804214
+--- /dev/null
++++ b/build/pkgs/defusedxml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/defusedxml
+-- 
+cgit v1.0-1-gd88e
+
+
+From 02e1e1cd7f8bdae3ca5b7d35ce70af28a44e9b7c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:11:14 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for defusedxml.
+
+---
+ build/pkgs/defusedxml/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/defusedxml/spkg-configure.m4
+
+diff --git a/build/pkgs/defusedxml/spkg-configure.m4 b/build/pkgs/defusedxml/spkg-configure.m4
+new file mode 100644
+index 00000000..e02f345
+--- /dev/null
++++ b/build/pkgs/defusedxml/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([defusedxml], [SAGE_PYTHON_PACKAGE_CHECK([defusedxml])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e0ba4ebb5cfc637b5d26b85de9f34e0a160d2b9c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:12:22 -0400
+Subject: Trac #29665: add Gentoo package information for ipywidgets.
+
+---
+ build/pkgs/ipywidgets/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipywidgets/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipywidgets/distros/gentoo.txt b/build/pkgs/ipywidgets/distros/gentoo.txt
+new file mode 100644
+index 00000000..7c76967
+--- /dev/null
++++ b/build/pkgs/ipywidgets/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipywidgets
+-- 
+cgit v1.0-1-gd88e
+
+
+From 49df7e7d93c7a31b7c46d5d224a35fd313a29a32 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:15:53 -0400
+Subject: Trac #29665: add Gentoo package information for simplegeneric.
+
+---
+ build/pkgs/simplegeneric/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/simplegeneric/distros/gentoo.txt
+
+diff --git a/build/pkgs/simplegeneric/distros/gentoo.txt b/build/pkgs/simplegeneric/distros/gentoo.txt
+new file mode 100644
+index 00000000..a86e90d
+--- /dev/null
++++ b/build/pkgs/simplegeneric/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/simplegeneric
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2a893635d5804749e6fec7ed7289c921ecb5300a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:16:33 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for simplegeneric.
+
+---
+ build/pkgs/simplegeneric/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/simplegeneric/spkg-configure.m4
+
+diff --git a/build/pkgs/simplegeneric/spkg-configure.m4 b/build/pkgs/simplegeneric/spkg-configure.m4
+new file mode 100644
+index 00000000..13715ab
+--- /dev/null
++++ b/build/pkgs/simplegeneric/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([simplegeneric], [SAGE_PYTHON_PACKAGE_CHECK([simplegeneric])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a8fe7ecd6e3163e7d01261e5497ac452a8cc95ab Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:17:18 -0400
+Subject: Trac #29665: add Gentoo package information for imagesize.
+
+---
+ build/pkgs/imagesize/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/imagesize/distros/gentoo.txt
+
+diff --git a/build/pkgs/imagesize/distros/gentoo.txt b/build/pkgs/imagesize/distros/gentoo.txt
+new file mode 100644
+index 00000000..54350ba
+--- /dev/null
++++ b/build/pkgs/imagesize/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/imagesize
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2ad837c5dd1fca0f50ce6d5042a9344210a54f84 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:17:48 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for imagesize.
+
+---
+ build/pkgs/imagesize/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/imagesize/spkg-configure.m4
+
+diff --git a/build/pkgs/imagesize/spkg-configure.m4 b/build/pkgs/imagesize/spkg-configure.m4
+new file mode 100644
+index 00000000..20210ef
+--- /dev/null
++++ b/build/pkgs/imagesize/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([imagesize], [SAGE_PYTHON_PACKAGE_CHECK([imagesize])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bf47415b5bfca2d7bf24e20de35662bf331623b9 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:18:49 -0400
+Subject: Trac #29665: add Gentoo package information for mistune.
+
+---
+ build/pkgs/mistune/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mistune/distros/gentoo.txt
+
+diff --git a/build/pkgs/mistune/distros/gentoo.txt b/build/pkgs/mistune/distros/gentoo.txt
+new file mode 100644
+index 00000000..56f0a4e
+--- /dev/null
++++ b/build/pkgs/mistune/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/mistune
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6898a74fd0c65a40c5220ba68b4062ac6fe060c6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:21:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for mistune.
+
+---
+ build/pkgs/mistune/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mistune/spkg-configure.m4
+
+diff --git a/build/pkgs/mistune/spkg-configure.m4 b/build/pkgs/mistune/spkg-configure.m4
+new file mode 100644
+index 00000000..972f33d
+--- /dev/null
++++ b/build/pkgs/mistune/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([mistune], [SAGE_PYTHON_PACKAGE_CHECK([mistune])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 62735e4ccf2031cd39eb5e04b03bdfd97005d808 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:22:48 -0400
+Subject: Trac #29665: add Gentoo package information for backcall.
+
+---
+ build/pkgs/backcall/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/backcall/distros/gentoo.txt
+
+diff --git a/build/pkgs/backcall/distros/gentoo.txt b/build/pkgs/backcall/distros/gentoo.txt
+new file mode 100644
+index 00000000..266a222
+--- /dev/null
++++ b/build/pkgs/backcall/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/backcall
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9ef3ea42d4a33c7cdb623fa5417ae300cf323183 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:25:10 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for backcall.
+
+---
+ build/pkgs/backcall/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/backcall/spkg-configure.m4
+
+diff --git a/build/pkgs/backcall/spkg-configure.m4 b/build/pkgs/backcall/spkg-configure.m4
+new file mode 100644
+index 00000000..d6b11c4
+--- /dev/null
++++ b/build/pkgs/backcall/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([backcall], [SAGE_PYTHON_PACKAGE_CHECK([backcall])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1b3ea2a3c40fea0fb58435f5e5304368ea58dff8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:25:58 -0400
+Subject: Trac #29665: add Gentoo package information for parso.
+
+---
+ build/pkgs/parso/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/parso/distros/gentoo.txt
+
+diff --git a/build/pkgs/parso/distros/gentoo.txt b/build/pkgs/parso/distros/gentoo.txt
+new file mode 100644
+index 00000000..f9ce4c7
+--- /dev/null
++++ b/build/pkgs/parso/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/parso
+-- 
+cgit v1.0-1-gd88e
+
+
+From 963a3a2c563ec71a1f5be2395722d0e824cb0b11 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:26:22 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for parso.
+
+---
+ build/pkgs/parso/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/parso/spkg-configure.m4
+
+diff --git a/build/pkgs/parso/spkg-configure.m4 b/build/pkgs/parso/spkg-configure.m4
+new file mode 100644
+index 00000000..1ca6f1b
+--- /dev/null
++++ b/build/pkgs/parso/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([parso], [SAGE_PYTHON_PACKAGE_CHECK([parso])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 943053dfc474b6549bcc7d6ef2971ea43588b35c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:27:00 -0400
+Subject: Trac #29665: add Gentoo package information for pyparsing.
+
+---
+ build/pkgs/pyparsing/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyparsing/distros/gentoo.txt
+
+diff --git a/build/pkgs/pyparsing/distros/gentoo.txt b/build/pkgs/pyparsing/distros/gentoo.txt
+new file mode 100644
+index 00000000..ef0419f
+--- /dev/null
++++ b/build/pkgs/pyparsing/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyparsing
+-- 
+cgit v1.0-1-gd88e
+
+
+From bd682eaa2ac41dd84e7a52e2b0c5442fc8fd8919 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:27:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pyparsing.
+
+---
+ build/pkgs/pyparsing/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyparsing/spkg-configure.m4
+
+diff --git a/build/pkgs/pyparsing/spkg-configure.m4 b/build/pkgs/pyparsing/spkg-configure.m4
+new file mode 100644
+index 00000000..d2b4c00
+--- /dev/null
++++ b/build/pkgs/pyparsing/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pyparsing], [SAGE_PYTHON_PACKAGE_CHECK([pyparsing])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 74f36a9c0ec7c63b7e6c40066e42f4b15c2f978e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:17:42 -0400
+Subject: Trac #29665: add Gentoo package information for debugpy.
+
+---
+ build/pkgs/debugpy/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/debugpy/distros/gentoo.txt
+
+diff --git a/build/pkgs/debugpy/distros/gentoo.txt b/build/pkgs/debugpy/distros/gentoo.txt
+new file mode 100644
+index 00000000..8b797ce
+--- /dev/null
++++ b/build/pkgs/debugpy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/debugpy
+-- 
+cgit v1.0-1-gd88e
+
+
+From be072fa87ac5c373d9dc9b54c0bd68734d5709bc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:21:17 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for debugpy.
+
+---
+ build/pkgs/debugpy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/debugpy/spkg-configure.m4
+
+diff --git a/build/pkgs/debugpy/spkg-configure.m4 b/build/pkgs/debugpy/spkg-configure.m4
+new file mode 100644
+index 00000000..db605ff
+--- /dev/null
++++ b/build/pkgs/debugpy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([debugpy], [SAGE_PYTHON_PACKAGE_CHECK([debugpy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6f777ce2f2e14b94e91c8b7bbac82f9017460aba Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:23:56 -0400
+Subject: Trac #29665: add Gentoo package information for tzlocal.
+
+---
+ build/pkgs/tzlocal/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tzlocal/distros/gentoo.txt
+
+diff --git a/build/pkgs/tzlocal/distros/gentoo.txt b/build/pkgs/tzlocal/distros/gentoo.txt
+new file mode 100644
+index 00000000..2018442
+--- /dev/null
++++ b/build/pkgs/tzlocal/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/tzlocal
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3bd078fc15ae13982249452711baafae91038191 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:24:51 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for tzlocal.
+
+---
+ build/pkgs/tzlocal/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tzlocal/spkg-configure.m4
+
+diff --git a/build/pkgs/tzlocal/spkg-configure.m4 b/build/pkgs/tzlocal/spkg-configure.m4
+new file mode 100644
+index 00000000..e020b28
+--- /dev/null
++++ b/build/pkgs/tzlocal/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tzlocal], [SAGE_PYTHON_PACKAGE_CHECK([tzlocal])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 91b0882fc62214923da9ee7b6dccb05d8a1d11d1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:26:13 -0400
+Subject: Trac #29665: add Gentoo package information for pycparser.
+
+---
+ build/pkgs/pycparser/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pycparser/distros/gentoo.txt
+
+diff --git a/build/pkgs/pycparser/distros/gentoo.txt b/build/pkgs/pycparser/distros/gentoo.txt
+new file mode 100644
+index 00000000..5e87307
+--- /dev/null
++++ b/build/pkgs/pycparser/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pycparser
+-- 
+cgit v1.0-1-gd88e
+
+
+From beabde92fe6e057faf516fe82d27f1e903e55ce6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:27:27 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pycparser.
+
+---
+ build/pkgs/pycparser/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pycparser/spkg-configure.m4
+
+diff --git a/build/pkgs/pycparser/spkg-configure.m4 b/build/pkgs/pycparser/spkg-configure.m4
+new file mode 100644
+index 00000000..4b9b900
+--- /dev/null
++++ b/build/pkgs/pycparser/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pycparser], [SAGE_PYTHON_PACKAGE_CHECK([pycparser])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 86c2788dc7fd1169314e9598c91fa81045553677 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:29:36 -0400
+Subject: Trac #29665: add Gentoo package information for cycler.
+
+---
+ build/pkgs/cycler/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cycler/distros/gentoo.txt
+
+diff --git a/build/pkgs/cycler/distros/gentoo.txt b/build/pkgs/cycler/distros/gentoo.txt
+new file mode 100644
+index 00000000..4b21543
+--- /dev/null
++++ b/build/pkgs/cycler/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/cycler
+-- 
+cgit v1.0-1-gd88e
+
+
+From 67c5a944101ddf329f0a61c61d4e784f58a5c5b0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:30:27 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for cycler.
+
+---
+ build/pkgs/cycler/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cycler/spkg-configure.m4
+
+diff --git a/build/pkgs/cycler/spkg-configure.m4 b/build/pkgs/cycler/spkg-configure.m4
+new file mode 100644
+index 00000000..239571a
+--- /dev/null
++++ b/build/pkgs/cycler/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([cycler], [SAGE_PYTHON_PACKAGE_CHECK([cycler])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ef6d490251abfa41f7a0910274700a8a6a65f629 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:31:19 -0400
+Subject: Trac #29665: add Gentoo package information for traitlets.
+
+---
+ build/pkgs/traitlets/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/traitlets/distros/gentoo.txt
+
+diff --git a/build/pkgs/traitlets/distros/gentoo.txt b/build/pkgs/traitlets/distros/gentoo.txt
+new file mode 100644
+index 00000000..46bfaab
+--- /dev/null
++++ b/build/pkgs/traitlets/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/traitlets
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1f922b458d34088d9f6773312209e69f19ee45dc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:31:50 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for traitlets.
+
+---
+ build/pkgs/traitlets/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/traitlets/spkg-configure.m4
+
+diff --git a/build/pkgs/traitlets/spkg-configure.m4 b/build/pkgs/traitlets/spkg-configure.m4
+new file mode 100644
+index 00000000..df2382b
+--- /dev/null
++++ b/build/pkgs/traitlets/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([traitlets], [SAGE_PYTHON_PACKAGE_CHECK([traitlets])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 95b89a9ced0acb6d971a27fa63b97ea58a11f4e1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:33:35 -0400
+Subject: Trac #29665: add Gentoo package information for argcomplete.
+
+---
+ build/pkgs/argcomplete/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argcomplete/distros/gentoo.txt
+
+diff --git a/build/pkgs/argcomplete/distros/gentoo.txt b/build/pkgs/argcomplete/distros/gentoo.txt
+new file mode 100644
+index 00000000..b150949
+--- /dev/null
++++ b/build/pkgs/argcomplete/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/argcomplete
+-- 
+cgit v1.0-1-gd88e
+
+
+From b4cd8ef384e6e5bae0de0f3c113fb5f9e6e1a71e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:34:14 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for argcomplete.
+
+---
+ build/pkgs/argcomplete/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argcomplete/spkg-configure.m4
+
+diff --git a/build/pkgs/argcomplete/spkg-configure.m4 b/build/pkgs/argcomplete/spkg-configure.m4
+new file mode 100644
+index 00000000..cbd7ccf
+--- /dev/null
++++ b/build/pkgs/argcomplete/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([argcomplete], [SAGE_PYTHON_PACKAGE_CHECK([argcomplete])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4cc610e8331970cc018d7ea87af928fa73a292c1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:36:21 -0400
+Subject: Trac #29665: add Gentoo package information for ptyprocess.
+
+---
+ build/pkgs/ptyprocess/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ptyprocess/distros/gentoo.txt
+
+diff --git a/build/pkgs/ptyprocess/distros/gentoo.txt b/build/pkgs/ptyprocess/distros/gentoo.txt
+new file mode 100644
+index 00000000..571a851
+--- /dev/null
++++ b/build/pkgs/ptyprocess/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ptyprocess
+-- 
+cgit v1.0-1-gd88e
+
+
+From cd15f97221bf5933b07900e4f77cb55401eede26 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:37:02 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ptyprocess.
+
+---
+ build/pkgs/ptyprocess/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ptyprocess/spkg-configure.m4
+
+diff --git a/build/pkgs/ptyprocess/spkg-configure.m4 b/build/pkgs/ptyprocess/spkg-configure.m4
+new file mode 100644
+index 00000000..bfacbae
+--- /dev/null
++++ b/build/pkgs/ptyprocess/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ptyprocess], [SAGE_PYTHON_PACKAGE_CHECK([ptyprocess])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb5f45b15f99e4ba28e1b1f6042a0e8ea17f1dfc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:38:22 -0400
+Subject: Trac #29665: add Gentoo package information for attrs.
+
+---
+ build/pkgs/attrs/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/attrs/distros/gentoo.txt
+
+diff --git a/build/pkgs/attrs/distros/gentoo.txt b/build/pkgs/attrs/distros/gentoo.txt
+new file mode 100644
+index 00000000..3b906fa
+--- /dev/null
++++ b/build/pkgs/attrs/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/attrs
+-- 
+cgit v1.0-1-gd88e
+
+
+From 321707ebf8e9af1e4ac3a5b5b094b4226bb3a7a5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:38:55 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for attrs.
+
+---
+ build/pkgs/attrs/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/attrs/spkg-configure.m4
+
+diff --git a/build/pkgs/attrs/spkg-configure.m4 b/build/pkgs/attrs/spkg-configure.m4
+new file mode 100644
+index 00000000..ba6a9b7
+--- /dev/null
++++ b/build/pkgs/attrs/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([attrs], [SAGE_PYTHON_PACKAGE_CHECK([attrs])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 69a498a4e8854ecdfc2f1a134104983c0dcb9e32 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:40:09 -0400
+Subject: Trac #29665: add Gentoo package information for send2trash.
+
+---
+ build/pkgs/send2trash/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/send2trash/distros/gentoo.txt
+
+diff --git a/build/pkgs/send2trash/distros/gentoo.txt b/build/pkgs/send2trash/distros/gentoo.txt
+new file mode 100644
+index 00000000..a89b179
+--- /dev/null
++++ b/build/pkgs/send2trash/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/send2trash
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9baed17c84e1bdf5abd17c20766e5cd7dddc5b53 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:41:45 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for send2trash.
+
+---
+ build/pkgs/send2trash/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/send2trash/spkg-configure.m4
+
+diff --git a/build/pkgs/send2trash/spkg-configure.m4 b/build/pkgs/send2trash/spkg-configure.m4
+new file mode 100644
+index 00000000..3bbb727
+--- /dev/null
++++ b/build/pkgs/send2trash/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([send2trash], [SAGE_PYTHON_PACKAGE_CHECK([send2trash])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b9b552b2a2aaccaeb7c5b25be0b681f107522d09 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:43:27 -0400
+Subject: Trac #29665: add Gentoo package information for pyrsistent.
+
+---
+ build/pkgs/pyrsistent/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyrsistent/distros/gentoo.txt
+
+diff --git a/build/pkgs/pyrsistent/distros/gentoo.txt b/build/pkgs/pyrsistent/distros/gentoo.txt
+new file mode 100644
+index 00000000..83439ce
+--- /dev/null
++++ b/build/pkgs/pyrsistent/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyrsistent
+-- 
+cgit v1.0-1-gd88e
+
+
+From a17b31fac6104852762f57daa749443147bdf121 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:44:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pyrsistent.
+
+---
+ build/pkgs/pyrsistent/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyrsistent/spkg-configure.m4
+
+diff --git a/build/pkgs/pyrsistent/spkg-configure.m4 b/build/pkgs/pyrsistent/spkg-configure.m4
+new file mode 100644
+index 00000000..f7ca75d
+--- /dev/null
++++ b/build/pkgs/pyrsistent/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pyrsistent], [SAGE_PYTHON_PACKAGE_CHECK([pyrsistent])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 68520decad6d6937918d7a6af65ca5bd476e5d02 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:45:45 -0400
+Subject: Trac #29665: add Gentoo package information for entrypoints.
+
+---
+ build/pkgs/entrypoints/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/entrypoints/distros/gentoo.txt
+
+diff --git a/build/pkgs/entrypoints/distros/gentoo.txt b/build/pkgs/entrypoints/distros/gentoo.txt
+new file mode 100644
+index 00000000..684ddd0
+--- /dev/null
++++ b/build/pkgs/entrypoints/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/entrypoints
+-- 
+cgit v1.0-1-gd88e
+
+
+From 34213eccb642a6bad64d89acaefa83ee702cb483 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:46:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for entrypoints.
+
+---
+ build/pkgs/entrypoints/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/entrypoints/spkg-configure.m4
+
+diff --git a/build/pkgs/entrypoints/spkg-configure.m4 b/build/pkgs/entrypoints/spkg-configure.m4
+new file mode 100644
+index 00000000..caed658
+--- /dev/null
++++ b/build/pkgs/entrypoints/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([entrypoints], [SAGE_PYTHON_PACKAGE_CHECK([entrypoints])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8e985614345da1a58fcdc127a9c0ddd790f9b5d2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:48:26 -0400
+Subject: Trac #29665: add Gentoo package information for markupsafe.
+
+---
+ build/pkgs/markupsafe/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/markupsafe/distros/gentoo.txt
+
+diff --git a/build/pkgs/markupsafe/distros/gentoo.txt b/build/pkgs/markupsafe/distros/gentoo.txt
+new file mode 100644
+index 00000000..9654e35
+--- /dev/null
++++ b/build/pkgs/markupsafe/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/markupsafe
+-- 
+cgit v1.0-1-gd88e
+
+
+From d370f229ae0988856f2e0d1f6ee2df2c47169106 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:48:55 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for markupsafe.
+
+---
+ build/pkgs/markupsafe/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/markupsafe/spkg-configure.m4
+
+diff --git a/build/pkgs/markupsafe/spkg-configure.m4 b/build/pkgs/markupsafe/spkg-configure.m4
+new file mode 100644
+index 00000000..79eb8db
+--- /dev/null
++++ b/build/pkgs/markupsafe/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([markupsafe], [SAGE_PYTHON_PACKAGE_CHECK([markupsafe])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c49b285ad9e25e6bc81a7e75d461d234fdd3ea68 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:30:49 -0400
+Subject: Trac #29665: add Gentoo package information for flit_core.
+
+---
+ build/pkgs/flit_core/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/flit_core/distros/gentoo.txt
+
+diff --git a/build/pkgs/flit_core/distros/gentoo.txt b/build/pkgs/flit_core/distros/gentoo.txt
+new file mode 100644
+index 00000000..fe6bea9
+--- /dev/null
++++ b/build/pkgs/flit_core/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/flit_core
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b0ce1c4f23cd9fc4316e1eb2b9b4bde394957f3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:32:11 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for flit_core.
+
+---
+ build/pkgs/flit_core/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/flit_core/spkg-configure.m4
+
+diff --git a/build/pkgs/flit_core/spkg-configure.m4 b/build/pkgs/flit_core/spkg-configure.m4
+new file mode 100644
+index 00000000..ee67557
+--- /dev/null
++++ b/build/pkgs/flit_core/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([flit_core], [SAGE_PYTHON_PACKAGE_CHECK([flit_core])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f006c231a81428b1e1e792f889bf974f90e3c831 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:34:06 -0400
+Subject: Trac #29665: add Gentoo package information for nest_asyncio.
+
+---
+ build/pkgs/nest_asyncio/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nest_asyncio/distros/gentoo.txt
+
+diff --git a/build/pkgs/nest_asyncio/distros/gentoo.txt b/build/pkgs/nest_asyncio/distros/gentoo.txt
+new file mode 100644
+index 00000000..ab742d2
+--- /dev/null
++++ b/build/pkgs/nest_asyncio/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nest_asyncio
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4a58d0a96a84475e765a01a64f5f44c48a317e0b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:34:43 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for nest_asyncio.
+
+---
+ build/pkgs/nest_asyncio/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nest_asyncio/spkg-configure.m4
+
+diff --git a/build/pkgs/nest_asyncio/spkg-configure.m4 b/build/pkgs/nest_asyncio/spkg-configure.m4
+new file mode 100644
+index 00000000..4d81527
+--- /dev/null
++++ b/build/pkgs/nest_asyncio/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nest_asyncio], [SAGE_PYTHON_PACKAGE_CHECK([nest_asyncio])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e50af937777ea778908bc09a7a79db3dd80fdf25 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:37:02 -0400
+Subject: Trac #29665: add Gentoo package information for ipython_genutils.
+
+---
+ build/pkgs/ipython_genutils/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython_genutils/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipython_genutils/distros/gentoo.txt b/build/pkgs/ipython_genutils/distros/gentoo.txt
+new file mode 100644
+index 00000000..01bc49d
+--- /dev/null
++++ b/build/pkgs/ipython_genutils/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipython_genutils
+-- 
+cgit v1.0-1-gd88e
+
+
+From ec3c0ce9db2ba13c1a49d1bcfb7a4b249cb7ae83 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:39:20 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipython_genutils.
+
+---
+ build/pkgs/ipython_genutils/spkg-configure.m4 | 4 ++++
+ 1 file changed, 4 insertions(+)
+ create mode 100644 build/pkgs/ipython_genutils/spkg-configure.m4
+
+diff --git a/build/pkgs/ipython_genutils/spkg-configure.m4 b/build/pkgs/ipython_genutils/spkg-configure.m4
+new file mode 100644
+index 00000000..b0ba86a
+--- /dev/null
++++ b/build/pkgs/ipython_genutils/spkg-configure.m4
+@@ -0,0 +1,4 @@
++SAGE_SPKG_CONFIGURE(
++  [ipython_genutils],
++  [SAGE_PYTHON_PACKAGE_CHECK([ipython_genutils])]
++)
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5c9e2e265115e5f10d4b459a475467e30b4bddde Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:40:03 -0400
+Subject: Trac #29665: add Gentoo package information for ipython.
+
+---
+ build/pkgs/ipython/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipython/distros/gentoo.txt b/build/pkgs/ipython/distros/gentoo.txt
+new file mode 100644
+index 00000000..8b76f18
+--- /dev/null
++++ b/build/pkgs/ipython/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipython
+-- 
+cgit v1.0-1-gd88e
+
+
+From 621e707ddd040a902d7dddf0bed1de2b54ab22f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 07:37:56 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipython.
+
+---
+ build/pkgs/ipython/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython/spkg-configure.m4
+
+diff --git a/build/pkgs/ipython/spkg-configure.m4 b/build/pkgs/ipython/spkg-configure.m4
+new file mode 100644
+index 00000000..02ab89f
+--- /dev/null
++++ b/build/pkgs/ipython/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipython], [SAGE_PYTHON_PACKAGE_CHECK([ipython])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20a0613f6d441da436f3e7b8047a72bf490882bd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 07:51:11 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipywidgets.
+
+---
+ build/pkgs/ipywidgets/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipywidgets/spkg-configure.m4
+
+diff --git a/build/pkgs/ipywidgets/spkg-configure.m4 b/build/pkgs/ipywidgets/spkg-configure.m4
+new file mode 100644
+index 00000000..51ca9be
+--- /dev/null
++++ b/build/pkgs/ipywidgets/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipywidgets], [SAGE_PYTHON_PACKAGE_CHECK([ipywidgets])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 76bcd386633acc02a1a3026339d0cbd258ada04e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 10:05:16 -0400
+Subject: Trac #29665: add Gentoo package information for wheel.
+
+---
+ build/pkgs/wheel/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wheel/distros/gentoo.txt
+
+diff --git a/build/pkgs/wheel/distros/gentoo.txt b/build/pkgs/wheel/distros/gentoo.txt
+new file mode 100644
+index 00000000..ec571d5
+--- /dev/null
++++ b/build/pkgs/wheel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 96c2dd2ca7812f5333bb9d45eadb7ac408e364ce Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:51:44 -0500
+Subject: Trac #29665: add Gentoo package information for terminado.
+
+---
+ build/pkgs/terminado/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/terminado/distros/gentoo.txt
+
+diff --git a/build/pkgs/terminado/distros/gentoo.txt b/build/pkgs/terminado/distros/gentoo.txt
+new file mode 100644
+index 00000000..1df16f1
+--- /dev/null
++++ b/build/pkgs/terminado/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/terminado
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0de0f5f3d235a4339b21e37ea13c9f5e59a82e59 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:52:35 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for terminado.
+
+---
+ build/pkgs/terminado/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/terminado/spkg-configure.m4
+
+diff --git a/build/pkgs/terminado/spkg-configure.m4 b/build/pkgs/terminado/spkg-configure.m4
+new file mode 100644
+index 00000000..5defc2f
+--- /dev/null
++++ b/build/pkgs/terminado/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([terminado], [SAGE_PYTHON_PACKAGE_CHECK([terminado])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d14a745c770b02822557e7cee0a98de1cb2f3a12 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:56:15 -0500
+Subject: Trac #29665: add Gentoo package information for cffi.
+
+---
+ build/pkgs/cffi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cffi/distros/gentoo.txt
+
+diff --git a/build/pkgs/cffi/distros/gentoo.txt b/build/pkgs/cffi/distros/gentoo.txt
+new file mode 100644
+index 00000000..81eeb81
+--- /dev/null
++++ b/build/pkgs/cffi/distros/gentoo.txt
+@@ -0,0 +1 @@
++virtual/python-cffi
+-- 
+cgit v1.0-1-gd88e
+
+
+From ce393c04afc69fe050e38f780d4e117164687d80 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:57:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for cffi.
+
+---
+ build/pkgs/cffi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cffi/spkg-configure.m4
+
+diff --git a/build/pkgs/cffi/spkg-configure.m4 b/build/pkgs/cffi/spkg-configure.m4
+new file mode 100644
+index 00000000..dc81875
+--- /dev/null
++++ b/build/pkgs/cffi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([cffi], [SAGE_PYTHON_PACKAGE_CHECK([cffi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 467093315b3fdd57c8caa2f95cf99ad52b0b84fb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:57:57 -0500
+Subject: Trac #29665: add Gentoo package information for pip.
+
+---
+ build/pkgs/pip/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pip/distros/gentoo.txt
+
+diff --git a/build/pkgs/pip/distros/gentoo.txt b/build/pkgs/pip/distros/gentoo.txt
+new file mode 100644
+index 00000000..1845454
+--- /dev/null
++++ b/build/pkgs/pip/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pip[vanilla]
+-- 
+cgit v1.0-1-gd88e
+
+
+From c597fd23f9f68dabbcb7e698d0569c3e6458f6d1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 09:07:26 -0500
+Subject: Trac #29665: new spkg-configure.m4 for pip.
+
+---
+ build/pkgs/pip/spkg-configure.m4 | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+ create mode 100644 build/pkgs/pip/spkg-configure.m4
+
+diff --git a/build/pkgs/pip/spkg-configure.m4 b/build/pkgs/pip/spkg-configure.m4
+new file mode 100644
+index 00000000..c7a5562
+--- /dev/null
++++ b/build/pkgs/pip/spkg-configure.m4
+@@ -0,0 +1,12 @@
++SAGE_SPKG_CONFIGURE([pip], [
++  dnl always run this macro because it changes the default value of
++  dnl the --with-system-<package> option.
++  SAGE_PYTHON_PACKAGE_CHECK([pip])
++
++  dnl if we might not install the spkg, make sure that "pip" is in
++  dnl the user's PATH, too.
++  AS_IF([test "x$sage_spkg_install_pip" != "xyes"], [
++    AC_CHECK_PROG(HAVE_PIP, pip, yes, no)
++    AS_IF([test "x$HAVE_PIP" = "xno"], [sage_spkg_install_pip=yes])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ef8f1e807bc55d7b8321777486fa867a7c135419 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 9 Nov 2021 09:09:04 -0500
+Subject: Trac #29665: set $SAGE_PIP_INSTALL_FLAGS for
+ --enable-system-site-packages.
+
+We need to pass some special flags to "pip install" to make it do the
+right thing in the precence of system-site packages. Here we introduce
+a new autoconf variable, SAGE_PIP_INSTALL_FLAGS, that will be used
+to pass those flags to the build system.
+
+With autoconf aware of the variable, we substitute its value into the
+sage-build-env-config script for use in spkg-install.in.
+---
+ build/bin/sage-build-env-config.in | 1 +
+ configure.ac                       | 9 +++++++++
+ 2 files changed, 10 insertions(+)
+
+diff --git a/build/bin/sage-build-env-config.in b/build/bin/sage-build-env-config.in
+index 92e7dad..ad62e5f 100644
+--- a/build/bin/sage-build-env-config.in
++++ b/build/bin/sage-build-env-config.in
+@@ -53,6 +53,7 @@ export SAGE_PARI_CFG="@SAGE_PARI_CFG@"
+ 
+ export SAGE_GLPK_PREFIX="@SAGE_GLPK_PREFIX@"
+ export SAGE_FREETYPE_PREFIX="@SAGE_FREETYPE_PREFIX@"
++export SAGE_PIP_INSTALL_FLAGS="@SAGE_PIP_INSTALL_FLAGS@"
+ export SAGE_SUITESPARSE_PREFIX="@SAGE_SUITESPARSE_PREFIX@"
+ 
+ export SAGE_CONFIGURE_FFLAS_FFPACK="@SAGE_CONFIGURE_FFLAS_FFPACK@"
+diff --git a/configure.ac b/configure.ac
+index 6fafb83..6ed07ac 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -441,6 +441,14 @@ AC_ARG_ENABLE(
+     [allow the use of python packages from the system (experimental; default: no)]
+   )], [
+   AS_IF([test "x$enable_system_site_packages" = "xyes"], [
++    dnl When installing python SPKGs in the presence of system-site
++    dnl packages, we need to --ignore-installed so that a patched SPKG
++    dnl can be installed in the presence of an unpatched system package
++    dnl that appears (to pip) to be identical. The --no-deps flag is
++    dnl then needed because --ignore-installed will make any installed
++    dnl dependencies invisible to pip, who does not appreciate that.
++    SAGE_PIP_INSTALL_FLAGS="${SAGE_PIP_INSTALL_FLAGS} --no-deps --ignore-installed"
++
+     SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
+ 
+     dnl We want to raise an error if the user asked for "system site
+@@ -453,6 +461,7 @@ AC_ARG_ENABLE(
+     with_system_python3="force"
+   ])
+ ])
++AC_SUBST([SAGE_PIP_INSTALL_FLAGS])
+ AC_SUBST([SAGE_VENV_FLAGS])
+ 
+ SAGE_SPKG_OPTIONS=""
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3cf365fef84e809e74abd2eb388e7a8e9af9d739 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 9 Nov 2021 21:01:58 -0500
+Subject: Trac #29665: pass $SAGE_PIP_INSTALL_FLAGS to sdh_pip_install.
+
+Since sdh_pip_install is usually called from spkg-install.in, the
+variables from sage-build-env-config will be available. Here we pass
+the contents of $SAGE_PIP_INSTALL_FLAGS to sage-pip-install
+unconditionally, and hope that the user ignores this variable unless
+he truly knows what he is doing.
+---
+ build/bin/sage-dist-helpers | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/build/bin/sage-dist-helpers b/build/bin/sage-dist-helpers
+index fe364e5..1032ac3 100644
+--- a/build/bin/sage-dist-helpers
++++ b/build/bin/sage-dist-helpers
+@@ -303,7 +303,11 @@ sdh_store_wheel() {
+ }
+ 
+ sdh_store_and_pip_install_wheel() {
+-    local pip_options=""
++    # The $SAGE_PIP_INSTALL_FLAGS variable is set by sage-build-env-config.
++    # We skip sanity checking its contents since you should either let sage
++    # decide what it contains, or really know what you are doing.
++    local pip_options="${SAGE_PIP_INSTALL_FLAGS}"
++
+     while [ $# -gt 0 ]; do
+         case $1 in
+             -*) pip_options="$pip_options $1"
+-- 
+cgit v1.0-1-gd88e
+
+
+From 50f0438ee857b8f0b7d7ad924e6bba9c5e1bc033 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:10:46 -0500
+Subject: Trac #29665: add Gentoo package information for pexpect.
+
+---
+ build/pkgs/pexpect/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pexpect/distros/gentoo.txt
+
+diff --git a/build/pkgs/pexpect/distros/gentoo.txt b/build/pkgs/pexpect/distros/gentoo.txt
+new file mode 100644
+index 00000000..30c4b60
+--- /dev/null
++++ b/build/pkgs/pexpect/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pexpect
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4d784688d997290b462646fa7f36114a41f3f453 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:11:25 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pexpect.
+
+---
+ build/pkgs/pexpect/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pexpect/spkg-configure.m4
+
+diff --git a/build/pkgs/pexpect/spkg-configure.m4 b/build/pkgs/pexpect/spkg-configure.m4
+new file mode 100644
+index 00000000..6520856
+--- /dev/null
++++ b/build/pkgs/pexpect/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pexpect], [SAGE_PYTHON_PACKAGE_CHECK([pexpect])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6447122dc76a3b7a58340dbed942db66530b5b07 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:12:05 -0500
+Subject: Trac #29665: add Gentoo package information for docutils.
+
+---
+ build/pkgs/docutils/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/docutils/distros/gentoo.txt
+
+diff --git a/build/pkgs/docutils/distros/gentoo.txt b/build/pkgs/docutils/distros/gentoo.txt
+new file mode 100644
+index 00000000..fe4a452
+--- /dev/null
++++ b/build/pkgs/docutils/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/docutils
+-- 
+cgit v1.0-1-gd88e
+
+
+From 709041480a5fc729b0ee7f1a8a3b16d4d65321b5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:12:38 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for docutils.
+
+---
+ build/pkgs/docutils/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/docutils/spkg-configure.m4
+
+diff --git a/build/pkgs/docutils/spkg-configure.m4 b/build/pkgs/docutils/spkg-configure.m4
+new file mode 100644
+index 00000000..3584e45
+--- /dev/null
++++ b/build/pkgs/docutils/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([docutils], [SAGE_PYTHON_PACKAGE_CHECK([docutils])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 782d38b48ab87afccc43fbc071e7b7ed48fb0a20 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:14:37 -0500
+Subject: Trac #29665: add Gentoo package information for nbclient.
+
+---
+ build/pkgs/nbclient/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbclient/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbclient/distros/gentoo.txt b/build/pkgs/nbclient/distros/gentoo.txt
+new file mode 100644
+index 00000000..06ff18d
+--- /dev/null
++++ b/build/pkgs/nbclient/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbclient
+-- 
+cgit v1.0-1-gd88e
+
+
+From 19ce09336532336f69db74381932d51a429dfaca Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:15:11 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for nbclient.
+
+---
+ build/pkgs/nbclient/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbclient/spkg-configure.m4
+
+diff --git a/build/pkgs/nbclient/spkg-configure.m4 b/build/pkgs/nbclient/spkg-configure.m4
+new file mode 100644
+index 00000000..14178b7
+--- /dev/null
++++ b/build/pkgs/nbclient/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbclient], [SAGE_PYTHON_PACKAGE_CHECK([nbclient])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c063b9de42c1780368000a563d0dbe80b6fff169 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:17:36 -0500
+Subject: Trac #29665: add Gentoo package information for argon2_cffi.
+
+---
+ build/pkgs/argon2_cffi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argon2_cffi/distros/gentoo.txt
+
+diff --git a/build/pkgs/argon2_cffi/distros/gentoo.txt b/build/pkgs/argon2_cffi/distros/gentoo.txt
+new file mode 100644
+index 00000000..2f12ca8
+--- /dev/null
++++ b/build/pkgs/argon2_cffi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/argon2-cffi
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0b4d5699dd51ea52550fba7db9e1cbb8bbac1892 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:18:35 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for argon2_cffi.
+
+---
+ build/pkgs/argon2_cffi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argon2_cffi/spkg-configure.m4
+
+diff --git a/build/pkgs/argon2_cffi/spkg-configure.m4 b/build/pkgs/argon2_cffi/spkg-configure.m4
+new file mode 100644
+index 00000000..03ebc63
+--- /dev/null
++++ b/build/pkgs/argon2_cffi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([argon2_cffi], [SAGE_PYTHON_PACKAGE_CHECK([argon2_cffi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2b4119558a6e0b1aa512848539a237676b035c83 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:30:48 -0500
+Subject: Trac #29665: fix package name in dateutil's install-requires.txt.
+
+---
+ build/pkgs/dateutil/install-requires.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/build/pkgs/dateutil/install-requires.txt b/build/pkgs/dateutil/install-requires.txt
+index 0ae93da..face537 100644
+--- a/build/pkgs/dateutil/install-requires.txt
++++ b/build/pkgs/dateutil/install-requires.txt
+@@ -1 +1 @@
+-dateutil >=2.8.1
++python-dateutil >=2.8.1
+-- 
+cgit v1.0-1-gd88e
+
+
+From df371b7c4d20a3353d43940306ad22e11aba29da Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:31:41 -0500
+Subject: Trac #29665: add Gentoo package information for dateutil.
+
+---
+ build/pkgs/dateutil/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/dateutil/distros/gentoo.txt
+
+diff --git a/build/pkgs/dateutil/distros/gentoo.txt b/build/pkgs/dateutil/distros/gentoo.txt
+new file mode 100644
+index 00000000..e129df7
+--- /dev/null
++++ b/build/pkgs/dateutil/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/python-dateutil
+-- 
+cgit v1.0-1-gd88e
+
+
+From 577695dfdf661ee26c0ffd767bdbf479d95f7fb4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:32:21 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for dateutil.
+
+---
+ build/pkgs/dateutil/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/dateutil/spkg-configure.m4
+
+diff --git a/build/pkgs/dateutil/spkg-configure.m4 b/build/pkgs/dateutil/spkg-configure.m4
+new file mode 100644
+index 00000000..fdcd127
+--- /dev/null
++++ b/build/pkgs/dateutil/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([dateutil], [SAGE_PYTHON_PACKAGE_CHECK([dateutil])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1984651caac624ec4bb58814ca1d57fe66f9881a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:33:51 -0500
+Subject: Trac #29665: add Gentoo package information for setuptools_scm.
+
+---
+ build/pkgs/setuptools_scm/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/setuptools_scm/distros/gentoo.txt
+
+diff --git a/build/pkgs/setuptools_scm/distros/gentoo.txt b/build/pkgs/setuptools_scm/distros/gentoo.txt
+new file mode 100644
+index 00000000..8989597
+--- /dev/null
++++ b/build/pkgs/setuptools_scm/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/setuptools_scm
+-- 
+cgit v1.0-1-gd88e
+
+
+From ebf7c854ed966e7353759be485c4f5a57b9a10fa Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:34:49 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for setuptools_scm.
+
+---
+ build/pkgs/setuptools_scm/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/setuptools_scm/spkg-configure.m4
+
+diff --git a/build/pkgs/setuptools_scm/spkg-configure.m4 b/build/pkgs/setuptools_scm/spkg-configure.m4
+new file mode 100644
+index 00000000..437148c
+--- /dev/null
++++ b/build/pkgs/setuptools_scm/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([setuptools_scm], [
++  SAGE_PYTHON_PACKAGE_CHECK([setuptools_scm])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0dee0d0c28f31b1f619e44c710a3c9e22d2b2544 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:36:33 -0500
+Subject: Trac #29665: add Gentoo package information for nbconvert.
+
+---
+ build/pkgs/nbconvert/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbconvert/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbconvert/distros/gentoo.txt b/build/pkgs/nbconvert/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c45a10
+--- /dev/null
++++ b/build/pkgs/nbconvert/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbconvert
+-- 
+cgit v1.0-1-gd88e
+
+
+From 473789eb11b1838bc32dc8a63509ee199afc8912 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:37:37 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for nbconvert.
+
+---
+ build/pkgs/nbconvert/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbconvert/spkg-configure.m4
+
+diff --git a/build/pkgs/nbconvert/spkg-configure.m4 b/build/pkgs/nbconvert/spkg-configure.m4
+new file mode 100644
+index 00000000..9b5dee3
+--- /dev/null
++++ b/build/pkgs/nbconvert/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbconvert], [SAGE_PYTHON_PACKAGE_CHECK([nbconvert])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f0703b594e57c980d605aa9bc8316c45a7858b3b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:41:51 -0500
+Subject: Trac #29665: add Gentoo package information for jupyter_core.
+
+---
+ build/pkgs/jupyter_core/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyter_core/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyter_core/distros/gentoo.txt b/build/pkgs/jupyter_core/distros/gentoo.txt
+new file mode 100644
+index 00000000..f168c5a
+--- /dev/null
++++ b/build/pkgs/jupyter_core/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyter_core
+-- 
+cgit v1.0-1-gd88e
+
+
+From 061a307cc4a6680d8500fde834975064e59540d5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:42:48 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jupyter_core.
+
+---
+ build/pkgs/jupyter_core/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyter_core/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyter_core/spkg-configure.m4 b/build/pkgs/jupyter_core/spkg-configure.m4
+new file mode 100644
+index 00000000..67df9c3
+--- /dev/null
++++ b/build/pkgs/jupyter_core/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyter_core], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyter_core])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b85abe964ce0b98b5842efe9cbad9bdb1c89202f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:47:08 -0500
+Subject: Trac #29665: add Gentoo package information for jupyter_client.
+
+---
+ build/pkgs/jupyter_client/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyter_client/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyter_client/distros/gentoo.txt b/build/pkgs/jupyter_client/distros/gentoo.txt
+new file mode 100644
+index 00000000..4f1de88
+--- /dev/null
++++ b/build/pkgs/jupyter_client/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyter_client
+-- 
+cgit v1.0-1-gd88e
+
+
+From 86323ff1e0b2507933df6bc2a96c9175957640c5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:48:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jupyter_client.
+
+---
+ build/pkgs/jupyter_client/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyter_client/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyter_client/spkg-configure.m4 b/build/pkgs/jupyter_client/spkg-configure.m4
+new file mode 100644
+index 00000000..fbd3498
+--- /dev/null
++++ b/build/pkgs/jupyter_client/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyter_client], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyter_client])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a8475e27dd30d752d05ab6fea6579e8623501d82 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:48:58 -0500
+Subject: Trac #29665: add Gentoo package information for snowballstemmer.
+
+---
+ build/pkgs/snowballstemmer/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/snowballstemmer/distros/gentoo.txt
+
+diff --git a/build/pkgs/snowballstemmer/distros/gentoo.txt b/build/pkgs/snowballstemmer/distros/gentoo.txt
+new file mode 100644
+index 00000000..63fd851
+--- /dev/null
++++ b/build/pkgs/snowballstemmer/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/snowballstemmer
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0833c9b781062b4ed86d619e050a6f5d60e36080 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:49:38 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for snowballstemmer.
+
+---
+ build/pkgs/snowballstemmer/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/snowballstemmer/spkg-configure.m4
+
+diff --git a/build/pkgs/snowballstemmer/spkg-configure.m4 b/build/pkgs/snowballstemmer/spkg-configure.m4
+new file mode 100644
+index 00000000..6aa0882
+--- /dev/null
++++ b/build/pkgs/snowballstemmer/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([snowballstemmer], [
++  SAGE_PYTHON_PACKAGE_CHECK([snowballstemmer])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 50a1cf2a2bcd7eeec64cbc3f70e3e9fbe5d850fe Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:50:47 -0500
+Subject: Trac #29665: add Gentoo package information for tornado.
+
+---
+ build/pkgs/tornado/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tornado/distros/gentoo.txt
+
+diff --git a/build/pkgs/tornado/distros/gentoo.txt b/build/pkgs/tornado/distros/gentoo.txt
+new file mode 100644
+index 00000000..6ae4b9f
+--- /dev/null
++++ b/build/pkgs/tornado/distros/gentoo.txt
+@@ -0,0 +1 @@
++www-servers/tornado
+-- 
+cgit v1.0-1-gd88e
+
+
+From 118f4da6e03476c726363e8e22ecda32f13bfc33 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:51:26 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for tornado.
+
+---
+ build/pkgs/tornado/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tornado/spkg-configure.m4
+
+diff --git a/build/pkgs/tornado/spkg-configure.m4 b/build/pkgs/tornado/spkg-configure.m4
+new file mode 100644
+index 00000000..1ee5bc9
+--- /dev/null
++++ b/build/pkgs/tornado/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tornado], [SAGE_PYTHON_PACKAGE_CHECK([tornado])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3850701747a6c8ef60840bdfdb589b28d4cd2b9a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:52:21 -0500
+Subject: Trac #29665: add Gentoo package information for jsonschema.
+
+---
+ build/pkgs/jsonschema/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jsonschema/distros/gentoo.txt
+
+diff --git a/build/pkgs/jsonschema/distros/gentoo.txt b/build/pkgs/jsonschema/distros/gentoo.txt
+new file mode 100644
+index 00000000..d708e4c
+--- /dev/null
++++ b/build/pkgs/jsonschema/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jsonschema
+-- 
+cgit v1.0-1-gd88e
+
+
+From 76e3917c8af781af00f642cfada7a79594429e30 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:54:03 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jsonschema.
+
+---
+ build/pkgs/jsonschema/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jsonschema/spkg-configure.m4
+
+diff --git a/build/pkgs/jsonschema/spkg-configure.m4 b/build/pkgs/jsonschema/spkg-configure.m4
+new file mode 100644
+index 00000000..b9e5e21
+--- /dev/null
++++ b/build/pkgs/jsonschema/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jsonschema], [SAGE_PYTHON_PACKAGE_CHECK([jsonschema])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From fd4a16c11669b6dd73ac6325bca820e76db00402 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:55:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ widgetsnbextension.
+
+---
+ build/pkgs/widgetsnbextension/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/widgetsnbextension/spkg-configure.m4
+
+diff --git a/build/pkgs/widgetsnbextension/spkg-configure.m4 b/build/pkgs/widgetsnbextension/spkg-configure.m4
+new file mode 100644
+index 00000000..bf82daf
+--- /dev/null
++++ b/build/pkgs/widgetsnbextension/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([widgetsnbextension], [
++  SAGE_PYTHON_PACKAGE_CHECK([widgetsnbextension])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8079a9f384e3c8480e157dd98c3db2f43c987f4e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:57:20 -0500
+Subject: Trac #29665: add Gentoo package information for importlib_resources.
+
+---
+ build/pkgs/importlib_resources/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/importlib_resources/distros/gentoo.txt
+
+diff --git a/build/pkgs/importlib_resources/distros/gentoo.txt b/build/pkgs/importlib_resources/distros/gentoo.txt
+new file mode 100644
+index 00000000..d5e1f2c
+--- /dev/null
++++ b/build/pkgs/importlib_resources/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/importlib_resources
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2c430d7c52f02779a6c41b98ac2f4edd8b6759c3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:58:00 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ importlib_resources.
+
+---
+ build/pkgs/importlib_resources/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/importlib_resources/spkg-configure.m4
+
+diff --git a/build/pkgs/importlib_resources/spkg-configure.m4 b/build/pkgs/importlib_resources/spkg-configure.m4
+new file mode 100644
+index 00000000..50df55b
+--- /dev/null
++++ b/build/pkgs/importlib_resources/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([importlib_resources], [
++  SAGE_PYTHON_PACKAGE_CHECK([importlib_resources])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 00d13d7bf2e50aae2ccef3b2b30293c70a922af2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:58:38 -0500
+Subject: Trac #29665: add Gentoo package information for kiwisolver.
+
+---
+ build/pkgs/kiwisolver/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/kiwisolver/distros/gentoo.txt
+
+diff --git a/build/pkgs/kiwisolver/distros/gentoo.txt b/build/pkgs/kiwisolver/distros/gentoo.txt
+new file mode 100644
+index 00000000..7b30c95
+--- /dev/null
++++ b/build/pkgs/kiwisolver/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/kiwisolver
+-- 
+cgit v1.0-1-gd88e
+
+
+From 72b7907ef7ea9fa4ff6948ea34cfe2f693ee6c31 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:59:09 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for kiwisolver.
+
+---
+ build/pkgs/kiwisolver/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/kiwisolver/spkg-configure.m4
+
+diff --git a/build/pkgs/kiwisolver/spkg-configure.m4 b/build/pkgs/kiwisolver/spkg-configure.m4
+new file mode 100644
+index 00000000..4e7ac97
+--- /dev/null
++++ b/build/pkgs/kiwisolver/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([kiwisolver], [SAGE_PYTHON_PACKAGE_CHECK([kiwisolver])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 479351279e4e0ea7e2d146434f0daba038765cfd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:00:04 -0500
+Subject: Trac #29665: add Gentoo package information for notebook.
+
+---
+ build/pkgs/notebook/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/notebook/distros/gentoo.txt
+
+diff --git a/build/pkgs/notebook/distros/gentoo.txt b/build/pkgs/notebook/distros/gentoo.txt
+new file mode 100644
+index 00000000..6475d72
+--- /dev/null
++++ b/build/pkgs/notebook/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/notebook
+-- 
+cgit v1.0-1-gd88e
+
+
+From f4d9242ea654977f8ad7865c82eec593e11a36bc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:01:42 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for notebook.
+
+---
+ build/pkgs/notebook/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/notebook/spkg-configure.m4
+
+diff --git a/build/pkgs/notebook/spkg-configure.m4 b/build/pkgs/notebook/spkg-configure.m4
+new file mode 100644
+index 00000000..a17ba95
+--- /dev/null
++++ b/build/pkgs/notebook/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([notebook], [SAGE_PYTHON_PACKAGE_CHECK([notebook])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9837070c7f8e9a71283b84d49d4fd2c94b78a464 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:02:38 -0500
+Subject: Trac #29665: add Gentoo package information for matplotlib_inline.
+
+---
+ build/pkgs/matplotlib_inline/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/matplotlib_inline/distros/gentoo.txt
+
+diff --git a/build/pkgs/matplotlib_inline/distros/gentoo.txt b/build/pkgs/matplotlib_inline/distros/gentoo.txt
+new file mode 100644
+index 00000000..6a5859c
+--- /dev/null
++++ b/build/pkgs/matplotlib_inline/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/matplotlib-inline
+-- 
+cgit v1.0-1-gd88e
+
+
+From 750be73b25b92b4875e47d044360ac0e1116ec3e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:03:28 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for matplotlib_inline.
+
+---
+ build/pkgs/matplotlib_inline/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/matplotlib_inline/spkg-configure.m4
+
+diff --git a/build/pkgs/matplotlib_inline/spkg-configure.m4 b/build/pkgs/matplotlib_inline/spkg-configure.m4
+new file mode 100644
+index 00000000..e59658f
+--- /dev/null
++++ b/build/pkgs/matplotlib_inline/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([matplotlib_inline], [
++  SAGE_PYTHON_PACKAGE_CHECK([matplotlib_inline])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 273505f49698dcd2ab30c2756b07113c9b7e7791 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:04:10 -0500
+Subject: Trac #29665: add Gentoo package information for ipykernel.
+
+---
+ build/pkgs/ipykernel/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipykernel/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipykernel/distros/gentoo.txt b/build/pkgs/ipykernel/distros/gentoo.txt
+new file mode 100644
+index 00000000..88aab61
+--- /dev/null
++++ b/build/pkgs/ipykernel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipykernel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 629ad36c9e4ae0cdff4a013289b4f2911442445e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:04:46 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for ipykernel.
+
+---
+ build/pkgs/ipykernel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipykernel/spkg-configure.m4
+
+diff --git a/build/pkgs/ipykernel/spkg-configure.m4 b/build/pkgs/ipykernel/spkg-configure.m4
+new file mode 100644
+index 00000000..94ecc2d
+--- /dev/null
++++ b/build/pkgs/ipykernel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipykernel], [SAGE_PYTHON_PACKAGE_CHECK([ipykernel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b8d709edb6a24fd5868ee2818b56e78257b2eafa Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:05:26 -0500
+Subject: Trac #29665: add Gentoo package information for prompt_toolkit.
+
+---
+ build/pkgs/prompt_toolkit/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/prompt_toolkit/distros/gentoo.txt
+
+diff --git a/build/pkgs/prompt_toolkit/distros/gentoo.txt b/build/pkgs/prompt_toolkit/distros/gentoo.txt
+new file mode 100644
+index 00000000..6902484
+--- /dev/null
++++ b/build/pkgs/prompt_toolkit/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/prompt_toolkit
+-- 
+cgit v1.0-1-gd88e
+
+
+From 16c0b5e767ae4dac4440510b7253e5c8642b7d2c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:10:39 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for prompt_toolkit.
+
+---
+ build/pkgs/prompt_toolkit/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/prompt_toolkit/spkg-configure.m4
+
+diff --git a/build/pkgs/prompt_toolkit/spkg-configure.m4 b/build/pkgs/prompt_toolkit/spkg-configure.m4
+new file mode 100644
+index 00000000..fd8c1a6
+--- /dev/null
++++ b/build/pkgs/prompt_toolkit/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([prompt_toolkit], [
++  SAGE_PYTHON_PACKAGE_CHECK([prompt_toolkit])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0cd9283e8bb6c8ae413fc8f715c021f7ec3ca2c8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:12:10 -0500
+Subject: Trac #29665: add Gentoo package information for charset_normalizer.
+
+---
+ build/pkgs/charset_normalizer/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/charset_normalizer/distros/gentoo.txt
+
+diff --git a/build/pkgs/charset_normalizer/distros/gentoo.txt b/build/pkgs/charset_normalizer/distros/gentoo.txt
+new file mode 100644
+index 00000000..eefeb89
+--- /dev/null
++++ b/build/pkgs/charset_normalizer/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/charset_normalizer
+-- 
+cgit v1.0-1-gd88e
+
+
+From a04b01a9ab59097d189edcc5ddcb461faede83b2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:12:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ charset_normalizer.
+
+---
+ build/pkgs/charset_normalizer/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/charset_normalizer/spkg-configure.m4
+
+diff --git a/build/pkgs/charset_normalizer/spkg-configure.m4 b/build/pkgs/charset_normalizer/spkg-configure.m4
+new file mode 100644
+index 00000000..18b18cf
+--- /dev/null
++++ b/build/pkgs/charset_normalizer/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([charset_normalizer], [
++  SAGE_PYTHON_PACKAGE_CHECK([charset_normalizer])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d2ea08138711c53046f977b586f33b09b176b2e3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:13:37 -0500
+Subject: Trac #29665: add Gentoo package information for prometheus_client.
+
+---
+ build/pkgs/prometheus_client/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/prometheus_client/distros/gentoo.txt
+
+diff --git a/build/pkgs/prometheus_client/distros/gentoo.txt b/build/pkgs/prometheus_client/distros/gentoo.txt
+new file mode 100644
+index 00000000..aa2889c
+--- /dev/null
++++ b/build/pkgs/prometheus_client/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/prometheus_client
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b0393200e9edd3e26b8a55ba67e5710e7403fcb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:15:09 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for prometheus_client.
+
+---
+ build/pkgs/prometheus_client/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/prometheus_client/spkg-configure.m4
+
+diff --git a/build/pkgs/prometheus_client/spkg-configure.m4 b/build/pkgs/prometheus_client/spkg-configure.m4
+new file mode 100644
+index 00000000..b494588
+--- /dev/null
++++ b/build/pkgs/prometheus_client/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([prometheus_client], [
++  SAGE_PYTHON_PACKAGE_CHECK([prometheus_client])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From cdcd85284f43ca4ad18353ec3527b2901e57b788 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:17:23 -0500
+Subject: Trac #29665: add Gentoo package information for pybind11.
+
+---
+ build/pkgs/pybind11/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pybind11/distros/gentoo.txt
+
+diff --git a/build/pkgs/pybind11/distros/gentoo.txt b/build/pkgs/pybind11/distros/gentoo.txt
+new file mode 100644
+index 00000000..0c500b3
+--- /dev/null
++++ b/build/pkgs/pybind11/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pybind11
+-- 
+cgit v1.0-1-gd88e
+
+
+From efdd1eb64c4799fe3cdf2221824182941b3fda2d Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:17:51 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pybind11.
+
+---
+ build/pkgs/pybind11/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pybind11/spkg-configure.m4
+
+diff --git a/build/pkgs/pybind11/spkg-configure.m4 b/build/pkgs/pybind11/spkg-configure.m4
+new file mode 100644
+index 00000000..cce1cf5
+--- /dev/null
++++ b/build/pkgs/pybind11/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pybind11], [SAGE_PYTHON_PACKAGE_CHECK([pybind11])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b2128f33b68ea33927284116ea598dd186902400 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:19:23 -0500
+Subject: Trac #29665: add Gentoo package information for pkgconfig.
+
+---
+ build/pkgs/pkgconfig/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pkgconfig/distros/gentoo.txt
+
+diff --git a/build/pkgs/pkgconfig/distros/gentoo.txt b/build/pkgs/pkgconfig/distros/gentoo.txt
+new file mode 100644
+index 00000000..32e8618
+--- /dev/null
++++ b/build/pkgs/pkgconfig/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pkgconfig
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b373b49e06aadeb36dc57e500da9a322460e658 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:19:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pkgconfig.
+
+---
+ build/pkgs/pkgconfig/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pkgconfig/spkg-configure.m4
+
+diff --git a/build/pkgs/pkgconfig/spkg-configure.m4 b/build/pkgs/pkgconfig/spkg-configure.m4
+new file mode 100644
+index 00000000..6708293
+--- /dev/null
++++ b/build/pkgs/pkgconfig/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pkgconfig], [SAGE_PYTHON_PACKAGE_CHECK([pkgconfig])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ce578729eb0d14baab365351ba9a9ffffb7b79f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:21:10 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_serializinghtml.
+
+---
+ build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt b/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+new file mode 100644
+index 00000000..38bca8f
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-serializinghtml
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb0f42c32bbce0e4488678312f5e2d88c6f42c9b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:21:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_serializinghtml.
+
+---
+ build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4 b/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+new file mode 100644
+index 00000000..be8e625
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_serializinghtml], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_serializinghtml])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e47dcf985e40475de85c9436a85537751318bc3d Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:22:54 -0500
+Subject: Trac #29665: add Gentoo package information for sphinxcontrib_jsmath.
+
+---
+ build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt b/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+new file mode 100644
+index 00000000..041a471
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-jsmath
+-- 
+cgit v1.0-1-gd88e
+
+
+From 72cff6fd35f93de4fa855bc870569dd733ff5c24 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:23:49 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_jsmath.
+
+---
+ build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4 b/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+new file mode 100644
+index 00000000..e46bde2
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_jsmath], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_jsmath])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a36395d70f759449cd63c1b0990fbdcb4cb25ca0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:24:26 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_devhelp.
+
+---
+ build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..9b5c899
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-devhelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9953a5dd1646ed0ad51d2e3935cf609bc9e7fd1c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:25:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_devhelp.
+
+---
+ build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+new file mode 100644
+index 00000000..8728136
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_devhelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_devhelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b199d5363aad93f3cb23f7904c9553a28b06348f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:25:53 -0500
+Subject: Trac #29665: add Gentoo package information for sphinxcontrib_qthelp.
+
+---
+ build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..7210099
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-qthelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 94ac8806739f3938e73f5857328e91e0d42e98d2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:26:28 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_qthelp.
+
+---
+ build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+new file mode 100644
+index 00000000..81ea5e1
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_qthelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_qthelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From beedc154aa405e8a58aee8889f510db07adc89a7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:26:54 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_applehelp.
+
+---
+ build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..66ac8da
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-applehelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 07d47c3673d6b35423b71f621cb400989c0101c2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:27:19 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_applehelp.
+
+---
+ build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+new file mode 100644
+index 00000000..e834aed
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_applehelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_applehelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 333a66546c5d421735c49dbafd7370a827f22781 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:27:46 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_htmlhelp.
+
+---
+ build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..e080bac
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-htmlhelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From bfaeb3962254439b63f1f2e0e883de462c7831be Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:29:18 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_htmlhelp.
+
+---
+ build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+new file mode 100644
+index 00000000..c77b003
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_htmlhelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_htmlhelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 782cde13da06e8b85806cb7cbc8aceee0364e639 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:30:23 -0500
+Subject: Trac #29665: add Gentoo package information for jupyterlab_pygments.
+
+---
+ build/pkgs/jupyterlab_pygments/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyterlab_pygments/distros/gentoo.txt b/build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+new file mode 100644
+index 00000000..c57b4f1
+--- /dev/null
++++ b/build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyterlab_pygments
+-- 
+cgit v1.0-1-gd88e
+
+
+From 39f974cfa4a8c6e5dd897f152f83ec82f40ee9f7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:31:13 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ jupyterlab_pygments.
+
+---
+ build/pkgs/jupyterlab_pygments/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyterlab_pygments/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyterlab_pygments/spkg-configure.m4 b/build/pkgs/jupyterlab_pygments/spkg-configure.m4
+new file mode 100644
+index 00000000..e46e21f
+--- /dev/null
++++ b/build/pkgs/jupyterlab_pygments/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyterlab_pygments], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyterlab_pygments])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From db704620700fd36cec3bf6125938f3ee00a9eb5e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:29:15 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for ply.
+
+---
+ build/pkgs/ply/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ply/spkg-configure.m4
+
+diff --git a/build/pkgs/ply/spkg-configure.m4 b/build/pkgs/ply/spkg-configure.m4
+new file mode 100644
+index 00000000..ffb0030
+--- /dev/null
++++ b/build/pkgs/ply/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ply], [SAGE_PYTHON_PACKAGE_CHECK([ply])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6aac31dabcdfdef228d7780398a3fda1a4cc566f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:29:51 -0500
+Subject: Trac #29665: add Gentoo package information for ply.
+
+---
+ build/pkgs/ply/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ply/distros/gentoo.txt
+
+diff --git a/build/pkgs/ply/distros/gentoo.txt b/build/pkgs/ply/distros/gentoo.txt
+new file mode 100644
+index 00000000..c8b1630
+--- /dev/null
++++ b/build/pkgs/ply/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ply
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb8d3372936ec37470d69687a0f91592129460ae Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:30:33 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for gast.
+
+---
+ build/pkgs/gast/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/gast/spkg-configure.m4
+
+diff --git a/build/pkgs/gast/spkg-configure.m4 b/build/pkgs/gast/spkg-configure.m4
+new file mode 100644
+index 00000000..26ec59f
+--- /dev/null
++++ b/build/pkgs/gast/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([gast], [SAGE_PYTHON_PACKAGE_CHECK([gast])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1cdc4046a88f1c2b4e5c162f66c6db6090b24194 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:31:15 -0500
+Subject: Trac #29665: add Gentoo package information for gast.
+
+---
+ build/pkgs/gast/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/gast/distros/gentoo.txt
+
+diff --git a/build/pkgs/gast/distros/gentoo.txt b/build/pkgs/gast/distros/gentoo.txt
+new file mode 100644
+index 00000000..3be5e7e
+--- /dev/null
++++ b/build/pkgs/gast/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/gast
+-- 
+cgit v1.0-1-gd88e
+
+
+From 96068b8a3742b65d619190e1d9fa5db399e6b4f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:32:20 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pythran.
+
+---
+ build/pkgs/pythran/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pythran/spkg-configure.m4
+
+diff --git a/build/pkgs/pythran/spkg-configure.m4 b/build/pkgs/pythran/spkg-configure.m4
+new file mode 100644
+index 00000000..592e95b
+--- /dev/null
++++ b/build/pkgs/pythran/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pythran], [SAGE_PYTHON_PACKAGE_CHECK([pythran])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1fa0fad3ae8f7e559c6fc315c6773a7d8aac0bfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:32:55 -0500
+Subject: Trac #29665: add Gentoo package information for pythran.
+
+---
+ build/pkgs/pythran/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pythran/distros/gentoo.txt
+
+diff --git a/build/pkgs/pythran/distros/gentoo.txt b/build/pkgs/pythran/distros/gentoo.txt
+new file mode 100644
+index 00000000..1bb7cdc
+--- /dev/null
++++ b/build/pkgs/pythran/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pythran
+-- 
+cgit v1.0-1-gd88e
+
+
+From d26370e5b8c88e76abfb7c27e3defb71c9e9f711 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:33:50 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for beniget.
+
+---
+ build/pkgs/beniget/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/beniget/spkg-configure.m4
+
+diff --git a/build/pkgs/beniget/spkg-configure.m4 b/build/pkgs/beniget/spkg-configure.m4
+new file mode 100644
+index 00000000..8ae6101
+--- /dev/null
++++ b/build/pkgs/beniget/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([beniget], [SAGE_PYTHON_PACKAGE_CHECK([beniget])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From eeeb296ed9b9694a865534103fd58e62a151ef5e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:34:22 -0500
+Subject: Trac #29665: add Gentoo package information for beniget.
+
+---
+ build/pkgs/beniget/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/beniget/distros/gentoo.txt
+
+diff --git a/build/pkgs/beniget/distros/gentoo.txt b/build/pkgs/beniget/distros/gentoo.txt
+new file mode 100644
+index 00000000..1a5972c
+--- /dev/null
++++ b/build/pkgs/beniget/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/beniget
+-- 
+cgit v1.0-1-gd88e
+
+
+From 078b2ff272d0eeff5cce40ad7eb176d9ddd7bdff Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:35:37 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for alabaster.
+
+---
+ build/pkgs/alabaster/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/alabaster/spkg-configure.m4
+
+diff --git a/build/pkgs/alabaster/spkg-configure.m4 b/build/pkgs/alabaster/spkg-configure.m4
+new file mode 100644
+index 00000000..4eca6e0
+--- /dev/null
++++ b/build/pkgs/alabaster/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([alabaster], [SAGE_PYTHON_PACKAGE_CHECK([alabaster])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7dc264353e5f64110431ff28c1b8b7e89699e9bd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:36:06 -0500
+Subject: Trac #29665: add Gentoo package information for alabaster.
+
+---
+ build/pkgs/alabaster/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/alabaster/distros/gentoo.txt
+
+diff --git a/build/pkgs/alabaster/distros/gentoo.txt b/build/pkgs/alabaster/distros/gentoo.txt
+new file mode 100644
+index 00000000..cffece6
+--- /dev/null
++++ b/build/pkgs/alabaster/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/alabaster
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8011a5e675e7e61a77ce34a299ee961a9f44253f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:43:59 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ importlib_metadata.
+
+---
+ build/pkgs/importlib_metadata/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/importlib_metadata/spkg-configure.m4
+
+diff --git a/build/pkgs/importlib_metadata/spkg-configure.m4 b/build/pkgs/importlib_metadata/spkg-configure.m4
+new file mode 100644
+index 00000000..0554e52
+--- /dev/null
++++ b/build/pkgs/importlib_metadata/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([importlib_metadata], [
++  SAGE_PYTHON_PACKAGE_CHECK([importlib_metadata])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 928ca0019e3ec6c4541a16b28bcc6710df6d010b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:44:28 -0500
+Subject: Trac #29665: add Gentoo package information for importlib_metadata.
+
+---
+ build/pkgs/importlib_metadata/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/importlib_metadata/distros/gentoo.txt
+
+diff --git a/build/pkgs/importlib_metadata/distros/gentoo.txt b/build/pkgs/importlib_metadata/distros/gentoo.txt
+new file mode 100644
+index 00000000..4f92786
+--- /dev/null
++++ b/build/pkgs/importlib_metadata/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/importlib_metadata
+-- 
+cgit v1.0-1-gd88e
+
+
+From 135f184f7498a2046065e669723e68efe2d65cee Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 21:16:58 -0500
+Subject: Trac #29665: fix sage.misc.package doctest with system alabaster.
+
+When alabaster from the system is used, these tests won't be able to
+find its SPKG installed. Add some ellipses, and switch one test to
+look for sage_conf instead.
+---
+ src/sage/misc/package.py | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/sage/misc/package.py b/src/sage/misc/package.py
+index 84f3d50..c7ad206 100644
+--- a/src/sage/misc/package.py
++++ b/src/sage/misc/package.py
+@@ -386,9 +386,9 @@ def installed_packages(exclude_pip=True):
+     EXAMPLES::
+ 
+         sage: sorted(installed_packages().keys())  # optional - build
+-        [...'alabaster', ...'sage_conf', ...]
+-        sage: installed_packages()['alabaster']  # optional - build, random
+-        '0.7.12'
++        [...'sage_conf', ...]
++        sage: installed_packages()['sage_conf']  # optional - build, random
++        '9.5'
+ 
+     .. SEEALSO::
+ 
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch b/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
new file mode 100644
index 000000000000..7ef3826aa4d2
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
@@ -0,0 +1,27 @@
+diff --git a/src/bin/sage-runtests b/src/bin/sage-runtests
+index 589dc8cd37..6bb8bf99a4 100755
+--- a/src/bin/sage-runtests
++++ b/src/bin/sage-runtests
+@@ -154,21 +154,4 @@ if __name__ == "__main__":
+     DC = DocTestController(args, args.filenames)
+     err = DC.run()
+ 
+-    try:
+-        exit_code_pytest = 0
+-        import pytest
+-        pytest_options = ["--import-mode", "importlib"]
+-        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.")
+-
+-    if err == 0:
+-        sys.exit(exit_code_pytest)
+-    else:
+-        sys.exit(err)
++    sys.exit(err)
diff --git a/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch b/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
new file mode 100644
index 000000000000..093e3d56eb33
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
@@ -0,0 +1,42 @@
+More site packages not included in trac 29665
+
+diff --git a/build/pkgs/gmpy2/spkg-configure.m4 b/build/pkgs/gmpy2/spkg-configure.m4
+new file mode 100644
+index 0000000000..2d0390f7db
+--- /dev/null
++++ b/build/pkgs/gmpy2/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([gmpy2], [SAGE_PYTHON_PACKAGE_CHECK([gmpy2])])
+diff --git a/build/pkgs/sphinx/spkg-configure.m4 b/build/pkgs/sphinx/spkg-configure.m4
+new file mode 100644
+index 0000000000..e149fbb2cf
+--- /dev/null
++++ b/build/pkgs/sphinx/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([sphinx], [SAGE_PYTHON_PACKAGE_CHECK([sphinx])])
+diff --git a/build/pkgs/typing_extensions/spkg-configure.m4 b/build/pkgs/typing_extensions/spkg-configure.m4
+new file mode 100644
+index 0000000000..d475fd8257
+--- /dev/null
++++ b/build/pkgs/typing_extensions/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([typing_extensions], [SAGE_PYTHON_PACKAGE_CHECK([typing_extensions])])
+-- 
+diff --git a/build/pkgs/gmpy2/install-requires.txt b/build/pkgs/gmpy2/install-requires.txt
+index 51d24518ef..c25feff557 100644
+--- a/build/pkgs/gmpy2/install-requires.txt
++++ b/build/pkgs/gmpy2/install-requires.txt
+@@ -1,3 +1 @@
+-# We would like to write gmpy2 >=2.1.0b5, but pipenv does not accept prereleases in version ranges
+-# https://github.com/pypa/pipenv/issues/1760
+-gmpy2 ==2.1.0rc1
++gmpy2 >=2.1
+diff --git a/build/pkgs/ptyprocess/install-requires.txt b/build/pkgs/ptyprocess/install-requires.txt
+index de89260872..7c336f636c 100644
+--- a/build/pkgs/ptyprocess/install-requires.txt
++++ b/build/pkgs/ptyprocess/install-requires.txt
+@@ -1,3 +1,3 @@
+-ptyprocess ==0.5.1
++ptyprocess
+ # https://trac.sagemath.org/ticket/31280#comment:42 and following
+ # sagelib is not compatible with ptyprocess 0.5.2, 0.6, and 0.7
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 33b40acbabeb..a32c5d18f378 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -22,11 +22,13 @@ distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
 checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
 python_version=3
 
-build_options="debug system_python3"
+build_options="debug system_python3 system_site_packages"
 desc_option_debug="Build with debug symbols"
 desc_option_system_python="Build using system python 3"
-build_options_default="system_python3"
+desc_option_system_python="Build using system python site-packages"
+build_options_default="system_python3 system_site_packages"
 configure_args+=" $(vopt_with system_python3)"
+configure_args+=" $(vopt_enable system_site_packages)"
 
 # path where sage will be installed
 _SAGE_ROOT=/usr/lib/sage-${version}
@@ -163,6 +165,8 @@ do_check() {
 	fi
 	if [ "$XBPS_CHECK_PKGS" = full ]; then
 		_test_args="--long $_test_args"
+	else
+		_test_args="--warn-long 5.0 $_test_args"
 	fi
 	# since make check will build the docs, run test like this instead
 	./sage -tp ${XBPS_MAKEJOBS} ${_test_args}
@@ -182,7 +186,7 @@ makedepends+=" automake gettext gettext-devel"
 # other host dependencies
 makedepends+=" cmake curl git ninja pandoc patch pkg-config python3 tox"
 
-# already in void
+# standard dependencies
 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
@@ -202,7 +206,49 @@ makedepends+="
  brial-devel cliquer-devel gfan libbraiding-devel libhomfly-devel
  lrcalc-devel nauty-devel palp tachyon
  maxima-ecl primesieve-devel primecount-devel
+ ffmpeg ImageMagick
 "
 
 # TODO: optional
 # 4ti2 coxeter3 libsemigroups lrslib pdf2svg perl_mongodb polymake
+
+# TODO: standard
+# cvxopt importlib_resources
+
+# python packages for trac-29665
+_sage_python3_modules="
+ python3-Babel python3-Jinja2 python3-MarkupSafe python3-Pillow
+ python3-Pygments python3-Sphinx python3-alabaster python3-argcomplete
+ python3-argon2 python3-attrs python3-backcall python3-beniget
+ python3-bleach python3-certifi python3-cffi python3-charset-normalizer
+ python3-cycler python3-dateutil python3-decorator python3-defusedxml
+ python3-docutils python3-entrypoints python3-flit_core python3-gast
+ python3-gmpy2 python3-html5lib python3-idna python3-imagesize
+ python3-importlib_metadata python3-ipython python3-ipython_genutils
+ python3-ipython_ipykernel python3-jedi python3-jsonschema
+ python3-jupyter_client python3-jupyter_core python3-jupyter_ipywidgets
+ python3-jupyter_nbconvert python3-jupyter_nbformat
+ python3-jupyter_notebook python3-jupyterlab_pygments python3-kiwisolver
+ python3-matplotlib python3-matplotlib-inline python3-mistune
+ python3-mpmath python3-nbclient python3-nest_asyncio python3-networkx
+ python3-numpy python3-packaging python3-pandocfilters python3-parsing
+ python3-parso python3-pexpect python3-pickleshare python3-pip
+ python3-pkgconfig python3-pluggy python3-ply python3-prometheus_client
+ python3-prompt_toolkit python3-ptyprocess python3-py python3-pybind11
+ python3-pycparser python3-pyrsistent python3-pytz python3-pyzmq
+ python3-requests python3-scipy python3-send2trash python3-setuptools
+ python3-setuptools_scm python3-simplegeneric python3-six
+ python3-snowballstemmer python3-sphinxcontrib-applehelp
+ python3-sphinxcontrib-devhelp python3-sphinxcontrib-htmlhelp
+ python3-sphinxcontrib-jsmath python3-sphinxcontrib-qthelp
+ python3-sphinxcontrib-serializinghtml python3-sympy python3-terminado
+ python3-testpath python3-texttable python3-toml python3-tomli
+ python3-tornado python3-traitlets python3-typing_extensions
+ python3-tzlocal python3-urllib3 python3-wcwidth python3-webencodings
+ python3-wheel python3-zipp pythran
+ "
+
+if [ "$build_option_system_site_packages" ]; then
+	makedepends+=" $_sage_python3_modules"
+	depends+=" $_sage_python3_modules"
+fi

From 91610a973d80ee0999ed95cece89fe3cc937a89c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 3 Jan 2022 20:47:52 -0300
Subject: [PATCH 24/35] sagemath: use small source tarball + upstream packages

---
 srcpkgs/sagemath/template | 97 ++++++++++++++++++++++++++-------------
 1 file changed, 64 insertions(+), 33 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index a32c5d18f378..0de0061b09df 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -18,8 +18,8 @@ short_desc="Open source mathematics software"
 maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
-distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
-checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
+distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
+checksum=aea4c5a8d3b32af2fba644269b9daf4f62471471ba2d7d83da0f8098a5f53225
 python_version=3
 
 build_options="debug system_python3 system_site_packages"
@@ -33,42 +33,72 @@ configure_args+=" $(vopt_enable system_site_packages)"
 # 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} ;;
-esac
+_SAGE_UPSTREAM_MIRROR=https://mirrors.mit.edu/sage/spkg/upstream
 
-# extra upstream packages (trac-32968 / trac-33040)
 _upstream="
- https://pypi.io/packages/source/s/sphinx/Sphinx-4.3.1.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
+${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
+${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
+${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
+${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
+${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
+${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
+${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
+https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
+https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
+http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
+${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
+${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
+${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
+${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
+${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
+https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
+${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
+https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
+${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
 "
 
 checksum+="
- 32a5b3e9a1b176cc25ed048557d4d3d01af635e6b76c5bc7a43b0a34447fbd45
-
- 9c87405839a19696e837b3b818fed3f5f69f16f1eec1a1ad77e043dcea9c772f
- fc4453705b81d03568d5b808ad8f09c77c47534f6ac2e72e733f9ca4714aa75c
- acad2d8b20a1af07d4e4c9d2e9285c5ed9104354062f275f3fcd88dcef4f1326
- 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
- 78884e7c1d4b00ce3cea67b44566851c4343c120abd683433ce934a68ea58872
- 0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86
- b8e2f83c56e141920c39464b852de3719dfbfb6e3c99a2d8da0edf4fb33176ed
- d9bdec0013ef1eb5a84ab39a3b3868911598afa494f5faa038647101504e2b81
- b2e9810e09c3a47b73ce9cab5a72243a1258f61e7900969097a817232246ce1c
- 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
- 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
+c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
+d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
+4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
+3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
+03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
+5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
+cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
+5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
+581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
+6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
+07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
+a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
+ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
+d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
+169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
+5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
+cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
+471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
+78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
+edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
+b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
+3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
+545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
+cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
+718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
+dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
 "
 
 for u in ${_upstream}; do
@@ -101,6 +131,7 @@ post_extract() {
 	mv -T $wrksrc $_SAGE_ROOT
 	ln -srfT $_SAGE_ROOT $wrksrc
 
+	mkdir -p $wrksrc/upstream
 	for u in ${_upstream}; do
 		cp "$XBPS_SRCDISTDIR/${pkgname}-${version}/${u##*[/>]}" $wrksrc/upstream
 	done

From f47e3159f3658b7feb26e960816040eca45934d7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 13:38:02 -0300
Subject: [PATCH 25/35] sagemath: for CI use fixed random-seed=0

---
 srcpkgs/sagemath/template | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 0de0061b09df..b5b99d2c122d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -194,6 +194,10 @@ do_check() {
 	if [ -z "$_test_args" ]; then
 		_test_args=--all
 	fi
+	if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
+		# for CI use a predictable random seed
+		_test_args="--random-seed=0 $_test_args"
+	fi
 	if [ "$XBPS_CHECK_PKGS" = full ]; then
 		_test_args="--long $_test_args"
 	else

From c7c8d9723267dadb847fad94aa8d3ed278e5b5f7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 14:40:27 -0300
Subject: [PATCH 26/35] sagemath: upstream two patches

---
 ...ble-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch} |  6 +++---
 ...rse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch} | 10 +++++-----
 2 files changed, 8 insertions(+), 8 deletions(-)
 rename srcpkgs/sagemath/patches/{0001-sage-site-exec-only-if-it-is-executable.patch => trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch} (94%)
 rename srcpkgs/sagemath/patches/{0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch => trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch} (81%)

diff --git a/srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch b/srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
similarity index 94%
rename from srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch
rename to srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
index ce17c6d6e954..7fdb3d697222 100644
--- a/srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch
+++ b/srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
@@ -1,14 +1,14 @@
 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
+Subject: 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
+index 4c0fa17..153e610 100755
 --- a/src/bin/sage
 +++ b/src/bin/sage
 @@ -129,7 +129,7 @@ usage() {
@@ -39,5 +39,5 @@ index 4c0fa17426..153e610a2e 100755
              # fallthrough if there is no sage-site script
          fi
 -- 
-2.34.1
+cgit v1.0-1-gd88e
 
diff --git a/srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch b/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
similarity index 81%
rename from srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch
rename to srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
index bab6d8441d42..350c41ac3928 100644
--- a/srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch
+++ b/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
@@ -1,16 +1,16 @@
-From 57e3eba28c9b4ee6bd3407d0715b8bd00aaf04a7 Mon Sep 17 00:00:00 2001
+From 53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6 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
+Subject: sagetex: Fix a warning when byte-compiling sagetexparse.py
 
 ---
- .../sagetex/patches/sagetex-fix-warning.patch    | 16 ++++++++++++++++
+ build/pkgs/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
+index 00000000..d82ab67
 --- /dev/null
 +++ b/build/pkgs/sagetex/patches/sagetex-fix-warning.patch
 @@ -0,0 +1,16 @@
@@ -31,5 +31,5 @@ index 0000000000..d82ab675dd
 +     self.result += t.code[1:-1] + '\n\n'
 + 
 -- 
-2.34.1
+cgit v1.0-1-gd88e
 

From ca8e4fac561d2cad96a50f5a8b7b9df708228f0c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 19:57:59 -0300
Subject: [PATCH 27/35] sagemath: reorder upstream sources and add two missing
 ones

---
 srcpkgs/sagemath/template | 60 ++++++++++++++++++++++-----------------
 1 file changed, 34 insertions(+), 26 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index b5b99d2c122d..f53cba947c88 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -36,69 +36,77 @@ _SAGE_ROOT=/usr/lib/sage-${version}
 _SAGE_UPSTREAM_MIRROR=https://mirrors.mit.edu/sage/spkg/upstream
 
 _upstream="
-${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
 ${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
 ${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
+
+${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
 ${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
 ${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
 ${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
 ${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
 ${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
 ${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
-https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
-https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
-http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
 ${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
 ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
 ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
 ${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
 ${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${PYPI_SITE}/P/PyCygwin/PyCygwin-0.1.tar.gz
 ${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
-https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+${PYPI_SITE}/s/setuptools/setuptools-59.2.0.tar.gz
 ${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
 ${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
-https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
 ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
+
+https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
+https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
+http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
+https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
 "
 
 checksum+="
-dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
 c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
 d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
+5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
+ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
+169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
+cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
+edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
+cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
+
+dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
 3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
 03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
 5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
 cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
-5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
-c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
-6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
-07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
 a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
-ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
 d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
-169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
 5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
-cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
 471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
 78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
-edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+45a5e295590c469a49b2804bfdb89059e942d768ad3b813f484d7b5bff48d226
 ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
-b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
-3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+157d21de9d055ab9e8ea3186d91e7f4f865e11f42deafa952d90842671fc2576
 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
 545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
-cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
-718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
 dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
+
+c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
+6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
+07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
+3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
 "
 
 for u in ${_upstream}; do

From c02eb8f9a314efa547139b40e7c64aded241a4ba Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 9 Jan 2022 12:45:47 -0300
Subject: [PATCH 28/35] sagemath: do not download anything patch

---
 .../patches/00-Do_not_download_anything.patch         | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 srcpkgs/sagemath/patches/00-Do_not_download_anything.patch

diff --git a/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch b/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch
new file mode 100644
index 000000000000..35aef7b8d456
--- /dev/null
+++ b/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch
@@ -0,0 +1,11 @@
+--- a/build/sage_bootstrap/tarball.py	2022-01-07 19:17:06.754747955 -0300
++++ b/build/sage_bootstrap/tarball.py	2022-01-07 19:25:31.844139381 -0300
+@@ -158,6 +158,8 @@
+                             .format(destination=destination))
+         successful_download = False
+         log.info('Attempting to download package {0} from mirrors'.format(self.filename))
++        log.info('ERROR: downloading is disabled, add file to template instead')
++        return
+         for mirror in MirrorList():
+             url = mirror + '/'.join(['spkg', 'upstream', self.package.name, self.filename])
+             log.info(url)

From 7188ce74b1e4a3f4c01159f136bf27ec3bb075f3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 9 Jan 2022 13:27:49 -0300
Subject: [PATCH 29/35] sagemath: update to 9.5.rc0.

---
 ...184f7498a2046065e669723e68efe2d65cee.patch |    6 +-
 ...1d4ced4264f65ab704f725f6f5879b012796.patch |  263 ----
 ...a54526829b79d5d236a40f83ddc6ce7b2696.patch | 1196 -----------------
 ...9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch |   27 -
 ...3f4f32246ad9ded6d37f1f2f12a589a81f4.patch} |    4 +-
 ...03138d0403be7c7cb303de2bc0a0e0b6793c.patch |   82 --
 ...f3a1611fed0cc66fb838eb85739646dd34d.patch} |   94 +-
 ...49c415e11d0522bff9013bc1509264b26ebf.patch |   27 +
 ...ip_doctest_singular_4.2.1--see_33134.patch |   13 +
 srcpkgs/sagemath/template                     |    6 +-
 10 files changed, 72 insertions(+), 1646 deletions(-)
 delete mode 100644 srcpkgs/sagemath/patches/trac-30766-system_python_3.10-df9f1d4ced4264f65ab704f725f6f5879b012796.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
 rename srcpkgs/sagemath/patches/{trac-33064-sage_docbuild_ignore_cache_save_permission_error-f767cf1eadfd8ab540a31c5c5ef09d56df09b90e.patch => trac-33064-sage_docbuild_ignore_cache_save_permission_error-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch} (92%)
 delete mode 100644 srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
 rename srcpkgs/sagemath/patches/{trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch => trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch} (63%)
 create mode 100644 srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch

diff --git a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
index b641113927e7..0ecb27c593cd 100644
--- a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
+++ b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
@@ -5615,9 +5615,9 @@ index 84f3d50..c7ad206 100644
      EXAMPLES::
  
          sage: sorted(installed_packages().keys())  # optional - build
--        [...'alabaster', ...'sage_conf', ...]
--        sage: installed_packages()['alabaster']  # optional - build, random
--        '0.7.12'
+-        [...'gmpy2', ...'sage_conf', ...]
+-        sage: installed_packages()['gmpy2']  # optional - build, random
+-        '2.1.0b5'
 +        [...'sage_conf', ...]
 +        sage: installed_packages()['sage_conf']  # optional - build, random
 +        '9.5'
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
deleted file mode 100644
index a1cb4c834482..000000000000
--- a/srcpkgs/sagemath/patches/trac-30766-system_python_3.10-df9f1d4ced4264f65ab704f725f6f5879b012796.patch
+++ /dev/null
@@ -1,263 +0,0 @@
-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-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch b/srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
deleted file mode 100644
index 3ae6fe01822d..000000000000
--- a/srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
+++ /dev/null
@@ -1,1196 +0,0 @@
-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/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch b/srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
deleted file mode 100644
index 485fb0176f45..000000000000
--- a/srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-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: 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 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"
- 
- # 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)
--- 
-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-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
similarity index 92%
rename from srcpkgs/sagemath/patches/trac-33064-sage_docbuild_ignore_cache_save_permission_error-f767cf1eadfd8ab540a31c5c5ef09d56df09b90e.patch
rename to srcpkgs/sagemath/patches/trac-33064-sage_docbuild_ignore_cache_save_permission_error-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
index 20fa12e570eb..04f04cfd6718 100644
--- 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-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
@@ -1,4 +1,4 @@
-From f767cf1eadfd8ab540a31c5c5ef09d56df09b90e Mon Sep 17 00:00:00 2001
+From e89193f4f32246ad9ded6d37f1f2f12a589a81f4 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
@@ -8,7 +8,7 @@ Subject: sage_docbuild: do not fail when cache cannot be saved
  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
+index 466ca82..f8c8ebd 100644
 --- a/src/sage_docbuild/__init__.py
 +++ b/src/sage_docbuild/__init__.py
 @@ -856,9 +856,12 @@ class ReferenceSubBuilder(DocBuilder):
diff --git a/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch b/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
deleted file mode 100644
index 6bc5193b75ee..000000000000
--- a/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-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
-
-
-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/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch b/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
similarity index 63%
rename from srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch
rename to srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
index 3794aa7f019b..04fca4815a00 100644
--- a/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch
+++ b/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
@@ -1,4 +1,4 @@
-From 7d3381b21e4716cfa8a33915621a12f0eba74233 Mon Sep 17 00:00:00 2001
+From 18d0477153af6f453a0e84f78030535f6a36ce87 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
@@ -10,56 +10,56 @@ Subject: doctests: remove dochtml label from some tests that don't need docs
  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
+index c788623..527ed90 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  # optional - sagemath_doc_html
+-        sage: thematic_index = os.path.join(SAGE_DOC, "html", "en", "thematic_tutorials", "index.html")  # optional - sagemath_doc_html
 +        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
+         sage: for line in open(thematic_index).readlines():  # optional - sagemath_doc_html
          ....:     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
+index 4c56aea..583ca06 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  # optional - sagemath_doc_html
+-    sage: docfilename = os.path.join(SAGE_DOC, 'html', 'en', 'reference', 'calculus', 'sage', 'symbolic', 'expression.html')  # optional - sagemath_doc_html
 +    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
+     sage: with open(docfilename) as fobj:  # optional - sagemath_doc_html
      ....:     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='',
+@@ -845,12 +845,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  # optional - sagemath_doc_html
+-        sage: len(_search_src_or_doc('src', r'matrix\(', 'incidence_structures', 'self', 'combinat', interact=False).splitlines()) > 1  # optional - sagemath_doc_html
 +        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)
+         sage: 'abvar/homology' in _search_src_or_doc('doc', 'homology', 'variety', interact=False)  # optional - sagemath_doc_html, 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)  # optional - sagemath_doc_html
 +        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:
+@@ -1369,7 +1369,7 @@ class _sage_doc:
  
-         sage: browse_sage_doc._open("reference", testing=True)[0]  # optional - dochtml, indirect doctest
+         sage: browse_sage_doc._open("reference", testing=True)[0]  # optional - sagemath_doc_html, 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]  # optional - sagemath_doc_html
 +        sage: browse_sage_doc(identity_matrix, 'rst')[-107:-47]
          'Full MatrixSpace of 3 by 3 sparse matrices over Integer Ring'
      """
@@ -68,7 +68,7 @@ index eb70516..b4848ed 100644
 cgit v1.0-1-gd88e
 
 
-From 42a76c3f82edecc9c6c53c661251677e3e907584 Mon Sep 17 00:00:00 2001
+From 88dd9f3a1611fed0cc66fb838eb85739646dd34d 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
@@ -78,7 +78,7 @@ Subject: doctests: add dochtml label to some tests that need docs installed
  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
+index f8c8ebd..d329009 100644
 --- a/src/sage_docbuild/__init__.py
 +++ b/src/sage_docbuild/__init__.py
 @@ -105,7 +105,7 @@ def builder_helper(type):
@@ -86,7 +86,7 @@ index 4a71c91..dd233bd 100644
          sage: from sage_docbuild import _build_many as build_many
          sage: helper = builder_helper("html")
 -        sage: try:
-+        sage: try:  # optional - dochtml
++        sage: try:  # optional - sagemath_doc_html
          ....:     build_many(build_ref_doc, [("docname", "en", "html", {})])
          ....: except Exception as E:
          ....:     "Non-exception during docbuild: abort pool operation" in str(E)
@@ -95,7 +95,7 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import DocBuilder
              sage: b = DocBuilder('tutorial')
 -            sage: b._output_dir('html')
-+            sage: b._output_dir('html')         # optional - dochtml
++            sage: b._output_dir('html')         # optional - sagemath_doc_html
              '.../html/en/tutorial'
          """
          d = os.path.join(SAGE_DOC, type, self.lang, self.name)
@@ -104,7 +104,7 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import DocBuilder
              sage: b = DocBuilder('tutorial')
 -            sage: b._doctrees_dir()
-+            sage: b._doctrees_dir()             # optional - docthml
++            sage: b._doctrees_dir()             # optional - sagemath_doc_html
              '.../doctrees/en/tutorial'
          """
          d = os.path.join(SAGE_DOC, 'doctrees', self.lang, self.name)
@@ -113,7 +113,7 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import ReferenceBuilder
              sage: b = ReferenceBuilder('reference')
 -            sage: b._output_dir('html')
-+            sage: b._output_dir('html')         # optional - dochtml
++            sage: b._output_dir('html')         # optional - sagemath_doc_html
              '.../html/en/reference'
          """
          if lang is None:
@@ -122,56 +122,10 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import ReferenceTopBuilder
              sage: b = ReferenceTopBuilder('reference')
 -            sage: b._output_dir('html')
-+            sage: b._output_dir('html')         # optional - dochtml
++            sage: b._output_dir('html')         # optional - sagemath_doc_html
              '.../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/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch b/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
new file mode 100644
index 000000000000..d32f1e4d5e9f
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
@@ -0,0 +1,27 @@
+From 836249c415e11d0522bff9013bc1509264b26ebf Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Sun, 9 Jan 2022 16:51:22 -0300
+Subject: trac 33135: add filter to ignore deprecation warnings
+
+---
+ src/sage/all.py | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/sage/all.py b/src/sage/all.py
+index 01ef327..19ca3d4 100644
+--- a/src/sage/all.py
++++ b/src/sage/all.py
+@@ -96,6 +96,10 @@ warnings.filterwarnings('ignore', category=DeprecationWarning,
+ warnings.filterwarnings('ignore', category=DeprecationWarning,
+                         module='pythran')
+ 
++warnings.filterwarnings('ignore', category=DeprecationWarning,
++                        message='The distutils(.sysconfig module| package) is deprecated',
++                        module='numpy|sage.env|sage.features')
++
+ ################ end setup warnings ###############################
+ 
+ 
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
new file mode 100644
index 000000000000..438078a92036
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage/rings/polynomial/hilbert.pyx b/src/sage/rings/polynomial/hilbert.pyx
+index 4cd91d0a46..323b168c4e 100644
+--- a/src/sage/rings/polynomial/hilbert.pyx
++++ b/src/sage/rings/polynomial/hilbert.pyx
+@@ -578,7 +578,7 @@ def hilbert_poincare_series(I, grading=None):
+ 
+     This example exceeded the capabilities of Singular before version 4.2.1p2::
+ 
+-        sage: J.hilbert_numerator(algorithm='singular')
++        sage: J.hilbert_numerator(algorithm='singular')   # not tested - requires singular 4.2.1p2
+         120*t^33 - 3465*t^32 + 48180*t^31 - 429374*t^30 + 2753520*t^29 - 13522410*t^28 + 52832780*t^27 - 168384150*t^26 + 445188744*t^25 - 987193350*t^24 + 1847488500*t^23 + 1372406746*t^22 - 403422496*t^21 - 8403314*t^20 - 471656596*t^19 + 1806623746*t^18 + 752776200*t^17 + 752776200*t^16 - 1580830020*t^15 + 1673936550*t^14 - 1294246800*t^13 + 786893250*t^12 - 382391100*t^11 + 146679390*t^10 - 42299400*t^9 + 7837830*t^8 - 172260*t^7 - 468930*t^6 + 183744*t^5 - 39270*t^4 + 5060*t^3 - 330*t^2 + 1
+ 
+     """
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f53cba947c88..f688629fc26d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -1,6 +1,6 @@
 # Template file for 'sagemath'
 pkgname=sagemath
-version=9.5.beta9
+version=9.5.rc0
 revision=1
 wrksrc=sage-$version
 build_style=configure
@@ -19,7 +19,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
-checksum=aea4c5a8d3b32af2fba644269b9daf4f62471471ba2d7d83da0f8098a5f53225
+checksum=8012e3ac35290fa9b2cb837eeca149925784c2378b486731226944e4afd8a4e6
 python_version=3
 
 build_options="debug system_python3 system_site_packages"
@@ -128,7 +128,7 @@ nostrip=yes
 noshlibprovides=yes
 
 # don't rewrite python shebang as sage uses its own python (for now)
-_no_python_shebang=yes
+#_no_python_shebang=yes
 
 # compile python code in sage venv
 pycompile_dirs="$_SAGE_ROOT/venv/"

From 2b4012f5cd01619ad31e809e7bbd97f91ddbea49 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 10 Jan 2022 16:32:54 -0300
Subject: [PATCH 30/35] sagemath: use system gap

---
 ...f491e5ce599ba185f5e93f02e0fcebd76c9e.patch | 57 +++++++++++++++++++
 .../patches/zzz-skip_doctest_system_gap.patch | 13 +++++
 srcpkgs/sagemath/template                     | 15 ++++-
 3 files changed, 82 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch

diff --git a/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch b/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
new file mode 100644
index 000000000000..da88a369db0d
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
@@ -0,0 +1,57 @@
+From 2c981351bb60089530b0598d3e9a909a23d4d4d8 Mon Sep 17 00:00:00 2001
+From: Thierry Thomas <thierry@FreeBSD.org>
+Date: Mon, 22 Mar 2021 03:04:12 +0100
+Subject: 29644: Add spkg-configure.m4 for gap
+
+---
+ build/pkgs/gap/spkg-configure.m4 | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+ create mode 100644 build/pkgs/gap/spkg-configure.m4
+
+diff --git a/build/pkgs/gap/spkg-configure.m4 b/build/pkgs/gap/spkg-configure.m4
+new file mode 100644
+index 00000000..91cd089
+--- /dev/null
++++ b/build/pkgs/gap/spkg-configure.m4
+@@ -0,0 +1,8 @@
++SAGE_SPKG_CONFIGURE([gap], [
++    SAGE_SPKG_DEPCHECK([gmp], [
++       AC_CHECK_HEADER([gap/system.h], [
++        AC_SEARCH_LIBS([GAP_COMM], [gap], [
++        ], [sage_spkg_install_gap=yes])
++       ], [sage_spkg_install_gap=yes])
++    ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2a41f491e5ce599ba185f5e93f02e0fcebd76c9e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Samuel=20Leli=C3=A8vre?= <samuel.lelievre@gmail.com>
+Date: Mon, 22 Mar 2021 03:05:31 +0100
+Subject: 29644: Add distro information for gap
+
+---
+ build/pkgs/gap/distros/fedora.txt | 1 +
+ build/pkgs/gap/distros/gentoo.txt | 1 +
+ 2 files changed, 2 insertions(+)
+ create mode 100644 build/pkgs/gap/distros/fedora.txt
+ create mode 100644 build/pkgs/gap/distros/gentoo.txt
+
+diff --git a/build/pkgs/gap/distros/fedora.txt b/build/pkgs/gap/distros/fedora.txt
+new file mode 100644
+index 00000000..ea4feae
+--- /dev/null
++++ b/build/pkgs/gap/distros/fedora.txt
+@@ -0,0 +1 @@
++gap
+diff --git a/build/pkgs/gap/distros/gentoo.txt b/build/pkgs/gap/distros/gentoo.txt
+new file mode 100644
+index 00000000..ea64ec9
+--- /dev/null
++++ b/build/pkgs/gap/distros/gentoo.txt
+@@ -0,0 +1 @@
++sci-mathematics/gap
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
new file mode 100644
index 000000000000..f132591d48ac
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage_setup/optional_extension.py b/src/sage_setup/optional_extension.py
+index f252849384..4034e3e196 100644
+--- a/src/sage_setup/optional_extension.py
++++ b/src/sage_setup/optional_extension.py
+@@ -80,7 +80,7 @@ def OptionalExtension(*args, **kwds):
+         sage: print(ext.__class__.__name__)
+         CythonizeExtension
+         sage: ext = OptionalExtension("foo", ["foo.c"], package="gap")
+-        sage: print(ext.__class__.__name__)
++        sage: print(ext.__class__.__name__)     # not tested - fails with system gap
+         Extension
+     """
+     try:
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f688629fc26d..02b0af4ad16d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -66,7 +66,6 @@ ${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
 ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
 
 https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
-https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
 http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
 https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
 https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
@@ -103,7 +102,6 @@ ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
 dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
 
 c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
-6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
 07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
 3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
 718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
@@ -159,6 +157,13 @@ pre_configure() {
 	export MAKE="make -j ${XBPS_MAKEJOBS}"
 }
 
+post_configure() {
+	# we set some variables, right after configure has created sage_conf.py
+	cat <<-EOF >> pkgs/sage-conf/sage_conf.py
+	GAP_ROOT_DIR = "/usr/share/gap"
+	EOF
+}
+
 # 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
@@ -248,7 +253,11 @@ makedepends+="
  gengetopt texinfo
  brial-devel cliquer-devel gfan libbraiding-devel libhomfly-devel
  lrcalc-devel nauty-devel palp tachyon
- maxima-ecl primesieve-devel primecount-devel
+ maxima-ecl primesieve-devel primecount-devel gap-devel
+"
+
+# optional dependencies
+makedepends+="
  ffmpeg ImageMagick
 "
 

From 17f74345467948997e9fa97736f41bb3e31ad795 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Wed, 12 Jan 2022 16:33:19 +0100
Subject: [PATCH 31/35] singular: update to 4.3.0

---
 common/shlibs                                 | 10 ++---
 .../patches/upstream_omalloc_new_musl.patch   | 40 -------------------
 .../patches/upstream_polys_test_musl.patch    | 22 ----------
 srcpkgs/singular/template                     |  7 ++--
 4 files changed, 9 insertions(+), 70 deletions(-)
 delete mode 100644 srcpkgs/singular/patches/upstream_omalloc_new_musl.patch
 delete mode 100644 srcpkgs/singular/patches/upstream_polys_test_musl.patch

diff --git a/common/shlibs b/common/shlibs
index c4b2c348f6f3..d35944228287 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4066,11 +4066,11 @@ libumfpack.so.5 SuiteSparse-5.10.1_1
 libecl.so.21.2 ecl-21.2.1_1
 libecm.so.1 ecm-7.0.4_3
 libcliquer.so.1 cliquer-1.22_1
-libSingular-4.2.1.so singular-4.2.1_1
-libfactory-4.2.1.so singular-4.2.1_1
-libpolys-4.2.1.so singular-4.2.1_1
-libomalloc-0.9.6.so singular-4.2.1_1
-libsingular_resources-4.2.1.so singular-4.2.1_1
+libSingular-4.3.0.so singular-4.3.0_1
+libfactory-4.3.0.so singular-4.3.0_1
+libpolys-4.3.0.so singular-4.3.0_1
+libomalloc-0.9.6.so singular-4.3.0_1
+libsingular_resources-4.3.0.so singular-4.3.0_1
 libbrial.so.3 brial-1.2.10_1
 libbrial_groebner.so.3 brial-1.2.10_1
 libm4ri-0.0.20200125.so m4ri-20200125_1
diff --git a/srcpkgs/singular/patches/upstream_omalloc_new_musl.patch b/srcpkgs/singular/patches/upstream_omalloc_new_musl.patch
deleted file mode 100644
index 354603bb2c44..000000000000
--- a/srcpkgs/singular/patches/upstream_omalloc_new_musl.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From e1643135645a3cc97af8659018defd2b8617bb4e Mon Sep 17 00:00:00 2001
-From: Hans Schoenemann <hannes@mathematik.uni-kl.de>
-Date: Thu, 23 Sep 2021 10:57:25 +0200
-Subject: [PATCH] omalloc: fix alignment stuff for "make check"
-
----
- omalloc/omtTest.c | 6 ------
- omalloc/omtTest.h | 2 +-
- 2 files changed, 1 insertion(+), 7 deletions(-)
-
-diff --git a/omalloc/omtTest.c b/omalloc/omtTest.c
-index 715fbb113c..75c8cdb210 100644
---- a/omalloc/omtTest.c
-+++ b/omalloc/omtTest.c
-@@ -70,12 +70,6 @@ void omtTestDebug(omMemCell cell)
-   }
- 
-   is_size = omSizeOfAddr(cell->addr);
--  if (!OM_IS_ALIGNED(is_size))
--  {
--    omReportError(omError_Unknown, omError_NoError, OM_FLR,
--                  "is_size == %u is unaligned", is_size);
--    return;
--  }
-   if (is_size < size)
-   {
-     omReportError(omError_Unknown, omError_NoError, OM_FLR,
-diff --git a/omalloc/omtTest.h b/omalloc/omtTest.h
-index a579d88011..6faa099c89 100644
---- a/omalloc/omtTest.h
-+++ b/omalloc/omtTest.h
-@@ -48,7 +48,7 @@ void TestFree(omMemCell cell);
- 
- #define IS_STICKY_BIN(spec) (spec & 1)
- // #define IS_STICKY_BIN(spec) (0)
--#define GET_SIZE(spec)      (spec & ((((unsigned long) 1) << 14) -1))
-+#define GET_SIZE(spec)      OM_ALIGN_SIZE((spec & ((((unsigned long) 1) << 14) -1)))
- #define SET_SIZE(spec, size) spec = ((spec & ~((((unsigned long) 1) << 14) -1)) | (size))
- #define IS_ALIGNED(spec)    (spec & (((unsigned long) 1) << 15))
- #define IS_ZERO(spec)       (spec & (((unsigned long) 1) << 16))
diff --git a/srcpkgs/singular/patches/upstream_polys_test_musl.patch b/srcpkgs/singular/patches/upstream_polys_test_musl.patch
deleted file mode 100644
index 73ee062e2f89..000000000000
--- a/srcpkgs/singular/patches/upstream_polys_test_musl.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From 6e2383111a18b2fa2d3421045625d1d424eb1e25 Mon Sep 17 00:00:00 2001
-From: Hans Schoenemann <hannes@mathematik.uni-kl.de>
-Date: Mon, 20 Sep 2021 15:13:36 +0200
-Subject: [PATCH] fix: make check: polys_test
-
----
- libpolys/tests/polys_test.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libpolys/tests/polys_test.h b/libpolys/tests/polys_test.h
-index 5526aa5a6b..5b4c561238 100644
---- a/libpolys/tests/polys_test.h
-+++ b/libpolys/tests/polys_test.h
-@@ -2481,7 +2481,7 @@ class PolysTestSuite : public CxxTest::TestSuite
-     {
-       for (int qi = 0; qi <= 100; qi++)
-       {
--        int c = rand() % 1000000;
-+        int c = rand() % 1000000+1; /* c must not be 0 */
-         poly qterm = p_ISet(c, r); p_SetExp(qterm, 1, qi, r);
-         p_Setm(qterm, r);
-         number qtermAsN = toFractionNumber(qterm, cf);
diff --git a/srcpkgs/singular/template b/srcpkgs/singular/template
index d3af1c8b919b..a3e1dcc0b35f 100644
--- a/srcpkgs/singular/template
+++ b/srcpkgs/singular/template
@@ -1,6 +1,6 @@
 # Template file for 'singular'
 pkgname=singular
-version=4.2.1
+version=4.3.0
 revision=1
 build_style=gnu-configure
 configure_args="--with-readline=ncurses
@@ -18,8 +18,9 @@ short_desc="Computer algebra system for polynomial computations"
 maintainer="dkwo <nicolopiazzalunga@gmail.com>"
 license="GPL-2.0-or-later"
 homepage="https://www.singular.uni-kl.de"
-distfiles="https://service.mathematik.uni-kl.de/ftp/pub/Math/Singular/src/${version//./-}/singular-${version}.tar.gz"
-checksum=28a56df84f85b116e0068ffecf92fbe08fc27bd4c5ba902997f1a367db0bfe8d
+# distfiles="https://service.mathematik.uni-kl.de/ftp/pub/Math/Singular/src/${version//./-}/singular-${version}.tar.gz"
+distfiles="ftp://jim.mathematik.uni-kl.de/pub/Math/Singular/SOURCES/${version//./-}/singular-${version}.tar.gz"
+checksum=74f38288203720e3f280256f2f8deb94030dd032b4237d844652aff0faab36e7
 
 if [ -z "$CROSS_BUILD" ]; then
 	makedepends+=" ntl-devel"

From 7f3687e79dd82f1464b6a55378790b13f9409f44 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Thu, 13 Jan 2022 03:21:19 -0300
Subject: [PATCH 32/35] sagemath: fixes for system gap

---
 .../zzz-fixes_for_system_gap--see_29644.patch | 96 +++++++++++++++++++
 .../patches/zzz-skip_doctest_system_gap.patch | 13 ---
 srcpkgs/sagemath/template                     |  1 +
 3 files changed, 97 insertions(+), 13 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
 delete mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch

diff --git a/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch b/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
new file mode 100644
index 000000000000..741d2b23a7f5
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
@@ -0,0 +1,96 @@
+From 346b4ea4c92f4287d3c097b92817cf2abfcddd8c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Thu, 13 Jan 2022 01:41:31 -0300
+Subject: [PATCH] gap: fixes for using system gap
+
+ - fix _get_shared_lib_path() so we don't need to configure GAP_SO
+ - fix gap_root() so we don't need to configure GAP_ROOT_DIR
+ - skip a useless test that cannot succeed on system gap
+ - use gap_root() in saved_workspace.py instead of GAP_ROOT_DIR
+---
+ src/sage/env.py                      |  2 +-
+ src/sage/libs/gap/saved_workspace.py |  4 ++--
+ src/sage/libs/gap/util.pyx           | 11 +++++++++++
+ src/sage_setup/optional_extension.py |  2 +-
+ 4 files changed, 15 insertions(+), 4 deletions(-)
+
+diff --git a/src/sage/env.py b/src/sage/env.py
+index c4953cfa65..c16696d298 100644
+--- a/src/sage/env.py
++++ b/src/sage/env.py
+@@ -293,7 +293,7 @@ def _get_shared_lib_path(*libnames: str) -> Optional[str]:
+             if sys.platform == 'darwin':
+                 ext = 'dylib'
+             else:
+-                ext = 'so'
++                ext = 'so*'
+ 
+             if SAGE_LOCAL:
+                 search_directories.append(Path(SAGE_LOCAL) / 'lib')
+diff --git a/src/sage/libs/gap/saved_workspace.py b/src/sage/libs/gap/saved_workspace.py
+index ad5adec36d..59c498795f 100644
+--- a/src/sage/libs/gap/saved_workspace.py
++++ b/src/sage/libs/gap/saved_workspace.py
+@@ -8,7 +8,7 @@ workspaces.
+ 
+ import os
+ import glob
+-from sage.env import GAP_ROOT_DIR
++from sage.libs.gap.util import gap_root
+ from sage.interfaces.gap_workspace import gap_workspace_file
+ 
+ 
+@@ -31,7 +31,7 @@ def timestamp():
+     """
+     libgap_dir = os.path.dirname(__file__)
+     libgap_files = glob.glob(os.path.join(libgap_dir, '*'))
+-    gap_packages = glob.glob(os.path.join(GAP_ROOT_DIR, 'pkg', '*'))
++    gap_packages = glob.glob(os.path.join(gap_root(), 'pkg', '*'))
+     files = libgap_files + gap_packages
+     if len(files) == 0:
+         print('Unable to find LibGAP files.')
+diff --git a/src/sage/libs/gap/util.pyx b/src/sage/libs/gap/util.pyx
+index 08c4c40cc0..c7dd557c35 100644
+--- a/src/sage/libs/gap/util.pyx
++++ b/src/sage/libs/gap/util.pyx
+@@ -23,6 +23,7 @@ from cysignals.signals cimport sig_on, sig_off
+ import os
+ import warnings
+ import sage.env
++import subprocess
+ 
+ from .gap_includes cimport *
+ from .element cimport *
+@@ -178,6 +179,16 @@ def gap_root():
+     if os.path.exists(sage.env.GAP_ROOT_DIR):
+         return sage.env.GAP_ROOT_DIR
+ 
++    gap_expr = 'JoinStringsWithSeparator(KERNEL_INFO().GAP_ROOT_PATHS,";")'
++    gap_root_paths = subprocess.getoutput(
++        f"gap -r -q --bare --nointeract -c 'Display({gap_expr});'"
++        ).strip().split(';')
++
++    for gapdir in gap_root_paths:
++        if os.path.exists(os.path.join(gapdir, 'sysinfo.gap')):
++            sage.env.GAP_ROOT_DIR = gapdir
++            return gapdir
++
+     # Attempt to figure out the appropriate GAP_ROOT by reading the
+     # local/bin/gap shell script; this is an ugly hack that exists for
+     # historical reasons; the best approach to setting where Sage looks for
+diff --git a/src/sage_setup/optional_extension.py b/src/sage_setup/optional_extension.py
+index f252849384..4034e3e196 100644
+--- a/src/sage_setup/optional_extension.py
++++ b/src/sage_setup/optional_extension.py
+@@ -80,7 +80,7 @@ def OptionalExtension(*args, **kwds):
+         sage: print(ext.__class__.__name__)
+         CythonizeExtension
+         sage: ext = OptionalExtension("foo", ["foo.c"], package="gap")
+-        sage: print(ext.__class__.__name__)
++        sage: print(ext.__class__.__name__)     # not tested - fails with system gap
+         Extension
+     """
+     try:
+-- 
+2.34.1
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
deleted file mode 100644
index f132591d48ac..000000000000
--- a/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/src/sage_setup/optional_extension.py b/src/sage_setup/optional_extension.py
-index f252849384..4034e3e196 100644
---- a/src/sage_setup/optional_extension.py
-+++ b/src/sage_setup/optional_extension.py
-@@ -80,7 +80,7 @@ def OptionalExtension(*args, **kwds):
-         sage: print(ext.__class__.__name__)
-         CythonizeExtension
-         sage: ext = OptionalExtension("foo", ["foo.c"], package="gap")
--        sage: print(ext.__class__.__name__)
-+        sage: print(ext.__class__.__name__)     # not tested - fails with system gap
-         Extension
-     """
-     try:
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 02b0af4ad16d..0d8ce1f7a70a 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -161,6 +161,7 @@ post_configure() {
 	# we set some variables, right after configure has created sage_conf.py
 	cat <<-EOF >> pkgs/sage-conf/sage_conf.py
 	GAP_ROOT_DIR = "/usr/share/gap"
+	GAP_SO = "$(objdump -p /usr/lib/libgap.so | awk '/SONAME/{print $2}')"
 	EOF
 }
 

From 2ab2e840e0a5bcc4fa23f0ea72c805d1d800787f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Thu, 13 Jan 2022 15:47:33 -0300
Subject: [PATCH 33/35] New package: sagemath-test

---
 srcpkgs/sagemath-test/template                | 32 +++++++++++++++++++
 .../patches/zzz-skip_doctest_shebang.patch    | 11 +++++++
 2 files changed, 43 insertions(+)
 create mode 100644 srcpkgs/sagemath-test/template
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch

diff --git a/srcpkgs/sagemath-test/template b/srcpkgs/sagemath-test/template
new file mode 100644
index 000000000000..3e0b1c3233fd
--- /dev/null
+++ b/srcpkgs/sagemath-test/template
@@ -0,0 +1,32 @@
+# Template file for 'sagemath-test'
+pkgname=sagemath-test
+version=1
+revision=1
+build_style=meta
+checkdepends="sagemath"
+short_desc="Dummy package to test sagemath"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-2.0-or-later"
+homepage="none"
+
+# TODO: install base-voidstrap, uninstall base-chroot, and remove orphans
+# so we can check sagemath depends are enough to run sage on void
+
+do_check() {
+	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
+		_test_args=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	fi
+	if [ -z "$_test_args" ]; then
+		_test_args=--all
+	fi
+	if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
+		# for CI use a predictable random seed
+		_test_args="--random-seed=0 $_test_args"
+	fi
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args="--long $_test_args"
+	else
+		_test_args="--warn-long 5.0 $_test_args"
+	fi
+	/usr/bin/sage* -tp ${XBPS_MAKEJOBS} ${_test_args}
+}
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch
new file mode 100644
index 000000000000..04fa2acbf3ec
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch
@@ -0,0 +1,11 @@
+--- a/src/sage/tests/cmdline.py
++++ b/src/sage/tests/cmdline.py
+@@ -488,7 +488,7 @@ def test_executable(args, input="", timeout=100.0, pydebug_ignore_warnings=False
+         0
+ 
+         sage: (out, err, ret) = test_executable(["sage", "--cython"])
+-        sage: print(err)
++        sage: print(err)  # not tested - broken when shebang is rewritten
+         Cython (http://cython.org) is a compiler for code written in the
+         Cython language.  Cython is based on Pyrex by Greg Ewing.
+         ...

From 90661477b11187145ce077aab855c4e7c97caee9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 11:34:23 -0300
Subject: [PATCH 34/35] sagemath: cleanup and one patch

---
 .../zzz-skip_doctest_sage_setup_find.patch    | 12 +++++++++
 srcpkgs/sagemath/template                     | 27 +++----------------
 2 files changed, 16 insertions(+), 23 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch

diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch
new file mode 100644
index 000000000000..15aed02f9aaa
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch
@@ -0,0 +1,12 @@
+--- a/src/sage_setup/find.py
++++ b/src/sage_setup/find.py
+@@ -301,7 +301,7 @@ def find_extra_files(src_dir, modules, cythonized_dir, special_filenames=[]):
+         sage: extras["sage/libs/mpfr"]
+         [...sage/libs/mpfr/types.pxd...]
+         sage: extras["sage/ext/interpreters"]
+-        ['.../src/sage/ext/interpreters/wrapper_cdf.pxd', ...wrapper_cdf.h...]
++        ['.../src/sage/ext/interpreters/wrapper_cdf.pxd', ...]
+     """
+     from Cython.Utils import is_package_dir
+ 
+--
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 0d8ce1f7a70a..3819fa261ce0 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -22,13 +22,8 @@ distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
 checksum=8012e3ac35290fa9b2cb837eeca149925784c2378b486731226944e4afd8a4e6
 python_version=3
 
-build_options="debug system_python3 system_site_packages"
+build_options="debug"
 desc_option_debug="Build with debug symbols"
-desc_option_system_python="Build using system python 3"
-desc_option_system_python="Build using system python site-packages"
-build_options_default="system_python3 system_site_packages"
-configure_args+=" $(vopt_with system_python3)"
-configure_args+=" $(vopt_enable system_site_packages)"
 
 # path where sage will be installed
 _SAGE_ROOT=/usr/lib/sage-${version}
@@ -112,9 +107,6 @@ for u in ${_upstream}; do
 	skip_extraction+=" ${u##*[/>]}"
 done
 
-# 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
@@ -165,16 +157,6 @@ post_configure() {
 	EOF
 }
 
-# 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() {
 	vlicense COPYING.txt
 	vdoc README.md
@@ -301,7 +283,6 @@ _sage_python3_modules="
  python3-wheel python3-zipp pythran
  "
 
-if [ "$build_option_system_site_packages" ]; then
-	makedepends+=" $_sage_python3_modules"
-	depends+=" $_sage_python3_modules"
-fi
+# python packages are build and runtime dependencies
+makedepends+=" $_sage_python3_modules"
+depends+=" $_sage_python3_modules"

From acbda63705de91951065ddc65f77d562e09dac6a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 11:34:32 -0300
Subject: [PATCH 35/35] sagemath: update to 9.5.rc1.

---
 srcpkgs/sagemath/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 3819fa261ce0..4f379c81a950 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -1,6 +1,6 @@
 # Template file for 'sagemath'
 pkgname=sagemath
-version=9.5.rc0
+version=9.5.rc1
 revision=1
 wrksrc=sage-$version
 build_style=configure
@@ -19,7 +19,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
-checksum=8012e3ac35290fa9b2cb837eeca149925784c2378b486731226944e4afd8a4e6
+checksum=b015c54f7411669ef70bac2b2fde260e7f45724bcff170957b1f9fd08131f2c3
 python_version=3
 
 build_options="debug"

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.rc0
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (187 preceding siblings ...)
  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
                   ` (59 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-14 14:48 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1013190795

Comment:
Updated to 9.5.rc1, some cleanup, added a patch for the one failing doctest in the previous run. Hopefully all tests will pass now both in the build tree and in the installed tree.

Other pending PR:
- [ ] #34789 update python3-Sphinx to 4.3.2 (needs review/testing)
- [ ] #35012 update singular to 4.3.0 (waiting for an official release?)

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: sagemath-9.5.rc1
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (188 preceding siblings ...)
  2022-01-14 14:48 ` tornaria
@ 2022-01-14 15:21 ` tornaria
  2022-01-14 15:24 ` tornaria
                   ` (58 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-14 15:21 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 627 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.rc1
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: 617716 bytes --]

From 04b92029403d4e821e420c537d5db0ad96ebac29 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/35] 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 a27e0f5fec84124b595dc5d73f68368880884218 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/35] 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 4bc8965fe4fc0f8c3fe01b250030349a613b48f7 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/35] 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 dc5f2a43a2b34aeb89608c88d0b0925c837a15f3 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/35] 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 aa4c7b4b60fe209a887af6bcf2c8a043dc1c40a9 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/35] 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 53017cc0122dcd0664bdb4d51c663ed46fdddad5 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/35] 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 c193edbb5a3c35dbd4bf82ca2e6a5c4bf9826a28 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/35] 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 585e92ca9970b626d0d2588a547d95acdefe63f7 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/35] 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 d3304fec4c4a9654331bc6cffd9d4d14100b2324 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/35] 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 7dd878f1d56f2928d63481ff3ee36380ce3f8bf0 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/35] 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 994be37f905da7325ddab983112f066ebfb7cf90 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/35] 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 1bce42706861ba56cda2956bbf8a19785a27d5fb 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/35] 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 2b9585cacf12f00cc2f8e8d9deca16529a9b3ec2 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/35] 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 e19ae01d85b30ef684edcc21dbd0fb06007cd2ef 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/35] 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 a9699c1f1c33882d852ed97feab1ce8bf7825b5f 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/35] 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 15eb42c54ade69f2f0d241e9496b5fcaa5b281b2 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/35] 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 abdeea21fbf3b3e6a6384df81c6f86b6f9256ab1 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/35] 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 39897943d63d360b1ab2aba9c4eaeab4fcef68cc 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/35] 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 957a1378d32aa66a6aca06e54ab0c5fe48f898dc 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/35] 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

From d8574311fa4f7fa51f145dd36c45b6c0ad7f2ef1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 27 Dec 2021 20:19:19 -0300
Subject: [PATCH 20/35] sagemath: fix license and tests

Now tests can be run with -Q (normal) or -K (--long)
---
 srcpkgs/sagemath/template | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index c5009269c7fc..33b40acbabeb 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -16,7 +16,7 @@ depends="giac git FlintQS zn_poly sympow
  "
 short_desc="Open source mathematics software"
 maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
-license="GPL-3.0-or-later"
+license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
 checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
@@ -155,15 +155,17 @@ do_install() {
 }
 
 do_check() {
-	TEST=--all
 	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
-		TEST="$(sed -e 's/#.*//' ${XBPS_DISTDIR}/sagemath-check)"
+		_test_args=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	fi
+	if [ -z "$_test_args" ]; then
+		_test_args=--all
+	fi
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args="--long $_test_args"
 	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} ${OPT} ${TEST}
-	#./sage -t ${OPT} ${TEST}
+	./sage -tp ${XBPS_MAKEJOBS} ${_test_args}
 }
 
 ### copied from sage-deps, to be kept in sync

From a80a492b4e3a6db8671f017d36c5cc09580733d8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 28 Dec 2021 23:08:17 -0300
Subject: [PATCH 21/35] sagemath: fix long time test

---
 .../patches/zzz-fix_long_time_test--see_33091.patch | 13 +++++++++++++
 ...=> zzz-skip_doctest_giac-1.7.0--see_31563.patch} |  0
 2 files changed, 13 insertions(+)
 create mode 100644 srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
 rename srcpkgs/sagemath/patches/{skip-doctest-giac-1.7.0--see-trac-31563.patch => zzz-skip_doctest_giac-1.7.0--see_31563.patch} (100%)

diff --git a/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch b/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
new file mode 100644
index 000000000000..ca360dee9f6e
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage/matrix/matrix2.pyx b/src/sage/matrix/matrix2.pyx
+index 7d319bd54b..c1a2eed6f1 100644
+--- a/src/sage/matrix/matrix2.pyx
++++ b/src/sage/matrix/matrix2.pyx
+@@ -17215,7 +17215,7 @@ cdef class Matrix(Matrix1):
+ 
+             sage: set_random_seed()
+             sage: K = random_cone(max_ambient_dim=5)
+-            sage: all(L.change_ring(SR).is_Z_operator_on(K)
++            sage: all(L.change_ring(SR).is_Z_operator_on(K) # long time
+             ....:     for L in K.Z_operators_gens())  # long time
+             True
+ 
diff --git a/srcpkgs/sagemath/patches/skip-doctest-giac-1.7.0--see-trac-31563.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_31563.patch
similarity index 100%
rename from srcpkgs/sagemath/patches/skip-doctest-giac-1.7.0--see-trac-31563.patch
rename to srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_31563.patch

From f41c60f4c510533562e12e7f2d14fb74a0e465ac Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 31 Dec 2021 13:52:34 -0300
Subject: [PATCH 22/35] python3-Sphinx: update to 4.3.2.

---
 srcpkgs/python3-Sphinx/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/python3-Sphinx/template b/srcpkgs/python3-Sphinx/template
index 8b0493c1f92c..29f892d16157 100644
--- a/srcpkgs/python3-Sphinx/template
+++ b/srcpkgs/python3-Sphinx/template
@@ -1,6 +1,6 @@
 # Template file for 'python3-Sphinx'
 pkgname=python3-Sphinx
-version=4.2.0
+version=4.3.2
 revision=1
 wrksrc=Sphinx-${version}
 build_style=python3-module
@@ -17,8 +17,9 @@ short_desc="Python 3 documentation generator"
 maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
 license="BSD-3-Clause"
 homepage="http://sphinx-doc.org"
+changelog="https://www.sphinx-doc.org/en/master/changes.html"
 distfiles="${PYPI_SITE}/S/Sphinx/Sphinx-${version}.tar.gz"
-checksum=94078db9184491e15bce0a56d9186e0aec95f16ac20b12d00e06d4e36f1058a6
+checksum=0a8836751a68306b3fe97ecbe44db786f8479c3bf4b80e3a7f5c838657b4698c
 conflicts="python-Sphinx>=0"
 
 post_install() {

From 6ecd365f42d0db5810b29f1bebcd59e9a2ea73d6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 28 Dec 2021 23:08:17 -0300
Subject: [PATCH 23/35] sagemath: use system python site-packages

 - patch from #29665 for that
 - patch on top of that to allow a few more python packages:
   gmpy2, sphinx, typing_extensions, ptyprocess
 - add all available python packages to makedepends and depends
 - add ffmpeg and ImageMagick to makedepends
 - in standard check (-Q) warn if individual test > 5.0s
---
 ...184f7498a2046065e669723e68efe2d65cee.patch | 5629 +++++++++++++++++
 .../zzz-dont_run_pytest--see_31924.patch      |   27 +
 .../zzz-more_site_packages_not_in_29665.patch |   42 +
 srcpkgs/sagemath/template                     |   52 +-
 4 files changed, 5747 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch

diff --git a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
new file mode 100644
index 000000000000..b641113927e7
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
@@ -0,0 +1,5629 @@
+From 05fcaabe95082f42ba134780d579390d7b6153e2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 19:30:58 -0400
+Subject: Trac #29665: add --enable-system-site-packages option to ./configure.
+
+This new option is experimental and disabled by default. When it is
+enabled, the string "--system-site-packages" is appended to a new
+environment variable SAGE_VENV_FLAGS that is then passed to the
+sage-venv command during the build using autoconf substitution.
+Thusly the correct setting finds its way into local/pyvenv.cfg.
+---
+ build/make/Makefile.in |  2 +-
+ configure.ac           | 11 +++++++++++
+ 2 files changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/build/make/Makefile.in b/build/make/Makefile.in
+index f870cc3..68627ab 100644
+--- a/build/make/Makefile.in
++++ b/build/make/Makefile.in
+@@ -211,7 +211,7 @@ endif
+ inst_python3_venv = $(SAGE_VENV)/pyvenv.cfg
+ 
+ $(inst_python3_venv):
+-	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv "$(SAGE_VENV)"
++	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv @SAGE_VENV_FLAGS@ "$(SAGE_VENV)"
+ endif
+ 
+ # Build everything and start Sage.
+diff --git a/configure.ac b/configure.ac
+index 351f487..db30a91 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -435,6 +435,17 @@ AC_ARG_ENABLE([download-from-upstream-url],
+   [AS_HELP_STRING([--enable-download-from-upstream-url],
+     [allow downloading packages from their upstream URL if they cannot be found on the Sage mirrors])])
+ 
++AC_ARG_ENABLE(
++  [system-site-packages], [AS_HELP_STRING(
++    [--enable-system-site-packages],
++    [allow sage to use python packages from the system (experimental; default: no)]
++  )], [
++  AS_IF([test "x$enable_system_site_packages" = "xyes"], [
++    SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
++  ])
++])
++AC_SUBST([SAGE_VENV_FLAGS])
++
+ SAGE_SPKG_OPTIONS=""
+ AS_IF([test "x$enable_experimental_packages" = "xyes"], [
+   AS_VAR_APPEND([SAGE_SPKG_OPTIONS], [" -y"])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9372d1f663edf4e89f9c186336815ca04cff59dc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 19:41:14 -0400
+Subject: Trac #29665: new SAGE_PYTHON_PACKAGE_CHECK() autoconf macro.
+
+This new macro encapsulates the check for system installations of
+python packages. It uses setuptools.version's pkg_resources to
+check if the contents of install-requires.txt are satisfied for
+the given package; and if not, tells the build system to install
+the SPKG instead.
+---
+ m4/sage_python_package_check.m4 | 49 +++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 49 insertions(+)
+ create mode 100644 m4/sage_python_package_check.m4
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+new file mode 100644
+index 00000000..77b0a0c
+--- /dev/null
++++ b/m4/sage_python_package_check.m4
+@@ -0,0 +1,49 @@
++#
++# SYNOPSIS
++#
++#   SAGE_PYTHON_PACKAGE_CHECK(package)
++#
++# DESCRIPTION
++#
++#   Determine if the system copy of a python package can be used by sage.
++#
++#   This macro uses setuptools.version's pkg_resources to check that the
++#   "install-requires.txt" file for the named package is satisfied, and
++#   it can typically fail in four ways:
++#
++#     1. If --enable-system-site-packages was not passed to ./configure,
++#
++#     2. If we are not using the system python (no $PYTHON_FOR_VENV),
++#
++#     3. If setuptools is not available to the system python,
++#
++#     4. If the contents of install-requires.txt are not met (wrong
++#        version, no version, etc.) by the system python.
++#
++#   In any of those cases, we set sage_spkg_install_$package to "yes"
++#   so that the corresponding SPKG is installed. Otherwise, we do
++#   nothing, since the default value of sage_spkg_install_$package
++#   is "no" (to use the system copy).
++#
++#   The SAGE_SPKG_CONFIGURE_PYTHON3() macro is AC_REQUIRE'd to ensure
++#   that $PYTHON_FOR_VENV is available, if it is going to be available.
++#
++
++AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
++  AS_IF([test "${enable_system_site_packages}" = "yes"], [
++    AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
++
++    dnl strip all comments from install-requires.txt; this should leave
++    dnl only a single line containing the version specification for this
++    dnl package.
++    SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
++    AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++    AS_IF(
++      ["${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())"],
++      [AC_MSG_RESULT(yes)],
++      [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
++    )
++  ], [
++    sage_spkg_install_$1=yes
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a0dac8ad81ad6369d479bba30d2388de59e5cecb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:21:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for py.
+
+---
+ build/pkgs/py/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/py/spkg-configure.m4
+
+diff --git a/build/pkgs/py/spkg-configure.m4 b/build/pkgs/py/spkg-configure.m4
+new file mode 100644
+index 00000000..ded7034
+--- /dev/null
++++ b/build/pkgs/py/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([py], [SAGE_PYTHON_PACKAGE_CHECK([py])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 87c463a25ab4432dc1fba4f7a9703284e5b8f620 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:24:15 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for wheel.
+
+---
+ build/pkgs/wheel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wheel/spkg-configure.m4
+
+diff --git a/build/pkgs/wheel/spkg-configure.m4 b/build/pkgs/wheel/spkg-configure.m4
+new file mode 100644
+index 00000000..7897ea9
+--- /dev/null
++++ b/build/pkgs/wheel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([wheel], [SAGE_PYTHON_PACKAGE_CHECK([wheel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 804094b3a980f262f4d53d7be8b1be43ac0c55e0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:25:15 -0400
+Subject: Trac #29665: new spkg-configure.m4 for cvxopt.
+
+This includes a SAGE_SPKG_DEPCHECK([gsl glpk suitesparse],... because
+those C dependencies wind up linked into shared libraries like,
+
+  /usr/.../cvxopt/glpk.cpython-39-x86_64-linux-gnu.so
+
+that could potentially conflict with (for example) the glpk SPKG.
+---
+ build/pkgs/cvxopt/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/cvxopt/spkg-configure.m4
+
+diff --git a/build/pkgs/cvxopt/spkg-configure.m4 b/build/pkgs/cvxopt/spkg-configure.m4
+new file mode 100644
+index 00000000..c4aa619
+--- /dev/null
++++ b/build/pkgs/cvxopt/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([cvxopt], [
++  SAGE_SPKG_DEPCHECK([gsl glpk suitesparse], [
++    SAGE_PYTHON_PACKAGE_CHECK([cvxopt])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3f171955ff8d15da2c98aee0d2e254e95a55a2b5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:28:10 -0400
+Subject: Trac #29665: new spkg-configure.m4 for pyzmq.
+
+This includes a SAGE_SPKG_DEPCHECK([zeromq],... because libzmq winds
+up linked into shared libraries like,
+
+  /usr/.../zmq/backend/cython/message.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the zeromq SPKG.
+---
+ build/pkgs/pyzmq/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/pyzmq/spkg-configure.m4
+
+diff --git a/build/pkgs/pyzmq/spkg-configure.m4 b/build/pkgs/pyzmq/spkg-configure.m4
+new file mode 100644
+index 00000000..ae2b126
+--- /dev/null
++++ b/build/pkgs/pyzmq/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([pyzmq], [
++  SAGE_SPKG_DEPCHECK([zeromq], [
++    SAGE_PYTHON_PACKAGE_CHECK([pyzmq])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20d3aa9da9fc98a6e6a47599cd1b6d1d3785a4c4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:31:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for requests.
+
+---
+ build/pkgs/requests/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/requests/spkg-configure.m4
+
+diff --git a/build/pkgs/requests/spkg-configure.m4 b/build/pkgs/requests/spkg-configure.m4
+new file mode 100644
+index 00000000..f50a66c
+--- /dev/null
++++ b/build/pkgs/requests/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([requests], [SAGE_PYTHON_PACKAGE_CHECK([requests])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4df57ee47f2576b6b7bf9265248e06e90616b689 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:13:34 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for six.
+
+---
+ build/pkgs/six/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/six/spkg-configure.m4
+
+diff --git a/build/pkgs/six/spkg-configure.m4 b/build/pkgs/six/spkg-configure.m4
+new file mode 100644
+index 00000000..a382b81
+--- /dev/null
++++ b/build/pkgs/six/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([six], [SAGE_PYTHON_PACKAGE_CHECK([six])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f4462652d02ca729cc6d7cb36ee4d7d662deafb0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:14:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for packaging.
+
+---
+ build/pkgs/packaging/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/packaging/spkg-configure.m4
+
+diff --git a/build/pkgs/packaging/spkg-configure.m4 b/build/pkgs/packaging/spkg-configure.m4
+new file mode 100644
+index 00000000..398f9e1
+--- /dev/null
++++ b/build/pkgs/packaging/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([packaging], [SAGE_PYTHON_PACKAGE_CHECK([packaging])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4d64677fffce48077e4bc3e20ec833c70e6e9b65 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:18:53 -0400
+Subject: Trac #29665: new spkg-configure.m4 for numpy.
+
+This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack
+wind up linked into shared libraries like,
+
+  /usr/.../numpy/linalg/lapack_lite.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the openblas SPKG.
+---
+ build/pkgs/numpy/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/numpy/spkg-configure.m4
+
+diff --git a/build/pkgs/numpy/spkg-configure.m4 b/build/pkgs/numpy/spkg-configure.m4
+new file mode 100644
+index 00000000..16f9a90
+--- /dev/null
++++ b/build/pkgs/numpy/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([numpy], [
++  SAGE_SPKG_DEPCHECK([openblas], [
++   SAGE_PYTHON_PACKAGE_CHECK([numpy])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 85dfe5bb32f3c470966b477bae68a921e846d11f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:58:48 -0400
+Subject: Trac #29665: new spkg-configure.m4 for scipy.
+
+This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack
+wind up linked into shared libraries like,
+
+  /usr/.../scipy/linalg/_flinalg.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the openblas SPKG.
+---
+ build/pkgs/scipy/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/scipy/spkg-configure.m4
+
+diff --git a/build/pkgs/scipy/spkg-configure.m4 b/build/pkgs/scipy/spkg-configure.m4
+new file mode 100644
+index 00000000..0b7294a
+--- /dev/null
++++ b/build/pkgs/scipy/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([scipy], [
++  SAGE_SPKG_DEPCHECK([openblas], [
++    SAGE_PYTHON_PACKAGE_CHECK([scipy])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5616f1491036fda95f4d3e840c8c8b531c97323b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 07:19:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pluggy.
+
+---
+ build/pkgs/pluggy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pluggy/spkg-configure.m4
+
+diff --git a/build/pkgs/pluggy/spkg-configure.m4 b/build/pkgs/pluggy/spkg-configure.m4
+new file mode 100644
+index 00000000..11b1fce
+--- /dev/null
++++ b/build/pkgs/pluggy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pluggy], [SAGE_PYTHON_PACKAGE_CHECK([pluggy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6bceae3d356878cfe5fce40c9998dead003a3844 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 07:24:12 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pickleshare.
+
+---
+ build/pkgs/pickleshare/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pickleshare/spkg-configure.m4
+
+diff --git a/build/pkgs/pickleshare/spkg-configure.m4 b/build/pkgs/pickleshare/spkg-configure.m4
+new file mode 100644
+index 00000000..80e9b7c
+--- /dev/null
++++ b/build/pkgs/pickleshare/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pickleshare], [SAGE_PYTHON_PACKAGE_CHECK([pickleshare])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From da2ab534f4a256c82ed4f1c5f0f5c320529b5e9f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 08:53:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for html5lib.
+
+---
+ build/pkgs/html5lib/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/html5lib/spkg-configure.m4
+
+diff --git a/build/pkgs/html5lib/spkg-configure.m4 b/build/pkgs/html5lib/spkg-configure.m4
+new file mode 100644
+index 00000000..f421b7e
+--- /dev/null
++++ b/build/pkgs/html5lib/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([html5lib], [SAGE_PYTHON_PACKAGE_CHECK([html5lib])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5e464134afdf6055b7b5804208f759561c5435cd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 18:30:47 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for networkx.
+
+---
+ build/pkgs/networkx/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/networkx/spkg-configure.m4
+
+diff --git a/build/pkgs/networkx/spkg-configure.m4 b/build/pkgs/networkx/spkg-configure.m4
+new file mode 100644
+index 00000000..926671e
+--- /dev/null
++++ b/build/pkgs/networkx/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([networkx], [SAGE_PYTHON_PACKAGE_CHECK([networkx])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c4d40770cd9c7fda811e31759a5f4aedc320f3f9 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:33:24 -0400
+Subject: Trac #29665: new spkg-configure.m4 for matplotlib.
+
+This includes a SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull],...
+because those dependencies wind up linked into shared libraries like,
+
+  /usr/lib/.../matplotlib/ft2font.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with their SPKG counterparts.
+---
+ build/pkgs/matplotlib/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/matplotlib/spkg-configure.m4
+
+diff --git a/build/pkgs/matplotlib/spkg-configure.m4 b/build/pkgs/matplotlib/spkg-configure.m4
+new file mode 100644
+index 00000000..39c2d29
+--- /dev/null
++++ b/build/pkgs/matplotlib/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([matplotlib], [
++  SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull], [
++    SAGE_PYTHON_PACKAGE_CHECK([matplotlib])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7834dc3ac349201af632f89a9de7cd1967931010 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:35:00 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for bleach.
+
+---
+ build/pkgs/bleach/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/bleach/spkg-configure.m4
+
+diff --git a/build/pkgs/bleach/spkg-configure.m4 b/build/pkgs/bleach/spkg-configure.m4
+new file mode 100644
+index 00000000..3c9bb26
+--- /dev/null
++++ b/build/pkgs/bleach/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([bleach], [SAGE_PYTHON_PACKAGE_CHECK([bleach])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 84cad343287a2c69a4a21b9fa3b92301ff88645b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:37:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for decorator.
+
+---
+ build/pkgs/decorator/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/decorator/spkg-configure.m4
+
+diff --git a/build/pkgs/decorator/spkg-configure.m4 b/build/pkgs/decorator/spkg-configure.m4
+new file mode 100644
+index 00000000..e062778
+--- /dev/null
++++ b/build/pkgs/decorator/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([decorator], [SAGE_PYTHON_PACKAGE_CHECK([decorator])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 25693212572e69d452bc95c923ada13744359eb7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:38:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for idna.
+
+---
+ build/pkgs/idna/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/idna/spkg-configure.m4
+
+diff --git a/build/pkgs/idna/spkg-configure.m4 b/build/pkgs/idna/spkg-configure.m4
+new file mode 100644
+index 00000000..9d363f2
+--- /dev/null
++++ b/build/pkgs/idna/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([idna], [SAGE_PYTHON_PACKAGE_CHECK([idna])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6d5616472f6cdc6cf496bba6fe07bd4ef44dfdaf Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:39:23 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for certifi.
+
+---
+ build/pkgs/certifi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/certifi/spkg-configure.m4
+
+diff --git a/build/pkgs/certifi/spkg-configure.m4 b/build/pkgs/certifi/spkg-configure.m4
+new file mode 100644
+index 00000000..ddd4061
+--- /dev/null
++++ b/build/pkgs/certifi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([certifi], [SAGE_PYTHON_PACKAGE_CHECK([certifi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9412a07023b275e29e8d1af9b8ee3e767042e7fd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:40:59 -0400
+Subject: Trac #29665: new spkg-configure.m4 for pillow.
+
+This includes an SAGE_SPKG_DEPCHECK([bzip2 freetype libpng zlib],...
+because those dependencies wind up linked into shared libraries like,
+
+  /usr/.../PIL/_imagingft.cpython-39-x86_64-linux-gnu.so
+
+and potentially conflict with their SPKG counterparts.
+---
+ build/pkgs/pillow/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/pillow/spkg-configure.m4
+
+diff --git a/build/pkgs/pillow/spkg-configure.m4 b/build/pkgs/pillow/spkg-configure.m4
+new file mode 100644
+index 00000000..f2e68e2
+--- /dev/null
++++ b/build/pkgs/pillow/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([pillow], [
++  SAGE_SPKG_DEPCHECK([bzip2 freetype libpng zlib], [
++    SAGE_PYTHON_PACKAGE_CHECK([pillow])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From eede914311481fdb75b363b7a799075e876a2b4f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:44:13 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for mpmath.
+
+---
+ build/pkgs/mpmath/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mpmath/spkg-configure.m4
+
+diff --git a/build/pkgs/mpmath/spkg-configure.m4 b/build/pkgs/mpmath/spkg-configure.m4
+new file mode 100644
+index 00000000..f43c838
+--- /dev/null
++++ b/build/pkgs/mpmath/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([mpmath], [SAGE_PYTHON_PACKAGE_CHECK([mpmath])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 363a825885832c0b580ff53fe61f5c79e70c4728 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:44:56 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for sympy.
+
+---
+ build/pkgs/sympy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sympy/spkg-configure.m4
+
+diff --git a/build/pkgs/sympy/spkg-configure.m4 b/build/pkgs/sympy/spkg-configure.m4
+new file mode 100644
+index 00000000..fa0f1f5
+--- /dev/null
++++ b/build/pkgs/sympy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([sympy], [SAGE_PYTHON_PACKAGE_CHECK([sympy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0667964c914e4a01dda697190a054ff96cea92d6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:47:06 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pygments.
+
+---
+ build/pkgs/pygments/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pygments/spkg-configure.m4
+
+diff --git a/build/pkgs/pygments/spkg-configure.m4 b/build/pkgs/pygments/spkg-configure.m4
+new file mode 100644
+index 00000000..99f29e3
+--- /dev/null
++++ b/build/pkgs/pygments/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pygments], [SAGE_PYTHON_PACKAGE_CHECK([pygments])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f787c233aa05d8e90f7c6ad18f76bd2fa36bfbfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:48:50 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for jinja2.
+
+---
+ build/pkgs/jinja2/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jinja2/spkg-configure.m4
+
+diff --git a/build/pkgs/jinja2/spkg-configure.m4 b/build/pkgs/jinja2/spkg-configure.m4
+new file mode 100644
+index 00000000..0970d1c
+--- /dev/null
++++ b/build/pkgs/jinja2/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jinja2], [SAGE_PYTHON_PACKAGE_CHECK([jinja2])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 309d8f8e2b7078b5efbbe824b69ec1d9b1e639f0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:43:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pandocfilters.
+
+---
+ build/pkgs/pandocfilters/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/pandocfilters/spkg-configure.m4
+
+diff --git a/build/pkgs/pandocfilters/spkg-configure.m4 b/build/pkgs/pandocfilters/spkg-configure.m4
+new file mode 100644
+index 00000000..3e9537f
+--- /dev/null
++++ b/build/pkgs/pandocfilters/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([pandocfilters], [
++  SAGE_PYTHON_PACKAGE_CHECK([pandocfilters])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f57bfda49777a6ba1cd123553acd75dc347c5521 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:44:46 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for webencodings.
+
+---
+ build/pkgs/webencodings/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/webencodings/spkg-configure.m4
+
+diff --git a/build/pkgs/webencodings/spkg-configure.m4 b/build/pkgs/webencodings/spkg-configure.m4
+new file mode 100644
+index 00000000..1b9a5c4
+--- /dev/null
++++ b/build/pkgs/webencodings/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([webencodings], [
++  SAGE_PYTHON_PACKAGE_CHECK([webencodings])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7f193a62d7a2ea0b6a3ca6beb12390d91c25bbfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:48:26 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pytz.
+
+---
+ build/pkgs/pytz/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pytz/spkg-configure.m4
+
+diff --git a/build/pkgs/pytz/spkg-configure.m4 b/build/pkgs/pytz/spkg-configure.m4
+new file mode 100644
+index 00000000..366521b
+--- /dev/null
++++ b/build/pkgs/pytz/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pytz], [SAGE_PYTHON_PACKAGE_CHECK([pytz])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bfd3fdd887c3465c03465248de4997eed4a82915 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:51:16 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for texttable.
+
+---
+ build/pkgs/texttable/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/texttable/spkg-configure.m4
+
+diff --git a/build/pkgs/texttable/spkg-configure.m4 b/build/pkgs/texttable/spkg-configure.m4
+new file mode 100644
+index 00000000..42a3de1
+--- /dev/null
++++ b/build/pkgs/texttable/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([texttable], [SAGE_PYTHON_PACKAGE_CHECK([texttable])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 914bf0cc57abc46129b27c1525782dbe16da31a2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:53:41 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for babel.
+
+---
+ build/pkgs/babel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/babel/spkg-configure.m4
+
+diff --git a/build/pkgs/babel/spkg-configure.m4 b/build/pkgs/babel/spkg-configure.m4
+new file mode 100644
+index 00000000..d7b9a71
+--- /dev/null
++++ b/build/pkgs/babel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([babel], [SAGE_PYTHON_PACKAGE_CHECK([babel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 56977abd1eafbc87c765a2892cfe525382648259 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 14 Oct 2021 08:06:59 -0400
+Subject: Trac #29665: force system python3 with --enable-system-site-packages.
+
+When the python SPKG is used, the --enable-system-site-packages flag
+will essentially do nothing, and that may confuse users who have
+wasted a few hours building sage. (Generally, they will want to fix
+detection of their system python3 first.)
+
+To forestall that, we now set "--with-system-python3=force" whenever
+the "--enable-system-site-packages" flag is passed.
+---
+ configure.ac | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index db30a91..6fafb83 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -438,10 +438,19 @@ AC_ARG_ENABLE([download-from-upstream-url],
+ AC_ARG_ENABLE(
+   [system-site-packages], [AS_HELP_STRING(
+     [--enable-system-site-packages],
+-    [allow sage to use python packages from the system (experimental; default: no)]
++    [allow the use of python packages from the system (experimental; default: no)]
+   )], [
+   AS_IF([test "x$enable_system_site_packages" = "xyes"], [
+     SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
++
++    dnl We want to raise an error if the user asked for "system site
++    dnl packages" but the system python will not be used. Technically
++    dnl that causes no problems (SAGE_PYTHON_PACKAGE_CHECK always fails,
++    dnl so SPKGs are used for all python packages), but it may be confusing
++    dnl to end users who expect the flag to actually give them access to
++    dnl their system python packages and who may not be paying close
++    dnl attention to their ./configure output.
++    with_system_python3="force"
+   ])
+ ])
+ AC_SUBST([SAGE_VENV_FLAGS])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 02b369fd24ef7cf8997082e7850b9cf022cae34b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 01:18:35 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for setuptools.
+
+---
+ build/pkgs/setuptools/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/setuptools/spkg-configure.m4
+
+diff --git a/build/pkgs/setuptools/spkg-configure.m4 b/build/pkgs/setuptools/spkg-configure.m4
+new file mode 100644
+index 00000000..a2ad811
+--- /dev/null
++++ b/build/pkgs/setuptools/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([setuptools], [SAGE_PYTHON_PACKAGE_CHECK([setuptools])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 05117317d38693978efaf36e81d8b02bae44b257 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 01:15:48 -0400
+Subject: Trac #29665: poison PYTHONUSERBASE when testing for "system"
+ packages.
+
+When we're detecting system installations of python packages, we want
+to hide anything that was installed with e.g. "pip install --user". To
+accomplish that, we mimic the PYTHONUSERBASE poisoning from sage-env
+within the SAGE_PYTHON_PACKAGE_CHECK() macro.
+---
+ m4/sage_python_package_check.m4 | 18 +++++++++++++++++-
+ 1 file changed, 17 insertions(+), 1 deletion(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 77b0a0c..b8cdba4 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -38,11 +38,27 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     dnl package.
+     SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
+     AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++
++    dnl To prevent user-site (pip install --user) packages from being
++    dnl detected as "system" packages, we poison PYTHONUSERBASE. The
++    dnl sage-env script also does this at runtime; we mimic that
++    dnl implementation to ensure that the behaviors at ./configure and
++    dnl runtime are identical. Beware that (as in sage-env) the poisoning
++    dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
++    dnl user points PYTHONUSERBASE to any path (even the default), then
++    dnl his local pip packages will be detected.
++    PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
++    AS_IF([test -z "${PYTHONUSERBASE}"], [
++      PYTHONUSERBASE="${HOME}/.sage/local"
++    ])
++
+     AS_IF(
+-      ["${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())"],
++      [PYTHONUSERBASE="${PYTHONUSERBASE}" "${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" 2>/dev/null],
+       [AC_MSG_RESULT(yes)],
+       [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+     )
++
++    PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d75c1492f63a584b5ec5f424ddd7f7c4a6d502d3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:20:04 -0400
+Subject: Trac #29665: run SAGE_PYTHON_PACKAGE_CHECK() inside a venv.
+
+To recreate the runtime environment as closely as possible, we now use
+a venv (with system site packages enabled) when checking for system
+copies of python packages.
+---
+ m4/sage_python_package_check.m4 | 76 +++++++++++++++++++++++++++--------------
+ 1 file changed, 51 insertions(+), 25 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index b8cdba4..7cbd6c0 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -15,9 +15,11 @@
+ #
+ #     2. If we are not using the system python (no $PYTHON_FOR_VENV),
+ #
+-#     3. If setuptools is not available to the system python,
++#     3. If we are unable to create a venv with the system python,
+ #
+-#     4. If the contents of install-requires.txt are not met (wrong
++#     4. If setuptools is not available to the system python,
++#
++#     5. If the contents of install-requires.txt are not met (wrong
+ #        version, no version, etc.) by the system python.
+ #
+ #   In any of those cases, we set sage_spkg_install_$package to "yes"
+@@ -27,38 +29,62 @@
+ #
+ #   The SAGE_SPKG_CONFIGURE_PYTHON3() macro is AC_REQUIRE'd to ensure
+ #   that $PYTHON_FOR_VENV is available, if it is going to be available.
++#   The check is run inside a new venv, and with the PYTHONUSERBASE
++#   variable poisoned in the same manner as sage-env poisons it, to
++#   ensure that the ./configure- and run-time views of the system
++#   are as similar as possible.
+ #
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
+     AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
+ 
+-    dnl strip all comments from install-requires.txt; this should leave
+-    dnl only a single line containing the version specification for this
+-    dnl package.
+-    SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
+-    AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++    dnl We run this check inside a python venv, because that's ultimately
++    dnl how the system $PYTHON_FOR_VENV will be used.
++    AC_MSG_CHECKING([if we can create a python venv in config.venv])
+ 
+-    dnl To prevent user-site (pip install --user) packages from being
+-    dnl detected as "system" packages, we poison PYTHONUSERBASE. The
+-    dnl sage-env script also does this at runtime; we mimic that
+-    dnl implementation to ensure that the behaviors at ./configure and
+-    dnl runtime are identical. Beware that (as in sage-env) the poisoning
+-    dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
+-    dnl user points PYTHONUSERBASE to any path (even the default), then
+-    dnl his local pip packages will be detected.
+-    PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
+-    AS_IF([test -z "${PYTHONUSERBASE}"], [
+-      PYTHONUSERBASE="${HOME}/.sage/local"
+-    ])
++    dnl Use --clear because ./configure typically clobbers its output files.
++    AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
++                                        --clear                dnl
++                                        --without-pip          dnl
++					config.venv], [
++      AC_MSG_RESULT(yes)
++      dnl strip all comments from install-requires.txt; this should leave
++      dnl only a single line containing the version specification for this
++      dnl package.
++      SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
++      AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++
++      dnl To prevent user-site (pip install --user) packages from being
++      dnl detected as "system" packages, we poison PYTHONUSERBASE. The
++      dnl sage-env script also does this at runtime; we mimic that
++      dnl implementation to ensure that the behaviors at ./configure and
++      dnl runtime are identical. Beware that (as in sage-env) the poisoning
++      dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
++      dnl user points PYTHONUSERBASE to any path (even the default), then
++      dnl his local pip packages will be detected.
++      PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
++      AS_IF([test -z "${PYTHONUSERBASE}"], [
++        PYTHONUSERBASE="${HOME}/.sage/local"
++      ])
+ 
+-    AS_IF(
+-      [PYTHONUSERBASE="${PYTHONUSERBASE}" "${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" 2>/dev/null],
+-      [AC_MSG_RESULT(yes)],
+-      [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+-    )
++      AS_IF(
++        [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
++           "from setuptools.version import pkg_resources;              dnl
++            pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" dnl
++	 2>/dev/null],
++        [AC_MSG_RESULT(yes)],
++        [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
++      )
++
++      PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
++    ], [
++      dnl failed to create a venv for some reason
++      AC_MSG_RESULT(no)
++      sage_spkg_install_$1=yes
++    ])
+ 
+-    PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
++    rm -rf config.venv
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 87646c3264a04ffd98a12d67074f93e1943a1e96 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:38:08 -0400
+Subject: Trac #29665: log SAGE_PYTHON_PACKAGE_CHECK() failures to config.log.
+
+---
+ m4/sage_python_package_check.m4 | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 7cbd6c0..e0e0b9f 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -47,7 +47,8 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
+                                         --clear                dnl
+                                         --without-pip          dnl
+-					config.venv], [
++                                        config.venv            dnl
++                                        2>&AS_MESSAGE_LOG_FD], [
+       AC_MSG_RESULT(yes)
+       dnl strip all comments from install-requires.txt; this should leave
+       dnl only a single line containing the version specification for this
+@@ -72,7 +73,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+         [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
+            "from setuptools.version import pkg_resources;              dnl
+             pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" dnl
+-	 2>/dev/null],
++	 2>&AS_MESSAGE_LOG_FD],
+         [AC_MSG_RESULT(yes)],
+         [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+       )
+-- 
+cgit v1.0-1-gd88e
+
+
+From f7dfffd1c64816e2ae4e0f420b22065c5c5bf2cb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:45:37 -0400
+Subject: Trac #29665: don't clobber a plain file named config.venv.
+
+When SAGE_PYTHON_PACKAGE_CHECK() is cleaning up, we no longer remove
+"config.venv" unconditionally. Instead, we remove it only if it is a
+directory. This is also how "pyvenv --clear" works.
+---
+ m4/sage_python_package_check.m4 | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index e0e0b9f..127a078 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -85,7 +85,9 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+       sage_spkg_install_$1=yes
+     ])
+ 
+-    rm -rf config.venv
++    dnl Clean up config.venv, but only if we could have created it.
++    dnl (The --clear flag to pyvenv will not clobber a plain file.)
++    AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9849c77313b895dcfb786d2ea54e36585bd31ce2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 16 Oct 2021 08:14:42 -0400
+Subject: Trac #29665: don't announce system python packages that won't be
+ used.
+
+When --enable-system-site-packages was not given, the python packages
+using SAGE_PYTHON_PACKAGE_CHECK() in spkg-configure.m4 cannot be used.
+Rather than suggest that users install them anyway, that macro now
+hacks the value of sage_use_system_$package to be "no" when the use
+of system site packages is disabled at the python level.
+---
+ m4/sage_python_package_check.m4 | 17 +++++++++++++++++
+ 1 file changed, 17 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 127a078..7ee82a7 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -89,6 +89,23 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     dnl (The --clear flag to pyvenv will not clobber a plain file.)
+     AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
++    dnl System site packages are disabled.
+     sage_spkg_install_$1=yes
++
++    dnl We have to retroactively hack the --with-system-foo={no,yes,force}
++    dnl mechanism here because it wasn't designed with the ability to
++    dnl disable arbitrary chunks of system packages in mind. The easy cases
++    dnl are "no" and "force" which require no action; "no" means we won't
++    dnl suggest the package anyway, and "force" will raise an error when
++    dnl the system-package check fails.
++    dnl
++    dnl The default of "yes" is more troubling because it is the default. To
++    dnl avoid prompting users to install packages that won't be used, we want
++    dnl to ignore "yes" when reporting the "hint: install these packages..."
++    dnl at the end of ./configure. To accomplish that, we change "yes" to
++    dnl "no" here, essentially changing the default for packages using this
++    dnl macro when --enable-system-site-packages is disabled. Packages with
++    dnl "no" are not suggested to the user.
++    AS_IF([test "${sage_use_system_$1}" = "yes"],[sage_use_system_$1=no])
+   ])
+ ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3e6ad737b94aaac234d615ecaf1a2455eb607f1a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 17 Oct 2021 06:16:21 -0400
+Subject: Trac #29665: add Gentoo package information for python packages.
+
+---
+ build/pkgs/babel/distros/gentoo.txt         | 1 +
+ build/pkgs/bleach/distros/gentoo.txt        | 1 +
+ build/pkgs/certifi/distros/gentoo.txt       | 1 +
+ build/pkgs/cvxopt/distros/gentoo.txt        | 1 +
+ build/pkgs/decorator/distros/gentoo.txt     | 1 +
+ build/pkgs/html5lib/distros/gentoo.txt      | 1 +
+ build/pkgs/idna/distros/gentoo.txt          | 1 +
+ build/pkgs/jinja2/distros/gentoo.txt        | 1 +
+ build/pkgs/matplotlib/distros/gentoo.txt    | 1 +
+ build/pkgs/mpmath/distros/gentoo.txt        | 1 +
+ build/pkgs/networkx/distros/gentoo.txt      | 1 +
+ build/pkgs/numpy/distros/gentoo.txt         | 1 +
+ build/pkgs/packaging/distros/gentoo.txt     | 1 +
+ build/pkgs/pandocfilters/distros/gentoo.txt | 1 +
+ build/pkgs/pickleshare/distros/gentoo.txt   | 1 +
+ build/pkgs/pillow/distros/gentoo.txt        | 1 +
+ build/pkgs/pluggy/distros/gentoo.txt        | 1 +
+ build/pkgs/pygments/distros/gentoo.txt      | 1 +
+ build/pkgs/pytz/distros/gentoo.txt          | 1 +
+ build/pkgs/pyzmq/distros/gentoo.txt         | 1 +
+ build/pkgs/requests/distros/gentoo.txt      | 1 +
+ build/pkgs/scipy/distros/gentoo.txt         | 1 +
+ build/pkgs/setuptools/distros/gentoo.txt    | 1 +
+ build/pkgs/six/distros/gentoo.txt           | 1 +
+ build/pkgs/sympy/distros/gentoo.txt         | 1 +
+ build/pkgs/texttable/distros/gentoo.txt     | 1 +
+ build/pkgs/toml/distros/gentoo.txt          | 1 +
+ build/pkgs/webencodings/distros/gentoo.txt  | 1 +
+ 28 files changed, 28 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/gentoo.txt
+ create mode 100644 build/pkgs/bleach/distros/gentoo.txt
+ create mode 100644 build/pkgs/certifi/distros/gentoo.txt
+ create mode 100644 build/pkgs/cvxopt/distros/gentoo.txt
+ create mode 100644 build/pkgs/decorator/distros/gentoo.txt
+ create mode 100644 build/pkgs/html5lib/distros/gentoo.txt
+ create mode 100644 build/pkgs/idna/distros/gentoo.txt
+ create mode 100644 build/pkgs/jinja2/distros/gentoo.txt
+ create mode 100644 build/pkgs/matplotlib/distros/gentoo.txt
+ create mode 100644 build/pkgs/mpmath/distros/gentoo.txt
+ create mode 100644 build/pkgs/networkx/distros/gentoo.txt
+ create mode 100644 build/pkgs/numpy/distros/gentoo.txt
+ create mode 100644 build/pkgs/packaging/distros/gentoo.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/gentoo.txt
+ create mode 100644 build/pkgs/pickleshare/distros/gentoo.txt
+ create mode 100644 build/pkgs/pillow/distros/gentoo.txt
+ create mode 100644 build/pkgs/pluggy/distros/gentoo.txt
+ create mode 100644 build/pkgs/pygments/distros/gentoo.txt
+ create mode 100644 build/pkgs/pytz/distros/gentoo.txt
+ create mode 100644 build/pkgs/pyzmq/distros/gentoo.txt
+ create mode 100644 build/pkgs/requests/distros/gentoo.txt
+ create mode 100644 build/pkgs/scipy/distros/gentoo.txt
+ create mode 100644 build/pkgs/setuptools/distros/gentoo.txt
+ create mode 100644 build/pkgs/six/distros/gentoo.txt
+ create mode 100644 build/pkgs/sympy/distros/gentoo.txt
+ create mode 100644 build/pkgs/texttable/distros/gentoo.txt
+ create mode 100644 build/pkgs/toml/distros/gentoo.txt
+ create mode 100644 build/pkgs/webencodings/distros/gentoo.txt
+
+diff --git a/build/pkgs/babel/distros/gentoo.txt b/build/pkgs/babel/distros/gentoo.txt
+new file mode 100644
+index 00000000..2d2c34f
+--- /dev/null
++++ b/build/pkgs/babel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/Babel
+diff --git a/build/pkgs/bleach/distros/gentoo.txt b/build/pkgs/bleach/distros/gentoo.txt
+new file mode 100644
+index 00000000..b4f9744
+--- /dev/null
++++ b/build/pkgs/bleach/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/bleach
+diff --git a/build/pkgs/certifi/distros/gentoo.txt b/build/pkgs/certifi/distros/gentoo.txt
+new file mode 100644
+index 00000000..72e2e91
+--- /dev/null
++++ b/build/pkgs/certifi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/certifi
+diff --git a/build/pkgs/cvxopt/distros/gentoo.txt b/build/pkgs/cvxopt/distros/gentoo.txt
+new file mode 100644
+index 00000000..b312391
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/cvxopt
+diff --git a/build/pkgs/decorator/distros/gentoo.txt b/build/pkgs/decorator/distros/gentoo.txt
+new file mode 100644
+index 00000000..fea5a67
+--- /dev/null
++++ b/build/pkgs/decorator/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/decorator
+diff --git a/build/pkgs/html5lib/distros/gentoo.txt b/build/pkgs/html5lib/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c2be76
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/html5lib
+diff --git a/build/pkgs/idna/distros/gentoo.txt b/build/pkgs/idna/distros/gentoo.txt
+new file mode 100644
+index 00000000..68ef51c
+--- /dev/null
++++ b/build/pkgs/idna/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/idna
+diff --git a/build/pkgs/jinja2/distros/gentoo.txt b/build/pkgs/jinja2/distros/gentoo.txt
+new file mode 100644
+index 00000000..15a27ae
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jinja
+diff --git a/build/pkgs/matplotlib/distros/gentoo.txt b/build/pkgs/matplotlib/distros/gentoo.txt
+new file mode 100644
+index 00000000..bcfefb5
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/matplotlib
+diff --git a/build/pkgs/mpmath/distros/gentoo.txt b/build/pkgs/mpmath/distros/gentoo.txt
+new file mode 100644
+index 00000000..946c62d
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/mpmath
+diff --git a/build/pkgs/networkx/distros/gentoo.txt b/build/pkgs/networkx/distros/gentoo.txt
+new file mode 100644
+index 00000000..dd97742
+--- /dev/null
++++ b/build/pkgs/networkx/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/networkx
+diff --git a/build/pkgs/numpy/distros/gentoo.txt b/build/pkgs/numpy/distros/gentoo.txt
+new file mode 100644
+index 00000000..d2179d4
+--- /dev/null
++++ b/build/pkgs/numpy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/numpy
+diff --git a/build/pkgs/packaging/distros/gentoo.txt b/build/pkgs/packaging/distros/gentoo.txt
+new file mode 100644
+index 00000000..e5309ed
+--- /dev/null
++++ b/build/pkgs/packaging/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/packaging
+diff --git a/build/pkgs/pandocfilters/distros/gentoo.txt b/build/pkgs/pandocfilters/distros/gentoo.txt
+new file mode 100644
+index 00000000..a726fda
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/gentoo.txt b/build/pkgs/pickleshare/distros/gentoo.txt
+new file mode 100644
+index 00000000..14fad0f
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pickleshare
+diff --git a/build/pkgs/pillow/distros/gentoo.txt b/build/pkgs/pillow/distros/gentoo.txt
+new file mode 100644
+index 00000000..1243649
+--- /dev/null
++++ b/build/pkgs/pillow/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pillow
+diff --git a/build/pkgs/pluggy/distros/gentoo.txt b/build/pkgs/pluggy/distros/gentoo.txt
+new file mode 100644
+index 00000000..7b33876
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pluggy
+diff --git a/build/pkgs/pygments/distros/gentoo.txt b/build/pkgs/pygments/distros/gentoo.txt
+new file mode 100644
+index 00000000..a584f32
+--- /dev/null
++++ b/build/pkgs/pygments/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pygments
+diff --git a/build/pkgs/pytz/distros/gentoo.txt b/build/pkgs/pytz/distros/gentoo.txt
+new file mode 100644
+index 00000000..902a18b
+--- /dev/null
++++ b/build/pkgs/pytz/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pytz
+diff --git a/build/pkgs/pyzmq/distros/gentoo.txt b/build/pkgs/pyzmq/distros/gentoo.txt
+new file mode 100644
+index 00000000..77c2429
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyzmq
+diff --git a/build/pkgs/requests/distros/gentoo.txt b/build/pkgs/requests/distros/gentoo.txt
+new file mode 100644
+index 00000000..d3dc941
+--- /dev/null
++++ b/build/pkgs/requests/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/requests
+diff --git a/build/pkgs/scipy/distros/gentoo.txt b/build/pkgs/scipy/distros/gentoo.txt
+new file mode 100644
+index 00000000..11dabd2
+--- /dev/null
++++ b/build/pkgs/scipy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/scipy
+diff --git a/build/pkgs/setuptools/distros/gentoo.txt b/build/pkgs/setuptools/distros/gentoo.txt
+new file mode 100644
+index 00000000..3a4fa34
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/setuptools
+diff --git a/build/pkgs/six/distros/gentoo.txt b/build/pkgs/six/distros/gentoo.txt
+new file mode 100644
+index 00000000..f73f648
+--- /dev/null
++++ b/build/pkgs/six/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/six
+diff --git a/build/pkgs/sympy/distros/gentoo.txt b/build/pkgs/sympy/distros/gentoo.txt
+new file mode 100644
+index 00000000..b5a5034
+--- /dev/null
++++ b/build/pkgs/sympy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sympy
+diff --git a/build/pkgs/texttable/distros/gentoo.txt b/build/pkgs/texttable/distros/gentoo.txt
+new file mode 100644
+index 00000000..b33a7a7
+--- /dev/null
++++ b/build/pkgs/texttable/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/texttable
+diff --git a/build/pkgs/toml/distros/gentoo.txt b/build/pkgs/toml/distros/gentoo.txt
+new file mode 100644
+index 00000000..64fcea3
+--- /dev/null
++++ b/build/pkgs/toml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/toml
+diff --git a/build/pkgs/webencodings/distros/gentoo.txt b/build/pkgs/webencodings/distros/gentoo.txt
+new file mode 100644
+index 00000000..7539b0f
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/webencodings
+-- 
+cgit v1.0-1-gd88e
+
+
+From 088380f884124c9608160b613ba031c5f023f604 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 18:43:04 -0700
+Subject: build/pkgs: Add distros/fedora.txt for Python packages
+
+---
+ build/pkgs/babel/distros/fedora.txt         | 1 +
+ build/pkgs/bleach/distros/fedora.txt        | 1 +
+ build/pkgs/certifi/distros/fedora.txt       | 1 +
+ build/pkgs/cvxopt/distros/fedora.txt        | 1 +
+ build/pkgs/decorator/distros/fedora.txt     | 1 +
+ build/pkgs/html5lib/distros/fedora.txt      | 1 +
+ build/pkgs/idna/distros/fedora.txt          | 1 +
+ build/pkgs/jinja2/distros/fedora.txt        | 1 +
+ build/pkgs/matplotlib/distros/fedora.txt    | 1 +
+ build/pkgs/mpmath/distros/fedora.txt        | 1 +
+ build/pkgs/networkx/distros/fedora.txt      | 1 +
+ build/pkgs/numpy/distros/fedora.txt         | 1 +
+ build/pkgs/packaging/distros/fedora.txt     | 1 +
+ build/pkgs/pandocfilters/distros/fedora.txt | 1 +
+ build/pkgs/pickleshare/distros/fedora.txt   | 1 +
+ build/pkgs/pillow/distros/fedora.txt        | 1 +
+ build/pkgs/pluggy/distros/fedora.txt        | 1 +
+ build/pkgs/py/distros/fedora.txt            | 1 +
+ build/pkgs/pygments/distros/fedora.txt      | 1 +
+ build/pkgs/pytz/distros/fedora.txt          | 1 +
+ build/pkgs/pyzmq/distros/fedora.txt         | 1 +
+ build/pkgs/requests/distros/fedora.txt      | 1 +
+ build/pkgs/scipy/distros/fedora.txt         | 1 +
+ build/pkgs/setuptools/distros/fedora.txt    | 1 +
+ build/pkgs/six/distros/fedora.txt           | 1 +
+ build/pkgs/sympy/distros/fedora.txt         | 1 +
+ build/pkgs/texttable/distros/fedora.txt     | 1 +
+ build/pkgs/toml/distros/fedora.txt          | 1 +
+ build/pkgs/webencodings/distros/fedora.txt  | 1 +
+ build/pkgs/wheel/distros/fedora.txt         | 1 +
+ 30 files changed, 30 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/fedora.txt
+ create mode 100644 build/pkgs/bleach/distros/fedora.txt
+ create mode 100644 build/pkgs/certifi/distros/fedora.txt
+ create mode 100644 build/pkgs/cvxopt/distros/fedora.txt
+ create mode 100644 build/pkgs/decorator/distros/fedora.txt
+ create mode 100644 build/pkgs/html5lib/distros/fedora.txt
+ create mode 100644 build/pkgs/idna/distros/fedora.txt
+ create mode 100644 build/pkgs/jinja2/distros/fedora.txt
+ create mode 100644 build/pkgs/matplotlib/distros/fedora.txt
+ create mode 100644 build/pkgs/mpmath/distros/fedora.txt
+ create mode 100644 build/pkgs/networkx/distros/fedora.txt
+ create mode 100644 build/pkgs/numpy/distros/fedora.txt
+ create mode 100644 build/pkgs/packaging/distros/fedora.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/fedora.txt
+ create mode 100644 build/pkgs/pickleshare/distros/fedora.txt
+ create mode 100644 build/pkgs/pillow/distros/fedora.txt
+ create mode 100644 build/pkgs/pluggy/distros/fedora.txt
+ create mode 100644 build/pkgs/py/distros/fedora.txt
+ create mode 100644 build/pkgs/pygments/distros/fedora.txt
+ create mode 100644 build/pkgs/pytz/distros/fedora.txt
+ create mode 100644 build/pkgs/pyzmq/distros/fedora.txt
+ create mode 100644 build/pkgs/requests/distros/fedora.txt
+ create mode 100644 build/pkgs/scipy/distros/fedora.txt
+ create mode 100644 build/pkgs/setuptools/distros/fedora.txt
+ create mode 100644 build/pkgs/six/distros/fedora.txt
+ create mode 100644 build/pkgs/sympy/distros/fedora.txt
+ create mode 100644 build/pkgs/texttable/distros/fedora.txt
+ create mode 100644 build/pkgs/toml/distros/fedora.txt
+ create mode 100644 build/pkgs/webencodings/distros/fedora.txt
+ create mode 100644 build/pkgs/wheel/distros/fedora.txt
+
+diff --git a/build/pkgs/babel/distros/fedora.txt b/build/pkgs/babel/distros/fedora.txt
+new file mode 100644
+index 00000000..98f6593
+--- /dev/null
++++ b/build/pkgs/babel/distros/fedora.txt
+@@ -0,0 +1 @@
++babel
+diff --git a/build/pkgs/bleach/distros/fedora.txt b/build/pkgs/bleach/distros/fedora.txt
+new file mode 100644
+index 00000000..c5422cc
+--- /dev/null
++++ b/build/pkgs/bleach/distros/fedora.txt
+@@ -0,0 +1 @@
++python-bleach
+diff --git a/build/pkgs/certifi/distros/fedora.txt b/build/pkgs/certifi/distros/fedora.txt
+new file mode 100644
+index 00000000..be421c8
+--- /dev/null
++++ b/build/pkgs/certifi/distros/fedora.txt
+@@ -0,0 +1 @@
++python-certifi
+diff --git a/build/pkgs/cvxopt/distros/fedora.txt b/build/pkgs/cvxopt/distros/fedora.txt
+new file mode 100644
+index 00000000..f15770f
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/fedora.txt
+@@ -0,0 +1 @@
++python-cvxopt
+diff --git a/build/pkgs/decorator/distros/fedora.txt b/build/pkgs/decorator/distros/fedora.txt
+new file mode 100644
+index 00000000..0795604
+--- /dev/null
++++ b/build/pkgs/decorator/distros/fedora.txt
+@@ -0,0 +1 @@
++python-decorator
+diff --git a/build/pkgs/html5lib/distros/fedora.txt b/build/pkgs/html5lib/distros/fedora.txt
+new file mode 100644
+index 00000000..b821491
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/fedora.txt
+@@ -0,0 +1 @@
++python-html5lib
+diff --git a/build/pkgs/idna/distros/fedora.txt b/build/pkgs/idna/distros/fedora.txt
+new file mode 100644
+index 00000000..a73e70c
+--- /dev/null
++++ b/build/pkgs/idna/distros/fedora.txt
+@@ -0,0 +1 @@
++python-idna
+diff --git a/build/pkgs/jinja2/distros/fedora.txt b/build/pkgs/jinja2/distros/fedora.txt
+new file mode 100644
+index 00000000..f5f3caf
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/fedora.txt
+@@ -0,0 +1 @@
++python-jinja2
+diff --git a/build/pkgs/matplotlib/distros/fedora.txt b/build/pkgs/matplotlib/distros/fedora.txt
+new file mode 100644
+index 00000000..f6d856e
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/fedora.txt
+@@ -0,0 +1 @@
++python-matplotlib
+diff --git a/build/pkgs/mpmath/distros/fedora.txt b/build/pkgs/mpmath/distros/fedora.txt
+new file mode 100644
+index 00000000..a7dc8d5
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/fedora.txt
+@@ -0,0 +1 @@
++python-mpmath
+diff --git a/build/pkgs/networkx/distros/fedora.txt b/build/pkgs/networkx/distros/fedora.txt
+new file mode 100644
+index 00000000..293f943
+--- /dev/null
++++ b/build/pkgs/networkx/distros/fedora.txt
+@@ -0,0 +1 @@
++python-networkx
+diff --git a/build/pkgs/numpy/distros/fedora.txt b/build/pkgs/numpy/distros/fedora.txt
+new file mode 100644
+index 00000000..c8722b9
+--- /dev/null
++++ b/build/pkgs/numpy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-numpy
+diff --git a/build/pkgs/packaging/distros/fedora.txt b/build/pkgs/packaging/distros/fedora.txt
+new file mode 100644
+index 00000000..02ad855
+--- /dev/null
++++ b/build/pkgs/packaging/distros/fedora.txt
+@@ -0,0 +1 @@
++python-packaging
+diff --git a/build/pkgs/pandocfilters/distros/fedora.txt b/build/pkgs/pandocfilters/distros/fedora.txt
+new file mode 100644
+index 00000000..e7a86d0
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/fedora.txt b/build/pkgs/pickleshare/distros/fedora.txt
+new file mode 100644
+index 00000000..6d991a2
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pickleshare
+diff --git a/build/pkgs/pillow/distros/fedora.txt b/build/pkgs/pillow/distros/fedora.txt
+new file mode 100644
+index 00000000..86dbb1d
+--- /dev/null
++++ b/build/pkgs/pillow/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pillow
+diff --git a/build/pkgs/pluggy/distros/fedora.txt b/build/pkgs/pluggy/distros/fedora.txt
+new file mode 100644
+index 00000000..c869e54
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pluggy
+diff --git a/build/pkgs/py/distros/fedora.txt b/build/pkgs/py/distros/fedora.txt
+new file mode 100644
+index 00000000..b348d39
+--- /dev/null
++++ b/build/pkgs/py/distros/fedora.txt
+@@ -0,0 +1 @@
++python-py
+diff --git a/build/pkgs/pygments/distros/fedora.txt b/build/pkgs/pygments/distros/fedora.txt
+new file mode 100644
+index 00000000..f3e72a8
+--- /dev/null
++++ b/build/pkgs/pygments/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pygments
+diff --git a/build/pkgs/pytz/distros/fedora.txt b/build/pkgs/pytz/distros/fedora.txt
+new file mode 100644
+index 00000000..2cccc9e
+--- /dev/null
++++ b/build/pkgs/pytz/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pytz
+diff --git a/build/pkgs/pyzmq/distros/fedora.txt b/build/pkgs/pyzmq/distros/fedora.txt
+new file mode 100644
+index 00000000..23f64d1
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pyzmq
+diff --git a/build/pkgs/requests/distros/fedora.txt b/build/pkgs/requests/distros/fedora.txt
+new file mode 100644
+index 00000000..93a7bc1
+--- /dev/null
++++ b/build/pkgs/requests/distros/fedora.txt
+@@ -0,0 +1 @@
++python-requests
+diff --git a/build/pkgs/scipy/distros/fedora.txt b/build/pkgs/scipy/distros/fedora.txt
+new file mode 100644
+index 00000000..7ff2882
+--- /dev/null
++++ b/build/pkgs/scipy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-scipy
+diff --git a/build/pkgs/setuptools/distros/fedora.txt b/build/pkgs/setuptools/distros/fedora.txt
+new file mode 100644
+index 00000000..e1ad178
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/fedora.txt
+@@ -0,0 +1 @@
++python-setuptools
+diff --git a/build/pkgs/six/distros/fedora.txt b/build/pkgs/six/distros/fedora.txt
+new file mode 100644
+index 00000000..787c530
+--- /dev/null
++++ b/build/pkgs/six/distros/fedora.txt
+@@ -0,0 +1 @@
++python-six
+diff --git a/build/pkgs/sympy/distros/fedora.txt b/build/pkgs/sympy/distros/fedora.txt
+new file mode 100644
+index 00000000..126c88a
+--- /dev/null
++++ b/build/pkgs/sympy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-sympy
+diff --git a/build/pkgs/texttable/distros/fedora.txt b/build/pkgs/texttable/distros/fedora.txt
+new file mode 100644
+index 00000000..8d1ccec
+--- /dev/null
++++ b/build/pkgs/texttable/distros/fedora.txt
+@@ -0,0 +1 @@
++python-texttable
+diff --git a/build/pkgs/toml/distros/fedora.txt b/build/pkgs/toml/distros/fedora.txt
+new file mode 100644
+index 00000000..821ee77
+--- /dev/null
++++ b/build/pkgs/toml/distros/fedora.txt
+@@ -0,0 +1 @@
++python-toml
+diff --git a/build/pkgs/webencodings/distros/fedora.txt b/build/pkgs/webencodings/distros/fedora.txt
+new file mode 100644
+index 00000000..12ddba9
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/fedora.txt
+@@ -0,0 +1 @@
++python-webencodings
+diff --git a/build/pkgs/wheel/distros/fedora.txt b/build/pkgs/wheel/distros/fedora.txt
+new file mode 100644
+index 00000000..ae4cbb9
+--- /dev/null
++++ b/build/pkgs/wheel/distros/fedora.txt
+@@ -0,0 +1 @@
++python-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From ad1d5a20380b147c774903066031442f31094626 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 21:04:04 -0700
+Subject: build/pkgs: Add distros/arch.txt for Python packages
+
+---
+ build/pkgs/babel/distros/arch.txt         | 1 +
+ build/pkgs/bleach/distros/arch.txt        | 1 +
+ build/pkgs/certifi/distros/arch.txt       | 1 +
+ build/pkgs/cvxopt/distros/arch.txt        | 1 +
+ build/pkgs/decorator/distros/arch.txt     | 1 +
+ build/pkgs/html5lib/distros/arch.txt      | 1 +
+ build/pkgs/idna/distros/arch.txt          | 1 +
+ build/pkgs/matplotlib/distros/arch.txt    | 1 +
+ build/pkgs/mpmath/distros/arch.txt        | 1 +
+ build/pkgs/networkx/distros/arch.txt      | 1 +
+ build/pkgs/numpy/distros/arch.txt         | 1 +
+ build/pkgs/packaging/distros/arch.txt     | 1 +
+ build/pkgs/pandocfilters/distros/arch.txt | 1 +
+ build/pkgs/pickleshare/distros/arch.txt   | 1 +
+ build/pkgs/pillow/distros/arch.txt        | 1 +
+ build/pkgs/pluggy/distros/arch.txt        | 1 +
+ build/pkgs/py/distros/arch.txt            | 1 +
+ build/pkgs/pygments/distros/arch.txt      | 1 +
+ build/pkgs/pytz/distros/arch.txt          | 1 +
+ build/pkgs/pyzmq/distros/arch.txt         | 1 +
+ build/pkgs/requests/distros/arch.txt      | 1 +
+ build/pkgs/scipy/distros/arch.txt         | 1 +
+ build/pkgs/setuptools/distros/arch.txt    | 1 +
+ build/pkgs/six/distros/arch.txt           | 1 +
+ build/pkgs/sympy/distros/arch.txt         | 1 +
+ build/pkgs/texttable/distros/arch.txt     | 1 +
+ build/pkgs/toml/distros/arch.txt          | 1 +
+ build/pkgs/webencodings/distros/arch.txt  | 1 +
+ build/pkgs/wheel/distros/arch.txt         | 1 +
+ 29 files changed, 29 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/arch.txt
+ create mode 100644 build/pkgs/bleach/distros/arch.txt
+ create mode 100644 build/pkgs/certifi/distros/arch.txt
+ create mode 100644 build/pkgs/cvxopt/distros/arch.txt
+ create mode 100644 build/pkgs/decorator/distros/arch.txt
+ create mode 100644 build/pkgs/html5lib/distros/arch.txt
+ create mode 100644 build/pkgs/idna/distros/arch.txt
+ create mode 100644 build/pkgs/matplotlib/distros/arch.txt
+ create mode 100644 build/pkgs/mpmath/distros/arch.txt
+ create mode 100644 build/pkgs/networkx/distros/arch.txt
+ create mode 100644 build/pkgs/numpy/distros/arch.txt
+ create mode 100644 build/pkgs/packaging/distros/arch.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/arch.txt
+ create mode 100644 build/pkgs/pickleshare/distros/arch.txt
+ create mode 100644 build/pkgs/pillow/distros/arch.txt
+ create mode 100644 build/pkgs/pluggy/distros/arch.txt
+ create mode 100644 build/pkgs/py/distros/arch.txt
+ create mode 100644 build/pkgs/pygments/distros/arch.txt
+ create mode 100644 build/pkgs/pytz/distros/arch.txt
+ create mode 100644 build/pkgs/pyzmq/distros/arch.txt
+ create mode 100644 build/pkgs/requests/distros/arch.txt
+ create mode 100644 build/pkgs/scipy/distros/arch.txt
+ create mode 100644 build/pkgs/setuptools/distros/arch.txt
+ create mode 100644 build/pkgs/six/distros/arch.txt
+ create mode 100644 build/pkgs/sympy/distros/arch.txt
+ create mode 100644 build/pkgs/texttable/distros/arch.txt
+ create mode 100644 build/pkgs/toml/distros/arch.txt
+ create mode 100644 build/pkgs/webencodings/distros/arch.txt
+ create mode 100644 build/pkgs/wheel/distros/arch.txt
+
+diff --git a/build/pkgs/babel/distros/arch.txt b/build/pkgs/babel/distros/arch.txt
+new file mode 100644
+index 00000000..f2d828c
+--- /dev/null
++++ b/build/pkgs/babel/distros/arch.txt
+@@ -0,0 +1 @@
++python-babel
+diff --git a/build/pkgs/bleach/distros/arch.txt b/build/pkgs/bleach/distros/arch.txt
+new file mode 100644
+index 00000000..c5422cc
+--- /dev/null
++++ b/build/pkgs/bleach/distros/arch.txt
+@@ -0,0 +1 @@
++python-bleach
+diff --git a/build/pkgs/certifi/distros/arch.txt b/build/pkgs/certifi/distros/arch.txt
+new file mode 100644
+index 00000000..be421c8
+--- /dev/null
++++ b/build/pkgs/certifi/distros/arch.txt
+@@ -0,0 +1 @@
++python-certifi
+diff --git a/build/pkgs/cvxopt/distros/arch.txt b/build/pkgs/cvxopt/distros/arch.txt
+new file mode 100644
+index 00000000..f15770f
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/arch.txt
+@@ -0,0 +1 @@
++python-cvxopt
+diff --git a/build/pkgs/decorator/distros/arch.txt b/build/pkgs/decorator/distros/arch.txt
+new file mode 100644
+index 00000000..0795604
+--- /dev/null
++++ b/build/pkgs/decorator/distros/arch.txt
+@@ -0,0 +1 @@
++python-decorator
+diff --git a/build/pkgs/html5lib/distros/arch.txt b/build/pkgs/html5lib/distros/arch.txt
+new file mode 100644
+index 00000000..b821491
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/arch.txt
+@@ -0,0 +1 @@
++python-html5lib
+diff --git a/build/pkgs/idna/distros/arch.txt b/build/pkgs/idna/distros/arch.txt
+new file mode 100644
+index 00000000..a73e70c
+--- /dev/null
++++ b/build/pkgs/idna/distros/arch.txt
+@@ -0,0 +1 @@
++python-idna
+diff --git a/build/pkgs/matplotlib/distros/arch.txt b/build/pkgs/matplotlib/distros/arch.txt
+new file mode 100644
+index 00000000..f6d856e
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/arch.txt
+@@ -0,0 +1 @@
++python-matplotlib
+diff --git a/build/pkgs/mpmath/distros/arch.txt b/build/pkgs/mpmath/distros/arch.txt
+new file mode 100644
+index 00000000..a7dc8d5
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/arch.txt
+@@ -0,0 +1 @@
++python-mpmath
+diff --git a/build/pkgs/networkx/distros/arch.txt b/build/pkgs/networkx/distros/arch.txt
+new file mode 100644
+index 00000000..293f943
+--- /dev/null
++++ b/build/pkgs/networkx/distros/arch.txt
+@@ -0,0 +1 @@
++python-networkx
+diff --git a/build/pkgs/numpy/distros/arch.txt b/build/pkgs/numpy/distros/arch.txt
+new file mode 100644
+index 00000000..c8722b9
+--- /dev/null
++++ b/build/pkgs/numpy/distros/arch.txt
+@@ -0,0 +1 @@
++python-numpy
+diff --git a/build/pkgs/packaging/distros/arch.txt b/build/pkgs/packaging/distros/arch.txt
+new file mode 100644
+index 00000000..02ad855
+--- /dev/null
++++ b/build/pkgs/packaging/distros/arch.txt
+@@ -0,0 +1 @@
++python-packaging
+diff --git a/build/pkgs/pandocfilters/distros/arch.txt b/build/pkgs/pandocfilters/distros/arch.txt
+new file mode 100644
+index 00000000..e7a86d0
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/arch.txt
+@@ -0,0 +1 @@
++python-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/arch.txt b/build/pkgs/pickleshare/distros/arch.txt
+new file mode 100644
+index 00000000..6d991a2
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/arch.txt
+@@ -0,0 +1 @@
++python-pickleshare
+diff --git a/build/pkgs/pillow/distros/arch.txt b/build/pkgs/pillow/distros/arch.txt
+new file mode 100644
+index 00000000..86dbb1d
+--- /dev/null
++++ b/build/pkgs/pillow/distros/arch.txt
+@@ -0,0 +1 @@
++python-pillow
+diff --git a/build/pkgs/pluggy/distros/arch.txt b/build/pkgs/pluggy/distros/arch.txt
+new file mode 100644
+index 00000000..c869e54
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/arch.txt
+@@ -0,0 +1 @@
++python-pluggy
+diff --git a/build/pkgs/py/distros/arch.txt b/build/pkgs/py/distros/arch.txt
+new file mode 100644
+index 00000000..b348d39
+--- /dev/null
++++ b/build/pkgs/py/distros/arch.txt
+@@ -0,0 +1 @@
++python-py
+diff --git a/build/pkgs/pygments/distros/arch.txt b/build/pkgs/pygments/distros/arch.txt
+new file mode 100644
+index 00000000..f3e72a8
+--- /dev/null
++++ b/build/pkgs/pygments/distros/arch.txt
+@@ -0,0 +1 @@
++python-pygments
+diff --git a/build/pkgs/pytz/distros/arch.txt b/build/pkgs/pytz/distros/arch.txt
+new file mode 100644
+index 00000000..2cccc9e
+--- /dev/null
++++ b/build/pkgs/pytz/distros/arch.txt
+@@ -0,0 +1 @@
++python-pytz
+diff --git a/build/pkgs/pyzmq/distros/arch.txt b/build/pkgs/pyzmq/distros/arch.txt
+new file mode 100644
+index 00000000..23f64d1
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/arch.txt
+@@ -0,0 +1 @@
++python-pyzmq
+diff --git a/build/pkgs/requests/distros/arch.txt b/build/pkgs/requests/distros/arch.txt
+new file mode 100644
+index 00000000..93a7bc1
+--- /dev/null
++++ b/build/pkgs/requests/distros/arch.txt
+@@ -0,0 +1 @@
++python-requests
+diff --git a/build/pkgs/scipy/distros/arch.txt b/build/pkgs/scipy/distros/arch.txt
+new file mode 100644
+index 00000000..7ff2882
+--- /dev/null
++++ b/build/pkgs/scipy/distros/arch.txt
+@@ -0,0 +1 @@
++python-scipy
+diff --git a/build/pkgs/setuptools/distros/arch.txt b/build/pkgs/setuptools/distros/arch.txt
+new file mode 100644
+index 00000000..e1ad178
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/arch.txt
+@@ -0,0 +1 @@
++python-setuptools
+diff --git a/build/pkgs/six/distros/arch.txt b/build/pkgs/six/distros/arch.txt
+new file mode 100644
+index 00000000..787c530
+--- /dev/null
++++ b/build/pkgs/six/distros/arch.txt
+@@ -0,0 +1 @@
++python-six
+diff --git a/build/pkgs/sympy/distros/arch.txt b/build/pkgs/sympy/distros/arch.txt
+new file mode 100644
+index 00000000..126c88a
+--- /dev/null
++++ b/build/pkgs/sympy/distros/arch.txt
+@@ -0,0 +1 @@
++python-sympy
+diff --git a/build/pkgs/texttable/distros/arch.txt b/build/pkgs/texttable/distros/arch.txt
+new file mode 100644
+index 00000000..8d1ccec
+--- /dev/null
++++ b/build/pkgs/texttable/distros/arch.txt
+@@ -0,0 +1 @@
++python-texttable
+diff --git a/build/pkgs/toml/distros/arch.txt b/build/pkgs/toml/distros/arch.txt
+new file mode 100644
+index 00000000..821ee77
+--- /dev/null
++++ b/build/pkgs/toml/distros/arch.txt
+@@ -0,0 +1 @@
++python-toml
+diff --git a/build/pkgs/webencodings/distros/arch.txt b/build/pkgs/webencodings/distros/arch.txt
+new file mode 100644
+index 00000000..12ddba9
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/arch.txt
+@@ -0,0 +1 @@
++python-webencodings
+diff --git a/build/pkgs/wheel/distros/arch.txt b/build/pkgs/wheel/distros/arch.txt
+new file mode 100644
+index 00000000..ae4cbb9
+--- /dev/null
++++ b/build/pkgs/wheel/distros/arch.txt
+@@ -0,0 +1 @@
++python-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5087abee08f2a89ddaf422ec72a84575fe724a79 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 21:20:56 -0700
+Subject: build/pkgs: Add distros/opensuse.txt for Python packages
+
+---
+ build/pkgs/bleach/distros/opensuse.txt        | 1 +
+ build/pkgs/cvxopt/distros/opensuse.txt        | 1 +
+ build/pkgs/html5lib/distros/opensuse.txt      | 1 +
+ build/pkgs/idna/distros/opensuse.txt          | 1 +
+ build/pkgs/jinja2/distros/opensuse.txt        | 2 +-
+ build/pkgs/mpmath/distros/opensuse.txt        | 1 +
+ build/pkgs/numpy/distros/opensuse.txt         | 1 +
+ build/pkgs/packaging/distros/opensuse.txt     | 1 +
+ build/pkgs/pandocfilters/distros/opensuse.txt | 1 +
+ build/pkgs/pluggy/distros/opensuse.txt        | 1 +
+ build/pkgs/py/distros/opensuse.txt            | 1 +
+ build/pkgs/pygments/distros/opensuse.txt      | 2 +-
+ build/pkgs/sympy/distros/opensuse.txt         | 1 +
+ build/pkgs/texttable/distros/opensuse.txt     | 1 +
+ build/pkgs/toml/distros/opensuse.txt          | 1 +
+ 15 files changed, 15 insertions(+), 2 deletions(-)
+ create mode 100644 build/pkgs/bleach/distros/opensuse.txt
+ create mode 100644 build/pkgs/cvxopt/distros/opensuse.txt
+ create mode 100644 build/pkgs/html5lib/distros/opensuse.txt
+ create mode 100644 build/pkgs/idna/distros/opensuse.txt
+ create mode 100644 build/pkgs/mpmath/distros/opensuse.txt
+ create mode 100644 build/pkgs/numpy/distros/opensuse.txt
+ create mode 100644 build/pkgs/packaging/distros/opensuse.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/opensuse.txt
+ create mode 100644 build/pkgs/pluggy/distros/opensuse.txt
+ create mode 100644 build/pkgs/py/distros/opensuse.txt
+ create mode 100644 build/pkgs/sympy/distros/opensuse.txt
+ create mode 100644 build/pkgs/texttable/distros/opensuse.txt
+ create mode 100644 build/pkgs/toml/distros/opensuse.txt
+
+diff --git a/build/pkgs/bleach/distros/opensuse.txt b/build/pkgs/bleach/distros/opensuse.txt
+new file mode 100644
+index 00000000..6d37c4c
+--- /dev/null
++++ b/build/pkgs/bleach/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-bleach
+diff --git a/build/pkgs/cvxopt/distros/opensuse.txt b/build/pkgs/cvxopt/distros/opensuse.txt
+new file mode 100644
+index 00000000..2bb6ad1
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-cvxopt
+diff --git a/build/pkgs/html5lib/distros/opensuse.txt b/build/pkgs/html5lib/distros/opensuse.txt
+new file mode 100644
+index 00000000..6d7b8df
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-html5lib
+diff --git a/build/pkgs/idna/distros/opensuse.txt b/build/pkgs/idna/distros/opensuse.txt
+new file mode 100644
+index 00000000..de48e70
+--- /dev/null
++++ b/build/pkgs/idna/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-idna
+diff --git a/build/pkgs/jinja2/distros/opensuse.txt b/build/pkgs/jinja2/distros/opensuse.txt
+index 5d90a22..f2db865 100644
+--- a/build/pkgs/jinja2/distros/opensuse.txt
++++ b/build/pkgs/jinja2/distros/opensuse.txt
+@@ -1 +1 @@
+-python3-Jinja2
++python3-jinja2
+diff --git a/build/pkgs/mpmath/distros/opensuse.txt b/build/pkgs/mpmath/distros/opensuse.txt
+new file mode 100644
+index 00000000..fbc82a9
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-mpmath
+diff --git a/build/pkgs/numpy/distros/opensuse.txt b/build/pkgs/numpy/distros/opensuse.txt
+new file mode 100644
+index 00000000..79d5c5a
+--- /dev/null
++++ b/build/pkgs/numpy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-numpy
+diff --git a/build/pkgs/packaging/distros/opensuse.txt b/build/pkgs/packaging/distros/opensuse.txt
+new file mode 100644
+index 00000000..8f1c0ff
+--- /dev/null
++++ b/build/pkgs/packaging/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-packaging
+diff --git a/build/pkgs/pandocfilters/distros/opensuse.txt b/build/pkgs/pandocfilters/distros/opensuse.txt
+new file mode 100644
+index 00000000..d0d4c24
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-pandocfilters
+diff --git a/build/pkgs/pluggy/distros/opensuse.txt b/build/pkgs/pluggy/distros/opensuse.txt
+new file mode 100644
+index 00000000..43a3acf
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-pluggy
+diff --git a/build/pkgs/py/distros/opensuse.txt b/build/pkgs/py/distros/opensuse.txt
+new file mode 100644
+index 00000000..81fefe6
+--- /dev/null
++++ b/build/pkgs/py/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-py
+diff --git a/build/pkgs/pygments/distros/opensuse.txt b/build/pkgs/pygments/distros/opensuse.txt
+index 9ff5740..3ab3792 100644
+--- a/build/pkgs/pygments/distros/opensuse.txt
++++ b/build/pkgs/pygments/distros/opensuse.txt
+@@ -1 +1 @@
+-python3-Pygments
++python3-pygments
+diff --git a/build/pkgs/sympy/distros/opensuse.txt b/build/pkgs/sympy/distros/opensuse.txt
+new file mode 100644
+index 00000000..db423c8
+--- /dev/null
++++ b/build/pkgs/sympy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-sympy
+diff --git a/build/pkgs/texttable/distros/opensuse.txt b/build/pkgs/texttable/distros/opensuse.txt
+new file mode 100644
+index 00000000..8f8e7e2
+--- /dev/null
++++ b/build/pkgs/texttable/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-texttable
+diff --git a/build/pkgs/toml/distros/opensuse.txt b/build/pkgs/toml/distros/opensuse.txt
+new file mode 100644
+index 00000000..543e89d
+--- /dev/null
++++ b/build/pkgs/toml/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-toml
+-- 
+cgit v1.0-1-gd88e
+
+
+From a480ba7ace1370d106ae831e904ea22b72af1be7 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 22:45:04 -0700
+Subject: build/pkgs: Add distros/debian.txt for Python packages
+
+---
+ build/pkgs/babel/distros/debian.txt         | 1 +
+ build/pkgs/bleach/distros/debian.txt        | 1 +
+ build/pkgs/certifi/distros/debian.txt       | 1 +
+ build/pkgs/cvxopt/distros/debian.txt        | 1 +
+ build/pkgs/decorator/distros/debian.txt     | 1 +
+ build/pkgs/html5lib/distros/debian.txt      | 1 +
+ build/pkgs/idna/distros/debian.txt          | 1 +
+ build/pkgs/jinja2/distros/debian.txt        | 1 +
+ build/pkgs/matplotlib/distros/debian.txt    | 1 +
+ build/pkgs/mpmath/distros/debian.txt        | 1 +
+ build/pkgs/networkx/distros/debian.txt      | 1 +
+ build/pkgs/numpy/distros/debian.txt         | 1 +
+ build/pkgs/packaging/distros/debian.txt     | 1 +
+ build/pkgs/pandocfilters/distros/debian.txt | 1 +
+ build/pkgs/pickleshare/distros/debian.txt   | 1 +
+ build/pkgs/pillow/distros/debian.txt        | 1 +
+ build/pkgs/pluggy/distros/debian.txt        | 1 +
+ build/pkgs/py/distros/debian.txt            | 1 +
+ build/pkgs/pygments/distros/debian.txt      | 1 +
+ build/pkgs/pytz/distros/debian.txt          | 1 +
+ build/pkgs/requests/distros/debian.txt      | 1 +
+ build/pkgs/scipy/distros/debian.txt         | 1 +
+ build/pkgs/setuptools/distros/debian.txt    | 1 +
+ build/pkgs/six/distros/debian.txt           | 1 +
+ build/pkgs/sympy/distros/debian.txt         | 1 +
+ build/pkgs/texttable/distros/debian.txt     | 1 +
+ build/pkgs/toml/distros/debian.txt          | 1 +
+ build/pkgs/webencodings/distros/debian.txt  | 1 +
+ build/pkgs/wheel/distros/debian.txt         | 1 +
+ 29 files changed, 29 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/debian.txt
+ create mode 100644 build/pkgs/bleach/distros/debian.txt
+ create mode 100644 build/pkgs/certifi/distros/debian.txt
+ create mode 100644 build/pkgs/cvxopt/distros/debian.txt
+ create mode 100644 build/pkgs/decorator/distros/debian.txt
+ create mode 100644 build/pkgs/html5lib/distros/debian.txt
+ create mode 100644 build/pkgs/idna/distros/debian.txt
+ create mode 100644 build/pkgs/jinja2/distros/debian.txt
+ create mode 100644 build/pkgs/matplotlib/distros/debian.txt
+ create mode 100644 build/pkgs/mpmath/distros/debian.txt
+ create mode 100644 build/pkgs/networkx/distros/debian.txt
+ create mode 100644 build/pkgs/numpy/distros/debian.txt
+ create mode 100644 build/pkgs/packaging/distros/debian.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/debian.txt
+ create mode 100644 build/pkgs/pickleshare/distros/debian.txt
+ create mode 100644 build/pkgs/pillow/distros/debian.txt
+ create mode 100644 build/pkgs/pluggy/distros/debian.txt
+ create mode 100644 build/pkgs/py/distros/debian.txt
+ create mode 100644 build/pkgs/pygments/distros/debian.txt
+ create mode 100644 build/pkgs/pytz/distros/debian.txt
+ create mode 100644 build/pkgs/requests/distros/debian.txt
+ create mode 100644 build/pkgs/scipy/distros/debian.txt
+ create mode 100644 build/pkgs/setuptools/distros/debian.txt
+ create mode 100644 build/pkgs/six/distros/debian.txt
+ create mode 100644 build/pkgs/sympy/distros/debian.txt
+ create mode 100644 build/pkgs/texttable/distros/debian.txt
+ create mode 100644 build/pkgs/toml/distros/debian.txt
+ create mode 100644 build/pkgs/webencodings/distros/debian.txt
+ create mode 100644 build/pkgs/wheel/distros/debian.txt
+
+diff --git a/build/pkgs/babel/distros/debian.txt b/build/pkgs/babel/distros/debian.txt
+new file mode 100644
+index 00000000..e623eb6
+--- /dev/null
++++ b/build/pkgs/babel/distros/debian.txt
+@@ -0,0 +1 @@
++python3-babel
+diff --git a/build/pkgs/bleach/distros/debian.txt b/build/pkgs/bleach/distros/debian.txt
+new file mode 100644
+index 00000000..6d37c4c
+--- /dev/null
++++ b/build/pkgs/bleach/distros/debian.txt
+@@ -0,0 +1 @@
++python3-bleach
+diff --git a/build/pkgs/certifi/distros/debian.txt b/build/pkgs/certifi/distros/debian.txt
+new file mode 100644
+index 00000000..f585a82
+--- /dev/null
++++ b/build/pkgs/certifi/distros/debian.txt
+@@ -0,0 +1 @@
++python3-certifi
+diff --git a/build/pkgs/cvxopt/distros/debian.txt b/build/pkgs/cvxopt/distros/debian.txt
+new file mode 100644
+index 00000000..2bb6ad1
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/debian.txt
+@@ -0,0 +1 @@
++python3-cvxopt
+diff --git a/build/pkgs/decorator/distros/debian.txt b/build/pkgs/decorator/distros/debian.txt
+new file mode 100644
+index 00000000..46c478e
+--- /dev/null
++++ b/build/pkgs/decorator/distros/debian.txt
+@@ -0,0 +1 @@
++python3-decorator
+diff --git a/build/pkgs/html5lib/distros/debian.txt b/build/pkgs/html5lib/distros/debian.txt
+new file mode 100644
+index 00000000..6d7b8df
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/debian.txt
+@@ -0,0 +1 @@
++python3-html5lib
+diff --git a/build/pkgs/idna/distros/debian.txt b/build/pkgs/idna/distros/debian.txt
+new file mode 100644
+index 00000000..de48e70
+--- /dev/null
++++ b/build/pkgs/idna/distros/debian.txt
+@@ -0,0 +1 @@
++python3-idna
+diff --git a/build/pkgs/jinja2/distros/debian.txt b/build/pkgs/jinja2/distros/debian.txt
+new file mode 100644
+index 00000000..f2db865
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/debian.txt
+@@ -0,0 +1 @@
++python3-jinja2
+diff --git a/build/pkgs/matplotlib/distros/debian.txt b/build/pkgs/matplotlib/distros/debian.txt
+new file mode 100644
+index 00000000..1374329
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/debian.txt
+@@ -0,0 +1 @@
++python3-matplotlib
+diff --git a/build/pkgs/mpmath/distros/debian.txt b/build/pkgs/mpmath/distros/debian.txt
+new file mode 100644
+index 00000000..fbc82a9
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/debian.txt
+@@ -0,0 +1 @@
++python3-mpmath
+diff --git a/build/pkgs/networkx/distros/debian.txt b/build/pkgs/networkx/distros/debian.txt
+new file mode 100644
+index 00000000..6779066
+--- /dev/null
++++ b/build/pkgs/networkx/distros/debian.txt
+@@ -0,0 +1 @@
++python3-networkx
+diff --git a/build/pkgs/numpy/distros/debian.txt b/build/pkgs/numpy/distros/debian.txt
+new file mode 100644
+index 00000000..79d5c5a
+--- /dev/null
++++ b/build/pkgs/numpy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-numpy
+diff --git a/build/pkgs/packaging/distros/debian.txt b/build/pkgs/packaging/distros/debian.txt
+new file mode 100644
+index 00000000..8f1c0ff
+--- /dev/null
++++ b/build/pkgs/packaging/distros/debian.txt
+@@ -0,0 +1 @@
++python3-packaging
+diff --git a/build/pkgs/pandocfilters/distros/debian.txt b/build/pkgs/pandocfilters/distros/debian.txt
+new file mode 100644
+index 00000000..d0d4c24
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/debian.txt b/build/pkgs/pickleshare/distros/debian.txt
+new file mode 100644
+index 00000000..a00907d
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pickleshare
+diff --git a/build/pkgs/pillow/distros/debian.txt b/build/pkgs/pillow/distros/debian.txt
+new file mode 100644
+index 00000000..3319fcd
+--- /dev/null
++++ b/build/pkgs/pillow/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pillow
+diff --git a/build/pkgs/pluggy/distros/debian.txt b/build/pkgs/pluggy/distros/debian.txt
+new file mode 100644
+index 00000000..43a3acf
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pluggy
+diff --git a/build/pkgs/py/distros/debian.txt b/build/pkgs/py/distros/debian.txt
+new file mode 100644
+index 00000000..81fefe6
+--- /dev/null
++++ b/build/pkgs/py/distros/debian.txt
+@@ -0,0 +1 @@
++python3-py
+diff --git a/build/pkgs/pygments/distros/debian.txt b/build/pkgs/pygments/distros/debian.txt
+new file mode 100644
+index 00000000..3ab3792
+--- /dev/null
++++ b/build/pkgs/pygments/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pygments
+diff --git a/build/pkgs/pytz/distros/debian.txt b/build/pkgs/pytz/distros/debian.txt
+new file mode 100644
+index 00000000..db20908
+--- /dev/null
++++ b/build/pkgs/pytz/distros/debian.txt
+@@ -0,0 +1 @@
++python3-tz
+diff --git a/build/pkgs/requests/distros/debian.txt b/build/pkgs/requests/distros/debian.txt
+new file mode 100644
+index 00000000..43147b2
+--- /dev/null
++++ b/build/pkgs/requests/distros/debian.txt
+@@ -0,0 +1 @@
++python3-requests
+diff --git a/build/pkgs/scipy/distros/debian.txt b/build/pkgs/scipy/distros/debian.txt
+new file mode 100644
+index 00000000..12b3666
+--- /dev/null
++++ b/build/pkgs/scipy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-scipy
+diff --git a/build/pkgs/setuptools/distros/debian.txt b/build/pkgs/setuptools/distros/debian.txt
+new file mode 100644
+index 00000000..1c0901c
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/debian.txt
+@@ -0,0 +1 @@
++python3-setuptools
+diff --git a/build/pkgs/six/distros/debian.txt b/build/pkgs/six/distros/debian.txt
+new file mode 100644
+index 00000000..68ff859
+--- /dev/null
++++ b/build/pkgs/six/distros/debian.txt
+@@ -0,0 +1 @@
++python3-six
+diff --git a/build/pkgs/sympy/distros/debian.txt b/build/pkgs/sympy/distros/debian.txt
+new file mode 100644
+index 00000000..db423c8
+--- /dev/null
++++ b/build/pkgs/sympy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-sympy
+diff --git a/build/pkgs/texttable/distros/debian.txt b/build/pkgs/texttable/distros/debian.txt
+new file mode 100644
+index 00000000..8f8e7e2
+--- /dev/null
++++ b/build/pkgs/texttable/distros/debian.txt
+@@ -0,0 +1 @@
++python3-texttable
+diff --git a/build/pkgs/toml/distros/debian.txt b/build/pkgs/toml/distros/debian.txt
+new file mode 100644
+index 00000000..543e89d
+--- /dev/null
++++ b/build/pkgs/toml/distros/debian.txt
+@@ -0,0 +1 @@
++python3-toml
+diff --git a/build/pkgs/webencodings/distros/debian.txt b/build/pkgs/webencodings/distros/debian.txt
+new file mode 100644
+index 00000000..ac30c2f
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/debian.txt
+@@ -0,0 +1 @@
++python3-webencodings
+diff --git a/build/pkgs/wheel/distros/debian.txt b/build/pkgs/wheel/distros/debian.txt
+new file mode 100644
+index 00000000..3c066725
+--- /dev/null
++++ b/build/pkgs/wheel/distros/debian.txt
+@@ -0,0 +1 @@
++python3-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 93bf30d7de292551c3050e2dd74651d69ba4bd46 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 18 Oct 2021 07:50:34 -0400
+Subject: Trac #29665: add more documentation for SAGE_PYTHON_PACKAGE_CHECK().
+
+An earlier commit allows SAGE_PYTHON_PACKAGE_CHECK(package) to tweak the
+value of sage_use_system_$package if --enable-system-site-packages was
+not used. This essentially changes the default --with-system-$package=yes
+to "no" in that case. Here we update the documentation to reflect it.
+---
+ m4/sage_python_package_check.m4 | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 7ee82a7..95eefd0 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -34,6 +34,10 @@
+ #   ensure that the ./configure- and run-time views of the system
+ #   are as similar as possible.
+ #
++#   To avoid suggesting these system packages to users who have not
++#   set --enable-system-site-packages, this macro also changes the
++#   default for --with-system-foo from "yes" to "no" in that case.
++#
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
+-- 
+cgit v1.0-1-gd88e
+
+
+From d771e49d57ecdf3622434bc09cbfb87ad3bb7744 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 18 Oct 2021 07:42:46 -0400
+Subject: Trac #29665: improve SAGE_PYTHON_PACKAGE_CHECK() failure message.
+
+When --enable-system-site-packages is off, SAGE_PYTHON_PACKAGE_CHECK()
+will always install the corresponding SPKG. We improve the ./configure
+output in that case to make it clear that the decision was based on
+the value of --enable-system-site-packages and not the "real" check.
+---
+ m4/sage_python_package_check.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 95eefd0..5f0f084 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -40,7 +40,9 @@
+ #
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
++  AC_MSG_CHECKING([if --enable-system-site-packages was used])
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
++    AC_MSG_RESULT(yes)
+     AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
+ 
+     dnl We run this check inside a python venv, because that's ultimately
+@@ -94,6 +96,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
+     dnl System site packages are disabled.
++    AC_MSG_RESULT(no; skipping check)
+     sage_spkg_install_$1=yes
+ 
+     dnl We have to retroactively hack the --with-system-foo={no,yes,force}
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5bb43c1b78a1deb3364f235305937c2f823e5e18 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 24 Oct 2021 20:29:25 -0400
+Subject: Trac #29665: use sage-venv in SAGE_PYTHON_PACKAGE_CHECK().
+
+For consistency with the rest of the build system, we now use the
+build/bin/sage-venv script to create the venv in this autoconf macro
+rather than invoking $PYTHON_FOR_VENV with "-m venv" directly.
+---
+ m4/sage_python_package_check.m4 | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 5f0f084..5547b35 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -50,11 +50,11 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AC_MSG_CHECKING([if we can create a python venv in config.venv])
+ 
+     dnl Use --clear because ./configure typically clobbers its output files.
+-    AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
+-                                        --clear                dnl
+-                                        --without-pip          dnl
+-                                        config.venv            dnl
+-                                        2>&AS_MESSAGE_LOG_FD], [
++    AS_IF(["${PYTHON_FOR_VENV}" build/bin/sage-venv      dnl
++                                  --system-site-packages dnl
++                                  --clear                dnl
++                                  config.venv            dnl
++                                  2>&AS_MESSAGE_LOG_FD], [
+       AC_MSG_RESULT(yes)
+       dnl strip all comments from install-requires.txt; this should leave
+       dnl only a single line containing the version specification for this
+-- 
+cgit v1.0-1-gd88e
+
+
+From c78363d6326addff16ca5abac897949a6be72bf4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:10:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for urllib3.
+
+---
+ build/pkgs/urllib3/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/urllib3/spkg-configure.m4
+
+diff --git a/build/pkgs/urllib3/spkg-configure.m4 b/build/pkgs/urllib3/spkg-configure.m4
+new file mode 100644
+index 00000000..d7ef3e1
+--- /dev/null
++++ b/build/pkgs/urllib3/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([urllib3], [SAGE_PYTHON_PACKAGE_CHECK([urllib3])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f416d5abcae495ea8301fad024b279ea9e997b29 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:15:18 -0400
+Subject: Trac #29665: add Gentoo package information for urllib3.
+
+---
+ build/pkgs/urllib3/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/urllib3/distros/gentoo.txt
+
+diff --git a/build/pkgs/urllib3/distros/gentoo.txt b/build/pkgs/urllib3/distros/gentoo.txt
+new file mode 100644
+index 00000000..172a535
+--- /dev/null
++++ b/build/pkgs/urllib3/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/urllib3
+-- 
+cgit v1.0-1-gd88e
+
+
+From 852068b992bf7959500c650f54cb92e5b68d7ef8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:15:58 -0400
+Subject: Trac #29665: add Gentoo package information for nbformat.
+
+---
+ build/pkgs/nbformat/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbformat/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbformat/distros/gentoo.txt b/build/pkgs/nbformat/distros/gentoo.txt
+new file mode 100644
+index 00000000..006b1f2
+--- /dev/null
++++ b/build/pkgs/nbformat/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbformat
+-- 
+cgit v1.0-1-gd88e
+
+
+From 66179fd28fcc92ee840dcd87bb4db25cea968d66 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:34:16 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for nbformat.
+
+---
+ build/pkgs/nbformat/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbformat/spkg-configure.m4
+
+diff --git a/build/pkgs/nbformat/spkg-configure.m4 b/build/pkgs/nbformat/spkg-configure.m4
+new file mode 100644
+index 00000000..5a7f8c4
+--- /dev/null
++++ b/build/pkgs/nbformat/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbformat], [SAGE_PYTHON_PACKAGE_CHECK([nbformat])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 874005e81ed20f27a5f895030dcdbdfc5f73ad80 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:47:01 -0400
+Subject: Trac #29665: add Gentoo package information for zipp.
+
+---
+ build/pkgs/zipp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/zipp/distros/gentoo.txt
+
+diff --git a/build/pkgs/zipp/distros/gentoo.txt b/build/pkgs/zipp/distros/gentoo.txt
+new file mode 100644
+index 00000000..7f59450
+--- /dev/null
++++ b/build/pkgs/zipp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/zipp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0cc2a7355b5554c1fb79c742ebf02eff54465b3e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:47:35 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for zipp.
+
+---
+ build/pkgs/zipp/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/zipp/spkg-configure.m4
+
+diff --git a/build/pkgs/zipp/spkg-configure.m4 b/build/pkgs/zipp/spkg-configure.m4
+new file mode 100644
+index 00000000..0fe3a9c
+--- /dev/null
++++ b/build/pkgs/zipp/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([zipp], [SAGE_PYTHON_PACKAGE_CHECK([zipp])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6073ad8e56c21fc862749bbd84a56d543fb9458c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:48:37 -0400
+Subject: Trac #29665: add Gentoo package information for wcwidth.
+
+---
+ build/pkgs/wcwidth/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wcwidth/distros/gentoo.txt
+
+diff --git a/build/pkgs/wcwidth/distros/gentoo.txt b/build/pkgs/wcwidth/distros/gentoo.txt
+new file mode 100644
+index 00000000..edeb80b
+--- /dev/null
++++ b/build/pkgs/wcwidth/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/wcwidth
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9793d6172c64d61a015fbe61bd45863759124fad Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:51:10 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for wcwidth.
+
+---
+ build/pkgs/wcwidth/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wcwidth/spkg-configure.m4
+
+diff --git a/build/pkgs/wcwidth/spkg-configure.m4 b/build/pkgs/wcwidth/spkg-configure.m4
+new file mode 100644
+index 00000000..5bde15a
+--- /dev/null
++++ b/build/pkgs/wcwidth/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([wcwidth], [SAGE_PYTHON_PACKAGE_CHECK([wcwidth])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20232f370a43c146ca4e696c72a2cbcc498db060 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:52:36 -0400
+Subject: Trac #29665: add Gentoo package information for testpath.
+
+---
+ build/pkgs/testpath/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/testpath/distros/gentoo.txt
+
+diff --git a/build/pkgs/testpath/distros/gentoo.txt b/build/pkgs/testpath/distros/gentoo.txt
+new file mode 100644
+index 00000000..efa10a0
+--- /dev/null
++++ b/build/pkgs/testpath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/testpath
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1b0785b2aad8844e74345fe950baf097e2b43d24 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:55:22 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for testpath.
+
+---
+ build/pkgs/testpath/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/testpath/spkg-configure.m4
+
+diff --git a/build/pkgs/testpath/spkg-configure.m4 b/build/pkgs/testpath/spkg-configure.m4
+new file mode 100644
+index 00000000..d8fc2a7
+--- /dev/null
++++ b/build/pkgs/testpath/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([testpath], [SAGE_PYTHON_PACKAGE_CHECK([testpath])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 10fc3829ecd956d732b1b069fdfe81f0d6d5cdc2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:56:06 -0400
+Subject: Trac #29665: add Gentoo package information for jedi.
+
+---
+ build/pkgs/jedi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jedi/distros/gentoo.txt
+
+diff --git a/build/pkgs/jedi/distros/gentoo.txt b/build/pkgs/jedi/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c85a46
+--- /dev/null
++++ b/build/pkgs/jedi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jedi
+-- 
+cgit v1.0-1-gd88e
+
+
+From a75824d74c281c7639028ca01dabeed266f56998 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:06:37 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for jedi.
+
+---
+ build/pkgs/jedi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jedi/spkg-configure.m4
+
+diff --git a/build/pkgs/jedi/spkg-configure.m4 b/build/pkgs/jedi/spkg-configure.m4
+new file mode 100644
+index 00000000..a37dbcc
+--- /dev/null
++++ b/build/pkgs/jedi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jedi], [SAGE_PYTHON_PACKAGE_CHECK([jedi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 17af01373d43f6acbbdbc23e073e372d3fdadf8b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:07:47 -0400
+Subject: Trac #29665: add Gentoo package information for tomli.
+
+---
+ build/pkgs/tomli/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tomli/distros/gentoo.txt
+
+diff --git a/build/pkgs/tomli/distros/gentoo.txt b/build/pkgs/tomli/distros/gentoo.txt
+new file mode 100644
+index 00000000..0458e25
+--- /dev/null
++++ b/build/pkgs/tomli/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/tomli
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0d3b5994ae612be11992467c4a3f1a74b81400fe Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:08:12 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for tomli.
+
+---
+ build/pkgs/tomli/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tomli/spkg-configure.m4
+
+diff --git a/build/pkgs/tomli/spkg-configure.m4 b/build/pkgs/tomli/spkg-configure.m4
+new file mode 100644
+index 00000000..95a8b8b
+--- /dev/null
++++ b/build/pkgs/tomli/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tomli], [SAGE_PYTHON_PACKAGE_CHECK([tomli])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From dce1c515781b0eeb8eb9c2bc7aba581560c1fac1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:09:22 -0400
+Subject: Trac #29665: add Gentoo package information for defusedxml.
+
+---
+ build/pkgs/defusedxml/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/defusedxml/distros/gentoo.txt
+
+diff --git a/build/pkgs/defusedxml/distros/gentoo.txt b/build/pkgs/defusedxml/distros/gentoo.txt
+new file mode 100644
+index 00000000..2804214
+--- /dev/null
++++ b/build/pkgs/defusedxml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/defusedxml
+-- 
+cgit v1.0-1-gd88e
+
+
+From 02e1e1cd7f8bdae3ca5b7d35ce70af28a44e9b7c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:11:14 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for defusedxml.
+
+---
+ build/pkgs/defusedxml/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/defusedxml/spkg-configure.m4
+
+diff --git a/build/pkgs/defusedxml/spkg-configure.m4 b/build/pkgs/defusedxml/spkg-configure.m4
+new file mode 100644
+index 00000000..e02f345
+--- /dev/null
++++ b/build/pkgs/defusedxml/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([defusedxml], [SAGE_PYTHON_PACKAGE_CHECK([defusedxml])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e0ba4ebb5cfc637b5d26b85de9f34e0a160d2b9c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:12:22 -0400
+Subject: Trac #29665: add Gentoo package information for ipywidgets.
+
+---
+ build/pkgs/ipywidgets/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipywidgets/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipywidgets/distros/gentoo.txt b/build/pkgs/ipywidgets/distros/gentoo.txt
+new file mode 100644
+index 00000000..7c76967
+--- /dev/null
++++ b/build/pkgs/ipywidgets/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipywidgets
+-- 
+cgit v1.0-1-gd88e
+
+
+From 49df7e7d93c7a31b7c46d5d224a35fd313a29a32 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:15:53 -0400
+Subject: Trac #29665: add Gentoo package information for simplegeneric.
+
+---
+ build/pkgs/simplegeneric/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/simplegeneric/distros/gentoo.txt
+
+diff --git a/build/pkgs/simplegeneric/distros/gentoo.txt b/build/pkgs/simplegeneric/distros/gentoo.txt
+new file mode 100644
+index 00000000..a86e90d
+--- /dev/null
++++ b/build/pkgs/simplegeneric/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/simplegeneric
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2a893635d5804749e6fec7ed7289c921ecb5300a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:16:33 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for simplegeneric.
+
+---
+ build/pkgs/simplegeneric/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/simplegeneric/spkg-configure.m4
+
+diff --git a/build/pkgs/simplegeneric/spkg-configure.m4 b/build/pkgs/simplegeneric/spkg-configure.m4
+new file mode 100644
+index 00000000..13715ab
+--- /dev/null
++++ b/build/pkgs/simplegeneric/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([simplegeneric], [SAGE_PYTHON_PACKAGE_CHECK([simplegeneric])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a8fe7ecd6e3163e7d01261e5497ac452a8cc95ab Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:17:18 -0400
+Subject: Trac #29665: add Gentoo package information for imagesize.
+
+---
+ build/pkgs/imagesize/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/imagesize/distros/gentoo.txt
+
+diff --git a/build/pkgs/imagesize/distros/gentoo.txt b/build/pkgs/imagesize/distros/gentoo.txt
+new file mode 100644
+index 00000000..54350ba
+--- /dev/null
++++ b/build/pkgs/imagesize/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/imagesize
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2ad837c5dd1fca0f50ce6d5042a9344210a54f84 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:17:48 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for imagesize.
+
+---
+ build/pkgs/imagesize/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/imagesize/spkg-configure.m4
+
+diff --git a/build/pkgs/imagesize/spkg-configure.m4 b/build/pkgs/imagesize/spkg-configure.m4
+new file mode 100644
+index 00000000..20210ef
+--- /dev/null
++++ b/build/pkgs/imagesize/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([imagesize], [SAGE_PYTHON_PACKAGE_CHECK([imagesize])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bf47415b5bfca2d7bf24e20de35662bf331623b9 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:18:49 -0400
+Subject: Trac #29665: add Gentoo package information for mistune.
+
+---
+ build/pkgs/mistune/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mistune/distros/gentoo.txt
+
+diff --git a/build/pkgs/mistune/distros/gentoo.txt b/build/pkgs/mistune/distros/gentoo.txt
+new file mode 100644
+index 00000000..56f0a4e
+--- /dev/null
++++ b/build/pkgs/mistune/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/mistune
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6898a74fd0c65a40c5220ba68b4062ac6fe060c6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:21:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for mistune.
+
+---
+ build/pkgs/mistune/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mistune/spkg-configure.m4
+
+diff --git a/build/pkgs/mistune/spkg-configure.m4 b/build/pkgs/mistune/spkg-configure.m4
+new file mode 100644
+index 00000000..972f33d
+--- /dev/null
++++ b/build/pkgs/mistune/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([mistune], [SAGE_PYTHON_PACKAGE_CHECK([mistune])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 62735e4ccf2031cd39eb5e04b03bdfd97005d808 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:22:48 -0400
+Subject: Trac #29665: add Gentoo package information for backcall.
+
+---
+ build/pkgs/backcall/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/backcall/distros/gentoo.txt
+
+diff --git a/build/pkgs/backcall/distros/gentoo.txt b/build/pkgs/backcall/distros/gentoo.txt
+new file mode 100644
+index 00000000..266a222
+--- /dev/null
++++ b/build/pkgs/backcall/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/backcall
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9ef3ea42d4a33c7cdb623fa5417ae300cf323183 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:25:10 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for backcall.
+
+---
+ build/pkgs/backcall/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/backcall/spkg-configure.m4
+
+diff --git a/build/pkgs/backcall/spkg-configure.m4 b/build/pkgs/backcall/spkg-configure.m4
+new file mode 100644
+index 00000000..d6b11c4
+--- /dev/null
++++ b/build/pkgs/backcall/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([backcall], [SAGE_PYTHON_PACKAGE_CHECK([backcall])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1b3ea2a3c40fea0fb58435f5e5304368ea58dff8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:25:58 -0400
+Subject: Trac #29665: add Gentoo package information for parso.
+
+---
+ build/pkgs/parso/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/parso/distros/gentoo.txt
+
+diff --git a/build/pkgs/parso/distros/gentoo.txt b/build/pkgs/parso/distros/gentoo.txt
+new file mode 100644
+index 00000000..f9ce4c7
+--- /dev/null
++++ b/build/pkgs/parso/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/parso
+-- 
+cgit v1.0-1-gd88e
+
+
+From 963a3a2c563ec71a1f5be2395722d0e824cb0b11 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:26:22 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for parso.
+
+---
+ build/pkgs/parso/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/parso/spkg-configure.m4
+
+diff --git a/build/pkgs/parso/spkg-configure.m4 b/build/pkgs/parso/spkg-configure.m4
+new file mode 100644
+index 00000000..1ca6f1b
+--- /dev/null
++++ b/build/pkgs/parso/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([parso], [SAGE_PYTHON_PACKAGE_CHECK([parso])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 943053dfc474b6549bcc7d6ef2971ea43588b35c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:27:00 -0400
+Subject: Trac #29665: add Gentoo package information for pyparsing.
+
+---
+ build/pkgs/pyparsing/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyparsing/distros/gentoo.txt
+
+diff --git a/build/pkgs/pyparsing/distros/gentoo.txt b/build/pkgs/pyparsing/distros/gentoo.txt
+new file mode 100644
+index 00000000..ef0419f
+--- /dev/null
++++ b/build/pkgs/pyparsing/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyparsing
+-- 
+cgit v1.0-1-gd88e
+
+
+From bd682eaa2ac41dd84e7a52e2b0c5442fc8fd8919 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:27:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pyparsing.
+
+---
+ build/pkgs/pyparsing/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyparsing/spkg-configure.m4
+
+diff --git a/build/pkgs/pyparsing/spkg-configure.m4 b/build/pkgs/pyparsing/spkg-configure.m4
+new file mode 100644
+index 00000000..d2b4c00
+--- /dev/null
++++ b/build/pkgs/pyparsing/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pyparsing], [SAGE_PYTHON_PACKAGE_CHECK([pyparsing])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 74f36a9c0ec7c63b7e6c40066e42f4b15c2f978e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:17:42 -0400
+Subject: Trac #29665: add Gentoo package information for debugpy.
+
+---
+ build/pkgs/debugpy/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/debugpy/distros/gentoo.txt
+
+diff --git a/build/pkgs/debugpy/distros/gentoo.txt b/build/pkgs/debugpy/distros/gentoo.txt
+new file mode 100644
+index 00000000..8b797ce
+--- /dev/null
++++ b/build/pkgs/debugpy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/debugpy
+-- 
+cgit v1.0-1-gd88e
+
+
+From be072fa87ac5c373d9dc9b54c0bd68734d5709bc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:21:17 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for debugpy.
+
+---
+ build/pkgs/debugpy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/debugpy/spkg-configure.m4
+
+diff --git a/build/pkgs/debugpy/spkg-configure.m4 b/build/pkgs/debugpy/spkg-configure.m4
+new file mode 100644
+index 00000000..db605ff
+--- /dev/null
++++ b/build/pkgs/debugpy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([debugpy], [SAGE_PYTHON_PACKAGE_CHECK([debugpy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6f777ce2f2e14b94e91c8b7bbac82f9017460aba Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:23:56 -0400
+Subject: Trac #29665: add Gentoo package information for tzlocal.
+
+---
+ build/pkgs/tzlocal/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tzlocal/distros/gentoo.txt
+
+diff --git a/build/pkgs/tzlocal/distros/gentoo.txt b/build/pkgs/tzlocal/distros/gentoo.txt
+new file mode 100644
+index 00000000..2018442
+--- /dev/null
++++ b/build/pkgs/tzlocal/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/tzlocal
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3bd078fc15ae13982249452711baafae91038191 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:24:51 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for tzlocal.
+
+---
+ build/pkgs/tzlocal/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tzlocal/spkg-configure.m4
+
+diff --git a/build/pkgs/tzlocal/spkg-configure.m4 b/build/pkgs/tzlocal/spkg-configure.m4
+new file mode 100644
+index 00000000..e020b28
+--- /dev/null
++++ b/build/pkgs/tzlocal/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tzlocal], [SAGE_PYTHON_PACKAGE_CHECK([tzlocal])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 91b0882fc62214923da9ee7b6dccb05d8a1d11d1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:26:13 -0400
+Subject: Trac #29665: add Gentoo package information for pycparser.
+
+---
+ build/pkgs/pycparser/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pycparser/distros/gentoo.txt
+
+diff --git a/build/pkgs/pycparser/distros/gentoo.txt b/build/pkgs/pycparser/distros/gentoo.txt
+new file mode 100644
+index 00000000..5e87307
+--- /dev/null
++++ b/build/pkgs/pycparser/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pycparser
+-- 
+cgit v1.0-1-gd88e
+
+
+From beabde92fe6e057faf516fe82d27f1e903e55ce6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:27:27 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pycparser.
+
+---
+ build/pkgs/pycparser/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pycparser/spkg-configure.m4
+
+diff --git a/build/pkgs/pycparser/spkg-configure.m4 b/build/pkgs/pycparser/spkg-configure.m4
+new file mode 100644
+index 00000000..4b9b900
+--- /dev/null
++++ b/build/pkgs/pycparser/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pycparser], [SAGE_PYTHON_PACKAGE_CHECK([pycparser])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 86c2788dc7fd1169314e9598c91fa81045553677 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:29:36 -0400
+Subject: Trac #29665: add Gentoo package information for cycler.
+
+---
+ build/pkgs/cycler/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cycler/distros/gentoo.txt
+
+diff --git a/build/pkgs/cycler/distros/gentoo.txt b/build/pkgs/cycler/distros/gentoo.txt
+new file mode 100644
+index 00000000..4b21543
+--- /dev/null
++++ b/build/pkgs/cycler/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/cycler
+-- 
+cgit v1.0-1-gd88e
+
+
+From 67c5a944101ddf329f0a61c61d4e784f58a5c5b0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:30:27 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for cycler.
+
+---
+ build/pkgs/cycler/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cycler/spkg-configure.m4
+
+diff --git a/build/pkgs/cycler/spkg-configure.m4 b/build/pkgs/cycler/spkg-configure.m4
+new file mode 100644
+index 00000000..239571a
+--- /dev/null
++++ b/build/pkgs/cycler/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([cycler], [SAGE_PYTHON_PACKAGE_CHECK([cycler])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ef6d490251abfa41f7a0910274700a8a6a65f629 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:31:19 -0400
+Subject: Trac #29665: add Gentoo package information for traitlets.
+
+---
+ build/pkgs/traitlets/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/traitlets/distros/gentoo.txt
+
+diff --git a/build/pkgs/traitlets/distros/gentoo.txt b/build/pkgs/traitlets/distros/gentoo.txt
+new file mode 100644
+index 00000000..46bfaab
+--- /dev/null
++++ b/build/pkgs/traitlets/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/traitlets
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1f922b458d34088d9f6773312209e69f19ee45dc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:31:50 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for traitlets.
+
+---
+ build/pkgs/traitlets/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/traitlets/spkg-configure.m4
+
+diff --git a/build/pkgs/traitlets/spkg-configure.m4 b/build/pkgs/traitlets/spkg-configure.m4
+new file mode 100644
+index 00000000..df2382b
+--- /dev/null
++++ b/build/pkgs/traitlets/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([traitlets], [SAGE_PYTHON_PACKAGE_CHECK([traitlets])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 95b89a9ced0acb6d971a27fa63b97ea58a11f4e1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:33:35 -0400
+Subject: Trac #29665: add Gentoo package information for argcomplete.
+
+---
+ build/pkgs/argcomplete/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argcomplete/distros/gentoo.txt
+
+diff --git a/build/pkgs/argcomplete/distros/gentoo.txt b/build/pkgs/argcomplete/distros/gentoo.txt
+new file mode 100644
+index 00000000..b150949
+--- /dev/null
++++ b/build/pkgs/argcomplete/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/argcomplete
+-- 
+cgit v1.0-1-gd88e
+
+
+From b4cd8ef384e6e5bae0de0f3c113fb5f9e6e1a71e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:34:14 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for argcomplete.
+
+---
+ build/pkgs/argcomplete/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argcomplete/spkg-configure.m4
+
+diff --git a/build/pkgs/argcomplete/spkg-configure.m4 b/build/pkgs/argcomplete/spkg-configure.m4
+new file mode 100644
+index 00000000..cbd7ccf
+--- /dev/null
++++ b/build/pkgs/argcomplete/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([argcomplete], [SAGE_PYTHON_PACKAGE_CHECK([argcomplete])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4cc610e8331970cc018d7ea87af928fa73a292c1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:36:21 -0400
+Subject: Trac #29665: add Gentoo package information for ptyprocess.
+
+---
+ build/pkgs/ptyprocess/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ptyprocess/distros/gentoo.txt
+
+diff --git a/build/pkgs/ptyprocess/distros/gentoo.txt b/build/pkgs/ptyprocess/distros/gentoo.txt
+new file mode 100644
+index 00000000..571a851
+--- /dev/null
++++ b/build/pkgs/ptyprocess/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ptyprocess
+-- 
+cgit v1.0-1-gd88e
+
+
+From cd15f97221bf5933b07900e4f77cb55401eede26 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:37:02 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ptyprocess.
+
+---
+ build/pkgs/ptyprocess/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ptyprocess/spkg-configure.m4
+
+diff --git a/build/pkgs/ptyprocess/spkg-configure.m4 b/build/pkgs/ptyprocess/spkg-configure.m4
+new file mode 100644
+index 00000000..bfacbae
+--- /dev/null
++++ b/build/pkgs/ptyprocess/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ptyprocess], [SAGE_PYTHON_PACKAGE_CHECK([ptyprocess])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb5f45b15f99e4ba28e1b1f6042a0e8ea17f1dfc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:38:22 -0400
+Subject: Trac #29665: add Gentoo package information for attrs.
+
+---
+ build/pkgs/attrs/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/attrs/distros/gentoo.txt
+
+diff --git a/build/pkgs/attrs/distros/gentoo.txt b/build/pkgs/attrs/distros/gentoo.txt
+new file mode 100644
+index 00000000..3b906fa
+--- /dev/null
++++ b/build/pkgs/attrs/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/attrs
+-- 
+cgit v1.0-1-gd88e
+
+
+From 321707ebf8e9af1e4ac3a5b5b094b4226bb3a7a5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:38:55 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for attrs.
+
+---
+ build/pkgs/attrs/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/attrs/spkg-configure.m4
+
+diff --git a/build/pkgs/attrs/spkg-configure.m4 b/build/pkgs/attrs/spkg-configure.m4
+new file mode 100644
+index 00000000..ba6a9b7
+--- /dev/null
++++ b/build/pkgs/attrs/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([attrs], [SAGE_PYTHON_PACKAGE_CHECK([attrs])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 69a498a4e8854ecdfc2f1a134104983c0dcb9e32 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:40:09 -0400
+Subject: Trac #29665: add Gentoo package information for send2trash.
+
+---
+ build/pkgs/send2trash/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/send2trash/distros/gentoo.txt
+
+diff --git a/build/pkgs/send2trash/distros/gentoo.txt b/build/pkgs/send2trash/distros/gentoo.txt
+new file mode 100644
+index 00000000..a89b179
+--- /dev/null
++++ b/build/pkgs/send2trash/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/send2trash
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9baed17c84e1bdf5abd17c20766e5cd7dddc5b53 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:41:45 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for send2trash.
+
+---
+ build/pkgs/send2trash/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/send2trash/spkg-configure.m4
+
+diff --git a/build/pkgs/send2trash/spkg-configure.m4 b/build/pkgs/send2trash/spkg-configure.m4
+new file mode 100644
+index 00000000..3bbb727
+--- /dev/null
++++ b/build/pkgs/send2trash/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([send2trash], [SAGE_PYTHON_PACKAGE_CHECK([send2trash])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b9b552b2a2aaccaeb7c5b25be0b681f107522d09 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:43:27 -0400
+Subject: Trac #29665: add Gentoo package information for pyrsistent.
+
+---
+ build/pkgs/pyrsistent/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyrsistent/distros/gentoo.txt
+
+diff --git a/build/pkgs/pyrsistent/distros/gentoo.txt b/build/pkgs/pyrsistent/distros/gentoo.txt
+new file mode 100644
+index 00000000..83439ce
+--- /dev/null
++++ b/build/pkgs/pyrsistent/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyrsistent
+-- 
+cgit v1.0-1-gd88e
+
+
+From a17b31fac6104852762f57daa749443147bdf121 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:44:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pyrsistent.
+
+---
+ build/pkgs/pyrsistent/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyrsistent/spkg-configure.m4
+
+diff --git a/build/pkgs/pyrsistent/spkg-configure.m4 b/build/pkgs/pyrsistent/spkg-configure.m4
+new file mode 100644
+index 00000000..f7ca75d
+--- /dev/null
++++ b/build/pkgs/pyrsistent/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pyrsistent], [SAGE_PYTHON_PACKAGE_CHECK([pyrsistent])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 68520decad6d6937918d7a6af65ca5bd476e5d02 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:45:45 -0400
+Subject: Trac #29665: add Gentoo package information for entrypoints.
+
+---
+ build/pkgs/entrypoints/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/entrypoints/distros/gentoo.txt
+
+diff --git a/build/pkgs/entrypoints/distros/gentoo.txt b/build/pkgs/entrypoints/distros/gentoo.txt
+new file mode 100644
+index 00000000..684ddd0
+--- /dev/null
++++ b/build/pkgs/entrypoints/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/entrypoints
+-- 
+cgit v1.0-1-gd88e
+
+
+From 34213eccb642a6bad64d89acaefa83ee702cb483 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:46:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for entrypoints.
+
+---
+ build/pkgs/entrypoints/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/entrypoints/spkg-configure.m4
+
+diff --git a/build/pkgs/entrypoints/spkg-configure.m4 b/build/pkgs/entrypoints/spkg-configure.m4
+new file mode 100644
+index 00000000..caed658
+--- /dev/null
++++ b/build/pkgs/entrypoints/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([entrypoints], [SAGE_PYTHON_PACKAGE_CHECK([entrypoints])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8e985614345da1a58fcdc127a9c0ddd790f9b5d2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:48:26 -0400
+Subject: Trac #29665: add Gentoo package information for markupsafe.
+
+---
+ build/pkgs/markupsafe/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/markupsafe/distros/gentoo.txt
+
+diff --git a/build/pkgs/markupsafe/distros/gentoo.txt b/build/pkgs/markupsafe/distros/gentoo.txt
+new file mode 100644
+index 00000000..9654e35
+--- /dev/null
++++ b/build/pkgs/markupsafe/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/markupsafe
+-- 
+cgit v1.0-1-gd88e
+
+
+From d370f229ae0988856f2e0d1f6ee2df2c47169106 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:48:55 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for markupsafe.
+
+---
+ build/pkgs/markupsafe/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/markupsafe/spkg-configure.m4
+
+diff --git a/build/pkgs/markupsafe/spkg-configure.m4 b/build/pkgs/markupsafe/spkg-configure.m4
+new file mode 100644
+index 00000000..79eb8db
+--- /dev/null
++++ b/build/pkgs/markupsafe/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([markupsafe], [SAGE_PYTHON_PACKAGE_CHECK([markupsafe])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c49b285ad9e25e6bc81a7e75d461d234fdd3ea68 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:30:49 -0400
+Subject: Trac #29665: add Gentoo package information for flit_core.
+
+---
+ build/pkgs/flit_core/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/flit_core/distros/gentoo.txt
+
+diff --git a/build/pkgs/flit_core/distros/gentoo.txt b/build/pkgs/flit_core/distros/gentoo.txt
+new file mode 100644
+index 00000000..fe6bea9
+--- /dev/null
++++ b/build/pkgs/flit_core/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/flit_core
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b0ce1c4f23cd9fc4316e1eb2b9b4bde394957f3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:32:11 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for flit_core.
+
+---
+ build/pkgs/flit_core/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/flit_core/spkg-configure.m4
+
+diff --git a/build/pkgs/flit_core/spkg-configure.m4 b/build/pkgs/flit_core/spkg-configure.m4
+new file mode 100644
+index 00000000..ee67557
+--- /dev/null
++++ b/build/pkgs/flit_core/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([flit_core], [SAGE_PYTHON_PACKAGE_CHECK([flit_core])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f006c231a81428b1e1e792f889bf974f90e3c831 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:34:06 -0400
+Subject: Trac #29665: add Gentoo package information for nest_asyncio.
+
+---
+ build/pkgs/nest_asyncio/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nest_asyncio/distros/gentoo.txt
+
+diff --git a/build/pkgs/nest_asyncio/distros/gentoo.txt b/build/pkgs/nest_asyncio/distros/gentoo.txt
+new file mode 100644
+index 00000000..ab742d2
+--- /dev/null
++++ b/build/pkgs/nest_asyncio/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nest_asyncio
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4a58d0a96a84475e765a01a64f5f44c48a317e0b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:34:43 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for nest_asyncio.
+
+---
+ build/pkgs/nest_asyncio/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nest_asyncio/spkg-configure.m4
+
+diff --git a/build/pkgs/nest_asyncio/spkg-configure.m4 b/build/pkgs/nest_asyncio/spkg-configure.m4
+new file mode 100644
+index 00000000..4d81527
+--- /dev/null
++++ b/build/pkgs/nest_asyncio/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nest_asyncio], [SAGE_PYTHON_PACKAGE_CHECK([nest_asyncio])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e50af937777ea778908bc09a7a79db3dd80fdf25 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:37:02 -0400
+Subject: Trac #29665: add Gentoo package information for ipython_genutils.
+
+---
+ build/pkgs/ipython_genutils/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython_genutils/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipython_genutils/distros/gentoo.txt b/build/pkgs/ipython_genutils/distros/gentoo.txt
+new file mode 100644
+index 00000000..01bc49d
+--- /dev/null
++++ b/build/pkgs/ipython_genutils/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipython_genutils
+-- 
+cgit v1.0-1-gd88e
+
+
+From ec3c0ce9db2ba13c1a49d1bcfb7a4b249cb7ae83 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:39:20 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipython_genutils.
+
+---
+ build/pkgs/ipython_genutils/spkg-configure.m4 | 4 ++++
+ 1 file changed, 4 insertions(+)
+ create mode 100644 build/pkgs/ipython_genutils/spkg-configure.m4
+
+diff --git a/build/pkgs/ipython_genutils/spkg-configure.m4 b/build/pkgs/ipython_genutils/spkg-configure.m4
+new file mode 100644
+index 00000000..b0ba86a
+--- /dev/null
++++ b/build/pkgs/ipython_genutils/spkg-configure.m4
+@@ -0,0 +1,4 @@
++SAGE_SPKG_CONFIGURE(
++  [ipython_genutils],
++  [SAGE_PYTHON_PACKAGE_CHECK([ipython_genutils])]
++)
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5c9e2e265115e5f10d4b459a475467e30b4bddde Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:40:03 -0400
+Subject: Trac #29665: add Gentoo package information for ipython.
+
+---
+ build/pkgs/ipython/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipython/distros/gentoo.txt b/build/pkgs/ipython/distros/gentoo.txt
+new file mode 100644
+index 00000000..8b76f18
+--- /dev/null
++++ b/build/pkgs/ipython/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipython
+-- 
+cgit v1.0-1-gd88e
+
+
+From 621e707ddd040a902d7dddf0bed1de2b54ab22f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 07:37:56 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipython.
+
+---
+ build/pkgs/ipython/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython/spkg-configure.m4
+
+diff --git a/build/pkgs/ipython/spkg-configure.m4 b/build/pkgs/ipython/spkg-configure.m4
+new file mode 100644
+index 00000000..02ab89f
+--- /dev/null
++++ b/build/pkgs/ipython/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipython], [SAGE_PYTHON_PACKAGE_CHECK([ipython])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20a0613f6d441da436f3e7b8047a72bf490882bd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 07:51:11 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipywidgets.
+
+---
+ build/pkgs/ipywidgets/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipywidgets/spkg-configure.m4
+
+diff --git a/build/pkgs/ipywidgets/spkg-configure.m4 b/build/pkgs/ipywidgets/spkg-configure.m4
+new file mode 100644
+index 00000000..51ca9be
+--- /dev/null
++++ b/build/pkgs/ipywidgets/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipywidgets], [SAGE_PYTHON_PACKAGE_CHECK([ipywidgets])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 76bcd386633acc02a1a3026339d0cbd258ada04e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 10:05:16 -0400
+Subject: Trac #29665: add Gentoo package information for wheel.
+
+---
+ build/pkgs/wheel/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wheel/distros/gentoo.txt
+
+diff --git a/build/pkgs/wheel/distros/gentoo.txt b/build/pkgs/wheel/distros/gentoo.txt
+new file mode 100644
+index 00000000..ec571d5
+--- /dev/null
++++ b/build/pkgs/wheel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 96c2dd2ca7812f5333bb9d45eadb7ac408e364ce Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:51:44 -0500
+Subject: Trac #29665: add Gentoo package information for terminado.
+
+---
+ build/pkgs/terminado/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/terminado/distros/gentoo.txt
+
+diff --git a/build/pkgs/terminado/distros/gentoo.txt b/build/pkgs/terminado/distros/gentoo.txt
+new file mode 100644
+index 00000000..1df16f1
+--- /dev/null
++++ b/build/pkgs/terminado/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/terminado
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0de0f5f3d235a4339b21e37ea13c9f5e59a82e59 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:52:35 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for terminado.
+
+---
+ build/pkgs/terminado/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/terminado/spkg-configure.m4
+
+diff --git a/build/pkgs/terminado/spkg-configure.m4 b/build/pkgs/terminado/spkg-configure.m4
+new file mode 100644
+index 00000000..5defc2f
+--- /dev/null
++++ b/build/pkgs/terminado/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([terminado], [SAGE_PYTHON_PACKAGE_CHECK([terminado])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d14a745c770b02822557e7cee0a98de1cb2f3a12 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:56:15 -0500
+Subject: Trac #29665: add Gentoo package information for cffi.
+
+---
+ build/pkgs/cffi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cffi/distros/gentoo.txt
+
+diff --git a/build/pkgs/cffi/distros/gentoo.txt b/build/pkgs/cffi/distros/gentoo.txt
+new file mode 100644
+index 00000000..81eeb81
+--- /dev/null
++++ b/build/pkgs/cffi/distros/gentoo.txt
+@@ -0,0 +1 @@
++virtual/python-cffi
+-- 
+cgit v1.0-1-gd88e
+
+
+From ce393c04afc69fe050e38f780d4e117164687d80 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:57:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for cffi.
+
+---
+ build/pkgs/cffi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cffi/spkg-configure.m4
+
+diff --git a/build/pkgs/cffi/spkg-configure.m4 b/build/pkgs/cffi/spkg-configure.m4
+new file mode 100644
+index 00000000..dc81875
+--- /dev/null
++++ b/build/pkgs/cffi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([cffi], [SAGE_PYTHON_PACKAGE_CHECK([cffi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 467093315b3fdd57c8caa2f95cf99ad52b0b84fb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:57:57 -0500
+Subject: Trac #29665: add Gentoo package information for pip.
+
+---
+ build/pkgs/pip/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pip/distros/gentoo.txt
+
+diff --git a/build/pkgs/pip/distros/gentoo.txt b/build/pkgs/pip/distros/gentoo.txt
+new file mode 100644
+index 00000000..1845454
+--- /dev/null
++++ b/build/pkgs/pip/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pip[vanilla]
+-- 
+cgit v1.0-1-gd88e
+
+
+From c597fd23f9f68dabbcb7e698d0569c3e6458f6d1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 09:07:26 -0500
+Subject: Trac #29665: new spkg-configure.m4 for pip.
+
+---
+ build/pkgs/pip/spkg-configure.m4 | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+ create mode 100644 build/pkgs/pip/spkg-configure.m4
+
+diff --git a/build/pkgs/pip/spkg-configure.m4 b/build/pkgs/pip/spkg-configure.m4
+new file mode 100644
+index 00000000..c7a5562
+--- /dev/null
++++ b/build/pkgs/pip/spkg-configure.m4
+@@ -0,0 +1,12 @@
++SAGE_SPKG_CONFIGURE([pip], [
++  dnl always run this macro because it changes the default value of
++  dnl the --with-system-<package> option.
++  SAGE_PYTHON_PACKAGE_CHECK([pip])
++
++  dnl if we might not install the spkg, make sure that "pip" is in
++  dnl the user's PATH, too.
++  AS_IF([test "x$sage_spkg_install_pip" != "xyes"], [
++    AC_CHECK_PROG(HAVE_PIP, pip, yes, no)
++    AS_IF([test "x$HAVE_PIP" = "xno"], [sage_spkg_install_pip=yes])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ef8f1e807bc55d7b8321777486fa867a7c135419 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 9 Nov 2021 09:09:04 -0500
+Subject: Trac #29665: set $SAGE_PIP_INSTALL_FLAGS for
+ --enable-system-site-packages.
+
+We need to pass some special flags to "pip install" to make it do the
+right thing in the precence of system-site packages. Here we introduce
+a new autoconf variable, SAGE_PIP_INSTALL_FLAGS, that will be used
+to pass those flags to the build system.
+
+With autoconf aware of the variable, we substitute its value into the
+sage-build-env-config script for use in spkg-install.in.
+---
+ build/bin/sage-build-env-config.in | 1 +
+ configure.ac                       | 9 +++++++++
+ 2 files changed, 10 insertions(+)
+
+diff --git a/build/bin/sage-build-env-config.in b/build/bin/sage-build-env-config.in
+index 92e7dad..ad62e5f 100644
+--- a/build/bin/sage-build-env-config.in
++++ b/build/bin/sage-build-env-config.in
+@@ -53,6 +53,7 @@ export SAGE_PARI_CFG="@SAGE_PARI_CFG@"
+ 
+ export SAGE_GLPK_PREFIX="@SAGE_GLPK_PREFIX@"
+ export SAGE_FREETYPE_PREFIX="@SAGE_FREETYPE_PREFIX@"
++export SAGE_PIP_INSTALL_FLAGS="@SAGE_PIP_INSTALL_FLAGS@"
+ export SAGE_SUITESPARSE_PREFIX="@SAGE_SUITESPARSE_PREFIX@"
+ 
+ export SAGE_CONFIGURE_FFLAS_FFPACK="@SAGE_CONFIGURE_FFLAS_FFPACK@"
+diff --git a/configure.ac b/configure.ac
+index 6fafb83..6ed07ac 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -441,6 +441,14 @@ AC_ARG_ENABLE(
+     [allow the use of python packages from the system (experimental; default: no)]
+   )], [
+   AS_IF([test "x$enable_system_site_packages" = "xyes"], [
++    dnl When installing python SPKGs in the presence of system-site
++    dnl packages, we need to --ignore-installed so that a patched SPKG
++    dnl can be installed in the presence of an unpatched system package
++    dnl that appears (to pip) to be identical. The --no-deps flag is
++    dnl then needed because --ignore-installed will make any installed
++    dnl dependencies invisible to pip, who does not appreciate that.
++    SAGE_PIP_INSTALL_FLAGS="${SAGE_PIP_INSTALL_FLAGS} --no-deps --ignore-installed"
++
+     SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
+ 
+     dnl We want to raise an error if the user asked for "system site
+@@ -453,6 +461,7 @@ AC_ARG_ENABLE(
+     with_system_python3="force"
+   ])
+ ])
++AC_SUBST([SAGE_PIP_INSTALL_FLAGS])
+ AC_SUBST([SAGE_VENV_FLAGS])
+ 
+ SAGE_SPKG_OPTIONS=""
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3cf365fef84e809e74abd2eb388e7a8e9af9d739 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 9 Nov 2021 21:01:58 -0500
+Subject: Trac #29665: pass $SAGE_PIP_INSTALL_FLAGS to sdh_pip_install.
+
+Since sdh_pip_install is usually called from spkg-install.in, the
+variables from sage-build-env-config will be available. Here we pass
+the contents of $SAGE_PIP_INSTALL_FLAGS to sage-pip-install
+unconditionally, and hope that the user ignores this variable unless
+he truly knows what he is doing.
+---
+ build/bin/sage-dist-helpers | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/build/bin/sage-dist-helpers b/build/bin/sage-dist-helpers
+index fe364e5..1032ac3 100644
+--- a/build/bin/sage-dist-helpers
++++ b/build/bin/sage-dist-helpers
+@@ -303,7 +303,11 @@ sdh_store_wheel() {
+ }
+ 
+ sdh_store_and_pip_install_wheel() {
+-    local pip_options=""
++    # The $SAGE_PIP_INSTALL_FLAGS variable is set by sage-build-env-config.
++    # We skip sanity checking its contents since you should either let sage
++    # decide what it contains, or really know what you are doing.
++    local pip_options="${SAGE_PIP_INSTALL_FLAGS}"
++
+     while [ $# -gt 0 ]; do
+         case $1 in
+             -*) pip_options="$pip_options $1"
+-- 
+cgit v1.0-1-gd88e
+
+
+From 50f0438ee857b8f0b7d7ad924e6bba9c5e1bc033 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:10:46 -0500
+Subject: Trac #29665: add Gentoo package information for pexpect.
+
+---
+ build/pkgs/pexpect/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pexpect/distros/gentoo.txt
+
+diff --git a/build/pkgs/pexpect/distros/gentoo.txt b/build/pkgs/pexpect/distros/gentoo.txt
+new file mode 100644
+index 00000000..30c4b60
+--- /dev/null
++++ b/build/pkgs/pexpect/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pexpect
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4d784688d997290b462646fa7f36114a41f3f453 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:11:25 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pexpect.
+
+---
+ build/pkgs/pexpect/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pexpect/spkg-configure.m4
+
+diff --git a/build/pkgs/pexpect/spkg-configure.m4 b/build/pkgs/pexpect/spkg-configure.m4
+new file mode 100644
+index 00000000..6520856
+--- /dev/null
++++ b/build/pkgs/pexpect/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pexpect], [SAGE_PYTHON_PACKAGE_CHECK([pexpect])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6447122dc76a3b7a58340dbed942db66530b5b07 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:12:05 -0500
+Subject: Trac #29665: add Gentoo package information for docutils.
+
+---
+ build/pkgs/docutils/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/docutils/distros/gentoo.txt
+
+diff --git a/build/pkgs/docutils/distros/gentoo.txt b/build/pkgs/docutils/distros/gentoo.txt
+new file mode 100644
+index 00000000..fe4a452
+--- /dev/null
++++ b/build/pkgs/docutils/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/docutils
+-- 
+cgit v1.0-1-gd88e
+
+
+From 709041480a5fc729b0ee7f1a8a3b16d4d65321b5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:12:38 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for docutils.
+
+---
+ build/pkgs/docutils/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/docutils/spkg-configure.m4
+
+diff --git a/build/pkgs/docutils/spkg-configure.m4 b/build/pkgs/docutils/spkg-configure.m4
+new file mode 100644
+index 00000000..3584e45
+--- /dev/null
++++ b/build/pkgs/docutils/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([docutils], [SAGE_PYTHON_PACKAGE_CHECK([docutils])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 782d38b48ab87afccc43fbc071e7b7ed48fb0a20 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:14:37 -0500
+Subject: Trac #29665: add Gentoo package information for nbclient.
+
+---
+ build/pkgs/nbclient/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbclient/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbclient/distros/gentoo.txt b/build/pkgs/nbclient/distros/gentoo.txt
+new file mode 100644
+index 00000000..06ff18d
+--- /dev/null
++++ b/build/pkgs/nbclient/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbclient
+-- 
+cgit v1.0-1-gd88e
+
+
+From 19ce09336532336f69db74381932d51a429dfaca Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:15:11 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for nbclient.
+
+---
+ build/pkgs/nbclient/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbclient/spkg-configure.m4
+
+diff --git a/build/pkgs/nbclient/spkg-configure.m4 b/build/pkgs/nbclient/spkg-configure.m4
+new file mode 100644
+index 00000000..14178b7
+--- /dev/null
++++ b/build/pkgs/nbclient/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbclient], [SAGE_PYTHON_PACKAGE_CHECK([nbclient])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c063b9de42c1780368000a563d0dbe80b6fff169 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:17:36 -0500
+Subject: Trac #29665: add Gentoo package information for argon2_cffi.
+
+---
+ build/pkgs/argon2_cffi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argon2_cffi/distros/gentoo.txt
+
+diff --git a/build/pkgs/argon2_cffi/distros/gentoo.txt b/build/pkgs/argon2_cffi/distros/gentoo.txt
+new file mode 100644
+index 00000000..2f12ca8
+--- /dev/null
++++ b/build/pkgs/argon2_cffi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/argon2-cffi
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0b4d5699dd51ea52550fba7db9e1cbb8bbac1892 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:18:35 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for argon2_cffi.
+
+---
+ build/pkgs/argon2_cffi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argon2_cffi/spkg-configure.m4
+
+diff --git a/build/pkgs/argon2_cffi/spkg-configure.m4 b/build/pkgs/argon2_cffi/spkg-configure.m4
+new file mode 100644
+index 00000000..03ebc63
+--- /dev/null
++++ b/build/pkgs/argon2_cffi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([argon2_cffi], [SAGE_PYTHON_PACKAGE_CHECK([argon2_cffi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2b4119558a6e0b1aa512848539a237676b035c83 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:30:48 -0500
+Subject: Trac #29665: fix package name in dateutil's install-requires.txt.
+
+---
+ build/pkgs/dateutil/install-requires.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/build/pkgs/dateutil/install-requires.txt b/build/pkgs/dateutil/install-requires.txt
+index 0ae93da..face537 100644
+--- a/build/pkgs/dateutil/install-requires.txt
++++ b/build/pkgs/dateutil/install-requires.txt
+@@ -1 +1 @@
+-dateutil >=2.8.1
++python-dateutil >=2.8.1
+-- 
+cgit v1.0-1-gd88e
+
+
+From df371b7c4d20a3353d43940306ad22e11aba29da Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:31:41 -0500
+Subject: Trac #29665: add Gentoo package information for dateutil.
+
+---
+ build/pkgs/dateutil/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/dateutil/distros/gentoo.txt
+
+diff --git a/build/pkgs/dateutil/distros/gentoo.txt b/build/pkgs/dateutil/distros/gentoo.txt
+new file mode 100644
+index 00000000..e129df7
+--- /dev/null
++++ b/build/pkgs/dateutil/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/python-dateutil
+-- 
+cgit v1.0-1-gd88e
+
+
+From 577695dfdf661ee26c0ffd767bdbf479d95f7fb4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:32:21 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for dateutil.
+
+---
+ build/pkgs/dateutil/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/dateutil/spkg-configure.m4
+
+diff --git a/build/pkgs/dateutil/spkg-configure.m4 b/build/pkgs/dateutil/spkg-configure.m4
+new file mode 100644
+index 00000000..fdcd127
+--- /dev/null
++++ b/build/pkgs/dateutil/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([dateutil], [SAGE_PYTHON_PACKAGE_CHECK([dateutil])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1984651caac624ec4bb58814ca1d57fe66f9881a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:33:51 -0500
+Subject: Trac #29665: add Gentoo package information for setuptools_scm.
+
+---
+ build/pkgs/setuptools_scm/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/setuptools_scm/distros/gentoo.txt
+
+diff --git a/build/pkgs/setuptools_scm/distros/gentoo.txt b/build/pkgs/setuptools_scm/distros/gentoo.txt
+new file mode 100644
+index 00000000..8989597
+--- /dev/null
++++ b/build/pkgs/setuptools_scm/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/setuptools_scm
+-- 
+cgit v1.0-1-gd88e
+
+
+From ebf7c854ed966e7353759be485c4f5a57b9a10fa Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:34:49 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for setuptools_scm.
+
+---
+ build/pkgs/setuptools_scm/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/setuptools_scm/spkg-configure.m4
+
+diff --git a/build/pkgs/setuptools_scm/spkg-configure.m4 b/build/pkgs/setuptools_scm/spkg-configure.m4
+new file mode 100644
+index 00000000..437148c
+--- /dev/null
++++ b/build/pkgs/setuptools_scm/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([setuptools_scm], [
++  SAGE_PYTHON_PACKAGE_CHECK([setuptools_scm])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0dee0d0c28f31b1f619e44c710a3c9e22d2b2544 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:36:33 -0500
+Subject: Trac #29665: add Gentoo package information for nbconvert.
+
+---
+ build/pkgs/nbconvert/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbconvert/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbconvert/distros/gentoo.txt b/build/pkgs/nbconvert/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c45a10
+--- /dev/null
++++ b/build/pkgs/nbconvert/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbconvert
+-- 
+cgit v1.0-1-gd88e
+
+
+From 473789eb11b1838bc32dc8a63509ee199afc8912 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:37:37 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for nbconvert.
+
+---
+ build/pkgs/nbconvert/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbconvert/spkg-configure.m4
+
+diff --git a/build/pkgs/nbconvert/spkg-configure.m4 b/build/pkgs/nbconvert/spkg-configure.m4
+new file mode 100644
+index 00000000..9b5dee3
+--- /dev/null
++++ b/build/pkgs/nbconvert/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbconvert], [SAGE_PYTHON_PACKAGE_CHECK([nbconvert])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f0703b594e57c980d605aa9bc8316c45a7858b3b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:41:51 -0500
+Subject: Trac #29665: add Gentoo package information for jupyter_core.
+
+---
+ build/pkgs/jupyter_core/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyter_core/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyter_core/distros/gentoo.txt b/build/pkgs/jupyter_core/distros/gentoo.txt
+new file mode 100644
+index 00000000..f168c5a
+--- /dev/null
++++ b/build/pkgs/jupyter_core/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyter_core
+-- 
+cgit v1.0-1-gd88e
+
+
+From 061a307cc4a6680d8500fde834975064e59540d5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:42:48 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jupyter_core.
+
+---
+ build/pkgs/jupyter_core/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyter_core/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyter_core/spkg-configure.m4 b/build/pkgs/jupyter_core/spkg-configure.m4
+new file mode 100644
+index 00000000..67df9c3
+--- /dev/null
++++ b/build/pkgs/jupyter_core/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyter_core], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyter_core])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b85abe964ce0b98b5842efe9cbad9bdb1c89202f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:47:08 -0500
+Subject: Trac #29665: add Gentoo package information for jupyter_client.
+
+---
+ build/pkgs/jupyter_client/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyter_client/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyter_client/distros/gentoo.txt b/build/pkgs/jupyter_client/distros/gentoo.txt
+new file mode 100644
+index 00000000..4f1de88
+--- /dev/null
++++ b/build/pkgs/jupyter_client/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyter_client
+-- 
+cgit v1.0-1-gd88e
+
+
+From 86323ff1e0b2507933df6bc2a96c9175957640c5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:48:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jupyter_client.
+
+---
+ build/pkgs/jupyter_client/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyter_client/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyter_client/spkg-configure.m4 b/build/pkgs/jupyter_client/spkg-configure.m4
+new file mode 100644
+index 00000000..fbd3498
+--- /dev/null
++++ b/build/pkgs/jupyter_client/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyter_client], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyter_client])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a8475e27dd30d752d05ab6fea6579e8623501d82 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:48:58 -0500
+Subject: Trac #29665: add Gentoo package information for snowballstemmer.
+
+---
+ build/pkgs/snowballstemmer/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/snowballstemmer/distros/gentoo.txt
+
+diff --git a/build/pkgs/snowballstemmer/distros/gentoo.txt b/build/pkgs/snowballstemmer/distros/gentoo.txt
+new file mode 100644
+index 00000000..63fd851
+--- /dev/null
++++ b/build/pkgs/snowballstemmer/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/snowballstemmer
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0833c9b781062b4ed86d619e050a6f5d60e36080 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:49:38 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for snowballstemmer.
+
+---
+ build/pkgs/snowballstemmer/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/snowballstemmer/spkg-configure.m4
+
+diff --git a/build/pkgs/snowballstemmer/spkg-configure.m4 b/build/pkgs/snowballstemmer/spkg-configure.m4
+new file mode 100644
+index 00000000..6aa0882
+--- /dev/null
++++ b/build/pkgs/snowballstemmer/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([snowballstemmer], [
++  SAGE_PYTHON_PACKAGE_CHECK([snowballstemmer])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 50a1cf2a2bcd7eeec64cbc3f70e3e9fbe5d850fe Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:50:47 -0500
+Subject: Trac #29665: add Gentoo package information for tornado.
+
+---
+ build/pkgs/tornado/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tornado/distros/gentoo.txt
+
+diff --git a/build/pkgs/tornado/distros/gentoo.txt b/build/pkgs/tornado/distros/gentoo.txt
+new file mode 100644
+index 00000000..6ae4b9f
+--- /dev/null
++++ b/build/pkgs/tornado/distros/gentoo.txt
+@@ -0,0 +1 @@
++www-servers/tornado
+-- 
+cgit v1.0-1-gd88e
+
+
+From 118f4da6e03476c726363e8e22ecda32f13bfc33 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:51:26 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for tornado.
+
+---
+ build/pkgs/tornado/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tornado/spkg-configure.m4
+
+diff --git a/build/pkgs/tornado/spkg-configure.m4 b/build/pkgs/tornado/spkg-configure.m4
+new file mode 100644
+index 00000000..1ee5bc9
+--- /dev/null
++++ b/build/pkgs/tornado/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tornado], [SAGE_PYTHON_PACKAGE_CHECK([tornado])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3850701747a6c8ef60840bdfdb589b28d4cd2b9a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:52:21 -0500
+Subject: Trac #29665: add Gentoo package information for jsonschema.
+
+---
+ build/pkgs/jsonschema/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jsonschema/distros/gentoo.txt
+
+diff --git a/build/pkgs/jsonschema/distros/gentoo.txt b/build/pkgs/jsonschema/distros/gentoo.txt
+new file mode 100644
+index 00000000..d708e4c
+--- /dev/null
++++ b/build/pkgs/jsonschema/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jsonschema
+-- 
+cgit v1.0-1-gd88e
+
+
+From 76e3917c8af781af00f642cfada7a79594429e30 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:54:03 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jsonschema.
+
+---
+ build/pkgs/jsonschema/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jsonschema/spkg-configure.m4
+
+diff --git a/build/pkgs/jsonschema/spkg-configure.m4 b/build/pkgs/jsonschema/spkg-configure.m4
+new file mode 100644
+index 00000000..b9e5e21
+--- /dev/null
++++ b/build/pkgs/jsonschema/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jsonschema], [SAGE_PYTHON_PACKAGE_CHECK([jsonschema])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From fd4a16c11669b6dd73ac6325bca820e76db00402 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:55:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ widgetsnbextension.
+
+---
+ build/pkgs/widgetsnbextension/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/widgetsnbextension/spkg-configure.m4
+
+diff --git a/build/pkgs/widgetsnbextension/spkg-configure.m4 b/build/pkgs/widgetsnbextension/spkg-configure.m4
+new file mode 100644
+index 00000000..bf82daf
+--- /dev/null
++++ b/build/pkgs/widgetsnbextension/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([widgetsnbextension], [
++  SAGE_PYTHON_PACKAGE_CHECK([widgetsnbextension])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8079a9f384e3c8480e157dd98c3db2f43c987f4e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:57:20 -0500
+Subject: Trac #29665: add Gentoo package information for importlib_resources.
+
+---
+ build/pkgs/importlib_resources/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/importlib_resources/distros/gentoo.txt
+
+diff --git a/build/pkgs/importlib_resources/distros/gentoo.txt b/build/pkgs/importlib_resources/distros/gentoo.txt
+new file mode 100644
+index 00000000..d5e1f2c
+--- /dev/null
++++ b/build/pkgs/importlib_resources/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/importlib_resources
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2c430d7c52f02779a6c41b98ac2f4edd8b6759c3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:58:00 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ importlib_resources.
+
+---
+ build/pkgs/importlib_resources/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/importlib_resources/spkg-configure.m4
+
+diff --git a/build/pkgs/importlib_resources/spkg-configure.m4 b/build/pkgs/importlib_resources/spkg-configure.m4
+new file mode 100644
+index 00000000..50df55b
+--- /dev/null
++++ b/build/pkgs/importlib_resources/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([importlib_resources], [
++  SAGE_PYTHON_PACKAGE_CHECK([importlib_resources])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 00d13d7bf2e50aae2ccef3b2b30293c70a922af2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:58:38 -0500
+Subject: Trac #29665: add Gentoo package information for kiwisolver.
+
+---
+ build/pkgs/kiwisolver/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/kiwisolver/distros/gentoo.txt
+
+diff --git a/build/pkgs/kiwisolver/distros/gentoo.txt b/build/pkgs/kiwisolver/distros/gentoo.txt
+new file mode 100644
+index 00000000..7b30c95
+--- /dev/null
++++ b/build/pkgs/kiwisolver/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/kiwisolver
+-- 
+cgit v1.0-1-gd88e
+
+
+From 72b7907ef7ea9fa4ff6948ea34cfe2f693ee6c31 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:59:09 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for kiwisolver.
+
+---
+ build/pkgs/kiwisolver/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/kiwisolver/spkg-configure.m4
+
+diff --git a/build/pkgs/kiwisolver/spkg-configure.m4 b/build/pkgs/kiwisolver/spkg-configure.m4
+new file mode 100644
+index 00000000..4e7ac97
+--- /dev/null
++++ b/build/pkgs/kiwisolver/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([kiwisolver], [SAGE_PYTHON_PACKAGE_CHECK([kiwisolver])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 479351279e4e0ea7e2d146434f0daba038765cfd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:00:04 -0500
+Subject: Trac #29665: add Gentoo package information for notebook.
+
+---
+ build/pkgs/notebook/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/notebook/distros/gentoo.txt
+
+diff --git a/build/pkgs/notebook/distros/gentoo.txt b/build/pkgs/notebook/distros/gentoo.txt
+new file mode 100644
+index 00000000..6475d72
+--- /dev/null
++++ b/build/pkgs/notebook/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/notebook
+-- 
+cgit v1.0-1-gd88e
+
+
+From f4d9242ea654977f8ad7865c82eec593e11a36bc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:01:42 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for notebook.
+
+---
+ build/pkgs/notebook/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/notebook/spkg-configure.m4
+
+diff --git a/build/pkgs/notebook/spkg-configure.m4 b/build/pkgs/notebook/spkg-configure.m4
+new file mode 100644
+index 00000000..a17ba95
+--- /dev/null
++++ b/build/pkgs/notebook/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([notebook], [SAGE_PYTHON_PACKAGE_CHECK([notebook])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9837070c7f8e9a71283b84d49d4fd2c94b78a464 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:02:38 -0500
+Subject: Trac #29665: add Gentoo package information for matplotlib_inline.
+
+---
+ build/pkgs/matplotlib_inline/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/matplotlib_inline/distros/gentoo.txt
+
+diff --git a/build/pkgs/matplotlib_inline/distros/gentoo.txt b/build/pkgs/matplotlib_inline/distros/gentoo.txt
+new file mode 100644
+index 00000000..6a5859c
+--- /dev/null
++++ b/build/pkgs/matplotlib_inline/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/matplotlib-inline
+-- 
+cgit v1.0-1-gd88e
+
+
+From 750be73b25b92b4875e47d044360ac0e1116ec3e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:03:28 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for matplotlib_inline.
+
+---
+ build/pkgs/matplotlib_inline/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/matplotlib_inline/spkg-configure.m4
+
+diff --git a/build/pkgs/matplotlib_inline/spkg-configure.m4 b/build/pkgs/matplotlib_inline/spkg-configure.m4
+new file mode 100644
+index 00000000..e59658f
+--- /dev/null
++++ b/build/pkgs/matplotlib_inline/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([matplotlib_inline], [
++  SAGE_PYTHON_PACKAGE_CHECK([matplotlib_inline])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 273505f49698dcd2ab30c2756b07113c9b7e7791 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:04:10 -0500
+Subject: Trac #29665: add Gentoo package information for ipykernel.
+
+---
+ build/pkgs/ipykernel/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipykernel/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipykernel/distros/gentoo.txt b/build/pkgs/ipykernel/distros/gentoo.txt
+new file mode 100644
+index 00000000..88aab61
+--- /dev/null
++++ b/build/pkgs/ipykernel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipykernel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 629ad36c9e4ae0cdff4a013289b4f2911442445e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:04:46 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for ipykernel.
+
+---
+ build/pkgs/ipykernel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipykernel/spkg-configure.m4
+
+diff --git a/build/pkgs/ipykernel/spkg-configure.m4 b/build/pkgs/ipykernel/spkg-configure.m4
+new file mode 100644
+index 00000000..94ecc2d
+--- /dev/null
++++ b/build/pkgs/ipykernel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipykernel], [SAGE_PYTHON_PACKAGE_CHECK([ipykernel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b8d709edb6a24fd5868ee2818b56e78257b2eafa Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:05:26 -0500
+Subject: Trac #29665: add Gentoo package information for prompt_toolkit.
+
+---
+ build/pkgs/prompt_toolkit/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/prompt_toolkit/distros/gentoo.txt
+
+diff --git a/build/pkgs/prompt_toolkit/distros/gentoo.txt b/build/pkgs/prompt_toolkit/distros/gentoo.txt
+new file mode 100644
+index 00000000..6902484
+--- /dev/null
++++ b/build/pkgs/prompt_toolkit/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/prompt_toolkit
+-- 
+cgit v1.0-1-gd88e
+
+
+From 16c0b5e767ae4dac4440510b7253e5c8642b7d2c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:10:39 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for prompt_toolkit.
+
+---
+ build/pkgs/prompt_toolkit/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/prompt_toolkit/spkg-configure.m4
+
+diff --git a/build/pkgs/prompt_toolkit/spkg-configure.m4 b/build/pkgs/prompt_toolkit/spkg-configure.m4
+new file mode 100644
+index 00000000..fd8c1a6
+--- /dev/null
++++ b/build/pkgs/prompt_toolkit/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([prompt_toolkit], [
++  SAGE_PYTHON_PACKAGE_CHECK([prompt_toolkit])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0cd9283e8bb6c8ae413fc8f715c021f7ec3ca2c8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:12:10 -0500
+Subject: Trac #29665: add Gentoo package information for charset_normalizer.
+
+---
+ build/pkgs/charset_normalizer/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/charset_normalizer/distros/gentoo.txt
+
+diff --git a/build/pkgs/charset_normalizer/distros/gentoo.txt b/build/pkgs/charset_normalizer/distros/gentoo.txt
+new file mode 100644
+index 00000000..eefeb89
+--- /dev/null
++++ b/build/pkgs/charset_normalizer/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/charset_normalizer
+-- 
+cgit v1.0-1-gd88e
+
+
+From a04b01a9ab59097d189edcc5ddcb461faede83b2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:12:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ charset_normalizer.
+
+---
+ build/pkgs/charset_normalizer/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/charset_normalizer/spkg-configure.m4
+
+diff --git a/build/pkgs/charset_normalizer/spkg-configure.m4 b/build/pkgs/charset_normalizer/spkg-configure.m4
+new file mode 100644
+index 00000000..18b18cf
+--- /dev/null
++++ b/build/pkgs/charset_normalizer/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([charset_normalizer], [
++  SAGE_PYTHON_PACKAGE_CHECK([charset_normalizer])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d2ea08138711c53046f977b586f33b09b176b2e3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:13:37 -0500
+Subject: Trac #29665: add Gentoo package information for prometheus_client.
+
+---
+ build/pkgs/prometheus_client/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/prometheus_client/distros/gentoo.txt
+
+diff --git a/build/pkgs/prometheus_client/distros/gentoo.txt b/build/pkgs/prometheus_client/distros/gentoo.txt
+new file mode 100644
+index 00000000..aa2889c
+--- /dev/null
++++ b/build/pkgs/prometheus_client/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/prometheus_client
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b0393200e9edd3e26b8a55ba67e5710e7403fcb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:15:09 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for prometheus_client.
+
+---
+ build/pkgs/prometheus_client/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/prometheus_client/spkg-configure.m4
+
+diff --git a/build/pkgs/prometheus_client/spkg-configure.m4 b/build/pkgs/prometheus_client/spkg-configure.m4
+new file mode 100644
+index 00000000..b494588
+--- /dev/null
++++ b/build/pkgs/prometheus_client/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([prometheus_client], [
++  SAGE_PYTHON_PACKAGE_CHECK([prometheus_client])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From cdcd85284f43ca4ad18353ec3527b2901e57b788 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:17:23 -0500
+Subject: Trac #29665: add Gentoo package information for pybind11.
+
+---
+ build/pkgs/pybind11/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pybind11/distros/gentoo.txt
+
+diff --git a/build/pkgs/pybind11/distros/gentoo.txt b/build/pkgs/pybind11/distros/gentoo.txt
+new file mode 100644
+index 00000000..0c500b3
+--- /dev/null
++++ b/build/pkgs/pybind11/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pybind11
+-- 
+cgit v1.0-1-gd88e
+
+
+From efdd1eb64c4799fe3cdf2221824182941b3fda2d Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:17:51 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pybind11.
+
+---
+ build/pkgs/pybind11/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pybind11/spkg-configure.m4
+
+diff --git a/build/pkgs/pybind11/spkg-configure.m4 b/build/pkgs/pybind11/spkg-configure.m4
+new file mode 100644
+index 00000000..cce1cf5
+--- /dev/null
++++ b/build/pkgs/pybind11/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pybind11], [SAGE_PYTHON_PACKAGE_CHECK([pybind11])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b2128f33b68ea33927284116ea598dd186902400 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:19:23 -0500
+Subject: Trac #29665: add Gentoo package information for pkgconfig.
+
+---
+ build/pkgs/pkgconfig/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pkgconfig/distros/gentoo.txt
+
+diff --git a/build/pkgs/pkgconfig/distros/gentoo.txt b/build/pkgs/pkgconfig/distros/gentoo.txt
+new file mode 100644
+index 00000000..32e8618
+--- /dev/null
++++ b/build/pkgs/pkgconfig/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pkgconfig
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b373b49e06aadeb36dc57e500da9a322460e658 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:19:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pkgconfig.
+
+---
+ build/pkgs/pkgconfig/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pkgconfig/spkg-configure.m4
+
+diff --git a/build/pkgs/pkgconfig/spkg-configure.m4 b/build/pkgs/pkgconfig/spkg-configure.m4
+new file mode 100644
+index 00000000..6708293
+--- /dev/null
++++ b/build/pkgs/pkgconfig/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pkgconfig], [SAGE_PYTHON_PACKAGE_CHECK([pkgconfig])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ce578729eb0d14baab365351ba9a9ffffb7b79f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:21:10 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_serializinghtml.
+
+---
+ build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt b/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+new file mode 100644
+index 00000000..38bca8f
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-serializinghtml
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb0f42c32bbce0e4488678312f5e2d88c6f42c9b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:21:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_serializinghtml.
+
+---
+ build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4 b/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+new file mode 100644
+index 00000000..be8e625
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_serializinghtml], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_serializinghtml])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e47dcf985e40475de85c9436a85537751318bc3d Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:22:54 -0500
+Subject: Trac #29665: add Gentoo package information for sphinxcontrib_jsmath.
+
+---
+ build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt b/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+new file mode 100644
+index 00000000..041a471
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-jsmath
+-- 
+cgit v1.0-1-gd88e
+
+
+From 72cff6fd35f93de4fa855bc870569dd733ff5c24 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:23:49 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_jsmath.
+
+---
+ build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4 b/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+new file mode 100644
+index 00000000..e46bde2
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_jsmath], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_jsmath])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a36395d70f759449cd63c1b0990fbdcb4cb25ca0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:24:26 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_devhelp.
+
+---
+ build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..9b5c899
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-devhelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9953a5dd1646ed0ad51d2e3935cf609bc9e7fd1c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:25:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_devhelp.
+
+---
+ build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+new file mode 100644
+index 00000000..8728136
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_devhelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_devhelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b199d5363aad93f3cb23f7904c9553a28b06348f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:25:53 -0500
+Subject: Trac #29665: add Gentoo package information for sphinxcontrib_qthelp.
+
+---
+ build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..7210099
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-qthelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 94ac8806739f3938e73f5857328e91e0d42e98d2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:26:28 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_qthelp.
+
+---
+ build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+new file mode 100644
+index 00000000..81ea5e1
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_qthelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_qthelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From beedc154aa405e8a58aee8889f510db07adc89a7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:26:54 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_applehelp.
+
+---
+ build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..66ac8da
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-applehelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 07d47c3673d6b35423b71f621cb400989c0101c2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:27:19 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_applehelp.
+
+---
+ build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+new file mode 100644
+index 00000000..e834aed
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_applehelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_applehelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 333a66546c5d421735c49dbafd7370a827f22781 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:27:46 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_htmlhelp.
+
+---
+ build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..e080bac
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-htmlhelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From bfaeb3962254439b63f1f2e0e883de462c7831be Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:29:18 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_htmlhelp.
+
+---
+ build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+new file mode 100644
+index 00000000..c77b003
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_htmlhelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_htmlhelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 782cde13da06e8b85806cb7cbc8aceee0364e639 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:30:23 -0500
+Subject: Trac #29665: add Gentoo package information for jupyterlab_pygments.
+
+---
+ build/pkgs/jupyterlab_pygments/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyterlab_pygments/distros/gentoo.txt b/build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+new file mode 100644
+index 00000000..c57b4f1
+--- /dev/null
++++ b/build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyterlab_pygments
+-- 
+cgit v1.0-1-gd88e
+
+
+From 39f974cfa4a8c6e5dd897f152f83ec82f40ee9f7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:31:13 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ jupyterlab_pygments.
+
+---
+ build/pkgs/jupyterlab_pygments/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyterlab_pygments/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyterlab_pygments/spkg-configure.m4 b/build/pkgs/jupyterlab_pygments/spkg-configure.m4
+new file mode 100644
+index 00000000..e46e21f
+--- /dev/null
++++ b/build/pkgs/jupyterlab_pygments/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyterlab_pygments], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyterlab_pygments])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From db704620700fd36cec3bf6125938f3ee00a9eb5e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:29:15 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for ply.
+
+---
+ build/pkgs/ply/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ply/spkg-configure.m4
+
+diff --git a/build/pkgs/ply/spkg-configure.m4 b/build/pkgs/ply/spkg-configure.m4
+new file mode 100644
+index 00000000..ffb0030
+--- /dev/null
++++ b/build/pkgs/ply/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ply], [SAGE_PYTHON_PACKAGE_CHECK([ply])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6aac31dabcdfdef228d7780398a3fda1a4cc566f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:29:51 -0500
+Subject: Trac #29665: add Gentoo package information for ply.
+
+---
+ build/pkgs/ply/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ply/distros/gentoo.txt
+
+diff --git a/build/pkgs/ply/distros/gentoo.txt b/build/pkgs/ply/distros/gentoo.txt
+new file mode 100644
+index 00000000..c8b1630
+--- /dev/null
++++ b/build/pkgs/ply/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ply
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb8d3372936ec37470d69687a0f91592129460ae Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:30:33 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for gast.
+
+---
+ build/pkgs/gast/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/gast/spkg-configure.m4
+
+diff --git a/build/pkgs/gast/spkg-configure.m4 b/build/pkgs/gast/spkg-configure.m4
+new file mode 100644
+index 00000000..26ec59f
+--- /dev/null
++++ b/build/pkgs/gast/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([gast], [SAGE_PYTHON_PACKAGE_CHECK([gast])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1cdc4046a88f1c2b4e5c162f66c6db6090b24194 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:31:15 -0500
+Subject: Trac #29665: add Gentoo package information for gast.
+
+---
+ build/pkgs/gast/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/gast/distros/gentoo.txt
+
+diff --git a/build/pkgs/gast/distros/gentoo.txt b/build/pkgs/gast/distros/gentoo.txt
+new file mode 100644
+index 00000000..3be5e7e
+--- /dev/null
++++ b/build/pkgs/gast/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/gast
+-- 
+cgit v1.0-1-gd88e
+
+
+From 96068b8a3742b65d619190e1d9fa5db399e6b4f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:32:20 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pythran.
+
+---
+ build/pkgs/pythran/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pythran/spkg-configure.m4
+
+diff --git a/build/pkgs/pythran/spkg-configure.m4 b/build/pkgs/pythran/spkg-configure.m4
+new file mode 100644
+index 00000000..592e95b
+--- /dev/null
++++ b/build/pkgs/pythran/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pythran], [SAGE_PYTHON_PACKAGE_CHECK([pythran])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1fa0fad3ae8f7e559c6fc315c6773a7d8aac0bfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:32:55 -0500
+Subject: Trac #29665: add Gentoo package information for pythran.
+
+---
+ build/pkgs/pythran/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pythran/distros/gentoo.txt
+
+diff --git a/build/pkgs/pythran/distros/gentoo.txt b/build/pkgs/pythran/distros/gentoo.txt
+new file mode 100644
+index 00000000..1bb7cdc
+--- /dev/null
++++ b/build/pkgs/pythran/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pythran
+-- 
+cgit v1.0-1-gd88e
+
+
+From d26370e5b8c88e76abfb7c27e3defb71c9e9f711 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:33:50 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for beniget.
+
+---
+ build/pkgs/beniget/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/beniget/spkg-configure.m4
+
+diff --git a/build/pkgs/beniget/spkg-configure.m4 b/build/pkgs/beniget/spkg-configure.m4
+new file mode 100644
+index 00000000..8ae6101
+--- /dev/null
++++ b/build/pkgs/beniget/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([beniget], [SAGE_PYTHON_PACKAGE_CHECK([beniget])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From eeeb296ed9b9694a865534103fd58e62a151ef5e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:34:22 -0500
+Subject: Trac #29665: add Gentoo package information for beniget.
+
+---
+ build/pkgs/beniget/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/beniget/distros/gentoo.txt
+
+diff --git a/build/pkgs/beniget/distros/gentoo.txt b/build/pkgs/beniget/distros/gentoo.txt
+new file mode 100644
+index 00000000..1a5972c
+--- /dev/null
++++ b/build/pkgs/beniget/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/beniget
+-- 
+cgit v1.0-1-gd88e
+
+
+From 078b2ff272d0eeff5cce40ad7eb176d9ddd7bdff Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:35:37 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for alabaster.
+
+---
+ build/pkgs/alabaster/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/alabaster/spkg-configure.m4
+
+diff --git a/build/pkgs/alabaster/spkg-configure.m4 b/build/pkgs/alabaster/spkg-configure.m4
+new file mode 100644
+index 00000000..4eca6e0
+--- /dev/null
++++ b/build/pkgs/alabaster/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([alabaster], [SAGE_PYTHON_PACKAGE_CHECK([alabaster])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7dc264353e5f64110431ff28c1b8b7e89699e9bd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:36:06 -0500
+Subject: Trac #29665: add Gentoo package information for alabaster.
+
+---
+ build/pkgs/alabaster/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/alabaster/distros/gentoo.txt
+
+diff --git a/build/pkgs/alabaster/distros/gentoo.txt b/build/pkgs/alabaster/distros/gentoo.txt
+new file mode 100644
+index 00000000..cffece6
+--- /dev/null
++++ b/build/pkgs/alabaster/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/alabaster
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8011a5e675e7e61a77ce34a299ee961a9f44253f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:43:59 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ importlib_metadata.
+
+---
+ build/pkgs/importlib_metadata/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/importlib_metadata/spkg-configure.m4
+
+diff --git a/build/pkgs/importlib_metadata/spkg-configure.m4 b/build/pkgs/importlib_metadata/spkg-configure.m4
+new file mode 100644
+index 00000000..0554e52
+--- /dev/null
++++ b/build/pkgs/importlib_metadata/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([importlib_metadata], [
++  SAGE_PYTHON_PACKAGE_CHECK([importlib_metadata])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 928ca0019e3ec6c4541a16b28bcc6710df6d010b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:44:28 -0500
+Subject: Trac #29665: add Gentoo package information for importlib_metadata.
+
+---
+ build/pkgs/importlib_metadata/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/importlib_metadata/distros/gentoo.txt
+
+diff --git a/build/pkgs/importlib_metadata/distros/gentoo.txt b/build/pkgs/importlib_metadata/distros/gentoo.txt
+new file mode 100644
+index 00000000..4f92786
+--- /dev/null
++++ b/build/pkgs/importlib_metadata/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/importlib_metadata
+-- 
+cgit v1.0-1-gd88e
+
+
+From 135f184f7498a2046065e669723e68efe2d65cee Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 21:16:58 -0500
+Subject: Trac #29665: fix sage.misc.package doctest with system alabaster.
+
+When alabaster from the system is used, these tests won't be able to
+find its SPKG installed. Add some ellipses, and switch one test to
+look for sage_conf instead.
+---
+ src/sage/misc/package.py | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/sage/misc/package.py b/src/sage/misc/package.py
+index 84f3d50..c7ad206 100644
+--- a/src/sage/misc/package.py
++++ b/src/sage/misc/package.py
+@@ -386,9 +386,9 @@ def installed_packages(exclude_pip=True):
+     EXAMPLES::
+ 
+         sage: sorted(installed_packages().keys())  # optional - build
+-        [...'alabaster', ...'sage_conf', ...]
+-        sage: installed_packages()['alabaster']  # optional - build, random
+-        '0.7.12'
++        [...'sage_conf', ...]
++        sage: installed_packages()['sage_conf']  # optional - build, random
++        '9.5'
+ 
+     .. SEEALSO::
+ 
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch b/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
new file mode 100644
index 000000000000..7ef3826aa4d2
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
@@ -0,0 +1,27 @@
+diff --git a/src/bin/sage-runtests b/src/bin/sage-runtests
+index 589dc8cd37..6bb8bf99a4 100755
+--- a/src/bin/sage-runtests
++++ b/src/bin/sage-runtests
+@@ -154,21 +154,4 @@ if __name__ == "__main__":
+     DC = DocTestController(args, args.filenames)
+     err = DC.run()
+ 
+-    try:
+-        exit_code_pytest = 0
+-        import pytest
+-        pytest_options = ["--import-mode", "importlib"]
+-        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.")
+-
+-    if err == 0:
+-        sys.exit(exit_code_pytest)
+-    else:
+-        sys.exit(err)
++    sys.exit(err)
diff --git a/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch b/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
new file mode 100644
index 000000000000..093e3d56eb33
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
@@ -0,0 +1,42 @@
+More site packages not included in trac 29665
+
+diff --git a/build/pkgs/gmpy2/spkg-configure.m4 b/build/pkgs/gmpy2/spkg-configure.m4
+new file mode 100644
+index 0000000000..2d0390f7db
+--- /dev/null
++++ b/build/pkgs/gmpy2/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([gmpy2], [SAGE_PYTHON_PACKAGE_CHECK([gmpy2])])
+diff --git a/build/pkgs/sphinx/spkg-configure.m4 b/build/pkgs/sphinx/spkg-configure.m4
+new file mode 100644
+index 0000000000..e149fbb2cf
+--- /dev/null
++++ b/build/pkgs/sphinx/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([sphinx], [SAGE_PYTHON_PACKAGE_CHECK([sphinx])])
+diff --git a/build/pkgs/typing_extensions/spkg-configure.m4 b/build/pkgs/typing_extensions/spkg-configure.m4
+new file mode 100644
+index 0000000000..d475fd8257
+--- /dev/null
++++ b/build/pkgs/typing_extensions/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([typing_extensions], [SAGE_PYTHON_PACKAGE_CHECK([typing_extensions])])
+-- 
+diff --git a/build/pkgs/gmpy2/install-requires.txt b/build/pkgs/gmpy2/install-requires.txt
+index 51d24518ef..c25feff557 100644
+--- a/build/pkgs/gmpy2/install-requires.txt
++++ b/build/pkgs/gmpy2/install-requires.txt
+@@ -1,3 +1 @@
+-# We would like to write gmpy2 >=2.1.0b5, but pipenv does not accept prereleases in version ranges
+-# https://github.com/pypa/pipenv/issues/1760
+-gmpy2 ==2.1.0rc1
++gmpy2 >=2.1
+diff --git a/build/pkgs/ptyprocess/install-requires.txt b/build/pkgs/ptyprocess/install-requires.txt
+index de89260872..7c336f636c 100644
+--- a/build/pkgs/ptyprocess/install-requires.txt
++++ b/build/pkgs/ptyprocess/install-requires.txt
+@@ -1,3 +1,3 @@
+-ptyprocess ==0.5.1
++ptyprocess
+ # https://trac.sagemath.org/ticket/31280#comment:42 and following
+ # sagelib is not compatible with ptyprocess 0.5.2, 0.6, and 0.7
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 33b40acbabeb..a32c5d18f378 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -22,11 +22,13 @@ distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
 checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
 python_version=3
 
-build_options="debug system_python3"
+build_options="debug system_python3 system_site_packages"
 desc_option_debug="Build with debug symbols"
 desc_option_system_python="Build using system python 3"
-build_options_default="system_python3"
+desc_option_system_python="Build using system python site-packages"
+build_options_default="system_python3 system_site_packages"
 configure_args+=" $(vopt_with system_python3)"
+configure_args+=" $(vopt_enable system_site_packages)"
 
 # path where sage will be installed
 _SAGE_ROOT=/usr/lib/sage-${version}
@@ -163,6 +165,8 @@ do_check() {
 	fi
 	if [ "$XBPS_CHECK_PKGS" = full ]; then
 		_test_args="--long $_test_args"
+	else
+		_test_args="--warn-long 5.0 $_test_args"
 	fi
 	# since make check will build the docs, run test like this instead
 	./sage -tp ${XBPS_MAKEJOBS} ${_test_args}
@@ -182,7 +186,7 @@ makedepends+=" automake gettext gettext-devel"
 # other host dependencies
 makedepends+=" cmake curl git ninja pandoc patch pkg-config python3 tox"
 
-# already in void
+# standard dependencies
 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
@@ -202,7 +206,49 @@ makedepends+="
  brial-devel cliquer-devel gfan libbraiding-devel libhomfly-devel
  lrcalc-devel nauty-devel palp tachyon
  maxima-ecl primesieve-devel primecount-devel
+ ffmpeg ImageMagick
 "
 
 # TODO: optional
 # 4ti2 coxeter3 libsemigroups lrslib pdf2svg perl_mongodb polymake
+
+# TODO: standard
+# cvxopt importlib_resources
+
+# python packages for trac-29665
+_sage_python3_modules="
+ python3-Babel python3-Jinja2 python3-MarkupSafe python3-Pillow
+ python3-Pygments python3-Sphinx python3-alabaster python3-argcomplete
+ python3-argon2 python3-attrs python3-backcall python3-beniget
+ python3-bleach python3-certifi python3-cffi python3-charset-normalizer
+ python3-cycler python3-dateutil python3-decorator python3-defusedxml
+ python3-docutils python3-entrypoints python3-flit_core python3-gast
+ python3-gmpy2 python3-html5lib python3-idna python3-imagesize
+ python3-importlib_metadata python3-ipython python3-ipython_genutils
+ python3-ipython_ipykernel python3-jedi python3-jsonschema
+ python3-jupyter_client python3-jupyter_core python3-jupyter_ipywidgets
+ python3-jupyter_nbconvert python3-jupyter_nbformat
+ python3-jupyter_notebook python3-jupyterlab_pygments python3-kiwisolver
+ python3-matplotlib python3-matplotlib-inline python3-mistune
+ python3-mpmath python3-nbclient python3-nest_asyncio python3-networkx
+ python3-numpy python3-packaging python3-pandocfilters python3-parsing
+ python3-parso python3-pexpect python3-pickleshare python3-pip
+ python3-pkgconfig python3-pluggy python3-ply python3-prometheus_client
+ python3-prompt_toolkit python3-ptyprocess python3-py python3-pybind11
+ python3-pycparser python3-pyrsistent python3-pytz python3-pyzmq
+ python3-requests python3-scipy python3-send2trash python3-setuptools
+ python3-setuptools_scm python3-simplegeneric python3-six
+ python3-snowballstemmer python3-sphinxcontrib-applehelp
+ python3-sphinxcontrib-devhelp python3-sphinxcontrib-htmlhelp
+ python3-sphinxcontrib-jsmath python3-sphinxcontrib-qthelp
+ python3-sphinxcontrib-serializinghtml python3-sympy python3-terminado
+ python3-testpath python3-texttable python3-toml python3-tomli
+ python3-tornado python3-traitlets python3-typing_extensions
+ python3-tzlocal python3-urllib3 python3-wcwidth python3-webencodings
+ python3-wheel python3-zipp pythran
+ "
+
+if [ "$build_option_system_site_packages" ]; then
+	makedepends+=" $_sage_python3_modules"
+	depends+=" $_sage_python3_modules"
+fi

From 91610a973d80ee0999ed95cece89fe3cc937a89c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 3 Jan 2022 20:47:52 -0300
Subject: [PATCH 24/35] sagemath: use small source tarball + upstream packages

---
 srcpkgs/sagemath/template | 97 ++++++++++++++++++++++++++-------------
 1 file changed, 64 insertions(+), 33 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index a32c5d18f378..0de0061b09df 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -18,8 +18,8 @@ short_desc="Open source mathematics software"
 maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
-distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
-checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
+distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
+checksum=aea4c5a8d3b32af2fba644269b9daf4f62471471ba2d7d83da0f8098a5f53225
 python_version=3
 
 build_options="debug system_python3 system_site_packages"
@@ -33,42 +33,72 @@ configure_args+=" $(vopt_enable system_site_packages)"
 # 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} ;;
-esac
+_SAGE_UPSTREAM_MIRROR=https://mirrors.mit.edu/sage/spkg/upstream
 
-# extra upstream packages (trac-32968 / trac-33040)
 _upstream="
- https://pypi.io/packages/source/s/sphinx/Sphinx-4.3.1.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
+${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
+${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
+${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
+${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
+${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
+${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
+${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
+https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
+https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
+http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
+${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
+${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
+${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
+${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
+${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
+https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
+${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
+https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
+${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
 "
 
 checksum+="
- 32a5b3e9a1b176cc25ed048557d4d3d01af635e6b76c5bc7a43b0a34447fbd45
-
- 9c87405839a19696e837b3b818fed3f5f69f16f1eec1a1ad77e043dcea9c772f
- fc4453705b81d03568d5b808ad8f09c77c47534f6ac2e72e733f9ca4714aa75c
- acad2d8b20a1af07d4e4c9d2e9285c5ed9104354062f275f3fcd88dcef4f1326
- 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
- 78884e7c1d4b00ce3cea67b44566851c4343c120abd683433ce934a68ea58872
- 0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86
- b8e2f83c56e141920c39464b852de3719dfbfb6e3c99a2d8da0edf4fb33176ed
- d9bdec0013ef1eb5a84ab39a3b3868911598afa494f5faa038647101504e2b81
- b2e9810e09c3a47b73ce9cab5a72243a1258f61e7900969097a817232246ce1c
- 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
- 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
+c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
+d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
+4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
+3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
+03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
+5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
+cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
+5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
+581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
+6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
+07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
+a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
+ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
+d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
+169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
+5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
+cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
+471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
+78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
+edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
+b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
+3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
+545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
+cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
+718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
+dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
 "
 
 for u in ${_upstream}; do
@@ -101,6 +131,7 @@ post_extract() {
 	mv -T $wrksrc $_SAGE_ROOT
 	ln -srfT $_SAGE_ROOT $wrksrc
 
+	mkdir -p $wrksrc/upstream
 	for u in ${_upstream}; do
 		cp "$XBPS_SRCDISTDIR/${pkgname}-${version}/${u##*[/>]}" $wrksrc/upstream
 	done

From f47e3159f3658b7feb26e960816040eca45934d7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 13:38:02 -0300
Subject: [PATCH 25/35] sagemath: for CI use fixed random-seed=0

---
 srcpkgs/sagemath/template | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 0de0061b09df..b5b99d2c122d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -194,6 +194,10 @@ do_check() {
 	if [ -z "$_test_args" ]; then
 		_test_args=--all
 	fi
+	if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
+		# for CI use a predictable random seed
+		_test_args="--random-seed=0 $_test_args"
+	fi
 	if [ "$XBPS_CHECK_PKGS" = full ]; then
 		_test_args="--long $_test_args"
 	else

From c7c8d9723267dadb847fad94aa8d3ed278e5b5f7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 14:40:27 -0300
Subject: [PATCH 26/35] sagemath: upstream two patches

---
 ...ble-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch} |  6 +++---
 ...rse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch} | 10 +++++-----
 2 files changed, 8 insertions(+), 8 deletions(-)
 rename srcpkgs/sagemath/patches/{0001-sage-site-exec-only-if-it-is-executable.patch => trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch} (94%)
 rename srcpkgs/sagemath/patches/{0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch => trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch} (81%)

diff --git a/srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch b/srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
similarity index 94%
rename from srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch
rename to srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
index ce17c6d6e954..7fdb3d697222 100644
--- a/srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch
+++ b/srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
@@ -1,14 +1,14 @@
 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
+Subject: 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
+index 4c0fa17..153e610 100755
 --- a/src/bin/sage
 +++ b/src/bin/sage
 @@ -129,7 +129,7 @@ usage() {
@@ -39,5 +39,5 @@ index 4c0fa17426..153e610a2e 100755
              # fallthrough if there is no sage-site script
          fi
 -- 
-2.34.1
+cgit v1.0-1-gd88e
 
diff --git a/srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch b/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
similarity index 81%
rename from srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch
rename to srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
index bab6d8441d42..350c41ac3928 100644
--- a/srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch
+++ b/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
@@ -1,16 +1,16 @@
-From 57e3eba28c9b4ee6bd3407d0715b8bd00aaf04a7 Mon Sep 17 00:00:00 2001
+From 53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6 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
+Subject: sagetex: Fix a warning when byte-compiling sagetexparse.py
 
 ---
- .../sagetex/patches/sagetex-fix-warning.patch    | 16 ++++++++++++++++
+ build/pkgs/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
+index 00000000..d82ab67
 --- /dev/null
 +++ b/build/pkgs/sagetex/patches/sagetex-fix-warning.patch
 @@ -0,0 +1,16 @@
@@ -31,5 +31,5 @@ index 0000000000..d82ab675dd
 +     self.result += t.code[1:-1] + '\n\n'
 + 
 -- 
-2.34.1
+cgit v1.0-1-gd88e
 

From ca8e4fac561d2cad96a50f5a8b7b9df708228f0c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 19:57:59 -0300
Subject: [PATCH 27/35] sagemath: reorder upstream sources and add two missing
 ones

---
 srcpkgs/sagemath/template | 60 ++++++++++++++++++++++-----------------
 1 file changed, 34 insertions(+), 26 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index b5b99d2c122d..f53cba947c88 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -36,69 +36,77 @@ _SAGE_ROOT=/usr/lib/sage-${version}
 _SAGE_UPSTREAM_MIRROR=https://mirrors.mit.edu/sage/spkg/upstream
 
 _upstream="
-${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
 ${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
 ${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
+
+${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
 ${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
 ${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
 ${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
 ${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
 ${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
 ${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
-https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
-https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
-http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
 ${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
 ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
 ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
 ${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
 ${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${PYPI_SITE}/P/PyCygwin/PyCygwin-0.1.tar.gz
 ${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
-https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+${PYPI_SITE}/s/setuptools/setuptools-59.2.0.tar.gz
 ${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
 ${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
-https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
 ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
+
+https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
+https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
+http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
+https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
 "
 
 checksum+="
-dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
 c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
 d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
+5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
+ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
+169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
+cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
+edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
+cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
+
+dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
 3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
 03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
 5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
 cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
-5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
-c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
-6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
-07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
 a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
-ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
 d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
-169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
 5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
-cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
 471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
 78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
-edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+45a5e295590c469a49b2804bfdb89059e942d768ad3b813f484d7b5bff48d226
 ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
-b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
-3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+157d21de9d055ab9e8ea3186d91e7f4f865e11f42deafa952d90842671fc2576
 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
 545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
-cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
-718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
 dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
+
+c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
+6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
+07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
+3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
 "
 
 for u in ${_upstream}; do

From c02eb8f9a314efa547139b40e7c64aded241a4ba Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 9 Jan 2022 12:45:47 -0300
Subject: [PATCH 28/35] sagemath: do not download anything patch

---
 .../patches/00-Do_not_download_anything.patch         | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 srcpkgs/sagemath/patches/00-Do_not_download_anything.patch

diff --git a/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch b/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch
new file mode 100644
index 000000000000..35aef7b8d456
--- /dev/null
+++ b/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch
@@ -0,0 +1,11 @@
+--- a/build/sage_bootstrap/tarball.py	2022-01-07 19:17:06.754747955 -0300
++++ b/build/sage_bootstrap/tarball.py	2022-01-07 19:25:31.844139381 -0300
+@@ -158,6 +158,8 @@
+                             .format(destination=destination))
+         successful_download = False
+         log.info('Attempting to download package {0} from mirrors'.format(self.filename))
++        log.info('ERROR: downloading is disabled, add file to template instead')
++        return
+         for mirror in MirrorList():
+             url = mirror + '/'.join(['spkg', 'upstream', self.package.name, self.filename])
+             log.info(url)

From 7188ce74b1e4a3f4c01159f136bf27ec3bb075f3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 9 Jan 2022 13:27:49 -0300
Subject: [PATCH 29/35] sagemath: update to 9.5.rc0.

---
 ...184f7498a2046065e669723e68efe2d65cee.patch |    6 +-
 ...1d4ced4264f65ab704f725f6f5879b012796.patch |  263 ----
 ...a54526829b79d5d236a40f83ddc6ce7b2696.patch | 1196 -----------------
 ...9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch |   27 -
 ...3f4f32246ad9ded6d37f1f2f12a589a81f4.patch} |    4 +-
 ...03138d0403be7c7cb303de2bc0a0e0b6793c.patch |   82 --
 ...f3a1611fed0cc66fb838eb85739646dd34d.patch} |   94 +-
 ...49c415e11d0522bff9013bc1509264b26ebf.patch |   27 +
 ...ip_doctest_singular_4.2.1--see_33134.patch |   13 +
 srcpkgs/sagemath/template                     |    6 +-
 10 files changed, 72 insertions(+), 1646 deletions(-)
 delete mode 100644 srcpkgs/sagemath/patches/trac-30766-system_python_3.10-df9f1d4ced4264f65ab704f725f6f5879b012796.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
 rename srcpkgs/sagemath/patches/{trac-33064-sage_docbuild_ignore_cache_save_permission_error-f767cf1eadfd8ab540a31c5c5ef09d56df09b90e.patch => trac-33064-sage_docbuild_ignore_cache_save_permission_error-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch} (92%)
 delete mode 100644 srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
 rename srcpkgs/sagemath/patches/{trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch => trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch} (63%)
 create mode 100644 srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch

diff --git a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
index b641113927e7..0ecb27c593cd 100644
--- a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
+++ b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
@@ -5615,9 +5615,9 @@ index 84f3d50..c7ad206 100644
      EXAMPLES::
  
          sage: sorted(installed_packages().keys())  # optional - build
--        [...'alabaster', ...'sage_conf', ...]
--        sage: installed_packages()['alabaster']  # optional - build, random
--        '0.7.12'
+-        [...'gmpy2', ...'sage_conf', ...]
+-        sage: installed_packages()['gmpy2']  # optional - build, random
+-        '2.1.0b5'
 +        [...'sage_conf', ...]
 +        sage: installed_packages()['sage_conf']  # optional - build, random
 +        '9.5'
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
deleted file mode 100644
index a1cb4c834482..000000000000
--- a/srcpkgs/sagemath/patches/trac-30766-system_python_3.10-df9f1d4ced4264f65ab704f725f6f5879b012796.patch
+++ /dev/null
@@ -1,263 +0,0 @@
-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-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch b/srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
deleted file mode 100644
index 3ae6fe01822d..000000000000
--- a/srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
+++ /dev/null
@@ -1,1196 +0,0 @@
-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/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch b/srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
deleted file mode 100644
index 485fb0176f45..000000000000
--- a/srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-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: 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 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"
- 
- # 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)
--- 
-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-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
similarity index 92%
rename from srcpkgs/sagemath/patches/trac-33064-sage_docbuild_ignore_cache_save_permission_error-f767cf1eadfd8ab540a31c5c5ef09d56df09b90e.patch
rename to srcpkgs/sagemath/patches/trac-33064-sage_docbuild_ignore_cache_save_permission_error-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
index 20fa12e570eb..04f04cfd6718 100644
--- 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-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
@@ -1,4 +1,4 @@
-From f767cf1eadfd8ab540a31c5c5ef09d56df09b90e Mon Sep 17 00:00:00 2001
+From e89193f4f32246ad9ded6d37f1f2f12a589a81f4 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
@@ -8,7 +8,7 @@ Subject: sage_docbuild: do not fail when cache cannot be saved
  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
+index 466ca82..f8c8ebd 100644
 --- a/src/sage_docbuild/__init__.py
 +++ b/src/sage_docbuild/__init__.py
 @@ -856,9 +856,12 @@ class ReferenceSubBuilder(DocBuilder):
diff --git a/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch b/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
deleted file mode 100644
index 6bc5193b75ee..000000000000
--- a/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-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
-
-
-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/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch b/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
similarity index 63%
rename from srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch
rename to srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
index 3794aa7f019b..04fca4815a00 100644
--- a/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch
+++ b/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
@@ -1,4 +1,4 @@
-From 7d3381b21e4716cfa8a33915621a12f0eba74233 Mon Sep 17 00:00:00 2001
+From 18d0477153af6f453a0e84f78030535f6a36ce87 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
@@ -10,56 +10,56 @@ Subject: doctests: remove dochtml label from some tests that don't need docs
  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
+index c788623..527ed90 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  # optional - sagemath_doc_html
+-        sage: thematic_index = os.path.join(SAGE_DOC, "html", "en", "thematic_tutorials", "index.html")  # optional - sagemath_doc_html
 +        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
+         sage: for line in open(thematic_index).readlines():  # optional - sagemath_doc_html
          ....:     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
+index 4c56aea..583ca06 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  # optional - sagemath_doc_html
+-    sage: docfilename = os.path.join(SAGE_DOC, 'html', 'en', 'reference', 'calculus', 'sage', 'symbolic', 'expression.html')  # optional - sagemath_doc_html
 +    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
+     sage: with open(docfilename) as fobj:  # optional - sagemath_doc_html
      ....:     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='',
+@@ -845,12 +845,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  # optional - sagemath_doc_html
+-        sage: len(_search_src_or_doc('src', r'matrix\(', 'incidence_structures', 'self', 'combinat', interact=False).splitlines()) > 1  # optional - sagemath_doc_html
 +        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)
+         sage: 'abvar/homology' in _search_src_or_doc('doc', 'homology', 'variety', interact=False)  # optional - sagemath_doc_html, 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)  # optional - sagemath_doc_html
 +        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:
+@@ -1369,7 +1369,7 @@ class _sage_doc:
  
-         sage: browse_sage_doc._open("reference", testing=True)[0]  # optional - dochtml, indirect doctest
+         sage: browse_sage_doc._open("reference", testing=True)[0]  # optional - sagemath_doc_html, 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]  # optional - sagemath_doc_html
 +        sage: browse_sage_doc(identity_matrix, 'rst')[-107:-47]
          'Full MatrixSpace of 3 by 3 sparse matrices over Integer Ring'
      """
@@ -68,7 +68,7 @@ index eb70516..b4848ed 100644
 cgit v1.0-1-gd88e
 
 
-From 42a76c3f82edecc9c6c53c661251677e3e907584 Mon Sep 17 00:00:00 2001
+From 88dd9f3a1611fed0cc66fb838eb85739646dd34d 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
@@ -78,7 +78,7 @@ Subject: doctests: add dochtml label to some tests that need docs installed
  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
+index f8c8ebd..d329009 100644
 --- a/src/sage_docbuild/__init__.py
 +++ b/src/sage_docbuild/__init__.py
 @@ -105,7 +105,7 @@ def builder_helper(type):
@@ -86,7 +86,7 @@ index 4a71c91..dd233bd 100644
          sage: from sage_docbuild import _build_many as build_many
          sage: helper = builder_helper("html")
 -        sage: try:
-+        sage: try:  # optional - dochtml
++        sage: try:  # optional - sagemath_doc_html
          ....:     build_many(build_ref_doc, [("docname", "en", "html", {})])
          ....: except Exception as E:
          ....:     "Non-exception during docbuild: abort pool operation" in str(E)
@@ -95,7 +95,7 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import DocBuilder
              sage: b = DocBuilder('tutorial')
 -            sage: b._output_dir('html')
-+            sage: b._output_dir('html')         # optional - dochtml
++            sage: b._output_dir('html')         # optional - sagemath_doc_html
              '.../html/en/tutorial'
          """
          d = os.path.join(SAGE_DOC, type, self.lang, self.name)
@@ -104,7 +104,7 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import DocBuilder
              sage: b = DocBuilder('tutorial')
 -            sage: b._doctrees_dir()
-+            sage: b._doctrees_dir()             # optional - docthml
++            sage: b._doctrees_dir()             # optional - sagemath_doc_html
              '.../doctrees/en/tutorial'
          """
          d = os.path.join(SAGE_DOC, 'doctrees', self.lang, self.name)
@@ -113,7 +113,7 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import ReferenceBuilder
              sage: b = ReferenceBuilder('reference')
 -            sage: b._output_dir('html')
-+            sage: b._output_dir('html')         # optional - dochtml
++            sage: b._output_dir('html')         # optional - sagemath_doc_html
              '.../html/en/reference'
          """
          if lang is None:
@@ -122,56 +122,10 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import ReferenceTopBuilder
              sage: b = ReferenceTopBuilder('reference')
 -            sage: b._output_dir('html')
-+            sage: b._output_dir('html')         # optional - dochtml
++            sage: b._output_dir('html')         # optional - sagemath_doc_html
              '.../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/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch b/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
new file mode 100644
index 000000000000..d32f1e4d5e9f
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
@@ -0,0 +1,27 @@
+From 836249c415e11d0522bff9013bc1509264b26ebf Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Sun, 9 Jan 2022 16:51:22 -0300
+Subject: trac 33135: add filter to ignore deprecation warnings
+
+---
+ src/sage/all.py | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/sage/all.py b/src/sage/all.py
+index 01ef327..19ca3d4 100644
+--- a/src/sage/all.py
++++ b/src/sage/all.py
+@@ -96,6 +96,10 @@ warnings.filterwarnings('ignore', category=DeprecationWarning,
+ warnings.filterwarnings('ignore', category=DeprecationWarning,
+                         module='pythran')
+ 
++warnings.filterwarnings('ignore', category=DeprecationWarning,
++                        message='The distutils(.sysconfig module| package) is deprecated',
++                        module='numpy|sage.env|sage.features')
++
+ ################ end setup warnings ###############################
+ 
+ 
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
new file mode 100644
index 000000000000..438078a92036
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage/rings/polynomial/hilbert.pyx b/src/sage/rings/polynomial/hilbert.pyx
+index 4cd91d0a46..323b168c4e 100644
+--- a/src/sage/rings/polynomial/hilbert.pyx
++++ b/src/sage/rings/polynomial/hilbert.pyx
+@@ -578,7 +578,7 @@ def hilbert_poincare_series(I, grading=None):
+ 
+     This example exceeded the capabilities of Singular before version 4.2.1p2::
+ 
+-        sage: J.hilbert_numerator(algorithm='singular')
++        sage: J.hilbert_numerator(algorithm='singular')   # not tested - requires singular 4.2.1p2
+         120*t^33 - 3465*t^32 + 48180*t^31 - 429374*t^30 + 2753520*t^29 - 13522410*t^28 + 52832780*t^27 - 168384150*t^26 + 445188744*t^25 - 987193350*t^24 + 1847488500*t^23 + 1372406746*t^22 - 403422496*t^21 - 8403314*t^20 - 471656596*t^19 + 1806623746*t^18 + 752776200*t^17 + 752776200*t^16 - 1580830020*t^15 + 1673936550*t^14 - 1294246800*t^13 + 786893250*t^12 - 382391100*t^11 + 146679390*t^10 - 42299400*t^9 + 7837830*t^8 - 172260*t^7 - 468930*t^6 + 183744*t^5 - 39270*t^4 + 5060*t^3 - 330*t^2 + 1
+ 
+     """
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f53cba947c88..f688629fc26d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -1,6 +1,6 @@
 # Template file for 'sagemath'
 pkgname=sagemath
-version=9.5.beta9
+version=9.5.rc0
 revision=1
 wrksrc=sage-$version
 build_style=configure
@@ -19,7 +19,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
-checksum=aea4c5a8d3b32af2fba644269b9daf4f62471471ba2d7d83da0f8098a5f53225
+checksum=8012e3ac35290fa9b2cb837eeca149925784c2378b486731226944e4afd8a4e6
 python_version=3
 
 build_options="debug system_python3 system_site_packages"
@@ -128,7 +128,7 @@ nostrip=yes
 noshlibprovides=yes
 
 # don't rewrite python shebang as sage uses its own python (for now)
-_no_python_shebang=yes
+#_no_python_shebang=yes
 
 # compile python code in sage venv
 pycompile_dirs="$_SAGE_ROOT/venv/"

From 2b4012f5cd01619ad31e809e7bbd97f91ddbea49 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 10 Jan 2022 16:32:54 -0300
Subject: [PATCH 30/35] sagemath: use system gap

---
 ...f491e5ce599ba185f5e93f02e0fcebd76c9e.patch | 57 +++++++++++++++++++
 .../patches/zzz-skip_doctest_system_gap.patch | 13 +++++
 srcpkgs/sagemath/template                     | 15 ++++-
 3 files changed, 82 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch

diff --git a/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch b/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
new file mode 100644
index 000000000000..da88a369db0d
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
@@ -0,0 +1,57 @@
+From 2c981351bb60089530b0598d3e9a909a23d4d4d8 Mon Sep 17 00:00:00 2001
+From: Thierry Thomas <thierry@FreeBSD.org>
+Date: Mon, 22 Mar 2021 03:04:12 +0100
+Subject: 29644: Add spkg-configure.m4 for gap
+
+---
+ build/pkgs/gap/spkg-configure.m4 | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+ create mode 100644 build/pkgs/gap/spkg-configure.m4
+
+diff --git a/build/pkgs/gap/spkg-configure.m4 b/build/pkgs/gap/spkg-configure.m4
+new file mode 100644
+index 00000000..91cd089
+--- /dev/null
++++ b/build/pkgs/gap/spkg-configure.m4
+@@ -0,0 +1,8 @@
++SAGE_SPKG_CONFIGURE([gap], [
++    SAGE_SPKG_DEPCHECK([gmp], [
++       AC_CHECK_HEADER([gap/system.h], [
++        AC_SEARCH_LIBS([GAP_COMM], [gap], [
++        ], [sage_spkg_install_gap=yes])
++       ], [sage_spkg_install_gap=yes])
++    ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2a41f491e5ce599ba185f5e93f02e0fcebd76c9e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Samuel=20Leli=C3=A8vre?= <samuel.lelievre@gmail.com>
+Date: Mon, 22 Mar 2021 03:05:31 +0100
+Subject: 29644: Add distro information for gap
+
+---
+ build/pkgs/gap/distros/fedora.txt | 1 +
+ build/pkgs/gap/distros/gentoo.txt | 1 +
+ 2 files changed, 2 insertions(+)
+ create mode 100644 build/pkgs/gap/distros/fedora.txt
+ create mode 100644 build/pkgs/gap/distros/gentoo.txt
+
+diff --git a/build/pkgs/gap/distros/fedora.txt b/build/pkgs/gap/distros/fedora.txt
+new file mode 100644
+index 00000000..ea4feae
+--- /dev/null
++++ b/build/pkgs/gap/distros/fedora.txt
+@@ -0,0 +1 @@
++gap
+diff --git a/build/pkgs/gap/distros/gentoo.txt b/build/pkgs/gap/distros/gentoo.txt
+new file mode 100644
+index 00000000..ea64ec9
+--- /dev/null
++++ b/build/pkgs/gap/distros/gentoo.txt
+@@ -0,0 +1 @@
++sci-mathematics/gap
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
new file mode 100644
index 000000000000..f132591d48ac
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage_setup/optional_extension.py b/src/sage_setup/optional_extension.py
+index f252849384..4034e3e196 100644
+--- a/src/sage_setup/optional_extension.py
++++ b/src/sage_setup/optional_extension.py
+@@ -80,7 +80,7 @@ def OptionalExtension(*args, **kwds):
+         sage: print(ext.__class__.__name__)
+         CythonizeExtension
+         sage: ext = OptionalExtension("foo", ["foo.c"], package="gap")
+-        sage: print(ext.__class__.__name__)
++        sage: print(ext.__class__.__name__)     # not tested - fails with system gap
+         Extension
+     """
+     try:
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f688629fc26d..02b0af4ad16d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -66,7 +66,6 @@ ${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
 ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
 
 https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
-https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
 http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
 https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
 https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
@@ -103,7 +102,6 @@ ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
 dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
 
 c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
-6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
 07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
 3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
 718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
@@ -159,6 +157,13 @@ pre_configure() {
 	export MAKE="make -j ${XBPS_MAKEJOBS}"
 }
 
+post_configure() {
+	# we set some variables, right after configure has created sage_conf.py
+	cat <<-EOF >> pkgs/sage-conf/sage_conf.py
+	GAP_ROOT_DIR = "/usr/share/gap"
+	EOF
+}
+
 # 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
@@ -248,7 +253,11 @@ makedepends+="
  gengetopt texinfo
  brial-devel cliquer-devel gfan libbraiding-devel libhomfly-devel
  lrcalc-devel nauty-devel palp tachyon
- maxima-ecl primesieve-devel primecount-devel
+ maxima-ecl primesieve-devel primecount-devel gap-devel
+"
+
+# optional dependencies
+makedepends+="
  ffmpeg ImageMagick
 "
 

From 17f74345467948997e9fa97736f41bb3e31ad795 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Wed, 12 Jan 2022 16:33:19 +0100
Subject: [PATCH 31/35] singular: update to 4.3.0

---
 common/shlibs                                 | 10 ++---
 .../patches/upstream_omalloc_new_musl.patch   | 40 -------------------
 .../patches/upstream_polys_test_musl.patch    | 22 ----------
 srcpkgs/singular/template                     |  7 ++--
 4 files changed, 9 insertions(+), 70 deletions(-)
 delete mode 100644 srcpkgs/singular/patches/upstream_omalloc_new_musl.patch
 delete mode 100644 srcpkgs/singular/patches/upstream_polys_test_musl.patch

diff --git a/common/shlibs b/common/shlibs
index c4b2c348f6f3..d35944228287 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4066,11 +4066,11 @@ libumfpack.so.5 SuiteSparse-5.10.1_1
 libecl.so.21.2 ecl-21.2.1_1
 libecm.so.1 ecm-7.0.4_3
 libcliquer.so.1 cliquer-1.22_1
-libSingular-4.2.1.so singular-4.2.1_1
-libfactory-4.2.1.so singular-4.2.1_1
-libpolys-4.2.1.so singular-4.2.1_1
-libomalloc-0.9.6.so singular-4.2.1_1
-libsingular_resources-4.2.1.so singular-4.2.1_1
+libSingular-4.3.0.so singular-4.3.0_1
+libfactory-4.3.0.so singular-4.3.0_1
+libpolys-4.3.0.so singular-4.3.0_1
+libomalloc-0.9.6.so singular-4.3.0_1
+libsingular_resources-4.3.0.so singular-4.3.0_1
 libbrial.so.3 brial-1.2.10_1
 libbrial_groebner.so.3 brial-1.2.10_1
 libm4ri-0.0.20200125.so m4ri-20200125_1
diff --git a/srcpkgs/singular/patches/upstream_omalloc_new_musl.patch b/srcpkgs/singular/patches/upstream_omalloc_new_musl.patch
deleted file mode 100644
index 354603bb2c44..000000000000
--- a/srcpkgs/singular/patches/upstream_omalloc_new_musl.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From e1643135645a3cc97af8659018defd2b8617bb4e Mon Sep 17 00:00:00 2001
-From: Hans Schoenemann <hannes@mathematik.uni-kl.de>
-Date: Thu, 23 Sep 2021 10:57:25 +0200
-Subject: [PATCH] omalloc: fix alignment stuff for "make check"
-
----
- omalloc/omtTest.c | 6 ------
- omalloc/omtTest.h | 2 +-
- 2 files changed, 1 insertion(+), 7 deletions(-)
-
-diff --git a/omalloc/omtTest.c b/omalloc/omtTest.c
-index 715fbb113c..75c8cdb210 100644
---- a/omalloc/omtTest.c
-+++ b/omalloc/omtTest.c
-@@ -70,12 +70,6 @@ void omtTestDebug(omMemCell cell)
-   }
- 
-   is_size = omSizeOfAddr(cell->addr);
--  if (!OM_IS_ALIGNED(is_size))
--  {
--    omReportError(omError_Unknown, omError_NoError, OM_FLR,
--                  "is_size == %u is unaligned", is_size);
--    return;
--  }
-   if (is_size < size)
-   {
-     omReportError(omError_Unknown, omError_NoError, OM_FLR,
-diff --git a/omalloc/omtTest.h b/omalloc/omtTest.h
-index a579d88011..6faa099c89 100644
---- a/omalloc/omtTest.h
-+++ b/omalloc/omtTest.h
-@@ -48,7 +48,7 @@ void TestFree(omMemCell cell);
- 
- #define IS_STICKY_BIN(spec) (spec & 1)
- // #define IS_STICKY_BIN(spec) (0)
--#define GET_SIZE(spec)      (spec & ((((unsigned long) 1) << 14) -1))
-+#define GET_SIZE(spec)      OM_ALIGN_SIZE((spec & ((((unsigned long) 1) << 14) -1)))
- #define SET_SIZE(spec, size) spec = ((spec & ~((((unsigned long) 1) << 14) -1)) | (size))
- #define IS_ALIGNED(spec)    (spec & (((unsigned long) 1) << 15))
- #define IS_ZERO(spec)       (spec & (((unsigned long) 1) << 16))
diff --git a/srcpkgs/singular/patches/upstream_polys_test_musl.patch b/srcpkgs/singular/patches/upstream_polys_test_musl.patch
deleted file mode 100644
index 73ee062e2f89..000000000000
--- a/srcpkgs/singular/patches/upstream_polys_test_musl.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From 6e2383111a18b2fa2d3421045625d1d424eb1e25 Mon Sep 17 00:00:00 2001
-From: Hans Schoenemann <hannes@mathematik.uni-kl.de>
-Date: Mon, 20 Sep 2021 15:13:36 +0200
-Subject: [PATCH] fix: make check: polys_test
-
----
- libpolys/tests/polys_test.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libpolys/tests/polys_test.h b/libpolys/tests/polys_test.h
-index 5526aa5a6b..5b4c561238 100644
---- a/libpolys/tests/polys_test.h
-+++ b/libpolys/tests/polys_test.h
-@@ -2481,7 +2481,7 @@ class PolysTestSuite : public CxxTest::TestSuite
-     {
-       for (int qi = 0; qi <= 100; qi++)
-       {
--        int c = rand() % 1000000;
-+        int c = rand() % 1000000+1; /* c must not be 0 */
-         poly qterm = p_ISet(c, r); p_SetExp(qterm, 1, qi, r);
-         p_Setm(qterm, r);
-         number qtermAsN = toFractionNumber(qterm, cf);
diff --git a/srcpkgs/singular/template b/srcpkgs/singular/template
index d3af1c8b919b..a3e1dcc0b35f 100644
--- a/srcpkgs/singular/template
+++ b/srcpkgs/singular/template
@@ -1,6 +1,6 @@
 # Template file for 'singular'
 pkgname=singular
-version=4.2.1
+version=4.3.0
 revision=1
 build_style=gnu-configure
 configure_args="--with-readline=ncurses
@@ -18,8 +18,9 @@ short_desc="Computer algebra system for polynomial computations"
 maintainer="dkwo <nicolopiazzalunga@gmail.com>"
 license="GPL-2.0-or-later"
 homepage="https://www.singular.uni-kl.de"
-distfiles="https://service.mathematik.uni-kl.de/ftp/pub/Math/Singular/src/${version//./-}/singular-${version}.tar.gz"
-checksum=28a56df84f85b116e0068ffecf92fbe08fc27bd4c5ba902997f1a367db0bfe8d
+# distfiles="https://service.mathematik.uni-kl.de/ftp/pub/Math/Singular/src/${version//./-}/singular-${version}.tar.gz"
+distfiles="ftp://jim.mathematik.uni-kl.de/pub/Math/Singular/SOURCES/${version//./-}/singular-${version}.tar.gz"
+checksum=74f38288203720e3f280256f2f8deb94030dd032b4237d844652aff0faab36e7
 
 if [ -z "$CROSS_BUILD" ]; then
 	makedepends+=" ntl-devel"

From 7f3687e79dd82f1464b6a55378790b13f9409f44 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Thu, 13 Jan 2022 03:21:19 -0300
Subject: [PATCH 32/35] sagemath: fixes for system gap

---
 .../zzz-fixes_for_system_gap--see_29644.patch | 96 +++++++++++++++++++
 .../patches/zzz-skip_doctest_system_gap.patch | 13 ---
 srcpkgs/sagemath/template                     |  1 +
 3 files changed, 97 insertions(+), 13 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
 delete mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch

diff --git a/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch b/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
new file mode 100644
index 000000000000..741d2b23a7f5
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
@@ -0,0 +1,96 @@
+From 346b4ea4c92f4287d3c097b92817cf2abfcddd8c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Thu, 13 Jan 2022 01:41:31 -0300
+Subject: [PATCH] gap: fixes for using system gap
+
+ - fix _get_shared_lib_path() so we don't need to configure GAP_SO
+ - fix gap_root() so we don't need to configure GAP_ROOT_DIR
+ - skip a useless test that cannot succeed on system gap
+ - use gap_root() in saved_workspace.py instead of GAP_ROOT_DIR
+---
+ src/sage/env.py                      |  2 +-
+ src/sage/libs/gap/saved_workspace.py |  4 ++--
+ src/sage/libs/gap/util.pyx           | 11 +++++++++++
+ src/sage_setup/optional_extension.py |  2 +-
+ 4 files changed, 15 insertions(+), 4 deletions(-)
+
+diff --git a/src/sage/env.py b/src/sage/env.py
+index c4953cfa65..c16696d298 100644
+--- a/src/sage/env.py
++++ b/src/sage/env.py
+@@ -293,7 +293,7 @@ def _get_shared_lib_path(*libnames: str) -> Optional[str]:
+             if sys.platform == 'darwin':
+                 ext = 'dylib'
+             else:
+-                ext = 'so'
++                ext = 'so*'
+ 
+             if SAGE_LOCAL:
+                 search_directories.append(Path(SAGE_LOCAL) / 'lib')
+diff --git a/src/sage/libs/gap/saved_workspace.py b/src/sage/libs/gap/saved_workspace.py
+index ad5adec36d..59c498795f 100644
+--- a/src/sage/libs/gap/saved_workspace.py
++++ b/src/sage/libs/gap/saved_workspace.py
+@@ -8,7 +8,7 @@ workspaces.
+ 
+ import os
+ import glob
+-from sage.env import GAP_ROOT_DIR
++from sage.libs.gap.util import gap_root
+ from sage.interfaces.gap_workspace import gap_workspace_file
+ 
+ 
+@@ -31,7 +31,7 @@ def timestamp():
+     """
+     libgap_dir = os.path.dirname(__file__)
+     libgap_files = glob.glob(os.path.join(libgap_dir, '*'))
+-    gap_packages = glob.glob(os.path.join(GAP_ROOT_DIR, 'pkg', '*'))
++    gap_packages = glob.glob(os.path.join(gap_root(), 'pkg', '*'))
+     files = libgap_files + gap_packages
+     if len(files) == 0:
+         print('Unable to find LibGAP files.')
+diff --git a/src/sage/libs/gap/util.pyx b/src/sage/libs/gap/util.pyx
+index 08c4c40cc0..c7dd557c35 100644
+--- a/src/sage/libs/gap/util.pyx
++++ b/src/sage/libs/gap/util.pyx
+@@ -23,6 +23,7 @@ from cysignals.signals cimport sig_on, sig_off
+ import os
+ import warnings
+ import sage.env
++import subprocess
+ 
+ from .gap_includes cimport *
+ from .element cimport *
+@@ -178,6 +179,16 @@ def gap_root():
+     if os.path.exists(sage.env.GAP_ROOT_DIR):
+         return sage.env.GAP_ROOT_DIR
+ 
++    gap_expr = 'JoinStringsWithSeparator(KERNEL_INFO().GAP_ROOT_PATHS,";")'
++    gap_root_paths = subprocess.getoutput(
++        f"gap -r -q --bare --nointeract -c 'Display({gap_expr});'"
++        ).strip().split(';')
++
++    for gapdir in gap_root_paths:
++        if os.path.exists(os.path.join(gapdir, 'sysinfo.gap')):
++            sage.env.GAP_ROOT_DIR = gapdir
++            return gapdir
++
+     # Attempt to figure out the appropriate GAP_ROOT by reading the
+     # local/bin/gap shell script; this is an ugly hack that exists for
+     # historical reasons; the best approach to setting where Sage looks for
+diff --git a/src/sage_setup/optional_extension.py b/src/sage_setup/optional_extension.py
+index f252849384..4034e3e196 100644
+--- a/src/sage_setup/optional_extension.py
++++ b/src/sage_setup/optional_extension.py
+@@ -80,7 +80,7 @@ def OptionalExtension(*args, **kwds):
+         sage: print(ext.__class__.__name__)
+         CythonizeExtension
+         sage: ext = OptionalExtension("foo", ["foo.c"], package="gap")
+-        sage: print(ext.__class__.__name__)
++        sage: print(ext.__class__.__name__)     # not tested - fails with system gap
+         Extension
+     """
+     try:
+-- 
+2.34.1
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
deleted file mode 100644
index f132591d48ac..000000000000
--- a/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/src/sage_setup/optional_extension.py b/src/sage_setup/optional_extension.py
-index f252849384..4034e3e196 100644
---- a/src/sage_setup/optional_extension.py
-+++ b/src/sage_setup/optional_extension.py
-@@ -80,7 +80,7 @@ def OptionalExtension(*args, **kwds):
-         sage: print(ext.__class__.__name__)
-         CythonizeExtension
-         sage: ext = OptionalExtension("foo", ["foo.c"], package="gap")
--        sage: print(ext.__class__.__name__)
-+        sage: print(ext.__class__.__name__)     # not tested - fails with system gap
-         Extension
-     """
-     try:
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 02b0af4ad16d..0d8ce1f7a70a 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -161,6 +161,7 @@ post_configure() {
 	# we set some variables, right after configure has created sage_conf.py
 	cat <<-EOF >> pkgs/sage-conf/sage_conf.py
 	GAP_ROOT_DIR = "/usr/share/gap"
+	GAP_SO = "$(objdump -p /usr/lib/libgap.so | awk '/SONAME/{print $2}')"
 	EOF
 }
 

From 2ab2e840e0a5bcc4fa23f0ea72c805d1d800787f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Thu, 13 Jan 2022 15:47:33 -0300
Subject: [PATCH 33/35] New package: sagemath-test

---
 srcpkgs/sagemath-test/template                | 32 +++++++++++++++++++
 .../patches/zzz-skip_doctest_shebang.patch    | 11 +++++++
 2 files changed, 43 insertions(+)
 create mode 100644 srcpkgs/sagemath-test/template
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch

diff --git a/srcpkgs/sagemath-test/template b/srcpkgs/sagemath-test/template
new file mode 100644
index 000000000000..3e0b1c3233fd
--- /dev/null
+++ b/srcpkgs/sagemath-test/template
@@ -0,0 +1,32 @@
+# Template file for 'sagemath-test'
+pkgname=sagemath-test
+version=1
+revision=1
+build_style=meta
+checkdepends="sagemath"
+short_desc="Dummy package to test sagemath"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-2.0-or-later"
+homepage="none"
+
+# TODO: install base-voidstrap, uninstall base-chroot, and remove orphans
+# so we can check sagemath depends are enough to run sage on void
+
+do_check() {
+	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
+		_test_args=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	fi
+	if [ -z "$_test_args" ]; then
+		_test_args=--all
+	fi
+	if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
+		# for CI use a predictable random seed
+		_test_args="--random-seed=0 $_test_args"
+	fi
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args="--long $_test_args"
+	else
+		_test_args="--warn-long 5.0 $_test_args"
+	fi
+	/usr/bin/sage* -tp ${XBPS_MAKEJOBS} ${_test_args}
+}
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch
new file mode 100644
index 000000000000..04fa2acbf3ec
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch
@@ -0,0 +1,11 @@
+--- a/src/sage/tests/cmdline.py
++++ b/src/sage/tests/cmdline.py
+@@ -488,7 +488,7 @@ def test_executable(args, input="", timeout=100.0, pydebug_ignore_warnings=False
+         0
+ 
+         sage: (out, err, ret) = test_executable(["sage", "--cython"])
+-        sage: print(err)
++        sage: print(err)  # not tested - broken when shebang is rewritten
+         Cython (http://cython.org) is a compiler for code written in the
+         Cython language.  Cython is based on Pyrex by Greg Ewing.
+         ...

From c347d2cf53a146f758c9fdbf64f2f506349f7e8b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 11:34:23 -0300
Subject: [PATCH 34/35] sagemath: cleanup and one patch

---
 .../zzz-skip_doctest_sage_setup_find.patch    | 12 ++++++++
 srcpkgs/sagemath/template                     | 30 ++++---------------
 2 files changed, 18 insertions(+), 24 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch

diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch
new file mode 100644
index 000000000000..15aed02f9aaa
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch
@@ -0,0 +1,12 @@
+--- a/src/sage_setup/find.py
++++ b/src/sage_setup/find.py
+@@ -301,7 +301,7 @@ def find_extra_files(src_dir, modules, cythonized_dir, special_filenames=[]):
+         sage: extras["sage/libs/mpfr"]
+         [...sage/libs/mpfr/types.pxd...]
+         sage: extras["sage/ext/interpreters"]
+-        ['.../src/sage/ext/interpreters/wrapper_cdf.pxd', ...wrapper_cdf.h...]
++        ['.../src/sage/ext/interpreters/wrapper_cdf.pxd', ...]
+     """
+     from Cython.Utils import is_package_dir
+ 
+--
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 0d8ce1f7a70a..f25cb745c9c4 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -4,7 +4,8 @@ version=9.5.rc0
 revision=1
 wrksrc=sage-$version
 build_style=configure
-configure_args="--enable-build-as-root"
+configure_args="--enable-build-as-root --with-system-python3
+ --enable-system-site-packages"
 make_check_target=ptest
 # for now skip building docs
 make_build_target=build
@@ -22,13 +23,8 @@ distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
 checksum=8012e3ac35290fa9b2cb837eeca149925784c2378b486731226944e4afd8a4e6
 python_version=3
 
-build_options="debug system_python3 system_site_packages"
+build_options="debug"
 desc_option_debug="Build with debug symbols"
-desc_option_system_python="Build using system python 3"
-desc_option_system_python="Build using system python site-packages"
-build_options_default="system_python3 system_site_packages"
-configure_args+=" $(vopt_with system_python3)"
-configure_args+=" $(vopt_enable system_site_packages)"
 
 # path where sage will be installed
 _SAGE_ROOT=/usr/lib/sage-${version}
@@ -112,9 +108,6 @@ for u in ${_upstream}; do
 	skip_extraction+=" ${u##*[/>]}"
 done
 
-# 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
@@ -165,16 +158,6 @@ post_configure() {
 	EOF
 }
 
-# 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() {
 	vlicense COPYING.txt
 	vdoc README.md
@@ -301,7 +284,6 @@ _sage_python3_modules="
  python3-wheel python3-zipp pythran
  "
 
-if [ "$build_option_system_site_packages" ]; then
-	makedepends+=" $_sage_python3_modules"
-	depends+=" $_sage_python3_modules"
-fi
+# python packages are build and runtime dependencies
+makedepends+=" $_sage_python3_modules"
+depends+=" $_sage_python3_modules"

From ffcd3c0af81459aafe803fa13ebdf4a2b10f5ccf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 11:34:32 -0300
Subject: [PATCH 35/35] sagemath: update to 9.5.rc1.

---
 srcpkgs/sagemath/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f25cb745c9c4..f5d9d0f0fabd 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -1,6 +1,6 @@
 # Template file for 'sagemath'
 pkgname=sagemath
-version=9.5.rc0
+version=9.5.rc1
 revision=1
 wrksrc=sage-$version
 build_style=configure
@@ -20,7 +20,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
-checksum=8012e3ac35290fa9b2cb837eeca149925784c2378b486731226944e4afd8a4e6
+checksum=b015c54f7411669ef70bac2b2fde260e7f45724bcff170957b1f9fd08131f2c3
 python_version=3
 
 build_options="debug"

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.rc1
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (189 preceding siblings ...)
  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
                   ` (57 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-14 15:24 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1013190795

Comment:
Updated to 9.5.rc1, some cleanup, added a patch for the one failing doctest in the previous run. Hopefully all tests will pass now both in the build tree and in the installed tree.

Other pending PR:
- [ ] #34789 Needs review/testing
- [ ] #35012 Waiting for an official release?

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.rc1
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (190 preceding siblings ...)
  2022-01-14 15:24 ` tornaria
@ 2022-01-14 15:27 ` leahneukirchen
  2022-01-14 15:31 ` tornaria
                   ` (56 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: leahneukirchen @ 2022-01-14 15:27 UTC (permalink / raw)
  To: ml

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

New comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1013222970

Comment:
I rebuilt my docker image and hit:

```
make --no-print-directory wheel-SAGE_VENV-no-deps
[wheel-0.37.0] Attempting to download package wheel-0.37.0.tar.gz from mirrors
[wheel-0.37.0] ERROR: downloading is disabled, add file to template instead
[wheel-0.37.0] Error: spkg file '/usr/lib/sage-9.5.rc1/upstream/wheel-0.37.0.tar.gz' not found.
[wheel-0.37.0] This shouldn't happen, it is a bug in the sage-spkg script.
make[4]: *** [Makefile:2723: wheel-SAGE_VENV-no-deps] Error 1
make[3]: *** [Makefile:2723: /usr/lib/sage-9.5.rc1/local/var/lib/sage/venv-python3.10/var/lib/sage/installed/wheel-0.37.0] Error 2
```

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.rc1
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (191 preceding siblings ...)
  2022-01-14 15:27 ` leahneukirchen
@ 2022-01-14 15:31 ` tornaria
  2022-01-14 16:35 ` leahneukirchen
                   ` (55 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-14 15:31 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1013226153

Comment:
> I rebuilt my docker image and hit:
> 
> ```
> make --no-print-directory wheel-SAGE_VENV-no-deps
> [wheel-0.37.0] Attempting to download package wheel-0.37.0.tar.gz from mirrors
> [wheel-0.37.0] ERROR: downloading is disabled, add file to template instead
> [wheel-0.37.0] Error: spkg file '/usr/lib/sage-9.5.rc1/upstream/wheel-0.37.0.tar.gz' not found.
> [wheel-0.37.0] This shouldn't happen, it is a bug in the sage-spkg script.
> make[4]: *** [Makefile:2723: wheel-SAGE_VENV-no-deps] Error 1
> make[3]: *** [Makefile:2723: /usr/lib/sage-9.5.rc1/local/var/lib/sage/venv-python3.10/var/lib/sage/installed/wheel-0.37.0] Error 2
> ```

Sorry, I messed up with the cleanup. The CI had the same failure, only because I forgot to keep a couple of flags when removing build options that no longer work.

It also means that my patch to prevent sage from downloading stuff works :-)

Please try again now.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.rc1
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (192 preceding siblings ...)
  2022-01-14 15:31 ` tornaria
@ 2022-01-14 16:35 ` leahneukirchen
  2022-01-14 16:57 ` tornaria
                   ` (54 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: leahneukirchen @ 2022-01-14 16:35 UTC (permalink / raw)
  To: ml

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

New comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1013277839

Comment:
makedepends+=" python3-wheel" fixed it btw.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.rc1
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (193 preceding siblings ...)
  2022-01-14 16:35 ` leahneukirchen
@ 2022-01-14 16:57 ` tornaria
  2022-01-14 17:04 ` leahneukirchen
                   ` (53 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-14 16:57 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1013294816

Comment:
> makedepends+=" python3-wheel" fixed it btw.

I don't think so, `python3-wheel` is already in makedepends as a lot of other python packages. It needs `--with-system-python3 --enable-system-site-packages` so it will accept python 3.10 and use python packages from the system (off by default).

When I removed the build options, I forgot to keep these flags in `configure_args`, you probably updated to my latest HEAD.

At this time we are no longer using the distfile with all the upstream packages -- just the bare one from github + individual upstream packages that we still package together with sagemath (about 30 or so). Anything that sage wants to install itself and is not available will be downloaded, except my patch disables downloading. We'll have a similar failure if/when sage changes the version for some upstream package (until we fix the version and sha256 of the corresponding distfile in our template).

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.rc1
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (194 preceding siblings ...)
  2022-01-14 16:57 ` tornaria
@ 2022-01-14 17:04 ` leahneukirchen
  2022-01-14 17:39 ` leahneukirchen
                   ` (52 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: leahneukirchen @ 2022-01-14 17:04 UTC (permalink / raw)
  To: ml

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

New comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1013299896

Comment:
Then I guess my second run just hit the force-pushed branch already. :) Builds now.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.rc1
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (195 preceding siblings ...)
  2022-01-14 17:04 ` leahneukirchen
@ 2022-01-14 17:39 ` leahneukirchen
  2022-01-15  2:13 ` [PR PATCH] [Updated] " tornaria
                   ` (51 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: leahneukirchen @ 2022-01-14 17:39 UTC (permalink / raw)
  To: ml

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

New comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1013324920

Comment:
Can we have `/usr/bin/sage` back?

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: sagemath-9.5.rc1
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (196 preceding siblings ...)
  2022-01-14 17:39 ` leahneukirchen
@ 2022-01-15  2:13 ` tornaria
  2022-01-15  4:48 ` tornaria
                   ` (50 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-15  2:13 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 627 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.rc1
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: 622948 bytes --]

From 4f88980f2df5063f14c52d5433a42399b3bea390 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/39] 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 10510a5d5f98b529a357c8a29a297fc33837fe7c 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/39] 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 97a5c8a41f8a38ad5ef68a999397252c7ecbc87a 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/39] 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 71b7db0ce4c6a7615429feb9a906dad660870a89 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/39] 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 dfa27048255641696d18c1c0d745795e916547e5 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/39] 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 1a2c31627a407c83837fc7bcd06ab0470dbcb875 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/39] 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 b5d2c540beda7a80b1e05db2f37af203110cd4db 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/39] 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 8d03785cc4227b2188af451323fdcf23c0062386 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/39] 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 44b03508e8ae01c55906fe0ef81cb68ba454f863 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/39] 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 076b21078750ce031c7255d522a86b121fb5010f 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/39] 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 126c0d8887227cb2ab9f63ca55bc28f6eba7eef6 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/39] 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 74bbdbdcf286627014eee09e225e5a9ce92e32f2 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/39] 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 7ad19785e3284341aef8e48743b798e208a96608 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/39] 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 026889d8962ccb9eb2a5e2b153b6785fd42ade8e 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/39] 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 1684a2f508021db3f9bae4d6a5d1dc65d6d1a7e9 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/39] 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 6eec62191faa744185e6e904acc51963f7f99d14 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/39] 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 e1ba2ceab0bdceb90546b11898e54c377ac1beab 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/39] 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 3da57c6a1f29820436b7e8617591e78f27ac94c5 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/39] 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 a29a692cbb45d6b944e967b9774425b2522625b1 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/39] 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

From 5fad7c34b3d667ab07c69e97e66d7993918b12b4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 27 Dec 2021 20:19:19 -0300
Subject: [PATCH 20/39] sagemath: fix license and tests

Now tests can be run with -Q (normal) or -K (--long)
---
 srcpkgs/sagemath/template | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index c5009269c7fc..33b40acbabeb 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -16,7 +16,7 @@ depends="giac git FlintQS zn_poly sympow
  "
 short_desc="Open source mathematics software"
 maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
-license="GPL-3.0-or-later"
+license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
 checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
@@ -155,15 +155,17 @@ do_install() {
 }
 
 do_check() {
-	TEST=--all
 	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
-		TEST="$(sed -e 's/#.*//' ${XBPS_DISTDIR}/sagemath-check)"
+		_test_args=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	fi
+	if [ -z "$_test_args" ]; then
+		_test_args=--all
+	fi
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args="--long $_test_args"
 	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} ${OPT} ${TEST}
-	#./sage -t ${OPT} ${TEST}
+	./sage -tp ${XBPS_MAKEJOBS} ${_test_args}
 }
 
 ### copied from sage-deps, to be kept in sync

From 6a031adcdb36b2a979125034396ddd4116c87b41 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 28 Dec 2021 23:08:17 -0300
Subject: [PATCH 21/39] sagemath: fix long time test

---
 .../patches/zzz-fix_long_time_test--see_33091.patch | 13 +++++++++++++
 ...=> zzz-skip_doctest_giac-1.7.0--see_31563.patch} |  0
 2 files changed, 13 insertions(+)
 create mode 100644 srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
 rename srcpkgs/sagemath/patches/{skip-doctest-giac-1.7.0--see-trac-31563.patch => zzz-skip_doctest_giac-1.7.0--see_31563.patch} (100%)

diff --git a/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch b/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
new file mode 100644
index 000000000000..ca360dee9f6e
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage/matrix/matrix2.pyx b/src/sage/matrix/matrix2.pyx
+index 7d319bd54b..c1a2eed6f1 100644
+--- a/src/sage/matrix/matrix2.pyx
++++ b/src/sage/matrix/matrix2.pyx
+@@ -17215,7 +17215,7 @@ cdef class Matrix(Matrix1):
+ 
+             sage: set_random_seed()
+             sage: K = random_cone(max_ambient_dim=5)
+-            sage: all(L.change_ring(SR).is_Z_operator_on(K)
++            sage: all(L.change_ring(SR).is_Z_operator_on(K) # long time
+             ....:     for L in K.Z_operators_gens())  # long time
+             True
+ 
diff --git a/srcpkgs/sagemath/patches/skip-doctest-giac-1.7.0--see-trac-31563.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_31563.patch
similarity index 100%
rename from srcpkgs/sagemath/patches/skip-doctest-giac-1.7.0--see-trac-31563.patch
rename to srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_31563.patch

From 28937bb9ae472550543d16fea481f0f82fa4c79f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 31 Dec 2021 13:52:34 -0300
Subject: [PATCH 22/39] python3-Sphinx: update to 4.3.2.

---
 srcpkgs/python3-Sphinx/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/python3-Sphinx/template b/srcpkgs/python3-Sphinx/template
index 8b0493c1f92c..29f892d16157 100644
--- a/srcpkgs/python3-Sphinx/template
+++ b/srcpkgs/python3-Sphinx/template
@@ -1,6 +1,6 @@
 # Template file for 'python3-Sphinx'
 pkgname=python3-Sphinx
-version=4.2.0
+version=4.3.2
 revision=1
 wrksrc=Sphinx-${version}
 build_style=python3-module
@@ -17,8 +17,9 @@ short_desc="Python 3 documentation generator"
 maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
 license="BSD-3-Clause"
 homepage="http://sphinx-doc.org"
+changelog="https://www.sphinx-doc.org/en/master/changes.html"
 distfiles="${PYPI_SITE}/S/Sphinx/Sphinx-${version}.tar.gz"
-checksum=94078db9184491e15bce0a56d9186e0aec95f16ac20b12d00e06d4e36f1058a6
+checksum=0a8836751a68306b3fe97ecbe44db786f8479c3bf4b80e3a7f5c838657b4698c
 conflicts="python-Sphinx>=0"
 
 post_install() {

From 15359adb812748d2934d3d0fc0280b0809e5c198 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 28 Dec 2021 23:08:17 -0300
Subject: [PATCH 23/39] sagemath: use system python site-packages

 - patch from #29665 for that
 - patch on top of that to allow a few more python packages:
   gmpy2, sphinx, typing_extensions, ptyprocess
 - add all available python packages to makedepends and depends
 - add ffmpeg and ImageMagick to makedepends
 - in standard check (-Q) warn if individual test > 5.0s
---
 ...184f7498a2046065e669723e68efe2d65cee.patch | 5629 +++++++++++++++++
 .../zzz-dont_run_pytest--see_31924.patch      |   27 +
 .../zzz-more_site_packages_not_in_29665.patch |   42 +
 srcpkgs/sagemath/template                     |   52 +-
 4 files changed, 5747 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch

diff --git a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
new file mode 100644
index 000000000000..b641113927e7
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
@@ -0,0 +1,5629 @@
+From 05fcaabe95082f42ba134780d579390d7b6153e2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 19:30:58 -0400
+Subject: Trac #29665: add --enable-system-site-packages option to ./configure.
+
+This new option is experimental and disabled by default. When it is
+enabled, the string "--system-site-packages" is appended to a new
+environment variable SAGE_VENV_FLAGS that is then passed to the
+sage-venv command during the build using autoconf substitution.
+Thusly the correct setting finds its way into local/pyvenv.cfg.
+---
+ build/make/Makefile.in |  2 +-
+ configure.ac           | 11 +++++++++++
+ 2 files changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/build/make/Makefile.in b/build/make/Makefile.in
+index f870cc3..68627ab 100644
+--- a/build/make/Makefile.in
++++ b/build/make/Makefile.in
+@@ -211,7 +211,7 @@ endif
+ inst_python3_venv = $(SAGE_VENV)/pyvenv.cfg
+ 
+ $(inst_python3_venv):
+-	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv "$(SAGE_VENV)"
++	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv @SAGE_VENV_FLAGS@ "$(SAGE_VENV)"
+ endif
+ 
+ # Build everything and start Sage.
+diff --git a/configure.ac b/configure.ac
+index 351f487..db30a91 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -435,6 +435,17 @@ AC_ARG_ENABLE([download-from-upstream-url],
+   [AS_HELP_STRING([--enable-download-from-upstream-url],
+     [allow downloading packages from their upstream URL if they cannot be found on the Sage mirrors])])
+ 
++AC_ARG_ENABLE(
++  [system-site-packages], [AS_HELP_STRING(
++    [--enable-system-site-packages],
++    [allow sage to use python packages from the system (experimental; default: no)]
++  )], [
++  AS_IF([test "x$enable_system_site_packages" = "xyes"], [
++    SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
++  ])
++])
++AC_SUBST([SAGE_VENV_FLAGS])
++
+ SAGE_SPKG_OPTIONS=""
+ AS_IF([test "x$enable_experimental_packages" = "xyes"], [
+   AS_VAR_APPEND([SAGE_SPKG_OPTIONS], [" -y"])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9372d1f663edf4e89f9c186336815ca04cff59dc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 19:41:14 -0400
+Subject: Trac #29665: new SAGE_PYTHON_PACKAGE_CHECK() autoconf macro.
+
+This new macro encapsulates the check for system installations of
+python packages. It uses setuptools.version's pkg_resources to
+check if the contents of install-requires.txt are satisfied for
+the given package; and if not, tells the build system to install
+the SPKG instead.
+---
+ m4/sage_python_package_check.m4 | 49 +++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 49 insertions(+)
+ create mode 100644 m4/sage_python_package_check.m4
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+new file mode 100644
+index 00000000..77b0a0c
+--- /dev/null
++++ b/m4/sage_python_package_check.m4
+@@ -0,0 +1,49 @@
++#
++# SYNOPSIS
++#
++#   SAGE_PYTHON_PACKAGE_CHECK(package)
++#
++# DESCRIPTION
++#
++#   Determine if the system copy of a python package can be used by sage.
++#
++#   This macro uses setuptools.version's pkg_resources to check that the
++#   "install-requires.txt" file for the named package is satisfied, and
++#   it can typically fail in four ways:
++#
++#     1. If --enable-system-site-packages was not passed to ./configure,
++#
++#     2. If we are not using the system python (no $PYTHON_FOR_VENV),
++#
++#     3. If setuptools is not available to the system python,
++#
++#     4. If the contents of install-requires.txt are not met (wrong
++#        version, no version, etc.) by the system python.
++#
++#   In any of those cases, we set sage_spkg_install_$package to "yes"
++#   so that the corresponding SPKG is installed. Otherwise, we do
++#   nothing, since the default value of sage_spkg_install_$package
++#   is "no" (to use the system copy).
++#
++#   The SAGE_SPKG_CONFIGURE_PYTHON3() macro is AC_REQUIRE'd to ensure
++#   that $PYTHON_FOR_VENV is available, if it is going to be available.
++#
++
++AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
++  AS_IF([test "${enable_system_site_packages}" = "yes"], [
++    AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
++
++    dnl strip all comments from install-requires.txt; this should leave
++    dnl only a single line containing the version specification for this
++    dnl package.
++    SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
++    AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++    AS_IF(
++      ["${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())"],
++      [AC_MSG_RESULT(yes)],
++      [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
++    )
++  ], [
++    sage_spkg_install_$1=yes
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a0dac8ad81ad6369d479bba30d2388de59e5cecb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:21:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for py.
+
+---
+ build/pkgs/py/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/py/spkg-configure.m4
+
+diff --git a/build/pkgs/py/spkg-configure.m4 b/build/pkgs/py/spkg-configure.m4
+new file mode 100644
+index 00000000..ded7034
+--- /dev/null
++++ b/build/pkgs/py/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([py], [SAGE_PYTHON_PACKAGE_CHECK([py])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 87c463a25ab4432dc1fba4f7a9703284e5b8f620 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:24:15 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for wheel.
+
+---
+ build/pkgs/wheel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wheel/spkg-configure.m4
+
+diff --git a/build/pkgs/wheel/spkg-configure.m4 b/build/pkgs/wheel/spkg-configure.m4
+new file mode 100644
+index 00000000..7897ea9
+--- /dev/null
++++ b/build/pkgs/wheel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([wheel], [SAGE_PYTHON_PACKAGE_CHECK([wheel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 804094b3a980f262f4d53d7be8b1be43ac0c55e0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:25:15 -0400
+Subject: Trac #29665: new spkg-configure.m4 for cvxopt.
+
+This includes a SAGE_SPKG_DEPCHECK([gsl glpk suitesparse],... because
+those C dependencies wind up linked into shared libraries like,
+
+  /usr/.../cvxopt/glpk.cpython-39-x86_64-linux-gnu.so
+
+that could potentially conflict with (for example) the glpk SPKG.
+---
+ build/pkgs/cvxopt/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/cvxopt/spkg-configure.m4
+
+diff --git a/build/pkgs/cvxopt/spkg-configure.m4 b/build/pkgs/cvxopt/spkg-configure.m4
+new file mode 100644
+index 00000000..c4aa619
+--- /dev/null
++++ b/build/pkgs/cvxopt/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([cvxopt], [
++  SAGE_SPKG_DEPCHECK([gsl glpk suitesparse], [
++    SAGE_PYTHON_PACKAGE_CHECK([cvxopt])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3f171955ff8d15da2c98aee0d2e254e95a55a2b5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:28:10 -0400
+Subject: Trac #29665: new spkg-configure.m4 for pyzmq.
+
+This includes a SAGE_SPKG_DEPCHECK([zeromq],... because libzmq winds
+up linked into shared libraries like,
+
+  /usr/.../zmq/backend/cython/message.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the zeromq SPKG.
+---
+ build/pkgs/pyzmq/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/pyzmq/spkg-configure.m4
+
+diff --git a/build/pkgs/pyzmq/spkg-configure.m4 b/build/pkgs/pyzmq/spkg-configure.m4
+new file mode 100644
+index 00000000..ae2b126
+--- /dev/null
++++ b/build/pkgs/pyzmq/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([pyzmq], [
++  SAGE_SPKG_DEPCHECK([zeromq], [
++    SAGE_PYTHON_PACKAGE_CHECK([pyzmq])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20d3aa9da9fc98a6e6a47599cd1b6d1d3785a4c4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:31:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for requests.
+
+---
+ build/pkgs/requests/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/requests/spkg-configure.m4
+
+diff --git a/build/pkgs/requests/spkg-configure.m4 b/build/pkgs/requests/spkg-configure.m4
+new file mode 100644
+index 00000000..f50a66c
+--- /dev/null
++++ b/build/pkgs/requests/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([requests], [SAGE_PYTHON_PACKAGE_CHECK([requests])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4df57ee47f2576b6b7bf9265248e06e90616b689 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:13:34 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for six.
+
+---
+ build/pkgs/six/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/six/spkg-configure.m4
+
+diff --git a/build/pkgs/six/spkg-configure.m4 b/build/pkgs/six/spkg-configure.m4
+new file mode 100644
+index 00000000..a382b81
+--- /dev/null
++++ b/build/pkgs/six/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([six], [SAGE_PYTHON_PACKAGE_CHECK([six])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f4462652d02ca729cc6d7cb36ee4d7d662deafb0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:14:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for packaging.
+
+---
+ build/pkgs/packaging/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/packaging/spkg-configure.m4
+
+diff --git a/build/pkgs/packaging/spkg-configure.m4 b/build/pkgs/packaging/spkg-configure.m4
+new file mode 100644
+index 00000000..398f9e1
+--- /dev/null
++++ b/build/pkgs/packaging/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([packaging], [SAGE_PYTHON_PACKAGE_CHECK([packaging])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4d64677fffce48077e4bc3e20ec833c70e6e9b65 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:18:53 -0400
+Subject: Trac #29665: new spkg-configure.m4 for numpy.
+
+This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack
+wind up linked into shared libraries like,
+
+  /usr/.../numpy/linalg/lapack_lite.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the openblas SPKG.
+---
+ build/pkgs/numpy/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/numpy/spkg-configure.m4
+
+diff --git a/build/pkgs/numpy/spkg-configure.m4 b/build/pkgs/numpy/spkg-configure.m4
+new file mode 100644
+index 00000000..16f9a90
+--- /dev/null
++++ b/build/pkgs/numpy/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([numpy], [
++  SAGE_SPKG_DEPCHECK([openblas], [
++   SAGE_PYTHON_PACKAGE_CHECK([numpy])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 85dfe5bb32f3c470966b477bae68a921e846d11f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:58:48 -0400
+Subject: Trac #29665: new spkg-configure.m4 for scipy.
+
+This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack
+wind up linked into shared libraries like,
+
+  /usr/.../scipy/linalg/_flinalg.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the openblas SPKG.
+---
+ build/pkgs/scipy/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/scipy/spkg-configure.m4
+
+diff --git a/build/pkgs/scipy/spkg-configure.m4 b/build/pkgs/scipy/spkg-configure.m4
+new file mode 100644
+index 00000000..0b7294a
+--- /dev/null
++++ b/build/pkgs/scipy/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([scipy], [
++  SAGE_SPKG_DEPCHECK([openblas], [
++    SAGE_PYTHON_PACKAGE_CHECK([scipy])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5616f1491036fda95f4d3e840c8c8b531c97323b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 07:19:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pluggy.
+
+---
+ build/pkgs/pluggy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pluggy/spkg-configure.m4
+
+diff --git a/build/pkgs/pluggy/spkg-configure.m4 b/build/pkgs/pluggy/spkg-configure.m4
+new file mode 100644
+index 00000000..11b1fce
+--- /dev/null
++++ b/build/pkgs/pluggy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pluggy], [SAGE_PYTHON_PACKAGE_CHECK([pluggy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6bceae3d356878cfe5fce40c9998dead003a3844 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 07:24:12 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pickleshare.
+
+---
+ build/pkgs/pickleshare/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pickleshare/spkg-configure.m4
+
+diff --git a/build/pkgs/pickleshare/spkg-configure.m4 b/build/pkgs/pickleshare/spkg-configure.m4
+new file mode 100644
+index 00000000..80e9b7c
+--- /dev/null
++++ b/build/pkgs/pickleshare/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pickleshare], [SAGE_PYTHON_PACKAGE_CHECK([pickleshare])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From da2ab534f4a256c82ed4f1c5f0f5c320529b5e9f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 08:53:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for html5lib.
+
+---
+ build/pkgs/html5lib/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/html5lib/spkg-configure.m4
+
+diff --git a/build/pkgs/html5lib/spkg-configure.m4 b/build/pkgs/html5lib/spkg-configure.m4
+new file mode 100644
+index 00000000..f421b7e
+--- /dev/null
++++ b/build/pkgs/html5lib/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([html5lib], [SAGE_PYTHON_PACKAGE_CHECK([html5lib])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5e464134afdf6055b7b5804208f759561c5435cd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 18:30:47 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for networkx.
+
+---
+ build/pkgs/networkx/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/networkx/spkg-configure.m4
+
+diff --git a/build/pkgs/networkx/spkg-configure.m4 b/build/pkgs/networkx/spkg-configure.m4
+new file mode 100644
+index 00000000..926671e
+--- /dev/null
++++ b/build/pkgs/networkx/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([networkx], [SAGE_PYTHON_PACKAGE_CHECK([networkx])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c4d40770cd9c7fda811e31759a5f4aedc320f3f9 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:33:24 -0400
+Subject: Trac #29665: new spkg-configure.m4 for matplotlib.
+
+This includes a SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull],...
+because those dependencies wind up linked into shared libraries like,
+
+  /usr/lib/.../matplotlib/ft2font.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with their SPKG counterparts.
+---
+ build/pkgs/matplotlib/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/matplotlib/spkg-configure.m4
+
+diff --git a/build/pkgs/matplotlib/spkg-configure.m4 b/build/pkgs/matplotlib/spkg-configure.m4
+new file mode 100644
+index 00000000..39c2d29
+--- /dev/null
++++ b/build/pkgs/matplotlib/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([matplotlib], [
++  SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull], [
++    SAGE_PYTHON_PACKAGE_CHECK([matplotlib])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7834dc3ac349201af632f89a9de7cd1967931010 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:35:00 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for bleach.
+
+---
+ build/pkgs/bleach/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/bleach/spkg-configure.m4
+
+diff --git a/build/pkgs/bleach/spkg-configure.m4 b/build/pkgs/bleach/spkg-configure.m4
+new file mode 100644
+index 00000000..3c9bb26
+--- /dev/null
++++ b/build/pkgs/bleach/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([bleach], [SAGE_PYTHON_PACKAGE_CHECK([bleach])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 84cad343287a2c69a4a21b9fa3b92301ff88645b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:37:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for decorator.
+
+---
+ build/pkgs/decorator/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/decorator/spkg-configure.m4
+
+diff --git a/build/pkgs/decorator/spkg-configure.m4 b/build/pkgs/decorator/spkg-configure.m4
+new file mode 100644
+index 00000000..e062778
+--- /dev/null
++++ b/build/pkgs/decorator/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([decorator], [SAGE_PYTHON_PACKAGE_CHECK([decorator])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 25693212572e69d452bc95c923ada13744359eb7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:38:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for idna.
+
+---
+ build/pkgs/idna/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/idna/spkg-configure.m4
+
+diff --git a/build/pkgs/idna/spkg-configure.m4 b/build/pkgs/idna/spkg-configure.m4
+new file mode 100644
+index 00000000..9d363f2
+--- /dev/null
++++ b/build/pkgs/idna/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([idna], [SAGE_PYTHON_PACKAGE_CHECK([idna])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6d5616472f6cdc6cf496bba6fe07bd4ef44dfdaf Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:39:23 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for certifi.
+
+---
+ build/pkgs/certifi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/certifi/spkg-configure.m4
+
+diff --git a/build/pkgs/certifi/spkg-configure.m4 b/build/pkgs/certifi/spkg-configure.m4
+new file mode 100644
+index 00000000..ddd4061
+--- /dev/null
++++ b/build/pkgs/certifi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([certifi], [SAGE_PYTHON_PACKAGE_CHECK([certifi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9412a07023b275e29e8d1af9b8ee3e767042e7fd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:40:59 -0400
+Subject: Trac #29665: new spkg-configure.m4 for pillow.
+
+This includes an SAGE_SPKG_DEPCHECK([bzip2 freetype libpng zlib],...
+because those dependencies wind up linked into shared libraries like,
+
+  /usr/.../PIL/_imagingft.cpython-39-x86_64-linux-gnu.so
+
+and potentially conflict with their SPKG counterparts.
+---
+ build/pkgs/pillow/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/pillow/spkg-configure.m4
+
+diff --git a/build/pkgs/pillow/spkg-configure.m4 b/build/pkgs/pillow/spkg-configure.m4
+new file mode 100644
+index 00000000..f2e68e2
+--- /dev/null
++++ b/build/pkgs/pillow/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([pillow], [
++  SAGE_SPKG_DEPCHECK([bzip2 freetype libpng zlib], [
++    SAGE_PYTHON_PACKAGE_CHECK([pillow])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From eede914311481fdb75b363b7a799075e876a2b4f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:44:13 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for mpmath.
+
+---
+ build/pkgs/mpmath/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mpmath/spkg-configure.m4
+
+diff --git a/build/pkgs/mpmath/spkg-configure.m4 b/build/pkgs/mpmath/spkg-configure.m4
+new file mode 100644
+index 00000000..f43c838
+--- /dev/null
++++ b/build/pkgs/mpmath/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([mpmath], [SAGE_PYTHON_PACKAGE_CHECK([mpmath])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 363a825885832c0b580ff53fe61f5c79e70c4728 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:44:56 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for sympy.
+
+---
+ build/pkgs/sympy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sympy/spkg-configure.m4
+
+diff --git a/build/pkgs/sympy/spkg-configure.m4 b/build/pkgs/sympy/spkg-configure.m4
+new file mode 100644
+index 00000000..fa0f1f5
+--- /dev/null
++++ b/build/pkgs/sympy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([sympy], [SAGE_PYTHON_PACKAGE_CHECK([sympy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0667964c914e4a01dda697190a054ff96cea92d6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:47:06 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pygments.
+
+---
+ build/pkgs/pygments/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pygments/spkg-configure.m4
+
+diff --git a/build/pkgs/pygments/spkg-configure.m4 b/build/pkgs/pygments/spkg-configure.m4
+new file mode 100644
+index 00000000..99f29e3
+--- /dev/null
++++ b/build/pkgs/pygments/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pygments], [SAGE_PYTHON_PACKAGE_CHECK([pygments])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f787c233aa05d8e90f7c6ad18f76bd2fa36bfbfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:48:50 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for jinja2.
+
+---
+ build/pkgs/jinja2/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jinja2/spkg-configure.m4
+
+diff --git a/build/pkgs/jinja2/spkg-configure.m4 b/build/pkgs/jinja2/spkg-configure.m4
+new file mode 100644
+index 00000000..0970d1c
+--- /dev/null
++++ b/build/pkgs/jinja2/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jinja2], [SAGE_PYTHON_PACKAGE_CHECK([jinja2])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 309d8f8e2b7078b5efbbe824b69ec1d9b1e639f0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:43:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pandocfilters.
+
+---
+ build/pkgs/pandocfilters/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/pandocfilters/spkg-configure.m4
+
+diff --git a/build/pkgs/pandocfilters/spkg-configure.m4 b/build/pkgs/pandocfilters/spkg-configure.m4
+new file mode 100644
+index 00000000..3e9537f
+--- /dev/null
++++ b/build/pkgs/pandocfilters/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([pandocfilters], [
++  SAGE_PYTHON_PACKAGE_CHECK([pandocfilters])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f57bfda49777a6ba1cd123553acd75dc347c5521 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:44:46 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for webencodings.
+
+---
+ build/pkgs/webencodings/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/webencodings/spkg-configure.m4
+
+diff --git a/build/pkgs/webencodings/spkg-configure.m4 b/build/pkgs/webencodings/spkg-configure.m4
+new file mode 100644
+index 00000000..1b9a5c4
+--- /dev/null
++++ b/build/pkgs/webencodings/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([webencodings], [
++  SAGE_PYTHON_PACKAGE_CHECK([webencodings])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7f193a62d7a2ea0b6a3ca6beb12390d91c25bbfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:48:26 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pytz.
+
+---
+ build/pkgs/pytz/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pytz/spkg-configure.m4
+
+diff --git a/build/pkgs/pytz/spkg-configure.m4 b/build/pkgs/pytz/spkg-configure.m4
+new file mode 100644
+index 00000000..366521b
+--- /dev/null
++++ b/build/pkgs/pytz/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pytz], [SAGE_PYTHON_PACKAGE_CHECK([pytz])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bfd3fdd887c3465c03465248de4997eed4a82915 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:51:16 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for texttable.
+
+---
+ build/pkgs/texttable/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/texttable/spkg-configure.m4
+
+diff --git a/build/pkgs/texttable/spkg-configure.m4 b/build/pkgs/texttable/spkg-configure.m4
+new file mode 100644
+index 00000000..42a3de1
+--- /dev/null
++++ b/build/pkgs/texttable/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([texttable], [SAGE_PYTHON_PACKAGE_CHECK([texttable])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 914bf0cc57abc46129b27c1525782dbe16da31a2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:53:41 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for babel.
+
+---
+ build/pkgs/babel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/babel/spkg-configure.m4
+
+diff --git a/build/pkgs/babel/spkg-configure.m4 b/build/pkgs/babel/spkg-configure.m4
+new file mode 100644
+index 00000000..d7b9a71
+--- /dev/null
++++ b/build/pkgs/babel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([babel], [SAGE_PYTHON_PACKAGE_CHECK([babel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 56977abd1eafbc87c765a2892cfe525382648259 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 14 Oct 2021 08:06:59 -0400
+Subject: Trac #29665: force system python3 with --enable-system-site-packages.
+
+When the python SPKG is used, the --enable-system-site-packages flag
+will essentially do nothing, and that may confuse users who have
+wasted a few hours building sage. (Generally, they will want to fix
+detection of their system python3 first.)
+
+To forestall that, we now set "--with-system-python3=force" whenever
+the "--enable-system-site-packages" flag is passed.
+---
+ configure.ac | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index db30a91..6fafb83 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -438,10 +438,19 @@ AC_ARG_ENABLE([download-from-upstream-url],
+ AC_ARG_ENABLE(
+   [system-site-packages], [AS_HELP_STRING(
+     [--enable-system-site-packages],
+-    [allow sage to use python packages from the system (experimental; default: no)]
++    [allow the use of python packages from the system (experimental; default: no)]
+   )], [
+   AS_IF([test "x$enable_system_site_packages" = "xyes"], [
+     SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
++
++    dnl We want to raise an error if the user asked for "system site
++    dnl packages" but the system python will not be used. Technically
++    dnl that causes no problems (SAGE_PYTHON_PACKAGE_CHECK always fails,
++    dnl so SPKGs are used for all python packages), but it may be confusing
++    dnl to end users who expect the flag to actually give them access to
++    dnl their system python packages and who may not be paying close
++    dnl attention to their ./configure output.
++    with_system_python3="force"
+   ])
+ ])
+ AC_SUBST([SAGE_VENV_FLAGS])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 02b369fd24ef7cf8997082e7850b9cf022cae34b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 01:18:35 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for setuptools.
+
+---
+ build/pkgs/setuptools/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/setuptools/spkg-configure.m4
+
+diff --git a/build/pkgs/setuptools/spkg-configure.m4 b/build/pkgs/setuptools/spkg-configure.m4
+new file mode 100644
+index 00000000..a2ad811
+--- /dev/null
++++ b/build/pkgs/setuptools/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([setuptools], [SAGE_PYTHON_PACKAGE_CHECK([setuptools])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 05117317d38693978efaf36e81d8b02bae44b257 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 01:15:48 -0400
+Subject: Trac #29665: poison PYTHONUSERBASE when testing for "system"
+ packages.
+
+When we're detecting system installations of python packages, we want
+to hide anything that was installed with e.g. "pip install --user". To
+accomplish that, we mimic the PYTHONUSERBASE poisoning from sage-env
+within the SAGE_PYTHON_PACKAGE_CHECK() macro.
+---
+ m4/sage_python_package_check.m4 | 18 +++++++++++++++++-
+ 1 file changed, 17 insertions(+), 1 deletion(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 77b0a0c..b8cdba4 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -38,11 +38,27 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     dnl package.
+     SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
+     AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++
++    dnl To prevent user-site (pip install --user) packages from being
++    dnl detected as "system" packages, we poison PYTHONUSERBASE. The
++    dnl sage-env script also does this at runtime; we mimic that
++    dnl implementation to ensure that the behaviors at ./configure and
++    dnl runtime are identical. Beware that (as in sage-env) the poisoning
++    dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
++    dnl user points PYTHONUSERBASE to any path (even the default), then
++    dnl his local pip packages will be detected.
++    PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
++    AS_IF([test -z "${PYTHONUSERBASE}"], [
++      PYTHONUSERBASE="${HOME}/.sage/local"
++    ])
++
+     AS_IF(
+-      ["${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())"],
++      [PYTHONUSERBASE="${PYTHONUSERBASE}" "${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" 2>/dev/null],
+       [AC_MSG_RESULT(yes)],
+       [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+     )
++
++    PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d75c1492f63a584b5ec5f424ddd7f7c4a6d502d3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:20:04 -0400
+Subject: Trac #29665: run SAGE_PYTHON_PACKAGE_CHECK() inside a venv.
+
+To recreate the runtime environment as closely as possible, we now use
+a venv (with system site packages enabled) when checking for system
+copies of python packages.
+---
+ m4/sage_python_package_check.m4 | 76 +++++++++++++++++++++++++++--------------
+ 1 file changed, 51 insertions(+), 25 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index b8cdba4..7cbd6c0 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -15,9 +15,11 @@
+ #
+ #     2. If we are not using the system python (no $PYTHON_FOR_VENV),
+ #
+-#     3. If setuptools is not available to the system python,
++#     3. If we are unable to create a venv with the system python,
+ #
+-#     4. If the contents of install-requires.txt are not met (wrong
++#     4. If setuptools is not available to the system python,
++#
++#     5. If the contents of install-requires.txt are not met (wrong
+ #        version, no version, etc.) by the system python.
+ #
+ #   In any of those cases, we set sage_spkg_install_$package to "yes"
+@@ -27,38 +29,62 @@
+ #
+ #   The SAGE_SPKG_CONFIGURE_PYTHON3() macro is AC_REQUIRE'd to ensure
+ #   that $PYTHON_FOR_VENV is available, if it is going to be available.
++#   The check is run inside a new venv, and with the PYTHONUSERBASE
++#   variable poisoned in the same manner as sage-env poisons it, to
++#   ensure that the ./configure- and run-time views of the system
++#   are as similar as possible.
+ #
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
+     AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
+ 
+-    dnl strip all comments from install-requires.txt; this should leave
+-    dnl only a single line containing the version specification for this
+-    dnl package.
+-    SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
+-    AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++    dnl We run this check inside a python venv, because that's ultimately
++    dnl how the system $PYTHON_FOR_VENV will be used.
++    AC_MSG_CHECKING([if we can create a python venv in config.venv])
+ 
+-    dnl To prevent user-site (pip install --user) packages from being
+-    dnl detected as "system" packages, we poison PYTHONUSERBASE. The
+-    dnl sage-env script also does this at runtime; we mimic that
+-    dnl implementation to ensure that the behaviors at ./configure and
+-    dnl runtime are identical. Beware that (as in sage-env) the poisoning
+-    dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
+-    dnl user points PYTHONUSERBASE to any path (even the default), then
+-    dnl his local pip packages will be detected.
+-    PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
+-    AS_IF([test -z "${PYTHONUSERBASE}"], [
+-      PYTHONUSERBASE="${HOME}/.sage/local"
+-    ])
++    dnl Use --clear because ./configure typically clobbers its output files.
++    AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
++                                        --clear                dnl
++                                        --without-pip          dnl
++					config.venv], [
++      AC_MSG_RESULT(yes)
++      dnl strip all comments from install-requires.txt; this should leave
++      dnl only a single line containing the version specification for this
++      dnl package.
++      SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
++      AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++
++      dnl To prevent user-site (pip install --user) packages from being
++      dnl detected as "system" packages, we poison PYTHONUSERBASE. The
++      dnl sage-env script also does this at runtime; we mimic that
++      dnl implementation to ensure that the behaviors at ./configure and
++      dnl runtime are identical. Beware that (as in sage-env) the poisoning
++      dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
++      dnl user points PYTHONUSERBASE to any path (even the default), then
++      dnl his local pip packages will be detected.
++      PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
++      AS_IF([test -z "${PYTHONUSERBASE}"], [
++        PYTHONUSERBASE="${HOME}/.sage/local"
++      ])
+ 
+-    AS_IF(
+-      [PYTHONUSERBASE="${PYTHONUSERBASE}" "${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" 2>/dev/null],
+-      [AC_MSG_RESULT(yes)],
+-      [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+-    )
++      AS_IF(
++        [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
++           "from setuptools.version import pkg_resources;              dnl
++            pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" dnl
++	 2>/dev/null],
++        [AC_MSG_RESULT(yes)],
++        [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
++      )
++
++      PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
++    ], [
++      dnl failed to create a venv for some reason
++      AC_MSG_RESULT(no)
++      sage_spkg_install_$1=yes
++    ])
+ 
+-    PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
++    rm -rf config.venv
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 87646c3264a04ffd98a12d67074f93e1943a1e96 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:38:08 -0400
+Subject: Trac #29665: log SAGE_PYTHON_PACKAGE_CHECK() failures to config.log.
+
+---
+ m4/sage_python_package_check.m4 | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 7cbd6c0..e0e0b9f 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -47,7 +47,8 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
+                                         --clear                dnl
+                                         --without-pip          dnl
+-					config.venv], [
++                                        config.venv            dnl
++                                        2>&AS_MESSAGE_LOG_FD], [
+       AC_MSG_RESULT(yes)
+       dnl strip all comments from install-requires.txt; this should leave
+       dnl only a single line containing the version specification for this
+@@ -72,7 +73,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+         [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
+            "from setuptools.version import pkg_resources;              dnl
+             pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" dnl
+-	 2>/dev/null],
++	 2>&AS_MESSAGE_LOG_FD],
+         [AC_MSG_RESULT(yes)],
+         [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+       )
+-- 
+cgit v1.0-1-gd88e
+
+
+From f7dfffd1c64816e2ae4e0f420b22065c5c5bf2cb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:45:37 -0400
+Subject: Trac #29665: don't clobber a plain file named config.venv.
+
+When SAGE_PYTHON_PACKAGE_CHECK() is cleaning up, we no longer remove
+"config.venv" unconditionally. Instead, we remove it only if it is a
+directory. This is also how "pyvenv --clear" works.
+---
+ m4/sage_python_package_check.m4 | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index e0e0b9f..127a078 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -85,7 +85,9 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+       sage_spkg_install_$1=yes
+     ])
+ 
+-    rm -rf config.venv
++    dnl Clean up config.venv, but only if we could have created it.
++    dnl (The --clear flag to pyvenv will not clobber a plain file.)
++    AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9849c77313b895dcfb786d2ea54e36585bd31ce2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 16 Oct 2021 08:14:42 -0400
+Subject: Trac #29665: don't announce system python packages that won't be
+ used.
+
+When --enable-system-site-packages was not given, the python packages
+using SAGE_PYTHON_PACKAGE_CHECK() in spkg-configure.m4 cannot be used.
+Rather than suggest that users install them anyway, that macro now
+hacks the value of sage_use_system_$package to be "no" when the use
+of system site packages is disabled at the python level.
+---
+ m4/sage_python_package_check.m4 | 17 +++++++++++++++++
+ 1 file changed, 17 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 127a078..7ee82a7 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -89,6 +89,23 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     dnl (The --clear flag to pyvenv will not clobber a plain file.)
+     AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
++    dnl System site packages are disabled.
+     sage_spkg_install_$1=yes
++
++    dnl We have to retroactively hack the --with-system-foo={no,yes,force}
++    dnl mechanism here because it wasn't designed with the ability to
++    dnl disable arbitrary chunks of system packages in mind. The easy cases
++    dnl are "no" and "force" which require no action; "no" means we won't
++    dnl suggest the package anyway, and "force" will raise an error when
++    dnl the system-package check fails.
++    dnl
++    dnl The default of "yes" is more troubling because it is the default. To
++    dnl avoid prompting users to install packages that won't be used, we want
++    dnl to ignore "yes" when reporting the "hint: install these packages..."
++    dnl at the end of ./configure. To accomplish that, we change "yes" to
++    dnl "no" here, essentially changing the default for packages using this
++    dnl macro when --enable-system-site-packages is disabled. Packages with
++    dnl "no" are not suggested to the user.
++    AS_IF([test "${sage_use_system_$1}" = "yes"],[sage_use_system_$1=no])
+   ])
+ ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3e6ad737b94aaac234d615ecaf1a2455eb607f1a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 17 Oct 2021 06:16:21 -0400
+Subject: Trac #29665: add Gentoo package information for python packages.
+
+---
+ build/pkgs/babel/distros/gentoo.txt         | 1 +
+ build/pkgs/bleach/distros/gentoo.txt        | 1 +
+ build/pkgs/certifi/distros/gentoo.txt       | 1 +
+ build/pkgs/cvxopt/distros/gentoo.txt        | 1 +
+ build/pkgs/decorator/distros/gentoo.txt     | 1 +
+ build/pkgs/html5lib/distros/gentoo.txt      | 1 +
+ build/pkgs/idna/distros/gentoo.txt          | 1 +
+ build/pkgs/jinja2/distros/gentoo.txt        | 1 +
+ build/pkgs/matplotlib/distros/gentoo.txt    | 1 +
+ build/pkgs/mpmath/distros/gentoo.txt        | 1 +
+ build/pkgs/networkx/distros/gentoo.txt      | 1 +
+ build/pkgs/numpy/distros/gentoo.txt         | 1 +
+ build/pkgs/packaging/distros/gentoo.txt     | 1 +
+ build/pkgs/pandocfilters/distros/gentoo.txt | 1 +
+ build/pkgs/pickleshare/distros/gentoo.txt   | 1 +
+ build/pkgs/pillow/distros/gentoo.txt        | 1 +
+ build/pkgs/pluggy/distros/gentoo.txt        | 1 +
+ build/pkgs/pygments/distros/gentoo.txt      | 1 +
+ build/pkgs/pytz/distros/gentoo.txt          | 1 +
+ build/pkgs/pyzmq/distros/gentoo.txt         | 1 +
+ build/pkgs/requests/distros/gentoo.txt      | 1 +
+ build/pkgs/scipy/distros/gentoo.txt         | 1 +
+ build/pkgs/setuptools/distros/gentoo.txt    | 1 +
+ build/pkgs/six/distros/gentoo.txt           | 1 +
+ build/pkgs/sympy/distros/gentoo.txt         | 1 +
+ build/pkgs/texttable/distros/gentoo.txt     | 1 +
+ build/pkgs/toml/distros/gentoo.txt          | 1 +
+ build/pkgs/webencodings/distros/gentoo.txt  | 1 +
+ 28 files changed, 28 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/gentoo.txt
+ create mode 100644 build/pkgs/bleach/distros/gentoo.txt
+ create mode 100644 build/pkgs/certifi/distros/gentoo.txt
+ create mode 100644 build/pkgs/cvxopt/distros/gentoo.txt
+ create mode 100644 build/pkgs/decorator/distros/gentoo.txt
+ create mode 100644 build/pkgs/html5lib/distros/gentoo.txt
+ create mode 100644 build/pkgs/idna/distros/gentoo.txt
+ create mode 100644 build/pkgs/jinja2/distros/gentoo.txt
+ create mode 100644 build/pkgs/matplotlib/distros/gentoo.txt
+ create mode 100644 build/pkgs/mpmath/distros/gentoo.txt
+ create mode 100644 build/pkgs/networkx/distros/gentoo.txt
+ create mode 100644 build/pkgs/numpy/distros/gentoo.txt
+ create mode 100644 build/pkgs/packaging/distros/gentoo.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/gentoo.txt
+ create mode 100644 build/pkgs/pickleshare/distros/gentoo.txt
+ create mode 100644 build/pkgs/pillow/distros/gentoo.txt
+ create mode 100644 build/pkgs/pluggy/distros/gentoo.txt
+ create mode 100644 build/pkgs/pygments/distros/gentoo.txt
+ create mode 100644 build/pkgs/pytz/distros/gentoo.txt
+ create mode 100644 build/pkgs/pyzmq/distros/gentoo.txt
+ create mode 100644 build/pkgs/requests/distros/gentoo.txt
+ create mode 100644 build/pkgs/scipy/distros/gentoo.txt
+ create mode 100644 build/pkgs/setuptools/distros/gentoo.txt
+ create mode 100644 build/pkgs/six/distros/gentoo.txt
+ create mode 100644 build/pkgs/sympy/distros/gentoo.txt
+ create mode 100644 build/pkgs/texttable/distros/gentoo.txt
+ create mode 100644 build/pkgs/toml/distros/gentoo.txt
+ create mode 100644 build/pkgs/webencodings/distros/gentoo.txt
+
+diff --git a/build/pkgs/babel/distros/gentoo.txt b/build/pkgs/babel/distros/gentoo.txt
+new file mode 100644
+index 00000000..2d2c34f
+--- /dev/null
++++ b/build/pkgs/babel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/Babel
+diff --git a/build/pkgs/bleach/distros/gentoo.txt b/build/pkgs/bleach/distros/gentoo.txt
+new file mode 100644
+index 00000000..b4f9744
+--- /dev/null
++++ b/build/pkgs/bleach/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/bleach
+diff --git a/build/pkgs/certifi/distros/gentoo.txt b/build/pkgs/certifi/distros/gentoo.txt
+new file mode 100644
+index 00000000..72e2e91
+--- /dev/null
++++ b/build/pkgs/certifi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/certifi
+diff --git a/build/pkgs/cvxopt/distros/gentoo.txt b/build/pkgs/cvxopt/distros/gentoo.txt
+new file mode 100644
+index 00000000..b312391
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/cvxopt
+diff --git a/build/pkgs/decorator/distros/gentoo.txt b/build/pkgs/decorator/distros/gentoo.txt
+new file mode 100644
+index 00000000..fea5a67
+--- /dev/null
++++ b/build/pkgs/decorator/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/decorator
+diff --git a/build/pkgs/html5lib/distros/gentoo.txt b/build/pkgs/html5lib/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c2be76
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/html5lib
+diff --git a/build/pkgs/idna/distros/gentoo.txt b/build/pkgs/idna/distros/gentoo.txt
+new file mode 100644
+index 00000000..68ef51c
+--- /dev/null
++++ b/build/pkgs/idna/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/idna
+diff --git a/build/pkgs/jinja2/distros/gentoo.txt b/build/pkgs/jinja2/distros/gentoo.txt
+new file mode 100644
+index 00000000..15a27ae
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jinja
+diff --git a/build/pkgs/matplotlib/distros/gentoo.txt b/build/pkgs/matplotlib/distros/gentoo.txt
+new file mode 100644
+index 00000000..bcfefb5
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/matplotlib
+diff --git a/build/pkgs/mpmath/distros/gentoo.txt b/build/pkgs/mpmath/distros/gentoo.txt
+new file mode 100644
+index 00000000..946c62d
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/mpmath
+diff --git a/build/pkgs/networkx/distros/gentoo.txt b/build/pkgs/networkx/distros/gentoo.txt
+new file mode 100644
+index 00000000..dd97742
+--- /dev/null
++++ b/build/pkgs/networkx/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/networkx
+diff --git a/build/pkgs/numpy/distros/gentoo.txt b/build/pkgs/numpy/distros/gentoo.txt
+new file mode 100644
+index 00000000..d2179d4
+--- /dev/null
++++ b/build/pkgs/numpy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/numpy
+diff --git a/build/pkgs/packaging/distros/gentoo.txt b/build/pkgs/packaging/distros/gentoo.txt
+new file mode 100644
+index 00000000..e5309ed
+--- /dev/null
++++ b/build/pkgs/packaging/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/packaging
+diff --git a/build/pkgs/pandocfilters/distros/gentoo.txt b/build/pkgs/pandocfilters/distros/gentoo.txt
+new file mode 100644
+index 00000000..a726fda
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/gentoo.txt b/build/pkgs/pickleshare/distros/gentoo.txt
+new file mode 100644
+index 00000000..14fad0f
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pickleshare
+diff --git a/build/pkgs/pillow/distros/gentoo.txt b/build/pkgs/pillow/distros/gentoo.txt
+new file mode 100644
+index 00000000..1243649
+--- /dev/null
++++ b/build/pkgs/pillow/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pillow
+diff --git a/build/pkgs/pluggy/distros/gentoo.txt b/build/pkgs/pluggy/distros/gentoo.txt
+new file mode 100644
+index 00000000..7b33876
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pluggy
+diff --git a/build/pkgs/pygments/distros/gentoo.txt b/build/pkgs/pygments/distros/gentoo.txt
+new file mode 100644
+index 00000000..a584f32
+--- /dev/null
++++ b/build/pkgs/pygments/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pygments
+diff --git a/build/pkgs/pytz/distros/gentoo.txt b/build/pkgs/pytz/distros/gentoo.txt
+new file mode 100644
+index 00000000..902a18b
+--- /dev/null
++++ b/build/pkgs/pytz/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pytz
+diff --git a/build/pkgs/pyzmq/distros/gentoo.txt b/build/pkgs/pyzmq/distros/gentoo.txt
+new file mode 100644
+index 00000000..77c2429
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyzmq
+diff --git a/build/pkgs/requests/distros/gentoo.txt b/build/pkgs/requests/distros/gentoo.txt
+new file mode 100644
+index 00000000..d3dc941
+--- /dev/null
++++ b/build/pkgs/requests/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/requests
+diff --git a/build/pkgs/scipy/distros/gentoo.txt b/build/pkgs/scipy/distros/gentoo.txt
+new file mode 100644
+index 00000000..11dabd2
+--- /dev/null
++++ b/build/pkgs/scipy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/scipy
+diff --git a/build/pkgs/setuptools/distros/gentoo.txt b/build/pkgs/setuptools/distros/gentoo.txt
+new file mode 100644
+index 00000000..3a4fa34
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/setuptools
+diff --git a/build/pkgs/six/distros/gentoo.txt b/build/pkgs/six/distros/gentoo.txt
+new file mode 100644
+index 00000000..f73f648
+--- /dev/null
++++ b/build/pkgs/six/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/six
+diff --git a/build/pkgs/sympy/distros/gentoo.txt b/build/pkgs/sympy/distros/gentoo.txt
+new file mode 100644
+index 00000000..b5a5034
+--- /dev/null
++++ b/build/pkgs/sympy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sympy
+diff --git a/build/pkgs/texttable/distros/gentoo.txt b/build/pkgs/texttable/distros/gentoo.txt
+new file mode 100644
+index 00000000..b33a7a7
+--- /dev/null
++++ b/build/pkgs/texttable/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/texttable
+diff --git a/build/pkgs/toml/distros/gentoo.txt b/build/pkgs/toml/distros/gentoo.txt
+new file mode 100644
+index 00000000..64fcea3
+--- /dev/null
++++ b/build/pkgs/toml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/toml
+diff --git a/build/pkgs/webencodings/distros/gentoo.txt b/build/pkgs/webencodings/distros/gentoo.txt
+new file mode 100644
+index 00000000..7539b0f
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/webencodings
+-- 
+cgit v1.0-1-gd88e
+
+
+From 088380f884124c9608160b613ba031c5f023f604 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 18:43:04 -0700
+Subject: build/pkgs: Add distros/fedora.txt for Python packages
+
+---
+ build/pkgs/babel/distros/fedora.txt         | 1 +
+ build/pkgs/bleach/distros/fedora.txt        | 1 +
+ build/pkgs/certifi/distros/fedora.txt       | 1 +
+ build/pkgs/cvxopt/distros/fedora.txt        | 1 +
+ build/pkgs/decorator/distros/fedora.txt     | 1 +
+ build/pkgs/html5lib/distros/fedora.txt      | 1 +
+ build/pkgs/idna/distros/fedora.txt          | 1 +
+ build/pkgs/jinja2/distros/fedora.txt        | 1 +
+ build/pkgs/matplotlib/distros/fedora.txt    | 1 +
+ build/pkgs/mpmath/distros/fedora.txt        | 1 +
+ build/pkgs/networkx/distros/fedora.txt      | 1 +
+ build/pkgs/numpy/distros/fedora.txt         | 1 +
+ build/pkgs/packaging/distros/fedora.txt     | 1 +
+ build/pkgs/pandocfilters/distros/fedora.txt | 1 +
+ build/pkgs/pickleshare/distros/fedora.txt   | 1 +
+ build/pkgs/pillow/distros/fedora.txt        | 1 +
+ build/pkgs/pluggy/distros/fedora.txt        | 1 +
+ build/pkgs/py/distros/fedora.txt            | 1 +
+ build/pkgs/pygments/distros/fedora.txt      | 1 +
+ build/pkgs/pytz/distros/fedora.txt          | 1 +
+ build/pkgs/pyzmq/distros/fedora.txt         | 1 +
+ build/pkgs/requests/distros/fedora.txt      | 1 +
+ build/pkgs/scipy/distros/fedora.txt         | 1 +
+ build/pkgs/setuptools/distros/fedora.txt    | 1 +
+ build/pkgs/six/distros/fedora.txt           | 1 +
+ build/pkgs/sympy/distros/fedora.txt         | 1 +
+ build/pkgs/texttable/distros/fedora.txt     | 1 +
+ build/pkgs/toml/distros/fedora.txt          | 1 +
+ build/pkgs/webencodings/distros/fedora.txt  | 1 +
+ build/pkgs/wheel/distros/fedora.txt         | 1 +
+ 30 files changed, 30 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/fedora.txt
+ create mode 100644 build/pkgs/bleach/distros/fedora.txt
+ create mode 100644 build/pkgs/certifi/distros/fedora.txt
+ create mode 100644 build/pkgs/cvxopt/distros/fedora.txt
+ create mode 100644 build/pkgs/decorator/distros/fedora.txt
+ create mode 100644 build/pkgs/html5lib/distros/fedora.txt
+ create mode 100644 build/pkgs/idna/distros/fedora.txt
+ create mode 100644 build/pkgs/jinja2/distros/fedora.txt
+ create mode 100644 build/pkgs/matplotlib/distros/fedora.txt
+ create mode 100644 build/pkgs/mpmath/distros/fedora.txt
+ create mode 100644 build/pkgs/networkx/distros/fedora.txt
+ create mode 100644 build/pkgs/numpy/distros/fedora.txt
+ create mode 100644 build/pkgs/packaging/distros/fedora.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/fedora.txt
+ create mode 100644 build/pkgs/pickleshare/distros/fedora.txt
+ create mode 100644 build/pkgs/pillow/distros/fedora.txt
+ create mode 100644 build/pkgs/pluggy/distros/fedora.txt
+ create mode 100644 build/pkgs/py/distros/fedora.txt
+ create mode 100644 build/pkgs/pygments/distros/fedora.txt
+ create mode 100644 build/pkgs/pytz/distros/fedora.txt
+ create mode 100644 build/pkgs/pyzmq/distros/fedora.txt
+ create mode 100644 build/pkgs/requests/distros/fedora.txt
+ create mode 100644 build/pkgs/scipy/distros/fedora.txt
+ create mode 100644 build/pkgs/setuptools/distros/fedora.txt
+ create mode 100644 build/pkgs/six/distros/fedora.txt
+ create mode 100644 build/pkgs/sympy/distros/fedora.txt
+ create mode 100644 build/pkgs/texttable/distros/fedora.txt
+ create mode 100644 build/pkgs/toml/distros/fedora.txt
+ create mode 100644 build/pkgs/webencodings/distros/fedora.txt
+ create mode 100644 build/pkgs/wheel/distros/fedora.txt
+
+diff --git a/build/pkgs/babel/distros/fedora.txt b/build/pkgs/babel/distros/fedora.txt
+new file mode 100644
+index 00000000..98f6593
+--- /dev/null
++++ b/build/pkgs/babel/distros/fedora.txt
+@@ -0,0 +1 @@
++babel
+diff --git a/build/pkgs/bleach/distros/fedora.txt b/build/pkgs/bleach/distros/fedora.txt
+new file mode 100644
+index 00000000..c5422cc
+--- /dev/null
++++ b/build/pkgs/bleach/distros/fedora.txt
+@@ -0,0 +1 @@
++python-bleach
+diff --git a/build/pkgs/certifi/distros/fedora.txt b/build/pkgs/certifi/distros/fedora.txt
+new file mode 100644
+index 00000000..be421c8
+--- /dev/null
++++ b/build/pkgs/certifi/distros/fedora.txt
+@@ -0,0 +1 @@
++python-certifi
+diff --git a/build/pkgs/cvxopt/distros/fedora.txt b/build/pkgs/cvxopt/distros/fedora.txt
+new file mode 100644
+index 00000000..f15770f
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/fedora.txt
+@@ -0,0 +1 @@
++python-cvxopt
+diff --git a/build/pkgs/decorator/distros/fedora.txt b/build/pkgs/decorator/distros/fedora.txt
+new file mode 100644
+index 00000000..0795604
+--- /dev/null
++++ b/build/pkgs/decorator/distros/fedora.txt
+@@ -0,0 +1 @@
++python-decorator
+diff --git a/build/pkgs/html5lib/distros/fedora.txt b/build/pkgs/html5lib/distros/fedora.txt
+new file mode 100644
+index 00000000..b821491
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/fedora.txt
+@@ -0,0 +1 @@
++python-html5lib
+diff --git a/build/pkgs/idna/distros/fedora.txt b/build/pkgs/idna/distros/fedora.txt
+new file mode 100644
+index 00000000..a73e70c
+--- /dev/null
++++ b/build/pkgs/idna/distros/fedora.txt
+@@ -0,0 +1 @@
++python-idna
+diff --git a/build/pkgs/jinja2/distros/fedora.txt b/build/pkgs/jinja2/distros/fedora.txt
+new file mode 100644
+index 00000000..f5f3caf
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/fedora.txt
+@@ -0,0 +1 @@
++python-jinja2
+diff --git a/build/pkgs/matplotlib/distros/fedora.txt b/build/pkgs/matplotlib/distros/fedora.txt
+new file mode 100644
+index 00000000..f6d856e
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/fedora.txt
+@@ -0,0 +1 @@
++python-matplotlib
+diff --git a/build/pkgs/mpmath/distros/fedora.txt b/build/pkgs/mpmath/distros/fedora.txt
+new file mode 100644
+index 00000000..a7dc8d5
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/fedora.txt
+@@ -0,0 +1 @@
++python-mpmath
+diff --git a/build/pkgs/networkx/distros/fedora.txt b/build/pkgs/networkx/distros/fedora.txt
+new file mode 100644
+index 00000000..293f943
+--- /dev/null
++++ b/build/pkgs/networkx/distros/fedora.txt
+@@ -0,0 +1 @@
++python-networkx
+diff --git a/build/pkgs/numpy/distros/fedora.txt b/build/pkgs/numpy/distros/fedora.txt
+new file mode 100644
+index 00000000..c8722b9
+--- /dev/null
++++ b/build/pkgs/numpy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-numpy
+diff --git a/build/pkgs/packaging/distros/fedora.txt b/build/pkgs/packaging/distros/fedora.txt
+new file mode 100644
+index 00000000..02ad855
+--- /dev/null
++++ b/build/pkgs/packaging/distros/fedora.txt
+@@ -0,0 +1 @@
++python-packaging
+diff --git a/build/pkgs/pandocfilters/distros/fedora.txt b/build/pkgs/pandocfilters/distros/fedora.txt
+new file mode 100644
+index 00000000..e7a86d0
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/fedora.txt b/build/pkgs/pickleshare/distros/fedora.txt
+new file mode 100644
+index 00000000..6d991a2
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pickleshare
+diff --git a/build/pkgs/pillow/distros/fedora.txt b/build/pkgs/pillow/distros/fedora.txt
+new file mode 100644
+index 00000000..86dbb1d
+--- /dev/null
++++ b/build/pkgs/pillow/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pillow
+diff --git a/build/pkgs/pluggy/distros/fedora.txt b/build/pkgs/pluggy/distros/fedora.txt
+new file mode 100644
+index 00000000..c869e54
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pluggy
+diff --git a/build/pkgs/py/distros/fedora.txt b/build/pkgs/py/distros/fedora.txt
+new file mode 100644
+index 00000000..b348d39
+--- /dev/null
++++ b/build/pkgs/py/distros/fedora.txt
+@@ -0,0 +1 @@
++python-py
+diff --git a/build/pkgs/pygments/distros/fedora.txt b/build/pkgs/pygments/distros/fedora.txt
+new file mode 100644
+index 00000000..f3e72a8
+--- /dev/null
++++ b/build/pkgs/pygments/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pygments
+diff --git a/build/pkgs/pytz/distros/fedora.txt b/build/pkgs/pytz/distros/fedora.txt
+new file mode 100644
+index 00000000..2cccc9e
+--- /dev/null
++++ b/build/pkgs/pytz/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pytz
+diff --git a/build/pkgs/pyzmq/distros/fedora.txt b/build/pkgs/pyzmq/distros/fedora.txt
+new file mode 100644
+index 00000000..23f64d1
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pyzmq
+diff --git a/build/pkgs/requests/distros/fedora.txt b/build/pkgs/requests/distros/fedora.txt
+new file mode 100644
+index 00000000..93a7bc1
+--- /dev/null
++++ b/build/pkgs/requests/distros/fedora.txt
+@@ -0,0 +1 @@
++python-requests
+diff --git a/build/pkgs/scipy/distros/fedora.txt b/build/pkgs/scipy/distros/fedora.txt
+new file mode 100644
+index 00000000..7ff2882
+--- /dev/null
++++ b/build/pkgs/scipy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-scipy
+diff --git a/build/pkgs/setuptools/distros/fedora.txt b/build/pkgs/setuptools/distros/fedora.txt
+new file mode 100644
+index 00000000..e1ad178
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/fedora.txt
+@@ -0,0 +1 @@
++python-setuptools
+diff --git a/build/pkgs/six/distros/fedora.txt b/build/pkgs/six/distros/fedora.txt
+new file mode 100644
+index 00000000..787c530
+--- /dev/null
++++ b/build/pkgs/six/distros/fedora.txt
+@@ -0,0 +1 @@
++python-six
+diff --git a/build/pkgs/sympy/distros/fedora.txt b/build/pkgs/sympy/distros/fedora.txt
+new file mode 100644
+index 00000000..126c88a
+--- /dev/null
++++ b/build/pkgs/sympy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-sympy
+diff --git a/build/pkgs/texttable/distros/fedora.txt b/build/pkgs/texttable/distros/fedora.txt
+new file mode 100644
+index 00000000..8d1ccec
+--- /dev/null
++++ b/build/pkgs/texttable/distros/fedora.txt
+@@ -0,0 +1 @@
++python-texttable
+diff --git a/build/pkgs/toml/distros/fedora.txt b/build/pkgs/toml/distros/fedora.txt
+new file mode 100644
+index 00000000..821ee77
+--- /dev/null
++++ b/build/pkgs/toml/distros/fedora.txt
+@@ -0,0 +1 @@
++python-toml
+diff --git a/build/pkgs/webencodings/distros/fedora.txt b/build/pkgs/webencodings/distros/fedora.txt
+new file mode 100644
+index 00000000..12ddba9
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/fedora.txt
+@@ -0,0 +1 @@
++python-webencodings
+diff --git a/build/pkgs/wheel/distros/fedora.txt b/build/pkgs/wheel/distros/fedora.txt
+new file mode 100644
+index 00000000..ae4cbb9
+--- /dev/null
++++ b/build/pkgs/wheel/distros/fedora.txt
+@@ -0,0 +1 @@
++python-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From ad1d5a20380b147c774903066031442f31094626 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 21:04:04 -0700
+Subject: build/pkgs: Add distros/arch.txt for Python packages
+
+---
+ build/pkgs/babel/distros/arch.txt         | 1 +
+ build/pkgs/bleach/distros/arch.txt        | 1 +
+ build/pkgs/certifi/distros/arch.txt       | 1 +
+ build/pkgs/cvxopt/distros/arch.txt        | 1 +
+ build/pkgs/decorator/distros/arch.txt     | 1 +
+ build/pkgs/html5lib/distros/arch.txt      | 1 +
+ build/pkgs/idna/distros/arch.txt          | 1 +
+ build/pkgs/matplotlib/distros/arch.txt    | 1 +
+ build/pkgs/mpmath/distros/arch.txt        | 1 +
+ build/pkgs/networkx/distros/arch.txt      | 1 +
+ build/pkgs/numpy/distros/arch.txt         | 1 +
+ build/pkgs/packaging/distros/arch.txt     | 1 +
+ build/pkgs/pandocfilters/distros/arch.txt | 1 +
+ build/pkgs/pickleshare/distros/arch.txt   | 1 +
+ build/pkgs/pillow/distros/arch.txt        | 1 +
+ build/pkgs/pluggy/distros/arch.txt        | 1 +
+ build/pkgs/py/distros/arch.txt            | 1 +
+ build/pkgs/pygments/distros/arch.txt      | 1 +
+ build/pkgs/pytz/distros/arch.txt          | 1 +
+ build/pkgs/pyzmq/distros/arch.txt         | 1 +
+ build/pkgs/requests/distros/arch.txt      | 1 +
+ build/pkgs/scipy/distros/arch.txt         | 1 +
+ build/pkgs/setuptools/distros/arch.txt    | 1 +
+ build/pkgs/six/distros/arch.txt           | 1 +
+ build/pkgs/sympy/distros/arch.txt         | 1 +
+ build/pkgs/texttable/distros/arch.txt     | 1 +
+ build/pkgs/toml/distros/arch.txt          | 1 +
+ build/pkgs/webencodings/distros/arch.txt  | 1 +
+ build/pkgs/wheel/distros/arch.txt         | 1 +
+ 29 files changed, 29 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/arch.txt
+ create mode 100644 build/pkgs/bleach/distros/arch.txt
+ create mode 100644 build/pkgs/certifi/distros/arch.txt
+ create mode 100644 build/pkgs/cvxopt/distros/arch.txt
+ create mode 100644 build/pkgs/decorator/distros/arch.txt
+ create mode 100644 build/pkgs/html5lib/distros/arch.txt
+ create mode 100644 build/pkgs/idna/distros/arch.txt
+ create mode 100644 build/pkgs/matplotlib/distros/arch.txt
+ create mode 100644 build/pkgs/mpmath/distros/arch.txt
+ create mode 100644 build/pkgs/networkx/distros/arch.txt
+ create mode 100644 build/pkgs/numpy/distros/arch.txt
+ create mode 100644 build/pkgs/packaging/distros/arch.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/arch.txt
+ create mode 100644 build/pkgs/pickleshare/distros/arch.txt
+ create mode 100644 build/pkgs/pillow/distros/arch.txt
+ create mode 100644 build/pkgs/pluggy/distros/arch.txt
+ create mode 100644 build/pkgs/py/distros/arch.txt
+ create mode 100644 build/pkgs/pygments/distros/arch.txt
+ create mode 100644 build/pkgs/pytz/distros/arch.txt
+ create mode 100644 build/pkgs/pyzmq/distros/arch.txt
+ create mode 100644 build/pkgs/requests/distros/arch.txt
+ create mode 100644 build/pkgs/scipy/distros/arch.txt
+ create mode 100644 build/pkgs/setuptools/distros/arch.txt
+ create mode 100644 build/pkgs/six/distros/arch.txt
+ create mode 100644 build/pkgs/sympy/distros/arch.txt
+ create mode 100644 build/pkgs/texttable/distros/arch.txt
+ create mode 100644 build/pkgs/toml/distros/arch.txt
+ create mode 100644 build/pkgs/webencodings/distros/arch.txt
+ create mode 100644 build/pkgs/wheel/distros/arch.txt
+
+diff --git a/build/pkgs/babel/distros/arch.txt b/build/pkgs/babel/distros/arch.txt
+new file mode 100644
+index 00000000..f2d828c
+--- /dev/null
++++ b/build/pkgs/babel/distros/arch.txt
+@@ -0,0 +1 @@
++python-babel
+diff --git a/build/pkgs/bleach/distros/arch.txt b/build/pkgs/bleach/distros/arch.txt
+new file mode 100644
+index 00000000..c5422cc
+--- /dev/null
++++ b/build/pkgs/bleach/distros/arch.txt
+@@ -0,0 +1 @@
++python-bleach
+diff --git a/build/pkgs/certifi/distros/arch.txt b/build/pkgs/certifi/distros/arch.txt
+new file mode 100644
+index 00000000..be421c8
+--- /dev/null
++++ b/build/pkgs/certifi/distros/arch.txt
+@@ -0,0 +1 @@
++python-certifi
+diff --git a/build/pkgs/cvxopt/distros/arch.txt b/build/pkgs/cvxopt/distros/arch.txt
+new file mode 100644
+index 00000000..f15770f
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/arch.txt
+@@ -0,0 +1 @@
++python-cvxopt
+diff --git a/build/pkgs/decorator/distros/arch.txt b/build/pkgs/decorator/distros/arch.txt
+new file mode 100644
+index 00000000..0795604
+--- /dev/null
++++ b/build/pkgs/decorator/distros/arch.txt
+@@ -0,0 +1 @@
++python-decorator
+diff --git a/build/pkgs/html5lib/distros/arch.txt b/build/pkgs/html5lib/distros/arch.txt
+new file mode 100644
+index 00000000..b821491
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/arch.txt
+@@ -0,0 +1 @@
++python-html5lib
+diff --git a/build/pkgs/idna/distros/arch.txt b/build/pkgs/idna/distros/arch.txt
+new file mode 100644
+index 00000000..a73e70c
+--- /dev/null
++++ b/build/pkgs/idna/distros/arch.txt
+@@ -0,0 +1 @@
++python-idna
+diff --git a/build/pkgs/matplotlib/distros/arch.txt b/build/pkgs/matplotlib/distros/arch.txt
+new file mode 100644
+index 00000000..f6d856e
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/arch.txt
+@@ -0,0 +1 @@
++python-matplotlib
+diff --git a/build/pkgs/mpmath/distros/arch.txt b/build/pkgs/mpmath/distros/arch.txt
+new file mode 100644
+index 00000000..a7dc8d5
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/arch.txt
+@@ -0,0 +1 @@
++python-mpmath
+diff --git a/build/pkgs/networkx/distros/arch.txt b/build/pkgs/networkx/distros/arch.txt
+new file mode 100644
+index 00000000..293f943
+--- /dev/null
++++ b/build/pkgs/networkx/distros/arch.txt
+@@ -0,0 +1 @@
++python-networkx
+diff --git a/build/pkgs/numpy/distros/arch.txt b/build/pkgs/numpy/distros/arch.txt
+new file mode 100644
+index 00000000..c8722b9
+--- /dev/null
++++ b/build/pkgs/numpy/distros/arch.txt
+@@ -0,0 +1 @@
++python-numpy
+diff --git a/build/pkgs/packaging/distros/arch.txt b/build/pkgs/packaging/distros/arch.txt
+new file mode 100644
+index 00000000..02ad855
+--- /dev/null
++++ b/build/pkgs/packaging/distros/arch.txt
+@@ -0,0 +1 @@
++python-packaging
+diff --git a/build/pkgs/pandocfilters/distros/arch.txt b/build/pkgs/pandocfilters/distros/arch.txt
+new file mode 100644
+index 00000000..e7a86d0
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/arch.txt
+@@ -0,0 +1 @@
++python-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/arch.txt b/build/pkgs/pickleshare/distros/arch.txt
+new file mode 100644
+index 00000000..6d991a2
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/arch.txt
+@@ -0,0 +1 @@
++python-pickleshare
+diff --git a/build/pkgs/pillow/distros/arch.txt b/build/pkgs/pillow/distros/arch.txt
+new file mode 100644
+index 00000000..86dbb1d
+--- /dev/null
++++ b/build/pkgs/pillow/distros/arch.txt
+@@ -0,0 +1 @@
++python-pillow
+diff --git a/build/pkgs/pluggy/distros/arch.txt b/build/pkgs/pluggy/distros/arch.txt
+new file mode 100644
+index 00000000..c869e54
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/arch.txt
+@@ -0,0 +1 @@
++python-pluggy
+diff --git a/build/pkgs/py/distros/arch.txt b/build/pkgs/py/distros/arch.txt
+new file mode 100644
+index 00000000..b348d39
+--- /dev/null
++++ b/build/pkgs/py/distros/arch.txt
+@@ -0,0 +1 @@
++python-py
+diff --git a/build/pkgs/pygments/distros/arch.txt b/build/pkgs/pygments/distros/arch.txt
+new file mode 100644
+index 00000000..f3e72a8
+--- /dev/null
++++ b/build/pkgs/pygments/distros/arch.txt
+@@ -0,0 +1 @@
++python-pygments
+diff --git a/build/pkgs/pytz/distros/arch.txt b/build/pkgs/pytz/distros/arch.txt
+new file mode 100644
+index 00000000..2cccc9e
+--- /dev/null
++++ b/build/pkgs/pytz/distros/arch.txt
+@@ -0,0 +1 @@
++python-pytz
+diff --git a/build/pkgs/pyzmq/distros/arch.txt b/build/pkgs/pyzmq/distros/arch.txt
+new file mode 100644
+index 00000000..23f64d1
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/arch.txt
+@@ -0,0 +1 @@
++python-pyzmq
+diff --git a/build/pkgs/requests/distros/arch.txt b/build/pkgs/requests/distros/arch.txt
+new file mode 100644
+index 00000000..93a7bc1
+--- /dev/null
++++ b/build/pkgs/requests/distros/arch.txt
+@@ -0,0 +1 @@
++python-requests
+diff --git a/build/pkgs/scipy/distros/arch.txt b/build/pkgs/scipy/distros/arch.txt
+new file mode 100644
+index 00000000..7ff2882
+--- /dev/null
++++ b/build/pkgs/scipy/distros/arch.txt
+@@ -0,0 +1 @@
++python-scipy
+diff --git a/build/pkgs/setuptools/distros/arch.txt b/build/pkgs/setuptools/distros/arch.txt
+new file mode 100644
+index 00000000..e1ad178
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/arch.txt
+@@ -0,0 +1 @@
++python-setuptools
+diff --git a/build/pkgs/six/distros/arch.txt b/build/pkgs/six/distros/arch.txt
+new file mode 100644
+index 00000000..787c530
+--- /dev/null
++++ b/build/pkgs/six/distros/arch.txt
+@@ -0,0 +1 @@
++python-six
+diff --git a/build/pkgs/sympy/distros/arch.txt b/build/pkgs/sympy/distros/arch.txt
+new file mode 100644
+index 00000000..126c88a
+--- /dev/null
++++ b/build/pkgs/sympy/distros/arch.txt
+@@ -0,0 +1 @@
++python-sympy
+diff --git a/build/pkgs/texttable/distros/arch.txt b/build/pkgs/texttable/distros/arch.txt
+new file mode 100644
+index 00000000..8d1ccec
+--- /dev/null
++++ b/build/pkgs/texttable/distros/arch.txt
+@@ -0,0 +1 @@
++python-texttable
+diff --git a/build/pkgs/toml/distros/arch.txt b/build/pkgs/toml/distros/arch.txt
+new file mode 100644
+index 00000000..821ee77
+--- /dev/null
++++ b/build/pkgs/toml/distros/arch.txt
+@@ -0,0 +1 @@
++python-toml
+diff --git a/build/pkgs/webencodings/distros/arch.txt b/build/pkgs/webencodings/distros/arch.txt
+new file mode 100644
+index 00000000..12ddba9
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/arch.txt
+@@ -0,0 +1 @@
++python-webencodings
+diff --git a/build/pkgs/wheel/distros/arch.txt b/build/pkgs/wheel/distros/arch.txt
+new file mode 100644
+index 00000000..ae4cbb9
+--- /dev/null
++++ b/build/pkgs/wheel/distros/arch.txt
+@@ -0,0 +1 @@
++python-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5087abee08f2a89ddaf422ec72a84575fe724a79 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 21:20:56 -0700
+Subject: build/pkgs: Add distros/opensuse.txt for Python packages
+
+---
+ build/pkgs/bleach/distros/opensuse.txt        | 1 +
+ build/pkgs/cvxopt/distros/opensuse.txt        | 1 +
+ build/pkgs/html5lib/distros/opensuse.txt      | 1 +
+ build/pkgs/idna/distros/opensuse.txt          | 1 +
+ build/pkgs/jinja2/distros/opensuse.txt        | 2 +-
+ build/pkgs/mpmath/distros/opensuse.txt        | 1 +
+ build/pkgs/numpy/distros/opensuse.txt         | 1 +
+ build/pkgs/packaging/distros/opensuse.txt     | 1 +
+ build/pkgs/pandocfilters/distros/opensuse.txt | 1 +
+ build/pkgs/pluggy/distros/opensuse.txt        | 1 +
+ build/pkgs/py/distros/opensuse.txt            | 1 +
+ build/pkgs/pygments/distros/opensuse.txt      | 2 +-
+ build/pkgs/sympy/distros/opensuse.txt         | 1 +
+ build/pkgs/texttable/distros/opensuse.txt     | 1 +
+ build/pkgs/toml/distros/opensuse.txt          | 1 +
+ 15 files changed, 15 insertions(+), 2 deletions(-)
+ create mode 100644 build/pkgs/bleach/distros/opensuse.txt
+ create mode 100644 build/pkgs/cvxopt/distros/opensuse.txt
+ create mode 100644 build/pkgs/html5lib/distros/opensuse.txt
+ create mode 100644 build/pkgs/idna/distros/opensuse.txt
+ create mode 100644 build/pkgs/mpmath/distros/opensuse.txt
+ create mode 100644 build/pkgs/numpy/distros/opensuse.txt
+ create mode 100644 build/pkgs/packaging/distros/opensuse.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/opensuse.txt
+ create mode 100644 build/pkgs/pluggy/distros/opensuse.txt
+ create mode 100644 build/pkgs/py/distros/opensuse.txt
+ create mode 100644 build/pkgs/sympy/distros/opensuse.txt
+ create mode 100644 build/pkgs/texttable/distros/opensuse.txt
+ create mode 100644 build/pkgs/toml/distros/opensuse.txt
+
+diff --git a/build/pkgs/bleach/distros/opensuse.txt b/build/pkgs/bleach/distros/opensuse.txt
+new file mode 100644
+index 00000000..6d37c4c
+--- /dev/null
++++ b/build/pkgs/bleach/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-bleach
+diff --git a/build/pkgs/cvxopt/distros/opensuse.txt b/build/pkgs/cvxopt/distros/opensuse.txt
+new file mode 100644
+index 00000000..2bb6ad1
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-cvxopt
+diff --git a/build/pkgs/html5lib/distros/opensuse.txt b/build/pkgs/html5lib/distros/opensuse.txt
+new file mode 100644
+index 00000000..6d7b8df
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-html5lib
+diff --git a/build/pkgs/idna/distros/opensuse.txt b/build/pkgs/idna/distros/opensuse.txt
+new file mode 100644
+index 00000000..de48e70
+--- /dev/null
++++ b/build/pkgs/idna/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-idna
+diff --git a/build/pkgs/jinja2/distros/opensuse.txt b/build/pkgs/jinja2/distros/opensuse.txt
+index 5d90a22..f2db865 100644
+--- a/build/pkgs/jinja2/distros/opensuse.txt
++++ b/build/pkgs/jinja2/distros/opensuse.txt
+@@ -1 +1 @@
+-python3-Jinja2
++python3-jinja2
+diff --git a/build/pkgs/mpmath/distros/opensuse.txt b/build/pkgs/mpmath/distros/opensuse.txt
+new file mode 100644
+index 00000000..fbc82a9
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-mpmath
+diff --git a/build/pkgs/numpy/distros/opensuse.txt b/build/pkgs/numpy/distros/opensuse.txt
+new file mode 100644
+index 00000000..79d5c5a
+--- /dev/null
++++ b/build/pkgs/numpy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-numpy
+diff --git a/build/pkgs/packaging/distros/opensuse.txt b/build/pkgs/packaging/distros/opensuse.txt
+new file mode 100644
+index 00000000..8f1c0ff
+--- /dev/null
++++ b/build/pkgs/packaging/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-packaging
+diff --git a/build/pkgs/pandocfilters/distros/opensuse.txt b/build/pkgs/pandocfilters/distros/opensuse.txt
+new file mode 100644
+index 00000000..d0d4c24
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-pandocfilters
+diff --git a/build/pkgs/pluggy/distros/opensuse.txt b/build/pkgs/pluggy/distros/opensuse.txt
+new file mode 100644
+index 00000000..43a3acf
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-pluggy
+diff --git a/build/pkgs/py/distros/opensuse.txt b/build/pkgs/py/distros/opensuse.txt
+new file mode 100644
+index 00000000..81fefe6
+--- /dev/null
++++ b/build/pkgs/py/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-py
+diff --git a/build/pkgs/pygments/distros/opensuse.txt b/build/pkgs/pygments/distros/opensuse.txt
+index 9ff5740..3ab3792 100644
+--- a/build/pkgs/pygments/distros/opensuse.txt
++++ b/build/pkgs/pygments/distros/opensuse.txt
+@@ -1 +1 @@
+-python3-Pygments
++python3-pygments
+diff --git a/build/pkgs/sympy/distros/opensuse.txt b/build/pkgs/sympy/distros/opensuse.txt
+new file mode 100644
+index 00000000..db423c8
+--- /dev/null
++++ b/build/pkgs/sympy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-sympy
+diff --git a/build/pkgs/texttable/distros/opensuse.txt b/build/pkgs/texttable/distros/opensuse.txt
+new file mode 100644
+index 00000000..8f8e7e2
+--- /dev/null
++++ b/build/pkgs/texttable/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-texttable
+diff --git a/build/pkgs/toml/distros/opensuse.txt b/build/pkgs/toml/distros/opensuse.txt
+new file mode 100644
+index 00000000..543e89d
+--- /dev/null
++++ b/build/pkgs/toml/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-toml
+-- 
+cgit v1.0-1-gd88e
+
+
+From a480ba7ace1370d106ae831e904ea22b72af1be7 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 22:45:04 -0700
+Subject: build/pkgs: Add distros/debian.txt for Python packages
+
+---
+ build/pkgs/babel/distros/debian.txt         | 1 +
+ build/pkgs/bleach/distros/debian.txt        | 1 +
+ build/pkgs/certifi/distros/debian.txt       | 1 +
+ build/pkgs/cvxopt/distros/debian.txt        | 1 +
+ build/pkgs/decorator/distros/debian.txt     | 1 +
+ build/pkgs/html5lib/distros/debian.txt      | 1 +
+ build/pkgs/idna/distros/debian.txt          | 1 +
+ build/pkgs/jinja2/distros/debian.txt        | 1 +
+ build/pkgs/matplotlib/distros/debian.txt    | 1 +
+ build/pkgs/mpmath/distros/debian.txt        | 1 +
+ build/pkgs/networkx/distros/debian.txt      | 1 +
+ build/pkgs/numpy/distros/debian.txt         | 1 +
+ build/pkgs/packaging/distros/debian.txt     | 1 +
+ build/pkgs/pandocfilters/distros/debian.txt | 1 +
+ build/pkgs/pickleshare/distros/debian.txt   | 1 +
+ build/pkgs/pillow/distros/debian.txt        | 1 +
+ build/pkgs/pluggy/distros/debian.txt        | 1 +
+ build/pkgs/py/distros/debian.txt            | 1 +
+ build/pkgs/pygments/distros/debian.txt      | 1 +
+ build/pkgs/pytz/distros/debian.txt          | 1 +
+ build/pkgs/requests/distros/debian.txt      | 1 +
+ build/pkgs/scipy/distros/debian.txt         | 1 +
+ build/pkgs/setuptools/distros/debian.txt    | 1 +
+ build/pkgs/six/distros/debian.txt           | 1 +
+ build/pkgs/sympy/distros/debian.txt         | 1 +
+ build/pkgs/texttable/distros/debian.txt     | 1 +
+ build/pkgs/toml/distros/debian.txt          | 1 +
+ build/pkgs/webencodings/distros/debian.txt  | 1 +
+ build/pkgs/wheel/distros/debian.txt         | 1 +
+ 29 files changed, 29 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/debian.txt
+ create mode 100644 build/pkgs/bleach/distros/debian.txt
+ create mode 100644 build/pkgs/certifi/distros/debian.txt
+ create mode 100644 build/pkgs/cvxopt/distros/debian.txt
+ create mode 100644 build/pkgs/decorator/distros/debian.txt
+ create mode 100644 build/pkgs/html5lib/distros/debian.txt
+ create mode 100644 build/pkgs/idna/distros/debian.txt
+ create mode 100644 build/pkgs/jinja2/distros/debian.txt
+ create mode 100644 build/pkgs/matplotlib/distros/debian.txt
+ create mode 100644 build/pkgs/mpmath/distros/debian.txt
+ create mode 100644 build/pkgs/networkx/distros/debian.txt
+ create mode 100644 build/pkgs/numpy/distros/debian.txt
+ create mode 100644 build/pkgs/packaging/distros/debian.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/debian.txt
+ create mode 100644 build/pkgs/pickleshare/distros/debian.txt
+ create mode 100644 build/pkgs/pillow/distros/debian.txt
+ create mode 100644 build/pkgs/pluggy/distros/debian.txt
+ create mode 100644 build/pkgs/py/distros/debian.txt
+ create mode 100644 build/pkgs/pygments/distros/debian.txt
+ create mode 100644 build/pkgs/pytz/distros/debian.txt
+ create mode 100644 build/pkgs/requests/distros/debian.txt
+ create mode 100644 build/pkgs/scipy/distros/debian.txt
+ create mode 100644 build/pkgs/setuptools/distros/debian.txt
+ create mode 100644 build/pkgs/six/distros/debian.txt
+ create mode 100644 build/pkgs/sympy/distros/debian.txt
+ create mode 100644 build/pkgs/texttable/distros/debian.txt
+ create mode 100644 build/pkgs/toml/distros/debian.txt
+ create mode 100644 build/pkgs/webencodings/distros/debian.txt
+ create mode 100644 build/pkgs/wheel/distros/debian.txt
+
+diff --git a/build/pkgs/babel/distros/debian.txt b/build/pkgs/babel/distros/debian.txt
+new file mode 100644
+index 00000000..e623eb6
+--- /dev/null
++++ b/build/pkgs/babel/distros/debian.txt
+@@ -0,0 +1 @@
++python3-babel
+diff --git a/build/pkgs/bleach/distros/debian.txt b/build/pkgs/bleach/distros/debian.txt
+new file mode 100644
+index 00000000..6d37c4c
+--- /dev/null
++++ b/build/pkgs/bleach/distros/debian.txt
+@@ -0,0 +1 @@
++python3-bleach
+diff --git a/build/pkgs/certifi/distros/debian.txt b/build/pkgs/certifi/distros/debian.txt
+new file mode 100644
+index 00000000..f585a82
+--- /dev/null
++++ b/build/pkgs/certifi/distros/debian.txt
+@@ -0,0 +1 @@
++python3-certifi
+diff --git a/build/pkgs/cvxopt/distros/debian.txt b/build/pkgs/cvxopt/distros/debian.txt
+new file mode 100644
+index 00000000..2bb6ad1
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/debian.txt
+@@ -0,0 +1 @@
++python3-cvxopt
+diff --git a/build/pkgs/decorator/distros/debian.txt b/build/pkgs/decorator/distros/debian.txt
+new file mode 100644
+index 00000000..46c478e
+--- /dev/null
++++ b/build/pkgs/decorator/distros/debian.txt
+@@ -0,0 +1 @@
++python3-decorator
+diff --git a/build/pkgs/html5lib/distros/debian.txt b/build/pkgs/html5lib/distros/debian.txt
+new file mode 100644
+index 00000000..6d7b8df
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/debian.txt
+@@ -0,0 +1 @@
++python3-html5lib
+diff --git a/build/pkgs/idna/distros/debian.txt b/build/pkgs/idna/distros/debian.txt
+new file mode 100644
+index 00000000..de48e70
+--- /dev/null
++++ b/build/pkgs/idna/distros/debian.txt
+@@ -0,0 +1 @@
++python3-idna
+diff --git a/build/pkgs/jinja2/distros/debian.txt b/build/pkgs/jinja2/distros/debian.txt
+new file mode 100644
+index 00000000..f2db865
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/debian.txt
+@@ -0,0 +1 @@
++python3-jinja2
+diff --git a/build/pkgs/matplotlib/distros/debian.txt b/build/pkgs/matplotlib/distros/debian.txt
+new file mode 100644
+index 00000000..1374329
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/debian.txt
+@@ -0,0 +1 @@
++python3-matplotlib
+diff --git a/build/pkgs/mpmath/distros/debian.txt b/build/pkgs/mpmath/distros/debian.txt
+new file mode 100644
+index 00000000..fbc82a9
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/debian.txt
+@@ -0,0 +1 @@
++python3-mpmath
+diff --git a/build/pkgs/networkx/distros/debian.txt b/build/pkgs/networkx/distros/debian.txt
+new file mode 100644
+index 00000000..6779066
+--- /dev/null
++++ b/build/pkgs/networkx/distros/debian.txt
+@@ -0,0 +1 @@
++python3-networkx
+diff --git a/build/pkgs/numpy/distros/debian.txt b/build/pkgs/numpy/distros/debian.txt
+new file mode 100644
+index 00000000..79d5c5a
+--- /dev/null
++++ b/build/pkgs/numpy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-numpy
+diff --git a/build/pkgs/packaging/distros/debian.txt b/build/pkgs/packaging/distros/debian.txt
+new file mode 100644
+index 00000000..8f1c0ff
+--- /dev/null
++++ b/build/pkgs/packaging/distros/debian.txt
+@@ -0,0 +1 @@
++python3-packaging
+diff --git a/build/pkgs/pandocfilters/distros/debian.txt b/build/pkgs/pandocfilters/distros/debian.txt
+new file mode 100644
+index 00000000..d0d4c24
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/debian.txt b/build/pkgs/pickleshare/distros/debian.txt
+new file mode 100644
+index 00000000..a00907d
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pickleshare
+diff --git a/build/pkgs/pillow/distros/debian.txt b/build/pkgs/pillow/distros/debian.txt
+new file mode 100644
+index 00000000..3319fcd
+--- /dev/null
++++ b/build/pkgs/pillow/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pillow
+diff --git a/build/pkgs/pluggy/distros/debian.txt b/build/pkgs/pluggy/distros/debian.txt
+new file mode 100644
+index 00000000..43a3acf
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pluggy
+diff --git a/build/pkgs/py/distros/debian.txt b/build/pkgs/py/distros/debian.txt
+new file mode 100644
+index 00000000..81fefe6
+--- /dev/null
++++ b/build/pkgs/py/distros/debian.txt
+@@ -0,0 +1 @@
++python3-py
+diff --git a/build/pkgs/pygments/distros/debian.txt b/build/pkgs/pygments/distros/debian.txt
+new file mode 100644
+index 00000000..3ab3792
+--- /dev/null
++++ b/build/pkgs/pygments/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pygments
+diff --git a/build/pkgs/pytz/distros/debian.txt b/build/pkgs/pytz/distros/debian.txt
+new file mode 100644
+index 00000000..db20908
+--- /dev/null
++++ b/build/pkgs/pytz/distros/debian.txt
+@@ -0,0 +1 @@
++python3-tz
+diff --git a/build/pkgs/requests/distros/debian.txt b/build/pkgs/requests/distros/debian.txt
+new file mode 100644
+index 00000000..43147b2
+--- /dev/null
++++ b/build/pkgs/requests/distros/debian.txt
+@@ -0,0 +1 @@
++python3-requests
+diff --git a/build/pkgs/scipy/distros/debian.txt b/build/pkgs/scipy/distros/debian.txt
+new file mode 100644
+index 00000000..12b3666
+--- /dev/null
++++ b/build/pkgs/scipy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-scipy
+diff --git a/build/pkgs/setuptools/distros/debian.txt b/build/pkgs/setuptools/distros/debian.txt
+new file mode 100644
+index 00000000..1c0901c
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/debian.txt
+@@ -0,0 +1 @@
++python3-setuptools
+diff --git a/build/pkgs/six/distros/debian.txt b/build/pkgs/six/distros/debian.txt
+new file mode 100644
+index 00000000..68ff859
+--- /dev/null
++++ b/build/pkgs/six/distros/debian.txt
+@@ -0,0 +1 @@
++python3-six
+diff --git a/build/pkgs/sympy/distros/debian.txt b/build/pkgs/sympy/distros/debian.txt
+new file mode 100644
+index 00000000..db423c8
+--- /dev/null
++++ b/build/pkgs/sympy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-sympy
+diff --git a/build/pkgs/texttable/distros/debian.txt b/build/pkgs/texttable/distros/debian.txt
+new file mode 100644
+index 00000000..8f8e7e2
+--- /dev/null
++++ b/build/pkgs/texttable/distros/debian.txt
+@@ -0,0 +1 @@
++python3-texttable
+diff --git a/build/pkgs/toml/distros/debian.txt b/build/pkgs/toml/distros/debian.txt
+new file mode 100644
+index 00000000..543e89d
+--- /dev/null
++++ b/build/pkgs/toml/distros/debian.txt
+@@ -0,0 +1 @@
++python3-toml
+diff --git a/build/pkgs/webencodings/distros/debian.txt b/build/pkgs/webencodings/distros/debian.txt
+new file mode 100644
+index 00000000..ac30c2f
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/debian.txt
+@@ -0,0 +1 @@
++python3-webencodings
+diff --git a/build/pkgs/wheel/distros/debian.txt b/build/pkgs/wheel/distros/debian.txt
+new file mode 100644
+index 00000000..3c066725
+--- /dev/null
++++ b/build/pkgs/wheel/distros/debian.txt
+@@ -0,0 +1 @@
++python3-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 93bf30d7de292551c3050e2dd74651d69ba4bd46 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 18 Oct 2021 07:50:34 -0400
+Subject: Trac #29665: add more documentation for SAGE_PYTHON_PACKAGE_CHECK().
+
+An earlier commit allows SAGE_PYTHON_PACKAGE_CHECK(package) to tweak the
+value of sage_use_system_$package if --enable-system-site-packages was
+not used. This essentially changes the default --with-system-$package=yes
+to "no" in that case. Here we update the documentation to reflect it.
+---
+ m4/sage_python_package_check.m4 | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 7ee82a7..95eefd0 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -34,6 +34,10 @@
+ #   ensure that the ./configure- and run-time views of the system
+ #   are as similar as possible.
+ #
++#   To avoid suggesting these system packages to users who have not
++#   set --enable-system-site-packages, this macro also changes the
++#   default for --with-system-foo from "yes" to "no" in that case.
++#
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
+-- 
+cgit v1.0-1-gd88e
+
+
+From d771e49d57ecdf3622434bc09cbfb87ad3bb7744 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 18 Oct 2021 07:42:46 -0400
+Subject: Trac #29665: improve SAGE_PYTHON_PACKAGE_CHECK() failure message.
+
+When --enable-system-site-packages is off, SAGE_PYTHON_PACKAGE_CHECK()
+will always install the corresponding SPKG. We improve the ./configure
+output in that case to make it clear that the decision was based on
+the value of --enable-system-site-packages and not the "real" check.
+---
+ m4/sage_python_package_check.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 95eefd0..5f0f084 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -40,7 +40,9 @@
+ #
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
++  AC_MSG_CHECKING([if --enable-system-site-packages was used])
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
++    AC_MSG_RESULT(yes)
+     AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
+ 
+     dnl We run this check inside a python venv, because that's ultimately
+@@ -94,6 +96,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
+     dnl System site packages are disabled.
++    AC_MSG_RESULT(no; skipping check)
+     sage_spkg_install_$1=yes
+ 
+     dnl We have to retroactively hack the --with-system-foo={no,yes,force}
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5bb43c1b78a1deb3364f235305937c2f823e5e18 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 24 Oct 2021 20:29:25 -0400
+Subject: Trac #29665: use sage-venv in SAGE_PYTHON_PACKAGE_CHECK().
+
+For consistency with the rest of the build system, we now use the
+build/bin/sage-venv script to create the venv in this autoconf macro
+rather than invoking $PYTHON_FOR_VENV with "-m venv" directly.
+---
+ m4/sage_python_package_check.m4 | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 5f0f084..5547b35 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -50,11 +50,11 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AC_MSG_CHECKING([if we can create a python venv in config.venv])
+ 
+     dnl Use --clear because ./configure typically clobbers its output files.
+-    AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
+-                                        --clear                dnl
+-                                        --without-pip          dnl
+-                                        config.venv            dnl
+-                                        2>&AS_MESSAGE_LOG_FD], [
++    AS_IF(["${PYTHON_FOR_VENV}" build/bin/sage-venv      dnl
++                                  --system-site-packages dnl
++                                  --clear                dnl
++                                  config.venv            dnl
++                                  2>&AS_MESSAGE_LOG_FD], [
+       AC_MSG_RESULT(yes)
+       dnl strip all comments from install-requires.txt; this should leave
+       dnl only a single line containing the version specification for this
+-- 
+cgit v1.0-1-gd88e
+
+
+From c78363d6326addff16ca5abac897949a6be72bf4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:10:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for urllib3.
+
+---
+ build/pkgs/urllib3/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/urllib3/spkg-configure.m4
+
+diff --git a/build/pkgs/urllib3/spkg-configure.m4 b/build/pkgs/urllib3/spkg-configure.m4
+new file mode 100644
+index 00000000..d7ef3e1
+--- /dev/null
++++ b/build/pkgs/urllib3/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([urllib3], [SAGE_PYTHON_PACKAGE_CHECK([urllib3])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f416d5abcae495ea8301fad024b279ea9e997b29 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:15:18 -0400
+Subject: Trac #29665: add Gentoo package information for urllib3.
+
+---
+ build/pkgs/urllib3/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/urllib3/distros/gentoo.txt
+
+diff --git a/build/pkgs/urllib3/distros/gentoo.txt b/build/pkgs/urllib3/distros/gentoo.txt
+new file mode 100644
+index 00000000..172a535
+--- /dev/null
++++ b/build/pkgs/urllib3/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/urllib3
+-- 
+cgit v1.0-1-gd88e
+
+
+From 852068b992bf7959500c650f54cb92e5b68d7ef8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:15:58 -0400
+Subject: Trac #29665: add Gentoo package information for nbformat.
+
+---
+ build/pkgs/nbformat/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbformat/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbformat/distros/gentoo.txt b/build/pkgs/nbformat/distros/gentoo.txt
+new file mode 100644
+index 00000000..006b1f2
+--- /dev/null
++++ b/build/pkgs/nbformat/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbformat
+-- 
+cgit v1.0-1-gd88e
+
+
+From 66179fd28fcc92ee840dcd87bb4db25cea968d66 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:34:16 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for nbformat.
+
+---
+ build/pkgs/nbformat/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbformat/spkg-configure.m4
+
+diff --git a/build/pkgs/nbformat/spkg-configure.m4 b/build/pkgs/nbformat/spkg-configure.m4
+new file mode 100644
+index 00000000..5a7f8c4
+--- /dev/null
++++ b/build/pkgs/nbformat/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbformat], [SAGE_PYTHON_PACKAGE_CHECK([nbformat])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 874005e81ed20f27a5f895030dcdbdfc5f73ad80 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:47:01 -0400
+Subject: Trac #29665: add Gentoo package information for zipp.
+
+---
+ build/pkgs/zipp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/zipp/distros/gentoo.txt
+
+diff --git a/build/pkgs/zipp/distros/gentoo.txt b/build/pkgs/zipp/distros/gentoo.txt
+new file mode 100644
+index 00000000..7f59450
+--- /dev/null
++++ b/build/pkgs/zipp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/zipp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0cc2a7355b5554c1fb79c742ebf02eff54465b3e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:47:35 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for zipp.
+
+---
+ build/pkgs/zipp/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/zipp/spkg-configure.m4
+
+diff --git a/build/pkgs/zipp/spkg-configure.m4 b/build/pkgs/zipp/spkg-configure.m4
+new file mode 100644
+index 00000000..0fe3a9c
+--- /dev/null
++++ b/build/pkgs/zipp/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([zipp], [SAGE_PYTHON_PACKAGE_CHECK([zipp])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6073ad8e56c21fc862749bbd84a56d543fb9458c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:48:37 -0400
+Subject: Trac #29665: add Gentoo package information for wcwidth.
+
+---
+ build/pkgs/wcwidth/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wcwidth/distros/gentoo.txt
+
+diff --git a/build/pkgs/wcwidth/distros/gentoo.txt b/build/pkgs/wcwidth/distros/gentoo.txt
+new file mode 100644
+index 00000000..edeb80b
+--- /dev/null
++++ b/build/pkgs/wcwidth/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/wcwidth
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9793d6172c64d61a015fbe61bd45863759124fad Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:51:10 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for wcwidth.
+
+---
+ build/pkgs/wcwidth/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wcwidth/spkg-configure.m4
+
+diff --git a/build/pkgs/wcwidth/spkg-configure.m4 b/build/pkgs/wcwidth/spkg-configure.m4
+new file mode 100644
+index 00000000..5bde15a
+--- /dev/null
++++ b/build/pkgs/wcwidth/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([wcwidth], [SAGE_PYTHON_PACKAGE_CHECK([wcwidth])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20232f370a43c146ca4e696c72a2cbcc498db060 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:52:36 -0400
+Subject: Trac #29665: add Gentoo package information for testpath.
+
+---
+ build/pkgs/testpath/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/testpath/distros/gentoo.txt
+
+diff --git a/build/pkgs/testpath/distros/gentoo.txt b/build/pkgs/testpath/distros/gentoo.txt
+new file mode 100644
+index 00000000..efa10a0
+--- /dev/null
++++ b/build/pkgs/testpath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/testpath
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1b0785b2aad8844e74345fe950baf097e2b43d24 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:55:22 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for testpath.
+
+---
+ build/pkgs/testpath/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/testpath/spkg-configure.m4
+
+diff --git a/build/pkgs/testpath/spkg-configure.m4 b/build/pkgs/testpath/spkg-configure.m4
+new file mode 100644
+index 00000000..d8fc2a7
+--- /dev/null
++++ b/build/pkgs/testpath/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([testpath], [SAGE_PYTHON_PACKAGE_CHECK([testpath])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 10fc3829ecd956d732b1b069fdfe81f0d6d5cdc2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:56:06 -0400
+Subject: Trac #29665: add Gentoo package information for jedi.
+
+---
+ build/pkgs/jedi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jedi/distros/gentoo.txt
+
+diff --git a/build/pkgs/jedi/distros/gentoo.txt b/build/pkgs/jedi/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c85a46
+--- /dev/null
++++ b/build/pkgs/jedi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jedi
+-- 
+cgit v1.0-1-gd88e
+
+
+From a75824d74c281c7639028ca01dabeed266f56998 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:06:37 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for jedi.
+
+---
+ build/pkgs/jedi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jedi/spkg-configure.m4
+
+diff --git a/build/pkgs/jedi/spkg-configure.m4 b/build/pkgs/jedi/spkg-configure.m4
+new file mode 100644
+index 00000000..a37dbcc
+--- /dev/null
++++ b/build/pkgs/jedi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jedi], [SAGE_PYTHON_PACKAGE_CHECK([jedi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 17af01373d43f6acbbdbc23e073e372d3fdadf8b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:07:47 -0400
+Subject: Trac #29665: add Gentoo package information for tomli.
+
+---
+ build/pkgs/tomli/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tomli/distros/gentoo.txt
+
+diff --git a/build/pkgs/tomli/distros/gentoo.txt b/build/pkgs/tomli/distros/gentoo.txt
+new file mode 100644
+index 00000000..0458e25
+--- /dev/null
++++ b/build/pkgs/tomli/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/tomli
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0d3b5994ae612be11992467c4a3f1a74b81400fe Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:08:12 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for tomli.
+
+---
+ build/pkgs/tomli/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tomli/spkg-configure.m4
+
+diff --git a/build/pkgs/tomli/spkg-configure.m4 b/build/pkgs/tomli/spkg-configure.m4
+new file mode 100644
+index 00000000..95a8b8b
+--- /dev/null
++++ b/build/pkgs/tomli/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tomli], [SAGE_PYTHON_PACKAGE_CHECK([tomli])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From dce1c515781b0eeb8eb9c2bc7aba581560c1fac1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:09:22 -0400
+Subject: Trac #29665: add Gentoo package information for defusedxml.
+
+---
+ build/pkgs/defusedxml/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/defusedxml/distros/gentoo.txt
+
+diff --git a/build/pkgs/defusedxml/distros/gentoo.txt b/build/pkgs/defusedxml/distros/gentoo.txt
+new file mode 100644
+index 00000000..2804214
+--- /dev/null
++++ b/build/pkgs/defusedxml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/defusedxml
+-- 
+cgit v1.0-1-gd88e
+
+
+From 02e1e1cd7f8bdae3ca5b7d35ce70af28a44e9b7c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:11:14 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for defusedxml.
+
+---
+ build/pkgs/defusedxml/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/defusedxml/spkg-configure.m4
+
+diff --git a/build/pkgs/defusedxml/spkg-configure.m4 b/build/pkgs/defusedxml/spkg-configure.m4
+new file mode 100644
+index 00000000..e02f345
+--- /dev/null
++++ b/build/pkgs/defusedxml/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([defusedxml], [SAGE_PYTHON_PACKAGE_CHECK([defusedxml])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e0ba4ebb5cfc637b5d26b85de9f34e0a160d2b9c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:12:22 -0400
+Subject: Trac #29665: add Gentoo package information for ipywidgets.
+
+---
+ build/pkgs/ipywidgets/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipywidgets/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipywidgets/distros/gentoo.txt b/build/pkgs/ipywidgets/distros/gentoo.txt
+new file mode 100644
+index 00000000..7c76967
+--- /dev/null
++++ b/build/pkgs/ipywidgets/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipywidgets
+-- 
+cgit v1.0-1-gd88e
+
+
+From 49df7e7d93c7a31b7c46d5d224a35fd313a29a32 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:15:53 -0400
+Subject: Trac #29665: add Gentoo package information for simplegeneric.
+
+---
+ build/pkgs/simplegeneric/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/simplegeneric/distros/gentoo.txt
+
+diff --git a/build/pkgs/simplegeneric/distros/gentoo.txt b/build/pkgs/simplegeneric/distros/gentoo.txt
+new file mode 100644
+index 00000000..a86e90d
+--- /dev/null
++++ b/build/pkgs/simplegeneric/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/simplegeneric
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2a893635d5804749e6fec7ed7289c921ecb5300a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:16:33 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for simplegeneric.
+
+---
+ build/pkgs/simplegeneric/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/simplegeneric/spkg-configure.m4
+
+diff --git a/build/pkgs/simplegeneric/spkg-configure.m4 b/build/pkgs/simplegeneric/spkg-configure.m4
+new file mode 100644
+index 00000000..13715ab
+--- /dev/null
++++ b/build/pkgs/simplegeneric/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([simplegeneric], [SAGE_PYTHON_PACKAGE_CHECK([simplegeneric])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a8fe7ecd6e3163e7d01261e5497ac452a8cc95ab Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:17:18 -0400
+Subject: Trac #29665: add Gentoo package information for imagesize.
+
+---
+ build/pkgs/imagesize/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/imagesize/distros/gentoo.txt
+
+diff --git a/build/pkgs/imagesize/distros/gentoo.txt b/build/pkgs/imagesize/distros/gentoo.txt
+new file mode 100644
+index 00000000..54350ba
+--- /dev/null
++++ b/build/pkgs/imagesize/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/imagesize
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2ad837c5dd1fca0f50ce6d5042a9344210a54f84 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:17:48 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for imagesize.
+
+---
+ build/pkgs/imagesize/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/imagesize/spkg-configure.m4
+
+diff --git a/build/pkgs/imagesize/spkg-configure.m4 b/build/pkgs/imagesize/spkg-configure.m4
+new file mode 100644
+index 00000000..20210ef
+--- /dev/null
++++ b/build/pkgs/imagesize/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([imagesize], [SAGE_PYTHON_PACKAGE_CHECK([imagesize])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bf47415b5bfca2d7bf24e20de35662bf331623b9 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:18:49 -0400
+Subject: Trac #29665: add Gentoo package information for mistune.
+
+---
+ build/pkgs/mistune/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mistune/distros/gentoo.txt
+
+diff --git a/build/pkgs/mistune/distros/gentoo.txt b/build/pkgs/mistune/distros/gentoo.txt
+new file mode 100644
+index 00000000..56f0a4e
+--- /dev/null
++++ b/build/pkgs/mistune/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/mistune
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6898a74fd0c65a40c5220ba68b4062ac6fe060c6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:21:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for mistune.
+
+---
+ build/pkgs/mistune/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mistune/spkg-configure.m4
+
+diff --git a/build/pkgs/mistune/spkg-configure.m4 b/build/pkgs/mistune/spkg-configure.m4
+new file mode 100644
+index 00000000..972f33d
+--- /dev/null
++++ b/build/pkgs/mistune/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([mistune], [SAGE_PYTHON_PACKAGE_CHECK([mistune])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 62735e4ccf2031cd39eb5e04b03bdfd97005d808 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:22:48 -0400
+Subject: Trac #29665: add Gentoo package information for backcall.
+
+---
+ build/pkgs/backcall/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/backcall/distros/gentoo.txt
+
+diff --git a/build/pkgs/backcall/distros/gentoo.txt b/build/pkgs/backcall/distros/gentoo.txt
+new file mode 100644
+index 00000000..266a222
+--- /dev/null
++++ b/build/pkgs/backcall/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/backcall
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9ef3ea42d4a33c7cdb623fa5417ae300cf323183 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:25:10 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for backcall.
+
+---
+ build/pkgs/backcall/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/backcall/spkg-configure.m4
+
+diff --git a/build/pkgs/backcall/spkg-configure.m4 b/build/pkgs/backcall/spkg-configure.m4
+new file mode 100644
+index 00000000..d6b11c4
+--- /dev/null
++++ b/build/pkgs/backcall/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([backcall], [SAGE_PYTHON_PACKAGE_CHECK([backcall])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1b3ea2a3c40fea0fb58435f5e5304368ea58dff8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:25:58 -0400
+Subject: Trac #29665: add Gentoo package information for parso.
+
+---
+ build/pkgs/parso/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/parso/distros/gentoo.txt
+
+diff --git a/build/pkgs/parso/distros/gentoo.txt b/build/pkgs/parso/distros/gentoo.txt
+new file mode 100644
+index 00000000..f9ce4c7
+--- /dev/null
++++ b/build/pkgs/parso/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/parso
+-- 
+cgit v1.0-1-gd88e
+
+
+From 963a3a2c563ec71a1f5be2395722d0e824cb0b11 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:26:22 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for parso.
+
+---
+ build/pkgs/parso/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/parso/spkg-configure.m4
+
+diff --git a/build/pkgs/parso/spkg-configure.m4 b/build/pkgs/parso/spkg-configure.m4
+new file mode 100644
+index 00000000..1ca6f1b
+--- /dev/null
++++ b/build/pkgs/parso/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([parso], [SAGE_PYTHON_PACKAGE_CHECK([parso])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 943053dfc474b6549bcc7d6ef2971ea43588b35c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:27:00 -0400
+Subject: Trac #29665: add Gentoo package information for pyparsing.
+
+---
+ build/pkgs/pyparsing/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyparsing/distros/gentoo.txt
+
+diff --git a/build/pkgs/pyparsing/distros/gentoo.txt b/build/pkgs/pyparsing/distros/gentoo.txt
+new file mode 100644
+index 00000000..ef0419f
+--- /dev/null
++++ b/build/pkgs/pyparsing/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyparsing
+-- 
+cgit v1.0-1-gd88e
+
+
+From bd682eaa2ac41dd84e7a52e2b0c5442fc8fd8919 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:27:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pyparsing.
+
+---
+ build/pkgs/pyparsing/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyparsing/spkg-configure.m4
+
+diff --git a/build/pkgs/pyparsing/spkg-configure.m4 b/build/pkgs/pyparsing/spkg-configure.m4
+new file mode 100644
+index 00000000..d2b4c00
+--- /dev/null
++++ b/build/pkgs/pyparsing/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pyparsing], [SAGE_PYTHON_PACKAGE_CHECK([pyparsing])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 74f36a9c0ec7c63b7e6c40066e42f4b15c2f978e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:17:42 -0400
+Subject: Trac #29665: add Gentoo package information for debugpy.
+
+---
+ build/pkgs/debugpy/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/debugpy/distros/gentoo.txt
+
+diff --git a/build/pkgs/debugpy/distros/gentoo.txt b/build/pkgs/debugpy/distros/gentoo.txt
+new file mode 100644
+index 00000000..8b797ce
+--- /dev/null
++++ b/build/pkgs/debugpy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/debugpy
+-- 
+cgit v1.0-1-gd88e
+
+
+From be072fa87ac5c373d9dc9b54c0bd68734d5709bc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:21:17 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for debugpy.
+
+---
+ build/pkgs/debugpy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/debugpy/spkg-configure.m4
+
+diff --git a/build/pkgs/debugpy/spkg-configure.m4 b/build/pkgs/debugpy/spkg-configure.m4
+new file mode 100644
+index 00000000..db605ff
+--- /dev/null
++++ b/build/pkgs/debugpy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([debugpy], [SAGE_PYTHON_PACKAGE_CHECK([debugpy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6f777ce2f2e14b94e91c8b7bbac82f9017460aba Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:23:56 -0400
+Subject: Trac #29665: add Gentoo package information for tzlocal.
+
+---
+ build/pkgs/tzlocal/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tzlocal/distros/gentoo.txt
+
+diff --git a/build/pkgs/tzlocal/distros/gentoo.txt b/build/pkgs/tzlocal/distros/gentoo.txt
+new file mode 100644
+index 00000000..2018442
+--- /dev/null
++++ b/build/pkgs/tzlocal/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/tzlocal
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3bd078fc15ae13982249452711baafae91038191 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:24:51 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for tzlocal.
+
+---
+ build/pkgs/tzlocal/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tzlocal/spkg-configure.m4
+
+diff --git a/build/pkgs/tzlocal/spkg-configure.m4 b/build/pkgs/tzlocal/spkg-configure.m4
+new file mode 100644
+index 00000000..e020b28
+--- /dev/null
++++ b/build/pkgs/tzlocal/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tzlocal], [SAGE_PYTHON_PACKAGE_CHECK([tzlocal])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 91b0882fc62214923da9ee7b6dccb05d8a1d11d1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:26:13 -0400
+Subject: Trac #29665: add Gentoo package information for pycparser.
+
+---
+ build/pkgs/pycparser/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pycparser/distros/gentoo.txt
+
+diff --git a/build/pkgs/pycparser/distros/gentoo.txt b/build/pkgs/pycparser/distros/gentoo.txt
+new file mode 100644
+index 00000000..5e87307
+--- /dev/null
++++ b/build/pkgs/pycparser/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pycparser
+-- 
+cgit v1.0-1-gd88e
+
+
+From beabde92fe6e057faf516fe82d27f1e903e55ce6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:27:27 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pycparser.
+
+---
+ build/pkgs/pycparser/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pycparser/spkg-configure.m4
+
+diff --git a/build/pkgs/pycparser/spkg-configure.m4 b/build/pkgs/pycparser/spkg-configure.m4
+new file mode 100644
+index 00000000..4b9b900
+--- /dev/null
++++ b/build/pkgs/pycparser/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pycparser], [SAGE_PYTHON_PACKAGE_CHECK([pycparser])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 86c2788dc7fd1169314e9598c91fa81045553677 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:29:36 -0400
+Subject: Trac #29665: add Gentoo package information for cycler.
+
+---
+ build/pkgs/cycler/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cycler/distros/gentoo.txt
+
+diff --git a/build/pkgs/cycler/distros/gentoo.txt b/build/pkgs/cycler/distros/gentoo.txt
+new file mode 100644
+index 00000000..4b21543
+--- /dev/null
++++ b/build/pkgs/cycler/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/cycler
+-- 
+cgit v1.0-1-gd88e
+
+
+From 67c5a944101ddf329f0a61c61d4e784f58a5c5b0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:30:27 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for cycler.
+
+---
+ build/pkgs/cycler/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cycler/spkg-configure.m4
+
+diff --git a/build/pkgs/cycler/spkg-configure.m4 b/build/pkgs/cycler/spkg-configure.m4
+new file mode 100644
+index 00000000..239571a
+--- /dev/null
++++ b/build/pkgs/cycler/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([cycler], [SAGE_PYTHON_PACKAGE_CHECK([cycler])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ef6d490251abfa41f7a0910274700a8a6a65f629 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:31:19 -0400
+Subject: Trac #29665: add Gentoo package information for traitlets.
+
+---
+ build/pkgs/traitlets/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/traitlets/distros/gentoo.txt
+
+diff --git a/build/pkgs/traitlets/distros/gentoo.txt b/build/pkgs/traitlets/distros/gentoo.txt
+new file mode 100644
+index 00000000..46bfaab
+--- /dev/null
++++ b/build/pkgs/traitlets/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/traitlets
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1f922b458d34088d9f6773312209e69f19ee45dc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:31:50 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for traitlets.
+
+---
+ build/pkgs/traitlets/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/traitlets/spkg-configure.m4
+
+diff --git a/build/pkgs/traitlets/spkg-configure.m4 b/build/pkgs/traitlets/spkg-configure.m4
+new file mode 100644
+index 00000000..df2382b
+--- /dev/null
++++ b/build/pkgs/traitlets/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([traitlets], [SAGE_PYTHON_PACKAGE_CHECK([traitlets])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 95b89a9ced0acb6d971a27fa63b97ea58a11f4e1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:33:35 -0400
+Subject: Trac #29665: add Gentoo package information for argcomplete.
+
+---
+ build/pkgs/argcomplete/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argcomplete/distros/gentoo.txt
+
+diff --git a/build/pkgs/argcomplete/distros/gentoo.txt b/build/pkgs/argcomplete/distros/gentoo.txt
+new file mode 100644
+index 00000000..b150949
+--- /dev/null
++++ b/build/pkgs/argcomplete/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/argcomplete
+-- 
+cgit v1.0-1-gd88e
+
+
+From b4cd8ef384e6e5bae0de0f3c113fb5f9e6e1a71e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:34:14 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for argcomplete.
+
+---
+ build/pkgs/argcomplete/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argcomplete/spkg-configure.m4
+
+diff --git a/build/pkgs/argcomplete/spkg-configure.m4 b/build/pkgs/argcomplete/spkg-configure.m4
+new file mode 100644
+index 00000000..cbd7ccf
+--- /dev/null
++++ b/build/pkgs/argcomplete/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([argcomplete], [SAGE_PYTHON_PACKAGE_CHECK([argcomplete])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4cc610e8331970cc018d7ea87af928fa73a292c1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:36:21 -0400
+Subject: Trac #29665: add Gentoo package information for ptyprocess.
+
+---
+ build/pkgs/ptyprocess/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ptyprocess/distros/gentoo.txt
+
+diff --git a/build/pkgs/ptyprocess/distros/gentoo.txt b/build/pkgs/ptyprocess/distros/gentoo.txt
+new file mode 100644
+index 00000000..571a851
+--- /dev/null
++++ b/build/pkgs/ptyprocess/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ptyprocess
+-- 
+cgit v1.0-1-gd88e
+
+
+From cd15f97221bf5933b07900e4f77cb55401eede26 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:37:02 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ptyprocess.
+
+---
+ build/pkgs/ptyprocess/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ptyprocess/spkg-configure.m4
+
+diff --git a/build/pkgs/ptyprocess/spkg-configure.m4 b/build/pkgs/ptyprocess/spkg-configure.m4
+new file mode 100644
+index 00000000..bfacbae
+--- /dev/null
++++ b/build/pkgs/ptyprocess/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ptyprocess], [SAGE_PYTHON_PACKAGE_CHECK([ptyprocess])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb5f45b15f99e4ba28e1b1f6042a0e8ea17f1dfc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:38:22 -0400
+Subject: Trac #29665: add Gentoo package information for attrs.
+
+---
+ build/pkgs/attrs/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/attrs/distros/gentoo.txt
+
+diff --git a/build/pkgs/attrs/distros/gentoo.txt b/build/pkgs/attrs/distros/gentoo.txt
+new file mode 100644
+index 00000000..3b906fa
+--- /dev/null
++++ b/build/pkgs/attrs/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/attrs
+-- 
+cgit v1.0-1-gd88e
+
+
+From 321707ebf8e9af1e4ac3a5b5b094b4226bb3a7a5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:38:55 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for attrs.
+
+---
+ build/pkgs/attrs/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/attrs/spkg-configure.m4
+
+diff --git a/build/pkgs/attrs/spkg-configure.m4 b/build/pkgs/attrs/spkg-configure.m4
+new file mode 100644
+index 00000000..ba6a9b7
+--- /dev/null
++++ b/build/pkgs/attrs/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([attrs], [SAGE_PYTHON_PACKAGE_CHECK([attrs])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 69a498a4e8854ecdfc2f1a134104983c0dcb9e32 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:40:09 -0400
+Subject: Trac #29665: add Gentoo package information for send2trash.
+
+---
+ build/pkgs/send2trash/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/send2trash/distros/gentoo.txt
+
+diff --git a/build/pkgs/send2trash/distros/gentoo.txt b/build/pkgs/send2trash/distros/gentoo.txt
+new file mode 100644
+index 00000000..a89b179
+--- /dev/null
++++ b/build/pkgs/send2trash/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/send2trash
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9baed17c84e1bdf5abd17c20766e5cd7dddc5b53 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:41:45 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for send2trash.
+
+---
+ build/pkgs/send2trash/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/send2trash/spkg-configure.m4
+
+diff --git a/build/pkgs/send2trash/spkg-configure.m4 b/build/pkgs/send2trash/spkg-configure.m4
+new file mode 100644
+index 00000000..3bbb727
+--- /dev/null
++++ b/build/pkgs/send2trash/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([send2trash], [SAGE_PYTHON_PACKAGE_CHECK([send2trash])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b9b552b2a2aaccaeb7c5b25be0b681f107522d09 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:43:27 -0400
+Subject: Trac #29665: add Gentoo package information for pyrsistent.
+
+---
+ build/pkgs/pyrsistent/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyrsistent/distros/gentoo.txt
+
+diff --git a/build/pkgs/pyrsistent/distros/gentoo.txt b/build/pkgs/pyrsistent/distros/gentoo.txt
+new file mode 100644
+index 00000000..83439ce
+--- /dev/null
++++ b/build/pkgs/pyrsistent/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyrsistent
+-- 
+cgit v1.0-1-gd88e
+
+
+From a17b31fac6104852762f57daa749443147bdf121 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:44:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pyrsistent.
+
+---
+ build/pkgs/pyrsistent/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyrsistent/spkg-configure.m4
+
+diff --git a/build/pkgs/pyrsistent/spkg-configure.m4 b/build/pkgs/pyrsistent/spkg-configure.m4
+new file mode 100644
+index 00000000..f7ca75d
+--- /dev/null
++++ b/build/pkgs/pyrsistent/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pyrsistent], [SAGE_PYTHON_PACKAGE_CHECK([pyrsistent])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 68520decad6d6937918d7a6af65ca5bd476e5d02 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:45:45 -0400
+Subject: Trac #29665: add Gentoo package information for entrypoints.
+
+---
+ build/pkgs/entrypoints/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/entrypoints/distros/gentoo.txt
+
+diff --git a/build/pkgs/entrypoints/distros/gentoo.txt b/build/pkgs/entrypoints/distros/gentoo.txt
+new file mode 100644
+index 00000000..684ddd0
+--- /dev/null
++++ b/build/pkgs/entrypoints/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/entrypoints
+-- 
+cgit v1.0-1-gd88e
+
+
+From 34213eccb642a6bad64d89acaefa83ee702cb483 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:46:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for entrypoints.
+
+---
+ build/pkgs/entrypoints/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/entrypoints/spkg-configure.m4
+
+diff --git a/build/pkgs/entrypoints/spkg-configure.m4 b/build/pkgs/entrypoints/spkg-configure.m4
+new file mode 100644
+index 00000000..caed658
+--- /dev/null
++++ b/build/pkgs/entrypoints/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([entrypoints], [SAGE_PYTHON_PACKAGE_CHECK([entrypoints])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8e985614345da1a58fcdc127a9c0ddd790f9b5d2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:48:26 -0400
+Subject: Trac #29665: add Gentoo package information for markupsafe.
+
+---
+ build/pkgs/markupsafe/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/markupsafe/distros/gentoo.txt
+
+diff --git a/build/pkgs/markupsafe/distros/gentoo.txt b/build/pkgs/markupsafe/distros/gentoo.txt
+new file mode 100644
+index 00000000..9654e35
+--- /dev/null
++++ b/build/pkgs/markupsafe/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/markupsafe
+-- 
+cgit v1.0-1-gd88e
+
+
+From d370f229ae0988856f2e0d1f6ee2df2c47169106 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:48:55 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for markupsafe.
+
+---
+ build/pkgs/markupsafe/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/markupsafe/spkg-configure.m4
+
+diff --git a/build/pkgs/markupsafe/spkg-configure.m4 b/build/pkgs/markupsafe/spkg-configure.m4
+new file mode 100644
+index 00000000..79eb8db
+--- /dev/null
++++ b/build/pkgs/markupsafe/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([markupsafe], [SAGE_PYTHON_PACKAGE_CHECK([markupsafe])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c49b285ad9e25e6bc81a7e75d461d234fdd3ea68 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:30:49 -0400
+Subject: Trac #29665: add Gentoo package information for flit_core.
+
+---
+ build/pkgs/flit_core/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/flit_core/distros/gentoo.txt
+
+diff --git a/build/pkgs/flit_core/distros/gentoo.txt b/build/pkgs/flit_core/distros/gentoo.txt
+new file mode 100644
+index 00000000..fe6bea9
+--- /dev/null
++++ b/build/pkgs/flit_core/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/flit_core
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b0ce1c4f23cd9fc4316e1eb2b9b4bde394957f3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:32:11 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for flit_core.
+
+---
+ build/pkgs/flit_core/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/flit_core/spkg-configure.m4
+
+diff --git a/build/pkgs/flit_core/spkg-configure.m4 b/build/pkgs/flit_core/spkg-configure.m4
+new file mode 100644
+index 00000000..ee67557
+--- /dev/null
++++ b/build/pkgs/flit_core/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([flit_core], [SAGE_PYTHON_PACKAGE_CHECK([flit_core])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f006c231a81428b1e1e792f889bf974f90e3c831 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:34:06 -0400
+Subject: Trac #29665: add Gentoo package information for nest_asyncio.
+
+---
+ build/pkgs/nest_asyncio/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nest_asyncio/distros/gentoo.txt
+
+diff --git a/build/pkgs/nest_asyncio/distros/gentoo.txt b/build/pkgs/nest_asyncio/distros/gentoo.txt
+new file mode 100644
+index 00000000..ab742d2
+--- /dev/null
++++ b/build/pkgs/nest_asyncio/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nest_asyncio
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4a58d0a96a84475e765a01a64f5f44c48a317e0b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:34:43 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for nest_asyncio.
+
+---
+ build/pkgs/nest_asyncio/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nest_asyncio/spkg-configure.m4
+
+diff --git a/build/pkgs/nest_asyncio/spkg-configure.m4 b/build/pkgs/nest_asyncio/spkg-configure.m4
+new file mode 100644
+index 00000000..4d81527
+--- /dev/null
++++ b/build/pkgs/nest_asyncio/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nest_asyncio], [SAGE_PYTHON_PACKAGE_CHECK([nest_asyncio])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e50af937777ea778908bc09a7a79db3dd80fdf25 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:37:02 -0400
+Subject: Trac #29665: add Gentoo package information for ipython_genutils.
+
+---
+ build/pkgs/ipython_genutils/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython_genutils/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipython_genutils/distros/gentoo.txt b/build/pkgs/ipython_genutils/distros/gentoo.txt
+new file mode 100644
+index 00000000..01bc49d
+--- /dev/null
++++ b/build/pkgs/ipython_genutils/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipython_genutils
+-- 
+cgit v1.0-1-gd88e
+
+
+From ec3c0ce9db2ba13c1a49d1bcfb7a4b249cb7ae83 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:39:20 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipython_genutils.
+
+---
+ build/pkgs/ipython_genutils/spkg-configure.m4 | 4 ++++
+ 1 file changed, 4 insertions(+)
+ create mode 100644 build/pkgs/ipython_genutils/spkg-configure.m4
+
+diff --git a/build/pkgs/ipython_genutils/spkg-configure.m4 b/build/pkgs/ipython_genutils/spkg-configure.m4
+new file mode 100644
+index 00000000..b0ba86a
+--- /dev/null
++++ b/build/pkgs/ipython_genutils/spkg-configure.m4
+@@ -0,0 +1,4 @@
++SAGE_SPKG_CONFIGURE(
++  [ipython_genutils],
++  [SAGE_PYTHON_PACKAGE_CHECK([ipython_genutils])]
++)
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5c9e2e265115e5f10d4b459a475467e30b4bddde Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:40:03 -0400
+Subject: Trac #29665: add Gentoo package information for ipython.
+
+---
+ build/pkgs/ipython/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipython/distros/gentoo.txt b/build/pkgs/ipython/distros/gentoo.txt
+new file mode 100644
+index 00000000..8b76f18
+--- /dev/null
++++ b/build/pkgs/ipython/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipython
+-- 
+cgit v1.0-1-gd88e
+
+
+From 621e707ddd040a902d7dddf0bed1de2b54ab22f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 07:37:56 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipython.
+
+---
+ build/pkgs/ipython/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython/spkg-configure.m4
+
+diff --git a/build/pkgs/ipython/spkg-configure.m4 b/build/pkgs/ipython/spkg-configure.m4
+new file mode 100644
+index 00000000..02ab89f
+--- /dev/null
++++ b/build/pkgs/ipython/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipython], [SAGE_PYTHON_PACKAGE_CHECK([ipython])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20a0613f6d441da436f3e7b8047a72bf490882bd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 07:51:11 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipywidgets.
+
+---
+ build/pkgs/ipywidgets/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipywidgets/spkg-configure.m4
+
+diff --git a/build/pkgs/ipywidgets/spkg-configure.m4 b/build/pkgs/ipywidgets/spkg-configure.m4
+new file mode 100644
+index 00000000..51ca9be
+--- /dev/null
++++ b/build/pkgs/ipywidgets/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipywidgets], [SAGE_PYTHON_PACKAGE_CHECK([ipywidgets])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 76bcd386633acc02a1a3026339d0cbd258ada04e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 10:05:16 -0400
+Subject: Trac #29665: add Gentoo package information for wheel.
+
+---
+ build/pkgs/wheel/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wheel/distros/gentoo.txt
+
+diff --git a/build/pkgs/wheel/distros/gentoo.txt b/build/pkgs/wheel/distros/gentoo.txt
+new file mode 100644
+index 00000000..ec571d5
+--- /dev/null
++++ b/build/pkgs/wheel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 96c2dd2ca7812f5333bb9d45eadb7ac408e364ce Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:51:44 -0500
+Subject: Trac #29665: add Gentoo package information for terminado.
+
+---
+ build/pkgs/terminado/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/terminado/distros/gentoo.txt
+
+diff --git a/build/pkgs/terminado/distros/gentoo.txt b/build/pkgs/terminado/distros/gentoo.txt
+new file mode 100644
+index 00000000..1df16f1
+--- /dev/null
++++ b/build/pkgs/terminado/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/terminado
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0de0f5f3d235a4339b21e37ea13c9f5e59a82e59 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:52:35 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for terminado.
+
+---
+ build/pkgs/terminado/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/terminado/spkg-configure.m4
+
+diff --git a/build/pkgs/terminado/spkg-configure.m4 b/build/pkgs/terminado/spkg-configure.m4
+new file mode 100644
+index 00000000..5defc2f
+--- /dev/null
++++ b/build/pkgs/terminado/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([terminado], [SAGE_PYTHON_PACKAGE_CHECK([terminado])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d14a745c770b02822557e7cee0a98de1cb2f3a12 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:56:15 -0500
+Subject: Trac #29665: add Gentoo package information for cffi.
+
+---
+ build/pkgs/cffi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cffi/distros/gentoo.txt
+
+diff --git a/build/pkgs/cffi/distros/gentoo.txt b/build/pkgs/cffi/distros/gentoo.txt
+new file mode 100644
+index 00000000..81eeb81
+--- /dev/null
++++ b/build/pkgs/cffi/distros/gentoo.txt
+@@ -0,0 +1 @@
++virtual/python-cffi
+-- 
+cgit v1.0-1-gd88e
+
+
+From ce393c04afc69fe050e38f780d4e117164687d80 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:57:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for cffi.
+
+---
+ build/pkgs/cffi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cffi/spkg-configure.m4
+
+diff --git a/build/pkgs/cffi/spkg-configure.m4 b/build/pkgs/cffi/spkg-configure.m4
+new file mode 100644
+index 00000000..dc81875
+--- /dev/null
++++ b/build/pkgs/cffi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([cffi], [SAGE_PYTHON_PACKAGE_CHECK([cffi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 467093315b3fdd57c8caa2f95cf99ad52b0b84fb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:57:57 -0500
+Subject: Trac #29665: add Gentoo package information for pip.
+
+---
+ build/pkgs/pip/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pip/distros/gentoo.txt
+
+diff --git a/build/pkgs/pip/distros/gentoo.txt b/build/pkgs/pip/distros/gentoo.txt
+new file mode 100644
+index 00000000..1845454
+--- /dev/null
++++ b/build/pkgs/pip/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pip[vanilla]
+-- 
+cgit v1.0-1-gd88e
+
+
+From c597fd23f9f68dabbcb7e698d0569c3e6458f6d1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 09:07:26 -0500
+Subject: Trac #29665: new spkg-configure.m4 for pip.
+
+---
+ build/pkgs/pip/spkg-configure.m4 | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+ create mode 100644 build/pkgs/pip/spkg-configure.m4
+
+diff --git a/build/pkgs/pip/spkg-configure.m4 b/build/pkgs/pip/spkg-configure.m4
+new file mode 100644
+index 00000000..c7a5562
+--- /dev/null
++++ b/build/pkgs/pip/spkg-configure.m4
+@@ -0,0 +1,12 @@
++SAGE_SPKG_CONFIGURE([pip], [
++  dnl always run this macro because it changes the default value of
++  dnl the --with-system-<package> option.
++  SAGE_PYTHON_PACKAGE_CHECK([pip])
++
++  dnl if we might not install the spkg, make sure that "pip" is in
++  dnl the user's PATH, too.
++  AS_IF([test "x$sage_spkg_install_pip" != "xyes"], [
++    AC_CHECK_PROG(HAVE_PIP, pip, yes, no)
++    AS_IF([test "x$HAVE_PIP" = "xno"], [sage_spkg_install_pip=yes])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ef8f1e807bc55d7b8321777486fa867a7c135419 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 9 Nov 2021 09:09:04 -0500
+Subject: Trac #29665: set $SAGE_PIP_INSTALL_FLAGS for
+ --enable-system-site-packages.
+
+We need to pass some special flags to "pip install" to make it do the
+right thing in the precence of system-site packages. Here we introduce
+a new autoconf variable, SAGE_PIP_INSTALL_FLAGS, that will be used
+to pass those flags to the build system.
+
+With autoconf aware of the variable, we substitute its value into the
+sage-build-env-config script for use in spkg-install.in.
+---
+ build/bin/sage-build-env-config.in | 1 +
+ configure.ac                       | 9 +++++++++
+ 2 files changed, 10 insertions(+)
+
+diff --git a/build/bin/sage-build-env-config.in b/build/bin/sage-build-env-config.in
+index 92e7dad..ad62e5f 100644
+--- a/build/bin/sage-build-env-config.in
++++ b/build/bin/sage-build-env-config.in
+@@ -53,6 +53,7 @@ export SAGE_PARI_CFG="@SAGE_PARI_CFG@"
+ 
+ export SAGE_GLPK_PREFIX="@SAGE_GLPK_PREFIX@"
+ export SAGE_FREETYPE_PREFIX="@SAGE_FREETYPE_PREFIX@"
++export SAGE_PIP_INSTALL_FLAGS="@SAGE_PIP_INSTALL_FLAGS@"
+ export SAGE_SUITESPARSE_PREFIX="@SAGE_SUITESPARSE_PREFIX@"
+ 
+ export SAGE_CONFIGURE_FFLAS_FFPACK="@SAGE_CONFIGURE_FFLAS_FFPACK@"
+diff --git a/configure.ac b/configure.ac
+index 6fafb83..6ed07ac 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -441,6 +441,14 @@ AC_ARG_ENABLE(
+     [allow the use of python packages from the system (experimental; default: no)]
+   )], [
+   AS_IF([test "x$enable_system_site_packages" = "xyes"], [
++    dnl When installing python SPKGs in the presence of system-site
++    dnl packages, we need to --ignore-installed so that a patched SPKG
++    dnl can be installed in the presence of an unpatched system package
++    dnl that appears (to pip) to be identical. The --no-deps flag is
++    dnl then needed because --ignore-installed will make any installed
++    dnl dependencies invisible to pip, who does not appreciate that.
++    SAGE_PIP_INSTALL_FLAGS="${SAGE_PIP_INSTALL_FLAGS} --no-deps --ignore-installed"
++
+     SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
+ 
+     dnl We want to raise an error if the user asked for "system site
+@@ -453,6 +461,7 @@ AC_ARG_ENABLE(
+     with_system_python3="force"
+   ])
+ ])
++AC_SUBST([SAGE_PIP_INSTALL_FLAGS])
+ AC_SUBST([SAGE_VENV_FLAGS])
+ 
+ SAGE_SPKG_OPTIONS=""
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3cf365fef84e809e74abd2eb388e7a8e9af9d739 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 9 Nov 2021 21:01:58 -0500
+Subject: Trac #29665: pass $SAGE_PIP_INSTALL_FLAGS to sdh_pip_install.
+
+Since sdh_pip_install is usually called from spkg-install.in, the
+variables from sage-build-env-config will be available. Here we pass
+the contents of $SAGE_PIP_INSTALL_FLAGS to sage-pip-install
+unconditionally, and hope that the user ignores this variable unless
+he truly knows what he is doing.
+---
+ build/bin/sage-dist-helpers | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/build/bin/sage-dist-helpers b/build/bin/sage-dist-helpers
+index fe364e5..1032ac3 100644
+--- a/build/bin/sage-dist-helpers
++++ b/build/bin/sage-dist-helpers
+@@ -303,7 +303,11 @@ sdh_store_wheel() {
+ }
+ 
+ sdh_store_and_pip_install_wheel() {
+-    local pip_options=""
++    # The $SAGE_PIP_INSTALL_FLAGS variable is set by sage-build-env-config.
++    # We skip sanity checking its contents since you should either let sage
++    # decide what it contains, or really know what you are doing.
++    local pip_options="${SAGE_PIP_INSTALL_FLAGS}"
++
+     while [ $# -gt 0 ]; do
+         case $1 in
+             -*) pip_options="$pip_options $1"
+-- 
+cgit v1.0-1-gd88e
+
+
+From 50f0438ee857b8f0b7d7ad924e6bba9c5e1bc033 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:10:46 -0500
+Subject: Trac #29665: add Gentoo package information for pexpect.
+
+---
+ build/pkgs/pexpect/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pexpect/distros/gentoo.txt
+
+diff --git a/build/pkgs/pexpect/distros/gentoo.txt b/build/pkgs/pexpect/distros/gentoo.txt
+new file mode 100644
+index 00000000..30c4b60
+--- /dev/null
++++ b/build/pkgs/pexpect/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pexpect
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4d784688d997290b462646fa7f36114a41f3f453 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:11:25 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pexpect.
+
+---
+ build/pkgs/pexpect/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pexpect/spkg-configure.m4
+
+diff --git a/build/pkgs/pexpect/spkg-configure.m4 b/build/pkgs/pexpect/spkg-configure.m4
+new file mode 100644
+index 00000000..6520856
+--- /dev/null
++++ b/build/pkgs/pexpect/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pexpect], [SAGE_PYTHON_PACKAGE_CHECK([pexpect])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6447122dc76a3b7a58340dbed942db66530b5b07 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:12:05 -0500
+Subject: Trac #29665: add Gentoo package information for docutils.
+
+---
+ build/pkgs/docutils/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/docutils/distros/gentoo.txt
+
+diff --git a/build/pkgs/docutils/distros/gentoo.txt b/build/pkgs/docutils/distros/gentoo.txt
+new file mode 100644
+index 00000000..fe4a452
+--- /dev/null
++++ b/build/pkgs/docutils/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/docutils
+-- 
+cgit v1.0-1-gd88e
+
+
+From 709041480a5fc729b0ee7f1a8a3b16d4d65321b5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:12:38 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for docutils.
+
+---
+ build/pkgs/docutils/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/docutils/spkg-configure.m4
+
+diff --git a/build/pkgs/docutils/spkg-configure.m4 b/build/pkgs/docutils/spkg-configure.m4
+new file mode 100644
+index 00000000..3584e45
+--- /dev/null
++++ b/build/pkgs/docutils/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([docutils], [SAGE_PYTHON_PACKAGE_CHECK([docutils])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 782d38b48ab87afccc43fbc071e7b7ed48fb0a20 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:14:37 -0500
+Subject: Trac #29665: add Gentoo package information for nbclient.
+
+---
+ build/pkgs/nbclient/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbclient/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbclient/distros/gentoo.txt b/build/pkgs/nbclient/distros/gentoo.txt
+new file mode 100644
+index 00000000..06ff18d
+--- /dev/null
++++ b/build/pkgs/nbclient/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbclient
+-- 
+cgit v1.0-1-gd88e
+
+
+From 19ce09336532336f69db74381932d51a429dfaca Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:15:11 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for nbclient.
+
+---
+ build/pkgs/nbclient/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbclient/spkg-configure.m4
+
+diff --git a/build/pkgs/nbclient/spkg-configure.m4 b/build/pkgs/nbclient/spkg-configure.m4
+new file mode 100644
+index 00000000..14178b7
+--- /dev/null
++++ b/build/pkgs/nbclient/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbclient], [SAGE_PYTHON_PACKAGE_CHECK([nbclient])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c063b9de42c1780368000a563d0dbe80b6fff169 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:17:36 -0500
+Subject: Trac #29665: add Gentoo package information for argon2_cffi.
+
+---
+ build/pkgs/argon2_cffi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argon2_cffi/distros/gentoo.txt
+
+diff --git a/build/pkgs/argon2_cffi/distros/gentoo.txt b/build/pkgs/argon2_cffi/distros/gentoo.txt
+new file mode 100644
+index 00000000..2f12ca8
+--- /dev/null
++++ b/build/pkgs/argon2_cffi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/argon2-cffi
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0b4d5699dd51ea52550fba7db9e1cbb8bbac1892 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:18:35 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for argon2_cffi.
+
+---
+ build/pkgs/argon2_cffi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argon2_cffi/spkg-configure.m4
+
+diff --git a/build/pkgs/argon2_cffi/spkg-configure.m4 b/build/pkgs/argon2_cffi/spkg-configure.m4
+new file mode 100644
+index 00000000..03ebc63
+--- /dev/null
++++ b/build/pkgs/argon2_cffi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([argon2_cffi], [SAGE_PYTHON_PACKAGE_CHECK([argon2_cffi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2b4119558a6e0b1aa512848539a237676b035c83 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:30:48 -0500
+Subject: Trac #29665: fix package name in dateutil's install-requires.txt.
+
+---
+ build/pkgs/dateutil/install-requires.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/build/pkgs/dateutil/install-requires.txt b/build/pkgs/dateutil/install-requires.txt
+index 0ae93da..face537 100644
+--- a/build/pkgs/dateutil/install-requires.txt
++++ b/build/pkgs/dateutil/install-requires.txt
+@@ -1 +1 @@
+-dateutil >=2.8.1
++python-dateutil >=2.8.1
+-- 
+cgit v1.0-1-gd88e
+
+
+From df371b7c4d20a3353d43940306ad22e11aba29da Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:31:41 -0500
+Subject: Trac #29665: add Gentoo package information for dateutil.
+
+---
+ build/pkgs/dateutil/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/dateutil/distros/gentoo.txt
+
+diff --git a/build/pkgs/dateutil/distros/gentoo.txt b/build/pkgs/dateutil/distros/gentoo.txt
+new file mode 100644
+index 00000000..e129df7
+--- /dev/null
++++ b/build/pkgs/dateutil/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/python-dateutil
+-- 
+cgit v1.0-1-gd88e
+
+
+From 577695dfdf661ee26c0ffd767bdbf479d95f7fb4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:32:21 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for dateutil.
+
+---
+ build/pkgs/dateutil/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/dateutil/spkg-configure.m4
+
+diff --git a/build/pkgs/dateutil/spkg-configure.m4 b/build/pkgs/dateutil/spkg-configure.m4
+new file mode 100644
+index 00000000..fdcd127
+--- /dev/null
++++ b/build/pkgs/dateutil/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([dateutil], [SAGE_PYTHON_PACKAGE_CHECK([dateutil])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1984651caac624ec4bb58814ca1d57fe66f9881a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:33:51 -0500
+Subject: Trac #29665: add Gentoo package information for setuptools_scm.
+
+---
+ build/pkgs/setuptools_scm/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/setuptools_scm/distros/gentoo.txt
+
+diff --git a/build/pkgs/setuptools_scm/distros/gentoo.txt b/build/pkgs/setuptools_scm/distros/gentoo.txt
+new file mode 100644
+index 00000000..8989597
+--- /dev/null
++++ b/build/pkgs/setuptools_scm/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/setuptools_scm
+-- 
+cgit v1.0-1-gd88e
+
+
+From ebf7c854ed966e7353759be485c4f5a57b9a10fa Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:34:49 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for setuptools_scm.
+
+---
+ build/pkgs/setuptools_scm/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/setuptools_scm/spkg-configure.m4
+
+diff --git a/build/pkgs/setuptools_scm/spkg-configure.m4 b/build/pkgs/setuptools_scm/spkg-configure.m4
+new file mode 100644
+index 00000000..437148c
+--- /dev/null
++++ b/build/pkgs/setuptools_scm/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([setuptools_scm], [
++  SAGE_PYTHON_PACKAGE_CHECK([setuptools_scm])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0dee0d0c28f31b1f619e44c710a3c9e22d2b2544 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:36:33 -0500
+Subject: Trac #29665: add Gentoo package information for nbconvert.
+
+---
+ build/pkgs/nbconvert/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbconvert/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbconvert/distros/gentoo.txt b/build/pkgs/nbconvert/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c45a10
+--- /dev/null
++++ b/build/pkgs/nbconvert/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbconvert
+-- 
+cgit v1.0-1-gd88e
+
+
+From 473789eb11b1838bc32dc8a63509ee199afc8912 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:37:37 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for nbconvert.
+
+---
+ build/pkgs/nbconvert/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbconvert/spkg-configure.m4
+
+diff --git a/build/pkgs/nbconvert/spkg-configure.m4 b/build/pkgs/nbconvert/spkg-configure.m4
+new file mode 100644
+index 00000000..9b5dee3
+--- /dev/null
++++ b/build/pkgs/nbconvert/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbconvert], [SAGE_PYTHON_PACKAGE_CHECK([nbconvert])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f0703b594e57c980d605aa9bc8316c45a7858b3b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:41:51 -0500
+Subject: Trac #29665: add Gentoo package information for jupyter_core.
+
+---
+ build/pkgs/jupyter_core/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyter_core/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyter_core/distros/gentoo.txt b/build/pkgs/jupyter_core/distros/gentoo.txt
+new file mode 100644
+index 00000000..f168c5a
+--- /dev/null
++++ b/build/pkgs/jupyter_core/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyter_core
+-- 
+cgit v1.0-1-gd88e
+
+
+From 061a307cc4a6680d8500fde834975064e59540d5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:42:48 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jupyter_core.
+
+---
+ build/pkgs/jupyter_core/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyter_core/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyter_core/spkg-configure.m4 b/build/pkgs/jupyter_core/spkg-configure.m4
+new file mode 100644
+index 00000000..67df9c3
+--- /dev/null
++++ b/build/pkgs/jupyter_core/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyter_core], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyter_core])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b85abe964ce0b98b5842efe9cbad9bdb1c89202f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:47:08 -0500
+Subject: Trac #29665: add Gentoo package information for jupyter_client.
+
+---
+ build/pkgs/jupyter_client/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyter_client/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyter_client/distros/gentoo.txt b/build/pkgs/jupyter_client/distros/gentoo.txt
+new file mode 100644
+index 00000000..4f1de88
+--- /dev/null
++++ b/build/pkgs/jupyter_client/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyter_client
+-- 
+cgit v1.0-1-gd88e
+
+
+From 86323ff1e0b2507933df6bc2a96c9175957640c5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:48:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jupyter_client.
+
+---
+ build/pkgs/jupyter_client/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyter_client/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyter_client/spkg-configure.m4 b/build/pkgs/jupyter_client/spkg-configure.m4
+new file mode 100644
+index 00000000..fbd3498
+--- /dev/null
++++ b/build/pkgs/jupyter_client/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyter_client], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyter_client])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a8475e27dd30d752d05ab6fea6579e8623501d82 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:48:58 -0500
+Subject: Trac #29665: add Gentoo package information for snowballstemmer.
+
+---
+ build/pkgs/snowballstemmer/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/snowballstemmer/distros/gentoo.txt
+
+diff --git a/build/pkgs/snowballstemmer/distros/gentoo.txt b/build/pkgs/snowballstemmer/distros/gentoo.txt
+new file mode 100644
+index 00000000..63fd851
+--- /dev/null
++++ b/build/pkgs/snowballstemmer/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/snowballstemmer
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0833c9b781062b4ed86d619e050a6f5d60e36080 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:49:38 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for snowballstemmer.
+
+---
+ build/pkgs/snowballstemmer/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/snowballstemmer/spkg-configure.m4
+
+diff --git a/build/pkgs/snowballstemmer/spkg-configure.m4 b/build/pkgs/snowballstemmer/spkg-configure.m4
+new file mode 100644
+index 00000000..6aa0882
+--- /dev/null
++++ b/build/pkgs/snowballstemmer/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([snowballstemmer], [
++  SAGE_PYTHON_PACKAGE_CHECK([snowballstemmer])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 50a1cf2a2bcd7eeec64cbc3f70e3e9fbe5d850fe Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:50:47 -0500
+Subject: Trac #29665: add Gentoo package information for tornado.
+
+---
+ build/pkgs/tornado/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tornado/distros/gentoo.txt
+
+diff --git a/build/pkgs/tornado/distros/gentoo.txt b/build/pkgs/tornado/distros/gentoo.txt
+new file mode 100644
+index 00000000..6ae4b9f
+--- /dev/null
++++ b/build/pkgs/tornado/distros/gentoo.txt
+@@ -0,0 +1 @@
++www-servers/tornado
+-- 
+cgit v1.0-1-gd88e
+
+
+From 118f4da6e03476c726363e8e22ecda32f13bfc33 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:51:26 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for tornado.
+
+---
+ build/pkgs/tornado/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tornado/spkg-configure.m4
+
+diff --git a/build/pkgs/tornado/spkg-configure.m4 b/build/pkgs/tornado/spkg-configure.m4
+new file mode 100644
+index 00000000..1ee5bc9
+--- /dev/null
++++ b/build/pkgs/tornado/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tornado], [SAGE_PYTHON_PACKAGE_CHECK([tornado])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3850701747a6c8ef60840bdfdb589b28d4cd2b9a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:52:21 -0500
+Subject: Trac #29665: add Gentoo package information for jsonschema.
+
+---
+ build/pkgs/jsonschema/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jsonschema/distros/gentoo.txt
+
+diff --git a/build/pkgs/jsonschema/distros/gentoo.txt b/build/pkgs/jsonschema/distros/gentoo.txt
+new file mode 100644
+index 00000000..d708e4c
+--- /dev/null
++++ b/build/pkgs/jsonschema/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jsonschema
+-- 
+cgit v1.0-1-gd88e
+
+
+From 76e3917c8af781af00f642cfada7a79594429e30 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:54:03 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jsonschema.
+
+---
+ build/pkgs/jsonschema/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jsonschema/spkg-configure.m4
+
+diff --git a/build/pkgs/jsonschema/spkg-configure.m4 b/build/pkgs/jsonschema/spkg-configure.m4
+new file mode 100644
+index 00000000..b9e5e21
+--- /dev/null
++++ b/build/pkgs/jsonschema/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jsonschema], [SAGE_PYTHON_PACKAGE_CHECK([jsonschema])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From fd4a16c11669b6dd73ac6325bca820e76db00402 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:55:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ widgetsnbextension.
+
+---
+ build/pkgs/widgetsnbextension/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/widgetsnbextension/spkg-configure.m4
+
+diff --git a/build/pkgs/widgetsnbextension/spkg-configure.m4 b/build/pkgs/widgetsnbextension/spkg-configure.m4
+new file mode 100644
+index 00000000..bf82daf
+--- /dev/null
++++ b/build/pkgs/widgetsnbextension/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([widgetsnbextension], [
++  SAGE_PYTHON_PACKAGE_CHECK([widgetsnbextension])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8079a9f384e3c8480e157dd98c3db2f43c987f4e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:57:20 -0500
+Subject: Trac #29665: add Gentoo package information for importlib_resources.
+
+---
+ build/pkgs/importlib_resources/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/importlib_resources/distros/gentoo.txt
+
+diff --git a/build/pkgs/importlib_resources/distros/gentoo.txt b/build/pkgs/importlib_resources/distros/gentoo.txt
+new file mode 100644
+index 00000000..d5e1f2c
+--- /dev/null
++++ b/build/pkgs/importlib_resources/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/importlib_resources
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2c430d7c52f02779a6c41b98ac2f4edd8b6759c3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:58:00 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ importlib_resources.
+
+---
+ build/pkgs/importlib_resources/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/importlib_resources/spkg-configure.m4
+
+diff --git a/build/pkgs/importlib_resources/spkg-configure.m4 b/build/pkgs/importlib_resources/spkg-configure.m4
+new file mode 100644
+index 00000000..50df55b
+--- /dev/null
++++ b/build/pkgs/importlib_resources/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([importlib_resources], [
++  SAGE_PYTHON_PACKAGE_CHECK([importlib_resources])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 00d13d7bf2e50aae2ccef3b2b30293c70a922af2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:58:38 -0500
+Subject: Trac #29665: add Gentoo package information for kiwisolver.
+
+---
+ build/pkgs/kiwisolver/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/kiwisolver/distros/gentoo.txt
+
+diff --git a/build/pkgs/kiwisolver/distros/gentoo.txt b/build/pkgs/kiwisolver/distros/gentoo.txt
+new file mode 100644
+index 00000000..7b30c95
+--- /dev/null
++++ b/build/pkgs/kiwisolver/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/kiwisolver
+-- 
+cgit v1.0-1-gd88e
+
+
+From 72b7907ef7ea9fa4ff6948ea34cfe2f693ee6c31 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:59:09 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for kiwisolver.
+
+---
+ build/pkgs/kiwisolver/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/kiwisolver/spkg-configure.m4
+
+diff --git a/build/pkgs/kiwisolver/spkg-configure.m4 b/build/pkgs/kiwisolver/spkg-configure.m4
+new file mode 100644
+index 00000000..4e7ac97
+--- /dev/null
++++ b/build/pkgs/kiwisolver/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([kiwisolver], [SAGE_PYTHON_PACKAGE_CHECK([kiwisolver])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 479351279e4e0ea7e2d146434f0daba038765cfd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:00:04 -0500
+Subject: Trac #29665: add Gentoo package information for notebook.
+
+---
+ build/pkgs/notebook/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/notebook/distros/gentoo.txt
+
+diff --git a/build/pkgs/notebook/distros/gentoo.txt b/build/pkgs/notebook/distros/gentoo.txt
+new file mode 100644
+index 00000000..6475d72
+--- /dev/null
++++ b/build/pkgs/notebook/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/notebook
+-- 
+cgit v1.0-1-gd88e
+
+
+From f4d9242ea654977f8ad7865c82eec593e11a36bc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:01:42 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for notebook.
+
+---
+ build/pkgs/notebook/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/notebook/spkg-configure.m4
+
+diff --git a/build/pkgs/notebook/spkg-configure.m4 b/build/pkgs/notebook/spkg-configure.m4
+new file mode 100644
+index 00000000..a17ba95
+--- /dev/null
++++ b/build/pkgs/notebook/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([notebook], [SAGE_PYTHON_PACKAGE_CHECK([notebook])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9837070c7f8e9a71283b84d49d4fd2c94b78a464 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:02:38 -0500
+Subject: Trac #29665: add Gentoo package information for matplotlib_inline.
+
+---
+ build/pkgs/matplotlib_inline/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/matplotlib_inline/distros/gentoo.txt
+
+diff --git a/build/pkgs/matplotlib_inline/distros/gentoo.txt b/build/pkgs/matplotlib_inline/distros/gentoo.txt
+new file mode 100644
+index 00000000..6a5859c
+--- /dev/null
++++ b/build/pkgs/matplotlib_inline/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/matplotlib-inline
+-- 
+cgit v1.0-1-gd88e
+
+
+From 750be73b25b92b4875e47d044360ac0e1116ec3e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:03:28 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for matplotlib_inline.
+
+---
+ build/pkgs/matplotlib_inline/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/matplotlib_inline/spkg-configure.m4
+
+diff --git a/build/pkgs/matplotlib_inline/spkg-configure.m4 b/build/pkgs/matplotlib_inline/spkg-configure.m4
+new file mode 100644
+index 00000000..e59658f
+--- /dev/null
++++ b/build/pkgs/matplotlib_inline/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([matplotlib_inline], [
++  SAGE_PYTHON_PACKAGE_CHECK([matplotlib_inline])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 273505f49698dcd2ab30c2756b07113c9b7e7791 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:04:10 -0500
+Subject: Trac #29665: add Gentoo package information for ipykernel.
+
+---
+ build/pkgs/ipykernel/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipykernel/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipykernel/distros/gentoo.txt b/build/pkgs/ipykernel/distros/gentoo.txt
+new file mode 100644
+index 00000000..88aab61
+--- /dev/null
++++ b/build/pkgs/ipykernel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipykernel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 629ad36c9e4ae0cdff4a013289b4f2911442445e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:04:46 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for ipykernel.
+
+---
+ build/pkgs/ipykernel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipykernel/spkg-configure.m4
+
+diff --git a/build/pkgs/ipykernel/spkg-configure.m4 b/build/pkgs/ipykernel/spkg-configure.m4
+new file mode 100644
+index 00000000..94ecc2d
+--- /dev/null
++++ b/build/pkgs/ipykernel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipykernel], [SAGE_PYTHON_PACKAGE_CHECK([ipykernel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b8d709edb6a24fd5868ee2818b56e78257b2eafa Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:05:26 -0500
+Subject: Trac #29665: add Gentoo package information for prompt_toolkit.
+
+---
+ build/pkgs/prompt_toolkit/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/prompt_toolkit/distros/gentoo.txt
+
+diff --git a/build/pkgs/prompt_toolkit/distros/gentoo.txt b/build/pkgs/prompt_toolkit/distros/gentoo.txt
+new file mode 100644
+index 00000000..6902484
+--- /dev/null
++++ b/build/pkgs/prompt_toolkit/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/prompt_toolkit
+-- 
+cgit v1.0-1-gd88e
+
+
+From 16c0b5e767ae4dac4440510b7253e5c8642b7d2c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:10:39 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for prompt_toolkit.
+
+---
+ build/pkgs/prompt_toolkit/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/prompt_toolkit/spkg-configure.m4
+
+diff --git a/build/pkgs/prompt_toolkit/spkg-configure.m4 b/build/pkgs/prompt_toolkit/spkg-configure.m4
+new file mode 100644
+index 00000000..fd8c1a6
+--- /dev/null
++++ b/build/pkgs/prompt_toolkit/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([prompt_toolkit], [
++  SAGE_PYTHON_PACKAGE_CHECK([prompt_toolkit])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0cd9283e8bb6c8ae413fc8f715c021f7ec3ca2c8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:12:10 -0500
+Subject: Trac #29665: add Gentoo package information for charset_normalizer.
+
+---
+ build/pkgs/charset_normalizer/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/charset_normalizer/distros/gentoo.txt
+
+diff --git a/build/pkgs/charset_normalizer/distros/gentoo.txt b/build/pkgs/charset_normalizer/distros/gentoo.txt
+new file mode 100644
+index 00000000..eefeb89
+--- /dev/null
++++ b/build/pkgs/charset_normalizer/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/charset_normalizer
+-- 
+cgit v1.0-1-gd88e
+
+
+From a04b01a9ab59097d189edcc5ddcb461faede83b2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:12:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ charset_normalizer.
+
+---
+ build/pkgs/charset_normalizer/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/charset_normalizer/spkg-configure.m4
+
+diff --git a/build/pkgs/charset_normalizer/spkg-configure.m4 b/build/pkgs/charset_normalizer/spkg-configure.m4
+new file mode 100644
+index 00000000..18b18cf
+--- /dev/null
++++ b/build/pkgs/charset_normalizer/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([charset_normalizer], [
++  SAGE_PYTHON_PACKAGE_CHECK([charset_normalizer])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d2ea08138711c53046f977b586f33b09b176b2e3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:13:37 -0500
+Subject: Trac #29665: add Gentoo package information for prometheus_client.
+
+---
+ build/pkgs/prometheus_client/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/prometheus_client/distros/gentoo.txt
+
+diff --git a/build/pkgs/prometheus_client/distros/gentoo.txt b/build/pkgs/prometheus_client/distros/gentoo.txt
+new file mode 100644
+index 00000000..aa2889c
+--- /dev/null
++++ b/build/pkgs/prometheus_client/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/prometheus_client
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b0393200e9edd3e26b8a55ba67e5710e7403fcb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:15:09 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for prometheus_client.
+
+---
+ build/pkgs/prometheus_client/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/prometheus_client/spkg-configure.m4
+
+diff --git a/build/pkgs/prometheus_client/spkg-configure.m4 b/build/pkgs/prometheus_client/spkg-configure.m4
+new file mode 100644
+index 00000000..b494588
+--- /dev/null
++++ b/build/pkgs/prometheus_client/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([prometheus_client], [
++  SAGE_PYTHON_PACKAGE_CHECK([prometheus_client])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From cdcd85284f43ca4ad18353ec3527b2901e57b788 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:17:23 -0500
+Subject: Trac #29665: add Gentoo package information for pybind11.
+
+---
+ build/pkgs/pybind11/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pybind11/distros/gentoo.txt
+
+diff --git a/build/pkgs/pybind11/distros/gentoo.txt b/build/pkgs/pybind11/distros/gentoo.txt
+new file mode 100644
+index 00000000..0c500b3
+--- /dev/null
++++ b/build/pkgs/pybind11/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pybind11
+-- 
+cgit v1.0-1-gd88e
+
+
+From efdd1eb64c4799fe3cdf2221824182941b3fda2d Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:17:51 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pybind11.
+
+---
+ build/pkgs/pybind11/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pybind11/spkg-configure.m4
+
+diff --git a/build/pkgs/pybind11/spkg-configure.m4 b/build/pkgs/pybind11/spkg-configure.m4
+new file mode 100644
+index 00000000..cce1cf5
+--- /dev/null
++++ b/build/pkgs/pybind11/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pybind11], [SAGE_PYTHON_PACKAGE_CHECK([pybind11])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b2128f33b68ea33927284116ea598dd186902400 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:19:23 -0500
+Subject: Trac #29665: add Gentoo package information for pkgconfig.
+
+---
+ build/pkgs/pkgconfig/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pkgconfig/distros/gentoo.txt
+
+diff --git a/build/pkgs/pkgconfig/distros/gentoo.txt b/build/pkgs/pkgconfig/distros/gentoo.txt
+new file mode 100644
+index 00000000..32e8618
+--- /dev/null
++++ b/build/pkgs/pkgconfig/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pkgconfig
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b373b49e06aadeb36dc57e500da9a322460e658 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:19:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pkgconfig.
+
+---
+ build/pkgs/pkgconfig/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pkgconfig/spkg-configure.m4
+
+diff --git a/build/pkgs/pkgconfig/spkg-configure.m4 b/build/pkgs/pkgconfig/spkg-configure.m4
+new file mode 100644
+index 00000000..6708293
+--- /dev/null
++++ b/build/pkgs/pkgconfig/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pkgconfig], [SAGE_PYTHON_PACKAGE_CHECK([pkgconfig])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ce578729eb0d14baab365351ba9a9ffffb7b79f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:21:10 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_serializinghtml.
+
+---
+ build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt b/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+new file mode 100644
+index 00000000..38bca8f
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-serializinghtml
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb0f42c32bbce0e4488678312f5e2d88c6f42c9b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:21:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_serializinghtml.
+
+---
+ build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4 b/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+new file mode 100644
+index 00000000..be8e625
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_serializinghtml], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_serializinghtml])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e47dcf985e40475de85c9436a85537751318bc3d Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:22:54 -0500
+Subject: Trac #29665: add Gentoo package information for sphinxcontrib_jsmath.
+
+---
+ build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt b/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+new file mode 100644
+index 00000000..041a471
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-jsmath
+-- 
+cgit v1.0-1-gd88e
+
+
+From 72cff6fd35f93de4fa855bc870569dd733ff5c24 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:23:49 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_jsmath.
+
+---
+ build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4 b/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+new file mode 100644
+index 00000000..e46bde2
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_jsmath], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_jsmath])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a36395d70f759449cd63c1b0990fbdcb4cb25ca0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:24:26 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_devhelp.
+
+---
+ build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..9b5c899
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-devhelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9953a5dd1646ed0ad51d2e3935cf609bc9e7fd1c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:25:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_devhelp.
+
+---
+ build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+new file mode 100644
+index 00000000..8728136
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_devhelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_devhelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b199d5363aad93f3cb23f7904c9553a28b06348f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:25:53 -0500
+Subject: Trac #29665: add Gentoo package information for sphinxcontrib_qthelp.
+
+---
+ build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..7210099
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-qthelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 94ac8806739f3938e73f5857328e91e0d42e98d2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:26:28 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_qthelp.
+
+---
+ build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+new file mode 100644
+index 00000000..81ea5e1
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_qthelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_qthelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From beedc154aa405e8a58aee8889f510db07adc89a7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:26:54 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_applehelp.
+
+---
+ build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..66ac8da
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-applehelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 07d47c3673d6b35423b71f621cb400989c0101c2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:27:19 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_applehelp.
+
+---
+ build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+new file mode 100644
+index 00000000..e834aed
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_applehelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_applehelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 333a66546c5d421735c49dbafd7370a827f22781 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:27:46 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_htmlhelp.
+
+---
+ build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..e080bac
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-htmlhelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From bfaeb3962254439b63f1f2e0e883de462c7831be Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:29:18 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_htmlhelp.
+
+---
+ build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+new file mode 100644
+index 00000000..c77b003
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_htmlhelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_htmlhelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 782cde13da06e8b85806cb7cbc8aceee0364e639 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:30:23 -0500
+Subject: Trac #29665: add Gentoo package information for jupyterlab_pygments.
+
+---
+ build/pkgs/jupyterlab_pygments/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyterlab_pygments/distros/gentoo.txt b/build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+new file mode 100644
+index 00000000..c57b4f1
+--- /dev/null
++++ b/build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyterlab_pygments
+-- 
+cgit v1.0-1-gd88e
+
+
+From 39f974cfa4a8c6e5dd897f152f83ec82f40ee9f7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:31:13 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ jupyterlab_pygments.
+
+---
+ build/pkgs/jupyterlab_pygments/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyterlab_pygments/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyterlab_pygments/spkg-configure.m4 b/build/pkgs/jupyterlab_pygments/spkg-configure.m4
+new file mode 100644
+index 00000000..e46e21f
+--- /dev/null
++++ b/build/pkgs/jupyterlab_pygments/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyterlab_pygments], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyterlab_pygments])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From db704620700fd36cec3bf6125938f3ee00a9eb5e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:29:15 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for ply.
+
+---
+ build/pkgs/ply/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ply/spkg-configure.m4
+
+diff --git a/build/pkgs/ply/spkg-configure.m4 b/build/pkgs/ply/spkg-configure.m4
+new file mode 100644
+index 00000000..ffb0030
+--- /dev/null
++++ b/build/pkgs/ply/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ply], [SAGE_PYTHON_PACKAGE_CHECK([ply])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6aac31dabcdfdef228d7780398a3fda1a4cc566f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:29:51 -0500
+Subject: Trac #29665: add Gentoo package information for ply.
+
+---
+ build/pkgs/ply/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ply/distros/gentoo.txt
+
+diff --git a/build/pkgs/ply/distros/gentoo.txt b/build/pkgs/ply/distros/gentoo.txt
+new file mode 100644
+index 00000000..c8b1630
+--- /dev/null
++++ b/build/pkgs/ply/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ply
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb8d3372936ec37470d69687a0f91592129460ae Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:30:33 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for gast.
+
+---
+ build/pkgs/gast/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/gast/spkg-configure.m4
+
+diff --git a/build/pkgs/gast/spkg-configure.m4 b/build/pkgs/gast/spkg-configure.m4
+new file mode 100644
+index 00000000..26ec59f
+--- /dev/null
++++ b/build/pkgs/gast/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([gast], [SAGE_PYTHON_PACKAGE_CHECK([gast])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1cdc4046a88f1c2b4e5c162f66c6db6090b24194 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:31:15 -0500
+Subject: Trac #29665: add Gentoo package information for gast.
+
+---
+ build/pkgs/gast/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/gast/distros/gentoo.txt
+
+diff --git a/build/pkgs/gast/distros/gentoo.txt b/build/pkgs/gast/distros/gentoo.txt
+new file mode 100644
+index 00000000..3be5e7e
+--- /dev/null
++++ b/build/pkgs/gast/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/gast
+-- 
+cgit v1.0-1-gd88e
+
+
+From 96068b8a3742b65d619190e1d9fa5db399e6b4f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:32:20 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pythran.
+
+---
+ build/pkgs/pythran/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pythran/spkg-configure.m4
+
+diff --git a/build/pkgs/pythran/spkg-configure.m4 b/build/pkgs/pythran/spkg-configure.m4
+new file mode 100644
+index 00000000..592e95b
+--- /dev/null
++++ b/build/pkgs/pythran/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pythran], [SAGE_PYTHON_PACKAGE_CHECK([pythran])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1fa0fad3ae8f7e559c6fc315c6773a7d8aac0bfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:32:55 -0500
+Subject: Trac #29665: add Gentoo package information for pythran.
+
+---
+ build/pkgs/pythran/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pythran/distros/gentoo.txt
+
+diff --git a/build/pkgs/pythran/distros/gentoo.txt b/build/pkgs/pythran/distros/gentoo.txt
+new file mode 100644
+index 00000000..1bb7cdc
+--- /dev/null
++++ b/build/pkgs/pythran/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pythran
+-- 
+cgit v1.0-1-gd88e
+
+
+From d26370e5b8c88e76abfb7c27e3defb71c9e9f711 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:33:50 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for beniget.
+
+---
+ build/pkgs/beniget/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/beniget/spkg-configure.m4
+
+diff --git a/build/pkgs/beniget/spkg-configure.m4 b/build/pkgs/beniget/spkg-configure.m4
+new file mode 100644
+index 00000000..8ae6101
+--- /dev/null
++++ b/build/pkgs/beniget/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([beniget], [SAGE_PYTHON_PACKAGE_CHECK([beniget])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From eeeb296ed9b9694a865534103fd58e62a151ef5e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:34:22 -0500
+Subject: Trac #29665: add Gentoo package information for beniget.
+
+---
+ build/pkgs/beniget/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/beniget/distros/gentoo.txt
+
+diff --git a/build/pkgs/beniget/distros/gentoo.txt b/build/pkgs/beniget/distros/gentoo.txt
+new file mode 100644
+index 00000000..1a5972c
+--- /dev/null
++++ b/build/pkgs/beniget/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/beniget
+-- 
+cgit v1.0-1-gd88e
+
+
+From 078b2ff272d0eeff5cce40ad7eb176d9ddd7bdff Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:35:37 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for alabaster.
+
+---
+ build/pkgs/alabaster/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/alabaster/spkg-configure.m4
+
+diff --git a/build/pkgs/alabaster/spkg-configure.m4 b/build/pkgs/alabaster/spkg-configure.m4
+new file mode 100644
+index 00000000..4eca6e0
+--- /dev/null
++++ b/build/pkgs/alabaster/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([alabaster], [SAGE_PYTHON_PACKAGE_CHECK([alabaster])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7dc264353e5f64110431ff28c1b8b7e89699e9bd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:36:06 -0500
+Subject: Trac #29665: add Gentoo package information for alabaster.
+
+---
+ build/pkgs/alabaster/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/alabaster/distros/gentoo.txt
+
+diff --git a/build/pkgs/alabaster/distros/gentoo.txt b/build/pkgs/alabaster/distros/gentoo.txt
+new file mode 100644
+index 00000000..cffece6
+--- /dev/null
++++ b/build/pkgs/alabaster/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/alabaster
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8011a5e675e7e61a77ce34a299ee961a9f44253f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:43:59 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ importlib_metadata.
+
+---
+ build/pkgs/importlib_metadata/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/importlib_metadata/spkg-configure.m4
+
+diff --git a/build/pkgs/importlib_metadata/spkg-configure.m4 b/build/pkgs/importlib_metadata/spkg-configure.m4
+new file mode 100644
+index 00000000..0554e52
+--- /dev/null
++++ b/build/pkgs/importlib_metadata/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([importlib_metadata], [
++  SAGE_PYTHON_PACKAGE_CHECK([importlib_metadata])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 928ca0019e3ec6c4541a16b28bcc6710df6d010b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:44:28 -0500
+Subject: Trac #29665: add Gentoo package information for importlib_metadata.
+
+---
+ build/pkgs/importlib_metadata/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/importlib_metadata/distros/gentoo.txt
+
+diff --git a/build/pkgs/importlib_metadata/distros/gentoo.txt b/build/pkgs/importlib_metadata/distros/gentoo.txt
+new file mode 100644
+index 00000000..4f92786
+--- /dev/null
++++ b/build/pkgs/importlib_metadata/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/importlib_metadata
+-- 
+cgit v1.0-1-gd88e
+
+
+From 135f184f7498a2046065e669723e68efe2d65cee Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 21:16:58 -0500
+Subject: Trac #29665: fix sage.misc.package doctest with system alabaster.
+
+When alabaster from the system is used, these tests won't be able to
+find its SPKG installed. Add some ellipses, and switch one test to
+look for sage_conf instead.
+---
+ src/sage/misc/package.py | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/sage/misc/package.py b/src/sage/misc/package.py
+index 84f3d50..c7ad206 100644
+--- a/src/sage/misc/package.py
++++ b/src/sage/misc/package.py
+@@ -386,9 +386,9 @@ def installed_packages(exclude_pip=True):
+     EXAMPLES::
+ 
+         sage: sorted(installed_packages().keys())  # optional - build
+-        [...'alabaster', ...'sage_conf', ...]
+-        sage: installed_packages()['alabaster']  # optional - build, random
+-        '0.7.12'
++        [...'sage_conf', ...]
++        sage: installed_packages()['sage_conf']  # optional - build, random
++        '9.5'
+ 
+     .. SEEALSO::
+ 
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch b/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
new file mode 100644
index 000000000000..7ef3826aa4d2
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
@@ -0,0 +1,27 @@
+diff --git a/src/bin/sage-runtests b/src/bin/sage-runtests
+index 589dc8cd37..6bb8bf99a4 100755
+--- a/src/bin/sage-runtests
++++ b/src/bin/sage-runtests
+@@ -154,21 +154,4 @@ if __name__ == "__main__":
+     DC = DocTestController(args, args.filenames)
+     err = DC.run()
+ 
+-    try:
+-        exit_code_pytest = 0
+-        import pytest
+-        pytest_options = ["--import-mode", "importlib"]
+-        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.")
+-
+-    if err == 0:
+-        sys.exit(exit_code_pytest)
+-    else:
+-        sys.exit(err)
++    sys.exit(err)
diff --git a/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch b/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
new file mode 100644
index 000000000000..093e3d56eb33
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
@@ -0,0 +1,42 @@
+More site packages not included in trac 29665
+
+diff --git a/build/pkgs/gmpy2/spkg-configure.m4 b/build/pkgs/gmpy2/spkg-configure.m4
+new file mode 100644
+index 0000000000..2d0390f7db
+--- /dev/null
++++ b/build/pkgs/gmpy2/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([gmpy2], [SAGE_PYTHON_PACKAGE_CHECK([gmpy2])])
+diff --git a/build/pkgs/sphinx/spkg-configure.m4 b/build/pkgs/sphinx/spkg-configure.m4
+new file mode 100644
+index 0000000000..e149fbb2cf
+--- /dev/null
++++ b/build/pkgs/sphinx/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([sphinx], [SAGE_PYTHON_PACKAGE_CHECK([sphinx])])
+diff --git a/build/pkgs/typing_extensions/spkg-configure.m4 b/build/pkgs/typing_extensions/spkg-configure.m4
+new file mode 100644
+index 0000000000..d475fd8257
+--- /dev/null
++++ b/build/pkgs/typing_extensions/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([typing_extensions], [SAGE_PYTHON_PACKAGE_CHECK([typing_extensions])])
+-- 
+diff --git a/build/pkgs/gmpy2/install-requires.txt b/build/pkgs/gmpy2/install-requires.txt
+index 51d24518ef..c25feff557 100644
+--- a/build/pkgs/gmpy2/install-requires.txt
++++ b/build/pkgs/gmpy2/install-requires.txt
+@@ -1,3 +1 @@
+-# We would like to write gmpy2 >=2.1.0b5, but pipenv does not accept prereleases in version ranges
+-# https://github.com/pypa/pipenv/issues/1760
+-gmpy2 ==2.1.0rc1
++gmpy2 >=2.1
+diff --git a/build/pkgs/ptyprocess/install-requires.txt b/build/pkgs/ptyprocess/install-requires.txt
+index de89260872..7c336f636c 100644
+--- a/build/pkgs/ptyprocess/install-requires.txt
++++ b/build/pkgs/ptyprocess/install-requires.txt
+@@ -1,3 +1,3 @@
+-ptyprocess ==0.5.1
++ptyprocess
+ # https://trac.sagemath.org/ticket/31280#comment:42 and following
+ # sagelib is not compatible with ptyprocess 0.5.2, 0.6, and 0.7
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 33b40acbabeb..a32c5d18f378 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -22,11 +22,13 @@ distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
 checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
 python_version=3
 
-build_options="debug system_python3"
+build_options="debug system_python3 system_site_packages"
 desc_option_debug="Build with debug symbols"
 desc_option_system_python="Build using system python 3"
-build_options_default="system_python3"
+desc_option_system_python="Build using system python site-packages"
+build_options_default="system_python3 system_site_packages"
 configure_args+=" $(vopt_with system_python3)"
+configure_args+=" $(vopt_enable system_site_packages)"
 
 # path where sage will be installed
 _SAGE_ROOT=/usr/lib/sage-${version}
@@ -163,6 +165,8 @@ do_check() {
 	fi
 	if [ "$XBPS_CHECK_PKGS" = full ]; then
 		_test_args="--long $_test_args"
+	else
+		_test_args="--warn-long 5.0 $_test_args"
 	fi
 	# since make check will build the docs, run test like this instead
 	./sage -tp ${XBPS_MAKEJOBS} ${_test_args}
@@ -182,7 +186,7 @@ makedepends+=" automake gettext gettext-devel"
 # other host dependencies
 makedepends+=" cmake curl git ninja pandoc patch pkg-config python3 tox"
 
-# already in void
+# standard dependencies
 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
@@ -202,7 +206,49 @@ makedepends+="
  brial-devel cliquer-devel gfan libbraiding-devel libhomfly-devel
  lrcalc-devel nauty-devel palp tachyon
  maxima-ecl primesieve-devel primecount-devel
+ ffmpeg ImageMagick
 "
 
 # TODO: optional
 # 4ti2 coxeter3 libsemigroups lrslib pdf2svg perl_mongodb polymake
+
+# TODO: standard
+# cvxopt importlib_resources
+
+# python packages for trac-29665
+_sage_python3_modules="
+ python3-Babel python3-Jinja2 python3-MarkupSafe python3-Pillow
+ python3-Pygments python3-Sphinx python3-alabaster python3-argcomplete
+ python3-argon2 python3-attrs python3-backcall python3-beniget
+ python3-bleach python3-certifi python3-cffi python3-charset-normalizer
+ python3-cycler python3-dateutil python3-decorator python3-defusedxml
+ python3-docutils python3-entrypoints python3-flit_core python3-gast
+ python3-gmpy2 python3-html5lib python3-idna python3-imagesize
+ python3-importlib_metadata python3-ipython python3-ipython_genutils
+ python3-ipython_ipykernel python3-jedi python3-jsonschema
+ python3-jupyter_client python3-jupyter_core python3-jupyter_ipywidgets
+ python3-jupyter_nbconvert python3-jupyter_nbformat
+ python3-jupyter_notebook python3-jupyterlab_pygments python3-kiwisolver
+ python3-matplotlib python3-matplotlib-inline python3-mistune
+ python3-mpmath python3-nbclient python3-nest_asyncio python3-networkx
+ python3-numpy python3-packaging python3-pandocfilters python3-parsing
+ python3-parso python3-pexpect python3-pickleshare python3-pip
+ python3-pkgconfig python3-pluggy python3-ply python3-prometheus_client
+ python3-prompt_toolkit python3-ptyprocess python3-py python3-pybind11
+ python3-pycparser python3-pyrsistent python3-pytz python3-pyzmq
+ python3-requests python3-scipy python3-send2trash python3-setuptools
+ python3-setuptools_scm python3-simplegeneric python3-six
+ python3-snowballstemmer python3-sphinxcontrib-applehelp
+ python3-sphinxcontrib-devhelp python3-sphinxcontrib-htmlhelp
+ python3-sphinxcontrib-jsmath python3-sphinxcontrib-qthelp
+ python3-sphinxcontrib-serializinghtml python3-sympy python3-terminado
+ python3-testpath python3-texttable python3-toml python3-tomli
+ python3-tornado python3-traitlets python3-typing_extensions
+ python3-tzlocal python3-urllib3 python3-wcwidth python3-webencodings
+ python3-wheel python3-zipp pythran
+ "
+
+if [ "$build_option_system_site_packages" ]; then
+	makedepends+=" $_sage_python3_modules"
+	depends+=" $_sage_python3_modules"
+fi

From 9c545f650c3af512133680cbe0c615abe6c42305 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 3 Jan 2022 20:47:52 -0300
Subject: [PATCH 24/39] sagemath: use small source tarball + upstream packages

---
 srcpkgs/sagemath/template | 97 ++++++++++++++++++++++++++-------------
 1 file changed, 64 insertions(+), 33 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index a32c5d18f378..0de0061b09df 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -18,8 +18,8 @@ short_desc="Open source mathematics software"
 maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
-distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
-checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
+distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
+checksum=aea4c5a8d3b32af2fba644269b9daf4f62471471ba2d7d83da0f8098a5f53225
 python_version=3
 
 build_options="debug system_python3 system_site_packages"
@@ -33,42 +33,72 @@ configure_args+=" $(vopt_enable system_site_packages)"
 # 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} ;;
-esac
+_SAGE_UPSTREAM_MIRROR=https://mirrors.mit.edu/sage/spkg/upstream
 
-# extra upstream packages (trac-32968 / trac-33040)
 _upstream="
- https://pypi.io/packages/source/s/sphinx/Sphinx-4.3.1.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
+${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
+${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
+${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
+${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
+${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
+${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
+${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
+https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
+https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
+http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
+${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
+${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
+${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
+${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
+${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
+https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
+${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
+https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
+${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
 "
 
 checksum+="
- 32a5b3e9a1b176cc25ed048557d4d3d01af635e6b76c5bc7a43b0a34447fbd45
-
- 9c87405839a19696e837b3b818fed3f5f69f16f1eec1a1ad77e043dcea9c772f
- fc4453705b81d03568d5b808ad8f09c77c47534f6ac2e72e733f9ca4714aa75c
- acad2d8b20a1af07d4e4c9d2e9285c5ed9104354062f275f3fcd88dcef4f1326
- 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
- 78884e7c1d4b00ce3cea67b44566851c4343c120abd683433ce934a68ea58872
- 0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86
- b8e2f83c56e141920c39464b852de3719dfbfb6e3c99a2d8da0edf4fb33176ed
- d9bdec0013ef1eb5a84ab39a3b3868911598afa494f5faa038647101504e2b81
- b2e9810e09c3a47b73ce9cab5a72243a1258f61e7900969097a817232246ce1c
- 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
- 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
+c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
+d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
+4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
+3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
+03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
+5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
+cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
+5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
+581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
+6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
+07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
+a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
+ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
+d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
+169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
+5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
+cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
+471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
+78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
+edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
+b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
+3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
+545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
+cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
+718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
+dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
 "
 
 for u in ${_upstream}; do
@@ -101,6 +131,7 @@ post_extract() {
 	mv -T $wrksrc $_SAGE_ROOT
 	ln -srfT $_SAGE_ROOT $wrksrc
 
+	mkdir -p $wrksrc/upstream
 	for u in ${_upstream}; do
 		cp "$XBPS_SRCDISTDIR/${pkgname}-${version}/${u##*[/>]}" $wrksrc/upstream
 	done

From d0b0a656fa4993f3cf4ef8165a13717c66b35ab7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 13:38:02 -0300
Subject: [PATCH 25/39] sagemath: for CI use fixed random-seed=0

---
 srcpkgs/sagemath/template | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 0de0061b09df..b5b99d2c122d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -194,6 +194,10 @@ do_check() {
 	if [ -z "$_test_args" ]; then
 		_test_args=--all
 	fi
+	if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
+		# for CI use a predictable random seed
+		_test_args="--random-seed=0 $_test_args"
+	fi
 	if [ "$XBPS_CHECK_PKGS" = full ]; then
 		_test_args="--long $_test_args"
 	else

From 3813d63435820909fc5e4b1b5e5093ba50a48d2c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 14:40:27 -0300
Subject: [PATCH 26/39] sagemath: upstream two patches

---
 ...ble-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch} |  6 +++---
 ...rse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch} | 10 +++++-----
 2 files changed, 8 insertions(+), 8 deletions(-)
 rename srcpkgs/sagemath/patches/{0001-sage-site-exec-only-if-it-is-executable.patch => trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch} (94%)
 rename srcpkgs/sagemath/patches/{0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch => trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch} (81%)

diff --git a/srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch b/srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
similarity index 94%
rename from srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch
rename to srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
index ce17c6d6e954..7fdb3d697222 100644
--- a/srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch
+++ b/srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
@@ -1,14 +1,14 @@
 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
+Subject: 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
+index 4c0fa17..153e610 100755
 --- a/src/bin/sage
 +++ b/src/bin/sage
 @@ -129,7 +129,7 @@ usage() {
@@ -39,5 +39,5 @@ index 4c0fa17426..153e610a2e 100755
              # fallthrough if there is no sage-site script
          fi
 -- 
-2.34.1
+cgit v1.0-1-gd88e
 
diff --git a/srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch b/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
similarity index 81%
rename from srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch
rename to srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
index bab6d8441d42..350c41ac3928 100644
--- a/srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch
+++ b/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
@@ -1,16 +1,16 @@
-From 57e3eba28c9b4ee6bd3407d0715b8bd00aaf04a7 Mon Sep 17 00:00:00 2001
+From 53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6 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
+Subject: sagetex: Fix a warning when byte-compiling sagetexparse.py
 
 ---
- .../sagetex/patches/sagetex-fix-warning.patch    | 16 ++++++++++++++++
+ build/pkgs/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
+index 00000000..d82ab67
 --- /dev/null
 +++ b/build/pkgs/sagetex/patches/sagetex-fix-warning.patch
 @@ -0,0 +1,16 @@
@@ -31,5 +31,5 @@ index 0000000000..d82ab675dd
 +     self.result += t.code[1:-1] + '\n\n'
 + 
 -- 
-2.34.1
+cgit v1.0-1-gd88e
 

From e842d003762bad20303a81ad1daf5670e9ca7caa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 19:57:59 -0300
Subject: [PATCH 27/39] sagemath: reorder upstream sources and add two missing
 ones

---
 srcpkgs/sagemath/template | 60 ++++++++++++++++++++++-----------------
 1 file changed, 34 insertions(+), 26 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index b5b99d2c122d..f53cba947c88 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -36,69 +36,77 @@ _SAGE_ROOT=/usr/lib/sage-${version}
 _SAGE_UPSTREAM_MIRROR=https://mirrors.mit.edu/sage/spkg/upstream
 
 _upstream="
-${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
 ${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
 ${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
+
+${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
 ${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
 ${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
 ${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
 ${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
 ${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
 ${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
-https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
-https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
-http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
 ${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
 ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
 ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
 ${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
 ${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${PYPI_SITE}/P/PyCygwin/PyCygwin-0.1.tar.gz
 ${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
-https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+${PYPI_SITE}/s/setuptools/setuptools-59.2.0.tar.gz
 ${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
 ${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
-https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
 ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
+
+https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
+https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
+http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
+https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
 "
 
 checksum+="
-dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
 c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
 d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
+5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
+ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
+169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
+cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
+edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
+cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
+
+dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
 3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
 03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
 5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
 cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
-5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
-c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
-6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
-07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
 a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
-ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
 d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
-169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
 5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
-cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
 471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
 78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
-edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+45a5e295590c469a49b2804bfdb89059e942d768ad3b813f484d7b5bff48d226
 ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
-b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
-3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+157d21de9d055ab9e8ea3186d91e7f4f865e11f42deafa952d90842671fc2576
 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
 545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
-cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
-718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
 dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
+
+c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
+6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
+07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
+3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
 "
 
 for u in ${_upstream}; do

From 7bb48cbae849dee1b3e4ff695d92f450c4fa4c59 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 9 Jan 2022 12:45:47 -0300
Subject: [PATCH 28/39] sagemath: do not download anything patch

---
 .../patches/00-Do_not_download_anything.patch         | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 srcpkgs/sagemath/patches/00-Do_not_download_anything.patch

diff --git a/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch b/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch
new file mode 100644
index 000000000000..35aef7b8d456
--- /dev/null
+++ b/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch
@@ -0,0 +1,11 @@
+--- a/build/sage_bootstrap/tarball.py	2022-01-07 19:17:06.754747955 -0300
++++ b/build/sage_bootstrap/tarball.py	2022-01-07 19:25:31.844139381 -0300
+@@ -158,6 +158,8 @@
+                             .format(destination=destination))
+         successful_download = False
+         log.info('Attempting to download package {0} from mirrors'.format(self.filename))
++        log.info('ERROR: downloading is disabled, add file to template instead')
++        return
+         for mirror in MirrorList():
+             url = mirror + '/'.join(['spkg', 'upstream', self.package.name, self.filename])
+             log.info(url)

From 46b5019b61169d200206c7a83e8806b69723a53c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 9 Jan 2022 13:27:49 -0300
Subject: [PATCH 29/39] sagemath: update to 9.5.rc0.

---
 ...184f7498a2046065e669723e68efe2d65cee.patch |    6 +-
 ...1d4ced4264f65ab704f725f6f5879b012796.patch |  263 ----
 ...a54526829b79d5d236a40f83ddc6ce7b2696.patch | 1196 -----------------
 ...9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch |   27 -
 ...3f4f32246ad9ded6d37f1f2f12a589a81f4.patch} |    4 +-
 ...03138d0403be7c7cb303de2bc0a0e0b6793c.patch |   82 --
 ...f3a1611fed0cc66fb838eb85739646dd34d.patch} |   94 +-
 ...49c415e11d0522bff9013bc1509264b26ebf.patch |   27 +
 ...ip_doctest_singular_4.2.1--see_33134.patch |   13 +
 srcpkgs/sagemath/template                     |    6 +-
 10 files changed, 72 insertions(+), 1646 deletions(-)
 delete mode 100644 srcpkgs/sagemath/patches/trac-30766-system_python_3.10-df9f1d4ced4264f65ab704f725f6f5879b012796.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
 rename srcpkgs/sagemath/patches/{trac-33064-sage_docbuild_ignore_cache_save_permission_error-f767cf1eadfd8ab540a31c5c5ef09d56df09b90e.patch => trac-33064-sage_docbuild_ignore_cache_save_permission_error-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch} (92%)
 delete mode 100644 srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
 rename srcpkgs/sagemath/patches/{trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch => trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch} (63%)
 create mode 100644 srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch

diff --git a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
index b641113927e7..0ecb27c593cd 100644
--- a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
+++ b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
@@ -5615,9 +5615,9 @@ index 84f3d50..c7ad206 100644
      EXAMPLES::
  
          sage: sorted(installed_packages().keys())  # optional - build
--        [...'alabaster', ...'sage_conf', ...]
--        sage: installed_packages()['alabaster']  # optional - build, random
--        '0.7.12'
+-        [...'gmpy2', ...'sage_conf', ...]
+-        sage: installed_packages()['gmpy2']  # optional - build, random
+-        '2.1.0b5'
 +        [...'sage_conf', ...]
 +        sage: installed_packages()['sage_conf']  # optional - build, random
 +        '9.5'
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
deleted file mode 100644
index a1cb4c834482..000000000000
--- a/srcpkgs/sagemath/patches/trac-30766-system_python_3.10-df9f1d4ced4264f65ab704f725f6f5879b012796.patch
+++ /dev/null
@@ -1,263 +0,0 @@
-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-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch b/srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
deleted file mode 100644
index 3ae6fe01822d..000000000000
--- a/srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
+++ /dev/null
@@ -1,1196 +0,0 @@
-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/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch b/srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
deleted file mode 100644
index 485fb0176f45..000000000000
--- a/srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-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: 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 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"
- 
- # 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)
--- 
-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-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
similarity index 92%
rename from srcpkgs/sagemath/patches/trac-33064-sage_docbuild_ignore_cache_save_permission_error-f767cf1eadfd8ab540a31c5c5ef09d56df09b90e.patch
rename to srcpkgs/sagemath/patches/trac-33064-sage_docbuild_ignore_cache_save_permission_error-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
index 20fa12e570eb..04f04cfd6718 100644
--- 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-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
@@ -1,4 +1,4 @@
-From f767cf1eadfd8ab540a31c5c5ef09d56df09b90e Mon Sep 17 00:00:00 2001
+From e89193f4f32246ad9ded6d37f1f2f12a589a81f4 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
@@ -8,7 +8,7 @@ Subject: sage_docbuild: do not fail when cache cannot be saved
  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
+index 466ca82..f8c8ebd 100644
 --- a/src/sage_docbuild/__init__.py
 +++ b/src/sage_docbuild/__init__.py
 @@ -856,9 +856,12 @@ class ReferenceSubBuilder(DocBuilder):
diff --git a/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch b/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
deleted file mode 100644
index 6bc5193b75ee..000000000000
--- a/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-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
-
-
-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/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch b/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
similarity index 63%
rename from srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch
rename to srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
index 3794aa7f019b..04fca4815a00 100644
--- a/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch
+++ b/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
@@ -1,4 +1,4 @@
-From 7d3381b21e4716cfa8a33915621a12f0eba74233 Mon Sep 17 00:00:00 2001
+From 18d0477153af6f453a0e84f78030535f6a36ce87 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
@@ -10,56 +10,56 @@ Subject: doctests: remove dochtml label from some tests that don't need docs
  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
+index c788623..527ed90 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  # optional - sagemath_doc_html
+-        sage: thematic_index = os.path.join(SAGE_DOC, "html", "en", "thematic_tutorials", "index.html")  # optional - sagemath_doc_html
 +        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
+         sage: for line in open(thematic_index).readlines():  # optional - sagemath_doc_html
          ....:     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
+index 4c56aea..583ca06 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  # optional - sagemath_doc_html
+-    sage: docfilename = os.path.join(SAGE_DOC, 'html', 'en', 'reference', 'calculus', 'sage', 'symbolic', 'expression.html')  # optional - sagemath_doc_html
 +    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
+     sage: with open(docfilename) as fobj:  # optional - sagemath_doc_html
      ....:     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='',
+@@ -845,12 +845,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  # optional - sagemath_doc_html
+-        sage: len(_search_src_or_doc('src', r'matrix\(', 'incidence_structures', 'self', 'combinat', interact=False).splitlines()) > 1  # optional - sagemath_doc_html
 +        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)
+         sage: 'abvar/homology' in _search_src_or_doc('doc', 'homology', 'variety', interact=False)  # optional - sagemath_doc_html, 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)  # optional - sagemath_doc_html
 +        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:
+@@ -1369,7 +1369,7 @@ class _sage_doc:
  
-         sage: browse_sage_doc._open("reference", testing=True)[0]  # optional - dochtml, indirect doctest
+         sage: browse_sage_doc._open("reference", testing=True)[0]  # optional - sagemath_doc_html, 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]  # optional - sagemath_doc_html
 +        sage: browse_sage_doc(identity_matrix, 'rst')[-107:-47]
          'Full MatrixSpace of 3 by 3 sparse matrices over Integer Ring'
      """
@@ -68,7 +68,7 @@ index eb70516..b4848ed 100644
 cgit v1.0-1-gd88e
 
 
-From 42a76c3f82edecc9c6c53c661251677e3e907584 Mon Sep 17 00:00:00 2001
+From 88dd9f3a1611fed0cc66fb838eb85739646dd34d 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
@@ -78,7 +78,7 @@ Subject: doctests: add dochtml label to some tests that need docs installed
  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
+index f8c8ebd..d329009 100644
 --- a/src/sage_docbuild/__init__.py
 +++ b/src/sage_docbuild/__init__.py
 @@ -105,7 +105,7 @@ def builder_helper(type):
@@ -86,7 +86,7 @@ index 4a71c91..dd233bd 100644
          sage: from sage_docbuild import _build_many as build_many
          sage: helper = builder_helper("html")
 -        sage: try:
-+        sage: try:  # optional - dochtml
++        sage: try:  # optional - sagemath_doc_html
          ....:     build_many(build_ref_doc, [("docname", "en", "html", {})])
          ....: except Exception as E:
          ....:     "Non-exception during docbuild: abort pool operation" in str(E)
@@ -95,7 +95,7 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import DocBuilder
              sage: b = DocBuilder('tutorial')
 -            sage: b._output_dir('html')
-+            sage: b._output_dir('html')         # optional - dochtml
++            sage: b._output_dir('html')         # optional - sagemath_doc_html
              '.../html/en/tutorial'
          """
          d = os.path.join(SAGE_DOC, type, self.lang, self.name)
@@ -104,7 +104,7 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import DocBuilder
              sage: b = DocBuilder('tutorial')
 -            sage: b._doctrees_dir()
-+            sage: b._doctrees_dir()             # optional - docthml
++            sage: b._doctrees_dir()             # optional - sagemath_doc_html
              '.../doctrees/en/tutorial'
          """
          d = os.path.join(SAGE_DOC, 'doctrees', self.lang, self.name)
@@ -113,7 +113,7 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import ReferenceBuilder
              sage: b = ReferenceBuilder('reference')
 -            sage: b._output_dir('html')
-+            sage: b._output_dir('html')         # optional - dochtml
++            sage: b._output_dir('html')         # optional - sagemath_doc_html
              '.../html/en/reference'
          """
          if lang is None:
@@ -122,56 +122,10 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import ReferenceTopBuilder
              sage: b = ReferenceTopBuilder('reference')
 -            sage: b._output_dir('html')
-+            sage: b._output_dir('html')         # optional - dochtml
++            sage: b._output_dir('html')         # optional - sagemath_doc_html
              '.../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/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch b/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
new file mode 100644
index 000000000000..d32f1e4d5e9f
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
@@ -0,0 +1,27 @@
+From 836249c415e11d0522bff9013bc1509264b26ebf Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Sun, 9 Jan 2022 16:51:22 -0300
+Subject: trac 33135: add filter to ignore deprecation warnings
+
+---
+ src/sage/all.py | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/sage/all.py b/src/sage/all.py
+index 01ef327..19ca3d4 100644
+--- a/src/sage/all.py
++++ b/src/sage/all.py
+@@ -96,6 +96,10 @@ warnings.filterwarnings('ignore', category=DeprecationWarning,
+ warnings.filterwarnings('ignore', category=DeprecationWarning,
+                         module='pythran')
+ 
++warnings.filterwarnings('ignore', category=DeprecationWarning,
++                        message='The distutils(.sysconfig module| package) is deprecated',
++                        module='numpy|sage.env|sage.features')
++
+ ################ end setup warnings ###############################
+ 
+ 
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
new file mode 100644
index 000000000000..438078a92036
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage/rings/polynomial/hilbert.pyx b/src/sage/rings/polynomial/hilbert.pyx
+index 4cd91d0a46..323b168c4e 100644
+--- a/src/sage/rings/polynomial/hilbert.pyx
++++ b/src/sage/rings/polynomial/hilbert.pyx
+@@ -578,7 +578,7 @@ def hilbert_poincare_series(I, grading=None):
+ 
+     This example exceeded the capabilities of Singular before version 4.2.1p2::
+ 
+-        sage: J.hilbert_numerator(algorithm='singular')
++        sage: J.hilbert_numerator(algorithm='singular')   # not tested - requires singular 4.2.1p2
+         120*t^33 - 3465*t^32 + 48180*t^31 - 429374*t^30 + 2753520*t^29 - 13522410*t^28 + 52832780*t^27 - 168384150*t^26 + 445188744*t^25 - 987193350*t^24 + 1847488500*t^23 + 1372406746*t^22 - 403422496*t^21 - 8403314*t^20 - 471656596*t^19 + 1806623746*t^18 + 752776200*t^17 + 752776200*t^16 - 1580830020*t^15 + 1673936550*t^14 - 1294246800*t^13 + 786893250*t^12 - 382391100*t^11 + 146679390*t^10 - 42299400*t^9 + 7837830*t^8 - 172260*t^7 - 468930*t^6 + 183744*t^5 - 39270*t^4 + 5060*t^3 - 330*t^2 + 1
+ 
+     """
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f53cba947c88..f688629fc26d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -1,6 +1,6 @@
 # Template file for 'sagemath'
 pkgname=sagemath
-version=9.5.beta9
+version=9.5.rc0
 revision=1
 wrksrc=sage-$version
 build_style=configure
@@ -19,7 +19,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
-checksum=aea4c5a8d3b32af2fba644269b9daf4f62471471ba2d7d83da0f8098a5f53225
+checksum=8012e3ac35290fa9b2cb837eeca149925784c2378b486731226944e4afd8a4e6
 python_version=3
 
 build_options="debug system_python3 system_site_packages"
@@ -128,7 +128,7 @@ nostrip=yes
 noshlibprovides=yes
 
 # don't rewrite python shebang as sage uses its own python (for now)
-_no_python_shebang=yes
+#_no_python_shebang=yes
 
 # compile python code in sage venv
 pycompile_dirs="$_SAGE_ROOT/venv/"

From 6d9ff86cc183786bf0cfcd90f8b451515ab0ade9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 10 Jan 2022 16:32:54 -0300
Subject: [PATCH 30/39] sagemath: use system gap

---
 ...f491e5ce599ba185f5e93f02e0fcebd76c9e.patch | 57 +++++++++++++++++++
 .../patches/zzz-skip_doctest_system_gap.patch | 13 +++++
 srcpkgs/sagemath/template                     | 15 ++++-
 3 files changed, 82 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch

diff --git a/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch b/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
new file mode 100644
index 000000000000..da88a369db0d
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
@@ -0,0 +1,57 @@
+From 2c981351bb60089530b0598d3e9a909a23d4d4d8 Mon Sep 17 00:00:00 2001
+From: Thierry Thomas <thierry@FreeBSD.org>
+Date: Mon, 22 Mar 2021 03:04:12 +0100
+Subject: 29644: Add spkg-configure.m4 for gap
+
+---
+ build/pkgs/gap/spkg-configure.m4 | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+ create mode 100644 build/pkgs/gap/spkg-configure.m4
+
+diff --git a/build/pkgs/gap/spkg-configure.m4 b/build/pkgs/gap/spkg-configure.m4
+new file mode 100644
+index 00000000..91cd089
+--- /dev/null
++++ b/build/pkgs/gap/spkg-configure.m4
+@@ -0,0 +1,8 @@
++SAGE_SPKG_CONFIGURE([gap], [
++    SAGE_SPKG_DEPCHECK([gmp], [
++       AC_CHECK_HEADER([gap/system.h], [
++        AC_SEARCH_LIBS([GAP_COMM], [gap], [
++        ], [sage_spkg_install_gap=yes])
++       ], [sage_spkg_install_gap=yes])
++    ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2a41f491e5ce599ba185f5e93f02e0fcebd76c9e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Samuel=20Leli=C3=A8vre?= <samuel.lelievre@gmail.com>
+Date: Mon, 22 Mar 2021 03:05:31 +0100
+Subject: 29644: Add distro information for gap
+
+---
+ build/pkgs/gap/distros/fedora.txt | 1 +
+ build/pkgs/gap/distros/gentoo.txt | 1 +
+ 2 files changed, 2 insertions(+)
+ create mode 100644 build/pkgs/gap/distros/fedora.txt
+ create mode 100644 build/pkgs/gap/distros/gentoo.txt
+
+diff --git a/build/pkgs/gap/distros/fedora.txt b/build/pkgs/gap/distros/fedora.txt
+new file mode 100644
+index 00000000..ea4feae
+--- /dev/null
++++ b/build/pkgs/gap/distros/fedora.txt
+@@ -0,0 +1 @@
++gap
+diff --git a/build/pkgs/gap/distros/gentoo.txt b/build/pkgs/gap/distros/gentoo.txt
+new file mode 100644
+index 00000000..ea64ec9
+--- /dev/null
++++ b/build/pkgs/gap/distros/gentoo.txt
+@@ -0,0 +1 @@
++sci-mathematics/gap
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
new file mode 100644
index 000000000000..f132591d48ac
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage_setup/optional_extension.py b/src/sage_setup/optional_extension.py
+index f252849384..4034e3e196 100644
+--- a/src/sage_setup/optional_extension.py
++++ b/src/sage_setup/optional_extension.py
+@@ -80,7 +80,7 @@ def OptionalExtension(*args, **kwds):
+         sage: print(ext.__class__.__name__)
+         CythonizeExtension
+         sage: ext = OptionalExtension("foo", ["foo.c"], package="gap")
+-        sage: print(ext.__class__.__name__)
++        sage: print(ext.__class__.__name__)     # not tested - fails with system gap
+         Extension
+     """
+     try:
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f688629fc26d..02b0af4ad16d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -66,7 +66,6 @@ ${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
 ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
 
 https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
-https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
 http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
 https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
 https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
@@ -103,7 +102,6 @@ ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
 dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
 
 c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
-6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
 07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
 3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
 718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
@@ -159,6 +157,13 @@ pre_configure() {
 	export MAKE="make -j ${XBPS_MAKEJOBS}"
 }
 
+post_configure() {
+	# we set some variables, right after configure has created sage_conf.py
+	cat <<-EOF >> pkgs/sage-conf/sage_conf.py
+	GAP_ROOT_DIR = "/usr/share/gap"
+	EOF
+}
+
 # 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
@@ -248,7 +253,11 @@ makedepends+="
  gengetopt texinfo
  brial-devel cliquer-devel gfan libbraiding-devel libhomfly-devel
  lrcalc-devel nauty-devel palp tachyon
- maxima-ecl primesieve-devel primecount-devel
+ maxima-ecl primesieve-devel primecount-devel gap-devel
+"
+
+# optional dependencies
+makedepends+="
  ffmpeg ImageMagick
 "
 

From e6af628f1f119d69dd6d12864e816d18f4414b70 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Thu, 13 Jan 2022 03:21:19 -0300
Subject: [PATCH 31/39] sagemath: fixes for system gap

---
 .../zzz-fixes_for_system_gap--see_29644.patch | 96 +++++++++++++++++++
 .../patches/zzz-skip_doctest_system_gap.patch | 13 ---
 srcpkgs/sagemath/template                     |  1 +
 3 files changed, 97 insertions(+), 13 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
 delete mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch

diff --git a/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch b/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
new file mode 100644
index 000000000000..741d2b23a7f5
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
@@ -0,0 +1,96 @@
+From 346b4ea4c92f4287d3c097b92817cf2abfcddd8c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Thu, 13 Jan 2022 01:41:31 -0300
+Subject: [PATCH] gap: fixes for using system gap
+
+ - fix _get_shared_lib_path() so we don't need to configure GAP_SO
+ - fix gap_root() so we don't need to configure GAP_ROOT_DIR
+ - skip a useless test that cannot succeed on system gap
+ - use gap_root() in saved_workspace.py instead of GAP_ROOT_DIR
+---
+ src/sage/env.py                      |  2 +-
+ src/sage/libs/gap/saved_workspace.py |  4 ++--
+ src/sage/libs/gap/util.pyx           | 11 +++++++++++
+ src/sage_setup/optional_extension.py |  2 +-
+ 4 files changed, 15 insertions(+), 4 deletions(-)
+
+diff --git a/src/sage/env.py b/src/sage/env.py
+index c4953cfa65..c16696d298 100644
+--- a/src/sage/env.py
++++ b/src/sage/env.py
+@@ -293,7 +293,7 @@ def _get_shared_lib_path(*libnames: str) -> Optional[str]:
+             if sys.platform == 'darwin':
+                 ext = 'dylib'
+             else:
+-                ext = 'so'
++                ext = 'so*'
+ 
+             if SAGE_LOCAL:
+                 search_directories.append(Path(SAGE_LOCAL) / 'lib')
+diff --git a/src/sage/libs/gap/saved_workspace.py b/src/sage/libs/gap/saved_workspace.py
+index ad5adec36d..59c498795f 100644
+--- a/src/sage/libs/gap/saved_workspace.py
++++ b/src/sage/libs/gap/saved_workspace.py
+@@ -8,7 +8,7 @@ workspaces.
+ 
+ import os
+ import glob
+-from sage.env import GAP_ROOT_DIR
++from sage.libs.gap.util import gap_root
+ from sage.interfaces.gap_workspace import gap_workspace_file
+ 
+ 
+@@ -31,7 +31,7 @@ def timestamp():
+     """
+     libgap_dir = os.path.dirname(__file__)
+     libgap_files = glob.glob(os.path.join(libgap_dir, '*'))
+-    gap_packages = glob.glob(os.path.join(GAP_ROOT_DIR, 'pkg', '*'))
++    gap_packages = glob.glob(os.path.join(gap_root(), 'pkg', '*'))
+     files = libgap_files + gap_packages
+     if len(files) == 0:
+         print('Unable to find LibGAP files.')
+diff --git a/src/sage/libs/gap/util.pyx b/src/sage/libs/gap/util.pyx
+index 08c4c40cc0..c7dd557c35 100644
+--- a/src/sage/libs/gap/util.pyx
++++ b/src/sage/libs/gap/util.pyx
+@@ -23,6 +23,7 @@ from cysignals.signals cimport sig_on, sig_off
+ import os
+ import warnings
+ import sage.env
++import subprocess
+ 
+ from .gap_includes cimport *
+ from .element cimport *
+@@ -178,6 +179,16 @@ def gap_root():
+     if os.path.exists(sage.env.GAP_ROOT_DIR):
+         return sage.env.GAP_ROOT_DIR
+ 
++    gap_expr = 'JoinStringsWithSeparator(KERNEL_INFO().GAP_ROOT_PATHS,";")'
++    gap_root_paths = subprocess.getoutput(
++        f"gap -r -q --bare --nointeract -c 'Display({gap_expr});'"
++        ).strip().split(';')
++
++    for gapdir in gap_root_paths:
++        if os.path.exists(os.path.join(gapdir, 'sysinfo.gap')):
++            sage.env.GAP_ROOT_DIR = gapdir
++            return gapdir
++
+     # Attempt to figure out the appropriate GAP_ROOT by reading the
+     # local/bin/gap shell script; this is an ugly hack that exists for
+     # historical reasons; the best approach to setting where Sage looks for
+diff --git a/src/sage_setup/optional_extension.py b/src/sage_setup/optional_extension.py
+index f252849384..4034e3e196 100644
+--- a/src/sage_setup/optional_extension.py
++++ b/src/sage_setup/optional_extension.py
+@@ -80,7 +80,7 @@ def OptionalExtension(*args, **kwds):
+         sage: print(ext.__class__.__name__)
+         CythonizeExtension
+         sage: ext = OptionalExtension("foo", ["foo.c"], package="gap")
+-        sage: print(ext.__class__.__name__)
++        sage: print(ext.__class__.__name__)     # not tested - fails with system gap
+         Extension
+     """
+     try:
+-- 
+2.34.1
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
deleted file mode 100644
index f132591d48ac..000000000000
--- a/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/src/sage_setup/optional_extension.py b/src/sage_setup/optional_extension.py
-index f252849384..4034e3e196 100644
---- a/src/sage_setup/optional_extension.py
-+++ b/src/sage_setup/optional_extension.py
-@@ -80,7 +80,7 @@ def OptionalExtension(*args, **kwds):
-         sage: print(ext.__class__.__name__)
-         CythonizeExtension
-         sage: ext = OptionalExtension("foo", ["foo.c"], package="gap")
--        sage: print(ext.__class__.__name__)
-+        sage: print(ext.__class__.__name__)     # not tested - fails with system gap
-         Extension
-     """
-     try:
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 02b0af4ad16d..0d8ce1f7a70a 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -161,6 +161,7 @@ post_configure() {
 	# we set some variables, right after configure has created sage_conf.py
 	cat <<-EOF >> pkgs/sage-conf/sage_conf.py
 	GAP_ROOT_DIR = "/usr/share/gap"
+	GAP_SO = "$(objdump -p /usr/lib/libgap.so | awk '/SONAME/{print $2}')"
 	EOF
 }
 

From 5bbde033153721268b2b4b408479183276606d36 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Thu, 13 Jan 2022 15:47:33 -0300
Subject: [PATCH 32/39] New package: sagemath-test

---
 srcpkgs/sagemath-test/template                | 32 +++++++++++++++++++
 .../patches/zzz-skip_doctest_shebang.patch    | 11 +++++++
 2 files changed, 43 insertions(+)
 create mode 100644 srcpkgs/sagemath-test/template
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch

diff --git a/srcpkgs/sagemath-test/template b/srcpkgs/sagemath-test/template
new file mode 100644
index 000000000000..3e0b1c3233fd
--- /dev/null
+++ b/srcpkgs/sagemath-test/template
@@ -0,0 +1,32 @@
+# Template file for 'sagemath-test'
+pkgname=sagemath-test
+version=1
+revision=1
+build_style=meta
+checkdepends="sagemath"
+short_desc="Dummy package to test sagemath"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-2.0-or-later"
+homepage="none"
+
+# TODO: install base-voidstrap, uninstall base-chroot, and remove orphans
+# so we can check sagemath depends are enough to run sage on void
+
+do_check() {
+	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
+		_test_args=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	fi
+	if [ -z "$_test_args" ]; then
+		_test_args=--all
+	fi
+	if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
+		# for CI use a predictable random seed
+		_test_args="--random-seed=0 $_test_args"
+	fi
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args="--long $_test_args"
+	else
+		_test_args="--warn-long 5.0 $_test_args"
+	fi
+	/usr/bin/sage* -tp ${XBPS_MAKEJOBS} ${_test_args}
+}
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch
new file mode 100644
index 000000000000..04fa2acbf3ec
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch
@@ -0,0 +1,11 @@
+--- a/src/sage/tests/cmdline.py
++++ b/src/sage/tests/cmdline.py
+@@ -488,7 +488,7 @@ def test_executable(args, input="", timeout=100.0, pydebug_ignore_warnings=False
+         0
+ 
+         sage: (out, err, ret) = test_executable(["sage", "--cython"])
+-        sage: print(err)
++        sage: print(err)  # not tested - broken when shebang is rewritten
+         Cython (http://cython.org) is a compiler for code written in the
+         Cython language.  Cython is based on Pyrex by Greg Ewing.
+         ...

From f1665cb9fc05b98d4e92d084538a913ea892555d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 11:34:23 -0300
Subject: [PATCH 33/39] sagemath: cleanup and one patch

---
 .../zzz-skip_doctest_sage_setup_find.patch    | 12 ++++++++
 srcpkgs/sagemath/template                     | 30 ++++---------------
 2 files changed, 18 insertions(+), 24 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch

diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch
new file mode 100644
index 000000000000..15aed02f9aaa
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch
@@ -0,0 +1,12 @@
+--- a/src/sage_setup/find.py
++++ b/src/sage_setup/find.py
+@@ -301,7 +301,7 @@ def find_extra_files(src_dir, modules, cythonized_dir, special_filenames=[]):
+         sage: extras["sage/libs/mpfr"]
+         [...sage/libs/mpfr/types.pxd...]
+         sage: extras["sage/ext/interpreters"]
+-        ['.../src/sage/ext/interpreters/wrapper_cdf.pxd', ...wrapper_cdf.h...]
++        ['.../src/sage/ext/interpreters/wrapper_cdf.pxd', ...]
+     """
+     from Cython.Utils import is_package_dir
+ 
+--
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 0d8ce1f7a70a..f25cb745c9c4 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -4,7 +4,8 @@ version=9.5.rc0
 revision=1
 wrksrc=sage-$version
 build_style=configure
-configure_args="--enable-build-as-root"
+configure_args="--enable-build-as-root --with-system-python3
+ --enable-system-site-packages"
 make_check_target=ptest
 # for now skip building docs
 make_build_target=build
@@ -22,13 +23,8 @@ distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
 checksum=8012e3ac35290fa9b2cb837eeca149925784c2378b486731226944e4afd8a4e6
 python_version=3
 
-build_options="debug system_python3 system_site_packages"
+build_options="debug"
 desc_option_debug="Build with debug symbols"
-desc_option_system_python="Build using system python 3"
-desc_option_system_python="Build using system python site-packages"
-build_options_default="system_python3 system_site_packages"
-configure_args+=" $(vopt_with system_python3)"
-configure_args+=" $(vopt_enable system_site_packages)"
 
 # path where sage will be installed
 _SAGE_ROOT=/usr/lib/sage-${version}
@@ -112,9 +108,6 @@ for u in ${_upstream}; do
 	skip_extraction+=" ${u##*[/>]}"
 done
 
-# 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
@@ -165,16 +158,6 @@ post_configure() {
 	EOF
 }
 
-# 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() {
 	vlicense COPYING.txt
 	vdoc README.md
@@ -301,7 +284,6 @@ _sage_python3_modules="
  python3-wheel python3-zipp pythran
  "
 
-if [ "$build_option_system_site_packages" ]; then
-	makedepends+=" $_sage_python3_modules"
-	depends+=" $_sage_python3_modules"
-fi
+# python packages are build and runtime dependencies
+makedepends+=" $_sage_python3_modules"
+depends+=" $_sage_python3_modules"

From 9cf0dc6b53b8c186b8f8f1005cce6b4c3b54289a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 11:34:32 -0300
Subject: [PATCH 34/39] sagemath: update to 9.5.rc1.

---
 srcpkgs/sagemath/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f25cb745c9c4..f5d9d0f0fabd 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -1,6 +1,6 @@
 # Template file for 'sagemath'
 pkgname=sagemath
-version=9.5.rc0
+version=9.5.rc1
 revision=1
 wrksrc=sage-$version
 build_style=configure
@@ -20,7 +20,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
-checksum=8012e3ac35290fa9b2cb837eeca149925784c2378b486731226944e4afd8a4e6
+checksum=b015c54f7411669ef70bac2b2fde260e7f45724bcff170957b1f9fd08131f2c3
 python_version=3
 
 build_options="debug"

From 82de86f42dacade0c16773e9a50f7099985e0e5a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 14:53:11 -0300
Subject: [PATCH 35/39] sagemath: patch not needed with singular 4.3.0

---
 ...zzz-skip_doctest_singular_4.2.1--see_33134.patch | 13 -------------
 1 file changed, 13 deletions(-)
 delete mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch

diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
deleted file mode 100644
index 438078a92036..000000000000
--- a/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/src/sage/rings/polynomial/hilbert.pyx b/src/sage/rings/polynomial/hilbert.pyx
-index 4cd91d0a46..323b168c4e 100644
---- a/src/sage/rings/polynomial/hilbert.pyx
-+++ b/src/sage/rings/polynomial/hilbert.pyx
-@@ -578,7 +578,7 @@ def hilbert_poincare_series(I, grading=None):
- 
-     This example exceeded the capabilities of Singular before version 4.2.1p2::
- 
--        sage: J.hilbert_numerator(algorithm='singular')
-+        sage: J.hilbert_numerator(algorithm='singular')   # not tested - requires singular 4.2.1p2
-         120*t^33 - 3465*t^32 + 48180*t^31 - 429374*t^30 + 2753520*t^29 - 13522410*t^28 + 52832780*t^27 - 168384150*t^26 + 445188744*t^25 - 987193350*t^24 + 1847488500*t^23 + 1372406746*t^22 - 403422496*t^21 - 8403314*t^20 - 471656596*t^19 + 1806623746*t^18 + 752776200*t^17 + 752776200*t^16 - 1580830020*t^15 + 1673936550*t^14 - 1294246800*t^13 + 786893250*t^12 - 382391100*t^11 + 146679390*t^10 - 42299400*t^9 + 7837830*t^8 - 172260*t^7 - 468930*t^6 + 183744*t^5 - 39270*t^4 + 5060*t^3 - 330*t^2 + 1
- 
-     """

From 78954abece6cc63bae5c38fe88da4fc102b5fd51 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 14:53:25 -0300
Subject: [PATCH 36/39] sagemath: install /usr/bin/sage

---
 srcpkgs/sagemath/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f5d9d0f0fabd..49821fc982e4 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -181,7 +181,8 @@ do_install() {
 	vmkdir 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}
+	ln -sfT $_SAGE_ROOT/sage ${DESTDIR}/usr/bin/sage-${version}
+	ln -sfT sage-${version} ${DESTDIR}/usr/bin/sage
 }
 
 do_check() {

From 234786bd283f2ac86da1d5b8300e5a4d6d5cab31 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 16:31:25 -0300
Subject: [PATCH 37/39] New package: python3-cvxopt-1.2.7

---
 srcpkgs/python3-cvxopt/template | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 srcpkgs/python3-cvxopt/template

diff --git a/srcpkgs/python3-cvxopt/template b/srcpkgs/python3-cvxopt/template
new file mode 100644
index 000000000000..0fb769b294e0
--- /dev/null
+++ b/srcpkgs/python3-cvxopt/template
@@ -0,0 +1,20 @@
+# Template file for 'python3-cvxopt'
+pkgname=python3-cvxopt
+version=1.2.7
+revision=1
+wrksrc="cvxopt-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools"
+makedepends="python3-devel blas-devel lapack-devel SuiteSparse-devel gsl-devel glpk-devel"
+checkdepends="python3-pytest"
+short_desc="Python software for convex optimization"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-3.0-or-later"
+homepage="http://cvxopt.org/"
+distfiles="${PYPI_SITE}/c/cvxopt/cvxopt-${version}.tar.gz"
+checksum=3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
+
+pre_build() {
+	export CVXOPT_BUILD_GSL=1
+	export CVXOPT_BUILD_GLPK=1
+}

From a03c501181a8ce606aecb5e608ab3a3d09ba4e93 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 22:53:51 -0300
Subject: [PATCH 38/39] New package: python3-importlib_resources-5.4.0

---
 srcpkgs/python3-importlib_resources/template | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 srcpkgs/python3-importlib_resources/template

diff --git a/srcpkgs/python3-importlib_resources/template b/srcpkgs/python3-importlib_resources/template
new file mode 100644
index 000000000000..b1551717d17f
--- /dev/null
+++ b/srcpkgs/python3-importlib_resources/template
@@ -0,0 +1,16 @@
+# Template file for 'python3-importlib_resources'
+pkgname=python3-importlib_resources
+version=5.4.0
+revision=1
+wrksrc="importlib_resources-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools"
+depends="python3-zipp"
+short_desc="Read resources from Python packages"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="Apache-2.0"
+homepage="https://github.com/python/importlib_resources"
+distfiles="${PYPI_SITE}/i/importlib_resources/importlib_resources-${version}.tar.gz"
+checksum=d756e2f85dd4de2ba89be0b21dba2a3bbec2e871a42a3a16719258a11f87506b
+# doesn't work
+make_check=no

From 15ba4005179ad11ad43a97a7f870c284b74b15df Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 23:12:52 -0300
Subject: [PATCH 39/39] sagemath: use system cvxopt and importlib_resources

---
 srcpkgs/sagemath/template | 46 ++++++++++++++++++++++-----------------
 1 file changed, 26 insertions(+), 20 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 49821fc982e4..4db9705c3287 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -31,6 +31,7 @@ _SAGE_ROOT=/usr/lib/sage-${version}
 
 _SAGE_UPSTREAM_MIRROR=https://mirrors.mit.edu/sage/spkg/upstream
 
+# packages were sage is the upstream
 _upstream="
 ${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
 ${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
@@ -41,15 +42,27 @@ ${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
 ${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
 ${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
 ${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
+"
+checksum+="
+c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
+d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
+5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
+ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
+169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
+cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
+edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
+cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
+"
 
+# packages from pypi (python modules)
+_upstream+="
 ${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
 ${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
-${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
 ${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
 ${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
 ${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
 ${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
-${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
 ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
 ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
 ${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
@@ -60,32 +73,14 @@ ${PYPI_SITE}/s/setuptools/setuptools-59.2.0.tar.gz
 ${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
 ${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
 ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
-
-https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
-http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
-https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
-https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
 "
-
 checksum+="
-c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
-d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
-5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
-ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
-169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
-cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
-edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
-b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
-cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
-
 dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
-3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
 03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
 5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
 cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
-a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
 d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
 5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
 471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
@@ -96,7 +91,16 @@ ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
 545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
 dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
+"
 
+# other upstream packages
+_upstream+="
+https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
+http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
+https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
+"
+checksum+="
 c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
 07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
 3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
@@ -283,6 +287,8 @@ _sage_python3_modules="
  python3-tornado python3-traitlets python3-typing_extensions
  python3-tzlocal python3-urllib3 python3-wcwidth python3-webencodings
  python3-wheel python3-zipp pythran
+
+ python3-cvxopt python3-importlib_resources
  "
 
 # python packages are build and runtime dependencies

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: sagemath-9.5.rc1
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (197 preceding siblings ...)
  2022-01-15  2:13 ` [PR PATCH] [Updated] " tornaria
@ 2022-01-15  4:48 ` tornaria
  2022-01-15 13:35 ` tornaria
                   ` (49 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-15  4:48 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 627 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.rc1
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: 629585 bytes --]

From 4f88980f2df5063f14c52d5433a42399b3bea390 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/41] 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 10510a5d5f98b529a357c8a29a297fc33837fe7c 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/41] 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 97a5c8a41f8a38ad5ef68a999397252c7ecbc87a 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/41] 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 71b7db0ce4c6a7615429feb9a906dad660870a89 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/41] 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 dfa27048255641696d18c1c0d745795e916547e5 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/41] 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 1a2c31627a407c83837fc7bcd06ab0470dbcb875 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/41] 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 b5d2c540beda7a80b1e05db2f37af203110cd4db 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/41] 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 8d03785cc4227b2188af451323fdcf23c0062386 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/41] 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 44b03508e8ae01c55906fe0ef81cb68ba454f863 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/41] 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 076b21078750ce031c7255d522a86b121fb5010f 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/41] 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 126c0d8887227cb2ab9f63ca55bc28f6eba7eef6 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/41] 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 74bbdbdcf286627014eee09e225e5a9ce92e32f2 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/41] 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 7ad19785e3284341aef8e48743b798e208a96608 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/41] 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 026889d8962ccb9eb2a5e2b153b6785fd42ade8e 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/41] 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 1684a2f508021db3f9bae4d6a5d1dc65d6d1a7e9 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/41] 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 6eec62191faa744185e6e904acc51963f7f99d14 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/41] 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 e1ba2ceab0bdceb90546b11898e54c377ac1beab 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/41] 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 3da57c6a1f29820436b7e8617591e78f27ac94c5 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/41] 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 a29a692cbb45d6b944e967b9774425b2522625b1 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/41] 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

From 5fad7c34b3d667ab07c69e97e66d7993918b12b4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 27 Dec 2021 20:19:19 -0300
Subject: [PATCH 20/41] sagemath: fix license and tests

Now tests can be run with -Q (normal) or -K (--long)
---
 srcpkgs/sagemath/template | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index c5009269c7fc..33b40acbabeb 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -16,7 +16,7 @@ depends="giac git FlintQS zn_poly sympow
  "
 short_desc="Open source mathematics software"
 maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
-license="GPL-3.0-or-later"
+license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
 checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
@@ -155,15 +155,17 @@ do_install() {
 }
 
 do_check() {
-	TEST=--all
 	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
-		TEST="$(sed -e 's/#.*//' ${XBPS_DISTDIR}/sagemath-check)"
+		_test_args=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	fi
+	if [ -z "$_test_args" ]; then
+		_test_args=--all
+	fi
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args="--long $_test_args"
 	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} ${OPT} ${TEST}
-	#./sage -t ${OPT} ${TEST}
+	./sage -tp ${XBPS_MAKEJOBS} ${_test_args}
 }
 
 ### copied from sage-deps, to be kept in sync

From 6a031adcdb36b2a979125034396ddd4116c87b41 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 28 Dec 2021 23:08:17 -0300
Subject: [PATCH 21/41] sagemath: fix long time test

---
 .../patches/zzz-fix_long_time_test--see_33091.patch | 13 +++++++++++++
 ...=> zzz-skip_doctest_giac-1.7.0--see_31563.patch} |  0
 2 files changed, 13 insertions(+)
 create mode 100644 srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
 rename srcpkgs/sagemath/patches/{skip-doctest-giac-1.7.0--see-trac-31563.patch => zzz-skip_doctest_giac-1.7.0--see_31563.patch} (100%)

diff --git a/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch b/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
new file mode 100644
index 000000000000..ca360dee9f6e
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage/matrix/matrix2.pyx b/src/sage/matrix/matrix2.pyx
+index 7d319bd54b..c1a2eed6f1 100644
+--- a/src/sage/matrix/matrix2.pyx
++++ b/src/sage/matrix/matrix2.pyx
+@@ -17215,7 +17215,7 @@ cdef class Matrix(Matrix1):
+ 
+             sage: set_random_seed()
+             sage: K = random_cone(max_ambient_dim=5)
+-            sage: all(L.change_ring(SR).is_Z_operator_on(K)
++            sage: all(L.change_ring(SR).is_Z_operator_on(K) # long time
+             ....:     for L in K.Z_operators_gens())  # long time
+             True
+ 
diff --git a/srcpkgs/sagemath/patches/skip-doctest-giac-1.7.0--see-trac-31563.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_31563.patch
similarity index 100%
rename from srcpkgs/sagemath/patches/skip-doctest-giac-1.7.0--see-trac-31563.patch
rename to srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_31563.patch

From 28937bb9ae472550543d16fea481f0f82fa4c79f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 31 Dec 2021 13:52:34 -0300
Subject: [PATCH 22/41] python3-Sphinx: update to 4.3.2.

---
 srcpkgs/python3-Sphinx/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/python3-Sphinx/template b/srcpkgs/python3-Sphinx/template
index 8b0493c1f92c..29f892d16157 100644
--- a/srcpkgs/python3-Sphinx/template
+++ b/srcpkgs/python3-Sphinx/template
@@ -1,6 +1,6 @@
 # Template file for 'python3-Sphinx'
 pkgname=python3-Sphinx
-version=4.2.0
+version=4.3.2
 revision=1
 wrksrc=Sphinx-${version}
 build_style=python3-module
@@ -17,8 +17,9 @@ short_desc="Python 3 documentation generator"
 maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
 license="BSD-3-Clause"
 homepage="http://sphinx-doc.org"
+changelog="https://www.sphinx-doc.org/en/master/changes.html"
 distfiles="${PYPI_SITE}/S/Sphinx/Sphinx-${version}.tar.gz"
-checksum=94078db9184491e15bce0a56d9186e0aec95f16ac20b12d00e06d4e36f1058a6
+checksum=0a8836751a68306b3fe97ecbe44db786f8479c3bf4b80e3a7f5c838657b4698c
 conflicts="python-Sphinx>=0"
 
 post_install() {

From 15359adb812748d2934d3d0fc0280b0809e5c198 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 28 Dec 2021 23:08:17 -0300
Subject: [PATCH 23/41] sagemath: use system python site-packages

 - patch from #29665 for that
 - patch on top of that to allow a few more python packages:
   gmpy2, sphinx, typing_extensions, ptyprocess
 - add all available python packages to makedepends and depends
 - add ffmpeg and ImageMagick to makedepends
 - in standard check (-Q) warn if individual test > 5.0s
---
 ...184f7498a2046065e669723e68efe2d65cee.patch | 5629 +++++++++++++++++
 .../zzz-dont_run_pytest--see_31924.patch      |   27 +
 .../zzz-more_site_packages_not_in_29665.patch |   42 +
 srcpkgs/sagemath/template                     |   52 +-
 4 files changed, 5747 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch

diff --git a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
new file mode 100644
index 000000000000..b641113927e7
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
@@ -0,0 +1,5629 @@
+From 05fcaabe95082f42ba134780d579390d7b6153e2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 19:30:58 -0400
+Subject: Trac #29665: add --enable-system-site-packages option to ./configure.
+
+This new option is experimental and disabled by default. When it is
+enabled, the string "--system-site-packages" is appended to a new
+environment variable SAGE_VENV_FLAGS that is then passed to the
+sage-venv command during the build using autoconf substitution.
+Thusly the correct setting finds its way into local/pyvenv.cfg.
+---
+ build/make/Makefile.in |  2 +-
+ configure.ac           | 11 +++++++++++
+ 2 files changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/build/make/Makefile.in b/build/make/Makefile.in
+index f870cc3..68627ab 100644
+--- a/build/make/Makefile.in
++++ b/build/make/Makefile.in
+@@ -211,7 +211,7 @@ endif
+ inst_python3_venv = $(SAGE_VENV)/pyvenv.cfg
+ 
+ $(inst_python3_venv):
+-	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv "$(SAGE_VENV)"
++	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv @SAGE_VENV_FLAGS@ "$(SAGE_VENV)"
+ endif
+ 
+ # Build everything and start Sage.
+diff --git a/configure.ac b/configure.ac
+index 351f487..db30a91 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -435,6 +435,17 @@ AC_ARG_ENABLE([download-from-upstream-url],
+   [AS_HELP_STRING([--enable-download-from-upstream-url],
+     [allow downloading packages from their upstream URL if they cannot be found on the Sage mirrors])])
+ 
++AC_ARG_ENABLE(
++  [system-site-packages], [AS_HELP_STRING(
++    [--enable-system-site-packages],
++    [allow sage to use python packages from the system (experimental; default: no)]
++  )], [
++  AS_IF([test "x$enable_system_site_packages" = "xyes"], [
++    SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
++  ])
++])
++AC_SUBST([SAGE_VENV_FLAGS])
++
+ SAGE_SPKG_OPTIONS=""
+ AS_IF([test "x$enable_experimental_packages" = "xyes"], [
+   AS_VAR_APPEND([SAGE_SPKG_OPTIONS], [" -y"])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9372d1f663edf4e89f9c186336815ca04cff59dc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 19:41:14 -0400
+Subject: Trac #29665: new SAGE_PYTHON_PACKAGE_CHECK() autoconf macro.
+
+This new macro encapsulates the check for system installations of
+python packages. It uses setuptools.version's pkg_resources to
+check if the contents of install-requires.txt are satisfied for
+the given package; and if not, tells the build system to install
+the SPKG instead.
+---
+ m4/sage_python_package_check.m4 | 49 +++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 49 insertions(+)
+ create mode 100644 m4/sage_python_package_check.m4
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+new file mode 100644
+index 00000000..77b0a0c
+--- /dev/null
++++ b/m4/sage_python_package_check.m4
+@@ -0,0 +1,49 @@
++#
++# SYNOPSIS
++#
++#   SAGE_PYTHON_PACKAGE_CHECK(package)
++#
++# DESCRIPTION
++#
++#   Determine if the system copy of a python package can be used by sage.
++#
++#   This macro uses setuptools.version's pkg_resources to check that the
++#   "install-requires.txt" file for the named package is satisfied, and
++#   it can typically fail in four ways:
++#
++#     1. If --enable-system-site-packages was not passed to ./configure,
++#
++#     2. If we are not using the system python (no $PYTHON_FOR_VENV),
++#
++#     3. If setuptools is not available to the system python,
++#
++#     4. If the contents of install-requires.txt are not met (wrong
++#        version, no version, etc.) by the system python.
++#
++#   In any of those cases, we set sage_spkg_install_$package to "yes"
++#   so that the corresponding SPKG is installed. Otherwise, we do
++#   nothing, since the default value of sage_spkg_install_$package
++#   is "no" (to use the system copy).
++#
++#   The SAGE_SPKG_CONFIGURE_PYTHON3() macro is AC_REQUIRE'd to ensure
++#   that $PYTHON_FOR_VENV is available, if it is going to be available.
++#
++
++AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
++  AS_IF([test "${enable_system_site_packages}" = "yes"], [
++    AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
++
++    dnl strip all comments from install-requires.txt; this should leave
++    dnl only a single line containing the version specification for this
++    dnl package.
++    SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
++    AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++    AS_IF(
++      ["${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())"],
++      [AC_MSG_RESULT(yes)],
++      [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
++    )
++  ], [
++    sage_spkg_install_$1=yes
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a0dac8ad81ad6369d479bba30d2388de59e5cecb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:21:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for py.
+
+---
+ build/pkgs/py/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/py/spkg-configure.m4
+
+diff --git a/build/pkgs/py/spkg-configure.m4 b/build/pkgs/py/spkg-configure.m4
+new file mode 100644
+index 00000000..ded7034
+--- /dev/null
++++ b/build/pkgs/py/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([py], [SAGE_PYTHON_PACKAGE_CHECK([py])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 87c463a25ab4432dc1fba4f7a9703284e5b8f620 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:24:15 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for wheel.
+
+---
+ build/pkgs/wheel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wheel/spkg-configure.m4
+
+diff --git a/build/pkgs/wheel/spkg-configure.m4 b/build/pkgs/wheel/spkg-configure.m4
+new file mode 100644
+index 00000000..7897ea9
+--- /dev/null
++++ b/build/pkgs/wheel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([wheel], [SAGE_PYTHON_PACKAGE_CHECK([wheel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 804094b3a980f262f4d53d7be8b1be43ac0c55e0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:25:15 -0400
+Subject: Trac #29665: new spkg-configure.m4 for cvxopt.
+
+This includes a SAGE_SPKG_DEPCHECK([gsl glpk suitesparse],... because
+those C dependencies wind up linked into shared libraries like,
+
+  /usr/.../cvxopt/glpk.cpython-39-x86_64-linux-gnu.so
+
+that could potentially conflict with (for example) the glpk SPKG.
+---
+ build/pkgs/cvxopt/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/cvxopt/spkg-configure.m4
+
+diff --git a/build/pkgs/cvxopt/spkg-configure.m4 b/build/pkgs/cvxopt/spkg-configure.m4
+new file mode 100644
+index 00000000..c4aa619
+--- /dev/null
++++ b/build/pkgs/cvxopt/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([cvxopt], [
++  SAGE_SPKG_DEPCHECK([gsl glpk suitesparse], [
++    SAGE_PYTHON_PACKAGE_CHECK([cvxopt])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3f171955ff8d15da2c98aee0d2e254e95a55a2b5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:28:10 -0400
+Subject: Trac #29665: new spkg-configure.m4 for pyzmq.
+
+This includes a SAGE_SPKG_DEPCHECK([zeromq],... because libzmq winds
+up linked into shared libraries like,
+
+  /usr/.../zmq/backend/cython/message.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the zeromq SPKG.
+---
+ build/pkgs/pyzmq/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/pyzmq/spkg-configure.m4
+
+diff --git a/build/pkgs/pyzmq/spkg-configure.m4 b/build/pkgs/pyzmq/spkg-configure.m4
+new file mode 100644
+index 00000000..ae2b126
+--- /dev/null
++++ b/build/pkgs/pyzmq/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([pyzmq], [
++  SAGE_SPKG_DEPCHECK([zeromq], [
++    SAGE_PYTHON_PACKAGE_CHECK([pyzmq])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20d3aa9da9fc98a6e6a47599cd1b6d1d3785a4c4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:31:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for requests.
+
+---
+ build/pkgs/requests/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/requests/spkg-configure.m4
+
+diff --git a/build/pkgs/requests/spkg-configure.m4 b/build/pkgs/requests/spkg-configure.m4
+new file mode 100644
+index 00000000..f50a66c
+--- /dev/null
++++ b/build/pkgs/requests/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([requests], [SAGE_PYTHON_PACKAGE_CHECK([requests])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4df57ee47f2576b6b7bf9265248e06e90616b689 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:13:34 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for six.
+
+---
+ build/pkgs/six/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/six/spkg-configure.m4
+
+diff --git a/build/pkgs/six/spkg-configure.m4 b/build/pkgs/six/spkg-configure.m4
+new file mode 100644
+index 00000000..a382b81
+--- /dev/null
++++ b/build/pkgs/six/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([six], [SAGE_PYTHON_PACKAGE_CHECK([six])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f4462652d02ca729cc6d7cb36ee4d7d662deafb0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:14:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for packaging.
+
+---
+ build/pkgs/packaging/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/packaging/spkg-configure.m4
+
+diff --git a/build/pkgs/packaging/spkg-configure.m4 b/build/pkgs/packaging/spkg-configure.m4
+new file mode 100644
+index 00000000..398f9e1
+--- /dev/null
++++ b/build/pkgs/packaging/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([packaging], [SAGE_PYTHON_PACKAGE_CHECK([packaging])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4d64677fffce48077e4bc3e20ec833c70e6e9b65 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:18:53 -0400
+Subject: Trac #29665: new spkg-configure.m4 for numpy.
+
+This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack
+wind up linked into shared libraries like,
+
+  /usr/.../numpy/linalg/lapack_lite.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the openblas SPKG.
+---
+ build/pkgs/numpy/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/numpy/spkg-configure.m4
+
+diff --git a/build/pkgs/numpy/spkg-configure.m4 b/build/pkgs/numpy/spkg-configure.m4
+new file mode 100644
+index 00000000..16f9a90
+--- /dev/null
++++ b/build/pkgs/numpy/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([numpy], [
++  SAGE_SPKG_DEPCHECK([openblas], [
++   SAGE_PYTHON_PACKAGE_CHECK([numpy])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 85dfe5bb32f3c470966b477bae68a921e846d11f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:58:48 -0400
+Subject: Trac #29665: new spkg-configure.m4 for scipy.
+
+This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack
+wind up linked into shared libraries like,
+
+  /usr/.../scipy/linalg/_flinalg.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the openblas SPKG.
+---
+ build/pkgs/scipy/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/scipy/spkg-configure.m4
+
+diff --git a/build/pkgs/scipy/spkg-configure.m4 b/build/pkgs/scipy/spkg-configure.m4
+new file mode 100644
+index 00000000..0b7294a
+--- /dev/null
++++ b/build/pkgs/scipy/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([scipy], [
++  SAGE_SPKG_DEPCHECK([openblas], [
++    SAGE_PYTHON_PACKAGE_CHECK([scipy])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5616f1491036fda95f4d3e840c8c8b531c97323b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 07:19:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pluggy.
+
+---
+ build/pkgs/pluggy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pluggy/spkg-configure.m4
+
+diff --git a/build/pkgs/pluggy/spkg-configure.m4 b/build/pkgs/pluggy/spkg-configure.m4
+new file mode 100644
+index 00000000..11b1fce
+--- /dev/null
++++ b/build/pkgs/pluggy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pluggy], [SAGE_PYTHON_PACKAGE_CHECK([pluggy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6bceae3d356878cfe5fce40c9998dead003a3844 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 07:24:12 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pickleshare.
+
+---
+ build/pkgs/pickleshare/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pickleshare/spkg-configure.m4
+
+diff --git a/build/pkgs/pickleshare/spkg-configure.m4 b/build/pkgs/pickleshare/spkg-configure.m4
+new file mode 100644
+index 00000000..80e9b7c
+--- /dev/null
++++ b/build/pkgs/pickleshare/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pickleshare], [SAGE_PYTHON_PACKAGE_CHECK([pickleshare])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From da2ab534f4a256c82ed4f1c5f0f5c320529b5e9f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 08:53:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for html5lib.
+
+---
+ build/pkgs/html5lib/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/html5lib/spkg-configure.m4
+
+diff --git a/build/pkgs/html5lib/spkg-configure.m4 b/build/pkgs/html5lib/spkg-configure.m4
+new file mode 100644
+index 00000000..f421b7e
+--- /dev/null
++++ b/build/pkgs/html5lib/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([html5lib], [SAGE_PYTHON_PACKAGE_CHECK([html5lib])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5e464134afdf6055b7b5804208f759561c5435cd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 18:30:47 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for networkx.
+
+---
+ build/pkgs/networkx/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/networkx/spkg-configure.m4
+
+diff --git a/build/pkgs/networkx/spkg-configure.m4 b/build/pkgs/networkx/spkg-configure.m4
+new file mode 100644
+index 00000000..926671e
+--- /dev/null
++++ b/build/pkgs/networkx/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([networkx], [SAGE_PYTHON_PACKAGE_CHECK([networkx])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c4d40770cd9c7fda811e31759a5f4aedc320f3f9 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:33:24 -0400
+Subject: Trac #29665: new spkg-configure.m4 for matplotlib.
+
+This includes a SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull],...
+because those dependencies wind up linked into shared libraries like,
+
+  /usr/lib/.../matplotlib/ft2font.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with their SPKG counterparts.
+---
+ build/pkgs/matplotlib/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/matplotlib/spkg-configure.m4
+
+diff --git a/build/pkgs/matplotlib/spkg-configure.m4 b/build/pkgs/matplotlib/spkg-configure.m4
+new file mode 100644
+index 00000000..39c2d29
+--- /dev/null
++++ b/build/pkgs/matplotlib/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([matplotlib], [
++  SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull], [
++    SAGE_PYTHON_PACKAGE_CHECK([matplotlib])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7834dc3ac349201af632f89a9de7cd1967931010 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:35:00 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for bleach.
+
+---
+ build/pkgs/bleach/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/bleach/spkg-configure.m4
+
+diff --git a/build/pkgs/bleach/spkg-configure.m4 b/build/pkgs/bleach/spkg-configure.m4
+new file mode 100644
+index 00000000..3c9bb26
+--- /dev/null
++++ b/build/pkgs/bleach/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([bleach], [SAGE_PYTHON_PACKAGE_CHECK([bleach])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 84cad343287a2c69a4a21b9fa3b92301ff88645b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:37:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for decorator.
+
+---
+ build/pkgs/decorator/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/decorator/spkg-configure.m4
+
+diff --git a/build/pkgs/decorator/spkg-configure.m4 b/build/pkgs/decorator/spkg-configure.m4
+new file mode 100644
+index 00000000..e062778
+--- /dev/null
++++ b/build/pkgs/decorator/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([decorator], [SAGE_PYTHON_PACKAGE_CHECK([decorator])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 25693212572e69d452bc95c923ada13744359eb7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:38:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for idna.
+
+---
+ build/pkgs/idna/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/idna/spkg-configure.m4
+
+diff --git a/build/pkgs/idna/spkg-configure.m4 b/build/pkgs/idna/spkg-configure.m4
+new file mode 100644
+index 00000000..9d363f2
+--- /dev/null
++++ b/build/pkgs/idna/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([idna], [SAGE_PYTHON_PACKAGE_CHECK([idna])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6d5616472f6cdc6cf496bba6fe07bd4ef44dfdaf Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:39:23 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for certifi.
+
+---
+ build/pkgs/certifi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/certifi/spkg-configure.m4
+
+diff --git a/build/pkgs/certifi/spkg-configure.m4 b/build/pkgs/certifi/spkg-configure.m4
+new file mode 100644
+index 00000000..ddd4061
+--- /dev/null
++++ b/build/pkgs/certifi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([certifi], [SAGE_PYTHON_PACKAGE_CHECK([certifi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9412a07023b275e29e8d1af9b8ee3e767042e7fd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:40:59 -0400
+Subject: Trac #29665: new spkg-configure.m4 for pillow.
+
+This includes an SAGE_SPKG_DEPCHECK([bzip2 freetype libpng zlib],...
+because those dependencies wind up linked into shared libraries like,
+
+  /usr/.../PIL/_imagingft.cpython-39-x86_64-linux-gnu.so
+
+and potentially conflict with their SPKG counterparts.
+---
+ build/pkgs/pillow/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/pillow/spkg-configure.m4
+
+diff --git a/build/pkgs/pillow/spkg-configure.m4 b/build/pkgs/pillow/spkg-configure.m4
+new file mode 100644
+index 00000000..f2e68e2
+--- /dev/null
++++ b/build/pkgs/pillow/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([pillow], [
++  SAGE_SPKG_DEPCHECK([bzip2 freetype libpng zlib], [
++    SAGE_PYTHON_PACKAGE_CHECK([pillow])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From eede914311481fdb75b363b7a799075e876a2b4f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:44:13 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for mpmath.
+
+---
+ build/pkgs/mpmath/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mpmath/spkg-configure.m4
+
+diff --git a/build/pkgs/mpmath/spkg-configure.m4 b/build/pkgs/mpmath/spkg-configure.m4
+new file mode 100644
+index 00000000..f43c838
+--- /dev/null
++++ b/build/pkgs/mpmath/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([mpmath], [SAGE_PYTHON_PACKAGE_CHECK([mpmath])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 363a825885832c0b580ff53fe61f5c79e70c4728 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:44:56 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for sympy.
+
+---
+ build/pkgs/sympy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sympy/spkg-configure.m4
+
+diff --git a/build/pkgs/sympy/spkg-configure.m4 b/build/pkgs/sympy/spkg-configure.m4
+new file mode 100644
+index 00000000..fa0f1f5
+--- /dev/null
++++ b/build/pkgs/sympy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([sympy], [SAGE_PYTHON_PACKAGE_CHECK([sympy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0667964c914e4a01dda697190a054ff96cea92d6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:47:06 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pygments.
+
+---
+ build/pkgs/pygments/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pygments/spkg-configure.m4
+
+diff --git a/build/pkgs/pygments/spkg-configure.m4 b/build/pkgs/pygments/spkg-configure.m4
+new file mode 100644
+index 00000000..99f29e3
+--- /dev/null
++++ b/build/pkgs/pygments/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pygments], [SAGE_PYTHON_PACKAGE_CHECK([pygments])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f787c233aa05d8e90f7c6ad18f76bd2fa36bfbfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:48:50 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for jinja2.
+
+---
+ build/pkgs/jinja2/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jinja2/spkg-configure.m4
+
+diff --git a/build/pkgs/jinja2/spkg-configure.m4 b/build/pkgs/jinja2/spkg-configure.m4
+new file mode 100644
+index 00000000..0970d1c
+--- /dev/null
++++ b/build/pkgs/jinja2/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jinja2], [SAGE_PYTHON_PACKAGE_CHECK([jinja2])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 309d8f8e2b7078b5efbbe824b69ec1d9b1e639f0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:43:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pandocfilters.
+
+---
+ build/pkgs/pandocfilters/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/pandocfilters/spkg-configure.m4
+
+diff --git a/build/pkgs/pandocfilters/spkg-configure.m4 b/build/pkgs/pandocfilters/spkg-configure.m4
+new file mode 100644
+index 00000000..3e9537f
+--- /dev/null
++++ b/build/pkgs/pandocfilters/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([pandocfilters], [
++  SAGE_PYTHON_PACKAGE_CHECK([pandocfilters])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f57bfda49777a6ba1cd123553acd75dc347c5521 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:44:46 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for webencodings.
+
+---
+ build/pkgs/webencodings/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/webencodings/spkg-configure.m4
+
+diff --git a/build/pkgs/webencodings/spkg-configure.m4 b/build/pkgs/webencodings/spkg-configure.m4
+new file mode 100644
+index 00000000..1b9a5c4
+--- /dev/null
++++ b/build/pkgs/webencodings/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([webencodings], [
++  SAGE_PYTHON_PACKAGE_CHECK([webencodings])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7f193a62d7a2ea0b6a3ca6beb12390d91c25bbfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:48:26 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pytz.
+
+---
+ build/pkgs/pytz/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pytz/spkg-configure.m4
+
+diff --git a/build/pkgs/pytz/spkg-configure.m4 b/build/pkgs/pytz/spkg-configure.m4
+new file mode 100644
+index 00000000..366521b
+--- /dev/null
++++ b/build/pkgs/pytz/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pytz], [SAGE_PYTHON_PACKAGE_CHECK([pytz])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bfd3fdd887c3465c03465248de4997eed4a82915 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:51:16 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for texttable.
+
+---
+ build/pkgs/texttable/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/texttable/spkg-configure.m4
+
+diff --git a/build/pkgs/texttable/spkg-configure.m4 b/build/pkgs/texttable/spkg-configure.m4
+new file mode 100644
+index 00000000..42a3de1
+--- /dev/null
++++ b/build/pkgs/texttable/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([texttable], [SAGE_PYTHON_PACKAGE_CHECK([texttable])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 914bf0cc57abc46129b27c1525782dbe16da31a2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:53:41 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for babel.
+
+---
+ build/pkgs/babel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/babel/spkg-configure.m4
+
+diff --git a/build/pkgs/babel/spkg-configure.m4 b/build/pkgs/babel/spkg-configure.m4
+new file mode 100644
+index 00000000..d7b9a71
+--- /dev/null
++++ b/build/pkgs/babel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([babel], [SAGE_PYTHON_PACKAGE_CHECK([babel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 56977abd1eafbc87c765a2892cfe525382648259 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 14 Oct 2021 08:06:59 -0400
+Subject: Trac #29665: force system python3 with --enable-system-site-packages.
+
+When the python SPKG is used, the --enable-system-site-packages flag
+will essentially do nothing, and that may confuse users who have
+wasted a few hours building sage. (Generally, they will want to fix
+detection of their system python3 first.)
+
+To forestall that, we now set "--with-system-python3=force" whenever
+the "--enable-system-site-packages" flag is passed.
+---
+ configure.ac | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index db30a91..6fafb83 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -438,10 +438,19 @@ AC_ARG_ENABLE([download-from-upstream-url],
+ AC_ARG_ENABLE(
+   [system-site-packages], [AS_HELP_STRING(
+     [--enable-system-site-packages],
+-    [allow sage to use python packages from the system (experimental; default: no)]
++    [allow the use of python packages from the system (experimental; default: no)]
+   )], [
+   AS_IF([test "x$enable_system_site_packages" = "xyes"], [
+     SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
++
++    dnl We want to raise an error if the user asked for "system site
++    dnl packages" but the system python will not be used. Technically
++    dnl that causes no problems (SAGE_PYTHON_PACKAGE_CHECK always fails,
++    dnl so SPKGs are used for all python packages), but it may be confusing
++    dnl to end users who expect the flag to actually give them access to
++    dnl their system python packages and who may not be paying close
++    dnl attention to their ./configure output.
++    with_system_python3="force"
+   ])
+ ])
+ AC_SUBST([SAGE_VENV_FLAGS])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 02b369fd24ef7cf8997082e7850b9cf022cae34b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 01:18:35 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for setuptools.
+
+---
+ build/pkgs/setuptools/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/setuptools/spkg-configure.m4
+
+diff --git a/build/pkgs/setuptools/spkg-configure.m4 b/build/pkgs/setuptools/spkg-configure.m4
+new file mode 100644
+index 00000000..a2ad811
+--- /dev/null
++++ b/build/pkgs/setuptools/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([setuptools], [SAGE_PYTHON_PACKAGE_CHECK([setuptools])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 05117317d38693978efaf36e81d8b02bae44b257 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 01:15:48 -0400
+Subject: Trac #29665: poison PYTHONUSERBASE when testing for "system"
+ packages.
+
+When we're detecting system installations of python packages, we want
+to hide anything that was installed with e.g. "pip install --user". To
+accomplish that, we mimic the PYTHONUSERBASE poisoning from sage-env
+within the SAGE_PYTHON_PACKAGE_CHECK() macro.
+---
+ m4/sage_python_package_check.m4 | 18 +++++++++++++++++-
+ 1 file changed, 17 insertions(+), 1 deletion(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 77b0a0c..b8cdba4 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -38,11 +38,27 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     dnl package.
+     SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
+     AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++
++    dnl To prevent user-site (pip install --user) packages from being
++    dnl detected as "system" packages, we poison PYTHONUSERBASE. The
++    dnl sage-env script also does this at runtime; we mimic that
++    dnl implementation to ensure that the behaviors at ./configure and
++    dnl runtime are identical. Beware that (as in sage-env) the poisoning
++    dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
++    dnl user points PYTHONUSERBASE to any path (even the default), then
++    dnl his local pip packages will be detected.
++    PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
++    AS_IF([test -z "${PYTHONUSERBASE}"], [
++      PYTHONUSERBASE="${HOME}/.sage/local"
++    ])
++
+     AS_IF(
+-      ["${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())"],
++      [PYTHONUSERBASE="${PYTHONUSERBASE}" "${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" 2>/dev/null],
+       [AC_MSG_RESULT(yes)],
+       [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+     )
++
++    PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d75c1492f63a584b5ec5f424ddd7f7c4a6d502d3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:20:04 -0400
+Subject: Trac #29665: run SAGE_PYTHON_PACKAGE_CHECK() inside a venv.
+
+To recreate the runtime environment as closely as possible, we now use
+a venv (with system site packages enabled) when checking for system
+copies of python packages.
+---
+ m4/sage_python_package_check.m4 | 76 +++++++++++++++++++++++++++--------------
+ 1 file changed, 51 insertions(+), 25 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index b8cdba4..7cbd6c0 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -15,9 +15,11 @@
+ #
+ #     2. If we are not using the system python (no $PYTHON_FOR_VENV),
+ #
+-#     3. If setuptools is not available to the system python,
++#     3. If we are unable to create a venv with the system python,
+ #
+-#     4. If the contents of install-requires.txt are not met (wrong
++#     4. If setuptools is not available to the system python,
++#
++#     5. If the contents of install-requires.txt are not met (wrong
+ #        version, no version, etc.) by the system python.
+ #
+ #   In any of those cases, we set sage_spkg_install_$package to "yes"
+@@ -27,38 +29,62 @@
+ #
+ #   The SAGE_SPKG_CONFIGURE_PYTHON3() macro is AC_REQUIRE'd to ensure
+ #   that $PYTHON_FOR_VENV is available, if it is going to be available.
++#   The check is run inside a new venv, and with the PYTHONUSERBASE
++#   variable poisoned in the same manner as sage-env poisons it, to
++#   ensure that the ./configure- and run-time views of the system
++#   are as similar as possible.
+ #
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
+     AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
+ 
+-    dnl strip all comments from install-requires.txt; this should leave
+-    dnl only a single line containing the version specification for this
+-    dnl package.
+-    SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
+-    AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++    dnl We run this check inside a python venv, because that's ultimately
++    dnl how the system $PYTHON_FOR_VENV will be used.
++    AC_MSG_CHECKING([if we can create a python venv in config.venv])
+ 
+-    dnl To prevent user-site (pip install --user) packages from being
+-    dnl detected as "system" packages, we poison PYTHONUSERBASE. The
+-    dnl sage-env script also does this at runtime; we mimic that
+-    dnl implementation to ensure that the behaviors at ./configure and
+-    dnl runtime are identical. Beware that (as in sage-env) the poisoning
+-    dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
+-    dnl user points PYTHONUSERBASE to any path (even the default), then
+-    dnl his local pip packages will be detected.
+-    PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
+-    AS_IF([test -z "${PYTHONUSERBASE}"], [
+-      PYTHONUSERBASE="${HOME}/.sage/local"
+-    ])
++    dnl Use --clear because ./configure typically clobbers its output files.
++    AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
++                                        --clear                dnl
++                                        --without-pip          dnl
++					config.venv], [
++      AC_MSG_RESULT(yes)
++      dnl strip all comments from install-requires.txt; this should leave
++      dnl only a single line containing the version specification for this
++      dnl package.
++      SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
++      AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++
++      dnl To prevent user-site (pip install --user) packages from being
++      dnl detected as "system" packages, we poison PYTHONUSERBASE. The
++      dnl sage-env script also does this at runtime; we mimic that
++      dnl implementation to ensure that the behaviors at ./configure and
++      dnl runtime are identical. Beware that (as in sage-env) the poisoning
++      dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
++      dnl user points PYTHONUSERBASE to any path (even the default), then
++      dnl his local pip packages will be detected.
++      PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
++      AS_IF([test -z "${PYTHONUSERBASE}"], [
++        PYTHONUSERBASE="${HOME}/.sage/local"
++      ])
+ 
+-    AS_IF(
+-      [PYTHONUSERBASE="${PYTHONUSERBASE}" "${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" 2>/dev/null],
+-      [AC_MSG_RESULT(yes)],
+-      [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+-    )
++      AS_IF(
++        [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
++           "from setuptools.version import pkg_resources;              dnl
++            pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" dnl
++	 2>/dev/null],
++        [AC_MSG_RESULT(yes)],
++        [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
++      )
++
++      PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
++    ], [
++      dnl failed to create a venv for some reason
++      AC_MSG_RESULT(no)
++      sage_spkg_install_$1=yes
++    ])
+ 
+-    PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
++    rm -rf config.venv
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 87646c3264a04ffd98a12d67074f93e1943a1e96 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:38:08 -0400
+Subject: Trac #29665: log SAGE_PYTHON_PACKAGE_CHECK() failures to config.log.
+
+---
+ m4/sage_python_package_check.m4 | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 7cbd6c0..e0e0b9f 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -47,7 +47,8 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
+                                         --clear                dnl
+                                         --without-pip          dnl
+-					config.venv], [
++                                        config.venv            dnl
++                                        2>&AS_MESSAGE_LOG_FD], [
+       AC_MSG_RESULT(yes)
+       dnl strip all comments from install-requires.txt; this should leave
+       dnl only a single line containing the version specification for this
+@@ -72,7 +73,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+         [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
+            "from setuptools.version import pkg_resources;              dnl
+             pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" dnl
+-	 2>/dev/null],
++	 2>&AS_MESSAGE_LOG_FD],
+         [AC_MSG_RESULT(yes)],
+         [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+       )
+-- 
+cgit v1.0-1-gd88e
+
+
+From f7dfffd1c64816e2ae4e0f420b22065c5c5bf2cb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:45:37 -0400
+Subject: Trac #29665: don't clobber a plain file named config.venv.
+
+When SAGE_PYTHON_PACKAGE_CHECK() is cleaning up, we no longer remove
+"config.venv" unconditionally. Instead, we remove it only if it is a
+directory. This is also how "pyvenv --clear" works.
+---
+ m4/sage_python_package_check.m4 | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index e0e0b9f..127a078 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -85,7 +85,9 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+       sage_spkg_install_$1=yes
+     ])
+ 
+-    rm -rf config.venv
++    dnl Clean up config.venv, but only if we could have created it.
++    dnl (The --clear flag to pyvenv will not clobber a plain file.)
++    AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9849c77313b895dcfb786d2ea54e36585bd31ce2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 16 Oct 2021 08:14:42 -0400
+Subject: Trac #29665: don't announce system python packages that won't be
+ used.
+
+When --enable-system-site-packages was not given, the python packages
+using SAGE_PYTHON_PACKAGE_CHECK() in spkg-configure.m4 cannot be used.
+Rather than suggest that users install them anyway, that macro now
+hacks the value of sage_use_system_$package to be "no" when the use
+of system site packages is disabled at the python level.
+---
+ m4/sage_python_package_check.m4 | 17 +++++++++++++++++
+ 1 file changed, 17 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 127a078..7ee82a7 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -89,6 +89,23 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     dnl (The --clear flag to pyvenv will not clobber a plain file.)
+     AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
++    dnl System site packages are disabled.
+     sage_spkg_install_$1=yes
++
++    dnl We have to retroactively hack the --with-system-foo={no,yes,force}
++    dnl mechanism here because it wasn't designed with the ability to
++    dnl disable arbitrary chunks of system packages in mind. The easy cases
++    dnl are "no" and "force" which require no action; "no" means we won't
++    dnl suggest the package anyway, and "force" will raise an error when
++    dnl the system-package check fails.
++    dnl
++    dnl The default of "yes" is more troubling because it is the default. To
++    dnl avoid prompting users to install packages that won't be used, we want
++    dnl to ignore "yes" when reporting the "hint: install these packages..."
++    dnl at the end of ./configure. To accomplish that, we change "yes" to
++    dnl "no" here, essentially changing the default for packages using this
++    dnl macro when --enable-system-site-packages is disabled. Packages with
++    dnl "no" are not suggested to the user.
++    AS_IF([test "${sage_use_system_$1}" = "yes"],[sage_use_system_$1=no])
+   ])
+ ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3e6ad737b94aaac234d615ecaf1a2455eb607f1a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 17 Oct 2021 06:16:21 -0400
+Subject: Trac #29665: add Gentoo package information for python packages.
+
+---
+ build/pkgs/babel/distros/gentoo.txt         | 1 +
+ build/pkgs/bleach/distros/gentoo.txt        | 1 +
+ build/pkgs/certifi/distros/gentoo.txt       | 1 +
+ build/pkgs/cvxopt/distros/gentoo.txt        | 1 +
+ build/pkgs/decorator/distros/gentoo.txt     | 1 +
+ build/pkgs/html5lib/distros/gentoo.txt      | 1 +
+ build/pkgs/idna/distros/gentoo.txt          | 1 +
+ build/pkgs/jinja2/distros/gentoo.txt        | 1 +
+ build/pkgs/matplotlib/distros/gentoo.txt    | 1 +
+ build/pkgs/mpmath/distros/gentoo.txt        | 1 +
+ build/pkgs/networkx/distros/gentoo.txt      | 1 +
+ build/pkgs/numpy/distros/gentoo.txt         | 1 +
+ build/pkgs/packaging/distros/gentoo.txt     | 1 +
+ build/pkgs/pandocfilters/distros/gentoo.txt | 1 +
+ build/pkgs/pickleshare/distros/gentoo.txt   | 1 +
+ build/pkgs/pillow/distros/gentoo.txt        | 1 +
+ build/pkgs/pluggy/distros/gentoo.txt        | 1 +
+ build/pkgs/pygments/distros/gentoo.txt      | 1 +
+ build/pkgs/pytz/distros/gentoo.txt          | 1 +
+ build/pkgs/pyzmq/distros/gentoo.txt         | 1 +
+ build/pkgs/requests/distros/gentoo.txt      | 1 +
+ build/pkgs/scipy/distros/gentoo.txt         | 1 +
+ build/pkgs/setuptools/distros/gentoo.txt    | 1 +
+ build/pkgs/six/distros/gentoo.txt           | 1 +
+ build/pkgs/sympy/distros/gentoo.txt         | 1 +
+ build/pkgs/texttable/distros/gentoo.txt     | 1 +
+ build/pkgs/toml/distros/gentoo.txt          | 1 +
+ build/pkgs/webencodings/distros/gentoo.txt  | 1 +
+ 28 files changed, 28 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/gentoo.txt
+ create mode 100644 build/pkgs/bleach/distros/gentoo.txt
+ create mode 100644 build/pkgs/certifi/distros/gentoo.txt
+ create mode 100644 build/pkgs/cvxopt/distros/gentoo.txt
+ create mode 100644 build/pkgs/decorator/distros/gentoo.txt
+ create mode 100644 build/pkgs/html5lib/distros/gentoo.txt
+ create mode 100644 build/pkgs/idna/distros/gentoo.txt
+ create mode 100644 build/pkgs/jinja2/distros/gentoo.txt
+ create mode 100644 build/pkgs/matplotlib/distros/gentoo.txt
+ create mode 100644 build/pkgs/mpmath/distros/gentoo.txt
+ create mode 100644 build/pkgs/networkx/distros/gentoo.txt
+ create mode 100644 build/pkgs/numpy/distros/gentoo.txt
+ create mode 100644 build/pkgs/packaging/distros/gentoo.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/gentoo.txt
+ create mode 100644 build/pkgs/pickleshare/distros/gentoo.txt
+ create mode 100644 build/pkgs/pillow/distros/gentoo.txt
+ create mode 100644 build/pkgs/pluggy/distros/gentoo.txt
+ create mode 100644 build/pkgs/pygments/distros/gentoo.txt
+ create mode 100644 build/pkgs/pytz/distros/gentoo.txt
+ create mode 100644 build/pkgs/pyzmq/distros/gentoo.txt
+ create mode 100644 build/pkgs/requests/distros/gentoo.txt
+ create mode 100644 build/pkgs/scipy/distros/gentoo.txt
+ create mode 100644 build/pkgs/setuptools/distros/gentoo.txt
+ create mode 100644 build/pkgs/six/distros/gentoo.txt
+ create mode 100644 build/pkgs/sympy/distros/gentoo.txt
+ create mode 100644 build/pkgs/texttable/distros/gentoo.txt
+ create mode 100644 build/pkgs/toml/distros/gentoo.txt
+ create mode 100644 build/pkgs/webencodings/distros/gentoo.txt
+
+diff --git a/build/pkgs/babel/distros/gentoo.txt b/build/pkgs/babel/distros/gentoo.txt
+new file mode 100644
+index 00000000..2d2c34f
+--- /dev/null
++++ b/build/pkgs/babel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/Babel
+diff --git a/build/pkgs/bleach/distros/gentoo.txt b/build/pkgs/bleach/distros/gentoo.txt
+new file mode 100644
+index 00000000..b4f9744
+--- /dev/null
++++ b/build/pkgs/bleach/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/bleach
+diff --git a/build/pkgs/certifi/distros/gentoo.txt b/build/pkgs/certifi/distros/gentoo.txt
+new file mode 100644
+index 00000000..72e2e91
+--- /dev/null
++++ b/build/pkgs/certifi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/certifi
+diff --git a/build/pkgs/cvxopt/distros/gentoo.txt b/build/pkgs/cvxopt/distros/gentoo.txt
+new file mode 100644
+index 00000000..b312391
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/cvxopt
+diff --git a/build/pkgs/decorator/distros/gentoo.txt b/build/pkgs/decorator/distros/gentoo.txt
+new file mode 100644
+index 00000000..fea5a67
+--- /dev/null
++++ b/build/pkgs/decorator/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/decorator
+diff --git a/build/pkgs/html5lib/distros/gentoo.txt b/build/pkgs/html5lib/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c2be76
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/html5lib
+diff --git a/build/pkgs/idna/distros/gentoo.txt b/build/pkgs/idna/distros/gentoo.txt
+new file mode 100644
+index 00000000..68ef51c
+--- /dev/null
++++ b/build/pkgs/idna/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/idna
+diff --git a/build/pkgs/jinja2/distros/gentoo.txt b/build/pkgs/jinja2/distros/gentoo.txt
+new file mode 100644
+index 00000000..15a27ae
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jinja
+diff --git a/build/pkgs/matplotlib/distros/gentoo.txt b/build/pkgs/matplotlib/distros/gentoo.txt
+new file mode 100644
+index 00000000..bcfefb5
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/matplotlib
+diff --git a/build/pkgs/mpmath/distros/gentoo.txt b/build/pkgs/mpmath/distros/gentoo.txt
+new file mode 100644
+index 00000000..946c62d
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/mpmath
+diff --git a/build/pkgs/networkx/distros/gentoo.txt b/build/pkgs/networkx/distros/gentoo.txt
+new file mode 100644
+index 00000000..dd97742
+--- /dev/null
++++ b/build/pkgs/networkx/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/networkx
+diff --git a/build/pkgs/numpy/distros/gentoo.txt b/build/pkgs/numpy/distros/gentoo.txt
+new file mode 100644
+index 00000000..d2179d4
+--- /dev/null
++++ b/build/pkgs/numpy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/numpy
+diff --git a/build/pkgs/packaging/distros/gentoo.txt b/build/pkgs/packaging/distros/gentoo.txt
+new file mode 100644
+index 00000000..e5309ed
+--- /dev/null
++++ b/build/pkgs/packaging/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/packaging
+diff --git a/build/pkgs/pandocfilters/distros/gentoo.txt b/build/pkgs/pandocfilters/distros/gentoo.txt
+new file mode 100644
+index 00000000..a726fda
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/gentoo.txt b/build/pkgs/pickleshare/distros/gentoo.txt
+new file mode 100644
+index 00000000..14fad0f
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pickleshare
+diff --git a/build/pkgs/pillow/distros/gentoo.txt b/build/pkgs/pillow/distros/gentoo.txt
+new file mode 100644
+index 00000000..1243649
+--- /dev/null
++++ b/build/pkgs/pillow/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pillow
+diff --git a/build/pkgs/pluggy/distros/gentoo.txt b/build/pkgs/pluggy/distros/gentoo.txt
+new file mode 100644
+index 00000000..7b33876
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pluggy
+diff --git a/build/pkgs/pygments/distros/gentoo.txt b/build/pkgs/pygments/distros/gentoo.txt
+new file mode 100644
+index 00000000..a584f32
+--- /dev/null
++++ b/build/pkgs/pygments/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pygments
+diff --git a/build/pkgs/pytz/distros/gentoo.txt b/build/pkgs/pytz/distros/gentoo.txt
+new file mode 100644
+index 00000000..902a18b
+--- /dev/null
++++ b/build/pkgs/pytz/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pytz
+diff --git a/build/pkgs/pyzmq/distros/gentoo.txt b/build/pkgs/pyzmq/distros/gentoo.txt
+new file mode 100644
+index 00000000..77c2429
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyzmq
+diff --git a/build/pkgs/requests/distros/gentoo.txt b/build/pkgs/requests/distros/gentoo.txt
+new file mode 100644
+index 00000000..d3dc941
+--- /dev/null
++++ b/build/pkgs/requests/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/requests
+diff --git a/build/pkgs/scipy/distros/gentoo.txt b/build/pkgs/scipy/distros/gentoo.txt
+new file mode 100644
+index 00000000..11dabd2
+--- /dev/null
++++ b/build/pkgs/scipy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/scipy
+diff --git a/build/pkgs/setuptools/distros/gentoo.txt b/build/pkgs/setuptools/distros/gentoo.txt
+new file mode 100644
+index 00000000..3a4fa34
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/setuptools
+diff --git a/build/pkgs/six/distros/gentoo.txt b/build/pkgs/six/distros/gentoo.txt
+new file mode 100644
+index 00000000..f73f648
+--- /dev/null
++++ b/build/pkgs/six/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/six
+diff --git a/build/pkgs/sympy/distros/gentoo.txt b/build/pkgs/sympy/distros/gentoo.txt
+new file mode 100644
+index 00000000..b5a5034
+--- /dev/null
++++ b/build/pkgs/sympy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sympy
+diff --git a/build/pkgs/texttable/distros/gentoo.txt b/build/pkgs/texttable/distros/gentoo.txt
+new file mode 100644
+index 00000000..b33a7a7
+--- /dev/null
++++ b/build/pkgs/texttable/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/texttable
+diff --git a/build/pkgs/toml/distros/gentoo.txt b/build/pkgs/toml/distros/gentoo.txt
+new file mode 100644
+index 00000000..64fcea3
+--- /dev/null
++++ b/build/pkgs/toml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/toml
+diff --git a/build/pkgs/webencodings/distros/gentoo.txt b/build/pkgs/webencodings/distros/gentoo.txt
+new file mode 100644
+index 00000000..7539b0f
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/webencodings
+-- 
+cgit v1.0-1-gd88e
+
+
+From 088380f884124c9608160b613ba031c5f023f604 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 18:43:04 -0700
+Subject: build/pkgs: Add distros/fedora.txt for Python packages
+
+---
+ build/pkgs/babel/distros/fedora.txt         | 1 +
+ build/pkgs/bleach/distros/fedora.txt        | 1 +
+ build/pkgs/certifi/distros/fedora.txt       | 1 +
+ build/pkgs/cvxopt/distros/fedora.txt        | 1 +
+ build/pkgs/decorator/distros/fedora.txt     | 1 +
+ build/pkgs/html5lib/distros/fedora.txt      | 1 +
+ build/pkgs/idna/distros/fedora.txt          | 1 +
+ build/pkgs/jinja2/distros/fedora.txt        | 1 +
+ build/pkgs/matplotlib/distros/fedora.txt    | 1 +
+ build/pkgs/mpmath/distros/fedora.txt        | 1 +
+ build/pkgs/networkx/distros/fedora.txt      | 1 +
+ build/pkgs/numpy/distros/fedora.txt         | 1 +
+ build/pkgs/packaging/distros/fedora.txt     | 1 +
+ build/pkgs/pandocfilters/distros/fedora.txt | 1 +
+ build/pkgs/pickleshare/distros/fedora.txt   | 1 +
+ build/pkgs/pillow/distros/fedora.txt        | 1 +
+ build/pkgs/pluggy/distros/fedora.txt        | 1 +
+ build/pkgs/py/distros/fedora.txt            | 1 +
+ build/pkgs/pygments/distros/fedora.txt      | 1 +
+ build/pkgs/pytz/distros/fedora.txt          | 1 +
+ build/pkgs/pyzmq/distros/fedora.txt         | 1 +
+ build/pkgs/requests/distros/fedora.txt      | 1 +
+ build/pkgs/scipy/distros/fedora.txt         | 1 +
+ build/pkgs/setuptools/distros/fedora.txt    | 1 +
+ build/pkgs/six/distros/fedora.txt           | 1 +
+ build/pkgs/sympy/distros/fedora.txt         | 1 +
+ build/pkgs/texttable/distros/fedora.txt     | 1 +
+ build/pkgs/toml/distros/fedora.txt          | 1 +
+ build/pkgs/webencodings/distros/fedora.txt  | 1 +
+ build/pkgs/wheel/distros/fedora.txt         | 1 +
+ 30 files changed, 30 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/fedora.txt
+ create mode 100644 build/pkgs/bleach/distros/fedora.txt
+ create mode 100644 build/pkgs/certifi/distros/fedora.txt
+ create mode 100644 build/pkgs/cvxopt/distros/fedora.txt
+ create mode 100644 build/pkgs/decorator/distros/fedora.txt
+ create mode 100644 build/pkgs/html5lib/distros/fedora.txt
+ create mode 100644 build/pkgs/idna/distros/fedora.txt
+ create mode 100644 build/pkgs/jinja2/distros/fedora.txt
+ create mode 100644 build/pkgs/matplotlib/distros/fedora.txt
+ create mode 100644 build/pkgs/mpmath/distros/fedora.txt
+ create mode 100644 build/pkgs/networkx/distros/fedora.txt
+ create mode 100644 build/pkgs/numpy/distros/fedora.txt
+ create mode 100644 build/pkgs/packaging/distros/fedora.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/fedora.txt
+ create mode 100644 build/pkgs/pickleshare/distros/fedora.txt
+ create mode 100644 build/pkgs/pillow/distros/fedora.txt
+ create mode 100644 build/pkgs/pluggy/distros/fedora.txt
+ create mode 100644 build/pkgs/py/distros/fedora.txt
+ create mode 100644 build/pkgs/pygments/distros/fedora.txt
+ create mode 100644 build/pkgs/pytz/distros/fedora.txt
+ create mode 100644 build/pkgs/pyzmq/distros/fedora.txt
+ create mode 100644 build/pkgs/requests/distros/fedora.txt
+ create mode 100644 build/pkgs/scipy/distros/fedora.txt
+ create mode 100644 build/pkgs/setuptools/distros/fedora.txt
+ create mode 100644 build/pkgs/six/distros/fedora.txt
+ create mode 100644 build/pkgs/sympy/distros/fedora.txt
+ create mode 100644 build/pkgs/texttable/distros/fedora.txt
+ create mode 100644 build/pkgs/toml/distros/fedora.txt
+ create mode 100644 build/pkgs/webencodings/distros/fedora.txt
+ create mode 100644 build/pkgs/wheel/distros/fedora.txt
+
+diff --git a/build/pkgs/babel/distros/fedora.txt b/build/pkgs/babel/distros/fedora.txt
+new file mode 100644
+index 00000000..98f6593
+--- /dev/null
++++ b/build/pkgs/babel/distros/fedora.txt
+@@ -0,0 +1 @@
++babel
+diff --git a/build/pkgs/bleach/distros/fedora.txt b/build/pkgs/bleach/distros/fedora.txt
+new file mode 100644
+index 00000000..c5422cc
+--- /dev/null
++++ b/build/pkgs/bleach/distros/fedora.txt
+@@ -0,0 +1 @@
++python-bleach
+diff --git a/build/pkgs/certifi/distros/fedora.txt b/build/pkgs/certifi/distros/fedora.txt
+new file mode 100644
+index 00000000..be421c8
+--- /dev/null
++++ b/build/pkgs/certifi/distros/fedora.txt
+@@ -0,0 +1 @@
++python-certifi
+diff --git a/build/pkgs/cvxopt/distros/fedora.txt b/build/pkgs/cvxopt/distros/fedora.txt
+new file mode 100644
+index 00000000..f15770f
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/fedora.txt
+@@ -0,0 +1 @@
++python-cvxopt
+diff --git a/build/pkgs/decorator/distros/fedora.txt b/build/pkgs/decorator/distros/fedora.txt
+new file mode 100644
+index 00000000..0795604
+--- /dev/null
++++ b/build/pkgs/decorator/distros/fedora.txt
+@@ -0,0 +1 @@
++python-decorator
+diff --git a/build/pkgs/html5lib/distros/fedora.txt b/build/pkgs/html5lib/distros/fedora.txt
+new file mode 100644
+index 00000000..b821491
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/fedora.txt
+@@ -0,0 +1 @@
++python-html5lib
+diff --git a/build/pkgs/idna/distros/fedora.txt b/build/pkgs/idna/distros/fedora.txt
+new file mode 100644
+index 00000000..a73e70c
+--- /dev/null
++++ b/build/pkgs/idna/distros/fedora.txt
+@@ -0,0 +1 @@
++python-idna
+diff --git a/build/pkgs/jinja2/distros/fedora.txt b/build/pkgs/jinja2/distros/fedora.txt
+new file mode 100644
+index 00000000..f5f3caf
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/fedora.txt
+@@ -0,0 +1 @@
++python-jinja2
+diff --git a/build/pkgs/matplotlib/distros/fedora.txt b/build/pkgs/matplotlib/distros/fedora.txt
+new file mode 100644
+index 00000000..f6d856e
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/fedora.txt
+@@ -0,0 +1 @@
++python-matplotlib
+diff --git a/build/pkgs/mpmath/distros/fedora.txt b/build/pkgs/mpmath/distros/fedora.txt
+new file mode 100644
+index 00000000..a7dc8d5
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/fedora.txt
+@@ -0,0 +1 @@
++python-mpmath
+diff --git a/build/pkgs/networkx/distros/fedora.txt b/build/pkgs/networkx/distros/fedora.txt
+new file mode 100644
+index 00000000..293f943
+--- /dev/null
++++ b/build/pkgs/networkx/distros/fedora.txt
+@@ -0,0 +1 @@
++python-networkx
+diff --git a/build/pkgs/numpy/distros/fedora.txt b/build/pkgs/numpy/distros/fedora.txt
+new file mode 100644
+index 00000000..c8722b9
+--- /dev/null
++++ b/build/pkgs/numpy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-numpy
+diff --git a/build/pkgs/packaging/distros/fedora.txt b/build/pkgs/packaging/distros/fedora.txt
+new file mode 100644
+index 00000000..02ad855
+--- /dev/null
++++ b/build/pkgs/packaging/distros/fedora.txt
+@@ -0,0 +1 @@
++python-packaging
+diff --git a/build/pkgs/pandocfilters/distros/fedora.txt b/build/pkgs/pandocfilters/distros/fedora.txt
+new file mode 100644
+index 00000000..e7a86d0
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/fedora.txt b/build/pkgs/pickleshare/distros/fedora.txt
+new file mode 100644
+index 00000000..6d991a2
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pickleshare
+diff --git a/build/pkgs/pillow/distros/fedora.txt b/build/pkgs/pillow/distros/fedora.txt
+new file mode 100644
+index 00000000..86dbb1d
+--- /dev/null
++++ b/build/pkgs/pillow/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pillow
+diff --git a/build/pkgs/pluggy/distros/fedora.txt b/build/pkgs/pluggy/distros/fedora.txt
+new file mode 100644
+index 00000000..c869e54
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pluggy
+diff --git a/build/pkgs/py/distros/fedora.txt b/build/pkgs/py/distros/fedora.txt
+new file mode 100644
+index 00000000..b348d39
+--- /dev/null
++++ b/build/pkgs/py/distros/fedora.txt
+@@ -0,0 +1 @@
++python-py
+diff --git a/build/pkgs/pygments/distros/fedora.txt b/build/pkgs/pygments/distros/fedora.txt
+new file mode 100644
+index 00000000..f3e72a8
+--- /dev/null
++++ b/build/pkgs/pygments/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pygments
+diff --git a/build/pkgs/pytz/distros/fedora.txt b/build/pkgs/pytz/distros/fedora.txt
+new file mode 100644
+index 00000000..2cccc9e
+--- /dev/null
++++ b/build/pkgs/pytz/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pytz
+diff --git a/build/pkgs/pyzmq/distros/fedora.txt b/build/pkgs/pyzmq/distros/fedora.txt
+new file mode 100644
+index 00000000..23f64d1
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pyzmq
+diff --git a/build/pkgs/requests/distros/fedora.txt b/build/pkgs/requests/distros/fedora.txt
+new file mode 100644
+index 00000000..93a7bc1
+--- /dev/null
++++ b/build/pkgs/requests/distros/fedora.txt
+@@ -0,0 +1 @@
++python-requests
+diff --git a/build/pkgs/scipy/distros/fedora.txt b/build/pkgs/scipy/distros/fedora.txt
+new file mode 100644
+index 00000000..7ff2882
+--- /dev/null
++++ b/build/pkgs/scipy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-scipy
+diff --git a/build/pkgs/setuptools/distros/fedora.txt b/build/pkgs/setuptools/distros/fedora.txt
+new file mode 100644
+index 00000000..e1ad178
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/fedora.txt
+@@ -0,0 +1 @@
++python-setuptools
+diff --git a/build/pkgs/six/distros/fedora.txt b/build/pkgs/six/distros/fedora.txt
+new file mode 100644
+index 00000000..787c530
+--- /dev/null
++++ b/build/pkgs/six/distros/fedora.txt
+@@ -0,0 +1 @@
++python-six
+diff --git a/build/pkgs/sympy/distros/fedora.txt b/build/pkgs/sympy/distros/fedora.txt
+new file mode 100644
+index 00000000..126c88a
+--- /dev/null
++++ b/build/pkgs/sympy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-sympy
+diff --git a/build/pkgs/texttable/distros/fedora.txt b/build/pkgs/texttable/distros/fedora.txt
+new file mode 100644
+index 00000000..8d1ccec
+--- /dev/null
++++ b/build/pkgs/texttable/distros/fedora.txt
+@@ -0,0 +1 @@
++python-texttable
+diff --git a/build/pkgs/toml/distros/fedora.txt b/build/pkgs/toml/distros/fedora.txt
+new file mode 100644
+index 00000000..821ee77
+--- /dev/null
++++ b/build/pkgs/toml/distros/fedora.txt
+@@ -0,0 +1 @@
++python-toml
+diff --git a/build/pkgs/webencodings/distros/fedora.txt b/build/pkgs/webencodings/distros/fedora.txt
+new file mode 100644
+index 00000000..12ddba9
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/fedora.txt
+@@ -0,0 +1 @@
++python-webencodings
+diff --git a/build/pkgs/wheel/distros/fedora.txt b/build/pkgs/wheel/distros/fedora.txt
+new file mode 100644
+index 00000000..ae4cbb9
+--- /dev/null
++++ b/build/pkgs/wheel/distros/fedora.txt
+@@ -0,0 +1 @@
++python-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From ad1d5a20380b147c774903066031442f31094626 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 21:04:04 -0700
+Subject: build/pkgs: Add distros/arch.txt for Python packages
+
+---
+ build/pkgs/babel/distros/arch.txt         | 1 +
+ build/pkgs/bleach/distros/arch.txt        | 1 +
+ build/pkgs/certifi/distros/arch.txt       | 1 +
+ build/pkgs/cvxopt/distros/arch.txt        | 1 +
+ build/pkgs/decorator/distros/arch.txt     | 1 +
+ build/pkgs/html5lib/distros/arch.txt      | 1 +
+ build/pkgs/idna/distros/arch.txt          | 1 +
+ build/pkgs/matplotlib/distros/arch.txt    | 1 +
+ build/pkgs/mpmath/distros/arch.txt        | 1 +
+ build/pkgs/networkx/distros/arch.txt      | 1 +
+ build/pkgs/numpy/distros/arch.txt         | 1 +
+ build/pkgs/packaging/distros/arch.txt     | 1 +
+ build/pkgs/pandocfilters/distros/arch.txt | 1 +
+ build/pkgs/pickleshare/distros/arch.txt   | 1 +
+ build/pkgs/pillow/distros/arch.txt        | 1 +
+ build/pkgs/pluggy/distros/arch.txt        | 1 +
+ build/pkgs/py/distros/arch.txt            | 1 +
+ build/pkgs/pygments/distros/arch.txt      | 1 +
+ build/pkgs/pytz/distros/arch.txt          | 1 +
+ build/pkgs/pyzmq/distros/arch.txt         | 1 +
+ build/pkgs/requests/distros/arch.txt      | 1 +
+ build/pkgs/scipy/distros/arch.txt         | 1 +
+ build/pkgs/setuptools/distros/arch.txt    | 1 +
+ build/pkgs/six/distros/arch.txt           | 1 +
+ build/pkgs/sympy/distros/arch.txt         | 1 +
+ build/pkgs/texttable/distros/arch.txt     | 1 +
+ build/pkgs/toml/distros/arch.txt          | 1 +
+ build/pkgs/webencodings/distros/arch.txt  | 1 +
+ build/pkgs/wheel/distros/arch.txt         | 1 +
+ 29 files changed, 29 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/arch.txt
+ create mode 100644 build/pkgs/bleach/distros/arch.txt
+ create mode 100644 build/pkgs/certifi/distros/arch.txt
+ create mode 100644 build/pkgs/cvxopt/distros/arch.txt
+ create mode 100644 build/pkgs/decorator/distros/arch.txt
+ create mode 100644 build/pkgs/html5lib/distros/arch.txt
+ create mode 100644 build/pkgs/idna/distros/arch.txt
+ create mode 100644 build/pkgs/matplotlib/distros/arch.txt
+ create mode 100644 build/pkgs/mpmath/distros/arch.txt
+ create mode 100644 build/pkgs/networkx/distros/arch.txt
+ create mode 100644 build/pkgs/numpy/distros/arch.txt
+ create mode 100644 build/pkgs/packaging/distros/arch.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/arch.txt
+ create mode 100644 build/pkgs/pickleshare/distros/arch.txt
+ create mode 100644 build/pkgs/pillow/distros/arch.txt
+ create mode 100644 build/pkgs/pluggy/distros/arch.txt
+ create mode 100644 build/pkgs/py/distros/arch.txt
+ create mode 100644 build/pkgs/pygments/distros/arch.txt
+ create mode 100644 build/pkgs/pytz/distros/arch.txt
+ create mode 100644 build/pkgs/pyzmq/distros/arch.txt
+ create mode 100644 build/pkgs/requests/distros/arch.txt
+ create mode 100644 build/pkgs/scipy/distros/arch.txt
+ create mode 100644 build/pkgs/setuptools/distros/arch.txt
+ create mode 100644 build/pkgs/six/distros/arch.txt
+ create mode 100644 build/pkgs/sympy/distros/arch.txt
+ create mode 100644 build/pkgs/texttable/distros/arch.txt
+ create mode 100644 build/pkgs/toml/distros/arch.txt
+ create mode 100644 build/pkgs/webencodings/distros/arch.txt
+ create mode 100644 build/pkgs/wheel/distros/arch.txt
+
+diff --git a/build/pkgs/babel/distros/arch.txt b/build/pkgs/babel/distros/arch.txt
+new file mode 100644
+index 00000000..f2d828c
+--- /dev/null
++++ b/build/pkgs/babel/distros/arch.txt
+@@ -0,0 +1 @@
++python-babel
+diff --git a/build/pkgs/bleach/distros/arch.txt b/build/pkgs/bleach/distros/arch.txt
+new file mode 100644
+index 00000000..c5422cc
+--- /dev/null
++++ b/build/pkgs/bleach/distros/arch.txt
+@@ -0,0 +1 @@
++python-bleach
+diff --git a/build/pkgs/certifi/distros/arch.txt b/build/pkgs/certifi/distros/arch.txt
+new file mode 100644
+index 00000000..be421c8
+--- /dev/null
++++ b/build/pkgs/certifi/distros/arch.txt
+@@ -0,0 +1 @@
++python-certifi
+diff --git a/build/pkgs/cvxopt/distros/arch.txt b/build/pkgs/cvxopt/distros/arch.txt
+new file mode 100644
+index 00000000..f15770f
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/arch.txt
+@@ -0,0 +1 @@
++python-cvxopt
+diff --git a/build/pkgs/decorator/distros/arch.txt b/build/pkgs/decorator/distros/arch.txt
+new file mode 100644
+index 00000000..0795604
+--- /dev/null
++++ b/build/pkgs/decorator/distros/arch.txt
+@@ -0,0 +1 @@
++python-decorator
+diff --git a/build/pkgs/html5lib/distros/arch.txt b/build/pkgs/html5lib/distros/arch.txt
+new file mode 100644
+index 00000000..b821491
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/arch.txt
+@@ -0,0 +1 @@
++python-html5lib
+diff --git a/build/pkgs/idna/distros/arch.txt b/build/pkgs/idna/distros/arch.txt
+new file mode 100644
+index 00000000..a73e70c
+--- /dev/null
++++ b/build/pkgs/idna/distros/arch.txt
+@@ -0,0 +1 @@
++python-idna
+diff --git a/build/pkgs/matplotlib/distros/arch.txt b/build/pkgs/matplotlib/distros/arch.txt
+new file mode 100644
+index 00000000..f6d856e
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/arch.txt
+@@ -0,0 +1 @@
++python-matplotlib
+diff --git a/build/pkgs/mpmath/distros/arch.txt b/build/pkgs/mpmath/distros/arch.txt
+new file mode 100644
+index 00000000..a7dc8d5
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/arch.txt
+@@ -0,0 +1 @@
++python-mpmath
+diff --git a/build/pkgs/networkx/distros/arch.txt b/build/pkgs/networkx/distros/arch.txt
+new file mode 100644
+index 00000000..293f943
+--- /dev/null
++++ b/build/pkgs/networkx/distros/arch.txt
+@@ -0,0 +1 @@
++python-networkx
+diff --git a/build/pkgs/numpy/distros/arch.txt b/build/pkgs/numpy/distros/arch.txt
+new file mode 100644
+index 00000000..c8722b9
+--- /dev/null
++++ b/build/pkgs/numpy/distros/arch.txt
+@@ -0,0 +1 @@
++python-numpy
+diff --git a/build/pkgs/packaging/distros/arch.txt b/build/pkgs/packaging/distros/arch.txt
+new file mode 100644
+index 00000000..02ad855
+--- /dev/null
++++ b/build/pkgs/packaging/distros/arch.txt
+@@ -0,0 +1 @@
++python-packaging
+diff --git a/build/pkgs/pandocfilters/distros/arch.txt b/build/pkgs/pandocfilters/distros/arch.txt
+new file mode 100644
+index 00000000..e7a86d0
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/arch.txt
+@@ -0,0 +1 @@
++python-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/arch.txt b/build/pkgs/pickleshare/distros/arch.txt
+new file mode 100644
+index 00000000..6d991a2
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/arch.txt
+@@ -0,0 +1 @@
++python-pickleshare
+diff --git a/build/pkgs/pillow/distros/arch.txt b/build/pkgs/pillow/distros/arch.txt
+new file mode 100644
+index 00000000..86dbb1d
+--- /dev/null
++++ b/build/pkgs/pillow/distros/arch.txt
+@@ -0,0 +1 @@
++python-pillow
+diff --git a/build/pkgs/pluggy/distros/arch.txt b/build/pkgs/pluggy/distros/arch.txt
+new file mode 100644
+index 00000000..c869e54
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/arch.txt
+@@ -0,0 +1 @@
++python-pluggy
+diff --git a/build/pkgs/py/distros/arch.txt b/build/pkgs/py/distros/arch.txt
+new file mode 100644
+index 00000000..b348d39
+--- /dev/null
++++ b/build/pkgs/py/distros/arch.txt
+@@ -0,0 +1 @@
++python-py
+diff --git a/build/pkgs/pygments/distros/arch.txt b/build/pkgs/pygments/distros/arch.txt
+new file mode 100644
+index 00000000..f3e72a8
+--- /dev/null
++++ b/build/pkgs/pygments/distros/arch.txt
+@@ -0,0 +1 @@
++python-pygments
+diff --git a/build/pkgs/pytz/distros/arch.txt b/build/pkgs/pytz/distros/arch.txt
+new file mode 100644
+index 00000000..2cccc9e
+--- /dev/null
++++ b/build/pkgs/pytz/distros/arch.txt
+@@ -0,0 +1 @@
++python-pytz
+diff --git a/build/pkgs/pyzmq/distros/arch.txt b/build/pkgs/pyzmq/distros/arch.txt
+new file mode 100644
+index 00000000..23f64d1
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/arch.txt
+@@ -0,0 +1 @@
++python-pyzmq
+diff --git a/build/pkgs/requests/distros/arch.txt b/build/pkgs/requests/distros/arch.txt
+new file mode 100644
+index 00000000..93a7bc1
+--- /dev/null
++++ b/build/pkgs/requests/distros/arch.txt
+@@ -0,0 +1 @@
++python-requests
+diff --git a/build/pkgs/scipy/distros/arch.txt b/build/pkgs/scipy/distros/arch.txt
+new file mode 100644
+index 00000000..7ff2882
+--- /dev/null
++++ b/build/pkgs/scipy/distros/arch.txt
+@@ -0,0 +1 @@
++python-scipy
+diff --git a/build/pkgs/setuptools/distros/arch.txt b/build/pkgs/setuptools/distros/arch.txt
+new file mode 100644
+index 00000000..e1ad178
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/arch.txt
+@@ -0,0 +1 @@
++python-setuptools
+diff --git a/build/pkgs/six/distros/arch.txt b/build/pkgs/six/distros/arch.txt
+new file mode 100644
+index 00000000..787c530
+--- /dev/null
++++ b/build/pkgs/six/distros/arch.txt
+@@ -0,0 +1 @@
++python-six
+diff --git a/build/pkgs/sympy/distros/arch.txt b/build/pkgs/sympy/distros/arch.txt
+new file mode 100644
+index 00000000..126c88a
+--- /dev/null
++++ b/build/pkgs/sympy/distros/arch.txt
+@@ -0,0 +1 @@
++python-sympy
+diff --git a/build/pkgs/texttable/distros/arch.txt b/build/pkgs/texttable/distros/arch.txt
+new file mode 100644
+index 00000000..8d1ccec
+--- /dev/null
++++ b/build/pkgs/texttable/distros/arch.txt
+@@ -0,0 +1 @@
++python-texttable
+diff --git a/build/pkgs/toml/distros/arch.txt b/build/pkgs/toml/distros/arch.txt
+new file mode 100644
+index 00000000..821ee77
+--- /dev/null
++++ b/build/pkgs/toml/distros/arch.txt
+@@ -0,0 +1 @@
++python-toml
+diff --git a/build/pkgs/webencodings/distros/arch.txt b/build/pkgs/webencodings/distros/arch.txt
+new file mode 100644
+index 00000000..12ddba9
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/arch.txt
+@@ -0,0 +1 @@
++python-webencodings
+diff --git a/build/pkgs/wheel/distros/arch.txt b/build/pkgs/wheel/distros/arch.txt
+new file mode 100644
+index 00000000..ae4cbb9
+--- /dev/null
++++ b/build/pkgs/wheel/distros/arch.txt
+@@ -0,0 +1 @@
++python-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5087abee08f2a89ddaf422ec72a84575fe724a79 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 21:20:56 -0700
+Subject: build/pkgs: Add distros/opensuse.txt for Python packages
+
+---
+ build/pkgs/bleach/distros/opensuse.txt        | 1 +
+ build/pkgs/cvxopt/distros/opensuse.txt        | 1 +
+ build/pkgs/html5lib/distros/opensuse.txt      | 1 +
+ build/pkgs/idna/distros/opensuse.txt          | 1 +
+ build/pkgs/jinja2/distros/opensuse.txt        | 2 +-
+ build/pkgs/mpmath/distros/opensuse.txt        | 1 +
+ build/pkgs/numpy/distros/opensuse.txt         | 1 +
+ build/pkgs/packaging/distros/opensuse.txt     | 1 +
+ build/pkgs/pandocfilters/distros/opensuse.txt | 1 +
+ build/pkgs/pluggy/distros/opensuse.txt        | 1 +
+ build/pkgs/py/distros/opensuse.txt            | 1 +
+ build/pkgs/pygments/distros/opensuse.txt      | 2 +-
+ build/pkgs/sympy/distros/opensuse.txt         | 1 +
+ build/pkgs/texttable/distros/opensuse.txt     | 1 +
+ build/pkgs/toml/distros/opensuse.txt          | 1 +
+ 15 files changed, 15 insertions(+), 2 deletions(-)
+ create mode 100644 build/pkgs/bleach/distros/opensuse.txt
+ create mode 100644 build/pkgs/cvxopt/distros/opensuse.txt
+ create mode 100644 build/pkgs/html5lib/distros/opensuse.txt
+ create mode 100644 build/pkgs/idna/distros/opensuse.txt
+ create mode 100644 build/pkgs/mpmath/distros/opensuse.txt
+ create mode 100644 build/pkgs/numpy/distros/opensuse.txt
+ create mode 100644 build/pkgs/packaging/distros/opensuse.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/opensuse.txt
+ create mode 100644 build/pkgs/pluggy/distros/opensuse.txt
+ create mode 100644 build/pkgs/py/distros/opensuse.txt
+ create mode 100644 build/pkgs/sympy/distros/opensuse.txt
+ create mode 100644 build/pkgs/texttable/distros/opensuse.txt
+ create mode 100644 build/pkgs/toml/distros/opensuse.txt
+
+diff --git a/build/pkgs/bleach/distros/opensuse.txt b/build/pkgs/bleach/distros/opensuse.txt
+new file mode 100644
+index 00000000..6d37c4c
+--- /dev/null
++++ b/build/pkgs/bleach/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-bleach
+diff --git a/build/pkgs/cvxopt/distros/opensuse.txt b/build/pkgs/cvxopt/distros/opensuse.txt
+new file mode 100644
+index 00000000..2bb6ad1
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-cvxopt
+diff --git a/build/pkgs/html5lib/distros/opensuse.txt b/build/pkgs/html5lib/distros/opensuse.txt
+new file mode 100644
+index 00000000..6d7b8df
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-html5lib
+diff --git a/build/pkgs/idna/distros/opensuse.txt b/build/pkgs/idna/distros/opensuse.txt
+new file mode 100644
+index 00000000..de48e70
+--- /dev/null
++++ b/build/pkgs/idna/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-idna
+diff --git a/build/pkgs/jinja2/distros/opensuse.txt b/build/pkgs/jinja2/distros/opensuse.txt
+index 5d90a22..f2db865 100644
+--- a/build/pkgs/jinja2/distros/opensuse.txt
++++ b/build/pkgs/jinja2/distros/opensuse.txt
+@@ -1 +1 @@
+-python3-Jinja2
++python3-jinja2
+diff --git a/build/pkgs/mpmath/distros/opensuse.txt b/build/pkgs/mpmath/distros/opensuse.txt
+new file mode 100644
+index 00000000..fbc82a9
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-mpmath
+diff --git a/build/pkgs/numpy/distros/opensuse.txt b/build/pkgs/numpy/distros/opensuse.txt
+new file mode 100644
+index 00000000..79d5c5a
+--- /dev/null
++++ b/build/pkgs/numpy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-numpy
+diff --git a/build/pkgs/packaging/distros/opensuse.txt b/build/pkgs/packaging/distros/opensuse.txt
+new file mode 100644
+index 00000000..8f1c0ff
+--- /dev/null
++++ b/build/pkgs/packaging/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-packaging
+diff --git a/build/pkgs/pandocfilters/distros/opensuse.txt b/build/pkgs/pandocfilters/distros/opensuse.txt
+new file mode 100644
+index 00000000..d0d4c24
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-pandocfilters
+diff --git a/build/pkgs/pluggy/distros/opensuse.txt b/build/pkgs/pluggy/distros/opensuse.txt
+new file mode 100644
+index 00000000..43a3acf
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-pluggy
+diff --git a/build/pkgs/py/distros/opensuse.txt b/build/pkgs/py/distros/opensuse.txt
+new file mode 100644
+index 00000000..81fefe6
+--- /dev/null
++++ b/build/pkgs/py/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-py
+diff --git a/build/pkgs/pygments/distros/opensuse.txt b/build/pkgs/pygments/distros/opensuse.txt
+index 9ff5740..3ab3792 100644
+--- a/build/pkgs/pygments/distros/opensuse.txt
++++ b/build/pkgs/pygments/distros/opensuse.txt
+@@ -1 +1 @@
+-python3-Pygments
++python3-pygments
+diff --git a/build/pkgs/sympy/distros/opensuse.txt b/build/pkgs/sympy/distros/opensuse.txt
+new file mode 100644
+index 00000000..db423c8
+--- /dev/null
++++ b/build/pkgs/sympy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-sympy
+diff --git a/build/pkgs/texttable/distros/opensuse.txt b/build/pkgs/texttable/distros/opensuse.txt
+new file mode 100644
+index 00000000..8f8e7e2
+--- /dev/null
++++ b/build/pkgs/texttable/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-texttable
+diff --git a/build/pkgs/toml/distros/opensuse.txt b/build/pkgs/toml/distros/opensuse.txt
+new file mode 100644
+index 00000000..543e89d
+--- /dev/null
++++ b/build/pkgs/toml/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-toml
+-- 
+cgit v1.0-1-gd88e
+
+
+From a480ba7ace1370d106ae831e904ea22b72af1be7 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 22:45:04 -0700
+Subject: build/pkgs: Add distros/debian.txt for Python packages
+
+---
+ build/pkgs/babel/distros/debian.txt         | 1 +
+ build/pkgs/bleach/distros/debian.txt        | 1 +
+ build/pkgs/certifi/distros/debian.txt       | 1 +
+ build/pkgs/cvxopt/distros/debian.txt        | 1 +
+ build/pkgs/decorator/distros/debian.txt     | 1 +
+ build/pkgs/html5lib/distros/debian.txt      | 1 +
+ build/pkgs/idna/distros/debian.txt          | 1 +
+ build/pkgs/jinja2/distros/debian.txt        | 1 +
+ build/pkgs/matplotlib/distros/debian.txt    | 1 +
+ build/pkgs/mpmath/distros/debian.txt        | 1 +
+ build/pkgs/networkx/distros/debian.txt      | 1 +
+ build/pkgs/numpy/distros/debian.txt         | 1 +
+ build/pkgs/packaging/distros/debian.txt     | 1 +
+ build/pkgs/pandocfilters/distros/debian.txt | 1 +
+ build/pkgs/pickleshare/distros/debian.txt   | 1 +
+ build/pkgs/pillow/distros/debian.txt        | 1 +
+ build/pkgs/pluggy/distros/debian.txt        | 1 +
+ build/pkgs/py/distros/debian.txt            | 1 +
+ build/pkgs/pygments/distros/debian.txt      | 1 +
+ build/pkgs/pytz/distros/debian.txt          | 1 +
+ build/pkgs/requests/distros/debian.txt      | 1 +
+ build/pkgs/scipy/distros/debian.txt         | 1 +
+ build/pkgs/setuptools/distros/debian.txt    | 1 +
+ build/pkgs/six/distros/debian.txt           | 1 +
+ build/pkgs/sympy/distros/debian.txt         | 1 +
+ build/pkgs/texttable/distros/debian.txt     | 1 +
+ build/pkgs/toml/distros/debian.txt          | 1 +
+ build/pkgs/webencodings/distros/debian.txt  | 1 +
+ build/pkgs/wheel/distros/debian.txt         | 1 +
+ 29 files changed, 29 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/debian.txt
+ create mode 100644 build/pkgs/bleach/distros/debian.txt
+ create mode 100644 build/pkgs/certifi/distros/debian.txt
+ create mode 100644 build/pkgs/cvxopt/distros/debian.txt
+ create mode 100644 build/pkgs/decorator/distros/debian.txt
+ create mode 100644 build/pkgs/html5lib/distros/debian.txt
+ create mode 100644 build/pkgs/idna/distros/debian.txt
+ create mode 100644 build/pkgs/jinja2/distros/debian.txt
+ create mode 100644 build/pkgs/matplotlib/distros/debian.txt
+ create mode 100644 build/pkgs/mpmath/distros/debian.txt
+ create mode 100644 build/pkgs/networkx/distros/debian.txt
+ create mode 100644 build/pkgs/numpy/distros/debian.txt
+ create mode 100644 build/pkgs/packaging/distros/debian.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/debian.txt
+ create mode 100644 build/pkgs/pickleshare/distros/debian.txt
+ create mode 100644 build/pkgs/pillow/distros/debian.txt
+ create mode 100644 build/pkgs/pluggy/distros/debian.txt
+ create mode 100644 build/pkgs/py/distros/debian.txt
+ create mode 100644 build/pkgs/pygments/distros/debian.txt
+ create mode 100644 build/pkgs/pytz/distros/debian.txt
+ create mode 100644 build/pkgs/requests/distros/debian.txt
+ create mode 100644 build/pkgs/scipy/distros/debian.txt
+ create mode 100644 build/pkgs/setuptools/distros/debian.txt
+ create mode 100644 build/pkgs/six/distros/debian.txt
+ create mode 100644 build/pkgs/sympy/distros/debian.txt
+ create mode 100644 build/pkgs/texttable/distros/debian.txt
+ create mode 100644 build/pkgs/toml/distros/debian.txt
+ create mode 100644 build/pkgs/webencodings/distros/debian.txt
+ create mode 100644 build/pkgs/wheel/distros/debian.txt
+
+diff --git a/build/pkgs/babel/distros/debian.txt b/build/pkgs/babel/distros/debian.txt
+new file mode 100644
+index 00000000..e623eb6
+--- /dev/null
++++ b/build/pkgs/babel/distros/debian.txt
+@@ -0,0 +1 @@
++python3-babel
+diff --git a/build/pkgs/bleach/distros/debian.txt b/build/pkgs/bleach/distros/debian.txt
+new file mode 100644
+index 00000000..6d37c4c
+--- /dev/null
++++ b/build/pkgs/bleach/distros/debian.txt
+@@ -0,0 +1 @@
++python3-bleach
+diff --git a/build/pkgs/certifi/distros/debian.txt b/build/pkgs/certifi/distros/debian.txt
+new file mode 100644
+index 00000000..f585a82
+--- /dev/null
++++ b/build/pkgs/certifi/distros/debian.txt
+@@ -0,0 +1 @@
++python3-certifi
+diff --git a/build/pkgs/cvxopt/distros/debian.txt b/build/pkgs/cvxopt/distros/debian.txt
+new file mode 100644
+index 00000000..2bb6ad1
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/debian.txt
+@@ -0,0 +1 @@
++python3-cvxopt
+diff --git a/build/pkgs/decorator/distros/debian.txt b/build/pkgs/decorator/distros/debian.txt
+new file mode 100644
+index 00000000..46c478e
+--- /dev/null
++++ b/build/pkgs/decorator/distros/debian.txt
+@@ -0,0 +1 @@
++python3-decorator
+diff --git a/build/pkgs/html5lib/distros/debian.txt b/build/pkgs/html5lib/distros/debian.txt
+new file mode 100644
+index 00000000..6d7b8df
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/debian.txt
+@@ -0,0 +1 @@
++python3-html5lib
+diff --git a/build/pkgs/idna/distros/debian.txt b/build/pkgs/idna/distros/debian.txt
+new file mode 100644
+index 00000000..de48e70
+--- /dev/null
++++ b/build/pkgs/idna/distros/debian.txt
+@@ -0,0 +1 @@
++python3-idna
+diff --git a/build/pkgs/jinja2/distros/debian.txt b/build/pkgs/jinja2/distros/debian.txt
+new file mode 100644
+index 00000000..f2db865
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/debian.txt
+@@ -0,0 +1 @@
++python3-jinja2
+diff --git a/build/pkgs/matplotlib/distros/debian.txt b/build/pkgs/matplotlib/distros/debian.txt
+new file mode 100644
+index 00000000..1374329
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/debian.txt
+@@ -0,0 +1 @@
++python3-matplotlib
+diff --git a/build/pkgs/mpmath/distros/debian.txt b/build/pkgs/mpmath/distros/debian.txt
+new file mode 100644
+index 00000000..fbc82a9
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/debian.txt
+@@ -0,0 +1 @@
++python3-mpmath
+diff --git a/build/pkgs/networkx/distros/debian.txt b/build/pkgs/networkx/distros/debian.txt
+new file mode 100644
+index 00000000..6779066
+--- /dev/null
++++ b/build/pkgs/networkx/distros/debian.txt
+@@ -0,0 +1 @@
++python3-networkx
+diff --git a/build/pkgs/numpy/distros/debian.txt b/build/pkgs/numpy/distros/debian.txt
+new file mode 100644
+index 00000000..79d5c5a
+--- /dev/null
++++ b/build/pkgs/numpy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-numpy
+diff --git a/build/pkgs/packaging/distros/debian.txt b/build/pkgs/packaging/distros/debian.txt
+new file mode 100644
+index 00000000..8f1c0ff
+--- /dev/null
++++ b/build/pkgs/packaging/distros/debian.txt
+@@ -0,0 +1 @@
++python3-packaging
+diff --git a/build/pkgs/pandocfilters/distros/debian.txt b/build/pkgs/pandocfilters/distros/debian.txt
+new file mode 100644
+index 00000000..d0d4c24
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/debian.txt b/build/pkgs/pickleshare/distros/debian.txt
+new file mode 100644
+index 00000000..a00907d
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pickleshare
+diff --git a/build/pkgs/pillow/distros/debian.txt b/build/pkgs/pillow/distros/debian.txt
+new file mode 100644
+index 00000000..3319fcd
+--- /dev/null
++++ b/build/pkgs/pillow/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pillow
+diff --git a/build/pkgs/pluggy/distros/debian.txt b/build/pkgs/pluggy/distros/debian.txt
+new file mode 100644
+index 00000000..43a3acf
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pluggy
+diff --git a/build/pkgs/py/distros/debian.txt b/build/pkgs/py/distros/debian.txt
+new file mode 100644
+index 00000000..81fefe6
+--- /dev/null
++++ b/build/pkgs/py/distros/debian.txt
+@@ -0,0 +1 @@
++python3-py
+diff --git a/build/pkgs/pygments/distros/debian.txt b/build/pkgs/pygments/distros/debian.txt
+new file mode 100644
+index 00000000..3ab3792
+--- /dev/null
++++ b/build/pkgs/pygments/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pygments
+diff --git a/build/pkgs/pytz/distros/debian.txt b/build/pkgs/pytz/distros/debian.txt
+new file mode 100644
+index 00000000..db20908
+--- /dev/null
++++ b/build/pkgs/pytz/distros/debian.txt
+@@ -0,0 +1 @@
++python3-tz
+diff --git a/build/pkgs/requests/distros/debian.txt b/build/pkgs/requests/distros/debian.txt
+new file mode 100644
+index 00000000..43147b2
+--- /dev/null
++++ b/build/pkgs/requests/distros/debian.txt
+@@ -0,0 +1 @@
++python3-requests
+diff --git a/build/pkgs/scipy/distros/debian.txt b/build/pkgs/scipy/distros/debian.txt
+new file mode 100644
+index 00000000..12b3666
+--- /dev/null
++++ b/build/pkgs/scipy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-scipy
+diff --git a/build/pkgs/setuptools/distros/debian.txt b/build/pkgs/setuptools/distros/debian.txt
+new file mode 100644
+index 00000000..1c0901c
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/debian.txt
+@@ -0,0 +1 @@
++python3-setuptools
+diff --git a/build/pkgs/six/distros/debian.txt b/build/pkgs/six/distros/debian.txt
+new file mode 100644
+index 00000000..68ff859
+--- /dev/null
++++ b/build/pkgs/six/distros/debian.txt
+@@ -0,0 +1 @@
++python3-six
+diff --git a/build/pkgs/sympy/distros/debian.txt b/build/pkgs/sympy/distros/debian.txt
+new file mode 100644
+index 00000000..db423c8
+--- /dev/null
++++ b/build/pkgs/sympy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-sympy
+diff --git a/build/pkgs/texttable/distros/debian.txt b/build/pkgs/texttable/distros/debian.txt
+new file mode 100644
+index 00000000..8f8e7e2
+--- /dev/null
++++ b/build/pkgs/texttable/distros/debian.txt
+@@ -0,0 +1 @@
++python3-texttable
+diff --git a/build/pkgs/toml/distros/debian.txt b/build/pkgs/toml/distros/debian.txt
+new file mode 100644
+index 00000000..543e89d
+--- /dev/null
++++ b/build/pkgs/toml/distros/debian.txt
+@@ -0,0 +1 @@
++python3-toml
+diff --git a/build/pkgs/webencodings/distros/debian.txt b/build/pkgs/webencodings/distros/debian.txt
+new file mode 100644
+index 00000000..ac30c2f
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/debian.txt
+@@ -0,0 +1 @@
++python3-webencodings
+diff --git a/build/pkgs/wheel/distros/debian.txt b/build/pkgs/wheel/distros/debian.txt
+new file mode 100644
+index 00000000..3c066725
+--- /dev/null
++++ b/build/pkgs/wheel/distros/debian.txt
+@@ -0,0 +1 @@
++python3-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 93bf30d7de292551c3050e2dd74651d69ba4bd46 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 18 Oct 2021 07:50:34 -0400
+Subject: Trac #29665: add more documentation for SAGE_PYTHON_PACKAGE_CHECK().
+
+An earlier commit allows SAGE_PYTHON_PACKAGE_CHECK(package) to tweak the
+value of sage_use_system_$package if --enable-system-site-packages was
+not used. This essentially changes the default --with-system-$package=yes
+to "no" in that case. Here we update the documentation to reflect it.
+---
+ m4/sage_python_package_check.m4 | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 7ee82a7..95eefd0 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -34,6 +34,10 @@
+ #   ensure that the ./configure- and run-time views of the system
+ #   are as similar as possible.
+ #
++#   To avoid suggesting these system packages to users who have not
++#   set --enable-system-site-packages, this macro also changes the
++#   default for --with-system-foo from "yes" to "no" in that case.
++#
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
+-- 
+cgit v1.0-1-gd88e
+
+
+From d771e49d57ecdf3622434bc09cbfb87ad3bb7744 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 18 Oct 2021 07:42:46 -0400
+Subject: Trac #29665: improve SAGE_PYTHON_PACKAGE_CHECK() failure message.
+
+When --enable-system-site-packages is off, SAGE_PYTHON_PACKAGE_CHECK()
+will always install the corresponding SPKG. We improve the ./configure
+output in that case to make it clear that the decision was based on
+the value of --enable-system-site-packages and not the "real" check.
+---
+ m4/sage_python_package_check.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 95eefd0..5f0f084 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -40,7 +40,9 @@
+ #
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
++  AC_MSG_CHECKING([if --enable-system-site-packages was used])
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
++    AC_MSG_RESULT(yes)
+     AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
+ 
+     dnl We run this check inside a python venv, because that's ultimately
+@@ -94,6 +96,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
+     dnl System site packages are disabled.
++    AC_MSG_RESULT(no; skipping check)
+     sage_spkg_install_$1=yes
+ 
+     dnl We have to retroactively hack the --with-system-foo={no,yes,force}
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5bb43c1b78a1deb3364f235305937c2f823e5e18 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 24 Oct 2021 20:29:25 -0400
+Subject: Trac #29665: use sage-venv in SAGE_PYTHON_PACKAGE_CHECK().
+
+For consistency with the rest of the build system, we now use the
+build/bin/sage-venv script to create the venv in this autoconf macro
+rather than invoking $PYTHON_FOR_VENV with "-m venv" directly.
+---
+ m4/sage_python_package_check.m4 | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 5f0f084..5547b35 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -50,11 +50,11 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AC_MSG_CHECKING([if we can create a python venv in config.venv])
+ 
+     dnl Use --clear because ./configure typically clobbers its output files.
+-    AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
+-                                        --clear                dnl
+-                                        --without-pip          dnl
+-                                        config.venv            dnl
+-                                        2>&AS_MESSAGE_LOG_FD], [
++    AS_IF(["${PYTHON_FOR_VENV}" build/bin/sage-venv      dnl
++                                  --system-site-packages dnl
++                                  --clear                dnl
++                                  config.venv            dnl
++                                  2>&AS_MESSAGE_LOG_FD], [
+       AC_MSG_RESULT(yes)
+       dnl strip all comments from install-requires.txt; this should leave
+       dnl only a single line containing the version specification for this
+-- 
+cgit v1.0-1-gd88e
+
+
+From c78363d6326addff16ca5abac897949a6be72bf4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:10:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for urllib3.
+
+---
+ build/pkgs/urllib3/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/urllib3/spkg-configure.m4
+
+diff --git a/build/pkgs/urllib3/spkg-configure.m4 b/build/pkgs/urllib3/spkg-configure.m4
+new file mode 100644
+index 00000000..d7ef3e1
+--- /dev/null
++++ b/build/pkgs/urllib3/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([urllib3], [SAGE_PYTHON_PACKAGE_CHECK([urllib3])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f416d5abcae495ea8301fad024b279ea9e997b29 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:15:18 -0400
+Subject: Trac #29665: add Gentoo package information for urllib3.
+
+---
+ build/pkgs/urllib3/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/urllib3/distros/gentoo.txt
+
+diff --git a/build/pkgs/urllib3/distros/gentoo.txt b/build/pkgs/urllib3/distros/gentoo.txt
+new file mode 100644
+index 00000000..172a535
+--- /dev/null
++++ b/build/pkgs/urllib3/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/urllib3
+-- 
+cgit v1.0-1-gd88e
+
+
+From 852068b992bf7959500c650f54cb92e5b68d7ef8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:15:58 -0400
+Subject: Trac #29665: add Gentoo package information for nbformat.
+
+---
+ build/pkgs/nbformat/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbformat/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbformat/distros/gentoo.txt b/build/pkgs/nbformat/distros/gentoo.txt
+new file mode 100644
+index 00000000..006b1f2
+--- /dev/null
++++ b/build/pkgs/nbformat/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbformat
+-- 
+cgit v1.0-1-gd88e
+
+
+From 66179fd28fcc92ee840dcd87bb4db25cea968d66 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:34:16 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for nbformat.
+
+---
+ build/pkgs/nbformat/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbformat/spkg-configure.m4
+
+diff --git a/build/pkgs/nbformat/spkg-configure.m4 b/build/pkgs/nbformat/spkg-configure.m4
+new file mode 100644
+index 00000000..5a7f8c4
+--- /dev/null
++++ b/build/pkgs/nbformat/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbformat], [SAGE_PYTHON_PACKAGE_CHECK([nbformat])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 874005e81ed20f27a5f895030dcdbdfc5f73ad80 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:47:01 -0400
+Subject: Trac #29665: add Gentoo package information for zipp.
+
+---
+ build/pkgs/zipp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/zipp/distros/gentoo.txt
+
+diff --git a/build/pkgs/zipp/distros/gentoo.txt b/build/pkgs/zipp/distros/gentoo.txt
+new file mode 100644
+index 00000000..7f59450
+--- /dev/null
++++ b/build/pkgs/zipp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/zipp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0cc2a7355b5554c1fb79c742ebf02eff54465b3e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:47:35 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for zipp.
+
+---
+ build/pkgs/zipp/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/zipp/spkg-configure.m4
+
+diff --git a/build/pkgs/zipp/spkg-configure.m4 b/build/pkgs/zipp/spkg-configure.m4
+new file mode 100644
+index 00000000..0fe3a9c
+--- /dev/null
++++ b/build/pkgs/zipp/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([zipp], [SAGE_PYTHON_PACKAGE_CHECK([zipp])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6073ad8e56c21fc862749bbd84a56d543fb9458c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:48:37 -0400
+Subject: Trac #29665: add Gentoo package information for wcwidth.
+
+---
+ build/pkgs/wcwidth/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wcwidth/distros/gentoo.txt
+
+diff --git a/build/pkgs/wcwidth/distros/gentoo.txt b/build/pkgs/wcwidth/distros/gentoo.txt
+new file mode 100644
+index 00000000..edeb80b
+--- /dev/null
++++ b/build/pkgs/wcwidth/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/wcwidth
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9793d6172c64d61a015fbe61bd45863759124fad Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:51:10 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for wcwidth.
+
+---
+ build/pkgs/wcwidth/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wcwidth/spkg-configure.m4
+
+diff --git a/build/pkgs/wcwidth/spkg-configure.m4 b/build/pkgs/wcwidth/spkg-configure.m4
+new file mode 100644
+index 00000000..5bde15a
+--- /dev/null
++++ b/build/pkgs/wcwidth/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([wcwidth], [SAGE_PYTHON_PACKAGE_CHECK([wcwidth])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20232f370a43c146ca4e696c72a2cbcc498db060 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:52:36 -0400
+Subject: Trac #29665: add Gentoo package information for testpath.
+
+---
+ build/pkgs/testpath/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/testpath/distros/gentoo.txt
+
+diff --git a/build/pkgs/testpath/distros/gentoo.txt b/build/pkgs/testpath/distros/gentoo.txt
+new file mode 100644
+index 00000000..efa10a0
+--- /dev/null
++++ b/build/pkgs/testpath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/testpath
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1b0785b2aad8844e74345fe950baf097e2b43d24 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:55:22 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for testpath.
+
+---
+ build/pkgs/testpath/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/testpath/spkg-configure.m4
+
+diff --git a/build/pkgs/testpath/spkg-configure.m4 b/build/pkgs/testpath/spkg-configure.m4
+new file mode 100644
+index 00000000..d8fc2a7
+--- /dev/null
++++ b/build/pkgs/testpath/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([testpath], [SAGE_PYTHON_PACKAGE_CHECK([testpath])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 10fc3829ecd956d732b1b069fdfe81f0d6d5cdc2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:56:06 -0400
+Subject: Trac #29665: add Gentoo package information for jedi.
+
+---
+ build/pkgs/jedi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jedi/distros/gentoo.txt
+
+diff --git a/build/pkgs/jedi/distros/gentoo.txt b/build/pkgs/jedi/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c85a46
+--- /dev/null
++++ b/build/pkgs/jedi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jedi
+-- 
+cgit v1.0-1-gd88e
+
+
+From a75824d74c281c7639028ca01dabeed266f56998 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:06:37 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for jedi.
+
+---
+ build/pkgs/jedi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jedi/spkg-configure.m4
+
+diff --git a/build/pkgs/jedi/spkg-configure.m4 b/build/pkgs/jedi/spkg-configure.m4
+new file mode 100644
+index 00000000..a37dbcc
+--- /dev/null
++++ b/build/pkgs/jedi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jedi], [SAGE_PYTHON_PACKAGE_CHECK([jedi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 17af01373d43f6acbbdbc23e073e372d3fdadf8b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:07:47 -0400
+Subject: Trac #29665: add Gentoo package information for tomli.
+
+---
+ build/pkgs/tomli/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tomli/distros/gentoo.txt
+
+diff --git a/build/pkgs/tomli/distros/gentoo.txt b/build/pkgs/tomli/distros/gentoo.txt
+new file mode 100644
+index 00000000..0458e25
+--- /dev/null
++++ b/build/pkgs/tomli/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/tomli
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0d3b5994ae612be11992467c4a3f1a74b81400fe Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:08:12 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for tomli.
+
+---
+ build/pkgs/tomli/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tomli/spkg-configure.m4
+
+diff --git a/build/pkgs/tomli/spkg-configure.m4 b/build/pkgs/tomli/spkg-configure.m4
+new file mode 100644
+index 00000000..95a8b8b
+--- /dev/null
++++ b/build/pkgs/tomli/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tomli], [SAGE_PYTHON_PACKAGE_CHECK([tomli])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From dce1c515781b0eeb8eb9c2bc7aba581560c1fac1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:09:22 -0400
+Subject: Trac #29665: add Gentoo package information for defusedxml.
+
+---
+ build/pkgs/defusedxml/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/defusedxml/distros/gentoo.txt
+
+diff --git a/build/pkgs/defusedxml/distros/gentoo.txt b/build/pkgs/defusedxml/distros/gentoo.txt
+new file mode 100644
+index 00000000..2804214
+--- /dev/null
++++ b/build/pkgs/defusedxml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/defusedxml
+-- 
+cgit v1.0-1-gd88e
+
+
+From 02e1e1cd7f8bdae3ca5b7d35ce70af28a44e9b7c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:11:14 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for defusedxml.
+
+---
+ build/pkgs/defusedxml/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/defusedxml/spkg-configure.m4
+
+diff --git a/build/pkgs/defusedxml/spkg-configure.m4 b/build/pkgs/defusedxml/spkg-configure.m4
+new file mode 100644
+index 00000000..e02f345
+--- /dev/null
++++ b/build/pkgs/defusedxml/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([defusedxml], [SAGE_PYTHON_PACKAGE_CHECK([defusedxml])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e0ba4ebb5cfc637b5d26b85de9f34e0a160d2b9c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:12:22 -0400
+Subject: Trac #29665: add Gentoo package information for ipywidgets.
+
+---
+ build/pkgs/ipywidgets/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipywidgets/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipywidgets/distros/gentoo.txt b/build/pkgs/ipywidgets/distros/gentoo.txt
+new file mode 100644
+index 00000000..7c76967
+--- /dev/null
++++ b/build/pkgs/ipywidgets/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipywidgets
+-- 
+cgit v1.0-1-gd88e
+
+
+From 49df7e7d93c7a31b7c46d5d224a35fd313a29a32 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:15:53 -0400
+Subject: Trac #29665: add Gentoo package information for simplegeneric.
+
+---
+ build/pkgs/simplegeneric/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/simplegeneric/distros/gentoo.txt
+
+diff --git a/build/pkgs/simplegeneric/distros/gentoo.txt b/build/pkgs/simplegeneric/distros/gentoo.txt
+new file mode 100644
+index 00000000..a86e90d
+--- /dev/null
++++ b/build/pkgs/simplegeneric/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/simplegeneric
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2a893635d5804749e6fec7ed7289c921ecb5300a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:16:33 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for simplegeneric.
+
+---
+ build/pkgs/simplegeneric/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/simplegeneric/spkg-configure.m4
+
+diff --git a/build/pkgs/simplegeneric/spkg-configure.m4 b/build/pkgs/simplegeneric/spkg-configure.m4
+new file mode 100644
+index 00000000..13715ab
+--- /dev/null
++++ b/build/pkgs/simplegeneric/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([simplegeneric], [SAGE_PYTHON_PACKAGE_CHECK([simplegeneric])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a8fe7ecd6e3163e7d01261e5497ac452a8cc95ab Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:17:18 -0400
+Subject: Trac #29665: add Gentoo package information for imagesize.
+
+---
+ build/pkgs/imagesize/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/imagesize/distros/gentoo.txt
+
+diff --git a/build/pkgs/imagesize/distros/gentoo.txt b/build/pkgs/imagesize/distros/gentoo.txt
+new file mode 100644
+index 00000000..54350ba
+--- /dev/null
++++ b/build/pkgs/imagesize/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/imagesize
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2ad837c5dd1fca0f50ce6d5042a9344210a54f84 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:17:48 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for imagesize.
+
+---
+ build/pkgs/imagesize/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/imagesize/spkg-configure.m4
+
+diff --git a/build/pkgs/imagesize/spkg-configure.m4 b/build/pkgs/imagesize/spkg-configure.m4
+new file mode 100644
+index 00000000..20210ef
+--- /dev/null
++++ b/build/pkgs/imagesize/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([imagesize], [SAGE_PYTHON_PACKAGE_CHECK([imagesize])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bf47415b5bfca2d7bf24e20de35662bf331623b9 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:18:49 -0400
+Subject: Trac #29665: add Gentoo package information for mistune.
+
+---
+ build/pkgs/mistune/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mistune/distros/gentoo.txt
+
+diff --git a/build/pkgs/mistune/distros/gentoo.txt b/build/pkgs/mistune/distros/gentoo.txt
+new file mode 100644
+index 00000000..56f0a4e
+--- /dev/null
++++ b/build/pkgs/mistune/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/mistune
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6898a74fd0c65a40c5220ba68b4062ac6fe060c6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:21:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for mistune.
+
+---
+ build/pkgs/mistune/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mistune/spkg-configure.m4
+
+diff --git a/build/pkgs/mistune/spkg-configure.m4 b/build/pkgs/mistune/spkg-configure.m4
+new file mode 100644
+index 00000000..972f33d
+--- /dev/null
++++ b/build/pkgs/mistune/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([mistune], [SAGE_PYTHON_PACKAGE_CHECK([mistune])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 62735e4ccf2031cd39eb5e04b03bdfd97005d808 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:22:48 -0400
+Subject: Trac #29665: add Gentoo package information for backcall.
+
+---
+ build/pkgs/backcall/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/backcall/distros/gentoo.txt
+
+diff --git a/build/pkgs/backcall/distros/gentoo.txt b/build/pkgs/backcall/distros/gentoo.txt
+new file mode 100644
+index 00000000..266a222
+--- /dev/null
++++ b/build/pkgs/backcall/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/backcall
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9ef3ea42d4a33c7cdb623fa5417ae300cf323183 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:25:10 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for backcall.
+
+---
+ build/pkgs/backcall/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/backcall/spkg-configure.m4
+
+diff --git a/build/pkgs/backcall/spkg-configure.m4 b/build/pkgs/backcall/spkg-configure.m4
+new file mode 100644
+index 00000000..d6b11c4
+--- /dev/null
++++ b/build/pkgs/backcall/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([backcall], [SAGE_PYTHON_PACKAGE_CHECK([backcall])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1b3ea2a3c40fea0fb58435f5e5304368ea58dff8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:25:58 -0400
+Subject: Trac #29665: add Gentoo package information for parso.
+
+---
+ build/pkgs/parso/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/parso/distros/gentoo.txt
+
+diff --git a/build/pkgs/parso/distros/gentoo.txt b/build/pkgs/parso/distros/gentoo.txt
+new file mode 100644
+index 00000000..f9ce4c7
+--- /dev/null
++++ b/build/pkgs/parso/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/parso
+-- 
+cgit v1.0-1-gd88e
+
+
+From 963a3a2c563ec71a1f5be2395722d0e824cb0b11 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:26:22 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for parso.
+
+---
+ build/pkgs/parso/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/parso/spkg-configure.m4
+
+diff --git a/build/pkgs/parso/spkg-configure.m4 b/build/pkgs/parso/spkg-configure.m4
+new file mode 100644
+index 00000000..1ca6f1b
+--- /dev/null
++++ b/build/pkgs/parso/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([parso], [SAGE_PYTHON_PACKAGE_CHECK([parso])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 943053dfc474b6549bcc7d6ef2971ea43588b35c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:27:00 -0400
+Subject: Trac #29665: add Gentoo package information for pyparsing.
+
+---
+ build/pkgs/pyparsing/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyparsing/distros/gentoo.txt
+
+diff --git a/build/pkgs/pyparsing/distros/gentoo.txt b/build/pkgs/pyparsing/distros/gentoo.txt
+new file mode 100644
+index 00000000..ef0419f
+--- /dev/null
++++ b/build/pkgs/pyparsing/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyparsing
+-- 
+cgit v1.0-1-gd88e
+
+
+From bd682eaa2ac41dd84e7a52e2b0c5442fc8fd8919 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:27:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pyparsing.
+
+---
+ build/pkgs/pyparsing/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyparsing/spkg-configure.m4
+
+diff --git a/build/pkgs/pyparsing/spkg-configure.m4 b/build/pkgs/pyparsing/spkg-configure.m4
+new file mode 100644
+index 00000000..d2b4c00
+--- /dev/null
++++ b/build/pkgs/pyparsing/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pyparsing], [SAGE_PYTHON_PACKAGE_CHECK([pyparsing])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 74f36a9c0ec7c63b7e6c40066e42f4b15c2f978e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:17:42 -0400
+Subject: Trac #29665: add Gentoo package information for debugpy.
+
+---
+ build/pkgs/debugpy/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/debugpy/distros/gentoo.txt
+
+diff --git a/build/pkgs/debugpy/distros/gentoo.txt b/build/pkgs/debugpy/distros/gentoo.txt
+new file mode 100644
+index 00000000..8b797ce
+--- /dev/null
++++ b/build/pkgs/debugpy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/debugpy
+-- 
+cgit v1.0-1-gd88e
+
+
+From be072fa87ac5c373d9dc9b54c0bd68734d5709bc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:21:17 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for debugpy.
+
+---
+ build/pkgs/debugpy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/debugpy/spkg-configure.m4
+
+diff --git a/build/pkgs/debugpy/spkg-configure.m4 b/build/pkgs/debugpy/spkg-configure.m4
+new file mode 100644
+index 00000000..db605ff
+--- /dev/null
++++ b/build/pkgs/debugpy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([debugpy], [SAGE_PYTHON_PACKAGE_CHECK([debugpy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6f777ce2f2e14b94e91c8b7bbac82f9017460aba Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:23:56 -0400
+Subject: Trac #29665: add Gentoo package information for tzlocal.
+
+---
+ build/pkgs/tzlocal/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tzlocal/distros/gentoo.txt
+
+diff --git a/build/pkgs/tzlocal/distros/gentoo.txt b/build/pkgs/tzlocal/distros/gentoo.txt
+new file mode 100644
+index 00000000..2018442
+--- /dev/null
++++ b/build/pkgs/tzlocal/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/tzlocal
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3bd078fc15ae13982249452711baafae91038191 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:24:51 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for tzlocal.
+
+---
+ build/pkgs/tzlocal/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tzlocal/spkg-configure.m4
+
+diff --git a/build/pkgs/tzlocal/spkg-configure.m4 b/build/pkgs/tzlocal/spkg-configure.m4
+new file mode 100644
+index 00000000..e020b28
+--- /dev/null
++++ b/build/pkgs/tzlocal/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tzlocal], [SAGE_PYTHON_PACKAGE_CHECK([tzlocal])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 91b0882fc62214923da9ee7b6dccb05d8a1d11d1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:26:13 -0400
+Subject: Trac #29665: add Gentoo package information for pycparser.
+
+---
+ build/pkgs/pycparser/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pycparser/distros/gentoo.txt
+
+diff --git a/build/pkgs/pycparser/distros/gentoo.txt b/build/pkgs/pycparser/distros/gentoo.txt
+new file mode 100644
+index 00000000..5e87307
+--- /dev/null
++++ b/build/pkgs/pycparser/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pycparser
+-- 
+cgit v1.0-1-gd88e
+
+
+From beabde92fe6e057faf516fe82d27f1e903e55ce6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:27:27 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pycparser.
+
+---
+ build/pkgs/pycparser/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pycparser/spkg-configure.m4
+
+diff --git a/build/pkgs/pycparser/spkg-configure.m4 b/build/pkgs/pycparser/spkg-configure.m4
+new file mode 100644
+index 00000000..4b9b900
+--- /dev/null
++++ b/build/pkgs/pycparser/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pycparser], [SAGE_PYTHON_PACKAGE_CHECK([pycparser])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 86c2788dc7fd1169314e9598c91fa81045553677 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:29:36 -0400
+Subject: Trac #29665: add Gentoo package information for cycler.
+
+---
+ build/pkgs/cycler/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cycler/distros/gentoo.txt
+
+diff --git a/build/pkgs/cycler/distros/gentoo.txt b/build/pkgs/cycler/distros/gentoo.txt
+new file mode 100644
+index 00000000..4b21543
+--- /dev/null
++++ b/build/pkgs/cycler/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/cycler
+-- 
+cgit v1.0-1-gd88e
+
+
+From 67c5a944101ddf329f0a61c61d4e784f58a5c5b0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:30:27 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for cycler.
+
+---
+ build/pkgs/cycler/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cycler/spkg-configure.m4
+
+diff --git a/build/pkgs/cycler/spkg-configure.m4 b/build/pkgs/cycler/spkg-configure.m4
+new file mode 100644
+index 00000000..239571a
+--- /dev/null
++++ b/build/pkgs/cycler/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([cycler], [SAGE_PYTHON_PACKAGE_CHECK([cycler])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ef6d490251abfa41f7a0910274700a8a6a65f629 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:31:19 -0400
+Subject: Trac #29665: add Gentoo package information for traitlets.
+
+---
+ build/pkgs/traitlets/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/traitlets/distros/gentoo.txt
+
+diff --git a/build/pkgs/traitlets/distros/gentoo.txt b/build/pkgs/traitlets/distros/gentoo.txt
+new file mode 100644
+index 00000000..46bfaab
+--- /dev/null
++++ b/build/pkgs/traitlets/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/traitlets
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1f922b458d34088d9f6773312209e69f19ee45dc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:31:50 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for traitlets.
+
+---
+ build/pkgs/traitlets/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/traitlets/spkg-configure.m4
+
+diff --git a/build/pkgs/traitlets/spkg-configure.m4 b/build/pkgs/traitlets/spkg-configure.m4
+new file mode 100644
+index 00000000..df2382b
+--- /dev/null
++++ b/build/pkgs/traitlets/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([traitlets], [SAGE_PYTHON_PACKAGE_CHECK([traitlets])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 95b89a9ced0acb6d971a27fa63b97ea58a11f4e1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:33:35 -0400
+Subject: Trac #29665: add Gentoo package information for argcomplete.
+
+---
+ build/pkgs/argcomplete/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argcomplete/distros/gentoo.txt
+
+diff --git a/build/pkgs/argcomplete/distros/gentoo.txt b/build/pkgs/argcomplete/distros/gentoo.txt
+new file mode 100644
+index 00000000..b150949
+--- /dev/null
++++ b/build/pkgs/argcomplete/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/argcomplete
+-- 
+cgit v1.0-1-gd88e
+
+
+From b4cd8ef384e6e5bae0de0f3c113fb5f9e6e1a71e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:34:14 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for argcomplete.
+
+---
+ build/pkgs/argcomplete/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argcomplete/spkg-configure.m4
+
+diff --git a/build/pkgs/argcomplete/spkg-configure.m4 b/build/pkgs/argcomplete/spkg-configure.m4
+new file mode 100644
+index 00000000..cbd7ccf
+--- /dev/null
++++ b/build/pkgs/argcomplete/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([argcomplete], [SAGE_PYTHON_PACKAGE_CHECK([argcomplete])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4cc610e8331970cc018d7ea87af928fa73a292c1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:36:21 -0400
+Subject: Trac #29665: add Gentoo package information for ptyprocess.
+
+---
+ build/pkgs/ptyprocess/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ptyprocess/distros/gentoo.txt
+
+diff --git a/build/pkgs/ptyprocess/distros/gentoo.txt b/build/pkgs/ptyprocess/distros/gentoo.txt
+new file mode 100644
+index 00000000..571a851
+--- /dev/null
++++ b/build/pkgs/ptyprocess/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ptyprocess
+-- 
+cgit v1.0-1-gd88e
+
+
+From cd15f97221bf5933b07900e4f77cb55401eede26 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:37:02 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ptyprocess.
+
+---
+ build/pkgs/ptyprocess/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ptyprocess/spkg-configure.m4
+
+diff --git a/build/pkgs/ptyprocess/spkg-configure.m4 b/build/pkgs/ptyprocess/spkg-configure.m4
+new file mode 100644
+index 00000000..bfacbae
+--- /dev/null
++++ b/build/pkgs/ptyprocess/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ptyprocess], [SAGE_PYTHON_PACKAGE_CHECK([ptyprocess])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb5f45b15f99e4ba28e1b1f6042a0e8ea17f1dfc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:38:22 -0400
+Subject: Trac #29665: add Gentoo package information for attrs.
+
+---
+ build/pkgs/attrs/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/attrs/distros/gentoo.txt
+
+diff --git a/build/pkgs/attrs/distros/gentoo.txt b/build/pkgs/attrs/distros/gentoo.txt
+new file mode 100644
+index 00000000..3b906fa
+--- /dev/null
++++ b/build/pkgs/attrs/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/attrs
+-- 
+cgit v1.0-1-gd88e
+
+
+From 321707ebf8e9af1e4ac3a5b5b094b4226bb3a7a5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:38:55 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for attrs.
+
+---
+ build/pkgs/attrs/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/attrs/spkg-configure.m4
+
+diff --git a/build/pkgs/attrs/spkg-configure.m4 b/build/pkgs/attrs/spkg-configure.m4
+new file mode 100644
+index 00000000..ba6a9b7
+--- /dev/null
++++ b/build/pkgs/attrs/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([attrs], [SAGE_PYTHON_PACKAGE_CHECK([attrs])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 69a498a4e8854ecdfc2f1a134104983c0dcb9e32 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:40:09 -0400
+Subject: Trac #29665: add Gentoo package information for send2trash.
+
+---
+ build/pkgs/send2trash/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/send2trash/distros/gentoo.txt
+
+diff --git a/build/pkgs/send2trash/distros/gentoo.txt b/build/pkgs/send2trash/distros/gentoo.txt
+new file mode 100644
+index 00000000..a89b179
+--- /dev/null
++++ b/build/pkgs/send2trash/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/send2trash
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9baed17c84e1bdf5abd17c20766e5cd7dddc5b53 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:41:45 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for send2trash.
+
+---
+ build/pkgs/send2trash/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/send2trash/spkg-configure.m4
+
+diff --git a/build/pkgs/send2trash/spkg-configure.m4 b/build/pkgs/send2trash/spkg-configure.m4
+new file mode 100644
+index 00000000..3bbb727
+--- /dev/null
++++ b/build/pkgs/send2trash/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([send2trash], [SAGE_PYTHON_PACKAGE_CHECK([send2trash])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b9b552b2a2aaccaeb7c5b25be0b681f107522d09 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:43:27 -0400
+Subject: Trac #29665: add Gentoo package information for pyrsistent.
+
+---
+ build/pkgs/pyrsistent/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyrsistent/distros/gentoo.txt
+
+diff --git a/build/pkgs/pyrsistent/distros/gentoo.txt b/build/pkgs/pyrsistent/distros/gentoo.txt
+new file mode 100644
+index 00000000..83439ce
+--- /dev/null
++++ b/build/pkgs/pyrsistent/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyrsistent
+-- 
+cgit v1.0-1-gd88e
+
+
+From a17b31fac6104852762f57daa749443147bdf121 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:44:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pyrsistent.
+
+---
+ build/pkgs/pyrsistent/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyrsistent/spkg-configure.m4
+
+diff --git a/build/pkgs/pyrsistent/spkg-configure.m4 b/build/pkgs/pyrsistent/spkg-configure.m4
+new file mode 100644
+index 00000000..f7ca75d
+--- /dev/null
++++ b/build/pkgs/pyrsistent/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pyrsistent], [SAGE_PYTHON_PACKAGE_CHECK([pyrsistent])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 68520decad6d6937918d7a6af65ca5bd476e5d02 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:45:45 -0400
+Subject: Trac #29665: add Gentoo package information for entrypoints.
+
+---
+ build/pkgs/entrypoints/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/entrypoints/distros/gentoo.txt
+
+diff --git a/build/pkgs/entrypoints/distros/gentoo.txt b/build/pkgs/entrypoints/distros/gentoo.txt
+new file mode 100644
+index 00000000..684ddd0
+--- /dev/null
++++ b/build/pkgs/entrypoints/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/entrypoints
+-- 
+cgit v1.0-1-gd88e
+
+
+From 34213eccb642a6bad64d89acaefa83ee702cb483 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:46:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for entrypoints.
+
+---
+ build/pkgs/entrypoints/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/entrypoints/spkg-configure.m4
+
+diff --git a/build/pkgs/entrypoints/spkg-configure.m4 b/build/pkgs/entrypoints/spkg-configure.m4
+new file mode 100644
+index 00000000..caed658
+--- /dev/null
++++ b/build/pkgs/entrypoints/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([entrypoints], [SAGE_PYTHON_PACKAGE_CHECK([entrypoints])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8e985614345da1a58fcdc127a9c0ddd790f9b5d2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:48:26 -0400
+Subject: Trac #29665: add Gentoo package information for markupsafe.
+
+---
+ build/pkgs/markupsafe/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/markupsafe/distros/gentoo.txt
+
+diff --git a/build/pkgs/markupsafe/distros/gentoo.txt b/build/pkgs/markupsafe/distros/gentoo.txt
+new file mode 100644
+index 00000000..9654e35
+--- /dev/null
++++ b/build/pkgs/markupsafe/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/markupsafe
+-- 
+cgit v1.0-1-gd88e
+
+
+From d370f229ae0988856f2e0d1f6ee2df2c47169106 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:48:55 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for markupsafe.
+
+---
+ build/pkgs/markupsafe/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/markupsafe/spkg-configure.m4
+
+diff --git a/build/pkgs/markupsafe/spkg-configure.m4 b/build/pkgs/markupsafe/spkg-configure.m4
+new file mode 100644
+index 00000000..79eb8db
+--- /dev/null
++++ b/build/pkgs/markupsafe/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([markupsafe], [SAGE_PYTHON_PACKAGE_CHECK([markupsafe])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c49b285ad9e25e6bc81a7e75d461d234fdd3ea68 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:30:49 -0400
+Subject: Trac #29665: add Gentoo package information for flit_core.
+
+---
+ build/pkgs/flit_core/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/flit_core/distros/gentoo.txt
+
+diff --git a/build/pkgs/flit_core/distros/gentoo.txt b/build/pkgs/flit_core/distros/gentoo.txt
+new file mode 100644
+index 00000000..fe6bea9
+--- /dev/null
++++ b/build/pkgs/flit_core/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/flit_core
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b0ce1c4f23cd9fc4316e1eb2b9b4bde394957f3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:32:11 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for flit_core.
+
+---
+ build/pkgs/flit_core/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/flit_core/spkg-configure.m4
+
+diff --git a/build/pkgs/flit_core/spkg-configure.m4 b/build/pkgs/flit_core/spkg-configure.m4
+new file mode 100644
+index 00000000..ee67557
+--- /dev/null
++++ b/build/pkgs/flit_core/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([flit_core], [SAGE_PYTHON_PACKAGE_CHECK([flit_core])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f006c231a81428b1e1e792f889bf974f90e3c831 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:34:06 -0400
+Subject: Trac #29665: add Gentoo package information for nest_asyncio.
+
+---
+ build/pkgs/nest_asyncio/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nest_asyncio/distros/gentoo.txt
+
+diff --git a/build/pkgs/nest_asyncio/distros/gentoo.txt b/build/pkgs/nest_asyncio/distros/gentoo.txt
+new file mode 100644
+index 00000000..ab742d2
+--- /dev/null
++++ b/build/pkgs/nest_asyncio/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nest_asyncio
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4a58d0a96a84475e765a01a64f5f44c48a317e0b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:34:43 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for nest_asyncio.
+
+---
+ build/pkgs/nest_asyncio/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nest_asyncio/spkg-configure.m4
+
+diff --git a/build/pkgs/nest_asyncio/spkg-configure.m4 b/build/pkgs/nest_asyncio/spkg-configure.m4
+new file mode 100644
+index 00000000..4d81527
+--- /dev/null
++++ b/build/pkgs/nest_asyncio/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nest_asyncio], [SAGE_PYTHON_PACKAGE_CHECK([nest_asyncio])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e50af937777ea778908bc09a7a79db3dd80fdf25 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:37:02 -0400
+Subject: Trac #29665: add Gentoo package information for ipython_genutils.
+
+---
+ build/pkgs/ipython_genutils/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython_genutils/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipython_genutils/distros/gentoo.txt b/build/pkgs/ipython_genutils/distros/gentoo.txt
+new file mode 100644
+index 00000000..01bc49d
+--- /dev/null
++++ b/build/pkgs/ipython_genutils/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipython_genutils
+-- 
+cgit v1.0-1-gd88e
+
+
+From ec3c0ce9db2ba13c1a49d1bcfb7a4b249cb7ae83 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:39:20 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipython_genutils.
+
+---
+ build/pkgs/ipython_genutils/spkg-configure.m4 | 4 ++++
+ 1 file changed, 4 insertions(+)
+ create mode 100644 build/pkgs/ipython_genutils/spkg-configure.m4
+
+diff --git a/build/pkgs/ipython_genutils/spkg-configure.m4 b/build/pkgs/ipython_genutils/spkg-configure.m4
+new file mode 100644
+index 00000000..b0ba86a
+--- /dev/null
++++ b/build/pkgs/ipython_genutils/spkg-configure.m4
+@@ -0,0 +1,4 @@
++SAGE_SPKG_CONFIGURE(
++  [ipython_genutils],
++  [SAGE_PYTHON_PACKAGE_CHECK([ipython_genutils])]
++)
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5c9e2e265115e5f10d4b459a475467e30b4bddde Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:40:03 -0400
+Subject: Trac #29665: add Gentoo package information for ipython.
+
+---
+ build/pkgs/ipython/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipython/distros/gentoo.txt b/build/pkgs/ipython/distros/gentoo.txt
+new file mode 100644
+index 00000000..8b76f18
+--- /dev/null
++++ b/build/pkgs/ipython/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipython
+-- 
+cgit v1.0-1-gd88e
+
+
+From 621e707ddd040a902d7dddf0bed1de2b54ab22f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 07:37:56 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipython.
+
+---
+ build/pkgs/ipython/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython/spkg-configure.m4
+
+diff --git a/build/pkgs/ipython/spkg-configure.m4 b/build/pkgs/ipython/spkg-configure.m4
+new file mode 100644
+index 00000000..02ab89f
+--- /dev/null
++++ b/build/pkgs/ipython/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipython], [SAGE_PYTHON_PACKAGE_CHECK([ipython])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20a0613f6d441da436f3e7b8047a72bf490882bd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 07:51:11 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipywidgets.
+
+---
+ build/pkgs/ipywidgets/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipywidgets/spkg-configure.m4
+
+diff --git a/build/pkgs/ipywidgets/spkg-configure.m4 b/build/pkgs/ipywidgets/spkg-configure.m4
+new file mode 100644
+index 00000000..51ca9be
+--- /dev/null
++++ b/build/pkgs/ipywidgets/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipywidgets], [SAGE_PYTHON_PACKAGE_CHECK([ipywidgets])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 76bcd386633acc02a1a3026339d0cbd258ada04e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 10:05:16 -0400
+Subject: Trac #29665: add Gentoo package information for wheel.
+
+---
+ build/pkgs/wheel/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wheel/distros/gentoo.txt
+
+diff --git a/build/pkgs/wheel/distros/gentoo.txt b/build/pkgs/wheel/distros/gentoo.txt
+new file mode 100644
+index 00000000..ec571d5
+--- /dev/null
++++ b/build/pkgs/wheel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 96c2dd2ca7812f5333bb9d45eadb7ac408e364ce Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:51:44 -0500
+Subject: Trac #29665: add Gentoo package information for terminado.
+
+---
+ build/pkgs/terminado/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/terminado/distros/gentoo.txt
+
+diff --git a/build/pkgs/terminado/distros/gentoo.txt b/build/pkgs/terminado/distros/gentoo.txt
+new file mode 100644
+index 00000000..1df16f1
+--- /dev/null
++++ b/build/pkgs/terminado/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/terminado
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0de0f5f3d235a4339b21e37ea13c9f5e59a82e59 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:52:35 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for terminado.
+
+---
+ build/pkgs/terminado/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/terminado/spkg-configure.m4
+
+diff --git a/build/pkgs/terminado/spkg-configure.m4 b/build/pkgs/terminado/spkg-configure.m4
+new file mode 100644
+index 00000000..5defc2f
+--- /dev/null
++++ b/build/pkgs/terminado/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([terminado], [SAGE_PYTHON_PACKAGE_CHECK([terminado])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d14a745c770b02822557e7cee0a98de1cb2f3a12 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:56:15 -0500
+Subject: Trac #29665: add Gentoo package information for cffi.
+
+---
+ build/pkgs/cffi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cffi/distros/gentoo.txt
+
+diff --git a/build/pkgs/cffi/distros/gentoo.txt b/build/pkgs/cffi/distros/gentoo.txt
+new file mode 100644
+index 00000000..81eeb81
+--- /dev/null
++++ b/build/pkgs/cffi/distros/gentoo.txt
+@@ -0,0 +1 @@
++virtual/python-cffi
+-- 
+cgit v1.0-1-gd88e
+
+
+From ce393c04afc69fe050e38f780d4e117164687d80 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:57:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for cffi.
+
+---
+ build/pkgs/cffi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cffi/spkg-configure.m4
+
+diff --git a/build/pkgs/cffi/spkg-configure.m4 b/build/pkgs/cffi/spkg-configure.m4
+new file mode 100644
+index 00000000..dc81875
+--- /dev/null
++++ b/build/pkgs/cffi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([cffi], [SAGE_PYTHON_PACKAGE_CHECK([cffi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 467093315b3fdd57c8caa2f95cf99ad52b0b84fb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:57:57 -0500
+Subject: Trac #29665: add Gentoo package information for pip.
+
+---
+ build/pkgs/pip/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pip/distros/gentoo.txt
+
+diff --git a/build/pkgs/pip/distros/gentoo.txt b/build/pkgs/pip/distros/gentoo.txt
+new file mode 100644
+index 00000000..1845454
+--- /dev/null
++++ b/build/pkgs/pip/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pip[vanilla]
+-- 
+cgit v1.0-1-gd88e
+
+
+From c597fd23f9f68dabbcb7e698d0569c3e6458f6d1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 09:07:26 -0500
+Subject: Trac #29665: new spkg-configure.m4 for pip.
+
+---
+ build/pkgs/pip/spkg-configure.m4 | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+ create mode 100644 build/pkgs/pip/spkg-configure.m4
+
+diff --git a/build/pkgs/pip/spkg-configure.m4 b/build/pkgs/pip/spkg-configure.m4
+new file mode 100644
+index 00000000..c7a5562
+--- /dev/null
++++ b/build/pkgs/pip/spkg-configure.m4
+@@ -0,0 +1,12 @@
++SAGE_SPKG_CONFIGURE([pip], [
++  dnl always run this macro because it changes the default value of
++  dnl the --with-system-<package> option.
++  SAGE_PYTHON_PACKAGE_CHECK([pip])
++
++  dnl if we might not install the spkg, make sure that "pip" is in
++  dnl the user's PATH, too.
++  AS_IF([test "x$sage_spkg_install_pip" != "xyes"], [
++    AC_CHECK_PROG(HAVE_PIP, pip, yes, no)
++    AS_IF([test "x$HAVE_PIP" = "xno"], [sage_spkg_install_pip=yes])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ef8f1e807bc55d7b8321777486fa867a7c135419 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 9 Nov 2021 09:09:04 -0500
+Subject: Trac #29665: set $SAGE_PIP_INSTALL_FLAGS for
+ --enable-system-site-packages.
+
+We need to pass some special flags to "pip install" to make it do the
+right thing in the precence of system-site packages. Here we introduce
+a new autoconf variable, SAGE_PIP_INSTALL_FLAGS, that will be used
+to pass those flags to the build system.
+
+With autoconf aware of the variable, we substitute its value into the
+sage-build-env-config script for use in spkg-install.in.
+---
+ build/bin/sage-build-env-config.in | 1 +
+ configure.ac                       | 9 +++++++++
+ 2 files changed, 10 insertions(+)
+
+diff --git a/build/bin/sage-build-env-config.in b/build/bin/sage-build-env-config.in
+index 92e7dad..ad62e5f 100644
+--- a/build/bin/sage-build-env-config.in
++++ b/build/bin/sage-build-env-config.in
+@@ -53,6 +53,7 @@ export SAGE_PARI_CFG="@SAGE_PARI_CFG@"
+ 
+ export SAGE_GLPK_PREFIX="@SAGE_GLPK_PREFIX@"
+ export SAGE_FREETYPE_PREFIX="@SAGE_FREETYPE_PREFIX@"
++export SAGE_PIP_INSTALL_FLAGS="@SAGE_PIP_INSTALL_FLAGS@"
+ export SAGE_SUITESPARSE_PREFIX="@SAGE_SUITESPARSE_PREFIX@"
+ 
+ export SAGE_CONFIGURE_FFLAS_FFPACK="@SAGE_CONFIGURE_FFLAS_FFPACK@"
+diff --git a/configure.ac b/configure.ac
+index 6fafb83..6ed07ac 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -441,6 +441,14 @@ AC_ARG_ENABLE(
+     [allow the use of python packages from the system (experimental; default: no)]
+   )], [
+   AS_IF([test "x$enable_system_site_packages" = "xyes"], [
++    dnl When installing python SPKGs in the presence of system-site
++    dnl packages, we need to --ignore-installed so that a patched SPKG
++    dnl can be installed in the presence of an unpatched system package
++    dnl that appears (to pip) to be identical. The --no-deps flag is
++    dnl then needed because --ignore-installed will make any installed
++    dnl dependencies invisible to pip, who does not appreciate that.
++    SAGE_PIP_INSTALL_FLAGS="${SAGE_PIP_INSTALL_FLAGS} --no-deps --ignore-installed"
++
+     SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
+ 
+     dnl We want to raise an error if the user asked for "system site
+@@ -453,6 +461,7 @@ AC_ARG_ENABLE(
+     with_system_python3="force"
+   ])
+ ])
++AC_SUBST([SAGE_PIP_INSTALL_FLAGS])
+ AC_SUBST([SAGE_VENV_FLAGS])
+ 
+ SAGE_SPKG_OPTIONS=""
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3cf365fef84e809e74abd2eb388e7a8e9af9d739 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 9 Nov 2021 21:01:58 -0500
+Subject: Trac #29665: pass $SAGE_PIP_INSTALL_FLAGS to sdh_pip_install.
+
+Since sdh_pip_install is usually called from spkg-install.in, the
+variables from sage-build-env-config will be available. Here we pass
+the contents of $SAGE_PIP_INSTALL_FLAGS to sage-pip-install
+unconditionally, and hope that the user ignores this variable unless
+he truly knows what he is doing.
+---
+ build/bin/sage-dist-helpers | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/build/bin/sage-dist-helpers b/build/bin/sage-dist-helpers
+index fe364e5..1032ac3 100644
+--- a/build/bin/sage-dist-helpers
++++ b/build/bin/sage-dist-helpers
+@@ -303,7 +303,11 @@ sdh_store_wheel() {
+ }
+ 
+ sdh_store_and_pip_install_wheel() {
+-    local pip_options=""
++    # The $SAGE_PIP_INSTALL_FLAGS variable is set by sage-build-env-config.
++    # We skip sanity checking its contents since you should either let sage
++    # decide what it contains, or really know what you are doing.
++    local pip_options="${SAGE_PIP_INSTALL_FLAGS}"
++
+     while [ $# -gt 0 ]; do
+         case $1 in
+             -*) pip_options="$pip_options $1"
+-- 
+cgit v1.0-1-gd88e
+
+
+From 50f0438ee857b8f0b7d7ad924e6bba9c5e1bc033 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:10:46 -0500
+Subject: Trac #29665: add Gentoo package information for pexpect.
+
+---
+ build/pkgs/pexpect/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pexpect/distros/gentoo.txt
+
+diff --git a/build/pkgs/pexpect/distros/gentoo.txt b/build/pkgs/pexpect/distros/gentoo.txt
+new file mode 100644
+index 00000000..30c4b60
+--- /dev/null
++++ b/build/pkgs/pexpect/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pexpect
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4d784688d997290b462646fa7f36114a41f3f453 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:11:25 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pexpect.
+
+---
+ build/pkgs/pexpect/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pexpect/spkg-configure.m4
+
+diff --git a/build/pkgs/pexpect/spkg-configure.m4 b/build/pkgs/pexpect/spkg-configure.m4
+new file mode 100644
+index 00000000..6520856
+--- /dev/null
++++ b/build/pkgs/pexpect/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pexpect], [SAGE_PYTHON_PACKAGE_CHECK([pexpect])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6447122dc76a3b7a58340dbed942db66530b5b07 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:12:05 -0500
+Subject: Trac #29665: add Gentoo package information for docutils.
+
+---
+ build/pkgs/docutils/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/docutils/distros/gentoo.txt
+
+diff --git a/build/pkgs/docutils/distros/gentoo.txt b/build/pkgs/docutils/distros/gentoo.txt
+new file mode 100644
+index 00000000..fe4a452
+--- /dev/null
++++ b/build/pkgs/docutils/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/docutils
+-- 
+cgit v1.0-1-gd88e
+
+
+From 709041480a5fc729b0ee7f1a8a3b16d4d65321b5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:12:38 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for docutils.
+
+---
+ build/pkgs/docutils/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/docutils/spkg-configure.m4
+
+diff --git a/build/pkgs/docutils/spkg-configure.m4 b/build/pkgs/docutils/spkg-configure.m4
+new file mode 100644
+index 00000000..3584e45
+--- /dev/null
++++ b/build/pkgs/docutils/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([docutils], [SAGE_PYTHON_PACKAGE_CHECK([docutils])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 782d38b48ab87afccc43fbc071e7b7ed48fb0a20 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:14:37 -0500
+Subject: Trac #29665: add Gentoo package information for nbclient.
+
+---
+ build/pkgs/nbclient/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbclient/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbclient/distros/gentoo.txt b/build/pkgs/nbclient/distros/gentoo.txt
+new file mode 100644
+index 00000000..06ff18d
+--- /dev/null
++++ b/build/pkgs/nbclient/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbclient
+-- 
+cgit v1.0-1-gd88e
+
+
+From 19ce09336532336f69db74381932d51a429dfaca Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:15:11 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for nbclient.
+
+---
+ build/pkgs/nbclient/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbclient/spkg-configure.m4
+
+diff --git a/build/pkgs/nbclient/spkg-configure.m4 b/build/pkgs/nbclient/spkg-configure.m4
+new file mode 100644
+index 00000000..14178b7
+--- /dev/null
++++ b/build/pkgs/nbclient/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbclient], [SAGE_PYTHON_PACKAGE_CHECK([nbclient])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c063b9de42c1780368000a563d0dbe80b6fff169 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:17:36 -0500
+Subject: Trac #29665: add Gentoo package information for argon2_cffi.
+
+---
+ build/pkgs/argon2_cffi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argon2_cffi/distros/gentoo.txt
+
+diff --git a/build/pkgs/argon2_cffi/distros/gentoo.txt b/build/pkgs/argon2_cffi/distros/gentoo.txt
+new file mode 100644
+index 00000000..2f12ca8
+--- /dev/null
++++ b/build/pkgs/argon2_cffi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/argon2-cffi
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0b4d5699dd51ea52550fba7db9e1cbb8bbac1892 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:18:35 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for argon2_cffi.
+
+---
+ build/pkgs/argon2_cffi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argon2_cffi/spkg-configure.m4
+
+diff --git a/build/pkgs/argon2_cffi/spkg-configure.m4 b/build/pkgs/argon2_cffi/spkg-configure.m4
+new file mode 100644
+index 00000000..03ebc63
+--- /dev/null
++++ b/build/pkgs/argon2_cffi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([argon2_cffi], [SAGE_PYTHON_PACKAGE_CHECK([argon2_cffi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2b4119558a6e0b1aa512848539a237676b035c83 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:30:48 -0500
+Subject: Trac #29665: fix package name in dateutil's install-requires.txt.
+
+---
+ build/pkgs/dateutil/install-requires.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/build/pkgs/dateutil/install-requires.txt b/build/pkgs/dateutil/install-requires.txt
+index 0ae93da..face537 100644
+--- a/build/pkgs/dateutil/install-requires.txt
++++ b/build/pkgs/dateutil/install-requires.txt
+@@ -1 +1 @@
+-dateutil >=2.8.1
++python-dateutil >=2.8.1
+-- 
+cgit v1.0-1-gd88e
+
+
+From df371b7c4d20a3353d43940306ad22e11aba29da Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:31:41 -0500
+Subject: Trac #29665: add Gentoo package information for dateutil.
+
+---
+ build/pkgs/dateutil/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/dateutil/distros/gentoo.txt
+
+diff --git a/build/pkgs/dateutil/distros/gentoo.txt b/build/pkgs/dateutil/distros/gentoo.txt
+new file mode 100644
+index 00000000..e129df7
+--- /dev/null
++++ b/build/pkgs/dateutil/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/python-dateutil
+-- 
+cgit v1.0-1-gd88e
+
+
+From 577695dfdf661ee26c0ffd767bdbf479d95f7fb4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:32:21 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for dateutil.
+
+---
+ build/pkgs/dateutil/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/dateutil/spkg-configure.m4
+
+diff --git a/build/pkgs/dateutil/spkg-configure.m4 b/build/pkgs/dateutil/spkg-configure.m4
+new file mode 100644
+index 00000000..fdcd127
+--- /dev/null
++++ b/build/pkgs/dateutil/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([dateutil], [SAGE_PYTHON_PACKAGE_CHECK([dateutil])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1984651caac624ec4bb58814ca1d57fe66f9881a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:33:51 -0500
+Subject: Trac #29665: add Gentoo package information for setuptools_scm.
+
+---
+ build/pkgs/setuptools_scm/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/setuptools_scm/distros/gentoo.txt
+
+diff --git a/build/pkgs/setuptools_scm/distros/gentoo.txt b/build/pkgs/setuptools_scm/distros/gentoo.txt
+new file mode 100644
+index 00000000..8989597
+--- /dev/null
++++ b/build/pkgs/setuptools_scm/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/setuptools_scm
+-- 
+cgit v1.0-1-gd88e
+
+
+From ebf7c854ed966e7353759be485c4f5a57b9a10fa Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:34:49 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for setuptools_scm.
+
+---
+ build/pkgs/setuptools_scm/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/setuptools_scm/spkg-configure.m4
+
+diff --git a/build/pkgs/setuptools_scm/spkg-configure.m4 b/build/pkgs/setuptools_scm/spkg-configure.m4
+new file mode 100644
+index 00000000..437148c
+--- /dev/null
++++ b/build/pkgs/setuptools_scm/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([setuptools_scm], [
++  SAGE_PYTHON_PACKAGE_CHECK([setuptools_scm])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0dee0d0c28f31b1f619e44c710a3c9e22d2b2544 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:36:33 -0500
+Subject: Trac #29665: add Gentoo package information for nbconvert.
+
+---
+ build/pkgs/nbconvert/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbconvert/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbconvert/distros/gentoo.txt b/build/pkgs/nbconvert/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c45a10
+--- /dev/null
++++ b/build/pkgs/nbconvert/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbconvert
+-- 
+cgit v1.0-1-gd88e
+
+
+From 473789eb11b1838bc32dc8a63509ee199afc8912 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:37:37 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for nbconvert.
+
+---
+ build/pkgs/nbconvert/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbconvert/spkg-configure.m4
+
+diff --git a/build/pkgs/nbconvert/spkg-configure.m4 b/build/pkgs/nbconvert/spkg-configure.m4
+new file mode 100644
+index 00000000..9b5dee3
+--- /dev/null
++++ b/build/pkgs/nbconvert/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbconvert], [SAGE_PYTHON_PACKAGE_CHECK([nbconvert])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f0703b594e57c980d605aa9bc8316c45a7858b3b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:41:51 -0500
+Subject: Trac #29665: add Gentoo package information for jupyter_core.
+
+---
+ build/pkgs/jupyter_core/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyter_core/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyter_core/distros/gentoo.txt b/build/pkgs/jupyter_core/distros/gentoo.txt
+new file mode 100644
+index 00000000..f168c5a
+--- /dev/null
++++ b/build/pkgs/jupyter_core/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyter_core
+-- 
+cgit v1.0-1-gd88e
+
+
+From 061a307cc4a6680d8500fde834975064e59540d5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:42:48 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jupyter_core.
+
+---
+ build/pkgs/jupyter_core/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyter_core/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyter_core/spkg-configure.m4 b/build/pkgs/jupyter_core/spkg-configure.m4
+new file mode 100644
+index 00000000..67df9c3
+--- /dev/null
++++ b/build/pkgs/jupyter_core/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyter_core], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyter_core])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b85abe964ce0b98b5842efe9cbad9bdb1c89202f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:47:08 -0500
+Subject: Trac #29665: add Gentoo package information for jupyter_client.
+
+---
+ build/pkgs/jupyter_client/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyter_client/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyter_client/distros/gentoo.txt b/build/pkgs/jupyter_client/distros/gentoo.txt
+new file mode 100644
+index 00000000..4f1de88
+--- /dev/null
++++ b/build/pkgs/jupyter_client/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyter_client
+-- 
+cgit v1.0-1-gd88e
+
+
+From 86323ff1e0b2507933df6bc2a96c9175957640c5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:48:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jupyter_client.
+
+---
+ build/pkgs/jupyter_client/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyter_client/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyter_client/spkg-configure.m4 b/build/pkgs/jupyter_client/spkg-configure.m4
+new file mode 100644
+index 00000000..fbd3498
+--- /dev/null
++++ b/build/pkgs/jupyter_client/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyter_client], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyter_client])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a8475e27dd30d752d05ab6fea6579e8623501d82 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:48:58 -0500
+Subject: Trac #29665: add Gentoo package information for snowballstemmer.
+
+---
+ build/pkgs/snowballstemmer/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/snowballstemmer/distros/gentoo.txt
+
+diff --git a/build/pkgs/snowballstemmer/distros/gentoo.txt b/build/pkgs/snowballstemmer/distros/gentoo.txt
+new file mode 100644
+index 00000000..63fd851
+--- /dev/null
++++ b/build/pkgs/snowballstemmer/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/snowballstemmer
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0833c9b781062b4ed86d619e050a6f5d60e36080 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:49:38 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for snowballstemmer.
+
+---
+ build/pkgs/snowballstemmer/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/snowballstemmer/spkg-configure.m4
+
+diff --git a/build/pkgs/snowballstemmer/spkg-configure.m4 b/build/pkgs/snowballstemmer/spkg-configure.m4
+new file mode 100644
+index 00000000..6aa0882
+--- /dev/null
++++ b/build/pkgs/snowballstemmer/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([snowballstemmer], [
++  SAGE_PYTHON_PACKAGE_CHECK([snowballstemmer])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 50a1cf2a2bcd7eeec64cbc3f70e3e9fbe5d850fe Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:50:47 -0500
+Subject: Trac #29665: add Gentoo package information for tornado.
+
+---
+ build/pkgs/tornado/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tornado/distros/gentoo.txt
+
+diff --git a/build/pkgs/tornado/distros/gentoo.txt b/build/pkgs/tornado/distros/gentoo.txt
+new file mode 100644
+index 00000000..6ae4b9f
+--- /dev/null
++++ b/build/pkgs/tornado/distros/gentoo.txt
+@@ -0,0 +1 @@
++www-servers/tornado
+-- 
+cgit v1.0-1-gd88e
+
+
+From 118f4da6e03476c726363e8e22ecda32f13bfc33 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:51:26 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for tornado.
+
+---
+ build/pkgs/tornado/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tornado/spkg-configure.m4
+
+diff --git a/build/pkgs/tornado/spkg-configure.m4 b/build/pkgs/tornado/spkg-configure.m4
+new file mode 100644
+index 00000000..1ee5bc9
+--- /dev/null
++++ b/build/pkgs/tornado/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tornado], [SAGE_PYTHON_PACKAGE_CHECK([tornado])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3850701747a6c8ef60840bdfdb589b28d4cd2b9a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:52:21 -0500
+Subject: Trac #29665: add Gentoo package information for jsonschema.
+
+---
+ build/pkgs/jsonschema/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jsonschema/distros/gentoo.txt
+
+diff --git a/build/pkgs/jsonschema/distros/gentoo.txt b/build/pkgs/jsonschema/distros/gentoo.txt
+new file mode 100644
+index 00000000..d708e4c
+--- /dev/null
++++ b/build/pkgs/jsonschema/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jsonschema
+-- 
+cgit v1.0-1-gd88e
+
+
+From 76e3917c8af781af00f642cfada7a79594429e30 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:54:03 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jsonschema.
+
+---
+ build/pkgs/jsonschema/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jsonschema/spkg-configure.m4
+
+diff --git a/build/pkgs/jsonschema/spkg-configure.m4 b/build/pkgs/jsonschema/spkg-configure.m4
+new file mode 100644
+index 00000000..b9e5e21
+--- /dev/null
++++ b/build/pkgs/jsonschema/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jsonschema], [SAGE_PYTHON_PACKAGE_CHECK([jsonschema])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From fd4a16c11669b6dd73ac6325bca820e76db00402 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:55:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ widgetsnbextension.
+
+---
+ build/pkgs/widgetsnbextension/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/widgetsnbextension/spkg-configure.m4
+
+diff --git a/build/pkgs/widgetsnbextension/spkg-configure.m4 b/build/pkgs/widgetsnbextension/spkg-configure.m4
+new file mode 100644
+index 00000000..bf82daf
+--- /dev/null
++++ b/build/pkgs/widgetsnbextension/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([widgetsnbextension], [
++  SAGE_PYTHON_PACKAGE_CHECK([widgetsnbextension])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8079a9f384e3c8480e157dd98c3db2f43c987f4e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:57:20 -0500
+Subject: Trac #29665: add Gentoo package information for importlib_resources.
+
+---
+ build/pkgs/importlib_resources/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/importlib_resources/distros/gentoo.txt
+
+diff --git a/build/pkgs/importlib_resources/distros/gentoo.txt b/build/pkgs/importlib_resources/distros/gentoo.txt
+new file mode 100644
+index 00000000..d5e1f2c
+--- /dev/null
++++ b/build/pkgs/importlib_resources/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/importlib_resources
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2c430d7c52f02779a6c41b98ac2f4edd8b6759c3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:58:00 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ importlib_resources.
+
+---
+ build/pkgs/importlib_resources/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/importlib_resources/spkg-configure.m4
+
+diff --git a/build/pkgs/importlib_resources/spkg-configure.m4 b/build/pkgs/importlib_resources/spkg-configure.m4
+new file mode 100644
+index 00000000..50df55b
+--- /dev/null
++++ b/build/pkgs/importlib_resources/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([importlib_resources], [
++  SAGE_PYTHON_PACKAGE_CHECK([importlib_resources])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 00d13d7bf2e50aae2ccef3b2b30293c70a922af2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:58:38 -0500
+Subject: Trac #29665: add Gentoo package information for kiwisolver.
+
+---
+ build/pkgs/kiwisolver/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/kiwisolver/distros/gentoo.txt
+
+diff --git a/build/pkgs/kiwisolver/distros/gentoo.txt b/build/pkgs/kiwisolver/distros/gentoo.txt
+new file mode 100644
+index 00000000..7b30c95
+--- /dev/null
++++ b/build/pkgs/kiwisolver/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/kiwisolver
+-- 
+cgit v1.0-1-gd88e
+
+
+From 72b7907ef7ea9fa4ff6948ea34cfe2f693ee6c31 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:59:09 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for kiwisolver.
+
+---
+ build/pkgs/kiwisolver/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/kiwisolver/spkg-configure.m4
+
+diff --git a/build/pkgs/kiwisolver/spkg-configure.m4 b/build/pkgs/kiwisolver/spkg-configure.m4
+new file mode 100644
+index 00000000..4e7ac97
+--- /dev/null
++++ b/build/pkgs/kiwisolver/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([kiwisolver], [SAGE_PYTHON_PACKAGE_CHECK([kiwisolver])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 479351279e4e0ea7e2d146434f0daba038765cfd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:00:04 -0500
+Subject: Trac #29665: add Gentoo package information for notebook.
+
+---
+ build/pkgs/notebook/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/notebook/distros/gentoo.txt
+
+diff --git a/build/pkgs/notebook/distros/gentoo.txt b/build/pkgs/notebook/distros/gentoo.txt
+new file mode 100644
+index 00000000..6475d72
+--- /dev/null
++++ b/build/pkgs/notebook/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/notebook
+-- 
+cgit v1.0-1-gd88e
+
+
+From f4d9242ea654977f8ad7865c82eec593e11a36bc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:01:42 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for notebook.
+
+---
+ build/pkgs/notebook/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/notebook/spkg-configure.m4
+
+diff --git a/build/pkgs/notebook/spkg-configure.m4 b/build/pkgs/notebook/spkg-configure.m4
+new file mode 100644
+index 00000000..a17ba95
+--- /dev/null
++++ b/build/pkgs/notebook/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([notebook], [SAGE_PYTHON_PACKAGE_CHECK([notebook])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9837070c7f8e9a71283b84d49d4fd2c94b78a464 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:02:38 -0500
+Subject: Trac #29665: add Gentoo package information for matplotlib_inline.
+
+---
+ build/pkgs/matplotlib_inline/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/matplotlib_inline/distros/gentoo.txt
+
+diff --git a/build/pkgs/matplotlib_inline/distros/gentoo.txt b/build/pkgs/matplotlib_inline/distros/gentoo.txt
+new file mode 100644
+index 00000000..6a5859c
+--- /dev/null
++++ b/build/pkgs/matplotlib_inline/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/matplotlib-inline
+-- 
+cgit v1.0-1-gd88e
+
+
+From 750be73b25b92b4875e47d044360ac0e1116ec3e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:03:28 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for matplotlib_inline.
+
+---
+ build/pkgs/matplotlib_inline/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/matplotlib_inline/spkg-configure.m4
+
+diff --git a/build/pkgs/matplotlib_inline/spkg-configure.m4 b/build/pkgs/matplotlib_inline/spkg-configure.m4
+new file mode 100644
+index 00000000..e59658f
+--- /dev/null
++++ b/build/pkgs/matplotlib_inline/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([matplotlib_inline], [
++  SAGE_PYTHON_PACKAGE_CHECK([matplotlib_inline])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 273505f49698dcd2ab30c2756b07113c9b7e7791 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:04:10 -0500
+Subject: Trac #29665: add Gentoo package information for ipykernel.
+
+---
+ build/pkgs/ipykernel/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipykernel/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipykernel/distros/gentoo.txt b/build/pkgs/ipykernel/distros/gentoo.txt
+new file mode 100644
+index 00000000..88aab61
+--- /dev/null
++++ b/build/pkgs/ipykernel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipykernel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 629ad36c9e4ae0cdff4a013289b4f2911442445e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:04:46 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for ipykernel.
+
+---
+ build/pkgs/ipykernel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipykernel/spkg-configure.m4
+
+diff --git a/build/pkgs/ipykernel/spkg-configure.m4 b/build/pkgs/ipykernel/spkg-configure.m4
+new file mode 100644
+index 00000000..94ecc2d
+--- /dev/null
++++ b/build/pkgs/ipykernel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipykernel], [SAGE_PYTHON_PACKAGE_CHECK([ipykernel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b8d709edb6a24fd5868ee2818b56e78257b2eafa Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:05:26 -0500
+Subject: Trac #29665: add Gentoo package information for prompt_toolkit.
+
+---
+ build/pkgs/prompt_toolkit/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/prompt_toolkit/distros/gentoo.txt
+
+diff --git a/build/pkgs/prompt_toolkit/distros/gentoo.txt b/build/pkgs/prompt_toolkit/distros/gentoo.txt
+new file mode 100644
+index 00000000..6902484
+--- /dev/null
++++ b/build/pkgs/prompt_toolkit/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/prompt_toolkit
+-- 
+cgit v1.0-1-gd88e
+
+
+From 16c0b5e767ae4dac4440510b7253e5c8642b7d2c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:10:39 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for prompt_toolkit.
+
+---
+ build/pkgs/prompt_toolkit/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/prompt_toolkit/spkg-configure.m4
+
+diff --git a/build/pkgs/prompt_toolkit/spkg-configure.m4 b/build/pkgs/prompt_toolkit/spkg-configure.m4
+new file mode 100644
+index 00000000..fd8c1a6
+--- /dev/null
++++ b/build/pkgs/prompt_toolkit/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([prompt_toolkit], [
++  SAGE_PYTHON_PACKAGE_CHECK([prompt_toolkit])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0cd9283e8bb6c8ae413fc8f715c021f7ec3ca2c8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:12:10 -0500
+Subject: Trac #29665: add Gentoo package information for charset_normalizer.
+
+---
+ build/pkgs/charset_normalizer/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/charset_normalizer/distros/gentoo.txt
+
+diff --git a/build/pkgs/charset_normalizer/distros/gentoo.txt b/build/pkgs/charset_normalizer/distros/gentoo.txt
+new file mode 100644
+index 00000000..eefeb89
+--- /dev/null
++++ b/build/pkgs/charset_normalizer/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/charset_normalizer
+-- 
+cgit v1.0-1-gd88e
+
+
+From a04b01a9ab59097d189edcc5ddcb461faede83b2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:12:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ charset_normalizer.
+
+---
+ build/pkgs/charset_normalizer/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/charset_normalizer/spkg-configure.m4
+
+diff --git a/build/pkgs/charset_normalizer/spkg-configure.m4 b/build/pkgs/charset_normalizer/spkg-configure.m4
+new file mode 100644
+index 00000000..18b18cf
+--- /dev/null
++++ b/build/pkgs/charset_normalizer/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([charset_normalizer], [
++  SAGE_PYTHON_PACKAGE_CHECK([charset_normalizer])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d2ea08138711c53046f977b586f33b09b176b2e3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:13:37 -0500
+Subject: Trac #29665: add Gentoo package information for prometheus_client.
+
+---
+ build/pkgs/prometheus_client/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/prometheus_client/distros/gentoo.txt
+
+diff --git a/build/pkgs/prometheus_client/distros/gentoo.txt b/build/pkgs/prometheus_client/distros/gentoo.txt
+new file mode 100644
+index 00000000..aa2889c
+--- /dev/null
++++ b/build/pkgs/prometheus_client/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/prometheus_client
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b0393200e9edd3e26b8a55ba67e5710e7403fcb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:15:09 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for prometheus_client.
+
+---
+ build/pkgs/prometheus_client/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/prometheus_client/spkg-configure.m4
+
+diff --git a/build/pkgs/prometheus_client/spkg-configure.m4 b/build/pkgs/prometheus_client/spkg-configure.m4
+new file mode 100644
+index 00000000..b494588
+--- /dev/null
++++ b/build/pkgs/prometheus_client/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([prometheus_client], [
++  SAGE_PYTHON_PACKAGE_CHECK([prometheus_client])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From cdcd85284f43ca4ad18353ec3527b2901e57b788 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:17:23 -0500
+Subject: Trac #29665: add Gentoo package information for pybind11.
+
+---
+ build/pkgs/pybind11/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pybind11/distros/gentoo.txt
+
+diff --git a/build/pkgs/pybind11/distros/gentoo.txt b/build/pkgs/pybind11/distros/gentoo.txt
+new file mode 100644
+index 00000000..0c500b3
+--- /dev/null
++++ b/build/pkgs/pybind11/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pybind11
+-- 
+cgit v1.0-1-gd88e
+
+
+From efdd1eb64c4799fe3cdf2221824182941b3fda2d Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:17:51 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pybind11.
+
+---
+ build/pkgs/pybind11/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pybind11/spkg-configure.m4
+
+diff --git a/build/pkgs/pybind11/spkg-configure.m4 b/build/pkgs/pybind11/spkg-configure.m4
+new file mode 100644
+index 00000000..cce1cf5
+--- /dev/null
++++ b/build/pkgs/pybind11/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pybind11], [SAGE_PYTHON_PACKAGE_CHECK([pybind11])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b2128f33b68ea33927284116ea598dd186902400 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:19:23 -0500
+Subject: Trac #29665: add Gentoo package information for pkgconfig.
+
+---
+ build/pkgs/pkgconfig/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pkgconfig/distros/gentoo.txt
+
+diff --git a/build/pkgs/pkgconfig/distros/gentoo.txt b/build/pkgs/pkgconfig/distros/gentoo.txt
+new file mode 100644
+index 00000000..32e8618
+--- /dev/null
++++ b/build/pkgs/pkgconfig/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pkgconfig
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b373b49e06aadeb36dc57e500da9a322460e658 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:19:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pkgconfig.
+
+---
+ build/pkgs/pkgconfig/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pkgconfig/spkg-configure.m4
+
+diff --git a/build/pkgs/pkgconfig/spkg-configure.m4 b/build/pkgs/pkgconfig/spkg-configure.m4
+new file mode 100644
+index 00000000..6708293
+--- /dev/null
++++ b/build/pkgs/pkgconfig/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pkgconfig], [SAGE_PYTHON_PACKAGE_CHECK([pkgconfig])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ce578729eb0d14baab365351ba9a9ffffb7b79f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:21:10 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_serializinghtml.
+
+---
+ build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt b/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+new file mode 100644
+index 00000000..38bca8f
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-serializinghtml
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb0f42c32bbce0e4488678312f5e2d88c6f42c9b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:21:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_serializinghtml.
+
+---
+ build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4 b/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+new file mode 100644
+index 00000000..be8e625
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_serializinghtml], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_serializinghtml])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e47dcf985e40475de85c9436a85537751318bc3d Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:22:54 -0500
+Subject: Trac #29665: add Gentoo package information for sphinxcontrib_jsmath.
+
+---
+ build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt b/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+new file mode 100644
+index 00000000..041a471
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-jsmath
+-- 
+cgit v1.0-1-gd88e
+
+
+From 72cff6fd35f93de4fa855bc870569dd733ff5c24 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:23:49 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_jsmath.
+
+---
+ build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4 b/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+new file mode 100644
+index 00000000..e46bde2
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_jsmath], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_jsmath])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a36395d70f759449cd63c1b0990fbdcb4cb25ca0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:24:26 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_devhelp.
+
+---
+ build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..9b5c899
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-devhelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9953a5dd1646ed0ad51d2e3935cf609bc9e7fd1c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:25:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_devhelp.
+
+---
+ build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+new file mode 100644
+index 00000000..8728136
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_devhelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_devhelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b199d5363aad93f3cb23f7904c9553a28b06348f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:25:53 -0500
+Subject: Trac #29665: add Gentoo package information for sphinxcontrib_qthelp.
+
+---
+ build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..7210099
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-qthelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 94ac8806739f3938e73f5857328e91e0d42e98d2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:26:28 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_qthelp.
+
+---
+ build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+new file mode 100644
+index 00000000..81ea5e1
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_qthelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_qthelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From beedc154aa405e8a58aee8889f510db07adc89a7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:26:54 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_applehelp.
+
+---
+ build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..66ac8da
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-applehelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 07d47c3673d6b35423b71f621cb400989c0101c2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:27:19 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_applehelp.
+
+---
+ build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+new file mode 100644
+index 00000000..e834aed
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_applehelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_applehelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 333a66546c5d421735c49dbafd7370a827f22781 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:27:46 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_htmlhelp.
+
+---
+ build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..e080bac
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-htmlhelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From bfaeb3962254439b63f1f2e0e883de462c7831be Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:29:18 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_htmlhelp.
+
+---
+ build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+new file mode 100644
+index 00000000..c77b003
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_htmlhelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_htmlhelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 782cde13da06e8b85806cb7cbc8aceee0364e639 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:30:23 -0500
+Subject: Trac #29665: add Gentoo package information for jupyterlab_pygments.
+
+---
+ build/pkgs/jupyterlab_pygments/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyterlab_pygments/distros/gentoo.txt b/build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+new file mode 100644
+index 00000000..c57b4f1
+--- /dev/null
++++ b/build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyterlab_pygments
+-- 
+cgit v1.0-1-gd88e
+
+
+From 39f974cfa4a8c6e5dd897f152f83ec82f40ee9f7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:31:13 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ jupyterlab_pygments.
+
+---
+ build/pkgs/jupyterlab_pygments/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyterlab_pygments/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyterlab_pygments/spkg-configure.m4 b/build/pkgs/jupyterlab_pygments/spkg-configure.m4
+new file mode 100644
+index 00000000..e46e21f
+--- /dev/null
++++ b/build/pkgs/jupyterlab_pygments/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyterlab_pygments], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyterlab_pygments])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From db704620700fd36cec3bf6125938f3ee00a9eb5e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:29:15 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for ply.
+
+---
+ build/pkgs/ply/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ply/spkg-configure.m4
+
+diff --git a/build/pkgs/ply/spkg-configure.m4 b/build/pkgs/ply/spkg-configure.m4
+new file mode 100644
+index 00000000..ffb0030
+--- /dev/null
++++ b/build/pkgs/ply/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ply], [SAGE_PYTHON_PACKAGE_CHECK([ply])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6aac31dabcdfdef228d7780398a3fda1a4cc566f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:29:51 -0500
+Subject: Trac #29665: add Gentoo package information for ply.
+
+---
+ build/pkgs/ply/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ply/distros/gentoo.txt
+
+diff --git a/build/pkgs/ply/distros/gentoo.txt b/build/pkgs/ply/distros/gentoo.txt
+new file mode 100644
+index 00000000..c8b1630
+--- /dev/null
++++ b/build/pkgs/ply/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ply
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb8d3372936ec37470d69687a0f91592129460ae Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:30:33 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for gast.
+
+---
+ build/pkgs/gast/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/gast/spkg-configure.m4
+
+diff --git a/build/pkgs/gast/spkg-configure.m4 b/build/pkgs/gast/spkg-configure.m4
+new file mode 100644
+index 00000000..26ec59f
+--- /dev/null
++++ b/build/pkgs/gast/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([gast], [SAGE_PYTHON_PACKAGE_CHECK([gast])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1cdc4046a88f1c2b4e5c162f66c6db6090b24194 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:31:15 -0500
+Subject: Trac #29665: add Gentoo package information for gast.
+
+---
+ build/pkgs/gast/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/gast/distros/gentoo.txt
+
+diff --git a/build/pkgs/gast/distros/gentoo.txt b/build/pkgs/gast/distros/gentoo.txt
+new file mode 100644
+index 00000000..3be5e7e
+--- /dev/null
++++ b/build/pkgs/gast/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/gast
+-- 
+cgit v1.0-1-gd88e
+
+
+From 96068b8a3742b65d619190e1d9fa5db399e6b4f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:32:20 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pythran.
+
+---
+ build/pkgs/pythran/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pythran/spkg-configure.m4
+
+diff --git a/build/pkgs/pythran/spkg-configure.m4 b/build/pkgs/pythran/spkg-configure.m4
+new file mode 100644
+index 00000000..592e95b
+--- /dev/null
++++ b/build/pkgs/pythran/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pythran], [SAGE_PYTHON_PACKAGE_CHECK([pythran])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1fa0fad3ae8f7e559c6fc315c6773a7d8aac0bfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:32:55 -0500
+Subject: Trac #29665: add Gentoo package information for pythran.
+
+---
+ build/pkgs/pythran/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pythran/distros/gentoo.txt
+
+diff --git a/build/pkgs/pythran/distros/gentoo.txt b/build/pkgs/pythran/distros/gentoo.txt
+new file mode 100644
+index 00000000..1bb7cdc
+--- /dev/null
++++ b/build/pkgs/pythran/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pythran
+-- 
+cgit v1.0-1-gd88e
+
+
+From d26370e5b8c88e76abfb7c27e3defb71c9e9f711 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:33:50 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for beniget.
+
+---
+ build/pkgs/beniget/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/beniget/spkg-configure.m4
+
+diff --git a/build/pkgs/beniget/spkg-configure.m4 b/build/pkgs/beniget/spkg-configure.m4
+new file mode 100644
+index 00000000..8ae6101
+--- /dev/null
++++ b/build/pkgs/beniget/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([beniget], [SAGE_PYTHON_PACKAGE_CHECK([beniget])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From eeeb296ed9b9694a865534103fd58e62a151ef5e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:34:22 -0500
+Subject: Trac #29665: add Gentoo package information for beniget.
+
+---
+ build/pkgs/beniget/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/beniget/distros/gentoo.txt
+
+diff --git a/build/pkgs/beniget/distros/gentoo.txt b/build/pkgs/beniget/distros/gentoo.txt
+new file mode 100644
+index 00000000..1a5972c
+--- /dev/null
++++ b/build/pkgs/beniget/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/beniget
+-- 
+cgit v1.0-1-gd88e
+
+
+From 078b2ff272d0eeff5cce40ad7eb176d9ddd7bdff Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:35:37 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for alabaster.
+
+---
+ build/pkgs/alabaster/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/alabaster/spkg-configure.m4
+
+diff --git a/build/pkgs/alabaster/spkg-configure.m4 b/build/pkgs/alabaster/spkg-configure.m4
+new file mode 100644
+index 00000000..4eca6e0
+--- /dev/null
++++ b/build/pkgs/alabaster/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([alabaster], [SAGE_PYTHON_PACKAGE_CHECK([alabaster])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7dc264353e5f64110431ff28c1b8b7e89699e9bd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:36:06 -0500
+Subject: Trac #29665: add Gentoo package information for alabaster.
+
+---
+ build/pkgs/alabaster/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/alabaster/distros/gentoo.txt
+
+diff --git a/build/pkgs/alabaster/distros/gentoo.txt b/build/pkgs/alabaster/distros/gentoo.txt
+new file mode 100644
+index 00000000..cffece6
+--- /dev/null
++++ b/build/pkgs/alabaster/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/alabaster
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8011a5e675e7e61a77ce34a299ee961a9f44253f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:43:59 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ importlib_metadata.
+
+---
+ build/pkgs/importlib_metadata/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/importlib_metadata/spkg-configure.m4
+
+diff --git a/build/pkgs/importlib_metadata/spkg-configure.m4 b/build/pkgs/importlib_metadata/spkg-configure.m4
+new file mode 100644
+index 00000000..0554e52
+--- /dev/null
++++ b/build/pkgs/importlib_metadata/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([importlib_metadata], [
++  SAGE_PYTHON_PACKAGE_CHECK([importlib_metadata])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 928ca0019e3ec6c4541a16b28bcc6710df6d010b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:44:28 -0500
+Subject: Trac #29665: add Gentoo package information for importlib_metadata.
+
+---
+ build/pkgs/importlib_metadata/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/importlib_metadata/distros/gentoo.txt
+
+diff --git a/build/pkgs/importlib_metadata/distros/gentoo.txt b/build/pkgs/importlib_metadata/distros/gentoo.txt
+new file mode 100644
+index 00000000..4f92786
+--- /dev/null
++++ b/build/pkgs/importlib_metadata/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/importlib_metadata
+-- 
+cgit v1.0-1-gd88e
+
+
+From 135f184f7498a2046065e669723e68efe2d65cee Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 21:16:58 -0500
+Subject: Trac #29665: fix sage.misc.package doctest with system alabaster.
+
+When alabaster from the system is used, these tests won't be able to
+find its SPKG installed. Add some ellipses, and switch one test to
+look for sage_conf instead.
+---
+ src/sage/misc/package.py | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/sage/misc/package.py b/src/sage/misc/package.py
+index 84f3d50..c7ad206 100644
+--- a/src/sage/misc/package.py
++++ b/src/sage/misc/package.py
+@@ -386,9 +386,9 @@ def installed_packages(exclude_pip=True):
+     EXAMPLES::
+ 
+         sage: sorted(installed_packages().keys())  # optional - build
+-        [...'alabaster', ...'sage_conf', ...]
+-        sage: installed_packages()['alabaster']  # optional - build, random
+-        '0.7.12'
++        [...'sage_conf', ...]
++        sage: installed_packages()['sage_conf']  # optional - build, random
++        '9.5'
+ 
+     .. SEEALSO::
+ 
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch b/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
new file mode 100644
index 000000000000..7ef3826aa4d2
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
@@ -0,0 +1,27 @@
+diff --git a/src/bin/sage-runtests b/src/bin/sage-runtests
+index 589dc8cd37..6bb8bf99a4 100755
+--- a/src/bin/sage-runtests
++++ b/src/bin/sage-runtests
+@@ -154,21 +154,4 @@ if __name__ == "__main__":
+     DC = DocTestController(args, args.filenames)
+     err = DC.run()
+ 
+-    try:
+-        exit_code_pytest = 0
+-        import pytest
+-        pytest_options = ["--import-mode", "importlib"]
+-        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.")
+-
+-    if err == 0:
+-        sys.exit(exit_code_pytest)
+-    else:
+-        sys.exit(err)
++    sys.exit(err)
diff --git a/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch b/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
new file mode 100644
index 000000000000..093e3d56eb33
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
@@ -0,0 +1,42 @@
+More site packages not included in trac 29665
+
+diff --git a/build/pkgs/gmpy2/spkg-configure.m4 b/build/pkgs/gmpy2/spkg-configure.m4
+new file mode 100644
+index 0000000000..2d0390f7db
+--- /dev/null
++++ b/build/pkgs/gmpy2/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([gmpy2], [SAGE_PYTHON_PACKAGE_CHECK([gmpy2])])
+diff --git a/build/pkgs/sphinx/spkg-configure.m4 b/build/pkgs/sphinx/spkg-configure.m4
+new file mode 100644
+index 0000000000..e149fbb2cf
+--- /dev/null
++++ b/build/pkgs/sphinx/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([sphinx], [SAGE_PYTHON_PACKAGE_CHECK([sphinx])])
+diff --git a/build/pkgs/typing_extensions/spkg-configure.m4 b/build/pkgs/typing_extensions/spkg-configure.m4
+new file mode 100644
+index 0000000000..d475fd8257
+--- /dev/null
++++ b/build/pkgs/typing_extensions/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([typing_extensions], [SAGE_PYTHON_PACKAGE_CHECK([typing_extensions])])
+-- 
+diff --git a/build/pkgs/gmpy2/install-requires.txt b/build/pkgs/gmpy2/install-requires.txt
+index 51d24518ef..c25feff557 100644
+--- a/build/pkgs/gmpy2/install-requires.txt
++++ b/build/pkgs/gmpy2/install-requires.txt
+@@ -1,3 +1 @@
+-# We would like to write gmpy2 >=2.1.0b5, but pipenv does not accept prereleases in version ranges
+-# https://github.com/pypa/pipenv/issues/1760
+-gmpy2 ==2.1.0rc1
++gmpy2 >=2.1
+diff --git a/build/pkgs/ptyprocess/install-requires.txt b/build/pkgs/ptyprocess/install-requires.txt
+index de89260872..7c336f636c 100644
+--- a/build/pkgs/ptyprocess/install-requires.txt
++++ b/build/pkgs/ptyprocess/install-requires.txt
+@@ -1,3 +1,3 @@
+-ptyprocess ==0.5.1
++ptyprocess
+ # https://trac.sagemath.org/ticket/31280#comment:42 and following
+ # sagelib is not compatible with ptyprocess 0.5.2, 0.6, and 0.7
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 33b40acbabeb..a32c5d18f378 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -22,11 +22,13 @@ distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
 checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
 python_version=3
 
-build_options="debug system_python3"
+build_options="debug system_python3 system_site_packages"
 desc_option_debug="Build with debug symbols"
 desc_option_system_python="Build using system python 3"
-build_options_default="system_python3"
+desc_option_system_python="Build using system python site-packages"
+build_options_default="system_python3 system_site_packages"
 configure_args+=" $(vopt_with system_python3)"
+configure_args+=" $(vopt_enable system_site_packages)"
 
 # path where sage will be installed
 _SAGE_ROOT=/usr/lib/sage-${version}
@@ -163,6 +165,8 @@ do_check() {
 	fi
 	if [ "$XBPS_CHECK_PKGS" = full ]; then
 		_test_args="--long $_test_args"
+	else
+		_test_args="--warn-long 5.0 $_test_args"
 	fi
 	# since make check will build the docs, run test like this instead
 	./sage -tp ${XBPS_MAKEJOBS} ${_test_args}
@@ -182,7 +186,7 @@ makedepends+=" automake gettext gettext-devel"
 # other host dependencies
 makedepends+=" cmake curl git ninja pandoc patch pkg-config python3 tox"
 
-# already in void
+# standard dependencies
 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
@@ -202,7 +206,49 @@ makedepends+="
  brial-devel cliquer-devel gfan libbraiding-devel libhomfly-devel
  lrcalc-devel nauty-devel palp tachyon
  maxima-ecl primesieve-devel primecount-devel
+ ffmpeg ImageMagick
 "
 
 # TODO: optional
 # 4ti2 coxeter3 libsemigroups lrslib pdf2svg perl_mongodb polymake
+
+# TODO: standard
+# cvxopt importlib_resources
+
+# python packages for trac-29665
+_sage_python3_modules="
+ python3-Babel python3-Jinja2 python3-MarkupSafe python3-Pillow
+ python3-Pygments python3-Sphinx python3-alabaster python3-argcomplete
+ python3-argon2 python3-attrs python3-backcall python3-beniget
+ python3-bleach python3-certifi python3-cffi python3-charset-normalizer
+ python3-cycler python3-dateutil python3-decorator python3-defusedxml
+ python3-docutils python3-entrypoints python3-flit_core python3-gast
+ python3-gmpy2 python3-html5lib python3-idna python3-imagesize
+ python3-importlib_metadata python3-ipython python3-ipython_genutils
+ python3-ipython_ipykernel python3-jedi python3-jsonschema
+ python3-jupyter_client python3-jupyter_core python3-jupyter_ipywidgets
+ python3-jupyter_nbconvert python3-jupyter_nbformat
+ python3-jupyter_notebook python3-jupyterlab_pygments python3-kiwisolver
+ python3-matplotlib python3-matplotlib-inline python3-mistune
+ python3-mpmath python3-nbclient python3-nest_asyncio python3-networkx
+ python3-numpy python3-packaging python3-pandocfilters python3-parsing
+ python3-parso python3-pexpect python3-pickleshare python3-pip
+ python3-pkgconfig python3-pluggy python3-ply python3-prometheus_client
+ python3-prompt_toolkit python3-ptyprocess python3-py python3-pybind11
+ python3-pycparser python3-pyrsistent python3-pytz python3-pyzmq
+ python3-requests python3-scipy python3-send2trash python3-setuptools
+ python3-setuptools_scm python3-simplegeneric python3-six
+ python3-snowballstemmer python3-sphinxcontrib-applehelp
+ python3-sphinxcontrib-devhelp python3-sphinxcontrib-htmlhelp
+ python3-sphinxcontrib-jsmath python3-sphinxcontrib-qthelp
+ python3-sphinxcontrib-serializinghtml python3-sympy python3-terminado
+ python3-testpath python3-texttable python3-toml python3-tomli
+ python3-tornado python3-traitlets python3-typing_extensions
+ python3-tzlocal python3-urllib3 python3-wcwidth python3-webencodings
+ python3-wheel python3-zipp pythran
+ "
+
+if [ "$build_option_system_site_packages" ]; then
+	makedepends+=" $_sage_python3_modules"
+	depends+=" $_sage_python3_modules"
+fi

From 9c545f650c3af512133680cbe0c615abe6c42305 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 3 Jan 2022 20:47:52 -0300
Subject: [PATCH 24/41] sagemath: use small source tarball + upstream packages

---
 srcpkgs/sagemath/template | 97 ++++++++++++++++++++++++++-------------
 1 file changed, 64 insertions(+), 33 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index a32c5d18f378..0de0061b09df 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -18,8 +18,8 @@ short_desc="Open source mathematics software"
 maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
-distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
-checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
+distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
+checksum=aea4c5a8d3b32af2fba644269b9daf4f62471471ba2d7d83da0f8098a5f53225
 python_version=3
 
 build_options="debug system_python3 system_site_packages"
@@ -33,42 +33,72 @@ configure_args+=" $(vopt_enable system_site_packages)"
 # 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} ;;
-esac
+_SAGE_UPSTREAM_MIRROR=https://mirrors.mit.edu/sage/spkg/upstream
 
-# extra upstream packages (trac-32968 / trac-33040)
 _upstream="
- https://pypi.io/packages/source/s/sphinx/Sphinx-4.3.1.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
+${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
+${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
+${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
+${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
+${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
+${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
+${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
+https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
+https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
+http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
+${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
+${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
+${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
+${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
+${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
+https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
+${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
+https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
+${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
 "
 
 checksum+="
- 32a5b3e9a1b176cc25ed048557d4d3d01af635e6b76c5bc7a43b0a34447fbd45
-
- 9c87405839a19696e837b3b818fed3f5f69f16f1eec1a1ad77e043dcea9c772f
- fc4453705b81d03568d5b808ad8f09c77c47534f6ac2e72e733f9ca4714aa75c
- acad2d8b20a1af07d4e4c9d2e9285c5ed9104354062f275f3fcd88dcef4f1326
- 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
- 78884e7c1d4b00ce3cea67b44566851c4343c120abd683433ce934a68ea58872
- 0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86
- b8e2f83c56e141920c39464b852de3719dfbfb6e3c99a2d8da0edf4fb33176ed
- d9bdec0013ef1eb5a84ab39a3b3868911598afa494f5faa038647101504e2b81
- b2e9810e09c3a47b73ce9cab5a72243a1258f61e7900969097a817232246ce1c
- 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
- 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
+c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
+d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
+4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
+3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
+03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
+5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
+cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
+5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
+581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
+6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
+07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
+a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
+ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
+d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
+169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
+5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
+cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
+471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
+78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
+edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
+b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
+3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
+545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
+cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
+718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
+dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
 "
 
 for u in ${_upstream}; do
@@ -101,6 +131,7 @@ post_extract() {
 	mv -T $wrksrc $_SAGE_ROOT
 	ln -srfT $_SAGE_ROOT $wrksrc
 
+	mkdir -p $wrksrc/upstream
 	for u in ${_upstream}; do
 		cp "$XBPS_SRCDISTDIR/${pkgname}-${version}/${u##*[/>]}" $wrksrc/upstream
 	done

From d0b0a656fa4993f3cf4ef8165a13717c66b35ab7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 13:38:02 -0300
Subject: [PATCH 25/41] sagemath: for CI use fixed random-seed=0

---
 srcpkgs/sagemath/template | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 0de0061b09df..b5b99d2c122d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -194,6 +194,10 @@ do_check() {
 	if [ -z "$_test_args" ]; then
 		_test_args=--all
 	fi
+	if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
+		# for CI use a predictable random seed
+		_test_args="--random-seed=0 $_test_args"
+	fi
 	if [ "$XBPS_CHECK_PKGS" = full ]; then
 		_test_args="--long $_test_args"
 	else

From 3813d63435820909fc5e4b1b5e5093ba50a48d2c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 14:40:27 -0300
Subject: [PATCH 26/41] sagemath: upstream two patches

---
 ...ble-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch} |  6 +++---
 ...rse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch} | 10 +++++-----
 2 files changed, 8 insertions(+), 8 deletions(-)
 rename srcpkgs/sagemath/patches/{0001-sage-site-exec-only-if-it-is-executable.patch => trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch} (94%)
 rename srcpkgs/sagemath/patches/{0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch => trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch} (81%)

diff --git a/srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch b/srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
similarity index 94%
rename from srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch
rename to srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
index ce17c6d6e954..7fdb3d697222 100644
--- a/srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch
+++ b/srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
@@ -1,14 +1,14 @@
 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
+Subject: 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
+index 4c0fa17..153e610 100755
 --- a/src/bin/sage
 +++ b/src/bin/sage
 @@ -129,7 +129,7 @@ usage() {
@@ -39,5 +39,5 @@ index 4c0fa17426..153e610a2e 100755
              # fallthrough if there is no sage-site script
          fi
 -- 
-2.34.1
+cgit v1.0-1-gd88e
 
diff --git a/srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch b/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
similarity index 81%
rename from srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch
rename to srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
index bab6d8441d42..350c41ac3928 100644
--- a/srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch
+++ b/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
@@ -1,16 +1,16 @@
-From 57e3eba28c9b4ee6bd3407d0715b8bd00aaf04a7 Mon Sep 17 00:00:00 2001
+From 53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6 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
+Subject: sagetex: Fix a warning when byte-compiling sagetexparse.py
 
 ---
- .../sagetex/patches/sagetex-fix-warning.patch    | 16 ++++++++++++++++
+ build/pkgs/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
+index 00000000..d82ab67
 --- /dev/null
 +++ b/build/pkgs/sagetex/patches/sagetex-fix-warning.patch
 @@ -0,0 +1,16 @@
@@ -31,5 +31,5 @@ index 0000000000..d82ab675dd
 +     self.result += t.code[1:-1] + '\n\n'
 + 
 -- 
-2.34.1
+cgit v1.0-1-gd88e
 

From e842d003762bad20303a81ad1daf5670e9ca7caa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 19:57:59 -0300
Subject: [PATCH 27/41] sagemath: reorder upstream sources and add two missing
 ones

---
 srcpkgs/sagemath/template | 60 ++++++++++++++++++++++-----------------
 1 file changed, 34 insertions(+), 26 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index b5b99d2c122d..f53cba947c88 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -36,69 +36,77 @@ _SAGE_ROOT=/usr/lib/sage-${version}
 _SAGE_UPSTREAM_MIRROR=https://mirrors.mit.edu/sage/spkg/upstream
 
 _upstream="
-${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
 ${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
 ${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
+
+${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
 ${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
 ${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
 ${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
 ${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
 ${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
 ${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
-https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
-https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
-http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
 ${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
 ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
 ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
 ${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
 ${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${PYPI_SITE}/P/PyCygwin/PyCygwin-0.1.tar.gz
 ${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
-https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+${PYPI_SITE}/s/setuptools/setuptools-59.2.0.tar.gz
 ${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
 ${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
-https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
 ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
+
+https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
+https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
+http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
+https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
 "
 
 checksum+="
-dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
 c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
 d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
+5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
+ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
+169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
+cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
+edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
+cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
+
+dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
 3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
 03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
 5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
 cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
-5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
-c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
-6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
-07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
 a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
-ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
 d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
-169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
 5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
-cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
 471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
 78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
-edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+45a5e295590c469a49b2804bfdb89059e942d768ad3b813f484d7b5bff48d226
 ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
-b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
-3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+157d21de9d055ab9e8ea3186d91e7f4f865e11f42deafa952d90842671fc2576
 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
 545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
-cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
-718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
 dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
+
+c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
+6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
+07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
+3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
 "
 
 for u in ${_upstream}; do

From 7bb48cbae849dee1b3e4ff695d92f450c4fa4c59 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 9 Jan 2022 12:45:47 -0300
Subject: [PATCH 28/41] sagemath: do not download anything patch

---
 .../patches/00-Do_not_download_anything.patch         | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 srcpkgs/sagemath/patches/00-Do_not_download_anything.patch

diff --git a/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch b/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch
new file mode 100644
index 000000000000..35aef7b8d456
--- /dev/null
+++ b/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch
@@ -0,0 +1,11 @@
+--- a/build/sage_bootstrap/tarball.py	2022-01-07 19:17:06.754747955 -0300
++++ b/build/sage_bootstrap/tarball.py	2022-01-07 19:25:31.844139381 -0300
+@@ -158,6 +158,8 @@
+                             .format(destination=destination))
+         successful_download = False
+         log.info('Attempting to download package {0} from mirrors'.format(self.filename))
++        log.info('ERROR: downloading is disabled, add file to template instead')
++        return
+         for mirror in MirrorList():
+             url = mirror + '/'.join(['spkg', 'upstream', self.package.name, self.filename])
+             log.info(url)

From 46b5019b61169d200206c7a83e8806b69723a53c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 9 Jan 2022 13:27:49 -0300
Subject: [PATCH 29/41] sagemath: update to 9.5.rc0.

---
 ...184f7498a2046065e669723e68efe2d65cee.patch |    6 +-
 ...1d4ced4264f65ab704f725f6f5879b012796.patch |  263 ----
 ...a54526829b79d5d236a40f83ddc6ce7b2696.patch | 1196 -----------------
 ...9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch |   27 -
 ...3f4f32246ad9ded6d37f1f2f12a589a81f4.patch} |    4 +-
 ...03138d0403be7c7cb303de2bc0a0e0b6793c.patch |   82 --
 ...f3a1611fed0cc66fb838eb85739646dd34d.patch} |   94 +-
 ...49c415e11d0522bff9013bc1509264b26ebf.patch |   27 +
 ...ip_doctest_singular_4.2.1--see_33134.patch |   13 +
 srcpkgs/sagemath/template                     |    6 +-
 10 files changed, 72 insertions(+), 1646 deletions(-)
 delete mode 100644 srcpkgs/sagemath/patches/trac-30766-system_python_3.10-df9f1d4ced4264f65ab704f725f6f5879b012796.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
 rename srcpkgs/sagemath/patches/{trac-33064-sage_docbuild_ignore_cache_save_permission_error-f767cf1eadfd8ab540a31c5c5ef09d56df09b90e.patch => trac-33064-sage_docbuild_ignore_cache_save_permission_error-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch} (92%)
 delete mode 100644 srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
 rename srcpkgs/sagemath/patches/{trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch => trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch} (63%)
 create mode 100644 srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch

diff --git a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
index b641113927e7..0ecb27c593cd 100644
--- a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
+++ b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
@@ -5615,9 +5615,9 @@ index 84f3d50..c7ad206 100644
      EXAMPLES::
  
          sage: sorted(installed_packages().keys())  # optional - build
--        [...'alabaster', ...'sage_conf', ...]
--        sage: installed_packages()['alabaster']  # optional - build, random
--        '0.7.12'
+-        [...'gmpy2', ...'sage_conf', ...]
+-        sage: installed_packages()['gmpy2']  # optional - build, random
+-        '2.1.0b5'
 +        [...'sage_conf', ...]
 +        sage: installed_packages()['sage_conf']  # optional - build, random
 +        '9.5'
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
deleted file mode 100644
index a1cb4c834482..000000000000
--- a/srcpkgs/sagemath/patches/trac-30766-system_python_3.10-df9f1d4ced4264f65ab704f725f6f5879b012796.patch
+++ /dev/null
@@ -1,263 +0,0 @@
-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-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch b/srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
deleted file mode 100644
index 3ae6fe01822d..000000000000
--- a/srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
+++ /dev/null
@@ -1,1196 +0,0 @@
-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/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch b/srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
deleted file mode 100644
index 485fb0176f45..000000000000
--- a/srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-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: 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 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"
- 
- # 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)
--- 
-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-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
similarity index 92%
rename from srcpkgs/sagemath/patches/trac-33064-sage_docbuild_ignore_cache_save_permission_error-f767cf1eadfd8ab540a31c5c5ef09d56df09b90e.patch
rename to srcpkgs/sagemath/patches/trac-33064-sage_docbuild_ignore_cache_save_permission_error-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
index 20fa12e570eb..04f04cfd6718 100644
--- 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-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
@@ -1,4 +1,4 @@
-From f767cf1eadfd8ab540a31c5c5ef09d56df09b90e Mon Sep 17 00:00:00 2001
+From e89193f4f32246ad9ded6d37f1f2f12a589a81f4 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
@@ -8,7 +8,7 @@ Subject: sage_docbuild: do not fail when cache cannot be saved
  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
+index 466ca82..f8c8ebd 100644
 --- a/src/sage_docbuild/__init__.py
 +++ b/src/sage_docbuild/__init__.py
 @@ -856,9 +856,12 @@ class ReferenceSubBuilder(DocBuilder):
diff --git a/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch b/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
deleted file mode 100644
index 6bc5193b75ee..000000000000
--- a/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-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
-
-
-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/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch b/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
similarity index 63%
rename from srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch
rename to srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
index 3794aa7f019b..04fca4815a00 100644
--- a/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch
+++ b/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
@@ -1,4 +1,4 @@
-From 7d3381b21e4716cfa8a33915621a12f0eba74233 Mon Sep 17 00:00:00 2001
+From 18d0477153af6f453a0e84f78030535f6a36ce87 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
@@ -10,56 +10,56 @@ Subject: doctests: remove dochtml label from some tests that don't need docs
  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
+index c788623..527ed90 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  # optional - sagemath_doc_html
+-        sage: thematic_index = os.path.join(SAGE_DOC, "html", "en", "thematic_tutorials", "index.html")  # optional - sagemath_doc_html
 +        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
+         sage: for line in open(thematic_index).readlines():  # optional - sagemath_doc_html
          ....:     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
+index 4c56aea..583ca06 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  # optional - sagemath_doc_html
+-    sage: docfilename = os.path.join(SAGE_DOC, 'html', 'en', 'reference', 'calculus', 'sage', 'symbolic', 'expression.html')  # optional - sagemath_doc_html
 +    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
+     sage: with open(docfilename) as fobj:  # optional - sagemath_doc_html
      ....:     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='',
+@@ -845,12 +845,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  # optional - sagemath_doc_html
+-        sage: len(_search_src_or_doc('src', r'matrix\(', 'incidence_structures', 'self', 'combinat', interact=False).splitlines()) > 1  # optional - sagemath_doc_html
 +        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)
+         sage: 'abvar/homology' in _search_src_or_doc('doc', 'homology', 'variety', interact=False)  # optional - sagemath_doc_html, 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)  # optional - sagemath_doc_html
 +        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:
+@@ -1369,7 +1369,7 @@ class _sage_doc:
  
-         sage: browse_sage_doc._open("reference", testing=True)[0]  # optional - dochtml, indirect doctest
+         sage: browse_sage_doc._open("reference", testing=True)[0]  # optional - sagemath_doc_html, 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]  # optional - sagemath_doc_html
 +        sage: browse_sage_doc(identity_matrix, 'rst')[-107:-47]
          'Full MatrixSpace of 3 by 3 sparse matrices over Integer Ring'
      """
@@ -68,7 +68,7 @@ index eb70516..b4848ed 100644
 cgit v1.0-1-gd88e
 
 
-From 42a76c3f82edecc9c6c53c661251677e3e907584 Mon Sep 17 00:00:00 2001
+From 88dd9f3a1611fed0cc66fb838eb85739646dd34d 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
@@ -78,7 +78,7 @@ Subject: doctests: add dochtml label to some tests that need docs installed
  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
+index f8c8ebd..d329009 100644
 --- a/src/sage_docbuild/__init__.py
 +++ b/src/sage_docbuild/__init__.py
 @@ -105,7 +105,7 @@ def builder_helper(type):
@@ -86,7 +86,7 @@ index 4a71c91..dd233bd 100644
          sage: from sage_docbuild import _build_many as build_many
          sage: helper = builder_helper("html")
 -        sage: try:
-+        sage: try:  # optional - dochtml
++        sage: try:  # optional - sagemath_doc_html
          ....:     build_many(build_ref_doc, [("docname", "en", "html", {})])
          ....: except Exception as E:
          ....:     "Non-exception during docbuild: abort pool operation" in str(E)
@@ -95,7 +95,7 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import DocBuilder
              sage: b = DocBuilder('tutorial')
 -            sage: b._output_dir('html')
-+            sage: b._output_dir('html')         # optional - dochtml
++            sage: b._output_dir('html')         # optional - sagemath_doc_html
              '.../html/en/tutorial'
          """
          d = os.path.join(SAGE_DOC, type, self.lang, self.name)
@@ -104,7 +104,7 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import DocBuilder
              sage: b = DocBuilder('tutorial')
 -            sage: b._doctrees_dir()
-+            sage: b._doctrees_dir()             # optional - docthml
++            sage: b._doctrees_dir()             # optional - sagemath_doc_html
              '.../doctrees/en/tutorial'
          """
          d = os.path.join(SAGE_DOC, 'doctrees', self.lang, self.name)
@@ -113,7 +113,7 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import ReferenceBuilder
              sage: b = ReferenceBuilder('reference')
 -            sage: b._output_dir('html')
-+            sage: b._output_dir('html')         # optional - dochtml
++            sage: b._output_dir('html')         # optional - sagemath_doc_html
              '.../html/en/reference'
          """
          if lang is None:
@@ -122,56 +122,10 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import ReferenceTopBuilder
              sage: b = ReferenceTopBuilder('reference')
 -            sage: b._output_dir('html')
-+            sage: b._output_dir('html')         # optional - dochtml
++            sage: b._output_dir('html')         # optional - sagemath_doc_html
              '.../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/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch b/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
new file mode 100644
index 000000000000..d32f1e4d5e9f
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
@@ -0,0 +1,27 @@
+From 836249c415e11d0522bff9013bc1509264b26ebf Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Sun, 9 Jan 2022 16:51:22 -0300
+Subject: trac 33135: add filter to ignore deprecation warnings
+
+---
+ src/sage/all.py | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/sage/all.py b/src/sage/all.py
+index 01ef327..19ca3d4 100644
+--- a/src/sage/all.py
++++ b/src/sage/all.py
+@@ -96,6 +96,10 @@ warnings.filterwarnings('ignore', category=DeprecationWarning,
+ warnings.filterwarnings('ignore', category=DeprecationWarning,
+                         module='pythran')
+ 
++warnings.filterwarnings('ignore', category=DeprecationWarning,
++                        message='The distutils(.sysconfig module| package) is deprecated',
++                        module='numpy|sage.env|sage.features')
++
+ ################ end setup warnings ###############################
+ 
+ 
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
new file mode 100644
index 000000000000..438078a92036
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage/rings/polynomial/hilbert.pyx b/src/sage/rings/polynomial/hilbert.pyx
+index 4cd91d0a46..323b168c4e 100644
+--- a/src/sage/rings/polynomial/hilbert.pyx
++++ b/src/sage/rings/polynomial/hilbert.pyx
+@@ -578,7 +578,7 @@ def hilbert_poincare_series(I, grading=None):
+ 
+     This example exceeded the capabilities of Singular before version 4.2.1p2::
+ 
+-        sage: J.hilbert_numerator(algorithm='singular')
++        sage: J.hilbert_numerator(algorithm='singular')   # not tested - requires singular 4.2.1p2
+         120*t^33 - 3465*t^32 + 48180*t^31 - 429374*t^30 + 2753520*t^29 - 13522410*t^28 + 52832780*t^27 - 168384150*t^26 + 445188744*t^25 - 987193350*t^24 + 1847488500*t^23 + 1372406746*t^22 - 403422496*t^21 - 8403314*t^20 - 471656596*t^19 + 1806623746*t^18 + 752776200*t^17 + 752776200*t^16 - 1580830020*t^15 + 1673936550*t^14 - 1294246800*t^13 + 786893250*t^12 - 382391100*t^11 + 146679390*t^10 - 42299400*t^9 + 7837830*t^8 - 172260*t^7 - 468930*t^6 + 183744*t^5 - 39270*t^4 + 5060*t^3 - 330*t^2 + 1
+ 
+     """
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f53cba947c88..f688629fc26d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -1,6 +1,6 @@
 # Template file for 'sagemath'
 pkgname=sagemath
-version=9.5.beta9
+version=9.5.rc0
 revision=1
 wrksrc=sage-$version
 build_style=configure
@@ -19,7 +19,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
-checksum=aea4c5a8d3b32af2fba644269b9daf4f62471471ba2d7d83da0f8098a5f53225
+checksum=8012e3ac35290fa9b2cb837eeca149925784c2378b486731226944e4afd8a4e6
 python_version=3
 
 build_options="debug system_python3 system_site_packages"
@@ -128,7 +128,7 @@ nostrip=yes
 noshlibprovides=yes
 
 # don't rewrite python shebang as sage uses its own python (for now)
-_no_python_shebang=yes
+#_no_python_shebang=yes
 
 # compile python code in sage venv
 pycompile_dirs="$_SAGE_ROOT/venv/"

From 6d9ff86cc183786bf0cfcd90f8b451515ab0ade9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 10 Jan 2022 16:32:54 -0300
Subject: [PATCH 30/41] sagemath: use system gap

---
 ...f491e5ce599ba185f5e93f02e0fcebd76c9e.patch | 57 +++++++++++++++++++
 .../patches/zzz-skip_doctest_system_gap.patch | 13 +++++
 srcpkgs/sagemath/template                     | 15 ++++-
 3 files changed, 82 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch

diff --git a/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch b/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
new file mode 100644
index 000000000000..da88a369db0d
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
@@ -0,0 +1,57 @@
+From 2c981351bb60089530b0598d3e9a909a23d4d4d8 Mon Sep 17 00:00:00 2001
+From: Thierry Thomas <thierry@FreeBSD.org>
+Date: Mon, 22 Mar 2021 03:04:12 +0100
+Subject: 29644: Add spkg-configure.m4 for gap
+
+---
+ build/pkgs/gap/spkg-configure.m4 | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+ create mode 100644 build/pkgs/gap/spkg-configure.m4
+
+diff --git a/build/pkgs/gap/spkg-configure.m4 b/build/pkgs/gap/spkg-configure.m4
+new file mode 100644
+index 00000000..91cd089
+--- /dev/null
++++ b/build/pkgs/gap/spkg-configure.m4
+@@ -0,0 +1,8 @@
++SAGE_SPKG_CONFIGURE([gap], [
++    SAGE_SPKG_DEPCHECK([gmp], [
++       AC_CHECK_HEADER([gap/system.h], [
++        AC_SEARCH_LIBS([GAP_COMM], [gap], [
++        ], [sage_spkg_install_gap=yes])
++       ], [sage_spkg_install_gap=yes])
++    ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2a41f491e5ce599ba185f5e93f02e0fcebd76c9e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Samuel=20Leli=C3=A8vre?= <samuel.lelievre@gmail.com>
+Date: Mon, 22 Mar 2021 03:05:31 +0100
+Subject: 29644: Add distro information for gap
+
+---
+ build/pkgs/gap/distros/fedora.txt | 1 +
+ build/pkgs/gap/distros/gentoo.txt | 1 +
+ 2 files changed, 2 insertions(+)
+ create mode 100644 build/pkgs/gap/distros/fedora.txt
+ create mode 100644 build/pkgs/gap/distros/gentoo.txt
+
+diff --git a/build/pkgs/gap/distros/fedora.txt b/build/pkgs/gap/distros/fedora.txt
+new file mode 100644
+index 00000000..ea4feae
+--- /dev/null
++++ b/build/pkgs/gap/distros/fedora.txt
+@@ -0,0 +1 @@
++gap
+diff --git a/build/pkgs/gap/distros/gentoo.txt b/build/pkgs/gap/distros/gentoo.txt
+new file mode 100644
+index 00000000..ea64ec9
+--- /dev/null
++++ b/build/pkgs/gap/distros/gentoo.txt
+@@ -0,0 +1 @@
++sci-mathematics/gap
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
new file mode 100644
index 000000000000..f132591d48ac
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage_setup/optional_extension.py b/src/sage_setup/optional_extension.py
+index f252849384..4034e3e196 100644
+--- a/src/sage_setup/optional_extension.py
++++ b/src/sage_setup/optional_extension.py
+@@ -80,7 +80,7 @@ def OptionalExtension(*args, **kwds):
+         sage: print(ext.__class__.__name__)
+         CythonizeExtension
+         sage: ext = OptionalExtension("foo", ["foo.c"], package="gap")
+-        sage: print(ext.__class__.__name__)
++        sage: print(ext.__class__.__name__)     # not tested - fails with system gap
+         Extension
+     """
+     try:
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f688629fc26d..02b0af4ad16d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -66,7 +66,6 @@ ${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
 ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
 
 https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
-https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
 http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
 https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
 https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
@@ -103,7 +102,6 @@ ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
 dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
 
 c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
-6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
 07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
 3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
 718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
@@ -159,6 +157,13 @@ pre_configure() {
 	export MAKE="make -j ${XBPS_MAKEJOBS}"
 }
 
+post_configure() {
+	# we set some variables, right after configure has created sage_conf.py
+	cat <<-EOF >> pkgs/sage-conf/sage_conf.py
+	GAP_ROOT_DIR = "/usr/share/gap"
+	EOF
+}
+
 # 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
@@ -248,7 +253,11 @@ makedepends+="
  gengetopt texinfo
  brial-devel cliquer-devel gfan libbraiding-devel libhomfly-devel
  lrcalc-devel nauty-devel palp tachyon
- maxima-ecl primesieve-devel primecount-devel
+ maxima-ecl primesieve-devel primecount-devel gap-devel
+"
+
+# optional dependencies
+makedepends+="
  ffmpeg ImageMagick
 "
 

From e6af628f1f119d69dd6d12864e816d18f4414b70 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Thu, 13 Jan 2022 03:21:19 -0300
Subject: [PATCH 31/41] sagemath: fixes for system gap

---
 .../zzz-fixes_for_system_gap--see_29644.patch | 96 +++++++++++++++++++
 .../patches/zzz-skip_doctest_system_gap.patch | 13 ---
 srcpkgs/sagemath/template                     |  1 +
 3 files changed, 97 insertions(+), 13 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
 delete mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch

diff --git a/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch b/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
new file mode 100644
index 000000000000..741d2b23a7f5
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
@@ -0,0 +1,96 @@
+From 346b4ea4c92f4287d3c097b92817cf2abfcddd8c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Thu, 13 Jan 2022 01:41:31 -0300
+Subject: [PATCH] gap: fixes for using system gap
+
+ - fix _get_shared_lib_path() so we don't need to configure GAP_SO
+ - fix gap_root() so we don't need to configure GAP_ROOT_DIR
+ - skip a useless test that cannot succeed on system gap
+ - use gap_root() in saved_workspace.py instead of GAP_ROOT_DIR
+---
+ src/sage/env.py                      |  2 +-
+ src/sage/libs/gap/saved_workspace.py |  4 ++--
+ src/sage/libs/gap/util.pyx           | 11 +++++++++++
+ src/sage_setup/optional_extension.py |  2 +-
+ 4 files changed, 15 insertions(+), 4 deletions(-)
+
+diff --git a/src/sage/env.py b/src/sage/env.py
+index c4953cfa65..c16696d298 100644
+--- a/src/sage/env.py
++++ b/src/sage/env.py
+@@ -293,7 +293,7 @@ def _get_shared_lib_path(*libnames: str) -> Optional[str]:
+             if sys.platform == 'darwin':
+                 ext = 'dylib'
+             else:
+-                ext = 'so'
++                ext = 'so*'
+ 
+             if SAGE_LOCAL:
+                 search_directories.append(Path(SAGE_LOCAL) / 'lib')
+diff --git a/src/sage/libs/gap/saved_workspace.py b/src/sage/libs/gap/saved_workspace.py
+index ad5adec36d..59c498795f 100644
+--- a/src/sage/libs/gap/saved_workspace.py
++++ b/src/sage/libs/gap/saved_workspace.py
+@@ -8,7 +8,7 @@ workspaces.
+ 
+ import os
+ import glob
+-from sage.env import GAP_ROOT_DIR
++from sage.libs.gap.util import gap_root
+ from sage.interfaces.gap_workspace import gap_workspace_file
+ 
+ 
+@@ -31,7 +31,7 @@ def timestamp():
+     """
+     libgap_dir = os.path.dirname(__file__)
+     libgap_files = glob.glob(os.path.join(libgap_dir, '*'))
+-    gap_packages = glob.glob(os.path.join(GAP_ROOT_DIR, 'pkg', '*'))
++    gap_packages = glob.glob(os.path.join(gap_root(), 'pkg', '*'))
+     files = libgap_files + gap_packages
+     if len(files) == 0:
+         print('Unable to find LibGAP files.')
+diff --git a/src/sage/libs/gap/util.pyx b/src/sage/libs/gap/util.pyx
+index 08c4c40cc0..c7dd557c35 100644
+--- a/src/sage/libs/gap/util.pyx
++++ b/src/sage/libs/gap/util.pyx
+@@ -23,6 +23,7 @@ from cysignals.signals cimport sig_on, sig_off
+ import os
+ import warnings
+ import sage.env
++import subprocess
+ 
+ from .gap_includes cimport *
+ from .element cimport *
+@@ -178,6 +179,16 @@ def gap_root():
+     if os.path.exists(sage.env.GAP_ROOT_DIR):
+         return sage.env.GAP_ROOT_DIR
+ 
++    gap_expr = 'JoinStringsWithSeparator(KERNEL_INFO().GAP_ROOT_PATHS,";")'
++    gap_root_paths = subprocess.getoutput(
++        f"gap -r -q --bare --nointeract -c 'Display({gap_expr});'"
++        ).strip().split(';')
++
++    for gapdir in gap_root_paths:
++        if os.path.exists(os.path.join(gapdir, 'sysinfo.gap')):
++            sage.env.GAP_ROOT_DIR = gapdir
++            return gapdir
++
+     # Attempt to figure out the appropriate GAP_ROOT by reading the
+     # local/bin/gap shell script; this is an ugly hack that exists for
+     # historical reasons; the best approach to setting where Sage looks for
+diff --git a/src/sage_setup/optional_extension.py b/src/sage_setup/optional_extension.py
+index f252849384..4034e3e196 100644
+--- a/src/sage_setup/optional_extension.py
++++ b/src/sage_setup/optional_extension.py
+@@ -80,7 +80,7 @@ def OptionalExtension(*args, **kwds):
+         sage: print(ext.__class__.__name__)
+         CythonizeExtension
+         sage: ext = OptionalExtension("foo", ["foo.c"], package="gap")
+-        sage: print(ext.__class__.__name__)
++        sage: print(ext.__class__.__name__)     # not tested - fails with system gap
+         Extension
+     """
+     try:
+-- 
+2.34.1
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
deleted file mode 100644
index f132591d48ac..000000000000
--- a/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/src/sage_setup/optional_extension.py b/src/sage_setup/optional_extension.py
-index f252849384..4034e3e196 100644
---- a/src/sage_setup/optional_extension.py
-+++ b/src/sage_setup/optional_extension.py
-@@ -80,7 +80,7 @@ def OptionalExtension(*args, **kwds):
-         sage: print(ext.__class__.__name__)
-         CythonizeExtension
-         sage: ext = OptionalExtension("foo", ["foo.c"], package="gap")
--        sage: print(ext.__class__.__name__)
-+        sage: print(ext.__class__.__name__)     # not tested - fails with system gap
-         Extension
-     """
-     try:
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 02b0af4ad16d..0d8ce1f7a70a 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -161,6 +161,7 @@ post_configure() {
 	# we set some variables, right after configure has created sage_conf.py
 	cat <<-EOF >> pkgs/sage-conf/sage_conf.py
 	GAP_ROOT_DIR = "/usr/share/gap"
+	GAP_SO = "$(objdump -p /usr/lib/libgap.so | awk '/SONAME/{print $2}')"
 	EOF
 }
 

From 5bbde033153721268b2b4b408479183276606d36 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Thu, 13 Jan 2022 15:47:33 -0300
Subject: [PATCH 32/41] New package: sagemath-test

---
 srcpkgs/sagemath-test/template                | 32 +++++++++++++++++++
 .../patches/zzz-skip_doctest_shebang.patch    | 11 +++++++
 2 files changed, 43 insertions(+)
 create mode 100644 srcpkgs/sagemath-test/template
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch

diff --git a/srcpkgs/sagemath-test/template b/srcpkgs/sagemath-test/template
new file mode 100644
index 000000000000..3e0b1c3233fd
--- /dev/null
+++ b/srcpkgs/sagemath-test/template
@@ -0,0 +1,32 @@
+# Template file for 'sagemath-test'
+pkgname=sagemath-test
+version=1
+revision=1
+build_style=meta
+checkdepends="sagemath"
+short_desc="Dummy package to test sagemath"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-2.0-or-later"
+homepage="none"
+
+# TODO: install base-voidstrap, uninstall base-chroot, and remove orphans
+# so we can check sagemath depends are enough to run sage on void
+
+do_check() {
+	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
+		_test_args=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	fi
+	if [ -z "$_test_args" ]; then
+		_test_args=--all
+	fi
+	if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
+		# for CI use a predictable random seed
+		_test_args="--random-seed=0 $_test_args"
+	fi
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args="--long $_test_args"
+	else
+		_test_args="--warn-long 5.0 $_test_args"
+	fi
+	/usr/bin/sage* -tp ${XBPS_MAKEJOBS} ${_test_args}
+}
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch
new file mode 100644
index 000000000000..04fa2acbf3ec
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch
@@ -0,0 +1,11 @@
+--- a/src/sage/tests/cmdline.py
++++ b/src/sage/tests/cmdline.py
+@@ -488,7 +488,7 @@ def test_executable(args, input="", timeout=100.0, pydebug_ignore_warnings=False
+         0
+ 
+         sage: (out, err, ret) = test_executable(["sage", "--cython"])
+-        sage: print(err)
++        sage: print(err)  # not tested - broken when shebang is rewritten
+         Cython (http://cython.org) is a compiler for code written in the
+         Cython language.  Cython is based on Pyrex by Greg Ewing.
+         ...

From f1665cb9fc05b98d4e92d084538a913ea892555d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 11:34:23 -0300
Subject: [PATCH 33/41] sagemath: cleanup and one patch

---
 .../zzz-skip_doctest_sage_setup_find.patch    | 12 ++++++++
 srcpkgs/sagemath/template                     | 30 ++++---------------
 2 files changed, 18 insertions(+), 24 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch

diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch
new file mode 100644
index 000000000000..15aed02f9aaa
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch
@@ -0,0 +1,12 @@
+--- a/src/sage_setup/find.py
++++ b/src/sage_setup/find.py
+@@ -301,7 +301,7 @@ def find_extra_files(src_dir, modules, cythonized_dir, special_filenames=[]):
+         sage: extras["sage/libs/mpfr"]
+         [...sage/libs/mpfr/types.pxd...]
+         sage: extras["sage/ext/interpreters"]
+-        ['.../src/sage/ext/interpreters/wrapper_cdf.pxd', ...wrapper_cdf.h...]
++        ['.../src/sage/ext/interpreters/wrapper_cdf.pxd', ...]
+     """
+     from Cython.Utils import is_package_dir
+ 
+--
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 0d8ce1f7a70a..f25cb745c9c4 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -4,7 +4,8 @@ version=9.5.rc0
 revision=1
 wrksrc=sage-$version
 build_style=configure
-configure_args="--enable-build-as-root"
+configure_args="--enable-build-as-root --with-system-python3
+ --enable-system-site-packages"
 make_check_target=ptest
 # for now skip building docs
 make_build_target=build
@@ -22,13 +23,8 @@ distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
 checksum=8012e3ac35290fa9b2cb837eeca149925784c2378b486731226944e4afd8a4e6
 python_version=3
 
-build_options="debug system_python3 system_site_packages"
+build_options="debug"
 desc_option_debug="Build with debug symbols"
-desc_option_system_python="Build using system python 3"
-desc_option_system_python="Build using system python site-packages"
-build_options_default="system_python3 system_site_packages"
-configure_args+=" $(vopt_with system_python3)"
-configure_args+=" $(vopt_enable system_site_packages)"
 
 # path where sage will be installed
 _SAGE_ROOT=/usr/lib/sage-${version}
@@ -112,9 +108,6 @@ for u in ${_upstream}; do
 	skip_extraction+=" ${u##*[/>]}"
 done
 
-# 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
@@ -165,16 +158,6 @@ post_configure() {
 	EOF
 }
 
-# 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() {
 	vlicense COPYING.txt
 	vdoc README.md
@@ -301,7 +284,6 @@ _sage_python3_modules="
  python3-wheel python3-zipp pythran
  "
 
-if [ "$build_option_system_site_packages" ]; then
-	makedepends+=" $_sage_python3_modules"
-	depends+=" $_sage_python3_modules"
-fi
+# python packages are build and runtime dependencies
+makedepends+=" $_sage_python3_modules"
+depends+=" $_sage_python3_modules"

From 9cf0dc6b53b8c186b8f8f1005cce6b4c3b54289a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 11:34:32 -0300
Subject: [PATCH 34/41] sagemath: update to 9.5.rc1.

---
 srcpkgs/sagemath/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f25cb745c9c4..f5d9d0f0fabd 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -1,6 +1,6 @@
 # Template file for 'sagemath'
 pkgname=sagemath
-version=9.5.rc0
+version=9.5.rc1
 revision=1
 wrksrc=sage-$version
 build_style=configure
@@ -20,7 +20,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
-checksum=8012e3ac35290fa9b2cb837eeca149925784c2378b486731226944e4afd8a4e6
+checksum=b015c54f7411669ef70bac2b2fde260e7f45724bcff170957b1f9fd08131f2c3
 python_version=3
 
 build_options="debug"

From 82de86f42dacade0c16773e9a50f7099985e0e5a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 14:53:11 -0300
Subject: [PATCH 35/41] sagemath: patch not needed with singular 4.3.0

---
 ...zzz-skip_doctest_singular_4.2.1--see_33134.patch | 13 -------------
 1 file changed, 13 deletions(-)
 delete mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch

diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
deleted file mode 100644
index 438078a92036..000000000000
--- a/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/src/sage/rings/polynomial/hilbert.pyx b/src/sage/rings/polynomial/hilbert.pyx
-index 4cd91d0a46..323b168c4e 100644
---- a/src/sage/rings/polynomial/hilbert.pyx
-+++ b/src/sage/rings/polynomial/hilbert.pyx
-@@ -578,7 +578,7 @@ def hilbert_poincare_series(I, grading=None):
- 
-     This example exceeded the capabilities of Singular before version 4.2.1p2::
- 
--        sage: J.hilbert_numerator(algorithm='singular')
-+        sage: J.hilbert_numerator(algorithm='singular')   # not tested - requires singular 4.2.1p2
-         120*t^33 - 3465*t^32 + 48180*t^31 - 429374*t^30 + 2753520*t^29 - 13522410*t^28 + 52832780*t^27 - 168384150*t^26 + 445188744*t^25 - 987193350*t^24 + 1847488500*t^23 + 1372406746*t^22 - 403422496*t^21 - 8403314*t^20 - 471656596*t^19 + 1806623746*t^18 + 752776200*t^17 + 752776200*t^16 - 1580830020*t^15 + 1673936550*t^14 - 1294246800*t^13 + 786893250*t^12 - 382391100*t^11 + 146679390*t^10 - 42299400*t^9 + 7837830*t^8 - 172260*t^7 - 468930*t^6 + 183744*t^5 - 39270*t^4 + 5060*t^3 - 330*t^2 + 1
- 
-     """

From 78954abece6cc63bae5c38fe88da4fc102b5fd51 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 14:53:25 -0300
Subject: [PATCH 36/41] sagemath: install /usr/bin/sage

---
 srcpkgs/sagemath/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f5d9d0f0fabd..49821fc982e4 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -181,7 +181,8 @@ do_install() {
 	vmkdir 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}
+	ln -sfT $_SAGE_ROOT/sage ${DESTDIR}/usr/bin/sage-${version}
+	ln -sfT sage-${version} ${DESTDIR}/usr/bin/sage
 }
 
 do_check() {

From 234786bd283f2ac86da1d5b8300e5a4d6d5cab31 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 16:31:25 -0300
Subject: [PATCH 37/41] New package: python3-cvxopt-1.2.7

---
 srcpkgs/python3-cvxopt/template | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 srcpkgs/python3-cvxopt/template

diff --git a/srcpkgs/python3-cvxopt/template b/srcpkgs/python3-cvxopt/template
new file mode 100644
index 000000000000..0fb769b294e0
--- /dev/null
+++ b/srcpkgs/python3-cvxopt/template
@@ -0,0 +1,20 @@
+# Template file for 'python3-cvxopt'
+pkgname=python3-cvxopt
+version=1.2.7
+revision=1
+wrksrc="cvxopt-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools"
+makedepends="python3-devel blas-devel lapack-devel SuiteSparse-devel gsl-devel glpk-devel"
+checkdepends="python3-pytest"
+short_desc="Python software for convex optimization"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-3.0-or-later"
+homepage="http://cvxopt.org/"
+distfiles="${PYPI_SITE}/c/cvxopt/cvxopt-${version}.tar.gz"
+checksum=3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
+
+pre_build() {
+	export CVXOPT_BUILD_GSL=1
+	export CVXOPT_BUILD_GLPK=1
+}

From a03c501181a8ce606aecb5e608ab3a3d09ba4e93 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 22:53:51 -0300
Subject: [PATCH 38/41] New package: python3-importlib_resources-5.4.0

---
 srcpkgs/python3-importlib_resources/template | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 srcpkgs/python3-importlib_resources/template

diff --git a/srcpkgs/python3-importlib_resources/template b/srcpkgs/python3-importlib_resources/template
new file mode 100644
index 000000000000..b1551717d17f
--- /dev/null
+++ b/srcpkgs/python3-importlib_resources/template
@@ -0,0 +1,16 @@
+# Template file for 'python3-importlib_resources'
+pkgname=python3-importlib_resources
+version=5.4.0
+revision=1
+wrksrc="importlib_resources-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools"
+depends="python3-zipp"
+short_desc="Read resources from Python packages"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="Apache-2.0"
+homepage="https://github.com/python/importlib_resources"
+distfiles="${PYPI_SITE}/i/importlib_resources/importlib_resources-${version}.tar.gz"
+checksum=d756e2f85dd4de2ba89be0b21dba2a3bbec2e871a42a3a16719258a11f87506b
+# doesn't work
+make_check=no

From 311fe992c94dd2ba3db5b649e0919ce8091056a2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 23:37:14 -0300
Subject: [PATCH 39/41] sagemath: rearrange upstream packages and indent

This doesn't change anything, it separates _upstream and
checksum in three blocks to make it easier to edit.
---
 srcpkgs/sagemath/template | 140 ++++++++++++++++++++------------------
 1 file changed, 74 insertions(+), 66 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 49821fc982e4..4317f1e80893 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -31,76 +31,84 @@ _SAGE_ROOT=/usr/lib/sage-${version}
 
 _SAGE_UPSTREAM_MIRROR=https://mirrors.mit.edu/sage/spkg/upstream
 
+# packages were sage is the upstream
 _upstream="
-${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
-
-${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
-${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
-${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
-${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
-${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
-${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
-${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
-${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
-${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
-${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
-${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
-${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
-${PYPI_SITE}/P/PyCygwin/PyCygwin-0.1.tar.gz
-${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
-${PYPI_SITE}/s/setuptools/setuptools-59.2.0.tar.gz
-${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
-${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
-${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
-
-https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
-http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
-https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
-https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
+ ${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
+ ${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
+ ${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
+"
+checksum+="
+ c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
+ d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
+ 5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
+ ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
+ 169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
+ cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
+ edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+ b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
+ cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
 "
 
+# packages from pypi (python modules)
+_upstream+="
+ ${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
+ ${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
+ ${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
+ ${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
+ ${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
+ ${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
+ ${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
+ ${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
+ ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
+ ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
+ ${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
+ ${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
+ ${PYPI_SITE}/P/PyCygwin/PyCygwin-0.1.tar.gz
+ ${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
+ ${PYPI_SITE}/s/setuptools/setuptools-59.2.0.tar.gz
+ ${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
+ ${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
+ ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
+"
+checksum+="
+ dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
+ 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
+ 3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
+ 03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
+ 5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
+ cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
+ 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+ a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
+ d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
+ 5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
+ 471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
+ 78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
+ 45a5e295590c469a49b2804bfdb89059e942d768ad3b813f484d7b5bff48d226
+ ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
+ 157d21de9d055ab9e8ea3186d91e7f4f865e11f42deafa952d90842671fc2576
+ 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
+ 545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
+ dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
+"
+
+# other upstream packages
+_upstream+="
+ https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
+ http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
+ https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+ https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
+"
 checksum+="
-c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
-d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
-5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
-ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
-169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
-cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
-edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
-b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
-cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
-
-dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
-4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
-3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
-03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
-5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
-cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
-581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
-a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
-d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
-5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
-471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
-78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
-45a5e295590c469a49b2804bfdb89059e942d768ad3b813f484d7b5bff48d226
-ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
-157d21de9d055ab9e8ea3186d91e7f4f865e11f42deafa952d90842671fc2576
-6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
-545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
-dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
-
-c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
-07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
-3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
-718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
+ c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
+ 07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
+ 3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+ 718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
 "
 
 for u in ${_upstream}; do

From dbc4f9291417bd9dd1a53bfde3addbffddfff335 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 23:37:58 -0300
Subject: [PATCH 40/41] sagemath: use system cvxopt and importlib_resources

---
 srcpkgs/sagemath/template | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 4317f1e80893..5eb70a6267bb 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -59,12 +59,10 @@ checksum+="
 _upstream+="
  ${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
  ${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
- ${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
  ${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
  ${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
  ${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
  ${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
- ${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
  ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
  ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
  ${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
@@ -79,12 +77,10 @@ _upstream+="
 checksum+="
  dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
  4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
- 3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
  03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
  5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
  cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
  581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
- a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
  d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
  5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
  471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
@@ -257,9 +253,6 @@ makedepends+="
 # TODO: optional
 # 4ti2 coxeter3 libsemigroups lrslib pdf2svg perl_mongodb polymake
 
-# TODO: standard
-# cvxopt importlib_resources
-
 # python packages for trac-29665
 _sage_python3_modules="
  python3-Babel python3-Jinja2 python3-MarkupSafe python3-Pillow
@@ -291,6 +284,8 @@ _sage_python3_modules="
  python3-tornado python3-traitlets python3-typing_extensions
  python3-tzlocal python3-urllib3 python3-wcwidth python3-webencodings
  python3-wheel python3-zipp pythran
+
+ python3-cvxopt python3-importlib_resources
  "
 
 # python packages are build and runtime dependencies

From ee93626d3c9692b48e72ac35ab239ce6b11cb0a0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 01:48:08 -0300
Subject: [PATCH 41/41] sagemath-test: fix sage binary (now is just 'sage')

---
 srcpkgs/sagemath-test/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/sagemath-test/template b/srcpkgs/sagemath-test/template
index 3e0b1c3233fd..1c0d71683a1b 100644
--- a/srcpkgs/sagemath-test/template
+++ b/srcpkgs/sagemath-test/template
@@ -28,5 +28,5 @@ do_check() {
 	else
 		_test_args="--warn-long 5.0 $_test_args"
 	fi
-	/usr/bin/sage* -tp ${XBPS_MAKEJOBS} ${_test_args}
+	sage -tp ${XBPS_MAKEJOBS} ${_test_args}
 }

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: sagemath-9.5.rc1
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (198 preceding siblings ...)
  2022-01-15  4:48 ` tornaria
@ 2022-01-15 13:35 ` tornaria
  2022-01-15 13:57 ` tornaria
                   ` (48 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-15 13:35 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 627 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.rc1
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: 629585 bytes --]

From b455e438a61700831c1932d7ebdc927faa326eac 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/41] 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 10504a11a727683bd00940c230eb794633690ecc 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/41] 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 01fd02bde7045df352898a37ccdd49e72aac6e2c 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/41] 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 69755ce883b95f6cfa2bf42f8ae4ae73a0d4c630 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/41] 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 c16309ac3f86cb59f1e3b442a83cf75536b68f62 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/41] 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 b291f1e0e676e2782214f68856c9502f5c624946 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/41] 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 56c5696a8739713ba21e29723b043a8a041e9e8c 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/41] 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 3ec34ca747076237a82a8ef808b31d436a3346b8 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/41] 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 7aa84100620e3da6fedaa409e88575f846ec0439 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/41] 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 fadd98f9bafbc20dc68ad878f1144a9335965281 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/41] 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 374588e6899f5f6bea7ef346162c21755bad48b0 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/41] 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 8b0b02932eb314d8822925f33885b6493b770f1f 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/41] 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 00c39aba6940925c2ab8f4edf063d1f1b29c9beb 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/41] 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 774b7ce1a8495d82e86d39387eb59e07e1140840 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/41] 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 b472fbbcf87a33ab60a4190b151420cf0d1f8f92 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/41] 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 f53ceeee3b42fe9aac8f491257d25e3eada64b48 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/41] 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 96989c98eee0c5fdcf844af7ff7e79e9ce489c2b 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/41] 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 6557cc8dfbc2b00f33b4f2c4c947225109f32983 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/41] 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 eb5a3785237a8fee7aacf393899c736269155226 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/41] 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

From cded296525f21eb5372b7b77a2e764b85ab31e16 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 27 Dec 2021 20:19:19 -0300
Subject: [PATCH 20/41] sagemath: fix license and tests

Now tests can be run with -Q (normal) or -K (--long)
---
 srcpkgs/sagemath/template | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index c5009269c7fc..33b40acbabeb 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -16,7 +16,7 @@ depends="giac git FlintQS zn_poly sympow
  "
 short_desc="Open source mathematics software"
 maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
-license="GPL-3.0-or-later"
+license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
 checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
@@ -155,15 +155,17 @@ do_install() {
 }
 
 do_check() {
-	TEST=--all
 	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
-		TEST="$(sed -e 's/#.*//' ${XBPS_DISTDIR}/sagemath-check)"
+		_test_args=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	fi
+	if [ -z "$_test_args" ]; then
+		_test_args=--all
+	fi
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args="--long $_test_args"
 	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} ${OPT} ${TEST}
-	#./sage -t ${OPT} ${TEST}
+	./sage -tp ${XBPS_MAKEJOBS} ${_test_args}
 }
 
 ### copied from sage-deps, to be kept in sync

From 04abd42fe5f5af79aaa7d2efd66e69b1ff9b8136 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 28 Dec 2021 23:08:17 -0300
Subject: [PATCH 21/41] sagemath: fix long time test

---
 .../patches/zzz-fix_long_time_test--see_33091.patch | 13 +++++++++++++
 ...=> zzz-skip_doctest_giac-1.7.0--see_31563.patch} |  0
 2 files changed, 13 insertions(+)
 create mode 100644 srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
 rename srcpkgs/sagemath/patches/{skip-doctest-giac-1.7.0--see-trac-31563.patch => zzz-skip_doctest_giac-1.7.0--see_31563.patch} (100%)

diff --git a/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch b/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
new file mode 100644
index 000000000000..ca360dee9f6e
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage/matrix/matrix2.pyx b/src/sage/matrix/matrix2.pyx
+index 7d319bd54b..c1a2eed6f1 100644
+--- a/src/sage/matrix/matrix2.pyx
++++ b/src/sage/matrix/matrix2.pyx
+@@ -17215,7 +17215,7 @@ cdef class Matrix(Matrix1):
+ 
+             sage: set_random_seed()
+             sage: K = random_cone(max_ambient_dim=5)
+-            sage: all(L.change_ring(SR).is_Z_operator_on(K)
++            sage: all(L.change_ring(SR).is_Z_operator_on(K) # long time
+             ....:     for L in K.Z_operators_gens())  # long time
+             True
+ 
diff --git a/srcpkgs/sagemath/patches/skip-doctest-giac-1.7.0--see-trac-31563.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_31563.patch
similarity index 100%
rename from srcpkgs/sagemath/patches/skip-doctest-giac-1.7.0--see-trac-31563.patch
rename to srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_31563.patch

From 2a108af1e9f9fe23f920a6e674df93f927024843 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 31 Dec 2021 13:52:34 -0300
Subject: [PATCH 22/41] python3-Sphinx: update to 4.3.2.

---
 srcpkgs/python3-Sphinx/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/python3-Sphinx/template b/srcpkgs/python3-Sphinx/template
index 8b0493c1f92c..29f892d16157 100644
--- a/srcpkgs/python3-Sphinx/template
+++ b/srcpkgs/python3-Sphinx/template
@@ -1,6 +1,6 @@
 # Template file for 'python3-Sphinx'
 pkgname=python3-Sphinx
-version=4.2.0
+version=4.3.2
 revision=1
 wrksrc=Sphinx-${version}
 build_style=python3-module
@@ -17,8 +17,9 @@ short_desc="Python 3 documentation generator"
 maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
 license="BSD-3-Clause"
 homepage="http://sphinx-doc.org"
+changelog="https://www.sphinx-doc.org/en/master/changes.html"
 distfiles="${PYPI_SITE}/S/Sphinx/Sphinx-${version}.tar.gz"
-checksum=94078db9184491e15bce0a56d9186e0aec95f16ac20b12d00e06d4e36f1058a6
+checksum=0a8836751a68306b3fe97ecbe44db786f8479c3bf4b80e3a7f5c838657b4698c
 conflicts="python-Sphinx>=0"
 
 post_install() {

From 46a8ba6ff602f5a5a24965fc9857d36c3bcaf7ef Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 28 Dec 2021 23:08:17 -0300
Subject: [PATCH 23/41] sagemath: use system python site-packages

 - patch from #29665 for that
 - patch on top of that to allow a few more python packages:
   gmpy2, sphinx, typing_extensions, ptyprocess
 - add all available python packages to makedepends and depends
 - add ffmpeg and ImageMagick to makedepends
 - in standard check (-Q) warn if individual test > 5.0s
---
 ...184f7498a2046065e669723e68efe2d65cee.patch | 5629 +++++++++++++++++
 .../zzz-dont_run_pytest--see_31924.patch      |   27 +
 .../zzz-more_site_packages_not_in_29665.patch |   42 +
 srcpkgs/sagemath/template                     |   52 +-
 4 files changed, 5747 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch

diff --git a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
new file mode 100644
index 000000000000..b641113927e7
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
@@ -0,0 +1,5629 @@
+From 05fcaabe95082f42ba134780d579390d7b6153e2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 19:30:58 -0400
+Subject: Trac #29665: add --enable-system-site-packages option to ./configure.
+
+This new option is experimental and disabled by default. When it is
+enabled, the string "--system-site-packages" is appended to a new
+environment variable SAGE_VENV_FLAGS that is then passed to the
+sage-venv command during the build using autoconf substitution.
+Thusly the correct setting finds its way into local/pyvenv.cfg.
+---
+ build/make/Makefile.in |  2 +-
+ configure.ac           | 11 +++++++++++
+ 2 files changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/build/make/Makefile.in b/build/make/Makefile.in
+index f870cc3..68627ab 100644
+--- a/build/make/Makefile.in
++++ b/build/make/Makefile.in
+@@ -211,7 +211,7 @@ endif
+ inst_python3_venv = $(SAGE_VENV)/pyvenv.cfg
+ 
+ $(inst_python3_venv):
+-	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv "$(SAGE_VENV)"
++	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv @SAGE_VENV_FLAGS@ "$(SAGE_VENV)"
+ endif
+ 
+ # Build everything and start Sage.
+diff --git a/configure.ac b/configure.ac
+index 351f487..db30a91 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -435,6 +435,17 @@ AC_ARG_ENABLE([download-from-upstream-url],
+   [AS_HELP_STRING([--enable-download-from-upstream-url],
+     [allow downloading packages from their upstream URL if they cannot be found on the Sage mirrors])])
+ 
++AC_ARG_ENABLE(
++  [system-site-packages], [AS_HELP_STRING(
++    [--enable-system-site-packages],
++    [allow sage to use python packages from the system (experimental; default: no)]
++  )], [
++  AS_IF([test "x$enable_system_site_packages" = "xyes"], [
++    SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
++  ])
++])
++AC_SUBST([SAGE_VENV_FLAGS])
++
+ SAGE_SPKG_OPTIONS=""
+ AS_IF([test "x$enable_experimental_packages" = "xyes"], [
+   AS_VAR_APPEND([SAGE_SPKG_OPTIONS], [" -y"])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9372d1f663edf4e89f9c186336815ca04cff59dc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 19:41:14 -0400
+Subject: Trac #29665: new SAGE_PYTHON_PACKAGE_CHECK() autoconf macro.
+
+This new macro encapsulates the check for system installations of
+python packages. It uses setuptools.version's pkg_resources to
+check if the contents of install-requires.txt are satisfied for
+the given package; and if not, tells the build system to install
+the SPKG instead.
+---
+ m4/sage_python_package_check.m4 | 49 +++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 49 insertions(+)
+ create mode 100644 m4/sage_python_package_check.m4
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+new file mode 100644
+index 00000000..77b0a0c
+--- /dev/null
++++ b/m4/sage_python_package_check.m4
+@@ -0,0 +1,49 @@
++#
++# SYNOPSIS
++#
++#   SAGE_PYTHON_PACKAGE_CHECK(package)
++#
++# DESCRIPTION
++#
++#   Determine if the system copy of a python package can be used by sage.
++#
++#   This macro uses setuptools.version's pkg_resources to check that the
++#   "install-requires.txt" file for the named package is satisfied, and
++#   it can typically fail in four ways:
++#
++#     1. If --enable-system-site-packages was not passed to ./configure,
++#
++#     2. If we are not using the system python (no $PYTHON_FOR_VENV),
++#
++#     3. If setuptools is not available to the system python,
++#
++#     4. If the contents of install-requires.txt are not met (wrong
++#        version, no version, etc.) by the system python.
++#
++#   In any of those cases, we set sage_spkg_install_$package to "yes"
++#   so that the corresponding SPKG is installed. Otherwise, we do
++#   nothing, since the default value of sage_spkg_install_$package
++#   is "no" (to use the system copy).
++#
++#   The SAGE_SPKG_CONFIGURE_PYTHON3() macro is AC_REQUIRE'd to ensure
++#   that $PYTHON_FOR_VENV is available, if it is going to be available.
++#
++
++AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
++  AS_IF([test "${enable_system_site_packages}" = "yes"], [
++    AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
++
++    dnl strip all comments from install-requires.txt; this should leave
++    dnl only a single line containing the version specification for this
++    dnl package.
++    SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
++    AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++    AS_IF(
++      ["${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())"],
++      [AC_MSG_RESULT(yes)],
++      [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
++    )
++  ], [
++    sage_spkg_install_$1=yes
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a0dac8ad81ad6369d479bba30d2388de59e5cecb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:21:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for py.
+
+---
+ build/pkgs/py/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/py/spkg-configure.m4
+
+diff --git a/build/pkgs/py/spkg-configure.m4 b/build/pkgs/py/spkg-configure.m4
+new file mode 100644
+index 00000000..ded7034
+--- /dev/null
++++ b/build/pkgs/py/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([py], [SAGE_PYTHON_PACKAGE_CHECK([py])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 87c463a25ab4432dc1fba4f7a9703284e5b8f620 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:24:15 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for wheel.
+
+---
+ build/pkgs/wheel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wheel/spkg-configure.m4
+
+diff --git a/build/pkgs/wheel/spkg-configure.m4 b/build/pkgs/wheel/spkg-configure.m4
+new file mode 100644
+index 00000000..7897ea9
+--- /dev/null
++++ b/build/pkgs/wheel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([wheel], [SAGE_PYTHON_PACKAGE_CHECK([wheel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 804094b3a980f262f4d53d7be8b1be43ac0c55e0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:25:15 -0400
+Subject: Trac #29665: new spkg-configure.m4 for cvxopt.
+
+This includes a SAGE_SPKG_DEPCHECK([gsl glpk suitesparse],... because
+those C dependencies wind up linked into shared libraries like,
+
+  /usr/.../cvxopt/glpk.cpython-39-x86_64-linux-gnu.so
+
+that could potentially conflict with (for example) the glpk SPKG.
+---
+ build/pkgs/cvxopt/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/cvxopt/spkg-configure.m4
+
+diff --git a/build/pkgs/cvxopt/spkg-configure.m4 b/build/pkgs/cvxopt/spkg-configure.m4
+new file mode 100644
+index 00000000..c4aa619
+--- /dev/null
++++ b/build/pkgs/cvxopt/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([cvxopt], [
++  SAGE_SPKG_DEPCHECK([gsl glpk suitesparse], [
++    SAGE_PYTHON_PACKAGE_CHECK([cvxopt])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3f171955ff8d15da2c98aee0d2e254e95a55a2b5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:28:10 -0400
+Subject: Trac #29665: new spkg-configure.m4 for pyzmq.
+
+This includes a SAGE_SPKG_DEPCHECK([zeromq],... because libzmq winds
+up linked into shared libraries like,
+
+  /usr/.../zmq/backend/cython/message.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the zeromq SPKG.
+---
+ build/pkgs/pyzmq/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/pyzmq/spkg-configure.m4
+
+diff --git a/build/pkgs/pyzmq/spkg-configure.m4 b/build/pkgs/pyzmq/spkg-configure.m4
+new file mode 100644
+index 00000000..ae2b126
+--- /dev/null
++++ b/build/pkgs/pyzmq/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([pyzmq], [
++  SAGE_SPKG_DEPCHECK([zeromq], [
++    SAGE_PYTHON_PACKAGE_CHECK([pyzmq])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20d3aa9da9fc98a6e6a47599cd1b6d1d3785a4c4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:31:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for requests.
+
+---
+ build/pkgs/requests/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/requests/spkg-configure.m4
+
+diff --git a/build/pkgs/requests/spkg-configure.m4 b/build/pkgs/requests/spkg-configure.m4
+new file mode 100644
+index 00000000..f50a66c
+--- /dev/null
++++ b/build/pkgs/requests/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([requests], [SAGE_PYTHON_PACKAGE_CHECK([requests])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4df57ee47f2576b6b7bf9265248e06e90616b689 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:13:34 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for six.
+
+---
+ build/pkgs/six/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/six/spkg-configure.m4
+
+diff --git a/build/pkgs/six/spkg-configure.m4 b/build/pkgs/six/spkg-configure.m4
+new file mode 100644
+index 00000000..a382b81
+--- /dev/null
++++ b/build/pkgs/six/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([six], [SAGE_PYTHON_PACKAGE_CHECK([six])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f4462652d02ca729cc6d7cb36ee4d7d662deafb0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:14:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for packaging.
+
+---
+ build/pkgs/packaging/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/packaging/spkg-configure.m4
+
+diff --git a/build/pkgs/packaging/spkg-configure.m4 b/build/pkgs/packaging/spkg-configure.m4
+new file mode 100644
+index 00000000..398f9e1
+--- /dev/null
++++ b/build/pkgs/packaging/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([packaging], [SAGE_PYTHON_PACKAGE_CHECK([packaging])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4d64677fffce48077e4bc3e20ec833c70e6e9b65 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:18:53 -0400
+Subject: Trac #29665: new spkg-configure.m4 for numpy.
+
+This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack
+wind up linked into shared libraries like,
+
+  /usr/.../numpy/linalg/lapack_lite.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the openblas SPKG.
+---
+ build/pkgs/numpy/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/numpy/spkg-configure.m4
+
+diff --git a/build/pkgs/numpy/spkg-configure.m4 b/build/pkgs/numpy/spkg-configure.m4
+new file mode 100644
+index 00000000..16f9a90
+--- /dev/null
++++ b/build/pkgs/numpy/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([numpy], [
++  SAGE_SPKG_DEPCHECK([openblas], [
++   SAGE_PYTHON_PACKAGE_CHECK([numpy])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 85dfe5bb32f3c470966b477bae68a921e846d11f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:58:48 -0400
+Subject: Trac #29665: new spkg-configure.m4 for scipy.
+
+This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack
+wind up linked into shared libraries like,
+
+  /usr/.../scipy/linalg/_flinalg.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the openblas SPKG.
+---
+ build/pkgs/scipy/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/scipy/spkg-configure.m4
+
+diff --git a/build/pkgs/scipy/spkg-configure.m4 b/build/pkgs/scipy/spkg-configure.m4
+new file mode 100644
+index 00000000..0b7294a
+--- /dev/null
++++ b/build/pkgs/scipy/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([scipy], [
++  SAGE_SPKG_DEPCHECK([openblas], [
++    SAGE_PYTHON_PACKAGE_CHECK([scipy])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5616f1491036fda95f4d3e840c8c8b531c97323b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 07:19:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pluggy.
+
+---
+ build/pkgs/pluggy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pluggy/spkg-configure.m4
+
+diff --git a/build/pkgs/pluggy/spkg-configure.m4 b/build/pkgs/pluggy/spkg-configure.m4
+new file mode 100644
+index 00000000..11b1fce
+--- /dev/null
++++ b/build/pkgs/pluggy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pluggy], [SAGE_PYTHON_PACKAGE_CHECK([pluggy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6bceae3d356878cfe5fce40c9998dead003a3844 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 07:24:12 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pickleshare.
+
+---
+ build/pkgs/pickleshare/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pickleshare/spkg-configure.m4
+
+diff --git a/build/pkgs/pickleshare/spkg-configure.m4 b/build/pkgs/pickleshare/spkg-configure.m4
+new file mode 100644
+index 00000000..80e9b7c
+--- /dev/null
++++ b/build/pkgs/pickleshare/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pickleshare], [SAGE_PYTHON_PACKAGE_CHECK([pickleshare])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From da2ab534f4a256c82ed4f1c5f0f5c320529b5e9f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 08:53:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for html5lib.
+
+---
+ build/pkgs/html5lib/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/html5lib/spkg-configure.m4
+
+diff --git a/build/pkgs/html5lib/spkg-configure.m4 b/build/pkgs/html5lib/spkg-configure.m4
+new file mode 100644
+index 00000000..f421b7e
+--- /dev/null
++++ b/build/pkgs/html5lib/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([html5lib], [SAGE_PYTHON_PACKAGE_CHECK([html5lib])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5e464134afdf6055b7b5804208f759561c5435cd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 18:30:47 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for networkx.
+
+---
+ build/pkgs/networkx/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/networkx/spkg-configure.m4
+
+diff --git a/build/pkgs/networkx/spkg-configure.m4 b/build/pkgs/networkx/spkg-configure.m4
+new file mode 100644
+index 00000000..926671e
+--- /dev/null
++++ b/build/pkgs/networkx/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([networkx], [SAGE_PYTHON_PACKAGE_CHECK([networkx])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c4d40770cd9c7fda811e31759a5f4aedc320f3f9 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:33:24 -0400
+Subject: Trac #29665: new spkg-configure.m4 for matplotlib.
+
+This includes a SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull],...
+because those dependencies wind up linked into shared libraries like,
+
+  /usr/lib/.../matplotlib/ft2font.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with their SPKG counterparts.
+---
+ build/pkgs/matplotlib/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/matplotlib/spkg-configure.m4
+
+diff --git a/build/pkgs/matplotlib/spkg-configure.m4 b/build/pkgs/matplotlib/spkg-configure.m4
+new file mode 100644
+index 00000000..39c2d29
+--- /dev/null
++++ b/build/pkgs/matplotlib/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([matplotlib], [
++  SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull], [
++    SAGE_PYTHON_PACKAGE_CHECK([matplotlib])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7834dc3ac349201af632f89a9de7cd1967931010 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:35:00 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for bleach.
+
+---
+ build/pkgs/bleach/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/bleach/spkg-configure.m4
+
+diff --git a/build/pkgs/bleach/spkg-configure.m4 b/build/pkgs/bleach/spkg-configure.m4
+new file mode 100644
+index 00000000..3c9bb26
+--- /dev/null
++++ b/build/pkgs/bleach/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([bleach], [SAGE_PYTHON_PACKAGE_CHECK([bleach])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 84cad343287a2c69a4a21b9fa3b92301ff88645b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:37:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for decorator.
+
+---
+ build/pkgs/decorator/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/decorator/spkg-configure.m4
+
+diff --git a/build/pkgs/decorator/spkg-configure.m4 b/build/pkgs/decorator/spkg-configure.m4
+new file mode 100644
+index 00000000..e062778
+--- /dev/null
++++ b/build/pkgs/decorator/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([decorator], [SAGE_PYTHON_PACKAGE_CHECK([decorator])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 25693212572e69d452bc95c923ada13744359eb7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:38:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for idna.
+
+---
+ build/pkgs/idna/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/idna/spkg-configure.m4
+
+diff --git a/build/pkgs/idna/spkg-configure.m4 b/build/pkgs/idna/spkg-configure.m4
+new file mode 100644
+index 00000000..9d363f2
+--- /dev/null
++++ b/build/pkgs/idna/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([idna], [SAGE_PYTHON_PACKAGE_CHECK([idna])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6d5616472f6cdc6cf496bba6fe07bd4ef44dfdaf Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:39:23 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for certifi.
+
+---
+ build/pkgs/certifi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/certifi/spkg-configure.m4
+
+diff --git a/build/pkgs/certifi/spkg-configure.m4 b/build/pkgs/certifi/spkg-configure.m4
+new file mode 100644
+index 00000000..ddd4061
+--- /dev/null
++++ b/build/pkgs/certifi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([certifi], [SAGE_PYTHON_PACKAGE_CHECK([certifi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9412a07023b275e29e8d1af9b8ee3e767042e7fd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:40:59 -0400
+Subject: Trac #29665: new spkg-configure.m4 for pillow.
+
+This includes an SAGE_SPKG_DEPCHECK([bzip2 freetype libpng zlib],...
+because those dependencies wind up linked into shared libraries like,
+
+  /usr/.../PIL/_imagingft.cpython-39-x86_64-linux-gnu.so
+
+and potentially conflict with their SPKG counterparts.
+---
+ build/pkgs/pillow/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/pillow/spkg-configure.m4
+
+diff --git a/build/pkgs/pillow/spkg-configure.m4 b/build/pkgs/pillow/spkg-configure.m4
+new file mode 100644
+index 00000000..f2e68e2
+--- /dev/null
++++ b/build/pkgs/pillow/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([pillow], [
++  SAGE_SPKG_DEPCHECK([bzip2 freetype libpng zlib], [
++    SAGE_PYTHON_PACKAGE_CHECK([pillow])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From eede914311481fdb75b363b7a799075e876a2b4f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:44:13 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for mpmath.
+
+---
+ build/pkgs/mpmath/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mpmath/spkg-configure.m4
+
+diff --git a/build/pkgs/mpmath/spkg-configure.m4 b/build/pkgs/mpmath/spkg-configure.m4
+new file mode 100644
+index 00000000..f43c838
+--- /dev/null
++++ b/build/pkgs/mpmath/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([mpmath], [SAGE_PYTHON_PACKAGE_CHECK([mpmath])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 363a825885832c0b580ff53fe61f5c79e70c4728 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:44:56 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for sympy.
+
+---
+ build/pkgs/sympy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sympy/spkg-configure.m4
+
+diff --git a/build/pkgs/sympy/spkg-configure.m4 b/build/pkgs/sympy/spkg-configure.m4
+new file mode 100644
+index 00000000..fa0f1f5
+--- /dev/null
++++ b/build/pkgs/sympy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([sympy], [SAGE_PYTHON_PACKAGE_CHECK([sympy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0667964c914e4a01dda697190a054ff96cea92d6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:47:06 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pygments.
+
+---
+ build/pkgs/pygments/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pygments/spkg-configure.m4
+
+diff --git a/build/pkgs/pygments/spkg-configure.m4 b/build/pkgs/pygments/spkg-configure.m4
+new file mode 100644
+index 00000000..99f29e3
+--- /dev/null
++++ b/build/pkgs/pygments/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pygments], [SAGE_PYTHON_PACKAGE_CHECK([pygments])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f787c233aa05d8e90f7c6ad18f76bd2fa36bfbfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:48:50 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for jinja2.
+
+---
+ build/pkgs/jinja2/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jinja2/spkg-configure.m4
+
+diff --git a/build/pkgs/jinja2/spkg-configure.m4 b/build/pkgs/jinja2/spkg-configure.m4
+new file mode 100644
+index 00000000..0970d1c
+--- /dev/null
++++ b/build/pkgs/jinja2/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jinja2], [SAGE_PYTHON_PACKAGE_CHECK([jinja2])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 309d8f8e2b7078b5efbbe824b69ec1d9b1e639f0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:43:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pandocfilters.
+
+---
+ build/pkgs/pandocfilters/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/pandocfilters/spkg-configure.m4
+
+diff --git a/build/pkgs/pandocfilters/spkg-configure.m4 b/build/pkgs/pandocfilters/spkg-configure.m4
+new file mode 100644
+index 00000000..3e9537f
+--- /dev/null
++++ b/build/pkgs/pandocfilters/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([pandocfilters], [
++  SAGE_PYTHON_PACKAGE_CHECK([pandocfilters])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f57bfda49777a6ba1cd123553acd75dc347c5521 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:44:46 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for webencodings.
+
+---
+ build/pkgs/webencodings/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/webencodings/spkg-configure.m4
+
+diff --git a/build/pkgs/webencodings/spkg-configure.m4 b/build/pkgs/webencodings/spkg-configure.m4
+new file mode 100644
+index 00000000..1b9a5c4
+--- /dev/null
++++ b/build/pkgs/webencodings/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([webencodings], [
++  SAGE_PYTHON_PACKAGE_CHECK([webencodings])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7f193a62d7a2ea0b6a3ca6beb12390d91c25bbfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:48:26 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pytz.
+
+---
+ build/pkgs/pytz/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pytz/spkg-configure.m4
+
+diff --git a/build/pkgs/pytz/spkg-configure.m4 b/build/pkgs/pytz/spkg-configure.m4
+new file mode 100644
+index 00000000..366521b
+--- /dev/null
++++ b/build/pkgs/pytz/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pytz], [SAGE_PYTHON_PACKAGE_CHECK([pytz])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bfd3fdd887c3465c03465248de4997eed4a82915 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:51:16 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for texttable.
+
+---
+ build/pkgs/texttable/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/texttable/spkg-configure.m4
+
+diff --git a/build/pkgs/texttable/spkg-configure.m4 b/build/pkgs/texttable/spkg-configure.m4
+new file mode 100644
+index 00000000..42a3de1
+--- /dev/null
++++ b/build/pkgs/texttable/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([texttable], [SAGE_PYTHON_PACKAGE_CHECK([texttable])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 914bf0cc57abc46129b27c1525782dbe16da31a2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:53:41 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for babel.
+
+---
+ build/pkgs/babel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/babel/spkg-configure.m4
+
+diff --git a/build/pkgs/babel/spkg-configure.m4 b/build/pkgs/babel/spkg-configure.m4
+new file mode 100644
+index 00000000..d7b9a71
+--- /dev/null
++++ b/build/pkgs/babel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([babel], [SAGE_PYTHON_PACKAGE_CHECK([babel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 56977abd1eafbc87c765a2892cfe525382648259 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 14 Oct 2021 08:06:59 -0400
+Subject: Trac #29665: force system python3 with --enable-system-site-packages.
+
+When the python SPKG is used, the --enable-system-site-packages flag
+will essentially do nothing, and that may confuse users who have
+wasted a few hours building sage. (Generally, they will want to fix
+detection of their system python3 first.)
+
+To forestall that, we now set "--with-system-python3=force" whenever
+the "--enable-system-site-packages" flag is passed.
+---
+ configure.ac | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index db30a91..6fafb83 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -438,10 +438,19 @@ AC_ARG_ENABLE([download-from-upstream-url],
+ AC_ARG_ENABLE(
+   [system-site-packages], [AS_HELP_STRING(
+     [--enable-system-site-packages],
+-    [allow sage to use python packages from the system (experimental; default: no)]
++    [allow the use of python packages from the system (experimental; default: no)]
+   )], [
+   AS_IF([test "x$enable_system_site_packages" = "xyes"], [
+     SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
++
++    dnl We want to raise an error if the user asked for "system site
++    dnl packages" but the system python will not be used. Technically
++    dnl that causes no problems (SAGE_PYTHON_PACKAGE_CHECK always fails,
++    dnl so SPKGs are used for all python packages), but it may be confusing
++    dnl to end users who expect the flag to actually give them access to
++    dnl their system python packages and who may not be paying close
++    dnl attention to their ./configure output.
++    with_system_python3="force"
+   ])
+ ])
+ AC_SUBST([SAGE_VENV_FLAGS])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 02b369fd24ef7cf8997082e7850b9cf022cae34b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 01:18:35 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for setuptools.
+
+---
+ build/pkgs/setuptools/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/setuptools/spkg-configure.m4
+
+diff --git a/build/pkgs/setuptools/spkg-configure.m4 b/build/pkgs/setuptools/spkg-configure.m4
+new file mode 100644
+index 00000000..a2ad811
+--- /dev/null
++++ b/build/pkgs/setuptools/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([setuptools], [SAGE_PYTHON_PACKAGE_CHECK([setuptools])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 05117317d38693978efaf36e81d8b02bae44b257 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 01:15:48 -0400
+Subject: Trac #29665: poison PYTHONUSERBASE when testing for "system"
+ packages.
+
+When we're detecting system installations of python packages, we want
+to hide anything that was installed with e.g. "pip install --user". To
+accomplish that, we mimic the PYTHONUSERBASE poisoning from sage-env
+within the SAGE_PYTHON_PACKAGE_CHECK() macro.
+---
+ m4/sage_python_package_check.m4 | 18 +++++++++++++++++-
+ 1 file changed, 17 insertions(+), 1 deletion(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 77b0a0c..b8cdba4 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -38,11 +38,27 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     dnl package.
+     SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
+     AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++
++    dnl To prevent user-site (pip install --user) packages from being
++    dnl detected as "system" packages, we poison PYTHONUSERBASE. The
++    dnl sage-env script also does this at runtime; we mimic that
++    dnl implementation to ensure that the behaviors at ./configure and
++    dnl runtime are identical. Beware that (as in sage-env) the poisoning
++    dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
++    dnl user points PYTHONUSERBASE to any path (even the default), then
++    dnl his local pip packages will be detected.
++    PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
++    AS_IF([test -z "${PYTHONUSERBASE}"], [
++      PYTHONUSERBASE="${HOME}/.sage/local"
++    ])
++
+     AS_IF(
+-      ["${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())"],
++      [PYTHONUSERBASE="${PYTHONUSERBASE}" "${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" 2>/dev/null],
+       [AC_MSG_RESULT(yes)],
+       [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+     )
++
++    PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d75c1492f63a584b5ec5f424ddd7f7c4a6d502d3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:20:04 -0400
+Subject: Trac #29665: run SAGE_PYTHON_PACKAGE_CHECK() inside a venv.
+
+To recreate the runtime environment as closely as possible, we now use
+a venv (with system site packages enabled) when checking for system
+copies of python packages.
+---
+ m4/sage_python_package_check.m4 | 76 +++++++++++++++++++++++++++--------------
+ 1 file changed, 51 insertions(+), 25 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index b8cdba4..7cbd6c0 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -15,9 +15,11 @@
+ #
+ #     2. If we are not using the system python (no $PYTHON_FOR_VENV),
+ #
+-#     3. If setuptools is not available to the system python,
++#     3. If we are unable to create a venv with the system python,
+ #
+-#     4. If the contents of install-requires.txt are not met (wrong
++#     4. If setuptools is not available to the system python,
++#
++#     5. If the contents of install-requires.txt are not met (wrong
+ #        version, no version, etc.) by the system python.
+ #
+ #   In any of those cases, we set sage_spkg_install_$package to "yes"
+@@ -27,38 +29,62 @@
+ #
+ #   The SAGE_SPKG_CONFIGURE_PYTHON3() macro is AC_REQUIRE'd to ensure
+ #   that $PYTHON_FOR_VENV is available, if it is going to be available.
++#   The check is run inside a new venv, and with the PYTHONUSERBASE
++#   variable poisoned in the same manner as sage-env poisons it, to
++#   ensure that the ./configure- and run-time views of the system
++#   are as similar as possible.
+ #
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
+     AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
+ 
+-    dnl strip all comments from install-requires.txt; this should leave
+-    dnl only a single line containing the version specification for this
+-    dnl package.
+-    SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
+-    AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++    dnl We run this check inside a python venv, because that's ultimately
++    dnl how the system $PYTHON_FOR_VENV will be used.
++    AC_MSG_CHECKING([if we can create a python venv in config.venv])
+ 
+-    dnl To prevent user-site (pip install --user) packages from being
+-    dnl detected as "system" packages, we poison PYTHONUSERBASE. The
+-    dnl sage-env script also does this at runtime; we mimic that
+-    dnl implementation to ensure that the behaviors at ./configure and
+-    dnl runtime are identical. Beware that (as in sage-env) the poisoning
+-    dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
+-    dnl user points PYTHONUSERBASE to any path (even the default), then
+-    dnl his local pip packages will be detected.
+-    PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
+-    AS_IF([test -z "${PYTHONUSERBASE}"], [
+-      PYTHONUSERBASE="${HOME}/.sage/local"
+-    ])
++    dnl Use --clear because ./configure typically clobbers its output files.
++    AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
++                                        --clear                dnl
++                                        --without-pip          dnl
++					config.venv], [
++      AC_MSG_RESULT(yes)
++      dnl strip all comments from install-requires.txt; this should leave
++      dnl only a single line containing the version specification for this
++      dnl package.
++      SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
++      AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++
++      dnl To prevent user-site (pip install --user) packages from being
++      dnl detected as "system" packages, we poison PYTHONUSERBASE. The
++      dnl sage-env script also does this at runtime; we mimic that
++      dnl implementation to ensure that the behaviors at ./configure and
++      dnl runtime are identical. Beware that (as in sage-env) the poisoning
++      dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
++      dnl user points PYTHONUSERBASE to any path (even the default), then
++      dnl his local pip packages will be detected.
++      PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
++      AS_IF([test -z "${PYTHONUSERBASE}"], [
++        PYTHONUSERBASE="${HOME}/.sage/local"
++      ])
+ 
+-    AS_IF(
+-      [PYTHONUSERBASE="${PYTHONUSERBASE}" "${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" 2>/dev/null],
+-      [AC_MSG_RESULT(yes)],
+-      [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+-    )
++      AS_IF(
++        [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
++           "from setuptools.version import pkg_resources;              dnl
++            pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" dnl
++	 2>/dev/null],
++        [AC_MSG_RESULT(yes)],
++        [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
++      )
++
++      PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
++    ], [
++      dnl failed to create a venv for some reason
++      AC_MSG_RESULT(no)
++      sage_spkg_install_$1=yes
++    ])
+ 
+-    PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
++    rm -rf config.venv
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 87646c3264a04ffd98a12d67074f93e1943a1e96 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:38:08 -0400
+Subject: Trac #29665: log SAGE_PYTHON_PACKAGE_CHECK() failures to config.log.
+
+---
+ m4/sage_python_package_check.m4 | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 7cbd6c0..e0e0b9f 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -47,7 +47,8 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
+                                         --clear                dnl
+                                         --without-pip          dnl
+-					config.venv], [
++                                        config.venv            dnl
++                                        2>&AS_MESSAGE_LOG_FD], [
+       AC_MSG_RESULT(yes)
+       dnl strip all comments from install-requires.txt; this should leave
+       dnl only a single line containing the version specification for this
+@@ -72,7 +73,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+         [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
+            "from setuptools.version import pkg_resources;              dnl
+             pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" dnl
+-	 2>/dev/null],
++	 2>&AS_MESSAGE_LOG_FD],
+         [AC_MSG_RESULT(yes)],
+         [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+       )
+-- 
+cgit v1.0-1-gd88e
+
+
+From f7dfffd1c64816e2ae4e0f420b22065c5c5bf2cb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:45:37 -0400
+Subject: Trac #29665: don't clobber a plain file named config.venv.
+
+When SAGE_PYTHON_PACKAGE_CHECK() is cleaning up, we no longer remove
+"config.venv" unconditionally. Instead, we remove it only if it is a
+directory. This is also how "pyvenv --clear" works.
+---
+ m4/sage_python_package_check.m4 | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index e0e0b9f..127a078 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -85,7 +85,9 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+       sage_spkg_install_$1=yes
+     ])
+ 
+-    rm -rf config.venv
++    dnl Clean up config.venv, but only if we could have created it.
++    dnl (The --clear flag to pyvenv will not clobber a plain file.)
++    AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9849c77313b895dcfb786d2ea54e36585bd31ce2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 16 Oct 2021 08:14:42 -0400
+Subject: Trac #29665: don't announce system python packages that won't be
+ used.
+
+When --enable-system-site-packages was not given, the python packages
+using SAGE_PYTHON_PACKAGE_CHECK() in spkg-configure.m4 cannot be used.
+Rather than suggest that users install them anyway, that macro now
+hacks the value of sage_use_system_$package to be "no" when the use
+of system site packages is disabled at the python level.
+---
+ m4/sage_python_package_check.m4 | 17 +++++++++++++++++
+ 1 file changed, 17 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 127a078..7ee82a7 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -89,6 +89,23 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     dnl (The --clear flag to pyvenv will not clobber a plain file.)
+     AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
++    dnl System site packages are disabled.
+     sage_spkg_install_$1=yes
++
++    dnl We have to retroactively hack the --with-system-foo={no,yes,force}
++    dnl mechanism here because it wasn't designed with the ability to
++    dnl disable arbitrary chunks of system packages in mind. The easy cases
++    dnl are "no" and "force" which require no action; "no" means we won't
++    dnl suggest the package anyway, and "force" will raise an error when
++    dnl the system-package check fails.
++    dnl
++    dnl The default of "yes" is more troubling because it is the default. To
++    dnl avoid prompting users to install packages that won't be used, we want
++    dnl to ignore "yes" when reporting the "hint: install these packages..."
++    dnl at the end of ./configure. To accomplish that, we change "yes" to
++    dnl "no" here, essentially changing the default for packages using this
++    dnl macro when --enable-system-site-packages is disabled. Packages with
++    dnl "no" are not suggested to the user.
++    AS_IF([test "${sage_use_system_$1}" = "yes"],[sage_use_system_$1=no])
+   ])
+ ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3e6ad737b94aaac234d615ecaf1a2455eb607f1a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 17 Oct 2021 06:16:21 -0400
+Subject: Trac #29665: add Gentoo package information for python packages.
+
+---
+ build/pkgs/babel/distros/gentoo.txt         | 1 +
+ build/pkgs/bleach/distros/gentoo.txt        | 1 +
+ build/pkgs/certifi/distros/gentoo.txt       | 1 +
+ build/pkgs/cvxopt/distros/gentoo.txt        | 1 +
+ build/pkgs/decorator/distros/gentoo.txt     | 1 +
+ build/pkgs/html5lib/distros/gentoo.txt      | 1 +
+ build/pkgs/idna/distros/gentoo.txt          | 1 +
+ build/pkgs/jinja2/distros/gentoo.txt        | 1 +
+ build/pkgs/matplotlib/distros/gentoo.txt    | 1 +
+ build/pkgs/mpmath/distros/gentoo.txt        | 1 +
+ build/pkgs/networkx/distros/gentoo.txt      | 1 +
+ build/pkgs/numpy/distros/gentoo.txt         | 1 +
+ build/pkgs/packaging/distros/gentoo.txt     | 1 +
+ build/pkgs/pandocfilters/distros/gentoo.txt | 1 +
+ build/pkgs/pickleshare/distros/gentoo.txt   | 1 +
+ build/pkgs/pillow/distros/gentoo.txt        | 1 +
+ build/pkgs/pluggy/distros/gentoo.txt        | 1 +
+ build/pkgs/pygments/distros/gentoo.txt      | 1 +
+ build/pkgs/pytz/distros/gentoo.txt          | 1 +
+ build/pkgs/pyzmq/distros/gentoo.txt         | 1 +
+ build/pkgs/requests/distros/gentoo.txt      | 1 +
+ build/pkgs/scipy/distros/gentoo.txt         | 1 +
+ build/pkgs/setuptools/distros/gentoo.txt    | 1 +
+ build/pkgs/six/distros/gentoo.txt           | 1 +
+ build/pkgs/sympy/distros/gentoo.txt         | 1 +
+ build/pkgs/texttable/distros/gentoo.txt     | 1 +
+ build/pkgs/toml/distros/gentoo.txt          | 1 +
+ build/pkgs/webencodings/distros/gentoo.txt  | 1 +
+ 28 files changed, 28 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/gentoo.txt
+ create mode 100644 build/pkgs/bleach/distros/gentoo.txt
+ create mode 100644 build/pkgs/certifi/distros/gentoo.txt
+ create mode 100644 build/pkgs/cvxopt/distros/gentoo.txt
+ create mode 100644 build/pkgs/decorator/distros/gentoo.txt
+ create mode 100644 build/pkgs/html5lib/distros/gentoo.txt
+ create mode 100644 build/pkgs/idna/distros/gentoo.txt
+ create mode 100644 build/pkgs/jinja2/distros/gentoo.txt
+ create mode 100644 build/pkgs/matplotlib/distros/gentoo.txt
+ create mode 100644 build/pkgs/mpmath/distros/gentoo.txt
+ create mode 100644 build/pkgs/networkx/distros/gentoo.txt
+ create mode 100644 build/pkgs/numpy/distros/gentoo.txt
+ create mode 100644 build/pkgs/packaging/distros/gentoo.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/gentoo.txt
+ create mode 100644 build/pkgs/pickleshare/distros/gentoo.txt
+ create mode 100644 build/pkgs/pillow/distros/gentoo.txt
+ create mode 100644 build/pkgs/pluggy/distros/gentoo.txt
+ create mode 100644 build/pkgs/pygments/distros/gentoo.txt
+ create mode 100644 build/pkgs/pytz/distros/gentoo.txt
+ create mode 100644 build/pkgs/pyzmq/distros/gentoo.txt
+ create mode 100644 build/pkgs/requests/distros/gentoo.txt
+ create mode 100644 build/pkgs/scipy/distros/gentoo.txt
+ create mode 100644 build/pkgs/setuptools/distros/gentoo.txt
+ create mode 100644 build/pkgs/six/distros/gentoo.txt
+ create mode 100644 build/pkgs/sympy/distros/gentoo.txt
+ create mode 100644 build/pkgs/texttable/distros/gentoo.txt
+ create mode 100644 build/pkgs/toml/distros/gentoo.txt
+ create mode 100644 build/pkgs/webencodings/distros/gentoo.txt
+
+diff --git a/build/pkgs/babel/distros/gentoo.txt b/build/pkgs/babel/distros/gentoo.txt
+new file mode 100644
+index 00000000..2d2c34f
+--- /dev/null
++++ b/build/pkgs/babel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/Babel
+diff --git a/build/pkgs/bleach/distros/gentoo.txt b/build/pkgs/bleach/distros/gentoo.txt
+new file mode 100644
+index 00000000..b4f9744
+--- /dev/null
++++ b/build/pkgs/bleach/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/bleach
+diff --git a/build/pkgs/certifi/distros/gentoo.txt b/build/pkgs/certifi/distros/gentoo.txt
+new file mode 100644
+index 00000000..72e2e91
+--- /dev/null
++++ b/build/pkgs/certifi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/certifi
+diff --git a/build/pkgs/cvxopt/distros/gentoo.txt b/build/pkgs/cvxopt/distros/gentoo.txt
+new file mode 100644
+index 00000000..b312391
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/cvxopt
+diff --git a/build/pkgs/decorator/distros/gentoo.txt b/build/pkgs/decorator/distros/gentoo.txt
+new file mode 100644
+index 00000000..fea5a67
+--- /dev/null
++++ b/build/pkgs/decorator/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/decorator
+diff --git a/build/pkgs/html5lib/distros/gentoo.txt b/build/pkgs/html5lib/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c2be76
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/html5lib
+diff --git a/build/pkgs/idna/distros/gentoo.txt b/build/pkgs/idna/distros/gentoo.txt
+new file mode 100644
+index 00000000..68ef51c
+--- /dev/null
++++ b/build/pkgs/idna/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/idna
+diff --git a/build/pkgs/jinja2/distros/gentoo.txt b/build/pkgs/jinja2/distros/gentoo.txt
+new file mode 100644
+index 00000000..15a27ae
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jinja
+diff --git a/build/pkgs/matplotlib/distros/gentoo.txt b/build/pkgs/matplotlib/distros/gentoo.txt
+new file mode 100644
+index 00000000..bcfefb5
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/matplotlib
+diff --git a/build/pkgs/mpmath/distros/gentoo.txt b/build/pkgs/mpmath/distros/gentoo.txt
+new file mode 100644
+index 00000000..946c62d
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/mpmath
+diff --git a/build/pkgs/networkx/distros/gentoo.txt b/build/pkgs/networkx/distros/gentoo.txt
+new file mode 100644
+index 00000000..dd97742
+--- /dev/null
++++ b/build/pkgs/networkx/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/networkx
+diff --git a/build/pkgs/numpy/distros/gentoo.txt b/build/pkgs/numpy/distros/gentoo.txt
+new file mode 100644
+index 00000000..d2179d4
+--- /dev/null
++++ b/build/pkgs/numpy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/numpy
+diff --git a/build/pkgs/packaging/distros/gentoo.txt b/build/pkgs/packaging/distros/gentoo.txt
+new file mode 100644
+index 00000000..e5309ed
+--- /dev/null
++++ b/build/pkgs/packaging/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/packaging
+diff --git a/build/pkgs/pandocfilters/distros/gentoo.txt b/build/pkgs/pandocfilters/distros/gentoo.txt
+new file mode 100644
+index 00000000..a726fda
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/gentoo.txt b/build/pkgs/pickleshare/distros/gentoo.txt
+new file mode 100644
+index 00000000..14fad0f
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pickleshare
+diff --git a/build/pkgs/pillow/distros/gentoo.txt b/build/pkgs/pillow/distros/gentoo.txt
+new file mode 100644
+index 00000000..1243649
+--- /dev/null
++++ b/build/pkgs/pillow/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pillow
+diff --git a/build/pkgs/pluggy/distros/gentoo.txt b/build/pkgs/pluggy/distros/gentoo.txt
+new file mode 100644
+index 00000000..7b33876
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pluggy
+diff --git a/build/pkgs/pygments/distros/gentoo.txt b/build/pkgs/pygments/distros/gentoo.txt
+new file mode 100644
+index 00000000..a584f32
+--- /dev/null
++++ b/build/pkgs/pygments/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pygments
+diff --git a/build/pkgs/pytz/distros/gentoo.txt b/build/pkgs/pytz/distros/gentoo.txt
+new file mode 100644
+index 00000000..902a18b
+--- /dev/null
++++ b/build/pkgs/pytz/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pytz
+diff --git a/build/pkgs/pyzmq/distros/gentoo.txt b/build/pkgs/pyzmq/distros/gentoo.txt
+new file mode 100644
+index 00000000..77c2429
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyzmq
+diff --git a/build/pkgs/requests/distros/gentoo.txt b/build/pkgs/requests/distros/gentoo.txt
+new file mode 100644
+index 00000000..d3dc941
+--- /dev/null
++++ b/build/pkgs/requests/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/requests
+diff --git a/build/pkgs/scipy/distros/gentoo.txt b/build/pkgs/scipy/distros/gentoo.txt
+new file mode 100644
+index 00000000..11dabd2
+--- /dev/null
++++ b/build/pkgs/scipy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/scipy
+diff --git a/build/pkgs/setuptools/distros/gentoo.txt b/build/pkgs/setuptools/distros/gentoo.txt
+new file mode 100644
+index 00000000..3a4fa34
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/setuptools
+diff --git a/build/pkgs/six/distros/gentoo.txt b/build/pkgs/six/distros/gentoo.txt
+new file mode 100644
+index 00000000..f73f648
+--- /dev/null
++++ b/build/pkgs/six/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/six
+diff --git a/build/pkgs/sympy/distros/gentoo.txt b/build/pkgs/sympy/distros/gentoo.txt
+new file mode 100644
+index 00000000..b5a5034
+--- /dev/null
++++ b/build/pkgs/sympy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sympy
+diff --git a/build/pkgs/texttable/distros/gentoo.txt b/build/pkgs/texttable/distros/gentoo.txt
+new file mode 100644
+index 00000000..b33a7a7
+--- /dev/null
++++ b/build/pkgs/texttable/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/texttable
+diff --git a/build/pkgs/toml/distros/gentoo.txt b/build/pkgs/toml/distros/gentoo.txt
+new file mode 100644
+index 00000000..64fcea3
+--- /dev/null
++++ b/build/pkgs/toml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/toml
+diff --git a/build/pkgs/webencodings/distros/gentoo.txt b/build/pkgs/webencodings/distros/gentoo.txt
+new file mode 100644
+index 00000000..7539b0f
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/webencodings
+-- 
+cgit v1.0-1-gd88e
+
+
+From 088380f884124c9608160b613ba031c5f023f604 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 18:43:04 -0700
+Subject: build/pkgs: Add distros/fedora.txt for Python packages
+
+---
+ build/pkgs/babel/distros/fedora.txt         | 1 +
+ build/pkgs/bleach/distros/fedora.txt        | 1 +
+ build/pkgs/certifi/distros/fedora.txt       | 1 +
+ build/pkgs/cvxopt/distros/fedora.txt        | 1 +
+ build/pkgs/decorator/distros/fedora.txt     | 1 +
+ build/pkgs/html5lib/distros/fedora.txt      | 1 +
+ build/pkgs/idna/distros/fedora.txt          | 1 +
+ build/pkgs/jinja2/distros/fedora.txt        | 1 +
+ build/pkgs/matplotlib/distros/fedora.txt    | 1 +
+ build/pkgs/mpmath/distros/fedora.txt        | 1 +
+ build/pkgs/networkx/distros/fedora.txt      | 1 +
+ build/pkgs/numpy/distros/fedora.txt         | 1 +
+ build/pkgs/packaging/distros/fedora.txt     | 1 +
+ build/pkgs/pandocfilters/distros/fedora.txt | 1 +
+ build/pkgs/pickleshare/distros/fedora.txt   | 1 +
+ build/pkgs/pillow/distros/fedora.txt        | 1 +
+ build/pkgs/pluggy/distros/fedora.txt        | 1 +
+ build/pkgs/py/distros/fedora.txt            | 1 +
+ build/pkgs/pygments/distros/fedora.txt      | 1 +
+ build/pkgs/pytz/distros/fedora.txt          | 1 +
+ build/pkgs/pyzmq/distros/fedora.txt         | 1 +
+ build/pkgs/requests/distros/fedora.txt      | 1 +
+ build/pkgs/scipy/distros/fedora.txt         | 1 +
+ build/pkgs/setuptools/distros/fedora.txt    | 1 +
+ build/pkgs/six/distros/fedora.txt           | 1 +
+ build/pkgs/sympy/distros/fedora.txt         | 1 +
+ build/pkgs/texttable/distros/fedora.txt     | 1 +
+ build/pkgs/toml/distros/fedora.txt          | 1 +
+ build/pkgs/webencodings/distros/fedora.txt  | 1 +
+ build/pkgs/wheel/distros/fedora.txt         | 1 +
+ 30 files changed, 30 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/fedora.txt
+ create mode 100644 build/pkgs/bleach/distros/fedora.txt
+ create mode 100644 build/pkgs/certifi/distros/fedora.txt
+ create mode 100644 build/pkgs/cvxopt/distros/fedora.txt
+ create mode 100644 build/pkgs/decorator/distros/fedora.txt
+ create mode 100644 build/pkgs/html5lib/distros/fedora.txt
+ create mode 100644 build/pkgs/idna/distros/fedora.txt
+ create mode 100644 build/pkgs/jinja2/distros/fedora.txt
+ create mode 100644 build/pkgs/matplotlib/distros/fedora.txt
+ create mode 100644 build/pkgs/mpmath/distros/fedora.txt
+ create mode 100644 build/pkgs/networkx/distros/fedora.txt
+ create mode 100644 build/pkgs/numpy/distros/fedora.txt
+ create mode 100644 build/pkgs/packaging/distros/fedora.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/fedora.txt
+ create mode 100644 build/pkgs/pickleshare/distros/fedora.txt
+ create mode 100644 build/pkgs/pillow/distros/fedora.txt
+ create mode 100644 build/pkgs/pluggy/distros/fedora.txt
+ create mode 100644 build/pkgs/py/distros/fedora.txt
+ create mode 100644 build/pkgs/pygments/distros/fedora.txt
+ create mode 100644 build/pkgs/pytz/distros/fedora.txt
+ create mode 100644 build/pkgs/pyzmq/distros/fedora.txt
+ create mode 100644 build/pkgs/requests/distros/fedora.txt
+ create mode 100644 build/pkgs/scipy/distros/fedora.txt
+ create mode 100644 build/pkgs/setuptools/distros/fedora.txt
+ create mode 100644 build/pkgs/six/distros/fedora.txt
+ create mode 100644 build/pkgs/sympy/distros/fedora.txt
+ create mode 100644 build/pkgs/texttable/distros/fedora.txt
+ create mode 100644 build/pkgs/toml/distros/fedora.txt
+ create mode 100644 build/pkgs/webencodings/distros/fedora.txt
+ create mode 100644 build/pkgs/wheel/distros/fedora.txt
+
+diff --git a/build/pkgs/babel/distros/fedora.txt b/build/pkgs/babel/distros/fedora.txt
+new file mode 100644
+index 00000000..98f6593
+--- /dev/null
++++ b/build/pkgs/babel/distros/fedora.txt
+@@ -0,0 +1 @@
++babel
+diff --git a/build/pkgs/bleach/distros/fedora.txt b/build/pkgs/bleach/distros/fedora.txt
+new file mode 100644
+index 00000000..c5422cc
+--- /dev/null
++++ b/build/pkgs/bleach/distros/fedora.txt
+@@ -0,0 +1 @@
++python-bleach
+diff --git a/build/pkgs/certifi/distros/fedora.txt b/build/pkgs/certifi/distros/fedora.txt
+new file mode 100644
+index 00000000..be421c8
+--- /dev/null
++++ b/build/pkgs/certifi/distros/fedora.txt
+@@ -0,0 +1 @@
++python-certifi
+diff --git a/build/pkgs/cvxopt/distros/fedora.txt b/build/pkgs/cvxopt/distros/fedora.txt
+new file mode 100644
+index 00000000..f15770f
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/fedora.txt
+@@ -0,0 +1 @@
++python-cvxopt
+diff --git a/build/pkgs/decorator/distros/fedora.txt b/build/pkgs/decorator/distros/fedora.txt
+new file mode 100644
+index 00000000..0795604
+--- /dev/null
++++ b/build/pkgs/decorator/distros/fedora.txt
+@@ -0,0 +1 @@
++python-decorator
+diff --git a/build/pkgs/html5lib/distros/fedora.txt b/build/pkgs/html5lib/distros/fedora.txt
+new file mode 100644
+index 00000000..b821491
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/fedora.txt
+@@ -0,0 +1 @@
++python-html5lib
+diff --git a/build/pkgs/idna/distros/fedora.txt b/build/pkgs/idna/distros/fedora.txt
+new file mode 100644
+index 00000000..a73e70c
+--- /dev/null
++++ b/build/pkgs/idna/distros/fedora.txt
+@@ -0,0 +1 @@
++python-idna
+diff --git a/build/pkgs/jinja2/distros/fedora.txt b/build/pkgs/jinja2/distros/fedora.txt
+new file mode 100644
+index 00000000..f5f3caf
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/fedora.txt
+@@ -0,0 +1 @@
++python-jinja2
+diff --git a/build/pkgs/matplotlib/distros/fedora.txt b/build/pkgs/matplotlib/distros/fedora.txt
+new file mode 100644
+index 00000000..f6d856e
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/fedora.txt
+@@ -0,0 +1 @@
++python-matplotlib
+diff --git a/build/pkgs/mpmath/distros/fedora.txt b/build/pkgs/mpmath/distros/fedora.txt
+new file mode 100644
+index 00000000..a7dc8d5
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/fedora.txt
+@@ -0,0 +1 @@
++python-mpmath
+diff --git a/build/pkgs/networkx/distros/fedora.txt b/build/pkgs/networkx/distros/fedora.txt
+new file mode 100644
+index 00000000..293f943
+--- /dev/null
++++ b/build/pkgs/networkx/distros/fedora.txt
+@@ -0,0 +1 @@
++python-networkx
+diff --git a/build/pkgs/numpy/distros/fedora.txt b/build/pkgs/numpy/distros/fedora.txt
+new file mode 100644
+index 00000000..c8722b9
+--- /dev/null
++++ b/build/pkgs/numpy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-numpy
+diff --git a/build/pkgs/packaging/distros/fedora.txt b/build/pkgs/packaging/distros/fedora.txt
+new file mode 100644
+index 00000000..02ad855
+--- /dev/null
++++ b/build/pkgs/packaging/distros/fedora.txt
+@@ -0,0 +1 @@
++python-packaging
+diff --git a/build/pkgs/pandocfilters/distros/fedora.txt b/build/pkgs/pandocfilters/distros/fedora.txt
+new file mode 100644
+index 00000000..e7a86d0
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/fedora.txt b/build/pkgs/pickleshare/distros/fedora.txt
+new file mode 100644
+index 00000000..6d991a2
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pickleshare
+diff --git a/build/pkgs/pillow/distros/fedora.txt b/build/pkgs/pillow/distros/fedora.txt
+new file mode 100644
+index 00000000..86dbb1d
+--- /dev/null
++++ b/build/pkgs/pillow/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pillow
+diff --git a/build/pkgs/pluggy/distros/fedora.txt b/build/pkgs/pluggy/distros/fedora.txt
+new file mode 100644
+index 00000000..c869e54
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pluggy
+diff --git a/build/pkgs/py/distros/fedora.txt b/build/pkgs/py/distros/fedora.txt
+new file mode 100644
+index 00000000..b348d39
+--- /dev/null
++++ b/build/pkgs/py/distros/fedora.txt
+@@ -0,0 +1 @@
++python-py
+diff --git a/build/pkgs/pygments/distros/fedora.txt b/build/pkgs/pygments/distros/fedora.txt
+new file mode 100644
+index 00000000..f3e72a8
+--- /dev/null
++++ b/build/pkgs/pygments/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pygments
+diff --git a/build/pkgs/pytz/distros/fedora.txt b/build/pkgs/pytz/distros/fedora.txt
+new file mode 100644
+index 00000000..2cccc9e
+--- /dev/null
++++ b/build/pkgs/pytz/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pytz
+diff --git a/build/pkgs/pyzmq/distros/fedora.txt b/build/pkgs/pyzmq/distros/fedora.txt
+new file mode 100644
+index 00000000..23f64d1
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pyzmq
+diff --git a/build/pkgs/requests/distros/fedora.txt b/build/pkgs/requests/distros/fedora.txt
+new file mode 100644
+index 00000000..93a7bc1
+--- /dev/null
++++ b/build/pkgs/requests/distros/fedora.txt
+@@ -0,0 +1 @@
++python-requests
+diff --git a/build/pkgs/scipy/distros/fedora.txt b/build/pkgs/scipy/distros/fedora.txt
+new file mode 100644
+index 00000000..7ff2882
+--- /dev/null
++++ b/build/pkgs/scipy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-scipy
+diff --git a/build/pkgs/setuptools/distros/fedora.txt b/build/pkgs/setuptools/distros/fedora.txt
+new file mode 100644
+index 00000000..e1ad178
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/fedora.txt
+@@ -0,0 +1 @@
++python-setuptools
+diff --git a/build/pkgs/six/distros/fedora.txt b/build/pkgs/six/distros/fedora.txt
+new file mode 100644
+index 00000000..787c530
+--- /dev/null
++++ b/build/pkgs/six/distros/fedora.txt
+@@ -0,0 +1 @@
++python-six
+diff --git a/build/pkgs/sympy/distros/fedora.txt b/build/pkgs/sympy/distros/fedora.txt
+new file mode 100644
+index 00000000..126c88a
+--- /dev/null
++++ b/build/pkgs/sympy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-sympy
+diff --git a/build/pkgs/texttable/distros/fedora.txt b/build/pkgs/texttable/distros/fedora.txt
+new file mode 100644
+index 00000000..8d1ccec
+--- /dev/null
++++ b/build/pkgs/texttable/distros/fedora.txt
+@@ -0,0 +1 @@
++python-texttable
+diff --git a/build/pkgs/toml/distros/fedora.txt b/build/pkgs/toml/distros/fedora.txt
+new file mode 100644
+index 00000000..821ee77
+--- /dev/null
++++ b/build/pkgs/toml/distros/fedora.txt
+@@ -0,0 +1 @@
++python-toml
+diff --git a/build/pkgs/webencodings/distros/fedora.txt b/build/pkgs/webencodings/distros/fedora.txt
+new file mode 100644
+index 00000000..12ddba9
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/fedora.txt
+@@ -0,0 +1 @@
++python-webencodings
+diff --git a/build/pkgs/wheel/distros/fedora.txt b/build/pkgs/wheel/distros/fedora.txt
+new file mode 100644
+index 00000000..ae4cbb9
+--- /dev/null
++++ b/build/pkgs/wheel/distros/fedora.txt
+@@ -0,0 +1 @@
++python-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From ad1d5a20380b147c774903066031442f31094626 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 21:04:04 -0700
+Subject: build/pkgs: Add distros/arch.txt for Python packages
+
+---
+ build/pkgs/babel/distros/arch.txt         | 1 +
+ build/pkgs/bleach/distros/arch.txt        | 1 +
+ build/pkgs/certifi/distros/arch.txt       | 1 +
+ build/pkgs/cvxopt/distros/arch.txt        | 1 +
+ build/pkgs/decorator/distros/arch.txt     | 1 +
+ build/pkgs/html5lib/distros/arch.txt      | 1 +
+ build/pkgs/idna/distros/arch.txt          | 1 +
+ build/pkgs/matplotlib/distros/arch.txt    | 1 +
+ build/pkgs/mpmath/distros/arch.txt        | 1 +
+ build/pkgs/networkx/distros/arch.txt      | 1 +
+ build/pkgs/numpy/distros/arch.txt         | 1 +
+ build/pkgs/packaging/distros/arch.txt     | 1 +
+ build/pkgs/pandocfilters/distros/arch.txt | 1 +
+ build/pkgs/pickleshare/distros/arch.txt   | 1 +
+ build/pkgs/pillow/distros/arch.txt        | 1 +
+ build/pkgs/pluggy/distros/arch.txt        | 1 +
+ build/pkgs/py/distros/arch.txt            | 1 +
+ build/pkgs/pygments/distros/arch.txt      | 1 +
+ build/pkgs/pytz/distros/arch.txt          | 1 +
+ build/pkgs/pyzmq/distros/arch.txt         | 1 +
+ build/pkgs/requests/distros/arch.txt      | 1 +
+ build/pkgs/scipy/distros/arch.txt         | 1 +
+ build/pkgs/setuptools/distros/arch.txt    | 1 +
+ build/pkgs/six/distros/arch.txt           | 1 +
+ build/pkgs/sympy/distros/arch.txt         | 1 +
+ build/pkgs/texttable/distros/arch.txt     | 1 +
+ build/pkgs/toml/distros/arch.txt          | 1 +
+ build/pkgs/webencodings/distros/arch.txt  | 1 +
+ build/pkgs/wheel/distros/arch.txt         | 1 +
+ 29 files changed, 29 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/arch.txt
+ create mode 100644 build/pkgs/bleach/distros/arch.txt
+ create mode 100644 build/pkgs/certifi/distros/arch.txt
+ create mode 100644 build/pkgs/cvxopt/distros/arch.txt
+ create mode 100644 build/pkgs/decorator/distros/arch.txt
+ create mode 100644 build/pkgs/html5lib/distros/arch.txt
+ create mode 100644 build/pkgs/idna/distros/arch.txt
+ create mode 100644 build/pkgs/matplotlib/distros/arch.txt
+ create mode 100644 build/pkgs/mpmath/distros/arch.txt
+ create mode 100644 build/pkgs/networkx/distros/arch.txt
+ create mode 100644 build/pkgs/numpy/distros/arch.txt
+ create mode 100644 build/pkgs/packaging/distros/arch.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/arch.txt
+ create mode 100644 build/pkgs/pickleshare/distros/arch.txt
+ create mode 100644 build/pkgs/pillow/distros/arch.txt
+ create mode 100644 build/pkgs/pluggy/distros/arch.txt
+ create mode 100644 build/pkgs/py/distros/arch.txt
+ create mode 100644 build/pkgs/pygments/distros/arch.txt
+ create mode 100644 build/pkgs/pytz/distros/arch.txt
+ create mode 100644 build/pkgs/pyzmq/distros/arch.txt
+ create mode 100644 build/pkgs/requests/distros/arch.txt
+ create mode 100644 build/pkgs/scipy/distros/arch.txt
+ create mode 100644 build/pkgs/setuptools/distros/arch.txt
+ create mode 100644 build/pkgs/six/distros/arch.txt
+ create mode 100644 build/pkgs/sympy/distros/arch.txt
+ create mode 100644 build/pkgs/texttable/distros/arch.txt
+ create mode 100644 build/pkgs/toml/distros/arch.txt
+ create mode 100644 build/pkgs/webencodings/distros/arch.txt
+ create mode 100644 build/pkgs/wheel/distros/arch.txt
+
+diff --git a/build/pkgs/babel/distros/arch.txt b/build/pkgs/babel/distros/arch.txt
+new file mode 100644
+index 00000000..f2d828c
+--- /dev/null
++++ b/build/pkgs/babel/distros/arch.txt
+@@ -0,0 +1 @@
++python-babel
+diff --git a/build/pkgs/bleach/distros/arch.txt b/build/pkgs/bleach/distros/arch.txt
+new file mode 100644
+index 00000000..c5422cc
+--- /dev/null
++++ b/build/pkgs/bleach/distros/arch.txt
+@@ -0,0 +1 @@
++python-bleach
+diff --git a/build/pkgs/certifi/distros/arch.txt b/build/pkgs/certifi/distros/arch.txt
+new file mode 100644
+index 00000000..be421c8
+--- /dev/null
++++ b/build/pkgs/certifi/distros/arch.txt
+@@ -0,0 +1 @@
++python-certifi
+diff --git a/build/pkgs/cvxopt/distros/arch.txt b/build/pkgs/cvxopt/distros/arch.txt
+new file mode 100644
+index 00000000..f15770f
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/arch.txt
+@@ -0,0 +1 @@
++python-cvxopt
+diff --git a/build/pkgs/decorator/distros/arch.txt b/build/pkgs/decorator/distros/arch.txt
+new file mode 100644
+index 00000000..0795604
+--- /dev/null
++++ b/build/pkgs/decorator/distros/arch.txt
+@@ -0,0 +1 @@
++python-decorator
+diff --git a/build/pkgs/html5lib/distros/arch.txt b/build/pkgs/html5lib/distros/arch.txt
+new file mode 100644
+index 00000000..b821491
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/arch.txt
+@@ -0,0 +1 @@
++python-html5lib
+diff --git a/build/pkgs/idna/distros/arch.txt b/build/pkgs/idna/distros/arch.txt
+new file mode 100644
+index 00000000..a73e70c
+--- /dev/null
++++ b/build/pkgs/idna/distros/arch.txt
+@@ -0,0 +1 @@
++python-idna
+diff --git a/build/pkgs/matplotlib/distros/arch.txt b/build/pkgs/matplotlib/distros/arch.txt
+new file mode 100644
+index 00000000..f6d856e
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/arch.txt
+@@ -0,0 +1 @@
++python-matplotlib
+diff --git a/build/pkgs/mpmath/distros/arch.txt b/build/pkgs/mpmath/distros/arch.txt
+new file mode 100644
+index 00000000..a7dc8d5
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/arch.txt
+@@ -0,0 +1 @@
++python-mpmath
+diff --git a/build/pkgs/networkx/distros/arch.txt b/build/pkgs/networkx/distros/arch.txt
+new file mode 100644
+index 00000000..293f943
+--- /dev/null
++++ b/build/pkgs/networkx/distros/arch.txt
+@@ -0,0 +1 @@
++python-networkx
+diff --git a/build/pkgs/numpy/distros/arch.txt b/build/pkgs/numpy/distros/arch.txt
+new file mode 100644
+index 00000000..c8722b9
+--- /dev/null
++++ b/build/pkgs/numpy/distros/arch.txt
+@@ -0,0 +1 @@
++python-numpy
+diff --git a/build/pkgs/packaging/distros/arch.txt b/build/pkgs/packaging/distros/arch.txt
+new file mode 100644
+index 00000000..02ad855
+--- /dev/null
++++ b/build/pkgs/packaging/distros/arch.txt
+@@ -0,0 +1 @@
++python-packaging
+diff --git a/build/pkgs/pandocfilters/distros/arch.txt b/build/pkgs/pandocfilters/distros/arch.txt
+new file mode 100644
+index 00000000..e7a86d0
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/arch.txt
+@@ -0,0 +1 @@
++python-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/arch.txt b/build/pkgs/pickleshare/distros/arch.txt
+new file mode 100644
+index 00000000..6d991a2
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/arch.txt
+@@ -0,0 +1 @@
++python-pickleshare
+diff --git a/build/pkgs/pillow/distros/arch.txt b/build/pkgs/pillow/distros/arch.txt
+new file mode 100644
+index 00000000..86dbb1d
+--- /dev/null
++++ b/build/pkgs/pillow/distros/arch.txt
+@@ -0,0 +1 @@
++python-pillow
+diff --git a/build/pkgs/pluggy/distros/arch.txt b/build/pkgs/pluggy/distros/arch.txt
+new file mode 100644
+index 00000000..c869e54
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/arch.txt
+@@ -0,0 +1 @@
++python-pluggy
+diff --git a/build/pkgs/py/distros/arch.txt b/build/pkgs/py/distros/arch.txt
+new file mode 100644
+index 00000000..b348d39
+--- /dev/null
++++ b/build/pkgs/py/distros/arch.txt
+@@ -0,0 +1 @@
++python-py
+diff --git a/build/pkgs/pygments/distros/arch.txt b/build/pkgs/pygments/distros/arch.txt
+new file mode 100644
+index 00000000..f3e72a8
+--- /dev/null
++++ b/build/pkgs/pygments/distros/arch.txt
+@@ -0,0 +1 @@
++python-pygments
+diff --git a/build/pkgs/pytz/distros/arch.txt b/build/pkgs/pytz/distros/arch.txt
+new file mode 100644
+index 00000000..2cccc9e
+--- /dev/null
++++ b/build/pkgs/pytz/distros/arch.txt
+@@ -0,0 +1 @@
++python-pytz
+diff --git a/build/pkgs/pyzmq/distros/arch.txt b/build/pkgs/pyzmq/distros/arch.txt
+new file mode 100644
+index 00000000..23f64d1
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/arch.txt
+@@ -0,0 +1 @@
++python-pyzmq
+diff --git a/build/pkgs/requests/distros/arch.txt b/build/pkgs/requests/distros/arch.txt
+new file mode 100644
+index 00000000..93a7bc1
+--- /dev/null
++++ b/build/pkgs/requests/distros/arch.txt
+@@ -0,0 +1 @@
++python-requests
+diff --git a/build/pkgs/scipy/distros/arch.txt b/build/pkgs/scipy/distros/arch.txt
+new file mode 100644
+index 00000000..7ff2882
+--- /dev/null
++++ b/build/pkgs/scipy/distros/arch.txt
+@@ -0,0 +1 @@
++python-scipy
+diff --git a/build/pkgs/setuptools/distros/arch.txt b/build/pkgs/setuptools/distros/arch.txt
+new file mode 100644
+index 00000000..e1ad178
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/arch.txt
+@@ -0,0 +1 @@
++python-setuptools
+diff --git a/build/pkgs/six/distros/arch.txt b/build/pkgs/six/distros/arch.txt
+new file mode 100644
+index 00000000..787c530
+--- /dev/null
++++ b/build/pkgs/six/distros/arch.txt
+@@ -0,0 +1 @@
++python-six
+diff --git a/build/pkgs/sympy/distros/arch.txt b/build/pkgs/sympy/distros/arch.txt
+new file mode 100644
+index 00000000..126c88a
+--- /dev/null
++++ b/build/pkgs/sympy/distros/arch.txt
+@@ -0,0 +1 @@
++python-sympy
+diff --git a/build/pkgs/texttable/distros/arch.txt b/build/pkgs/texttable/distros/arch.txt
+new file mode 100644
+index 00000000..8d1ccec
+--- /dev/null
++++ b/build/pkgs/texttable/distros/arch.txt
+@@ -0,0 +1 @@
++python-texttable
+diff --git a/build/pkgs/toml/distros/arch.txt b/build/pkgs/toml/distros/arch.txt
+new file mode 100644
+index 00000000..821ee77
+--- /dev/null
++++ b/build/pkgs/toml/distros/arch.txt
+@@ -0,0 +1 @@
++python-toml
+diff --git a/build/pkgs/webencodings/distros/arch.txt b/build/pkgs/webencodings/distros/arch.txt
+new file mode 100644
+index 00000000..12ddba9
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/arch.txt
+@@ -0,0 +1 @@
++python-webencodings
+diff --git a/build/pkgs/wheel/distros/arch.txt b/build/pkgs/wheel/distros/arch.txt
+new file mode 100644
+index 00000000..ae4cbb9
+--- /dev/null
++++ b/build/pkgs/wheel/distros/arch.txt
+@@ -0,0 +1 @@
++python-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5087abee08f2a89ddaf422ec72a84575fe724a79 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 21:20:56 -0700
+Subject: build/pkgs: Add distros/opensuse.txt for Python packages
+
+---
+ build/pkgs/bleach/distros/opensuse.txt        | 1 +
+ build/pkgs/cvxopt/distros/opensuse.txt        | 1 +
+ build/pkgs/html5lib/distros/opensuse.txt      | 1 +
+ build/pkgs/idna/distros/opensuse.txt          | 1 +
+ build/pkgs/jinja2/distros/opensuse.txt        | 2 +-
+ build/pkgs/mpmath/distros/opensuse.txt        | 1 +
+ build/pkgs/numpy/distros/opensuse.txt         | 1 +
+ build/pkgs/packaging/distros/opensuse.txt     | 1 +
+ build/pkgs/pandocfilters/distros/opensuse.txt | 1 +
+ build/pkgs/pluggy/distros/opensuse.txt        | 1 +
+ build/pkgs/py/distros/opensuse.txt            | 1 +
+ build/pkgs/pygments/distros/opensuse.txt      | 2 +-
+ build/pkgs/sympy/distros/opensuse.txt         | 1 +
+ build/pkgs/texttable/distros/opensuse.txt     | 1 +
+ build/pkgs/toml/distros/opensuse.txt          | 1 +
+ 15 files changed, 15 insertions(+), 2 deletions(-)
+ create mode 100644 build/pkgs/bleach/distros/opensuse.txt
+ create mode 100644 build/pkgs/cvxopt/distros/opensuse.txt
+ create mode 100644 build/pkgs/html5lib/distros/opensuse.txt
+ create mode 100644 build/pkgs/idna/distros/opensuse.txt
+ create mode 100644 build/pkgs/mpmath/distros/opensuse.txt
+ create mode 100644 build/pkgs/numpy/distros/opensuse.txt
+ create mode 100644 build/pkgs/packaging/distros/opensuse.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/opensuse.txt
+ create mode 100644 build/pkgs/pluggy/distros/opensuse.txt
+ create mode 100644 build/pkgs/py/distros/opensuse.txt
+ create mode 100644 build/pkgs/sympy/distros/opensuse.txt
+ create mode 100644 build/pkgs/texttable/distros/opensuse.txt
+ create mode 100644 build/pkgs/toml/distros/opensuse.txt
+
+diff --git a/build/pkgs/bleach/distros/opensuse.txt b/build/pkgs/bleach/distros/opensuse.txt
+new file mode 100644
+index 00000000..6d37c4c
+--- /dev/null
++++ b/build/pkgs/bleach/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-bleach
+diff --git a/build/pkgs/cvxopt/distros/opensuse.txt b/build/pkgs/cvxopt/distros/opensuse.txt
+new file mode 100644
+index 00000000..2bb6ad1
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-cvxopt
+diff --git a/build/pkgs/html5lib/distros/opensuse.txt b/build/pkgs/html5lib/distros/opensuse.txt
+new file mode 100644
+index 00000000..6d7b8df
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-html5lib
+diff --git a/build/pkgs/idna/distros/opensuse.txt b/build/pkgs/idna/distros/opensuse.txt
+new file mode 100644
+index 00000000..de48e70
+--- /dev/null
++++ b/build/pkgs/idna/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-idna
+diff --git a/build/pkgs/jinja2/distros/opensuse.txt b/build/pkgs/jinja2/distros/opensuse.txt
+index 5d90a22..f2db865 100644
+--- a/build/pkgs/jinja2/distros/opensuse.txt
++++ b/build/pkgs/jinja2/distros/opensuse.txt
+@@ -1 +1 @@
+-python3-Jinja2
++python3-jinja2
+diff --git a/build/pkgs/mpmath/distros/opensuse.txt b/build/pkgs/mpmath/distros/opensuse.txt
+new file mode 100644
+index 00000000..fbc82a9
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-mpmath
+diff --git a/build/pkgs/numpy/distros/opensuse.txt b/build/pkgs/numpy/distros/opensuse.txt
+new file mode 100644
+index 00000000..79d5c5a
+--- /dev/null
++++ b/build/pkgs/numpy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-numpy
+diff --git a/build/pkgs/packaging/distros/opensuse.txt b/build/pkgs/packaging/distros/opensuse.txt
+new file mode 100644
+index 00000000..8f1c0ff
+--- /dev/null
++++ b/build/pkgs/packaging/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-packaging
+diff --git a/build/pkgs/pandocfilters/distros/opensuse.txt b/build/pkgs/pandocfilters/distros/opensuse.txt
+new file mode 100644
+index 00000000..d0d4c24
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-pandocfilters
+diff --git a/build/pkgs/pluggy/distros/opensuse.txt b/build/pkgs/pluggy/distros/opensuse.txt
+new file mode 100644
+index 00000000..43a3acf
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-pluggy
+diff --git a/build/pkgs/py/distros/opensuse.txt b/build/pkgs/py/distros/opensuse.txt
+new file mode 100644
+index 00000000..81fefe6
+--- /dev/null
++++ b/build/pkgs/py/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-py
+diff --git a/build/pkgs/pygments/distros/opensuse.txt b/build/pkgs/pygments/distros/opensuse.txt
+index 9ff5740..3ab3792 100644
+--- a/build/pkgs/pygments/distros/opensuse.txt
++++ b/build/pkgs/pygments/distros/opensuse.txt
+@@ -1 +1 @@
+-python3-Pygments
++python3-pygments
+diff --git a/build/pkgs/sympy/distros/opensuse.txt b/build/pkgs/sympy/distros/opensuse.txt
+new file mode 100644
+index 00000000..db423c8
+--- /dev/null
++++ b/build/pkgs/sympy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-sympy
+diff --git a/build/pkgs/texttable/distros/opensuse.txt b/build/pkgs/texttable/distros/opensuse.txt
+new file mode 100644
+index 00000000..8f8e7e2
+--- /dev/null
++++ b/build/pkgs/texttable/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-texttable
+diff --git a/build/pkgs/toml/distros/opensuse.txt b/build/pkgs/toml/distros/opensuse.txt
+new file mode 100644
+index 00000000..543e89d
+--- /dev/null
++++ b/build/pkgs/toml/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-toml
+-- 
+cgit v1.0-1-gd88e
+
+
+From a480ba7ace1370d106ae831e904ea22b72af1be7 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 22:45:04 -0700
+Subject: build/pkgs: Add distros/debian.txt for Python packages
+
+---
+ build/pkgs/babel/distros/debian.txt         | 1 +
+ build/pkgs/bleach/distros/debian.txt        | 1 +
+ build/pkgs/certifi/distros/debian.txt       | 1 +
+ build/pkgs/cvxopt/distros/debian.txt        | 1 +
+ build/pkgs/decorator/distros/debian.txt     | 1 +
+ build/pkgs/html5lib/distros/debian.txt      | 1 +
+ build/pkgs/idna/distros/debian.txt          | 1 +
+ build/pkgs/jinja2/distros/debian.txt        | 1 +
+ build/pkgs/matplotlib/distros/debian.txt    | 1 +
+ build/pkgs/mpmath/distros/debian.txt        | 1 +
+ build/pkgs/networkx/distros/debian.txt      | 1 +
+ build/pkgs/numpy/distros/debian.txt         | 1 +
+ build/pkgs/packaging/distros/debian.txt     | 1 +
+ build/pkgs/pandocfilters/distros/debian.txt | 1 +
+ build/pkgs/pickleshare/distros/debian.txt   | 1 +
+ build/pkgs/pillow/distros/debian.txt        | 1 +
+ build/pkgs/pluggy/distros/debian.txt        | 1 +
+ build/pkgs/py/distros/debian.txt            | 1 +
+ build/pkgs/pygments/distros/debian.txt      | 1 +
+ build/pkgs/pytz/distros/debian.txt          | 1 +
+ build/pkgs/requests/distros/debian.txt      | 1 +
+ build/pkgs/scipy/distros/debian.txt         | 1 +
+ build/pkgs/setuptools/distros/debian.txt    | 1 +
+ build/pkgs/six/distros/debian.txt           | 1 +
+ build/pkgs/sympy/distros/debian.txt         | 1 +
+ build/pkgs/texttable/distros/debian.txt     | 1 +
+ build/pkgs/toml/distros/debian.txt          | 1 +
+ build/pkgs/webencodings/distros/debian.txt  | 1 +
+ build/pkgs/wheel/distros/debian.txt         | 1 +
+ 29 files changed, 29 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/debian.txt
+ create mode 100644 build/pkgs/bleach/distros/debian.txt
+ create mode 100644 build/pkgs/certifi/distros/debian.txt
+ create mode 100644 build/pkgs/cvxopt/distros/debian.txt
+ create mode 100644 build/pkgs/decorator/distros/debian.txt
+ create mode 100644 build/pkgs/html5lib/distros/debian.txt
+ create mode 100644 build/pkgs/idna/distros/debian.txt
+ create mode 100644 build/pkgs/jinja2/distros/debian.txt
+ create mode 100644 build/pkgs/matplotlib/distros/debian.txt
+ create mode 100644 build/pkgs/mpmath/distros/debian.txt
+ create mode 100644 build/pkgs/networkx/distros/debian.txt
+ create mode 100644 build/pkgs/numpy/distros/debian.txt
+ create mode 100644 build/pkgs/packaging/distros/debian.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/debian.txt
+ create mode 100644 build/pkgs/pickleshare/distros/debian.txt
+ create mode 100644 build/pkgs/pillow/distros/debian.txt
+ create mode 100644 build/pkgs/pluggy/distros/debian.txt
+ create mode 100644 build/pkgs/py/distros/debian.txt
+ create mode 100644 build/pkgs/pygments/distros/debian.txt
+ create mode 100644 build/pkgs/pytz/distros/debian.txt
+ create mode 100644 build/pkgs/requests/distros/debian.txt
+ create mode 100644 build/pkgs/scipy/distros/debian.txt
+ create mode 100644 build/pkgs/setuptools/distros/debian.txt
+ create mode 100644 build/pkgs/six/distros/debian.txt
+ create mode 100644 build/pkgs/sympy/distros/debian.txt
+ create mode 100644 build/pkgs/texttable/distros/debian.txt
+ create mode 100644 build/pkgs/toml/distros/debian.txt
+ create mode 100644 build/pkgs/webencodings/distros/debian.txt
+ create mode 100644 build/pkgs/wheel/distros/debian.txt
+
+diff --git a/build/pkgs/babel/distros/debian.txt b/build/pkgs/babel/distros/debian.txt
+new file mode 100644
+index 00000000..e623eb6
+--- /dev/null
++++ b/build/pkgs/babel/distros/debian.txt
+@@ -0,0 +1 @@
++python3-babel
+diff --git a/build/pkgs/bleach/distros/debian.txt b/build/pkgs/bleach/distros/debian.txt
+new file mode 100644
+index 00000000..6d37c4c
+--- /dev/null
++++ b/build/pkgs/bleach/distros/debian.txt
+@@ -0,0 +1 @@
++python3-bleach
+diff --git a/build/pkgs/certifi/distros/debian.txt b/build/pkgs/certifi/distros/debian.txt
+new file mode 100644
+index 00000000..f585a82
+--- /dev/null
++++ b/build/pkgs/certifi/distros/debian.txt
+@@ -0,0 +1 @@
++python3-certifi
+diff --git a/build/pkgs/cvxopt/distros/debian.txt b/build/pkgs/cvxopt/distros/debian.txt
+new file mode 100644
+index 00000000..2bb6ad1
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/debian.txt
+@@ -0,0 +1 @@
++python3-cvxopt
+diff --git a/build/pkgs/decorator/distros/debian.txt b/build/pkgs/decorator/distros/debian.txt
+new file mode 100644
+index 00000000..46c478e
+--- /dev/null
++++ b/build/pkgs/decorator/distros/debian.txt
+@@ -0,0 +1 @@
++python3-decorator
+diff --git a/build/pkgs/html5lib/distros/debian.txt b/build/pkgs/html5lib/distros/debian.txt
+new file mode 100644
+index 00000000..6d7b8df
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/debian.txt
+@@ -0,0 +1 @@
++python3-html5lib
+diff --git a/build/pkgs/idna/distros/debian.txt b/build/pkgs/idna/distros/debian.txt
+new file mode 100644
+index 00000000..de48e70
+--- /dev/null
++++ b/build/pkgs/idna/distros/debian.txt
+@@ -0,0 +1 @@
++python3-idna
+diff --git a/build/pkgs/jinja2/distros/debian.txt b/build/pkgs/jinja2/distros/debian.txt
+new file mode 100644
+index 00000000..f2db865
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/debian.txt
+@@ -0,0 +1 @@
++python3-jinja2
+diff --git a/build/pkgs/matplotlib/distros/debian.txt b/build/pkgs/matplotlib/distros/debian.txt
+new file mode 100644
+index 00000000..1374329
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/debian.txt
+@@ -0,0 +1 @@
++python3-matplotlib
+diff --git a/build/pkgs/mpmath/distros/debian.txt b/build/pkgs/mpmath/distros/debian.txt
+new file mode 100644
+index 00000000..fbc82a9
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/debian.txt
+@@ -0,0 +1 @@
++python3-mpmath
+diff --git a/build/pkgs/networkx/distros/debian.txt b/build/pkgs/networkx/distros/debian.txt
+new file mode 100644
+index 00000000..6779066
+--- /dev/null
++++ b/build/pkgs/networkx/distros/debian.txt
+@@ -0,0 +1 @@
++python3-networkx
+diff --git a/build/pkgs/numpy/distros/debian.txt b/build/pkgs/numpy/distros/debian.txt
+new file mode 100644
+index 00000000..79d5c5a
+--- /dev/null
++++ b/build/pkgs/numpy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-numpy
+diff --git a/build/pkgs/packaging/distros/debian.txt b/build/pkgs/packaging/distros/debian.txt
+new file mode 100644
+index 00000000..8f1c0ff
+--- /dev/null
++++ b/build/pkgs/packaging/distros/debian.txt
+@@ -0,0 +1 @@
++python3-packaging
+diff --git a/build/pkgs/pandocfilters/distros/debian.txt b/build/pkgs/pandocfilters/distros/debian.txt
+new file mode 100644
+index 00000000..d0d4c24
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/debian.txt b/build/pkgs/pickleshare/distros/debian.txt
+new file mode 100644
+index 00000000..a00907d
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pickleshare
+diff --git a/build/pkgs/pillow/distros/debian.txt b/build/pkgs/pillow/distros/debian.txt
+new file mode 100644
+index 00000000..3319fcd
+--- /dev/null
++++ b/build/pkgs/pillow/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pillow
+diff --git a/build/pkgs/pluggy/distros/debian.txt b/build/pkgs/pluggy/distros/debian.txt
+new file mode 100644
+index 00000000..43a3acf
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pluggy
+diff --git a/build/pkgs/py/distros/debian.txt b/build/pkgs/py/distros/debian.txt
+new file mode 100644
+index 00000000..81fefe6
+--- /dev/null
++++ b/build/pkgs/py/distros/debian.txt
+@@ -0,0 +1 @@
++python3-py
+diff --git a/build/pkgs/pygments/distros/debian.txt b/build/pkgs/pygments/distros/debian.txt
+new file mode 100644
+index 00000000..3ab3792
+--- /dev/null
++++ b/build/pkgs/pygments/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pygments
+diff --git a/build/pkgs/pytz/distros/debian.txt b/build/pkgs/pytz/distros/debian.txt
+new file mode 100644
+index 00000000..db20908
+--- /dev/null
++++ b/build/pkgs/pytz/distros/debian.txt
+@@ -0,0 +1 @@
++python3-tz
+diff --git a/build/pkgs/requests/distros/debian.txt b/build/pkgs/requests/distros/debian.txt
+new file mode 100644
+index 00000000..43147b2
+--- /dev/null
++++ b/build/pkgs/requests/distros/debian.txt
+@@ -0,0 +1 @@
++python3-requests
+diff --git a/build/pkgs/scipy/distros/debian.txt b/build/pkgs/scipy/distros/debian.txt
+new file mode 100644
+index 00000000..12b3666
+--- /dev/null
++++ b/build/pkgs/scipy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-scipy
+diff --git a/build/pkgs/setuptools/distros/debian.txt b/build/pkgs/setuptools/distros/debian.txt
+new file mode 100644
+index 00000000..1c0901c
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/debian.txt
+@@ -0,0 +1 @@
++python3-setuptools
+diff --git a/build/pkgs/six/distros/debian.txt b/build/pkgs/six/distros/debian.txt
+new file mode 100644
+index 00000000..68ff859
+--- /dev/null
++++ b/build/pkgs/six/distros/debian.txt
+@@ -0,0 +1 @@
++python3-six
+diff --git a/build/pkgs/sympy/distros/debian.txt b/build/pkgs/sympy/distros/debian.txt
+new file mode 100644
+index 00000000..db423c8
+--- /dev/null
++++ b/build/pkgs/sympy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-sympy
+diff --git a/build/pkgs/texttable/distros/debian.txt b/build/pkgs/texttable/distros/debian.txt
+new file mode 100644
+index 00000000..8f8e7e2
+--- /dev/null
++++ b/build/pkgs/texttable/distros/debian.txt
+@@ -0,0 +1 @@
++python3-texttable
+diff --git a/build/pkgs/toml/distros/debian.txt b/build/pkgs/toml/distros/debian.txt
+new file mode 100644
+index 00000000..543e89d
+--- /dev/null
++++ b/build/pkgs/toml/distros/debian.txt
+@@ -0,0 +1 @@
++python3-toml
+diff --git a/build/pkgs/webencodings/distros/debian.txt b/build/pkgs/webencodings/distros/debian.txt
+new file mode 100644
+index 00000000..ac30c2f
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/debian.txt
+@@ -0,0 +1 @@
++python3-webencodings
+diff --git a/build/pkgs/wheel/distros/debian.txt b/build/pkgs/wheel/distros/debian.txt
+new file mode 100644
+index 00000000..3c066725
+--- /dev/null
++++ b/build/pkgs/wheel/distros/debian.txt
+@@ -0,0 +1 @@
++python3-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 93bf30d7de292551c3050e2dd74651d69ba4bd46 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 18 Oct 2021 07:50:34 -0400
+Subject: Trac #29665: add more documentation for SAGE_PYTHON_PACKAGE_CHECK().
+
+An earlier commit allows SAGE_PYTHON_PACKAGE_CHECK(package) to tweak the
+value of sage_use_system_$package if --enable-system-site-packages was
+not used. This essentially changes the default --with-system-$package=yes
+to "no" in that case. Here we update the documentation to reflect it.
+---
+ m4/sage_python_package_check.m4 | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 7ee82a7..95eefd0 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -34,6 +34,10 @@
+ #   ensure that the ./configure- and run-time views of the system
+ #   are as similar as possible.
+ #
++#   To avoid suggesting these system packages to users who have not
++#   set --enable-system-site-packages, this macro also changes the
++#   default for --with-system-foo from "yes" to "no" in that case.
++#
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
+-- 
+cgit v1.0-1-gd88e
+
+
+From d771e49d57ecdf3622434bc09cbfb87ad3bb7744 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 18 Oct 2021 07:42:46 -0400
+Subject: Trac #29665: improve SAGE_PYTHON_PACKAGE_CHECK() failure message.
+
+When --enable-system-site-packages is off, SAGE_PYTHON_PACKAGE_CHECK()
+will always install the corresponding SPKG. We improve the ./configure
+output in that case to make it clear that the decision was based on
+the value of --enable-system-site-packages and not the "real" check.
+---
+ m4/sage_python_package_check.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 95eefd0..5f0f084 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -40,7 +40,9 @@
+ #
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
++  AC_MSG_CHECKING([if --enable-system-site-packages was used])
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
++    AC_MSG_RESULT(yes)
+     AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
+ 
+     dnl We run this check inside a python venv, because that's ultimately
+@@ -94,6 +96,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
+     dnl System site packages are disabled.
++    AC_MSG_RESULT(no; skipping check)
+     sage_spkg_install_$1=yes
+ 
+     dnl We have to retroactively hack the --with-system-foo={no,yes,force}
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5bb43c1b78a1deb3364f235305937c2f823e5e18 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 24 Oct 2021 20:29:25 -0400
+Subject: Trac #29665: use sage-venv in SAGE_PYTHON_PACKAGE_CHECK().
+
+For consistency with the rest of the build system, we now use the
+build/bin/sage-venv script to create the venv in this autoconf macro
+rather than invoking $PYTHON_FOR_VENV with "-m venv" directly.
+---
+ m4/sage_python_package_check.m4 | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 5f0f084..5547b35 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -50,11 +50,11 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AC_MSG_CHECKING([if we can create a python venv in config.venv])
+ 
+     dnl Use --clear because ./configure typically clobbers its output files.
+-    AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
+-                                        --clear                dnl
+-                                        --without-pip          dnl
+-                                        config.venv            dnl
+-                                        2>&AS_MESSAGE_LOG_FD], [
++    AS_IF(["${PYTHON_FOR_VENV}" build/bin/sage-venv      dnl
++                                  --system-site-packages dnl
++                                  --clear                dnl
++                                  config.venv            dnl
++                                  2>&AS_MESSAGE_LOG_FD], [
+       AC_MSG_RESULT(yes)
+       dnl strip all comments from install-requires.txt; this should leave
+       dnl only a single line containing the version specification for this
+-- 
+cgit v1.0-1-gd88e
+
+
+From c78363d6326addff16ca5abac897949a6be72bf4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:10:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for urllib3.
+
+---
+ build/pkgs/urllib3/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/urllib3/spkg-configure.m4
+
+diff --git a/build/pkgs/urllib3/spkg-configure.m4 b/build/pkgs/urllib3/spkg-configure.m4
+new file mode 100644
+index 00000000..d7ef3e1
+--- /dev/null
++++ b/build/pkgs/urllib3/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([urllib3], [SAGE_PYTHON_PACKAGE_CHECK([urllib3])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f416d5abcae495ea8301fad024b279ea9e997b29 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:15:18 -0400
+Subject: Trac #29665: add Gentoo package information for urllib3.
+
+---
+ build/pkgs/urllib3/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/urllib3/distros/gentoo.txt
+
+diff --git a/build/pkgs/urllib3/distros/gentoo.txt b/build/pkgs/urllib3/distros/gentoo.txt
+new file mode 100644
+index 00000000..172a535
+--- /dev/null
++++ b/build/pkgs/urllib3/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/urllib3
+-- 
+cgit v1.0-1-gd88e
+
+
+From 852068b992bf7959500c650f54cb92e5b68d7ef8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:15:58 -0400
+Subject: Trac #29665: add Gentoo package information for nbformat.
+
+---
+ build/pkgs/nbformat/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbformat/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbformat/distros/gentoo.txt b/build/pkgs/nbformat/distros/gentoo.txt
+new file mode 100644
+index 00000000..006b1f2
+--- /dev/null
++++ b/build/pkgs/nbformat/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbformat
+-- 
+cgit v1.0-1-gd88e
+
+
+From 66179fd28fcc92ee840dcd87bb4db25cea968d66 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:34:16 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for nbformat.
+
+---
+ build/pkgs/nbformat/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbformat/spkg-configure.m4
+
+diff --git a/build/pkgs/nbformat/spkg-configure.m4 b/build/pkgs/nbformat/spkg-configure.m4
+new file mode 100644
+index 00000000..5a7f8c4
+--- /dev/null
++++ b/build/pkgs/nbformat/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbformat], [SAGE_PYTHON_PACKAGE_CHECK([nbformat])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 874005e81ed20f27a5f895030dcdbdfc5f73ad80 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:47:01 -0400
+Subject: Trac #29665: add Gentoo package information for zipp.
+
+---
+ build/pkgs/zipp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/zipp/distros/gentoo.txt
+
+diff --git a/build/pkgs/zipp/distros/gentoo.txt b/build/pkgs/zipp/distros/gentoo.txt
+new file mode 100644
+index 00000000..7f59450
+--- /dev/null
++++ b/build/pkgs/zipp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/zipp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0cc2a7355b5554c1fb79c742ebf02eff54465b3e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:47:35 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for zipp.
+
+---
+ build/pkgs/zipp/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/zipp/spkg-configure.m4
+
+diff --git a/build/pkgs/zipp/spkg-configure.m4 b/build/pkgs/zipp/spkg-configure.m4
+new file mode 100644
+index 00000000..0fe3a9c
+--- /dev/null
++++ b/build/pkgs/zipp/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([zipp], [SAGE_PYTHON_PACKAGE_CHECK([zipp])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6073ad8e56c21fc862749bbd84a56d543fb9458c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:48:37 -0400
+Subject: Trac #29665: add Gentoo package information for wcwidth.
+
+---
+ build/pkgs/wcwidth/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wcwidth/distros/gentoo.txt
+
+diff --git a/build/pkgs/wcwidth/distros/gentoo.txt b/build/pkgs/wcwidth/distros/gentoo.txt
+new file mode 100644
+index 00000000..edeb80b
+--- /dev/null
++++ b/build/pkgs/wcwidth/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/wcwidth
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9793d6172c64d61a015fbe61bd45863759124fad Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:51:10 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for wcwidth.
+
+---
+ build/pkgs/wcwidth/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wcwidth/spkg-configure.m4
+
+diff --git a/build/pkgs/wcwidth/spkg-configure.m4 b/build/pkgs/wcwidth/spkg-configure.m4
+new file mode 100644
+index 00000000..5bde15a
+--- /dev/null
++++ b/build/pkgs/wcwidth/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([wcwidth], [SAGE_PYTHON_PACKAGE_CHECK([wcwidth])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20232f370a43c146ca4e696c72a2cbcc498db060 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:52:36 -0400
+Subject: Trac #29665: add Gentoo package information for testpath.
+
+---
+ build/pkgs/testpath/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/testpath/distros/gentoo.txt
+
+diff --git a/build/pkgs/testpath/distros/gentoo.txt b/build/pkgs/testpath/distros/gentoo.txt
+new file mode 100644
+index 00000000..efa10a0
+--- /dev/null
++++ b/build/pkgs/testpath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/testpath
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1b0785b2aad8844e74345fe950baf097e2b43d24 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:55:22 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for testpath.
+
+---
+ build/pkgs/testpath/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/testpath/spkg-configure.m4
+
+diff --git a/build/pkgs/testpath/spkg-configure.m4 b/build/pkgs/testpath/spkg-configure.m4
+new file mode 100644
+index 00000000..d8fc2a7
+--- /dev/null
++++ b/build/pkgs/testpath/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([testpath], [SAGE_PYTHON_PACKAGE_CHECK([testpath])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 10fc3829ecd956d732b1b069fdfe81f0d6d5cdc2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:56:06 -0400
+Subject: Trac #29665: add Gentoo package information for jedi.
+
+---
+ build/pkgs/jedi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jedi/distros/gentoo.txt
+
+diff --git a/build/pkgs/jedi/distros/gentoo.txt b/build/pkgs/jedi/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c85a46
+--- /dev/null
++++ b/build/pkgs/jedi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jedi
+-- 
+cgit v1.0-1-gd88e
+
+
+From a75824d74c281c7639028ca01dabeed266f56998 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:06:37 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for jedi.
+
+---
+ build/pkgs/jedi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jedi/spkg-configure.m4
+
+diff --git a/build/pkgs/jedi/spkg-configure.m4 b/build/pkgs/jedi/spkg-configure.m4
+new file mode 100644
+index 00000000..a37dbcc
+--- /dev/null
++++ b/build/pkgs/jedi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jedi], [SAGE_PYTHON_PACKAGE_CHECK([jedi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 17af01373d43f6acbbdbc23e073e372d3fdadf8b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:07:47 -0400
+Subject: Trac #29665: add Gentoo package information for tomli.
+
+---
+ build/pkgs/tomli/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tomli/distros/gentoo.txt
+
+diff --git a/build/pkgs/tomli/distros/gentoo.txt b/build/pkgs/tomli/distros/gentoo.txt
+new file mode 100644
+index 00000000..0458e25
+--- /dev/null
++++ b/build/pkgs/tomli/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/tomli
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0d3b5994ae612be11992467c4a3f1a74b81400fe Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:08:12 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for tomli.
+
+---
+ build/pkgs/tomli/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tomli/spkg-configure.m4
+
+diff --git a/build/pkgs/tomli/spkg-configure.m4 b/build/pkgs/tomli/spkg-configure.m4
+new file mode 100644
+index 00000000..95a8b8b
+--- /dev/null
++++ b/build/pkgs/tomli/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tomli], [SAGE_PYTHON_PACKAGE_CHECK([tomli])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From dce1c515781b0eeb8eb9c2bc7aba581560c1fac1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:09:22 -0400
+Subject: Trac #29665: add Gentoo package information for defusedxml.
+
+---
+ build/pkgs/defusedxml/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/defusedxml/distros/gentoo.txt
+
+diff --git a/build/pkgs/defusedxml/distros/gentoo.txt b/build/pkgs/defusedxml/distros/gentoo.txt
+new file mode 100644
+index 00000000..2804214
+--- /dev/null
++++ b/build/pkgs/defusedxml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/defusedxml
+-- 
+cgit v1.0-1-gd88e
+
+
+From 02e1e1cd7f8bdae3ca5b7d35ce70af28a44e9b7c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:11:14 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for defusedxml.
+
+---
+ build/pkgs/defusedxml/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/defusedxml/spkg-configure.m4
+
+diff --git a/build/pkgs/defusedxml/spkg-configure.m4 b/build/pkgs/defusedxml/spkg-configure.m4
+new file mode 100644
+index 00000000..e02f345
+--- /dev/null
++++ b/build/pkgs/defusedxml/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([defusedxml], [SAGE_PYTHON_PACKAGE_CHECK([defusedxml])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e0ba4ebb5cfc637b5d26b85de9f34e0a160d2b9c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:12:22 -0400
+Subject: Trac #29665: add Gentoo package information for ipywidgets.
+
+---
+ build/pkgs/ipywidgets/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipywidgets/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipywidgets/distros/gentoo.txt b/build/pkgs/ipywidgets/distros/gentoo.txt
+new file mode 100644
+index 00000000..7c76967
+--- /dev/null
++++ b/build/pkgs/ipywidgets/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipywidgets
+-- 
+cgit v1.0-1-gd88e
+
+
+From 49df7e7d93c7a31b7c46d5d224a35fd313a29a32 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:15:53 -0400
+Subject: Trac #29665: add Gentoo package information for simplegeneric.
+
+---
+ build/pkgs/simplegeneric/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/simplegeneric/distros/gentoo.txt
+
+diff --git a/build/pkgs/simplegeneric/distros/gentoo.txt b/build/pkgs/simplegeneric/distros/gentoo.txt
+new file mode 100644
+index 00000000..a86e90d
+--- /dev/null
++++ b/build/pkgs/simplegeneric/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/simplegeneric
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2a893635d5804749e6fec7ed7289c921ecb5300a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:16:33 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for simplegeneric.
+
+---
+ build/pkgs/simplegeneric/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/simplegeneric/spkg-configure.m4
+
+diff --git a/build/pkgs/simplegeneric/spkg-configure.m4 b/build/pkgs/simplegeneric/spkg-configure.m4
+new file mode 100644
+index 00000000..13715ab
+--- /dev/null
++++ b/build/pkgs/simplegeneric/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([simplegeneric], [SAGE_PYTHON_PACKAGE_CHECK([simplegeneric])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a8fe7ecd6e3163e7d01261e5497ac452a8cc95ab Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:17:18 -0400
+Subject: Trac #29665: add Gentoo package information for imagesize.
+
+---
+ build/pkgs/imagesize/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/imagesize/distros/gentoo.txt
+
+diff --git a/build/pkgs/imagesize/distros/gentoo.txt b/build/pkgs/imagesize/distros/gentoo.txt
+new file mode 100644
+index 00000000..54350ba
+--- /dev/null
++++ b/build/pkgs/imagesize/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/imagesize
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2ad837c5dd1fca0f50ce6d5042a9344210a54f84 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:17:48 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for imagesize.
+
+---
+ build/pkgs/imagesize/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/imagesize/spkg-configure.m4
+
+diff --git a/build/pkgs/imagesize/spkg-configure.m4 b/build/pkgs/imagesize/spkg-configure.m4
+new file mode 100644
+index 00000000..20210ef
+--- /dev/null
++++ b/build/pkgs/imagesize/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([imagesize], [SAGE_PYTHON_PACKAGE_CHECK([imagesize])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bf47415b5bfca2d7bf24e20de35662bf331623b9 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:18:49 -0400
+Subject: Trac #29665: add Gentoo package information for mistune.
+
+---
+ build/pkgs/mistune/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mistune/distros/gentoo.txt
+
+diff --git a/build/pkgs/mistune/distros/gentoo.txt b/build/pkgs/mistune/distros/gentoo.txt
+new file mode 100644
+index 00000000..56f0a4e
+--- /dev/null
++++ b/build/pkgs/mistune/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/mistune
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6898a74fd0c65a40c5220ba68b4062ac6fe060c6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:21:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for mistune.
+
+---
+ build/pkgs/mistune/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mistune/spkg-configure.m4
+
+diff --git a/build/pkgs/mistune/spkg-configure.m4 b/build/pkgs/mistune/spkg-configure.m4
+new file mode 100644
+index 00000000..972f33d
+--- /dev/null
++++ b/build/pkgs/mistune/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([mistune], [SAGE_PYTHON_PACKAGE_CHECK([mistune])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 62735e4ccf2031cd39eb5e04b03bdfd97005d808 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:22:48 -0400
+Subject: Trac #29665: add Gentoo package information for backcall.
+
+---
+ build/pkgs/backcall/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/backcall/distros/gentoo.txt
+
+diff --git a/build/pkgs/backcall/distros/gentoo.txt b/build/pkgs/backcall/distros/gentoo.txt
+new file mode 100644
+index 00000000..266a222
+--- /dev/null
++++ b/build/pkgs/backcall/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/backcall
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9ef3ea42d4a33c7cdb623fa5417ae300cf323183 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:25:10 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for backcall.
+
+---
+ build/pkgs/backcall/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/backcall/spkg-configure.m4
+
+diff --git a/build/pkgs/backcall/spkg-configure.m4 b/build/pkgs/backcall/spkg-configure.m4
+new file mode 100644
+index 00000000..d6b11c4
+--- /dev/null
++++ b/build/pkgs/backcall/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([backcall], [SAGE_PYTHON_PACKAGE_CHECK([backcall])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1b3ea2a3c40fea0fb58435f5e5304368ea58dff8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:25:58 -0400
+Subject: Trac #29665: add Gentoo package information for parso.
+
+---
+ build/pkgs/parso/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/parso/distros/gentoo.txt
+
+diff --git a/build/pkgs/parso/distros/gentoo.txt b/build/pkgs/parso/distros/gentoo.txt
+new file mode 100644
+index 00000000..f9ce4c7
+--- /dev/null
++++ b/build/pkgs/parso/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/parso
+-- 
+cgit v1.0-1-gd88e
+
+
+From 963a3a2c563ec71a1f5be2395722d0e824cb0b11 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:26:22 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for parso.
+
+---
+ build/pkgs/parso/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/parso/spkg-configure.m4
+
+diff --git a/build/pkgs/parso/spkg-configure.m4 b/build/pkgs/parso/spkg-configure.m4
+new file mode 100644
+index 00000000..1ca6f1b
+--- /dev/null
++++ b/build/pkgs/parso/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([parso], [SAGE_PYTHON_PACKAGE_CHECK([parso])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 943053dfc474b6549bcc7d6ef2971ea43588b35c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:27:00 -0400
+Subject: Trac #29665: add Gentoo package information for pyparsing.
+
+---
+ build/pkgs/pyparsing/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyparsing/distros/gentoo.txt
+
+diff --git a/build/pkgs/pyparsing/distros/gentoo.txt b/build/pkgs/pyparsing/distros/gentoo.txt
+new file mode 100644
+index 00000000..ef0419f
+--- /dev/null
++++ b/build/pkgs/pyparsing/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyparsing
+-- 
+cgit v1.0-1-gd88e
+
+
+From bd682eaa2ac41dd84e7a52e2b0c5442fc8fd8919 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:27:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pyparsing.
+
+---
+ build/pkgs/pyparsing/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyparsing/spkg-configure.m4
+
+diff --git a/build/pkgs/pyparsing/spkg-configure.m4 b/build/pkgs/pyparsing/spkg-configure.m4
+new file mode 100644
+index 00000000..d2b4c00
+--- /dev/null
++++ b/build/pkgs/pyparsing/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pyparsing], [SAGE_PYTHON_PACKAGE_CHECK([pyparsing])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 74f36a9c0ec7c63b7e6c40066e42f4b15c2f978e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:17:42 -0400
+Subject: Trac #29665: add Gentoo package information for debugpy.
+
+---
+ build/pkgs/debugpy/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/debugpy/distros/gentoo.txt
+
+diff --git a/build/pkgs/debugpy/distros/gentoo.txt b/build/pkgs/debugpy/distros/gentoo.txt
+new file mode 100644
+index 00000000..8b797ce
+--- /dev/null
++++ b/build/pkgs/debugpy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/debugpy
+-- 
+cgit v1.0-1-gd88e
+
+
+From be072fa87ac5c373d9dc9b54c0bd68734d5709bc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:21:17 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for debugpy.
+
+---
+ build/pkgs/debugpy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/debugpy/spkg-configure.m4
+
+diff --git a/build/pkgs/debugpy/spkg-configure.m4 b/build/pkgs/debugpy/spkg-configure.m4
+new file mode 100644
+index 00000000..db605ff
+--- /dev/null
++++ b/build/pkgs/debugpy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([debugpy], [SAGE_PYTHON_PACKAGE_CHECK([debugpy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6f777ce2f2e14b94e91c8b7bbac82f9017460aba Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:23:56 -0400
+Subject: Trac #29665: add Gentoo package information for tzlocal.
+
+---
+ build/pkgs/tzlocal/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tzlocal/distros/gentoo.txt
+
+diff --git a/build/pkgs/tzlocal/distros/gentoo.txt b/build/pkgs/tzlocal/distros/gentoo.txt
+new file mode 100644
+index 00000000..2018442
+--- /dev/null
++++ b/build/pkgs/tzlocal/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/tzlocal
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3bd078fc15ae13982249452711baafae91038191 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:24:51 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for tzlocal.
+
+---
+ build/pkgs/tzlocal/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tzlocal/spkg-configure.m4
+
+diff --git a/build/pkgs/tzlocal/spkg-configure.m4 b/build/pkgs/tzlocal/spkg-configure.m4
+new file mode 100644
+index 00000000..e020b28
+--- /dev/null
++++ b/build/pkgs/tzlocal/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tzlocal], [SAGE_PYTHON_PACKAGE_CHECK([tzlocal])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 91b0882fc62214923da9ee7b6dccb05d8a1d11d1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:26:13 -0400
+Subject: Trac #29665: add Gentoo package information for pycparser.
+
+---
+ build/pkgs/pycparser/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pycparser/distros/gentoo.txt
+
+diff --git a/build/pkgs/pycparser/distros/gentoo.txt b/build/pkgs/pycparser/distros/gentoo.txt
+new file mode 100644
+index 00000000..5e87307
+--- /dev/null
++++ b/build/pkgs/pycparser/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pycparser
+-- 
+cgit v1.0-1-gd88e
+
+
+From beabde92fe6e057faf516fe82d27f1e903e55ce6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:27:27 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pycparser.
+
+---
+ build/pkgs/pycparser/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pycparser/spkg-configure.m4
+
+diff --git a/build/pkgs/pycparser/spkg-configure.m4 b/build/pkgs/pycparser/spkg-configure.m4
+new file mode 100644
+index 00000000..4b9b900
+--- /dev/null
++++ b/build/pkgs/pycparser/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pycparser], [SAGE_PYTHON_PACKAGE_CHECK([pycparser])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 86c2788dc7fd1169314e9598c91fa81045553677 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:29:36 -0400
+Subject: Trac #29665: add Gentoo package information for cycler.
+
+---
+ build/pkgs/cycler/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cycler/distros/gentoo.txt
+
+diff --git a/build/pkgs/cycler/distros/gentoo.txt b/build/pkgs/cycler/distros/gentoo.txt
+new file mode 100644
+index 00000000..4b21543
+--- /dev/null
++++ b/build/pkgs/cycler/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/cycler
+-- 
+cgit v1.0-1-gd88e
+
+
+From 67c5a944101ddf329f0a61c61d4e784f58a5c5b0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:30:27 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for cycler.
+
+---
+ build/pkgs/cycler/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cycler/spkg-configure.m4
+
+diff --git a/build/pkgs/cycler/spkg-configure.m4 b/build/pkgs/cycler/spkg-configure.m4
+new file mode 100644
+index 00000000..239571a
+--- /dev/null
++++ b/build/pkgs/cycler/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([cycler], [SAGE_PYTHON_PACKAGE_CHECK([cycler])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ef6d490251abfa41f7a0910274700a8a6a65f629 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:31:19 -0400
+Subject: Trac #29665: add Gentoo package information for traitlets.
+
+---
+ build/pkgs/traitlets/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/traitlets/distros/gentoo.txt
+
+diff --git a/build/pkgs/traitlets/distros/gentoo.txt b/build/pkgs/traitlets/distros/gentoo.txt
+new file mode 100644
+index 00000000..46bfaab
+--- /dev/null
++++ b/build/pkgs/traitlets/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/traitlets
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1f922b458d34088d9f6773312209e69f19ee45dc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:31:50 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for traitlets.
+
+---
+ build/pkgs/traitlets/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/traitlets/spkg-configure.m4
+
+diff --git a/build/pkgs/traitlets/spkg-configure.m4 b/build/pkgs/traitlets/spkg-configure.m4
+new file mode 100644
+index 00000000..df2382b
+--- /dev/null
++++ b/build/pkgs/traitlets/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([traitlets], [SAGE_PYTHON_PACKAGE_CHECK([traitlets])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 95b89a9ced0acb6d971a27fa63b97ea58a11f4e1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:33:35 -0400
+Subject: Trac #29665: add Gentoo package information for argcomplete.
+
+---
+ build/pkgs/argcomplete/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argcomplete/distros/gentoo.txt
+
+diff --git a/build/pkgs/argcomplete/distros/gentoo.txt b/build/pkgs/argcomplete/distros/gentoo.txt
+new file mode 100644
+index 00000000..b150949
+--- /dev/null
++++ b/build/pkgs/argcomplete/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/argcomplete
+-- 
+cgit v1.0-1-gd88e
+
+
+From b4cd8ef384e6e5bae0de0f3c113fb5f9e6e1a71e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:34:14 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for argcomplete.
+
+---
+ build/pkgs/argcomplete/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argcomplete/spkg-configure.m4
+
+diff --git a/build/pkgs/argcomplete/spkg-configure.m4 b/build/pkgs/argcomplete/spkg-configure.m4
+new file mode 100644
+index 00000000..cbd7ccf
+--- /dev/null
++++ b/build/pkgs/argcomplete/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([argcomplete], [SAGE_PYTHON_PACKAGE_CHECK([argcomplete])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4cc610e8331970cc018d7ea87af928fa73a292c1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:36:21 -0400
+Subject: Trac #29665: add Gentoo package information for ptyprocess.
+
+---
+ build/pkgs/ptyprocess/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ptyprocess/distros/gentoo.txt
+
+diff --git a/build/pkgs/ptyprocess/distros/gentoo.txt b/build/pkgs/ptyprocess/distros/gentoo.txt
+new file mode 100644
+index 00000000..571a851
+--- /dev/null
++++ b/build/pkgs/ptyprocess/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ptyprocess
+-- 
+cgit v1.0-1-gd88e
+
+
+From cd15f97221bf5933b07900e4f77cb55401eede26 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:37:02 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ptyprocess.
+
+---
+ build/pkgs/ptyprocess/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ptyprocess/spkg-configure.m4
+
+diff --git a/build/pkgs/ptyprocess/spkg-configure.m4 b/build/pkgs/ptyprocess/spkg-configure.m4
+new file mode 100644
+index 00000000..bfacbae
+--- /dev/null
++++ b/build/pkgs/ptyprocess/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ptyprocess], [SAGE_PYTHON_PACKAGE_CHECK([ptyprocess])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb5f45b15f99e4ba28e1b1f6042a0e8ea17f1dfc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:38:22 -0400
+Subject: Trac #29665: add Gentoo package information for attrs.
+
+---
+ build/pkgs/attrs/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/attrs/distros/gentoo.txt
+
+diff --git a/build/pkgs/attrs/distros/gentoo.txt b/build/pkgs/attrs/distros/gentoo.txt
+new file mode 100644
+index 00000000..3b906fa
+--- /dev/null
++++ b/build/pkgs/attrs/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/attrs
+-- 
+cgit v1.0-1-gd88e
+
+
+From 321707ebf8e9af1e4ac3a5b5b094b4226bb3a7a5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:38:55 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for attrs.
+
+---
+ build/pkgs/attrs/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/attrs/spkg-configure.m4
+
+diff --git a/build/pkgs/attrs/spkg-configure.m4 b/build/pkgs/attrs/spkg-configure.m4
+new file mode 100644
+index 00000000..ba6a9b7
+--- /dev/null
++++ b/build/pkgs/attrs/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([attrs], [SAGE_PYTHON_PACKAGE_CHECK([attrs])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 69a498a4e8854ecdfc2f1a134104983c0dcb9e32 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:40:09 -0400
+Subject: Trac #29665: add Gentoo package information for send2trash.
+
+---
+ build/pkgs/send2trash/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/send2trash/distros/gentoo.txt
+
+diff --git a/build/pkgs/send2trash/distros/gentoo.txt b/build/pkgs/send2trash/distros/gentoo.txt
+new file mode 100644
+index 00000000..a89b179
+--- /dev/null
++++ b/build/pkgs/send2trash/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/send2trash
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9baed17c84e1bdf5abd17c20766e5cd7dddc5b53 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:41:45 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for send2trash.
+
+---
+ build/pkgs/send2trash/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/send2trash/spkg-configure.m4
+
+diff --git a/build/pkgs/send2trash/spkg-configure.m4 b/build/pkgs/send2trash/spkg-configure.m4
+new file mode 100644
+index 00000000..3bbb727
+--- /dev/null
++++ b/build/pkgs/send2trash/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([send2trash], [SAGE_PYTHON_PACKAGE_CHECK([send2trash])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b9b552b2a2aaccaeb7c5b25be0b681f107522d09 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:43:27 -0400
+Subject: Trac #29665: add Gentoo package information for pyrsistent.
+
+---
+ build/pkgs/pyrsistent/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyrsistent/distros/gentoo.txt
+
+diff --git a/build/pkgs/pyrsistent/distros/gentoo.txt b/build/pkgs/pyrsistent/distros/gentoo.txt
+new file mode 100644
+index 00000000..83439ce
+--- /dev/null
++++ b/build/pkgs/pyrsistent/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyrsistent
+-- 
+cgit v1.0-1-gd88e
+
+
+From a17b31fac6104852762f57daa749443147bdf121 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:44:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pyrsistent.
+
+---
+ build/pkgs/pyrsistent/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyrsistent/spkg-configure.m4
+
+diff --git a/build/pkgs/pyrsistent/spkg-configure.m4 b/build/pkgs/pyrsistent/spkg-configure.m4
+new file mode 100644
+index 00000000..f7ca75d
+--- /dev/null
++++ b/build/pkgs/pyrsistent/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pyrsistent], [SAGE_PYTHON_PACKAGE_CHECK([pyrsistent])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 68520decad6d6937918d7a6af65ca5bd476e5d02 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:45:45 -0400
+Subject: Trac #29665: add Gentoo package information for entrypoints.
+
+---
+ build/pkgs/entrypoints/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/entrypoints/distros/gentoo.txt
+
+diff --git a/build/pkgs/entrypoints/distros/gentoo.txt b/build/pkgs/entrypoints/distros/gentoo.txt
+new file mode 100644
+index 00000000..684ddd0
+--- /dev/null
++++ b/build/pkgs/entrypoints/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/entrypoints
+-- 
+cgit v1.0-1-gd88e
+
+
+From 34213eccb642a6bad64d89acaefa83ee702cb483 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:46:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for entrypoints.
+
+---
+ build/pkgs/entrypoints/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/entrypoints/spkg-configure.m4
+
+diff --git a/build/pkgs/entrypoints/spkg-configure.m4 b/build/pkgs/entrypoints/spkg-configure.m4
+new file mode 100644
+index 00000000..caed658
+--- /dev/null
++++ b/build/pkgs/entrypoints/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([entrypoints], [SAGE_PYTHON_PACKAGE_CHECK([entrypoints])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8e985614345da1a58fcdc127a9c0ddd790f9b5d2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:48:26 -0400
+Subject: Trac #29665: add Gentoo package information for markupsafe.
+
+---
+ build/pkgs/markupsafe/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/markupsafe/distros/gentoo.txt
+
+diff --git a/build/pkgs/markupsafe/distros/gentoo.txt b/build/pkgs/markupsafe/distros/gentoo.txt
+new file mode 100644
+index 00000000..9654e35
+--- /dev/null
++++ b/build/pkgs/markupsafe/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/markupsafe
+-- 
+cgit v1.0-1-gd88e
+
+
+From d370f229ae0988856f2e0d1f6ee2df2c47169106 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:48:55 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for markupsafe.
+
+---
+ build/pkgs/markupsafe/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/markupsafe/spkg-configure.m4
+
+diff --git a/build/pkgs/markupsafe/spkg-configure.m4 b/build/pkgs/markupsafe/spkg-configure.m4
+new file mode 100644
+index 00000000..79eb8db
+--- /dev/null
++++ b/build/pkgs/markupsafe/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([markupsafe], [SAGE_PYTHON_PACKAGE_CHECK([markupsafe])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c49b285ad9e25e6bc81a7e75d461d234fdd3ea68 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:30:49 -0400
+Subject: Trac #29665: add Gentoo package information for flit_core.
+
+---
+ build/pkgs/flit_core/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/flit_core/distros/gentoo.txt
+
+diff --git a/build/pkgs/flit_core/distros/gentoo.txt b/build/pkgs/flit_core/distros/gentoo.txt
+new file mode 100644
+index 00000000..fe6bea9
+--- /dev/null
++++ b/build/pkgs/flit_core/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/flit_core
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b0ce1c4f23cd9fc4316e1eb2b9b4bde394957f3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:32:11 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for flit_core.
+
+---
+ build/pkgs/flit_core/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/flit_core/spkg-configure.m4
+
+diff --git a/build/pkgs/flit_core/spkg-configure.m4 b/build/pkgs/flit_core/spkg-configure.m4
+new file mode 100644
+index 00000000..ee67557
+--- /dev/null
++++ b/build/pkgs/flit_core/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([flit_core], [SAGE_PYTHON_PACKAGE_CHECK([flit_core])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f006c231a81428b1e1e792f889bf974f90e3c831 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:34:06 -0400
+Subject: Trac #29665: add Gentoo package information for nest_asyncio.
+
+---
+ build/pkgs/nest_asyncio/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nest_asyncio/distros/gentoo.txt
+
+diff --git a/build/pkgs/nest_asyncio/distros/gentoo.txt b/build/pkgs/nest_asyncio/distros/gentoo.txt
+new file mode 100644
+index 00000000..ab742d2
+--- /dev/null
++++ b/build/pkgs/nest_asyncio/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nest_asyncio
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4a58d0a96a84475e765a01a64f5f44c48a317e0b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:34:43 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for nest_asyncio.
+
+---
+ build/pkgs/nest_asyncio/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nest_asyncio/spkg-configure.m4
+
+diff --git a/build/pkgs/nest_asyncio/spkg-configure.m4 b/build/pkgs/nest_asyncio/spkg-configure.m4
+new file mode 100644
+index 00000000..4d81527
+--- /dev/null
++++ b/build/pkgs/nest_asyncio/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nest_asyncio], [SAGE_PYTHON_PACKAGE_CHECK([nest_asyncio])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e50af937777ea778908bc09a7a79db3dd80fdf25 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:37:02 -0400
+Subject: Trac #29665: add Gentoo package information for ipython_genutils.
+
+---
+ build/pkgs/ipython_genutils/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython_genutils/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipython_genutils/distros/gentoo.txt b/build/pkgs/ipython_genutils/distros/gentoo.txt
+new file mode 100644
+index 00000000..01bc49d
+--- /dev/null
++++ b/build/pkgs/ipython_genutils/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipython_genutils
+-- 
+cgit v1.0-1-gd88e
+
+
+From ec3c0ce9db2ba13c1a49d1bcfb7a4b249cb7ae83 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:39:20 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipython_genutils.
+
+---
+ build/pkgs/ipython_genutils/spkg-configure.m4 | 4 ++++
+ 1 file changed, 4 insertions(+)
+ create mode 100644 build/pkgs/ipython_genutils/spkg-configure.m4
+
+diff --git a/build/pkgs/ipython_genutils/spkg-configure.m4 b/build/pkgs/ipython_genutils/spkg-configure.m4
+new file mode 100644
+index 00000000..b0ba86a
+--- /dev/null
++++ b/build/pkgs/ipython_genutils/spkg-configure.m4
+@@ -0,0 +1,4 @@
++SAGE_SPKG_CONFIGURE(
++  [ipython_genutils],
++  [SAGE_PYTHON_PACKAGE_CHECK([ipython_genutils])]
++)
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5c9e2e265115e5f10d4b459a475467e30b4bddde Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:40:03 -0400
+Subject: Trac #29665: add Gentoo package information for ipython.
+
+---
+ build/pkgs/ipython/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipython/distros/gentoo.txt b/build/pkgs/ipython/distros/gentoo.txt
+new file mode 100644
+index 00000000..8b76f18
+--- /dev/null
++++ b/build/pkgs/ipython/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipython
+-- 
+cgit v1.0-1-gd88e
+
+
+From 621e707ddd040a902d7dddf0bed1de2b54ab22f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 07:37:56 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipython.
+
+---
+ build/pkgs/ipython/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython/spkg-configure.m4
+
+diff --git a/build/pkgs/ipython/spkg-configure.m4 b/build/pkgs/ipython/spkg-configure.m4
+new file mode 100644
+index 00000000..02ab89f
+--- /dev/null
++++ b/build/pkgs/ipython/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipython], [SAGE_PYTHON_PACKAGE_CHECK([ipython])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20a0613f6d441da436f3e7b8047a72bf490882bd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 07:51:11 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipywidgets.
+
+---
+ build/pkgs/ipywidgets/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipywidgets/spkg-configure.m4
+
+diff --git a/build/pkgs/ipywidgets/spkg-configure.m4 b/build/pkgs/ipywidgets/spkg-configure.m4
+new file mode 100644
+index 00000000..51ca9be
+--- /dev/null
++++ b/build/pkgs/ipywidgets/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipywidgets], [SAGE_PYTHON_PACKAGE_CHECK([ipywidgets])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 76bcd386633acc02a1a3026339d0cbd258ada04e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 10:05:16 -0400
+Subject: Trac #29665: add Gentoo package information for wheel.
+
+---
+ build/pkgs/wheel/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wheel/distros/gentoo.txt
+
+diff --git a/build/pkgs/wheel/distros/gentoo.txt b/build/pkgs/wheel/distros/gentoo.txt
+new file mode 100644
+index 00000000..ec571d5
+--- /dev/null
++++ b/build/pkgs/wheel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 96c2dd2ca7812f5333bb9d45eadb7ac408e364ce Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:51:44 -0500
+Subject: Trac #29665: add Gentoo package information for terminado.
+
+---
+ build/pkgs/terminado/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/terminado/distros/gentoo.txt
+
+diff --git a/build/pkgs/terminado/distros/gentoo.txt b/build/pkgs/terminado/distros/gentoo.txt
+new file mode 100644
+index 00000000..1df16f1
+--- /dev/null
++++ b/build/pkgs/terminado/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/terminado
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0de0f5f3d235a4339b21e37ea13c9f5e59a82e59 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:52:35 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for terminado.
+
+---
+ build/pkgs/terminado/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/terminado/spkg-configure.m4
+
+diff --git a/build/pkgs/terminado/spkg-configure.m4 b/build/pkgs/terminado/spkg-configure.m4
+new file mode 100644
+index 00000000..5defc2f
+--- /dev/null
++++ b/build/pkgs/terminado/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([terminado], [SAGE_PYTHON_PACKAGE_CHECK([terminado])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d14a745c770b02822557e7cee0a98de1cb2f3a12 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:56:15 -0500
+Subject: Trac #29665: add Gentoo package information for cffi.
+
+---
+ build/pkgs/cffi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cffi/distros/gentoo.txt
+
+diff --git a/build/pkgs/cffi/distros/gentoo.txt b/build/pkgs/cffi/distros/gentoo.txt
+new file mode 100644
+index 00000000..81eeb81
+--- /dev/null
++++ b/build/pkgs/cffi/distros/gentoo.txt
+@@ -0,0 +1 @@
++virtual/python-cffi
+-- 
+cgit v1.0-1-gd88e
+
+
+From ce393c04afc69fe050e38f780d4e117164687d80 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:57:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for cffi.
+
+---
+ build/pkgs/cffi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cffi/spkg-configure.m4
+
+diff --git a/build/pkgs/cffi/spkg-configure.m4 b/build/pkgs/cffi/spkg-configure.m4
+new file mode 100644
+index 00000000..dc81875
+--- /dev/null
++++ b/build/pkgs/cffi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([cffi], [SAGE_PYTHON_PACKAGE_CHECK([cffi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 467093315b3fdd57c8caa2f95cf99ad52b0b84fb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:57:57 -0500
+Subject: Trac #29665: add Gentoo package information for pip.
+
+---
+ build/pkgs/pip/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pip/distros/gentoo.txt
+
+diff --git a/build/pkgs/pip/distros/gentoo.txt b/build/pkgs/pip/distros/gentoo.txt
+new file mode 100644
+index 00000000..1845454
+--- /dev/null
++++ b/build/pkgs/pip/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pip[vanilla]
+-- 
+cgit v1.0-1-gd88e
+
+
+From c597fd23f9f68dabbcb7e698d0569c3e6458f6d1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 09:07:26 -0500
+Subject: Trac #29665: new spkg-configure.m4 for pip.
+
+---
+ build/pkgs/pip/spkg-configure.m4 | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+ create mode 100644 build/pkgs/pip/spkg-configure.m4
+
+diff --git a/build/pkgs/pip/spkg-configure.m4 b/build/pkgs/pip/spkg-configure.m4
+new file mode 100644
+index 00000000..c7a5562
+--- /dev/null
++++ b/build/pkgs/pip/spkg-configure.m4
+@@ -0,0 +1,12 @@
++SAGE_SPKG_CONFIGURE([pip], [
++  dnl always run this macro because it changes the default value of
++  dnl the --with-system-<package> option.
++  SAGE_PYTHON_PACKAGE_CHECK([pip])
++
++  dnl if we might not install the spkg, make sure that "pip" is in
++  dnl the user's PATH, too.
++  AS_IF([test "x$sage_spkg_install_pip" != "xyes"], [
++    AC_CHECK_PROG(HAVE_PIP, pip, yes, no)
++    AS_IF([test "x$HAVE_PIP" = "xno"], [sage_spkg_install_pip=yes])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ef8f1e807bc55d7b8321777486fa867a7c135419 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 9 Nov 2021 09:09:04 -0500
+Subject: Trac #29665: set $SAGE_PIP_INSTALL_FLAGS for
+ --enable-system-site-packages.
+
+We need to pass some special flags to "pip install" to make it do the
+right thing in the precence of system-site packages. Here we introduce
+a new autoconf variable, SAGE_PIP_INSTALL_FLAGS, that will be used
+to pass those flags to the build system.
+
+With autoconf aware of the variable, we substitute its value into the
+sage-build-env-config script for use in spkg-install.in.
+---
+ build/bin/sage-build-env-config.in | 1 +
+ configure.ac                       | 9 +++++++++
+ 2 files changed, 10 insertions(+)
+
+diff --git a/build/bin/sage-build-env-config.in b/build/bin/sage-build-env-config.in
+index 92e7dad..ad62e5f 100644
+--- a/build/bin/sage-build-env-config.in
++++ b/build/bin/sage-build-env-config.in
+@@ -53,6 +53,7 @@ export SAGE_PARI_CFG="@SAGE_PARI_CFG@"
+ 
+ export SAGE_GLPK_PREFIX="@SAGE_GLPK_PREFIX@"
+ export SAGE_FREETYPE_PREFIX="@SAGE_FREETYPE_PREFIX@"
++export SAGE_PIP_INSTALL_FLAGS="@SAGE_PIP_INSTALL_FLAGS@"
+ export SAGE_SUITESPARSE_PREFIX="@SAGE_SUITESPARSE_PREFIX@"
+ 
+ export SAGE_CONFIGURE_FFLAS_FFPACK="@SAGE_CONFIGURE_FFLAS_FFPACK@"
+diff --git a/configure.ac b/configure.ac
+index 6fafb83..6ed07ac 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -441,6 +441,14 @@ AC_ARG_ENABLE(
+     [allow the use of python packages from the system (experimental; default: no)]
+   )], [
+   AS_IF([test "x$enable_system_site_packages" = "xyes"], [
++    dnl When installing python SPKGs in the presence of system-site
++    dnl packages, we need to --ignore-installed so that a patched SPKG
++    dnl can be installed in the presence of an unpatched system package
++    dnl that appears (to pip) to be identical. The --no-deps flag is
++    dnl then needed because --ignore-installed will make any installed
++    dnl dependencies invisible to pip, who does not appreciate that.
++    SAGE_PIP_INSTALL_FLAGS="${SAGE_PIP_INSTALL_FLAGS} --no-deps --ignore-installed"
++
+     SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
+ 
+     dnl We want to raise an error if the user asked for "system site
+@@ -453,6 +461,7 @@ AC_ARG_ENABLE(
+     with_system_python3="force"
+   ])
+ ])
++AC_SUBST([SAGE_PIP_INSTALL_FLAGS])
+ AC_SUBST([SAGE_VENV_FLAGS])
+ 
+ SAGE_SPKG_OPTIONS=""
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3cf365fef84e809e74abd2eb388e7a8e9af9d739 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 9 Nov 2021 21:01:58 -0500
+Subject: Trac #29665: pass $SAGE_PIP_INSTALL_FLAGS to sdh_pip_install.
+
+Since sdh_pip_install is usually called from spkg-install.in, the
+variables from sage-build-env-config will be available. Here we pass
+the contents of $SAGE_PIP_INSTALL_FLAGS to sage-pip-install
+unconditionally, and hope that the user ignores this variable unless
+he truly knows what he is doing.
+---
+ build/bin/sage-dist-helpers | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/build/bin/sage-dist-helpers b/build/bin/sage-dist-helpers
+index fe364e5..1032ac3 100644
+--- a/build/bin/sage-dist-helpers
++++ b/build/bin/sage-dist-helpers
+@@ -303,7 +303,11 @@ sdh_store_wheel() {
+ }
+ 
+ sdh_store_and_pip_install_wheel() {
+-    local pip_options=""
++    # The $SAGE_PIP_INSTALL_FLAGS variable is set by sage-build-env-config.
++    # We skip sanity checking its contents since you should either let sage
++    # decide what it contains, or really know what you are doing.
++    local pip_options="${SAGE_PIP_INSTALL_FLAGS}"
++
+     while [ $# -gt 0 ]; do
+         case $1 in
+             -*) pip_options="$pip_options $1"
+-- 
+cgit v1.0-1-gd88e
+
+
+From 50f0438ee857b8f0b7d7ad924e6bba9c5e1bc033 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:10:46 -0500
+Subject: Trac #29665: add Gentoo package information for pexpect.
+
+---
+ build/pkgs/pexpect/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pexpect/distros/gentoo.txt
+
+diff --git a/build/pkgs/pexpect/distros/gentoo.txt b/build/pkgs/pexpect/distros/gentoo.txt
+new file mode 100644
+index 00000000..30c4b60
+--- /dev/null
++++ b/build/pkgs/pexpect/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pexpect
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4d784688d997290b462646fa7f36114a41f3f453 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:11:25 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pexpect.
+
+---
+ build/pkgs/pexpect/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pexpect/spkg-configure.m4
+
+diff --git a/build/pkgs/pexpect/spkg-configure.m4 b/build/pkgs/pexpect/spkg-configure.m4
+new file mode 100644
+index 00000000..6520856
+--- /dev/null
++++ b/build/pkgs/pexpect/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pexpect], [SAGE_PYTHON_PACKAGE_CHECK([pexpect])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6447122dc76a3b7a58340dbed942db66530b5b07 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:12:05 -0500
+Subject: Trac #29665: add Gentoo package information for docutils.
+
+---
+ build/pkgs/docutils/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/docutils/distros/gentoo.txt
+
+diff --git a/build/pkgs/docutils/distros/gentoo.txt b/build/pkgs/docutils/distros/gentoo.txt
+new file mode 100644
+index 00000000..fe4a452
+--- /dev/null
++++ b/build/pkgs/docutils/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/docutils
+-- 
+cgit v1.0-1-gd88e
+
+
+From 709041480a5fc729b0ee7f1a8a3b16d4d65321b5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:12:38 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for docutils.
+
+---
+ build/pkgs/docutils/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/docutils/spkg-configure.m4
+
+diff --git a/build/pkgs/docutils/spkg-configure.m4 b/build/pkgs/docutils/spkg-configure.m4
+new file mode 100644
+index 00000000..3584e45
+--- /dev/null
++++ b/build/pkgs/docutils/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([docutils], [SAGE_PYTHON_PACKAGE_CHECK([docutils])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 782d38b48ab87afccc43fbc071e7b7ed48fb0a20 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:14:37 -0500
+Subject: Trac #29665: add Gentoo package information for nbclient.
+
+---
+ build/pkgs/nbclient/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbclient/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbclient/distros/gentoo.txt b/build/pkgs/nbclient/distros/gentoo.txt
+new file mode 100644
+index 00000000..06ff18d
+--- /dev/null
++++ b/build/pkgs/nbclient/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbclient
+-- 
+cgit v1.0-1-gd88e
+
+
+From 19ce09336532336f69db74381932d51a429dfaca Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:15:11 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for nbclient.
+
+---
+ build/pkgs/nbclient/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbclient/spkg-configure.m4
+
+diff --git a/build/pkgs/nbclient/spkg-configure.m4 b/build/pkgs/nbclient/spkg-configure.m4
+new file mode 100644
+index 00000000..14178b7
+--- /dev/null
++++ b/build/pkgs/nbclient/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbclient], [SAGE_PYTHON_PACKAGE_CHECK([nbclient])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c063b9de42c1780368000a563d0dbe80b6fff169 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:17:36 -0500
+Subject: Trac #29665: add Gentoo package information for argon2_cffi.
+
+---
+ build/pkgs/argon2_cffi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argon2_cffi/distros/gentoo.txt
+
+diff --git a/build/pkgs/argon2_cffi/distros/gentoo.txt b/build/pkgs/argon2_cffi/distros/gentoo.txt
+new file mode 100644
+index 00000000..2f12ca8
+--- /dev/null
++++ b/build/pkgs/argon2_cffi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/argon2-cffi
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0b4d5699dd51ea52550fba7db9e1cbb8bbac1892 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:18:35 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for argon2_cffi.
+
+---
+ build/pkgs/argon2_cffi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argon2_cffi/spkg-configure.m4
+
+diff --git a/build/pkgs/argon2_cffi/spkg-configure.m4 b/build/pkgs/argon2_cffi/spkg-configure.m4
+new file mode 100644
+index 00000000..03ebc63
+--- /dev/null
++++ b/build/pkgs/argon2_cffi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([argon2_cffi], [SAGE_PYTHON_PACKAGE_CHECK([argon2_cffi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2b4119558a6e0b1aa512848539a237676b035c83 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:30:48 -0500
+Subject: Trac #29665: fix package name in dateutil's install-requires.txt.
+
+---
+ build/pkgs/dateutil/install-requires.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/build/pkgs/dateutil/install-requires.txt b/build/pkgs/dateutil/install-requires.txt
+index 0ae93da..face537 100644
+--- a/build/pkgs/dateutil/install-requires.txt
++++ b/build/pkgs/dateutil/install-requires.txt
+@@ -1 +1 @@
+-dateutil >=2.8.1
++python-dateutil >=2.8.1
+-- 
+cgit v1.0-1-gd88e
+
+
+From df371b7c4d20a3353d43940306ad22e11aba29da Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:31:41 -0500
+Subject: Trac #29665: add Gentoo package information for dateutil.
+
+---
+ build/pkgs/dateutil/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/dateutil/distros/gentoo.txt
+
+diff --git a/build/pkgs/dateutil/distros/gentoo.txt b/build/pkgs/dateutil/distros/gentoo.txt
+new file mode 100644
+index 00000000..e129df7
+--- /dev/null
++++ b/build/pkgs/dateutil/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/python-dateutil
+-- 
+cgit v1.0-1-gd88e
+
+
+From 577695dfdf661ee26c0ffd767bdbf479d95f7fb4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:32:21 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for dateutil.
+
+---
+ build/pkgs/dateutil/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/dateutil/spkg-configure.m4
+
+diff --git a/build/pkgs/dateutil/spkg-configure.m4 b/build/pkgs/dateutil/spkg-configure.m4
+new file mode 100644
+index 00000000..fdcd127
+--- /dev/null
++++ b/build/pkgs/dateutil/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([dateutil], [SAGE_PYTHON_PACKAGE_CHECK([dateutil])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1984651caac624ec4bb58814ca1d57fe66f9881a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:33:51 -0500
+Subject: Trac #29665: add Gentoo package information for setuptools_scm.
+
+---
+ build/pkgs/setuptools_scm/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/setuptools_scm/distros/gentoo.txt
+
+diff --git a/build/pkgs/setuptools_scm/distros/gentoo.txt b/build/pkgs/setuptools_scm/distros/gentoo.txt
+new file mode 100644
+index 00000000..8989597
+--- /dev/null
++++ b/build/pkgs/setuptools_scm/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/setuptools_scm
+-- 
+cgit v1.0-1-gd88e
+
+
+From ebf7c854ed966e7353759be485c4f5a57b9a10fa Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:34:49 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for setuptools_scm.
+
+---
+ build/pkgs/setuptools_scm/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/setuptools_scm/spkg-configure.m4
+
+diff --git a/build/pkgs/setuptools_scm/spkg-configure.m4 b/build/pkgs/setuptools_scm/spkg-configure.m4
+new file mode 100644
+index 00000000..437148c
+--- /dev/null
++++ b/build/pkgs/setuptools_scm/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([setuptools_scm], [
++  SAGE_PYTHON_PACKAGE_CHECK([setuptools_scm])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0dee0d0c28f31b1f619e44c710a3c9e22d2b2544 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:36:33 -0500
+Subject: Trac #29665: add Gentoo package information for nbconvert.
+
+---
+ build/pkgs/nbconvert/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbconvert/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbconvert/distros/gentoo.txt b/build/pkgs/nbconvert/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c45a10
+--- /dev/null
++++ b/build/pkgs/nbconvert/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbconvert
+-- 
+cgit v1.0-1-gd88e
+
+
+From 473789eb11b1838bc32dc8a63509ee199afc8912 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:37:37 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for nbconvert.
+
+---
+ build/pkgs/nbconvert/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbconvert/spkg-configure.m4
+
+diff --git a/build/pkgs/nbconvert/spkg-configure.m4 b/build/pkgs/nbconvert/spkg-configure.m4
+new file mode 100644
+index 00000000..9b5dee3
+--- /dev/null
++++ b/build/pkgs/nbconvert/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbconvert], [SAGE_PYTHON_PACKAGE_CHECK([nbconvert])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f0703b594e57c980d605aa9bc8316c45a7858b3b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:41:51 -0500
+Subject: Trac #29665: add Gentoo package information for jupyter_core.
+
+---
+ build/pkgs/jupyter_core/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyter_core/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyter_core/distros/gentoo.txt b/build/pkgs/jupyter_core/distros/gentoo.txt
+new file mode 100644
+index 00000000..f168c5a
+--- /dev/null
++++ b/build/pkgs/jupyter_core/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyter_core
+-- 
+cgit v1.0-1-gd88e
+
+
+From 061a307cc4a6680d8500fde834975064e59540d5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:42:48 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jupyter_core.
+
+---
+ build/pkgs/jupyter_core/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyter_core/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyter_core/spkg-configure.m4 b/build/pkgs/jupyter_core/spkg-configure.m4
+new file mode 100644
+index 00000000..67df9c3
+--- /dev/null
++++ b/build/pkgs/jupyter_core/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyter_core], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyter_core])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b85abe964ce0b98b5842efe9cbad9bdb1c89202f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:47:08 -0500
+Subject: Trac #29665: add Gentoo package information for jupyter_client.
+
+---
+ build/pkgs/jupyter_client/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyter_client/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyter_client/distros/gentoo.txt b/build/pkgs/jupyter_client/distros/gentoo.txt
+new file mode 100644
+index 00000000..4f1de88
+--- /dev/null
++++ b/build/pkgs/jupyter_client/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyter_client
+-- 
+cgit v1.0-1-gd88e
+
+
+From 86323ff1e0b2507933df6bc2a96c9175957640c5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:48:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jupyter_client.
+
+---
+ build/pkgs/jupyter_client/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyter_client/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyter_client/spkg-configure.m4 b/build/pkgs/jupyter_client/spkg-configure.m4
+new file mode 100644
+index 00000000..fbd3498
+--- /dev/null
++++ b/build/pkgs/jupyter_client/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyter_client], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyter_client])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a8475e27dd30d752d05ab6fea6579e8623501d82 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:48:58 -0500
+Subject: Trac #29665: add Gentoo package information for snowballstemmer.
+
+---
+ build/pkgs/snowballstemmer/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/snowballstemmer/distros/gentoo.txt
+
+diff --git a/build/pkgs/snowballstemmer/distros/gentoo.txt b/build/pkgs/snowballstemmer/distros/gentoo.txt
+new file mode 100644
+index 00000000..63fd851
+--- /dev/null
++++ b/build/pkgs/snowballstemmer/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/snowballstemmer
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0833c9b781062b4ed86d619e050a6f5d60e36080 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:49:38 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for snowballstemmer.
+
+---
+ build/pkgs/snowballstemmer/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/snowballstemmer/spkg-configure.m4
+
+diff --git a/build/pkgs/snowballstemmer/spkg-configure.m4 b/build/pkgs/snowballstemmer/spkg-configure.m4
+new file mode 100644
+index 00000000..6aa0882
+--- /dev/null
++++ b/build/pkgs/snowballstemmer/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([snowballstemmer], [
++  SAGE_PYTHON_PACKAGE_CHECK([snowballstemmer])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 50a1cf2a2bcd7eeec64cbc3f70e3e9fbe5d850fe Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:50:47 -0500
+Subject: Trac #29665: add Gentoo package information for tornado.
+
+---
+ build/pkgs/tornado/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tornado/distros/gentoo.txt
+
+diff --git a/build/pkgs/tornado/distros/gentoo.txt b/build/pkgs/tornado/distros/gentoo.txt
+new file mode 100644
+index 00000000..6ae4b9f
+--- /dev/null
++++ b/build/pkgs/tornado/distros/gentoo.txt
+@@ -0,0 +1 @@
++www-servers/tornado
+-- 
+cgit v1.0-1-gd88e
+
+
+From 118f4da6e03476c726363e8e22ecda32f13bfc33 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:51:26 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for tornado.
+
+---
+ build/pkgs/tornado/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tornado/spkg-configure.m4
+
+diff --git a/build/pkgs/tornado/spkg-configure.m4 b/build/pkgs/tornado/spkg-configure.m4
+new file mode 100644
+index 00000000..1ee5bc9
+--- /dev/null
++++ b/build/pkgs/tornado/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tornado], [SAGE_PYTHON_PACKAGE_CHECK([tornado])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3850701747a6c8ef60840bdfdb589b28d4cd2b9a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:52:21 -0500
+Subject: Trac #29665: add Gentoo package information for jsonschema.
+
+---
+ build/pkgs/jsonschema/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jsonschema/distros/gentoo.txt
+
+diff --git a/build/pkgs/jsonschema/distros/gentoo.txt b/build/pkgs/jsonschema/distros/gentoo.txt
+new file mode 100644
+index 00000000..d708e4c
+--- /dev/null
++++ b/build/pkgs/jsonschema/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jsonschema
+-- 
+cgit v1.0-1-gd88e
+
+
+From 76e3917c8af781af00f642cfada7a79594429e30 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:54:03 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jsonschema.
+
+---
+ build/pkgs/jsonschema/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jsonschema/spkg-configure.m4
+
+diff --git a/build/pkgs/jsonschema/spkg-configure.m4 b/build/pkgs/jsonschema/spkg-configure.m4
+new file mode 100644
+index 00000000..b9e5e21
+--- /dev/null
++++ b/build/pkgs/jsonschema/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jsonschema], [SAGE_PYTHON_PACKAGE_CHECK([jsonschema])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From fd4a16c11669b6dd73ac6325bca820e76db00402 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:55:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ widgetsnbextension.
+
+---
+ build/pkgs/widgetsnbextension/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/widgetsnbextension/spkg-configure.m4
+
+diff --git a/build/pkgs/widgetsnbextension/spkg-configure.m4 b/build/pkgs/widgetsnbextension/spkg-configure.m4
+new file mode 100644
+index 00000000..bf82daf
+--- /dev/null
++++ b/build/pkgs/widgetsnbextension/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([widgetsnbextension], [
++  SAGE_PYTHON_PACKAGE_CHECK([widgetsnbextension])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8079a9f384e3c8480e157dd98c3db2f43c987f4e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:57:20 -0500
+Subject: Trac #29665: add Gentoo package information for importlib_resources.
+
+---
+ build/pkgs/importlib_resources/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/importlib_resources/distros/gentoo.txt
+
+diff --git a/build/pkgs/importlib_resources/distros/gentoo.txt b/build/pkgs/importlib_resources/distros/gentoo.txt
+new file mode 100644
+index 00000000..d5e1f2c
+--- /dev/null
++++ b/build/pkgs/importlib_resources/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/importlib_resources
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2c430d7c52f02779a6c41b98ac2f4edd8b6759c3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:58:00 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ importlib_resources.
+
+---
+ build/pkgs/importlib_resources/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/importlib_resources/spkg-configure.m4
+
+diff --git a/build/pkgs/importlib_resources/spkg-configure.m4 b/build/pkgs/importlib_resources/spkg-configure.m4
+new file mode 100644
+index 00000000..50df55b
+--- /dev/null
++++ b/build/pkgs/importlib_resources/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([importlib_resources], [
++  SAGE_PYTHON_PACKAGE_CHECK([importlib_resources])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 00d13d7bf2e50aae2ccef3b2b30293c70a922af2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:58:38 -0500
+Subject: Trac #29665: add Gentoo package information for kiwisolver.
+
+---
+ build/pkgs/kiwisolver/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/kiwisolver/distros/gentoo.txt
+
+diff --git a/build/pkgs/kiwisolver/distros/gentoo.txt b/build/pkgs/kiwisolver/distros/gentoo.txt
+new file mode 100644
+index 00000000..7b30c95
+--- /dev/null
++++ b/build/pkgs/kiwisolver/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/kiwisolver
+-- 
+cgit v1.0-1-gd88e
+
+
+From 72b7907ef7ea9fa4ff6948ea34cfe2f693ee6c31 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:59:09 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for kiwisolver.
+
+---
+ build/pkgs/kiwisolver/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/kiwisolver/spkg-configure.m4
+
+diff --git a/build/pkgs/kiwisolver/spkg-configure.m4 b/build/pkgs/kiwisolver/spkg-configure.m4
+new file mode 100644
+index 00000000..4e7ac97
+--- /dev/null
++++ b/build/pkgs/kiwisolver/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([kiwisolver], [SAGE_PYTHON_PACKAGE_CHECK([kiwisolver])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 479351279e4e0ea7e2d146434f0daba038765cfd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:00:04 -0500
+Subject: Trac #29665: add Gentoo package information for notebook.
+
+---
+ build/pkgs/notebook/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/notebook/distros/gentoo.txt
+
+diff --git a/build/pkgs/notebook/distros/gentoo.txt b/build/pkgs/notebook/distros/gentoo.txt
+new file mode 100644
+index 00000000..6475d72
+--- /dev/null
++++ b/build/pkgs/notebook/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/notebook
+-- 
+cgit v1.0-1-gd88e
+
+
+From f4d9242ea654977f8ad7865c82eec593e11a36bc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:01:42 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for notebook.
+
+---
+ build/pkgs/notebook/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/notebook/spkg-configure.m4
+
+diff --git a/build/pkgs/notebook/spkg-configure.m4 b/build/pkgs/notebook/spkg-configure.m4
+new file mode 100644
+index 00000000..a17ba95
+--- /dev/null
++++ b/build/pkgs/notebook/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([notebook], [SAGE_PYTHON_PACKAGE_CHECK([notebook])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9837070c7f8e9a71283b84d49d4fd2c94b78a464 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:02:38 -0500
+Subject: Trac #29665: add Gentoo package information for matplotlib_inline.
+
+---
+ build/pkgs/matplotlib_inline/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/matplotlib_inline/distros/gentoo.txt
+
+diff --git a/build/pkgs/matplotlib_inline/distros/gentoo.txt b/build/pkgs/matplotlib_inline/distros/gentoo.txt
+new file mode 100644
+index 00000000..6a5859c
+--- /dev/null
++++ b/build/pkgs/matplotlib_inline/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/matplotlib-inline
+-- 
+cgit v1.0-1-gd88e
+
+
+From 750be73b25b92b4875e47d044360ac0e1116ec3e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:03:28 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for matplotlib_inline.
+
+---
+ build/pkgs/matplotlib_inline/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/matplotlib_inline/spkg-configure.m4
+
+diff --git a/build/pkgs/matplotlib_inline/spkg-configure.m4 b/build/pkgs/matplotlib_inline/spkg-configure.m4
+new file mode 100644
+index 00000000..e59658f
+--- /dev/null
++++ b/build/pkgs/matplotlib_inline/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([matplotlib_inline], [
++  SAGE_PYTHON_PACKAGE_CHECK([matplotlib_inline])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 273505f49698dcd2ab30c2756b07113c9b7e7791 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:04:10 -0500
+Subject: Trac #29665: add Gentoo package information for ipykernel.
+
+---
+ build/pkgs/ipykernel/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipykernel/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipykernel/distros/gentoo.txt b/build/pkgs/ipykernel/distros/gentoo.txt
+new file mode 100644
+index 00000000..88aab61
+--- /dev/null
++++ b/build/pkgs/ipykernel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipykernel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 629ad36c9e4ae0cdff4a013289b4f2911442445e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:04:46 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for ipykernel.
+
+---
+ build/pkgs/ipykernel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipykernel/spkg-configure.m4
+
+diff --git a/build/pkgs/ipykernel/spkg-configure.m4 b/build/pkgs/ipykernel/spkg-configure.m4
+new file mode 100644
+index 00000000..94ecc2d
+--- /dev/null
++++ b/build/pkgs/ipykernel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipykernel], [SAGE_PYTHON_PACKAGE_CHECK([ipykernel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b8d709edb6a24fd5868ee2818b56e78257b2eafa Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:05:26 -0500
+Subject: Trac #29665: add Gentoo package information for prompt_toolkit.
+
+---
+ build/pkgs/prompt_toolkit/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/prompt_toolkit/distros/gentoo.txt
+
+diff --git a/build/pkgs/prompt_toolkit/distros/gentoo.txt b/build/pkgs/prompt_toolkit/distros/gentoo.txt
+new file mode 100644
+index 00000000..6902484
+--- /dev/null
++++ b/build/pkgs/prompt_toolkit/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/prompt_toolkit
+-- 
+cgit v1.0-1-gd88e
+
+
+From 16c0b5e767ae4dac4440510b7253e5c8642b7d2c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:10:39 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for prompt_toolkit.
+
+---
+ build/pkgs/prompt_toolkit/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/prompt_toolkit/spkg-configure.m4
+
+diff --git a/build/pkgs/prompt_toolkit/spkg-configure.m4 b/build/pkgs/prompt_toolkit/spkg-configure.m4
+new file mode 100644
+index 00000000..fd8c1a6
+--- /dev/null
++++ b/build/pkgs/prompt_toolkit/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([prompt_toolkit], [
++  SAGE_PYTHON_PACKAGE_CHECK([prompt_toolkit])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0cd9283e8bb6c8ae413fc8f715c021f7ec3ca2c8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:12:10 -0500
+Subject: Trac #29665: add Gentoo package information for charset_normalizer.
+
+---
+ build/pkgs/charset_normalizer/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/charset_normalizer/distros/gentoo.txt
+
+diff --git a/build/pkgs/charset_normalizer/distros/gentoo.txt b/build/pkgs/charset_normalizer/distros/gentoo.txt
+new file mode 100644
+index 00000000..eefeb89
+--- /dev/null
++++ b/build/pkgs/charset_normalizer/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/charset_normalizer
+-- 
+cgit v1.0-1-gd88e
+
+
+From a04b01a9ab59097d189edcc5ddcb461faede83b2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:12:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ charset_normalizer.
+
+---
+ build/pkgs/charset_normalizer/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/charset_normalizer/spkg-configure.m4
+
+diff --git a/build/pkgs/charset_normalizer/spkg-configure.m4 b/build/pkgs/charset_normalizer/spkg-configure.m4
+new file mode 100644
+index 00000000..18b18cf
+--- /dev/null
++++ b/build/pkgs/charset_normalizer/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([charset_normalizer], [
++  SAGE_PYTHON_PACKAGE_CHECK([charset_normalizer])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d2ea08138711c53046f977b586f33b09b176b2e3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:13:37 -0500
+Subject: Trac #29665: add Gentoo package information for prometheus_client.
+
+---
+ build/pkgs/prometheus_client/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/prometheus_client/distros/gentoo.txt
+
+diff --git a/build/pkgs/prometheus_client/distros/gentoo.txt b/build/pkgs/prometheus_client/distros/gentoo.txt
+new file mode 100644
+index 00000000..aa2889c
+--- /dev/null
++++ b/build/pkgs/prometheus_client/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/prometheus_client
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b0393200e9edd3e26b8a55ba67e5710e7403fcb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:15:09 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for prometheus_client.
+
+---
+ build/pkgs/prometheus_client/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/prometheus_client/spkg-configure.m4
+
+diff --git a/build/pkgs/prometheus_client/spkg-configure.m4 b/build/pkgs/prometheus_client/spkg-configure.m4
+new file mode 100644
+index 00000000..b494588
+--- /dev/null
++++ b/build/pkgs/prometheus_client/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([prometheus_client], [
++  SAGE_PYTHON_PACKAGE_CHECK([prometheus_client])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From cdcd85284f43ca4ad18353ec3527b2901e57b788 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:17:23 -0500
+Subject: Trac #29665: add Gentoo package information for pybind11.
+
+---
+ build/pkgs/pybind11/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pybind11/distros/gentoo.txt
+
+diff --git a/build/pkgs/pybind11/distros/gentoo.txt b/build/pkgs/pybind11/distros/gentoo.txt
+new file mode 100644
+index 00000000..0c500b3
+--- /dev/null
++++ b/build/pkgs/pybind11/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pybind11
+-- 
+cgit v1.0-1-gd88e
+
+
+From efdd1eb64c4799fe3cdf2221824182941b3fda2d Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:17:51 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pybind11.
+
+---
+ build/pkgs/pybind11/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pybind11/spkg-configure.m4
+
+diff --git a/build/pkgs/pybind11/spkg-configure.m4 b/build/pkgs/pybind11/spkg-configure.m4
+new file mode 100644
+index 00000000..cce1cf5
+--- /dev/null
++++ b/build/pkgs/pybind11/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pybind11], [SAGE_PYTHON_PACKAGE_CHECK([pybind11])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b2128f33b68ea33927284116ea598dd186902400 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:19:23 -0500
+Subject: Trac #29665: add Gentoo package information for pkgconfig.
+
+---
+ build/pkgs/pkgconfig/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pkgconfig/distros/gentoo.txt
+
+diff --git a/build/pkgs/pkgconfig/distros/gentoo.txt b/build/pkgs/pkgconfig/distros/gentoo.txt
+new file mode 100644
+index 00000000..32e8618
+--- /dev/null
++++ b/build/pkgs/pkgconfig/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pkgconfig
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b373b49e06aadeb36dc57e500da9a322460e658 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:19:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pkgconfig.
+
+---
+ build/pkgs/pkgconfig/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pkgconfig/spkg-configure.m4
+
+diff --git a/build/pkgs/pkgconfig/spkg-configure.m4 b/build/pkgs/pkgconfig/spkg-configure.m4
+new file mode 100644
+index 00000000..6708293
+--- /dev/null
++++ b/build/pkgs/pkgconfig/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pkgconfig], [SAGE_PYTHON_PACKAGE_CHECK([pkgconfig])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ce578729eb0d14baab365351ba9a9ffffb7b79f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:21:10 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_serializinghtml.
+
+---
+ build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt b/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+new file mode 100644
+index 00000000..38bca8f
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-serializinghtml
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb0f42c32bbce0e4488678312f5e2d88c6f42c9b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:21:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_serializinghtml.
+
+---
+ build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4 b/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+new file mode 100644
+index 00000000..be8e625
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_serializinghtml], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_serializinghtml])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e47dcf985e40475de85c9436a85537751318bc3d Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:22:54 -0500
+Subject: Trac #29665: add Gentoo package information for sphinxcontrib_jsmath.
+
+---
+ build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt b/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+new file mode 100644
+index 00000000..041a471
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-jsmath
+-- 
+cgit v1.0-1-gd88e
+
+
+From 72cff6fd35f93de4fa855bc870569dd733ff5c24 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:23:49 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_jsmath.
+
+---
+ build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4 b/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+new file mode 100644
+index 00000000..e46bde2
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_jsmath], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_jsmath])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a36395d70f759449cd63c1b0990fbdcb4cb25ca0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:24:26 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_devhelp.
+
+---
+ build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..9b5c899
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-devhelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9953a5dd1646ed0ad51d2e3935cf609bc9e7fd1c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:25:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_devhelp.
+
+---
+ build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+new file mode 100644
+index 00000000..8728136
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_devhelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_devhelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b199d5363aad93f3cb23f7904c9553a28b06348f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:25:53 -0500
+Subject: Trac #29665: add Gentoo package information for sphinxcontrib_qthelp.
+
+---
+ build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..7210099
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-qthelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 94ac8806739f3938e73f5857328e91e0d42e98d2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:26:28 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_qthelp.
+
+---
+ build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+new file mode 100644
+index 00000000..81ea5e1
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_qthelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_qthelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From beedc154aa405e8a58aee8889f510db07adc89a7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:26:54 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_applehelp.
+
+---
+ build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..66ac8da
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-applehelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 07d47c3673d6b35423b71f621cb400989c0101c2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:27:19 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_applehelp.
+
+---
+ build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+new file mode 100644
+index 00000000..e834aed
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_applehelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_applehelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 333a66546c5d421735c49dbafd7370a827f22781 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:27:46 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_htmlhelp.
+
+---
+ build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..e080bac
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-htmlhelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From bfaeb3962254439b63f1f2e0e883de462c7831be Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:29:18 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_htmlhelp.
+
+---
+ build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+new file mode 100644
+index 00000000..c77b003
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_htmlhelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_htmlhelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 782cde13da06e8b85806cb7cbc8aceee0364e639 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:30:23 -0500
+Subject: Trac #29665: add Gentoo package information for jupyterlab_pygments.
+
+---
+ build/pkgs/jupyterlab_pygments/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyterlab_pygments/distros/gentoo.txt b/build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+new file mode 100644
+index 00000000..c57b4f1
+--- /dev/null
++++ b/build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyterlab_pygments
+-- 
+cgit v1.0-1-gd88e
+
+
+From 39f974cfa4a8c6e5dd897f152f83ec82f40ee9f7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:31:13 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ jupyterlab_pygments.
+
+---
+ build/pkgs/jupyterlab_pygments/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyterlab_pygments/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyterlab_pygments/spkg-configure.m4 b/build/pkgs/jupyterlab_pygments/spkg-configure.m4
+new file mode 100644
+index 00000000..e46e21f
+--- /dev/null
++++ b/build/pkgs/jupyterlab_pygments/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyterlab_pygments], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyterlab_pygments])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From db704620700fd36cec3bf6125938f3ee00a9eb5e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:29:15 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for ply.
+
+---
+ build/pkgs/ply/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ply/spkg-configure.m4
+
+diff --git a/build/pkgs/ply/spkg-configure.m4 b/build/pkgs/ply/spkg-configure.m4
+new file mode 100644
+index 00000000..ffb0030
+--- /dev/null
++++ b/build/pkgs/ply/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ply], [SAGE_PYTHON_PACKAGE_CHECK([ply])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6aac31dabcdfdef228d7780398a3fda1a4cc566f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:29:51 -0500
+Subject: Trac #29665: add Gentoo package information for ply.
+
+---
+ build/pkgs/ply/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ply/distros/gentoo.txt
+
+diff --git a/build/pkgs/ply/distros/gentoo.txt b/build/pkgs/ply/distros/gentoo.txt
+new file mode 100644
+index 00000000..c8b1630
+--- /dev/null
++++ b/build/pkgs/ply/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ply
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb8d3372936ec37470d69687a0f91592129460ae Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:30:33 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for gast.
+
+---
+ build/pkgs/gast/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/gast/spkg-configure.m4
+
+diff --git a/build/pkgs/gast/spkg-configure.m4 b/build/pkgs/gast/spkg-configure.m4
+new file mode 100644
+index 00000000..26ec59f
+--- /dev/null
++++ b/build/pkgs/gast/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([gast], [SAGE_PYTHON_PACKAGE_CHECK([gast])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1cdc4046a88f1c2b4e5c162f66c6db6090b24194 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:31:15 -0500
+Subject: Trac #29665: add Gentoo package information for gast.
+
+---
+ build/pkgs/gast/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/gast/distros/gentoo.txt
+
+diff --git a/build/pkgs/gast/distros/gentoo.txt b/build/pkgs/gast/distros/gentoo.txt
+new file mode 100644
+index 00000000..3be5e7e
+--- /dev/null
++++ b/build/pkgs/gast/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/gast
+-- 
+cgit v1.0-1-gd88e
+
+
+From 96068b8a3742b65d619190e1d9fa5db399e6b4f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:32:20 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pythran.
+
+---
+ build/pkgs/pythran/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pythran/spkg-configure.m4
+
+diff --git a/build/pkgs/pythran/spkg-configure.m4 b/build/pkgs/pythran/spkg-configure.m4
+new file mode 100644
+index 00000000..592e95b
+--- /dev/null
++++ b/build/pkgs/pythran/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pythran], [SAGE_PYTHON_PACKAGE_CHECK([pythran])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1fa0fad3ae8f7e559c6fc315c6773a7d8aac0bfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:32:55 -0500
+Subject: Trac #29665: add Gentoo package information for pythran.
+
+---
+ build/pkgs/pythran/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pythran/distros/gentoo.txt
+
+diff --git a/build/pkgs/pythran/distros/gentoo.txt b/build/pkgs/pythran/distros/gentoo.txt
+new file mode 100644
+index 00000000..1bb7cdc
+--- /dev/null
++++ b/build/pkgs/pythran/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pythran
+-- 
+cgit v1.0-1-gd88e
+
+
+From d26370e5b8c88e76abfb7c27e3defb71c9e9f711 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:33:50 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for beniget.
+
+---
+ build/pkgs/beniget/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/beniget/spkg-configure.m4
+
+diff --git a/build/pkgs/beniget/spkg-configure.m4 b/build/pkgs/beniget/spkg-configure.m4
+new file mode 100644
+index 00000000..8ae6101
+--- /dev/null
++++ b/build/pkgs/beniget/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([beniget], [SAGE_PYTHON_PACKAGE_CHECK([beniget])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From eeeb296ed9b9694a865534103fd58e62a151ef5e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:34:22 -0500
+Subject: Trac #29665: add Gentoo package information for beniget.
+
+---
+ build/pkgs/beniget/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/beniget/distros/gentoo.txt
+
+diff --git a/build/pkgs/beniget/distros/gentoo.txt b/build/pkgs/beniget/distros/gentoo.txt
+new file mode 100644
+index 00000000..1a5972c
+--- /dev/null
++++ b/build/pkgs/beniget/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/beniget
+-- 
+cgit v1.0-1-gd88e
+
+
+From 078b2ff272d0eeff5cce40ad7eb176d9ddd7bdff Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:35:37 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for alabaster.
+
+---
+ build/pkgs/alabaster/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/alabaster/spkg-configure.m4
+
+diff --git a/build/pkgs/alabaster/spkg-configure.m4 b/build/pkgs/alabaster/spkg-configure.m4
+new file mode 100644
+index 00000000..4eca6e0
+--- /dev/null
++++ b/build/pkgs/alabaster/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([alabaster], [SAGE_PYTHON_PACKAGE_CHECK([alabaster])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7dc264353e5f64110431ff28c1b8b7e89699e9bd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:36:06 -0500
+Subject: Trac #29665: add Gentoo package information for alabaster.
+
+---
+ build/pkgs/alabaster/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/alabaster/distros/gentoo.txt
+
+diff --git a/build/pkgs/alabaster/distros/gentoo.txt b/build/pkgs/alabaster/distros/gentoo.txt
+new file mode 100644
+index 00000000..cffece6
+--- /dev/null
++++ b/build/pkgs/alabaster/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/alabaster
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8011a5e675e7e61a77ce34a299ee961a9f44253f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:43:59 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ importlib_metadata.
+
+---
+ build/pkgs/importlib_metadata/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/importlib_metadata/spkg-configure.m4
+
+diff --git a/build/pkgs/importlib_metadata/spkg-configure.m4 b/build/pkgs/importlib_metadata/spkg-configure.m4
+new file mode 100644
+index 00000000..0554e52
+--- /dev/null
++++ b/build/pkgs/importlib_metadata/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([importlib_metadata], [
++  SAGE_PYTHON_PACKAGE_CHECK([importlib_metadata])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 928ca0019e3ec6c4541a16b28bcc6710df6d010b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:44:28 -0500
+Subject: Trac #29665: add Gentoo package information for importlib_metadata.
+
+---
+ build/pkgs/importlib_metadata/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/importlib_metadata/distros/gentoo.txt
+
+diff --git a/build/pkgs/importlib_metadata/distros/gentoo.txt b/build/pkgs/importlib_metadata/distros/gentoo.txt
+new file mode 100644
+index 00000000..4f92786
+--- /dev/null
++++ b/build/pkgs/importlib_metadata/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/importlib_metadata
+-- 
+cgit v1.0-1-gd88e
+
+
+From 135f184f7498a2046065e669723e68efe2d65cee Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 21:16:58 -0500
+Subject: Trac #29665: fix sage.misc.package doctest with system alabaster.
+
+When alabaster from the system is used, these tests won't be able to
+find its SPKG installed. Add some ellipses, and switch one test to
+look for sage_conf instead.
+---
+ src/sage/misc/package.py | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/sage/misc/package.py b/src/sage/misc/package.py
+index 84f3d50..c7ad206 100644
+--- a/src/sage/misc/package.py
++++ b/src/sage/misc/package.py
+@@ -386,9 +386,9 @@ def installed_packages(exclude_pip=True):
+     EXAMPLES::
+ 
+         sage: sorted(installed_packages().keys())  # optional - build
+-        [...'alabaster', ...'sage_conf', ...]
+-        sage: installed_packages()['alabaster']  # optional - build, random
+-        '0.7.12'
++        [...'sage_conf', ...]
++        sage: installed_packages()['sage_conf']  # optional - build, random
++        '9.5'
+ 
+     .. SEEALSO::
+ 
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch b/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
new file mode 100644
index 000000000000..7ef3826aa4d2
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
@@ -0,0 +1,27 @@
+diff --git a/src/bin/sage-runtests b/src/bin/sage-runtests
+index 589dc8cd37..6bb8bf99a4 100755
+--- a/src/bin/sage-runtests
++++ b/src/bin/sage-runtests
+@@ -154,21 +154,4 @@ if __name__ == "__main__":
+     DC = DocTestController(args, args.filenames)
+     err = DC.run()
+ 
+-    try:
+-        exit_code_pytest = 0
+-        import pytest
+-        pytest_options = ["--import-mode", "importlib"]
+-        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.")
+-
+-    if err == 0:
+-        sys.exit(exit_code_pytest)
+-    else:
+-        sys.exit(err)
++    sys.exit(err)
diff --git a/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch b/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
new file mode 100644
index 000000000000..093e3d56eb33
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
@@ -0,0 +1,42 @@
+More site packages not included in trac 29665
+
+diff --git a/build/pkgs/gmpy2/spkg-configure.m4 b/build/pkgs/gmpy2/spkg-configure.m4
+new file mode 100644
+index 0000000000..2d0390f7db
+--- /dev/null
++++ b/build/pkgs/gmpy2/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([gmpy2], [SAGE_PYTHON_PACKAGE_CHECK([gmpy2])])
+diff --git a/build/pkgs/sphinx/spkg-configure.m4 b/build/pkgs/sphinx/spkg-configure.m4
+new file mode 100644
+index 0000000000..e149fbb2cf
+--- /dev/null
++++ b/build/pkgs/sphinx/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([sphinx], [SAGE_PYTHON_PACKAGE_CHECK([sphinx])])
+diff --git a/build/pkgs/typing_extensions/spkg-configure.m4 b/build/pkgs/typing_extensions/spkg-configure.m4
+new file mode 100644
+index 0000000000..d475fd8257
+--- /dev/null
++++ b/build/pkgs/typing_extensions/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([typing_extensions], [SAGE_PYTHON_PACKAGE_CHECK([typing_extensions])])
+-- 
+diff --git a/build/pkgs/gmpy2/install-requires.txt b/build/pkgs/gmpy2/install-requires.txt
+index 51d24518ef..c25feff557 100644
+--- a/build/pkgs/gmpy2/install-requires.txt
++++ b/build/pkgs/gmpy2/install-requires.txt
+@@ -1,3 +1 @@
+-# We would like to write gmpy2 >=2.1.0b5, but pipenv does not accept prereleases in version ranges
+-# https://github.com/pypa/pipenv/issues/1760
+-gmpy2 ==2.1.0rc1
++gmpy2 >=2.1
+diff --git a/build/pkgs/ptyprocess/install-requires.txt b/build/pkgs/ptyprocess/install-requires.txt
+index de89260872..7c336f636c 100644
+--- a/build/pkgs/ptyprocess/install-requires.txt
++++ b/build/pkgs/ptyprocess/install-requires.txt
+@@ -1,3 +1,3 @@
+-ptyprocess ==0.5.1
++ptyprocess
+ # https://trac.sagemath.org/ticket/31280#comment:42 and following
+ # sagelib is not compatible with ptyprocess 0.5.2, 0.6, and 0.7
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 33b40acbabeb..a32c5d18f378 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -22,11 +22,13 @@ distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
 checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
 python_version=3
 
-build_options="debug system_python3"
+build_options="debug system_python3 system_site_packages"
 desc_option_debug="Build with debug symbols"
 desc_option_system_python="Build using system python 3"
-build_options_default="system_python3"
+desc_option_system_python="Build using system python site-packages"
+build_options_default="system_python3 system_site_packages"
 configure_args+=" $(vopt_with system_python3)"
+configure_args+=" $(vopt_enable system_site_packages)"
 
 # path where sage will be installed
 _SAGE_ROOT=/usr/lib/sage-${version}
@@ -163,6 +165,8 @@ do_check() {
 	fi
 	if [ "$XBPS_CHECK_PKGS" = full ]; then
 		_test_args="--long $_test_args"
+	else
+		_test_args="--warn-long 5.0 $_test_args"
 	fi
 	# since make check will build the docs, run test like this instead
 	./sage -tp ${XBPS_MAKEJOBS} ${_test_args}
@@ -182,7 +186,7 @@ makedepends+=" automake gettext gettext-devel"
 # other host dependencies
 makedepends+=" cmake curl git ninja pandoc patch pkg-config python3 tox"
 
-# already in void
+# standard dependencies
 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
@@ -202,7 +206,49 @@ makedepends+="
  brial-devel cliquer-devel gfan libbraiding-devel libhomfly-devel
  lrcalc-devel nauty-devel palp tachyon
  maxima-ecl primesieve-devel primecount-devel
+ ffmpeg ImageMagick
 "
 
 # TODO: optional
 # 4ti2 coxeter3 libsemigroups lrslib pdf2svg perl_mongodb polymake
+
+# TODO: standard
+# cvxopt importlib_resources
+
+# python packages for trac-29665
+_sage_python3_modules="
+ python3-Babel python3-Jinja2 python3-MarkupSafe python3-Pillow
+ python3-Pygments python3-Sphinx python3-alabaster python3-argcomplete
+ python3-argon2 python3-attrs python3-backcall python3-beniget
+ python3-bleach python3-certifi python3-cffi python3-charset-normalizer
+ python3-cycler python3-dateutil python3-decorator python3-defusedxml
+ python3-docutils python3-entrypoints python3-flit_core python3-gast
+ python3-gmpy2 python3-html5lib python3-idna python3-imagesize
+ python3-importlib_metadata python3-ipython python3-ipython_genutils
+ python3-ipython_ipykernel python3-jedi python3-jsonschema
+ python3-jupyter_client python3-jupyter_core python3-jupyter_ipywidgets
+ python3-jupyter_nbconvert python3-jupyter_nbformat
+ python3-jupyter_notebook python3-jupyterlab_pygments python3-kiwisolver
+ python3-matplotlib python3-matplotlib-inline python3-mistune
+ python3-mpmath python3-nbclient python3-nest_asyncio python3-networkx
+ python3-numpy python3-packaging python3-pandocfilters python3-parsing
+ python3-parso python3-pexpect python3-pickleshare python3-pip
+ python3-pkgconfig python3-pluggy python3-ply python3-prometheus_client
+ python3-prompt_toolkit python3-ptyprocess python3-py python3-pybind11
+ python3-pycparser python3-pyrsistent python3-pytz python3-pyzmq
+ python3-requests python3-scipy python3-send2trash python3-setuptools
+ python3-setuptools_scm python3-simplegeneric python3-six
+ python3-snowballstemmer python3-sphinxcontrib-applehelp
+ python3-sphinxcontrib-devhelp python3-sphinxcontrib-htmlhelp
+ python3-sphinxcontrib-jsmath python3-sphinxcontrib-qthelp
+ python3-sphinxcontrib-serializinghtml python3-sympy python3-terminado
+ python3-testpath python3-texttable python3-toml python3-tomli
+ python3-tornado python3-traitlets python3-typing_extensions
+ python3-tzlocal python3-urllib3 python3-wcwidth python3-webencodings
+ python3-wheel python3-zipp pythran
+ "
+
+if [ "$build_option_system_site_packages" ]; then
+	makedepends+=" $_sage_python3_modules"
+	depends+=" $_sage_python3_modules"
+fi

From 281f1b4634eb9b10b4ddb228e8b8069287a46d84 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 3 Jan 2022 20:47:52 -0300
Subject: [PATCH 24/41] sagemath: use small source tarball + upstream packages

---
 srcpkgs/sagemath/template | 97 ++++++++++++++++++++++++++-------------
 1 file changed, 64 insertions(+), 33 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index a32c5d18f378..0de0061b09df 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -18,8 +18,8 @@ short_desc="Open source mathematics software"
 maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
-distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
-checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
+distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
+checksum=aea4c5a8d3b32af2fba644269b9daf4f62471471ba2d7d83da0f8098a5f53225
 python_version=3
 
 build_options="debug system_python3 system_site_packages"
@@ -33,42 +33,72 @@ configure_args+=" $(vopt_enable system_site_packages)"
 # 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} ;;
-esac
+_SAGE_UPSTREAM_MIRROR=https://mirrors.mit.edu/sage/spkg/upstream
 
-# extra upstream packages (trac-32968 / trac-33040)
 _upstream="
- https://pypi.io/packages/source/s/sphinx/Sphinx-4.3.1.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
+${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
+${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
+${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
+${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
+${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
+${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
+${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
+https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
+https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
+http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
+${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
+${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
+${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
+${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
+${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
+https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
+${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
+https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
+${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
 "
 
 checksum+="
- 32a5b3e9a1b176cc25ed048557d4d3d01af635e6b76c5bc7a43b0a34447fbd45
-
- 9c87405839a19696e837b3b818fed3f5f69f16f1eec1a1ad77e043dcea9c772f
- fc4453705b81d03568d5b808ad8f09c77c47534f6ac2e72e733f9ca4714aa75c
- acad2d8b20a1af07d4e4c9d2e9285c5ed9104354062f275f3fcd88dcef4f1326
- 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
- 78884e7c1d4b00ce3cea67b44566851c4343c120abd683433ce934a68ea58872
- 0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86
- b8e2f83c56e141920c39464b852de3719dfbfb6e3c99a2d8da0edf4fb33176ed
- d9bdec0013ef1eb5a84ab39a3b3868911598afa494f5faa038647101504e2b81
- b2e9810e09c3a47b73ce9cab5a72243a1258f61e7900969097a817232246ce1c
- 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
- 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
+c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
+d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
+4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
+3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
+03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
+5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
+cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
+5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
+581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
+6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
+07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
+a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
+ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
+d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
+169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
+5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
+cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
+471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
+78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
+edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
+b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
+3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
+545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
+cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
+718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
+dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
 "
 
 for u in ${_upstream}; do
@@ -101,6 +131,7 @@ post_extract() {
 	mv -T $wrksrc $_SAGE_ROOT
 	ln -srfT $_SAGE_ROOT $wrksrc
 
+	mkdir -p $wrksrc/upstream
 	for u in ${_upstream}; do
 		cp "$XBPS_SRCDISTDIR/${pkgname}-${version}/${u##*[/>]}" $wrksrc/upstream
 	done

From 65a14f88f1953c523dadcec48a636e065a1a5add Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 13:38:02 -0300
Subject: [PATCH 25/41] sagemath: for CI use fixed random-seed=0

---
 srcpkgs/sagemath/template | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 0de0061b09df..b5b99d2c122d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -194,6 +194,10 @@ do_check() {
 	if [ -z "$_test_args" ]; then
 		_test_args=--all
 	fi
+	if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
+		# for CI use a predictable random seed
+		_test_args="--random-seed=0 $_test_args"
+	fi
 	if [ "$XBPS_CHECK_PKGS" = full ]; then
 		_test_args="--long $_test_args"
 	else

From 084afc8cf07bafa926a023c9a162850dc308531d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 14:40:27 -0300
Subject: [PATCH 26/41] sagemath: upstream two patches

---
 ...ble-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch} |  6 +++---
 ...rse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch} | 10 +++++-----
 2 files changed, 8 insertions(+), 8 deletions(-)
 rename srcpkgs/sagemath/patches/{0001-sage-site-exec-only-if-it-is-executable.patch => trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch} (94%)
 rename srcpkgs/sagemath/patches/{0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch => trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch} (81%)

diff --git a/srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch b/srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
similarity index 94%
rename from srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch
rename to srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
index ce17c6d6e954..7fdb3d697222 100644
--- a/srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch
+++ b/srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
@@ -1,14 +1,14 @@
 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
+Subject: 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
+index 4c0fa17..153e610 100755
 --- a/src/bin/sage
 +++ b/src/bin/sage
 @@ -129,7 +129,7 @@ usage() {
@@ -39,5 +39,5 @@ index 4c0fa17426..153e610a2e 100755
              # fallthrough if there is no sage-site script
          fi
 -- 
-2.34.1
+cgit v1.0-1-gd88e
 
diff --git a/srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch b/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
similarity index 81%
rename from srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch
rename to srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
index bab6d8441d42..350c41ac3928 100644
--- a/srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch
+++ b/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
@@ -1,16 +1,16 @@
-From 57e3eba28c9b4ee6bd3407d0715b8bd00aaf04a7 Mon Sep 17 00:00:00 2001
+From 53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6 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
+Subject: sagetex: Fix a warning when byte-compiling sagetexparse.py
 
 ---
- .../sagetex/patches/sagetex-fix-warning.patch    | 16 ++++++++++++++++
+ build/pkgs/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
+index 00000000..d82ab67
 --- /dev/null
 +++ b/build/pkgs/sagetex/patches/sagetex-fix-warning.patch
 @@ -0,0 +1,16 @@
@@ -31,5 +31,5 @@ index 0000000000..d82ab675dd
 +     self.result += t.code[1:-1] + '\n\n'
 + 
 -- 
-2.34.1
+cgit v1.0-1-gd88e
 

From 60f7f2858a07e8780a6304095d09921b9598cfe3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 19:57:59 -0300
Subject: [PATCH 27/41] sagemath: reorder upstream sources and add two missing
 ones

---
 srcpkgs/sagemath/template | 60 ++++++++++++++++++++++-----------------
 1 file changed, 34 insertions(+), 26 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index b5b99d2c122d..f53cba947c88 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -36,69 +36,77 @@ _SAGE_ROOT=/usr/lib/sage-${version}
 _SAGE_UPSTREAM_MIRROR=https://mirrors.mit.edu/sage/spkg/upstream
 
 _upstream="
-${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
 ${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
 ${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
+
+${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
 ${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
 ${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
 ${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
 ${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
 ${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
 ${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
-https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
-https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
-http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
 ${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
 ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
 ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
 ${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
 ${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${PYPI_SITE}/P/PyCygwin/PyCygwin-0.1.tar.gz
 ${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
-https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+${PYPI_SITE}/s/setuptools/setuptools-59.2.0.tar.gz
 ${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
 ${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
-https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
 ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
+
+https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
+https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
+http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
+https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
 "
 
 checksum+="
-dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
 c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
 d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
+5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
+ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
+169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
+cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
+edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
+cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
+
+dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
 3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
 03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
 5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
 cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
-5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
-c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
-6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
-07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
 a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
-ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
 d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
-169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
 5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
-cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
 471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
 78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
-edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+45a5e295590c469a49b2804bfdb89059e942d768ad3b813f484d7b5bff48d226
 ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
-b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
-3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+157d21de9d055ab9e8ea3186d91e7f4f865e11f42deafa952d90842671fc2576
 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
 545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
-cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
-718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
 dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
+
+c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
+6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
+07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
+3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
 "
 
 for u in ${_upstream}; do

From 1b669a62fa821c499b4e89c9646196be268343e3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 9 Jan 2022 12:45:47 -0300
Subject: [PATCH 28/41] sagemath: do not download anything patch

---
 .../patches/00-Do_not_download_anything.patch         | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 srcpkgs/sagemath/patches/00-Do_not_download_anything.patch

diff --git a/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch b/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch
new file mode 100644
index 000000000000..35aef7b8d456
--- /dev/null
+++ b/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch
@@ -0,0 +1,11 @@
+--- a/build/sage_bootstrap/tarball.py	2022-01-07 19:17:06.754747955 -0300
++++ b/build/sage_bootstrap/tarball.py	2022-01-07 19:25:31.844139381 -0300
+@@ -158,6 +158,8 @@
+                             .format(destination=destination))
+         successful_download = False
+         log.info('Attempting to download package {0} from mirrors'.format(self.filename))
++        log.info('ERROR: downloading is disabled, add file to template instead')
++        return
+         for mirror in MirrorList():
+             url = mirror + '/'.join(['spkg', 'upstream', self.package.name, self.filename])
+             log.info(url)

From 404e426fb063dd372618bba2040ff1a3663f33c5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 9 Jan 2022 13:27:49 -0300
Subject: [PATCH 29/41] sagemath: update to 9.5.rc0.

---
 ...184f7498a2046065e669723e68efe2d65cee.patch |    6 +-
 ...1d4ced4264f65ab704f725f6f5879b012796.patch |  263 ----
 ...a54526829b79d5d236a40f83ddc6ce7b2696.patch | 1196 -----------------
 ...9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch |   27 -
 ...3f4f32246ad9ded6d37f1f2f12a589a81f4.patch} |    4 +-
 ...03138d0403be7c7cb303de2bc0a0e0b6793c.patch |   82 --
 ...f3a1611fed0cc66fb838eb85739646dd34d.patch} |   94 +-
 ...49c415e11d0522bff9013bc1509264b26ebf.patch |   27 +
 ...ip_doctest_singular_4.2.1--see_33134.patch |   13 +
 srcpkgs/sagemath/template                     |    6 +-
 10 files changed, 72 insertions(+), 1646 deletions(-)
 delete mode 100644 srcpkgs/sagemath/patches/trac-30766-system_python_3.10-df9f1d4ced4264f65ab704f725f6f5879b012796.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
 rename srcpkgs/sagemath/patches/{trac-33064-sage_docbuild_ignore_cache_save_permission_error-f767cf1eadfd8ab540a31c5c5ef09d56df09b90e.patch => trac-33064-sage_docbuild_ignore_cache_save_permission_error-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch} (92%)
 delete mode 100644 srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
 rename srcpkgs/sagemath/patches/{trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch => trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch} (63%)
 create mode 100644 srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch

diff --git a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
index b641113927e7..0ecb27c593cd 100644
--- a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
+++ b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
@@ -5615,9 +5615,9 @@ index 84f3d50..c7ad206 100644
      EXAMPLES::
  
          sage: sorted(installed_packages().keys())  # optional - build
--        [...'alabaster', ...'sage_conf', ...]
--        sage: installed_packages()['alabaster']  # optional - build, random
--        '0.7.12'
+-        [...'gmpy2', ...'sage_conf', ...]
+-        sage: installed_packages()['gmpy2']  # optional - build, random
+-        '2.1.0b5'
 +        [...'sage_conf', ...]
 +        sage: installed_packages()['sage_conf']  # optional - build, random
 +        '9.5'
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
deleted file mode 100644
index a1cb4c834482..000000000000
--- a/srcpkgs/sagemath/patches/trac-30766-system_python_3.10-df9f1d4ced4264f65ab704f725f6f5879b012796.patch
+++ /dev/null
@@ -1,263 +0,0 @@
-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-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch b/srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
deleted file mode 100644
index 3ae6fe01822d..000000000000
--- a/srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
+++ /dev/null
@@ -1,1196 +0,0 @@
-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/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch b/srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
deleted file mode 100644
index 485fb0176f45..000000000000
--- a/srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-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: 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 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"
- 
- # 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)
--- 
-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-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
similarity index 92%
rename from srcpkgs/sagemath/patches/trac-33064-sage_docbuild_ignore_cache_save_permission_error-f767cf1eadfd8ab540a31c5c5ef09d56df09b90e.patch
rename to srcpkgs/sagemath/patches/trac-33064-sage_docbuild_ignore_cache_save_permission_error-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
index 20fa12e570eb..04f04cfd6718 100644
--- 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-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
@@ -1,4 +1,4 @@
-From f767cf1eadfd8ab540a31c5c5ef09d56df09b90e Mon Sep 17 00:00:00 2001
+From e89193f4f32246ad9ded6d37f1f2f12a589a81f4 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
@@ -8,7 +8,7 @@ Subject: sage_docbuild: do not fail when cache cannot be saved
  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
+index 466ca82..f8c8ebd 100644
 --- a/src/sage_docbuild/__init__.py
 +++ b/src/sage_docbuild/__init__.py
 @@ -856,9 +856,12 @@ class ReferenceSubBuilder(DocBuilder):
diff --git a/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch b/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
deleted file mode 100644
index 6bc5193b75ee..000000000000
--- a/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-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
-
-
-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/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch b/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
similarity index 63%
rename from srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch
rename to srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
index 3794aa7f019b..04fca4815a00 100644
--- a/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch
+++ b/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
@@ -1,4 +1,4 @@
-From 7d3381b21e4716cfa8a33915621a12f0eba74233 Mon Sep 17 00:00:00 2001
+From 18d0477153af6f453a0e84f78030535f6a36ce87 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
@@ -10,56 +10,56 @@ Subject: doctests: remove dochtml label from some tests that don't need docs
  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
+index c788623..527ed90 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  # optional - sagemath_doc_html
+-        sage: thematic_index = os.path.join(SAGE_DOC, "html", "en", "thematic_tutorials", "index.html")  # optional - sagemath_doc_html
 +        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
+         sage: for line in open(thematic_index).readlines():  # optional - sagemath_doc_html
          ....:     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
+index 4c56aea..583ca06 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  # optional - sagemath_doc_html
+-    sage: docfilename = os.path.join(SAGE_DOC, 'html', 'en', 'reference', 'calculus', 'sage', 'symbolic', 'expression.html')  # optional - sagemath_doc_html
 +    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
+     sage: with open(docfilename) as fobj:  # optional - sagemath_doc_html
      ....:     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='',
+@@ -845,12 +845,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  # optional - sagemath_doc_html
+-        sage: len(_search_src_or_doc('src', r'matrix\(', 'incidence_structures', 'self', 'combinat', interact=False).splitlines()) > 1  # optional - sagemath_doc_html
 +        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)
+         sage: 'abvar/homology' in _search_src_or_doc('doc', 'homology', 'variety', interact=False)  # optional - sagemath_doc_html, 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)  # optional - sagemath_doc_html
 +        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:
+@@ -1369,7 +1369,7 @@ class _sage_doc:
  
-         sage: browse_sage_doc._open("reference", testing=True)[0]  # optional - dochtml, indirect doctest
+         sage: browse_sage_doc._open("reference", testing=True)[0]  # optional - sagemath_doc_html, 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]  # optional - sagemath_doc_html
 +        sage: browse_sage_doc(identity_matrix, 'rst')[-107:-47]
          'Full MatrixSpace of 3 by 3 sparse matrices over Integer Ring'
      """
@@ -68,7 +68,7 @@ index eb70516..b4848ed 100644
 cgit v1.0-1-gd88e
 
 
-From 42a76c3f82edecc9c6c53c661251677e3e907584 Mon Sep 17 00:00:00 2001
+From 88dd9f3a1611fed0cc66fb838eb85739646dd34d 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
@@ -78,7 +78,7 @@ Subject: doctests: add dochtml label to some tests that need docs installed
  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
+index f8c8ebd..d329009 100644
 --- a/src/sage_docbuild/__init__.py
 +++ b/src/sage_docbuild/__init__.py
 @@ -105,7 +105,7 @@ def builder_helper(type):
@@ -86,7 +86,7 @@ index 4a71c91..dd233bd 100644
          sage: from sage_docbuild import _build_many as build_many
          sage: helper = builder_helper("html")
 -        sage: try:
-+        sage: try:  # optional - dochtml
++        sage: try:  # optional - sagemath_doc_html
          ....:     build_many(build_ref_doc, [("docname", "en", "html", {})])
          ....: except Exception as E:
          ....:     "Non-exception during docbuild: abort pool operation" in str(E)
@@ -95,7 +95,7 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import DocBuilder
              sage: b = DocBuilder('tutorial')
 -            sage: b._output_dir('html')
-+            sage: b._output_dir('html')         # optional - dochtml
++            sage: b._output_dir('html')         # optional - sagemath_doc_html
              '.../html/en/tutorial'
          """
          d = os.path.join(SAGE_DOC, type, self.lang, self.name)
@@ -104,7 +104,7 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import DocBuilder
              sage: b = DocBuilder('tutorial')
 -            sage: b._doctrees_dir()
-+            sage: b._doctrees_dir()             # optional - docthml
++            sage: b._doctrees_dir()             # optional - sagemath_doc_html
              '.../doctrees/en/tutorial'
          """
          d = os.path.join(SAGE_DOC, 'doctrees', self.lang, self.name)
@@ -113,7 +113,7 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import ReferenceBuilder
              sage: b = ReferenceBuilder('reference')
 -            sage: b._output_dir('html')
-+            sage: b._output_dir('html')         # optional - dochtml
++            sage: b._output_dir('html')         # optional - sagemath_doc_html
              '.../html/en/reference'
          """
          if lang is None:
@@ -122,56 +122,10 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import ReferenceTopBuilder
              sage: b = ReferenceTopBuilder('reference')
 -            sage: b._output_dir('html')
-+            sage: b._output_dir('html')         # optional - dochtml
++            sage: b._output_dir('html')         # optional - sagemath_doc_html
              '.../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/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch b/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
new file mode 100644
index 000000000000..d32f1e4d5e9f
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
@@ -0,0 +1,27 @@
+From 836249c415e11d0522bff9013bc1509264b26ebf Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Sun, 9 Jan 2022 16:51:22 -0300
+Subject: trac 33135: add filter to ignore deprecation warnings
+
+---
+ src/sage/all.py | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/sage/all.py b/src/sage/all.py
+index 01ef327..19ca3d4 100644
+--- a/src/sage/all.py
++++ b/src/sage/all.py
+@@ -96,6 +96,10 @@ warnings.filterwarnings('ignore', category=DeprecationWarning,
+ warnings.filterwarnings('ignore', category=DeprecationWarning,
+                         module='pythran')
+ 
++warnings.filterwarnings('ignore', category=DeprecationWarning,
++                        message='The distutils(.sysconfig module| package) is deprecated',
++                        module='numpy|sage.env|sage.features')
++
+ ################ end setup warnings ###############################
+ 
+ 
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
new file mode 100644
index 000000000000..438078a92036
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage/rings/polynomial/hilbert.pyx b/src/sage/rings/polynomial/hilbert.pyx
+index 4cd91d0a46..323b168c4e 100644
+--- a/src/sage/rings/polynomial/hilbert.pyx
++++ b/src/sage/rings/polynomial/hilbert.pyx
+@@ -578,7 +578,7 @@ def hilbert_poincare_series(I, grading=None):
+ 
+     This example exceeded the capabilities of Singular before version 4.2.1p2::
+ 
+-        sage: J.hilbert_numerator(algorithm='singular')
++        sage: J.hilbert_numerator(algorithm='singular')   # not tested - requires singular 4.2.1p2
+         120*t^33 - 3465*t^32 + 48180*t^31 - 429374*t^30 + 2753520*t^29 - 13522410*t^28 + 52832780*t^27 - 168384150*t^26 + 445188744*t^25 - 987193350*t^24 + 1847488500*t^23 + 1372406746*t^22 - 403422496*t^21 - 8403314*t^20 - 471656596*t^19 + 1806623746*t^18 + 752776200*t^17 + 752776200*t^16 - 1580830020*t^15 + 1673936550*t^14 - 1294246800*t^13 + 786893250*t^12 - 382391100*t^11 + 146679390*t^10 - 42299400*t^9 + 7837830*t^8 - 172260*t^7 - 468930*t^6 + 183744*t^5 - 39270*t^4 + 5060*t^3 - 330*t^2 + 1
+ 
+     """
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f53cba947c88..f688629fc26d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -1,6 +1,6 @@
 # Template file for 'sagemath'
 pkgname=sagemath
-version=9.5.beta9
+version=9.5.rc0
 revision=1
 wrksrc=sage-$version
 build_style=configure
@@ -19,7 +19,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
-checksum=aea4c5a8d3b32af2fba644269b9daf4f62471471ba2d7d83da0f8098a5f53225
+checksum=8012e3ac35290fa9b2cb837eeca149925784c2378b486731226944e4afd8a4e6
 python_version=3
 
 build_options="debug system_python3 system_site_packages"
@@ -128,7 +128,7 @@ nostrip=yes
 noshlibprovides=yes
 
 # don't rewrite python shebang as sage uses its own python (for now)
-_no_python_shebang=yes
+#_no_python_shebang=yes
 
 # compile python code in sage venv
 pycompile_dirs="$_SAGE_ROOT/venv/"

From b835519b74626b088e5732ca106ea55b2784b9cf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 10 Jan 2022 16:32:54 -0300
Subject: [PATCH 30/41] sagemath: use system gap

---
 ...f491e5ce599ba185f5e93f02e0fcebd76c9e.patch | 57 +++++++++++++++++++
 .../patches/zzz-skip_doctest_system_gap.patch | 13 +++++
 srcpkgs/sagemath/template                     | 15 ++++-
 3 files changed, 82 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch

diff --git a/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch b/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
new file mode 100644
index 000000000000..da88a369db0d
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
@@ -0,0 +1,57 @@
+From 2c981351bb60089530b0598d3e9a909a23d4d4d8 Mon Sep 17 00:00:00 2001
+From: Thierry Thomas <thierry@FreeBSD.org>
+Date: Mon, 22 Mar 2021 03:04:12 +0100
+Subject: 29644: Add spkg-configure.m4 for gap
+
+---
+ build/pkgs/gap/spkg-configure.m4 | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+ create mode 100644 build/pkgs/gap/spkg-configure.m4
+
+diff --git a/build/pkgs/gap/spkg-configure.m4 b/build/pkgs/gap/spkg-configure.m4
+new file mode 100644
+index 00000000..91cd089
+--- /dev/null
++++ b/build/pkgs/gap/spkg-configure.m4
+@@ -0,0 +1,8 @@
++SAGE_SPKG_CONFIGURE([gap], [
++    SAGE_SPKG_DEPCHECK([gmp], [
++       AC_CHECK_HEADER([gap/system.h], [
++        AC_SEARCH_LIBS([GAP_COMM], [gap], [
++        ], [sage_spkg_install_gap=yes])
++       ], [sage_spkg_install_gap=yes])
++    ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2a41f491e5ce599ba185f5e93f02e0fcebd76c9e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Samuel=20Leli=C3=A8vre?= <samuel.lelievre@gmail.com>
+Date: Mon, 22 Mar 2021 03:05:31 +0100
+Subject: 29644: Add distro information for gap
+
+---
+ build/pkgs/gap/distros/fedora.txt | 1 +
+ build/pkgs/gap/distros/gentoo.txt | 1 +
+ 2 files changed, 2 insertions(+)
+ create mode 100644 build/pkgs/gap/distros/fedora.txt
+ create mode 100644 build/pkgs/gap/distros/gentoo.txt
+
+diff --git a/build/pkgs/gap/distros/fedora.txt b/build/pkgs/gap/distros/fedora.txt
+new file mode 100644
+index 00000000..ea4feae
+--- /dev/null
++++ b/build/pkgs/gap/distros/fedora.txt
+@@ -0,0 +1 @@
++gap
+diff --git a/build/pkgs/gap/distros/gentoo.txt b/build/pkgs/gap/distros/gentoo.txt
+new file mode 100644
+index 00000000..ea64ec9
+--- /dev/null
++++ b/build/pkgs/gap/distros/gentoo.txt
+@@ -0,0 +1 @@
++sci-mathematics/gap
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
new file mode 100644
index 000000000000..f132591d48ac
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage_setup/optional_extension.py b/src/sage_setup/optional_extension.py
+index f252849384..4034e3e196 100644
+--- a/src/sage_setup/optional_extension.py
++++ b/src/sage_setup/optional_extension.py
+@@ -80,7 +80,7 @@ def OptionalExtension(*args, **kwds):
+         sage: print(ext.__class__.__name__)
+         CythonizeExtension
+         sage: ext = OptionalExtension("foo", ["foo.c"], package="gap")
+-        sage: print(ext.__class__.__name__)
++        sage: print(ext.__class__.__name__)     # not tested - fails with system gap
+         Extension
+     """
+     try:
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f688629fc26d..02b0af4ad16d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -66,7 +66,6 @@ ${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
 ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
 
 https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
-https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
 http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
 https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
 https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
@@ -103,7 +102,6 @@ ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
 dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
 
 c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
-6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
 07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
 3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
 718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
@@ -159,6 +157,13 @@ pre_configure() {
 	export MAKE="make -j ${XBPS_MAKEJOBS}"
 }
 
+post_configure() {
+	# we set some variables, right after configure has created sage_conf.py
+	cat <<-EOF >> pkgs/sage-conf/sage_conf.py
+	GAP_ROOT_DIR = "/usr/share/gap"
+	EOF
+}
+
 # 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
@@ -248,7 +253,11 @@ makedepends+="
  gengetopt texinfo
  brial-devel cliquer-devel gfan libbraiding-devel libhomfly-devel
  lrcalc-devel nauty-devel palp tachyon
- maxima-ecl primesieve-devel primecount-devel
+ maxima-ecl primesieve-devel primecount-devel gap-devel
+"
+
+# optional dependencies
+makedepends+="
  ffmpeg ImageMagick
 "
 

From 56278bd469d6cf000619a8623def56b7153e43f3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Thu, 13 Jan 2022 03:21:19 -0300
Subject: [PATCH 31/41] sagemath: fixes for system gap

---
 .../zzz-fixes_for_system_gap--see_29644.patch | 96 +++++++++++++++++++
 .../patches/zzz-skip_doctest_system_gap.patch | 13 ---
 srcpkgs/sagemath/template                     |  1 +
 3 files changed, 97 insertions(+), 13 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
 delete mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch

diff --git a/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch b/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
new file mode 100644
index 000000000000..741d2b23a7f5
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
@@ -0,0 +1,96 @@
+From 346b4ea4c92f4287d3c097b92817cf2abfcddd8c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Thu, 13 Jan 2022 01:41:31 -0300
+Subject: [PATCH] gap: fixes for using system gap
+
+ - fix _get_shared_lib_path() so we don't need to configure GAP_SO
+ - fix gap_root() so we don't need to configure GAP_ROOT_DIR
+ - skip a useless test that cannot succeed on system gap
+ - use gap_root() in saved_workspace.py instead of GAP_ROOT_DIR
+---
+ src/sage/env.py                      |  2 +-
+ src/sage/libs/gap/saved_workspace.py |  4 ++--
+ src/sage/libs/gap/util.pyx           | 11 +++++++++++
+ src/sage_setup/optional_extension.py |  2 +-
+ 4 files changed, 15 insertions(+), 4 deletions(-)
+
+diff --git a/src/sage/env.py b/src/sage/env.py
+index c4953cfa65..c16696d298 100644
+--- a/src/sage/env.py
++++ b/src/sage/env.py
+@@ -293,7 +293,7 @@ def _get_shared_lib_path(*libnames: str) -> Optional[str]:
+             if sys.platform == 'darwin':
+                 ext = 'dylib'
+             else:
+-                ext = 'so'
++                ext = 'so*'
+ 
+             if SAGE_LOCAL:
+                 search_directories.append(Path(SAGE_LOCAL) / 'lib')
+diff --git a/src/sage/libs/gap/saved_workspace.py b/src/sage/libs/gap/saved_workspace.py
+index ad5adec36d..59c498795f 100644
+--- a/src/sage/libs/gap/saved_workspace.py
++++ b/src/sage/libs/gap/saved_workspace.py
+@@ -8,7 +8,7 @@ workspaces.
+ 
+ import os
+ import glob
+-from sage.env import GAP_ROOT_DIR
++from sage.libs.gap.util import gap_root
+ from sage.interfaces.gap_workspace import gap_workspace_file
+ 
+ 
+@@ -31,7 +31,7 @@ def timestamp():
+     """
+     libgap_dir = os.path.dirname(__file__)
+     libgap_files = glob.glob(os.path.join(libgap_dir, '*'))
+-    gap_packages = glob.glob(os.path.join(GAP_ROOT_DIR, 'pkg', '*'))
++    gap_packages = glob.glob(os.path.join(gap_root(), 'pkg', '*'))
+     files = libgap_files + gap_packages
+     if len(files) == 0:
+         print('Unable to find LibGAP files.')
+diff --git a/src/sage/libs/gap/util.pyx b/src/sage/libs/gap/util.pyx
+index 08c4c40cc0..c7dd557c35 100644
+--- a/src/sage/libs/gap/util.pyx
++++ b/src/sage/libs/gap/util.pyx
+@@ -23,6 +23,7 @@ from cysignals.signals cimport sig_on, sig_off
+ import os
+ import warnings
+ import sage.env
++import subprocess
+ 
+ from .gap_includes cimport *
+ from .element cimport *
+@@ -178,6 +179,16 @@ def gap_root():
+     if os.path.exists(sage.env.GAP_ROOT_DIR):
+         return sage.env.GAP_ROOT_DIR
+ 
++    gap_expr = 'JoinStringsWithSeparator(KERNEL_INFO().GAP_ROOT_PATHS,";")'
++    gap_root_paths = subprocess.getoutput(
++        f"gap -r -q --bare --nointeract -c 'Display({gap_expr});'"
++        ).strip().split(';')
++
++    for gapdir in gap_root_paths:
++        if os.path.exists(os.path.join(gapdir, 'sysinfo.gap')):
++            sage.env.GAP_ROOT_DIR = gapdir
++            return gapdir
++
+     # Attempt to figure out the appropriate GAP_ROOT by reading the
+     # local/bin/gap shell script; this is an ugly hack that exists for
+     # historical reasons; the best approach to setting where Sage looks for
+diff --git a/src/sage_setup/optional_extension.py b/src/sage_setup/optional_extension.py
+index f252849384..4034e3e196 100644
+--- a/src/sage_setup/optional_extension.py
++++ b/src/sage_setup/optional_extension.py
+@@ -80,7 +80,7 @@ def OptionalExtension(*args, **kwds):
+         sage: print(ext.__class__.__name__)
+         CythonizeExtension
+         sage: ext = OptionalExtension("foo", ["foo.c"], package="gap")
+-        sage: print(ext.__class__.__name__)
++        sage: print(ext.__class__.__name__)     # not tested - fails with system gap
+         Extension
+     """
+     try:
+-- 
+2.34.1
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
deleted file mode 100644
index f132591d48ac..000000000000
--- a/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/src/sage_setup/optional_extension.py b/src/sage_setup/optional_extension.py
-index f252849384..4034e3e196 100644
---- a/src/sage_setup/optional_extension.py
-+++ b/src/sage_setup/optional_extension.py
-@@ -80,7 +80,7 @@ def OptionalExtension(*args, **kwds):
-         sage: print(ext.__class__.__name__)
-         CythonizeExtension
-         sage: ext = OptionalExtension("foo", ["foo.c"], package="gap")
--        sage: print(ext.__class__.__name__)
-+        sage: print(ext.__class__.__name__)     # not tested - fails with system gap
-         Extension
-     """
-     try:
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 02b0af4ad16d..0d8ce1f7a70a 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -161,6 +161,7 @@ post_configure() {
 	# we set some variables, right after configure has created sage_conf.py
 	cat <<-EOF >> pkgs/sage-conf/sage_conf.py
 	GAP_ROOT_DIR = "/usr/share/gap"
+	GAP_SO = "$(objdump -p /usr/lib/libgap.so | awk '/SONAME/{print $2}')"
 	EOF
 }
 

From 5abb7ca7cdfc758f0e898f779cb656e0357447a3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Thu, 13 Jan 2022 15:47:33 -0300
Subject: [PATCH 32/41] New package: sagemath-test

---
 srcpkgs/sagemath-test/template                | 32 +++++++++++++++++++
 .../patches/zzz-skip_doctest_shebang.patch    | 11 +++++++
 2 files changed, 43 insertions(+)
 create mode 100644 srcpkgs/sagemath-test/template
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch

diff --git a/srcpkgs/sagemath-test/template b/srcpkgs/sagemath-test/template
new file mode 100644
index 000000000000..3e0b1c3233fd
--- /dev/null
+++ b/srcpkgs/sagemath-test/template
@@ -0,0 +1,32 @@
+# Template file for 'sagemath-test'
+pkgname=sagemath-test
+version=1
+revision=1
+build_style=meta
+checkdepends="sagemath"
+short_desc="Dummy package to test sagemath"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-2.0-or-later"
+homepage="none"
+
+# TODO: install base-voidstrap, uninstall base-chroot, and remove orphans
+# so we can check sagemath depends are enough to run sage on void
+
+do_check() {
+	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
+		_test_args=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	fi
+	if [ -z "$_test_args" ]; then
+		_test_args=--all
+	fi
+	if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
+		# for CI use a predictable random seed
+		_test_args="--random-seed=0 $_test_args"
+	fi
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args="--long $_test_args"
+	else
+		_test_args="--warn-long 5.0 $_test_args"
+	fi
+	/usr/bin/sage* -tp ${XBPS_MAKEJOBS} ${_test_args}
+}
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch
new file mode 100644
index 000000000000..04fa2acbf3ec
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch
@@ -0,0 +1,11 @@
+--- a/src/sage/tests/cmdline.py
++++ b/src/sage/tests/cmdline.py
+@@ -488,7 +488,7 @@ def test_executable(args, input="", timeout=100.0, pydebug_ignore_warnings=False
+         0
+ 
+         sage: (out, err, ret) = test_executable(["sage", "--cython"])
+-        sage: print(err)
++        sage: print(err)  # not tested - broken when shebang is rewritten
+         Cython (http://cython.org) is a compiler for code written in the
+         Cython language.  Cython is based on Pyrex by Greg Ewing.
+         ...

From 835df1a2201768851bb29a8ab9bc87afea4c0349 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 11:34:23 -0300
Subject: [PATCH 33/41] sagemath: cleanup and one patch

---
 .../zzz-skip_doctest_sage_setup_find.patch    | 12 ++++++++
 srcpkgs/sagemath/template                     | 30 ++++---------------
 2 files changed, 18 insertions(+), 24 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch

diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch
new file mode 100644
index 000000000000..15aed02f9aaa
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch
@@ -0,0 +1,12 @@
+--- a/src/sage_setup/find.py
++++ b/src/sage_setup/find.py
+@@ -301,7 +301,7 @@ def find_extra_files(src_dir, modules, cythonized_dir, special_filenames=[]):
+         sage: extras["sage/libs/mpfr"]
+         [...sage/libs/mpfr/types.pxd...]
+         sage: extras["sage/ext/interpreters"]
+-        ['.../src/sage/ext/interpreters/wrapper_cdf.pxd', ...wrapper_cdf.h...]
++        ['.../src/sage/ext/interpreters/wrapper_cdf.pxd', ...]
+     """
+     from Cython.Utils import is_package_dir
+ 
+--
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 0d8ce1f7a70a..f25cb745c9c4 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -4,7 +4,8 @@ version=9.5.rc0
 revision=1
 wrksrc=sage-$version
 build_style=configure
-configure_args="--enable-build-as-root"
+configure_args="--enable-build-as-root --with-system-python3
+ --enable-system-site-packages"
 make_check_target=ptest
 # for now skip building docs
 make_build_target=build
@@ -22,13 +23,8 @@ distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
 checksum=8012e3ac35290fa9b2cb837eeca149925784c2378b486731226944e4afd8a4e6
 python_version=3
 
-build_options="debug system_python3 system_site_packages"
+build_options="debug"
 desc_option_debug="Build with debug symbols"
-desc_option_system_python="Build using system python 3"
-desc_option_system_python="Build using system python site-packages"
-build_options_default="system_python3 system_site_packages"
-configure_args+=" $(vopt_with system_python3)"
-configure_args+=" $(vopt_enable system_site_packages)"
 
 # path where sage will be installed
 _SAGE_ROOT=/usr/lib/sage-${version}
@@ -112,9 +108,6 @@ for u in ${_upstream}; do
 	skip_extraction+=" ${u##*[/>]}"
 done
 
-# 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
@@ -165,16 +158,6 @@ post_configure() {
 	EOF
 }
 
-# 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() {
 	vlicense COPYING.txt
 	vdoc README.md
@@ -301,7 +284,6 @@ _sage_python3_modules="
  python3-wheel python3-zipp pythran
  "
 
-if [ "$build_option_system_site_packages" ]; then
-	makedepends+=" $_sage_python3_modules"
-	depends+=" $_sage_python3_modules"
-fi
+# python packages are build and runtime dependencies
+makedepends+=" $_sage_python3_modules"
+depends+=" $_sage_python3_modules"

From 9a7b41e686a0ad99c4945fbb7396d7cb83dd1bf3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 11:34:32 -0300
Subject: [PATCH 34/41] sagemath: update to 9.5.rc1.

---
 srcpkgs/sagemath/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f25cb745c9c4..f5d9d0f0fabd 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -1,6 +1,6 @@
 # Template file for 'sagemath'
 pkgname=sagemath
-version=9.5.rc0
+version=9.5.rc1
 revision=1
 wrksrc=sage-$version
 build_style=configure
@@ -20,7 +20,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
-checksum=8012e3ac35290fa9b2cb837eeca149925784c2378b486731226944e4afd8a4e6
+checksum=b015c54f7411669ef70bac2b2fde260e7f45724bcff170957b1f9fd08131f2c3
 python_version=3
 
 build_options="debug"

From 12cf7b3487efd1a925e9d7db2cddfd15b00f917c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 14:53:11 -0300
Subject: [PATCH 35/41] sagemath: patch not needed with singular 4.3.0

---
 ...zzz-skip_doctest_singular_4.2.1--see_33134.patch | 13 -------------
 1 file changed, 13 deletions(-)
 delete mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch

diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
deleted file mode 100644
index 438078a92036..000000000000
--- a/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/src/sage/rings/polynomial/hilbert.pyx b/src/sage/rings/polynomial/hilbert.pyx
-index 4cd91d0a46..323b168c4e 100644
---- a/src/sage/rings/polynomial/hilbert.pyx
-+++ b/src/sage/rings/polynomial/hilbert.pyx
-@@ -578,7 +578,7 @@ def hilbert_poincare_series(I, grading=None):
- 
-     This example exceeded the capabilities of Singular before version 4.2.1p2::
- 
--        sage: J.hilbert_numerator(algorithm='singular')
-+        sage: J.hilbert_numerator(algorithm='singular')   # not tested - requires singular 4.2.1p2
-         120*t^33 - 3465*t^32 + 48180*t^31 - 429374*t^30 + 2753520*t^29 - 13522410*t^28 + 52832780*t^27 - 168384150*t^26 + 445188744*t^25 - 987193350*t^24 + 1847488500*t^23 + 1372406746*t^22 - 403422496*t^21 - 8403314*t^20 - 471656596*t^19 + 1806623746*t^18 + 752776200*t^17 + 752776200*t^16 - 1580830020*t^15 + 1673936550*t^14 - 1294246800*t^13 + 786893250*t^12 - 382391100*t^11 + 146679390*t^10 - 42299400*t^9 + 7837830*t^8 - 172260*t^7 - 468930*t^6 + 183744*t^5 - 39270*t^4 + 5060*t^3 - 330*t^2 + 1
- 
-     """

From 4afce24fe14d8de0520ab605ab04a6730ff640c0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 14:53:25 -0300
Subject: [PATCH 36/41] sagemath: install /usr/bin/sage

---
 srcpkgs/sagemath/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f5d9d0f0fabd..49821fc982e4 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -181,7 +181,8 @@ do_install() {
 	vmkdir 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}
+	ln -sfT $_SAGE_ROOT/sage ${DESTDIR}/usr/bin/sage-${version}
+	ln -sfT sage-${version} ${DESTDIR}/usr/bin/sage
 }
 
 do_check() {

From 186fb12d9e7c9b9d2d72673e4ba63b6b6bfdfcdd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 16:31:25 -0300
Subject: [PATCH 37/41] New package: python3-cvxopt-1.2.7

---
 srcpkgs/python3-cvxopt/template | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 srcpkgs/python3-cvxopt/template

diff --git a/srcpkgs/python3-cvxopt/template b/srcpkgs/python3-cvxopt/template
new file mode 100644
index 000000000000..0fb769b294e0
--- /dev/null
+++ b/srcpkgs/python3-cvxopt/template
@@ -0,0 +1,20 @@
+# Template file for 'python3-cvxopt'
+pkgname=python3-cvxopt
+version=1.2.7
+revision=1
+wrksrc="cvxopt-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools"
+makedepends="python3-devel blas-devel lapack-devel SuiteSparse-devel gsl-devel glpk-devel"
+checkdepends="python3-pytest"
+short_desc="Python software for convex optimization"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-3.0-or-later"
+homepage="http://cvxopt.org/"
+distfiles="${PYPI_SITE}/c/cvxopt/cvxopt-${version}.tar.gz"
+checksum=3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
+
+pre_build() {
+	export CVXOPT_BUILD_GSL=1
+	export CVXOPT_BUILD_GLPK=1
+}

From 506882480c78857e8135984312ccbd2651b9eebf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 22:53:51 -0300
Subject: [PATCH 38/41] New package: python3-importlib_resources-5.4.0

---
 srcpkgs/python3-importlib_resources/template | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 srcpkgs/python3-importlib_resources/template

diff --git a/srcpkgs/python3-importlib_resources/template b/srcpkgs/python3-importlib_resources/template
new file mode 100644
index 000000000000..b1551717d17f
--- /dev/null
+++ b/srcpkgs/python3-importlib_resources/template
@@ -0,0 +1,16 @@
+# Template file for 'python3-importlib_resources'
+pkgname=python3-importlib_resources
+version=5.4.0
+revision=1
+wrksrc="importlib_resources-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools"
+depends="python3-zipp"
+short_desc="Read resources from Python packages"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="Apache-2.0"
+homepage="https://github.com/python/importlib_resources"
+distfiles="${PYPI_SITE}/i/importlib_resources/importlib_resources-${version}.tar.gz"
+checksum=d756e2f85dd4de2ba89be0b21dba2a3bbec2e871a42a3a16719258a11f87506b
+# doesn't work
+make_check=no

From 49b595e17e355c2c75069feb8aa9ff6f935e0de0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 23:37:14 -0300
Subject: [PATCH 39/41] sagemath: rearrange upstream packages and indent

This doesn't change anything, it separates _upstream and
checksum in three blocks to make it easier to edit.
---
 srcpkgs/sagemath/template | 140 ++++++++++++++++++++------------------
 1 file changed, 74 insertions(+), 66 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 49821fc982e4..4317f1e80893 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -31,76 +31,84 @@ _SAGE_ROOT=/usr/lib/sage-${version}
 
 _SAGE_UPSTREAM_MIRROR=https://mirrors.mit.edu/sage/spkg/upstream
 
+# packages were sage is the upstream
 _upstream="
-${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
-
-${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
-${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
-${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
-${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
-${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
-${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
-${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
-${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
-${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
-${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
-${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
-${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
-${PYPI_SITE}/P/PyCygwin/PyCygwin-0.1.tar.gz
-${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
-${PYPI_SITE}/s/setuptools/setuptools-59.2.0.tar.gz
-${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
-${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
-${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
-
-https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
-http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
-https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
-https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
+ ${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
+ ${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
+ ${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
+"
+checksum+="
+ c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
+ d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
+ 5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
+ ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
+ 169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
+ cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
+ edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+ b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
+ cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
 "
 
+# packages from pypi (python modules)
+_upstream+="
+ ${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
+ ${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
+ ${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
+ ${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
+ ${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
+ ${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
+ ${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
+ ${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
+ ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
+ ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
+ ${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
+ ${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
+ ${PYPI_SITE}/P/PyCygwin/PyCygwin-0.1.tar.gz
+ ${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
+ ${PYPI_SITE}/s/setuptools/setuptools-59.2.0.tar.gz
+ ${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
+ ${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
+ ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
+"
+checksum+="
+ dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
+ 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
+ 3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
+ 03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
+ 5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
+ cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
+ 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+ a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
+ d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
+ 5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
+ 471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
+ 78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
+ 45a5e295590c469a49b2804bfdb89059e942d768ad3b813f484d7b5bff48d226
+ ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
+ 157d21de9d055ab9e8ea3186d91e7f4f865e11f42deafa952d90842671fc2576
+ 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
+ 545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
+ dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
+"
+
+# other upstream packages
+_upstream+="
+ https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
+ http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
+ https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+ https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
+"
 checksum+="
-c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
-d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
-5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
-ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
-169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
-cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
-edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
-b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
-cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
-
-dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
-4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
-3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
-03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
-5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
-cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
-581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
-a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
-d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
-5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
-471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
-78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
-45a5e295590c469a49b2804bfdb89059e942d768ad3b813f484d7b5bff48d226
-ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
-157d21de9d055ab9e8ea3186d91e7f4f865e11f42deafa952d90842671fc2576
-6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
-545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
-dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
-
-c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
-07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
-3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
-718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
+ c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
+ 07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
+ 3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+ 718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
 "
 
 for u in ${_upstream}; do

From e251ad195ba305b031ad25df36c0bce49ebb4faf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 23:37:58 -0300
Subject: [PATCH 40/41] sagemath: use system cvxopt and importlib_resources

---
 srcpkgs/sagemath/template | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 4317f1e80893..5eb70a6267bb 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -59,12 +59,10 @@ checksum+="
 _upstream+="
  ${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
  ${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
- ${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
  ${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
  ${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
  ${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
  ${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
- ${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
  ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
  ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
  ${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
@@ -79,12 +77,10 @@ _upstream+="
 checksum+="
  dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
  4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
- 3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
  03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
  5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
  cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
  581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
- a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
  d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
  5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
  471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
@@ -257,9 +253,6 @@ makedepends+="
 # TODO: optional
 # 4ti2 coxeter3 libsemigroups lrslib pdf2svg perl_mongodb polymake
 
-# TODO: standard
-# cvxopt importlib_resources
-
 # python packages for trac-29665
 _sage_python3_modules="
  python3-Babel python3-Jinja2 python3-MarkupSafe python3-Pillow
@@ -291,6 +284,8 @@ _sage_python3_modules="
  python3-tornado python3-traitlets python3-typing_extensions
  python3-tzlocal python3-urllib3 python3-wcwidth python3-webencodings
  python3-wheel python3-zipp pythran
+
+ python3-cvxopt python3-importlib_resources
  "
 
 # python packages are build and runtime dependencies

From cab323527be6806d79dbf0a205ecd673432c3e9c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 01:48:08 -0300
Subject: [PATCH 41/41] sagemath-test: fix sage binary (now is just 'sage')

---
 srcpkgs/sagemath-test/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/sagemath-test/template b/srcpkgs/sagemath-test/template
index 3e0b1c3233fd..1c0d71683a1b 100644
--- a/srcpkgs/sagemath-test/template
+++ b/srcpkgs/sagemath-test/template
@@ -28,5 +28,5 @@ do_check() {
 	else
 		_test_args="--warn-long 5.0 $_test_args"
 	fi
-	/usr/bin/sage* -tp ${XBPS_MAKEJOBS} ${_test_args}
+	sage -tp ${XBPS_MAKEJOBS} ${_test_args}
 }

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.rc1
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (199 preceding siblings ...)
  2022-01-15 13:35 ` tornaria
@ 2022-01-15 13:57 ` tornaria
  2022-01-15 17:55 ` dkwo
                   ` (47 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-15 13:57 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1013686861

Comment:
In the last few CI runs I'm getting very strange random kills in CI (everything works fine locally).

The last commit where this didn't happen is "New package: sagemath-test" and the first commit when this happened is "sagemath: update to 9.5.rc1." but I don't see anything relevant (from my pov the only significant change is 9.5.rc0 -> 9.5.rc1 but this was a small diff and nothing rings a bell there...)

I rebased the latest commit to new python to see what happens (maybe it's just the memory leak causing OOM ???). Otherwise I'll try again the last known-to-work commit...

These are long CI runs (4h) because the testsuite is run twice (once in the build tree and once in the installed pkg) and the kills happen in the second run.

Locally everything works ok for all arches, both testsuite complete fine, and in --long mode (CI does normal).

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.rc1
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (200 preceding siblings ...)
  2022-01-15 13:57 ` tornaria
@ 2022-01-15 17:55 ` dkwo
  2022-01-15 18:23 ` tornaria
                   ` (46 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2022-01-15 17:55 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1013725257

Comment:
Very well.
Could you include something like `ln -s /usr/lib/sage-9.5.rc1/local/var/lib/sage/venv-python3.10/share/jupyter /usr/local/share/` ?
Even with this, I get 
```
[I 2022-01-15 18:50:49.023 ServerApp] AsyncIOLoopKernelRestarter: restarting kernel (1/5), new random ports
Traceback (most recent call last):
  File "/usr/lib/sage-9.5.rc1/local/var/lib/sage/venv-python3.10/bin/sage-config", line 5, in <module>
    from sage_conf import _main
ModuleNotFoundError: No module named 'sage_conf'
Traceback (most recent call last):
  File "/usr/lib/sage-9.5.rc1/local/var/lib/sage/venv-python3.10/bin/sage-config", line 5, in <module>
    from sage_conf import _main
ModuleNotFoundError: No module named 'sage_conf'
/usr/bin/python3: Error while finding module specification for 'sage.repl.ipython_kernel' (ModuleNotFoundError: No module named 'sage')
```
This issue was previously solved: did anything change in shebangs etc?

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.rc1
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (201 preceding siblings ...)
  2022-01-15 17:55 ` dkwo
@ 2022-01-15 18:23 ` tornaria
  2022-01-15 18:24 ` tornaria
                   ` (45 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-15 18:23 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1013730373

Comment:
> Very well. Could you include something like `ln -s /usr/lib/sage-9.5.rc1/local/var/lib/sage/venv-python3.10/share/jupyter /usr/local/share/` ? Even with this, I get
> 
> ```
> [I 2022-01-15 18:50:49.023 ServerApp] AsyncIOLoopKernelRestarter: restarting kernel (1/5), new random ports
> Traceback (most recent call last):
>   File "/usr/lib/sage-9.5.rc1/local/var/lib/sage/venv-python3.10/bin/sage-config", line 5, in <module>
>     from sage_conf import _main
> ModuleNotFoundError: No module named 'sage_conf'
> Traceback (most recent call last):
>   File "/usr/lib/sage-9.5.rc1/local/var/lib/sage/venv-python3.10/bin/sage-config", line 5, in <module>
>     from sage_conf import _main
> ModuleNotFoundError: No module named 'sage_conf'
> /usr/bin/python3: Error while finding module specification for 'sage.repl.ipython_kernel' (ModuleNotFoundError: No module named 'sage')
> ```
> 
> This issue was previously solved: did anything change in shebangs etc?

Yes, I commented out the line `_no_python_shebang=yes`. Try again uncommenting it. Eventually we will need to figure out some other way because I don't think we'll be able to merge that trick.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.rc1
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (202 preceding siblings ...)
  2022-01-15 18:23 ` tornaria
@ 2022-01-15 18:24 ` tornaria
  2022-01-15 18:27 ` [PR PATCH] [Updated] " tornaria
                   ` (44 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-15 18:24 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1013730638

Comment:
> > Very well. Could you include something like `ln -s /usr/lib/sage-9.5.rc1/local/var/lib/sage/venv-python3.10/share/jupyter /usr/local/share/` ? Even with this, I get

Also: that doesn't seem right because system packages should not mess with `/usr/local`.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: sagemath-9.5.rc1
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (203 preceding siblings ...)
  2022-01-15 18:24 ` tornaria
@ 2022-01-15 18:27 ` tornaria
  2022-01-15 18:31 ` tornaria
                   ` (43 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-15 18:27 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 627 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.rc1
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: 607559 bytes --]

From b455e438a61700831c1932d7ebdc927faa326eac 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/32] 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 10504a11a727683bd00940c230eb794633690ecc 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/32] 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 01fd02bde7045df352898a37ccdd49e72aac6e2c 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/32] 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 69755ce883b95f6cfa2bf42f8ae4ae73a0d4c630 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/32] 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 c16309ac3f86cb59f1e3b442a83cf75536b68f62 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/32] 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 b291f1e0e676e2782214f68856c9502f5c624946 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/32] 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 56c5696a8739713ba21e29723b043a8a041e9e8c 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/32] 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 3ec34ca747076237a82a8ef808b31d436a3346b8 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/32] 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 7aa84100620e3da6fedaa409e88575f846ec0439 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/32] 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 fadd98f9bafbc20dc68ad878f1144a9335965281 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/32] 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 374588e6899f5f6bea7ef346162c21755bad48b0 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/32] 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 8b0b02932eb314d8822925f33885b6493b770f1f 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/32] 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 00c39aba6940925c2ab8f4edf063d1f1b29c9beb 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/32] 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 774b7ce1a8495d82e86d39387eb59e07e1140840 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/32] 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 b472fbbcf87a33ab60a4190b151420cf0d1f8f92 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/32] 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 f53ceeee3b42fe9aac8f491257d25e3eada64b48 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/32] 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 96989c98eee0c5fdcf844af7ff7e79e9ce489c2b 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/32] 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 6557cc8dfbc2b00f33b4f2c4c947225109f32983 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/32] 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 eb5a3785237a8fee7aacf393899c736269155226 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/32] 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

From cded296525f21eb5372b7b77a2e764b85ab31e16 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 27 Dec 2021 20:19:19 -0300
Subject: [PATCH 20/32] sagemath: fix license and tests

Now tests can be run with -Q (normal) or -K (--long)
---
 srcpkgs/sagemath/template | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index c5009269c7fc..33b40acbabeb 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -16,7 +16,7 @@ depends="giac git FlintQS zn_poly sympow
  "
 short_desc="Open source mathematics software"
 maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
-license="GPL-3.0-or-later"
+license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
 checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
@@ -155,15 +155,17 @@ do_install() {
 }
 
 do_check() {
-	TEST=--all
 	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
-		TEST="$(sed -e 's/#.*//' ${XBPS_DISTDIR}/sagemath-check)"
+		_test_args=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	fi
+	if [ -z "$_test_args" ]; then
+		_test_args=--all
+	fi
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args="--long $_test_args"
 	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} ${OPT} ${TEST}
-	#./sage -t ${OPT} ${TEST}
+	./sage -tp ${XBPS_MAKEJOBS} ${_test_args}
 }
 
 ### copied from sage-deps, to be kept in sync

From 04abd42fe5f5af79aaa7d2efd66e69b1ff9b8136 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 28 Dec 2021 23:08:17 -0300
Subject: [PATCH 21/32] sagemath: fix long time test

---
 .../patches/zzz-fix_long_time_test--see_33091.patch | 13 +++++++++++++
 ...=> zzz-skip_doctest_giac-1.7.0--see_31563.patch} |  0
 2 files changed, 13 insertions(+)
 create mode 100644 srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
 rename srcpkgs/sagemath/patches/{skip-doctest-giac-1.7.0--see-trac-31563.patch => zzz-skip_doctest_giac-1.7.0--see_31563.patch} (100%)

diff --git a/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch b/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
new file mode 100644
index 000000000000..ca360dee9f6e
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage/matrix/matrix2.pyx b/src/sage/matrix/matrix2.pyx
+index 7d319bd54b..c1a2eed6f1 100644
+--- a/src/sage/matrix/matrix2.pyx
++++ b/src/sage/matrix/matrix2.pyx
+@@ -17215,7 +17215,7 @@ cdef class Matrix(Matrix1):
+ 
+             sage: set_random_seed()
+             sage: K = random_cone(max_ambient_dim=5)
+-            sage: all(L.change_ring(SR).is_Z_operator_on(K)
++            sage: all(L.change_ring(SR).is_Z_operator_on(K) # long time
+             ....:     for L in K.Z_operators_gens())  # long time
+             True
+ 
diff --git a/srcpkgs/sagemath/patches/skip-doctest-giac-1.7.0--see-trac-31563.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_31563.patch
similarity index 100%
rename from srcpkgs/sagemath/patches/skip-doctest-giac-1.7.0--see-trac-31563.patch
rename to srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_31563.patch

From 2a108af1e9f9fe23f920a6e674df93f927024843 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 31 Dec 2021 13:52:34 -0300
Subject: [PATCH 22/32] python3-Sphinx: update to 4.3.2.

---
 srcpkgs/python3-Sphinx/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/python3-Sphinx/template b/srcpkgs/python3-Sphinx/template
index 8b0493c1f92c..29f892d16157 100644
--- a/srcpkgs/python3-Sphinx/template
+++ b/srcpkgs/python3-Sphinx/template
@@ -1,6 +1,6 @@
 # Template file for 'python3-Sphinx'
 pkgname=python3-Sphinx
-version=4.2.0
+version=4.3.2
 revision=1
 wrksrc=Sphinx-${version}
 build_style=python3-module
@@ -17,8 +17,9 @@ short_desc="Python 3 documentation generator"
 maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
 license="BSD-3-Clause"
 homepage="http://sphinx-doc.org"
+changelog="https://www.sphinx-doc.org/en/master/changes.html"
 distfiles="${PYPI_SITE}/S/Sphinx/Sphinx-${version}.tar.gz"
-checksum=94078db9184491e15bce0a56d9186e0aec95f16ac20b12d00e06d4e36f1058a6
+checksum=0a8836751a68306b3fe97ecbe44db786f8479c3bf4b80e3a7f5c838657b4698c
 conflicts="python-Sphinx>=0"
 
 post_install() {

From 46a8ba6ff602f5a5a24965fc9857d36c3bcaf7ef Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 28 Dec 2021 23:08:17 -0300
Subject: [PATCH 23/32] sagemath: use system python site-packages

 - patch from #29665 for that
 - patch on top of that to allow a few more python packages:
   gmpy2, sphinx, typing_extensions, ptyprocess
 - add all available python packages to makedepends and depends
 - add ffmpeg and ImageMagick to makedepends
 - in standard check (-Q) warn if individual test > 5.0s
---
 ...184f7498a2046065e669723e68efe2d65cee.patch | 5629 +++++++++++++++++
 .../zzz-dont_run_pytest--see_31924.patch      |   27 +
 .../zzz-more_site_packages_not_in_29665.patch |   42 +
 srcpkgs/sagemath/template                     |   52 +-
 4 files changed, 5747 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch

diff --git a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
new file mode 100644
index 000000000000..b641113927e7
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
@@ -0,0 +1,5629 @@
+From 05fcaabe95082f42ba134780d579390d7b6153e2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 19:30:58 -0400
+Subject: Trac #29665: add --enable-system-site-packages option to ./configure.
+
+This new option is experimental and disabled by default. When it is
+enabled, the string "--system-site-packages" is appended to a new
+environment variable SAGE_VENV_FLAGS that is then passed to the
+sage-venv command during the build using autoconf substitution.
+Thusly the correct setting finds its way into local/pyvenv.cfg.
+---
+ build/make/Makefile.in |  2 +-
+ configure.ac           | 11 +++++++++++
+ 2 files changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/build/make/Makefile.in b/build/make/Makefile.in
+index f870cc3..68627ab 100644
+--- a/build/make/Makefile.in
++++ b/build/make/Makefile.in
+@@ -211,7 +211,7 @@ endif
+ inst_python3_venv = $(SAGE_VENV)/pyvenv.cfg
+ 
+ $(inst_python3_venv):
+-	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv "$(SAGE_VENV)"
++	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv @SAGE_VENV_FLAGS@ "$(SAGE_VENV)"
+ endif
+ 
+ # Build everything and start Sage.
+diff --git a/configure.ac b/configure.ac
+index 351f487..db30a91 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -435,6 +435,17 @@ AC_ARG_ENABLE([download-from-upstream-url],
+   [AS_HELP_STRING([--enable-download-from-upstream-url],
+     [allow downloading packages from their upstream URL if they cannot be found on the Sage mirrors])])
+ 
++AC_ARG_ENABLE(
++  [system-site-packages], [AS_HELP_STRING(
++    [--enable-system-site-packages],
++    [allow sage to use python packages from the system (experimental; default: no)]
++  )], [
++  AS_IF([test "x$enable_system_site_packages" = "xyes"], [
++    SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
++  ])
++])
++AC_SUBST([SAGE_VENV_FLAGS])
++
+ SAGE_SPKG_OPTIONS=""
+ AS_IF([test "x$enable_experimental_packages" = "xyes"], [
+   AS_VAR_APPEND([SAGE_SPKG_OPTIONS], [" -y"])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9372d1f663edf4e89f9c186336815ca04cff59dc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 19:41:14 -0400
+Subject: Trac #29665: new SAGE_PYTHON_PACKAGE_CHECK() autoconf macro.
+
+This new macro encapsulates the check for system installations of
+python packages. It uses setuptools.version's pkg_resources to
+check if the contents of install-requires.txt are satisfied for
+the given package; and if not, tells the build system to install
+the SPKG instead.
+---
+ m4/sage_python_package_check.m4 | 49 +++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 49 insertions(+)
+ create mode 100644 m4/sage_python_package_check.m4
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+new file mode 100644
+index 00000000..77b0a0c
+--- /dev/null
++++ b/m4/sage_python_package_check.m4
+@@ -0,0 +1,49 @@
++#
++# SYNOPSIS
++#
++#   SAGE_PYTHON_PACKAGE_CHECK(package)
++#
++# DESCRIPTION
++#
++#   Determine if the system copy of a python package can be used by sage.
++#
++#   This macro uses setuptools.version's pkg_resources to check that the
++#   "install-requires.txt" file for the named package is satisfied, and
++#   it can typically fail in four ways:
++#
++#     1. If --enable-system-site-packages was not passed to ./configure,
++#
++#     2. If we are not using the system python (no $PYTHON_FOR_VENV),
++#
++#     3. If setuptools is not available to the system python,
++#
++#     4. If the contents of install-requires.txt are not met (wrong
++#        version, no version, etc.) by the system python.
++#
++#   In any of those cases, we set sage_spkg_install_$package to "yes"
++#   so that the corresponding SPKG is installed. Otherwise, we do
++#   nothing, since the default value of sage_spkg_install_$package
++#   is "no" (to use the system copy).
++#
++#   The SAGE_SPKG_CONFIGURE_PYTHON3() macro is AC_REQUIRE'd to ensure
++#   that $PYTHON_FOR_VENV is available, if it is going to be available.
++#
++
++AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
++  AS_IF([test "${enable_system_site_packages}" = "yes"], [
++    AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
++
++    dnl strip all comments from install-requires.txt; this should leave
++    dnl only a single line containing the version specification for this
++    dnl package.
++    SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
++    AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++    AS_IF(
++      ["${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())"],
++      [AC_MSG_RESULT(yes)],
++      [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
++    )
++  ], [
++    sage_spkg_install_$1=yes
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a0dac8ad81ad6369d479bba30d2388de59e5cecb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:21:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for py.
+
+---
+ build/pkgs/py/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/py/spkg-configure.m4
+
+diff --git a/build/pkgs/py/spkg-configure.m4 b/build/pkgs/py/spkg-configure.m4
+new file mode 100644
+index 00000000..ded7034
+--- /dev/null
++++ b/build/pkgs/py/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([py], [SAGE_PYTHON_PACKAGE_CHECK([py])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 87c463a25ab4432dc1fba4f7a9703284e5b8f620 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:24:15 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for wheel.
+
+---
+ build/pkgs/wheel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wheel/spkg-configure.m4
+
+diff --git a/build/pkgs/wheel/spkg-configure.m4 b/build/pkgs/wheel/spkg-configure.m4
+new file mode 100644
+index 00000000..7897ea9
+--- /dev/null
++++ b/build/pkgs/wheel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([wheel], [SAGE_PYTHON_PACKAGE_CHECK([wheel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 804094b3a980f262f4d53d7be8b1be43ac0c55e0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:25:15 -0400
+Subject: Trac #29665: new spkg-configure.m4 for cvxopt.
+
+This includes a SAGE_SPKG_DEPCHECK([gsl glpk suitesparse],... because
+those C dependencies wind up linked into shared libraries like,
+
+  /usr/.../cvxopt/glpk.cpython-39-x86_64-linux-gnu.so
+
+that could potentially conflict with (for example) the glpk SPKG.
+---
+ build/pkgs/cvxopt/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/cvxopt/spkg-configure.m4
+
+diff --git a/build/pkgs/cvxopt/spkg-configure.m4 b/build/pkgs/cvxopt/spkg-configure.m4
+new file mode 100644
+index 00000000..c4aa619
+--- /dev/null
++++ b/build/pkgs/cvxopt/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([cvxopt], [
++  SAGE_SPKG_DEPCHECK([gsl glpk suitesparse], [
++    SAGE_PYTHON_PACKAGE_CHECK([cvxopt])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3f171955ff8d15da2c98aee0d2e254e95a55a2b5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:28:10 -0400
+Subject: Trac #29665: new spkg-configure.m4 for pyzmq.
+
+This includes a SAGE_SPKG_DEPCHECK([zeromq],... because libzmq winds
+up linked into shared libraries like,
+
+  /usr/.../zmq/backend/cython/message.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the zeromq SPKG.
+---
+ build/pkgs/pyzmq/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/pyzmq/spkg-configure.m4
+
+diff --git a/build/pkgs/pyzmq/spkg-configure.m4 b/build/pkgs/pyzmq/spkg-configure.m4
+new file mode 100644
+index 00000000..ae2b126
+--- /dev/null
++++ b/build/pkgs/pyzmq/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([pyzmq], [
++  SAGE_SPKG_DEPCHECK([zeromq], [
++    SAGE_PYTHON_PACKAGE_CHECK([pyzmq])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20d3aa9da9fc98a6e6a47599cd1b6d1d3785a4c4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:31:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for requests.
+
+---
+ build/pkgs/requests/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/requests/spkg-configure.m4
+
+diff --git a/build/pkgs/requests/spkg-configure.m4 b/build/pkgs/requests/spkg-configure.m4
+new file mode 100644
+index 00000000..f50a66c
+--- /dev/null
++++ b/build/pkgs/requests/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([requests], [SAGE_PYTHON_PACKAGE_CHECK([requests])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4df57ee47f2576b6b7bf9265248e06e90616b689 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:13:34 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for six.
+
+---
+ build/pkgs/six/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/six/spkg-configure.m4
+
+diff --git a/build/pkgs/six/spkg-configure.m4 b/build/pkgs/six/spkg-configure.m4
+new file mode 100644
+index 00000000..a382b81
+--- /dev/null
++++ b/build/pkgs/six/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([six], [SAGE_PYTHON_PACKAGE_CHECK([six])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f4462652d02ca729cc6d7cb36ee4d7d662deafb0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:14:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for packaging.
+
+---
+ build/pkgs/packaging/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/packaging/spkg-configure.m4
+
+diff --git a/build/pkgs/packaging/spkg-configure.m4 b/build/pkgs/packaging/spkg-configure.m4
+new file mode 100644
+index 00000000..398f9e1
+--- /dev/null
++++ b/build/pkgs/packaging/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([packaging], [SAGE_PYTHON_PACKAGE_CHECK([packaging])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4d64677fffce48077e4bc3e20ec833c70e6e9b65 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:18:53 -0400
+Subject: Trac #29665: new spkg-configure.m4 for numpy.
+
+This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack
+wind up linked into shared libraries like,
+
+  /usr/.../numpy/linalg/lapack_lite.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the openblas SPKG.
+---
+ build/pkgs/numpy/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/numpy/spkg-configure.m4
+
+diff --git a/build/pkgs/numpy/spkg-configure.m4 b/build/pkgs/numpy/spkg-configure.m4
+new file mode 100644
+index 00000000..16f9a90
+--- /dev/null
++++ b/build/pkgs/numpy/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([numpy], [
++  SAGE_SPKG_DEPCHECK([openblas], [
++   SAGE_PYTHON_PACKAGE_CHECK([numpy])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 85dfe5bb32f3c470966b477bae68a921e846d11f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:58:48 -0400
+Subject: Trac #29665: new spkg-configure.m4 for scipy.
+
+This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack
+wind up linked into shared libraries like,
+
+  /usr/.../scipy/linalg/_flinalg.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the openblas SPKG.
+---
+ build/pkgs/scipy/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/scipy/spkg-configure.m4
+
+diff --git a/build/pkgs/scipy/spkg-configure.m4 b/build/pkgs/scipy/spkg-configure.m4
+new file mode 100644
+index 00000000..0b7294a
+--- /dev/null
++++ b/build/pkgs/scipy/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([scipy], [
++  SAGE_SPKG_DEPCHECK([openblas], [
++    SAGE_PYTHON_PACKAGE_CHECK([scipy])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5616f1491036fda95f4d3e840c8c8b531c97323b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 07:19:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pluggy.
+
+---
+ build/pkgs/pluggy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pluggy/spkg-configure.m4
+
+diff --git a/build/pkgs/pluggy/spkg-configure.m4 b/build/pkgs/pluggy/spkg-configure.m4
+new file mode 100644
+index 00000000..11b1fce
+--- /dev/null
++++ b/build/pkgs/pluggy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pluggy], [SAGE_PYTHON_PACKAGE_CHECK([pluggy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6bceae3d356878cfe5fce40c9998dead003a3844 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 07:24:12 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pickleshare.
+
+---
+ build/pkgs/pickleshare/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pickleshare/spkg-configure.m4
+
+diff --git a/build/pkgs/pickleshare/spkg-configure.m4 b/build/pkgs/pickleshare/spkg-configure.m4
+new file mode 100644
+index 00000000..80e9b7c
+--- /dev/null
++++ b/build/pkgs/pickleshare/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pickleshare], [SAGE_PYTHON_PACKAGE_CHECK([pickleshare])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From da2ab534f4a256c82ed4f1c5f0f5c320529b5e9f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 08:53:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for html5lib.
+
+---
+ build/pkgs/html5lib/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/html5lib/spkg-configure.m4
+
+diff --git a/build/pkgs/html5lib/spkg-configure.m4 b/build/pkgs/html5lib/spkg-configure.m4
+new file mode 100644
+index 00000000..f421b7e
+--- /dev/null
++++ b/build/pkgs/html5lib/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([html5lib], [SAGE_PYTHON_PACKAGE_CHECK([html5lib])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5e464134afdf6055b7b5804208f759561c5435cd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 18:30:47 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for networkx.
+
+---
+ build/pkgs/networkx/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/networkx/spkg-configure.m4
+
+diff --git a/build/pkgs/networkx/spkg-configure.m4 b/build/pkgs/networkx/spkg-configure.m4
+new file mode 100644
+index 00000000..926671e
+--- /dev/null
++++ b/build/pkgs/networkx/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([networkx], [SAGE_PYTHON_PACKAGE_CHECK([networkx])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c4d40770cd9c7fda811e31759a5f4aedc320f3f9 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:33:24 -0400
+Subject: Trac #29665: new spkg-configure.m4 for matplotlib.
+
+This includes a SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull],...
+because those dependencies wind up linked into shared libraries like,
+
+  /usr/lib/.../matplotlib/ft2font.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with their SPKG counterparts.
+---
+ build/pkgs/matplotlib/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/matplotlib/spkg-configure.m4
+
+diff --git a/build/pkgs/matplotlib/spkg-configure.m4 b/build/pkgs/matplotlib/spkg-configure.m4
+new file mode 100644
+index 00000000..39c2d29
+--- /dev/null
++++ b/build/pkgs/matplotlib/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([matplotlib], [
++  SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull], [
++    SAGE_PYTHON_PACKAGE_CHECK([matplotlib])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7834dc3ac349201af632f89a9de7cd1967931010 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:35:00 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for bleach.
+
+---
+ build/pkgs/bleach/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/bleach/spkg-configure.m4
+
+diff --git a/build/pkgs/bleach/spkg-configure.m4 b/build/pkgs/bleach/spkg-configure.m4
+new file mode 100644
+index 00000000..3c9bb26
+--- /dev/null
++++ b/build/pkgs/bleach/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([bleach], [SAGE_PYTHON_PACKAGE_CHECK([bleach])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 84cad343287a2c69a4a21b9fa3b92301ff88645b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:37:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for decorator.
+
+---
+ build/pkgs/decorator/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/decorator/spkg-configure.m4
+
+diff --git a/build/pkgs/decorator/spkg-configure.m4 b/build/pkgs/decorator/spkg-configure.m4
+new file mode 100644
+index 00000000..e062778
+--- /dev/null
++++ b/build/pkgs/decorator/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([decorator], [SAGE_PYTHON_PACKAGE_CHECK([decorator])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 25693212572e69d452bc95c923ada13744359eb7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:38:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for idna.
+
+---
+ build/pkgs/idna/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/idna/spkg-configure.m4
+
+diff --git a/build/pkgs/idna/spkg-configure.m4 b/build/pkgs/idna/spkg-configure.m4
+new file mode 100644
+index 00000000..9d363f2
+--- /dev/null
++++ b/build/pkgs/idna/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([idna], [SAGE_PYTHON_PACKAGE_CHECK([idna])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6d5616472f6cdc6cf496bba6fe07bd4ef44dfdaf Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:39:23 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for certifi.
+
+---
+ build/pkgs/certifi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/certifi/spkg-configure.m4
+
+diff --git a/build/pkgs/certifi/spkg-configure.m4 b/build/pkgs/certifi/spkg-configure.m4
+new file mode 100644
+index 00000000..ddd4061
+--- /dev/null
++++ b/build/pkgs/certifi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([certifi], [SAGE_PYTHON_PACKAGE_CHECK([certifi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9412a07023b275e29e8d1af9b8ee3e767042e7fd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:40:59 -0400
+Subject: Trac #29665: new spkg-configure.m4 for pillow.
+
+This includes an SAGE_SPKG_DEPCHECK([bzip2 freetype libpng zlib],...
+because those dependencies wind up linked into shared libraries like,
+
+  /usr/.../PIL/_imagingft.cpython-39-x86_64-linux-gnu.so
+
+and potentially conflict with their SPKG counterparts.
+---
+ build/pkgs/pillow/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/pillow/spkg-configure.m4
+
+diff --git a/build/pkgs/pillow/spkg-configure.m4 b/build/pkgs/pillow/spkg-configure.m4
+new file mode 100644
+index 00000000..f2e68e2
+--- /dev/null
++++ b/build/pkgs/pillow/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([pillow], [
++  SAGE_SPKG_DEPCHECK([bzip2 freetype libpng zlib], [
++    SAGE_PYTHON_PACKAGE_CHECK([pillow])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From eede914311481fdb75b363b7a799075e876a2b4f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:44:13 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for mpmath.
+
+---
+ build/pkgs/mpmath/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mpmath/spkg-configure.m4
+
+diff --git a/build/pkgs/mpmath/spkg-configure.m4 b/build/pkgs/mpmath/spkg-configure.m4
+new file mode 100644
+index 00000000..f43c838
+--- /dev/null
++++ b/build/pkgs/mpmath/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([mpmath], [SAGE_PYTHON_PACKAGE_CHECK([mpmath])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 363a825885832c0b580ff53fe61f5c79e70c4728 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:44:56 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for sympy.
+
+---
+ build/pkgs/sympy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sympy/spkg-configure.m4
+
+diff --git a/build/pkgs/sympy/spkg-configure.m4 b/build/pkgs/sympy/spkg-configure.m4
+new file mode 100644
+index 00000000..fa0f1f5
+--- /dev/null
++++ b/build/pkgs/sympy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([sympy], [SAGE_PYTHON_PACKAGE_CHECK([sympy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0667964c914e4a01dda697190a054ff96cea92d6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:47:06 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pygments.
+
+---
+ build/pkgs/pygments/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pygments/spkg-configure.m4
+
+diff --git a/build/pkgs/pygments/spkg-configure.m4 b/build/pkgs/pygments/spkg-configure.m4
+new file mode 100644
+index 00000000..99f29e3
+--- /dev/null
++++ b/build/pkgs/pygments/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pygments], [SAGE_PYTHON_PACKAGE_CHECK([pygments])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f787c233aa05d8e90f7c6ad18f76bd2fa36bfbfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:48:50 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for jinja2.
+
+---
+ build/pkgs/jinja2/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jinja2/spkg-configure.m4
+
+diff --git a/build/pkgs/jinja2/spkg-configure.m4 b/build/pkgs/jinja2/spkg-configure.m4
+new file mode 100644
+index 00000000..0970d1c
+--- /dev/null
++++ b/build/pkgs/jinja2/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jinja2], [SAGE_PYTHON_PACKAGE_CHECK([jinja2])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 309d8f8e2b7078b5efbbe824b69ec1d9b1e639f0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:43:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pandocfilters.
+
+---
+ build/pkgs/pandocfilters/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/pandocfilters/spkg-configure.m4
+
+diff --git a/build/pkgs/pandocfilters/spkg-configure.m4 b/build/pkgs/pandocfilters/spkg-configure.m4
+new file mode 100644
+index 00000000..3e9537f
+--- /dev/null
++++ b/build/pkgs/pandocfilters/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([pandocfilters], [
++  SAGE_PYTHON_PACKAGE_CHECK([pandocfilters])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f57bfda49777a6ba1cd123553acd75dc347c5521 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:44:46 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for webencodings.
+
+---
+ build/pkgs/webencodings/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/webencodings/spkg-configure.m4
+
+diff --git a/build/pkgs/webencodings/spkg-configure.m4 b/build/pkgs/webencodings/spkg-configure.m4
+new file mode 100644
+index 00000000..1b9a5c4
+--- /dev/null
++++ b/build/pkgs/webencodings/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([webencodings], [
++  SAGE_PYTHON_PACKAGE_CHECK([webencodings])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7f193a62d7a2ea0b6a3ca6beb12390d91c25bbfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:48:26 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pytz.
+
+---
+ build/pkgs/pytz/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pytz/spkg-configure.m4
+
+diff --git a/build/pkgs/pytz/spkg-configure.m4 b/build/pkgs/pytz/spkg-configure.m4
+new file mode 100644
+index 00000000..366521b
+--- /dev/null
++++ b/build/pkgs/pytz/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pytz], [SAGE_PYTHON_PACKAGE_CHECK([pytz])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bfd3fdd887c3465c03465248de4997eed4a82915 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:51:16 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for texttable.
+
+---
+ build/pkgs/texttable/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/texttable/spkg-configure.m4
+
+diff --git a/build/pkgs/texttable/spkg-configure.m4 b/build/pkgs/texttable/spkg-configure.m4
+new file mode 100644
+index 00000000..42a3de1
+--- /dev/null
++++ b/build/pkgs/texttable/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([texttable], [SAGE_PYTHON_PACKAGE_CHECK([texttable])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 914bf0cc57abc46129b27c1525782dbe16da31a2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:53:41 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for babel.
+
+---
+ build/pkgs/babel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/babel/spkg-configure.m4
+
+diff --git a/build/pkgs/babel/spkg-configure.m4 b/build/pkgs/babel/spkg-configure.m4
+new file mode 100644
+index 00000000..d7b9a71
+--- /dev/null
++++ b/build/pkgs/babel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([babel], [SAGE_PYTHON_PACKAGE_CHECK([babel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 56977abd1eafbc87c765a2892cfe525382648259 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 14 Oct 2021 08:06:59 -0400
+Subject: Trac #29665: force system python3 with --enable-system-site-packages.
+
+When the python SPKG is used, the --enable-system-site-packages flag
+will essentially do nothing, and that may confuse users who have
+wasted a few hours building sage. (Generally, they will want to fix
+detection of their system python3 first.)
+
+To forestall that, we now set "--with-system-python3=force" whenever
+the "--enable-system-site-packages" flag is passed.
+---
+ configure.ac | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index db30a91..6fafb83 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -438,10 +438,19 @@ AC_ARG_ENABLE([download-from-upstream-url],
+ AC_ARG_ENABLE(
+   [system-site-packages], [AS_HELP_STRING(
+     [--enable-system-site-packages],
+-    [allow sage to use python packages from the system (experimental; default: no)]
++    [allow the use of python packages from the system (experimental; default: no)]
+   )], [
+   AS_IF([test "x$enable_system_site_packages" = "xyes"], [
+     SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
++
++    dnl We want to raise an error if the user asked for "system site
++    dnl packages" but the system python will not be used. Technically
++    dnl that causes no problems (SAGE_PYTHON_PACKAGE_CHECK always fails,
++    dnl so SPKGs are used for all python packages), but it may be confusing
++    dnl to end users who expect the flag to actually give them access to
++    dnl their system python packages and who may not be paying close
++    dnl attention to their ./configure output.
++    with_system_python3="force"
+   ])
+ ])
+ AC_SUBST([SAGE_VENV_FLAGS])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 02b369fd24ef7cf8997082e7850b9cf022cae34b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 01:18:35 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for setuptools.
+
+---
+ build/pkgs/setuptools/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/setuptools/spkg-configure.m4
+
+diff --git a/build/pkgs/setuptools/spkg-configure.m4 b/build/pkgs/setuptools/spkg-configure.m4
+new file mode 100644
+index 00000000..a2ad811
+--- /dev/null
++++ b/build/pkgs/setuptools/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([setuptools], [SAGE_PYTHON_PACKAGE_CHECK([setuptools])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 05117317d38693978efaf36e81d8b02bae44b257 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 01:15:48 -0400
+Subject: Trac #29665: poison PYTHONUSERBASE when testing for "system"
+ packages.
+
+When we're detecting system installations of python packages, we want
+to hide anything that was installed with e.g. "pip install --user". To
+accomplish that, we mimic the PYTHONUSERBASE poisoning from sage-env
+within the SAGE_PYTHON_PACKAGE_CHECK() macro.
+---
+ m4/sage_python_package_check.m4 | 18 +++++++++++++++++-
+ 1 file changed, 17 insertions(+), 1 deletion(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 77b0a0c..b8cdba4 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -38,11 +38,27 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     dnl package.
+     SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
+     AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++
++    dnl To prevent user-site (pip install --user) packages from being
++    dnl detected as "system" packages, we poison PYTHONUSERBASE. The
++    dnl sage-env script also does this at runtime; we mimic that
++    dnl implementation to ensure that the behaviors at ./configure and
++    dnl runtime are identical. Beware that (as in sage-env) the poisoning
++    dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
++    dnl user points PYTHONUSERBASE to any path (even the default), then
++    dnl his local pip packages will be detected.
++    PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
++    AS_IF([test -z "${PYTHONUSERBASE}"], [
++      PYTHONUSERBASE="${HOME}/.sage/local"
++    ])
++
+     AS_IF(
+-      ["${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())"],
++      [PYTHONUSERBASE="${PYTHONUSERBASE}" "${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" 2>/dev/null],
+       [AC_MSG_RESULT(yes)],
+       [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+     )
++
++    PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d75c1492f63a584b5ec5f424ddd7f7c4a6d502d3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:20:04 -0400
+Subject: Trac #29665: run SAGE_PYTHON_PACKAGE_CHECK() inside a venv.
+
+To recreate the runtime environment as closely as possible, we now use
+a venv (with system site packages enabled) when checking for system
+copies of python packages.
+---
+ m4/sage_python_package_check.m4 | 76 +++++++++++++++++++++++++++--------------
+ 1 file changed, 51 insertions(+), 25 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index b8cdba4..7cbd6c0 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -15,9 +15,11 @@
+ #
+ #     2. If we are not using the system python (no $PYTHON_FOR_VENV),
+ #
+-#     3. If setuptools is not available to the system python,
++#     3. If we are unable to create a venv with the system python,
+ #
+-#     4. If the contents of install-requires.txt are not met (wrong
++#     4. If setuptools is not available to the system python,
++#
++#     5. If the contents of install-requires.txt are not met (wrong
+ #        version, no version, etc.) by the system python.
+ #
+ #   In any of those cases, we set sage_spkg_install_$package to "yes"
+@@ -27,38 +29,62 @@
+ #
+ #   The SAGE_SPKG_CONFIGURE_PYTHON3() macro is AC_REQUIRE'd to ensure
+ #   that $PYTHON_FOR_VENV is available, if it is going to be available.
++#   The check is run inside a new venv, and with the PYTHONUSERBASE
++#   variable poisoned in the same manner as sage-env poisons it, to
++#   ensure that the ./configure- and run-time views of the system
++#   are as similar as possible.
+ #
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
+     AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
+ 
+-    dnl strip all comments from install-requires.txt; this should leave
+-    dnl only a single line containing the version specification for this
+-    dnl package.
+-    SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
+-    AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++    dnl We run this check inside a python venv, because that's ultimately
++    dnl how the system $PYTHON_FOR_VENV will be used.
++    AC_MSG_CHECKING([if we can create a python venv in config.venv])
+ 
+-    dnl To prevent user-site (pip install --user) packages from being
+-    dnl detected as "system" packages, we poison PYTHONUSERBASE. The
+-    dnl sage-env script also does this at runtime; we mimic that
+-    dnl implementation to ensure that the behaviors at ./configure and
+-    dnl runtime are identical. Beware that (as in sage-env) the poisoning
+-    dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
+-    dnl user points PYTHONUSERBASE to any path (even the default), then
+-    dnl his local pip packages will be detected.
+-    PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
+-    AS_IF([test -z "${PYTHONUSERBASE}"], [
+-      PYTHONUSERBASE="${HOME}/.sage/local"
+-    ])
++    dnl Use --clear because ./configure typically clobbers its output files.
++    AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
++                                        --clear                dnl
++                                        --without-pip          dnl
++					config.venv], [
++      AC_MSG_RESULT(yes)
++      dnl strip all comments from install-requires.txt; this should leave
++      dnl only a single line containing the version specification for this
++      dnl package.
++      SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
++      AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++
++      dnl To prevent user-site (pip install --user) packages from being
++      dnl detected as "system" packages, we poison PYTHONUSERBASE. The
++      dnl sage-env script also does this at runtime; we mimic that
++      dnl implementation to ensure that the behaviors at ./configure and
++      dnl runtime are identical. Beware that (as in sage-env) the poisoning
++      dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
++      dnl user points PYTHONUSERBASE to any path (even the default), then
++      dnl his local pip packages will be detected.
++      PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
++      AS_IF([test -z "${PYTHONUSERBASE}"], [
++        PYTHONUSERBASE="${HOME}/.sage/local"
++      ])
+ 
+-    AS_IF(
+-      [PYTHONUSERBASE="${PYTHONUSERBASE}" "${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" 2>/dev/null],
+-      [AC_MSG_RESULT(yes)],
+-      [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+-    )
++      AS_IF(
++        [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
++           "from setuptools.version import pkg_resources;              dnl
++            pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" dnl
++	 2>/dev/null],
++        [AC_MSG_RESULT(yes)],
++        [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
++      )
++
++      PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
++    ], [
++      dnl failed to create a venv for some reason
++      AC_MSG_RESULT(no)
++      sage_spkg_install_$1=yes
++    ])
+ 
+-    PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
++    rm -rf config.venv
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 87646c3264a04ffd98a12d67074f93e1943a1e96 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:38:08 -0400
+Subject: Trac #29665: log SAGE_PYTHON_PACKAGE_CHECK() failures to config.log.
+
+---
+ m4/sage_python_package_check.m4 | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 7cbd6c0..e0e0b9f 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -47,7 +47,8 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
+                                         --clear                dnl
+                                         --without-pip          dnl
+-					config.venv], [
++                                        config.venv            dnl
++                                        2>&AS_MESSAGE_LOG_FD], [
+       AC_MSG_RESULT(yes)
+       dnl strip all comments from install-requires.txt; this should leave
+       dnl only a single line containing the version specification for this
+@@ -72,7 +73,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+         [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
+            "from setuptools.version import pkg_resources;              dnl
+             pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" dnl
+-	 2>/dev/null],
++	 2>&AS_MESSAGE_LOG_FD],
+         [AC_MSG_RESULT(yes)],
+         [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+       )
+-- 
+cgit v1.0-1-gd88e
+
+
+From f7dfffd1c64816e2ae4e0f420b22065c5c5bf2cb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:45:37 -0400
+Subject: Trac #29665: don't clobber a plain file named config.venv.
+
+When SAGE_PYTHON_PACKAGE_CHECK() is cleaning up, we no longer remove
+"config.venv" unconditionally. Instead, we remove it only if it is a
+directory. This is also how "pyvenv --clear" works.
+---
+ m4/sage_python_package_check.m4 | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index e0e0b9f..127a078 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -85,7 +85,9 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+       sage_spkg_install_$1=yes
+     ])
+ 
+-    rm -rf config.venv
++    dnl Clean up config.venv, but only if we could have created it.
++    dnl (The --clear flag to pyvenv will not clobber a plain file.)
++    AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9849c77313b895dcfb786d2ea54e36585bd31ce2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 16 Oct 2021 08:14:42 -0400
+Subject: Trac #29665: don't announce system python packages that won't be
+ used.
+
+When --enable-system-site-packages was not given, the python packages
+using SAGE_PYTHON_PACKAGE_CHECK() in spkg-configure.m4 cannot be used.
+Rather than suggest that users install them anyway, that macro now
+hacks the value of sage_use_system_$package to be "no" when the use
+of system site packages is disabled at the python level.
+---
+ m4/sage_python_package_check.m4 | 17 +++++++++++++++++
+ 1 file changed, 17 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 127a078..7ee82a7 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -89,6 +89,23 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     dnl (The --clear flag to pyvenv will not clobber a plain file.)
+     AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
++    dnl System site packages are disabled.
+     sage_spkg_install_$1=yes
++
++    dnl We have to retroactively hack the --with-system-foo={no,yes,force}
++    dnl mechanism here because it wasn't designed with the ability to
++    dnl disable arbitrary chunks of system packages in mind. The easy cases
++    dnl are "no" and "force" which require no action; "no" means we won't
++    dnl suggest the package anyway, and "force" will raise an error when
++    dnl the system-package check fails.
++    dnl
++    dnl The default of "yes" is more troubling because it is the default. To
++    dnl avoid prompting users to install packages that won't be used, we want
++    dnl to ignore "yes" when reporting the "hint: install these packages..."
++    dnl at the end of ./configure. To accomplish that, we change "yes" to
++    dnl "no" here, essentially changing the default for packages using this
++    dnl macro when --enable-system-site-packages is disabled. Packages with
++    dnl "no" are not suggested to the user.
++    AS_IF([test "${sage_use_system_$1}" = "yes"],[sage_use_system_$1=no])
+   ])
+ ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3e6ad737b94aaac234d615ecaf1a2455eb607f1a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 17 Oct 2021 06:16:21 -0400
+Subject: Trac #29665: add Gentoo package information for python packages.
+
+---
+ build/pkgs/babel/distros/gentoo.txt         | 1 +
+ build/pkgs/bleach/distros/gentoo.txt        | 1 +
+ build/pkgs/certifi/distros/gentoo.txt       | 1 +
+ build/pkgs/cvxopt/distros/gentoo.txt        | 1 +
+ build/pkgs/decorator/distros/gentoo.txt     | 1 +
+ build/pkgs/html5lib/distros/gentoo.txt      | 1 +
+ build/pkgs/idna/distros/gentoo.txt          | 1 +
+ build/pkgs/jinja2/distros/gentoo.txt        | 1 +
+ build/pkgs/matplotlib/distros/gentoo.txt    | 1 +
+ build/pkgs/mpmath/distros/gentoo.txt        | 1 +
+ build/pkgs/networkx/distros/gentoo.txt      | 1 +
+ build/pkgs/numpy/distros/gentoo.txt         | 1 +
+ build/pkgs/packaging/distros/gentoo.txt     | 1 +
+ build/pkgs/pandocfilters/distros/gentoo.txt | 1 +
+ build/pkgs/pickleshare/distros/gentoo.txt   | 1 +
+ build/pkgs/pillow/distros/gentoo.txt        | 1 +
+ build/pkgs/pluggy/distros/gentoo.txt        | 1 +
+ build/pkgs/pygments/distros/gentoo.txt      | 1 +
+ build/pkgs/pytz/distros/gentoo.txt          | 1 +
+ build/pkgs/pyzmq/distros/gentoo.txt         | 1 +
+ build/pkgs/requests/distros/gentoo.txt      | 1 +
+ build/pkgs/scipy/distros/gentoo.txt         | 1 +
+ build/pkgs/setuptools/distros/gentoo.txt    | 1 +
+ build/pkgs/six/distros/gentoo.txt           | 1 +
+ build/pkgs/sympy/distros/gentoo.txt         | 1 +
+ build/pkgs/texttable/distros/gentoo.txt     | 1 +
+ build/pkgs/toml/distros/gentoo.txt          | 1 +
+ build/pkgs/webencodings/distros/gentoo.txt  | 1 +
+ 28 files changed, 28 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/gentoo.txt
+ create mode 100644 build/pkgs/bleach/distros/gentoo.txt
+ create mode 100644 build/pkgs/certifi/distros/gentoo.txt
+ create mode 100644 build/pkgs/cvxopt/distros/gentoo.txt
+ create mode 100644 build/pkgs/decorator/distros/gentoo.txt
+ create mode 100644 build/pkgs/html5lib/distros/gentoo.txt
+ create mode 100644 build/pkgs/idna/distros/gentoo.txt
+ create mode 100644 build/pkgs/jinja2/distros/gentoo.txt
+ create mode 100644 build/pkgs/matplotlib/distros/gentoo.txt
+ create mode 100644 build/pkgs/mpmath/distros/gentoo.txt
+ create mode 100644 build/pkgs/networkx/distros/gentoo.txt
+ create mode 100644 build/pkgs/numpy/distros/gentoo.txt
+ create mode 100644 build/pkgs/packaging/distros/gentoo.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/gentoo.txt
+ create mode 100644 build/pkgs/pickleshare/distros/gentoo.txt
+ create mode 100644 build/pkgs/pillow/distros/gentoo.txt
+ create mode 100644 build/pkgs/pluggy/distros/gentoo.txt
+ create mode 100644 build/pkgs/pygments/distros/gentoo.txt
+ create mode 100644 build/pkgs/pytz/distros/gentoo.txt
+ create mode 100644 build/pkgs/pyzmq/distros/gentoo.txt
+ create mode 100644 build/pkgs/requests/distros/gentoo.txt
+ create mode 100644 build/pkgs/scipy/distros/gentoo.txt
+ create mode 100644 build/pkgs/setuptools/distros/gentoo.txt
+ create mode 100644 build/pkgs/six/distros/gentoo.txt
+ create mode 100644 build/pkgs/sympy/distros/gentoo.txt
+ create mode 100644 build/pkgs/texttable/distros/gentoo.txt
+ create mode 100644 build/pkgs/toml/distros/gentoo.txt
+ create mode 100644 build/pkgs/webencodings/distros/gentoo.txt
+
+diff --git a/build/pkgs/babel/distros/gentoo.txt b/build/pkgs/babel/distros/gentoo.txt
+new file mode 100644
+index 00000000..2d2c34f
+--- /dev/null
++++ b/build/pkgs/babel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/Babel
+diff --git a/build/pkgs/bleach/distros/gentoo.txt b/build/pkgs/bleach/distros/gentoo.txt
+new file mode 100644
+index 00000000..b4f9744
+--- /dev/null
++++ b/build/pkgs/bleach/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/bleach
+diff --git a/build/pkgs/certifi/distros/gentoo.txt b/build/pkgs/certifi/distros/gentoo.txt
+new file mode 100644
+index 00000000..72e2e91
+--- /dev/null
++++ b/build/pkgs/certifi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/certifi
+diff --git a/build/pkgs/cvxopt/distros/gentoo.txt b/build/pkgs/cvxopt/distros/gentoo.txt
+new file mode 100644
+index 00000000..b312391
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/cvxopt
+diff --git a/build/pkgs/decorator/distros/gentoo.txt b/build/pkgs/decorator/distros/gentoo.txt
+new file mode 100644
+index 00000000..fea5a67
+--- /dev/null
++++ b/build/pkgs/decorator/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/decorator
+diff --git a/build/pkgs/html5lib/distros/gentoo.txt b/build/pkgs/html5lib/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c2be76
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/html5lib
+diff --git a/build/pkgs/idna/distros/gentoo.txt b/build/pkgs/idna/distros/gentoo.txt
+new file mode 100644
+index 00000000..68ef51c
+--- /dev/null
++++ b/build/pkgs/idna/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/idna
+diff --git a/build/pkgs/jinja2/distros/gentoo.txt b/build/pkgs/jinja2/distros/gentoo.txt
+new file mode 100644
+index 00000000..15a27ae
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jinja
+diff --git a/build/pkgs/matplotlib/distros/gentoo.txt b/build/pkgs/matplotlib/distros/gentoo.txt
+new file mode 100644
+index 00000000..bcfefb5
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/matplotlib
+diff --git a/build/pkgs/mpmath/distros/gentoo.txt b/build/pkgs/mpmath/distros/gentoo.txt
+new file mode 100644
+index 00000000..946c62d
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/mpmath
+diff --git a/build/pkgs/networkx/distros/gentoo.txt b/build/pkgs/networkx/distros/gentoo.txt
+new file mode 100644
+index 00000000..dd97742
+--- /dev/null
++++ b/build/pkgs/networkx/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/networkx
+diff --git a/build/pkgs/numpy/distros/gentoo.txt b/build/pkgs/numpy/distros/gentoo.txt
+new file mode 100644
+index 00000000..d2179d4
+--- /dev/null
++++ b/build/pkgs/numpy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/numpy
+diff --git a/build/pkgs/packaging/distros/gentoo.txt b/build/pkgs/packaging/distros/gentoo.txt
+new file mode 100644
+index 00000000..e5309ed
+--- /dev/null
++++ b/build/pkgs/packaging/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/packaging
+diff --git a/build/pkgs/pandocfilters/distros/gentoo.txt b/build/pkgs/pandocfilters/distros/gentoo.txt
+new file mode 100644
+index 00000000..a726fda
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/gentoo.txt b/build/pkgs/pickleshare/distros/gentoo.txt
+new file mode 100644
+index 00000000..14fad0f
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pickleshare
+diff --git a/build/pkgs/pillow/distros/gentoo.txt b/build/pkgs/pillow/distros/gentoo.txt
+new file mode 100644
+index 00000000..1243649
+--- /dev/null
++++ b/build/pkgs/pillow/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pillow
+diff --git a/build/pkgs/pluggy/distros/gentoo.txt b/build/pkgs/pluggy/distros/gentoo.txt
+new file mode 100644
+index 00000000..7b33876
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pluggy
+diff --git a/build/pkgs/pygments/distros/gentoo.txt b/build/pkgs/pygments/distros/gentoo.txt
+new file mode 100644
+index 00000000..a584f32
+--- /dev/null
++++ b/build/pkgs/pygments/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pygments
+diff --git a/build/pkgs/pytz/distros/gentoo.txt b/build/pkgs/pytz/distros/gentoo.txt
+new file mode 100644
+index 00000000..902a18b
+--- /dev/null
++++ b/build/pkgs/pytz/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pytz
+diff --git a/build/pkgs/pyzmq/distros/gentoo.txt b/build/pkgs/pyzmq/distros/gentoo.txt
+new file mode 100644
+index 00000000..77c2429
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyzmq
+diff --git a/build/pkgs/requests/distros/gentoo.txt b/build/pkgs/requests/distros/gentoo.txt
+new file mode 100644
+index 00000000..d3dc941
+--- /dev/null
++++ b/build/pkgs/requests/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/requests
+diff --git a/build/pkgs/scipy/distros/gentoo.txt b/build/pkgs/scipy/distros/gentoo.txt
+new file mode 100644
+index 00000000..11dabd2
+--- /dev/null
++++ b/build/pkgs/scipy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/scipy
+diff --git a/build/pkgs/setuptools/distros/gentoo.txt b/build/pkgs/setuptools/distros/gentoo.txt
+new file mode 100644
+index 00000000..3a4fa34
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/setuptools
+diff --git a/build/pkgs/six/distros/gentoo.txt b/build/pkgs/six/distros/gentoo.txt
+new file mode 100644
+index 00000000..f73f648
+--- /dev/null
++++ b/build/pkgs/six/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/six
+diff --git a/build/pkgs/sympy/distros/gentoo.txt b/build/pkgs/sympy/distros/gentoo.txt
+new file mode 100644
+index 00000000..b5a5034
+--- /dev/null
++++ b/build/pkgs/sympy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sympy
+diff --git a/build/pkgs/texttable/distros/gentoo.txt b/build/pkgs/texttable/distros/gentoo.txt
+new file mode 100644
+index 00000000..b33a7a7
+--- /dev/null
++++ b/build/pkgs/texttable/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/texttable
+diff --git a/build/pkgs/toml/distros/gentoo.txt b/build/pkgs/toml/distros/gentoo.txt
+new file mode 100644
+index 00000000..64fcea3
+--- /dev/null
++++ b/build/pkgs/toml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/toml
+diff --git a/build/pkgs/webencodings/distros/gentoo.txt b/build/pkgs/webencodings/distros/gentoo.txt
+new file mode 100644
+index 00000000..7539b0f
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/webencodings
+-- 
+cgit v1.0-1-gd88e
+
+
+From 088380f884124c9608160b613ba031c5f023f604 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 18:43:04 -0700
+Subject: build/pkgs: Add distros/fedora.txt for Python packages
+
+---
+ build/pkgs/babel/distros/fedora.txt         | 1 +
+ build/pkgs/bleach/distros/fedora.txt        | 1 +
+ build/pkgs/certifi/distros/fedora.txt       | 1 +
+ build/pkgs/cvxopt/distros/fedora.txt        | 1 +
+ build/pkgs/decorator/distros/fedora.txt     | 1 +
+ build/pkgs/html5lib/distros/fedora.txt      | 1 +
+ build/pkgs/idna/distros/fedora.txt          | 1 +
+ build/pkgs/jinja2/distros/fedora.txt        | 1 +
+ build/pkgs/matplotlib/distros/fedora.txt    | 1 +
+ build/pkgs/mpmath/distros/fedora.txt        | 1 +
+ build/pkgs/networkx/distros/fedora.txt      | 1 +
+ build/pkgs/numpy/distros/fedora.txt         | 1 +
+ build/pkgs/packaging/distros/fedora.txt     | 1 +
+ build/pkgs/pandocfilters/distros/fedora.txt | 1 +
+ build/pkgs/pickleshare/distros/fedora.txt   | 1 +
+ build/pkgs/pillow/distros/fedora.txt        | 1 +
+ build/pkgs/pluggy/distros/fedora.txt        | 1 +
+ build/pkgs/py/distros/fedora.txt            | 1 +
+ build/pkgs/pygments/distros/fedora.txt      | 1 +
+ build/pkgs/pytz/distros/fedora.txt          | 1 +
+ build/pkgs/pyzmq/distros/fedora.txt         | 1 +
+ build/pkgs/requests/distros/fedora.txt      | 1 +
+ build/pkgs/scipy/distros/fedora.txt         | 1 +
+ build/pkgs/setuptools/distros/fedora.txt    | 1 +
+ build/pkgs/six/distros/fedora.txt           | 1 +
+ build/pkgs/sympy/distros/fedora.txt         | 1 +
+ build/pkgs/texttable/distros/fedora.txt     | 1 +
+ build/pkgs/toml/distros/fedora.txt          | 1 +
+ build/pkgs/webencodings/distros/fedora.txt  | 1 +
+ build/pkgs/wheel/distros/fedora.txt         | 1 +
+ 30 files changed, 30 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/fedora.txt
+ create mode 100644 build/pkgs/bleach/distros/fedora.txt
+ create mode 100644 build/pkgs/certifi/distros/fedora.txt
+ create mode 100644 build/pkgs/cvxopt/distros/fedora.txt
+ create mode 100644 build/pkgs/decorator/distros/fedora.txt
+ create mode 100644 build/pkgs/html5lib/distros/fedora.txt
+ create mode 100644 build/pkgs/idna/distros/fedora.txt
+ create mode 100644 build/pkgs/jinja2/distros/fedora.txt
+ create mode 100644 build/pkgs/matplotlib/distros/fedora.txt
+ create mode 100644 build/pkgs/mpmath/distros/fedora.txt
+ create mode 100644 build/pkgs/networkx/distros/fedora.txt
+ create mode 100644 build/pkgs/numpy/distros/fedora.txt
+ create mode 100644 build/pkgs/packaging/distros/fedora.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/fedora.txt
+ create mode 100644 build/pkgs/pickleshare/distros/fedora.txt
+ create mode 100644 build/pkgs/pillow/distros/fedora.txt
+ create mode 100644 build/pkgs/pluggy/distros/fedora.txt
+ create mode 100644 build/pkgs/py/distros/fedora.txt
+ create mode 100644 build/pkgs/pygments/distros/fedora.txt
+ create mode 100644 build/pkgs/pytz/distros/fedora.txt
+ create mode 100644 build/pkgs/pyzmq/distros/fedora.txt
+ create mode 100644 build/pkgs/requests/distros/fedora.txt
+ create mode 100644 build/pkgs/scipy/distros/fedora.txt
+ create mode 100644 build/pkgs/setuptools/distros/fedora.txt
+ create mode 100644 build/pkgs/six/distros/fedora.txt
+ create mode 100644 build/pkgs/sympy/distros/fedora.txt
+ create mode 100644 build/pkgs/texttable/distros/fedora.txt
+ create mode 100644 build/pkgs/toml/distros/fedora.txt
+ create mode 100644 build/pkgs/webencodings/distros/fedora.txt
+ create mode 100644 build/pkgs/wheel/distros/fedora.txt
+
+diff --git a/build/pkgs/babel/distros/fedora.txt b/build/pkgs/babel/distros/fedora.txt
+new file mode 100644
+index 00000000..98f6593
+--- /dev/null
++++ b/build/pkgs/babel/distros/fedora.txt
+@@ -0,0 +1 @@
++babel
+diff --git a/build/pkgs/bleach/distros/fedora.txt b/build/pkgs/bleach/distros/fedora.txt
+new file mode 100644
+index 00000000..c5422cc
+--- /dev/null
++++ b/build/pkgs/bleach/distros/fedora.txt
+@@ -0,0 +1 @@
++python-bleach
+diff --git a/build/pkgs/certifi/distros/fedora.txt b/build/pkgs/certifi/distros/fedora.txt
+new file mode 100644
+index 00000000..be421c8
+--- /dev/null
++++ b/build/pkgs/certifi/distros/fedora.txt
+@@ -0,0 +1 @@
++python-certifi
+diff --git a/build/pkgs/cvxopt/distros/fedora.txt b/build/pkgs/cvxopt/distros/fedora.txt
+new file mode 100644
+index 00000000..f15770f
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/fedora.txt
+@@ -0,0 +1 @@
++python-cvxopt
+diff --git a/build/pkgs/decorator/distros/fedora.txt b/build/pkgs/decorator/distros/fedora.txt
+new file mode 100644
+index 00000000..0795604
+--- /dev/null
++++ b/build/pkgs/decorator/distros/fedora.txt
+@@ -0,0 +1 @@
++python-decorator
+diff --git a/build/pkgs/html5lib/distros/fedora.txt b/build/pkgs/html5lib/distros/fedora.txt
+new file mode 100644
+index 00000000..b821491
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/fedora.txt
+@@ -0,0 +1 @@
++python-html5lib
+diff --git a/build/pkgs/idna/distros/fedora.txt b/build/pkgs/idna/distros/fedora.txt
+new file mode 100644
+index 00000000..a73e70c
+--- /dev/null
++++ b/build/pkgs/idna/distros/fedora.txt
+@@ -0,0 +1 @@
++python-idna
+diff --git a/build/pkgs/jinja2/distros/fedora.txt b/build/pkgs/jinja2/distros/fedora.txt
+new file mode 100644
+index 00000000..f5f3caf
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/fedora.txt
+@@ -0,0 +1 @@
++python-jinja2
+diff --git a/build/pkgs/matplotlib/distros/fedora.txt b/build/pkgs/matplotlib/distros/fedora.txt
+new file mode 100644
+index 00000000..f6d856e
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/fedora.txt
+@@ -0,0 +1 @@
++python-matplotlib
+diff --git a/build/pkgs/mpmath/distros/fedora.txt b/build/pkgs/mpmath/distros/fedora.txt
+new file mode 100644
+index 00000000..a7dc8d5
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/fedora.txt
+@@ -0,0 +1 @@
++python-mpmath
+diff --git a/build/pkgs/networkx/distros/fedora.txt b/build/pkgs/networkx/distros/fedora.txt
+new file mode 100644
+index 00000000..293f943
+--- /dev/null
++++ b/build/pkgs/networkx/distros/fedora.txt
+@@ -0,0 +1 @@
++python-networkx
+diff --git a/build/pkgs/numpy/distros/fedora.txt b/build/pkgs/numpy/distros/fedora.txt
+new file mode 100644
+index 00000000..c8722b9
+--- /dev/null
++++ b/build/pkgs/numpy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-numpy
+diff --git a/build/pkgs/packaging/distros/fedora.txt b/build/pkgs/packaging/distros/fedora.txt
+new file mode 100644
+index 00000000..02ad855
+--- /dev/null
++++ b/build/pkgs/packaging/distros/fedora.txt
+@@ -0,0 +1 @@
++python-packaging
+diff --git a/build/pkgs/pandocfilters/distros/fedora.txt b/build/pkgs/pandocfilters/distros/fedora.txt
+new file mode 100644
+index 00000000..e7a86d0
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/fedora.txt b/build/pkgs/pickleshare/distros/fedora.txt
+new file mode 100644
+index 00000000..6d991a2
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pickleshare
+diff --git a/build/pkgs/pillow/distros/fedora.txt b/build/pkgs/pillow/distros/fedora.txt
+new file mode 100644
+index 00000000..86dbb1d
+--- /dev/null
++++ b/build/pkgs/pillow/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pillow
+diff --git a/build/pkgs/pluggy/distros/fedora.txt b/build/pkgs/pluggy/distros/fedora.txt
+new file mode 100644
+index 00000000..c869e54
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pluggy
+diff --git a/build/pkgs/py/distros/fedora.txt b/build/pkgs/py/distros/fedora.txt
+new file mode 100644
+index 00000000..b348d39
+--- /dev/null
++++ b/build/pkgs/py/distros/fedora.txt
+@@ -0,0 +1 @@
++python-py
+diff --git a/build/pkgs/pygments/distros/fedora.txt b/build/pkgs/pygments/distros/fedora.txt
+new file mode 100644
+index 00000000..f3e72a8
+--- /dev/null
++++ b/build/pkgs/pygments/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pygments
+diff --git a/build/pkgs/pytz/distros/fedora.txt b/build/pkgs/pytz/distros/fedora.txt
+new file mode 100644
+index 00000000..2cccc9e
+--- /dev/null
++++ b/build/pkgs/pytz/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pytz
+diff --git a/build/pkgs/pyzmq/distros/fedora.txt b/build/pkgs/pyzmq/distros/fedora.txt
+new file mode 100644
+index 00000000..23f64d1
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pyzmq
+diff --git a/build/pkgs/requests/distros/fedora.txt b/build/pkgs/requests/distros/fedora.txt
+new file mode 100644
+index 00000000..93a7bc1
+--- /dev/null
++++ b/build/pkgs/requests/distros/fedora.txt
+@@ -0,0 +1 @@
++python-requests
+diff --git a/build/pkgs/scipy/distros/fedora.txt b/build/pkgs/scipy/distros/fedora.txt
+new file mode 100644
+index 00000000..7ff2882
+--- /dev/null
++++ b/build/pkgs/scipy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-scipy
+diff --git a/build/pkgs/setuptools/distros/fedora.txt b/build/pkgs/setuptools/distros/fedora.txt
+new file mode 100644
+index 00000000..e1ad178
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/fedora.txt
+@@ -0,0 +1 @@
++python-setuptools
+diff --git a/build/pkgs/six/distros/fedora.txt b/build/pkgs/six/distros/fedora.txt
+new file mode 100644
+index 00000000..787c530
+--- /dev/null
++++ b/build/pkgs/six/distros/fedora.txt
+@@ -0,0 +1 @@
++python-six
+diff --git a/build/pkgs/sympy/distros/fedora.txt b/build/pkgs/sympy/distros/fedora.txt
+new file mode 100644
+index 00000000..126c88a
+--- /dev/null
++++ b/build/pkgs/sympy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-sympy
+diff --git a/build/pkgs/texttable/distros/fedora.txt b/build/pkgs/texttable/distros/fedora.txt
+new file mode 100644
+index 00000000..8d1ccec
+--- /dev/null
++++ b/build/pkgs/texttable/distros/fedora.txt
+@@ -0,0 +1 @@
++python-texttable
+diff --git a/build/pkgs/toml/distros/fedora.txt b/build/pkgs/toml/distros/fedora.txt
+new file mode 100644
+index 00000000..821ee77
+--- /dev/null
++++ b/build/pkgs/toml/distros/fedora.txt
+@@ -0,0 +1 @@
++python-toml
+diff --git a/build/pkgs/webencodings/distros/fedora.txt b/build/pkgs/webencodings/distros/fedora.txt
+new file mode 100644
+index 00000000..12ddba9
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/fedora.txt
+@@ -0,0 +1 @@
++python-webencodings
+diff --git a/build/pkgs/wheel/distros/fedora.txt b/build/pkgs/wheel/distros/fedora.txt
+new file mode 100644
+index 00000000..ae4cbb9
+--- /dev/null
++++ b/build/pkgs/wheel/distros/fedora.txt
+@@ -0,0 +1 @@
++python-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From ad1d5a20380b147c774903066031442f31094626 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 21:04:04 -0700
+Subject: build/pkgs: Add distros/arch.txt for Python packages
+
+---
+ build/pkgs/babel/distros/arch.txt         | 1 +
+ build/pkgs/bleach/distros/arch.txt        | 1 +
+ build/pkgs/certifi/distros/arch.txt       | 1 +
+ build/pkgs/cvxopt/distros/arch.txt        | 1 +
+ build/pkgs/decorator/distros/arch.txt     | 1 +
+ build/pkgs/html5lib/distros/arch.txt      | 1 +
+ build/pkgs/idna/distros/arch.txt          | 1 +
+ build/pkgs/matplotlib/distros/arch.txt    | 1 +
+ build/pkgs/mpmath/distros/arch.txt        | 1 +
+ build/pkgs/networkx/distros/arch.txt      | 1 +
+ build/pkgs/numpy/distros/arch.txt         | 1 +
+ build/pkgs/packaging/distros/arch.txt     | 1 +
+ build/pkgs/pandocfilters/distros/arch.txt | 1 +
+ build/pkgs/pickleshare/distros/arch.txt   | 1 +
+ build/pkgs/pillow/distros/arch.txt        | 1 +
+ build/pkgs/pluggy/distros/arch.txt        | 1 +
+ build/pkgs/py/distros/arch.txt            | 1 +
+ build/pkgs/pygments/distros/arch.txt      | 1 +
+ build/pkgs/pytz/distros/arch.txt          | 1 +
+ build/pkgs/pyzmq/distros/arch.txt         | 1 +
+ build/pkgs/requests/distros/arch.txt      | 1 +
+ build/pkgs/scipy/distros/arch.txt         | 1 +
+ build/pkgs/setuptools/distros/arch.txt    | 1 +
+ build/pkgs/six/distros/arch.txt           | 1 +
+ build/pkgs/sympy/distros/arch.txt         | 1 +
+ build/pkgs/texttable/distros/arch.txt     | 1 +
+ build/pkgs/toml/distros/arch.txt          | 1 +
+ build/pkgs/webencodings/distros/arch.txt  | 1 +
+ build/pkgs/wheel/distros/arch.txt         | 1 +
+ 29 files changed, 29 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/arch.txt
+ create mode 100644 build/pkgs/bleach/distros/arch.txt
+ create mode 100644 build/pkgs/certifi/distros/arch.txt
+ create mode 100644 build/pkgs/cvxopt/distros/arch.txt
+ create mode 100644 build/pkgs/decorator/distros/arch.txt
+ create mode 100644 build/pkgs/html5lib/distros/arch.txt
+ create mode 100644 build/pkgs/idna/distros/arch.txt
+ create mode 100644 build/pkgs/matplotlib/distros/arch.txt
+ create mode 100644 build/pkgs/mpmath/distros/arch.txt
+ create mode 100644 build/pkgs/networkx/distros/arch.txt
+ create mode 100644 build/pkgs/numpy/distros/arch.txt
+ create mode 100644 build/pkgs/packaging/distros/arch.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/arch.txt
+ create mode 100644 build/pkgs/pickleshare/distros/arch.txt
+ create mode 100644 build/pkgs/pillow/distros/arch.txt
+ create mode 100644 build/pkgs/pluggy/distros/arch.txt
+ create mode 100644 build/pkgs/py/distros/arch.txt
+ create mode 100644 build/pkgs/pygments/distros/arch.txt
+ create mode 100644 build/pkgs/pytz/distros/arch.txt
+ create mode 100644 build/pkgs/pyzmq/distros/arch.txt
+ create mode 100644 build/pkgs/requests/distros/arch.txt
+ create mode 100644 build/pkgs/scipy/distros/arch.txt
+ create mode 100644 build/pkgs/setuptools/distros/arch.txt
+ create mode 100644 build/pkgs/six/distros/arch.txt
+ create mode 100644 build/pkgs/sympy/distros/arch.txt
+ create mode 100644 build/pkgs/texttable/distros/arch.txt
+ create mode 100644 build/pkgs/toml/distros/arch.txt
+ create mode 100644 build/pkgs/webencodings/distros/arch.txt
+ create mode 100644 build/pkgs/wheel/distros/arch.txt
+
+diff --git a/build/pkgs/babel/distros/arch.txt b/build/pkgs/babel/distros/arch.txt
+new file mode 100644
+index 00000000..f2d828c
+--- /dev/null
++++ b/build/pkgs/babel/distros/arch.txt
+@@ -0,0 +1 @@
++python-babel
+diff --git a/build/pkgs/bleach/distros/arch.txt b/build/pkgs/bleach/distros/arch.txt
+new file mode 100644
+index 00000000..c5422cc
+--- /dev/null
++++ b/build/pkgs/bleach/distros/arch.txt
+@@ -0,0 +1 @@
++python-bleach
+diff --git a/build/pkgs/certifi/distros/arch.txt b/build/pkgs/certifi/distros/arch.txt
+new file mode 100644
+index 00000000..be421c8
+--- /dev/null
++++ b/build/pkgs/certifi/distros/arch.txt
+@@ -0,0 +1 @@
++python-certifi
+diff --git a/build/pkgs/cvxopt/distros/arch.txt b/build/pkgs/cvxopt/distros/arch.txt
+new file mode 100644
+index 00000000..f15770f
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/arch.txt
+@@ -0,0 +1 @@
++python-cvxopt
+diff --git a/build/pkgs/decorator/distros/arch.txt b/build/pkgs/decorator/distros/arch.txt
+new file mode 100644
+index 00000000..0795604
+--- /dev/null
++++ b/build/pkgs/decorator/distros/arch.txt
+@@ -0,0 +1 @@
++python-decorator
+diff --git a/build/pkgs/html5lib/distros/arch.txt b/build/pkgs/html5lib/distros/arch.txt
+new file mode 100644
+index 00000000..b821491
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/arch.txt
+@@ -0,0 +1 @@
++python-html5lib
+diff --git a/build/pkgs/idna/distros/arch.txt b/build/pkgs/idna/distros/arch.txt
+new file mode 100644
+index 00000000..a73e70c
+--- /dev/null
++++ b/build/pkgs/idna/distros/arch.txt
+@@ -0,0 +1 @@
++python-idna
+diff --git a/build/pkgs/matplotlib/distros/arch.txt b/build/pkgs/matplotlib/distros/arch.txt
+new file mode 100644
+index 00000000..f6d856e
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/arch.txt
+@@ -0,0 +1 @@
++python-matplotlib
+diff --git a/build/pkgs/mpmath/distros/arch.txt b/build/pkgs/mpmath/distros/arch.txt
+new file mode 100644
+index 00000000..a7dc8d5
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/arch.txt
+@@ -0,0 +1 @@
++python-mpmath
+diff --git a/build/pkgs/networkx/distros/arch.txt b/build/pkgs/networkx/distros/arch.txt
+new file mode 100644
+index 00000000..293f943
+--- /dev/null
++++ b/build/pkgs/networkx/distros/arch.txt
+@@ -0,0 +1 @@
++python-networkx
+diff --git a/build/pkgs/numpy/distros/arch.txt b/build/pkgs/numpy/distros/arch.txt
+new file mode 100644
+index 00000000..c8722b9
+--- /dev/null
++++ b/build/pkgs/numpy/distros/arch.txt
+@@ -0,0 +1 @@
++python-numpy
+diff --git a/build/pkgs/packaging/distros/arch.txt b/build/pkgs/packaging/distros/arch.txt
+new file mode 100644
+index 00000000..02ad855
+--- /dev/null
++++ b/build/pkgs/packaging/distros/arch.txt
+@@ -0,0 +1 @@
++python-packaging
+diff --git a/build/pkgs/pandocfilters/distros/arch.txt b/build/pkgs/pandocfilters/distros/arch.txt
+new file mode 100644
+index 00000000..e7a86d0
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/arch.txt
+@@ -0,0 +1 @@
++python-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/arch.txt b/build/pkgs/pickleshare/distros/arch.txt
+new file mode 100644
+index 00000000..6d991a2
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/arch.txt
+@@ -0,0 +1 @@
++python-pickleshare
+diff --git a/build/pkgs/pillow/distros/arch.txt b/build/pkgs/pillow/distros/arch.txt
+new file mode 100644
+index 00000000..86dbb1d
+--- /dev/null
++++ b/build/pkgs/pillow/distros/arch.txt
+@@ -0,0 +1 @@
++python-pillow
+diff --git a/build/pkgs/pluggy/distros/arch.txt b/build/pkgs/pluggy/distros/arch.txt
+new file mode 100644
+index 00000000..c869e54
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/arch.txt
+@@ -0,0 +1 @@
++python-pluggy
+diff --git a/build/pkgs/py/distros/arch.txt b/build/pkgs/py/distros/arch.txt
+new file mode 100644
+index 00000000..b348d39
+--- /dev/null
++++ b/build/pkgs/py/distros/arch.txt
+@@ -0,0 +1 @@
++python-py
+diff --git a/build/pkgs/pygments/distros/arch.txt b/build/pkgs/pygments/distros/arch.txt
+new file mode 100644
+index 00000000..f3e72a8
+--- /dev/null
++++ b/build/pkgs/pygments/distros/arch.txt
+@@ -0,0 +1 @@
++python-pygments
+diff --git a/build/pkgs/pytz/distros/arch.txt b/build/pkgs/pytz/distros/arch.txt
+new file mode 100644
+index 00000000..2cccc9e
+--- /dev/null
++++ b/build/pkgs/pytz/distros/arch.txt
+@@ -0,0 +1 @@
++python-pytz
+diff --git a/build/pkgs/pyzmq/distros/arch.txt b/build/pkgs/pyzmq/distros/arch.txt
+new file mode 100644
+index 00000000..23f64d1
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/arch.txt
+@@ -0,0 +1 @@
++python-pyzmq
+diff --git a/build/pkgs/requests/distros/arch.txt b/build/pkgs/requests/distros/arch.txt
+new file mode 100644
+index 00000000..93a7bc1
+--- /dev/null
++++ b/build/pkgs/requests/distros/arch.txt
+@@ -0,0 +1 @@
++python-requests
+diff --git a/build/pkgs/scipy/distros/arch.txt b/build/pkgs/scipy/distros/arch.txt
+new file mode 100644
+index 00000000..7ff2882
+--- /dev/null
++++ b/build/pkgs/scipy/distros/arch.txt
+@@ -0,0 +1 @@
++python-scipy
+diff --git a/build/pkgs/setuptools/distros/arch.txt b/build/pkgs/setuptools/distros/arch.txt
+new file mode 100644
+index 00000000..e1ad178
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/arch.txt
+@@ -0,0 +1 @@
++python-setuptools
+diff --git a/build/pkgs/six/distros/arch.txt b/build/pkgs/six/distros/arch.txt
+new file mode 100644
+index 00000000..787c530
+--- /dev/null
++++ b/build/pkgs/six/distros/arch.txt
+@@ -0,0 +1 @@
++python-six
+diff --git a/build/pkgs/sympy/distros/arch.txt b/build/pkgs/sympy/distros/arch.txt
+new file mode 100644
+index 00000000..126c88a
+--- /dev/null
++++ b/build/pkgs/sympy/distros/arch.txt
+@@ -0,0 +1 @@
++python-sympy
+diff --git a/build/pkgs/texttable/distros/arch.txt b/build/pkgs/texttable/distros/arch.txt
+new file mode 100644
+index 00000000..8d1ccec
+--- /dev/null
++++ b/build/pkgs/texttable/distros/arch.txt
+@@ -0,0 +1 @@
++python-texttable
+diff --git a/build/pkgs/toml/distros/arch.txt b/build/pkgs/toml/distros/arch.txt
+new file mode 100644
+index 00000000..821ee77
+--- /dev/null
++++ b/build/pkgs/toml/distros/arch.txt
+@@ -0,0 +1 @@
++python-toml
+diff --git a/build/pkgs/webencodings/distros/arch.txt b/build/pkgs/webencodings/distros/arch.txt
+new file mode 100644
+index 00000000..12ddba9
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/arch.txt
+@@ -0,0 +1 @@
++python-webencodings
+diff --git a/build/pkgs/wheel/distros/arch.txt b/build/pkgs/wheel/distros/arch.txt
+new file mode 100644
+index 00000000..ae4cbb9
+--- /dev/null
++++ b/build/pkgs/wheel/distros/arch.txt
+@@ -0,0 +1 @@
++python-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5087abee08f2a89ddaf422ec72a84575fe724a79 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 21:20:56 -0700
+Subject: build/pkgs: Add distros/opensuse.txt for Python packages
+
+---
+ build/pkgs/bleach/distros/opensuse.txt        | 1 +
+ build/pkgs/cvxopt/distros/opensuse.txt        | 1 +
+ build/pkgs/html5lib/distros/opensuse.txt      | 1 +
+ build/pkgs/idna/distros/opensuse.txt          | 1 +
+ build/pkgs/jinja2/distros/opensuse.txt        | 2 +-
+ build/pkgs/mpmath/distros/opensuse.txt        | 1 +
+ build/pkgs/numpy/distros/opensuse.txt         | 1 +
+ build/pkgs/packaging/distros/opensuse.txt     | 1 +
+ build/pkgs/pandocfilters/distros/opensuse.txt | 1 +
+ build/pkgs/pluggy/distros/opensuse.txt        | 1 +
+ build/pkgs/py/distros/opensuse.txt            | 1 +
+ build/pkgs/pygments/distros/opensuse.txt      | 2 +-
+ build/pkgs/sympy/distros/opensuse.txt         | 1 +
+ build/pkgs/texttable/distros/opensuse.txt     | 1 +
+ build/pkgs/toml/distros/opensuse.txt          | 1 +
+ 15 files changed, 15 insertions(+), 2 deletions(-)
+ create mode 100644 build/pkgs/bleach/distros/opensuse.txt
+ create mode 100644 build/pkgs/cvxopt/distros/opensuse.txt
+ create mode 100644 build/pkgs/html5lib/distros/opensuse.txt
+ create mode 100644 build/pkgs/idna/distros/opensuse.txt
+ create mode 100644 build/pkgs/mpmath/distros/opensuse.txt
+ create mode 100644 build/pkgs/numpy/distros/opensuse.txt
+ create mode 100644 build/pkgs/packaging/distros/opensuse.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/opensuse.txt
+ create mode 100644 build/pkgs/pluggy/distros/opensuse.txt
+ create mode 100644 build/pkgs/py/distros/opensuse.txt
+ create mode 100644 build/pkgs/sympy/distros/opensuse.txt
+ create mode 100644 build/pkgs/texttable/distros/opensuse.txt
+ create mode 100644 build/pkgs/toml/distros/opensuse.txt
+
+diff --git a/build/pkgs/bleach/distros/opensuse.txt b/build/pkgs/bleach/distros/opensuse.txt
+new file mode 100644
+index 00000000..6d37c4c
+--- /dev/null
++++ b/build/pkgs/bleach/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-bleach
+diff --git a/build/pkgs/cvxopt/distros/opensuse.txt b/build/pkgs/cvxopt/distros/opensuse.txt
+new file mode 100644
+index 00000000..2bb6ad1
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-cvxopt
+diff --git a/build/pkgs/html5lib/distros/opensuse.txt b/build/pkgs/html5lib/distros/opensuse.txt
+new file mode 100644
+index 00000000..6d7b8df
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-html5lib
+diff --git a/build/pkgs/idna/distros/opensuse.txt b/build/pkgs/idna/distros/opensuse.txt
+new file mode 100644
+index 00000000..de48e70
+--- /dev/null
++++ b/build/pkgs/idna/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-idna
+diff --git a/build/pkgs/jinja2/distros/opensuse.txt b/build/pkgs/jinja2/distros/opensuse.txt
+index 5d90a22..f2db865 100644
+--- a/build/pkgs/jinja2/distros/opensuse.txt
++++ b/build/pkgs/jinja2/distros/opensuse.txt
+@@ -1 +1 @@
+-python3-Jinja2
++python3-jinja2
+diff --git a/build/pkgs/mpmath/distros/opensuse.txt b/build/pkgs/mpmath/distros/opensuse.txt
+new file mode 100644
+index 00000000..fbc82a9
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-mpmath
+diff --git a/build/pkgs/numpy/distros/opensuse.txt b/build/pkgs/numpy/distros/opensuse.txt
+new file mode 100644
+index 00000000..79d5c5a
+--- /dev/null
++++ b/build/pkgs/numpy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-numpy
+diff --git a/build/pkgs/packaging/distros/opensuse.txt b/build/pkgs/packaging/distros/opensuse.txt
+new file mode 100644
+index 00000000..8f1c0ff
+--- /dev/null
++++ b/build/pkgs/packaging/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-packaging
+diff --git a/build/pkgs/pandocfilters/distros/opensuse.txt b/build/pkgs/pandocfilters/distros/opensuse.txt
+new file mode 100644
+index 00000000..d0d4c24
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-pandocfilters
+diff --git a/build/pkgs/pluggy/distros/opensuse.txt b/build/pkgs/pluggy/distros/opensuse.txt
+new file mode 100644
+index 00000000..43a3acf
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-pluggy
+diff --git a/build/pkgs/py/distros/opensuse.txt b/build/pkgs/py/distros/opensuse.txt
+new file mode 100644
+index 00000000..81fefe6
+--- /dev/null
++++ b/build/pkgs/py/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-py
+diff --git a/build/pkgs/pygments/distros/opensuse.txt b/build/pkgs/pygments/distros/opensuse.txt
+index 9ff5740..3ab3792 100644
+--- a/build/pkgs/pygments/distros/opensuse.txt
++++ b/build/pkgs/pygments/distros/opensuse.txt
+@@ -1 +1 @@
+-python3-Pygments
++python3-pygments
+diff --git a/build/pkgs/sympy/distros/opensuse.txt b/build/pkgs/sympy/distros/opensuse.txt
+new file mode 100644
+index 00000000..db423c8
+--- /dev/null
++++ b/build/pkgs/sympy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-sympy
+diff --git a/build/pkgs/texttable/distros/opensuse.txt b/build/pkgs/texttable/distros/opensuse.txt
+new file mode 100644
+index 00000000..8f8e7e2
+--- /dev/null
++++ b/build/pkgs/texttable/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-texttable
+diff --git a/build/pkgs/toml/distros/opensuse.txt b/build/pkgs/toml/distros/opensuse.txt
+new file mode 100644
+index 00000000..543e89d
+--- /dev/null
++++ b/build/pkgs/toml/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-toml
+-- 
+cgit v1.0-1-gd88e
+
+
+From a480ba7ace1370d106ae831e904ea22b72af1be7 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 22:45:04 -0700
+Subject: build/pkgs: Add distros/debian.txt for Python packages
+
+---
+ build/pkgs/babel/distros/debian.txt         | 1 +
+ build/pkgs/bleach/distros/debian.txt        | 1 +
+ build/pkgs/certifi/distros/debian.txt       | 1 +
+ build/pkgs/cvxopt/distros/debian.txt        | 1 +
+ build/pkgs/decorator/distros/debian.txt     | 1 +
+ build/pkgs/html5lib/distros/debian.txt      | 1 +
+ build/pkgs/idna/distros/debian.txt          | 1 +
+ build/pkgs/jinja2/distros/debian.txt        | 1 +
+ build/pkgs/matplotlib/distros/debian.txt    | 1 +
+ build/pkgs/mpmath/distros/debian.txt        | 1 +
+ build/pkgs/networkx/distros/debian.txt      | 1 +
+ build/pkgs/numpy/distros/debian.txt         | 1 +
+ build/pkgs/packaging/distros/debian.txt     | 1 +
+ build/pkgs/pandocfilters/distros/debian.txt | 1 +
+ build/pkgs/pickleshare/distros/debian.txt   | 1 +
+ build/pkgs/pillow/distros/debian.txt        | 1 +
+ build/pkgs/pluggy/distros/debian.txt        | 1 +
+ build/pkgs/py/distros/debian.txt            | 1 +
+ build/pkgs/pygments/distros/debian.txt      | 1 +
+ build/pkgs/pytz/distros/debian.txt          | 1 +
+ build/pkgs/requests/distros/debian.txt      | 1 +
+ build/pkgs/scipy/distros/debian.txt         | 1 +
+ build/pkgs/setuptools/distros/debian.txt    | 1 +
+ build/pkgs/six/distros/debian.txt           | 1 +
+ build/pkgs/sympy/distros/debian.txt         | 1 +
+ build/pkgs/texttable/distros/debian.txt     | 1 +
+ build/pkgs/toml/distros/debian.txt          | 1 +
+ build/pkgs/webencodings/distros/debian.txt  | 1 +
+ build/pkgs/wheel/distros/debian.txt         | 1 +
+ 29 files changed, 29 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/debian.txt
+ create mode 100644 build/pkgs/bleach/distros/debian.txt
+ create mode 100644 build/pkgs/certifi/distros/debian.txt
+ create mode 100644 build/pkgs/cvxopt/distros/debian.txt
+ create mode 100644 build/pkgs/decorator/distros/debian.txt
+ create mode 100644 build/pkgs/html5lib/distros/debian.txt
+ create mode 100644 build/pkgs/idna/distros/debian.txt
+ create mode 100644 build/pkgs/jinja2/distros/debian.txt
+ create mode 100644 build/pkgs/matplotlib/distros/debian.txt
+ create mode 100644 build/pkgs/mpmath/distros/debian.txt
+ create mode 100644 build/pkgs/networkx/distros/debian.txt
+ create mode 100644 build/pkgs/numpy/distros/debian.txt
+ create mode 100644 build/pkgs/packaging/distros/debian.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/debian.txt
+ create mode 100644 build/pkgs/pickleshare/distros/debian.txt
+ create mode 100644 build/pkgs/pillow/distros/debian.txt
+ create mode 100644 build/pkgs/pluggy/distros/debian.txt
+ create mode 100644 build/pkgs/py/distros/debian.txt
+ create mode 100644 build/pkgs/pygments/distros/debian.txt
+ create mode 100644 build/pkgs/pytz/distros/debian.txt
+ create mode 100644 build/pkgs/requests/distros/debian.txt
+ create mode 100644 build/pkgs/scipy/distros/debian.txt
+ create mode 100644 build/pkgs/setuptools/distros/debian.txt
+ create mode 100644 build/pkgs/six/distros/debian.txt
+ create mode 100644 build/pkgs/sympy/distros/debian.txt
+ create mode 100644 build/pkgs/texttable/distros/debian.txt
+ create mode 100644 build/pkgs/toml/distros/debian.txt
+ create mode 100644 build/pkgs/webencodings/distros/debian.txt
+ create mode 100644 build/pkgs/wheel/distros/debian.txt
+
+diff --git a/build/pkgs/babel/distros/debian.txt b/build/pkgs/babel/distros/debian.txt
+new file mode 100644
+index 00000000..e623eb6
+--- /dev/null
++++ b/build/pkgs/babel/distros/debian.txt
+@@ -0,0 +1 @@
++python3-babel
+diff --git a/build/pkgs/bleach/distros/debian.txt b/build/pkgs/bleach/distros/debian.txt
+new file mode 100644
+index 00000000..6d37c4c
+--- /dev/null
++++ b/build/pkgs/bleach/distros/debian.txt
+@@ -0,0 +1 @@
++python3-bleach
+diff --git a/build/pkgs/certifi/distros/debian.txt b/build/pkgs/certifi/distros/debian.txt
+new file mode 100644
+index 00000000..f585a82
+--- /dev/null
++++ b/build/pkgs/certifi/distros/debian.txt
+@@ -0,0 +1 @@
++python3-certifi
+diff --git a/build/pkgs/cvxopt/distros/debian.txt b/build/pkgs/cvxopt/distros/debian.txt
+new file mode 100644
+index 00000000..2bb6ad1
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/debian.txt
+@@ -0,0 +1 @@
++python3-cvxopt
+diff --git a/build/pkgs/decorator/distros/debian.txt b/build/pkgs/decorator/distros/debian.txt
+new file mode 100644
+index 00000000..46c478e
+--- /dev/null
++++ b/build/pkgs/decorator/distros/debian.txt
+@@ -0,0 +1 @@
++python3-decorator
+diff --git a/build/pkgs/html5lib/distros/debian.txt b/build/pkgs/html5lib/distros/debian.txt
+new file mode 100644
+index 00000000..6d7b8df
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/debian.txt
+@@ -0,0 +1 @@
++python3-html5lib
+diff --git a/build/pkgs/idna/distros/debian.txt b/build/pkgs/idna/distros/debian.txt
+new file mode 100644
+index 00000000..de48e70
+--- /dev/null
++++ b/build/pkgs/idna/distros/debian.txt
+@@ -0,0 +1 @@
++python3-idna
+diff --git a/build/pkgs/jinja2/distros/debian.txt b/build/pkgs/jinja2/distros/debian.txt
+new file mode 100644
+index 00000000..f2db865
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/debian.txt
+@@ -0,0 +1 @@
++python3-jinja2
+diff --git a/build/pkgs/matplotlib/distros/debian.txt b/build/pkgs/matplotlib/distros/debian.txt
+new file mode 100644
+index 00000000..1374329
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/debian.txt
+@@ -0,0 +1 @@
++python3-matplotlib
+diff --git a/build/pkgs/mpmath/distros/debian.txt b/build/pkgs/mpmath/distros/debian.txt
+new file mode 100644
+index 00000000..fbc82a9
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/debian.txt
+@@ -0,0 +1 @@
++python3-mpmath
+diff --git a/build/pkgs/networkx/distros/debian.txt b/build/pkgs/networkx/distros/debian.txt
+new file mode 100644
+index 00000000..6779066
+--- /dev/null
++++ b/build/pkgs/networkx/distros/debian.txt
+@@ -0,0 +1 @@
++python3-networkx
+diff --git a/build/pkgs/numpy/distros/debian.txt b/build/pkgs/numpy/distros/debian.txt
+new file mode 100644
+index 00000000..79d5c5a
+--- /dev/null
++++ b/build/pkgs/numpy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-numpy
+diff --git a/build/pkgs/packaging/distros/debian.txt b/build/pkgs/packaging/distros/debian.txt
+new file mode 100644
+index 00000000..8f1c0ff
+--- /dev/null
++++ b/build/pkgs/packaging/distros/debian.txt
+@@ -0,0 +1 @@
++python3-packaging
+diff --git a/build/pkgs/pandocfilters/distros/debian.txt b/build/pkgs/pandocfilters/distros/debian.txt
+new file mode 100644
+index 00000000..d0d4c24
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/debian.txt b/build/pkgs/pickleshare/distros/debian.txt
+new file mode 100644
+index 00000000..a00907d
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pickleshare
+diff --git a/build/pkgs/pillow/distros/debian.txt b/build/pkgs/pillow/distros/debian.txt
+new file mode 100644
+index 00000000..3319fcd
+--- /dev/null
++++ b/build/pkgs/pillow/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pillow
+diff --git a/build/pkgs/pluggy/distros/debian.txt b/build/pkgs/pluggy/distros/debian.txt
+new file mode 100644
+index 00000000..43a3acf
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pluggy
+diff --git a/build/pkgs/py/distros/debian.txt b/build/pkgs/py/distros/debian.txt
+new file mode 100644
+index 00000000..81fefe6
+--- /dev/null
++++ b/build/pkgs/py/distros/debian.txt
+@@ -0,0 +1 @@
++python3-py
+diff --git a/build/pkgs/pygments/distros/debian.txt b/build/pkgs/pygments/distros/debian.txt
+new file mode 100644
+index 00000000..3ab3792
+--- /dev/null
++++ b/build/pkgs/pygments/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pygments
+diff --git a/build/pkgs/pytz/distros/debian.txt b/build/pkgs/pytz/distros/debian.txt
+new file mode 100644
+index 00000000..db20908
+--- /dev/null
++++ b/build/pkgs/pytz/distros/debian.txt
+@@ -0,0 +1 @@
++python3-tz
+diff --git a/build/pkgs/requests/distros/debian.txt b/build/pkgs/requests/distros/debian.txt
+new file mode 100644
+index 00000000..43147b2
+--- /dev/null
++++ b/build/pkgs/requests/distros/debian.txt
+@@ -0,0 +1 @@
++python3-requests
+diff --git a/build/pkgs/scipy/distros/debian.txt b/build/pkgs/scipy/distros/debian.txt
+new file mode 100644
+index 00000000..12b3666
+--- /dev/null
++++ b/build/pkgs/scipy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-scipy
+diff --git a/build/pkgs/setuptools/distros/debian.txt b/build/pkgs/setuptools/distros/debian.txt
+new file mode 100644
+index 00000000..1c0901c
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/debian.txt
+@@ -0,0 +1 @@
++python3-setuptools
+diff --git a/build/pkgs/six/distros/debian.txt b/build/pkgs/six/distros/debian.txt
+new file mode 100644
+index 00000000..68ff859
+--- /dev/null
++++ b/build/pkgs/six/distros/debian.txt
+@@ -0,0 +1 @@
++python3-six
+diff --git a/build/pkgs/sympy/distros/debian.txt b/build/pkgs/sympy/distros/debian.txt
+new file mode 100644
+index 00000000..db423c8
+--- /dev/null
++++ b/build/pkgs/sympy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-sympy
+diff --git a/build/pkgs/texttable/distros/debian.txt b/build/pkgs/texttable/distros/debian.txt
+new file mode 100644
+index 00000000..8f8e7e2
+--- /dev/null
++++ b/build/pkgs/texttable/distros/debian.txt
+@@ -0,0 +1 @@
++python3-texttable
+diff --git a/build/pkgs/toml/distros/debian.txt b/build/pkgs/toml/distros/debian.txt
+new file mode 100644
+index 00000000..543e89d
+--- /dev/null
++++ b/build/pkgs/toml/distros/debian.txt
+@@ -0,0 +1 @@
++python3-toml
+diff --git a/build/pkgs/webencodings/distros/debian.txt b/build/pkgs/webencodings/distros/debian.txt
+new file mode 100644
+index 00000000..ac30c2f
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/debian.txt
+@@ -0,0 +1 @@
++python3-webencodings
+diff --git a/build/pkgs/wheel/distros/debian.txt b/build/pkgs/wheel/distros/debian.txt
+new file mode 100644
+index 00000000..3c066725
+--- /dev/null
++++ b/build/pkgs/wheel/distros/debian.txt
+@@ -0,0 +1 @@
++python3-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 93bf30d7de292551c3050e2dd74651d69ba4bd46 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 18 Oct 2021 07:50:34 -0400
+Subject: Trac #29665: add more documentation for SAGE_PYTHON_PACKAGE_CHECK().
+
+An earlier commit allows SAGE_PYTHON_PACKAGE_CHECK(package) to tweak the
+value of sage_use_system_$package if --enable-system-site-packages was
+not used. This essentially changes the default --with-system-$package=yes
+to "no" in that case. Here we update the documentation to reflect it.
+---
+ m4/sage_python_package_check.m4 | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 7ee82a7..95eefd0 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -34,6 +34,10 @@
+ #   ensure that the ./configure- and run-time views of the system
+ #   are as similar as possible.
+ #
++#   To avoid suggesting these system packages to users who have not
++#   set --enable-system-site-packages, this macro also changes the
++#   default for --with-system-foo from "yes" to "no" in that case.
++#
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
+-- 
+cgit v1.0-1-gd88e
+
+
+From d771e49d57ecdf3622434bc09cbfb87ad3bb7744 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 18 Oct 2021 07:42:46 -0400
+Subject: Trac #29665: improve SAGE_PYTHON_PACKAGE_CHECK() failure message.
+
+When --enable-system-site-packages is off, SAGE_PYTHON_PACKAGE_CHECK()
+will always install the corresponding SPKG. We improve the ./configure
+output in that case to make it clear that the decision was based on
+the value of --enable-system-site-packages and not the "real" check.
+---
+ m4/sage_python_package_check.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 95eefd0..5f0f084 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -40,7 +40,9 @@
+ #
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
++  AC_MSG_CHECKING([if --enable-system-site-packages was used])
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
++    AC_MSG_RESULT(yes)
+     AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
+ 
+     dnl We run this check inside a python venv, because that's ultimately
+@@ -94,6 +96,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
+     dnl System site packages are disabled.
++    AC_MSG_RESULT(no; skipping check)
+     sage_spkg_install_$1=yes
+ 
+     dnl We have to retroactively hack the --with-system-foo={no,yes,force}
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5bb43c1b78a1deb3364f235305937c2f823e5e18 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 24 Oct 2021 20:29:25 -0400
+Subject: Trac #29665: use sage-venv in SAGE_PYTHON_PACKAGE_CHECK().
+
+For consistency with the rest of the build system, we now use the
+build/bin/sage-venv script to create the venv in this autoconf macro
+rather than invoking $PYTHON_FOR_VENV with "-m venv" directly.
+---
+ m4/sage_python_package_check.m4 | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 5f0f084..5547b35 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -50,11 +50,11 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AC_MSG_CHECKING([if we can create a python venv in config.venv])
+ 
+     dnl Use --clear because ./configure typically clobbers its output files.
+-    AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
+-                                        --clear                dnl
+-                                        --without-pip          dnl
+-                                        config.venv            dnl
+-                                        2>&AS_MESSAGE_LOG_FD], [
++    AS_IF(["${PYTHON_FOR_VENV}" build/bin/sage-venv      dnl
++                                  --system-site-packages dnl
++                                  --clear                dnl
++                                  config.venv            dnl
++                                  2>&AS_MESSAGE_LOG_FD], [
+       AC_MSG_RESULT(yes)
+       dnl strip all comments from install-requires.txt; this should leave
+       dnl only a single line containing the version specification for this
+-- 
+cgit v1.0-1-gd88e
+
+
+From c78363d6326addff16ca5abac897949a6be72bf4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:10:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for urllib3.
+
+---
+ build/pkgs/urllib3/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/urllib3/spkg-configure.m4
+
+diff --git a/build/pkgs/urllib3/spkg-configure.m4 b/build/pkgs/urllib3/spkg-configure.m4
+new file mode 100644
+index 00000000..d7ef3e1
+--- /dev/null
++++ b/build/pkgs/urllib3/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([urllib3], [SAGE_PYTHON_PACKAGE_CHECK([urllib3])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f416d5abcae495ea8301fad024b279ea9e997b29 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:15:18 -0400
+Subject: Trac #29665: add Gentoo package information for urllib3.
+
+---
+ build/pkgs/urllib3/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/urllib3/distros/gentoo.txt
+
+diff --git a/build/pkgs/urllib3/distros/gentoo.txt b/build/pkgs/urllib3/distros/gentoo.txt
+new file mode 100644
+index 00000000..172a535
+--- /dev/null
++++ b/build/pkgs/urllib3/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/urllib3
+-- 
+cgit v1.0-1-gd88e
+
+
+From 852068b992bf7959500c650f54cb92e5b68d7ef8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:15:58 -0400
+Subject: Trac #29665: add Gentoo package information for nbformat.
+
+---
+ build/pkgs/nbformat/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbformat/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbformat/distros/gentoo.txt b/build/pkgs/nbformat/distros/gentoo.txt
+new file mode 100644
+index 00000000..006b1f2
+--- /dev/null
++++ b/build/pkgs/nbformat/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbformat
+-- 
+cgit v1.0-1-gd88e
+
+
+From 66179fd28fcc92ee840dcd87bb4db25cea968d66 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:34:16 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for nbformat.
+
+---
+ build/pkgs/nbformat/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbformat/spkg-configure.m4
+
+diff --git a/build/pkgs/nbformat/spkg-configure.m4 b/build/pkgs/nbformat/spkg-configure.m4
+new file mode 100644
+index 00000000..5a7f8c4
+--- /dev/null
++++ b/build/pkgs/nbformat/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbformat], [SAGE_PYTHON_PACKAGE_CHECK([nbformat])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 874005e81ed20f27a5f895030dcdbdfc5f73ad80 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:47:01 -0400
+Subject: Trac #29665: add Gentoo package information for zipp.
+
+---
+ build/pkgs/zipp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/zipp/distros/gentoo.txt
+
+diff --git a/build/pkgs/zipp/distros/gentoo.txt b/build/pkgs/zipp/distros/gentoo.txt
+new file mode 100644
+index 00000000..7f59450
+--- /dev/null
++++ b/build/pkgs/zipp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/zipp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0cc2a7355b5554c1fb79c742ebf02eff54465b3e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:47:35 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for zipp.
+
+---
+ build/pkgs/zipp/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/zipp/spkg-configure.m4
+
+diff --git a/build/pkgs/zipp/spkg-configure.m4 b/build/pkgs/zipp/spkg-configure.m4
+new file mode 100644
+index 00000000..0fe3a9c
+--- /dev/null
++++ b/build/pkgs/zipp/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([zipp], [SAGE_PYTHON_PACKAGE_CHECK([zipp])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6073ad8e56c21fc862749bbd84a56d543fb9458c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:48:37 -0400
+Subject: Trac #29665: add Gentoo package information for wcwidth.
+
+---
+ build/pkgs/wcwidth/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wcwidth/distros/gentoo.txt
+
+diff --git a/build/pkgs/wcwidth/distros/gentoo.txt b/build/pkgs/wcwidth/distros/gentoo.txt
+new file mode 100644
+index 00000000..edeb80b
+--- /dev/null
++++ b/build/pkgs/wcwidth/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/wcwidth
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9793d6172c64d61a015fbe61bd45863759124fad Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:51:10 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for wcwidth.
+
+---
+ build/pkgs/wcwidth/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wcwidth/spkg-configure.m4
+
+diff --git a/build/pkgs/wcwidth/spkg-configure.m4 b/build/pkgs/wcwidth/spkg-configure.m4
+new file mode 100644
+index 00000000..5bde15a
+--- /dev/null
++++ b/build/pkgs/wcwidth/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([wcwidth], [SAGE_PYTHON_PACKAGE_CHECK([wcwidth])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20232f370a43c146ca4e696c72a2cbcc498db060 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:52:36 -0400
+Subject: Trac #29665: add Gentoo package information for testpath.
+
+---
+ build/pkgs/testpath/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/testpath/distros/gentoo.txt
+
+diff --git a/build/pkgs/testpath/distros/gentoo.txt b/build/pkgs/testpath/distros/gentoo.txt
+new file mode 100644
+index 00000000..efa10a0
+--- /dev/null
++++ b/build/pkgs/testpath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/testpath
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1b0785b2aad8844e74345fe950baf097e2b43d24 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:55:22 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for testpath.
+
+---
+ build/pkgs/testpath/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/testpath/spkg-configure.m4
+
+diff --git a/build/pkgs/testpath/spkg-configure.m4 b/build/pkgs/testpath/spkg-configure.m4
+new file mode 100644
+index 00000000..d8fc2a7
+--- /dev/null
++++ b/build/pkgs/testpath/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([testpath], [SAGE_PYTHON_PACKAGE_CHECK([testpath])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 10fc3829ecd956d732b1b069fdfe81f0d6d5cdc2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:56:06 -0400
+Subject: Trac #29665: add Gentoo package information for jedi.
+
+---
+ build/pkgs/jedi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jedi/distros/gentoo.txt
+
+diff --git a/build/pkgs/jedi/distros/gentoo.txt b/build/pkgs/jedi/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c85a46
+--- /dev/null
++++ b/build/pkgs/jedi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jedi
+-- 
+cgit v1.0-1-gd88e
+
+
+From a75824d74c281c7639028ca01dabeed266f56998 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:06:37 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for jedi.
+
+---
+ build/pkgs/jedi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jedi/spkg-configure.m4
+
+diff --git a/build/pkgs/jedi/spkg-configure.m4 b/build/pkgs/jedi/spkg-configure.m4
+new file mode 100644
+index 00000000..a37dbcc
+--- /dev/null
++++ b/build/pkgs/jedi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jedi], [SAGE_PYTHON_PACKAGE_CHECK([jedi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 17af01373d43f6acbbdbc23e073e372d3fdadf8b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:07:47 -0400
+Subject: Trac #29665: add Gentoo package information for tomli.
+
+---
+ build/pkgs/tomli/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tomli/distros/gentoo.txt
+
+diff --git a/build/pkgs/tomli/distros/gentoo.txt b/build/pkgs/tomli/distros/gentoo.txt
+new file mode 100644
+index 00000000..0458e25
+--- /dev/null
++++ b/build/pkgs/tomli/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/tomli
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0d3b5994ae612be11992467c4a3f1a74b81400fe Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:08:12 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for tomli.
+
+---
+ build/pkgs/tomli/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tomli/spkg-configure.m4
+
+diff --git a/build/pkgs/tomli/spkg-configure.m4 b/build/pkgs/tomli/spkg-configure.m4
+new file mode 100644
+index 00000000..95a8b8b
+--- /dev/null
++++ b/build/pkgs/tomli/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tomli], [SAGE_PYTHON_PACKAGE_CHECK([tomli])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From dce1c515781b0eeb8eb9c2bc7aba581560c1fac1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:09:22 -0400
+Subject: Trac #29665: add Gentoo package information for defusedxml.
+
+---
+ build/pkgs/defusedxml/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/defusedxml/distros/gentoo.txt
+
+diff --git a/build/pkgs/defusedxml/distros/gentoo.txt b/build/pkgs/defusedxml/distros/gentoo.txt
+new file mode 100644
+index 00000000..2804214
+--- /dev/null
++++ b/build/pkgs/defusedxml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/defusedxml
+-- 
+cgit v1.0-1-gd88e
+
+
+From 02e1e1cd7f8bdae3ca5b7d35ce70af28a44e9b7c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:11:14 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for defusedxml.
+
+---
+ build/pkgs/defusedxml/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/defusedxml/spkg-configure.m4
+
+diff --git a/build/pkgs/defusedxml/spkg-configure.m4 b/build/pkgs/defusedxml/spkg-configure.m4
+new file mode 100644
+index 00000000..e02f345
+--- /dev/null
++++ b/build/pkgs/defusedxml/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([defusedxml], [SAGE_PYTHON_PACKAGE_CHECK([defusedxml])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e0ba4ebb5cfc637b5d26b85de9f34e0a160d2b9c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:12:22 -0400
+Subject: Trac #29665: add Gentoo package information for ipywidgets.
+
+---
+ build/pkgs/ipywidgets/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipywidgets/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipywidgets/distros/gentoo.txt b/build/pkgs/ipywidgets/distros/gentoo.txt
+new file mode 100644
+index 00000000..7c76967
+--- /dev/null
++++ b/build/pkgs/ipywidgets/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipywidgets
+-- 
+cgit v1.0-1-gd88e
+
+
+From 49df7e7d93c7a31b7c46d5d224a35fd313a29a32 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:15:53 -0400
+Subject: Trac #29665: add Gentoo package information for simplegeneric.
+
+---
+ build/pkgs/simplegeneric/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/simplegeneric/distros/gentoo.txt
+
+diff --git a/build/pkgs/simplegeneric/distros/gentoo.txt b/build/pkgs/simplegeneric/distros/gentoo.txt
+new file mode 100644
+index 00000000..a86e90d
+--- /dev/null
++++ b/build/pkgs/simplegeneric/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/simplegeneric
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2a893635d5804749e6fec7ed7289c921ecb5300a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:16:33 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for simplegeneric.
+
+---
+ build/pkgs/simplegeneric/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/simplegeneric/spkg-configure.m4
+
+diff --git a/build/pkgs/simplegeneric/spkg-configure.m4 b/build/pkgs/simplegeneric/spkg-configure.m4
+new file mode 100644
+index 00000000..13715ab
+--- /dev/null
++++ b/build/pkgs/simplegeneric/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([simplegeneric], [SAGE_PYTHON_PACKAGE_CHECK([simplegeneric])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a8fe7ecd6e3163e7d01261e5497ac452a8cc95ab Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:17:18 -0400
+Subject: Trac #29665: add Gentoo package information for imagesize.
+
+---
+ build/pkgs/imagesize/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/imagesize/distros/gentoo.txt
+
+diff --git a/build/pkgs/imagesize/distros/gentoo.txt b/build/pkgs/imagesize/distros/gentoo.txt
+new file mode 100644
+index 00000000..54350ba
+--- /dev/null
++++ b/build/pkgs/imagesize/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/imagesize
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2ad837c5dd1fca0f50ce6d5042a9344210a54f84 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:17:48 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for imagesize.
+
+---
+ build/pkgs/imagesize/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/imagesize/spkg-configure.m4
+
+diff --git a/build/pkgs/imagesize/spkg-configure.m4 b/build/pkgs/imagesize/spkg-configure.m4
+new file mode 100644
+index 00000000..20210ef
+--- /dev/null
++++ b/build/pkgs/imagesize/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([imagesize], [SAGE_PYTHON_PACKAGE_CHECK([imagesize])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bf47415b5bfca2d7bf24e20de35662bf331623b9 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:18:49 -0400
+Subject: Trac #29665: add Gentoo package information for mistune.
+
+---
+ build/pkgs/mistune/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mistune/distros/gentoo.txt
+
+diff --git a/build/pkgs/mistune/distros/gentoo.txt b/build/pkgs/mistune/distros/gentoo.txt
+new file mode 100644
+index 00000000..56f0a4e
+--- /dev/null
++++ b/build/pkgs/mistune/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/mistune
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6898a74fd0c65a40c5220ba68b4062ac6fe060c6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:21:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for mistune.
+
+---
+ build/pkgs/mistune/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mistune/spkg-configure.m4
+
+diff --git a/build/pkgs/mistune/spkg-configure.m4 b/build/pkgs/mistune/spkg-configure.m4
+new file mode 100644
+index 00000000..972f33d
+--- /dev/null
++++ b/build/pkgs/mistune/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([mistune], [SAGE_PYTHON_PACKAGE_CHECK([mistune])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 62735e4ccf2031cd39eb5e04b03bdfd97005d808 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:22:48 -0400
+Subject: Trac #29665: add Gentoo package information for backcall.
+
+---
+ build/pkgs/backcall/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/backcall/distros/gentoo.txt
+
+diff --git a/build/pkgs/backcall/distros/gentoo.txt b/build/pkgs/backcall/distros/gentoo.txt
+new file mode 100644
+index 00000000..266a222
+--- /dev/null
++++ b/build/pkgs/backcall/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/backcall
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9ef3ea42d4a33c7cdb623fa5417ae300cf323183 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:25:10 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for backcall.
+
+---
+ build/pkgs/backcall/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/backcall/spkg-configure.m4
+
+diff --git a/build/pkgs/backcall/spkg-configure.m4 b/build/pkgs/backcall/spkg-configure.m4
+new file mode 100644
+index 00000000..d6b11c4
+--- /dev/null
++++ b/build/pkgs/backcall/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([backcall], [SAGE_PYTHON_PACKAGE_CHECK([backcall])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1b3ea2a3c40fea0fb58435f5e5304368ea58dff8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:25:58 -0400
+Subject: Trac #29665: add Gentoo package information for parso.
+
+---
+ build/pkgs/parso/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/parso/distros/gentoo.txt
+
+diff --git a/build/pkgs/parso/distros/gentoo.txt b/build/pkgs/parso/distros/gentoo.txt
+new file mode 100644
+index 00000000..f9ce4c7
+--- /dev/null
++++ b/build/pkgs/parso/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/parso
+-- 
+cgit v1.0-1-gd88e
+
+
+From 963a3a2c563ec71a1f5be2395722d0e824cb0b11 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:26:22 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for parso.
+
+---
+ build/pkgs/parso/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/parso/spkg-configure.m4
+
+diff --git a/build/pkgs/parso/spkg-configure.m4 b/build/pkgs/parso/spkg-configure.m4
+new file mode 100644
+index 00000000..1ca6f1b
+--- /dev/null
++++ b/build/pkgs/parso/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([parso], [SAGE_PYTHON_PACKAGE_CHECK([parso])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 943053dfc474b6549bcc7d6ef2971ea43588b35c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:27:00 -0400
+Subject: Trac #29665: add Gentoo package information for pyparsing.
+
+---
+ build/pkgs/pyparsing/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyparsing/distros/gentoo.txt
+
+diff --git a/build/pkgs/pyparsing/distros/gentoo.txt b/build/pkgs/pyparsing/distros/gentoo.txt
+new file mode 100644
+index 00000000..ef0419f
+--- /dev/null
++++ b/build/pkgs/pyparsing/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyparsing
+-- 
+cgit v1.0-1-gd88e
+
+
+From bd682eaa2ac41dd84e7a52e2b0c5442fc8fd8919 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:27:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pyparsing.
+
+---
+ build/pkgs/pyparsing/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyparsing/spkg-configure.m4
+
+diff --git a/build/pkgs/pyparsing/spkg-configure.m4 b/build/pkgs/pyparsing/spkg-configure.m4
+new file mode 100644
+index 00000000..d2b4c00
+--- /dev/null
++++ b/build/pkgs/pyparsing/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pyparsing], [SAGE_PYTHON_PACKAGE_CHECK([pyparsing])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 74f36a9c0ec7c63b7e6c40066e42f4b15c2f978e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:17:42 -0400
+Subject: Trac #29665: add Gentoo package information for debugpy.
+
+---
+ build/pkgs/debugpy/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/debugpy/distros/gentoo.txt
+
+diff --git a/build/pkgs/debugpy/distros/gentoo.txt b/build/pkgs/debugpy/distros/gentoo.txt
+new file mode 100644
+index 00000000..8b797ce
+--- /dev/null
++++ b/build/pkgs/debugpy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/debugpy
+-- 
+cgit v1.0-1-gd88e
+
+
+From be072fa87ac5c373d9dc9b54c0bd68734d5709bc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:21:17 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for debugpy.
+
+---
+ build/pkgs/debugpy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/debugpy/spkg-configure.m4
+
+diff --git a/build/pkgs/debugpy/spkg-configure.m4 b/build/pkgs/debugpy/spkg-configure.m4
+new file mode 100644
+index 00000000..db605ff
+--- /dev/null
++++ b/build/pkgs/debugpy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([debugpy], [SAGE_PYTHON_PACKAGE_CHECK([debugpy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6f777ce2f2e14b94e91c8b7bbac82f9017460aba Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:23:56 -0400
+Subject: Trac #29665: add Gentoo package information for tzlocal.
+
+---
+ build/pkgs/tzlocal/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tzlocal/distros/gentoo.txt
+
+diff --git a/build/pkgs/tzlocal/distros/gentoo.txt b/build/pkgs/tzlocal/distros/gentoo.txt
+new file mode 100644
+index 00000000..2018442
+--- /dev/null
++++ b/build/pkgs/tzlocal/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/tzlocal
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3bd078fc15ae13982249452711baafae91038191 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:24:51 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for tzlocal.
+
+---
+ build/pkgs/tzlocal/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tzlocal/spkg-configure.m4
+
+diff --git a/build/pkgs/tzlocal/spkg-configure.m4 b/build/pkgs/tzlocal/spkg-configure.m4
+new file mode 100644
+index 00000000..e020b28
+--- /dev/null
++++ b/build/pkgs/tzlocal/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tzlocal], [SAGE_PYTHON_PACKAGE_CHECK([tzlocal])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 91b0882fc62214923da9ee7b6dccb05d8a1d11d1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:26:13 -0400
+Subject: Trac #29665: add Gentoo package information for pycparser.
+
+---
+ build/pkgs/pycparser/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pycparser/distros/gentoo.txt
+
+diff --git a/build/pkgs/pycparser/distros/gentoo.txt b/build/pkgs/pycparser/distros/gentoo.txt
+new file mode 100644
+index 00000000..5e87307
+--- /dev/null
++++ b/build/pkgs/pycparser/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pycparser
+-- 
+cgit v1.0-1-gd88e
+
+
+From beabde92fe6e057faf516fe82d27f1e903e55ce6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:27:27 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pycparser.
+
+---
+ build/pkgs/pycparser/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pycparser/spkg-configure.m4
+
+diff --git a/build/pkgs/pycparser/spkg-configure.m4 b/build/pkgs/pycparser/spkg-configure.m4
+new file mode 100644
+index 00000000..4b9b900
+--- /dev/null
++++ b/build/pkgs/pycparser/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pycparser], [SAGE_PYTHON_PACKAGE_CHECK([pycparser])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 86c2788dc7fd1169314e9598c91fa81045553677 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:29:36 -0400
+Subject: Trac #29665: add Gentoo package information for cycler.
+
+---
+ build/pkgs/cycler/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cycler/distros/gentoo.txt
+
+diff --git a/build/pkgs/cycler/distros/gentoo.txt b/build/pkgs/cycler/distros/gentoo.txt
+new file mode 100644
+index 00000000..4b21543
+--- /dev/null
++++ b/build/pkgs/cycler/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/cycler
+-- 
+cgit v1.0-1-gd88e
+
+
+From 67c5a944101ddf329f0a61c61d4e784f58a5c5b0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:30:27 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for cycler.
+
+---
+ build/pkgs/cycler/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cycler/spkg-configure.m4
+
+diff --git a/build/pkgs/cycler/spkg-configure.m4 b/build/pkgs/cycler/spkg-configure.m4
+new file mode 100644
+index 00000000..239571a
+--- /dev/null
++++ b/build/pkgs/cycler/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([cycler], [SAGE_PYTHON_PACKAGE_CHECK([cycler])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ef6d490251abfa41f7a0910274700a8a6a65f629 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:31:19 -0400
+Subject: Trac #29665: add Gentoo package information for traitlets.
+
+---
+ build/pkgs/traitlets/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/traitlets/distros/gentoo.txt
+
+diff --git a/build/pkgs/traitlets/distros/gentoo.txt b/build/pkgs/traitlets/distros/gentoo.txt
+new file mode 100644
+index 00000000..46bfaab
+--- /dev/null
++++ b/build/pkgs/traitlets/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/traitlets
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1f922b458d34088d9f6773312209e69f19ee45dc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:31:50 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for traitlets.
+
+---
+ build/pkgs/traitlets/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/traitlets/spkg-configure.m4
+
+diff --git a/build/pkgs/traitlets/spkg-configure.m4 b/build/pkgs/traitlets/spkg-configure.m4
+new file mode 100644
+index 00000000..df2382b
+--- /dev/null
++++ b/build/pkgs/traitlets/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([traitlets], [SAGE_PYTHON_PACKAGE_CHECK([traitlets])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 95b89a9ced0acb6d971a27fa63b97ea58a11f4e1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:33:35 -0400
+Subject: Trac #29665: add Gentoo package information for argcomplete.
+
+---
+ build/pkgs/argcomplete/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argcomplete/distros/gentoo.txt
+
+diff --git a/build/pkgs/argcomplete/distros/gentoo.txt b/build/pkgs/argcomplete/distros/gentoo.txt
+new file mode 100644
+index 00000000..b150949
+--- /dev/null
++++ b/build/pkgs/argcomplete/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/argcomplete
+-- 
+cgit v1.0-1-gd88e
+
+
+From b4cd8ef384e6e5bae0de0f3c113fb5f9e6e1a71e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:34:14 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for argcomplete.
+
+---
+ build/pkgs/argcomplete/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argcomplete/spkg-configure.m4
+
+diff --git a/build/pkgs/argcomplete/spkg-configure.m4 b/build/pkgs/argcomplete/spkg-configure.m4
+new file mode 100644
+index 00000000..cbd7ccf
+--- /dev/null
++++ b/build/pkgs/argcomplete/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([argcomplete], [SAGE_PYTHON_PACKAGE_CHECK([argcomplete])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4cc610e8331970cc018d7ea87af928fa73a292c1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:36:21 -0400
+Subject: Trac #29665: add Gentoo package information for ptyprocess.
+
+---
+ build/pkgs/ptyprocess/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ptyprocess/distros/gentoo.txt
+
+diff --git a/build/pkgs/ptyprocess/distros/gentoo.txt b/build/pkgs/ptyprocess/distros/gentoo.txt
+new file mode 100644
+index 00000000..571a851
+--- /dev/null
++++ b/build/pkgs/ptyprocess/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ptyprocess
+-- 
+cgit v1.0-1-gd88e
+
+
+From cd15f97221bf5933b07900e4f77cb55401eede26 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:37:02 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ptyprocess.
+
+---
+ build/pkgs/ptyprocess/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ptyprocess/spkg-configure.m4
+
+diff --git a/build/pkgs/ptyprocess/spkg-configure.m4 b/build/pkgs/ptyprocess/spkg-configure.m4
+new file mode 100644
+index 00000000..bfacbae
+--- /dev/null
++++ b/build/pkgs/ptyprocess/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ptyprocess], [SAGE_PYTHON_PACKAGE_CHECK([ptyprocess])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb5f45b15f99e4ba28e1b1f6042a0e8ea17f1dfc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:38:22 -0400
+Subject: Trac #29665: add Gentoo package information for attrs.
+
+---
+ build/pkgs/attrs/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/attrs/distros/gentoo.txt
+
+diff --git a/build/pkgs/attrs/distros/gentoo.txt b/build/pkgs/attrs/distros/gentoo.txt
+new file mode 100644
+index 00000000..3b906fa
+--- /dev/null
++++ b/build/pkgs/attrs/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/attrs
+-- 
+cgit v1.0-1-gd88e
+
+
+From 321707ebf8e9af1e4ac3a5b5b094b4226bb3a7a5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:38:55 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for attrs.
+
+---
+ build/pkgs/attrs/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/attrs/spkg-configure.m4
+
+diff --git a/build/pkgs/attrs/spkg-configure.m4 b/build/pkgs/attrs/spkg-configure.m4
+new file mode 100644
+index 00000000..ba6a9b7
+--- /dev/null
++++ b/build/pkgs/attrs/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([attrs], [SAGE_PYTHON_PACKAGE_CHECK([attrs])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 69a498a4e8854ecdfc2f1a134104983c0dcb9e32 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:40:09 -0400
+Subject: Trac #29665: add Gentoo package information for send2trash.
+
+---
+ build/pkgs/send2trash/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/send2trash/distros/gentoo.txt
+
+diff --git a/build/pkgs/send2trash/distros/gentoo.txt b/build/pkgs/send2trash/distros/gentoo.txt
+new file mode 100644
+index 00000000..a89b179
+--- /dev/null
++++ b/build/pkgs/send2trash/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/send2trash
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9baed17c84e1bdf5abd17c20766e5cd7dddc5b53 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:41:45 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for send2trash.
+
+---
+ build/pkgs/send2trash/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/send2trash/spkg-configure.m4
+
+diff --git a/build/pkgs/send2trash/spkg-configure.m4 b/build/pkgs/send2trash/spkg-configure.m4
+new file mode 100644
+index 00000000..3bbb727
+--- /dev/null
++++ b/build/pkgs/send2trash/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([send2trash], [SAGE_PYTHON_PACKAGE_CHECK([send2trash])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b9b552b2a2aaccaeb7c5b25be0b681f107522d09 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:43:27 -0400
+Subject: Trac #29665: add Gentoo package information for pyrsistent.
+
+---
+ build/pkgs/pyrsistent/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyrsistent/distros/gentoo.txt
+
+diff --git a/build/pkgs/pyrsistent/distros/gentoo.txt b/build/pkgs/pyrsistent/distros/gentoo.txt
+new file mode 100644
+index 00000000..83439ce
+--- /dev/null
++++ b/build/pkgs/pyrsistent/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyrsistent
+-- 
+cgit v1.0-1-gd88e
+
+
+From a17b31fac6104852762f57daa749443147bdf121 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:44:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pyrsistent.
+
+---
+ build/pkgs/pyrsistent/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyrsistent/spkg-configure.m4
+
+diff --git a/build/pkgs/pyrsistent/spkg-configure.m4 b/build/pkgs/pyrsistent/spkg-configure.m4
+new file mode 100644
+index 00000000..f7ca75d
+--- /dev/null
++++ b/build/pkgs/pyrsistent/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pyrsistent], [SAGE_PYTHON_PACKAGE_CHECK([pyrsistent])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 68520decad6d6937918d7a6af65ca5bd476e5d02 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:45:45 -0400
+Subject: Trac #29665: add Gentoo package information for entrypoints.
+
+---
+ build/pkgs/entrypoints/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/entrypoints/distros/gentoo.txt
+
+diff --git a/build/pkgs/entrypoints/distros/gentoo.txt b/build/pkgs/entrypoints/distros/gentoo.txt
+new file mode 100644
+index 00000000..684ddd0
+--- /dev/null
++++ b/build/pkgs/entrypoints/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/entrypoints
+-- 
+cgit v1.0-1-gd88e
+
+
+From 34213eccb642a6bad64d89acaefa83ee702cb483 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:46:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for entrypoints.
+
+---
+ build/pkgs/entrypoints/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/entrypoints/spkg-configure.m4
+
+diff --git a/build/pkgs/entrypoints/spkg-configure.m4 b/build/pkgs/entrypoints/spkg-configure.m4
+new file mode 100644
+index 00000000..caed658
+--- /dev/null
++++ b/build/pkgs/entrypoints/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([entrypoints], [SAGE_PYTHON_PACKAGE_CHECK([entrypoints])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8e985614345da1a58fcdc127a9c0ddd790f9b5d2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:48:26 -0400
+Subject: Trac #29665: add Gentoo package information for markupsafe.
+
+---
+ build/pkgs/markupsafe/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/markupsafe/distros/gentoo.txt
+
+diff --git a/build/pkgs/markupsafe/distros/gentoo.txt b/build/pkgs/markupsafe/distros/gentoo.txt
+new file mode 100644
+index 00000000..9654e35
+--- /dev/null
++++ b/build/pkgs/markupsafe/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/markupsafe
+-- 
+cgit v1.0-1-gd88e
+
+
+From d370f229ae0988856f2e0d1f6ee2df2c47169106 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:48:55 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for markupsafe.
+
+---
+ build/pkgs/markupsafe/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/markupsafe/spkg-configure.m4
+
+diff --git a/build/pkgs/markupsafe/spkg-configure.m4 b/build/pkgs/markupsafe/spkg-configure.m4
+new file mode 100644
+index 00000000..79eb8db
+--- /dev/null
++++ b/build/pkgs/markupsafe/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([markupsafe], [SAGE_PYTHON_PACKAGE_CHECK([markupsafe])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c49b285ad9e25e6bc81a7e75d461d234fdd3ea68 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:30:49 -0400
+Subject: Trac #29665: add Gentoo package information for flit_core.
+
+---
+ build/pkgs/flit_core/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/flit_core/distros/gentoo.txt
+
+diff --git a/build/pkgs/flit_core/distros/gentoo.txt b/build/pkgs/flit_core/distros/gentoo.txt
+new file mode 100644
+index 00000000..fe6bea9
+--- /dev/null
++++ b/build/pkgs/flit_core/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/flit_core
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b0ce1c4f23cd9fc4316e1eb2b9b4bde394957f3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:32:11 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for flit_core.
+
+---
+ build/pkgs/flit_core/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/flit_core/spkg-configure.m4
+
+diff --git a/build/pkgs/flit_core/spkg-configure.m4 b/build/pkgs/flit_core/spkg-configure.m4
+new file mode 100644
+index 00000000..ee67557
+--- /dev/null
++++ b/build/pkgs/flit_core/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([flit_core], [SAGE_PYTHON_PACKAGE_CHECK([flit_core])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f006c231a81428b1e1e792f889bf974f90e3c831 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:34:06 -0400
+Subject: Trac #29665: add Gentoo package information for nest_asyncio.
+
+---
+ build/pkgs/nest_asyncio/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nest_asyncio/distros/gentoo.txt
+
+diff --git a/build/pkgs/nest_asyncio/distros/gentoo.txt b/build/pkgs/nest_asyncio/distros/gentoo.txt
+new file mode 100644
+index 00000000..ab742d2
+--- /dev/null
++++ b/build/pkgs/nest_asyncio/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nest_asyncio
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4a58d0a96a84475e765a01a64f5f44c48a317e0b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:34:43 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for nest_asyncio.
+
+---
+ build/pkgs/nest_asyncio/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nest_asyncio/spkg-configure.m4
+
+diff --git a/build/pkgs/nest_asyncio/spkg-configure.m4 b/build/pkgs/nest_asyncio/spkg-configure.m4
+new file mode 100644
+index 00000000..4d81527
+--- /dev/null
++++ b/build/pkgs/nest_asyncio/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nest_asyncio], [SAGE_PYTHON_PACKAGE_CHECK([nest_asyncio])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e50af937777ea778908bc09a7a79db3dd80fdf25 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:37:02 -0400
+Subject: Trac #29665: add Gentoo package information for ipython_genutils.
+
+---
+ build/pkgs/ipython_genutils/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython_genutils/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipython_genutils/distros/gentoo.txt b/build/pkgs/ipython_genutils/distros/gentoo.txt
+new file mode 100644
+index 00000000..01bc49d
+--- /dev/null
++++ b/build/pkgs/ipython_genutils/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipython_genutils
+-- 
+cgit v1.0-1-gd88e
+
+
+From ec3c0ce9db2ba13c1a49d1bcfb7a4b249cb7ae83 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:39:20 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipython_genutils.
+
+---
+ build/pkgs/ipython_genutils/spkg-configure.m4 | 4 ++++
+ 1 file changed, 4 insertions(+)
+ create mode 100644 build/pkgs/ipython_genutils/spkg-configure.m4
+
+diff --git a/build/pkgs/ipython_genutils/spkg-configure.m4 b/build/pkgs/ipython_genutils/spkg-configure.m4
+new file mode 100644
+index 00000000..b0ba86a
+--- /dev/null
++++ b/build/pkgs/ipython_genutils/spkg-configure.m4
+@@ -0,0 +1,4 @@
++SAGE_SPKG_CONFIGURE(
++  [ipython_genutils],
++  [SAGE_PYTHON_PACKAGE_CHECK([ipython_genutils])]
++)
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5c9e2e265115e5f10d4b459a475467e30b4bddde Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:40:03 -0400
+Subject: Trac #29665: add Gentoo package information for ipython.
+
+---
+ build/pkgs/ipython/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipython/distros/gentoo.txt b/build/pkgs/ipython/distros/gentoo.txt
+new file mode 100644
+index 00000000..8b76f18
+--- /dev/null
++++ b/build/pkgs/ipython/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipython
+-- 
+cgit v1.0-1-gd88e
+
+
+From 621e707ddd040a902d7dddf0bed1de2b54ab22f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 07:37:56 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipython.
+
+---
+ build/pkgs/ipython/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython/spkg-configure.m4
+
+diff --git a/build/pkgs/ipython/spkg-configure.m4 b/build/pkgs/ipython/spkg-configure.m4
+new file mode 100644
+index 00000000..02ab89f
+--- /dev/null
++++ b/build/pkgs/ipython/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipython], [SAGE_PYTHON_PACKAGE_CHECK([ipython])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20a0613f6d441da436f3e7b8047a72bf490882bd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 07:51:11 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipywidgets.
+
+---
+ build/pkgs/ipywidgets/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipywidgets/spkg-configure.m4
+
+diff --git a/build/pkgs/ipywidgets/spkg-configure.m4 b/build/pkgs/ipywidgets/spkg-configure.m4
+new file mode 100644
+index 00000000..51ca9be
+--- /dev/null
++++ b/build/pkgs/ipywidgets/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipywidgets], [SAGE_PYTHON_PACKAGE_CHECK([ipywidgets])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 76bcd386633acc02a1a3026339d0cbd258ada04e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 10:05:16 -0400
+Subject: Trac #29665: add Gentoo package information for wheel.
+
+---
+ build/pkgs/wheel/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wheel/distros/gentoo.txt
+
+diff --git a/build/pkgs/wheel/distros/gentoo.txt b/build/pkgs/wheel/distros/gentoo.txt
+new file mode 100644
+index 00000000..ec571d5
+--- /dev/null
++++ b/build/pkgs/wheel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 96c2dd2ca7812f5333bb9d45eadb7ac408e364ce Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:51:44 -0500
+Subject: Trac #29665: add Gentoo package information for terminado.
+
+---
+ build/pkgs/terminado/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/terminado/distros/gentoo.txt
+
+diff --git a/build/pkgs/terminado/distros/gentoo.txt b/build/pkgs/terminado/distros/gentoo.txt
+new file mode 100644
+index 00000000..1df16f1
+--- /dev/null
++++ b/build/pkgs/terminado/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/terminado
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0de0f5f3d235a4339b21e37ea13c9f5e59a82e59 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:52:35 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for terminado.
+
+---
+ build/pkgs/terminado/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/terminado/spkg-configure.m4
+
+diff --git a/build/pkgs/terminado/spkg-configure.m4 b/build/pkgs/terminado/spkg-configure.m4
+new file mode 100644
+index 00000000..5defc2f
+--- /dev/null
++++ b/build/pkgs/terminado/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([terminado], [SAGE_PYTHON_PACKAGE_CHECK([terminado])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d14a745c770b02822557e7cee0a98de1cb2f3a12 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:56:15 -0500
+Subject: Trac #29665: add Gentoo package information for cffi.
+
+---
+ build/pkgs/cffi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cffi/distros/gentoo.txt
+
+diff --git a/build/pkgs/cffi/distros/gentoo.txt b/build/pkgs/cffi/distros/gentoo.txt
+new file mode 100644
+index 00000000..81eeb81
+--- /dev/null
++++ b/build/pkgs/cffi/distros/gentoo.txt
+@@ -0,0 +1 @@
++virtual/python-cffi
+-- 
+cgit v1.0-1-gd88e
+
+
+From ce393c04afc69fe050e38f780d4e117164687d80 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:57:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for cffi.
+
+---
+ build/pkgs/cffi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cffi/spkg-configure.m4
+
+diff --git a/build/pkgs/cffi/spkg-configure.m4 b/build/pkgs/cffi/spkg-configure.m4
+new file mode 100644
+index 00000000..dc81875
+--- /dev/null
++++ b/build/pkgs/cffi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([cffi], [SAGE_PYTHON_PACKAGE_CHECK([cffi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 467093315b3fdd57c8caa2f95cf99ad52b0b84fb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:57:57 -0500
+Subject: Trac #29665: add Gentoo package information for pip.
+
+---
+ build/pkgs/pip/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pip/distros/gentoo.txt
+
+diff --git a/build/pkgs/pip/distros/gentoo.txt b/build/pkgs/pip/distros/gentoo.txt
+new file mode 100644
+index 00000000..1845454
+--- /dev/null
++++ b/build/pkgs/pip/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pip[vanilla]
+-- 
+cgit v1.0-1-gd88e
+
+
+From c597fd23f9f68dabbcb7e698d0569c3e6458f6d1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 09:07:26 -0500
+Subject: Trac #29665: new spkg-configure.m4 for pip.
+
+---
+ build/pkgs/pip/spkg-configure.m4 | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+ create mode 100644 build/pkgs/pip/spkg-configure.m4
+
+diff --git a/build/pkgs/pip/spkg-configure.m4 b/build/pkgs/pip/spkg-configure.m4
+new file mode 100644
+index 00000000..c7a5562
+--- /dev/null
++++ b/build/pkgs/pip/spkg-configure.m4
+@@ -0,0 +1,12 @@
++SAGE_SPKG_CONFIGURE([pip], [
++  dnl always run this macro because it changes the default value of
++  dnl the --with-system-<package> option.
++  SAGE_PYTHON_PACKAGE_CHECK([pip])
++
++  dnl if we might not install the spkg, make sure that "pip" is in
++  dnl the user's PATH, too.
++  AS_IF([test "x$sage_spkg_install_pip" != "xyes"], [
++    AC_CHECK_PROG(HAVE_PIP, pip, yes, no)
++    AS_IF([test "x$HAVE_PIP" = "xno"], [sage_spkg_install_pip=yes])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ef8f1e807bc55d7b8321777486fa867a7c135419 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 9 Nov 2021 09:09:04 -0500
+Subject: Trac #29665: set $SAGE_PIP_INSTALL_FLAGS for
+ --enable-system-site-packages.
+
+We need to pass some special flags to "pip install" to make it do the
+right thing in the precence of system-site packages. Here we introduce
+a new autoconf variable, SAGE_PIP_INSTALL_FLAGS, that will be used
+to pass those flags to the build system.
+
+With autoconf aware of the variable, we substitute its value into the
+sage-build-env-config script for use in spkg-install.in.
+---
+ build/bin/sage-build-env-config.in | 1 +
+ configure.ac                       | 9 +++++++++
+ 2 files changed, 10 insertions(+)
+
+diff --git a/build/bin/sage-build-env-config.in b/build/bin/sage-build-env-config.in
+index 92e7dad..ad62e5f 100644
+--- a/build/bin/sage-build-env-config.in
++++ b/build/bin/sage-build-env-config.in
+@@ -53,6 +53,7 @@ export SAGE_PARI_CFG="@SAGE_PARI_CFG@"
+ 
+ export SAGE_GLPK_PREFIX="@SAGE_GLPK_PREFIX@"
+ export SAGE_FREETYPE_PREFIX="@SAGE_FREETYPE_PREFIX@"
++export SAGE_PIP_INSTALL_FLAGS="@SAGE_PIP_INSTALL_FLAGS@"
+ export SAGE_SUITESPARSE_PREFIX="@SAGE_SUITESPARSE_PREFIX@"
+ 
+ export SAGE_CONFIGURE_FFLAS_FFPACK="@SAGE_CONFIGURE_FFLAS_FFPACK@"
+diff --git a/configure.ac b/configure.ac
+index 6fafb83..6ed07ac 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -441,6 +441,14 @@ AC_ARG_ENABLE(
+     [allow the use of python packages from the system (experimental; default: no)]
+   )], [
+   AS_IF([test "x$enable_system_site_packages" = "xyes"], [
++    dnl When installing python SPKGs in the presence of system-site
++    dnl packages, we need to --ignore-installed so that a patched SPKG
++    dnl can be installed in the presence of an unpatched system package
++    dnl that appears (to pip) to be identical. The --no-deps flag is
++    dnl then needed because --ignore-installed will make any installed
++    dnl dependencies invisible to pip, who does not appreciate that.
++    SAGE_PIP_INSTALL_FLAGS="${SAGE_PIP_INSTALL_FLAGS} --no-deps --ignore-installed"
++
+     SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
+ 
+     dnl We want to raise an error if the user asked for "system site
+@@ -453,6 +461,7 @@ AC_ARG_ENABLE(
+     with_system_python3="force"
+   ])
+ ])
++AC_SUBST([SAGE_PIP_INSTALL_FLAGS])
+ AC_SUBST([SAGE_VENV_FLAGS])
+ 
+ SAGE_SPKG_OPTIONS=""
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3cf365fef84e809e74abd2eb388e7a8e9af9d739 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 9 Nov 2021 21:01:58 -0500
+Subject: Trac #29665: pass $SAGE_PIP_INSTALL_FLAGS to sdh_pip_install.
+
+Since sdh_pip_install is usually called from spkg-install.in, the
+variables from sage-build-env-config will be available. Here we pass
+the contents of $SAGE_PIP_INSTALL_FLAGS to sage-pip-install
+unconditionally, and hope that the user ignores this variable unless
+he truly knows what he is doing.
+---
+ build/bin/sage-dist-helpers | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/build/bin/sage-dist-helpers b/build/bin/sage-dist-helpers
+index fe364e5..1032ac3 100644
+--- a/build/bin/sage-dist-helpers
++++ b/build/bin/sage-dist-helpers
+@@ -303,7 +303,11 @@ sdh_store_wheel() {
+ }
+ 
+ sdh_store_and_pip_install_wheel() {
+-    local pip_options=""
++    # The $SAGE_PIP_INSTALL_FLAGS variable is set by sage-build-env-config.
++    # We skip sanity checking its contents since you should either let sage
++    # decide what it contains, or really know what you are doing.
++    local pip_options="${SAGE_PIP_INSTALL_FLAGS}"
++
+     while [ $# -gt 0 ]; do
+         case $1 in
+             -*) pip_options="$pip_options $1"
+-- 
+cgit v1.0-1-gd88e
+
+
+From 50f0438ee857b8f0b7d7ad924e6bba9c5e1bc033 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:10:46 -0500
+Subject: Trac #29665: add Gentoo package information for pexpect.
+
+---
+ build/pkgs/pexpect/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pexpect/distros/gentoo.txt
+
+diff --git a/build/pkgs/pexpect/distros/gentoo.txt b/build/pkgs/pexpect/distros/gentoo.txt
+new file mode 100644
+index 00000000..30c4b60
+--- /dev/null
++++ b/build/pkgs/pexpect/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pexpect
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4d784688d997290b462646fa7f36114a41f3f453 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:11:25 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pexpect.
+
+---
+ build/pkgs/pexpect/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pexpect/spkg-configure.m4
+
+diff --git a/build/pkgs/pexpect/spkg-configure.m4 b/build/pkgs/pexpect/spkg-configure.m4
+new file mode 100644
+index 00000000..6520856
+--- /dev/null
++++ b/build/pkgs/pexpect/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pexpect], [SAGE_PYTHON_PACKAGE_CHECK([pexpect])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6447122dc76a3b7a58340dbed942db66530b5b07 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:12:05 -0500
+Subject: Trac #29665: add Gentoo package information for docutils.
+
+---
+ build/pkgs/docutils/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/docutils/distros/gentoo.txt
+
+diff --git a/build/pkgs/docutils/distros/gentoo.txt b/build/pkgs/docutils/distros/gentoo.txt
+new file mode 100644
+index 00000000..fe4a452
+--- /dev/null
++++ b/build/pkgs/docutils/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/docutils
+-- 
+cgit v1.0-1-gd88e
+
+
+From 709041480a5fc729b0ee7f1a8a3b16d4d65321b5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:12:38 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for docutils.
+
+---
+ build/pkgs/docutils/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/docutils/spkg-configure.m4
+
+diff --git a/build/pkgs/docutils/spkg-configure.m4 b/build/pkgs/docutils/spkg-configure.m4
+new file mode 100644
+index 00000000..3584e45
+--- /dev/null
++++ b/build/pkgs/docutils/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([docutils], [SAGE_PYTHON_PACKAGE_CHECK([docutils])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 782d38b48ab87afccc43fbc071e7b7ed48fb0a20 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:14:37 -0500
+Subject: Trac #29665: add Gentoo package information for nbclient.
+
+---
+ build/pkgs/nbclient/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbclient/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbclient/distros/gentoo.txt b/build/pkgs/nbclient/distros/gentoo.txt
+new file mode 100644
+index 00000000..06ff18d
+--- /dev/null
++++ b/build/pkgs/nbclient/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbclient
+-- 
+cgit v1.0-1-gd88e
+
+
+From 19ce09336532336f69db74381932d51a429dfaca Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:15:11 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for nbclient.
+
+---
+ build/pkgs/nbclient/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbclient/spkg-configure.m4
+
+diff --git a/build/pkgs/nbclient/spkg-configure.m4 b/build/pkgs/nbclient/spkg-configure.m4
+new file mode 100644
+index 00000000..14178b7
+--- /dev/null
++++ b/build/pkgs/nbclient/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbclient], [SAGE_PYTHON_PACKAGE_CHECK([nbclient])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c063b9de42c1780368000a563d0dbe80b6fff169 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:17:36 -0500
+Subject: Trac #29665: add Gentoo package information for argon2_cffi.
+
+---
+ build/pkgs/argon2_cffi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argon2_cffi/distros/gentoo.txt
+
+diff --git a/build/pkgs/argon2_cffi/distros/gentoo.txt b/build/pkgs/argon2_cffi/distros/gentoo.txt
+new file mode 100644
+index 00000000..2f12ca8
+--- /dev/null
++++ b/build/pkgs/argon2_cffi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/argon2-cffi
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0b4d5699dd51ea52550fba7db9e1cbb8bbac1892 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:18:35 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for argon2_cffi.
+
+---
+ build/pkgs/argon2_cffi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argon2_cffi/spkg-configure.m4
+
+diff --git a/build/pkgs/argon2_cffi/spkg-configure.m4 b/build/pkgs/argon2_cffi/spkg-configure.m4
+new file mode 100644
+index 00000000..03ebc63
+--- /dev/null
++++ b/build/pkgs/argon2_cffi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([argon2_cffi], [SAGE_PYTHON_PACKAGE_CHECK([argon2_cffi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2b4119558a6e0b1aa512848539a237676b035c83 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:30:48 -0500
+Subject: Trac #29665: fix package name in dateutil's install-requires.txt.
+
+---
+ build/pkgs/dateutil/install-requires.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/build/pkgs/dateutil/install-requires.txt b/build/pkgs/dateutil/install-requires.txt
+index 0ae93da..face537 100644
+--- a/build/pkgs/dateutil/install-requires.txt
++++ b/build/pkgs/dateutil/install-requires.txt
+@@ -1 +1 @@
+-dateutil >=2.8.1
++python-dateutil >=2.8.1
+-- 
+cgit v1.0-1-gd88e
+
+
+From df371b7c4d20a3353d43940306ad22e11aba29da Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:31:41 -0500
+Subject: Trac #29665: add Gentoo package information for dateutil.
+
+---
+ build/pkgs/dateutil/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/dateutil/distros/gentoo.txt
+
+diff --git a/build/pkgs/dateutil/distros/gentoo.txt b/build/pkgs/dateutil/distros/gentoo.txt
+new file mode 100644
+index 00000000..e129df7
+--- /dev/null
++++ b/build/pkgs/dateutil/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/python-dateutil
+-- 
+cgit v1.0-1-gd88e
+
+
+From 577695dfdf661ee26c0ffd767bdbf479d95f7fb4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:32:21 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for dateutil.
+
+---
+ build/pkgs/dateutil/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/dateutil/spkg-configure.m4
+
+diff --git a/build/pkgs/dateutil/spkg-configure.m4 b/build/pkgs/dateutil/spkg-configure.m4
+new file mode 100644
+index 00000000..fdcd127
+--- /dev/null
++++ b/build/pkgs/dateutil/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([dateutil], [SAGE_PYTHON_PACKAGE_CHECK([dateutil])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1984651caac624ec4bb58814ca1d57fe66f9881a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:33:51 -0500
+Subject: Trac #29665: add Gentoo package information for setuptools_scm.
+
+---
+ build/pkgs/setuptools_scm/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/setuptools_scm/distros/gentoo.txt
+
+diff --git a/build/pkgs/setuptools_scm/distros/gentoo.txt b/build/pkgs/setuptools_scm/distros/gentoo.txt
+new file mode 100644
+index 00000000..8989597
+--- /dev/null
++++ b/build/pkgs/setuptools_scm/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/setuptools_scm
+-- 
+cgit v1.0-1-gd88e
+
+
+From ebf7c854ed966e7353759be485c4f5a57b9a10fa Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:34:49 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for setuptools_scm.
+
+---
+ build/pkgs/setuptools_scm/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/setuptools_scm/spkg-configure.m4
+
+diff --git a/build/pkgs/setuptools_scm/spkg-configure.m4 b/build/pkgs/setuptools_scm/spkg-configure.m4
+new file mode 100644
+index 00000000..437148c
+--- /dev/null
++++ b/build/pkgs/setuptools_scm/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([setuptools_scm], [
++  SAGE_PYTHON_PACKAGE_CHECK([setuptools_scm])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0dee0d0c28f31b1f619e44c710a3c9e22d2b2544 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:36:33 -0500
+Subject: Trac #29665: add Gentoo package information for nbconvert.
+
+---
+ build/pkgs/nbconvert/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbconvert/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbconvert/distros/gentoo.txt b/build/pkgs/nbconvert/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c45a10
+--- /dev/null
++++ b/build/pkgs/nbconvert/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbconvert
+-- 
+cgit v1.0-1-gd88e
+
+
+From 473789eb11b1838bc32dc8a63509ee199afc8912 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:37:37 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for nbconvert.
+
+---
+ build/pkgs/nbconvert/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbconvert/spkg-configure.m4
+
+diff --git a/build/pkgs/nbconvert/spkg-configure.m4 b/build/pkgs/nbconvert/spkg-configure.m4
+new file mode 100644
+index 00000000..9b5dee3
+--- /dev/null
++++ b/build/pkgs/nbconvert/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbconvert], [SAGE_PYTHON_PACKAGE_CHECK([nbconvert])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f0703b594e57c980d605aa9bc8316c45a7858b3b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:41:51 -0500
+Subject: Trac #29665: add Gentoo package information for jupyter_core.
+
+---
+ build/pkgs/jupyter_core/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyter_core/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyter_core/distros/gentoo.txt b/build/pkgs/jupyter_core/distros/gentoo.txt
+new file mode 100644
+index 00000000..f168c5a
+--- /dev/null
++++ b/build/pkgs/jupyter_core/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyter_core
+-- 
+cgit v1.0-1-gd88e
+
+
+From 061a307cc4a6680d8500fde834975064e59540d5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:42:48 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jupyter_core.
+
+---
+ build/pkgs/jupyter_core/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyter_core/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyter_core/spkg-configure.m4 b/build/pkgs/jupyter_core/spkg-configure.m4
+new file mode 100644
+index 00000000..67df9c3
+--- /dev/null
++++ b/build/pkgs/jupyter_core/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyter_core], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyter_core])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b85abe964ce0b98b5842efe9cbad9bdb1c89202f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:47:08 -0500
+Subject: Trac #29665: add Gentoo package information for jupyter_client.
+
+---
+ build/pkgs/jupyter_client/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyter_client/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyter_client/distros/gentoo.txt b/build/pkgs/jupyter_client/distros/gentoo.txt
+new file mode 100644
+index 00000000..4f1de88
+--- /dev/null
++++ b/build/pkgs/jupyter_client/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyter_client
+-- 
+cgit v1.0-1-gd88e
+
+
+From 86323ff1e0b2507933df6bc2a96c9175957640c5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:48:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jupyter_client.
+
+---
+ build/pkgs/jupyter_client/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyter_client/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyter_client/spkg-configure.m4 b/build/pkgs/jupyter_client/spkg-configure.m4
+new file mode 100644
+index 00000000..fbd3498
+--- /dev/null
++++ b/build/pkgs/jupyter_client/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyter_client], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyter_client])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a8475e27dd30d752d05ab6fea6579e8623501d82 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:48:58 -0500
+Subject: Trac #29665: add Gentoo package information for snowballstemmer.
+
+---
+ build/pkgs/snowballstemmer/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/snowballstemmer/distros/gentoo.txt
+
+diff --git a/build/pkgs/snowballstemmer/distros/gentoo.txt b/build/pkgs/snowballstemmer/distros/gentoo.txt
+new file mode 100644
+index 00000000..63fd851
+--- /dev/null
++++ b/build/pkgs/snowballstemmer/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/snowballstemmer
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0833c9b781062b4ed86d619e050a6f5d60e36080 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:49:38 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for snowballstemmer.
+
+---
+ build/pkgs/snowballstemmer/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/snowballstemmer/spkg-configure.m4
+
+diff --git a/build/pkgs/snowballstemmer/spkg-configure.m4 b/build/pkgs/snowballstemmer/spkg-configure.m4
+new file mode 100644
+index 00000000..6aa0882
+--- /dev/null
++++ b/build/pkgs/snowballstemmer/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([snowballstemmer], [
++  SAGE_PYTHON_PACKAGE_CHECK([snowballstemmer])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 50a1cf2a2bcd7eeec64cbc3f70e3e9fbe5d850fe Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:50:47 -0500
+Subject: Trac #29665: add Gentoo package information for tornado.
+
+---
+ build/pkgs/tornado/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tornado/distros/gentoo.txt
+
+diff --git a/build/pkgs/tornado/distros/gentoo.txt b/build/pkgs/tornado/distros/gentoo.txt
+new file mode 100644
+index 00000000..6ae4b9f
+--- /dev/null
++++ b/build/pkgs/tornado/distros/gentoo.txt
+@@ -0,0 +1 @@
++www-servers/tornado
+-- 
+cgit v1.0-1-gd88e
+
+
+From 118f4da6e03476c726363e8e22ecda32f13bfc33 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:51:26 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for tornado.
+
+---
+ build/pkgs/tornado/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tornado/spkg-configure.m4
+
+diff --git a/build/pkgs/tornado/spkg-configure.m4 b/build/pkgs/tornado/spkg-configure.m4
+new file mode 100644
+index 00000000..1ee5bc9
+--- /dev/null
++++ b/build/pkgs/tornado/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tornado], [SAGE_PYTHON_PACKAGE_CHECK([tornado])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3850701747a6c8ef60840bdfdb589b28d4cd2b9a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:52:21 -0500
+Subject: Trac #29665: add Gentoo package information for jsonschema.
+
+---
+ build/pkgs/jsonschema/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jsonschema/distros/gentoo.txt
+
+diff --git a/build/pkgs/jsonschema/distros/gentoo.txt b/build/pkgs/jsonschema/distros/gentoo.txt
+new file mode 100644
+index 00000000..d708e4c
+--- /dev/null
++++ b/build/pkgs/jsonschema/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jsonschema
+-- 
+cgit v1.0-1-gd88e
+
+
+From 76e3917c8af781af00f642cfada7a79594429e30 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:54:03 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jsonschema.
+
+---
+ build/pkgs/jsonschema/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jsonschema/spkg-configure.m4
+
+diff --git a/build/pkgs/jsonschema/spkg-configure.m4 b/build/pkgs/jsonschema/spkg-configure.m4
+new file mode 100644
+index 00000000..b9e5e21
+--- /dev/null
++++ b/build/pkgs/jsonschema/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jsonschema], [SAGE_PYTHON_PACKAGE_CHECK([jsonschema])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From fd4a16c11669b6dd73ac6325bca820e76db00402 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:55:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ widgetsnbextension.
+
+---
+ build/pkgs/widgetsnbextension/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/widgetsnbextension/spkg-configure.m4
+
+diff --git a/build/pkgs/widgetsnbextension/spkg-configure.m4 b/build/pkgs/widgetsnbextension/spkg-configure.m4
+new file mode 100644
+index 00000000..bf82daf
+--- /dev/null
++++ b/build/pkgs/widgetsnbextension/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([widgetsnbextension], [
++  SAGE_PYTHON_PACKAGE_CHECK([widgetsnbextension])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8079a9f384e3c8480e157dd98c3db2f43c987f4e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:57:20 -0500
+Subject: Trac #29665: add Gentoo package information for importlib_resources.
+
+---
+ build/pkgs/importlib_resources/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/importlib_resources/distros/gentoo.txt
+
+diff --git a/build/pkgs/importlib_resources/distros/gentoo.txt b/build/pkgs/importlib_resources/distros/gentoo.txt
+new file mode 100644
+index 00000000..d5e1f2c
+--- /dev/null
++++ b/build/pkgs/importlib_resources/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/importlib_resources
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2c430d7c52f02779a6c41b98ac2f4edd8b6759c3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:58:00 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ importlib_resources.
+
+---
+ build/pkgs/importlib_resources/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/importlib_resources/spkg-configure.m4
+
+diff --git a/build/pkgs/importlib_resources/spkg-configure.m4 b/build/pkgs/importlib_resources/spkg-configure.m4
+new file mode 100644
+index 00000000..50df55b
+--- /dev/null
++++ b/build/pkgs/importlib_resources/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([importlib_resources], [
++  SAGE_PYTHON_PACKAGE_CHECK([importlib_resources])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 00d13d7bf2e50aae2ccef3b2b30293c70a922af2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:58:38 -0500
+Subject: Trac #29665: add Gentoo package information for kiwisolver.
+
+---
+ build/pkgs/kiwisolver/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/kiwisolver/distros/gentoo.txt
+
+diff --git a/build/pkgs/kiwisolver/distros/gentoo.txt b/build/pkgs/kiwisolver/distros/gentoo.txt
+new file mode 100644
+index 00000000..7b30c95
+--- /dev/null
++++ b/build/pkgs/kiwisolver/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/kiwisolver
+-- 
+cgit v1.0-1-gd88e
+
+
+From 72b7907ef7ea9fa4ff6948ea34cfe2f693ee6c31 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:59:09 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for kiwisolver.
+
+---
+ build/pkgs/kiwisolver/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/kiwisolver/spkg-configure.m4
+
+diff --git a/build/pkgs/kiwisolver/spkg-configure.m4 b/build/pkgs/kiwisolver/spkg-configure.m4
+new file mode 100644
+index 00000000..4e7ac97
+--- /dev/null
++++ b/build/pkgs/kiwisolver/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([kiwisolver], [SAGE_PYTHON_PACKAGE_CHECK([kiwisolver])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 479351279e4e0ea7e2d146434f0daba038765cfd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:00:04 -0500
+Subject: Trac #29665: add Gentoo package information for notebook.
+
+---
+ build/pkgs/notebook/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/notebook/distros/gentoo.txt
+
+diff --git a/build/pkgs/notebook/distros/gentoo.txt b/build/pkgs/notebook/distros/gentoo.txt
+new file mode 100644
+index 00000000..6475d72
+--- /dev/null
++++ b/build/pkgs/notebook/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/notebook
+-- 
+cgit v1.0-1-gd88e
+
+
+From f4d9242ea654977f8ad7865c82eec593e11a36bc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:01:42 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for notebook.
+
+---
+ build/pkgs/notebook/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/notebook/spkg-configure.m4
+
+diff --git a/build/pkgs/notebook/spkg-configure.m4 b/build/pkgs/notebook/spkg-configure.m4
+new file mode 100644
+index 00000000..a17ba95
+--- /dev/null
++++ b/build/pkgs/notebook/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([notebook], [SAGE_PYTHON_PACKAGE_CHECK([notebook])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9837070c7f8e9a71283b84d49d4fd2c94b78a464 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:02:38 -0500
+Subject: Trac #29665: add Gentoo package information for matplotlib_inline.
+
+---
+ build/pkgs/matplotlib_inline/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/matplotlib_inline/distros/gentoo.txt
+
+diff --git a/build/pkgs/matplotlib_inline/distros/gentoo.txt b/build/pkgs/matplotlib_inline/distros/gentoo.txt
+new file mode 100644
+index 00000000..6a5859c
+--- /dev/null
++++ b/build/pkgs/matplotlib_inline/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/matplotlib-inline
+-- 
+cgit v1.0-1-gd88e
+
+
+From 750be73b25b92b4875e47d044360ac0e1116ec3e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:03:28 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for matplotlib_inline.
+
+---
+ build/pkgs/matplotlib_inline/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/matplotlib_inline/spkg-configure.m4
+
+diff --git a/build/pkgs/matplotlib_inline/spkg-configure.m4 b/build/pkgs/matplotlib_inline/spkg-configure.m4
+new file mode 100644
+index 00000000..e59658f
+--- /dev/null
++++ b/build/pkgs/matplotlib_inline/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([matplotlib_inline], [
++  SAGE_PYTHON_PACKAGE_CHECK([matplotlib_inline])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 273505f49698dcd2ab30c2756b07113c9b7e7791 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:04:10 -0500
+Subject: Trac #29665: add Gentoo package information for ipykernel.
+
+---
+ build/pkgs/ipykernel/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipykernel/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipykernel/distros/gentoo.txt b/build/pkgs/ipykernel/distros/gentoo.txt
+new file mode 100644
+index 00000000..88aab61
+--- /dev/null
++++ b/build/pkgs/ipykernel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipykernel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 629ad36c9e4ae0cdff4a013289b4f2911442445e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:04:46 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for ipykernel.
+
+---
+ build/pkgs/ipykernel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipykernel/spkg-configure.m4
+
+diff --git a/build/pkgs/ipykernel/spkg-configure.m4 b/build/pkgs/ipykernel/spkg-configure.m4
+new file mode 100644
+index 00000000..94ecc2d
+--- /dev/null
++++ b/build/pkgs/ipykernel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipykernel], [SAGE_PYTHON_PACKAGE_CHECK([ipykernel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b8d709edb6a24fd5868ee2818b56e78257b2eafa Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:05:26 -0500
+Subject: Trac #29665: add Gentoo package information for prompt_toolkit.
+
+---
+ build/pkgs/prompt_toolkit/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/prompt_toolkit/distros/gentoo.txt
+
+diff --git a/build/pkgs/prompt_toolkit/distros/gentoo.txt b/build/pkgs/prompt_toolkit/distros/gentoo.txt
+new file mode 100644
+index 00000000..6902484
+--- /dev/null
++++ b/build/pkgs/prompt_toolkit/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/prompt_toolkit
+-- 
+cgit v1.0-1-gd88e
+
+
+From 16c0b5e767ae4dac4440510b7253e5c8642b7d2c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:10:39 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for prompt_toolkit.
+
+---
+ build/pkgs/prompt_toolkit/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/prompt_toolkit/spkg-configure.m4
+
+diff --git a/build/pkgs/prompt_toolkit/spkg-configure.m4 b/build/pkgs/prompt_toolkit/spkg-configure.m4
+new file mode 100644
+index 00000000..fd8c1a6
+--- /dev/null
++++ b/build/pkgs/prompt_toolkit/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([prompt_toolkit], [
++  SAGE_PYTHON_PACKAGE_CHECK([prompt_toolkit])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0cd9283e8bb6c8ae413fc8f715c021f7ec3ca2c8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:12:10 -0500
+Subject: Trac #29665: add Gentoo package information for charset_normalizer.
+
+---
+ build/pkgs/charset_normalizer/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/charset_normalizer/distros/gentoo.txt
+
+diff --git a/build/pkgs/charset_normalizer/distros/gentoo.txt b/build/pkgs/charset_normalizer/distros/gentoo.txt
+new file mode 100644
+index 00000000..eefeb89
+--- /dev/null
++++ b/build/pkgs/charset_normalizer/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/charset_normalizer
+-- 
+cgit v1.0-1-gd88e
+
+
+From a04b01a9ab59097d189edcc5ddcb461faede83b2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:12:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ charset_normalizer.
+
+---
+ build/pkgs/charset_normalizer/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/charset_normalizer/spkg-configure.m4
+
+diff --git a/build/pkgs/charset_normalizer/spkg-configure.m4 b/build/pkgs/charset_normalizer/spkg-configure.m4
+new file mode 100644
+index 00000000..18b18cf
+--- /dev/null
++++ b/build/pkgs/charset_normalizer/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([charset_normalizer], [
++  SAGE_PYTHON_PACKAGE_CHECK([charset_normalizer])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d2ea08138711c53046f977b586f33b09b176b2e3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:13:37 -0500
+Subject: Trac #29665: add Gentoo package information for prometheus_client.
+
+---
+ build/pkgs/prometheus_client/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/prometheus_client/distros/gentoo.txt
+
+diff --git a/build/pkgs/prometheus_client/distros/gentoo.txt b/build/pkgs/prometheus_client/distros/gentoo.txt
+new file mode 100644
+index 00000000..aa2889c
+--- /dev/null
++++ b/build/pkgs/prometheus_client/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/prometheus_client
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b0393200e9edd3e26b8a55ba67e5710e7403fcb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:15:09 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for prometheus_client.
+
+---
+ build/pkgs/prometheus_client/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/prometheus_client/spkg-configure.m4
+
+diff --git a/build/pkgs/prometheus_client/spkg-configure.m4 b/build/pkgs/prometheus_client/spkg-configure.m4
+new file mode 100644
+index 00000000..b494588
+--- /dev/null
++++ b/build/pkgs/prometheus_client/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([prometheus_client], [
++  SAGE_PYTHON_PACKAGE_CHECK([prometheus_client])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From cdcd85284f43ca4ad18353ec3527b2901e57b788 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:17:23 -0500
+Subject: Trac #29665: add Gentoo package information for pybind11.
+
+---
+ build/pkgs/pybind11/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pybind11/distros/gentoo.txt
+
+diff --git a/build/pkgs/pybind11/distros/gentoo.txt b/build/pkgs/pybind11/distros/gentoo.txt
+new file mode 100644
+index 00000000..0c500b3
+--- /dev/null
++++ b/build/pkgs/pybind11/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pybind11
+-- 
+cgit v1.0-1-gd88e
+
+
+From efdd1eb64c4799fe3cdf2221824182941b3fda2d Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:17:51 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pybind11.
+
+---
+ build/pkgs/pybind11/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pybind11/spkg-configure.m4
+
+diff --git a/build/pkgs/pybind11/spkg-configure.m4 b/build/pkgs/pybind11/spkg-configure.m4
+new file mode 100644
+index 00000000..cce1cf5
+--- /dev/null
++++ b/build/pkgs/pybind11/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pybind11], [SAGE_PYTHON_PACKAGE_CHECK([pybind11])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b2128f33b68ea33927284116ea598dd186902400 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:19:23 -0500
+Subject: Trac #29665: add Gentoo package information for pkgconfig.
+
+---
+ build/pkgs/pkgconfig/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pkgconfig/distros/gentoo.txt
+
+diff --git a/build/pkgs/pkgconfig/distros/gentoo.txt b/build/pkgs/pkgconfig/distros/gentoo.txt
+new file mode 100644
+index 00000000..32e8618
+--- /dev/null
++++ b/build/pkgs/pkgconfig/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pkgconfig
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b373b49e06aadeb36dc57e500da9a322460e658 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:19:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pkgconfig.
+
+---
+ build/pkgs/pkgconfig/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pkgconfig/spkg-configure.m4
+
+diff --git a/build/pkgs/pkgconfig/spkg-configure.m4 b/build/pkgs/pkgconfig/spkg-configure.m4
+new file mode 100644
+index 00000000..6708293
+--- /dev/null
++++ b/build/pkgs/pkgconfig/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pkgconfig], [SAGE_PYTHON_PACKAGE_CHECK([pkgconfig])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ce578729eb0d14baab365351ba9a9ffffb7b79f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:21:10 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_serializinghtml.
+
+---
+ build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt b/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+new file mode 100644
+index 00000000..38bca8f
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-serializinghtml
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb0f42c32bbce0e4488678312f5e2d88c6f42c9b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:21:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_serializinghtml.
+
+---
+ build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4 b/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+new file mode 100644
+index 00000000..be8e625
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_serializinghtml], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_serializinghtml])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e47dcf985e40475de85c9436a85537751318bc3d Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:22:54 -0500
+Subject: Trac #29665: add Gentoo package information for sphinxcontrib_jsmath.
+
+---
+ build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt b/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+new file mode 100644
+index 00000000..041a471
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-jsmath
+-- 
+cgit v1.0-1-gd88e
+
+
+From 72cff6fd35f93de4fa855bc870569dd733ff5c24 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:23:49 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_jsmath.
+
+---
+ build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4 b/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+new file mode 100644
+index 00000000..e46bde2
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_jsmath], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_jsmath])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a36395d70f759449cd63c1b0990fbdcb4cb25ca0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:24:26 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_devhelp.
+
+---
+ build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..9b5c899
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-devhelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9953a5dd1646ed0ad51d2e3935cf609bc9e7fd1c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:25:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_devhelp.
+
+---
+ build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+new file mode 100644
+index 00000000..8728136
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_devhelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_devhelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b199d5363aad93f3cb23f7904c9553a28b06348f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:25:53 -0500
+Subject: Trac #29665: add Gentoo package information for sphinxcontrib_qthelp.
+
+---
+ build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..7210099
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-qthelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 94ac8806739f3938e73f5857328e91e0d42e98d2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:26:28 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_qthelp.
+
+---
+ build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+new file mode 100644
+index 00000000..81ea5e1
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_qthelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_qthelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From beedc154aa405e8a58aee8889f510db07adc89a7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:26:54 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_applehelp.
+
+---
+ build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..66ac8da
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-applehelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 07d47c3673d6b35423b71f621cb400989c0101c2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:27:19 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_applehelp.
+
+---
+ build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+new file mode 100644
+index 00000000..e834aed
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_applehelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_applehelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 333a66546c5d421735c49dbafd7370a827f22781 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:27:46 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_htmlhelp.
+
+---
+ build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..e080bac
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-htmlhelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From bfaeb3962254439b63f1f2e0e883de462c7831be Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:29:18 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_htmlhelp.
+
+---
+ build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+new file mode 100644
+index 00000000..c77b003
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_htmlhelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_htmlhelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 782cde13da06e8b85806cb7cbc8aceee0364e639 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:30:23 -0500
+Subject: Trac #29665: add Gentoo package information for jupyterlab_pygments.
+
+---
+ build/pkgs/jupyterlab_pygments/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyterlab_pygments/distros/gentoo.txt b/build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+new file mode 100644
+index 00000000..c57b4f1
+--- /dev/null
++++ b/build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyterlab_pygments
+-- 
+cgit v1.0-1-gd88e
+
+
+From 39f974cfa4a8c6e5dd897f152f83ec82f40ee9f7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:31:13 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ jupyterlab_pygments.
+
+---
+ build/pkgs/jupyterlab_pygments/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyterlab_pygments/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyterlab_pygments/spkg-configure.m4 b/build/pkgs/jupyterlab_pygments/spkg-configure.m4
+new file mode 100644
+index 00000000..e46e21f
+--- /dev/null
++++ b/build/pkgs/jupyterlab_pygments/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyterlab_pygments], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyterlab_pygments])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From db704620700fd36cec3bf6125938f3ee00a9eb5e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:29:15 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for ply.
+
+---
+ build/pkgs/ply/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ply/spkg-configure.m4
+
+diff --git a/build/pkgs/ply/spkg-configure.m4 b/build/pkgs/ply/spkg-configure.m4
+new file mode 100644
+index 00000000..ffb0030
+--- /dev/null
++++ b/build/pkgs/ply/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ply], [SAGE_PYTHON_PACKAGE_CHECK([ply])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6aac31dabcdfdef228d7780398a3fda1a4cc566f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:29:51 -0500
+Subject: Trac #29665: add Gentoo package information for ply.
+
+---
+ build/pkgs/ply/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ply/distros/gentoo.txt
+
+diff --git a/build/pkgs/ply/distros/gentoo.txt b/build/pkgs/ply/distros/gentoo.txt
+new file mode 100644
+index 00000000..c8b1630
+--- /dev/null
++++ b/build/pkgs/ply/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ply
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb8d3372936ec37470d69687a0f91592129460ae Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:30:33 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for gast.
+
+---
+ build/pkgs/gast/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/gast/spkg-configure.m4
+
+diff --git a/build/pkgs/gast/spkg-configure.m4 b/build/pkgs/gast/spkg-configure.m4
+new file mode 100644
+index 00000000..26ec59f
+--- /dev/null
++++ b/build/pkgs/gast/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([gast], [SAGE_PYTHON_PACKAGE_CHECK([gast])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1cdc4046a88f1c2b4e5c162f66c6db6090b24194 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:31:15 -0500
+Subject: Trac #29665: add Gentoo package information for gast.
+
+---
+ build/pkgs/gast/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/gast/distros/gentoo.txt
+
+diff --git a/build/pkgs/gast/distros/gentoo.txt b/build/pkgs/gast/distros/gentoo.txt
+new file mode 100644
+index 00000000..3be5e7e
+--- /dev/null
++++ b/build/pkgs/gast/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/gast
+-- 
+cgit v1.0-1-gd88e
+
+
+From 96068b8a3742b65d619190e1d9fa5db399e6b4f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:32:20 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pythran.
+
+---
+ build/pkgs/pythran/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pythran/spkg-configure.m4
+
+diff --git a/build/pkgs/pythran/spkg-configure.m4 b/build/pkgs/pythran/spkg-configure.m4
+new file mode 100644
+index 00000000..592e95b
+--- /dev/null
++++ b/build/pkgs/pythran/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pythran], [SAGE_PYTHON_PACKAGE_CHECK([pythran])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1fa0fad3ae8f7e559c6fc315c6773a7d8aac0bfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:32:55 -0500
+Subject: Trac #29665: add Gentoo package information for pythran.
+
+---
+ build/pkgs/pythran/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pythran/distros/gentoo.txt
+
+diff --git a/build/pkgs/pythran/distros/gentoo.txt b/build/pkgs/pythran/distros/gentoo.txt
+new file mode 100644
+index 00000000..1bb7cdc
+--- /dev/null
++++ b/build/pkgs/pythran/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pythran
+-- 
+cgit v1.0-1-gd88e
+
+
+From d26370e5b8c88e76abfb7c27e3defb71c9e9f711 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:33:50 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for beniget.
+
+---
+ build/pkgs/beniget/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/beniget/spkg-configure.m4
+
+diff --git a/build/pkgs/beniget/spkg-configure.m4 b/build/pkgs/beniget/spkg-configure.m4
+new file mode 100644
+index 00000000..8ae6101
+--- /dev/null
++++ b/build/pkgs/beniget/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([beniget], [SAGE_PYTHON_PACKAGE_CHECK([beniget])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From eeeb296ed9b9694a865534103fd58e62a151ef5e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:34:22 -0500
+Subject: Trac #29665: add Gentoo package information for beniget.
+
+---
+ build/pkgs/beniget/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/beniget/distros/gentoo.txt
+
+diff --git a/build/pkgs/beniget/distros/gentoo.txt b/build/pkgs/beniget/distros/gentoo.txt
+new file mode 100644
+index 00000000..1a5972c
+--- /dev/null
++++ b/build/pkgs/beniget/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/beniget
+-- 
+cgit v1.0-1-gd88e
+
+
+From 078b2ff272d0eeff5cce40ad7eb176d9ddd7bdff Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:35:37 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for alabaster.
+
+---
+ build/pkgs/alabaster/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/alabaster/spkg-configure.m4
+
+diff --git a/build/pkgs/alabaster/spkg-configure.m4 b/build/pkgs/alabaster/spkg-configure.m4
+new file mode 100644
+index 00000000..4eca6e0
+--- /dev/null
++++ b/build/pkgs/alabaster/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([alabaster], [SAGE_PYTHON_PACKAGE_CHECK([alabaster])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7dc264353e5f64110431ff28c1b8b7e89699e9bd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:36:06 -0500
+Subject: Trac #29665: add Gentoo package information for alabaster.
+
+---
+ build/pkgs/alabaster/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/alabaster/distros/gentoo.txt
+
+diff --git a/build/pkgs/alabaster/distros/gentoo.txt b/build/pkgs/alabaster/distros/gentoo.txt
+new file mode 100644
+index 00000000..cffece6
+--- /dev/null
++++ b/build/pkgs/alabaster/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/alabaster
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8011a5e675e7e61a77ce34a299ee961a9f44253f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:43:59 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ importlib_metadata.
+
+---
+ build/pkgs/importlib_metadata/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/importlib_metadata/spkg-configure.m4
+
+diff --git a/build/pkgs/importlib_metadata/spkg-configure.m4 b/build/pkgs/importlib_metadata/spkg-configure.m4
+new file mode 100644
+index 00000000..0554e52
+--- /dev/null
++++ b/build/pkgs/importlib_metadata/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([importlib_metadata], [
++  SAGE_PYTHON_PACKAGE_CHECK([importlib_metadata])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 928ca0019e3ec6c4541a16b28bcc6710df6d010b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:44:28 -0500
+Subject: Trac #29665: add Gentoo package information for importlib_metadata.
+
+---
+ build/pkgs/importlib_metadata/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/importlib_metadata/distros/gentoo.txt
+
+diff --git a/build/pkgs/importlib_metadata/distros/gentoo.txt b/build/pkgs/importlib_metadata/distros/gentoo.txt
+new file mode 100644
+index 00000000..4f92786
+--- /dev/null
++++ b/build/pkgs/importlib_metadata/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/importlib_metadata
+-- 
+cgit v1.0-1-gd88e
+
+
+From 135f184f7498a2046065e669723e68efe2d65cee Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 21:16:58 -0500
+Subject: Trac #29665: fix sage.misc.package doctest with system alabaster.
+
+When alabaster from the system is used, these tests won't be able to
+find its SPKG installed. Add some ellipses, and switch one test to
+look for sage_conf instead.
+---
+ src/sage/misc/package.py | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/sage/misc/package.py b/src/sage/misc/package.py
+index 84f3d50..c7ad206 100644
+--- a/src/sage/misc/package.py
++++ b/src/sage/misc/package.py
+@@ -386,9 +386,9 @@ def installed_packages(exclude_pip=True):
+     EXAMPLES::
+ 
+         sage: sorted(installed_packages().keys())  # optional - build
+-        [...'alabaster', ...'sage_conf', ...]
+-        sage: installed_packages()['alabaster']  # optional - build, random
+-        '0.7.12'
++        [...'sage_conf', ...]
++        sage: installed_packages()['sage_conf']  # optional - build, random
++        '9.5'
+ 
+     .. SEEALSO::
+ 
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch b/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
new file mode 100644
index 000000000000..7ef3826aa4d2
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
@@ -0,0 +1,27 @@
+diff --git a/src/bin/sage-runtests b/src/bin/sage-runtests
+index 589dc8cd37..6bb8bf99a4 100755
+--- a/src/bin/sage-runtests
++++ b/src/bin/sage-runtests
+@@ -154,21 +154,4 @@ if __name__ == "__main__":
+     DC = DocTestController(args, args.filenames)
+     err = DC.run()
+ 
+-    try:
+-        exit_code_pytest = 0
+-        import pytest
+-        pytest_options = ["--import-mode", "importlib"]
+-        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.")
+-
+-    if err == 0:
+-        sys.exit(exit_code_pytest)
+-    else:
+-        sys.exit(err)
++    sys.exit(err)
diff --git a/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch b/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
new file mode 100644
index 000000000000..093e3d56eb33
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
@@ -0,0 +1,42 @@
+More site packages not included in trac 29665
+
+diff --git a/build/pkgs/gmpy2/spkg-configure.m4 b/build/pkgs/gmpy2/spkg-configure.m4
+new file mode 100644
+index 0000000000..2d0390f7db
+--- /dev/null
++++ b/build/pkgs/gmpy2/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([gmpy2], [SAGE_PYTHON_PACKAGE_CHECK([gmpy2])])
+diff --git a/build/pkgs/sphinx/spkg-configure.m4 b/build/pkgs/sphinx/spkg-configure.m4
+new file mode 100644
+index 0000000000..e149fbb2cf
+--- /dev/null
++++ b/build/pkgs/sphinx/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([sphinx], [SAGE_PYTHON_PACKAGE_CHECK([sphinx])])
+diff --git a/build/pkgs/typing_extensions/spkg-configure.m4 b/build/pkgs/typing_extensions/spkg-configure.m4
+new file mode 100644
+index 0000000000..d475fd8257
+--- /dev/null
++++ b/build/pkgs/typing_extensions/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([typing_extensions], [SAGE_PYTHON_PACKAGE_CHECK([typing_extensions])])
+-- 
+diff --git a/build/pkgs/gmpy2/install-requires.txt b/build/pkgs/gmpy2/install-requires.txt
+index 51d24518ef..c25feff557 100644
+--- a/build/pkgs/gmpy2/install-requires.txt
++++ b/build/pkgs/gmpy2/install-requires.txt
+@@ -1,3 +1 @@
+-# We would like to write gmpy2 >=2.1.0b5, but pipenv does not accept prereleases in version ranges
+-# https://github.com/pypa/pipenv/issues/1760
+-gmpy2 ==2.1.0rc1
++gmpy2 >=2.1
+diff --git a/build/pkgs/ptyprocess/install-requires.txt b/build/pkgs/ptyprocess/install-requires.txt
+index de89260872..7c336f636c 100644
+--- a/build/pkgs/ptyprocess/install-requires.txt
++++ b/build/pkgs/ptyprocess/install-requires.txt
+@@ -1,3 +1,3 @@
+-ptyprocess ==0.5.1
++ptyprocess
+ # https://trac.sagemath.org/ticket/31280#comment:42 and following
+ # sagelib is not compatible with ptyprocess 0.5.2, 0.6, and 0.7
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 33b40acbabeb..a32c5d18f378 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -22,11 +22,13 @@ distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
 checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
 python_version=3
 
-build_options="debug system_python3"
+build_options="debug system_python3 system_site_packages"
 desc_option_debug="Build with debug symbols"
 desc_option_system_python="Build using system python 3"
-build_options_default="system_python3"
+desc_option_system_python="Build using system python site-packages"
+build_options_default="system_python3 system_site_packages"
 configure_args+=" $(vopt_with system_python3)"
+configure_args+=" $(vopt_enable system_site_packages)"
 
 # path where sage will be installed
 _SAGE_ROOT=/usr/lib/sage-${version}
@@ -163,6 +165,8 @@ do_check() {
 	fi
 	if [ "$XBPS_CHECK_PKGS" = full ]; then
 		_test_args="--long $_test_args"
+	else
+		_test_args="--warn-long 5.0 $_test_args"
 	fi
 	# since make check will build the docs, run test like this instead
 	./sage -tp ${XBPS_MAKEJOBS} ${_test_args}
@@ -182,7 +186,7 @@ makedepends+=" automake gettext gettext-devel"
 # other host dependencies
 makedepends+=" cmake curl git ninja pandoc patch pkg-config python3 tox"
 
-# already in void
+# standard dependencies
 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
@@ -202,7 +206,49 @@ makedepends+="
  brial-devel cliquer-devel gfan libbraiding-devel libhomfly-devel
  lrcalc-devel nauty-devel palp tachyon
  maxima-ecl primesieve-devel primecount-devel
+ ffmpeg ImageMagick
 "
 
 # TODO: optional
 # 4ti2 coxeter3 libsemigroups lrslib pdf2svg perl_mongodb polymake
+
+# TODO: standard
+# cvxopt importlib_resources
+
+# python packages for trac-29665
+_sage_python3_modules="
+ python3-Babel python3-Jinja2 python3-MarkupSafe python3-Pillow
+ python3-Pygments python3-Sphinx python3-alabaster python3-argcomplete
+ python3-argon2 python3-attrs python3-backcall python3-beniget
+ python3-bleach python3-certifi python3-cffi python3-charset-normalizer
+ python3-cycler python3-dateutil python3-decorator python3-defusedxml
+ python3-docutils python3-entrypoints python3-flit_core python3-gast
+ python3-gmpy2 python3-html5lib python3-idna python3-imagesize
+ python3-importlib_metadata python3-ipython python3-ipython_genutils
+ python3-ipython_ipykernel python3-jedi python3-jsonschema
+ python3-jupyter_client python3-jupyter_core python3-jupyter_ipywidgets
+ python3-jupyter_nbconvert python3-jupyter_nbformat
+ python3-jupyter_notebook python3-jupyterlab_pygments python3-kiwisolver
+ python3-matplotlib python3-matplotlib-inline python3-mistune
+ python3-mpmath python3-nbclient python3-nest_asyncio python3-networkx
+ python3-numpy python3-packaging python3-pandocfilters python3-parsing
+ python3-parso python3-pexpect python3-pickleshare python3-pip
+ python3-pkgconfig python3-pluggy python3-ply python3-prometheus_client
+ python3-prompt_toolkit python3-ptyprocess python3-py python3-pybind11
+ python3-pycparser python3-pyrsistent python3-pytz python3-pyzmq
+ python3-requests python3-scipy python3-send2trash python3-setuptools
+ python3-setuptools_scm python3-simplegeneric python3-six
+ python3-snowballstemmer python3-sphinxcontrib-applehelp
+ python3-sphinxcontrib-devhelp python3-sphinxcontrib-htmlhelp
+ python3-sphinxcontrib-jsmath python3-sphinxcontrib-qthelp
+ python3-sphinxcontrib-serializinghtml python3-sympy python3-terminado
+ python3-testpath python3-texttable python3-toml python3-tomli
+ python3-tornado python3-traitlets python3-typing_extensions
+ python3-tzlocal python3-urllib3 python3-wcwidth python3-webencodings
+ python3-wheel python3-zipp pythran
+ "
+
+if [ "$build_option_system_site_packages" ]; then
+	makedepends+=" $_sage_python3_modules"
+	depends+=" $_sage_python3_modules"
+fi

From 281f1b4634eb9b10b4ddb228e8b8069287a46d84 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 3 Jan 2022 20:47:52 -0300
Subject: [PATCH 24/32] sagemath: use small source tarball + upstream packages

---
 srcpkgs/sagemath/template | 97 ++++++++++++++++++++++++++-------------
 1 file changed, 64 insertions(+), 33 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index a32c5d18f378..0de0061b09df 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -18,8 +18,8 @@ short_desc="Open source mathematics software"
 maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
-distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
-checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
+distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
+checksum=aea4c5a8d3b32af2fba644269b9daf4f62471471ba2d7d83da0f8098a5f53225
 python_version=3
 
 build_options="debug system_python3 system_site_packages"
@@ -33,42 +33,72 @@ configure_args+=" $(vopt_enable system_site_packages)"
 # 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} ;;
-esac
+_SAGE_UPSTREAM_MIRROR=https://mirrors.mit.edu/sage/spkg/upstream
 
-# extra upstream packages (trac-32968 / trac-33040)
 _upstream="
- https://pypi.io/packages/source/s/sphinx/Sphinx-4.3.1.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
+${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
+${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
+${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
+${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
+${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
+${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
+${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
+https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
+https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
+http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
+${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
+${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
+${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
+${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
+${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
+https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
+${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
+https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
+${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
 "
 
 checksum+="
- 32a5b3e9a1b176cc25ed048557d4d3d01af635e6b76c5bc7a43b0a34447fbd45
-
- 9c87405839a19696e837b3b818fed3f5f69f16f1eec1a1ad77e043dcea9c772f
- fc4453705b81d03568d5b808ad8f09c77c47534f6ac2e72e733f9ca4714aa75c
- acad2d8b20a1af07d4e4c9d2e9285c5ed9104354062f275f3fcd88dcef4f1326
- 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
- 78884e7c1d4b00ce3cea67b44566851c4343c120abd683433ce934a68ea58872
- 0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86
- b8e2f83c56e141920c39464b852de3719dfbfb6e3c99a2d8da0edf4fb33176ed
- d9bdec0013ef1eb5a84ab39a3b3868911598afa494f5faa038647101504e2b81
- b2e9810e09c3a47b73ce9cab5a72243a1258f61e7900969097a817232246ce1c
- 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
- 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
+c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
+d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
+4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
+3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
+03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
+5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
+cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
+5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
+581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
+6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
+07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
+a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
+ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
+d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
+169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
+5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
+cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
+471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
+78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
+edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
+b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
+3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
+545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
+cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
+718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
+dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
 "
 
 for u in ${_upstream}; do
@@ -101,6 +131,7 @@ post_extract() {
 	mv -T $wrksrc $_SAGE_ROOT
 	ln -srfT $_SAGE_ROOT $wrksrc
 
+	mkdir -p $wrksrc/upstream
 	for u in ${_upstream}; do
 		cp "$XBPS_SRCDISTDIR/${pkgname}-${version}/${u##*[/>]}" $wrksrc/upstream
 	done

From 65a14f88f1953c523dadcec48a636e065a1a5add Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 13:38:02 -0300
Subject: [PATCH 25/32] sagemath: for CI use fixed random-seed=0

---
 srcpkgs/sagemath/template | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 0de0061b09df..b5b99d2c122d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -194,6 +194,10 @@ do_check() {
 	if [ -z "$_test_args" ]; then
 		_test_args=--all
 	fi
+	if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
+		# for CI use a predictable random seed
+		_test_args="--random-seed=0 $_test_args"
+	fi
 	if [ "$XBPS_CHECK_PKGS" = full ]; then
 		_test_args="--long $_test_args"
 	else

From 084afc8cf07bafa926a023c9a162850dc308531d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 14:40:27 -0300
Subject: [PATCH 26/32] sagemath: upstream two patches

---
 ...ble-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch} |  6 +++---
 ...rse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch} | 10 +++++-----
 2 files changed, 8 insertions(+), 8 deletions(-)
 rename srcpkgs/sagemath/patches/{0001-sage-site-exec-only-if-it-is-executable.patch => trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch} (94%)
 rename srcpkgs/sagemath/patches/{0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch => trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch} (81%)

diff --git a/srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch b/srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
similarity index 94%
rename from srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch
rename to srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
index ce17c6d6e954..7fdb3d697222 100644
--- a/srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch
+++ b/srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
@@ -1,14 +1,14 @@
 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
+Subject: 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
+index 4c0fa17..153e610 100755
 --- a/src/bin/sage
 +++ b/src/bin/sage
 @@ -129,7 +129,7 @@ usage() {
@@ -39,5 +39,5 @@ index 4c0fa17426..153e610a2e 100755
              # fallthrough if there is no sage-site script
          fi
 -- 
-2.34.1
+cgit v1.0-1-gd88e
 
diff --git a/srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch b/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
similarity index 81%
rename from srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch
rename to srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
index bab6d8441d42..350c41ac3928 100644
--- a/srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch
+++ b/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
@@ -1,16 +1,16 @@
-From 57e3eba28c9b4ee6bd3407d0715b8bd00aaf04a7 Mon Sep 17 00:00:00 2001
+From 53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6 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
+Subject: sagetex: Fix a warning when byte-compiling sagetexparse.py
 
 ---
- .../sagetex/patches/sagetex-fix-warning.patch    | 16 ++++++++++++++++
+ build/pkgs/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
+index 00000000..d82ab67
 --- /dev/null
 +++ b/build/pkgs/sagetex/patches/sagetex-fix-warning.patch
 @@ -0,0 +1,16 @@
@@ -31,5 +31,5 @@ index 0000000000..d82ab675dd
 +     self.result += t.code[1:-1] + '\n\n'
 + 
 -- 
-2.34.1
+cgit v1.0-1-gd88e
 

From 60f7f2858a07e8780a6304095d09921b9598cfe3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 19:57:59 -0300
Subject: [PATCH 27/32] sagemath: reorder upstream sources and add two missing
 ones

---
 srcpkgs/sagemath/template | 60 ++++++++++++++++++++++-----------------
 1 file changed, 34 insertions(+), 26 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index b5b99d2c122d..f53cba947c88 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -36,69 +36,77 @@ _SAGE_ROOT=/usr/lib/sage-${version}
 _SAGE_UPSTREAM_MIRROR=https://mirrors.mit.edu/sage/spkg/upstream
 
 _upstream="
-${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
 ${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
 ${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
+
+${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
 ${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
 ${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
 ${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
 ${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
 ${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
 ${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
-https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
-https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
-http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
 ${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
 ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
 ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
 ${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
 ${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${PYPI_SITE}/P/PyCygwin/PyCygwin-0.1.tar.gz
 ${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
-https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+${PYPI_SITE}/s/setuptools/setuptools-59.2.0.tar.gz
 ${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
 ${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
-https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
 ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
+
+https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
+https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
+http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
+https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
 "
 
 checksum+="
-dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
 c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
 d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
+5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
+ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
+169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
+cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
+edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
+cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
+
+dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
 3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
 03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
 5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
 cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
-5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
-c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
-6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
-07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
 a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
-ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
 d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
-169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
 5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
-cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
 471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
 78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
-edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+45a5e295590c469a49b2804bfdb89059e942d768ad3b813f484d7b5bff48d226
 ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
-b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
-3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+157d21de9d055ab9e8ea3186d91e7f4f865e11f42deafa952d90842671fc2576
 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
 545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
-cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
-718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
 dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
+
+c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
+6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
+07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
+3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
 "
 
 for u in ${_upstream}; do

From 1b669a62fa821c499b4e89c9646196be268343e3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 9 Jan 2022 12:45:47 -0300
Subject: [PATCH 28/32] sagemath: do not download anything patch

---
 .../patches/00-Do_not_download_anything.patch         | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 srcpkgs/sagemath/patches/00-Do_not_download_anything.patch

diff --git a/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch b/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch
new file mode 100644
index 000000000000..35aef7b8d456
--- /dev/null
+++ b/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch
@@ -0,0 +1,11 @@
+--- a/build/sage_bootstrap/tarball.py	2022-01-07 19:17:06.754747955 -0300
++++ b/build/sage_bootstrap/tarball.py	2022-01-07 19:25:31.844139381 -0300
+@@ -158,6 +158,8 @@
+                             .format(destination=destination))
+         successful_download = False
+         log.info('Attempting to download package {0} from mirrors'.format(self.filename))
++        log.info('ERROR: downloading is disabled, add file to template instead')
++        return
+         for mirror in MirrorList():
+             url = mirror + '/'.join(['spkg', 'upstream', self.package.name, self.filename])
+             log.info(url)

From 404e426fb063dd372618bba2040ff1a3663f33c5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 9 Jan 2022 13:27:49 -0300
Subject: [PATCH 29/32] sagemath: update to 9.5.rc0.

---
 ...184f7498a2046065e669723e68efe2d65cee.patch |    6 +-
 ...1d4ced4264f65ab704f725f6f5879b012796.patch |  263 ----
 ...a54526829b79d5d236a40f83ddc6ce7b2696.patch | 1196 -----------------
 ...9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch |   27 -
 ...3f4f32246ad9ded6d37f1f2f12a589a81f4.patch} |    4 +-
 ...03138d0403be7c7cb303de2bc0a0e0b6793c.patch |   82 --
 ...f3a1611fed0cc66fb838eb85739646dd34d.patch} |   94 +-
 ...49c415e11d0522bff9013bc1509264b26ebf.patch |   27 +
 ...ip_doctest_singular_4.2.1--see_33134.patch |   13 +
 srcpkgs/sagemath/template                     |    6 +-
 10 files changed, 72 insertions(+), 1646 deletions(-)
 delete mode 100644 srcpkgs/sagemath/patches/trac-30766-system_python_3.10-df9f1d4ced4264f65ab704f725f6f5879b012796.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
 rename srcpkgs/sagemath/patches/{trac-33064-sage_docbuild_ignore_cache_save_permission_error-f767cf1eadfd8ab540a31c5c5ef09d56df09b90e.patch => trac-33064-sage_docbuild_ignore_cache_save_permission_error-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch} (92%)
 delete mode 100644 srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
 rename srcpkgs/sagemath/patches/{trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch => trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch} (63%)
 create mode 100644 srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch

diff --git a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
index b641113927e7..0ecb27c593cd 100644
--- a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
+++ b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
@@ -5615,9 +5615,9 @@ index 84f3d50..c7ad206 100644
      EXAMPLES::
  
          sage: sorted(installed_packages().keys())  # optional - build
--        [...'alabaster', ...'sage_conf', ...]
--        sage: installed_packages()['alabaster']  # optional - build, random
--        '0.7.12'
+-        [...'gmpy2', ...'sage_conf', ...]
+-        sage: installed_packages()['gmpy2']  # optional - build, random
+-        '2.1.0b5'
 +        [...'sage_conf', ...]
 +        sage: installed_packages()['sage_conf']  # optional - build, random
 +        '9.5'
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
deleted file mode 100644
index a1cb4c834482..000000000000
--- a/srcpkgs/sagemath/patches/trac-30766-system_python_3.10-df9f1d4ced4264f65ab704f725f6f5879b012796.patch
+++ /dev/null
@@ -1,263 +0,0 @@
-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-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch b/srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
deleted file mode 100644
index 3ae6fe01822d..000000000000
--- a/srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
+++ /dev/null
@@ -1,1196 +0,0 @@
-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/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch b/srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
deleted file mode 100644
index 485fb0176f45..000000000000
--- a/srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-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: 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 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"
- 
- # 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)
--- 
-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-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
similarity index 92%
rename from srcpkgs/sagemath/patches/trac-33064-sage_docbuild_ignore_cache_save_permission_error-f767cf1eadfd8ab540a31c5c5ef09d56df09b90e.patch
rename to srcpkgs/sagemath/patches/trac-33064-sage_docbuild_ignore_cache_save_permission_error-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
index 20fa12e570eb..04f04cfd6718 100644
--- 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-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
@@ -1,4 +1,4 @@
-From f767cf1eadfd8ab540a31c5c5ef09d56df09b90e Mon Sep 17 00:00:00 2001
+From e89193f4f32246ad9ded6d37f1f2f12a589a81f4 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
@@ -8,7 +8,7 @@ Subject: sage_docbuild: do not fail when cache cannot be saved
  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
+index 466ca82..f8c8ebd 100644
 --- a/src/sage_docbuild/__init__.py
 +++ b/src/sage_docbuild/__init__.py
 @@ -856,9 +856,12 @@ class ReferenceSubBuilder(DocBuilder):
diff --git a/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch b/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
deleted file mode 100644
index 6bc5193b75ee..000000000000
--- a/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-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
-
-
-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/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch b/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
similarity index 63%
rename from srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch
rename to srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
index 3794aa7f019b..04fca4815a00 100644
--- a/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch
+++ b/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
@@ -1,4 +1,4 @@
-From 7d3381b21e4716cfa8a33915621a12f0eba74233 Mon Sep 17 00:00:00 2001
+From 18d0477153af6f453a0e84f78030535f6a36ce87 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
@@ -10,56 +10,56 @@ Subject: doctests: remove dochtml label from some tests that don't need docs
  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
+index c788623..527ed90 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  # optional - sagemath_doc_html
+-        sage: thematic_index = os.path.join(SAGE_DOC, "html", "en", "thematic_tutorials", "index.html")  # optional - sagemath_doc_html
 +        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
+         sage: for line in open(thematic_index).readlines():  # optional - sagemath_doc_html
          ....:     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
+index 4c56aea..583ca06 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  # optional - sagemath_doc_html
+-    sage: docfilename = os.path.join(SAGE_DOC, 'html', 'en', 'reference', 'calculus', 'sage', 'symbolic', 'expression.html')  # optional - sagemath_doc_html
 +    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
+     sage: with open(docfilename) as fobj:  # optional - sagemath_doc_html
      ....:     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='',
+@@ -845,12 +845,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  # optional - sagemath_doc_html
+-        sage: len(_search_src_or_doc('src', r'matrix\(', 'incidence_structures', 'self', 'combinat', interact=False).splitlines()) > 1  # optional - sagemath_doc_html
 +        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)
+         sage: 'abvar/homology' in _search_src_or_doc('doc', 'homology', 'variety', interact=False)  # optional - sagemath_doc_html, 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)  # optional - sagemath_doc_html
 +        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:
+@@ -1369,7 +1369,7 @@ class _sage_doc:
  
-         sage: browse_sage_doc._open("reference", testing=True)[0]  # optional - dochtml, indirect doctest
+         sage: browse_sage_doc._open("reference", testing=True)[0]  # optional - sagemath_doc_html, 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]  # optional - sagemath_doc_html
 +        sage: browse_sage_doc(identity_matrix, 'rst')[-107:-47]
          'Full MatrixSpace of 3 by 3 sparse matrices over Integer Ring'
      """
@@ -68,7 +68,7 @@ index eb70516..b4848ed 100644
 cgit v1.0-1-gd88e
 
 
-From 42a76c3f82edecc9c6c53c661251677e3e907584 Mon Sep 17 00:00:00 2001
+From 88dd9f3a1611fed0cc66fb838eb85739646dd34d 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
@@ -78,7 +78,7 @@ Subject: doctests: add dochtml label to some tests that need docs installed
  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
+index f8c8ebd..d329009 100644
 --- a/src/sage_docbuild/__init__.py
 +++ b/src/sage_docbuild/__init__.py
 @@ -105,7 +105,7 @@ def builder_helper(type):
@@ -86,7 +86,7 @@ index 4a71c91..dd233bd 100644
          sage: from sage_docbuild import _build_many as build_many
          sage: helper = builder_helper("html")
 -        sage: try:
-+        sage: try:  # optional - dochtml
++        sage: try:  # optional - sagemath_doc_html
          ....:     build_many(build_ref_doc, [("docname", "en", "html", {})])
          ....: except Exception as E:
          ....:     "Non-exception during docbuild: abort pool operation" in str(E)
@@ -95,7 +95,7 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import DocBuilder
              sage: b = DocBuilder('tutorial')
 -            sage: b._output_dir('html')
-+            sage: b._output_dir('html')         # optional - dochtml
++            sage: b._output_dir('html')         # optional - sagemath_doc_html
              '.../html/en/tutorial'
          """
          d = os.path.join(SAGE_DOC, type, self.lang, self.name)
@@ -104,7 +104,7 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import DocBuilder
              sage: b = DocBuilder('tutorial')
 -            sage: b._doctrees_dir()
-+            sage: b._doctrees_dir()             # optional - docthml
++            sage: b._doctrees_dir()             # optional - sagemath_doc_html
              '.../doctrees/en/tutorial'
          """
          d = os.path.join(SAGE_DOC, 'doctrees', self.lang, self.name)
@@ -113,7 +113,7 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import ReferenceBuilder
              sage: b = ReferenceBuilder('reference')
 -            sage: b._output_dir('html')
-+            sage: b._output_dir('html')         # optional - dochtml
++            sage: b._output_dir('html')         # optional - sagemath_doc_html
              '.../html/en/reference'
          """
          if lang is None:
@@ -122,56 +122,10 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import ReferenceTopBuilder
              sage: b = ReferenceTopBuilder('reference')
 -            sage: b._output_dir('html')
-+            sage: b._output_dir('html')         # optional - dochtml
++            sage: b._output_dir('html')         # optional - sagemath_doc_html
              '.../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/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch b/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
new file mode 100644
index 000000000000..d32f1e4d5e9f
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
@@ -0,0 +1,27 @@
+From 836249c415e11d0522bff9013bc1509264b26ebf Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Sun, 9 Jan 2022 16:51:22 -0300
+Subject: trac 33135: add filter to ignore deprecation warnings
+
+---
+ src/sage/all.py | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/sage/all.py b/src/sage/all.py
+index 01ef327..19ca3d4 100644
+--- a/src/sage/all.py
++++ b/src/sage/all.py
+@@ -96,6 +96,10 @@ warnings.filterwarnings('ignore', category=DeprecationWarning,
+ warnings.filterwarnings('ignore', category=DeprecationWarning,
+                         module='pythran')
+ 
++warnings.filterwarnings('ignore', category=DeprecationWarning,
++                        message='The distutils(.sysconfig module| package) is deprecated',
++                        module='numpy|sage.env|sage.features')
++
+ ################ end setup warnings ###############################
+ 
+ 
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
new file mode 100644
index 000000000000..438078a92036
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage/rings/polynomial/hilbert.pyx b/src/sage/rings/polynomial/hilbert.pyx
+index 4cd91d0a46..323b168c4e 100644
+--- a/src/sage/rings/polynomial/hilbert.pyx
++++ b/src/sage/rings/polynomial/hilbert.pyx
+@@ -578,7 +578,7 @@ def hilbert_poincare_series(I, grading=None):
+ 
+     This example exceeded the capabilities of Singular before version 4.2.1p2::
+ 
+-        sage: J.hilbert_numerator(algorithm='singular')
++        sage: J.hilbert_numerator(algorithm='singular')   # not tested - requires singular 4.2.1p2
+         120*t^33 - 3465*t^32 + 48180*t^31 - 429374*t^30 + 2753520*t^29 - 13522410*t^28 + 52832780*t^27 - 168384150*t^26 + 445188744*t^25 - 987193350*t^24 + 1847488500*t^23 + 1372406746*t^22 - 403422496*t^21 - 8403314*t^20 - 471656596*t^19 + 1806623746*t^18 + 752776200*t^17 + 752776200*t^16 - 1580830020*t^15 + 1673936550*t^14 - 1294246800*t^13 + 786893250*t^12 - 382391100*t^11 + 146679390*t^10 - 42299400*t^9 + 7837830*t^8 - 172260*t^7 - 468930*t^6 + 183744*t^5 - 39270*t^4 + 5060*t^3 - 330*t^2 + 1
+ 
+     """
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f53cba947c88..f688629fc26d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -1,6 +1,6 @@
 # Template file for 'sagemath'
 pkgname=sagemath
-version=9.5.beta9
+version=9.5.rc0
 revision=1
 wrksrc=sage-$version
 build_style=configure
@@ -19,7 +19,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
-checksum=aea4c5a8d3b32af2fba644269b9daf4f62471471ba2d7d83da0f8098a5f53225
+checksum=8012e3ac35290fa9b2cb837eeca149925784c2378b486731226944e4afd8a4e6
 python_version=3
 
 build_options="debug system_python3 system_site_packages"
@@ -128,7 +128,7 @@ nostrip=yes
 noshlibprovides=yes
 
 # don't rewrite python shebang as sage uses its own python (for now)
-_no_python_shebang=yes
+#_no_python_shebang=yes
 
 # compile python code in sage venv
 pycompile_dirs="$_SAGE_ROOT/venv/"

From b835519b74626b088e5732ca106ea55b2784b9cf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 10 Jan 2022 16:32:54 -0300
Subject: [PATCH 30/32] sagemath: use system gap

---
 ...f491e5ce599ba185f5e93f02e0fcebd76c9e.patch | 57 +++++++++++++++++++
 .../patches/zzz-skip_doctest_system_gap.patch | 13 +++++
 srcpkgs/sagemath/template                     | 15 ++++-
 3 files changed, 82 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch

diff --git a/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch b/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
new file mode 100644
index 000000000000..da88a369db0d
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
@@ -0,0 +1,57 @@
+From 2c981351bb60089530b0598d3e9a909a23d4d4d8 Mon Sep 17 00:00:00 2001
+From: Thierry Thomas <thierry@FreeBSD.org>
+Date: Mon, 22 Mar 2021 03:04:12 +0100
+Subject: 29644: Add spkg-configure.m4 for gap
+
+---
+ build/pkgs/gap/spkg-configure.m4 | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+ create mode 100644 build/pkgs/gap/spkg-configure.m4
+
+diff --git a/build/pkgs/gap/spkg-configure.m4 b/build/pkgs/gap/spkg-configure.m4
+new file mode 100644
+index 00000000..91cd089
+--- /dev/null
++++ b/build/pkgs/gap/spkg-configure.m4
+@@ -0,0 +1,8 @@
++SAGE_SPKG_CONFIGURE([gap], [
++    SAGE_SPKG_DEPCHECK([gmp], [
++       AC_CHECK_HEADER([gap/system.h], [
++        AC_SEARCH_LIBS([GAP_COMM], [gap], [
++        ], [sage_spkg_install_gap=yes])
++       ], [sage_spkg_install_gap=yes])
++    ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2a41f491e5ce599ba185f5e93f02e0fcebd76c9e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Samuel=20Leli=C3=A8vre?= <samuel.lelievre@gmail.com>
+Date: Mon, 22 Mar 2021 03:05:31 +0100
+Subject: 29644: Add distro information for gap
+
+---
+ build/pkgs/gap/distros/fedora.txt | 1 +
+ build/pkgs/gap/distros/gentoo.txt | 1 +
+ 2 files changed, 2 insertions(+)
+ create mode 100644 build/pkgs/gap/distros/fedora.txt
+ create mode 100644 build/pkgs/gap/distros/gentoo.txt
+
+diff --git a/build/pkgs/gap/distros/fedora.txt b/build/pkgs/gap/distros/fedora.txt
+new file mode 100644
+index 00000000..ea4feae
+--- /dev/null
++++ b/build/pkgs/gap/distros/fedora.txt
+@@ -0,0 +1 @@
++gap
+diff --git a/build/pkgs/gap/distros/gentoo.txt b/build/pkgs/gap/distros/gentoo.txt
+new file mode 100644
+index 00000000..ea64ec9
+--- /dev/null
++++ b/build/pkgs/gap/distros/gentoo.txt
+@@ -0,0 +1 @@
++sci-mathematics/gap
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
new file mode 100644
index 000000000000..f132591d48ac
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage_setup/optional_extension.py b/src/sage_setup/optional_extension.py
+index f252849384..4034e3e196 100644
+--- a/src/sage_setup/optional_extension.py
++++ b/src/sage_setup/optional_extension.py
+@@ -80,7 +80,7 @@ def OptionalExtension(*args, **kwds):
+         sage: print(ext.__class__.__name__)
+         CythonizeExtension
+         sage: ext = OptionalExtension("foo", ["foo.c"], package="gap")
+-        sage: print(ext.__class__.__name__)
++        sage: print(ext.__class__.__name__)     # not tested - fails with system gap
+         Extension
+     """
+     try:
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f688629fc26d..02b0af4ad16d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -66,7 +66,6 @@ ${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
 ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
 
 https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
-https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
 http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
 https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
 https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
@@ -103,7 +102,6 @@ ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
 dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
 
 c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
-6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
 07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
 3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
 718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
@@ -159,6 +157,13 @@ pre_configure() {
 	export MAKE="make -j ${XBPS_MAKEJOBS}"
 }
 
+post_configure() {
+	# we set some variables, right after configure has created sage_conf.py
+	cat <<-EOF >> pkgs/sage-conf/sage_conf.py
+	GAP_ROOT_DIR = "/usr/share/gap"
+	EOF
+}
+
 # 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
@@ -248,7 +253,11 @@ makedepends+="
  gengetopt texinfo
  brial-devel cliquer-devel gfan libbraiding-devel libhomfly-devel
  lrcalc-devel nauty-devel palp tachyon
- maxima-ecl primesieve-devel primecount-devel
+ maxima-ecl primesieve-devel primecount-devel gap-devel
+"
+
+# optional dependencies
+makedepends+="
  ffmpeg ImageMagick
 "
 

From 56278bd469d6cf000619a8623def56b7153e43f3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Thu, 13 Jan 2022 03:21:19 -0300
Subject: [PATCH 31/32] sagemath: fixes for system gap

---
 .../zzz-fixes_for_system_gap--see_29644.patch | 96 +++++++++++++++++++
 .../patches/zzz-skip_doctest_system_gap.patch | 13 ---
 srcpkgs/sagemath/template                     |  1 +
 3 files changed, 97 insertions(+), 13 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
 delete mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch

diff --git a/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch b/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
new file mode 100644
index 000000000000..741d2b23a7f5
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
@@ -0,0 +1,96 @@
+From 346b4ea4c92f4287d3c097b92817cf2abfcddd8c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Thu, 13 Jan 2022 01:41:31 -0300
+Subject: [PATCH] gap: fixes for using system gap
+
+ - fix _get_shared_lib_path() so we don't need to configure GAP_SO
+ - fix gap_root() so we don't need to configure GAP_ROOT_DIR
+ - skip a useless test that cannot succeed on system gap
+ - use gap_root() in saved_workspace.py instead of GAP_ROOT_DIR
+---
+ src/sage/env.py                      |  2 +-
+ src/sage/libs/gap/saved_workspace.py |  4 ++--
+ src/sage/libs/gap/util.pyx           | 11 +++++++++++
+ src/sage_setup/optional_extension.py |  2 +-
+ 4 files changed, 15 insertions(+), 4 deletions(-)
+
+diff --git a/src/sage/env.py b/src/sage/env.py
+index c4953cfa65..c16696d298 100644
+--- a/src/sage/env.py
++++ b/src/sage/env.py
+@@ -293,7 +293,7 @@ def _get_shared_lib_path(*libnames: str) -> Optional[str]:
+             if sys.platform == 'darwin':
+                 ext = 'dylib'
+             else:
+-                ext = 'so'
++                ext = 'so*'
+ 
+             if SAGE_LOCAL:
+                 search_directories.append(Path(SAGE_LOCAL) / 'lib')
+diff --git a/src/sage/libs/gap/saved_workspace.py b/src/sage/libs/gap/saved_workspace.py
+index ad5adec36d..59c498795f 100644
+--- a/src/sage/libs/gap/saved_workspace.py
++++ b/src/sage/libs/gap/saved_workspace.py
+@@ -8,7 +8,7 @@ workspaces.
+ 
+ import os
+ import glob
+-from sage.env import GAP_ROOT_DIR
++from sage.libs.gap.util import gap_root
+ from sage.interfaces.gap_workspace import gap_workspace_file
+ 
+ 
+@@ -31,7 +31,7 @@ def timestamp():
+     """
+     libgap_dir = os.path.dirname(__file__)
+     libgap_files = glob.glob(os.path.join(libgap_dir, '*'))
+-    gap_packages = glob.glob(os.path.join(GAP_ROOT_DIR, 'pkg', '*'))
++    gap_packages = glob.glob(os.path.join(gap_root(), 'pkg', '*'))
+     files = libgap_files + gap_packages
+     if len(files) == 0:
+         print('Unable to find LibGAP files.')
+diff --git a/src/sage/libs/gap/util.pyx b/src/sage/libs/gap/util.pyx
+index 08c4c40cc0..c7dd557c35 100644
+--- a/src/sage/libs/gap/util.pyx
++++ b/src/sage/libs/gap/util.pyx
+@@ -23,6 +23,7 @@ from cysignals.signals cimport sig_on, sig_off
+ import os
+ import warnings
+ import sage.env
++import subprocess
+ 
+ from .gap_includes cimport *
+ from .element cimport *
+@@ -178,6 +179,16 @@ def gap_root():
+     if os.path.exists(sage.env.GAP_ROOT_DIR):
+         return sage.env.GAP_ROOT_DIR
+ 
++    gap_expr = 'JoinStringsWithSeparator(KERNEL_INFO().GAP_ROOT_PATHS,";")'
++    gap_root_paths = subprocess.getoutput(
++        f"gap -r -q --bare --nointeract -c 'Display({gap_expr});'"
++        ).strip().split(';')
++
++    for gapdir in gap_root_paths:
++        if os.path.exists(os.path.join(gapdir, 'sysinfo.gap')):
++            sage.env.GAP_ROOT_DIR = gapdir
++            return gapdir
++
+     # Attempt to figure out the appropriate GAP_ROOT by reading the
+     # local/bin/gap shell script; this is an ugly hack that exists for
+     # historical reasons; the best approach to setting where Sage looks for
+diff --git a/src/sage_setup/optional_extension.py b/src/sage_setup/optional_extension.py
+index f252849384..4034e3e196 100644
+--- a/src/sage_setup/optional_extension.py
++++ b/src/sage_setup/optional_extension.py
+@@ -80,7 +80,7 @@ def OptionalExtension(*args, **kwds):
+         sage: print(ext.__class__.__name__)
+         CythonizeExtension
+         sage: ext = OptionalExtension("foo", ["foo.c"], package="gap")
+-        sage: print(ext.__class__.__name__)
++        sage: print(ext.__class__.__name__)     # not tested - fails with system gap
+         Extension
+     """
+     try:
+-- 
+2.34.1
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
deleted file mode 100644
index f132591d48ac..000000000000
--- a/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/src/sage_setup/optional_extension.py b/src/sage_setup/optional_extension.py
-index f252849384..4034e3e196 100644
---- a/src/sage_setup/optional_extension.py
-+++ b/src/sage_setup/optional_extension.py
-@@ -80,7 +80,7 @@ def OptionalExtension(*args, **kwds):
-         sage: print(ext.__class__.__name__)
-         CythonizeExtension
-         sage: ext = OptionalExtension("foo", ["foo.c"], package="gap")
--        sage: print(ext.__class__.__name__)
-+        sage: print(ext.__class__.__name__)     # not tested - fails with system gap
-         Extension
-     """
-     try:
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 02b0af4ad16d..0d8ce1f7a70a 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -161,6 +161,7 @@ post_configure() {
 	# we set some variables, right after configure has created sage_conf.py
 	cat <<-EOF >> pkgs/sage-conf/sage_conf.py
 	GAP_ROOT_DIR = "/usr/share/gap"
+	GAP_SO = "$(objdump -p /usr/lib/libgap.so | awk '/SONAME/{print $2}')"
 	EOF
 }
 

From 5abb7ca7cdfc758f0e898f779cb656e0357447a3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Thu, 13 Jan 2022 15:47:33 -0300
Subject: [PATCH 32/32] New package: sagemath-test

---
 srcpkgs/sagemath-test/template                | 32 +++++++++++++++++++
 .../patches/zzz-skip_doctest_shebang.patch    | 11 +++++++
 2 files changed, 43 insertions(+)
 create mode 100644 srcpkgs/sagemath-test/template
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch

diff --git a/srcpkgs/sagemath-test/template b/srcpkgs/sagemath-test/template
new file mode 100644
index 000000000000..3e0b1c3233fd
--- /dev/null
+++ b/srcpkgs/sagemath-test/template
@@ -0,0 +1,32 @@
+# Template file for 'sagemath-test'
+pkgname=sagemath-test
+version=1
+revision=1
+build_style=meta
+checkdepends="sagemath"
+short_desc="Dummy package to test sagemath"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-2.0-or-later"
+homepage="none"
+
+# TODO: install base-voidstrap, uninstall base-chroot, and remove orphans
+# so we can check sagemath depends are enough to run sage on void
+
+do_check() {
+	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
+		_test_args=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	fi
+	if [ -z "$_test_args" ]; then
+		_test_args=--all
+	fi
+	if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
+		# for CI use a predictable random seed
+		_test_args="--random-seed=0 $_test_args"
+	fi
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args="--long $_test_args"
+	else
+		_test_args="--warn-long 5.0 $_test_args"
+	fi
+	/usr/bin/sage* -tp ${XBPS_MAKEJOBS} ${_test_args}
+}
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch
new file mode 100644
index 000000000000..04fa2acbf3ec
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch
@@ -0,0 +1,11 @@
+--- a/src/sage/tests/cmdline.py
++++ b/src/sage/tests/cmdline.py
+@@ -488,7 +488,7 @@ def test_executable(args, input="", timeout=100.0, pydebug_ignore_warnings=False
+         0
+ 
+         sage: (out, err, ret) = test_executable(["sage", "--cython"])
+-        sage: print(err)
++        sage: print(err)  # not tested - broken when shebang is rewritten
+         Cython (http://cython.org) is a compiler for code written in the
+         Cython language.  Cython is based on Pyrex by Greg Ewing.
+         ...

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.rc1
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (204 preceding siblings ...)
  2022-01-15 18:27 ` [PR PATCH] [Updated] " tornaria
@ 2022-01-15 18:31 ` tornaria
  2022-01-17  5:10 ` [PR PATCH] [Updated] " tornaria
                   ` (42 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-15 18:31 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1013731823

Comment:
I've reverted the branch to "New package: sagemath-test" temporarily, to see if that commit still passes all tests.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: sagemath-9.5.rc1
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (205 preceding siblings ...)
  2022-01-15 18:31 ` tornaria
@ 2022-01-17  5:10 ` tornaria
  2022-01-17  5:17 ` [WIP] New package: sagemath-9.5.rc2 tornaria
                   ` (41 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-17  5:10 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 627 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.rc1
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: 646705 bytes --]

From 32f3e2286e51fa25fb83ca4c2e89e594058a1adf 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/48] 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 f4c53a0c7f9fd2e472ba5d3774a45fb12eb93881 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/48] 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 a8bd626442046f920b17764cc05bffa3bd714e44 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/48] 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 c4a5ce15e9f8f9a365a87860aa20033638c3253e 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/48] 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 ab4e24a8515271d93b43fddae2acd5c71cf9b9c4 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/48] 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 c6a3ff806fa97348f963d78bcdb4ebc5a407e61a 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/48] 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 d8ad8a1525190a288773f02da3d139e42019d33f 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/48] 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 3317f99da530d78d311f9b16c7f06435b13c81ca 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/48] 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 54ad0fde0afdb32cbfd3b3e20f1d336a1b998b5c 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/48] 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 f419b3c8b862a638dfe27fe8a22d132b03bca87d 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/48] 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 d8658bb4fc3fa81e7cf022fd9b31911b8ff74aaf 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/48] 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 18594e223e1972b88bb8116218263acb2407775a 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/48] 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 e755bca3e7a22ab00aae9378f93ea04d194f4207 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/48] 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 e1b9721bd780c9a2f9dbd159b78aabbb6da270b0 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/48] 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 8783f69b6ffe3aa3f8df51a817e315c175a8378e 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/48] 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 7faa009fcee7ce5473e0c4ccfeb9e6011c910bca 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/48] 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 5b4e5f557459241dfd5fca02cc89476b000a1373 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/48] 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 b1dd0a9a48de7300b11d1dd638f51639aafd354b 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/48] 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 1ae807111aa6b46843037891b625a2775cd223eb 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/48] 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

From 1f44f728ec67741d12d5d4563c00d4f71cb76d90 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 27 Dec 2021 20:19:19 -0300
Subject: [PATCH 20/48] sagemath: fix license and tests

Now tests can be run with -Q (normal) or -K (--long)
---
 srcpkgs/sagemath/template | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index c5009269c7fc..33b40acbabeb 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -16,7 +16,7 @@ depends="giac git FlintQS zn_poly sympow
  "
 short_desc="Open source mathematics software"
 maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
-license="GPL-3.0-or-later"
+license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
 checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
@@ -155,15 +155,17 @@ do_install() {
 }
 
 do_check() {
-	TEST=--all
 	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
-		TEST="$(sed -e 's/#.*//' ${XBPS_DISTDIR}/sagemath-check)"
+		_test_args=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	fi
+	if [ -z "$_test_args" ]; then
+		_test_args=--all
+	fi
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args="--long $_test_args"
 	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} ${OPT} ${TEST}
-	#./sage -t ${OPT} ${TEST}
+	./sage -tp ${XBPS_MAKEJOBS} ${_test_args}
 }
 
 ### copied from sage-deps, to be kept in sync

From a8ad28dbc15d0ac2cc1dd1309e8fb974e8686abb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 28 Dec 2021 23:08:17 -0300
Subject: [PATCH 21/48] sagemath: fix long time test

---
 .../patches/zzz-fix_long_time_test--see_33091.patch | 13 +++++++++++++
 ...=> zzz-skip_doctest_giac-1.7.0--see_31563.patch} |  0
 2 files changed, 13 insertions(+)
 create mode 100644 srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
 rename srcpkgs/sagemath/patches/{skip-doctest-giac-1.7.0--see-trac-31563.patch => zzz-skip_doctest_giac-1.7.0--see_31563.patch} (100%)

diff --git a/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch b/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
new file mode 100644
index 000000000000..ca360dee9f6e
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage/matrix/matrix2.pyx b/src/sage/matrix/matrix2.pyx
+index 7d319bd54b..c1a2eed6f1 100644
+--- a/src/sage/matrix/matrix2.pyx
++++ b/src/sage/matrix/matrix2.pyx
+@@ -17215,7 +17215,7 @@ cdef class Matrix(Matrix1):
+ 
+             sage: set_random_seed()
+             sage: K = random_cone(max_ambient_dim=5)
+-            sage: all(L.change_ring(SR).is_Z_operator_on(K)
++            sage: all(L.change_ring(SR).is_Z_operator_on(K) # long time
+             ....:     for L in K.Z_operators_gens())  # long time
+             True
+ 
diff --git a/srcpkgs/sagemath/patches/skip-doctest-giac-1.7.0--see-trac-31563.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_31563.patch
similarity index 100%
rename from srcpkgs/sagemath/patches/skip-doctest-giac-1.7.0--see-trac-31563.patch
rename to srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_31563.patch

From cf5081ea8109fbb917edf66832b11adc824d5015 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 31 Dec 2021 13:52:34 -0300
Subject: [PATCH 22/48] python3-Sphinx: update to 4.3.2.

---
 srcpkgs/python3-Sphinx/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/python3-Sphinx/template b/srcpkgs/python3-Sphinx/template
index 8b0493c1f92c..29f892d16157 100644
--- a/srcpkgs/python3-Sphinx/template
+++ b/srcpkgs/python3-Sphinx/template
@@ -1,6 +1,6 @@
 # Template file for 'python3-Sphinx'
 pkgname=python3-Sphinx
-version=4.2.0
+version=4.3.2
 revision=1
 wrksrc=Sphinx-${version}
 build_style=python3-module
@@ -17,8 +17,9 @@ short_desc="Python 3 documentation generator"
 maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
 license="BSD-3-Clause"
 homepage="http://sphinx-doc.org"
+changelog="https://www.sphinx-doc.org/en/master/changes.html"
 distfiles="${PYPI_SITE}/S/Sphinx/Sphinx-${version}.tar.gz"
-checksum=94078db9184491e15bce0a56d9186e0aec95f16ac20b12d00e06d4e36f1058a6
+checksum=0a8836751a68306b3fe97ecbe44db786f8479c3bf4b80e3a7f5c838657b4698c
 conflicts="python-Sphinx>=0"
 
 post_install() {

From f5b5b2cc77c8139672a1f45267c85510b7142505 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 28 Dec 2021 23:08:17 -0300
Subject: [PATCH 23/48] sagemath: use system python site-packages

 - patch from #29665 for that
 - patch on top of that to allow a few more python packages:
   gmpy2, sphinx, typing_extensions, ptyprocess
 - add all available python packages to makedepends and depends
 - add ffmpeg and ImageMagick to makedepends
 - in standard check (-Q) warn if individual test > 5.0s
---
 ...184f7498a2046065e669723e68efe2d65cee.patch | 5629 +++++++++++++++++
 .../zzz-dont_run_pytest--see_31924.patch      |   27 +
 .../zzz-more_site_packages_not_in_29665.patch |   42 +
 srcpkgs/sagemath/template                     |   52 +-
 4 files changed, 5747 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch

diff --git a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
new file mode 100644
index 000000000000..b641113927e7
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
@@ -0,0 +1,5629 @@
+From 05fcaabe95082f42ba134780d579390d7b6153e2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 19:30:58 -0400
+Subject: Trac #29665: add --enable-system-site-packages option to ./configure.
+
+This new option is experimental and disabled by default. When it is
+enabled, the string "--system-site-packages" is appended to a new
+environment variable SAGE_VENV_FLAGS that is then passed to the
+sage-venv command during the build using autoconf substitution.
+Thusly the correct setting finds its way into local/pyvenv.cfg.
+---
+ build/make/Makefile.in |  2 +-
+ configure.ac           | 11 +++++++++++
+ 2 files changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/build/make/Makefile.in b/build/make/Makefile.in
+index f870cc3..68627ab 100644
+--- a/build/make/Makefile.in
++++ b/build/make/Makefile.in
+@@ -211,7 +211,7 @@ endif
+ inst_python3_venv = $(SAGE_VENV)/pyvenv.cfg
+ 
+ $(inst_python3_venv):
+-	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv "$(SAGE_VENV)"
++	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv @SAGE_VENV_FLAGS@ "$(SAGE_VENV)"
+ endif
+ 
+ # Build everything and start Sage.
+diff --git a/configure.ac b/configure.ac
+index 351f487..db30a91 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -435,6 +435,17 @@ AC_ARG_ENABLE([download-from-upstream-url],
+   [AS_HELP_STRING([--enable-download-from-upstream-url],
+     [allow downloading packages from their upstream URL if they cannot be found on the Sage mirrors])])
+ 
++AC_ARG_ENABLE(
++  [system-site-packages], [AS_HELP_STRING(
++    [--enable-system-site-packages],
++    [allow sage to use python packages from the system (experimental; default: no)]
++  )], [
++  AS_IF([test "x$enable_system_site_packages" = "xyes"], [
++    SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
++  ])
++])
++AC_SUBST([SAGE_VENV_FLAGS])
++
+ SAGE_SPKG_OPTIONS=""
+ AS_IF([test "x$enable_experimental_packages" = "xyes"], [
+   AS_VAR_APPEND([SAGE_SPKG_OPTIONS], [" -y"])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9372d1f663edf4e89f9c186336815ca04cff59dc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 19:41:14 -0400
+Subject: Trac #29665: new SAGE_PYTHON_PACKAGE_CHECK() autoconf macro.
+
+This new macro encapsulates the check for system installations of
+python packages. It uses setuptools.version's pkg_resources to
+check if the contents of install-requires.txt are satisfied for
+the given package; and if not, tells the build system to install
+the SPKG instead.
+---
+ m4/sage_python_package_check.m4 | 49 +++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 49 insertions(+)
+ create mode 100644 m4/sage_python_package_check.m4
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+new file mode 100644
+index 00000000..77b0a0c
+--- /dev/null
++++ b/m4/sage_python_package_check.m4
+@@ -0,0 +1,49 @@
++#
++# SYNOPSIS
++#
++#   SAGE_PYTHON_PACKAGE_CHECK(package)
++#
++# DESCRIPTION
++#
++#   Determine if the system copy of a python package can be used by sage.
++#
++#   This macro uses setuptools.version's pkg_resources to check that the
++#   "install-requires.txt" file for the named package is satisfied, and
++#   it can typically fail in four ways:
++#
++#     1. If --enable-system-site-packages was not passed to ./configure,
++#
++#     2. If we are not using the system python (no $PYTHON_FOR_VENV),
++#
++#     3. If setuptools is not available to the system python,
++#
++#     4. If the contents of install-requires.txt are not met (wrong
++#        version, no version, etc.) by the system python.
++#
++#   In any of those cases, we set sage_spkg_install_$package to "yes"
++#   so that the corresponding SPKG is installed. Otherwise, we do
++#   nothing, since the default value of sage_spkg_install_$package
++#   is "no" (to use the system copy).
++#
++#   The SAGE_SPKG_CONFIGURE_PYTHON3() macro is AC_REQUIRE'd to ensure
++#   that $PYTHON_FOR_VENV is available, if it is going to be available.
++#
++
++AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
++  AS_IF([test "${enable_system_site_packages}" = "yes"], [
++    AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
++
++    dnl strip all comments from install-requires.txt; this should leave
++    dnl only a single line containing the version specification for this
++    dnl package.
++    SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
++    AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++    AS_IF(
++      ["${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())"],
++      [AC_MSG_RESULT(yes)],
++      [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
++    )
++  ], [
++    sage_spkg_install_$1=yes
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a0dac8ad81ad6369d479bba30d2388de59e5cecb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:21:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for py.
+
+---
+ build/pkgs/py/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/py/spkg-configure.m4
+
+diff --git a/build/pkgs/py/spkg-configure.m4 b/build/pkgs/py/spkg-configure.m4
+new file mode 100644
+index 00000000..ded7034
+--- /dev/null
++++ b/build/pkgs/py/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([py], [SAGE_PYTHON_PACKAGE_CHECK([py])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 87c463a25ab4432dc1fba4f7a9703284e5b8f620 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:24:15 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for wheel.
+
+---
+ build/pkgs/wheel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wheel/spkg-configure.m4
+
+diff --git a/build/pkgs/wheel/spkg-configure.m4 b/build/pkgs/wheel/spkg-configure.m4
+new file mode 100644
+index 00000000..7897ea9
+--- /dev/null
++++ b/build/pkgs/wheel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([wheel], [SAGE_PYTHON_PACKAGE_CHECK([wheel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 804094b3a980f262f4d53d7be8b1be43ac0c55e0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:25:15 -0400
+Subject: Trac #29665: new spkg-configure.m4 for cvxopt.
+
+This includes a SAGE_SPKG_DEPCHECK([gsl glpk suitesparse],... because
+those C dependencies wind up linked into shared libraries like,
+
+  /usr/.../cvxopt/glpk.cpython-39-x86_64-linux-gnu.so
+
+that could potentially conflict with (for example) the glpk SPKG.
+---
+ build/pkgs/cvxopt/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/cvxopt/spkg-configure.m4
+
+diff --git a/build/pkgs/cvxopt/spkg-configure.m4 b/build/pkgs/cvxopt/spkg-configure.m4
+new file mode 100644
+index 00000000..c4aa619
+--- /dev/null
++++ b/build/pkgs/cvxopt/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([cvxopt], [
++  SAGE_SPKG_DEPCHECK([gsl glpk suitesparse], [
++    SAGE_PYTHON_PACKAGE_CHECK([cvxopt])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3f171955ff8d15da2c98aee0d2e254e95a55a2b5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:28:10 -0400
+Subject: Trac #29665: new spkg-configure.m4 for pyzmq.
+
+This includes a SAGE_SPKG_DEPCHECK([zeromq],... because libzmq winds
+up linked into shared libraries like,
+
+  /usr/.../zmq/backend/cython/message.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the zeromq SPKG.
+---
+ build/pkgs/pyzmq/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/pyzmq/spkg-configure.m4
+
+diff --git a/build/pkgs/pyzmq/spkg-configure.m4 b/build/pkgs/pyzmq/spkg-configure.m4
+new file mode 100644
+index 00000000..ae2b126
+--- /dev/null
++++ b/build/pkgs/pyzmq/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([pyzmq], [
++  SAGE_SPKG_DEPCHECK([zeromq], [
++    SAGE_PYTHON_PACKAGE_CHECK([pyzmq])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20d3aa9da9fc98a6e6a47599cd1b6d1d3785a4c4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:31:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for requests.
+
+---
+ build/pkgs/requests/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/requests/spkg-configure.m4
+
+diff --git a/build/pkgs/requests/spkg-configure.m4 b/build/pkgs/requests/spkg-configure.m4
+new file mode 100644
+index 00000000..f50a66c
+--- /dev/null
++++ b/build/pkgs/requests/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([requests], [SAGE_PYTHON_PACKAGE_CHECK([requests])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4df57ee47f2576b6b7bf9265248e06e90616b689 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:13:34 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for six.
+
+---
+ build/pkgs/six/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/six/spkg-configure.m4
+
+diff --git a/build/pkgs/six/spkg-configure.m4 b/build/pkgs/six/spkg-configure.m4
+new file mode 100644
+index 00000000..a382b81
+--- /dev/null
++++ b/build/pkgs/six/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([six], [SAGE_PYTHON_PACKAGE_CHECK([six])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f4462652d02ca729cc6d7cb36ee4d7d662deafb0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:14:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for packaging.
+
+---
+ build/pkgs/packaging/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/packaging/spkg-configure.m4
+
+diff --git a/build/pkgs/packaging/spkg-configure.m4 b/build/pkgs/packaging/spkg-configure.m4
+new file mode 100644
+index 00000000..398f9e1
+--- /dev/null
++++ b/build/pkgs/packaging/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([packaging], [SAGE_PYTHON_PACKAGE_CHECK([packaging])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4d64677fffce48077e4bc3e20ec833c70e6e9b65 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:18:53 -0400
+Subject: Trac #29665: new spkg-configure.m4 for numpy.
+
+This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack
+wind up linked into shared libraries like,
+
+  /usr/.../numpy/linalg/lapack_lite.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the openblas SPKG.
+---
+ build/pkgs/numpy/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/numpy/spkg-configure.m4
+
+diff --git a/build/pkgs/numpy/spkg-configure.m4 b/build/pkgs/numpy/spkg-configure.m4
+new file mode 100644
+index 00000000..16f9a90
+--- /dev/null
++++ b/build/pkgs/numpy/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([numpy], [
++  SAGE_SPKG_DEPCHECK([openblas], [
++   SAGE_PYTHON_PACKAGE_CHECK([numpy])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 85dfe5bb32f3c470966b477bae68a921e846d11f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:58:48 -0400
+Subject: Trac #29665: new spkg-configure.m4 for scipy.
+
+This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack
+wind up linked into shared libraries like,
+
+  /usr/.../scipy/linalg/_flinalg.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the openblas SPKG.
+---
+ build/pkgs/scipy/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/scipy/spkg-configure.m4
+
+diff --git a/build/pkgs/scipy/spkg-configure.m4 b/build/pkgs/scipy/spkg-configure.m4
+new file mode 100644
+index 00000000..0b7294a
+--- /dev/null
++++ b/build/pkgs/scipy/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([scipy], [
++  SAGE_SPKG_DEPCHECK([openblas], [
++    SAGE_PYTHON_PACKAGE_CHECK([scipy])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5616f1491036fda95f4d3e840c8c8b531c97323b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 07:19:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pluggy.
+
+---
+ build/pkgs/pluggy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pluggy/spkg-configure.m4
+
+diff --git a/build/pkgs/pluggy/spkg-configure.m4 b/build/pkgs/pluggy/spkg-configure.m4
+new file mode 100644
+index 00000000..11b1fce
+--- /dev/null
++++ b/build/pkgs/pluggy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pluggy], [SAGE_PYTHON_PACKAGE_CHECK([pluggy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6bceae3d356878cfe5fce40c9998dead003a3844 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 07:24:12 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pickleshare.
+
+---
+ build/pkgs/pickleshare/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pickleshare/spkg-configure.m4
+
+diff --git a/build/pkgs/pickleshare/spkg-configure.m4 b/build/pkgs/pickleshare/spkg-configure.m4
+new file mode 100644
+index 00000000..80e9b7c
+--- /dev/null
++++ b/build/pkgs/pickleshare/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pickleshare], [SAGE_PYTHON_PACKAGE_CHECK([pickleshare])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From da2ab534f4a256c82ed4f1c5f0f5c320529b5e9f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 08:53:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for html5lib.
+
+---
+ build/pkgs/html5lib/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/html5lib/spkg-configure.m4
+
+diff --git a/build/pkgs/html5lib/spkg-configure.m4 b/build/pkgs/html5lib/spkg-configure.m4
+new file mode 100644
+index 00000000..f421b7e
+--- /dev/null
++++ b/build/pkgs/html5lib/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([html5lib], [SAGE_PYTHON_PACKAGE_CHECK([html5lib])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5e464134afdf6055b7b5804208f759561c5435cd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 18:30:47 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for networkx.
+
+---
+ build/pkgs/networkx/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/networkx/spkg-configure.m4
+
+diff --git a/build/pkgs/networkx/spkg-configure.m4 b/build/pkgs/networkx/spkg-configure.m4
+new file mode 100644
+index 00000000..926671e
+--- /dev/null
++++ b/build/pkgs/networkx/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([networkx], [SAGE_PYTHON_PACKAGE_CHECK([networkx])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c4d40770cd9c7fda811e31759a5f4aedc320f3f9 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:33:24 -0400
+Subject: Trac #29665: new spkg-configure.m4 for matplotlib.
+
+This includes a SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull],...
+because those dependencies wind up linked into shared libraries like,
+
+  /usr/lib/.../matplotlib/ft2font.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with their SPKG counterparts.
+---
+ build/pkgs/matplotlib/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/matplotlib/spkg-configure.m4
+
+diff --git a/build/pkgs/matplotlib/spkg-configure.m4 b/build/pkgs/matplotlib/spkg-configure.m4
+new file mode 100644
+index 00000000..39c2d29
+--- /dev/null
++++ b/build/pkgs/matplotlib/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([matplotlib], [
++  SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull], [
++    SAGE_PYTHON_PACKAGE_CHECK([matplotlib])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7834dc3ac349201af632f89a9de7cd1967931010 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:35:00 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for bleach.
+
+---
+ build/pkgs/bleach/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/bleach/spkg-configure.m4
+
+diff --git a/build/pkgs/bleach/spkg-configure.m4 b/build/pkgs/bleach/spkg-configure.m4
+new file mode 100644
+index 00000000..3c9bb26
+--- /dev/null
++++ b/build/pkgs/bleach/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([bleach], [SAGE_PYTHON_PACKAGE_CHECK([bleach])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 84cad343287a2c69a4a21b9fa3b92301ff88645b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:37:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for decorator.
+
+---
+ build/pkgs/decorator/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/decorator/spkg-configure.m4
+
+diff --git a/build/pkgs/decorator/spkg-configure.m4 b/build/pkgs/decorator/spkg-configure.m4
+new file mode 100644
+index 00000000..e062778
+--- /dev/null
++++ b/build/pkgs/decorator/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([decorator], [SAGE_PYTHON_PACKAGE_CHECK([decorator])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 25693212572e69d452bc95c923ada13744359eb7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:38:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for idna.
+
+---
+ build/pkgs/idna/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/idna/spkg-configure.m4
+
+diff --git a/build/pkgs/idna/spkg-configure.m4 b/build/pkgs/idna/spkg-configure.m4
+new file mode 100644
+index 00000000..9d363f2
+--- /dev/null
++++ b/build/pkgs/idna/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([idna], [SAGE_PYTHON_PACKAGE_CHECK([idna])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6d5616472f6cdc6cf496bba6fe07bd4ef44dfdaf Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:39:23 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for certifi.
+
+---
+ build/pkgs/certifi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/certifi/spkg-configure.m4
+
+diff --git a/build/pkgs/certifi/spkg-configure.m4 b/build/pkgs/certifi/spkg-configure.m4
+new file mode 100644
+index 00000000..ddd4061
+--- /dev/null
++++ b/build/pkgs/certifi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([certifi], [SAGE_PYTHON_PACKAGE_CHECK([certifi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9412a07023b275e29e8d1af9b8ee3e767042e7fd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:40:59 -0400
+Subject: Trac #29665: new spkg-configure.m4 for pillow.
+
+This includes an SAGE_SPKG_DEPCHECK([bzip2 freetype libpng zlib],...
+because those dependencies wind up linked into shared libraries like,
+
+  /usr/.../PIL/_imagingft.cpython-39-x86_64-linux-gnu.so
+
+and potentially conflict with their SPKG counterparts.
+---
+ build/pkgs/pillow/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/pillow/spkg-configure.m4
+
+diff --git a/build/pkgs/pillow/spkg-configure.m4 b/build/pkgs/pillow/spkg-configure.m4
+new file mode 100644
+index 00000000..f2e68e2
+--- /dev/null
++++ b/build/pkgs/pillow/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([pillow], [
++  SAGE_SPKG_DEPCHECK([bzip2 freetype libpng zlib], [
++    SAGE_PYTHON_PACKAGE_CHECK([pillow])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From eede914311481fdb75b363b7a799075e876a2b4f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:44:13 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for mpmath.
+
+---
+ build/pkgs/mpmath/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mpmath/spkg-configure.m4
+
+diff --git a/build/pkgs/mpmath/spkg-configure.m4 b/build/pkgs/mpmath/spkg-configure.m4
+new file mode 100644
+index 00000000..f43c838
+--- /dev/null
++++ b/build/pkgs/mpmath/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([mpmath], [SAGE_PYTHON_PACKAGE_CHECK([mpmath])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 363a825885832c0b580ff53fe61f5c79e70c4728 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:44:56 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for sympy.
+
+---
+ build/pkgs/sympy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sympy/spkg-configure.m4
+
+diff --git a/build/pkgs/sympy/spkg-configure.m4 b/build/pkgs/sympy/spkg-configure.m4
+new file mode 100644
+index 00000000..fa0f1f5
+--- /dev/null
++++ b/build/pkgs/sympy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([sympy], [SAGE_PYTHON_PACKAGE_CHECK([sympy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0667964c914e4a01dda697190a054ff96cea92d6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:47:06 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pygments.
+
+---
+ build/pkgs/pygments/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pygments/spkg-configure.m4
+
+diff --git a/build/pkgs/pygments/spkg-configure.m4 b/build/pkgs/pygments/spkg-configure.m4
+new file mode 100644
+index 00000000..99f29e3
+--- /dev/null
++++ b/build/pkgs/pygments/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pygments], [SAGE_PYTHON_PACKAGE_CHECK([pygments])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f787c233aa05d8e90f7c6ad18f76bd2fa36bfbfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:48:50 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for jinja2.
+
+---
+ build/pkgs/jinja2/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jinja2/spkg-configure.m4
+
+diff --git a/build/pkgs/jinja2/spkg-configure.m4 b/build/pkgs/jinja2/spkg-configure.m4
+new file mode 100644
+index 00000000..0970d1c
+--- /dev/null
++++ b/build/pkgs/jinja2/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jinja2], [SAGE_PYTHON_PACKAGE_CHECK([jinja2])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 309d8f8e2b7078b5efbbe824b69ec1d9b1e639f0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:43:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pandocfilters.
+
+---
+ build/pkgs/pandocfilters/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/pandocfilters/spkg-configure.m4
+
+diff --git a/build/pkgs/pandocfilters/spkg-configure.m4 b/build/pkgs/pandocfilters/spkg-configure.m4
+new file mode 100644
+index 00000000..3e9537f
+--- /dev/null
++++ b/build/pkgs/pandocfilters/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([pandocfilters], [
++  SAGE_PYTHON_PACKAGE_CHECK([pandocfilters])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f57bfda49777a6ba1cd123553acd75dc347c5521 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:44:46 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for webencodings.
+
+---
+ build/pkgs/webencodings/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/webencodings/spkg-configure.m4
+
+diff --git a/build/pkgs/webencodings/spkg-configure.m4 b/build/pkgs/webencodings/spkg-configure.m4
+new file mode 100644
+index 00000000..1b9a5c4
+--- /dev/null
++++ b/build/pkgs/webencodings/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([webencodings], [
++  SAGE_PYTHON_PACKAGE_CHECK([webencodings])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7f193a62d7a2ea0b6a3ca6beb12390d91c25bbfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:48:26 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pytz.
+
+---
+ build/pkgs/pytz/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pytz/spkg-configure.m4
+
+diff --git a/build/pkgs/pytz/spkg-configure.m4 b/build/pkgs/pytz/spkg-configure.m4
+new file mode 100644
+index 00000000..366521b
+--- /dev/null
++++ b/build/pkgs/pytz/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pytz], [SAGE_PYTHON_PACKAGE_CHECK([pytz])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bfd3fdd887c3465c03465248de4997eed4a82915 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:51:16 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for texttable.
+
+---
+ build/pkgs/texttable/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/texttable/spkg-configure.m4
+
+diff --git a/build/pkgs/texttable/spkg-configure.m4 b/build/pkgs/texttable/spkg-configure.m4
+new file mode 100644
+index 00000000..42a3de1
+--- /dev/null
++++ b/build/pkgs/texttable/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([texttable], [SAGE_PYTHON_PACKAGE_CHECK([texttable])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 914bf0cc57abc46129b27c1525782dbe16da31a2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:53:41 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for babel.
+
+---
+ build/pkgs/babel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/babel/spkg-configure.m4
+
+diff --git a/build/pkgs/babel/spkg-configure.m4 b/build/pkgs/babel/spkg-configure.m4
+new file mode 100644
+index 00000000..d7b9a71
+--- /dev/null
++++ b/build/pkgs/babel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([babel], [SAGE_PYTHON_PACKAGE_CHECK([babel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 56977abd1eafbc87c765a2892cfe525382648259 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 14 Oct 2021 08:06:59 -0400
+Subject: Trac #29665: force system python3 with --enable-system-site-packages.
+
+When the python SPKG is used, the --enable-system-site-packages flag
+will essentially do nothing, and that may confuse users who have
+wasted a few hours building sage. (Generally, they will want to fix
+detection of their system python3 first.)
+
+To forestall that, we now set "--with-system-python3=force" whenever
+the "--enable-system-site-packages" flag is passed.
+---
+ configure.ac | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index db30a91..6fafb83 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -438,10 +438,19 @@ AC_ARG_ENABLE([download-from-upstream-url],
+ AC_ARG_ENABLE(
+   [system-site-packages], [AS_HELP_STRING(
+     [--enable-system-site-packages],
+-    [allow sage to use python packages from the system (experimental; default: no)]
++    [allow the use of python packages from the system (experimental; default: no)]
+   )], [
+   AS_IF([test "x$enable_system_site_packages" = "xyes"], [
+     SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
++
++    dnl We want to raise an error if the user asked for "system site
++    dnl packages" but the system python will not be used. Technically
++    dnl that causes no problems (SAGE_PYTHON_PACKAGE_CHECK always fails,
++    dnl so SPKGs are used for all python packages), but it may be confusing
++    dnl to end users who expect the flag to actually give them access to
++    dnl their system python packages and who may not be paying close
++    dnl attention to their ./configure output.
++    with_system_python3="force"
+   ])
+ ])
+ AC_SUBST([SAGE_VENV_FLAGS])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 02b369fd24ef7cf8997082e7850b9cf022cae34b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 01:18:35 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for setuptools.
+
+---
+ build/pkgs/setuptools/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/setuptools/spkg-configure.m4
+
+diff --git a/build/pkgs/setuptools/spkg-configure.m4 b/build/pkgs/setuptools/spkg-configure.m4
+new file mode 100644
+index 00000000..a2ad811
+--- /dev/null
++++ b/build/pkgs/setuptools/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([setuptools], [SAGE_PYTHON_PACKAGE_CHECK([setuptools])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 05117317d38693978efaf36e81d8b02bae44b257 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 01:15:48 -0400
+Subject: Trac #29665: poison PYTHONUSERBASE when testing for "system"
+ packages.
+
+When we're detecting system installations of python packages, we want
+to hide anything that was installed with e.g. "pip install --user". To
+accomplish that, we mimic the PYTHONUSERBASE poisoning from sage-env
+within the SAGE_PYTHON_PACKAGE_CHECK() macro.
+---
+ m4/sage_python_package_check.m4 | 18 +++++++++++++++++-
+ 1 file changed, 17 insertions(+), 1 deletion(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 77b0a0c..b8cdba4 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -38,11 +38,27 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     dnl package.
+     SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
+     AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++
++    dnl To prevent user-site (pip install --user) packages from being
++    dnl detected as "system" packages, we poison PYTHONUSERBASE. The
++    dnl sage-env script also does this at runtime; we mimic that
++    dnl implementation to ensure that the behaviors at ./configure and
++    dnl runtime are identical. Beware that (as in sage-env) the poisoning
++    dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
++    dnl user points PYTHONUSERBASE to any path (even the default), then
++    dnl his local pip packages will be detected.
++    PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
++    AS_IF([test -z "${PYTHONUSERBASE}"], [
++      PYTHONUSERBASE="${HOME}/.sage/local"
++    ])
++
+     AS_IF(
+-      ["${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())"],
++      [PYTHONUSERBASE="${PYTHONUSERBASE}" "${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" 2>/dev/null],
+       [AC_MSG_RESULT(yes)],
+       [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+     )
++
++    PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d75c1492f63a584b5ec5f424ddd7f7c4a6d502d3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:20:04 -0400
+Subject: Trac #29665: run SAGE_PYTHON_PACKAGE_CHECK() inside a venv.
+
+To recreate the runtime environment as closely as possible, we now use
+a venv (with system site packages enabled) when checking for system
+copies of python packages.
+---
+ m4/sage_python_package_check.m4 | 76 +++++++++++++++++++++++++++--------------
+ 1 file changed, 51 insertions(+), 25 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index b8cdba4..7cbd6c0 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -15,9 +15,11 @@
+ #
+ #     2. If we are not using the system python (no $PYTHON_FOR_VENV),
+ #
+-#     3. If setuptools is not available to the system python,
++#     3. If we are unable to create a venv with the system python,
+ #
+-#     4. If the contents of install-requires.txt are not met (wrong
++#     4. If setuptools is not available to the system python,
++#
++#     5. If the contents of install-requires.txt are not met (wrong
+ #        version, no version, etc.) by the system python.
+ #
+ #   In any of those cases, we set sage_spkg_install_$package to "yes"
+@@ -27,38 +29,62 @@
+ #
+ #   The SAGE_SPKG_CONFIGURE_PYTHON3() macro is AC_REQUIRE'd to ensure
+ #   that $PYTHON_FOR_VENV is available, if it is going to be available.
++#   The check is run inside a new venv, and with the PYTHONUSERBASE
++#   variable poisoned in the same manner as sage-env poisons it, to
++#   ensure that the ./configure- and run-time views of the system
++#   are as similar as possible.
+ #
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
+     AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
+ 
+-    dnl strip all comments from install-requires.txt; this should leave
+-    dnl only a single line containing the version specification for this
+-    dnl package.
+-    SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
+-    AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++    dnl We run this check inside a python venv, because that's ultimately
++    dnl how the system $PYTHON_FOR_VENV will be used.
++    AC_MSG_CHECKING([if we can create a python venv in config.venv])
+ 
+-    dnl To prevent user-site (pip install --user) packages from being
+-    dnl detected as "system" packages, we poison PYTHONUSERBASE. The
+-    dnl sage-env script also does this at runtime; we mimic that
+-    dnl implementation to ensure that the behaviors at ./configure and
+-    dnl runtime are identical. Beware that (as in sage-env) the poisoning
+-    dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
+-    dnl user points PYTHONUSERBASE to any path (even the default), then
+-    dnl his local pip packages will be detected.
+-    PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
+-    AS_IF([test -z "${PYTHONUSERBASE}"], [
+-      PYTHONUSERBASE="${HOME}/.sage/local"
+-    ])
++    dnl Use --clear because ./configure typically clobbers its output files.
++    AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
++                                        --clear                dnl
++                                        --without-pip          dnl
++					config.venv], [
++      AC_MSG_RESULT(yes)
++      dnl strip all comments from install-requires.txt; this should leave
++      dnl only a single line containing the version specification for this
++      dnl package.
++      SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
++      AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++
++      dnl To prevent user-site (pip install --user) packages from being
++      dnl detected as "system" packages, we poison PYTHONUSERBASE. The
++      dnl sage-env script also does this at runtime; we mimic that
++      dnl implementation to ensure that the behaviors at ./configure and
++      dnl runtime are identical. Beware that (as in sage-env) the poisoning
++      dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
++      dnl user points PYTHONUSERBASE to any path (even the default), then
++      dnl his local pip packages will be detected.
++      PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
++      AS_IF([test -z "${PYTHONUSERBASE}"], [
++        PYTHONUSERBASE="${HOME}/.sage/local"
++      ])
+ 
+-    AS_IF(
+-      [PYTHONUSERBASE="${PYTHONUSERBASE}" "${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" 2>/dev/null],
+-      [AC_MSG_RESULT(yes)],
+-      [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+-    )
++      AS_IF(
++        [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
++           "from setuptools.version import pkg_resources;              dnl
++            pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" dnl
++	 2>/dev/null],
++        [AC_MSG_RESULT(yes)],
++        [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
++      )
++
++      PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
++    ], [
++      dnl failed to create a venv for some reason
++      AC_MSG_RESULT(no)
++      sage_spkg_install_$1=yes
++    ])
+ 
+-    PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
++    rm -rf config.venv
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 87646c3264a04ffd98a12d67074f93e1943a1e96 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:38:08 -0400
+Subject: Trac #29665: log SAGE_PYTHON_PACKAGE_CHECK() failures to config.log.
+
+---
+ m4/sage_python_package_check.m4 | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 7cbd6c0..e0e0b9f 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -47,7 +47,8 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
+                                         --clear                dnl
+                                         --without-pip          dnl
+-					config.venv], [
++                                        config.venv            dnl
++                                        2>&AS_MESSAGE_LOG_FD], [
+       AC_MSG_RESULT(yes)
+       dnl strip all comments from install-requires.txt; this should leave
+       dnl only a single line containing the version specification for this
+@@ -72,7 +73,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+         [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
+            "from setuptools.version import pkg_resources;              dnl
+             pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" dnl
+-	 2>/dev/null],
++	 2>&AS_MESSAGE_LOG_FD],
+         [AC_MSG_RESULT(yes)],
+         [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+       )
+-- 
+cgit v1.0-1-gd88e
+
+
+From f7dfffd1c64816e2ae4e0f420b22065c5c5bf2cb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:45:37 -0400
+Subject: Trac #29665: don't clobber a plain file named config.venv.
+
+When SAGE_PYTHON_PACKAGE_CHECK() is cleaning up, we no longer remove
+"config.venv" unconditionally. Instead, we remove it only if it is a
+directory. This is also how "pyvenv --clear" works.
+---
+ m4/sage_python_package_check.m4 | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index e0e0b9f..127a078 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -85,7 +85,9 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+       sage_spkg_install_$1=yes
+     ])
+ 
+-    rm -rf config.venv
++    dnl Clean up config.venv, but only if we could have created it.
++    dnl (The --clear flag to pyvenv will not clobber a plain file.)
++    AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9849c77313b895dcfb786d2ea54e36585bd31ce2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 16 Oct 2021 08:14:42 -0400
+Subject: Trac #29665: don't announce system python packages that won't be
+ used.
+
+When --enable-system-site-packages was not given, the python packages
+using SAGE_PYTHON_PACKAGE_CHECK() in spkg-configure.m4 cannot be used.
+Rather than suggest that users install them anyway, that macro now
+hacks the value of sage_use_system_$package to be "no" when the use
+of system site packages is disabled at the python level.
+---
+ m4/sage_python_package_check.m4 | 17 +++++++++++++++++
+ 1 file changed, 17 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 127a078..7ee82a7 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -89,6 +89,23 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     dnl (The --clear flag to pyvenv will not clobber a plain file.)
+     AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
++    dnl System site packages are disabled.
+     sage_spkg_install_$1=yes
++
++    dnl We have to retroactively hack the --with-system-foo={no,yes,force}
++    dnl mechanism here because it wasn't designed with the ability to
++    dnl disable arbitrary chunks of system packages in mind. The easy cases
++    dnl are "no" and "force" which require no action; "no" means we won't
++    dnl suggest the package anyway, and "force" will raise an error when
++    dnl the system-package check fails.
++    dnl
++    dnl The default of "yes" is more troubling because it is the default. To
++    dnl avoid prompting users to install packages that won't be used, we want
++    dnl to ignore "yes" when reporting the "hint: install these packages..."
++    dnl at the end of ./configure. To accomplish that, we change "yes" to
++    dnl "no" here, essentially changing the default for packages using this
++    dnl macro when --enable-system-site-packages is disabled. Packages with
++    dnl "no" are not suggested to the user.
++    AS_IF([test "${sage_use_system_$1}" = "yes"],[sage_use_system_$1=no])
+   ])
+ ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3e6ad737b94aaac234d615ecaf1a2455eb607f1a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 17 Oct 2021 06:16:21 -0400
+Subject: Trac #29665: add Gentoo package information for python packages.
+
+---
+ build/pkgs/babel/distros/gentoo.txt         | 1 +
+ build/pkgs/bleach/distros/gentoo.txt        | 1 +
+ build/pkgs/certifi/distros/gentoo.txt       | 1 +
+ build/pkgs/cvxopt/distros/gentoo.txt        | 1 +
+ build/pkgs/decorator/distros/gentoo.txt     | 1 +
+ build/pkgs/html5lib/distros/gentoo.txt      | 1 +
+ build/pkgs/idna/distros/gentoo.txt          | 1 +
+ build/pkgs/jinja2/distros/gentoo.txt        | 1 +
+ build/pkgs/matplotlib/distros/gentoo.txt    | 1 +
+ build/pkgs/mpmath/distros/gentoo.txt        | 1 +
+ build/pkgs/networkx/distros/gentoo.txt      | 1 +
+ build/pkgs/numpy/distros/gentoo.txt         | 1 +
+ build/pkgs/packaging/distros/gentoo.txt     | 1 +
+ build/pkgs/pandocfilters/distros/gentoo.txt | 1 +
+ build/pkgs/pickleshare/distros/gentoo.txt   | 1 +
+ build/pkgs/pillow/distros/gentoo.txt        | 1 +
+ build/pkgs/pluggy/distros/gentoo.txt        | 1 +
+ build/pkgs/pygments/distros/gentoo.txt      | 1 +
+ build/pkgs/pytz/distros/gentoo.txt          | 1 +
+ build/pkgs/pyzmq/distros/gentoo.txt         | 1 +
+ build/pkgs/requests/distros/gentoo.txt      | 1 +
+ build/pkgs/scipy/distros/gentoo.txt         | 1 +
+ build/pkgs/setuptools/distros/gentoo.txt    | 1 +
+ build/pkgs/six/distros/gentoo.txt           | 1 +
+ build/pkgs/sympy/distros/gentoo.txt         | 1 +
+ build/pkgs/texttable/distros/gentoo.txt     | 1 +
+ build/pkgs/toml/distros/gentoo.txt          | 1 +
+ build/pkgs/webencodings/distros/gentoo.txt  | 1 +
+ 28 files changed, 28 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/gentoo.txt
+ create mode 100644 build/pkgs/bleach/distros/gentoo.txt
+ create mode 100644 build/pkgs/certifi/distros/gentoo.txt
+ create mode 100644 build/pkgs/cvxopt/distros/gentoo.txt
+ create mode 100644 build/pkgs/decorator/distros/gentoo.txt
+ create mode 100644 build/pkgs/html5lib/distros/gentoo.txt
+ create mode 100644 build/pkgs/idna/distros/gentoo.txt
+ create mode 100644 build/pkgs/jinja2/distros/gentoo.txt
+ create mode 100644 build/pkgs/matplotlib/distros/gentoo.txt
+ create mode 100644 build/pkgs/mpmath/distros/gentoo.txt
+ create mode 100644 build/pkgs/networkx/distros/gentoo.txt
+ create mode 100644 build/pkgs/numpy/distros/gentoo.txt
+ create mode 100644 build/pkgs/packaging/distros/gentoo.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/gentoo.txt
+ create mode 100644 build/pkgs/pickleshare/distros/gentoo.txt
+ create mode 100644 build/pkgs/pillow/distros/gentoo.txt
+ create mode 100644 build/pkgs/pluggy/distros/gentoo.txt
+ create mode 100644 build/pkgs/pygments/distros/gentoo.txt
+ create mode 100644 build/pkgs/pytz/distros/gentoo.txt
+ create mode 100644 build/pkgs/pyzmq/distros/gentoo.txt
+ create mode 100644 build/pkgs/requests/distros/gentoo.txt
+ create mode 100644 build/pkgs/scipy/distros/gentoo.txt
+ create mode 100644 build/pkgs/setuptools/distros/gentoo.txt
+ create mode 100644 build/pkgs/six/distros/gentoo.txt
+ create mode 100644 build/pkgs/sympy/distros/gentoo.txt
+ create mode 100644 build/pkgs/texttable/distros/gentoo.txt
+ create mode 100644 build/pkgs/toml/distros/gentoo.txt
+ create mode 100644 build/pkgs/webencodings/distros/gentoo.txt
+
+diff --git a/build/pkgs/babel/distros/gentoo.txt b/build/pkgs/babel/distros/gentoo.txt
+new file mode 100644
+index 00000000..2d2c34f
+--- /dev/null
++++ b/build/pkgs/babel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/Babel
+diff --git a/build/pkgs/bleach/distros/gentoo.txt b/build/pkgs/bleach/distros/gentoo.txt
+new file mode 100644
+index 00000000..b4f9744
+--- /dev/null
++++ b/build/pkgs/bleach/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/bleach
+diff --git a/build/pkgs/certifi/distros/gentoo.txt b/build/pkgs/certifi/distros/gentoo.txt
+new file mode 100644
+index 00000000..72e2e91
+--- /dev/null
++++ b/build/pkgs/certifi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/certifi
+diff --git a/build/pkgs/cvxopt/distros/gentoo.txt b/build/pkgs/cvxopt/distros/gentoo.txt
+new file mode 100644
+index 00000000..b312391
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/cvxopt
+diff --git a/build/pkgs/decorator/distros/gentoo.txt b/build/pkgs/decorator/distros/gentoo.txt
+new file mode 100644
+index 00000000..fea5a67
+--- /dev/null
++++ b/build/pkgs/decorator/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/decorator
+diff --git a/build/pkgs/html5lib/distros/gentoo.txt b/build/pkgs/html5lib/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c2be76
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/html5lib
+diff --git a/build/pkgs/idna/distros/gentoo.txt b/build/pkgs/idna/distros/gentoo.txt
+new file mode 100644
+index 00000000..68ef51c
+--- /dev/null
++++ b/build/pkgs/idna/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/idna
+diff --git a/build/pkgs/jinja2/distros/gentoo.txt b/build/pkgs/jinja2/distros/gentoo.txt
+new file mode 100644
+index 00000000..15a27ae
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jinja
+diff --git a/build/pkgs/matplotlib/distros/gentoo.txt b/build/pkgs/matplotlib/distros/gentoo.txt
+new file mode 100644
+index 00000000..bcfefb5
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/matplotlib
+diff --git a/build/pkgs/mpmath/distros/gentoo.txt b/build/pkgs/mpmath/distros/gentoo.txt
+new file mode 100644
+index 00000000..946c62d
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/mpmath
+diff --git a/build/pkgs/networkx/distros/gentoo.txt b/build/pkgs/networkx/distros/gentoo.txt
+new file mode 100644
+index 00000000..dd97742
+--- /dev/null
++++ b/build/pkgs/networkx/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/networkx
+diff --git a/build/pkgs/numpy/distros/gentoo.txt b/build/pkgs/numpy/distros/gentoo.txt
+new file mode 100644
+index 00000000..d2179d4
+--- /dev/null
++++ b/build/pkgs/numpy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/numpy
+diff --git a/build/pkgs/packaging/distros/gentoo.txt b/build/pkgs/packaging/distros/gentoo.txt
+new file mode 100644
+index 00000000..e5309ed
+--- /dev/null
++++ b/build/pkgs/packaging/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/packaging
+diff --git a/build/pkgs/pandocfilters/distros/gentoo.txt b/build/pkgs/pandocfilters/distros/gentoo.txt
+new file mode 100644
+index 00000000..a726fda
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/gentoo.txt b/build/pkgs/pickleshare/distros/gentoo.txt
+new file mode 100644
+index 00000000..14fad0f
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pickleshare
+diff --git a/build/pkgs/pillow/distros/gentoo.txt b/build/pkgs/pillow/distros/gentoo.txt
+new file mode 100644
+index 00000000..1243649
+--- /dev/null
++++ b/build/pkgs/pillow/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pillow
+diff --git a/build/pkgs/pluggy/distros/gentoo.txt b/build/pkgs/pluggy/distros/gentoo.txt
+new file mode 100644
+index 00000000..7b33876
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pluggy
+diff --git a/build/pkgs/pygments/distros/gentoo.txt b/build/pkgs/pygments/distros/gentoo.txt
+new file mode 100644
+index 00000000..a584f32
+--- /dev/null
++++ b/build/pkgs/pygments/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pygments
+diff --git a/build/pkgs/pytz/distros/gentoo.txt b/build/pkgs/pytz/distros/gentoo.txt
+new file mode 100644
+index 00000000..902a18b
+--- /dev/null
++++ b/build/pkgs/pytz/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pytz
+diff --git a/build/pkgs/pyzmq/distros/gentoo.txt b/build/pkgs/pyzmq/distros/gentoo.txt
+new file mode 100644
+index 00000000..77c2429
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyzmq
+diff --git a/build/pkgs/requests/distros/gentoo.txt b/build/pkgs/requests/distros/gentoo.txt
+new file mode 100644
+index 00000000..d3dc941
+--- /dev/null
++++ b/build/pkgs/requests/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/requests
+diff --git a/build/pkgs/scipy/distros/gentoo.txt b/build/pkgs/scipy/distros/gentoo.txt
+new file mode 100644
+index 00000000..11dabd2
+--- /dev/null
++++ b/build/pkgs/scipy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/scipy
+diff --git a/build/pkgs/setuptools/distros/gentoo.txt b/build/pkgs/setuptools/distros/gentoo.txt
+new file mode 100644
+index 00000000..3a4fa34
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/setuptools
+diff --git a/build/pkgs/six/distros/gentoo.txt b/build/pkgs/six/distros/gentoo.txt
+new file mode 100644
+index 00000000..f73f648
+--- /dev/null
++++ b/build/pkgs/six/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/six
+diff --git a/build/pkgs/sympy/distros/gentoo.txt b/build/pkgs/sympy/distros/gentoo.txt
+new file mode 100644
+index 00000000..b5a5034
+--- /dev/null
++++ b/build/pkgs/sympy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sympy
+diff --git a/build/pkgs/texttable/distros/gentoo.txt b/build/pkgs/texttable/distros/gentoo.txt
+new file mode 100644
+index 00000000..b33a7a7
+--- /dev/null
++++ b/build/pkgs/texttable/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/texttable
+diff --git a/build/pkgs/toml/distros/gentoo.txt b/build/pkgs/toml/distros/gentoo.txt
+new file mode 100644
+index 00000000..64fcea3
+--- /dev/null
++++ b/build/pkgs/toml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/toml
+diff --git a/build/pkgs/webencodings/distros/gentoo.txt b/build/pkgs/webencodings/distros/gentoo.txt
+new file mode 100644
+index 00000000..7539b0f
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/webencodings
+-- 
+cgit v1.0-1-gd88e
+
+
+From 088380f884124c9608160b613ba031c5f023f604 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 18:43:04 -0700
+Subject: build/pkgs: Add distros/fedora.txt for Python packages
+
+---
+ build/pkgs/babel/distros/fedora.txt         | 1 +
+ build/pkgs/bleach/distros/fedora.txt        | 1 +
+ build/pkgs/certifi/distros/fedora.txt       | 1 +
+ build/pkgs/cvxopt/distros/fedora.txt        | 1 +
+ build/pkgs/decorator/distros/fedora.txt     | 1 +
+ build/pkgs/html5lib/distros/fedora.txt      | 1 +
+ build/pkgs/idna/distros/fedora.txt          | 1 +
+ build/pkgs/jinja2/distros/fedora.txt        | 1 +
+ build/pkgs/matplotlib/distros/fedora.txt    | 1 +
+ build/pkgs/mpmath/distros/fedora.txt        | 1 +
+ build/pkgs/networkx/distros/fedora.txt      | 1 +
+ build/pkgs/numpy/distros/fedora.txt         | 1 +
+ build/pkgs/packaging/distros/fedora.txt     | 1 +
+ build/pkgs/pandocfilters/distros/fedora.txt | 1 +
+ build/pkgs/pickleshare/distros/fedora.txt   | 1 +
+ build/pkgs/pillow/distros/fedora.txt        | 1 +
+ build/pkgs/pluggy/distros/fedora.txt        | 1 +
+ build/pkgs/py/distros/fedora.txt            | 1 +
+ build/pkgs/pygments/distros/fedora.txt      | 1 +
+ build/pkgs/pytz/distros/fedora.txt          | 1 +
+ build/pkgs/pyzmq/distros/fedora.txt         | 1 +
+ build/pkgs/requests/distros/fedora.txt      | 1 +
+ build/pkgs/scipy/distros/fedora.txt         | 1 +
+ build/pkgs/setuptools/distros/fedora.txt    | 1 +
+ build/pkgs/six/distros/fedora.txt           | 1 +
+ build/pkgs/sympy/distros/fedora.txt         | 1 +
+ build/pkgs/texttable/distros/fedora.txt     | 1 +
+ build/pkgs/toml/distros/fedora.txt          | 1 +
+ build/pkgs/webencodings/distros/fedora.txt  | 1 +
+ build/pkgs/wheel/distros/fedora.txt         | 1 +
+ 30 files changed, 30 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/fedora.txt
+ create mode 100644 build/pkgs/bleach/distros/fedora.txt
+ create mode 100644 build/pkgs/certifi/distros/fedora.txt
+ create mode 100644 build/pkgs/cvxopt/distros/fedora.txt
+ create mode 100644 build/pkgs/decorator/distros/fedora.txt
+ create mode 100644 build/pkgs/html5lib/distros/fedora.txt
+ create mode 100644 build/pkgs/idna/distros/fedora.txt
+ create mode 100644 build/pkgs/jinja2/distros/fedora.txt
+ create mode 100644 build/pkgs/matplotlib/distros/fedora.txt
+ create mode 100644 build/pkgs/mpmath/distros/fedora.txt
+ create mode 100644 build/pkgs/networkx/distros/fedora.txt
+ create mode 100644 build/pkgs/numpy/distros/fedora.txt
+ create mode 100644 build/pkgs/packaging/distros/fedora.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/fedora.txt
+ create mode 100644 build/pkgs/pickleshare/distros/fedora.txt
+ create mode 100644 build/pkgs/pillow/distros/fedora.txt
+ create mode 100644 build/pkgs/pluggy/distros/fedora.txt
+ create mode 100644 build/pkgs/py/distros/fedora.txt
+ create mode 100644 build/pkgs/pygments/distros/fedora.txt
+ create mode 100644 build/pkgs/pytz/distros/fedora.txt
+ create mode 100644 build/pkgs/pyzmq/distros/fedora.txt
+ create mode 100644 build/pkgs/requests/distros/fedora.txt
+ create mode 100644 build/pkgs/scipy/distros/fedora.txt
+ create mode 100644 build/pkgs/setuptools/distros/fedora.txt
+ create mode 100644 build/pkgs/six/distros/fedora.txt
+ create mode 100644 build/pkgs/sympy/distros/fedora.txt
+ create mode 100644 build/pkgs/texttable/distros/fedora.txt
+ create mode 100644 build/pkgs/toml/distros/fedora.txt
+ create mode 100644 build/pkgs/webencodings/distros/fedora.txt
+ create mode 100644 build/pkgs/wheel/distros/fedora.txt
+
+diff --git a/build/pkgs/babel/distros/fedora.txt b/build/pkgs/babel/distros/fedora.txt
+new file mode 100644
+index 00000000..98f6593
+--- /dev/null
++++ b/build/pkgs/babel/distros/fedora.txt
+@@ -0,0 +1 @@
++babel
+diff --git a/build/pkgs/bleach/distros/fedora.txt b/build/pkgs/bleach/distros/fedora.txt
+new file mode 100644
+index 00000000..c5422cc
+--- /dev/null
++++ b/build/pkgs/bleach/distros/fedora.txt
+@@ -0,0 +1 @@
++python-bleach
+diff --git a/build/pkgs/certifi/distros/fedora.txt b/build/pkgs/certifi/distros/fedora.txt
+new file mode 100644
+index 00000000..be421c8
+--- /dev/null
++++ b/build/pkgs/certifi/distros/fedora.txt
+@@ -0,0 +1 @@
++python-certifi
+diff --git a/build/pkgs/cvxopt/distros/fedora.txt b/build/pkgs/cvxopt/distros/fedora.txt
+new file mode 100644
+index 00000000..f15770f
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/fedora.txt
+@@ -0,0 +1 @@
++python-cvxopt
+diff --git a/build/pkgs/decorator/distros/fedora.txt b/build/pkgs/decorator/distros/fedora.txt
+new file mode 100644
+index 00000000..0795604
+--- /dev/null
++++ b/build/pkgs/decorator/distros/fedora.txt
+@@ -0,0 +1 @@
++python-decorator
+diff --git a/build/pkgs/html5lib/distros/fedora.txt b/build/pkgs/html5lib/distros/fedora.txt
+new file mode 100644
+index 00000000..b821491
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/fedora.txt
+@@ -0,0 +1 @@
++python-html5lib
+diff --git a/build/pkgs/idna/distros/fedora.txt b/build/pkgs/idna/distros/fedora.txt
+new file mode 100644
+index 00000000..a73e70c
+--- /dev/null
++++ b/build/pkgs/idna/distros/fedora.txt
+@@ -0,0 +1 @@
++python-idna
+diff --git a/build/pkgs/jinja2/distros/fedora.txt b/build/pkgs/jinja2/distros/fedora.txt
+new file mode 100644
+index 00000000..f5f3caf
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/fedora.txt
+@@ -0,0 +1 @@
++python-jinja2
+diff --git a/build/pkgs/matplotlib/distros/fedora.txt b/build/pkgs/matplotlib/distros/fedora.txt
+new file mode 100644
+index 00000000..f6d856e
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/fedora.txt
+@@ -0,0 +1 @@
++python-matplotlib
+diff --git a/build/pkgs/mpmath/distros/fedora.txt b/build/pkgs/mpmath/distros/fedora.txt
+new file mode 100644
+index 00000000..a7dc8d5
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/fedora.txt
+@@ -0,0 +1 @@
++python-mpmath
+diff --git a/build/pkgs/networkx/distros/fedora.txt b/build/pkgs/networkx/distros/fedora.txt
+new file mode 100644
+index 00000000..293f943
+--- /dev/null
++++ b/build/pkgs/networkx/distros/fedora.txt
+@@ -0,0 +1 @@
++python-networkx
+diff --git a/build/pkgs/numpy/distros/fedora.txt b/build/pkgs/numpy/distros/fedora.txt
+new file mode 100644
+index 00000000..c8722b9
+--- /dev/null
++++ b/build/pkgs/numpy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-numpy
+diff --git a/build/pkgs/packaging/distros/fedora.txt b/build/pkgs/packaging/distros/fedora.txt
+new file mode 100644
+index 00000000..02ad855
+--- /dev/null
++++ b/build/pkgs/packaging/distros/fedora.txt
+@@ -0,0 +1 @@
++python-packaging
+diff --git a/build/pkgs/pandocfilters/distros/fedora.txt b/build/pkgs/pandocfilters/distros/fedora.txt
+new file mode 100644
+index 00000000..e7a86d0
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/fedora.txt b/build/pkgs/pickleshare/distros/fedora.txt
+new file mode 100644
+index 00000000..6d991a2
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pickleshare
+diff --git a/build/pkgs/pillow/distros/fedora.txt b/build/pkgs/pillow/distros/fedora.txt
+new file mode 100644
+index 00000000..86dbb1d
+--- /dev/null
++++ b/build/pkgs/pillow/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pillow
+diff --git a/build/pkgs/pluggy/distros/fedora.txt b/build/pkgs/pluggy/distros/fedora.txt
+new file mode 100644
+index 00000000..c869e54
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pluggy
+diff --git a/build/pkgs/py/distros/fedora.txt b/build/pkgs/py/distros/fedora.txt
+new file mode 100644
+index 00000000..b348d39
+--- /dev/null
++++ b/build/pkgs/py/distros/fedora.txt
+@@ -0,0 +1 @@
++python-py
+diff --git a/build/pkgs/pygments/distros/fedora.txt b/build/pkgs/pygments/distros/fedora.txt
+new file mode 100644
+index 00000000..f3e72a8
+--- /dev/null
++++ b/build/pkgs/pygments/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pygments
+diff --git a/build/pkgs/pytz/distros/fedora.txt b/build/pkgs/pytz/distros/fedora.txt
+new file mode 100644
+index 00000000..2cccc9e
+--- /dev/null
++++ b/build/pkgs/pytz/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pytz
+diff --git a/build/pkgs/pyzmq/distros/fedora.txt b/build/pkgs/pyzmq/distros/fedora.txt
+new file mode 100644
+index 00000000..23f64d1
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pyzmq
+diff --git a/build/pkgs/requests/distros/fedora.txt b/build/pkgs/requests/distros/fedora.txt
+new file mode 100644
+index 00000000..93a7bc1
+--- /dev/null
++++ b/build/pkgs/requests/distros/fedora.txt
+@@ -0,0 +1 @@
++python-requests
+diff --git a/build/pkgs/scipy/distros/fedora.txt b/build/pkgs/scipy/distros/fedora.txt
+new file mode 100644
+index 00000000..7ff2882
+--- /dev/null
++++ b/build/pkgs/scipy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-scipy
+diff --git a/build/pkgs/setuptools/distros/fedora.txt b/build/pkgs/setuptools/distros/fedora.txt
+new file mode 100644
+index 00000000..e1ad178
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/fedora.txt
+@@ -0,0 +1 @@
++python-setuptools
+diff --git a/build/pkgs/six/distros/fedora.txt b/build/pkgs/six/distros/fedora.txt
+new file mode 100644
+index 00000000..787c530
+--- /dev/null
++++ b/build/pkgs/six/distros/fedora.txt
+@@ -0,0 +1 @@
++python-six
+diff --git a/build/pkgs/sympy/distros/fedora.txt b/build/pkgs/sympy/distros/fedora.txt
+new file mode 100644
+index 00000000..126c88a
+--- /dev/null
++++ b/build/pkgs/sympy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-sympy
+diff --git a/build/pkgs/texttable/distros/fedora.txt b/build/pkgs/texttable/distros/fedora.txt
+new file mode 100644
+index 00000000..8d1ccec
+--- /dev/null
++++ b/build/pkgs/texttable/distros/fedora.txt
+@@ -0,0 +1 @@
++python-texttable
+diff --git a/build/pkgs/toml/distros/fedora.txt b/build/pkgs/toml/distros/fedora.txt
+new file mode 100644
+index 00000000..821ee77
+--- /dev/null
++++ b/build/pkgs/toml/distros/fedora.txt
+@@ -0,0 +1 @@
++python-toml
+diff --git a/build/pkgs/webencodings/distros/fedora.txt b/build/pkgs/webencodings/distros/fedora.txt
+new file mode 100644
+index 00000000..12ddba9
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/fedora.txt
+@@ -0,0 +1 @@
++python-webencodings
+diff --git a/build/pkgs/wheel/distros/fedora.txt b/build/pkgs/wheel/distros/fedora.txt
+new file mode 100644
+index 00000000..ae4cbb9
+--- /dev/null
++++ b/build/pkgs/wheel/distros/fedora.txt
+@@ -0,0 +1 @@
++python-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From ad1d5a20380b147c774903066031442f31094626 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 21:04:04 -0700
+Subject: build/pkgs: Add distros/arch.txt for Python packages
+
+---
+ build/pkgs/babel/distros/arch.txt         | 1 +
+ build/pkgs/bleach/distros/arch.txt        | 1 +
+ build/pkgs/certifi/distros/arch.txt       | 1 +
+ build/pkgs/cvxopt/distros/arch.txt        | 1 +
+ build/pkgs/decorator/distros/arch.txt     | 1 +
+ build/pkgs/html5lib/distros/arch.txt      | 1 +
+ build/pkgs/idna/distros/arch.txt          | 1 +
+ build/pkgs/matplotlib/distros/arch.txt    | 1 +
+ build/pkgs/mpmath/distros/arch.txt        | 1 +
+ build/pkgs/networkx/distros/arch.txt      | 1 +
+ build/pkgs/numpy/distros/arch.txt         | 1 +
+ build/pkgs/packaging/distros/arch.txt     | 1 +
+ build/pkgs/pandocfilters/distros/arch.txt | 1 +
+ build/pkgs/pickleshare/distros/arch.txt   | 1 +
+ build/pkgs/pillow/distros/arch.txt        | 1 +
+ build/pkgs/pluggy/distros/arch.txt        | 1 +
+ build/pkgs/py/distros/arch.txt            | 1 +
+ build/pkgs/pygments/distros/arch.txt      | 1 +
+ build/pkgs/pytz/distros/arch.txt          | 1 +
+ build/pkgs/pyzmq/distros/arch.txt         | 1 +
+ build/pkgs/requests/distros/arch.txt      | 1 +
+ build/pkgs/scipy/distros/arch.txt         | 1 +
+ build/pkgs/setuptools/distros/arch.txt    | 1 +
+ build/pkgs/six/distros/arch.txt           | 1 +
+ build/pkgs/sympy/distros/arch.txt         | 1 +
+ build/pkgs/texttable/distros/arch.txt     | 1 +
+ build/pkgs/toml/distros/arch.txt          | 1 +
+ build/pkgs/webencodings/distros/arch.txt  | 1 +
+ build/pkgs/wheel/distros/arch.txt         | 1 +
+ 29 files changed, 29 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/arch.txt
+ create mode 100644 build/pkgs/bleach/distros/arch.txt
+ create mode 100644 build/pkgs/certifi/distros/arch.txt
+ create mode 100644 build/pkgs/cvxopt/distros/arch.txt
+ create mode 100644 build/pkgs/decorator/distros/arch.txt
+ create mode 100644 build/pkgs/html5lib/distros/arch.txt
+ create mode 100644 build/pkgs/idna/distros/arch.txt
+ create mode 100644 build/pkgs/matplotlib/distros/arch.txt
+ create mode 100644 build/pkgs/mpmath/distros/arch.txt
+ create mode 100644 build/pkgs/networkx/distros/arch.txt
+ create mode 100644 build/pkgs/numpy/distros/arch.txt
+ create mode 100644 build/pkgs/packaging/distros/arch.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/arch.txt
+ create mode 100644 build/pkgs/pickleshare/distros/arch.txt
+ create mode 100644 build/pkgs/pillow/distros/arch.txt
+ create mode 100644 build/pkgs/pluggy/distros/arch.txt
+ create mode 100644 build/pkgs/py/distros/arch.txt
+ create mode 100644 build/pkgs/pygments/distros/arch.txt
+ create mode 100644 build/pkgs/pytz/distros/arch.txt
+ create mode 100644 build/pkgs/pyzmq/distros/arch.txt
+ create mode 100644 build/pkgs/requests/distros/arch.txt
+ create mode 100644 build/pkgs/scipy/distros/arch.txt
+ create mode 100644 build/pkgs/setuptools/distros/arch.txt
+ create mode 100644 build/pkgs/six/distros/arch.txt
+ create mode 100644 build/pkgs/sympy/distros/arch.txt
+ create mode 100644 build/pkgs/texttable/distros/arch.txt
+ create mode 100644 build/pkgs/toml/distros/arch.txt
+ create mode 100644 build/pkgs/webencodings/distros/arch.txt
+ create mode 100644 build/pkgs/wheel/distros/arch.txt
+
+diff --git a/build/pkgs/babel/distros/arch.txt b/build/pkgs/babel/distros/arch.txt
+new file mode 100644
+index 00000000..f2d828c
+--- /dev/null
++++ b/build/pkgs/babel/distros/arch.txt
+@@ -0,0 +1 @@
++python-babel
+diff --git a/build/pkgs/bleach/distros/arch.txt b/build/pkgs/bleach/distros/arch.txt
+new file mode 100644
+index 00000000..c5422cc
+--- /dev/null
++++ b/build/pkgs/bleach/distros/arch.txt
+@@ -0,0 +1 @@
++python-bleach
+diff --git a/build/pkgs/certifi/distros/arch.txt b/build/pkgs/certifi/distros/arch.txt
+new file mode 100644
+index 00000000..be421c8
+--- /dev/null
++++ b/build/pkgs/certifi/distros/arch.txt
+@@ -0,0 +1 @@
++python-certifi
+diff --git a/build/pkgs/cvxopt/distros/arch.txt b/build/pkgs/cvxopt/distros/arch.txt
+new file mode 100644
+index 00000000..f15770f
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/arch.txt
+@@ -0,0 +1 @@
++python-cvxopt
+diff --git a/build/pkgs/decorator/distros/arch.txt b/build/pkgs/decorator/distros/arch.txt
+new file mode 100644
+index 00000000..0795604
+--- /dev/null
++++ b/build/pkgs/decorator/distros/arch.txt
+@@ -0,0 +1 @@
++python-decorator
+diff --git a/build/pkgs/html5lib/distros/arch.txt b/build/pkgs/html5lib/distros/arch.txt
+new file mode 100644
+index 00000000..b821491
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/arch.txt
+@@ -0,0 +1 @@
++python-html5lib
+diff --git a/build/pkgs/idna/distros/arch.txt b/build/pkgs/idna/distros/arch.txt
+new file mode 100644
+index 00000000..a73e70c
+--- /dev/null
++++ b/build/pkgs/idna/distros/arch.txt
+@@ -0,0 +1 @@
++python-idna
+diff --git a/build/pkgs/matplotlib/distros/arch.txt b/build/pkgs/matplotlib/distros/arch.txt
+new file mode 100644
+index 00000000..f6d856e
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/arch.txt
+@@ -0,0 +1 @@
++python-matplotlib
+diff --git a/build/pkgs/mpmath/distros/arch.txt b/build/pkgs/mpmath/distros/arch.txt
+new file mode 100644
+index 00000000..a7dc8d5
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/arch.txt
+@@ -0,0 +1 @@
++python-mpmath
+diff --git a/build/pkgs/networkx/distros/arch.txt b/build/pkgs/networkx/distros/arch.txt
+new file mode 100644
+index 00000000..293f943
+--- /dev/null
++++ b/build/pkgs/networkx/distros/arch.txt
+@@ -0,0 +1 @@
++python-networkx
+diff --git a/build/pkgs/numpy/distros/arch.txt b/build/pkgs/numpy/distros/arch.txt
+new file mode 100644
+index 00000000..c8722b9
+--- /dev/null
++++ b/build/pkgs/numpy/distros/arch.txt
+@@ -0,0 +1 @@
++python-numpy
+diff --git a/build/pkgs/packaging/distros/arch.txt b/build/pkgs/packaging/distros/arch.txt
+new file mode 100644
+index 00000000..02ad855
+--- /dev/null
++++ b/build/pkgs/packaging/distros/arch.txt
+@@ -0,0 +1 @@
++python-packaging
+diff --git a/build/pkgs/pandocfilters/distros/arch.txt b/build/pkgs/pandocfilters/distros/arch.txt
+new file mode 100644
+index 00000000..e7a86d0
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/arch.txt
+@@ -0,0 +1 @@
++python-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/arch.txt b/build/pkgs/pickleshare/distros/arch.txt
+new file mode 100644
+index 00000000..6d991a2
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/arch.txt
+@@ -0,0 +1 @@
++python-pickleshare
+diff --git a/build/pkgs/pillow/distros/arch.txt b/build/pkgs/pillow/distros/arch.txt
+new file mode 100644
+index 00000000..86dbb1d
+--- /dev/null
++++ b/build/pkgs/pillow/distros/arch.txt
+@@ -0,0 +1 @@
++python-pillow
+diff --git a/build/pkgs/pluggy/distros/arch.txt b/build/pkgs/pluggy/distros/arch.txt
+new file mode 100644
+index 00000000..c869e54
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/arch.txt
+@@ -0,0 +1 @@
++python-pluggy
+diff --git a/build/pkgs/py/distros/arch.txt b/build/pkgs/py/distros/arch.txt
+new file mode 100644
+index 00000000..b348d39
+--- /dev/null
++++ b/build/pkgs/py/distros/arch.txt
+@@ -0,0 +1 @@
++python-py
+diff --git a/build/pkgs/pygments/distros/arch.txt b/build/pkgs/pygments/distros/arch.txt
+new file mode 100644
+index 00000000..f3e72a8
+--- /dev/null
++++ b/build/pkgs/pygments/distros/arch.txt
+@@ -0,0 +1 @@
++python-pygments
+diff --git a/build/pkgs/pytz/distros/arch.txt b/build/pkgs/pytz/distros/arch.txt
+new file mode 100644
+index 00000000..2cccc9e
+--- /dev/null
++++ b/build/pkgs/pytz/distros/arch.txt
+@@ -0,0 +1 @@
++python-pytz
+diff --git a/build/pkgs/pyzmq/distros/arch.txt b/build/pkgs/pyzmq/distros/arch.txt
+new file mode 100644
+index 00000000..23f64d1
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/arch.txt
+@@ -0,0 +1 @@
++python-pyzmq
+diff --git a/build/pkgs/requests/distros/arch.txt b/build/pkgs/requests/distros/arch.txt
+new file mode 100644
+index 00000000..93a7bc1
+--- /dev/null
++++ b/build/pkgs/requests/distros/arch.txt
+@@ -0,0 +1 @@
++python-requests
+diff --git a/build/pkgs/scipy/distros/arch.txt b/build/pkgs/scipy/distros/arch.txt
+new file mode 100644
+index 00000000..7ff2882
+--- /dev/null
++++ b/build/pkgs/scipy/distros/arch.txt
+@@ -0,0 +1 @@
++python-scipy
+diff --git a/build/pkgs/setuptools/distros/arch.txt b/build/pkgs/setuptools/distros/arch.txt
+new file mode 100644
+index 00000000..e1ad178
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/arch.txt
+@@ -0,0 +1 @@
++python-setuptools
+diff --git a/build/pkgs/six/distros/arch.txt b/build/pkgs/six/distros/arch.txt
+new file mode 100644
+index 00000000..787c530
+--- /dev/null
++++ b/build/pkgs/six/distros/arch.txt
+@@ -0,0 +1 @@
++python-six
+diff --git a/build/pkgs/sympy/distros/arch.txt b/build/pkgs/sympy/distros/arch.txt
+new file mode 100644
+index 00000000..126c88a
+--- /dev/null
++++ b/build/pkgs/sympy/distros/arch.txt
+@@ -0,0 +1 @@
++python-sympy
+diff --git a/build/pkgs/texttable/distros/arch.txt b/build/pkgs/texttable/distros/arch.txt
+new file mode 100644
+index 00000000..8d1ccec
+--- /dev/null
++++ b/build/pkgs/texttable/distros/arch.txt
+@@ -0,0 +1 @@
++python-texttable
+diff --git a/build/pkgs/toml/distros/arch.txt b/build/pkgs/toml/distros/arch.txt
+new file mode 100644
+index 00000000..821ee77
+--- /dev/null
++++ b/build/pkgs/toml/distros/arch.txt
+@@ -0,0 +1 @@
++python-toml
+diff --git a/build/pkgs/webencodings/distros/arch.txt b/build/pkgs/webencodings/distros/arch.txt
+new file mode 100644
+index 00000000..12ddba9
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/arch.txt
+@@ -0,0 +1 @@
++python-webencodings
+diff --git a/build/pkgs/wheel/distros/arch.txt b/build/pkgs/wheel/distros/arch.txt
+new file mode 100644
+index 00000000..ae4cbb9
+--- /dev/null
++++ b/build/pkgs/wheel/distros/arch.txt
+@@ -0,0 +1 @@
++python-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5087abee08f2a89ddaf422ec72a84575fe724a79 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 21:20:56 -0700
+Subject: build/pkgs: Add distros/opensuse.txt for Python packages
+
+---
+ build/pkgs/bleach/distros/opensuse.txt        | 1 +
+ build/pkgs/cvxopt/distros/opensuse.txt        | 1 +
+ build/pkgs/html5lib/distros/opensuse.txt      | 1 +
+ build/pkgs/idna/distros/opensuse.txt          | 1 +
+ build/pkgs/jinja2/distros/opensuse.txt        | 2 +-
+ build/pkgs/mpmath/distros/opensuse.txt        | 1 +
+ build/pkgs/numpy/distros/opensuse.txt         | 1 +
+ build/pkgs/packaging/distros/opensuse.txt     | 1 +
+ build/pkgs/pandocfilters/distros/opensuse.txt | 1 +
+ build/pkgs/pluggy/distros/opensuse.txt        | 1 +
+ build/pkgs/py/distros/opensuse.txt            | 1 +
+ build/pkgs/pygments/distros/opensuse.txt      | 2 +-
+ build/pkgs/sympy/distros/opensuse.txt         | 1 +
+ build/pkgs/texttable/distros/opensuse.txt     | 1 +
+ build/pkgs/toml/distros/opensuse.txt          | 1 +
+ 15 files changed, 15 insertions(+), 2 deletions(-)
+ create mode 100644 build/pkgs/bleach/distros/opensuse.txt
+ create mode 100644 build/pkgs/cvxopt/distros/opensuse.txt
+ create mode 100644 build/pkgs/html5lib/distros/opensuse.txt
+ create mode 100644 build/pkgs/idna/distros/opensuse.txt
+ create mode 100644 build/pkgs/mpmath/distros/opensuse.txt
+ create mode 100644 build/pkgs/numpy/distros/opensuse.txt
+ create mode 100644 build/pkgs/packaging/distros/opensuse.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/opensuse.txt
+ create mode 100644 build/pkgs/pluggy/distros/opensuse.txt
+ create mode 100644 build/pkgs/py/distros/opensuse.txt
+ create mode 100644 build/pkgs/sympy/distros/opensuse.txt
+ create mode 100644 build/pkgs/texttable/distros/opensuse.txt
+ create mode 100644 build/pkgs/toml/distros/opensuse.txt
+
+diff --git a/build/pkgs/bleach/distros/opensuse.txt b/build/pkgs/bleach/distros/opensuse.txt
+new file mode 100644
+index 00000000..6d37c4c
+--- /dev/null
++++ b/build/pkgs/bleach/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-bleach
+diff --git a/build/pkgs/cvxopt/distros/opensuse.txt b/build/pkgs/cvxopt/distros/opensuse.txt
+new file mode 100644
+index 00000000..2bb6ad1
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-cvxopt
+diff --git a/build/pkgs/html5lib/distros/opensuse.txt b/build/pkgs/html5lib/distros/opensuse.txt
+new file mode 100644
+index 00000000..6d7b8df
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-html5lib
+diff --git a/build/pkgs/idna/distros/opensuse.txt b/build/pkgs/idna/distros/opensuse.txt
+new file mode 100644
+index 00000000..de48e70
+--- /dev/null
++++ b/build/pkgs/idna/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-idna
+diff --git a/build/pkgs/jinja2/distros/opensuse.txt b/build/pkgs/jinja2/distros/opensuse.txt
+index 5d90a22..f2db865 100644
+--- a/build/pkgs/jinja2/distros/opensuse.txt
++++ b/build/pkgs/jinja2/distros/opensuse.txt
+@@ -1 +1 @@
+-python3-Jinja2
++python3-jinja2
+diff --git a/build/pkgs/mpmath/distros/opensuse.txt b/build/pkgs/mpmath/distros/opensuse.txt
+new file mode 100644
+index 00000000..fbc82a9
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-mpmath
+diff --git a/build/pkgs/numpy/distros/opensuse.txt b/build/pkgs/numpy/distros/opensuse.txt
+new file mode 100644
+index 00000000..79d5c5a
+--- /dev/null
++++ b/build/pkgs/numpy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-numpy
+diff --git a/build/pkgs/packaging/distros/opensuse.txt b/build/pkgs/packaging/distros/opensuse.txt
+new file mode 100644
+index 00000000..8f1c0ff
+--- /dev/null
++++ b/build/pkgs/packaging/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-packaging
+diff --git a/build/pkgs/pandocfilters/distros/opensuse.txt b/build/pkgs/pandocfilters/distros/opensuse.txt
+new file mode 100644
+index 00000000..d0d4c24
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-pandocfilters
+diff --git a/build/pkgs/pluggy/distros/opensuse.txt b/build/pkgs/pluggy/distros/opensuse.txt
+new file mode 100644
+index 00000000..43a3acf
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-pluggy
+diff --git a/build/pkgs/py/distros/opensuse.txt b/build/pkgs/py/distros/opensuse.txt
+new file mode 100644
+index 00000000..81fefe6
+--- /dev/null
++++ b/build/pkgs/py/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-py
+diff --git a/build/pkgs/pygments/distros/opensuse.txt b/build/pkgs/pygments/distros/opensuse.txt
+index 9ff5740..3ab3792 100644
+--- a/build/pkgs/pygments/distros/opensuse.txt
++++ b/build/pkgs/pygments/distros/opensuse.txt
+@@ -1 +1 @@
+-python3-Pygments
++python3-pygments
+diff --git a/build/pkgs/sympy/distros/opensuse.txt b/build/pkgs/sympy/distros/opensuse.txt
+new file mode 100644
+index 00000000..db423c8
+--- /dev/null
++++ b/build/pkgs/sympy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-sympy
+diff --git a/build/pkgs/texttable/distros/opensuse.txt b/build/pkgs/texttable/distros/opensuse.txt
+new file mode 100644
+index 00000000..8f8e7e2
+--- /dev/null
++++ b/build/pkgs/texttable/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-texttable
+diff --git a/build/pkgs/toml/distros/opensuse.txt b/build/pkgs/toml/distros/opensuse.txt
+new file mode 100644
+index 00000000..543e89d
+--- /dev/null
++++ b/build/pkgs/toml/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-toml
+-- 
+cgit v1.0-1-gd88e
+
+
+From a480ba7ace1370d106ae831e904ea22b72af1be7 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 22:45:04 -0700
+Subject: build/pkgs: Add distros/debian.txt for Python packages
+
+---
+ build/pkgs/babel/distros/debian.txt         | 1 +
+ build/pkgs/bleach/distros/debian.txt        | 1 +
+ build/pkgs/certifi/distros/debian.txt       | 1 +
+ build/pkgs/cvxopt/distros/debian.txt        | 1 +
+ build/pkgs/decorator/distros/debian.txt     | 1 +
+ build/pkgs/html5lib/distros/debian.txt      | 1 +
+ build/pkgs/idna/distros/debian.txt          | 1 +
+ build/pkgs/jinja2/distros/debian.txt        | 1 +
+ build/pkgs/matplotlib/distros/debian.txt    | 1 +
+ build/pkgs/mpmath/distros/debian.txt        | 1 +
+ build/pkgs/networkx/distros/debian.txt      | 1 +
+ build/pkgs/numpy/distros/debian.txt         | 1 +
+ build/pkgs/packaging/distros/debian.txt     | 1 +
+ build/pkgs/pandocfilters/distros/debian.txt | 1 +
+ build/pkgs/pickleshare/distros/debian.txt   | 1 +
+ build/pkgs/pillow/distros/debian.txt        | 1 +
+ build/pkgs/pluggy/distros/debian.txt        | 1 +
+ build/pkgs/py/distros/debian.txt            | 1 +
+ build/pkgs/pygments/distros/debian.txt      | 1 +
+ build/pkgs/pytz/distros/debian.txt          | 1 +
+ build/pkgs/requests/distros/debian.txt      | 1 +
+ build/pkgs/scipy/distros/debian.txt         | 1 +
+ build/pkgs/setuptools/distros/debian.txt    | 1 +
+ build/pkgs/six/distros/debian.txt           | 1 +
+ build/pkgs/sympy/distros/debian.txt         | 1 +
+ build/pkgs/texttable/distros/debian.txt     | 1 +
+ build/pkgs/toml/distros/debian.txt          | 1 +
+ build/pkgs/webencodings/distros/debian.txt  | 1 +
+ build/pkgs/wheel/distros/debian.txt         | 1 +
+ 29 files changed, 29 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/debian.txt
+ create mode 100644 build/pkgs/bleach/distros/debian.txt
+ create mode 100644 build/pkgs/certifi/distros/debian.txt
+ create mode 100644 build/pkgs/cvxopt/distros/debian.txt
+ create mode 100644 build/pkgs/decorator/distros/debian.txt
+ create mode 100644 build/pkgs/html5lib/distros/debian.txt
+ create mode 100644 build/pkgs/idna/distros/debian.txt
+ create mode 100644 build/pkgs/jinja2/distros/debian.txt
+ create mode 100644 build/pkgs/matplotlib/distros/debian.txt
+ create mode 100644 build/pkgs/mpmath/distros/debian.txt
+ create mode 100644 build/pkgs/networkx/distros/debian.txt
+ create mode 100644 build/pkgs/numpy/distros/debian.txt
+ create mode 100644 build/pkgs/packaging/distros/debian.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/debian.txt
+ create mode 100644 build/pkgs/pickleshare/distros/debian.txt
+ create mode 100644 build/pkgs/pillow/distros/debian.txt
+ create mode 100644 build/pkgs/pluggy/distros/debian.txt
+ create mode 100644 build/pkgs/py/distros/debian.txt
+ create mode 100644 build/pkgs/pygments/distros/debian.txt
+ create mode 100644 build/pkgs/pytz/distros/debian.txt
+ create mode 100644 build/pkgs/requests/distros/debian.txt
+ create mode 100644 build/pkgs/scipy/distros/debian.txt
+ create mode 100644 build/pkgs/setuptools/distros/debian.txt
+ create mode 100644 build/pkgs/six/distros/debian.txt
+ create mode 100644 build/pkgs/sympy/distros/debian.txt
+ create mode 100644 build/pkgs/texttable/distros/debian.txt
+ create mode 100644 build/pkgs/toml/distros/debian.txt
+ create mode 100644 build/pkgs/webencodings/distros/debian.txt
+ create mode 100644 build/pkgs/wheel/distros/debian.txt
+
+diff --git a/build/pkgs/babel/distros/debian.txt b/build/pkgs/babel/distros/debian.txt
+new file mode 100644
+index 00000000..e623eb6
+--- /dev/null
++++ b/build/pkgs/babel/distros/debian.txt
+@@ -0,0 +1 @@
++python3-babel
+diff --git a/build/pkgs/bleach/distros/debian.txt b/build/pkgs/bleach/distros/debian.txt
+new file mode 100644
+index 00000000..6d37c4c
+--- /dev/null
++++ b/build/pkgs/bleach/distros/debian.txt
+@@ -0,0 +1 @@
++python3-bleach
+diff --git a/build/pkgs/certifi/distros/debian.txt b/build/pkgs/certifi/distros/debian.txt
+new file mode 100644
+index 00000000..f585a82
+--- /dev/null
++++ b/build/pkgs/certifi/distros/debian.txt
+@@ -0,0 +1 @@
++python3-certifi
+diff --git a/build/pkgs/cvxopt/distros/debian.txt b/build/pkgs/cvxopt/distros/debian.txt
+new file mode 100644
+index 00000000..2bb6ad1
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/debian.txt
+@@ -0,0 +1 @@
++python3-cvxopt
+diff --git a/build/pkgs/decorator/distros/debian.txt b/build/pkgs/decorator/distros/debian.txt
+new file mode 100644
+index 00000000..46c478e
+--- /dev/null
++++ b/build/pkgs/decorator/distros/debian.txt
+@@ -0,0 +1 @@
++python3-decorator
+diff --git a/build/pkgs/html5lib/distros/debian.txt b/build/pkgs/html5lib/distros/debian.txt
+new file mode 100644
+index 00000000..6d7b8df
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/debian.txt
+@@ -0,0 +1 @@
++python3-html5lib
+diff --git a/build/pkgs/idna/distros/debian.txt b/build/pkgs/idna/distros/debian.txt
+new file mode 100644
+index 00000000..de48e70
+--- /dev/null
++++ b/build/pkgs/idna/distros/debian.txt
+@@ -0,0 +1 @@
++python3-idna
+diff --git a/build/pkgs/jinja2/distros/debian.txt b/build/pkgs/jinja2/distros/debian.txt
+new file mode 100644
+index 00000000..f2db865
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/debian.txt
+@@ -0,0 +1 @@
++python3-jinja2
+diff --git a/build/pkgs/matplotlib/distros/debian.txt b/build/pkgs/matplotlib/distros/debian.txt
+new file mode 100644
+index 00000000..1374329
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/debian.txt
+@@ -0,0 +1 @@
++python3-matplotlib
+diff --git a/build/pkgs/mpmath/distros/debian.txt b/build/pkgs/mpmath/distros/debian.txt
+new file mode 100644
+index 00000000..fbc82a9
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/debian.txt
+@@ -0,0 +1 @@
++python3-mpmath
+diff --git a/build/pkgs/networkx/distros/debian.txt b/build/pkgs/networkx/distros/debian.txt
+new file mode 100644
+index 00000000..6779066
+--- /dev/null
++++ b/build/pkgs/networkx/distros/debian.txt
+@@ -0,0 +1 @@
++python3-networkx
+diff --git a/build/pkgs/numpy/distros/debian.txt b/build/pkgs/numpy/distros/debian.txt
+new file mode 100644
+index 00000000..79d5c5a
+--- /dev/null
++++ b/build/pkgs/numpy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-numpy
+diff --git a/build/pkgs/packaging/distros/debian.txt b/build/pkgs/packaging/distros/debian.txt
+new file mode 100644
+index 00000000..8f1c0ff
+--- /dev/null
++++ b/build/pkgs/packaging/distros/debian.txt
+@@ -0,0 +1 @@
++python3-packaging
+diff --git a/build/pkgs/pandocfilters/distros/debian.txt b/build/pkgs/pandocfilters/distros/debian.txt
+new file mode 100644
+index 00000000..d0d4c24
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/debian.txt b/build/pkgs/pickleshare/distros/debian.txt
+new file mode 100644
+index 00000000..a00907d
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pickleshare
+diff --git a/build/pkgs/pillow/distros/debian.txt b/build/pkgs/pillow/distros/debian.txt
+new file mode 100644
+index 00000000..3319fcd
+--- /dev/null
++++ b/build/pkgs/pillow/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pillow
+diff --git a/build/pkgs/pluggy/distros/debian.txt b/build/pkgs/pluggy/distros/debian.txt
+new file mode 100644
+index 00000000..43a3acf
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pluggy
+diff --git a/build/pkgs/py/distros/debian.txt b/build/pkgs/py/distros/debian.txt
+new file mode 100644
+index 00000000..81fefe6
+--- /dev/null
++++ b/build/pkgs/py/distros/debian.txt
+@@ -0,0 +1 @@
++python3-py
+diff --git a/build/pkgs/pygments/distros/debian.txt b/build/pkgs/pygments/distros/debian.txt
+new file mode 100644
+index 00000000..3ab3792
+--- /dev/null
++++ b/build/pkgs/pygments/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pygments
+diff --git a/build/pkgs/pytz/distros/debian.txt b/build/pkgs/pytz/distros/debian.txt
+new file mode 100644
+index 00000000..db20908
+--- /dev/null
++++ b/build/pkgs/pytz/distros/debian.txt
+@@ -0,0 +1 @@
++python3-tz
+diff --git a/build/pkgs/requests/distros/debian.txt b/build/pkgs/requests/distros/debian.txt
+new file mode 100644
+index 00000000..43147b2
+--- /dev/null
++++ b/build/pkgs/requests/distros/debian.txt
+@@ -0,0 +1 @@
++python3-requests
+diff --git a/build/pkgs/scipy/distros/debian.txt b/build/pkgs/scipy/distros/debian.txt
+new file mode 100644
+index 00000000..12b3666
+--- /dev/null
++++ b/build/pkgs/scipy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-scipy
+diff --git a/build/pkgs/setuptools/distros/debian.txt b/build/pkgs/setuptools/distros/debian.txt
+new file mode 100644
+index 00000000..1c0901c
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/debian.txt
+@@ -0,0 +1 @@
++python3-setuptools
+diff --git a/build/pkgs/six/distros/debian.txt b/build/pkgs/six/distros/debian.txt
+new file mode 100644
+index 00000000..68ff859
+--- /dev/null
++++ b/build/pkgs/six/distros/debian.txt
+@@ -0,0 +1 @@
++python3-six
+diff --git a/build/pkgs/sympy/distros/debian.txt b/build/pkgs/sympy/distros/debian.txt
+new file mode 100644
+index 00000000..db423c8
+--- /dev/null
++++ b/build/pkgs/sympy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-sympy
+diff --git a/build/pkgs/texttable/distros/debian.txt b/build/pkgs/texttable/distros/debian.txt
+new file mode 100644
+index 00000000..8f8e7e2
+--- /dev/null
++++ b/build/pkgs/texttable/distros/debian.txt
+@@ -0,0 +1 @@
++python3-texttable
+diff --git a/build/pkgs/toml/distros/debian.txt b/build/pkgs/toml/distros/debian.txt
+new file mode 100644
+index 00000000..543e89d
+--- /dev/null
++++ b/build/pkgs/toml/distros/debian.txt
+@@ -0,0 +1 @@
++python3-toml
+diff --git a/build/pkgs/webencodings/distros/debian.txt b/build/pkgs/webencodings/distros/debian.txt
+new file mode 100644
+index 00000000..ac30c2f
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/debian.txt
+@@ -0,0 +1 @@
++python3-webencodings
+diff --git a/build/pkgs/wheel/distros/debian.txt b/build/pkgs/wheel/distros/debian.txt
+new file mode 100644
+index 00000000..3c066725
+--- /dev/null
++++ b/build/pkgs/wheel/distros/debian.txt
+@@ -0,0 +1 @@
++python3-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 93bf30d7de292551c3050e2dd74651d69ba4bd46 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 18 Oct 2021 07:50:34 -0400
+Subject: Trac #29665: add more documentation for SAGE_PYTHON_PACKAGE_CHECK().
+
+An earlier commit allows SAGE_PYTHON_PACKAGE_CHECK(package) to tweak the
+value of sage_use_system_$package if --enable-system-site-packages was
+not used. This essentially changes the default --with-system-$package=yes
+to "no" in that case. Here we update the documentation to reflect it.
+---
+ m4/sage_python_package_check.m4 | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 7ee82a7..95eefd0 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -34,6 +34,10 @@
+ #   ensure that the ./configure- and run-time views of the system
+ #   are as similar as possible.
+ #
++#   To avoid suggesting these system packages to users who have not
++#   set --enable-system-site-packages, this macro also changes the
++#   default for --with-system-foo from "yes" to "no" in that case.
++#
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
+-- 
+cgit v1.0-1-gd88e
+
+
+From d771e49d57ecdf3622434bc09cbfb87ad3bb7744 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 18 Oct 2021 07:42:46 -0400
+Subject: Trac #29665: improve SAGE_PYTHON_PACKAGE_CHECK() failure message.
+
+When --enable-system-site-packages is off, SAGE_PYTHON_PACKAGE_CHECK()
+will always install the corresponding SPKG. We improve the ./configure
+output in that case to make it clear that the decision was based on
+the value of --enable-system-site-packages and not the "real" check.
+---
+ m4/sage_python_package_check.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 95eefd0..5f0f084 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -40,7 +40,9 @@
+ #
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
++  AC_MSG_CHECKING([if --enable-system-site-packages was used])
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
++    AC_MSG_RESULT(yes)
+     AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
+ 
+     dnl We run this check inside a python venv, because that's ultimately
+@@ -94,6 +96,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
+     dnl System site packages are disabled.
++    AC_MSG_RESULT(no; skipping check)
+     sage_spkg_install_$1=yes
+ 
+     dnl We have to retroactively hack the --with-system-foo={no,yes,force}
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5bb43c1b78a1deb3364f235305937c2f823e5e18 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 24 Oct 2021 20:29:25 -0400
+Subject: Trac #29665: use sage-venv in SAGE_PYTHON_PACKAGE_CHECK().
+
+For consistency with the rest of the build system, we now use the
+build/bin/sage-venv script to create the venv in this autoconf macro
+rather than invoking $PYTHON_FOR_VENV with "-m venv" directly.
+---
+ m4/sage_python_package_check.m4 | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 5f0f084..5547b35 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -50,11 +50,11 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AC_MSG_CHECKING([if we can create a python venv in config.venv])
+ 
+     dnl Use --clear because ./configure typically clobbers its output files.
+-    AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
+-                                        --clear                dnl
+-                                        --without-pip          dnl
+-                                        config.venv            dnl
+-                                        2>&AS_MESSAGE_LOG_FD], [
++    AS_IF(["${PYTHON_FOR_VENV}" build/bin/sage-venv      dnl
++                                  --system-site-packages dnl
++                                  --clear                dnl
++                                  config.venv            dnl
++                                  2>&AS_MESSAGE_LOG_FD], [
+       AC_MSG_RESULT(yes)
+       dnl strip all comments from install-requires.txt; this should leave
+       dnl only a single line containing the version specification for this
+-- 
+cgit v1.0-1-gd88e
+
+
+From c78363d6326addff16ca5abac897949a6be72bf4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:10:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for urllib3.
+
+---
+ build/pkgs/urllib3/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/urllib3/spkg-configure.m4
+
+diff --git a/build/pkgs/urllib3/spkg-configure.m4 b/build/pkgs/urllib3/spkg-configure.m4
+new file mode 100644
+index 00000000..d7ef3e1
+--- /dev/null
++++ b/build/pkgs/urllib3/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([urllib3], [SAGE_PYTHON_PACKAGE_CHECK([urllib3])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f416d5abcae495ea8301fad024b279ea9e997b29 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:15:18 -0400
+Subject: Trac #29665: add Gentoo package information for urllib3.
+
+---
+ build/pkgs/urllib3/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/urllib3/distros/gentoo.txt
+
+diff --git a/build/pkgs/urllib3/distros/gentoo.txt b/build/pkgs/urllib3/distros/gentoo.txt
+new file mode 100644
+index 00000000..172a535
+--- /dev/null
++++ b/build/pkgs/urllib3/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/urllib3
+-- 
+cgit v1.0-1-gd88e
+
+
+From 852068b992bf7959500c650f54cb92e5b68d7ef8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:15:58 -0400
+Subject: Trac #29665: add Gentoo package information for nbformat.
+
+---
+ build/pkgs/nbformat/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbformat/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbformat/distros/gentoo.txt b/build/pkgs/nbformat/distros/gentoo.txt
+new file mode 100644
+index 00000000..006b1f2
+--- /dev/null
++++ b/build/pkgs/nbformat/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbformat
+-- 
+cgit v1.0-1-gd88e
+
+
+From 66179fd28fcc92ee840dcd87bb4db25cea968d66 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:34:16 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for nbformat.
+
+---
+ build/pkgs/nbformat/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbformat/spkg-configure.m4
+
+diff --git a/build/pkgs/nbformat/spkg-configure.m4 b/build/pkgs/nbformat/spkg-configure.m4
+new file mode 100644
+index 00000000..5a7f8c4
+--- /dev/null
++++ b/build/pkgs/nbformat/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbformat], [SAGE_PYTHON_PACKAGE_CHECK([nbformat])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 874005e81ed20f27a5f895030dcdbdfc5f73ad80 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:47:01 -0400
+Subject: Trac #29665: add Gentoo package information for zipp.
+
+---
+ build/pkgs/zipp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/zipp/distros/gentoo.txt
+
+diff --git a/build/pkgs/zipp/distros/gentoo.txt b/build/pkgs/zipp/distros/gentoo.txt
+new file mode 100644
+index 00000000..7f59450
+--- /dev/null
++++ b/build/pkgs/zipp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/zipp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0cc2a7355b5554c1fb79c742ebf02eff54465b3e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:47:35 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for zipp.
+
+---
+ build/pkgs/zipp/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/zipp/spkg-configure.m4
+
+diff --git a/build/pkgs/zipp/spkg-configure.m4 b/build/pkgs/zipp/spkg-configure.m4
+new file mode 100644
+index 00000000..0fe3a9c
+--- /dev/null
++++ b/build/pkgs/zipp/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([zipp], [SAGE_PYTHON_PACKAGE_CHECK([zipp])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6073ad8e56c21fc862749bbd84a56d543fb9458c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:48:37 -0400
+Subject: Trac #29665: add Gentoo package information for wcwidth.
+
+---
+ build/pkgs/wcwidth/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wcwidth/distros/gentoo.txt
+
+diff --git a/build/pkgs/wcwidth/distros/gentoo.txt b/build/pkgs/wcwidth/distros/gentoo.txt
+new file mode 100644
+index 00000000..edeb80b
+--- /dev/null
++++ b/build/pkgs/wcwidth/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/wcwidth
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9793d6172c64d61a015fbe61bd45863759124fad Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:51:10 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for wcwidth.
+
+---
+ build/pkgs/wcwidth/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wcwidth/spkg-configure.m4
+
+diff --git a/build/pkgs/wcwidth/spkg-configure.m4 b/build/pkgs/wcwidth/spkg-configure.m4
+new file mode 100644
+index 00000000..5bde15a
+--- /dev/null
++++ b/build/pkgs/wcwidth/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([wcwidth], [SAGE_PYTHON_PACKAGE_CHECK([wcwidth])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20232f370a43c146ca4e696c72a2cbcc498db060 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:52:36 -0400
+Subject: Trac #29665: add Gentoo package information for testpath.
+
+---
+ build/pkgs/testpath/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/testpath/distros/gentoo.txt
+
+diff --git a/build/pkgs/testpath/distros/gentoo.txt b/build/pkgs/testpath/distros/gentoo.txt
+new file mode 100644
+index 00000000..efa10a0
+--- /dev/null
++++ b/build/pkgs/testpath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/testpath
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1b0785b2aad8844e74345fe950baf097e2b43d24 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:55:22 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for testpath.
+
+---
+ build/pkgs/testpath/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/testpath/spkg-configure.m4
+
+diff --git a/build/pkgs/testpath/spkg-configure.m4 b/build/pkgs/testpath/spkg-configure.m4
+new file mode 100644
+index 00000000..d8fc2a7
+--- /dev/null
++++ b/build/pkgs/testpath/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([testpath], [SAGE_PYTHON_PACKAGE_CHECK([testpath])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 10fc3829ecd956d732b1b069fdfe81f0d6d5cdc2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:56:06 -0400
+Subject: Trac #29665: add Gentoo package information for jedi.
+
+---
+ build/pkgs/jedi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jedi/distros/gentoo.txt
+
+diff --git a/build/pkgs/jedi/distros/gentoo.txt b/build/pkgs/jedi/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c85a46
+--- /dev/null
++++ b/build/pkgs/jedi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jedi
+-- 
+cgit v1.0-1-gd88e
+
+
+From a75824d74c281c7639028ca01dabeed266f56998 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:06:37 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for jedi.
+
+---
+ build/pkgs/jedi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jedi/spkg-configure.m4
+
+diff --git a/build/pkgs/jedi/spkg-configure.m4 b/build/pkgs/jedi/spkg-configure.m4
+new file mode 100644
+index 00000000..a37dbcc
+--- /dev/null
++++ b/build/pkgs/jedi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jedi], [SAGE_PYTHON_PACKAGE_CHECK([jedi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 17af01373d43f6acbbdbc23e073e372d3fdadf8b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:07:47 -0400
+Subject: Trac #29665: add Gentoo package information for tomli.
+
+---
+ build/pkgs/tomli/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tomli/distros/gentoo.txt
+
+diff --git a/build/pkgs/tomli/distros/gentoo.txt b/build/pkgs/tomli/distros/gentoo.txt
+new file mode 100644
+index 00000000..0458e25
+--- /dev/null
++++ b/build/pkgs/tomli/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/tomli
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0d3b5994ae612be11992467c4a3f1a74b81400fe Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:08:12 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for tomli.
+
+---
+ build/pkgs/tomli/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tomli/spkg-configure.m4
+
+diff --git a/build/pkgs/tomli/spkg-configure.m4 b/build/pkgs/tomli/spkg-configure.m4
+new file mode 100644
+index 00000000..95a8b8b
+--- /dev/null
++++ b/build/pkgs/tomli/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tomli], [SAGE_PYTHON_PACKAGE_CHECK([tomli])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From dce1c515781b0eeb8eb9c2bc7aba581560c1fac1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:09:22 -0400
+Subject: Trac #29665: add Gentoo package information for defusedxml.
+
+---
+ build/pkgs/defusedxml/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/defusedxml/distros/gentoo.txt
+
+diff --git a/build/pkgs/defusedxml/distros/gentoo.txt b/build/pkgs/defusedxml/distros/gentoo.txt
+new file mode 100644
+index 00000000..2804214
+--- /dev/null
++++ b/build/pkgs/defusedxml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/defusedxml
+-- 
+cgit v1.0-1-gd88e
+
+
+From 02e1e1cd7f8bdae3ca5b7d35ce70af28a44e9b7c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:11:14 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for defusedxml.
+
+---
+ build/pkgs/defusedxml/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/defusedxml/spkg-configure.m4
+
+diff --git a/build/pkgs/defusedxml/spkg-configure.m4 b/build/pkgs/defusedxml/spkg-configure.m4
+new file mode 100644
+index 00000000..e02f345
+--- /dev/null
++++ b/build/pkgs/defusedxml/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([defusedxml], [SAGE_PYTHON_PACKAGE_CHECK([defusedxml])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e0ba4ebb5cfc637b5d26b85de9f34e0a160d2b9c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:12:22 -0400
+Subject: Trac #29665: add Gentoo package information for ipywidgets.
+
+---
+ build/pkgs/ipywidgets/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipywidgets/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipywidgets/distros/gentoo.txt b/build/pkgs/ipywidgets/distros/gentoo.txt
+new file mode 100644
+index 00000000..7c76967
+--- /dev/null
++++ b/build/pkgs/ipywidgets/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipywidgets
+-- 
+cgit v1.0-1-gd88e
+
+
+From 49df7e7d93c7a31b7c46d5d224a35fd313a29a32 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:15:53 -0400
+Subject: Trac #29665: add Gentoo package information for simplegeneric.
+
+---
+ build/pkgs/simplegeneric/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/simplegeneric/distros/gentoo.txt
+
+diff --git a/build/pkgs/simplegeneric/distros/gentoo.txt b/build/pkgs/simplegeneric/distros/gentoo.txt
+new file mode 100644
+index 00000000..a86e90d
+--- /dev/null
++++ b/build/pkgs/simplegeneric/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/simplegeneric
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2a893635d5804749e6fec7ed7289c921ecb5300a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:16:33 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for simplegeneric.
+
+---
+ build/pkgs/simplegeneric/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/simplegeneric/spkg-configure.m4
+
+diff --git a/build/pkgs/simplegeneric/spkg-configure.m4 b/build/pkgs/simplegeneric/spkg-configure.m4
+new file mode 100644
+index 00000000..13715ab
+--- /dev/null
++++ b/build/pkgs/simplegeneric/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([simplegeneric], [SAGE_PYTHON_PACKAGE_CHECK([simplegeneric])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a8fe7ecd6e3163e7d01261e5497ac452a8cc95ab Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:17:18 -0400
+Subject: Trac #29665: add Gentoo package information for imagesize.
+
+---
+ build/pkgs/imagesize/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/imagesize/distros/gentoo.txt
+
+diff --git a/build/pkgs/imagesize/distros/gentoo.txt b/build/pkgs/imagesize/distros/gentoo.txt
+new file mode 100644
+index 00000000..54350ba
+--- /dev/null
++++ b/build/pkgs/imagesize/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/imagesize
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2ad837c5dd1fca0f50ce6d5042a9344210a54f84 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:17:48 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for imagesize.
+
+---
+ build/pkgs/imagesize/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/imagesize/spkg-configure.m4
+
+diff --git a/build/pkgs/imagesize/spkg-configure.m4 b/build/pkgs/imagesize/spkg-configure.m4
+new file mode 100644
+index 00000000..20210ef
+--- /dev/null
++++ b/build/pkgs/imagesize/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([imagesize], [SAGE_PYTHON_PACKAGE_CHECK([imagesize])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bf47415b5bfca2d7bf24e20de35662bf331623b9 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:18:49 -0400
+Subject: Trac #29665: add Gentoo package information for mistune.
+
+---
+ build/pkgs/mistune/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mistune/distros/gentoo.txt
+
+diff --git a/build/pkgs/mistune/distros/gentoo.txt b/build/pkgs/mistune/distros/gentoo.txt
+new file mode 100644
+index 00000000..56f0a4e
+--- /dev/null
++++ b/build/pkgs/mistune/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/mistune
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6898a74fd0c65a40c5220ba68b4062ac6fe060c6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:21:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for mistune.
+
+---
+ build/pkgs/mistune/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mistune/spkg-configure.m4
+
+diff --git a/build/pkgs/mistune/spkg-configure.m4 b/build/pkgs/mistune/spkg-configure.m4
+new file mode 100644
+index 00000000..972f33d
+--- /dev/null
++++ b/build/pkgs/mistune/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([mistune], [SAGE_PYTHON_PACKAGE_CHECK([mistune])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 62735e4ccf2031cd39eb5e04b03bdfd97005d808 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:22:48 -0400
+Subject: Trac #29665: add Gentoo package information for backcall.
+
+---
+ build/pkgs/backcall/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/backcall/distros/gentoo.txt
+
+diff --git a/build/pkgs/backcall/distros/gentoo.txt b/build/pkgs/backcall/distros/gentoo.txt
+new file mode 100644
+index 00000000..266a222
+--- /dev/null
++++ b/build/pkgs/backcall/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/backcall
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9ef3ea42d4a33c7cdb623fa5417ae300cf323183 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:25:10 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for backcall.
+
+---
+ build/pkgs/backcall/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/backcall/spkg-configure.m4
+
+diff --git a/build/pkgs/backcall/spkg-configure.m4 b/build/pkgs/backcall/spkg-configure.m4
+new file mode 100644
+index 00000000..d6b11c4
+--- /dev/null
++++ b/build/pkgs/backcall/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([backcall], [SAGE_PYTHON_PACKAGE_CHECK([backcall])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1b3ea2a3c40fea0fb58435f5e5304368ea58dff8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:25:58 -0400
+Subject: Trac #29665: add Gentoo package information for parso.
+
+---
+ build/pkgs/parso/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/parso/distros/gentoo.txt
+
+diff --git a/build/pkgs/parso/distros/gentoo.txt b/build/pkgs/parso/distros/gentoo.txt
+new file mode 100644
+index 00000000..f9ce4c7
+--- /dev/null
++++ b/build/pkgs/parso/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/parso
+-- 
+cgit v1.0-1-gd88e
+
+
+From 963a3a2c563ec71a1f5be2395722d0e824cb0b11 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:26:22 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for parso.
+
+---
+ build/pkgs/parso/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/parso/spkg-configure.m4
+
+diff --git a/build/pkgs/parso/spkg-configure.m4 b/build/pkgs/parso/spkg-configure.m4
+new file mode 100644
+index 00000000..1ca6f1b
+--- /dev/null
++++ b/build/pkgs/parso/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([parso], [SAGE_PYTHON_PACKAGE_CHECK([parso])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 943053dfc474b6549bcc7d6ef2971ea43588b35c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:27:00 -0400
+Subject: Trac #29665: add Gentoo package information for pyparsing.
+
+---
+ build/pkgs/pyparsing/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyparsing/distros/gentoo.txt
+
+diff --git a/build/pkgs/pyparsing/distros/gentoo.txt b/build/pkgs/pyparsing/distros/gentoo.txt
+new file mode 100644
+index 00000000..ef0419f
+--- /dev/null
++++ b/build/pkgs/pyparsing/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyparsing
+-- 
+cgit v1.0-1-gd88e
+
+
+From bd682eaa2ac41dd84e7a52e2b0c5442fc8fd8919 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:27:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pyparsing.
+
+---
+ build/pkgs/pyparsing/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyparsing/spkg-configure.m4
+
+diff --git a/build/pkgs/pyparsing/spkg-configure.m4 b/build/pkgs/pyparsing/spkg-configure.m4
+new file mode 100644
+index 00000000..d2b4c00
+--- /dev/null
++++ b/build/pkgs/pyparsing/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pyparsing], [SAGE_PYTHON_PACKAGE_CHECK([pyparsing])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 74f36a9c0ec7c63b7e6c40066e42f4b15c2f978e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:17:42 -0400
+Subject: Trac #29665: add Gentoo package information for debugpy.
+
+---
+ build/pkgs/debugpy/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/debugpy/distros/gentoo.txt
+
+diff --git a/build/pkgs/debugpy/distros/gentoo.txt b/build/pkgs/debugpy/distros/gentoo.txt
+new file mode 100644
+index 00000000..8b797ce
+--- /dev/null
++++ b/build/pkgs/debugpy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/debugpy
+-- 
+cgit v1.0-1-gd88e
+
+
+From be072fa87ac5c373d9dc9b54c0bd68734d5709bc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:21:17 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for debugpy.
+
+---
+ build/pkgs/debugpy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/debugpy/spkg-configure.m4
+
+diff --git a/build/pkgs/debugpy/spkg-configure.m4 b/build/pkgs/debugpy/spkg-configure.m4
+new file mode 100644
+index 00000000..db605ff
+--- /dev/null
++++ b/build/pkgs/debugpy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([debugpy], [SAGE_PYTHON_PACKAGE_CHECK([debugpy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6f777ce2f2e14b94e91c8b7bbac82f9017460aba Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:23:56 -0400
+Subject: Trac #29665: add Gentoo package information for tzlocal.
+
+---
+ build/pkgs/tzlocal/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tzlocal/distros/gentoo.txt
+
+diff --git a/build/pkgs/tzlocal/distros/gentoo.txt b/build/pkgs/tzlocal/distros/gentoo.txt
+new file mode 100644
+index 00000000..2018442
+--- /dev/null
++++ b/build/pkgs/tzlocal/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/tzlocal
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3bd078fc15ae13982249452711baafae91038191 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:24:51 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for tzlocal.
+
+---
+ build/pkgs/tzlocal/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tzlocal/spkg-configure.m4
+
+diff --git a/build/pkgs/tzlocal/spkg-configure.m4 b/build/pkgs/tzlocal/spkg-configure.m4
+new file mode 100644
+index 00000000..e020b28
+--- /dev/null
++++ b/build/pkgs/tzlocal/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tzlocal], [SAGE_PYTHON_PACKAGE_CHECK([tzlocal])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 91b0882fc62214923da9ee7b6dccb05d8a1d11d1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:26:13 -0400
+Subject: Trac #29665: add Gentoo package information for pycparser.
+
+---
+ build/pkgs/pycparser/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pycparser/distros/gentoo.txt
+
+diff --git a/build/pkgs/pycparser/distros/gentoo.txt b/build/pkgs/pycparser/distros/gentoo.txt
+new file mode 100644
+index 00000000..5e87307
+--- /dev/null
++++ b/build/pkgs/pycparser/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pycparser
+-- 
+cgit v1.0-1-gd88e
+
+
+From beabde92fe6e057faf516fe82d27f1e903e55ce6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:27:27 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pycparser.
+
+---
+ build/pkgs/pycparser/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pycparser/spkg-configure.m4
+
+diff --git a/build/pkgs/pycparser/spkg-configure.m4 b/build/pkgs/pycparser/spkg-configure.m4
+new file mode 100644
+index 00000000..4b9b900
+--- /dev/null
++++ b/build/pkgs/pycparser/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pycparser], [SAGE_PYTHON_PACKAGE_CHECK([pycparser])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 86c2788dc7fd1169314e9598c91fa81045553677 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:29:36 -0400
+Subject: Trac #29665: add Gentoo package information for cycler.
+
+---
+ build/pkgs/cycler/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cycler/distros/gentoo.txt
+
+diff --git a/build/pkgs/cycler/distros/gentoo.txt b/build/pkgs/cycler/distros/gentoo.txt
+new file mode 100644
+index 00000000..4b21543
+--- /dev/null
++++ b/build/pkgs/cycler/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/cycler
+-- 
+cgit v1.0-1-gd88e
+
+
+From 67c5a944101ddf329f0a61c61d4e784f58a5c5b0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:30:27 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for cycler.
+
+---
+ build/pkgs/cycler/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cycler/spkg-configure.m4
+
+diff --git a/build/pkgs/cycler/spkg-configure.m4 b/build/pkgs/cycler/spkg-configure.m4
+new file mode 100644
+index 00000000..239571a
+--- /dev/null
++++ b/build/pkgs/cycler/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([cycler], [SAGE_PYTHON_PACKAGE_CHECK([cycler])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ef6d490251abfa41f7a0910274700a8a6a65f629 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:31:19 -0400
+Subject: Trac #29665: add Gentoo package information for traitlets.
+
+---
+ build/pkgs/traitlets/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/traitlets/distros/gentoo.txt
+
+diff --git a/build/pkgs/traitlets/distros/gentoo.txt b/build/pkgs/traitlets/distros/gentoo.txt
+new file mode 100644
+index 00000000..46bfaab
+--- /dev/null
++++ b/build/pkgs/traitlets/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/traitlets
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1f922b458d34088d9f6773312209e69f19ee45dc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:31:50 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for traitlets.
+
+---
+ build/pkgs/traitlets/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/traitlets/spkg-configure.m4
+
+diff --git a/build/pkgs/traitlets/spkg-configure.m4 b/build/pkgs/traitlets/spkg-configure.m4
+new file mode 100644
+index 00000000..df2382b
+--- /dev/null
++++ b/build/pkgs/traitlets/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([traitlets], [SAGE_PYTHON_PACKAGE_CHECK([traitlets])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 95b89a9ced0acb6d971a27fa63b97ea58a11f4e1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:33:35 -0400
+Subject: Trac #29665: add Gentoo package information for argcomplete.
+
+---
+ build/pkgs/argcomplete/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argcomplete/distros/gentoo.txt
+
+diff --git a/build/pkgs/argcomplete/distros/gentoo.txt b/build/pkgs/argcomplete/distros/gentoo.txt
+new file mode 100644
+index 00000000..b150949
+--- /dev/null
++++ b/build/pkgs/argcomplete/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/argcomplete
+-- 
+cgit v1.0-1-gd88e
+
+
+From b4cd8ef384e6e5bae0de0f3c113fb5f9e6e1a71e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:34:14 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for argcomplete.
+
+---
+ build/pkgs/argcomplete/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argcomplete/spkg-configure.m4
+
+diff --git a/build/pkgs/argcomplete/spkg-configure.m4 b/build/pkgs/argcomplete/spkg-configure.m4
+new file mode 100644
+index 00000000..cbd7ccf
+--- /dev/null
++++ b/build/pkgs/argcomplete/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([argcomplete], [SAGE_PYTHON_PACKAGE_CHECK([argcomplete])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4cc610e8331970cc018d7ea87af928fa73a292c1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:36:21 -0400
+Subject: Trac #29665: add Gentoo package information for ptyprocess.
+
+---
+ build/pkgs/ptyprocess/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ptyprocess/distros/gentoo.txt
+
+diff --git a/build/pkgs/ptyprocess/distros/gentoo.txt b/build/pkgs/ptyprocess/distros/gentoo.txt
+new file mode 100644
+index 00000000..571a851
+--- /dev/null
++++ b/build/pkgs/ptyprocess/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ptyprocess
+-- 
+cgit v1.0-1-gd88e
+
+
+From cd15f97221bf5933b07900e4f77cb55401eede26 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:37:02 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ptyprocess.
+
+---
+ build/pkgs/ptyprocess/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ptyprocess/spkg-configure.m4
+
+diff --git a/build/pkgs/ptyprocess/spkg-configure.m4 b/build/pkgs/ptyprocess/spkg-configure.m4
+new file mode 100644
+index 00000000..bfacbae
+--- /dev/null
++++ b/build/pkgs/ptyprocess/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ptyprocess], [SAGE_PYTHON_PACKAGE_CHECK([ptyprocess])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb5f45b15f99e4ba28e1b1f6042a0e8ea17f1dfc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:38:22 -0400
+Subject: Trac #29665: add Gentoo package information for attrs.
+
+---
+ build/pkgs/attrs/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/attrs/distros/gentoo.txt
+
+diff --git a/build/pkgs/attrs/distros/gentoo.txt b/build/pkgs/attrs/distros/gentoo.txt
+new file mode 100644
+index 00000000..3b906fa
+--- /dev/null
++++ b/build/pkgs/attrs/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/attrs
+-- 
+cgit v1.0-1-gd88e
+
+
+From 321707ebf8e9af1e4ac3a5b5b094b4226bb3a7a5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:38:55 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for attrs.
+
+---
+ build/pkgs/attrs/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/attrs/spkg-configure.m4
+
+diff --git a/build/pkgs/attrs/spkg-configure.m4 b/build/pkgs/attrs/spkg-configure.m4
+new file mode 100644
+index 00000000..ba6a9b7
+--- /dev/null
++++ b/build/pkgs/attrs/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([attrs], [SAGE_PYTHON_PACKAGE_CHECK([attrs])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 69a498a4e8854ecdfc2f1a134104983c0dcb9e32 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:40:09 -0400
+Subject: Trac #29665: add Gentoo package information for send2trash.
+
+---
+ build/pkgs/send2trash/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/send2trash/distros/gentoo.txt
+
+diff --git a/build/pkgs/send2trash/distros/gentoo.txt b/build/pkgs/send2trash/distros/gentoo.txt
+new file mode 100644
+index 00000000..a89b179
+--- /dev/null
++++ b/build/pkgs/send2trash/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/send2trash
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9baed17c84e1bdf5abd17c20766e5cd7dddc5b53 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:41:45 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for send2trash.
+
+---
+ build/pkgs/send2trash/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/send2trash/spkg-configure.m4
+
+diff --git a/build/pkgs/send2trash/spkg-configure.m4 b/build/pkgs/send2trash/spkg-configure.m4
+new file mode 100644
+index 00000000..3bbb727
+--- /dev/null
++++ b/build/pkgs/send2trash/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([send2trash], [SAGE_PYTHON_PACKAGE_CHECK([send2trash])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b9b552b2a2aaccaeb7c5b25be0b681f107522d09 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:43:27 -0400
+Subject: Trac #29665: add Gentoo package information for pyrsistent.
+
+---
+ build/pkgs/pyrsistent/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyrsistent/distros/gentoo.txt
+
+diff --git a/build/pkgs/pyrsistent/distros/gentoo.txt b/build/pkgs/pyrsistent/distros/gentoo.txt
+new file mode 100644
+index 00000000..83439ce
+--- /dev/null
++++ b/build/pkgs/pyrsistent/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyrsistent
+-- 
+cgit v1.0-1-gd88e
+
+
+From a17b31fac6104852762f57daa749443147bdf121 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:44:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pyrsistent.
+
+---
+ build/pkgs/pyrsistent/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyrsistent/spkg-configure.m4
+
+diff --git a/build/pkgs/pyrsistent/spkg-configure.m4 b/build/pkgs/pyrsistent/spkg-configure.m4
+new file mode 100644
+index 00000000..f7ca75d
+--- /dev/null
++++ b/build/pkgs/pyrsistent/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pyrsistent], [SAGE_PYTHON_PACKAGE_CHECK([pyrsistent])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 68520decad6d6937918d7a6af65ca5bd476e5d02 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:45:45 -0400
+Subject: Trac #29665: add Gentoo package information for entrypoints.
+
+---
+ build/pkgs/entrypoints/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/entrypoints/distros/gentoo.txt
+
+diff --git a/build/pkgs/entrypoints/distros/gentoo.txt b/build/pkgs/entrypoints/distros/gentoo.txt
+new file mode 100644
+index 00000000..684ddd0
+--- /dev/null
++++ b/build/pkgs/entrypoints/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/entrypoints
+-- 
+cgit v1.0-1-gd88e
+
+
+From 34213eccb642a6bad64d89acaefa83ee702cb483 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:46:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for entrypoints.
+
+---
+ build/pkgs/entrypoints/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/entrypoints/spkg-configure.m4
+
+diff --git a/build/pkgs/entrypoints/spkg-configure.m4 b/build/pkgs/entrypoints/spkg-configure.m4
+new file mode 100644
+index 00000000..caed658
+--- /dev/null
++++ b/build/pkgs/entrypoints/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([entrypoints], [SAGE_PYTHON_PACKAGE_CHECK([entrypoints])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8e985614345da1a58fcdc127a9c0ddd790f9b5d2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:48:26 -0400
+Subject: Trac #29665: add Gentoo package information for markupsafe.
+
+---
+ build/pkgs/markupsafe/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/markupsafe/distros/gentoo.txt
+
+diff --git a/build/pkgs/markupsafe/distros/gentoo.txt b/build/pkgs/markupsafe/distros/gentoo.txt
+new file mode 100644
+index 00000000..9654e35
+--- /dev/null
++++ b/build/pkgs/markupsafe/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/markupsafe
+-- 
+cgit v1.0-1-gd88e
+
+
+From d370f229ae0988856f2e0d1f6ee2df2c47169106 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:48:55 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for markupsafe.
+
+---
+ build/pkgs/markupsafe/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/markupsafe/spkg-configure.m4
+
+diff --git a/build/pkgs/markupsafe/spkg-configure.m4 b/build/pkgs/markupsafe/spkg-configure.m4
+new file mode 100644
+index 00000000..79eb8db
+--- /dev/null
++++ b/build/pkgs/markupsafe/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([markupsafe], [SAGE_PYTHON_PACKAGE_CHECK([markupsafe])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c49b285ad9e25e6bc81a7e75d461d234fdd3ea68 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:30:49 -0400
+Subject: Trac #29665: add Gentoo package information for flit_core.
+
+---
+ build/pkgs/flit_core/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/flit_core/distros/gentoo.txt
+
+diff --git a/build/pkgs/flit_core/distros/gentoo.txt b/build/pkgs/flit_core/distros/gentoo.txt
+new file mode 100644
+index 00000000..fe6bea9
+--- /dev/null
++++ b/build/pkgs/flit_core/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/flit_core
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b0ce1c4f23cd9fc4316e1eb2b9b4bde394957f3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:32:11 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for flit_core.
+
+---
+ build/pkgs/flit_core/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/flit_core/spkg-configure.m4
+
+diff --git a/build/pkgs/flit_core/spkg-configure.m4 b/build/pkgs/flit_core/spkg-configure.m4
+new file mode 100644
+index 00000000..ee67557
+--- /dev/null
++++ b/build/pkgs/flit_core/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([flit_core], [SAGE_PYTHON_PACKAGE_CHECK([flit_core])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f006c231a81428b1e1e792f889bf974f90e3c831 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:34:06 -0400
+Subject: Trac #29665: add Gentoo package information for nest_asyncio.
+
+---
+ build/pkgs/nest_asyncio/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nest_asyncio/distros/gentoo.txt
+
+diff --git a/build/pkgs/nest_asyncio/distros/gentoo.txt b/build/pkgs/nest_asyncio/distros/gentoo.txt
+new file mode 100644
+index 00000000..ab742d2
+--- /dev/null
++++ b/build/pkgs/nest_asyncio/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nest_asyncio
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4a58d0a96a84475e765a01a64f5f44c48a317e0b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:34:43 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for nest_asyncio.
+
+---
+ build/pkgs/nest_asyncio/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nest_asyncio/spkg-configure.m4
+
+diff --git a/build/pkgs/nest_asyncio/spkg-configure.m4 b/build/pkgs/nest_asyncio/spkg-configure.m4
+new file mode 100644
+index 00000000..4d81527
+--- /dev/null
++++ b/build/pkgs/nest_asyncio/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nest_asyncio], [SAGE_PYTHON_PACKAGE_CHECK([nest_asyncio])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e50af937777ea778908bc09a7a79db3dd80fdf25 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:37:02 -0400
+Subject: Trac #29665: add Gentoo package information for ipython_genutils.
+
+---
+ build/pkgs/ipython_genutils/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython_genutils/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipython_genutils/distros/gentoo.txt b/build/pkgs/ipython_genutils/distros/gentoo.txt
+new file mode 100644
+index 00000000..01bc49d
+--- /dev/null
++++ b/build/pkgs/ipython_genutils/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipython_genutils
+-- 
+cgit v1.0-1-gd88e
+
+
+From ec3c0ce9db2ba13c1a49d1bcfb7a4b249cb7ae83 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:39:20 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipython_genutils.
+
+---
+ build/pkgs/ipython_genutils/spkg-configure.m4 | 4 ++++
+ 1 file changed, 4 insertions(+)
+ create mode 100644 build/pkgs/ipython_genutils/spkg-configure.m4
+
+diff --git a/build/pkgs/ipython_genutils/spkg-configure.m4 b/build/pkgs/ipython_genutils/spkg-configure.m4
+new file mode 100644
+index 00000000..b0ba86a
+--- /dev/null
++++ b/build/pkgs/ipython_genutils/spkg-configure.m4
+@@ -0,0 +1,4 @@
++SAGE_SPKG_CONFIGURE(
++  [ipython_genutils],
++  [SAGE_PYTHON_PACKAGE_CHECK([ipython_genutils])]
++)
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5c9e2e265115e5f10d4b459a475467e30b4bddde Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:40:03 -0400
+Subject: Trac #29665: add Gentoo package information for ipython.
+
+---
+ build/pkgs/ipython/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipython/distros/gentoo.txt b/build/pkgs/ipython/distros/gentoo.txt
+new file mode 100644
+index 00000000..8b76f18
+--- /dev/null
++++ b/build/pkgs/ipython/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipython
+-- 
+cgit v1.0-1-gd88e
+
+
+From 621e707ddd040a902d7dddf0bed1de2b54ab22f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 07:37:56 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipython.
+
+---
+ build/pkgs/ipython/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython/spkg-configure.m4
+
+diff --git a/build/pkgs/ipython/spkg-configure.m4 b/build/pkgs/ipython/spkg-configure.m4
+new file mode 100644
+index 00000000..02ab89f
+--- /dev/null
++++ b/build/pkgs/ipython/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipython], [SAGE_PYTHON_PACKAGE_CHECK([ipython])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20a0613f6d441da436f3e7b8047a72bf490882bd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 07:51:11 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipywidgets.
+
+---
+ build/pkgs/ipywidgets/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipywidgets/spkg-configure.m4
+
+diff --git a/build/pkgs/ipywidgets/spkg-configure.m4 b/build/pkgs/ipywidgets/spkg-configure.m4
+new file mode 100644
+index 00000000..51ca9be
+--- /dev/null
++++ b/build/pkgs/ipywidgets/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipywidgets], [SAGE_PYTHON_PACKAGE_CHECK([ipywidgets])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 76bcd386633acc02a1a3026339d0cbd258ada04e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 10:05:16 -0400
+Subject: Trac #29665: add Gentoo package information for wheel.
+
+---
+ build/pkgs/wheel/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wheel/distros/gentoo.txt
+
+diff --git a/build/pkgs/wheel/distros/gentoo.txt b/build/pkgs/wheel/distros/gentoo.txt
+new file mode 100644
+index 00000000..ec571d5
+--- /dev/null
++++ b/build/pkgs/wheel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 96c2dd2ca7812f5333bb9d45eadb7ac408e364ce Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:51:44 -0500
+Subject: Trac #29665: add Gentoo package information for terminado.
+
+---
+ build/pkgs/terminado/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/terminado/distros/gentoo.txt
+
+diff --git a/build/pkgs/terminado/distros/gentoo.txt b/build/pkgs/terminado/distros/gentoo.txt
+new file mode 100644
+index 00000000..1df16f1
+--- /dev/null
++++ b/build/pkgs/terminado/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/terminado
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0de0f5f3d235a4339b21e37ea13c9f5e59a82e59 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:52:35 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for terminado.
+
+---
+ build/pkgs/terminado/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/terminado/spkg-configure.m4
+
+diff --git a/build/pkgs/terminado/spkg-configure.m4 b/build/pkgs/terminado/spkg-configure.m4
+new file mode 100644
+index 00000000..5defc2f
+--- /dev/null
++++ b/build/pkgs/terminado/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([terminado], [SAGE_PYTHON_PACKAGE_CHECK([terminado])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d14a745c770b02822557e7cee0a98de1cb2f3a12 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:56:15 -0500
+Subject: Trac #29665: add Gentoo package information for cffi.
+
+---
+ build/pkgs/cffi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cffi/distros/gentoo.txt
+
+diff --git a/build/pkgs/cffi/distros/gentoo.txt b/build/pkgs/cffi/distros/gentoo.txt
+new file mode 100644
+index 00000000..81eeb81
+--- /dev/null
++++ b/build/pkgs/cffi/distros/gentoo.txt
+@@ -0,0 +1 @@
++virtual/python-cffi
+-- 
+cgit v1.0-1-gd88e
+
+
+From ce393c04afc69fe050e38f780d4e117164687d80 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:57:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for cffi.
+
+---
+ build/pkgs/cffi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cffi/spkg-configure.m4
+
+diff --git a/build/pkgs/cffi/spkg-configure.m4 b/build/pkgs/cffi/spkg-configure.m4
+new file mode 100644
+index 00000000..dc81875
+--- /dev/null
++++ b/build/pkgs/cffi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([cffi], [SAGE_PYTHON_PACKAGE_CHECK([cffi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 467093315b3fdd57c8caa2f95cf99ad52b0b84fb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:57:57 -0500
+Subject: Trac #29665: add Gentoo package information for pip.
+
+---
+ build/pkgs/pip/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pip/distros/gentoo.txt
+
+diff --git a/build/pkgs/pip/distros/gentoo.txt b/build/pkgs/pip/distros/gentoo.txt
+new file mode 100644
+index 00000000..1845454
+--- /dev/null
++++ b/build/pkgs/pip/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pip[vanilla]
+-- 
+cgit v1.0-1-gd88e
+
+
+From c597fd23f9f68dabbcb7e698d0569c3e6458f6d1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 09:07:26 -0500
+Subject: Trac #29665: new spkg-configure.m4 for pip.
+
+---
+ build/pkgs/pip/spkg-configure.m4 | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+ create mode 100644 build/pkgs/pip/spkg-configure.m4
+
+diff --git a/build/pkgs/pip/spkg-configure.m4 b/build/pkgs/pip/spkg-configure.m4
+new file mode 100644
+index 00000000..c7a5562
+--- /dev/null
++++ b/build/pkgs/pip/spkg-configure.m4
+@@ -0,0 +1,12 @@
++SAGE_SPKG_CONFIGURE([pip], [
++  dnl always run this macro because it changes the default value of
++  dnl the --with-system-<package> option.
++  SAGE_PYTHON_PACKAGE_CHECK([pip])
++
++  dnl if we might not install the spkg, make sure that "pip" is in
++  dnl the user's PATH, too.
++  AS_IF([test "x$sage_spkg_install_pip" != "xyes"], [
++    AC_CHECK_PROG(HAVE_PIP, pip, yes, no)
++    AS_IF([test "x$HAVE_PIP" = "xno"], [sage_spkg_install_pip=yes])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ef8f1e807bc55d7b8321777486fa867a7c135419 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 9 Nov 2021 09:09:04 -0500
+Subject: Trac #29665: set $SAGE_PIP_INSTALL_FLAGS for
+ --enable-system-site-packages.
+
+We need to pass some special flags to "pip install" to make it do the
+right thing in the precence of system-site packages. Here we introduce
+a new autoconf variable, SAGE_PIP_INSTALL_FLAGS, that will be used
+to pass those flags to the build system.
+
+With autoconf aware of the variable, we substitute its value into the
+sage-build-env-config script for use in spkg-install.in.
+---
+ build/bin/sage-build-env-config.in | 1 +
+ configure.ac                       | 9 +++++++++
+ 2 files changed, 10 insertions(+)
+
+diff --git a/build/bin/sage-build-env-config.in b/build/bin/sage-build-env-config.in
+index 92e7dad..ad62e5f 100644
+--- a/build/bin/sage-build-env-config.in
++++ b/build/bin/sage-build-env-config.in
+@@ -53,6 +53,7 @@ export SAGE_PARI_CFG="@SAGE_PARI_CFG@"
+ 
+ export SAGE_GLPK_PREFIX="@SAGE_GLPK_PREFIX@"
+ export SAGE_FREETYPE_PREFIX="@SAGE_FREETYPE_PREFIX@"
++export SAGE_PIP_INSTALL_FLAGS="@SAGE_PIP_INSTALL_FLAGS@"
+ export SAGE_SUITESPARSE_PREFIX="@SAGE_SUITESPARSE_PREFIX@"
+ 
+ export SAGE_CONFIGURE_FFLAS_FFPACK="@SAGE_CONFIGURE_FFLAS_FFPACK@"
+diff --git a/configure.ac b/configure.ac
+index 6fafb83..6ed07ac 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -441,6 +441,14 @@ AC_ARG_ENABLE(
+     [allow the use of python packages from the system (experimental; default: no)]
+   )], [
+   AS_IF([test "x$enable_system_site_packages" = "xyes"], [
++    dnl When installing python SPKGs in the presence of system-site
++    dnl packages, we need to --ignore-installed so that a patched SPKG
++    dnl can be installed in the presence of an unpatched system package
++    dnl that appears (to pip) to be identical. The --no-deps flag is
++    dnl then needed because --ignore-installed will make any installed
++    dnl dependencies invisible to pip, who does not appreciate that.
++    SAGE_PIP_INSTALL_FLAGS="${SAGE_PIP_INSTALL_FLAGS} --no-deps --ignore-installed"
++
+     SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
+ 
+     dnl We want to raise an error if the user asked for "system site
+@@ -453,6 +461,7 @@ AC_ARG_ENABLE(
+     with_system_python3="force"
+   ])
+ ])
++AC_SUBST([SAGE_PIP_INSTALL_FLAGS])
+ AC_SUBST([SAGE_VENV_FLAGS])
+ 
+ SAGE_SPKG_OPTIONS=""
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3cf365fef84e809e74abd2eb388e7a8e9af9d739 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 9 Nov 2021 21:01:58 -0500
+Subject: Trac #29665: pass $SAGE_PIP_INSTALL_FLAGS to sdh_pip_install.
+
+Since sdh_pip_install is usually called from spkg-install.in, the
+variables from sage-build-env-config will be available. Here we pass
+the contents of $SAGE_PIP_INSTALL_FLAGS to sage-pip-install
+unconditionally, and hope that the user ignores this variable unless
+he truly knows what he is doing.
+---
+ build/bin/sage-dist-helpers | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/build/bin/sage-dist-helpers b/build/bin/sage-dist-helpers
+index fe364e5..1032ac3 100644
+--- a/build/bin/sage-dist-helpers
++++ b/build/bin/sage-dist-helpers
+@@ -303,7 +303,11 @@ sdh_store_wheel() {
+ }
+ 
+ sdh_store_and_pip_install_wheel() {
+-    local pip_options=""
++    # The $SAGE_PIP_INSTALL_FLAGS variable is set by sage-build-env-config.
++    # We skip sanity checking its contents since you should either let sage
++    # decide what it contains, or really know what you are doing.
++    local pip_options="${SAGE_PIP_INSTALL_FLAGS}"
++
+     while [ $# -gt 0 ]; do
+         case $1 in
+             -*) pip_options="$pip_options $1"
+-- 
+cgit v1.0-1-gd88e
+
+
+From 50f0438ee857b8f0b7d7ad924e6bba9c5e1bc033 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:10:46 -0500
+Subject: Trac #29665: add Gentoo package information for pexpect.
+
+---
+ build/pkgs/pexpect/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pexpect/distros/gentoo.txt
+
+diff --git a/build/pkgs/pexpect/distros/gentoo.txt b/build/pkgs/pexpect/distros/gentoo.txt
+new file mode 100644
+index 00000000..30c4b60
+--- /dev/null
++++ b/build/pkgs/pexpect/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pexpect
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4d784688d997290b462646fa7f36114a41f3f453 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:11:25 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pexpect.
+
+---
+ build/pkgs/pexpect/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pexpect/spkg-configure.m4
+
+diff --git a/build/pkgs/pexpect/spkg-configure.m4 b/build/pkgs/pexpect/spkg-configure.m4
+new file mode 100644
+index 00000000..6520856
+--- /dev/null
++++ b/build/pkgs/pexpect/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pexpect], [SAGE_PYTHON_PACKAGE_CHECK([pexpect])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6447122dc76a3b7a58340dbed942db66530b5b07 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:12:05 -0500
+Subject: Trac #29665: add Gentoo package information for docutils.
+
+---
+ build/pkgs/docutils/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/docutils/distros/gentoo.txt
+
+diff --git a/build/pkgs/docutils/distros/gentoo.txt b/build/pkgs/docutils/distros/gentoo.txt
+new file mode 100644
+index 00000000..fe4a452
+--- /dev/null
++++ b/build/pkgs/docutils/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/docutils
+-- 
+cgit v1.0-1-gd88e
+
+
+From 709041480a5fc729b0ee7f1a8a3b16d4d65321b5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:12:38 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for docutils.
+
+---
+ build/pkgs/docutils/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/docutils/spkg-configure.m4
+
+diff --git a/build/pkgs/docutils/spkg-configure.m4 b/build/pkgs/docutils/spkg-configure.m4
+new file mode 100644
+index 00000000..3584e45
+--- /dev/null
++++ b/build/pkgs/docutils/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([docutils], [SAGE_PYTHON_PACKAGE_CHECK([docutils])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 782d38b48ab87afccc43fbc071e7b7ed48fb0a20 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:14:37 -0500
+Subject: Trac #29665: add Gentoo package information for nbclient.
+
+---
+ build/pkgs/nbclient/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbclient/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbclient/distros/gentoo.txt b/build/pkgs/nbclient/distros/gentoo.txt
+new file mode 100644
+index 00000000..06ff18d
+--- /dev/null
++++ b/build/pkgs/nbclient/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbclient
+-- 
+cgit v1.0-1-gd88e
+
+
+From 19ce09336532336f69db74381932d51a429dfaca Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:15:11 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for nbclient.
+
+---
+ build/pkgs/nbclient/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbclient/spkg-configure.m4
+
+diff --git a/build/pkgs/nbclient/spkg-configure.m4 b/build/pkgs/nbclient/spkg-configure.m4
+new file mode 100644
+index 00000000..14178b7
+--- /dev/null
++++ b/build/pkgs/nbclient/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbclient], [SAGE_PYTHON_PACKAGE_CHECK([nbclient])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c063b9de42c1780368000a563d0dbe80b6fff169 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:17:36 -0500
+Subject: Trac #29665: add Gentoo package information for argon2_cffi.
+
+---
+ build/pkgs/argon2_cffi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argon2_cffi/distros/gentoo.txt
+
+diff --git a/build/pkgs/argon2_cffi/distros/gentoo.txt b/build/pkgs/argon2_cffi/distros/gentoo.txt
+new file mode 100644
+index 00000000..2f12ca8
+--- /dev/null
++++ b/build/pkgs/argon2_cffi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/argon2-cffi
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0b4d5699dd51ea52550fba7db9e1cbb8bbac1892 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:18:35 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for argon2_cffi.
+
+---
+ build/pkgs/argon2_cffi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argon2_cffi/spkg-configure.m4
+
+diff --git a/build/pkgs/argon2_cffi/spkg-configure.m4 b/build/pkgs/argon2_cffi/spkg-configure.m4
+new file mode 100644
+index 00000000..03ebc63
+--- /dev/null
++++ b/build/pkgs/argon2_cffi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([argon2_cffi], [SAGE_PYTHON_PACKAGE_CHECK([argon2_cffi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2b4119558a6e0b1aa512848539a237676b035c83 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:30:48 -0500
+Subject: Trac #29665: fix package name in dateutil's install-requires.txt.
+
+---
+ build/pkgs/dateutil/install-requires.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/build/pkgs/dateutil/install-requires.txt b/build/pkgs/dateutil/install-requires.txt
+index 0ae93da..face537 100644
+--- a/build/pkgs/dateutil/install-requires.txt
++++ b/build/pkgs/dateutil/install-requires.txt
+@@ -1 +1 @@
+-dateutil >=2.8.1
++python-dateutil >=2.8.1
+-- 
+cgit v1.0-1-gd88e
+
+
+From df371b7c4d20a3353d43940306ad22e11aba29da Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:31:41 -0500
+Subject: Trac #29665: add Gentoo package information for dateutil.
+
+---
+ build/pkgs/dateutil/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/dateutil/distros/gentoo.txt
+
+diff --git a/build/pkgs/dateutil/distros/gentoo.txt b/build/pkgs/dateutil/distros/gentoo.txt
+new file mode 100644
+index 00000000..e129df7
+--- /dev/null
++++ b/build/pkgs/dateutil/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/python-dateutil
+-- 
+cgit v1.0-1-gd88e
+
+
+From 577695dfdf661ee26c0ffd767bdbf479d95f7fb4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:32:21 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for dateutil.
+
+---
+ build/pkgs/dateutil/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/dateutil/spkg-configure.m4
+
+diff --git a/build/pkgs/dateutil/spkg-configure.m4 b/build/pkgs/dateutil/spkg-configure.m4
+new file mode 100644
+index 00000000..fdcd127
+--- /dev/null
++++ b/build/pkgs/dateutil/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([dateutil], [SAGE_PYTHON_PACKAGE_CHECK([dateutil])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1984651caac624ec4bb58814ca1d57fe66f9881a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:33:51 -0500
+Subject: Trac #29665: add Gentoo package information for setuptools_scm.
+
+---
+ build/pkgs/setuptools_scm/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/setuptools_scm/distros/gentoo.txt
+
+diff --git a/build/pkgs/setuptools_scm/distros/gentoo.txt b/build/pkgs/setuptools_scm/distros/gentoo.txt
+new file mode 100644
+index 00000000..8989597
+--- /dev/null
++++ b/build/pkgs/setuptools_scm/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/setuptools_scm
+-- 
+cgit v1.0-1-gd88e
+
+
+From ebf7c854ed966e7353759be485c4f5a57b9a10fa Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:34:49 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for setuptools_scm.
+
+---
+ build/pkgs/setuptools_scm/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/setuptools_scm/spkg-configure.m4
+
+diff --git a/build/pkgs/setuptools_scm/spkg-configure.m4 b/build/pkgs/setuptools_scm/spkg-configure.m4
+new file mode 100644
+index 00000000..437148c
+--- /dev/null
++++ b/build/pkgs/setuptools_scm/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([setuptools_scm], [
++  SAGE_PYTHON_PACKAGE_CHECK([setuptools_scm])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0dee0d0c28f31b1f619e44c710a3c9e22d2b2544 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:36:33 -0500
+Subject: Trac #29665: add Gentoo package information for nbconvert.
+
+---
+ build/pkgs/nbconvert/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbconvert/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbconvert/distros/gentoo.txt b/build/pkgs/nbconvert/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c45a10
+--- /dev/null
++++ b/build/pkgs/nbconvert/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbconvert
+-- 
+cgit v1.0-1-gd88e
+
+
+From 473789eb11b1838bc32dc8a63509ee199afc8912 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:37:37 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for nbconvert.
+
+---
+ build/pkgs/nbconvert/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbconvert/spkg-configure.m4
+
+diff --git a/build/pkgs/nbconvert/spkg-configure.m4 b/build/pkgs/nbconvert/spkg-configure.m4
+new file mode 100644
+index 00000000..9b5dee3
+--- /dev/null
++++ b/build/pkgs/nbconvert/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbconvert], [SAGE_PYTHON_PACKAGE_CHECK([nbconvert])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f0703b594e57c980d605aa9bc8316c45a7858b3b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:41:51 -0500
+Subject: Trac #29665: add Gentoo package information for jupyter_core.
+
+---
+ build/pkgs/jupyter_core/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyter_core/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyter_core/distros/gentoo.txt b/build/pkgs/jupyter_core/distros/gentoo.txt
+new file mode 100644
+index 00000000..f168c5a
+--- /dev/null
++++ b/build/pkgs/jupyter_core/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyter_core
+-- 
+cgit v1.0-1-gd88e
+
+
+From 061a307cc4a6680d8500fde834975064e59540d5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:42:48 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jupyter_core.
+
+---
+ build/pkgs/jupyter_core/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyter_core/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyter_core/spkg-configure.m4 b/build/pkgs/jupyter_core/spkg-configure.m4
+new file mode 100644
+index 00000000..67df9c3
+--- /dev/null
++++ b/build/pkgs/jupyter_core/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyter_core], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyter_core])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b85abe964ce0b98b5842efe9cbad9bdb1c89202f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:47:08 -0500
+Subject: Trac #29665: add Gentoo package information for jupyter_client.
+
+---
+ build/pkgs/jupyter_client/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyter_client/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyter_client/distros/gentoo.txt b/build/pkgs/jupyter_client/distros/gentoo.txt
+new file mode 100644
+index 00000000..4f1de88
+--- /dev/null
++++ b/build/pkgs/jupyter_client/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyter_client
+-- 
+cgit v1.0-1-gd88e
+
+
+From 86323ff1e0b2507933df6bc2a96c9175957640c5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:48:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jupyter_client.
+
+---
+ build/pkgs/jupyter_client/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyter_client/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyter_client/spkg-configure.m4 b/build/pkgs/jupyter_client/spkg-configure.m4
+new file mode 100644
+index 00000000..fbd3498
+--- /dev/null
++++ b/build/pkgs/jupyter_client/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyter_client], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyter_client])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a8475e27dd30d752d05ab6fea6579e8623501d82 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:48:58 -0500
+Subject: Trac #29665: add Gentoo package information for snowballstemmer.
+
+---
+ build/pkgs/snowballstemmer/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/snowballstemmer/distros/gentoo.txt
+
+diff --git a/build/pkgs/snowballstemmer/distros/gentoo.txt b/build/pkgs/snowballstemmer/distros/gentoo.txt
+new file mode 100644
+index 00000000..63fd851
+--- /dev/null
++++ b/build/pkgs/snowballstemmer/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/snowballstemmer
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0833c9b781062b4ed86d619e050a6f5d60e36080 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:49:38 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for snowballstemmer.
+
+---
+ build/pkgs/snowballstemmer/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/snowballstemmer/spkg-configure.m4
+
+diff --git a/build/pkgs/snowballstemmer/spkg-configure.m4 b/build/pkgs/snowballstemmer/spkg-configure.m4
+new file mode 100644
+index 00000000..6aa0882
+--- /dev/null
++++ b/build/pkgs/snowballstemmer/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([snowballstemmer], [
++  SAGE_PYTHON_PACKAGE_CHECK([snowballstemmer])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 50a1cf2a2bcd7eeec64cbc3f70e3e9fbe5d850fe Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:50:47 -0500
+Subject: Trac #29665: add Gentoo package information for tornado.
+
+---
+ build/pkgs/tornado/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tornado/distros/gentoo.txt
+
+diff --git a/build/pkgs/tornado/distros/gentoo.txt b/build/pkgs/tornado/distros/gentoo.txt
+new file mode 100644
+index 00000000..6ae4b9f
+--- /dev/null
++++ b/build/pkgs/tornado/distros/gentoo.txt
+@@ -0,0 +1 @@
++www-servers/tornado
+-- 
+cgit v1.0-1-gd88e
+
+
+From 118f4da6e03476c726363e8e22ecda32f13bfc33 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:51:26 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for tornado.
+
+---
+ build/pkgs/tornado/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tornado/spkg-configure.m4
+
+diff --git a/build/pkgs/tornado/spkg-configure.m4 b/build/pkgs/tornado/spkg-configure.m4
+new file mode 100644
+index 00000000..1ee5bc9
+--- /dev/null
++++ b/build/pkgs/tornado/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tornado], [SAGE_PYTHON_PACKAGE_CHECK([tornado])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3850701747a6c8ef60840bdfdb589b28d4cd2b9a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:52:21 -0500
+Subject: Trac #29665: add Gentoo package information for jsonschema.
+
+---
+ build/pkgs/jsonschema/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jsonschema/distros/gentoo.txt
+
+diff --git a/build/pkgs/jsonschema/distros/gentoo.txt b/build/pkgs/jsonschema/distros/gentoo.txt
+new file mode 100644
+index 00000000..d708e4c
+--- /dev/null
++++ b/build/pkgs/jsonschema/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jsonschema
+-- 
+cgit v1.0-1-gd88e
+
+
+From 76e3917c8af781af00f642cfada7a79594429e30 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:54:03 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jsonschema.
+
+---
+ build/pkgs/jsonschema/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jsonschema/spkg-configure.m4
+
+diff --git a/build/pkgs/jsonschema/spkg-configure.m4 b/build/pkgs/jsonschema/spkg-configure.m4
+new file mode 100644
+index 00000000..b9e5e21
+--- /dev/null
++++ b/build/pkgs/jsonschema/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jsonschema], [SAGE_PYTHON_PACKAGE_CHECK([jsonschema])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From fd4a16c11669b6dd73ac6325bca820e76db00402 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:55:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ widgetsnbextension.
+
+---
+ build/pkgs/widgetsnbextension/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/widgetsnbextension/spkg-configure.m4
+
+diff --git a/build/pkgs/widgetsnbextension/spkg-configure.m4 b/build/pkgs/widgetsnbextension/spkg-configure.m4
+new file mode 100644
+index 00000000..bf82daf
+--- /dev/null
++++ b/build/pkgs/widgetsnbextension/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([widgetsnbextension], [
++  SAGE_PYTHON_PACKAGE_CHECK([widgetsnbextension])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8079a9f384e3c8480e157dd98c3db2f43c987f4e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:57:20 -0500
+Subject: Trac #29665: add Gentoo package information for importlib_resources.
+
+---
+ build/pkgs/importlib_resources/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/importlib_resources/distros/gentoo.txt
+
+diff --git a/build/pkgs/importlib_resources/distros/gentoo.txt b/build/pkgs/importlib_resources/distros/gentoo.txt
+new file mode 100644
+index 00000000..d5e1f2c
+--- /dev/null
++++ b/build/pkgs/importlib_resources/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/importlib_resources
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2c430d7c52f02779a6c41b98ac2f4edd8b6759c3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:58:00 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ importlib_resources.
+
+---
+ build/pkgs/importlib_resources/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/importlib_resources/spkg-configure.m4
+
+diff --git a/build/pkgs/importlib_resources/spkg-configure.m4 b/build/pkgs/importlib_resources/spkg-configure.m4
+new file mode 100644
+index 00000000..50df55b
+--- /dev/null
++++ b/build/pkgs/importlib_resources/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([importlib_resources], [
++  SAGE_PYTHON_PACKAGE_CHECK([importlib_resources])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 00d13d7bf2e50aae2ccef3b2b30293c70a922af2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:58:38 -0500
+Subject: Trac #29665: add Gentoo package information for kiwisolver.
+
+---
+ build/pkgs/kiwisolver/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/kiwisolver/distros/gentoo.txt
+
+diff --git a/build/pkgs/kiwisolver/distros/gentoo.txt b/build/pkgs/kiwisolver/distros/gentoo.txt
+new file mode 100644
+index 00000000..7b30c95
+--- /dev/null
++++ b/build/pkgs/kiwisolver/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/kiwisolver
+-- 
+cgit v1.0-1-gd88e
+
+
+From 72b7907ef7ea9fa4ff6948ea34cfe2f693ee6c31 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:59:09 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for kiwisolver.
+
+---
+ build/pkgs/kiwisolver/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/kiwisolver/spkg-configure.m4
+
+diff --git a/build/pkgs/kiwisolver/spkg-configure.m4 b/build/pkgs/kiwisolver/spkg-configure.m4
+new file mode 100644
+index 00000000..4e7ac97
+--- /dev/null
++++ b/build/pkgs/kiwisolver/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([kiwisolver], [SAGE_PYTHON_PACKAGE_CHECK([kiwisolver])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 479351279e4e0ea7e2d146434f0daba038765cfd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:00:04 -0500
+Subject: Trac #29665: add Gentoo package information for notebook.
+
+---
+ build/pkgs/notebook/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/notebook/distros/gentoo.txt
+
+diff --git a/build/pkgs/notebook/distros/gentoo.txt b/build/pkgs/notebook/distros/gentoo.txt
+new file mode 100644
+index 00000000..6475d72
+--- /dev/null
++++ b/build/pkgs/notebook/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/notebook
+-- 
+cgit v1.0-1-gd88e
+
+
+From f4d9242ea654977f8ad7865c82eec593e11a36bc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:01:42 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for notebook.
+
+---
+ build/pkgs/notebook/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/notebook/spkg-configure.m4
+
+diff --git a/build/pkgs/notebook/spkg-configure.m4 b/build/pkgs/notebook/spkg-configure.m4
+new file mode 100644
+index 00000000..a17ba95
+--- /dev/null
++++ b/build/pkgs/notebook/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([notebook], [SAGE_PYTHON_PACKAGE_CHECK([notebook])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9837070c7f8e9a71283b84d49d4fd2c94b78a464 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:02:38 -0500
+Subject: Trac #29665: add Gentoo package information for matplotlib_inline.
+
+---
+ build/pkgs/matplotlib_inline/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/matplotlib_inline/distros/gentoo.txt
+
+diff --git a/build/pkgs/matplotlib_inline/distros/gentoo.txt b/build/pkgs/matplotlib_inline/distros/gentoo.txt
+new file mode 100644
+index 00000000..6a5859c
+--- /dev/null
++++ b/build/pkgs/matplotlib_inline/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/matplotlib-inline
+-- 
+cgit v1.0-1-gd88e
+
+
+From 750be73b25b92b4875e47d044360ac0e1116ec3e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:03:28 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for matplotlib_inline.
+
+---
+ build/pkgs/matplotlib_inline/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/matplotlib_inline/spkg-configure.m4
+
+diff --git a/build/pkgs/matplotlib_inline/spkg-configure.m4 b/build/pkgs/matplotlib_inline/spkg-configure.m4
+new file mode 100644
+index 00000000..e59658f
+--- /dev/null
++++ b/build/pkgs/matplotlib_inline/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([matplotlib_inline], [
++  SAGE_PYTHON_PACKAGE_CHECK([matplotlib_inline])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 273505f49698dcd2ab30c2756b07113c9b7e7791 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:04:10 -0500
+Subject: Trac #29665: add Gentoo package information for ipykernel.
+
+---
+ build/pkgs/ipykernel/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipykernel/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipykernel/distros/gentoo.txt b/build/pkgs/ipykernel/distros/gentoo.txt
+new file mode 100644
+index 00000000..88aab61
+--- /dev/null
++++ b/build/pkgs/ipykernel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipykernel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 629ad36c9e4ae0cdff4a013289b4f2911442445e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:04:46 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for ipykernel.
+
+---
+ build/pkgs/ipykernel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipykernel/spkg-configure.m4
+
+diff --git a/build/pkgs/ipykernel/spkg-configure.m4 b/build/pkgs/ipykernel/spkg-configure.m4
+new file mode 100644
+index 00000000..94ecc2d
+--- /dev/null
++++ b/build/pkgs/ipykernel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipykernel], [SAGE_PYTHON_PACKAGE_CHECK([ipykernel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b8d709edb6a24fd5868ee2818b56e78257b2eafa Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:05:26 -0500
+Subject: Trac #29665: add Gentoo package information for prompt_toolkit.
+
+---
+ build/pkgs/prompt_toolkit/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/prompt_toolkit/distros/gentoo.txt
+
+diff --git a/build/pkgs/prompt_toolkit/distros/gentoo.txt b/build/pkgs/prompt_toolkit/distros/gentoo.txt
+new file mode 100644
+index 00000000..6902484
+--- /dev/null
++++ b/build/pkgs/prompt_toolkit/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/prompt_toolkit
+-- 
+cgit v1.0-1-gd88e
+
+
+From 16c0b5e767ae4dac4440510b7253e5c8642b7d2c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:10:39 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for prompt_toolkit.
+
+---
+ build/pkgs/prompt_toolkit/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/prompt_toolkit/spkg-configure.m4
+
+diff --git a/build/pkgs/prompt_toolkit/spkg-configure.m4 b/build/pkgs/prompt_toolkit/spkg-configure.m4
+new file mode 100644
+index 00000000..fd8c1a6
+--- /dev/null
++++ b/build/pkgs/prompt_toolkit/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([prompt_toolkit], [
++  SAGE_PYTHON_PACKAGE_CHECK([prompt_toolkit])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0cd9283e8bb6c8ae413fc8f715c021f7ec3ca2c8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:12:10 -0500
+Subject: Trac #29665: add Gentoo package information for charset_normalizer.
+
+---
+ build/pkgs/charset_normalizer/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/charset_normalizer/distros/gentoo.txt
+
+diff --git a/build/pkgs/charset_normalizer/distros/gentoo.txt b/build/pkgs/charset_normalizer/distros/gentoo.txt
+new file mode 100644
+index 00000000..eefeb89
+--- /dev/null
++++ b/build/pkgs/charset_normalizer/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/charset_normalizer
+-- 
+cgit v1.0-1-gd88e
+
+
+From a04b01a9ab59097d189edcc5ddcb461faede83b2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:12:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ charset_normalizer.
+
+---
+ build/pkgs/charset_normalizer/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/charset_normalizer/spkg-configure.m4
+
+diff --git a/build/pkgs/charset_normalizer/spkg-configure.m4 b/build/pkgs/charset_normalizer/spkg-configure.m4
+new file mode 100644
+index 00000000..18b18cf
+--- /dev/null
++++ b/build/pkgs/charset_normalizer/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([charset_normalizer], [
++  SAGE_PYTHON_PACKAGE_CHECK([charset_normalizer])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d2ea08138711c53046f977b586f33b09b176b2e3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:13:37 -0500
+Subject: Trac #29665: add Gentoo package information for prometheus_client.
+
+---
+ build/pkgs/prometheus_client/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/prometheus_client/distros/gentoo.txt
+
+diff --git a/build/pkgs/prometheus_client/distros/gentoo.txt b/build/pkgs/prometheus_client/distros/gentoo.txt
+new file mode 100644
+index 00000000..aa2889c
+--- /dev/null
++++ b/build/pkgs/prometheus_client/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/prometheus_client
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b0393200e9edd3e26b8a55ba67e5710e7403fcb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:15:09 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for prometheus_client.
+
+---
+ build/pkgs/prometheus_client/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/prometheus_client/spkg-configure.m4
+
+diff --git a/build/pkgs/prometheus_client/spkg-configure.m4 b/build/pkgs/prometheus_client/spkg-configure.m4
+new file mode 100644
+index 00000000..b494588
+--- /dev/null
++++ b/build/pkgs/prometheus_client/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([prometheus_client], [
++  SAGE_PYTHON_PACKAGE_CHECK([prometheus_client])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From cdcd85284f43ca4ad18353ec3527b2901e57b788 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:17:23 -0500
+Subject: Trac #29665: add Gentoo package information for pybind11.
+
+---
+ build/pkgs/pybind11/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pybind11/distros/gentoo.txt
+
+diff --git a/build/pkgs/pybind11/distros/gentoo.txt b/build/pkgs/pybind11/distros/gentoo.txt
+new file mode 100644
+index 00000000..0c500b3
+--- /dev/null
++++ b/build/pkgs/pybind11/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pybind11
+-- 
+cgit v1.0-1-gd88e
+
+
+From efdd1eb64c4799fe3cdf2221824182941b3fda2d Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:17:51 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pybind11.
+
+---
+ build/pkgs/pybind11/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pybind11/spkg-configure.m4
+
+diff --git a/build/pkgs/pybind11/spkg-configure.m4 b/build/pkgs/pybind11/spkg-configure.m4
+new file mode 100644
+index 00000000..cce1cf5
+--- /dev/null
++++ b/build/pkgs/pybind11/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pybind11], [SAGE_PYTHON_PACKAGE_CHECK([pybind11])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b2128f33b68ea33927284116ea598dd186902400 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:19:23 -0500
+Subject: Trac #29665: add Gentoo package information for pkgconfig.
+
+---
+ build/pkgs/pkgconfig/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pkgconfig/distros/gentoo.txt
+
+diff --git a/build/pkgs/pkgconfig/distros/gentoo.txt b/build/pkgs/pkgconfig/distros/gentoo.txt
+new file mode 100644
+index 00000000..32e8618
+--- /dev/null
++++ b/build/pkgs/pkgconfig/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pkgconfig
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b373b49e06aadeb36dc57e500da9a322460e658 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:19:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pkgconfig.
+
+---
+ build/pkgs/pkgconfig/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pkgconfig/spkg-configure.m4
+
+diff --git a/build/pkgs/pkgconfig/spkg-configure.m4 b/build/pkgs/pkgconfig/spkg-configure.m4
+new file mode 100644
+index 00000000..6708293
+--- /dev/null
++++ b/build/pkgs/pkgconfig/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pkgconfig], [SAGE_PYTHON_PACKAGE_CHECK([pkgconfig])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ce578729eb0d14baab365351ba9a9ffffb7b79f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:21:10 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_serializinghtml.
+
+---
+ build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt b/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+new file mode 100644
+index 00000000..38bca8f
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-serializinghtml
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb0f42c32bbce0e4488678312f5e2d88c6f42c9b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:21:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_serializinghtml.
+
+---
+ build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4 b/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+new file mode 100644
+index 00000000..be8e625
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_serializinghtml], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_serializinghtml])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e47dcf985e40475de85c9436a85537751318bc3d Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:22:54 -0500
+Subject: Trac #29665: add Gentoo package information for sphinxcontrib_jsmath.
+
+---
+ build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt b/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+new file mode 100644
+index 00000000..041a471
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-jsmath
+-- 
+cgit v1.0-1-gd88e
+
+
+From 72cff6fd35f93de4fa855bc870569dd733ff5c24 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:23:49 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_jsmath.
+
+---
+ build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4 b/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+new file mode 100644
+index 00000000..e46bde2
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_jsmath], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_jsmath])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a36395d70f759449cd63c1b0990fbdcb4cb25ca0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:24:26 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_devhelp.
+
+---
+ build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..9b5c899
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-devhelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9953a5dd1646ed0ad51d2e3935cf609bc9e7fd1c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:25:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_devhelp.
+
+---
+ build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+new file mode 100644
+index 00000000..8728136
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_devhelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_devhelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b199d5363aad93f3cb23f7904c9553a28b06348f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:25:53 -0500
+Subject: Trac #29665: add Gentoo package information for sphinxcontrib_qthelp.
+
+---
+ build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..7210099
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-qthelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 94ac8806739f3938e73f5857328e91e0d42e98d2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:26:28 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_qthelp.
+
+---
+ build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+new file mode 100644
+index 00000000..81ea5e1
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_qthelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_qthelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From beedc154aa405e8a58aee8889f510db07adc89a7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:26:54 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_applehelp.
+
+---
+ build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..66ac8da
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-applehelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 07d47c3673d6b35423b71f621cb400989c0101c2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:27:19 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_applehelp.
+
+---
+ build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+new file mode 100644
+index 00000000..e834aed
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_applehelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_applehelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 333a66546c5d421735c49dbafd7370a827f22781 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:27:46 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_htmlhelp.
+
+---
+ build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..e080bac
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-htmlhelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From bfaeb3962254439b63f1f2e0e883de462c7831be Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:29:18 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_htmlhelp.
+
+---
+ build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+new file mode 100644
+index 00000000..c77b003
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_htmlhelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_htmlhelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 782cde13da06e8b85806cb7cbc8aceee0364e639 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:30:23 -0500
+Subject: Trac #29665: add Gentoo package information for jupyterlab_pygments.
+
+---
+ build/pkgs/jupyterlab_pygments/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyterlab_pygments/distros/gentoo.txt b/build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+new file mode 100644
+index 00000000..c57b4f1
+--- /dev/null
++++ b/build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyterlab_pygments
+-- 
+cgit v1.0-1-gd88e
+
+
+From 39f974cfa4a8c6e5dd897f152f83ec82f40ee9f7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:31:13 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ jupyterlab_pygments.
+
+---
+ build/pkgs/jupyterlab_pygments/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyterlab_pygments/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyterlab_pygments/spkg-configure.m4 b/build/pkgs/jupyterlab_pygments/spkg-configure.m4
+new file mode 100644
+index 00000000..e46e21f
+--- /dev/null
++++ b/build/pkgs/jupyterlab_pygments/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyterlab_pygments], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyterlab_pygments])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From db704620700fd36cec3bf6125938f3ee00a9eb5e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:29:15 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for ply.
+
+---
+ build/pkgs/ply/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ply/spkg-configure.m4
+
+diff --git a/build/pkgs/ply/spkg-configure.m4 b/build/pkgs/ply/spkg-configure.m4
+new file mode 100644
+index 00000000..ffb0030
+--- /dev/null
++++ b/build/pkgs/ply/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ply], [SAGE_PYTHON_PACKAGE_CHECK([ply])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6aac31dabcdfdef228d7780398a3fda1a4cc566f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:29:51 -0500
+Subject: Trac #29665: add Gentoo package information for ply.
+
+---
+ build/pkgs/ply/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ply/distros/gentoo.txt
+
+diff --git a/build/pkgs/ply/distros/gentoo.txt b/build/pkgs/ply/distros/gentoo.txt
+new file mode 100644
+index 00000000..c8b1630
+--- /dev/null
++++ b/build/pkgs/ply/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ply
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb8d3372936ec37470d69687a0f91592129460ae Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:30:33 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for gast.
+
+---
+ build/pkgs/gast/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/gast/spkg-configure.m4
+
+diff --git a/build/pkgs/gast/spkg-configure.m4 b/build/pkgs/gast/spkg-configure.m4
+new file mode 100644
+index 00000000..26ec59f
+--- /dev/null
++++ b/build/pkgs/gast/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([gast], [SAGE_PYTHON_PACKAGE_CHECK([gast])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1cdc4046a88f1c2b4e5c162f66c6db6090b24194 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:31:15 -0500
+Subject: Trac #29665: add Gentoo package information for gast.
+
+---
+ build/pkgs/gast/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/gast/distros/gentoo.txt
+
+diff --git a/build/pkgs/gast/distros/gentoo.txt b/build/pkgs/gast/distros/gentoo.txt
+new file mode 100644
+index 00000000..3be5e7e
+--- /dev/null
++++ b/build/pkgs/gast/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/gast
+-- 
+cgit v1.0-1-gd88e
+
+
+From 96068b8a3742b65d619190e1d9fa5db399e6b4f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:32:20 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pythran.
+
+---
+ build/pkgs/pythran/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pythran/spkg-configure.m4
+
+diff --git a/build/pkgs/pythran/spkg-configure.m4 b/build/pkgs/pythran/spkg-configure.m4
+new file mode 100644
+index 00000000..592e95b
+--- /dev/null
++++ b/build/pkgs/pythran/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pythran], [SAGE_PYTHON_PACKAGE_CHECK([pythran])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1fa0fad3ae8f7e559c6fc315c6773a7d8aac0bfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:32:55 -0500
+Subject: Trac #29665: add Gentoo package information for pythran.
+
+---
+ build/pkgs/pythran/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pythran/distros/gentoo.txt
+
+diff --git a/build/pkgs/pythran/distros/gentoo.txt b/build/pkgs/pythran/distros/gentoo.txt
+new file mode 100644
+index 00000000..1bb7cdc
+--- /dev/null
++++ b/build/pkgs/pythran/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pythran
+-- 
+cgit v1.0-1-gd88e
+
+
+From d26370e5b8c88e76abfb7c27e3defb71c9e9f711 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:33:50 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for beniget.
+
+---
+ build/pkgs/beniget/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/beniget/spkg-configure.m4
+
+diff --git a/build/pkgs/beniget/spkg-configure.m4 b/build/pkgs/beniget/spkg-configure.m4
+new file mode 100644
+index 00000000..8ae6101
+--- /dev/null
++++ b/build/pkgs/beniget/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([beniget], [SAGE_PYTHON_PACKAGE_CHECK([beniget])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From eeeb296ed9b9694a865534103fd58e62a151ef5e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:34:22 -0500
+Subject: Trac #29665: add Gentoo package information for beniget.
+
+---
+ build/pkgs/beniget/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/beniget/distros/gentoo.txt
+
+diff --git a/build/pkgs/beniget/distros/gentoo.txt b/build/pkgs/beniget/distros/gentoo.txt
+new file mode 100644
+index 00000000..1a5972c
+--- /dev/null
++++ b/build/pkgs/beniget/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/beniget
+-- 
+cgit v1.0-1-gd88e
+
+
+From 078b2ff272d0eeff5cce40ad7eb176d9ddd7bdff Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:35:37 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for alabaster.
+
+---
+ build/pkgs/alabaster/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/alabaster/spkg-configure.m4
+
+diff --git a/build/pkgs/alabaster/spkg-configure.m4 b/build/pkgs/alabaster/spkg-configure.m4
+new file mode 100644
+index 00000000..4eca6e0
+--- /dev/null
++++ b/build/pkgs/alabaster/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([alabaster], [SAGE_PYTHON_PACKAGE_CHECK([alabaster])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7dc264353e5f64110431ff28c1b8b7e89699e9bd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:36:06 -0500
+Subject: Trac #29665: add Gentoo package information for alabaster.
+
+---
+ build/pkgs/alabaster/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/alabaster/distros/gentoo.txt
+
+diff --git a/build/pkgs/alabaster/distros/gentoo.txt b/build/pkgs/alabaster/distros/gentoo.txt
+new file mode 100644
+index 00000000..cffece6
+--- /dev/null
++++ b/build/pkgs/alabaster/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/alabaster
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8011a5e675e7e61a77ce34a299ee961a9f44253f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:43:59 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ importlib_metadata.
+
+---
+ build/pkgs/importlib_metadata/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/importlib_metadata/spkg-configure.m4
+
+diff --git a/build/pkgs/importlib_metadata/spkg-configure.m4 b/build/pkgs/importlib_metadata/spkg-configure.m4
+new file mode 100644
+index 00000000..0554e52
+--- /dev/null
++++ b/build/pkgs/importlib_metadata/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([importlib_metadata], [
++  SAGE_PYTHON_PACKAGE_CHECK([importlib_metadata])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 928ca0019e3ec6c4541a16b28bcc6710df6d010b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:44:28 -0500
+Subject: Trac #29665: add Gentoo package information for importlib_metadata.
+
+---
+ build/pkgs/importlib_metadata/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/importlib_metadata/distros/gentoo.txt
+
+diff --git a/build/pkgs/importlib_metadata/distros/gentoo.txt b/build/pkgs/importlib_metadata/distros/gentoo.txt
+new file mode 100644
+index 00000000..4f92786
+--- /dev/null
++++ b/build/pkgs/importlib_metadata/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/importlib_metadata
+-- 
+cgit v1.0-1-gd88e
+
+
+From 135f184f7498a2046065e669723e68efe2d65cee Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 21:16:58 -0500
+Subject: Trac #29665: fix sage.misc.package doctest with system alabaster.
+
+When alabaster from the system is used, these tests won't be able to
+find its SPKG installed. Add some ellipses, and switch one test to
+look for sage_conf instead.
+---
+ src/sage/misc/package.py | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/sage/misc/package.py b/src/sage/misc/package.py
+index 84f3d50..c7ad206 100644
+--- a/src/sage/misc/package.py
++++ b/src/sage/misc/package.py
+@@ -386,9 +386,9 @@ def installed_packages(exclude_pip=True):
+     EXAMPLES::
+ 
+         sage: sorted(installed_packages().keys())  # optional - build
+-        [...'alabaster', ...'sage_conf', ...]
+-        sage: installed_packages()['alabaster']  # optional - build, random
+-        '0.7.12'
++        [...'sage_conf', ...]
++        sage: installed_packages()['sage_conf']  # optional - build, random
++        '9.5'
+ 
+     .. SEEALSO::
+ 
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch b/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
new file mode 100644
index 000000000000..7ef3826aa4d2
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
@@ -0,0 +1,27 @@
+diff --git a/src/bin/sage-runtests b/src/bin/sage-runtests
+index 589dc8cd37..6bb8bf99a4 100755
+--- a/src/bin/sage-runtests
++++ b/src/bin/sage-runtests
+@@ -154,21 +154,4 @@ if __name__ == "__main__":
+     DC = DocTestController(args, args.filenames)
+     err = DC.run()
+ 
+-    try:
+-        exit_code_pytest = 0
+-        import pytest
+-        pytest_options = ["--import-mode", "importlib"]
+-        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.")
+-
+-    if err == 0:
+-        sys.exit(exit_code_pytest)
+-    else:
+-        sys.exit(err)
++    sys.exit(err)
diff --git a/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch b/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
new file mode 100644
index 000000000000..093e3d56eb33
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
@@ -0,0 +1,42 @@
+More site packages not included in trac 29665
+
+diff --git a/build/pkgs/gmpy2/spkg-configure.m4 b/build/pkgs/gmpy2/spkg-configure.m4
+new file mode 100644
+index 0000000000..2d0390f7db
+--- /dev/null
++++ b/build/pkgs/gmpy2/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([gmpy2], [SAGE_PYTHON_PACKAGE_CHECK([gmpy2])])
+diff --git a/build/pkgs/sphinx/spkg-configure.m4 b/build/pkgs/sphinx/spkg-configure.m4
+new file mode 100644
+index 0000000000..e149fbb2cf
+--- /dev/null
++++ b/build/pkgs/sphinx/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([sphinx], [SAGE_PYTHON_PACKAGE_CHECK([sphinx])])
+diff --git a/build/pkgs/typing_extensions/spkg-configure.m4 b/build/pkgs/typing_extensions/spkg-configure.m4
+new file mode 100644
+index 0000000000..d475fd8257
+--- /dev/null
++++ b/build/pkgs/typing_extensions/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([typing_extensions], [SAGE_PYTHON_PACKAGE_CHECK([typing_extensions])])
+-- 
+diff --git a/build/pkgs/gmpy2/install-requires.txt b/build/pkgs/gmpy2/install-requires.txt
+index 51d24518ef..c25feff557 100644
+--- a/build/pkgs/gmpy2/install-requires.txt
++++ b/build/pkgs/gmpy2/install-requires.txt
+@@ -1,3 +1 @@
+-# We would like to write gmpy2 >=2.1.0b5, but pipenv does not accept prereleases in version ranges
+-# https://github.com/pypa/pipenv/issues/1760
+-gmpy2 ==2.1.0rc1
++gmpy2 >=2.1
+diff --git a/build/pkgs/ptyprocess/install-requires.txt b/build/pkgs/ptyprocess/install-requires.txt
+index de89260872..7c336f636c 100644
+--- a/build/pkgs/ptyprocess/install-requires.txt
++++ b/build/pkgs/ptyprocess/install-requires.txt
+@@ -1,3 +1,3 @@
+-ptyprocess ==0.5.1
++ptyprocess
+ # https://trac.sagemath.org/ticket/31280#comment:42 and following
+ # sagelib is not compatible with ptyprocess 0.5.2, 0.6, and 0.7
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 33b40acbabeb..a32c5d18f378 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -22,11 +22,13 @@ distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
 checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
 python_version=3
 
-build_options="debug system_python3"
+build_options="debug system_python3 system_site_packages"
 desc_option_debug="Build with debug symbols"
 desc_option_system_python="Build using system python 3"
-build_options_default="system_python3"
+desc_option_system_python="Build using system python site-packages"
+build_options_default="system_python3 system_site_packages"
 configure_args+=" $(vopt_with system_python3)"
+configure_args+=" $(vopt_enable system_site_packages)"
 
 # path where sage will be installed
 _SAGE_ROOT=/usr/lib/sage-${version}
@@ -163,6 +165,8 @@ do_check() {
 	fi
 	if [ "$XBPS_CHECK_PKGS" = full ]; then
 		_test_args="--long $_test_args"
+	else
+		_test_args="--warn-long 5.0 $_test_args"
 	fi
 	# since make check will build the docs, run test like this instead
 	./sage -tp ${XBPS_MAKEJOBS} ${_test_args}
@@ -182,7 +186,7 @@ makedepends+=" automake gettext gettext-devel"
 # other host dependencies
 makedepends+=" cmake curl git ninja pandoc patch pkg-config python3 tox"
 
-# already in void
+# standard dependencies
 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
@@ -202,7 +206,49 @@ makedepends+="
  brial-devel cliquer-devel gfan libbraiding-devel libhomfly-devel
  lrcalc-devel nauty-devel palp tachyon
  maxima-ecl primesieve-devel primecount-devel
+ ffmpeg ImageMagick
 "
 
 # TODO: optional
 # 4ti2 coxeter3 libsemigroups lrslib pdf2svg perl_mongodb polymake
+
+# TODO: standard
+# cvxopt importlib_resources
+
+# python packages for trac-29665
+_sage_python3_modules="
+ python3-Babel python3-Jinja2 python3-MarkupSafe python3-Pillow
+ python3-Pygments python3-Sphinx python3-alabaster python3-argcomplete
+ python3-argon2 python3-attrs python3-backcall python3-beniget
+ python3-bleach python3-certifi python3-cffi python3-charset-normalizer
+ python3-cycler python3-dateutil python3-decorator python3-defusedxml
+ python3-docutils python3-entrypoints python3-flit_core python3-gast
+ python3-gmpy2 python3-html5lib python3-idna python3-imagesize
+ python3-importlib_metadata python3-ipython python3-ipython_genutils
+ python3-ipython_ipykernel python3-jedi python3-jsonschema
+ python3-jupyter_client python3-jupyter_core python3-jupyter_ipywidgets
+ python3-jupyter_nbconvert python3-jupyter_nbformat
+ python3-jupyter_notebook python3-jupyterlab_pygments python3-kiwisolver
+ python3-matplotlib python3-matplotlib-inline python3-mistune
+ python3-mpmath python3-nbclient python3-nest_asyncio python3-networkx
+ python3-numpy python3-packaging python3-pandocfilters python3-parsing
+ python3-parso python3-pexpect python3-pickleshare python3-pip
+ python3-pkgconfig python3-pluggy python3-ply python3-prometheus_client
+ python3-prompt_toolkit python3-ptyprocess python3-py python3-pybind11
+ python3-pycparser python3-pyrsistent python3-pytz python3-pyzmq
+ python3-requests python3-scipy python3-send2trash python3-setuptools
+ python3-setuptools_scm python3-simplegeneric python3-six
+ python3-snowballstemmer python3-sphinxcontrib-applehelp
+ python3-sphinxcontrib-devhelp python3-sphinxcontrib-htmlhelp
+ python3-sphinxcontrib-jsmath python3-sphinxcontrib-qthelp
+ python3-sphinxcontrib-serializinghtml python3-sympy python3-terminado
+ python3-testpath python3-texttable python3-toml python3-tomli
+ python3-tornado python3-traitlets python3-typing_extensions
+ python3-tzlocal python3-urllib3 python3-wcwidth python3-webencodings
+ python3-wheel python3-zipp pythran
+ "
+
+if [ "$build_option_system_site_packages" ]; then
+	makedepends+=" $_sage_python3_modules"
+	depends+=" $_sage_python3_modules"
+fi

From 899e40ad0d7939e6484df92080922a0723a28ca9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 3 Jan 2022 20:47:52 -0300
Subject: [PATCH 24/48] sagemath: use small source tarball + upstream packages

---
 srcpkgs/sagemath/template | 97 ++++++++++++++++++++++++++-------------
 1 file changed, 64 insertions(+), 33 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index a32c5d18f378..0de0061b09df 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -18,8 +18,8 @@ short_desc="Open source mathematics software"
 maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
-distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
-checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
+distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
+checksum=aea4c5a8d3b32af2fba644269b9daf4f62471471ba2d7d83da0f8098a5f53225
 python_version=3
 
 build_options="debug system_python3 system_site_packages"
@@ -33,42 +33,72 @@ configure_args+=" $(vopt_enable system_site_packages)"
 # 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} ;;
-esac
+_SAGE_UPSTREAM_MIRROR=https://mirrors.mit.edu/sage/spkg/upstream
 
-# extra upstream packages (trac-32968 / trac-33040)
 _upstream="
- https://pypi.io/packages/source/s/sphinx/Sphinx-4.3.1.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
+${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
+${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
+${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
+${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
+${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
+${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
+${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
+https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
+https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
+http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
+${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
+${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
+${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
+${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
+${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
+https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
+${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
+https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
+${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
 "
 
 checksum+="
- 32a5b3e9a1b176cc25ed048557d4d3d01af635e6b76c5bc7a43b0a34447fbd45
-
- 9c87405839a19696e837b3b818fed3f5f69f16f1eec1a1ad77e043dcea9c772f
- fc4453705b81d03568d5b808ad8f09c77c47534f6ac2e72e733f9ca4714aa75c
- acad2d8b20a1af07d4e4c9d2e9285c5ed9104354062f275f3fcd88dcef4f1326
- 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
- 78884e7c1d4b00ce3cea67b44566851c4343c120abd683433ce934a68ea58872
- 0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86
- b8e2f83c56e141920c39464b852de3719dfbfb6e3c99a2d8da0edf4fb33176ed
- d9bdec0013ef1eb5a84ab39a3b3868911598afa494f5faa038647101504e2b81
- b2e9810e09c3a47b73ce9cab5a72243a1258f61e7900969097a817232246ce1c
- 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
- 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
+c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
+d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
+4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
+3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
+03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
+5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
+cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
+5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
+581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
+6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
+07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
+a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
+ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
+d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
+169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
+5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
+cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
+471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
+78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
+edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
+b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
+3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
+545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
+cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
+718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
+dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
 "
 
 for u in ${_upstream}; do
@@ -101,6 +131,7 @@ post_extract() {
 	mv -T $wrksrc $_SAGE_ROOT
 	ln -srfT $_SAGE_ROOT $wrksrc
 
+	mkdir -p $wrksrc/upstream
 	for u in ${_upstream}; do
 		cp "$XBPS_SRCDISTDIR/${pkgname}-${version}/${u##*[/>]}" $wrksrc/upstream
 	done

From e11081a34f37e456ad308a05b3da376070de8b16 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 13:38:02 -0300
Subject: [PATCH 25/48] sagemath: for CI use fixed random-seed=0

---
 srcpkgs/sagemath/template | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 0de0061b09df..b5b99d2c122d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -194,6 +194,10 @@ do_check() {
 	if [ -z "$_test_args" ]; then
 		_test_args=--all
 	fi
+	if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
+		# for CI use a predictable random seed
+		_test_args="--random-seed=0 $_test_args"
+	fi
 	if [ "$XBPS_CHECK_PKGS" = full ]; then
 		_test_args="--long $_test_args"
 	else

From 6b1a8633a396d7bef03753d3d232095a62e2982b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 14:40:27 -0300
Subject: [PATCH 26/48] sagemath: upstream two patches

---
 ...ble-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch} |  6 +++---
 ...rse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch} | 10 +++++-----
 2 files changed, 8 insertions(+), 8 deletions(-)
 rename srcpkgs/sagemath/patches/{0001-sage-site-exec-only-if-it-is-executable.patch => trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch} (94%)
 rename srcpkgs/sagemath/patches/{0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch => trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch} (81%)

diff --git a/srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch b/srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
similarity index 94%
rename from srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch
rename to srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
index ce17c6d6e954..7fdb3d697222 100644
--- a/srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch
+++ b/srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
@@ -1,14 +1,14 @@
 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
+Subject: 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
+index 4c0fa17..153e610 100755
 --- a/src/bin/sage
 +++ b/src/bin/sage
 @@ -129,7 +129,7 @@ usage() {
@@ -39,5 +39,5 @@ index 4c0fa17426..153e610a2e 100755
              # fallthrough if there is no sage-site script
          fi
 -- 
-2.34.1
+cgit v1.0-1-gd88e
 
diff --git a/srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch b/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
similarity index 81%
rename from srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch
rename to srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
index bab6d8441d42..350c41ac3928 100644
--- a/srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch
+++ b/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
@@ -1,16 +1,16 @@
-From 57e3eba28c9b4ee6bd3407d0715b8bd00aaf04a7 Mon Sep 17 00:00:00 2001
+From 53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6 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
+Subject: sagetex: Fix a warning when byte-compiling sagetexparse.py
 
 ---
- .../sagetex/patches/sagetex-fix-warning.patch    | 16 ++++++++++++++++
+ build/pkgs/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
+index 00000000..d82ab67
 --- /dev/null
 +++ b/build/pkgs/sagetex/patches/sagetex-fix-warning.patch
 @@ -0,0 +1,16 @@
@@ -31,5 +31,5 @@ index 0000000000..d82ab675dd
 +     self.result += t.code[1:-1] + '\n\n'
 + 
 -- 
-2.34.1
+cgit v1.0-1-gd88e
 

From 2ec6f6de7f6023b10b180a06c572895fd63b3d4c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 19:57:59 -0300
Subject: [PATCH 27/48] sagemath: reorder upstream sources and add two missing
 ones

---
 srcpkgs/sagemath/template | 60 ++++++++++++++++++++++-----------------
 1 file changed, 34 insertions(+), 26 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index b5b99d2c122d..f53cba947c88 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -36,69 +36,77 @@ _SAGE_ROOT=/usr/lib/sage-${version}
 _SAGE_UPSTREAM_MIRROR=https://mirrors.mit.edu/sage/spkg/upstream
 
 _upstream="
-${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
 ${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
 ${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
+
+${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
 ${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
 ${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
 ${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
 ${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
 ${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
 ${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
-https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
-https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
-http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
 ${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
 ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
 ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
 ${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
 ${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${PYPI_SITE}/P/PyCygwin/PyCygwin-0.1.tar.gz
 ${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
-https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+${PYPI_SITE}/s/setuptools/setuptools-59.2.0.tar.gz
 ${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
 ${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
-https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
 ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
+
+https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
+https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
+http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
+https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
 "
 
 checksum+="
-dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
 c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
 d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
+5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
+ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
+169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
+cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
+edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
+cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
+
+dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
 3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
 03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
 5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
 cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
-5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
-c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
-6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
-07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
 a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
-ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
 d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
-169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
 5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
-cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
 471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
 78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
-edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+45a5e295590c469a49b2804bfdb89059e942d768ad3b813f484d7b5bff48d226
 ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
-b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
-3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+157d21de9d055ab9e8ea3186d91e7f4f865e11f42deafa952d90842671fc2576
 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
 545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
-cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
-718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
 dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
+
+c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
+6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
+07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
+3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
 "
 
 for u in ${_upstream}; do

From 3b6948e38352c4cd05ac958e2badd56a36d46b7f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 9 Jan 2022 12:45:47 -0300
Subject: [PATCH 28/48] sagemath: do not download anything patch

---
 .../patches/00-Do_not_download_anything.patch         | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 srcpkgs/sagemath/patches/00-Do_not_download_anything.patch

diff --git a/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch b/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch
new file mode 100644
index 000000000000..35aef7b8d456
--- /dev/null
+++ b/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch
@@ -0,0 +1,11 @@
+--- a/build/sage_bootstrap/tarball.py	2022-01-07 19:17:06.754747955 -0300
++++ b/build/sage_bootstrap/tarball.py	2022-01-07 19:25:31.844139381 -0300
+@@ -158,6 +158,8 @@
+                             .format(destination=destination))
+         successful_download = False
+         log.info('Attempting to download package {0} from mirrors'.format(self.filename))
++        log.info('ERROR: downloading is disabled, add file to template instead')
++        return
+         for mirror in MirrorList():
+             url = mirror + '/'.join(['spkg', 'upstream', self.package.name, self.filename])
+             log.info(url)

From 36abe91e9fb0dcf744995c499bde0bf40b711c42 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 9 Jan 2022 13:27:49 -0300
Subject: [PATCH 29/48] sagemath: update to 9.5.rc0.

---
 ...184f7498a2046065e669723e68efe2d65cee.patch |    6 +-
 ...1d4ced4264f65ab704f725f6f5879b012796.patch |  263 ----
 ...a54526829b79d5d236a40f83ddc6ce7b2696.patch | 1196 -----------------
 ...9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch |   27 -
 ...3f4f32246ad9ded6d37f1f2f12a589a81f4.patch} |    4 +-
 ...03138d0403be7c7cb303de2bc0a0e0b6793c.patch |   82 --
 ...f3a1611fed0cc66fb838eb85739646dd34d.patch} |   94 +-
 ...49c415e11d0522bff9013bc1509264b26ebf.patch |   27 +
 ...ip_doctest_singular_4.2.1--see_33134.patch |   13 +
 srcpkgs/sagemath/template                     |    6 +-
 10 files changed, 72 insertions(+), 1646 deletions(-)
 delete mode 100644 srcpkgs/sagemath/patches/trac-30766-system_python_3.10-df9f1d4ced4264f65ab704f725f6f5879b012796.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
 rename srcpkgs/sagemath/patches/{trac-33064-sage_docbuild_ignore_cache_save_permission_error-f767cf1eadfd8ab540a31c5c5ef09d56df09b90e.patch => trac-33064-sage_docbuild_ignore_cache_save_permission_error-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch} (92%)
 delete mode 100644 srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
 rename srcpkgs/sagemath/patches/{trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch => trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch} (63%)
 create mode 100644 srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch

diff --git a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
index b641113927e7..0ecb27c593cd 100644
--- a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
+++ b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
@@ -5615,9 +5615,9 @@ index 84f3d50..c7ad206 100644
      EXAMPLES::
  
          sage: sorted(installed_packages().keys())  # optional - build
--        [...'alabaster', ...'sage_conf', ...]
--        sage: installed_packages()['alabaster']  # optional - build, random
--        '0.7.12'
+-        [...'gmpy2', ...'sage_conf', ...]
+-        sage: installed_packages()['gmpy2']  # optional - build, random
+-        '2.1.0b5'
 +        [...'sage_conf', ...]
 +        sage: installed_packages()['sage_conf']  # optional - build, random
 +        '9.5'
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
deleted file mode 100644
index a1cb4c834482..000000000000
--- a/srcpkgs/sagemath/patches/trac-30766-system_python_3.10-df9f1d4ced4264f65ab704f725f6f5879b012796.patch
+++ /dev/null
@@ -1,263 +0,0 @@
-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-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch b/srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
deleted file mode 100644
index 3ae6fe01822d..000000000000
--- a/srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
+++ /dev/null
@@ -1,1196 +0,0 @@
-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/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch b/srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
deleted file mode 100644
index 485fb0176f45..000000000000
--- a/srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-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: 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 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"
- 
- # 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)
--- 
-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-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
similarity index 92%
rename from srcpkgs/sagemath/patches/trac-33064-sage_docbuild_ignore_cache_save_permission_error-f767cf1eadfd8ab540a31c5c5ef09d56df09b90e.patch
rename to srcpkgs/sagemath/patches/trac-33064-sage_docbuild_ignore_cache_save_permission_error-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
index 20fa12e570eb..04f04cfd6718 100644
--- 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-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
@@ -1,4 +1,4 @@
-From f767cf1eadfd8ab540a31c5c5ef09d56df09b90e Mon Sep 17 00:00:00 2001
+From e89193f4f32246ad9ded6d37f1f2f12a589a81f4 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
@@ -8,7 +8,7 @@ Subject: sage_docbuild: do not fail when cache cannot be saved
  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
+index 466ca82..f8c8ebd 100644
 --- a/src/sage_docbuild/__init__.py
 +++ b/src/sage_docbuild/__init__.py
 @@ -856,9 +856,12 @@ class ReferenceSubBuilder(DocBuilder):
diff --git a/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch b/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
deleted file mode 100644
index 6bc5193b75ee..000000000000
--- a/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-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
-
-
-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/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch b/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
similarity index 63%
rename from srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch
rename to srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
index 3794aa7f019b..04fca4815a00 100644
--- a/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch
+++ b/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
@@ -1,4 +1,4 @@
-From 7d3381b21e4716cfa8a33915621a12f0eba74233 Mon Sep 17 00:00:00 2001
+From 18d0477153af6f453a0e84f78030535f6a36ce87 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
@@ -10,56 +10,56 @@ Subject: doctests: remove dochtml label from some tests that don't need docs
  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
+index c788623..527ed90 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  # optional - sagemath_doc_html
+-        sage: thematic_index = os.path.join(SAGE_DOC, "html", "en", "thematic_tutorials", "index.html")  # optional - sagemath_doc_html
 +        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
+         sage: for line in open(thematic_index).readlines():  # optional - sagemath_doc_html
          ....:     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
+index 4c56aea..583ca06 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  # optional - sagemath_doc_html
+-    sage: docfilename = os.path.join(SAGE_DOC, 'html', 'en', 'reference', 'calculus', 'sage', 'symbolic', 'expression.html')  # optional - sagemath_doc_html
 +    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
+     sage: with open(docfilename) as fobj:  # optional - sagemath_doc_html
      ....:     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='',
+@@ -845,12 +845,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  # optional - sagemath_doc_html
+-        sage: len(_search_src_or_doc('src', r'matrix\(', 'incidence_structures', 'self', 'combinat', interact=False).splitlines()) > 1  # optional - sagemath_doc_html
 +        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)
+         sage: 'abvar/homology' in _search_src_or_doc('doc', 'homology', 'variety', interact=False)  # optional - sagemath_doc_html, 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)  # optional - sagemath_doc_html
 +        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:
+@@ -1369,7 +1369,7 @@ class _sage_doc:
  
-         sage: browse_sage_doc._open("reference", testing=True)[0]  # optional - dochtml, indirect doctest
+         sage: browse_sage_doc._open("reference", testing=True)[0]  # optional - sagemath_doc_html, 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]  # optional - sagemath_doc_html
 +        sage: browse_sage_doc(identity_matrix, 'rst')[-107:-47]
          'Full MatrixSpace of 3 by 3 sparse matrices over Integer Ring'
      """
@@ -68,7 +68,7 @@ index eb70516..b4848ed 100644
 cgit v1.0-1-gd88e
 
 
-From 42a76c3f82edecc9c6c53c661251677e3e907584 Mon Sep 17 00:00:00 2001
+From 88dd9f3a1611fed0cc66fb838eb85739646dd34d 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
@@ -78,7 +78,7 @@ Subject: doctests: add dochtml label to some tests that need docs installed
  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
+index f8c8ebd..d329009 100644
 --- a/src/sage_docbuild/__init__.py
 +++ b/src/sage_docbuild/__init__.py
 @@ -105,7 +105,7 @@ def builder_helper(type):
@@ -86,7 +86,7 @@ index 4a71c91..dd233bd 100644
          sage: from sage_docbuild import _build_many as build_many
          sage: helper = builder_helper("html")
 -        sage: try:
-+        sage: try:  # optional - dochtml
++        sage: try:  # optional - sagemath_doc_html
          ....:     build_many(build_ref_doc, [("docname", "en", "html", {})])
          ....: except Exception as E:
          ....:     "Non-exception during docbuild: abort pool operation" in str(E)
@@ -95,7 +95,7 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import DocBuilder
              sage: b = DocBuilder('tutorial')
 -            sage: b._output_dir('html')
-+            sage: b._output_dir('html')         # optional - dochtml
++            sage: b._output_dir('html')         # optional - sagemath_doc_html
              '.../html/en/tutorial'
          """
          d = os.path.join(SAGE_DOC, type, self.lang, self.name)
@@ -104,7 +104,7 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import DocBuilder
              sage: b = DocBuilder('tutorial')
 -            sage: b._doctrees_dir()
-+            sage: b._doctrees_dir()             # optional - docthml
++            sage: b._doctrees_dir()             # optional - sagemath_doc_html
              '.../doctrees/en/tutorial'
          """
          d = os.path.join(SAGE_DOC, 'doctrees', self.lang, self.name)
@@ -113,7 +113,7 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import ReferenceBuilder
              sage: b = ReferenceBuilder('reference')
 -            sage: b._output_dir('html')
-+            sage: b._output_dir('html')         # optional - dochtml
++            sage: b._output_dir('html')         # optional - sagemath_doc_html
              '.../html/en/reference'
          """
          if lang is None:
@@ -122,56 +122,10 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import ReferenceTopBuilder
              sage: b = ReferenceTopBuilder('reference')
 -            sage: b._output_dir('html')
-+            sage: b._output_dir('html')         # optional - dochtml
++            sage: b._output_dir('html')         # optional - sagemath_doc_html
              '.../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/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch b/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
new file mode 100644
index 000000000000..d32f1e4d5e9f
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
@@ -0,0 +1,27 @@
+From 836249c415e11d0522bff9013bc1509264b26ebf Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Sun, 9 Jan 2022 16:51:22 -0300
+Subject: trac 33135: add filter to ignore deprecation warnings
+
+---
+ src/sage/all.py | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/sage/all.py b/src/sage/all.py
+index 01ef327..19ca3d4 100644
+--- a/src/sage/all.py
++++ b/src/sage/all.py
+@@ -96,6 +96,10 @@ warnings.filterwarnings('ignore', category=DeprecationWarning,
+ warnings.filterwarnings('ignore', category=DeprecationWarning,
+                         module='pythran')
+ 
++warnings.filterwarnings('ignore', category=DeprecationWarning,
++                        message='The distutils(.sysconfig module| package) is deprecated',
++                        module='numpy|sage.env|sage.features')
++
+ ################ end setup warnings ###############################
+ 
+ 
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
new file mode 100644
index 000000000000..438078a92036
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage/rings/polynomial/hilbert.pyx b/src/sage/rings/polynomial/hilbert.pyx
+index 4cd91d0a46..323b168c4e 100644
+--- a/src/sage/rings/polynomial/hilbert.pyx
++++ b/src/sage/rings/polynomial/hilbert.pyx
+@@ -578,7 +578,7 @@ def hilbert_poincare_series(I, grading=None):
+ 
+     This example exceeded the capabilities of Singular before version 4.2.1p2::
+ 
+-        sage: J.hilbert_numerator(algorithm='singular')
++        sage: J.hilbert_numerator(algorithm='singular')   # not tested - requires singular 4.2.1p2
+         120*t^33 - 3465*t^32 + 48180*t^31 - 429374*t^30 + 2753520*t^29 - 13522410*t^28 + 52832780*t^27 - 168384150*t^26 + 445188744*t^25 - 987193350*t^24 + 1847488500*t^23 + 1372406746*t^22 - 403422496*t^21 - 8403314*t^20 - 471656596*t^19 + 1806623746*t^18 + 752776200*t^17 + 752776200*t^16 - 1580830020*t^15 + 1673936550*t^14 - 1294246800*t^13 + 786893250*t^12 - 382391100*t^11 + 146679390*t^10 - 42299400*t^9 + 7837830*t^8 - 172260*t^7 - 468930*t^6 + 183744*t^5 - 39270*t^4 + 5060*t^3 - 330*t^2 + 1
+ 
+     """
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f53cba947c88..f688629fc26d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -1,6 +1,6 @@
 # Template file for 'sagemath'
 pkgname=sagemath
-version=9.5.beta9
+version=9.5.rc0
 revision=1
 wrksrc=sage-$version
 build_style=configure
@@ -19,7 +19,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
-checksum=aea4c5a8d3b32af2fba644269b9daf4f62471471ba2d7d83da0f8098a5f53225
+checksum=8012e3ac35290fa9b2cb837eeca149925784c2378b486731226944e4afd8a4e6
 python_version=3
 
 build_options="debug system_python3 system_site_packages"
@@ -128,7 +128,7 @@ nostrip=yes
 noshlibprovides=yes
 
 # don't rewrite python shebang as sage uses its own python (for now)
-_no_python_shebang=yes
+#_no_python_shebang=yes
 
 # compile python code in sage venv
 pycompile_dirs="$_SAGE_ROOT/venv/"

From 75c7f82e4cdc84d9bafcc64c2cbe5d79be98a2e3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 10 Jan 2022 16:32:54 -0300
Subject: [PATCH 30/48] sagemath: use system gap

---
 ...f491e5ce599ba185f5e93f02e0fcebd76c9e.patch | 57 +++++++++++++++++++
 .../patches/zzz-skip_doctest_system_gap.patch | 13 +++++
 srcpkgs/sagemath/template                     | 15 ++++-
 3 files changed, 82 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch

diff --git a/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch b/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
new file mode 100644
index 000000000000..da88a369db0d
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
@@ -0,0 +1,57 @@
+From 2c981351bb60089530b0598d3e9a909a23d4d4d8 Mon Sep 17 00:00:00 2001
+From: Thierry Thomas <thierry@FreeBSD.org>
+Date: Mon, 22 Mar 2021 03:04:12 +0100
+Subject: 29644: Add spkg-configure.m4 for gap
+
+---
+ build/pkgs/gap/spkg-configure.m4 | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+ create mode 100644 build/pkgs/gap/spkg-configure.m4
+
+diff --git a/build/pkgs/gap/spkg-configure.m4 b/build/pkgs/gap/spkg-configure.m4
+new file mode 100644
+index 00000000..91cd089
+--- /dev/null
++++ b/build/pkgs/gap/spkg-configure.m4
+@@ -0,0 +1,8 @@
++SAGE_SPKG_CONFIGURE([gap], [
++    SAGE_SPKG_DEPCHECK([gmp], [
++       AC_CHECK_HEADER([gap/system.h], [
++        AC_SEARCH_LIBS([GAP_COMM], [gap], [
++        ], [sage_spkg_install_gap=yes])
++       ], [sage_spkg_install_gap=yes])
++    ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2a41f491e5ce599ba185f5e93f02e0fcebd76c9e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Samuel=20Leli=C3=A8vre?= <samuel.lelievre@gmail.com>
+Date: Mon, 22 Mar 2021 03:05:31 +0100
+Subject: 29644: Add distro information for gap
+
+---
+ build/pkgs/gap/distros/fedora.txt | 1 +
+ build/pkgs/gap/distros/gentoo.txt | 1 +
+ 2 files changed, 2 insertions(+)
+ create mode 100644 build/pkgs/gap/distros/fedora.txt
+ create mode 100644 build/pkgs/gap/distros/gentoo.txt
+
+diff --git a/build/pkgs/gap/distros/fedora.txt b/build/pkgs/gap/distros/fedora.txt
+new file mode 100644
+index 00000000..ea4feae
+--- /dev/null
++++ b/build/pkgs/gap/distros/fedora.txt
+@@ -0,0 +1 @@
++gap
+diff --git a/build/pkgs/gap/distros/gentoo.txt b/build/pkgs/gap/distros/gentoo.txt
+new file mode 100644
+index 00000000..ea64ec9
+--- /dev/null
++++ b/build/pkgs/gap/distros/gentoo.txt
+@@ -0,0 +1 @@
++sci-mathematics/gap
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
new file mode 100644
index 000000000000..f132591d48ac
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage_setup/optional_extension.py b/src/sage_setup/optional_extension.py
+index f252849384..4034e3e196 100644
+--- a/src/sage_setup/optional_extension.py
++++ b/src/sage_setup/optional_extension.py
+@@ -80,7 +80,7 @@ def OptionalExtension(*args, **kwds):
+         sage: print(ext.__class__.__name__)
+         CythonizeExtension
+         sage: ext = OptionalExtension("foo", ["foo.c"], package="gap")
+-        sage: print(ext.__class__.__name__)
++        sage: print(ext.__class__.__name__)     # not tested - fails with system gap
+         Extension
+     """
+     try:
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f688629fc26d..02b0af4ad16d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -66,7 +66,6 @@ ${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
 ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
 
 https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
-https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
 http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
 https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
 https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
@@ -103,7 +102,6 @@ ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
 dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
 
 c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
-6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
 07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
 3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
 718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
@@ -159,6 +157,13 @@ pre_configure() {
 	export MAKE="make -j ${XBPS_MAKEJOBS}"
 }
 
+post_configure() {
+	# we set some variables, right after configure has created sage_conf.py
+	cat <<-EOF >> pkgs/sage-conf/sage_conf.py
+	GAP_ROOT_DIR = "/usr/share/gap"
+	EOF
+}
+
 # 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
@@ -248,7 +253,11 @@ makedepends+="
  gengetopt texinfo
  brial-devel cliquer-devel gfan libbraiding-devel libhomfly-devel
  lrcalc-devel nauty-devel palp tachyon
- maxima-ecl primesieve-devel primecount-devel
+ maxima-ecl primesieve-devel primecount-devel gap-devel
+"
+
+# optional dependencies
+makedepends+="
  ffmpeg ImageMagick
 "
 

From e97cfacc19183c4cfc0e6cc8b64e95efdd010292 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Thu, 13 Jan 2022 03:21:19 -0300
Subject: [PATCH 31/48] sagemath: fixes for system gap

---
 .../zzz-fixes_for_system_gap--see_29644.patch | 96 +++++++++++++++++++
 .../patches/zzz-skip_doctest_system_gap.patch | 13 ---
 srcpkgs/sagemath/template                     |  1 +
 3 files changed, 97 insertions(+), 13 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
 delete mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch

diff --git a/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch b/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
new file mode 100644
index 000000000000..741d2b23a7f5
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
@@ -0,0 +1,96 @@
+From 346b4ea4c92f4287d3c097b92817cf2abfcddd8c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Thu, 13 Jan 2022 01:41:31 -0300
+Subject: [PATCH] gap: fixes for using system gap
+
+ - fix _get_shared_lib_path() so we don't need to configure GAP_SO
+ - fix gap_root() so we don't need to configure GAP_ROOT_DIR
+ - skip a useless test that cannot succeed on system gap
+ - use gap_root() in saved_workspace.py instead of GAP_ROOT_DIR
+---
+ src/sage/env.py                      |  2 +-
+ src/sage/libs/gap/saved_workspace.py |  4 ++--
+ src/sage/libs/gap/util.pyx           | 11 +++++++++++
+ src/sage_setup/optional_extension.py |  2 +-
+ 4 files changed, 15 insertions(+), 4 deletions(-)
+
+diff --git a/src/sage/env.py b/src/sage/env.py
+index c4953cfa65..c16696d298 100644
+--- a/src/sage/env.py
++++ b/src/sage/env.py
+@@ -293,7 +293,7 @@ def _get_shared_lib_path(*libnames: str) -> Optional[str]:
+             if sys.platform == 'darwin':
+                 ext = 'dylib'
+             else:
+-                ext = 'so'
++                ext = 'so*'
+ 
+             if SAGE_LOCAL:
+                 search_directories.append(Path(SAGE_LOCAL) / 'lib')
+diff --git a/src/sage/libs/gap/saved_workspace.py b/src/sage/libs/gap/saved_workspace.py
+index ad5adec36d..59c498795f 100644
+--- a/src/sage/libs/gap/saved_workspace.py
++++ b/src/sage/libs/gap/saved_workspace.py
+@@ -8,7 +8,7 @@ workspaces.
+ 
+ import os
+ import glob
+-from sage.env import GAP_ROOT_DIR
++from sage.libs.gap.util import gap_root
+ from sage.interfaces.gap_workspace import gap_workspace_file
+ 
+ 
+@@ -31,7 +31,7 @@ def timestamp():
+     """
+     libgap_dir = os.path.dirname(__file__)
+     libgap_files = glob.glob(os.path.join(libgap_dir, '*'))
+-    gap_packages = glob.glob(os.path.join(GAP_ROOT_DIR, 'pkg', '*'))
++    gap_packages = glob.glob(os.path.join(gap_root(), 'pkg', '*'))
+     files = libgap_files + gap_packages
+     if len(files) == 0:
+         print('Unable to find LibGAP files.')
+diff --git a/src/sage/libs/gap/util.pyx b/src/sage/libs/gap/util.pyx
+index 08c4c40cc0..c7dd557c35 100644
+--- a/src/sage/libs/gap/util.pyx
++++ b/src/sage/libs/gap/util.pyx
+@@ -23,6 +23,7 @@ from cysignals.signals cimport sig_on, sig_off
+ import os
+ import warnings
+ import sage.env
++import subprocess
+ 
+ from .gap_includes cimport *
+ from .element cimport *
+@@ -178,6 +179,16 @@ def gap_root():
+     if os.path.exists(sage.env.GAP_ROOT_DIR):
+         return sage.env.GAP_ROOT_DIR
+ 
++    gap_expr = 'JoinStringsWithSeparator(KERNEL_INFO().GAP_ROOT_PATHS,";")'
++    gap_root_paths = subprocess.getoutput(
++        f"gap -r -q --bare --nointeract -c 'Display({gap_expr});'"
++        ).strip().split(';')
++
++    for gapdir in gap_root_paths:
++        if os.path.exists(os.path.join(gapdir, 'sysinfo.gap')):
++            sage.env.GAP_ROOT_DIR = gapdir
++            return gapdir
++
+     # Attempt to figure out the appropriate GAP_ROOT by reading the
+     # local/bin/gap shell script; this is an ugly hack that exists for
+     # historical reasons; the best approach to setting where Sage looks for
+diff --git a/src/sage_setup/optional_extension.py b/src/sage_setup/optional_extension.py
+index f252849384..4034e3e196 100644
+--- a/src/sage_setup/optional_extension.py
++++ b/src/sage_setup/optional_extension.py
+@@ -80,7 +80,7 @@ def OptionalExtension(*args, **kwds):
+         sage: print(ext.__class__.__name__)
+         CythonizeExtension
+         sage: ext = OptionalExtension("foo", ["foo.c"], package="gap")
+-        sage: print(ext.__class__.__name__)
++        sage: print(ext.__class__.__name__)     # not tested - fails with system gap
+         Extension
+     """
+     try:
+-- 
+2.34.1
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
deleted file mode 100644
index f132591d48ac..000000000000
--- a/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/src/sage_setup/optional_extension.py b/src/sage_setup/optional_extension.py
-index f252849384..4034e3e196 100644
---- a/src/sage_setup/optional_extension.py
-+++ b/src/sage_setup/optional_extension.py
-@@ -80,7 +80,7 @@ def OptionalExtension(*args, **kwds):
-         sage: print(ext.__class__.__name__)
-         CythonizeExtension
-         sage: ext = OptionalExtension("foo", ["foo.c"], package="gap")
--        sage: print(ext.__class__.__name__)
-+        sage: print(ext.__class__.__name__)     # not tested - fails with system gap
-         Extension
-     """
-     try:
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 02b0af4ad16d..0d8ce1f7a70a 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -161,6 +161,7 @@ post_configure() {
 	# we set some variables, right after configure has created sage_conf.py
 	cat <<-EOF >> pkgs/sage-conf/sage_conf.py
 	GAP_ROOT_DIR = "/usr/share/gap"
+	GAP_SO = "$(objdump -p /usr/lib/libgap.so | awk '/SONAME/{print $2}')"
 	EOF
 }
 

From 3a380c61dde77f6a5667d10297b29f2fb8521cac Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Thu, 13 Jan 2022 15:47:33 -0300
Subject: [PATCH 32/48] New package: sagemath-test

---
 srcpkgs/sagemath-test/template                | 32 +++++++++++++++++++
 .../patches/zzz-skip_doctest_shebang.patch    | 11 +++++++
 2 files changed, 43 insertions(+)
 create mode 100644 srcpkgs/sagemath-test/template
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch

diff --git a/srcpkgs/sagemath-test/template b/srcpkgs/sagemath-test/template
new file mode 100644
index 000000000000..3e0b1c3233fd
--- /dev/null
+++ b/srcpkgs/sagemath-test/template
@@ -0,0 +1,32 @@
+# Template file for 'sagemath-test'
+pkgname=sagemath-test
+version=1
+revision=1
+build_style=meta
+checkdepends="sagemath"
+short_desc="Dummy package to test sagemath"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-2.0-or-later"
+homepage="none"
+
+# TODO: install base-voidstrap, uninstall base-chroot, and remove orphans
+# so we can check sagemath depends are enough to run sage on void
+
+do_check() {
+	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
+		_test_args=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	fi
+	if [ -z "$_test_args" ]; then
+		_test_args=--all
+	fi
+	if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
+		# for CI use a predictable random seed
+		_test_args="--random-seed=0 $_test_args"
+	fi
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args="--long $_test_args"
+	else
+		_test_args="--warn-long 5.0 $_test_args"
+	fi
+	/usr/bin/sage* -tp ${XBPS_MAKEJOBS} ${_test_args}
+}
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch
new file mode 100644
index 000000000000..04fa2acbf3ec
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch
@@ -0,0 +1,11 @@
+--- a/src/sage/tests/cmdline.py
++++ b/src/sage/tests/cmdline.py
+@@ -488,7 +488,7 @@ def test_executable(args, input="", timeout=100.0, pydebug_ignore_warnings=False
+         0
+ 
+         sage: (out, err, ret) = test_executable(["sage", "--cython"])
+-        sage: print(err)
++        sage: print(err)  # not tested - broken when shebang is rewritten
+         Cython (http://cython.org) is a compiler for code written in the
+         Cython language.  Cython is based on Pyrex by Greg Ewing.
+         ...

From 0bdbdb1787e5c102fbc0704352d3552821dd8202 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 11:34:23 -0300
Subject: [PATCH 33/48] sagemath: cleanup and one patch

---
 .../zzz-skip_doctest_sage_setup_find.patch    | 12 ++++++++
 srcpkgs/sagemath/template                     | 30 ++++---------------
 2 files changed, 18 insertions(+), 24 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch

diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch
new file mode 100644
index 000000000000..15aed02f9aaa
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch
@@ -0,0 +1,12 @@
+--- a/src/sage_setup/find.py
++++ b/src/sage_setup/find.py
+@@ -301,7 +301,7 @@ def find_extra_files(src_dir, modules, cythonized_dir, special_filenames=[]):
+         sage: extras["sage/libs/mpfr"]
+         [...sage/libs/mpfr/types.pxd...]
+         sage: extras["sage/ext/interpreters"]
+-        ['.../src/sage/ext/interpreters/wrapper_cdf.pxd', ...wrapper_cdf.h...]
++        ['.../src/sage/ext/interpreters/wrapper_cdf.pxd', ...]
+     """
+     from Cython.Utils import is_package_dir
+ 
+--
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 0d8ce1f7a70a..f25cb745c9c4 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -4,7 +4,8 @@ version=9.5.rc0
 revision=1
 wrksrc=sage-$version
 build_style=configure
-configure_args="--enable-build-as-root"
+configure_args="--enable-build-as-root --with-system-python3
+ --enable-system-site-packages"
 make_check_target=ptest
 # for now skip building docs
 make_build_target=build
@@ -22,13 +23,8 @@ distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
 checksum=8012e3ac35290fa9b2cb837eeca149925784c2378b486731226944e4afd8a4e6
 python_version=3
 
-build_options="debug system_python3 system_site_packages"
+build_options="debug"
 desc_option_debug="Build with debug symbols"
-desc_option_system_python="Build using system python 3"
-desc_option_system_python="Build using system python site-packages"
-build_options_default="system_python3 system_site_packages"
-configure_args+=" $(vopt_with system_python3)"
-configure_args+=" $(vopt_enable system_site_packages)"
 
 # path where sage will be installed
 _SAGE_ROOT=/usr/lib/sage-${version}
@@ -112,9 +108,6 @@ for u in ${_upstream}; do
 	skip_extraction+=" ${u##*[/>]}"
 done
 
-# 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
@@ -165,16 +158,6 @@ post_configure() {
 	EOF
 }
 
-# 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() {
 	vlicense COPYING.txt
 	vdoc README.md
@@ -301,7 +284,6 @@ _sage_python3_modules="
  python3-wheel python3-zipp pythran
  "
 
-if [ "$build_option_system_site_packages" ]; then
-	makedepends+=" $_sage_python3_modules"
-	depends+=" $_sage_python3_modules"
-fi
+# python packages are build and runtime dependencies
+makedepends+=" $_sage_python3_modules"
+depends+=" $_sage_python3_modules"

From 27ec15d3f6d3574e7344677e37d681fe92021fdd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 11:34:32 -0300
Subject: [PATCH 34/48] sagemath: update to 9.5.rc1.

---
 srcpkgs/sagemath/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f25cb745c9c4..f5d9d0f0fabd 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -1,6 +1,6 @@
 # Template file for 'sagemath'
 pkgname=sagemath
-version=9.5.rc0
+version=9.5.rc1
 revision=1
 wrksrc=sage-$version
 build_style=configure
@@ -20,7 +20,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
-checksum=8012e3ac35290fa9b2cb837eeca149925784c2378b486731226944e4afd8a4e6
+checksum=b015c54f7411669ef70bac2b2fde260e7f45724bcff170957b1f9fd08131f2c3
 python_version=3
 
 build_options="debug"

From ea41077edf87970f6ae8d9d62231f8d2362c9100 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 14:53:11 -0300
Subject: [PATCH 35/48] sagemath: patch not needed with singular 4.3.0

---
 ...zzz-skip_doctest_singular_4.2.1--see_33134.patch | 13 -------------
 1 file changed, 13 deletions(-)
 delete mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch

diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
deleted file mode 100644
index 438078a92036..000000000000
--- a/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/src/sage/rings/polynomial/hilbert.pyx b/src/sage/rings/polynomial/hilbert.pyx
-index 4cd91d0a46..323b168c4e 100644
---- a/src/sage/rings/polynomial/hilbert.pyx
-+++ b/src/sage/rings/polynomial/hilbert.pyx
-@@ -578,7 +578,7 @@ def hilbert_poincare_series(I, grading=None):
- 
-     This example exceeded the capabilities of Singular before version 4.2.1p2::
- 
--        sage: J.hilbert_numerator(algorithm='singular')
-+        sage: J.hilbert_numerator(algorithm='singular')   # not tested - requires singular 4.2.1p2
-         120*t^33 - 3465*t^32 + 48180*t^31 - 429374*t^30 + 2753520*t^29 - 13522410*t^28 + 52832780*t^27 - 168384150*t^26 + 445188744*t^25 - 987193350*t^24 + 1847488500*t^23 + 1372406746*t^22 - 403422496*t^21 - 8403314*t^20 - 471656596*t^19 + 1806623746*t^18 + 752776200*t^17 + 752776200*t^16 - 1580830020*t^15 + 1673936550*t^14 - 1294246800*t^13 + 786893250*t^12 - 382391100*t^11 + 146679390*t^10 - 42299400*t^9 + 7837830*t^8 - 172260*t^7 - 468930*t^6 + 183744*t^5 - 39270*t^4 + 5060*t^3 - 330*t^2 + 1
- 
-     """

From 8143ee82f5b3ee1140f279b73bc3fd3a2de8d16c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 14:53:25 -0300
Subject: [PATCH 36/48] sagemath: install /usr/bin/sage

---
 srcpkgs/sagemath/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f5d9d0f0fabd..49821fc982e4 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -181,7 +181,8 @@ do_install() {
 	vmkdir 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}
+	ln -sfT $_SAGE_ROOT/sage ${DESTDIR}/usr/bin/sage-${version}
+	ln -sfT sage-${version} ${DESTDIR}/usr/bin/sage
 }
 
 do_check() {

From 7ec27d7d6067abc9d832f456f81f3b53521efc9f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 16:31:25 -0300
Subject: [PATCH 37/48] New package: python3-cvxopt-1.2.7

---
 srcpkgs/python3-cvxopt/template | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 srcpkgs/python3-cvxopt/template

diff --git a/srcpkgs/python3-cvxopt/template b/srcpkgs/python3-cvxopt/template
new file mode 100644
index 000000000000..0fb769b294e0
--- /dev/null
+++ b/srcpkgs/python3-cvxopt/template
@@ -0,0 +1,20 @@
+# Template file for 'python3-cvxopt'
+pkgname=python3-cvxopt
+version=1.2.7
+revision=1
+wrksrc="cvxopt-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools"
+makedepends="python3-devel blas-devel lapack-devel SuiteSparse-devel gsl-devel glpk-devel"
+checkdepends="python3-pytest"
+short_desc="Python software for convex optimization"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-3.0-or-later"
+homepage="http://cvxopt.org/"
+distfiles="${PYPI_SITE}/c/cvxopt/cvxopt-${version}.tar.gz"
+checksum=3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
+
+pre_build() {
+	export CVXOPT_BUILD_GSL=1
+	export CVXOPT_BUILD_GLPK=1
+}

From 49769070effce73cb5c324ab444147fc181b12db Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 23:37:14 -0300
Subject: [PATCH 38/48] sagemath: rearrange upstream packages and indent

This doesn't change anything, it separates _upstream and
checksum in three blocks to make it easier to edit.
---
 srcpkgs/sagemath/template | 140 ++++++++++++++++++++------------------
 1 file changed, 74 insertions(+), 66 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 49821fc982e4..4317f1e80893 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -31,76 +31,84 @@ _SAGE_ROOT=/usr/lib/sage-${version}
 
 _SAGE_UPSTREAM_MIRROR=https://mirrors.mit.edu/sage/spkg/upstream
 
+# packages were sage is the upstream
 _upstream="
-${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
-
-${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
-${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
-${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
-${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
-${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
-${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
-${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
-${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
-${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
-${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
-${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
-${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
-${PYPI_SITE}/P/PyCygwin/PyCygwin-0.1.tar.gz
-${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
-${PYPI_SITE}/s/setuptools/setuptools-59.2.0.tar.gz
-${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
-${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
-${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
-
-https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
-http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
-https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
-https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
+ ${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
+ ${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
+ ${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
+"
+checksum+="
+ c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
+ d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
+ 5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
+ ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
+ 169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
+ cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
+ edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+ b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
+ cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
 "
 
+# packages from pypi (python modules)
+_upstream+="
+ ${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
+ ${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
+ ${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
+ ${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
+ ${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
+ ${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
+ ${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
+ ${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
+ ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
+ ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
+ ${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
+ ${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
+ ${PYPI_SITE}/P/PyCygwin/PyCygwin-0.1.tar.gz
+ ${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
+ ${PYPI_SITE}/s/setuptools/setuptools-59.2.0.tar.gz
+ ${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
+ ${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
+ ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
+"
+checksum+="
+ dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
+ 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
+ 3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
+ 03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
+ 5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
+ cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
+ 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+ a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
+ d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
+ 5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
+ 471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
+ 78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
+ 45a5e295590c469a49b2804bfdb89059e942d768ad3b813f484d7b5bff48d226
+ ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
+ 157d21de9d055ab9e8ea3186d91e7f4f865e11f42deafa952d90842671fc2576
+ 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
+ 545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
+ dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
+"
+
+# other upstream packages
+_upstream+="
+ https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
+ http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
+ https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+ https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
+"
 checksum+="
-c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
-d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
-5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
-ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
-169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
-cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
-edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
-b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
-cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
-
-dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
-4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
-3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
-03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
-5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
-cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
-581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
-a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
-d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
-5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
-471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
-78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
-45a5e295590c469a49b2804bfdb89059e942d768ad3b813f484d7b5bff48d226
-ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
-157d21de9d055ab9e8ea3186d91e7f4f865e11f42deafa952d90842671fc2576
-6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
-545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
-dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
-
-c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
-07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
-3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
-718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
+ c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
+ 07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
+ 3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+ 718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
 "
 
 for u in ${_upstream}; do

From be5f0c86cb081d87d6658b5b7b39030268711088 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 23:37:58 -0300
Subject: [PATCH 39/48] sagemath: use system cvxopt and importlib_resources

---
 srcpkgs/sagemath/template | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 4317f1e80893..5eb70a6267bb 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -59,12 +59,10 @@ checksum+="
 _upstream+="
  ${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
  ${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
- ${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
  ${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
  ${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
  ${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
  ${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
- ${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
  ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
  ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
  ${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
@@ -79,12 +77,10 @@ _upstream+="
 checksum+="
  dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
  4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
- 3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
  03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
  5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
  cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
  581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
- a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
  d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
  5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
  471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
@@ -257,9 +253,6 @@ makedepends+="
 # TODO: optional
 # 4ti2 coxeter3 libsemigroups lrslib pdf2svg perl_mongodb polymake
 
-# TODO: standard
-# cvxopt importlib_resources
-
 # python packages for trac-29665
 _sage_python3_modules="
  python3-Babel python3-Jinja2 python3-MarkupSafe python3-Pillow
@@ -291,6 +284,8 @@ _sage_python3_modules="
  python3-tornado python3-traitlets python3-typing_extensions
  python3-tzlocal python3-urllib3 python3-wcwidth python3-webencodings
  python3-wheel python3-zipp pythran
+
+ python3-cvxopt python3-importlib_resources
  "
 
 # python packages are build and runtime dependencies

From f0af0898ca3a490cfc245f49e928470302c16c27 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 01:48:08 -0300
Subject: [PATCH 40/48] sagemath-test: fix sage binary (now is just 'sage')

---
 srcpkgs/sagemath-test/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/sagemath-test/template b/srcpkgs/sagemath-test/template
index 3e0b1c3233fd..1c0d71683a1b 100644
--- a/srcpkgs/sagemath-test/template
+++ b/srcpkgs/sagemath-test/template
@@ -28,5 +28,5 @@ do_check() {
 	else
 		_test_args="--warn-long 5.0 $_test_args"
 	fi
-	/usr/bin/sage* -tp ${XBPS_MAKEJOBS} ${_test_args}
+	sage -tp ${XBPS_MAKEJOBS} ${_test_args}
 }

From 95eaa2c36333b09eba6dc377ba4a86a2b3ee78a5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 10:49:04 -0300
Subject: [PATCH 41/48] sagemath: disallow fuzz in patches

---
 ...49c415e11d0522bff9013bc1509264b26ebf.patch | 27 -------------------
 srcpkgs/sagemath/template                     |  1 +
 2 files changed, 1 insertion(+), 27 deletions(-)
 delete mode 100644 srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch

diff --git a/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch b/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
deleted file mode 100644
index d32f1e4d5e9f..000000000000
--- a/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 836249c415e11d0522bff9013bc1509264b26ebf Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
-Date: Sun, 9 Jan 2022 16:51:22 -0300
-Subject: trac 33135: add filter to ignore deprecation warnings
-
----
- src/sage/all.py | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/src/sage/all.py b/src/sage/all.py
-index 01ef327..19ca3d4 100644
---- a/src/sage/all.py
-+++ b/src/sage/all.py
-@@ -96,6 +96,10 @@ warnings.filterwarnings('ignore', category=DeprecationWarning,
- warnings.filterwarnings('ignore', category=DeprecationWarning,
-                         module='pythran')
- 
-+warnings.filterwarnings('ignore', category=DeprecationWarning,
-+                        message='The distutils(.sysconfig module| package) is deprecated',
-+                        module='numpy|sage.env|sage.features')
-+
- ################ end setup warnings ###############################
- 
- 
--- 
-cgit v1.0-1-gd88e
-
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 5eb70a6267bb..e5a728b2217d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -22,6 +22,7 @@ homepage="http://sagemath.org/"
 distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
 checksum=b015c54f7411669ef70bac2b2fde260e7f45724bcff170957b1f9fd08131f2c3
 python_version=3
+patch_args="-F0 -Np1"
 
 build_options="debug"
 desc_option_debug="Build with debug symbols"

From 1d307a5b46f8a852536aad4fbec2b77085e56184 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 13:27:53 -0300
Subject: [PATCH 42/48] sagemath: disable packages that are not needed

 - appnope: only needed for macos
 - fonttools: only needed to build matplotlib
 - importlib_resources: only needed for old python
 - pycygwin: only needed for cygwin
 - setuptools_scm_git_archive: only needed to build matplotlib
 - setuptools_wheel: not needed
 - sphinxcontrib_websupport: only needed to build sphinx
 - cppy: force use from system python3-cppy
---
 srcpkgs/sagemath/template | 51 +++++++++++++++++++++++++++------------
 1 file changed, 35 insertions(+), 16 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index e5a728b2217d..f15bfbf76e0a 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -58,39 +58,29 @@ checksum+="
 
 # packages from pypi (python modules)
 _upstream+="
- ${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
- ${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
  ${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
  ${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
  ${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
- ${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
+
  ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
  ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
  ${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
  ${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
- ${PYPI_SITE}/P/PyCygwin/PyCygwin-0.1.tar.gz
+
  ${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
- ${PYPI_SITE}/s/setuptools/setuptools-59.2.0.tar.gz
- ${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
- ${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
  ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
 "
 checksum+="
- dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
- 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
  03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
  5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
  cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
- 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+
  d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
  5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
  471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
  78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
- 45a5e295590c469a49b2804bfdb89059e942d768ad3b813f484d7b5bff48d226
+
  ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
- 157d21de9d055ab9e8ea3186d91e7f4f865e11f42deafa952d90842671fc2576
- 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
- 545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
  dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
 "
 
@@ -108,6 +98,22 @@ checksum+="
  718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
 "
 
+# these packages are not needed, don't install
+_dontinstall="
+ appnope
+ fonttools
+ importlib_resources
+ pycygwin
+ setuptools_scm_git_archive
+ setuptools_wheel
+ sphinxcontrib_websupport
+"
+
+# these packages can be used from system
+_usefromsystem="
+ cppy
+"
+
 for u in ${_upstream}; do
 	distfiles+=" $u"
 	skip_extraction+=" ${u##*[/>]}"
@@ -145,8 +151,20 @@ do_clean() {
 	rm -rf $wrksrc $_SAGE_ROOT
 }
 
-pre_configure() {
+post_patch() {
 	./bootstrap
+}
+
+pre_configure() {
+	for spkg in $_dontinstall; do
+		configure_args+=" sage_spkg_install_$spkg=no"
+		configure_args+=" sage_require_$spkg=no"
+	done
+
+	for spkg in $_usefromsystem; do
+		configure_args+=" sage_spkg_install_$spkg=no"
+		configure_args+=" sage_require_$spkg=yes"
+	done
 
 	if [ "$build_option_debug" ]; then
 		export SAGE_DEBUG=yes
@@ -286,7 +304,8 @@ _sage_python3_modules="
  python3-tzlocal python3-urllib3 python3-wcwidth python3-webencodings
  python3-wheel python3-zipp pythran
 
- python3-cvxopt python3-importlib_resources
+ python3-cvxopt
+ python3-cppy
  "
 
 # python packages are build and runtime dependencies

From fec4d063e2ed623777b2ce3f558b5fcd839dc185 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 17:32:39 -0300
Subject: [PATCH 43/48] New package: python3-cysignals-1.11.2

---
 .../python3-cysignals/patches/fix-write.patch | 46 +++++++++++++++++++
 srcpkgs/python3-cysignals/template            | 19 ++++++++
 2 files changed, 65 insertions(+)
 create mode 100644 srcpkgs/python3-cysignals/patches/fix-write.patch
 create mode 100644 srcpkgs/python3-cysignals/template

diff --git a/srcpkgs/python3-cysignals/patches/fix-write.patch b/srcpkgs/python3-cysignals/patches/fix-write.patch
new file mode 100644
index 000000000000..18206bd808d7
--- /dev/null
+++ b/srcpkgs/python3-cysignals/patches/fix-write.patch
@@ -0,0 +1,46 @@
+Fix a doctest failure which triggers in i686.
+
+The example is in the function `test_bad_str()` in the file `tests.pyx`.
+The test pases a bad string to `sig_str()` and then raises `SIGILL`. The
+signal handler eventually raises a Python exception which in turn raises
+a `SIGSEGV` when accessing the bad string. An error message is expected,
+but that doesn't happen.
+
+Presumably the segfault happens inside some stdio function which leaves
+stdio buffers in an inconsistent state so the latter `fprintf` doesn't
+work properly. From signal-safety(7):
+
+    Suppose that the main program is in the middle of a call to a
+    stdio function such as printf(3) where the buffer and associated
+    variables have been partially updated.  If, at that moment, the
+    program is interrupted by a signal handler that also calls
+    printf(3), then the second call to printf(3) will operate on
+    inconsistent data, with unpredictable results.
+
+We fix this by replacing the `fprintf` by calls to `write`, which is
+async-signal-safe according to POSIX.
+
+--- a/src/cysignals/implementation.c      2022-01-16 22:36:45.143796872 +0000
++++ b/src/cysignals/implementation.c      2022-01-17 02:22:31.196695043 +0000
+@@ -638,12 +622,15 @@
+ #endif
+ 
+     if (s) {
++        /* Using fprintf from inside a signal handler is undefined, see signal-safety(7) */
++        const char * message =
++            "\n"
++            "This probably occurred because a *compiled* module has a bug\n"
++            "in it and is not properly wrapped with sig_on(), sig_off().\n"
++            "Python will now terminate.\n"
++            "------------------------------------------------------------------------\n";
++        write(2, s, strlen(s));
++        write(2, message, strlen(message));
+-        fprintf(stderr,
+-            "%s\n"
+-            "This probably occurred because a *compiled* module has a bug\n"
+-            "in it and is not properly wrapped with sig_on(), sig_off().\n"
+-            "Python will now terminate.\n", s);
+-        print_sep();
+     }
+ 
+ dienow:
diff --git a/srcpkgs/python3-cysignals/template b/srcpkgs/python3-cysignals/template
new file mode 100644
index 000000000000..4655eead2a9c
--- /dev/null
+++ b/srcpkgs/python3-cysignals/template
@@ -0,0 +1,19 @@
+# Template file for 'python3-cysignals'
+pkgname=python3-cysignals
+version=1.11.2
+revision=1
+wrksrc="cysignals-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools python3-Cython autoconf"
+makedepends="python3-devel pari-devel"
+short_desc="Interrupt and signal handling for Cython "
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/sagemath/cysignals"
+distfiles="${PYPI_SITE}/c/cysignals/cysignals-${version}.tar.gz"
+checksum=5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
+nocross=yes # runs binaries built for target
+
+do_check() {
+	make check
+}

From 97f4e3be91bd4f30a89db3bb6887dc0846cd9e91 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 18:28:55 -0300
Subject: [PATCH 44/48] New package: python3-cypari2-2.1.2

---
 srcpkgs/python3-cypari2/template | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 srcpkgs/python3-cypari2/template

diff --git a/srcpkgs/python3-cypari2/template b/srcpkgs/python3-cypari2/template
new file mode 100644
index 000000000000..18755ec020b4
--- /dev/null
+++ b/srcpkgs/python3-cypari2/template
@@ -0,0 +1,19 @@
+# Template file for 'python3-cypari2'
+pkgname=python3-cypari2
+version=2.1.2
+revision=1
+wrksrc=cypari2-${version}
+build_style=python3-module
+hostmakedepends="python3-setuptools python3-Cython pari perl"
+makedepends="python3-devel python3-cysignals pari-devel gmp-devel"
+short_desc="Python interface to the number theory library PARI/GP"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-2.0-or-later"
+homepage="https://github.com/sagemath/cypari2"
+distfiles="${PYPI_SITE}/c/cypari2/cypari2-${version}.tar.gz"
+checksum=03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
+
+do_check() {
+	PYTHONPATH="$(cd build/lib* && pwd)" \
+		make check
+}

From dca176d202e0adbac1c0cca79e8919acfb53bcb8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 18:56:29 -0300
Subject: [PATCH 45/48] New package: python3-pplpy-0.8.7

---
 srcpkgs/python3-pplpy/template | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 srcpkgs/python3-pplpy/template

diff --git a/srcpkgs/python3-pplpy/template b/srcpkgs/python3-pplpy/template
new file mode 100644
index 000000000000..1cb69ffe6a07
--- /dev/null
+++ b/srcpkgs/python3-pplpy/template
@@ -0,0 +1,21 @@
+# Template file for 'python3-pplpy'
+pkgname=python3-pplpy
+version=0.8.7
+revision=1
+wrksrc="pplpy-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools python3-Cython"
+makedepends="python3-cysignals python3-gmpy2 python3-devel gmp-devel
+ gmpxx-devel ppl-devel mpfr-devel libmpc-devel pari-devel"
+short_desc="Python wrapper to the C++ Parma Polyhedra Library (PPL)"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-3.0-or-later"
+homepage="https://gitlab.com/videlec/pplpy"
+changelog="https://gitlab.com/videlec/pplpy/-/raw/master/CHANGES.txt"
+distfiles="${PYPI_SITE}/p/pplpy/pplpy-${version}.tar.gz"
+checksum=500bd0f4ae1a76956fae7fcba77854f5ec3e64fce76803664983763c3f2bd8bd
+
+do_check() {
+	PYTHONPATH=$(cd build/lib* && pwd) \
+		python setup.py test
+}

From 80c9b9342d5a6e496f9ac5419b670926ff84a310 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 01:14:24 -0300
Subject: [PATCH 46/48] New package: python3-fpylll-0.5.6

---
 srcpkgs/python3-fpylll/template | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 srcpkgs/python3-fpylll/template

diff --git a/srcpkgs/python3-fpylll/template b/srcpkgs/python3-fpylll/template
new file mode 100644
index 000000000000..dd2adcee6fce
--- /dev/null
+++ b/srcpkgs/python3-fpylll/template
@@ -0,0 +1,25 @@
+# Template file for 'python3-fpylll'
+pkgname=python3-fpylll
+version=0.5.6
+revision=1
+wrksrc="fpylll-${version}"
+build_style=python3-module
+hostmakedepends="python3-Cython"
+makedepends="python3-cysignals python3-devel gmp-devel mpfr-devel fplll-devel
+ pari-devel"
+checkdepends="python3-pytest python3-numpy"
+short_desc="Python wrapper to fplll (floating point lattice algorithms)"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-2.0-or-later"
+homepage="https://github.com/fplll/fpylll"
+distfiles="${PYPI_SITE}/f/fpylll/fpylll-${version}.tar.gz"
+checksum=6eb8a63fb933c0bf92f290dd66fd884807659214d0ce524afe3687a6a6b13a8b
+
+case $XBPS_TARGET_MACHINE in
+	# skip a test with numerical noise on 32 bit
+	i686*) make_check_args="-k not(averaged_simulate_prob)" ;;
+esac
+
+pre_check() {
+	export PY_IGNORE_IMPORTMISMATCH=1
+}

From 09fd6926bdea64c140a2356f156bf074a8d13f4b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 18:32:13 -0300
Subject: [PATCH 47/48] sagemath: use system Cython, cysignals, cypari2, pplpy,
 fpylll

---
 srcpkgs/sagemath/template | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f15bfbf76e0a..ba22ffbeaf30 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -58,26 +58,18 @@ checksum+="
 
 # packages from pypi (python modules)
 _upstream+="
- ${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
- ${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
- ${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
 
  ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
  ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
- ${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
  ${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
 
  ${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
  ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
 "
 checksum+="
- 03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
- 5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
- cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
 
  d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
  5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
- 471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
  78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
 
  ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
@@ -86,13 +78,11 @@ checksum+="
 
 # other upstream packages
 _upstream+="
- https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
  http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
  https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
  https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
 "
 checksum+="
- c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
  07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
  3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
  718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
@@ -107,11 +97,17 @@ _dontinstall="
  setuptools_scm_git_archive
  setuptools_wheel
  sphinxcontrib_websupport
+ pplpy_doc
 "
 
 # these packages can be used from system
 _usefromsystem="
  cppy
+ cython
+ cysignals
+ cypari
+ pplpy
+ fpylll
 "
 
 for u in ${_upstream}; do
@@ -306,6 +302,11 @@ _sage_python3_modules="
 
  python3-cvxopt
  python3-cppy
+ python3-Cython
+ python3-cysignals
+ python3-cypari2
+ python3-pplpy
+ python3-fpylll
  "
 
 # python packages are build and runtime dependencies

From d27012d85b95ae364f7833ce8adab7c1c80857a2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 01:15:55 -0300
Subject: [PATCH 48/48] sagemath: update to 9.5.rc2.

---
 srcpkgs/sagemath/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index ba22ffbeaf30..b9bd590b61ca 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -1,6 +1,6 @@
 # Template file for 'sagemath'
 pkgname=sagemath
-version=9.5.rc1
+version=9.5.rc2
 revision=1
 wrksrc=sage-$version
 build_style=configure
@@ -20,7 +20,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
-checksum=b015c54f7411669ef70bac2b2fde260e7f45724bcff170957b1f9fd08131f2c3
+checksum=c7eba867c11ab1b6d04535dd8df54640d3de0625ad96cdac17b17af977d96dce
 python_version=3
 patch_args="-F0 -Np1"
 

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.rc2
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (206 preceding siblings ...)
  2022-01-17  5:10 ` [PR PATCH] [Updated] " tornaria
@ 2022-01-17  5:17 ` tornaria
  2022-01-17  5:31 ` tornaria
                   ` (40 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-17  5:17 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1014151468

Comment:
I pushed the update to rc2, which is a tiny release.

More important for us, this new version uses a lot more system packages, and disables building some packages that are not needed for our arches.



^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.rc2
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (207 preceding siblings ...)
  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
                   ` (39 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-17  5:31 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1014157427

Comment:
> Definitely :) `Size required on disk: 7300MB `

Now it's `installed_size: 1151MB`!

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: sagemath-9.5.rc2
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (208 preceding siblings ...)
  2022-01-17  5:31 ` tornaria
@ 2022-01-17  5:54 ` tornaria
  2022-01-17  5:55 ` tornaria
                   ` (38 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-17  5:54 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1152 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.rc2
This is WIP, so I can get feedback.

Supported architectures: x86_64, x86_64-musl, i686. We also try to make sure it works with musl-1.2.

The testsuite can be run normal (-Q) or long (-K). For CI it runs normal (~ 1/2 time) and it uses a fixed random seed 0 to avoid random failures. When running locally, the random seed is random so one may get occasional test failures that depend on a particular value of the random seed.

The package `sagemath-test` is a dummy package whose purpose is to run the testsuite with sage installed as a package and without the build directory. For this to make sense, the masterdir has to be clean (without traces of the sagemath build, this should be ok after running "pkg" or "pkg -Q").

Pending PR for dependencies:
- [ ] #34789 Needs review/testing
- [ ] #35088
- [ ] #35089

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: 646705 bytes --]

From 32f3e2286e51fa25fb83ca4c2e89e594058a1adf 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/48] 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 f4c53a0c7f9fd2e472ba5d3774a45fb12eb93881 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/48] 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 a8bd626442046f920b17764cc05bffa3bd714e44 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/48] 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 c4a5ce15e9f8f9a365a87860aa20033638c3253e 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/48] 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 ab4e24a8515271d93b43fddae2acd5c71cf9b9c4 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/48] 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 c6a3ff806fa97348f963d78bcdb4ebc5a407e61a 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/48] 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 d8ad8a1525190a288773f02da3d139e42019d33f 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/48] 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 3317f99da530d78d311f9b16c7f06435b13c81ca 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/48] 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 54ad0fde0afdb32cbfd3b3e20f1d336a1b998b5c 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/48] 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 f419b3c8b862a638dfe27fe8a22d132b03bca87d 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/48] 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 d8658bb4fc3fa81e7cf022fd9b31911b8ff74aaf 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/48] 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 18594e223e1972b88bb8116218263acb2407775a 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/48] 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 e755bca3e7a22ab00aae9378f93ea04d194f4207 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/48] 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 e1b9721bd780c9a2f9dbd159b78aabbb6da270b0 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/48] 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 8783f69b6ffe3aa3f8df51a817e315c175a8378e 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/48] 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 7faa009fcee7ce5473e0c4ccfeb9e6011c910bca 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/48] 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 5b4e5f557459241dfd5fca02cc89476b000a1373 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/48] 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 b1dd0a9a48de7300b11d1dd638f51639aafd354b 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/48] 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 1ae807111aa6b46843037891b625a2775cd223eb 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/48] 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

From 1f44f728ec67741d12d5d4563c00d4f71cb76d90 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 27 Dec 2021 20:19:19 -0300
Subject: [PATCH 20/48] sagemath: fix license and tests

Now tests can be run with -Q (normal) or -K (--long)
---
 srcpkgs/sagemath/template | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index c5009269c7fc..33b40acbabeb 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -16,7 +16,7 @@ depends="giac git FlintQS zn_poly sympow
  "
 short_desc="Open source mathematics software"
 maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
-license="GPL-3.0-or-later"
+license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
 checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
@@ -155,15 +155,17 @@ do_install() {
 }
 
 do_check() {
-	TEST=--all
 	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
-		TEST="$(sed -e 's/#.*//' ${XBPS_DISTDIR}/sagemath-check)"
+		_test_args=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	fi
+	if [ -z "$_test_args" ]; then
+		_test_args=--all
+	fi
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args="--long $_test_args"
 	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} ${OPT} ${TEST}
-	#./sage -t ${OPT} ${TEST}
+	./sage -tp ${XBPS_MAKEJOBS} ${_test_args}
 }
 
 ### copied from sage-deps, to be kept in sync

From a8ad28dbc15d0ac2cc1dd1309e8fb974e8686abb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 28 Dec 2021 23:08:17 -0300
Subject: [PATCH 21/48] sagemath: fix long time test

---
 .../patches/zzz-fix_long_time_test--see_33091.patch | 13 +++++++++++++
 ...=> zzz-skip_doctest_giac-1.7.0--see_31563.patch} |  0
 2 files changed, 13 insertions(+)
 create mode 100644 srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
 rename srcpkgs/sagemath/patches/{skip-doctest-giac-1.7.0--see-trac-31563.patch => zzz-skip_doctest_giac-1.7.0--see_31563.patch} (100%)

diff --git a/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch b/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
new file mode 100644
index 000000000000..ca360dee9f6e
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage/matrix/matrix2.pyx b/src/sage/matrix/matrix2.pyx
+index 7d319bd54b..c1a2eed6f1 100644
+--- a/src/sage/matrix/matrix2.pyx
++++ b/src/sage/matrix/matrix2.pyx
+@@ -17215,7 +17215,7 @@ cdef class Matrix(Matrix1):
+ 
+             sage: set_random_seed()
+             sage: K = random_cone(max_ambient_dim=5)
+-            sage: all(L.change_ring(SR).is_Z_operator_on(K)
++            sage: all(L.change_ring(SR).is_Z_operator_on(K) # long time
+             ....:     for L in K.Z_operators_gens())  # long time
+             True
+ 
diff --git a/srcpkgs/sagemath/patches/skip-doctest-giac-1.7.0--see-trac-31563.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_31563.patch
similarity index 100%
rename from srcpkgs/sagemath/patches/skip-doctest-giac-1.7.0--see-trac-31563.patch
rename to srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_31563.patch

From cf5081ea8109fbb917edf66832b11adc824d5015 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 31 Dec 2021 13:52:34 -0300
Subject: [PATCH 22/48] python3-Sphinx: update to 4.3.2.

---
 srcpkgs/python3-Sphinx/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/python3-Sphinx/template b/srcpkgs/python3-Sphinx/template
index 8b0493c1f92c..29f892d16157 100644
--- a/srcpkgs/python3-Sphinx/template
+++ b/srcpkgs/python3-Sphinx/template
@@ -1,6 +1,6 @@
 # Template file for 'python3-Sphinx'
 pkgname=python3-Sphinx
-version=4.2.0
+version=4.3.2
 revision=1
 wrksrc=Sphinx-${version}
 build_style=python3-module
@@ -17,8 +17,9 @@ short_desc="Python 3 documentation generator"
 maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
 license="BSD-3-Clause"
 homepage="http://sphinx-doc.org"
+changelog="https://www.sphinx-doc.org/en/master/changes.html"
 distfiles="${PYPI_SITE}/S/Sphinx/Sphinx-${version}.tar.gz"
-checksum=94078db9184491e15bce0a56d9186e0aec95f16ac20b12d00e06d4e36f1058a6
+checksum=0a8836751a68306b3fe97ecbe44db786f8479c3bf4b80e3a7f5c838657b4698c
 conflicts="python-Sphinx>=0"
 
 post_install() {

From f5b5b2cc77c8139672a1f45267c85510b7142505 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 28 Dec 2021 23:08:17 -0300
Subject: [PATCH 23/48] sagemath: use system python site-packages

 - patch from #29665 for that
 - patch on top of that to allow a few more python packages:
   gmpy2, sphinx, typing_extensions, ptyprocess
 - add all available python packages to makedepends and depends
 - add ffmpeg and ImageMagick to makedepends
 - in standard check (-Q) warn if individual test > 5.0s
---
 ...184f7498a2046065e669723e68efe2d65cee.patch | 5629 +++++++++++++++++
 .../zzz-dont_run_pytest--see_31924.patch      |   27 +
 .../zzz-more_site_packages_not_in_29665.patch |   42 +
 srcpkgs/sagemath/template                     |   52 +-
 4 files changed, 5747 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch

diff --git a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
new file mode 100644
index 000000000000..b641113927e7
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
@@ -0,0 +1,5629 @@
+From 05fcaabe95082f42ba134780d579390d7b6153e2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 19:30:58 -0400
+Subject: Trac #29665: add --enable-system-site-packages option to ./configure.
+
+This new option is experimental and disabled by default. When it is
+enabled, the string "--system-site-packages" is appended to a new
+environment variable SAGE_VENV_FLAGS that is then passed to the
+sage-venv command during the build using autoconf substitution.
+Thusly the correct setting finds its way into local/pyvenv.cfg.
+---
+ build/make/Makefile.in |  2 +-
+ configure.ac           | 11 +++++++++++
+ 2 files changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/build/make/Makefile.in b/build/make/Makefile.in
+index f870cc3..68627ab 100644
+--- a/build/make/Makefile.in
++++ b/build/make/Makefile.in
+@@ -211,7 +211,7 @@ endif
+ inst_python3_venv = $(SAGE_VENV)/pyvenv.cfg
+ 
+ $(inst_python3_venv):
+-	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv "$(SAGE_VENV)"
++	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv @SAGE_VENV_FLAGS@ "$(SAGE_VENV)"
+ endif
+ 
+ # Build everything and start Sage.
+diff --git a/configure.ac b/configure.ac
+index 351f487..db30a91 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -435,6 +435,17 @@ AC_ARG_ENABLE([download-from-upstream-url],
+   [AS_HELP_STRING([--enable-download-from-upstream-url],
+     [allow downloading packages from their upstream URL if they cannot be found on the Sage mirrors])])
+ 
++AC_ARG_ENABLE(
++  [system-site-packages], [AS_HELP_STRING(
++    [--enable-system-site-packages],
++    [allow sage to use python packages from the system (experimental; default: no)]
++  )], [
++  AS_IF([test "x$enable_system_site_packages" = "xyes"], [
++    SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
++  ])
++])
++AC_SUBST([SAGE_VENV_FLAGS])
++
+ SAGE_SPKG_OPTIONS=""
+ AS_IF([test "x$enable_experimental_packages" = "xyes"], [
+   AS_VAR_APPEND([SAGE_SPKG_OPTIONS], [" -y"])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9372d1f663edf4e89f9c186336815ca04cff59dc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 19:41:14 -0400
+Subject: Trac #29665: new SAGE_PYTHON_PACKAGE_CHECK() autoconf macro.
+
+This new macro encapsulates the check for system installations of
+python packages. It uses setuptools.version's pkg_resources to
+check if the contents of install-requires.txt are satisfied for
+the given package; and if not, tells the build system to install
+the SPKG instead.
+---
+ m4/sage_python_package_check.m4 | 49 +++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 49 insertions(+)
+ create mode 100644 m4/sage_python_package_check.m4
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+new file mode 100644
+index 00000000..77b0a0c
+--- /dev/null
++++ b/m4/sage_python_package_check.m4
+@@ -0,0 +1,49 @@
++#
++# SYNOPSIS
++#
++#   SAGE_PYTHON_PACKAGE_CHECK(package)
++#
++# DESCRIPTION
++#
++#   Determine if the system copy of a python package can be used by sage.
++#
++#   This macro uses setuptools.version's pkg_resources to check that the
++#   "install-requires.txt" file for the named package is satisfied, and
++#   it can typically fail in four ways:
++#
++#     1. If --enable-system-site-packages was not passed to ./configure,
++#
++#     2. If we are not using the system python (no $PYTHON_FOR_VENV),
++#
++#     3. If setuptools is not available to the system python,
++#
++#     4. If the contents of install-requires.txt are not met (wrong
++#        version, no version, etc.) by the system python.
++#
++#   In any of those cases, we set sage_spkg_install_$package to "yes"
++#   so that the corresponding SPKG is installed. Otherwise, we do
++#   nothing, since the default value of sage_spkg_install_$package
++#   is "no" (to use the system copy).
++#
++#   The SAGE_SPKG_CONFIGURE_PYTHON3() macro is AC_REQUIRE'd to ensure
++#   that $PYTHON_FOR_VENV is available, if it is going to be available.
++#
++
++AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
++  AS_IF([test "${enable_system_site_packages}" = "yes"], [
++    AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
++
++    dnl strip all comments from install-requires.txt; this should leave
++    dnl only a single line containing the version specification for this
++    dnl package.
++    SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
++    AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++    AS_IF(
++      ["${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())"],
++      [AC_MSG_RESULT(yes)],
++      [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
++    )
++  ], [
++    sage_spkg_install_$1=yes
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a0dac8ad81ad6369d479bba30d2388de59e5cecb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:21:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for py.
+
+---
+ build/pkgs/py/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/py/spkg-configure.m4
+
+diff --git a/build/pkgs/py/spkg-configure.m4 b/build/pkgs/py/spkg-configure.m4
+new file mode 100644
+index 00000000..ded7034
+--- /dev/null
++++ b/build/pkgs/py/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([py], [SAGE_PYTHON_PACKAGE_CHECK([py])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 87c463a25ab4432dc1fba4f7a9703284e5b8f620 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:24:15 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for wheel.
+
+---
+ build/pkgs/wheel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wheel/spkg-configure.m4
+
+diff --git a/build/pkgs/wheel/spkg-configure.m4 b/build/pkgs/wheel/spkg-configure.m4
+new file mode 100644
+index 00000000..7897ea9
+--- /dev/null
++++ b/build/pkgs/wheel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([wheel], [SAGE_PYTHON_PACKAGE_CHECK([wheel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 804094b3a980f262f4d53d7be8b1be43ac0c55e0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:25:15 -0400
+Subject: Trac #29665: new spkg-configure.m4 for cvxopt.
+
+This includes a SAGE_SPKG_DEPCHECK([gsl glpk suitesparse],... because
+those C dependencies wind up linked into shared libraries like,
+
+  /usr/.../cvxopt/glpk.cpython-39-x86_64-linux-gnu.so
+
+that could potentially conflict with (for example) the glpk SPKG.
+---
+ build/pkgs/cvxopt/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/cvxopt/spkg-configure.m4
+
+diff --git a/build/pkgs/cvxopt/spkg-configure.m4 b/build/pkgs/cvxopt/spkg-configure.m4
+new file mode 100644
+index 00000000..c4aa619
+--- /dev/null
++++ b/build/pkgs/cvxopt/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([cvxopt], [
++  SAGE_SPKG_DEPCHECK([gsl glpk suitesparse], [
++    SAGE_PYTHON_PACKAGE_CHECK([cvxopt])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3f171955ff8d15da2c98aee0d2e254e95a55a2b5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:28:10 -0400
+Subject: Trac #29665: new spkg-configure.m4 for pyzmq.
+
+This includes a SAGE_SPKG_DEPCHECK([zeromq],... because libzmq winds
+up linked into shared libraries like,
+
+  /usr/.../zmq/backend/cython/message.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the zeromq SPKG.
+---
+ build/pkgs/pyzmq/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/pyzmq/spkg-configure.m4
+
+diff --git a/build/pkgs/pyzmq/spkg-configure.m4 b/build/pkgs/pyzmq/spkg-configure.m4
+new file mode 100644
+index 00000000..ae2b126
+--- /dev/null
++++ b/build/pkgs/pyzmq/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([pyzmq], [
++  SAGE_SPKG_DEPCHECK([zeromq], [
++    SAGE_PYTHON_PACKAGE_CHECK([pyzmq])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20d3aa9da9fc98a6e6a47599cd1b6d1d3785a4c4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:31:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for requests.
+
+---
+ build/pkgs/requests/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/requests/spkg-configure.m4
+
+diff --git a/build/pkgs/requests/spkg-configure.m4 b/build/pkgs/requests/spkg-configure.m4
+new file mode 100644
+index 00000000..f50a66c
+--- /dev/null
++++ b/build/pkgs/requests/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([requests], [SAGE_PYTHON_PACKAGE_CHECK([requests])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4df57ee47f2576b6b7bf9265248e06e90616b689 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:13:34 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for six.
+
+---
+ build/pkgs/six/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/six/spkg-configure.m4
+
+diff --git a/build/pkgs/six/spkg-configure.m4 b/build/pkgs/six/spkg-configure.m4
+new file mode 100644
+index 00000000..a382b81
+--- /dev/null
++++ b/build/pkgs/six/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([six], [SAGE_PYTHON_PACKAGE_CHECK([six])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f4462652d02ca729cc6d7cb36ee4d7d662deafb0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:14:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for packaging.
+
+---
+ build/pkgs/packaging/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/packaging/spkg-configure.m4
+
+diff --git a/build/pkgs/packaging/spkg-configure.m4 b/build/pkgs/packaging/spkg-configure.m4
+new file mode 100644
+index 00000000..398f9e1
+--- /dev/null
++++ b/build/pkgs/packaging/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([packaging], [SAGE_PYTHON_PACKAGE_CHECK([packaging])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4d64677fffce48077e4bc3e20ec833c70e6e9b65 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:18:53 -0400
+Subject: Trac #29665: new spkg-configure.m4 for numpy.
+
+This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack
+wind up linked into shared libraries like,
+
+  /usr/.../numpy/linalg/lapack_lite.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the openblas SPKG.
+---
+ build/pkgs/numpy/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/numpy/spkg-configure.m4
+
+diff --git a/build/pkgs/numpy/spkg-configure.m4 b/build/pkgs/numpy/spkg-configure.m4
+new file mode 100644
+index 00000000..16f9a90
+--- /dev/null
++++ b/build/pkgs/numpy/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([numpy], [
++  SAGE_SPKG_DEPCHECK([openblas], [
++   SAGE_PYTHON_PACKAGE_CHECK([numpy])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 85dfe5bb32f3c470966b477bae68a921e846d11f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:58:48 -0400
+Subject: Trac #29665: new spkg-configure.m4 for scipy.
+
+This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack
+wind up linked into shared libraries like,
+
+  /usr/.../scipy/linalg/_flinalg.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the openblas SPKG.
+---
+ build/pkgs/scipy/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/scipy/spkg-configure.m4
+
+diff --git a/build/pkgs/scipy/spkg-configure.m4 b/build/pkgs/scipy/spkg-configure.m4
+new file mode 100644
+index 00000000..0b7294a
+--- /dev/null
++++ b/build/pkgs/scipy/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([scipy], [
++  SAGE_SPKG_DEPCHECK([openblas], [
++    SAGE_PYTHON_PACKAGE_CHECK([scipy])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5616f1491036fda95f4d3e840c8c8b531c97323b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 07:19:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pluggy.
+
+---
+ build/pkgs/pluggy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pluggy/spkg-configure.m4
+
+diff --git a/build/pkgs/pluggy/spkg-configure.m4 b/build/pkgs/pluggy/spkg-configure.m4
+new file mode 100644
+index 00000000..11b1fce
+--- /dev/null
++++ b/build/pkgs/pluggy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pluggy], [SAGE_PYTHON_PACKAGE_CHECK([pluggy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6bceae3d356878cfe5fce40c9998dead003a3844 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 07:24:12 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pickleshare.
+
+---
+ build/pkgs/pickleshare/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pickleshare/spkg-configure.m4
+
+diff --git a/build/pkgs/pickleshare/spkg-configure.m4 b/build/pkgs/pickleshare/spkg-configure.m4
+new file mode 100644
+index 00000000..80e9b7c
+--- /dev/null
++++ b/build/pkgs/pickleshare/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pickleshare], [SAGE_PYTHON_PACKAGE_CHECK([pickleshare])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From da2ab534f4a256c82ed4f1c5f0f5c320529b5e9f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 08:53:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for html5lib.
+
+---
+ build/pkgs/html5lib/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/html5lib/spkg-configure.m4
+
+diff --git a/build/pkgs/html5lib/spkg-configure.m4 b/build/pkgs/html5lib/spkg-configure.m4
+new file mode 100644
+index 00000000..f421b7e
+--- /dev/null
++++ b/build/pkgs/html5lib/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([html5lib], [SAGE_PYTHON_PACKAGE_CHECK([html5lib])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5e464134afdf6055b7b5804208f759561c5435cd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 18:30:47 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for networkx.
+
+---
+ build/pkgs/networkx/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/networkx/spkg-configure.m4
+
+diff --git a/build/pkgs/networkx/spkg-configure.m4 b/build/pkgs/networkx/spkg-configure.m4
+new file mode 100644
+index 00000000..926671e
+--- /dev/null
++++ b/build/pkgs/networkx/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([networkx], [SAGE_PYTHON_PACKAGE_CHECK([networkx])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c4d40770cd9c7fda811e31759a5f4aedc320f3f9 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:33:24 -0400
+Subject: Trac #29665: new spkg-configure.m4 for matplotlib.
+
+This includes a SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull],...
+because those dependencies wind up linked into shared libraries like,
+
+  /usr/lib/.../matplotlib/ft2font.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with their SPKG counterparts.
+---
+ build/pkgs/matplotlib/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/matplotlib/spkg-configure.m4
+
+diff --git a/build/pkgs/matplotlib/spkg-configure.m4 b/build/pkgs/matplotlib/spkg-configure.m4
+new file mode 100644
+index 00000000..39c2d29
+--- /dev/null
++++ b/build/pkgs/matplotlib/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([matplotlib], [
++  SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull], [
++    SAGE_PYTHON_PACKAGE_CHECK([matplotlib])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7834dc3ac349201af632f89a9de7cd1967931010 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:35:00 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for bleach.
+
+---
+ build/pkgs/bleach/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/bleach/spkg-configure.m4
+
+diff --git a/build/pkgs/bleach/spkg-configure.m4 b/build/pkgs/bleach/spkg-configure.m4
+new file mode 100644
+index 00000000..3c9bb26
+--- /dev/null
++++ b/build/pkgs/bleach/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([bleach], [SAGE_PYTHON_PACKAGE_CHECK([bleach])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 84cad343287a2c69a4a21b9fa3b92301ff88645b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:37:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for decorator.
+
+---
+ build/pkgs/decorator/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/decorator/spkg-configure.m4
+
+diff --git a/build/pkgs/decorator/spkg-configure.m4 b/build/pkgs/decorator/spkg-configure.m4
+new file mode 100644
+index 00000000..e062778
+--- /dev/null
++++ b/build/pkgs/decorator/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([decorator], [SAGE_PYTHON_PACKAGE_CHECK([decorator])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 25693212572e69d452bc95c923ada13744359eb7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:38:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for idna.
+
+---
+ build/pkgs/idna/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/idna/spkg-configure.m4
+
+diff --git a/build/pkgs/idna/spkg-configure.m4 b/build/pkgs/idna/spkg-configure.m4
+new file mode 100644
+index 00000000..9d363f2
+--- /dev/null
++++ b/build/pkgs/idna/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([idna], [SAGE_PYTHON_PACKAGE_CHECK([idna])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6d5616472f6cdc6cf496bba6fe07bd4ef44dfdaf Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:39:23 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for certifi.
+
+---
+ build/pkgs/certifi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/certifi/spkg-configure.m4
+
+diff --git a/build/pkgs/certifi/spkg-configure.m4 b/build/pkgs/certifi/spkg-configure.m4
+new file mode 100644
+index 00000000..ddd4061
+--- /dev/null
++++ b/build/pkgs/certifi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([certifi], [SAGE_PYTHON_PACKAGE_CHECK([certifi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9412a07023b275e29e8d1af9b8ee3e767042e7fd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:40:59 -0400
+Subject: Trac #29665: new spkg-configure.m4 for pillow.
+
+This includes an SAGE_SPKG_DEPCHECK([bzip2 freetype libpng zlib],...
+because those dependencies wind up linked into shared libraries like,
+
+  /usr/.../PIL/_imagingft.cpython-39-x86_64-linux-gnu.so
+
+and potentially conflict with their SPKG counterparts.
+---
+ build/pkgs/pillow/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/pillow/spkg-configure.m4
+
+diff --git a/build/pkgs/pillow/spkg-configure.m4 b/build/pkgs/pillow/spkg-configure.m4
+new file mode 100644
+index 00000000..f2e68e2
+--- /dev/null
++++ b/build/pkgs/pillow/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([pillow], [
++  SAGE_SPKG_DEPCHECK([bzip2 freetype libpng zlib], [
++    SAGE_PYTHON_PACKAGE_CHECK([pillow])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From eede914311481fdb75b363b7a799075e876a2b4f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:44:13 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for mpmath.
+
+---
+ build/pkgs/mpmath/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mpmath/spkg-configure.m4
+
+diff --git a/build/pkgs/mpmath/spkg-configure.m4 b/build/pkgs/mpmath/spkg-configure.m4
+new file mode 100644
+index 00000000..f43c838
+--- /dev/null
++++ b/build/pkgs/mpmath/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([mpmath], [SAGE_PYTHON_PACKAGE_CHECK([mpmath])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 363a825885832c0b580ff53fe61f5c79e70c4728 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:44:56 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for sympy.
+
+---
+ build/pkgs/sympy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sympy/spkg-configure.m4
+
+diff --git a/build/pkgs/sympy/spkg-configure.m4 b/build/pkgs/sympy/spkg-configure.m4
+new file mode 100644
+index 00000000..fa0f1f5
+--- /dev/null
++++ b/build/pkgs/sympy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([sympy], [SAGE_PYTHON_PACKAGE_CHECK([sympy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0667964c914e4a01dda697190a054ff96cea92d6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:47:06 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pygments.
+
+---
+ build/pkgs/pygments/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pygments/spkg-configure.m4
+
+diff --git a/build/pkgs/pygments/spkg-configure.m4 b/build/pkgs/pygments/spkg-configure.m4
+new file mode 100644
+index 00000000..99f29e3
+--- /dev/null
++++ b/build/pkgs/pygments/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pygments], [SAGE_PYTHON_PACKAGE_CHECK([pygments])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f787c233aa05d8e90f7c6ad18f76bd2fa36bfbfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:48:50 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for jinja2.
+
+---
+ build/pkgs/jinja2/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jinja2/spkg-configure.m4
+
+diff --git a/build/pkgs/jinja2/spkg-configure.m4 b/build/pkgs/jinja2/spkg-configure.m4
+new file mode 100644
+index 00000000..0970d1c
+--- /dev/null
++++ b/build/pkgs/jinja2/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jinja2], [SAGE_PYTHON_PACKAGE_CHECK([jinja2])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 309d8f8e2b7078b5efbbe824b69ec1d9b1e639f0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:43:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pandocfilters.
+
+---
+ build/pkgs/pandocfilters/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/pandocfilters/spkg-configure.m4
+
+diff --git a/build/pkgs/pandocfilters/spkg-configure.m4 b/build/pkgs/pandocfilters/spkg-configure.m4
+new file mode 100644
+index 00000000..3e9537f
+--- /dev/null
++++ b/build/pkgs/pandocfilters/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([pandocfilters], [
++  SAGE_PYTHON_PACKAGE_CHECK([pandocfilters])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f57bfda49777a6ba1cd123553acd75dc347c5521 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:44:46 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for webencodings.
+
+---
+ build/pkgs/webencodings/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/webencodings/spkg-configure.m4
+
+diff --git a/build/pkgs/webencodings/spkg-configure.m4 b/build/pkgs/webencodings/spkg-configure.m4
+new file mode 100644
+index 00000000..1b9a5c4
+--- /dev/null
++++ b/build/pkgs/webencodings/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([webencodings], [
++  SAGE_PYTHON_PACKAGE_CHECK([webencodings])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7f193a62d7a2ea0b6a3ca6beb12390d91c25bbfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:48:26 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pytz.
+
+---
+ build/pkgs/pytz/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pytz/spkg-configure.m4
+
+diff --git a/build/pkgs/pytz/spkg-configure.m4 b/build/pkgs/pytz/spkg-configure.m4
+new file mode 100644
+index 00000000..366521b
+--- /dev/null
++++ b/build/pkgs/pytz/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pytz], [SAGE_PYTHON_PACKAGE_CHECK([pytz])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bfd3fdd887c3465c03465248de4997eed4a82915 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:51:16 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for texttable.
+
+---
+ build/pkgs/texttable/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/texttable/spkg-configure.m4
+
+diff --git a/build/pkgs/texttable/spkg-configure.m4 b/build/pkgs/texttable/spkg-configure.m4
+new file mode 100644
+index 00000000..42a3de1
+--- /dev/null
++++ b/build/pkgs/texttable/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([texttable], [SAGE_PYTHON_PACKAGE_CHECK([texttable])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 914bf0cc57abc46129b27c1525782dbe16da31a2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:53:41 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for babel.
+
+---
+ build/pkgs/babel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/babel/spkg-configure.m4
+
+diff --git a/build/pkgs/babel/spkg-configure.m4 b/build/pkgs/babel/spkg-configure.m4
+new file mode 100644
+index 00000000..d7b9a71
+--- /dev/null
++++ b/build/pkgs/babel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([babel], [SAGE_PYTHON_PACKAGE_CHECK([babel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 56977abd1eafbc87c765a2892cfe525382648259 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 14 Oct 2021 08:06:59 -0400
+Subject: Trac #29665: force system python3 with --enable-system-site-packages.
+
+When the python SPKG is used, the --enable-system-site-packages flag
+will essentially do nothing, and that may confuse users who have
+wasted a few hours building sage. (Generally, they will want to fix
+detection of their system python3 first.)
+
+To forestall that, we now set "--with-system-python3=force" whenever
+the "--enable-system-site-packages" flag is passed.
+---
+ configure.ac | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index db30a91..6fafb83 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -438,10 +438,19 @@ AC_ARG_ENABLE([download-from-upstream-url],
+ AC_ARG_ENABLE(
+   [system-site-packages], [AS_HELP_STRING(
+     [--enable-system-site-packages],
+-    [allow sage to use python packages from the system (experimental; default: no)]
++    [allow the use of python packages from the system (experimental; default: no)]
+   )], [
+   AS_IF([test "x$enable_system_site_packages" = "xyes"], [
+     SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
++
++    dnl We want to raise an error if the user asked for "system site
++    dnl packages" but the system python will not be used. Technically
++    dnl that causes no problems (SAGE_PYTHON_PACKAGE_CHECK always fails,
++    dnl so SPKGs are used for all python packages), but it may be confusing
++    dnl to end users who expect the flag to actually give them access to
++    dnl their system python packages and who may not be paying close
++    dnl attention to their ./configure output.
++    with_system_python3="force"
+   ])
+ ])
+ AC_SUBST([SAGE_VENV_FLAGS])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 02b369fd24ef7cf8997082e7850b9cf022cae34b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 01:18:35 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for setuptools.
+
+---
+ build/pkgs/setuptools/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/setuptools/spkg-configure.m4
+
+diff --git a/build/pkgs/setuptools/spkg-configure.m4 b/build/pkgs/setuptools/spkg-configure.m4
+new file mode 100644
+index 00000000..a2ad811
+--- /dev/null
++++ b/build/pkgs/setuptools/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([setuptools], [SAGE_PYTHON_PACKAGE_CHECK([setuptools])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 05117317d38693978efaf36e81d8b02bae44b257 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 01:15:48 -0400
+Subject: Trac #29665: poison PYTHONUSERBASE when testing for "system"
+ packages.
+
+When we're detecting system installations of python packages, we want
+to hide anything that was installed with e.g. "pip install --user". To
+accomplish that, we mimic the PYTHONUSERBASE poisoning from sage-env
+within the SAGE_PYTHON_PACKAGE_CHECK() macro.
+---
+ m4/sage_python_package_check.m4 | 18 +++++++++++++++++-
+ 1 file changed, 17 insertions(+), 1 deletion(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 77b0a0c..b8cdba4 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -38,11 +38,27 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     dnl package.
+     SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
+     AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++
++    dnl To prevent user-site (pip install --user) packages from being
++    dnl detected as "system" packages, we poison PYTHONUSERBASE. The
++    dnl sage-env script also does this at runtime; we mimic that
++    dnl implementation to ensure that the behaviors at ./configure and
++    dnl runtime are identical. Beware that (as in sage-env) the poisoning
++    dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
++    dnl user points PYTHONUSERBASE to any path (even the default), then
++    dnl his local pip packages will be detected.
++    PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
++    AS_IF([test -z "${PYTHONUSERBASE}"], [
++      PYTHONUSERBASE="${HOME}/.sage/local"
++    ])
++
+     AS_IF(
+-      ["${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())"],
++      [PYTHONUSERBASE="${PYTHONUSERBASE}" "${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" 2>/dev/null],
+       [AC_MSG_RESULT(yes)],
+       [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+     )
++
++    PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d75c1492f63a584b5ec5f424ddd7f7c4a6d502d3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:20:04 -0400
+Subject: Trac #29665: run SAGE_PYTHON_PACKAGE_CHECK() inside a venv.
+
+To recreate the runtime environment as closely as possible, we now use
+a venv (with system site packages enabled) when checking for system
+copies of python packages.
+---
+ m4/sage_python_package_check.m4 | 76 +++++++++++++++++++++++++++--------------
+ 1 file changed, 51 insertions(+), 25 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index b8cdba4..7cbd6c0 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -15,9 +15,11 @@
+ #
+ #     2. If we are not using the system python (no $PYTHON_FOR_VENV),
+ #
+-#     3. If setuptools is not available to the system python,
++#     3. If we are unable to create a venv with the system python,
+ #
+-#     4. If the contents of install-requires.txt are not met (wrong
++#     4. If setuptools is not available to the system python,
++#
++#     5. If the contents of install-requires.txt are not met (wrong
+ #        version, no version, etc.) by the system python.
+ #
+ #   In any of those cases, we set sage_spkg_install_$package to "yes"
+@@ -27,38 +29,62 @@
+ #
+ #   The SAGE_SPKG_CONFIGURE_PYTHON3() macro is AC_REQUIRE'd to ensure
+ #   that $PYTHON_FOR_VENV is available, if it is going to be available.
++#   The check is run inside a new venv, and with the PYTHONUSERBASE
++#   variable poisoned in the same manner as sage-env poisons it, to
++#   ensure that the ./configure- and run-time views of the system
++#   are as similar as possible.
+ #
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
+     AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
+ 
+-    dnl strip all comments from install-requires.txt; this should leave
+-    dnl only a single line containing the version specification for this
+-    dnl package.
+-    SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
+-    AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++    dnl We run this check inside a python venv, because that's ultimately
++    dnl how the system $PYTHON_FOR_VENV will be used.
++    AC_MSG_CHECKING([if we can create a python venv in config.venv])
+ 
+-    dnl To prevent user-site (pip install --user) packages from being
+-    dnl detected as "system" packages, we poison PYTHONUSERBASE. The
+-    dnl sage-env script also does this at runtime; we mimic that
+-    dnl implementation to ensure that the behaviors at ./configure and
+-    dnl runtime are identical. Beware that (as in sage-env) the poisoning
+-    dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
+-    dnl user points PYTHONUSERBASE to any path (even the default), then
+-    dnl his local pip packages will be detected.
+-    PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
+-    AS_IF([test -z "${PYTHONUSERBASE}"], [
+-      PYTHONUSERBASE="${HOME}/.sage/local"
+-    ])
++    dnl Use --clear because ./configure typically clobbers its output files.
++    AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
++                                        --clear                dnl
++                                        --without-pip          dnl
++					config.venv], [
++      AC_MSG_RESULT(yes)
++      dnl strip all comments from install-requires.txt; this should leave
++      dnl only a single line containing the version specification for this
++      dnl package.
++      SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
++      AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++
++      dnl To prevent user-site (pip install --user) packages from being
++      dnl detected as "system" packages, we poison PYTHONUSERBASE. The
++      dnl sage-env script also does this at runtime; we mimic that
++      dnl implementation to ensure that the behaviors at ./configure and
++      dnl runtime are identical. Beware that (as in sage-env) the poisoning
++      dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
++      dnl user points PYTHONUSERBASE to any path (even the default), then
++      dnl his local pip packages will be detected.
++      PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
++      AS_IF([test -z "${PYTHONUSERBASE}"], [
++        PYTHONUSERBASE="${HOME}/.sage/local"
++      ])
+ 
+-    AS_IF(
+-      [PYTHONUSERBASE="${PYTHONUSERBASE}" "${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" 2>/dev/null],
+-      [AC_MSG_RESULT(yes)],
+-      [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+-    )
++      AS_IF(
++        [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
++           "from setuptools.version import pkg_resources;              dnl
++            pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" dnl
++	 2>/dev/null],
++        [AC_MSG_RESULT(yes)],
++        [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
++      )
++
++      PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
++    ], [
++      dnl failed to create a venv for some reason
++      AC_MSG_RESULT(no)
++      sage_spkg_install_$1=yes
++    ])
+ 
+-    PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
++    rm -rf config.venv
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 87646c3264a04ffd98a12d67074f93e1943a1e96 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:38:08 -0400
+Subject: Trac #29665: log SAGE_PYTHON_PACKAGE_CHECK() failures to config.log.
+
+---
+ m4/sage_python_package_check.m4 | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 7cbd6c0..e0e0b9f 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -47,7 +47,8 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
+                                         --clear                dnl
+                                         --without-pip          dnl
+-					config.venv], [
++                                        config.venv            dnl
++                                        2>&AS_MESSAGE_LOG_FD], [
+       AC_MSG_RESULT(yes)
+       dnl strip all comments from install-requires.txt; this should leave
+       dnl only a single line containing the version specification for this
+@@ -72,7 +73,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+         [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
+            "from setuptools.version import pkg_resources;              dnl
+             pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" dnl
+-	 2>/dev/null],
++	 2>&AS_MESSAGE_LOG_FD],
+         [AC_MSG_RESULT(yes)],
+         [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+       )
+-- 
+cgit v1.0-1-gd88e
+
+
+From f7dfffd1c64816e2ae4e0f420b22065c5c5bf2cb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:45:37 -0400
+Subject: Trac #29665: don't clobber a plain file named config.venv.
+
+When SAGE_PYTHON_PACKAGE_CHECK() is cleaning up, we no longer remove
+"config.venv" unconditionally. Instead, we remove it only if it is a
+directory. This is also how "pyvenv --clear" works.
+---
+ m4/sage_python_package_check.m4 | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index e0e0b9f..127a078 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -85,7 +85,9 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+       sage_spkg_install_$1=yes
+     ])
+ 
+-    rm -rf config.venv
++    dnl Clean up config.venv, but only if we could have created it.
++    dnl (The --clear flag to pyvenv will not clobber a plain file.)
++    AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9849c77313b895dcfb786d2ea54e36585bd31ce2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 16 Oct 2021 08:14:42 -0400
+Subject: Trac #29665: don't announce system python packages that won't be
+ used.
+
+When --enable-system-site-packages was not given, the python packages
+using SAGE_PYTHON_PACKAGE_CHECK() in spkg-configure.m4 cannot be used.
+Rather than suggest that users install them anyway, that macro now
+hacks the value of sage_use_system_$package to be "no" when the use
+of system site packages is disabled at the python level.
+---
+ m4/sage_python_package_check.m4 | 17 +++++++++++++++++
+ 1 file changed, 17 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 127a078..7ee82a7 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -89,6 +89,23 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     dnl (The --clear flag to pyvenv will not clobber a plain file.)
+     AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
++    dnl System site packages are disabled.
+     sage_spkg_install_$1=yes
++
++    dnl We have to retroactively hack the --with-system-foo={no,yes,force}
++    dnl mechanism here because it wasn't designed with the ability to
++    dnl disable arbitrary chunks of system packages in mind. The easy cases
++    dnl are "no" and "force" which require no action; "no" means we won't
++    dnl suggest the package anyway, and "force" will raise an error when
++    dnl the system-package check fails.
++    dnl
++    dnl The default of "yes" is more troubling because it is the default. To
++    dnl avoid prompting users to install packages that won't be used, we want
++    dnl to ignore "yes" when reporting the "hint: install these packages..."
++    dnl at the end of ./configure. To accomplish that, we change "yes" to
++    dnl "no" here, essentially changing the default for packages using this
++    dnl macro when --enable-system-site-packages is disabled. Packages with
++    dnl "no" are not suggested to the user.
++    AS_IF([test "${sage_use_system_$1}" = "yes"],[sage_use_system_$1=no])
+   ])
+ ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3e6ad737b94aaac234d615ecaf1a2455eb607f1a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 17 Oct 2021 06:16:21 -0400
+Subject: Trac #29665: add Gentoo package information for python packages.
+
+---
+ build/pkgs/babel/distros/gentoo.txt         | 1 +
+ build/pkgs/bleach/distros/gentoo.txt        | 1 +
+ build/pkgs/certifi/distros/gentoo.txt       | 1 +
+ build/pkgs/cvxopt/distros/gentoo.txt        | 1 +
+ build/pkgs/decorator/distros/gentoo.txt     | 1 +
+ build/pkgs/html5lib/distros/gentoo.txt      | 1 +
+ build/pkgs/idna/distros/gentoo.txt          | 1 +
+ build/pkgs/jinja2/distros/gentoo.txt        | 1 +
+ build/pkgs/matplotlib/distros/gentoo.txt    | 1 +
+ build/pkgs/mpmath/distros/gentoo.txt        | 1 +
+ build/pkgs/networkx/distros/gentoo.txt      | 1 +
+ build/pkgs/numpy/distros/gentoo.txt         | 1 +
+ build/pkgs/packaging/distros/gentoo.txt     | 1 +
+ build/pkgs/pandocfilters/distros/gentoo.txt | 1 +
+ build/pkgs/pickleshare/distros/gentoo.txt   | 1 +
+ build/pkgs/pillow/distros/gentoo.txt        | 1 +
+ build/pkgs/pluggy/distros/gentoo.txt        | 1 +
+ build/pkgs/pygments/distros/gentoo.txt      | 1 +
+ build/pkgs/pytz/distros/gentoo.txt          | 1 +
+ build/pkgs/pyzmq/distros/gentoo.txt         | 1 +
+ build/pkgs/requests/distros/gentoo.txt      | 1 +
+ build/pkgs/scipy/distros/gentoo.txt         | 1 +
+ build/pkgs/setuptools/distros/gentoo.txt    | 1 +
+ build/pkgs/six/distros/gentoo.txt           | 1 +
+ build/pkgs/sympy/distros/gentoo.txt         | 1 +
+ build/pkgs/texttable/distros/gentoo.txt     | 1 +
+ build/pkgs/toml/distros/gentoo.txt          | 1 +
+ build/pkgs/webencodings/distros/gentoo.txt  | 1 +
+ 28 files changed, 28 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/gentoo.txt
+ create mode 100644 build/pkgs/bleach/distros/gentoo.txt
+ create mode 100644 build/pkgs/certifi/distros/gentoo.txt
+ create mode 100644 build/pkgs/cvxopt/distros/gentoo.txt
+ create mode 100644 build/pkgs/decorator/distros/gentoo.txt
+ create mode 100644 build/pkgs/html5lib/distros/gentoo.txt
+ create mode 100644 build/pkgs/idna/distros/gentoo.txt
+ create mode 100644 build/pkgs/jinja2/distros/gentoo.txt
+ create mode 100644 build/pkgs/matplotlib/distros/gentoo.txt
+ create mode 100644 build/pkgs/mpmath/distros/gentoo.txt
+ create mode 100644 build/pkgs/networkx/distros/gentoo.txt
+ create mode 100644 build/pkgs/numpy/distros/gentoo.txt
+ create mode 100644 build/pkgs/packaging/distros/gentoo.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/gentoo.txt
+ create mode 100644 build/pkgs/pickleshare/distros/gentoo.txt
+ create mode 100644 build/pkgs/pillow/distros/gentoo.txt
+ create mode 100644 build/pkgs/pluggy/distros/gentoo.txt
+ create mode 100644 build/pkgs/pygments/distros/gentoo.txt
+ create mode 100644 build/pkgs/pytz/distros/gentoo.txt
+ create mode 100644 build/pkgs/pyzmq/distros/gentoo.txt
+ create mode 100644 build/pkgs/requests/distros/gentoo.txt
+ create mode 100644 build/pkgs/scipy/distros/gentoo.txt
+ create mode 100644 build/pkgs/setuptools/distros/gentoo.txt
+ create mode 100644 build/pkgs/six/distros/gentoo.txt
+ create mode 100644 build/pkgs/sympy/distros/gentoo.txt
+ create mode 100644 build/pkgs/texttable/distros/gentoo.txt
+ create mode 100644 build/pkgs/toml/distros/gentoo.txt
+ create mode 100644 build/pkgs/webencodings/distros/gentoo.txt
+
+diff --git a/build/pkgs/babel/distros/gentoo.txt b/build/pkgs/babel/distros/gentoo.txt
+new file mode 100644
+index 00000000..2d2c34f
+--- /dev/null
++++ b/build/pkgs/babel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/Babel
+diff --git a/build/pkgs/bleach/distros/gentoo.txt b/build/pkgs/bleach/distros/gentoo.txt
+new file mode 100644
+index 00000000..b4f9744
+--- /dev/null
++++ b/build/pkgs/bleach/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/bleach
+diff --git a/build/pkgs/certifi/distros/gentoo.txt b/build/pkgs/certifi/distros/gentoo.txt
+new file mode 100644
+index 00000000..72e2e91
+--- /dev/null
++++ b/build/pkgs/certifi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/certifi
+diff --git a/build/pkgs/cvxopt/distros/gentoo.txt b/build/pkgs/cvxopt/distros/gentoo.txt
+new file mode 100644
+index 00000000..b312391
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/cvxopt
+diff --git a/build/pkgs/decorator/distros/gentoo.txt b/build/pkgs/decorator/distros/gentoo.txt
+new file mode 100644
+index 00000000..fea5a67
+--- /dev/null
++++ b/build/pkgs/decorator/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/decorator
+diff --git a/build/pkgs/html5lib/distros/gentoo.txt b/build/pkgs/html5lib/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c2be76
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/html5lib
+diff --git a/build/pkgs/idna/distros/gentoo.txt b/build/pkgs/idna/distros/gentoo.txt
+new file mode 100644
+index 00000000..68ef51c
+--- /dev/null
++++ b/build/pkgs/idna/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/idna
+diff --git a/build/pkgs/jinja2/distros/gentoo.txt b/build/pkgs/jinja2/distros/gentoo.txt
+new file mode 100644
+index 00000000..15a27ae
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jinja
+diff --git a/build/pkgs/matplotlib/distros/gentoo.txt b/build/pkgs/matplotlib/distros/gentoo.txt
+new file mode 100644
+index 00000000..bcfefb5
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/matplotlib
+diff --git a/build/pkgs/mpmath/distros/gentoo.txt b/build/pkgs/mpmath/distros/gentoo.txt
+new file mode 100644
+index 00000000..946c62d
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/mpmath
+diff --git a/build/pkgs/networkx/distros/gentoo.txt b/build/pkgs/networkx/distros/gentoo.txt
+new file mode 100644
+index 00000000..dd97742
+--- /dev/null
++++ b/build/pkgs/networkx/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/networkx
+diff --git a/build/pkgs/numpy/distros/gentoo.txt b/build/pkgs/numpy/distros/gentoo.txt
+new file mode 100644
+index 00000000..d2179d4
+--- /dev/null
++++ b/build/pkgs/numpy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/numpy
+diff --git a/build/pkgs/packaging/distros/gentoo.txt b/build/pkgs/packaging/distros/gentoo.txt
+new file mode 100644
+index 00000000..e5309ed
+--- /dev/null
++++ b/build/pkgs/packaging/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/packaging
+diff --git a/build/pkgs/pandocfilters/distros/gentoo.txt b/build/pkgs/pandocfilters/distros/gentoo.txt
+new file mode 100644
+index 00000000..a726fda
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/gentoo.txt b/build/pkgs/pickleshare/distros/gentoo.txt
+new file mode 100644
+index 00000000..14fad0f
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pickleshare
+diff --git a/build/pkgs/pillow/distros/gentoo.txt b/build/pkgs/pillow/distros/gentoo.txt
+new file mode 100644
+index 00000000..1243649
+--- /dev/null
++++ b/build/pkgs/pillow/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pillow
+diff --git a/build/pkgs/pluggy/distros/gentoo.txt b/build/pkgs/pluggy/distros/gentoo.txt
+new file mode 100644
+index 00000000..7b33876
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pluggy
+diff --git a/build/pkgs/pygments/distros/gentoo.txt b/build/pkgs/pygments/distros/gentoo.txt
+new file mode 100644
+index 00000000..a584f32
+--- /dev/null
++++ b/build/pkgs/pygments/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pygments
+diff --git a/build/pkgs/pytz/distros/gentoo.txt b/build/pkgs/pytz/distros/gentoo.txt
+new file mode 100644
+index 00000000..902a18b
+--- /dev/null
++++ b/build/pkgs/pytz/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pytz
+diff --git a/build/pkgs/pyzmq/distros/gentoo.txt b/build/pkgs/pyzmq/distros/gentoo.txt
+new file mode 100644
+index 00000000..77c2429
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyzmq
+diff --git a/build/pkgs/requests/distros/gentoo.txt b/build/pkgs/requests/distros/gentoo.txt
+new file mode 100644
+index 00000000..d3dc941
+--- /dev/null
++++ b/build/pkgs/requests/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/requests
+diff --git a/build/pkgs/scipy/distros/gentoo.txt b/build/pkgs/scipy/distros/gentoo.txt
+new file mode 100644
+index 00000000..11dabd2
+--- /dev/null
++++ b/build/pkgs/scipy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/scipy
+diff --git a/build/pkgs/setuptools/distros/gentoo.txt b/build/pkgs/setuptools/distros/gentoo.txt
+new file mode 100644
+index 00000000..3a4fa34
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/setuptools
+diff --git a/build/pkgs/six/distros/gentoo.txt b/build/pkgs/six/distros/gentoo.txt
+new file mode 100644
+index 00000000..f73f648
+--- /dev/null
++++ b/build/pkgs/six/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/six
+diff --git a/build/pkgs/sympy/distros/gentoo.txt b/build/pkgs/sympy/distros/gentoo.txt
+new file mode 100644
+index 00000000..b5a5034
+--- /dev/null
++++ b/build/pkgs/sympy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sympy
+diff --git a/build/pkgs/texttable/distros/gentoo.txt b/build/pkgs/texttable/distros/gentoo.txt
+new file mode 100644
+index 00000000..b33a7a7
+--- /dev/null
++++ b/build/pkgs/texttable/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/texttable
+diff --git a/build/pkgs/toml/distros/gentoo.txt b/build/pkgs/toml/distros/gentoo.txt
+new file mode 100644
+index 00000000..64fcea3
+--- /dev/null
++++ b/build/pkgs/toml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/toml
+diff --git a/build/pkgs/webencodings/distros/gentoo.txt b/build/pkgs/webencodings/distros/gentoo.txt
+new file mode 100644
+index 00000000..7539b0f
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/webencodings
+-- 
+cgit v1.0-1-gd88e
+
+
+From 088380f884124c9608160b613ba031c5f023f604 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 18:43:04 -0700
+Subject: build/pkgs: Add distros/fedora.txt for Python packages
+
+---
+ build/pkgs/babel/distros/fedora.txt         | 1 +
+ build/pkgs/bleach/distros/fedora.txt        | 1 +
+ build/pkgs/certifi/distros/fedora.txt       | 1 +
+ build/pkgs/cvxopt/distros/fedora.txt        | 1 +
+ build/pkgs/decorator/distros/fedora.txt     | 1 +
+ build/pkgs/html5lib/distros/fedora.txt      | 1 +
+ build/pkgs/idna/distros/fedora.txt          | 1 +
+ build/pkgs/jinja2/distros/fedora.txt        | 1 +
+ build/pkgs/matplotlib/distros/fedora.txt    | 1 +
+ build/pkgs/mpmath/distros/fedora.txt        | 1 +
+ build/pkgs/networkx/distros/fedora.txt      | 1 +
+ build/pkgs/numpy/distros/fedora.txt         | 1 +
+ build/pkgs/packaging/distros/fedora.txt     | 1 +
+ build/pkgs/pandocfilters/distros/fedora.txt | 1 +
+ build/pkgs/pickleshare/distros/fedora.txt   | 1 +
+ build/pkgs/pillow/distros/fedora.txt        | 1 +
+ build/pkgs/pluggy/distros/fedora.txt        | 1 +
+ build/pkgs/py/distros/fedora.txt            | 1 +
+ build/pkgs/pygments/distros/fedora.txt      | 1 +
+ build/pkgs/pytz/distros/fedora.txt          | 1 +
+ build/pkgs/pyzmq/distros/fedora.txt         | 1 +
+ build/pkgs/requests/distros/fedora.txt      | 1 +
+ build/pkgs/scipy/distros/fedora.txt         | 1 +
+ build/pkgs/setuptools/distros/fedora.txt    | 1 +
+ build/pkgs/six/distros/fedora.txt           | 1 +
+ build/pkgs/sympy/distros/fedora.txt         | 1 +
+ build/pkgs/texttable/distros/fedora.txt     | 1 +
+ build/pkgs/toml/distros/fedora.txt          | 1 +
+ build/pkgs/webencodings/distros/fedora.txt  | 1 +
+ build/pkgs/wheel/distros/fedora.txt         | 1 +
+ 30 files changed, 30 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/fedora.txt
+ create mode 100644 build/pkgs/bleach/distros/fedora.txt
+ create mode 100644 build/pkgs/certifi/distros/fedora.txt
+ create mode 100644 build/pkgs/cvxopt/distros/fedora.txt
+ create mode 100644 build/pkgs/decorator/distros/fedora.txt
+ create mode 100644 build/pkgs/html5lib/distros/fedora.txt
+ create mode 100644 build/pkgs/idna/distros/fedora.txt
+ create mode 100644 build/pkgs/jinja2/distros/fedora.txt
+ create mode 100644 build/pkgs/matplotlib/distros/fedora.txt
+ create mode 100644 build/pkgs/mpmath/distros/fedora.txt
+ create mode 100644 build/pkgs/networkx/distros/fedora.txt
+ create mode 100644 build/pkgs/numpy/distros/fedora.txt
+ create mode 100644 build/pkgs/packaging/distros/fedora.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/fedora.txt
+ create mode 100644 build/pkgs/pickleshare/distros/fedora.txt
+ create mode 100644 build/pkgs/pillow/distros/fedora.txt
+ create mode 100644 build/pkgs/pluggy/distros/fedora.txt
+ create mode 100644 build/pkgs/py/distros/fedora.txt
+ create mode 100644 build/pkgs/pygments/distros/fedora.txt
+ create mode 100644 build/pkgs/pytz/distros/fedora.txt
+ create mode 100644 build/pkgs/pyzmq/distros/fedora.txt
+ create mode 100644 build/pkgs/requests/distros/fedora.txt
+ create mode 100644 build/pkgs/scipy/distros/fedora.txt
+ create mode 100644 build/pkgs/setuptools/distros/fedora.txt
+ create mode 100644 build/pkgs/six/distros/fedora.txt
+ create mode 100644 build/pkgs/sympy/distros/fedora.txt
+ create mode 100644 build/pkgs/texttable/distros/fedora.txt
+ create mode 100644 build/pkgs/toml/distros/fedora.txt
+ create mode 100644 build/pkgs/webencodings/distros/fedora.txt
+ create mode 100644 build/pkgs/wheel/distros/fedora.txt
+
+diff --git a/build/pkgs/babel/distros/fedora.txt b/build/pkgs/babel/distros/fedora.txt
+new file mode 100644
+index 00000000..98f6593
+--- /dev/null
++++ b/build/pkgs/babel/distros/fedora.txt
+@@ -0,0 +1 @@
++babel
+diff --git a/build/pkgs/bleach/distros/fedora.txt b/build/pkgs/bleach/distros/fedora.txt
+new file mode 100644
+index 00000000..c5422cc
+--- /dev/null
++++ b/build/pkgs/bleach/distros/fedora.txt
+@@ -0,0 +1 @@
++python-bleach
+diff --git a/build/pkgs/certifi/distros/fedora.txt b/build/pkgs/certifi/distros/fedora.txt
+new file mode 100644
+index 00000000..be421c8
+--- /dev/null
++++ b/build/pkgs/certifi/distros/fedora.txt
+@@ -0,0 +1 @@
++python-certifi
+diff --git a/build/pkgs/cvxopt/distros/fedora.txt b/build/pkgs/cvxopt/distros/fedora.txt
+new file mode 100644
+index 00000000..f15770f
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/fedora.txt
+@@ -0,0 +1 @@
++python-cvxopt
+diff --git a/build/pkgs/decorator/distros/fedora.txt b/build/pkgs/decorator/distros/fedora.txt
+new file mode 100644
+index 00000000..0795604
+--- /dev/null
++++ b/build/pkgs/decorator/distros/fedora.txt
+@@ -0,0 +1 @@
++python-decorator
+diff --git a/build/pkgs/html5lib/distros/fedora.txt b/build/pkgs/html5lib/distros/fedora.txt
+new file mode 100644
+index 00000000..b821491
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/fedora.txt
+@@ -0,0 +1 @@
++python-html5lib
+diff --git a/build/pkgs/idna/distros/fedora.txt b/build/pkgs/idna/distros/fedora.txt
+new file mode 100644
+index 00000000..a73e70c
+--- /dev/null
++++ b/build/pkgs/idna/distros/fedora.txt
+@@ -0,0 +1 @@
++python-idna
+diff --git a/build/pkgs/jinja2/distros/fedora.txt b/build/pkgs/jinja2/distros/fedora.txt
+new file mode 100644
+index 00000000..f5f3caf
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/fedora.txt
+@@ -0,0 +1 @@
++python-jinja2
+diff --git a/build/pkgs/matplotlib/distros/fedora.txt b/build/pkgs/matplotlib/distros/fedora.txt
+new file mode 100644
+index 00000000..f6d856e
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/fedora.txt
+@@ -0,0 +1 @@
++python-matplotlib
+diff --git a/build/pkgs/mpmath/distros/fedora.txt b/build/pkgs/mpmath/distros/fedora.txt
+new file mode 100644
+index 00000000..a7dc8d5
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/fedora.txt
+@@ -0,0 +1 @@
++python-mpmath
+diff --git a/build/pkgs/networkx/distros/fedora.txt b/build/pkgs/networkx/distros/fedora.txt
+new file mode 100644
+index 00000000..293f943
+--- /dev/null
++++ b/build/pkgs/networkx/distros/fedora.txt
+@@ -0,0 +1 @@
++python-networkx
+diff --git a/build/pkgs/numpy/distros/fedora.txt b/build/pkgs/numpy/distros/fedora.txt
+new file mode 100644
+index 00000000..c8722b9
+--- /dev/null
++++ b/build/pkgs/numpy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-numpy
+diff --git a/build/pkgs/packaging/distros/fedora.txt b/build/pkgs/packaging/distros/fedora.txt
+new file mode 100644
+index 00000000..02ad855
+--- /dev/null
++++ b/build/pkgs/packaging/distros/fedora.txt
+@@ -0,0 +1 @@
++python-packaging
+diff --git a/build/pkgs/pandocfilters/distros/fedora.txt b/build/pkgs/pandocfilters/distros/fedora.txt
+new file mode 100644
+index 00000000..e7a86d0
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/fedora.txt b/build/pkgs/pickleshare/distros/fedora.txt
+new file mode 100644
+index 00000000..6d991a2
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pickleshare
+diff --git a/build/pkgs/pillow/distros/fedora.txt b/build/pkgs/pillow/distros/fedora.txt
+new file mode 100644
+index 00000000..86dbb1d
+--- /dev/null
++++ b/build/pkgs/pillow/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pillow
+diff --git a/build/pkgs/pluggy/distros/fedora.txt b/build/pkgs/pluggy/distros/fedora.txt
+new file mode 100644
+index 00000000..c869e54
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pluggy
+diff --git a/build/pkgs/py/distros/fedora.txt b/build/pkgs/py/distros/fedora.txt
+new file mode 100644
+index 00000000..b348d39
+--- /dev/null
++++ b/build/pkgs/py/distros/fedora.txt
+@@ -0,0 +1 @@
++python-py
+diff --git a/build/pkgs/pygments/distros/fedora.txt b/build/pkgs/pygments/distros/fedora.txt
+new file mode 100644
+index 00000000..f3e72a8
+--- /dev/null
++++ b/build/pkgs/pygments/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pygments
+diff --git a/build/pkgs/pytz/distros/fedora.txt b/build/pkgs/pytz/distros/fedora.txt
+new file mode 100644
+index 00000000..2cccc9e
+--- /dev/null
++++ b/build/pkgs/pytz/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pytz
+diff --git a/build/pkgs/pyzmq/distros/fedora.txt b/build/pkgs/pyzmq/distros/fedora.txt
+new file mode 100644
+index 00000000..23f64d1
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pyzmq
+diff --git a/build/pkgs/requests/distros/fedora.txt b/build/pkgs/requests/distros/fedora.txt
+new file mode 100644
+index 00000000..93a7bc1
+--- /dev/null
++++ b/build/pkgs/requests/distros/fedora.txt
+@@ -0,0 +1 @@
++python-requests
+diff --git a/build/pkgs/scipy/distros/fedora.txt b/build/pkgs/scipy/distros/fedora.txt
+new file mode 100644
+index 00000000..7ff2882
+--- /dev/null
++++ b/build/pkgs/scipy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-scipy
+diff --git a/build/pkgs/setuptools/distros/fedora.txt b/build/pkgs/setuptools/distros/fedora.txt
+new file mode 100644
+index 00000000..e1ad178
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/fedora.txt
+@@ -0,0 +1 @@
++python-setuptools
+diff --git a/build/pkgs/six/distros/fedora.txt b/build/pkgs/six/distros/fedora.txt
+new file mode 100644
+index 00000000..787c530
+--- /dev/null
++++ b/build/pkgs/six/distros/fedora.txt
+@@ -0,0 +1 @@
++python-six
+diff --git a/build/pkgs/sympy/distros/fedora.txt b/build/pkgs/sympy/distros/fedora.txt
+new file mode 100644
+index 00000000..126c88a
+--- /dev/null
++++ b/build/pkgs/sympy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-sympy
+diff --git a/build/pkgs/texttable/distros/fedora.txt b/build/pkgs/texttable/distros/fedora.txt
+new file mode 100644
+index 00000000..8d1ccec
+--- /dev/null
++++ b/build/pkgs/texttable/distros/fedora.txt
+@@ -0,0 +1 @@
++python-texttable
+diff --git a/build/pkgs/toml/distros/fedora.txt b/build/pkgs/toml/distros/fedora.txt
+new file mode 100644
+index 00000000..821ee77
+--- /dev/null
++++ b/build/pkgs/toml/distros/fedora.txt
+@@ -0,0 +1 @@
++python-toml
+diff --git a/build/pkgs/webencodings/distros/fedora.txt b/build/pkgs/webencodings/distros/fedora.txt
+new file mode 100644
+index 00000000..12ddba9
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/fedora.txt
+@@ -0,0 +1 @@
++python-webencodings
+diff --git a/build/pkgs/wheel/distros/fedora.txt b/build/pkgs/wheel/distros/fedora.txt
+new file mode 100644
+index 00000000..ae4cbb9
+--- /dev/null
++++ b/build/pkgs/wheel/distros/fedora.txt
+@@ -0,0 +1 @@
++python-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From ad1d5a20380b147c774903066031442f31094626 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 21:04:04 -0700
+Subject: build/pkgs: Add distros/arch.txt for Python packages
+
+---
+ build/pkgs/babel/distros/arch.txt         | 1 +
+ build/pkgs/bleach/distros/arch.txt        | 1 +
+ build/pkgs/certifi/distros/arch.txt       | 1 +
+ build/pkgs/cvxopt/distros/arch.txt        | 1 +
+ build/pkgs/decorator/distros/arch.txt     | 1 +
+ build/pkgs/html5lib/distros/arch.txt      | 1 +
+ build/pkgs/idna/distros/arch.txt          | 1 +
+ build/pkgs/matplotlib/distros/arch.txt    | 1 +
+ build/pkgs/mpmath/distros/arch.txt        | 1 +
+ build/pkgs/networkx/distros/arch.txt      | 1 +
+ build/pkgs/numpy/distros/arch.txt         | 1 +
+ build/pkgs/packaging/distros/arch.txt     | 1 +
+ build/pkgs/pandocfilters/distros/arch.txt | 1 +
+ build/pkgs/pickleshare/distros/arch.txt   | 1 +
+ build/pkgs/pillow/distros/arch.txt        | 1 +
+ build/pkgs/pluggy/distros/arch.txt        | 1 +
+ build/pkgs/py/distros/arch.txt            | 1 +
+ build/pkgs/pygments/distros/arch.txt      | 1 +
+ build/pkgs/pytz/distros/arch.txt          | 1 +
+ build/pkgs/pyzmq/distros/arch.txt         | 1 +
+ build/pkgs/requests/distros/arch.txt      | 1 +
+ build/pkgs/scipy/distros/arch.txt         | 1 +
+ build/pkgs/setuptools/distros/arch.txt    | 1 +
+ build/pkgs/six/distros/arch.txt           | 1 +
+ build/pkgs/sympy/distros/arch.txt         | 1 +
+ build/pkgs/texttable/distros/arch.txt     | 1 +
+ build/pkgs/toml/distros/arch.txt          | 1 +
+ build/pkgs/webencodings/distros/arch.txt  | 1 +
+ build/pkgs/wheel/distros/arch.txt         | 1 +
+ 29 files changed, 29 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/arch.txt
+ create mode 100644 build/pkgs/bleach/distros/arch.txt
+ create mode 100644 build/pkgs/certifi/distros/arch.txt
+ create mode 100644 build/pkgs/cvxopt/distros/arch.txt
+ create mode 100644 build/pkgs/decorator/distros/arch.txt
+ create mode 100644 build/pkgs/html5lib/distros/arch.txt
+ create mode 100644 build/pkgs/idna/distros/arch.txt
+ create mode 100644 build/pkgs/matplotlib/distros/arch.txt
+ create mode 100644 build/pkgs/mpmath/distros/arch.txt
+ create mode 100644 build/pkgs/networkx/distros/arch.txt
+ create mode 100644 build/pkgs/numpy/distros/arch.txt
+ create mode 100644 build/pkgs/packaging/distros/arch.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/arch.txt
+ create mode 100644 build/pkgs/pickleshare/distros/arch.txt
+ create mode 100644 build/pkgs/pillow/distros/arch.txt
+ create mode 100644 build/pkgs/pluggy/distros/arch.txt
+ create mode 100644 build/pkgs/py/distros/arch.txt
+ create mode 100644 build/pkgs/pygments/distros/arch.txt
+ create mode 100644 build/pkgs/pytz/distros/arch.txt
+ create mode 100644 build/pkgs/pyzmq/distros/arch.txt
+ create mode 100644 build/pkgs/requests/distros/arch.txt
+ create mode 100644 build/pkgs/scipy/distros/arch.txt
+ create mode 100644 build/pkgs/setuptools/distros/arch.txt
+ create mode 100644 build/pkgs/six/distros/arch.txt
+ create mode 100644 build/pkgs/sympy/distros/arch.txt
+ create mode 100644 build/pkgs/texttable/distros/arch.txt
+ create mode 100644 build/pkgs/toml/distros/arch.txt
+ create mode 100644 build/pkgs/webencodings/distros/arch.txt
+ create mode 100644 build/pkgs/wheel/distros/arch.txt
+
+diff --git a/build/pkgs/babel/distros/arch.txt b/build/pkgs/babel/distros/arch.txt
+new file mode 100644
+index 00000000..f2d828c
+--- /dev/null
++++ b/build/pkgs/babel/distros/arch.txt
+@@ -0,0 +1 @@
++python-babel
+diff --git a/build/pkgs/bleach/distros/arch.txt b/build/pkgs/bleach/distros/arch.txt
+new file mode 100644
+index 00000000..c5422cc
+--- /dev/null
++++ b/build/pkgs/bleach/distros/arch.txt
+@@ -0,0 +1 @@
++python-bleach
+diff --git a/build/pkgs/certifi/distros/arch.txt b/build/pkgs/certifi/distros/arch.txt
+new file mode 100644
+index 00000000..be421c8
+--- /dev/null
++++ b/build/pkgs/certifi/distros/arch.txt
+@@ -0,0 +1 @@
++python-certifi
+diff --git a/build/pkgs/cvxopt/distros/arch.txt b/build/pkgs/cvxopt/distros/arch.txt
+new file mode 100644
+index 00000000..f15770f
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/arch.txt
+@@ -0,0 +1 @@
++python-cvxopt
+diff --git a/build/pkgs/decorator/distros/arch.txt b/build/pkgs/decorator/distros/arch.txt
+new file mode 100644
+index 00000000..0795604
+--- /dev/null
++++ b/build/pkgs/decorator/distros/arch.txt
+@@ -0,0 +1 @@
++python-decorator
+diff --git a/build/pkgs/html5lib/distros/arch.txt b/build/pkgs/html5lib/distros/arch.txt
+new file mode 100644
+index 00000000..b821491
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/arch.txt
+@@ -0,0 +1 @@
++python-html5lib
+diff --git a/build/pkgs/idna/distros/arch.txt b/build/pkgs/idna/distros/arch.txt
+new file mode 100644
+index 00000000..a73e70c
+--- /dev/null
++++ b/build/pkgs/idna/distros/arch.txt
+@@ -0,0 +1 @@
++python-idna
+diff --git a/build/pkgs/matplotlib/distros/arch.txt b/build/pkgs/matplotlib/distros/arch.txt
+new file mode 100644
+index 00000000..f6d856e
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/arch.txt
+@@ -0,0 +1 @@
++python-matplotlib
+diff --git a/build/pkgs/mpmath/distros/arch.txt b/build/pkgs/mpmath/distros/arch.txt
+new file mode 100644
+index 00000000..a7dc8d5
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/arch.txt
+@@ -0,0 +1 @@
++python-mpmath
+diff --git a/build/pkgs/networkx/distros/arch.txt b/build/pkgs/networkx/distros/arch.txt
+new file mode 100644
+index 00000000..293f943
+--- /dev/null
++++ b/build/pkgs/networkx/distros/arch.txt
+@@ -0,0 +1 @@
++python-networkx
+diff --git a/build/pkgs/numpy/distros/arch.txt b/build/pkgs/numpy/distros/arch.txt
+new file mode 100644
+index 00000000..c8722b9
+--- /dev/null
++++ b/build/pkgs/numpy/distros/arch.txt
+@@ -0,0 +1 @@
++python-numpy
+diff --git a/build/pkgs/packaging/distros/arch.txt b/build/pkgs/packaging/distros/arch.txt
+new file mode 100644
+index 00000000..02ad855
+--- /dev/null
++++ b/build/pkgs/packaging/distros/arch.txt
+@@ -0,0 +1 @@
++python-packaging
+diff --git a/build/pkgs/pandocfilters/distros/arch.txt b/build/pkgs/pandocfilters/distros/arch.txt
+new file mode 100644
+index 00000000..e7a86d0
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/arch.txt
+@@ -0,0 +1 @@
++python-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/arch.txt b/build/pkgs/pickleshare/distros/arch.txt
+new file mode 100644
+index 00000000..6d991a2
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/arch.txt
+@@ -0,0 +1 @@
++python-pickleshare
+diff --git a/build/pkgs/pillow/distros/arch.txt b/build/pkgs/pillow/distros/arch.txt
+new file mode 100644
+index 00000000..86dbb1d
+--- /dev/null
++++ b/build/pkgs/pillow/distros/arch.txt
+@@ -0,0 +1 @@
++python-pillow
+diff --git a/build/pkgs/pluggy/distros/arch.txt b/build/pkgs/pluggy/distros/arch.txt
+new file mode 100644
+index 00000000..c869e54
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/arch.txt
+@@ -0,0 +1 @@
++python-pluggy
+diff --git a/build/pkgs/py/distros/arch.txt b/build/pkgs/py/distros/arch.txt
+new file mode 100644
+index 00000000..b348d39
+--- /dev/null
++++ b/build/pkgs/py/distros/arch.txt
+@@ -0,0 +1 @@
++python-py
+diff --git a/build/pkgs/pygments/distros/arch.txt b/build/pkgs/pygments/distros/arch.txt
+new file mode 100644
+index 00000000..f3e72a8
+--- /dev/null
++++ b/build/pkgs/pygments/distros/arch.txt
+@@ -0,0 +1 @@
++python-pygments
+diff --git a/build/pkgs/pytz/distros/arch.txt b/build/pkgs/pytz/distros/arch.txt
+new file mode 100644
+index 00000000..2cccc9e
+--- /dev/null
++++ b/build/pkgs/pytz/distros/arch.txt
+@@ -0,0 +1 @@
++python-pytz
+diff --git a/build/pkgs/pyzmq/distros/arch.txt b/build/pkgs/pyzmq/distros/arch.txt
+new file mode 100644
+index 00000000..23f64d1
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/arch.txt
+@@ -0,0 +1 @@
++python-pyzmq
+diff --git a/build/pkgs/requests/distros/arch.txt b/build/pkgs/requests/distros/arch.txt
+new file mode 100644
+index 00000000..93a7bc1
+--- /dev/null
++++ b/build/pkgs/requests/distros/arch.txt
+@@ -0,0 +1 @@
++python-requests
+diff --git a/build/pkgs/scipy/distros/arch.txt b/build/pkgs/scipy/distros/arch.txt
+new file mode 100644
+index 00000000..7ff2882
+--- /dev/null
++++ b/build/pkgs/scipy/distros/arch.txt
+@@ -0,0 +1 @@
++python-scipy
+diff --git a/build/pkgs/setuptools/distros/arch.txt b/build/pkgs/setuptools/distros/arch.txt
+new file mode 100644
+index 00000000..e1ad178
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/arch.txt
+@@ -0,0 +1 @@
++python-setuptools
+diff --git a/build/pkgs/six/distros/arch.txt b/build/pkgs/six/distros/arch.txt
+new file mode 100644
+index 00000000..787c530
+--- /dev/null
++++ b/build/pkgs/six/distros/arch.txt
+@@ -0,0 +1 @@
++python-six
+diff --git a/build/pkgs/sympy/distros/arch.txt b/build/pkgs/sympy/distros/arch.txt
+new file mode 100644
+index 00000000..126c88a
+--- /dev/null
++++ b/build/pkgs/sympy/distros/arch.txt
+@@ -0,0 +1 @@
++python-sympy
+diff --git a/build/pkgs/texttable/distros/arch.txt b/build/pkgs/texttable/distros/arch.txt
+new file mode 100644
+index 00000000..8d1ccec
+--- /dev/null
++++ b/build/pkgs/texttable/distros/arch.txt
+@@ -0,0 +1 @@
++python-texttable
+diff --git a/build/pkgs/toml/distros/arch.txt b/build/pkgs/toml/distros/arch.txt
+new file mode 100644
+index 00000000..821ee77
+--- /dev/null
++++ b/build/pkgs/toml/distros/arch.txt
+@@ -0,0 +1 @@
++python-toml
+diff --git a/build/pkgs/webencodings/distros/arch.txt b/build/pkgs/webencodings/distros/arch.txt
+new file mode 100644
+index 00000000..12ddba9
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/arch.txt
+@@ -0,0 +1 @@
++python-webencodings
+diff --git a/build/pkgs/wheel/distros/arch.txt b/build/pkgs/wheel/distros/arch.txt
+new file mode 100644
+index 00000000..ae4cbb9
+--- /dev/null
++++ b/build/pkgs/wheel/distros/arch.txt
+@@ -0,0 +1 @@
++python-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5087abee08f2a89ddaf422ec72a84575fe724a79 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 21:20:56 -0700
+Subject: build/pkgs: Add distros/opensuse.txt for Python packages
+
+---
+ build/pkgs/bleach/distros/opensuse.txt        | 1 +
+ build/pkgs/cvxopt/distros/opensuse.txt        | 1 +
+ build/pkgs/html5lib/distros/opensuse.txt      | 1 +
+ build/pkgs/idna/distros/opensuse.txt          | 1 +
+ build/pkgs/jinja2/distros/opensuse.txt        | 2 +-
+ build/pkgs/mpmath/distros/opensuse.txt        | 1 +
+ build/pkgs/numpy/distros/opensuse.txt         | 1 +
+ build/pkgs/packaging/distros/opensuse.txt     | 1 +
+ build/pkgs/pandocfilters/distros/opensuse.txt | 1 +
+ build/pkgs/pluggy/distros/opensuse.txt        | 1 +
+ build/pkgs/py/distros/opensuse.txt            | 1 +
+ build/pkgs/pygments/distros/opensuse.txt      | 2 +-
+ build/pkgs/sympy/distros/opensuse.txt         | 1 +
+ build/pkgs/texttable/distros/opensuse.txt     | 1 +
+ build/pkgs/toml/distros/opensuse.txt          | 1 +
+ 15 files changed, 15 insertions(+), 2 deletions(-)
+ create mode 100644 build/pkgs/bleach/distros/opensuse.txt
+ create mode 100644 build/pkgs/cvxopt/distros/opensuse.txt
+ create mode 100644 build/pkgs/html5lib/distros/opensuse.txt
+ create mode 100644 build/pkgs/idna/distros/opensuse.txt
+ create mode 100644 build/pkgs/mpmath/distros/opensuse.txt
+ create mode 100644 build/pkgs/numpy/distros/opensuse.txt
+ create mode 100644 build/pkgs/packaging/distros/opensuse.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/opensuse.txt
+ create mode 100644 build/pkgs/pluggy/distros/opensuse.txt
+ create mode 100644 build/pkgs/py/distros/opensuse.txt
+ create mode 100644 build/pkgs/sympy/distros/opensuse.txt
+ create mode 100644 build/pkgs/texttable/distros/opensuse.txt
+ create mode 100644 build/pkgs/toml/distros/opensuse.txt
+
+diff --git a/build/pkgs/bleach/distros/opensuse.txt b/build/pkgs/bleach/distros/opensuse.txt
+new file mode 100644
+index 00000000..6d37c4c
+--- /dev/null
++++ b/build/pkgs/bleach/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-bleach
+diff --git a/build/pkgs/cvxopt/distros/opensuse.txt b/build/pkgs/cvxopt/distros/opensuse.txt
+new file mode 100644
+index 00000000..2bb6ad1
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-cvxopt
+diff --git a/build/pkgs/html5lib/distros/opensuse.txt b/build/pkgs/html5lib/distros/opensuse.txt
+new file mode 100644
+index 00000000..6d7b8df
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-html5lib
+diff --git a/build/pkgs/idna/distros/opensuse.txt b/build/pkgs/idna/distros/opensuse.txt
+new file mode 100644
+index 00000000..de48e70
+--- /dev/null
++++ b/build/pkgs/idna/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-idna
+diff --git a/build/pkgs/jinja2/distros/opensuse.txt b/build/pkgs/jinja2/distros/opensuse.txt
+index 5d90a22..f2db865 100644
+--- a/build/pkgs/jinja2/distros/opensuse.txt
++++ b/build/pkgs/jinja2/distros/opensuse.txt
+@@ -1 +1 @@
+-python3-Jinja2
++python3-jinja2
+diff --git a/build/pkgs/mpmath/distros/opensuse.txt b/build/pkgs/mpmath/distros/opensuse.txt
+new file mode 100644
+index 00000000..fbc82a9
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-mpmath
+diff --git a/build/pkgs/numpy/distros/opensuse.txt b/build/pkgs/numpy/distros/opensuse.txt
+new file mode 100644
+index 00000000..79d5c5a
+--- /dev/null
++++ b/build/pkgs/numpy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-numpy
+diff --git a/build/pkgs/packaging/distros/opensuse.txt b/build/pkgs/packaging/distros/opensuse.txt
+new file mode 100644
+index 00000000..8f1c0ff
+--- /dev/null
++++ b/build/pkgs/packaging/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-packaging
+diff --git a/build/pkgs/pandocfilters/distros/opensuse.txt b/build/pkgs/pandocfilters/distros/opensuse.txt
+new file mode 100644
+index 00000000..d0d4c24
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-pandocfilters
+diff --git a/build/pkgs/pluggy/distros/opensuse.txt b/build/pkgs/pluggy/distros/opensuse.txt
+new file mode 100644
+index 00000000..43a3acf
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-pluggy
+diff --git a/build/pkgs/py/distros/opensuse.txt b/build/pkgs/py/distros/opensuse.txt
+new file mode 100644
+index 00000000..81fefe6
+--- /dev/null
++++ b/build/pkgs/py/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-py
+diff --git a/build/pkgs/pygments/distros/opensuse.txt b/build/pkgs/pygments/distros/opensuse.txt
+index 9ff5740..3ab3792 100644
+--- a/build/pkgs/pygments/distros/opensuse.txt
++++ b/build/pkgs/pygments/distros/opensuse.txt
+@@ -1 +1 @@
+-python3-Pygments
++python3-pygments
+diff --git a/build/pkgs/sympy/distros/opensuse.txt b/build/pkgs/sympy/distros/opensuse.txt
+new file mode 100644
+index 00000000..db423c8
+--- /dev/null
++++ b/build/pkgs/sympy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-sympy
+diff --git a/build/pkgs/texttable/distros/opensuse.txt b/build/pkgs/texttable/distros/opensuse.txt
+new file mode 100644
+index 00000000..8f8e7e2
+--- /dev/null
++++ b/build/pkgs/texttable/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-texttable
+diff --git a/build/pkgs/toml/distros/opensuse.txt b/build/pkgs/toml/distros/opensuse.txt
+new file mode 100644
+index 00000000..543e89d
+--- /dev/null
++++ b/build/pkgs/toml/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-toml
+-- 
+cgit v1.0-1-gd88e
+
+
+From a480ba7ace1370d106ae831e904ea22b72af1be7 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 22:45:04 -0700
+Subject: build/pkgs: Add distros/debian.txt for Python packages
+
+---
+ build/pkgs/babel/distros/debian.txt         | 1 +
+ build/pkgs/bleach/distros/debian.txt        | 1 +
+ build/pkgs/certifi/distros/debian.txt       | 1 +
+ build/pkgs/cvxopt/distros/debian.txt        | 1 +
+ build/pkgs/decorator/distros/debian.txt     | 1 +
+ build/pkgs/html5lib/distros/debian.txt      | 1 +
+ build/pkgs/idna/distros/debian.txt          | 1 +
+ build/pkgs/jinja2/distros/debian.txt        | 1 +
+ build/pkgs/matplotlib/distros/debian.txt    | 1 +
+ build/pkgs/mpmath/distros/debian.txt        | 1 +
+ build/pkgs/networkx/distros/debian.txt      | 1 +
+ build/pkgs/numpy/distros/debian.txt         | 1 +
+ build/pkgs/packaging/distros/debian.txt     | 1 +
+ build/pkgs/pandocfilters/distros/debian.txt | 1 +
+ build/pkgs/pickleshare/distros/debian.txt   | 1 +
+ build/pkgs/pillow/distros/debian.txt        | 1 +
+ build/pkgs/pluggy/distros/debian.txt        | 1 +
+ build/pkgs/py/distros/debian.txt            | 1 +
+ build/pkgs/pygments/distros/debian.txt      | 1 +
+ build/pkgs/pytz/distros/debian.txt          | 1 +
+ build/pkgs/requests/distros/debian.txt      | 1 +
+ build/pkgs/scipy/distros/debian.txt         | 1 +
+ build/pkgs/setuptools/distros/debian.txt    | 1 +
+ build/pkgs/six/distros/debian.txt           | 1 +
+ build/pkgs/sympy/distros/debian.txt         | 1 +
+ build/pkgs/texttable/distros/debian.txt     | 1 +
+ build/pkgs/toml/distros/debian.txt          | 1 +
+ build/pkgs/webencodings/distros/debian.txt  | 1 +
+ build/pkgs/wheel/distros/debian.txt         | 1 +
+ 29 files changed, 29 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/debian.txt
+ create mode 100644 build/pkgs/bleach/distros/debian.txt
+ create mode 100644 build/pkgs/certifi/distros/debian.txt
+ create mode 100644 build/pkgs/cvxopt/distros/debian.txt
+ create mode 100644 build/pkgs/decorator/distros/debian.txt
+ create mode 100644 build/pkgs/html5lib/distros/debian.txt
+ create mode 100644 build/pkgs/idna/distros/debian.txt
+ create mode 100644 build/pkgs/jinja2/distros/debian.txt
+ create mode 100644 build/pkgs/matplotlib/distros/debian.txt
+ create mode 100644 build/pkgs/mpmath/distros/debian.txt
+ create mode 100644 build/pkgs/networkx/distros/debian.txt
+ create mode 100644 build/pkgs/numpy/distros/debian.txt
+ create mode 100644 build/pkgs/packaging/distros/debian.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/debian.txt
+ create mode 100644 build/pkgs/pickleshare/distros/debian.txt
+ create mode 100644 build/pkgs/pillow/distros/debian.txt
+ create mode 100644 build/pkgs/pluggy/distros/debian.txt
+ create mode 100644 build/pkgs/py/distros/debian.txt
+ create mode 100644 build/pkgs/pygments/distros/debian.txt
+ create mode 100644 build/pkgs/pytz/distros/debian.txt
+ create mode 100644 build/pkgs/requests/distros/debian.txt
+ create mode 100644 build/pkgs/scipy/distros/debian.txt
+ create mode 100644 build/pkgs/setuptools/distros/debian.txt
+ create mode 100644 build/pkgs/six/distros/debian.txt
+ create mode 100644 build/pkgs/sympy/distros/debian.txt
+ create mode 100644 build/pkgs/texttable/distros/debian.txt
+ create mode 100644 build/pkgs/toml/distros/debian.txt
+ create mode 100644 build/pkgs/webencodings/distros/debian.txt
+ create mode 100644 build/pkgs/wheel/distros/debian.txt
+
+diff --git a/build/pkgs/babel/distros/debian.txt b/build/pkgs/babel/distros/debian.txt
+new file mode 100644
+index 00000000..e623eb6
+--- /dev/null
++++ b/build/pkgs/babel/distros/debian.txt
+@@ -0,0 +1 @@
++python3-babel
+diff --git a/build/pkgs/bleach/distros/debian.txt b/build/pkgs/bleach/distros/debian.txt
+new file mode 100644
+index 00000000..6d37c4c
+--- /dev/null
++++ b/build/pkgs/bleach/distros/debian.txt
+@@ -0,0 +1 @@
++python3-bleach
+diff --git a/build/pkgs/certifi/distros/debian.txt b/build/pkgs/certifi/distros/debian.txt
+new file mode 100644
+index 00000000..f585a82
+--- /dev/null
++++ b/build/pkgs/certifi/distros/debian.txt
+@@ -0,0 +1 @@
++python3-certifi
+diff --git a/build/pkgs/cvxopt/distros/debian.txt b/build/pkgs/cvxopt/distros/debian.txt
+new file mode 100644
+index 00000000..2bb6ad1
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/debian.txt
+@@ -0,0 +1 @@
++python3-cvxopt
+diff --git a/build/pkgs/decorator/distros/debian.txt b/build/pkgs/decorator/distros/debian.txt
+new file mode 100644
+index 00000000..46c478e
+--- /dev/null
++++ b/build/pkgs/decorator/distros/debian.txt
+@@ -0,0 +1 @@
++python3-decorator
+diff --git a/build/pkgs/html5lib/distros/debian.txt b/build/pkgs/html5lib/distros/debian.txt
+new file mode 100644
+index 00000000..6d7b8df
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/debian.txt
+@@ -0,0 +1 @@
++python3-html5lib
+diff --git a/build/pkgs/idna/distros/debian.txt b/build/pkgs/idna/distros/debian.txt
+new file mode 100644
+index 00000000..de48e70
+--- /dev/null
++++ b/build/pkgs/idna/distros/debian.txt
+@@ -0,0 +1 @@
++python3-idna
+diff --git a/build/pkgs/jinja2/distros/debian.txt b/build/pkgs/jinja2/distros/debian.txt
+new file mode 100644
+index 00000000..f2db865
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/debian.txt
+@@ -0,0 +1 @@
++python3-jinja2
+diff --git a/build/pkgs/matplotlib/distros/debian.txt b/build/pkgs/matplotlib/distros/debian.txt
+new file mode 100644
+index 00000000..1374329
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/debian.txt
+@@ -0,0 +1 @@
++python3-matplotlib
+diff --git a/build/pkgs/mpmath/distros/debian.txt b/build/pkgs/mpmath/distros/debian.txt
+new file mode 100644
+index 00000000..fbc82a9
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/debian.txt
+@@ -0,0 +1 @@
++python3-mpmath
+diff --git a/build/pkgs/networkx/distros/debian.txt b/build/pkgs/networkx/distros/debian.txt
+new file mode 100644
+index 00000000..6779066
+--- /dev/null
++++ b/build/pkgs/networkx/distros/debian.txt
+@@ -0,0 +1 @@
++python3-networkx
+diff --git a/build/pkgs/numpy/distros/debian.txt b/build/pkgs/numpy/distros/debian.txt
+new file mode 100644
+index 00000000..79d5c5a
+--- /dev/null
++++ b/build/pkgs/numpy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-numpy
+diff --git a/build/pkgs/packaging/distros/debian.txt b/build/pkgs/packaging/distros/debian.txt
+new file mode 100644
+index 00000000..8f1c0ff
+--- /dev/null
++++ b/build/pkgs/packaging/distros/debian.txt
+@@ -0,0 +1 @@
++python3-packaging
+diff --git a/build/pkgs/pandocfilters/distros/debian.txt b/build/pkgs/pandocfilters/distros/debian.txt
+new file mode 100644
+index 00000000..d0d4c24
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/debian.txt b/build/pkgs/pickleshare/distros/debian.txt
+new file mode 100644
+index 00000000..a00907d
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pickleshare
+diff --git a/build/pkgs/pillow/distros/debian.txt b/build/pkgs/pillow/distros/debian.txt
+new file mode 100644
+index 00000000..3319fcd
+--- /dev/null
++++ b/build/pkgs/pillow/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pillow
+diff --git a/build/pkgs/pluggy/distros/debian.txt b/build/pkgs/pluggy/distros/debian.txt
+new file mode 100644
+index 00000000..43a3acf
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pluggy
+diff --git a/build/pkgs/py/distros/debian.txt b/build/pkgs/py/distros/debian.txt
+new file mode 100644
+index 00000000..81fefe6
+--- /dev/null
++++ b/build/pkgs/py/distros/debian.txt
+@@ -0,0 +1 @@
++python3-py
+diff --git a/build/pkgs/pygments/distros/debian.txt b/build/pkgs/pygments/distros/debian.txt
+new file mode 100644
+index 00000000..3ab3792
+--- /dev/null
++++ b/build/pkgs/pygments/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pygments
+diff --git a/build/pkgs/pytz/distros/debian.txt b/build/pkgs/pytz/distros/debian.txt
+new file mode 100644
+index 00000000..db20908
+--- /dev/null
++++ b/build/pkgs/pytz/distros/debian.txt
+@@ -0,0 +1 @@
++python3-tz
+diff --git a/build/pkgs/requests/distros/debian.txt b/build/pkgs/requests/distros/debian.txt
+new file mode 100644
+index 00000000..43147b2
+--- /dev/null
++++ b/build/pkgs/requests/distros/debian.txt
+@@ -0,0 +1 @@
++python3-requests
+diff --git a/build/pkgs/scipy/distros/debian.txt b/build/pkgs/scipy/distros/debian.txt
+new file mode 100644
+index 00000000..12b3666
+--- /dev/null
++++ b/build/pkgs/scipy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-scipy
+diff --git a/build/pkgs/setuptools/distros/debian.txt b/build/pkgs/setuptools/distros/debian.txt
+new file mode 100644
+index 00000000..1c0901c
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/debian.txt
+@@ -0,0 +1 @@
++python3-setuptools
+diff --git a/build/pkgs/six/distros/debian.txt b/build/pkgs/six/distros/debian.txt
+new file mode 100644
+index 00000000..68ff859
+--- /dev/null
++++ b/build/pkgs/six/distros/debian.txt
+@@ -0,0 +1 @@
++python3-six
+diff --git a/build/pkgs/sympy/distros/debian.txt b/build/pkgs/sympy/distros/debian.txt
+new file mode 100644
+index 00000000..db423c8
+--- /dev/null
++++ b/build/pkgs/sympy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-sympy
+diff --git a/build/pkgs/texttable/distros/debian.txt b/build/pkgs/texttable/distros/debian.txt
+new file mode 100644
+index 00000000..8f8e7e2
+--- /dev/null
++++ b/build/pkgs/texttable/distros/debian.txt
+@@ -0,0 +1 @@
++python3-texttable
+diff --git a/build/pkgs/toml/distros/debian.txt b/build/pkgs/toml/distros/debian.txt
+new file mode 100644
+index 00000000..543e89d
+--- /dev/null
++++ b/build/pkgs/toml/distros/debian.txt
+@@ -0,0 +1 @@
++python3-toml
+diff --git a/build/pkgs/webencodings/distros/debian.txt b/build/pkgs/webencodings/distros/debian.txt
+new file mode 100644
+index 00000000..ac30c2f
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/debian.txt
+@@ -0,0 +1 @@
++python3-webencodings
+diff --git a/build/pkgs/wheel/distros/debian.txt b/build/pkgs/wheel/distros/debian.txt
+new file mode 100644
+index 00000000..3c066725
+--- /dev/null
++++ b/build/pkgs/wheel/distros/debian.txt
+@@ -0,0 +1 @@
++python3-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 93bf30d7de292551c3050e2dd74651d69ba4bd46 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 18 Oct 2021 07:50:34 -0400
+Subject: Trac #29665: add more documentation for SAGE_PYTHON_PACKAGE_CHECK().
+
+An earlier commit allows SAGE_PYTHON_PACKAGE_CHECK(package) to tweak the
+value of sage_use_system_$package if --enable-system-site-packages was
+not used. This essentially changes the default --with-system-$package=yes
+to "no" in that case. Here we update the documentation to reflect it.
+---
+ m4/sage_python_package_check.m4 | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 7ee82a7..95eefd0 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -34,6 +34,10 @@
+ #   ensure that the ./configure- and run-time views of the system
+ #   are as similar as possible.
+ #
++#   To avoid suggesting these system packages to users who have not
++#   set --enable-system-site-packages, this macro also changes the
++#   default for --with-system-foo from "yes" to "no" in that case.
++#
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
+-- 
+cgit v1.0-1-gd88e
+
+
+From d771e49d57ecdf3622434bc09cbfb87ad3bb7744 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 18 Oct 2021 07:42:46 -0400
+Subject: Trac #29665: improve SAGE_PYTHON_PACKAGE_CHECK() failure message.
+
+When --enable-system-site-packages is off, SAGE_PYTHON_PACKAGE_CHECK()
+will always install the corresponding SPKG. We improve the ./configure
+output in that case to make it clear that the decision was based on
+the value of --enable-system-site-packages and not the "real" check.
+---
+ m4/sage_python_package_check.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 95eefd0..5f0f084 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -40,7 +40,9 @@
+ #
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
++  AC_MSG_CHECKING([if --enable-system-site-packages was used])
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
++    AC_MSG_RESULT(yes)
+     AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
+ 
+     dnl We run this check inside a python venv, because that's ultimately
+@@ -94,6 +96,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
+     dnl System site packages are disabled.
++    AC_MSG_RESULT(no; skipping check)
+     sage_spkg_install_$1=yes
+ 
+     dnl We have to retroactively hack the --with-system-foo={no,yes,force}
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5bb43c1b78a1deb3364f235305937c2f823e5e18 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 24 Oct 2021 20:29:25 -0400
+Subject: Trac #29665: use sage-venv in SAGE_PYTHON_PACKAGE_CHECK().
+
+For consistency with the rest of the build system, we now use the
+build/bin/sage-venv script to create the venv in this autoconf macro
+rather than invoking $PYTHON_FOR_VENV with "-m venv" directly.
+---
+ m4/sage_python_package_check.m4 | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 5f0f084..5547b35 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -50,11 +50,11 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AC_MSG_CHECKING([if we can create a python venv in config.venv])
+ 
+     dnl Use --clear because ./configure typically clobbers its output files.
+-    AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
+-                                        --clear                dnl
+-                                        --without-pip          dnl
+-                                        config.venv            dnl
+-                                        2>&AS_MESSAGE_LOG_FD], [
++    AS_IF(["${PYTHON_FOR_VENV}" build/bin/sage-venv      dnl
++                                  --system-site-packages dnl
++                                  --clear                dnl
++                                  config.venv            dnl
++                                  2>&AS_MESSAGE_LOG_FD], [
+       AC_MSG_RESULT(yes)
+       dnl strip all comments from install-requires.txt; this should leave
+       dnl only a single line containing the version specification for this
+-- 
+cgit v1.0-1-gd88e
+
+
+From c78363d6326addff16ca5abac897949a6be72bf4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:10:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for urllib3.
+
+---
+ build/pkgs/urllib3/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/urllib3/spkg-configure.m4
+
+diff --git a/build/pkgs/urllib3/spkg-configure.m4 b/build/pkgs/urllib3/spkg-configure.m4
+new file mode 100644
+index 00000000..d7ef3e1
+--- /dev/null
++++ b/build/pkgs/urllib3/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([urllib3], [SAGE_PYTHON_PACKAGE_CHECK([urllib3])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f416d5abcae495ea8301fad024b279ea9e997b29 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:15:18 -0400
+Subject: Trac #29665: add Gentoo package information for urllib3.
+
+---
+ build/pkgs/urllib3/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/urllib3/distros/gentoo.txt
+
+diff --git a/build/pkgs/urllib3/distros/gentoo.txt b/build/pkgs/urllib3/distros/gentoo.txt
+new file mode 100644
+index 00000000..172a535
+--- /dev/null
++++ b/build/pkgs/urllib3/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/urllib3
+-- 
+cgit v1.0-1-gd88e
+
+
+From 852068b992bf7959500c650f54cb92e5b68d7ef8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:15:58 -0400
+Subject: Trac #29665: add Gentoo package information for nbformat.
+
+---
+ build/pkgs/nbformat/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbformat/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbformat/distros/gentoo.txt b/build/pkgs/nbformat/distros/gentoo.txt
+new file mode 100644
+index 00000000..006b1f2
+--- /dev/null
++++ b/build/pkgs/nbformat/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbformat
+-- 
+cgit v1.0-1-gd88e
+
+
+From 66179fd28fcc92ee840dcd87bb4db25cea968d66 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:34:16 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for nbformat.
+
+---
+ build/pkgs/nbformat/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbformat/spkg-configure.m4
+
+diff --git a/build/pkgs/nbformat/spkg-configure.m4 b/build/pkgs/nbformat/spkg-configure.m4
+new file mode 100644
+index 00000000..5a7f8c4
+--- /dev/null
++++ b/build/pkgs/nbformat/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbformat], [SAGE_PYTHON_PACKAGE_CHECK([nbformat])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 874005e81ed20f27a5f895030dcdbdfc5f73ad80 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:47:01 -0400
+Subject: Trac #29665: add Gentoo package information for zipp.
+
+---
+ build/pkgs/zipp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/zipp/distros/gentoo.txt
+
+diff --git a/build/pkgs/zipp/distros/gentoo.txt b/build/pkgs/zipp/distros/gentoo.txt
+new file mode 100644
+index 00000000..7f59450
+--- /dev/null
++++ b/build/pkgs/zipp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/zipp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0cc2a7355b5554c1fb79c742ebf02eff54465b3e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:47:35 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for zipp.
+
+---
+ build/pkgs/zipp/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/zipp/spkg-configure.m4
+
+diff --git a/build/pkgs/zipp/spkg-configure.m4 b/build/pkgs/zipp/spkg-configure.m4
+new file mode 100644
+index 00000000..0fe3a9c
+--- /dev/null
++++ b/build/pkgs/zipp/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([zipp], [SAGE_PYTHON_PACKAGE_CHECK([zipp])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6073ad8e56c21fc862749bbd84a56d543fb9458c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:48:37 -0400
+Subject: Trac #29665: add Gentoo package information for wcwidth.
+
+---
+ build/pkgs/wcwidth/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wcwidth/distros/gentoo.txt
+
+diff --git a/build/pkgs/wcwidth/distros/gentoo.txt b/build/pkgs/wcwidth/distros/gentoo.txt
+new file mode 100644
+index 00000000..edeb80b
+--- /dev/null
++++ b/build/pkgs/wcwidth/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/wcwidth
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9793d6172c64d61a015fbe61bd45863759124fad Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:51:10 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for wcwidth.
+
+---
+ build/pkgs/wcwidth/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wcwidth/spkg-configure.m4
+
+diff --git a/build/pkgs/wcwidth/spkg-configure.m4 b/build/pkgs/wcwidth/spkg-configure.m4
+new file mode 100644
+index 00000000..5bde15a
+--- /dev/null
++++ b/build/pkgs/wcwidth/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([wcwidth], [SAGE_PYTHON_PACKAGE_CHECK([wcwidth])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20232f370a43c146ca4e696c72a2cbcc498db060 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:52:36 -0400
+Subject: Trac #29665: add Gentoo package information for testpath.
+
+---
+ build/pkgs/testpath/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/testpath/distros/gentoo.txt
+
+diff --git a/build/pkgs/testpath/distros/gentoo.txt b/build/pkgs/testpath/distros/gentoo.txt
+new file mode 100644
+index 00000000..efa10a0
+--- /dev/null
++++ b/build/pkgs/testpath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/testpath
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1b0785b2aad8844e74345fe950baf097e2b43d24 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:55:22 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for testpath.
+
+---
+ build/pkgs/testpath/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/testpath/spkg-configure.m4
+
+diff --git a/build/pkgs/testpath/spkg-configure.m4 b/build/pkgs/testpath/spkg-configure.m4
+new file mode 100644
+index 00000000..d8fc2a7
+--- /dev/null
++++ b/build/pkgs/testpath/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([testpath], [SAGE_PYTHON_PACKAGE_CHECK([testpath])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 10fc3829ecd956d732b1b069fdfe81f0d6d5cdc2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:56:06 -0400
+Subject: Trac #29665: add Gentoo package information for jedi.
+
+---
+ build/pkgs/jedi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jedi/distros/gentoo.txt
+
+diff --git a/build/pkgs/jedi/distros/gentoo.txt b/build/pkgs/jedi/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c85a46
+--- /dev/null
++++ b/build/pkgs/jedi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jedi
+-- 
+cgit v1.0-1-gd88e
+
+
+From a75824d74c281c7639028ca01dabeed266f56998 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:06:37 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for jedi.
+
+---
+ build/pkgs/jedi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jedi/spkg-configure.m4
+
+diff --git a/build/pkgs/jedi/spkg-configure.m4 b/build/pkgs/jedi/spkg-configure.m4
+new file mode 100644
+index 00000000..a37dbcc
+--- /dev/null
++++ b/build/pkgs/jedi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jedi], [SAGE_PYTHON_PACKAGE_CHECK([jedi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 17af01373d43f6acbbdbc23e073e372d3fdadf8b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:07:47 -0400
+Subject: Trac #29665: add Gentoo package information for tomli.
+
+---
+ build/pkgs/tomli/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tomli/distros/gentoo.txt
+
+diff --git a/build/pkgs/tomli/distros/gentoo.txt b/build/pkgs/tomli/distros/gentoo.txt
+new file mode 100644
+index 00000000..0458e25
+--- /dev/null
++++ b/build/pkgs/tomli/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/tomli
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0d3b5994ae612be11992467c4a3f1a74b81400fe Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:08:12 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for tomli.
+
+---
+ build/pkgs/tomli/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tomli/spkg-configure.m4
+
+diff --git a/build/pkgs/tomli/spkg-configure.m4 b/build/pkgs/tomli/spkg-configure.m4
+new file mode 100644
+index 00000000..95a8b8b
+--- /dev/null
++++ b/build/pkgs/tomli/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tomli], [SAGE_PYTHON_PACKAGE_CHECK([tomli])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From dce1c515781b0eeb8eb9c2bc7aba581560c1fac1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:09:22 -0400
+Subject: Trac #29665: add Gentoo package information for defusedxml.
+
+---
+ build/pkgs/defusedxml/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/defusedxml/distros/gentoo.txt
+
+diff --git a/build/pkgs/defusedxml/distros/gentoo.txt b/build/pkgs/defusedxml/distros/gentoo.txt
+new file mode 100644
+index 00000000..2804214
+--- /dev/null
++++ b/build/pkgs/defusedxml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/defusedxml
+-- 
+cgit v1.0-1-gd88e
+
+
+From 02e1e1cd7f8bdae3ca5b7d35ce70af28a44e9b7c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:11:14 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for defusedxml.
+
+---
+ build/pkgs/defusedxml/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/defusedxml/spkg-configure.m4
+
+diff --git a/build/pkgs/defusedxml/spkg-configure.m4 b/build/pkgs/defusedxml/spkg-configure.m4
+new file mode 100644
+index 00000000..e02f345
+--- /dev/null
++++ b/build/pkgs/defusedxml/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([defusedxml], [SAGE_PYTHON_PACKAGE_CHECK([defusedxml])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e0ba4ebb5cfc637b5d26b85de9f34e0a160d2b9c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:12:22 -0400
+Subject: Trac #29665: add Gentoo package information for ipywidgets.
+
+---
+ build/pkgs/ipywidgets/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipywidgets/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipywidgets/distros/gentoo.txt b/build/pkgs/ipywidgets/distros/gentoo.txt
+new file mode 100644
+index 00000000..7c76967
+--- /dev/null
++++ b/build/pkgs/ipywidgets/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipywidgets
+-- 
+cgit v1.0-1-gd88e
+
+
+From 49df7e7d93c7a31b7c46d5d224a35fd313a29a32 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:15:53 -0400
+Subject: Trac #29665: add Gentoo package information for simplegeneric.
+
+---
+ build/pkgs/simplegeneric/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/simplegeneric/distros/gentoo.txt
+
+diff --git a/build/pkgs/simplegeneric/distros/gentoo.txt b/build/pkgs/simplegeneric/distros/gentoo.txt
+new file mode 100644
+index 00000000..a86e90d
+--- /dev/null
++++ b/build/pkgs/simplegeneric/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/simplegeneric
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2a893635d5804749e6fec7ed7289c921ecb5300a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:16:33 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for simplegeneric.
+
+---
+ build/pkgs/simplegeneric/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/simplegeneric/spkg-configure.m4
+
+diff --git a/build/pkgs/simplegeneric/spkg-configure.m4 b/build/pkgs/simplegeneric/spkg-configure.m4
+new file mode 100644
+index 00000000..13715ab
+--- /dev/null
++++ b/build/pkgs/simplegeneric/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([simplegeneric], [SAGE_PYTHON_PACKAGE_CHECK([simplegeneric])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a8fe7ecd6e3163e7d01261e5497ac452a8cc95ab Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:17:18 -0400
+Subject: Trac #29665: add Gentoo package information for imagesize.
+
+---
+ build/pkgs/imagesize/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/imagesize/distros/gentoo.txt
+
+diff --git a/build/pkgs/imagesize/distros/gentoo.txt b/build/pkgs/imagesize/distros/gentoo.txt
+new file mode 100644
+index 00000000..54350ba
+--- /dev/null
++++ b/build/pkgs/imagesize/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/imagesize
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2ad837c5dd1fca0f50ce6d5042a9344210a54f84 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:17:48 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for imagesize.
+
+---
+ build/pkgs/imagesize/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/imagesize/spkg-configure.m4
+
+diff --git a/build/pkgs/imagesize/spkg-configure.m4 b/build/pkgs/imagesize/spkg-configure.m4
+new file mode 100644
+index 00000000..20210ef
+--- /dev/null
++++ b/build/pkgs/imagesize/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([imagesize], [SAGE_PYTHON_PACKAGE_CHECK([imagesize])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bf47415b5bfca2d7bf24e20de35662bf331623b9 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:18:49 -0400
+Subject: Trac #29665: add Gentoo package information for mistune.
+
+---
+ build/pkgs/mistune/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mistune/distros/gentoo.txt
+
+diff --git a/build/pkgs/mistune/distros/gentoo.txt b/build/pkgs/mistune/distros/gentoo.txt
+new file mode 100644
+index 00000000..56f0a4e
+--- /dev/null
++++ b/build/pkgs/mistune/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/mistune
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6898a74fd0c65a40c5220ba68b4062ac6fe060c6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:21:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for mistune.
+
+---
+ build/pkgs/mistune/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mistune/spkg-configure.m4
+
+diff --git a/build/pkgs/mistune/spkg-configure.m4 b/build/pkgs/mistune/spkg-configure.m4
+new file mode 100644
+index 00000000..972f33d
+--- /dev/null
++++ b/build/pkgs/mistune/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([mistune], [SAGE_PYTHON_PACKAGE_CHECK([mistune])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 62735e4ccf2031cd39eb5e04b03bdfd97005d808 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:22:48 -0400
+Subject: Trac #29665: add Gentoo package information for backcall.
+
+---
+ build/pkgs/backcall/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/backcall/distros/gentoo.txt
+
+diff --git a/build/pkgs/backcall/distros/gentoo.txt b/build/pkgs/backcall/distros/gentoo.txt
+new file mode 100644
+index 00000000..266a222
+--- /dev/null
++++ b/build/pkgs/backcall/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/backcall
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9ef3ea42d4a33c7cdb623fa5417ae300cf323183 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:25:10 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for backcall.
+
+---
+ build/pkgs/backcall/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/backcall/spkg-configure.m4
+
+diff --git a/build/pkgs/backcall/spkg-configure.m4 b/build/pkgs/backcall/spkg-configure.m4
+new file mode 100644
+index 00000000..d6b11c4
+--- /dev/null
++++ b/build/pkgs/backcall/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([backcall], [SAGE_PYTHON_PACKAGE_CHECK([backcall])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1b3ea2a3c40fea0fb58435f5e5304368ea58dff8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:25:58 -0400
+Subject: Trac #29665: add Gentoo package information for parso.
+
+---
+ build/pkgs/parso/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/parso/distros/gentoo.txt
+
+diff --git a/build/pkgs/parso/distros/gentoo.txt b/build/pkgs/parso/distros/gentoo.txt
+new file mode 100644
+index 00000000..f9ce4c7
+--- /dev/null
++++ b/build/pkgs/parso/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/parso
+-- 
+cgit v1.0-1-gd88e
+
+
+From 963a3a2c563ec71a1f5be2395722d0e824cb0b11 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:26:22 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for parso.
+
+---
+ build/pkgs/parso/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/parso/spkg-configure.m4
+
+diff --git a/build/pkgs/parso/spkg-configure.m4 b/build/pkgs/parso/spkg-configure.m4
+new file mode 100644
+index 00000000..1ca6f1b
+--- /dev/null
++++ b/build/pkgs/parso/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([parso], [SAGE_PYTHON_PACKAGE_CHECK([parso])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 943053dfc474b6549bcc7d6ef2971ea43588b35c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:27:00 -0400
+Subject: Trac #29665: add Gentoo package information for pyparsing.
+
+---
+ build/pkgs/pyparsing/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyparsing/distros/gentoo.txt
+
+diff --git a/build/pkgs/pyparsing/distros/gentoo.txt b/build/pkgs/pyparsing/distros/gentoo.txt
+new file mode 100644
+index 00000000..ef0419f
+--- /dev/null
++++ b/build/pkgs/pyparsing/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyparsing
+-- 
+cgit v1.0-1-gd88e
+
+
+From bd682eaa2ac41dd84e7a52e2b0c5442fc8fd8919 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:27:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pyparsing.
+
+---
+ build/pkgs/pyparsing/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyparsing/spkg-configure.m4
+
+diff --git a/build/pkgs/pyparsing/spkg-configure.m4 b/build/pkgs/pyparsing/spkg-configure.m4
+new file mode 100644
+index 00000000..d2b4c00
+--- /dev/null
++++ b/build/pkgs/pyparsing/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pyparsing], [SAGE_PYTHON_PACKAGE_CHECK([pyparsing])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 74f36a9c0ec7c63b7e6c40066e42f4b15c2f978e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:17:42 -0400
+Subject: Trac #29665: add Gentoo package information for debugpy.
+
+---
+ build/pkgs/debugpy/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/debugpy/distros/gentoo.txt
+
+diff --git a/build/pkgs/debugpy/distros/gentoo.txt b/build/pkgs/debugpy/distros/gentoo.txt
+new file mode 100644
+index 00000000..8b797ce
+--- /dev/null
++++ b/build/pkgs/debugpy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/debugpy
+-- 
+cgit v1.0-1-gd88e
+
+
+From be072fa87ac5c373d9dc9b54c0bd68734d5709bc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:21:17 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for debugpy.
+
+---
+ build/pkgs/debugpy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/debugpy/spkg-configure.m4
+
+diff --git a/build/pkgs/debugpy/spkg-configure.m4 b/build/pkgs/debugpy/spkg-configure.m4
+new file mode 100644
+index 00000000..db605ff
+--- /dev/null
++++ b/build/pkgs/debugpy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([debugpy], [SAGE_PYTHON_PACKAGE_CHECK([debugpy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6f777ce2f2e14b94e91c8b7bbac82f9017460aba Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:23:56 -0400
+Subject: Trac #29665: add Gentoo package information for tzlocal.
+
+---
+ build/pkgs/tzlocal/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tzlocal/distros/gentoo.txt
+
+diff --git a/build/pkgs/tzlocal/distros/gentoo.txt b/build/pkgs/tzlocal/distros/gentoo.txt
+new file mode 100644
+index 00000000..2018442
+--- /dev/null
++++ b/build/pkgs/tzlocal/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/tzlocal
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3bd078fc15ae13982249452711baafae91038191 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:24:51 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for tzlocal.
+
+---
+ build/pkgs/tzlocal/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tzlocal/spkg-configure.m4
+
+diff --git a/build/pkgs/tzlocal/spkg-configure.m4 b/build/pkgs/tzlocal/spkg-configure.m4
+new file mode 100644
+index 00000000..e020b28
+--- /dev/null
++++ b/build/pkgs/tzlocal/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tzlocal], [SAGE_PYTHON_PACKAGE_CHECK([tzlocal])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 91b0882fc62214923da9ee7b6dccb05d8a1d11d1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:26:13 -0400
+Subject: Trac #29665: add Gentoo package information for pycparser.
+
+---
+ build/pkgs/pycparser/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pycparser/distros/gentoo.txt
+
+diff --git a/build/pkgs/pycparser/distros/gentoo.txt b/build/pkgs/pycparser/distros/gentoo.txt
+new file mode 100644
+index 00000000..5e87307
+--- /dev/null
++++ b/build/pkgs/pycparser/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pycparser
+-- 
+cgit v1.0-1-gd88e
+
+
+From beabde92fe6e057faf516fe82d27f1e903e55ce6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:27:27 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pycparser.
+
+---
+ build/pkgs/pycparser/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pycparser/spkg-configure.m4
+
+diff --git a/build/pkgs/pycparser/spkg-configure.m4 b/build/pkgs/pycparser/spkg-configure.m4
+new file mode 100644
+index 00000000..4b9b900
+--- /dev/null
++++ b/build/pkgs/pycparser/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pycparser], [SAGE_PYTHON_PACKAGE_CHECK([pycparser])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 86c2788dc7fd1169314e9598c91fa81045553677 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:29:36 -0400
+Subject: Trac #29665: add Gentoo package information for cycler.
+
+---
+ build/pkgs/cycler/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cycler/distros/gentoo.txt
+
+diff --git a/build/pkgs/cycler/distros/gentoo.txt b/build/pkgs/cycler/distros/gentoo.txt
+new file mode 100644
+index 00000000..4b21543
+--- /dev/null
++++ b/build/pkgs/cycler/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/cycler
+-- 
+cgit v1.0-1-gd88e
+
+
+From 67c5a944101ddf329f0a61c61d4e784f58a5c5b0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:30:27 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for cycler.
+
+---
+ build/pkgs/cycler/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cycler/spkg-configure.m4
+
+diff --git a/build/pkgs/cycler/spkg-configure.m4 b/build/pkgs/cycler/spkg-configure.m4
+new file mode 100644
+index 00000000..239571a
+--- /dev/null
++++ b/build/pkgs/cycler/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([cycler], [SAGE_PYTHON_PACKAGE_CHECK([cycler])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ef6d490251abfa41f7a0910274700a8a6a65f629 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:31:19 -0400
+Subject: Trac #29665: add Gentoo package information for traitlets.
+
+---
+ build/pkgs/traitlets/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/traitlets/distros/gentoo.txt
+
+diff --git a/build/pkgs/traitlets/distros/gentoo.txt b/build/pkgs/traitlets/distros/gentoo.txt
+new file mode 100644
+index 00000000..46bfaab
+--- /dev/null
++++ b/build/pkgs/traitlets/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/traitlets
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1f922b458d34088d9f6773312209e69f19ee45dc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:31:50 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for traitlets.
+
+---
+ build/pkgs/traitlets/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/traitlets/spkg-configure.m4
+
+diff --git a/build/pkgs/traitlets/spkg-configure.m4 b/build/pkgs/traitlets/spkg-configure.m4
+new file mode 100644
+index 00000000..df2382b
+--- /dev/null
++++ b/build/pkgs/traitlets/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([traitlets], [SAGE_PYTHON_PACKAGE_CHECK([traitlets])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 95b89a9ced0acb6d971a27fa63b97ea58a11f4e1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:33:35 -0400
+Subject: Trac #29665: add Gentoo package information for argcomplete.
+
+---
+ build/pkgs/argcomplete/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argcomplete/distros/gentoo.txt
+
+diff --git a/build/pkgs/argcomplete/distros/gentoo.txt b/build/pkgs/argcomplete/distros/gentoo.txt
+new file mode 100644
+index 00000000..b150949
+--- /dev/null
++++ b/build/pkgs/argcomplete/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/argcomplete
+-- 
+cgit v1.0-1-gd88e
+
+
+From b4cd8ef384e6e5bae0de0f3c113fb5f9e6e1a71e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:34:14 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for argcomplete.
+
+---
+ build/pkgs/argcomplete/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argcomplete/spkg-configure.m4
+
+diff --git a/build/pkgs/argcomplete/spkg-configure.m4 b/build/pkgs/argcomplete/spkg-configure.m4
+new file mode 100644
+index 00000000..cbd7ccf
+--- /dev/null
++++ b/build/pkgs/argcomplete/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([argcomplete], [SAGE_PYTHON_PACKAGE_CHECK([argcomplete])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4cc610e8331970cc018d7ea87af928fa73a292c1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:36:21 -0400
+Subject: Trac #29665: add Gentoo package information for ptyprocess.
+
+---
+ build/pkgs/ptyprocess/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ptyprocess/distros/gentoo.txt
+
+diff --git a/build/pkgs/ptyprocess/distros/gentoo.txt b/build/pkgs/ptyprocess/distros/gentoo.txt
+new file mode 100644
+index 00000000..571a851
+--- /dev/null
++++ b/build/pkgs/ptyprocess/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ptyprocess
+-- 
+cgit v1.0-1-gd88e
+
+
+From cd15f97221bf5933b07900e4f77cb55401eede26 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:37:02 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ptyprocess.
+
+---
+ build/pkgs/ptyprocess/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ptyprocess/spkg-configure.m4
+
+diff --git a/build/pkgs/ptyprocess/spkg-configure.m4 b/build/pkgs/ptyprocess/spkg-configure.m4
+new file mode 100644
+index 00000000..bfacbae
+--- /dev/null
++++ b/build/pkgs/ptyprocess/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ptyprocess], [SAGE_PYTHON_PACKAGE_CHECK([ptyprocess])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb5f45b15f99e4ba28e1b1f6042a0e8ea17f1dfc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:38:22 -0400
+Subject: Trac #29665: add Gentoo package information for attrs.
+
+---
+ build/pkgs/attrs/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/attrs/distros/gentoo.txt
+
+diff --git a/build/pkgs/attrs/distros/gentoo.txt b/build/pkgs/attrs/distros/gentoo.txt
+new file mode 100644
+index 00000000..3b906fa
+--- /dev/null
++++ b/build/pkgs/attrs/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/attrs
+-- 
+cgit v1.0-1-gd88e
+
+
+From 321707ebf8e9af1e4ac3a5b5b094b4226bb3a7a5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:38:55 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for attrs.
+
+---
+ build/pkgs/attrs/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/attrs/spkg-configure.m4
+
+diff --git a/build/pkgs/attrs/spkg-configure.m4 b/build/pkgs/attrs/spkg-configure.m4
+new file mode 100644
+index 00000000..ba6a9b7
+--- /dev/null
++++ b/build/pkgs/attrs/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([attrs], [SAGE_PYTHON_PACKAGE_CHECK([attrs])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 69a498a4e8854ecdfc2f1a134104983c0dcb9e32 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:40:09 -0400
+Subject: Trac #29665: add Gentoo package information for send2trash.
+
+---
+ build/pkgs/send2trash/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/send2trash/distros/gentoo.txt
+
+diff --git a/build/pkgs/send2trash/distros/gentoo.txt b/build/pkgs/send2trash/distros/gentoo.txt
+new file mode 100644
+index 00000000..a89b179
+--- /dev/null
++++ b/build/pkgs/send2trash/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/send2trash
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9baed17c84e1bdf5abd17c20766e5cd7dddc5b53 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:41:45 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for send2trash.
+
+---
+ build/pkgs/send2trash/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/send2trash/spkg-configure.m4
+
+diff --git a/build/pkgs/send2trash/spkg-configure.m4 b/build/pkgs/send2trash/spkg-configure.m4
+new file mode 100644
+index 00000000..3bbb727
+--- /dev/null
++++ b/build/pkgs/send2trash/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([send2trash], [SAGE_PYTHON_PACKAGE_CHECK([send2trash])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b9b552b2a2aaccaeb7c5b25be0b681f107522d09 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:43:27 -0400
+Subject: Trac #29665: add Gentoo package information for pyrsistent.
+
+---
+ build/pkgs/pyrsistent/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyrsistent/distros/gentoo.txt
+
+diff --git a/build/pkgs/pyrsistent/distros/gentoo.txt b/build/pkgs/pyrsistent/distros/gentoo.txt
+new file mode 100644
+index 00000000..83439ce
+--- /dev/null
++++ b/build/pkgs/pyrsistent/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyrsistent
+-- 
+cgit v1.0-1-gd88e
+
+
+From a17b31fac6104852762f57daa749443147bdf121 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:44:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pyrsistent.
+
+---
+ build/pkgs/pyrsistent/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyrsistent/spkg-configure.m4
+
+diff --git a/build/pkgs/pyrsistent/spkg-configure.m4 b/build/pkgs/pyrsistent/spkg-configure.m4
+new file mode 100644
+index 00000000..f7ca75d
+--- /dev/null
++++ b/build/pkgs/pyrsistent/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pyrsistent], [SAGE_PYTHON_PACKAGE_CHECK([pyrsistent])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 68520decad6d6937918d7a6af65ca5bd476e5d02 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:45:45 -0400
+Subject: Trac #29665: add Gentoo package information for entrypoints.
+
+---
+ build/pkgs/entrypoints/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/entrypoints/distros/gentoo.txt
+
+diff --git a/build/pkgs/entrypoints/distros/gentoo.txt b/build/pkgs/entrypoints/distros/gentoo.txt
+new file mode 100644
+index 00000000..684ddd0
+--- /dev/null
++++ b/build/pkgs/entrypoints/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/entrypoints
+-- 
+cgit v1.0-1-gd88e
+
+
+From 34213eccb642a6bad64d89acaefa83ee702cb483 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:46:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for entrypoints.
+
+---
+ build/pkgs/entrypoints/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/entrypoints/spkg-configure.m4
+
+diff --git a/build/pkgs/entrypoints/spkg-configure.m4 b/build/pkgs/entrypoints/spkg-configure.m4
+new file mode 100644
+index 00000000..caed658
+--- /dev/null
++++ b/build/pkgs/entrypoints/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([entrypoints], [SAGE_PYTHON_PACKAGE_CHECK([entrypoints])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8e985614345da1a58fcdc127a9c0ddd790f9b5d2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:48:26 -0400
+Subject: Trac #29665: add Gentoo package information for markupsafe.
+
+---
+ build/pkgs/markupsafe/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/markupsafe/distros/gentoo.txt
+
+diff --git a/build/pkgs/markupsafe/distros/gentoo.txt b/build/pkgs/markupsafe/distros/gentoo.txt
+new file mode 100644
+index 00000000..9654e35
+--- /dev/null
++++ b/build/pkgs/markupsafe/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/markupsafe
+-- 
+cgit v1.0-1-gd88e
+
+
+From d370f229ae0988856f2e0d1f6ee2df2c47169106 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:48:55 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for markupsafe.
+
+---
+ build/pkgs/markupsafe/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/markupsafe/spkg-configure.m4
+
+diff --git a/build/pkgs/markupsafe/spkg-configure.m4 b/build/pkgs/markupsafe/spkg-configure.m4
+new file mode 100644
+index 00000000..79eb8db
+--- /dev/null
++++ b/build/pkgs/markupsafe/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([markupsafe], [SAGE_PYTHON_PACKAGE_CHECK([markupsafe])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c49b285ad9e25e6bc81a7e75d461d234fdd3ea68 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:30:49 -0400
+Subject: Trac #29665: add Gentoo package information for flit_core.
+
+---
+ build/pkgs/flit_core/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/flit_core/distros/gentoo.txt
+
+diff --git a/build/pkgs/flit_core/distros/gentoo.txt b/build/pkgs/flit_core/distros/gentoo.txt
+new file mode 100644
+index 00000000..fe6bea9
+--- /dev/null
++++ b/build/pkgs/flit_core/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/flit_core
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b0ce1c4f23cd9fc4316e1eb2b9b4bde394957f3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:32:11 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for flit_core.
+
+---
+ build/pkgs/flit_core/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/flit_core/spkg-configure.m4
+
+diff --git a/build/pkgs/flit_core/spkg-configure.m4 b/build/pkgs/flit_core/spkg-configure.m4
+new file mode 100644
+index 00000000..ee67557
+--- /dev/null
++++ b/build/pkgs/flit_core/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([flit_core], [SAGE_PYTHON_PACKAGE_CHECK([flit_core])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f006c231a81428b1e1e792f889bf974f90e3c831 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:34:06 -0400
+Subject: Trac #29665: add Gentoo package information for nest_asyncio.
+
+---
+ build/pkgs/nest_asyncio/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nest_asyncio/distros/gentoo.txt
+
+diff --git a/build/pkgs/nest_asyncio/distros/gentoo.txt b/build/pkgs/nest_asyncio/distros/gentoo.txt
+new file mode 100644
+index 00000000..ab742d2
+--- /dev/null
++++ b/build/pkgs/nest_asyncio/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nest_asyncio
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4a58d0a96a84475e765a01a64f5f44c48a317e0b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:34:43 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for nest_asyncio.
+
+---
+ build/pkgs/nest_asyncio/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nest_asyncio/spkg-configure.m4
+
+diff --git a/build/pkgs/nest_asyncio/spkg-configure.m4 b/build/pkgs/nest_asyncio/spkg-configure.m4
+new file mode 100644
+index 00000000..4d81527
+--- /dev/null
++++ b/build/pkgs/nest_asyncio/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nest_asyncio], [SAGE_PYTHON_PACKAGE_CHECK([nest_asyncio])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e50af937777ea778908bc09a7a79db3dd80fdf25 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:37:02 -0400
+Subject: Trac #29665: add Gentoo package information for ipython_genutils.
+
+---
+ build/pkgs/ipython_genutils/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython_genutils/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipython_genutils/distros/gentoo.txt b/build/pkgs/ipython_genutils/distros/gentoo.txt
+new file mode 100644
+index 00000000..01bc49d
+--- /dev/null
++++ b/build/pkgs/ipython_genutils/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipython_genutils
+-- 
+cgit v1.0-1-gd88e
+
+
+From ec3c0ce9db2ba13c1a49d1bcfb7a4b249cb7ae83 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:39:20 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipython_genutils.
+
+---
+ build/pkgs/ipython_genutils/spkg-configure.m4 | 4 ++++
+ 1 file changed, 4 insertions(+)
+ create mode 100644 build/pkgs/ipython_genutils/spkg-configure.m4
+
+diff --git a/build/pkgs/ipython_genutils/spkg-configure.m4 b/build/pkgs/ipython_genutils/spkg-configure.m4
+new file mode 100644
+index 00000000..b0ba86a
+--- /dev/null
++++ b/build/pkgs/ipython_genutils/spkg-configure.m4
+@@ -0,0 +1,4 @@
++SAGE_SPKG_CONFIGURE(
++  [ipython_genutils],
++  [SAGE_PYTHON_PACKAGE_CHECK([ipython_genutils])]
++)
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5c9e2e265115e5f10d4b459a475467e30b4bddde Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:40:03 -0400
+Subject: Trac #29665: add Gentoo package information for ipython.
+
+---
+ build/pkgs/ipython/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipython/distros/gentoo.txt b/build/pkgs/ipython/distros/gentoo.txt
+new file mode 100644
+index 00000000..8b76f18
+--- /dev/null
++++ b/build/pkgs/ipython/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipython
+-- 
+cgit v1.0-1-gd88e
+
+
+From 621e707ddd040a902d7dddf0bed1de2b54ab22f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 07:37:56 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipython.
+
+---
+ build/pkgs/ipython/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython/spkg-configure.m4
+
+diff --git a/build/pkgs/ipython/spkg-configure.m4 b/build/pkgs/ipython/spkg-configure.m4
+new file mode 100644
+index 00000000..02ab89f
+--- /dev/null
++++ b/build/pkgs/ipython/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipython], [SAGE_PYTHON_PACKAGE_CHECK([ipython])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20a0613f6d441da436f3e7b8047a72bf490882bd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 07:51:11 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipywidgets.
+
+---
+ build/pkgs/ipywidgets/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipywidgets/spkg-configure.m4
+
+diff --git a/build/pkgs/ipywidgets/spkg-configure.m4 b/build/pkgs/ipywidgets/spkg-configure.m4
+new file mode 100644
+index 00000000..51ca9be
+--- /dev/null
++++ b/build/pkgs/ipywidgets/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipywidgets], [SAGE_PYTHON_PACKAGE_CHECK([ipywidgets])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 76bcd386633acc02a1a3026339d0cbd258ada04e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 10:05:16 -0400
+Subject: Trac #29665: add Gentoo package information for wheel.
+
+---
+ build/pkgs/wheel/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wheel/distros/gentoo.txt
+
+diff --git a/build/pkgs/wheel/distros/gentoo.txt b/build/pkgs/wheel/distros/gentoo.txt
+new file mode 100644
+index 00000000..ec571d5
+--- /dev/null
++++ b/build/pkgs/wheel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 96c2dd2ca7812f5333bb9d45eadb7ac408e364ce Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:51:44 -0500
+Subject: Trac #29665: add Gentoo package information for terminado.
+
+---
+ build/pkgs/terminado/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/terminado/distros/gentoo.txt
+
+diff --git a/build/pkgs/terminado/distros/gentoo.txt b/build/pkgs/terminado/distros/gentoo.txt
+new file mode 100644
+index 00000000..1df16f1
+--- /dev/null
++++ b/build/pkgs/terminado/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/terminado
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0de0f5f3d235a4339b21e37ea13c9f5e59a82e59 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:52:35 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for terminado.
+
+---
+ build/pkgs/terminado/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/terminado/spkg-configure.m4
+
+diff --git a/build/pkgs/terminado/spkg-configure.m4 b/build/pkgs/terminado/spkg-configure.m4
+new file mode 100644
+index 00000000..5defc2f
+--- /dev/null
++++ b/build/pkgs/terminado/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([terminado], [SAGE_PYTHON_PACKAGE_CHECK([terminado])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d14a745c770b02822557e7cee0a98de1cb2f3a12 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:56:15 -0500
+Subject: Trac #29665: add Gentoo package information for cffi.
+
+---
+ build/pkgs/cffi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cffi/distros/gentoo.txt
+
+diff --git a/build/pkgs/cffi/distros/gentoo.txt b/build/pkgs/cffi/distros/gentoo.txt
+new file mode 100644
+index 00000000..81eeb81
+--- /dev/null
++++ b/build/pkgs/cffi/distros/gentoo.txt
+@@ -0,0 +1 @@
++virtual/python-cffi
+-- 
+cgit v1.0-1-gd88e
+
+
+From ce393c04afc69fe050e38f780d4e117164687d80 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:57:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for cffi.
+
+---
+ build/pkgs/cffi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cffi/spkg-configure.m4
+
+diff --git a/build/pkgs/cffi/spkg-configure.m4 b/build/pkgs/cffi/spkg-configure.m4
+new file mode 100644
+index 00000000..dc81875
+--- /dev/null
++++ b/build/pkgs/cffi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([cffi], [SAGE_PYTHON_PACKAGE_CHECK([cffi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 467093315b3fdd57c8caa2f95cf99ad52b0b84fb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:57:57 -0500
+Subject: Trac #29665: add Gentoo package information for pip.
+
+---
+ build/pkgs/pip/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pip/distros/gentoo.txt
+
+diff --git a/build/pkgs/pip/distros/gentoo.txt b/build/pkgs/pip/distros/gentoo.txt
+new file mode 100644
+index 00000000..1845454
+--- /dev/null
++++ b/build/pkgs/pip/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pip[vanilla]
+-- 
+cgit v1.0-1-gd88e
+
+
+From c597fd23f9f68dabbcb7e698d0569c3e6458f6d1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 09:07:26 -0500
+Subject: Trac #29665: new spkg-configure.m4 for pip.
+
+---
+ build/pkgs/pip/spkg-configure.m4 | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+ create mode 100644 build/pkgs/pip/spkg-configure.m4
+
+diff --git a/build/pkgs/pip/spkg-configure.m4 b/build/pkgs/pip/spkg-configure.m4
+new file mode 100644
+index 00000000..c7a5562
+--- /dev/null
++++ b/build/pkgs/pip/spkg-configure.m4
+@@ -0,0 +1,12 @@
++SAGE_SPKG_CONFIGURE([pip], [
++  dnl always run this macro because it changes the default value of
++  dnl the --with-system-<package> option.
++  SAGE_PYTHON_PACKAGE_CHECK([pip])
++
++  dnl if we might not install the spkg, make sure that "pip" is in
++  dnl the user's PATH, too.
++  AS_IF([test "x$sage_spkg_install_pip" != "xyes"], [
++    AC_CHECK_PROG(HAVE_PIP, pip, yes, no)
++    AS_IF([test "x$HAVE_PIP" = "xno"], [sage_spkg_install_pip=yes])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ef8f1e807bc55d7b8321777486fa867a7c135419 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 9 Nov 2021 09:09:04 -0500
+Subject: Trac #29665: set $SAGE_PIP_INSTALL_FLAGS for
+ --enable-system-site-packages.
+
+We need to pass some special flags to "pip install" to make it do the
+right thing in the precence of system-site packages. Here we introduce
+a new autoconf variable, SAGE_PIP_INSTALL_FLAGS, that will be used
+to pass those flags to the build system.
+
+With autoconf aware of the variable, we substitute its value into the
+sage-build-env-config script for use in spkg-install.in.
+---
+ build/bin/sage-build-env-config.in | 1 +
+ configure.ac                       | 9 +++++++++
+ 2 files changed, 10 insertions(+)
+
+diff --git a/build/bin/sage-build-env-config.in b/build/bin/sage-build-env-config.in
+index 92e7dad..ad62e5f 100644
+--- a/build/bin/sage-build-env-config.in
++++ b/build/bin/sage-build-env-config.in
+@@ -53,6 +53,7 @@ export SAGE_PARI_CFG="@SAGE_PARI_CFG@"
+ 
+ export SAGE_GLPK_PREFIX="@SAGE_GLPK_PREFIX@"
+ export SAGE_FREETYPE_PREFIX="@SAGE_FREETYPE_PREFIX@"
++export SAGE_PIP_INSTALL_FLAGS="@SAGE_PIP_INSTALL_FLAGS@"
+ export SAGE_SUITESPARSE_PREFIX="@SAGE_SUITESPARSE_PREFIX@"
+ 
+ export SAGE_CONFIGURE_FFLAS_FFPACK="@SAGE_CONFIGURE_FFLAS_FFPACK@"
+diff --git a/configure.ac b/configure.ac
+index 6fafb83..6ed07ac 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -441,6 +441,14 @@ AC_ARG_ENABLE(
+     [allow the use of python packages from the system (experimental; default: no)]
+   )], [
+   AS_IF([test "x$enable_system_site_packages" = "xyes"], [
++    dnl When installing python SPKGs in the presence of system-site
++    dnl packages, we need to --ignore-installed so that a patched SPKG
++    dnl can be installed in the presence of an unpatched system package
++    dnl that appears (to pip) to be identical. The --no-deps flag is
++    dnl then needed because --ignore-installed will make any installed
++    dnl dependencies invisible to pip, who does not appreciate that.
++    SAGE_PIP_INSTALL_FLAGS="${SAGE_PIP_INSTALL_FLAGS} --no-deps --ignore-installed"
++
+     SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
+ 
+     dnl We want to raise an error if the user asked for "system site
+@@ -453,6 +461,7 @@ AC_ARG_ENABLE(
+     with_system_python3="force"
+   ])
+ ])
++AC_SUBST([SAGE_PIP_INSTALL_FLAGS])
+ AC_SUBST([SAGE_VENV_FLAGS])
+ 
+ SAGE_SPKG_OPTIONS=""
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3cf365fef84e809e74abd2eb388e7a8e9af9d739 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 9 Nov 2021 21:01:58 -0500
+Subject: Trac #29665: pass $SAGE_PIP_INSTALL_FLAGS to sdh_pip_install.
+
+Since sdh_pip_install is usually called from spkg-install.in, the
+variables from sage-build-env-config will be available. Here we pass
+the contents of $SAGE_PIP_INSTALL_FLAGS to sage-pip-install
+unconditionally, and hope that the user ignores this variable unless
+he truly knows what he is doing.
+---
+ build/bin/sage-dist-helpers | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/build/bin/sage-dist-helpers b/build/bin/sage-dist-helpers
+index fe364e5..1032ac3 100644
+--- a/build/bin/sage-dist-helpers
++++ b/build/bin/sage-dist-helpers
+@@ -303,7 +303,11 @@ sdh_store_wheel() {
+ }
+ 
+ sdh_store_and_pip_install_wheel() {
+-    local pip_options=""
++    # The $SAGE_PIP_INSTALL_FLAGS variable is set by sage-build-env-config.
++    # We skip sanity checking its contents since you should either let sage
++    # decide what it contains, or really know what you are doing.
++    local pip_options="${SAGE_PIP_INSTALL_FLAGS}"
++
+     while [ $# -gt 0 ]; do
+         case $1 in
+             -*) pip_options="$pip_options $1"
+-- 
+cgit v1.0-1-gd88e
+
+
+From 50f0438ee857b8f0b7d7ad924e6bba9c5e1bc033 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:10:46 -0500
+Subject: Trac #29665: add Gentoo package information for pexpect.
+
+---
+ build/pkgs/pexpect/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pexpect/distros/gentoo.txt
+
+diff --git a/build/pkgs/pexpect/distros/gentoo.txt b/build/pkgs/pexpect/distros/gentoo.txt
+new file mode 100644
+index 00000000..30c4b60
+--- /dev/null
++++ b/build/pkgs/pexpect/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pexpect
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4d784688d997290b462646fa7f36114a41f3f453 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:11:25 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pexpect.
+
+---
+ build/pkgs/pexpect/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pexpect/spkg-configure.m4
+
+diff --git a/build/pkgs/pexpect/spkg-configure.m4 b/build/pkgs/pexpect/spkg-configure.m4
+new file mode 100644
+index 00000000..6520856
+--- /dev/null
++++ b/build/pkgs/pexpect/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pexpect], [SAGE_PYTHON_PACKAGE_CHECK([pexpect])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6447122dc76a3b7a58340dbed942db66530b5b07 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:12:05 -0500
+Subject: Trac #29665: add Gentoo package information for docutils.
+
+---
+ build/pkgs/docutils/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/docutils/distros/gentoo.txt
+
+diff --git a/build/pkgs/docutils/distros/gentoo.txt b/build/pkgs/docutils/distros/gentoo.txt
+new file mode 100644
+index 00000000..fe4a452
+--- /dev/null
++++ b/build/pkgs/docutils/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/docutils
+-- 
+cgit v1.0-1-gd88e
+
+
+From 709041480a5fc729b0ee7f1a8a3b16d4d65321b5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:12:38 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for docutils.
+
+---
+ build/pkgs/docutils/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/docutils/spkg-configure.m4
+
+diff --git a/build/pkgs/docutils/spkg-configure.m4 b/build/pkgs/docutils/spkg-configure.m4
+new file mode 100644
+index 00000000..3584e45
+--- /dev/null
++++ b/build/pkgs/docutils/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([docutils], [SAGE_PYTHON_PACKAGE_CHECK([docutils])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 782d38b48ab87afccc43fbc071e7b7ed48fb0a20 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:14:37 -0500
+Subject: Trac #29665: add Gentoo package information for nbclient.
+
+---
+ build/pkgs/nbclient/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbclient/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbclient/distros/gentoo.txt b/build/pkgs/nbclient/distros/gentoo.txt
+new file mode 100644
+index 00000000..06ff18d
+--- /dev/null
++++ b/build/pkgs/nbclient/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbclient
+-- 
+cgit v1.0-1-gd88e
+
+
+From 19ce09336532336f69db74381932d51a429dfaca Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:15:11 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for nbclient.
+
+---
+ build/pkgs/nbclient/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbclient/spkg-configure.m4
+
+diff --git a/build/pkgs/nbclient/spkg-configure.m4 b/build/pkgs/nbclient/spkg-configure.m4
+new file mode 100644
+index 00000000..14178b7
+--- /dev/null
++++ b/build/pkgs/nbclient/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbclient], [SAGE_PYTHON_PACKAGE_CHECK([nbclient])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c063b9de42c1780368000a563d0dbe80b6fff169 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:17:36 -0500
+Subject: Trac #29665: add Gentoo package information for argon2_cffi.
+
+---
+ build/pkgs/argon2_cffi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argon2_cffi/distros/gentoo.txt
+
+diff --git a/build/pkgs/argon2_cffi/distros/gentoo.txt b/build/pkgs/argon2_cffi/distros/gentoo.txt
+new file mode 100644
+index 00000000..2f12ca8
+--- /dev/null
++++ b/build/pkgs/argon2_cffi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/argon2-cffi
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0b4d5699dd51ea52550fba7db9e1cbb8bbac1892 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:18:35 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for argon2_cffi.
+
+---
+ build/pkgs/argon2_cffi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argon2_cffi/spkg-configure.m4
+
+diff --git a/build/pkgs/argon2_cffi/spkg-configure.m4 b/build/pkgs/argon2_cffi/spkg-configure.m4
+new file mode 100644
+index 00000000..03ebc63
+--- /dev/null
++++ b/build/pkgs/argon2_cffi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([argon2_cffi], [SAGE_PYTHON_PACKAGE_CHECK([argon2_cffi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2b4119558a6e0b1aa512848539a237676b035c83 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:30:48 -0500
+Subject: Trac #29665: fix package name in dateutil's install-requires.txt.
+
+---
+ build/pkgs/dateutil/install-requires.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/build/pkgs/dateutil/install-requires.txt b/build/pkgs/dateutil/install-requires.txt
+index 0ae93da..face537 100644
+--- a/build/pkgs/dateutil/install-requires.txt
++++ b/build/pkgs/dateutil/install-requires.txt
+@@ -1 +1 @@
+-dateutil >=2.8.1
++python-dateutil >=2.8.1
+-- 
+cgit v1.0-1-gd88e
+
+
+From df371b7c4d20a3353d43940306ad22e11aba29da Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:31:41 -0500
+Subject: Trac #29665: add Gentoo package information for dateutil.
+
+---
+ build/pkgs/dateutil/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/dateutil/distros/gentoo.txt
+
+diff --git a/build/pkgs/dateutil/distros/gentoo.txt b/build/pkgs/dateutil/distros/gentoo.txt
+new file mode 100644
+index 00000000..e129df7
+--- /dev/null
++++ b/build/pkgs/dateutil/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/python-dateutil
+-- 
+cgit v1.0-1-gd88e
+
+
+From 577695dfdf661ee26c0ffd767bdbf479d95f7fb4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:32:21 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for dateutil.
+
+---
+ build/pkgs/dateutil/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/dateutil/spkg-configure.m4
+
+diff --git a/build/pkgs/dateutil/spkg-configure.m4 b/build/pkgs/dateutil/spkg-configure.m4
+new file mode 100644
+index 00000000..fdcd127
+--- /dev/null
++++ b/build/pkgs/dateutil/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([dateutil], [SAGE_PYTHON_PACKAGE_CHECK([dateutil])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1984651caac624ec4bb58814ca1d57fe66f9881a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:33:51 -0500
+Subject: Trac #29665: add Gentoo package information for setuptools_scm.
+
+---
+ build/pkgs/setuptools_scm/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/setuptools_scm/distros/gentoo.txt
+
+diff --git a/build/pkgs/setuptools_scm/distros/gentoo.txt b/build/pkgs/setuptools_scm/distros/gentoo.txt
+new file mode 100644
+index 00000000..8989597
+--- /dev/null
++++ b/build/pkgs/setuptools_scm/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/setuptools_scm
+-- 
+cgit v1.0-1-gd88e
+
+
+From ebf7c854ed966e7353759be485c4f5a57b9a10fa Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:34:49 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for setuptools_scm.
+
+---
+ build/pkgs/setuptools_scm/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/setuptools_scm/spkg-configure.m4
+
+diff --git a/build/pkgs/setuptools_scm/spkg-configure.m4 b/build/pkgs/setuptools_scm/spkg-configure.m4
+new file mode 100644
+index 00000000..437148c
+--- /dev/null
++++ b/build/pkgs/setuptools_scm/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([setuptools_scm], [
++  SAGE_PYTHON_PACKAGE_CHECK([setuptools_scm])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0dee0d0c28f31b1f619e44c710a3c9e22d2b2544 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:36:33 -0500
+Subject: Trac #29665: add Gentoo package information for nbconvert.
+
+---
+ build/pkgs/nbconvert/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbconvert/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbconvert/distros/gentoo.txt b/build/pkgs/nbconvert/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c45a10
+--- /dev/null
++++ b/build/pkgs/nbconvert/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbconvert
+-- 
+cgit v1.0-1-gd88e
+
+
+From 473789eb11b1838bc32dc8a63509ee199afc8912 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:37:37 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for nbconvert.
+
+---
+ build/pkgs/nbconvert/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbconvert/spkg-configure.m4
+
+diff --git a/build/pkgs/nbconvert/spkg-configure.m4 b/build/pkgs/nbconvert/spkg-configure.m4
+new file mode 100644
+index 00000000..9b5dee3
+--- /dev/null
++++ b/build/pkgs/nbconvert/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbconvert], [SAGE_PYTHON_PACKAGE_CHECK([nbconvert])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f0703b594e57c980d605aa9bc8316c45a7858b3b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:41:51 -0500
+Subject: Trac #29665: add Gentoo package information for jupyter_core.
+
+---
+ build/pkgs/jupyter_core/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyter_core/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyter_core/distros/gentoo.txt b/build/pkgs/jupyter_core/distros/gentoo.txt
+new file mode 100644
+index 00000000..f168c5a
+--- /dev/null
++++ b/build/pkgs/jupyter_core/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyter_core
+-- 
+cgit v1.0-1-gd88e
+
+
+From 061a307cc4a6680d8500fde834975064e59540d5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:42:48 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jupyter_core.
+
+---
+ build/pkgs/jupyter_core/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyter_core/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyter_core/spkg-configure.m4 b/build/pkgs/jupyter_core/spkg-configure.m4
+new file mode 100644
+index 00000000..67df9c3
+--- /dev/null
++++ b/build/pkgs/jupyter_core/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyter_core], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyter_core])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b85abe964ce0b98b5842efe9cbad9bdb1c89202f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:47:08 -0500
+Subject: Trac #29665: add Gentoo package information for jupyter_client.
+
+---
+ build/pkgs/jupyter_client/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyter_client/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyter_client/distros/gentoo.txt b/build/pkgs/jupyter_client/distros/gentoo.txt
+new file mode 100644
+index 00000000..4f1de88
+--- /dev/null
++++ b/build/pkgs/jupyter_client/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyter_client
+-- 
+cgit v1.0-1-gd88e
+
+
+From 86323ff1e0b2507933df6bc2a96c9175957640c5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:48:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jupyter_client.
+
+---
+ build/pkgs/jupyter_client/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyter_client/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyter_client/spkg-configure.m4 b/build/pkgs/jupyter_client/spkg-configure.m4
+new file mode 100644
+index 00000000..fbd3498
+--- /dev/null
++++ b/build/pkgs/jupyter_client/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyter_client], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyter_client])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a8475e27dd30d752d05ab6fea6579e8623501d82 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:48:58 -0500
+Subject: Trac #29665: add Gentoo package information for snowballstemmer.
+
+---
+ build/pkgs/snowballstemmer/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/snowballstemmer/distros/gentoo.txt
+
+diff --git a/build/pkgs/snowballstemmer/distros/gentoo.txt b/build/pkgs/snowballstemmer/distros/gentoo.txt
+new file mode 100644
+index 00000000..63fd851
+--- /dev/null
++++ b/build/pkgs/snowballstemmer/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/snowballstemmer
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0833c9b781062b4ed86d619e050a6f5d60e36080 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:49:38 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for snowballstemmer.
+
+---
+ build/pkgs/snowballstemmer/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/snowballstemmer/spkg-configure.m4
+
+diff --git a/build/pkgs/snowballstemmer/spkg-configure.m4 b/build/pkgs/snowballstemmer/spkg-configure.m4
+new file mode 100644
+index 00000000..6aa0882
+--- /dev/null
++++ b/build/pkgs/snowballstemmer/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([snowballstemmer], [
++  SAGE_PYTHON_PACKAGE_CHECK([snowballstemmer])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 50a1cf2a2bcd7eeec64cbc3f70e3e9fbe5d850fe Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:50:47 -0500
+Subject: Trac #29665: add Gentoo package information for tornado.
+
+---
+ build/pkgs/tornado/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tornado/distros/gentoo.txt
+
+diff --git a/build/pkgs/tornado/distros/gentoo.txt b/build/pkgs/tornado/distros/gentoo.txt
+new file mode 100644
+index 00000000..6ae4b9f
+--- /dev/null
++++ b/build/pkgs/tornado/distros/gentoo.txt
+@@ -0,0 +1 @@
++www-servers/tornado
+-- 
+cgit v1.0-1-gd88e
+
+
+From 118f4da6e03476c726363e8e22ecda32f13bfc33 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:51:26 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for tornado.
+
+---
+ build/pkgs/tornado/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tornado/spkg-configure.m4
+
+diff --git a/build/pkgs/tornado/spkg-configure.m4 b/build/pkgs/tornado/spkg-configure.m4
+new file mode 100644
+index 00000000..1ee5bc9
+--- /dev/null
++++ b/build/pkgs/tornado/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tornado], [SAGE_PYTHON_PACKAGE_CHECK([tornado])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3850701747a6c8ef60840bdfdb589b28d4cd2b9a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:52:21 -0500
+Subject: Trac #29665: add Gentoo package information for jsonschema.
+
+---
+ build/pkgs/jsonschema/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jsonschema/distros/gentoo.txt
+
+diff --git a/build/pkgs/jsonschema/distros/gentoo.txt b/build/pkgs/jsonschema/distros/gentoo.txt
+new file mode 100644
+index 00000000..d708e4c
+--- /dev/null
++++ b/build/pkgs/jsonschema/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jsonschema
+-- 
+cgit v1.0-1-gd88e
+
+
+From 76e3917c8af781af00f642cfada7a79594429e30 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:54:03 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jsonschema.
+
+---
+ build/pkgs/jsonschema/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jsonschema/spkg-configure.m4
+
+diff --git a/build/pkgs/jsonschema/spkg-configure.m4 b/build/pkgs/jsonschema/spkg-configure.m4
+new file mode 100644
+index 00000000..b9e5e21
+--- /dev/null
++++ b/build/pkgs/jsonschema/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jsonschema], [SAGE_PYTHON_PACKAGE_CHECK([jsonschema])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From fd4a16c11669b6dd73ac6325bca820e76db00402 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:55:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ widgetsnbextension.
+
+---
+ build/pkgs/widgetsnbextension/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/widgetsnbextension/spkg-configure.m4
+
+diff --git a/build/pkgs/widgetsnbextension/spkg-configure.m4 b/build/pkgs/widgetsnbextension/spkg-configure.m4
+new file mode 100644
+index 00000000..bf82daf
+--- /dev/null
++++ b/build/pkgs/widgetsnbextension/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([widgetsnbextension], [
++  SAGE_PYTHON_PACKAGE_CHECK([widgetsnbextension])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8079a9f384e3c8480e157dd98c3db2f43c987f4e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:57:20 -0500
+Subject: Trac #29665: add Gentoo package information for importlib_resources.
+
+---
+ build/pkgs/importlib_resources/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/importlib_resources/distros/gentoo.txt
+
+diff --git a/build/pkgs/importlib_resources/distros/gentoo.txt b/build/pkgs/importlib_resources/distros/gentoo.txt
+new file mode 100644
+index 00000000..d5e1f2c
+--- /dev/null
++++ b/build/pkgs/importlib_resources/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/importlib_resources
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2c430d7c52f02779a6c41b98ac2f4edd8b6759c3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:58:00 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ importlib_resources.
+
+---
+ build/pkgs/importlib_resources/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/importlib_resources/spkg-configure.m4
+
+diff --git a/build/pkgs/importlib_resources/spkg-configure.m4 b/build/pkgs/importlib_resources/spkg-configure.m4
+new file mode 100644
+index 00000000..50df55b
+--- /dev/null
++++ b/build/pkgs/importlib_resources/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([importlib_resources], [
++  SAGE_PYTHON_PACKAGE_CHECK([importlib_resources])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 00d13d7bf2e50aae2ccef3b2b30293c70a922af2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:58:38 -0500
+Subject: Trac #29665: add Gentoo package information for kiwisolver.
+
+---
+ build/pkgs/kiwisolver/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/kiwisolver/distros/gentoo.txt
+
+diff --git a/build/pkgs/kiwisolver/distros/gentoo.txt b/build/pkgs/kiwisolver/distros/gentoo.txt
+new file mode 100644
+index 00000000..7b30c95
+--- /dev/null
++++ b/build/pkgs/kiwisolver/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/kiwisolver
+-- 
+cgit v1.0-1-gd88e
+
+
+From 72b7907ef7ea9fa4ff6948ea34cfe2f693ee6c31 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:59:09 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for kiwisolver.
+
+---
+ build/pkgs/kiwisolver/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/kiwisolver/spkg-configure.m4
+
+diff --git a/build/pkgs/kiwisolver/spkg-configure.m4 b/build/pkgs/kiwisolver/spkg-configure.m4
+new file mode 100644
+index 00000000..4e7ac97
+--- /dev/null
++++ b/build/pkgs/kiwisolver/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([kiwisolver], [SAGE_PYTHON_PACKAGE_CHECK([kiwisolver])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 479351279e4e0ea7e2d146434f0daba038765cfd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:00:04 -0500
+Subject: Trac #29665: add Gentoo package information for notebook.
+
+---
+ build/pkgs/notebook/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/notebook/distros/gentoo.txt
+
+diff --git a/build/pkgs/notebook/distros/gentoo.txt b/build/pkgs/notebook/distros/gentoo.txt
+new file mode 100644
+index 00000000..6475d72
+--- /dev/null
++++ b/build/pkgs/notebook/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/notebook
+-- 
+cgit v1.0-1-gd88e
+
+
+From f4d9242ea654977f8ad7865c82eec593e11a36bc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:01:42 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for notebook.
+
+---
+ build/pkgs/notebook/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/notebook/spkg-configure.m4
+
+diff --git a/build/pkgs/notebook/spkg-configure.m4 b/build/pkgs/notebook/spkg-configure.m4
+new file mode 100644
+index 00000000..a17ba95
+--- /dev/null
++++ b/build/pkgs/notebook/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([notebook], [SAGE_PYTHON_PACKAGE_CHECK([notebook])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9837070c7f8e9a71283b84d49d4fd2c94b78a464 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:02:38 -0500
+Subject: Trac #29665: add Gentoo package information for matplotlib_inline.
+
+---
+ build/pkgs/matplotlib_inline/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/matplotlib_inline/distros/gentoo.txt
+
+diff --git a/build/pkgs/matplotlib_inline/distros/gentoo.txt b/build/pkgs/matplotlib_inline/distros/gentoo.txt
+new file mode 100644
+index 00000000..6a5859c
+--- /dev/null
++++ b/build/pkgs/matplotlib_inline/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/matplotlib-inline
+-- 
+cgit v1.0-1-gd88e
+
+
+From 750be73b25b92b4875e47d044360ac0e1116ec3e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:03:28 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for matplotlib_inline.
+
+---
+ build/pkgs/matplotlib_inline/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/matplotlib_inline/spkg-configure.m4
+
+diff --git a/build/pkgs/matplotlib_inline/spkg-configure.m4 b/build/pkgs/matplotlib_inline/spkg-configure.m4
+new file mode 100644
+index 00000000..e59658f
+--- /dev/null
++++ b/build/pkgs/matplotlib_inline/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([matplotlib_inline], [
++  SAGE_PYTHON_PACKAGE_CHECK([matplotlib_inline])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 273505f49698dcd2ab30c2756b07113c9b7e7791 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:04:10 -0500
+Subject: Trac #29665: add Gentoo package information for ipykernel.
+
+---
+ build/pkgs/ipykernel/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipykernel/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipykernel/distros/gentoo.txt b/build/pkgs/ipykernel/distros/gentoo.txt
+new file mode 100644
+index 00000000..88aab61
+--- /dev/null
++++ b/build/pkgs/ipykernel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipykernel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 629ad36c9e4ae0cdff4a013289b4f2911442445e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:04:46 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for ipykernel.
+
+---
+ build/pkgs/ipykernel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipykernel/spkg-configure.m4
+
+diff --git a/build/pkgs/ipykernel/spkg-configure.m4 b/build/pkgs/ipykernel/spkg-configure.m4
+new file mode 100644
+index 00000000..94ecc2d
+--- /dev/null
++++ b/build/pkgs/ipykernel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipykernel], [SAGE_PYTHON_PACKAGE_CHECK([ipykernel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b8d709edb6a24fd5868ee2818b56e78257b2eafa Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:05:26 -0500
+Subject: Trac #29665: add Gentoo package information for prompt_toolkit.
+
+---
+ build/pkgs/prompt_toolkit/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/prompt_toolkit/distros/gentoo.txt
+
+diff --git a/build/pkgs/prompt_toolkit/distros/gentoo.txt b/build/pkgs/prompt_toolkit/distros/gentoo.txt
+new file mode 100644
+index 00000000..6902484
+--- /dev/null
++++ b/build/pkgs/prompt_toolkit/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/prompt_toolkit
+-- 
+cgit v1.0-1-gd88e
+
+
+From 16c0b5e767ae4dac4440510b7253e5c8642b7d2c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:10:39 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for prompt_toolkit.
+
+---
+ build/pkgs/prompt_toolkit/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/prompt_toolkit/spkg-configure.m4
+
+diff --git a/build/pkgs/prompt_toolkit/spkg-configure.m4 b/build/pkgs/prompt_toolkit/spkg-configure.m4
+new file mode 100644
+index 00000000..fd8c1a6
+--- /dev/null
++++ b/build/pkgs/prompt_toolkit/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([prompt_toolkit], [
++  SAGE_PYTHON_PACKAGE_CHECK([prompt_toolkit])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0cd9283e8bb6c8ae413fc8f715c021f7ec3ca2c8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:12:10 -0500
+Subject: Trac #29665: add Gentoo package information for charset_normalizer.
+
+---
+ build/pkgs/charset_normalizer/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/charset_normalizer/distros/gentoo.txt
+
+diff --git a/build/pkgs/charset_normalizer/distros/gentoo.txt b/build/pkgs/charset_normalizer/distros/gentoo.txt
+new file mode 100644
+index 00000000..eefeb89
+--- /dev/null
++++ b/build/pkgs/charset_normalizer/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/charset_normalizer
+-- 
+cgit v1.0-1-gd88e
+
+
+From a04b01a9ab59097d189edcc5ddcb461faede83b2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:12:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ charset_normalizer.
+
+---
+ build/pkgs/charset_normalizer/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/charset_normalizer/spkg-configure.m4
+
+diff --git a/build/pkgs/charset_normalizer/spkg-configure.m4 b/build/pkgs/charset_normalizer/spkg-configure.m4
+new file mode 100644
+index 00000000..18b18cf
+--- /dev/null
++++ b/build/pkgs/charset_normalizer/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([charset_normalizer], [
++  SAGE_PYTHON_PACKAGE_CHECK([charset_normalizer])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d2ea08138711c53046f977b586f33b09b176b2e3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:13:37 -0500
+Subject: Trac #29665: add Gentoo package information for prometheus_client.
+
+---
+ build/pkgs/prometheus_client/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/prometheus_client/distros/gentoo.txt
+
+diff --git a/build/pkgs/prometheus_client/distros/gentoo.txt b/build/pkgs/prometheus_client/distros/gentoo.txt
+new file mode 100644
+index 00000000..aa2889c
+--- /dev/null
++++ b/build/pkgs/prometheus_client/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/prometheus_client
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b0393200e9edd3e26b8a55ba67e5710e7403fcb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:15:09 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for prometheus_client.
+
+---
+ build/pkgs/prometheus_client/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/prometheus_client/spkg-configure.m4
+
+diff --git a/build/pkgs/prometheus_client/spkg-configure.m4 b/build/pkgs/prometheus_client/spkg-configure.m4
+new file mode 100644
+index 00000000..b494588
+--- /dev/null
++++ b/build/pkgs/prometheus_client/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([prometheus_client], [
++  SAGE_PYTHON_PACKAGE_CHECK([prometheus_client])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From cdcd85284f43ca4ad18353ec3527b2901e57b788 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:17:23 -0500
+Subject: Trac #29665: add Gentoo package information for pybind11.
+
+---
+ build/pkgs/pybind11/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pybind11/distros/gentoo.txt
+
+diff --git a/build/pkgs/pybind11/distros/gentoo.txt b/build/pkgs/pybind11/distros/gentoo.txt
+new file mode 100644
+index 00000000..0c500b3
+--- /dev/null
++++ b/build/pkgs/pybind11/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pybind11
+-- 
+cgit v1.0-1-gd88e
+
+
+From efdd1eb64c4799fe3cdf2221824182941b3fda2d Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:17:51 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pybind11.
+
+---
+ build/pkgs/pybind11/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pybind11/spkg-configure.m4
+
+diff --git a/build/pkgs/pybind11/spkg-configure.m4 b/build/pkgs/pybind11/spkg-configure.m4
+new file mode 100644
+index 00000000..cce1cf5
+--- /dev/null
++++ b/build/pkgs/pybind11/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pybind11], [SAGE_PYTHON_PACKAGE_CHECK([pybind11])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b2128f33b68ea33927284116ea598dd186902400 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:19:23 -0500
+Subject: Trac #29665: add Gentoo package information for pkgconfig.
+
+---
+ build/pkgs/pkgconfig/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pkgconfig/distros/gentoo.txt
+
+diff --git a/build/pkgs/pkgconfig/distros/gentoo.txt b/build/pkgs/pkgconfig/distros/gentoo.txt
+new file mode 100644
+index 00000000..32e8618
+--- /dev/null
++++ b/build/pkgs/pkgconfig/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pkgconfig
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b373b49e06aadeb36dc57e500da9a322460e658 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:19:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pkgconfig.
+
+---
+ build/pkgs/pkgconfig/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pkgconfig/spkg-configure.m4
+
+diff --git a/build/pkgs/pkgconfig/spkg-configure.m4 b/build/pkgs/pkgconfig/spkg-configure.m4
+new file mode 100644
+index 00000000..6708293
+--- /dev/null
++++ b/build/pkgs/pkgconfig/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pkgconfig], [SAGE_PYTHON_PACKAGE_CHECK([pkgconfig])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ce578729eb0d14baab365351ba9a9ffffb7b79f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:21:10 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_serializinghtml.
+
+---
+ build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt b/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+new file mode 100644
+index 00000000..38bca8f
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-serializinghtml
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb0f42c32bbce0e4488678312f5e2d88c6f42c9b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:21:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_serializinghtml.
+
+---
+ build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4 b/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+new file mode 100644
+index 00000000..be8e625
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_serializinghtml], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_serializinghtml])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e47dcf985e40475de85c9436a85537751318bc3d Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:22:54 -0500
+Subject: Trac #29665: add Gentoo package information for sphinxcontrib_jsmath.
+
+---
+ build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt b/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+new file mode 100644
+index 00000000..041a471
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-jsmath
+-- 
+cgit v1.0-1-gd88e
+
+
+From 72cff6fd35f93de4fa855bc870569dd733ff5c24 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:23:49 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_jsmath.
+
+---
+ build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4 b/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+new file mode 100644
+index 00000000..e46bde2
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_jsmath], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_jsmath])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a36395d70f759449cd63c1b0990fbdcb4cb25ca0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:24:26 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_devhelp.
+
+---
+ build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..9b5c899
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-devhelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9953a5dd1646ed0ad51d2e3935cf609bc9e7fd1c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:25:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_devhelp.
+
+---
+ build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+new file mode 100644
+index 00000000..8728136
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_devhelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_devhelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b199d5363aad93f3cb23f7904c9553a28b06348f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:25:53 -0500
+Subject: Trac #29665: add Gentoo package information for sphinxcontrib_qthelp.
+
+---
+ build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..7210099
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-qthelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 94ac8806739f3938e73f5857328e91e0d42e98d2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:26:28 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_qthelp.
+
+---
+ build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+new file mode 100644
+index 00000000..81ea5e1
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_qthelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_qthelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From beedc154aa405e8a58aee8889f510db07adc89a7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:26:54 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_applehelp.
+
+---
+ build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..66ac8da
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-applehelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 07d47c3673d6b35423b71f621cb400989c0101c2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:27:19 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_applehelp.
+
+---
+ build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+new file mode 100644
+index 00000000..e834aed
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_applehelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_applehelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 333a66546c5d421735c49dbafd7370a827f22781 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:27:46 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_htmlhelp.
+
+---
+ build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..e080bac
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-htmlhelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From bfaeb3962254439b63f1f2e0e883de462c7831be Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:29:18 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_htmlhelp.
+
+---
+ build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+new file mode 100644
+index 00000000..c77b003
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_htmlhelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_htmlhelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 782cde13da06e8b85806cb7cbc8aceee0364e639 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:30:23 -0500
+Subject: Trac #29665: add Gentoo package information for jupyterlab_pygments.
+
+---
+ build/pkgs/jupyterlab_pygments/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyterlab_pygments/distros/gentoo.txt b/build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+new file mode 100644
+index 00000000..c57b4f1
+--- /dev/null
++++ b/build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyterlab_pygments
+-- 
+cgit v1.0-1-gd88e
+
+
+From 39f974cfa4a8c6e5dd897f152f83ec82f40ee9f7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:31:13 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ jupyterlab_pygments.
+
+---
+ build/pkgs/jupyterlab_pygments/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyterlab_pygments/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyterlab_pygments/spkg-configure.m4 b/build/pkgs/jupyterlab_pygments/spkg-configure.m4
+new file mode 100644
+index 00000000..e46e21f
+--- /dev/null
++++ b/build/pkgs/jupyterlab_pygments/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyterlab_pygments], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyterlab_pygments])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From db704620700fd36cec3bf6125938f3ee00a9eb5e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:29:15 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for ply.
+
+---
+ build/pkgs/ply/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ply/spkg-configure.m4
+
+diff --git a/build/pkgs/ply/spkg-configure.m4 b/build/pkgs/ply/spkg-configure.m4
+new file mode 100644
+index 00000000..ffb0030
+--- /dev/null
++++ b/build/pkgs/ply/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ply], [SAGE_PYTHON_PACKAGE_CHECK([ply])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6aac31dabcdfdef228d7780398a3fda1a4cc566f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:29:51 -0500
+Subject: Trac #29665: add Gentoo package information for ply.
+
+---
+ build/pkgs/ply/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ply/distros/gentoo.txt
+
+diff --git a/build/pkgs/ply/distros/gentoo.txt b/build/pkgs/ply/distros/gentoo.txt
+new file mode 100644
+index 00000000..c8b1630
+--- /dev/null
++++ b/build/pkgs/ply/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ply
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb8d3372936ec37470d69687a0f91592129460ae Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:30:33 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for gast.
+
+---
+ build/pkgs/gast/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/gast/spkg-configure.m4
+
+diff --git a/build/pkgs/gast/spkg-configure.m4 b/build/pkgs/gast/spkg-configure.m4
+new file mode 100644
+index 00000000..26ec59f
+--- /dev/null
++++ b/build/pkgs/gast/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([gast], [SAGE_PYTHON_PACKAGE_CHECK([gast])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1cdc4046a88f1c2b4e5c162f66c6db6090b24194 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:31:15 -0500
+Subject: Trac #29665: add Gentoo package information for gast.
+
+---
+ build/pkgs/gast/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/gast/distros/gentoo.txt
+
+diff --git a/build/pkgs/gast/distros/gentoo.txt b/build/pkgs/gast/distros/gentoo.txt
+new file mode 100644
+index 00000000..3be5e7e
+--- /dev/null
++++ b/build/pkgs/gast/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/gast
+-- 
+cgit v1.0-1-gd88e
+
+
+From 96068b8a3742b65d619190e1d9fa5db399e6b4f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:32:20 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pythran.
+
+---
+ build/pkgs/pythran/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pythran/spkg-configure.m4
+
+diff --git a/build/pkgs/pythran/spkg-configure.m4 b/build/pkgs/pythran/spkg-configure.m4
+new file mode 100644
+index 00000000..592e95b
+--- /dev/null
++++ b/build/pkgs/pythran/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pythran], [SAGE_PYTHON_PACKAGE_CHECK([pythran])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1fa0fad3ae8f7e559c6fc315c6773a7d8aac0bfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:32:55 -0500
+Subject: Trac #29665: add Gentoo package information for pythran.
+
+---
+ build/pkgs/pythran/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pythran/distros/gentoo.txt
+
+diff --git a/build/pkgs/pythran/distros/gentoo.txt b/build/pkgs/pythran/distros/gentoo.txt
+new file mode 100644
+index 00000000..1bb7cdc
+--- /dev/null
++++ b/build/pkgs/pythran/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pythran
+-- 
+cgit v1.0-1-gd88e
+
+
+From d26370e5b8c88e76abfb7c27e3defb71c9e9f711 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:33:50 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for beniget.
+
+---
+ build/pkgs/beniget/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/beniget/spkg-configure.m4
+
+diff --git a/build/pkgs/beniget/spkg-configure.m4 b/build/pkgs/beniget/spkg-configure.m4
+new file mode 100644
+index 00000000..8ae6101
+--- /dev/null
++++ b/build/pkgs/beniget/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([beniget], [SAGE_PYTHON_PACKAGE_CHECK([beniget])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From eeeb296ed9b9694a865534103fd58e62a151ef5e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:34:22 -0500
+Subject: Trac #29665: add Gentoo package information for beniget.
+
+---
+ build/pkgs/beniget/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/beniget/distros/gentoo.txt
+
+diff --git a/build/pkgs/beniget/distros/gentoo.txt b/build/pkgs/beniget/distros/gentoo.txt
+new file mode 100644
+index 00000000..1a5972c
+--- /dev/null
++++ b/build/pkgs/beniget/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/beniget
+-- 
+cgit v1.0-1-gd88e
+
+
+From 078b2ff272d0eeff5cce40ad7eb176d9ddd7bdff Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:35:37 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for alabaster.
+
+---
+ build/pkgs/alabaster/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/alabaster/spkg-configure.m4
+
+diff --git a/build/pkgs/alabaster/spkg-configure.m4 b/build/pkgs/alabaster/spkg-configure.m4
+new file mode 100644
+index 00000000..4eca6e0
+--- /dev/null
++++ b/build/pkgs/alabaster/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([alabaster], [SAGE_PYTHON_PACKAGE_CHECK([alabaster])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7dc264353e5f64110431ff28c1b8b7e89699e9bd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:36:06 -0500
+Subject: Trac #29665: add Gentoo package information for alabaster.
+
+---
+ build/pkgs/alabaster/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/alabaster/distros/gentoo.txt
+
+diff --git a/build/pkgs/alabaster/distros/gentoo.txt b/build/pkgs/alabaster/distros/gentoo.txt
+new file mode 100644
+index 00000000..cffece6
+--- /dev/null
++++ b/build/pkgs/alabaster/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/alabaster
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8011a5e675e7e61a77ce34a299ee961a9f44253f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:43:59 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ importlib_metadata.
+
+---
+ build/pkgs/importlib_metadata/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/importlib_metadata/spkg-configure.m4
+
+diff --git a/build/pkgs/importlib_metadata/spkg-configure.m4 b/build/pkgs/importlib_metadata/spkg-configure.m4
+new file mode 100644
+index 00000000..0554e52
+--- /dev/null
++++ b/build/pkgs/importlib_metadata/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([importlib_metadata], [
++  SAGE_PYTHON_PACKAGE_CHECK([importlib_metadata])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 928ca0019e3ec6c4541a16b28bcc6710df6d010b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:44:28 -0500
+Subject: Trac #29665: add Gentoo package information for importlib_metadata.
+
+---
+ build/pkgs/importlib_metadata/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/importlib_metadata/distros/gentoo.txt
+
+diff --git a/build/pkgs/importlib_metadata/distros/gentoo.txt b/build/pkgs/importlib_metadata/distros/gentoo.txt
+new file mode 100644
+index 00000000..4f92786
+--- /dev/null
++++ b/build/pkgs/importlib_metadata/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/importlib_metadata
+-- 
+cgit v1.0-1-gd88e
+
+
+From 135f184f7498a2046065e669723e68efe2d65cee Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 21:16:58 -0500
+Subject: Trac #29665: fix sage.misc.package doctest with system alabaster.
+
+When alabaster from the system is used, these tests won't be able to
+find its SPKG installed. Add some ellipses, and switch one test to
+look for sage_conf instead.
+---
+ src/sage/misc/package.py | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/sage/misc/package.py b/src/sage/misc/package.py
+index 84f3d50..c7ad206 100644
+--- a/src/sage/misc/package.py
++++ b/src/sage/misc/package.py
+@@ -386,9 +386,9 @@ def installed_packages(exclude_pip=True):
+     EXAMPLES::
+ 
+         sage: sorted(installed_packages().keys())  # optional - build
+-        [...'alabaster', ...'sage_conf', ...]
+-        sage: installed_packages()['alabaster']  # optional - build, random
+-        '0.7.12'
++        [...'sage_conf', ...]
++        sage: installed_packages()['sage_conf']  # optional - build, random
++        '9.5'
+ 
+     .. SEEALSO::
+ 
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch b/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
new file mode 100644
index 000000000000..7ef3826aa4d2
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
@@ -0,0 +1,27 @@
+diff --git a/src/bin/sage-runtests b/src/bin/sage-runtests
+index 589dc8cd37..6bb8bf99a4 100755
+--- a/src/bin/sage-runtests
++++ b/src/bin/sage-runtests
+@@ -154,21 +154,4 @@ if __name__ == "__main__":
+     DC = DocTestController(args, args.filenames)
+     err = DC.run()
+ 
+-    try:
+-        exit_code_pytest = 0
+-        import pytest
+-        pytest_options = ["--import-mode", "importlib"]
+-        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.")
+-
+-    if err == 0:
+-        sys.exit(exit_code_pytest)
+-    else:
+-        sys.exit(err)
++    sys.exit(err)
diff --git a/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch b/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
new file mode 100644
index 000000000000..093e3d56eb33
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
@@ -0,0 +1,42 @@
+More site packages not included in trac 29665
+
+diff --git a/build/pkgs/gmpy2/spkg-configure.m4 b/build/pkgs/gmpy2/spkg-configure.m4
+new file mode 100644
+index 0000000000..2d0390f7db
+--- /dev/null
++++ b/build/pkgs/gmpy2/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([gmpy2], [SAGE_PYTHON_PACKAGE_CHECK([gmpy2])])
+diff --git a/build/pkgs/sphinx/spkg-configure.m4 b/build/pkgs/sphinx/spkg-configure.m4
+new file mode 100644
+index 0000000000..e149fbb2cf
+--- /dev/null
++++ b/build/pkgs/sphinx/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([sphinx], [SAGE_PYTHON_PACKAGE_CHECK([sphinx])])
+diff --git a/build/pkgs/typing_extensions/spkg-configure.m4 b/build/pkgs/typing_extensions/spkg-configure.m4
+new file mode 100644
+index 0000000000..d475fd8257
+--- /dev/null
++++ b/build/pkgs/typing_extensions/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([typing_extensions], [SAGE_PYTHON_PACKAGE_CHECK([typing_extensions])])
+-- 
+diff --git a/build/pkgs/gmpy2/install-requires.txt b/build/pkgs/gmpy2/install-requires.txt
+index 51d24518ef..c25feff557 100644
+--- a/build/pkgs/gmpy2/install-requires.txt
++++ b/build/pkgs/gmpy2/install-requires.txt
+@@ -1,3 +1 @@
+-# We would like to write gmpy2 >=2.1.0b5, but pipenv does not accept prereleases in version ranges
+-# https://github.com/pypa/pipenv/issues/1760
+-gmpy2 ==2.1.0rc1
++gmpy2 >=2.1
+diff --git a/build/pkgs/ptyprocess/install-requires.txt b/build/pkgs/ptyprocess/install-requires.txt
+index de89260872..7c336f636c 100644
+--- a/build/pkgs/ptyprocess/install-requires.txt
++++ b/build/pkgs/ptyprocess/install-requires.txt
+@@ -1,3 +1,3 @@
+-ptyprocess ==0.5.1
++ptyprocess
+ # https://trac.sagemath.org/ticket/31280#comment:42 and following
+ # sagelib is not compatible with ptyprocess 0.5.2, 0.6, and 0.7
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 33b40acbabeb..a32c5d18f378 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -22,11 +22,13 @@ distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
 checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
 python_version=3
 
-build_options="debug system_python3"
+build_options="debug system_python3 system_site_packages"
 desc_option_debug="Build with debug symbols"
 desc_option_system_python="Build using system python 3"
-build_options_default="system_python3"
+desc_option_system_python="Build using system python site-packages"
+build_options_default="system_python3 system_site_packages"
 configure_args+=" $(vopt_with system_python3)"
+configure_args+=" $(vopt_enable system_site_packages)"
 
 # path where sage will be installed
 _SAGE_ROOT=/usr/lib/sage-${version}
@@ -163,6 +165,8 @@ do_check() {
 	fi
 	if [ "$XBPS_CHECK_PKGS" = full ]; then
 		_test_args="--long $_test_args"
+	else
+		_test_args="--warn-long 5.0 $_test_args"
 	fi
 	# since make check will build the docs, run test like this instead
 	./sage -tp ${XBPS_MAKEJOBS} ${_test_args}
@@ -182,7 +186,7 @@ makedepends+=" automake gettext gettext-devel"
 # other host dependencies
 makedepends+=" cmake curl git ninja pandoc patch pkg-config python3 tox"
 
-# already in void
+# standard dependencies
 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
@@ -202,7 +206,49 @@ makedepends+="
  brial-devel cliquer-devel gfan libbraiding-devel libhomfly-devel
  lrcalc-devel nauty-devel palp tachyon
  maxima-ecl primesieve-devel primecount-devel
+ ffmpeg ImageMagick
 "
 
 # TODO: optional
 # 4ti2 coxeter3 libsemigroups lrslib pdf2svg perl_mongodb polymake
+
+# TODO: standard
+# cvxopt importlib_resources
+
+# python packages for trac-29665
+_sage_python3_modules="
+ python3-Babel python3-Jinja2 python3-MarkupSafe python3-Pillow
+ python3-Pygments python3-Sphinx python3-alabaster python3-argcomplete
+ python3-argon2 python3-attrs python3-backcall python3-beniget
+ python3-bleach python3-certifi python3-cffi python3-charset-normalizer
+ python3-cycler python3-dateutil python3-decorator python3-defusedxml
+ python3-docutils python3-entrypoints python3-flit_core python3-gast
+ python3-gmpy2 python3-html5lib python3-idna python3-imagesize
+ python3-importlib_metadata python3-ipython python3-ipython_genutils
+ python3-ipython_ipykernel python3-jedi python3-jsonschema
+ python3-jupyter_client python3-jupyter_core python3-jupyter_ipywidgets
+ python3-jupyter_nbconvert python3-jupyter_nbformat
+ python3-jupyter_notebook python3-jupyterlab_pygments python3-kiwisolver
+ python3-matplotlib python3-matplotlib-inline python3-mistune
+ python3-mpmath python3-nbclient python3-nest_asyncio python3-networkx
+ python3-numpy python3-packaging python3-pandocfilters python3-parsing
+ python3-parso python3-pexpect python3-pickleshare python3-pip
+ python3-pkgconfig python3-pluggy python3-ply python3-prometheus_client
+ python3-prompt_toolkit python3-ptyprocess python3-py python3-pybind11
+ python3-pycparser python3-pyrsistent python3-pytz python3-pyzmq
+ python3-requests python3-scipy python3-send2trash python3-setuptools
+ python3-setuptools_scm python3-simplegeneric python3-six
+ python3-snowballstemmer python3-sphinxcontrib-applehelp
+ python3-sphinxcontrib-devhelp python3-sphinxcontrib-htmlhelp
+ python3-sphinxcontrib-jsmath python3-sphinxcontrib-qthelp
+ python3-sphinxcontrib-serializinghtml python3-sympy python3-terminado
+ python3-testpath python3-texttable python3-toml python3-tomli
+ python3-tornado python3-traitlets python3-typing_extensions
+ python3-tzlocal python3-urllib3 python3-wcwidth python3-webencodings
+ python3-wheel python3-zipp pythran
+ "
+
+if [ "$build_option_system_site_packages" ]; then
+	makedepends+=" $_sage_python3_modules"
+	depends+=" $_sage_python3_modules"
+fi

From 899e40ad0d7939e6484df92080922a0723a28ca9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 3 Jan 2022 20:47:52 -0300
Subject: [PATCH 24/48] sagemath: use small source tarball + upstream packages

---
 srcpkgs/sagemath/template | 97 ++++++++++++++++++++++++++-------------
 1 file changed, 64 insertions(+), 33 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index a32c5d18f378..0de0061b09df 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -18,8 +18,8 @@ short_desc="Open source mathematics software"
 maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
-distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
-checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
+distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
+checksum=aea4c5a8d3b32af2fba644269b9daf4f62471471ba2d7d83da0f8098a5f53225
 python_version=3
 
 build_options="debug system_python3 system_site_packages"
@@ -33,42 +33,72 @@ configure_args+=" $(vopt_enable system_site_packages)"
 # 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} ;;
-esac
+_SAGE_UPSTREAM_MIRROR=https://mirrors.mit.edu/sage/spkg/upstream
 
-# extra upstream packages (trac-32968 / trac-33040)
 _upstream="
- https://pypi.io/packages/source/s/sphinx/Sphinx-4.3.1.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
+${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
+${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
+${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
+${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
+${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
+${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
+${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
+https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
+https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
+http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
+${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
+${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
+${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
+${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
+${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
+https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
+${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
+https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
+${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
 "
 
 checksum+="
- 32a5b3e9a1b176cc25ed048557d4d3d01af635e6b76c5bc7a43b0a34447fbd45
-
- 9c87405839a19696e837b3b818fed3f5f69f16f1eec1a1ad77e043dcea9c772f
- fc4453705b81d03568d5b808ad8f09c77c47534f6ac2e72e733f9ca4714aa75c
- acad2d8b20a1af07d4e4c9d2e9285c5ed9104354062f275f3fcd88dcef4f1326
- 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
- 78884e7c1d4b00ce3cea67b44566851c4343c120abd683433ce934a68ea58872
- 0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86
- b8e2f83c56e141920c39464b852de3719dfbfb6e3c99a2d8da0edf4fb33176ed
- d9bdec0013ef1eb5a84ab39a3b3868911598afa494f5faa038647101504e2b81
- b2e9810e09c3a47b73ce9cab5a72243a1258f61e7900969097a817232246ce1c
- 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
- 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
+c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
+d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
+4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
+3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
+03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
+5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
+cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
+5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
+581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
+6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
+07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
+a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
+ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
+d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
+169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
+5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
+cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
+471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
+78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
+edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
+b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
+3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
+545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
+cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
+718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
+dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
 "
 
 for u in ${_upstream}; do
@@ -101,6 +131,7 @@ post_extract() {
 	mv -T $wrksrc $_SAGE_ROOT
 	ln -srfT $_SAGE_ROOT $wrksrc
 
+	mkdir -p $wrksrc/upstream
 	for u in ${_upstream}; do
 		cp "$XBPS_SRCDISTDIR/${pkgname}-${version}/${u##*[/>]}" $wrksrc/upstream
 	done

From e11081a34f37e456ad308a05b3da376070de8b16 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 13:38:02 -0300
Subject: [PATCH 25/48] sagemath: for CI use fixed random-seed=0

---
 srcpkgs/sagemath/template | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 0de0061b09df..b5b99d2c122d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -194,6 +194,10 @@ do_check() {
 	if [ -z "$_test_args" ]; then
 		_test_args=--all
 	fi
+	if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
+		# for CI use a predictable random seed
+		_test_args="--random-seed=0 $_test_args"
+	fi
 	if [ "$XBPS_CHECK_PKGS" = full ]; then
 		_test_args="--long $_test_args"
 	else

From 6b1a8633a396d7bef03753d3d232095a62e2982b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 14:40:27 -0300
Subject: [PATCH 26/48] sagemath: upstream two patches

---
 ...ble-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch} |  6 +++---
 ...rse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch} | 10 +++++-----
 2 files changed, 8 insertions(+), 8 deletions(-)
 rename srcpkgs/sagemath/patches/{0001-sage-site-exec-only-if-it-is-executable.patch => trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch} (94%)
 rename srcpkgs/sagemath/patches/{0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch => trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch} (81%)

diff --git a/srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch b/srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
similarity index 94%
rename from srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch
rename to srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
index ce17c6d6e954..7fdb3d697222 100644
--- a/srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch
+++ b/srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
@@ -1,14 +1,14 @@
 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
+Subject: 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
+index 4c0fa17..153e610 100755
 --- a/src/bin/sage
 +++ b/src/bin/sage
 @@ -129,7 +129,7 @@ usage() {
@@ -39,5 +39,5 @@ index 4c0fa17426..153e610a2e 100755
              # fallthrough if there is no sage-site script
          fi
 -- 
-2.34.1
+cgit v1.0-1-gd88e
 
diff --git a/srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch b/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
similarity index 81%
rename from srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch
rename to srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
index bab6d8441d42..350c41ac3928 100644
--- a/srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch
+++ b/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
@@ -1,16 +1,16 @@
-From 57e3eba28c9b4ee6bd3407d0715b8bd00aaf04a7 Mon Sep 17 00:00:00 2001
+From 53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6 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
+Subject: sagetex: Fix a warning when byte-compiling sagetexparse.py
 
 ---
- .../sagetex/patches/sagetex-fix-warning.patch    | 16 ++++++++++++++++
+ build/pkgs/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
+index 00000000..d82ab67
 --- /dev/null
 +++ b/build/pkgs/sagetex/patches/sagetex-fix-warning.patch
 @@ -0,0 +1,16 @@
@@ -31,5 +31,5 @@ index 0000000000..d82ab675dd
 +     self.result += t.code[1:-1] + '\n\n'
 + 
 -- 
-2.34.1
+cgit v1.0-1-gd88e
 

From 2ec6f6de7f6023b10b180a06c572895fd63b3d4c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 19:57:59 -0300
Subject: [PATCH 27/48] sagemath: reorder upstream sources and add two missing
 ones

---
 srcpkgs/sagemath/template | 60 ++++++++++++++++++++++-----------------
 1 file changed, 34 insertions(+), 26 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index b5b99d2c122d..f53cba947c88 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -36,69 +36,77 @@ _SAGE_ROOT=/usr/lib/sage-${version}
 _SAGE_UPSTREAM_MIRROR=https://mirrors.mit.edu/sage/spkg/upstream
 
 _upstream="
-${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
 ${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
 ${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
+
+${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
 ${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
 ${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
 ${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
 ${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
 ${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
 ${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
-https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
-https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
-http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
 ${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
 ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
 ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
 ${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
 ${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${PYPI_SITE}/P/PyCygwin/PyCygwin-0.1.tar.gz
 ${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
-https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+${PYPI_SITE}/s/setuptools/setuptools-59.2.0.tar.gz
 ${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
 ${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
-https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
 ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
+
+https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
+https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
+http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
+https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
 "
 
 checksum+="
-dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
 c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
 d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
+5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
+ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
+169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
+cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
+edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
+cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
+
+dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
 3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
 03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
 5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
 cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
-5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
-c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
-6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
-07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
 a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
-ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
 d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
-169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
 5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
-cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
 471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
 78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
-edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+45a5e295590c469a49b2804bfdb89059e942d768ad3b813f484d7b5bff48d226
 ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
-b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
-3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+157d21de9d055ab9e8ea3186d91e7f4f865e11f42deafa952d90842671fc2576
 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
 545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
-cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
-718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
 dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
+
+c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
+6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
+07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
+3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
 "
 
 for u in ${_upstream}; do

From 3b6948e38352c4cd05ac958e2badd56a36d46b7f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 9 Jan 2022 12:45:47 -0300
Subject: [PATCH 28/48] sagemath: do not download anything patch

---
 .../patches/00-Do_not_download_anything.patch         | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 srcpkgs/sagemath/patches/00-Do_not_download_anything.patch

diff --git a/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch b/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch
new file mode 100644
index 000000000000..35aef7b8d456
--- /dev/null
+++ b/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch
@@ -0,0 +1,11 @@
+--- a/build/sage_bootstrap/tarball.py	2022-01-07 19:17:06.754747955 -0300
++++ b/build/sage_bootstrap/tarball.py	2022-01-07 19:25:31.844139381 -0300
+@@ -158,6 +158,8 @@
+                             .format(destination=destination))
+         successful_download = False
+         log.info('Attempting to download package {0} from mirrors'.format(self.filename))
++        log.info('ERROR: downloading is disabled, add file to template instead')
++        return
+         for mirror in MirrorList():
+             url = mirror + '/'.join(['spkg', 'upstream', self.package.name, self.filename])
+             log.info(url)

From 36abe91e9fb0dcf744995c499bde0bf40b711c42 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 9 Jan 2022 13:27:49 -0300
Subject: [PATCH 29/48] sagemath: update to 9.5.rc0.

---
 ...184f7498a2046065e669723e68efe2d65cee.patch |    6 +-
 ...1d4ced4264f65ab704f725f6f5879b012796.patch |  263 ----
 ...a54526829b79d5d236a40f83ddc6ce7b2696.patch | 1196 -----------------
 ...9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch |   27 -
 ...3f4f32246ad9ded6d37f1f2f12a589a81f4.patch} |    4 +-
 ...03138d0403be7c7cb303de2bc0a0e0b6793c.patch |   82 --
 ...f3a1611fed0cc66fb838eb85739646dd34d.patch} |   94 +-
 ...49c415e11d0522bff9013bc1509264b26ebf.patch |   27 +
 ...ip_doctest_singular_4.2.1--see_33134.patch |   13 +
 srcpkgs/sagemath/template                     |    6 +-
 10 files changed, 72 insertions(+), 1646 deletions(-)
 delete mode 100644 srcpkgs/sagemath/patches/trac-30766-system_python_3.10-df9f1d4ced4264f65ab704f725f6f5879b012796.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
 rename srcpkgs/sagemath/patches/{trac-33064-sage_docbuild_ignore_cache_save_permission_error-f767cf1eadfd8ab540a31c5c5ef09d56df09b90e.patch => trac-33064-sage_docbuild_ignore_cache_save_permission_error-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch} (92%)
 delete mode 100644 srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
 rename srcpkgs/sagemath/patches/{trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch => trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch} (63%)
 create mode 100644 srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch

diff --git a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
index b641113927e7..0ecb27c593cd 100644
--- a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
+++ b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
@@ -5615,9 +5615,9 @@ index 84f3d50..c7ad206 100644
      EXAMPLES::
  
          sage: sorted(installed_packages().keys())  # optional - build
--        [...'alabaster', ...'sage_conf', ...]
--        sage: installed_packages()['alabaster']  # optional - build, random
--        '0.7.12'
+-        [...'gmpy2', ...'sage_conf', ...]
+-        sage: installed_packages()['gmpy2']  # optional - build, random
+-        '2.1.0b5'
 +        [...'sage_conf', ...]
 +        sage: installed_packages()['sage_conf']  # optional - build, random
 +        '9.5'
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
deleted file mode 100644
index a1cb4c834482..000000000000
--- a/srcpkgs/sagemath/patches/trac-30766-system_python_3.10-df9f1d4ced4264f65ab704f725f6f5879b012796.patch
+++ /dev/null
@@ -1,263 +0,0 @@
-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-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch b/srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
deleted file mode 100644
index 3ae6fe01822d..000000000000
--- a/srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
+++ /dev/null
@@ -1,1196 +0,0 @@
-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/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch b/srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
deleted file mode 100644
index 485fb0176f45..000000000000
--- a/srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-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: 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 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"
- 
- # 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)
--- 
-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-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
similarity index 92%
rename from srcpkgs/sagemath/patches/trac-33064-sage_docbuild_ignore_cache_save_permission_error-f767cf1eadfd8ab540a31c5c5ef09d56df09b90e.patch
rename to srcpkgs/sagemath/patches/trac-33064-sage_docbuild_ignore_cache_save_permission_error-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
index 20fa12e570eb..04f04cfd6718 100644
--- 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-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
@@ -1,4 +1,4 @@
-From f767cf1eadfd8ab540a31c5c5ef09d56df09b90e Mon Sep 17 00:00:00 2001
+From e89193f4f32246ad9ded6d37f1f2f12a589a81f4 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
@@ -8,7 +8,7 @@ Subject: sage_docbuild: do not fail when cache cannot be saved
  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
+index 466ca82..f8c8ebd 100644
 --- a/src/sage_docbuild/__init__.py
 +++ b/src/sage_docbuild/__init__.py
 @@ -856,9 +856,12 @@ class ReferenceSubBuilder(DocBuilder):
diff --git a/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch b/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
deleted file mode 100644
index 6bc5193b75ee..000000000000
--- a/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-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
-
-
-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/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch b/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
similarity index 63%
rename from srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch
rename to srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
index 3794aa7f019b..04fca4815a00 100644
--- a/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch
+++ b/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
@@ -1,4 +1,4 @@
-From 7d3381b21e4716cfa8a33915621a12f0eba74233 Mon Sep 17 00:00:00 2001
+From 18d0477153af6f453a0e84f78030535f6a36ce87 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
@@ -10,56 +10,56 @@ Subject: doctests: remove dochtml label from some tests that don't need docs
  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
+index c788623..527ed90 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  # optional - sagemath_doc_html
+-        sage: thematic_index = os.path.join(SAGE_DOC, "html", "en", "thematic_tutorials", "index.html")  # optional - sagemath_doc_html
 +        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
+         sage: for line in open(thematic_index).readlines():  # optional - sagemath_doc_html
          ....:     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
+index 4c56aea..583ca06 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  # optional - sagemath_doc_html
+-    sage: docfilename = os.path.join(SAGE_DOC, 'html', 'en', 'reference', 'calculus', 'sage', 'symbolic', 'expression.html')  # optional - sagemath_doc_html
 +    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
+     sage: with open(docfilename) as fobj:  # optional - sagemath_doc_html
      ....:     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='',
+@@ -845,12 +845,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  # optional - sagemath_doc_html
+-        sage: len(_search_src_or_doc('src', r'matrix\(', 'incidence_structures', 'self', 'combinat', interact=False).splitlines()) > 1  # optional - sagemath_doc_html
 +        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)
+         sage: 'abvar/homology' in _search_src_or_doc('doc', 'homology', 'variety', interact=False)  # optional - sagemath_doc_html, 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)  # optional - sagemath_doc_html
 +        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:
+@@ -1369,7 +1369,7 @@ class _sage_doc:
  
-         sage: browse_sage_doc._open("reference", testing=True)[0]  # optional - dochtml, indirect doctest
+         sage: browse_sage_doc._open("reference", testing=True)[0]  # optional - sagemath_doc_html, 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]  # optional - sagemath_doc_html
 +        sage: browse_sage_doc(identity_matrix, 'rst')[-107:-47]
          'Full MatrixSpace of 3 by 3 sparse matrices over Integer Ring'
      """
@@ -68,7 +68,7 @@ index eb70516..b4848ed 100644
 cgit v1.0-1-gd88e
 
 
-From 42a76c3f82edecc9c6c53c661251677e3e907584 Mon Sep 17 00:00:00 2001
+From 88dd9f3a1611fed0cc66fb838eb85739646dd34d 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
@@ -78,7 +78,7 @@ Subject: doctests: add dochtml label to some tests that need docs installed
  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
+index f8c8ebd..d329009 100644
 --- a/src/sage_docbuild/__init__.py
 +++ b/src/sage_docbuild/__init__.py
 @@ -105,7 +105,7 @@ def builder_helper(type):
@@ -86,7 +86,7 @@ index 4a71c91..dd233bd 100644
          sage: from sage_docbuild import _build_many as build_many
          sage: helper = builder_helper("html")
 -        sage: try:
-+        sage: try:  # optional - dochtml
++        sage: try:  # optional - sagemath_doc_html
          ....:     build_many(build_ref_doc, [("docname", "en", "html", {})])
          ....: except Exception as E:
          ....:     "Non-exception during docbuild: abort pool operation" in str(E)
@@ -95,7 +95,7 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import DocBuilder
              sage: b = DocBuilder('tutorial')
 -            sage: b._output_dir('html')
-+            sage: b._output_dir('html')         # optional - dochtml
++            sage: b._output_dir('html')         # optional - sagemath_doc_html
              '.../html/en/tutorial'
          """
          d = os.path.join(SAGE_DOC, type, self.lang, self.name)
@@ -104,7 +104,7 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import DocBuilder
              sage: b = DocBuilder('tutorial')
 -            sage: b._doctrees_dir()
-+            sage: b._doctrees_dir()             # optional - docthml
++            sage: b._doctrees_dir()             # optional - sagemath_doc_html
              '.../doctrees/en/tutorial'
          """
          d = os.path.join(SAGE_DOC, 'doctrees', self.lang, self.name)
@@ -113,7 +113,7 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import ReferenceBuilder
              sage: b = ReferenceBuilder('reference')
 -            sage: b._output_dir('html')
-+            sage: b._output_dir('html')         # optional - dochtml
++            sage: b._output_dir('html')         # optional - sagemath_doc_html
              '.../html/en/reference'
          """
          if lang is None:
@@ -122,56 +122,10 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import ReferenceTopBuilder
              sage: b = ReferenceTopBuilder('reference')
 -            sage: b._output_dir('html')
-+            sage: b._output_dir('html')         # optional - dochtml
++            sage: b._output_dir('html')         # optional - sagemath_doc_html
              '.../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/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch b/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
new file mode 100644
index 000000000000..d32f1e4d5e9f
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
@@ -0,0 +1,27 @@
+From 836249c415e11d0522bff9013bc1509264b26ebf Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Sun, 9 Jan 2022 16:51:22 -0300
+Subject: trac 33135: add filter to ignore deprecation warnings
+
+---
+ src/sage/all.py | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/sage/all.py b/src/sage/all.py
+index 01ef327..19ca3d4 100644
+--- a/src/sage/all.py
++++ b/src/sage/all.py
+@@ -96,6 +96,10 @@ warnings.filterwarnings('ignore', category=DeprecationWarning,
+ warnings.filterwarnings('ignore', category=DeprecationWarning,
+                         module='pythran')
+ 
++warnings.filterwarnings('ignore', category=DeprecationWarning,
++                        message='The distutils(.sysconfig module| package) is deprecated',
++                        module='numpy|sage.env|sage.features')
++
+ ################ end setup warnings ###############################
+ 
+ 
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
new file mode 100644
index 000000000000..438078a92036
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage/rings/polynomial/hilbert.pyx b/src/sage/rings/polynomial/hilbert.pyx
+index 4cd91d0a46..323b168c4e 100644
+--- a/src/sage/rings/polynomial/hilbert.pyx
++++ b/src/sage/rings/polynomial/hilbert.pyx
+@@ -578,7 +578,7 @@ def hilbert_poincare_series(I, grading=None):
+ 
+     This example exceeded the capabilities of Singular before version 4.2.1p2::
+ 
+-        sage: J.hilbert_numerator(algorithm='singular')
++        sage: J.hilbert_numerator(algorithm='singular')   # not tested - requires singular 4.2.1p2
+         120*t^33 - 3465*t^32 + 48180*t^31 - 429374*t^30 + 2753520*t^29 - 13522410*t^28 + 52832780*t^27 - 168384150*t^26 + 445188744*t^25 - 987193350*t^24 + 1847488500*t^23 + 1372406746*t^22 - 403422496*t^21 - 8403314*t^20 - 471656596*t^19 + 1806623746*t^18 + 752776200*t^17 + 752776200*t^16 - 1580830020*t^15 + 1673936550*t^14 - 1294246800*t^13 + 786893250*t^12 - 382391100*t^11 + 146679390*t^10 - 42299400*t^9 + 7837830*t^8 - 172260*t^7 - 468930*t^6 + 183744*t^5 - 39270*t^4 + 5060*t^3 - 330*t^2 + 1
+ 
+     """
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f53cba947c88..f688629fc26d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -1,6 +1,6 @@
 # Template file for 'sagemath'
 pkgname=sagemath
-version=9.5.beta9
+version=9.5.rc0
 revision=1
 wrksrc=sage-$version
 build_style=configure
@@ -19,7 +19,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
-checksum=aea4c5a8d3b32af2fba644269b9daf4f62471471ba2d7d83da0f8098a5f53225
+checksum=8012e3ac35290fa9b2cb837eeca149925784c2378b486731226944e4afd8a4e6
 python_version=3
 
 build_options="debug system_python3 system_site_packages"
@@ -128,7 +128,7 @@ nostrip=yes
 noshlibprovides=yes
 
 # don't rewrite python shebang as sage uses its own python (for now)
-_no_python_shebang=yes
+#_no_python_shebang=yes
 
 # compile python code in sage venv
 pycompile_dirs="$_SAGE_ROOT/venv/"

From 75c7f82e4cdc84d9bafcc64c2cbe5d79be98a2e3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 10 Jan 2022 16:32:54 -0300
Subject: [PATCH 30/48] sagemath: use system gap

---
 ...f491e5ce599ba185f5e93f02e0fcebd76c9e.patch | 57 +++++++++++++++++++
 .../patches/zzz-skip_doctest_system_gap.patch | 13 +++++
 srcpkgs/sagemath/template                     | 15 ++++-
 3 files changed, 82 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch

diff --git a/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch b/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
new file mode 100644
index 000000000000..da88a369db0d
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
@@ -0,0 +1,57 @@
+From 2c981351bb60089530b0598d3e9a909a23d4d4d8 Mon Sep 17 00:00:00 2001
+From: Thierry Thomas <thierry@FreeBSD.org>
+Date: Mon, 22 Mar 2021 03:04:12 +0100
+Subject: 29644: Add spkg-configure.m4 for gap
+
+---
+ build/pkgs/gap/spkg-configure.m4 | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+ create mode 100644 build/pkgs/gap/spkg-configure.m4
+
+diff --git a/build/pkgs/gap/spkg-configure.m4 b/build/pkgs/gap/spkg-configure.m4
+new file mode 100644
+index 00000000..91cd089
+--- /dev/null
++++ b/build/pkgs/gap/spkg-configure.m4
+@@ -0,0 +1,8 @@
++SAGE_SPKG_CONFIGURE([gap], [
++    SAGE_SPKG_DEPCHECK([gmp], [
++       AC_CHECK_HEADER([gap/system.h], [
++        AC_SEARCH_LIBS([GAP_COMM], [gap], [
++        ], [sage_spkg_install_gap=yes])
++       ], [sage_spkg_install_gap=yes])
++    ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2a41f491e5ce599ba185f5e93f02e0fcebd76c9e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Samuel=20Leli=C3=A8vre?= <samuel.lelievre@gmail.com>
+Date: Mon, 22 Mar 2021 03:05:31 +0100
+Subject: 29644: Add distro information for gap
+
+---
+ build/pkgs/gap/distros/fedora.txt | 1 +
+ build/pkgs/gap/distros/gentoo.txt | 1 +
+ 2 files changed, 2 insertions(+)
+ create mode 100644 build/pkgs/gap/distros/fedora.txt
+ create mode 100644 build/pkgs/gap/distros/gentoo.txt
+
+diff --git a/build/pkgs/gap/distros/fedora.txt b/build/pkgs/gap/distros/fedora.txt
+new file mode 100644
+index 00000000..ea4feae
+--- /dev/null
++++ b/build/pkgs/gap/distros/fedora.txt
+@@ -0,0 +1 @@
++gap
+diff --git a/build/pkgs/gap/distros/gentoo.txt b/build/pkgs/gap/distros/gentoo.txt
+new file mode 100644
+index 00000000..ea64ec9
+--- /dev/null
++++ b/build/pkgs/gap/distros/gentoo.txt
+@@ -0,0 +1 @@
++sci-mathematics/gap
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
new file mode 100644
index 000000000000..f132591d48ac
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage_setup/optional_extension.py b/src/sage_setup/optional_extension.py
+index f252849384..4034e3e196 100644
+--- a/src/sage_setup/optional_extension.py
++++ b/src/sage_setup/optional_extension.py
+@@ -80,7 +80,7 @@ def OptionalExtension(*args, **kwds):
+         sage: print(ext.__class__.__name__)
+         CythonizeExtension
+         sage: ext = OptionalExtension("foo", ["foo.c"], package="gap")
+-        sage: print(ext.__class__.__name__)
++        sage: print(ext.__class__.__name__)     # not tested - fails with system gap
+         Extension
+     """
+     try:
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f688629fc26d..02b0af4ad16d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -66,7 +66,6 @@ ${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
 ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
 
 https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
-https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
 http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
 https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
 https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
@@ -103,7 +102,6 @@ ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
 dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
 
 c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
-6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
 07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
 3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
 718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
@@ -159,6 +157,13 @@ pre_configure() {
 	export MAKE="make -j ${XBPS_MAKEJOBS}"
 }
 
+post_configure() {
+	# we set some variables, right after configure has created sage_conf.py
+	cat <<-EOF >> pkgs/sage-conf/sage_conf.py
+	GAP_ROOT_DIR = "/usr/share/gap"
+	EOF
+}
+
 # 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
@@ -248,7 +253,11 @@ makedepends+="
  gengetopt texinfo
  brial-devel cliquer-devel gfan libbraiding-devel libhomfly-devel
  lrcalc-devel nauty-devel palp tachyon
- maxima-ecl primesieve-devel primecount-devel
+ maxima-ecl primesieve-devel primecount-devel gap-devel
+"
+
+# optional dependencies
+makedepends+="
  ffmpeg ImageMagick
 "
 

From e97cfacc19183c4cfc0e6cc8b64e95efdd010292 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Thu, 13 Jan 2022 03:21:19 -0300
Subject: [PATCH 31/48] sagemath: fixes for system gap

---
 .../zzz-fixes_for_system_gap--see_29644.patch | 96 +++++++++++++++++++
 .../patches/zzz-skip_doctest_system_gap.patch | 13 ---
 srcpkgs/sagemath/template                     |  1 +
 3 files changed, 97 insertions(+), 13 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
 delete mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch

diff --git a/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch b/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
new file mode 100644
index 000000000000..741d2b23a7f5
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
@@ -0,0 +1,96 @@
+From 346b4ea4c92f4287d3c097b92817cf2abfcddd8c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Thu, 13 Jan 2022 01:41:31 -0300
+Subject: [PATCH] gap: fixes for using system gap
+
+ - fix _get_shared_lib_path() so we don't need to configure GAP_SO
+ - fix gap_root() so we don't need to configure GAP_ROOT_DIR
+ - skip a useless test that cannot succeed on system gap
+ - use gap_root() in saved_workspace.py instead of GAP_ROOT_DIR
+---
+ src/sage/env.py                      |  2 +-
+ src/sage/libs/gap/saved_workspace.py |  4 ++--
+ src/sage/libs/gap/util.pyx           | 11 +++++++++++
+ src/sage_setup/optional_extension.py |  2 +-
+ 4 files changed, 15 insertions(+), 4 deletions(-)
+
+diff --git a/src/sage/env.py b/src/sage/env.py
+index c4953cfa65..c16696d298 100644
+--- a/src/sage/env.py
++++ b/src/sage/env.py
+@@ -293,7 +293,7 @@ def _get_shared_lib_path(*libnames: str) -> Optional[str]:
+             if sys.platform == 'darwin':
+                 ext = 'dylib'
+             else:
+-                ext = 'so'
++                ext = 'so*'
+ 
+             if SAGE_LOCAL:
+                 search_directories.append(Path(SAGE_LOCAL) / 'lib')
+diff --git a/src/sage/libs/gap/saved_workspace.py b/src/sage/libs/gap/saved_workspace.py
+index ad5adec36d..59c498795f 100644
+--- a/src/sage/libs/gap/saved_workspace.py
++++ b/src/sage/libs/gap/saved_workspace.py
+@@ -8,7 +8,7 @@ workspaces.
+ 
+ import os
+ import glob
+-from sage.env import GAP_ROOT_DIR
++from sage.libs.gap.util import gap_root
+ from sage.interfaces.gap_workspace import gap_workspace_file
+ 
+ 
+@@ -31,7 +31,7 @@ def timestamp():
+     """
+     libgap_dir = os.path.dirname(__file__)
+     libgap_files = glob.glob(os.path.join(libgap_dir, '*'))
+-    gap_packages = glob.glob(os.path.join(GAP_ROOT_DIR, 'pkg', '*'))
++    gap_packages = glob.glob(os.path.join(gap_root(), 'pkg', '*'))
+     files = libgap_files + gap_packages
+     if len(files) == 0:
+         print('Unable to find LibGAP files.')
+diff --git a/src/sage/libs/gap/util.pyx b/src/sage/libs/gap/util.pyx
+index 08c4c40cc0..c7dd557c35 100644
+--- a/src/sage/libs/gap/util.pyx
++++ b/src/sage/libs/gap/util.pyx
+@@ -23,6 +23,7 @@ from cysignals.signals cimport sig_on, sig_off
+ import os
+ import warnings
+ import sage.env
++import subprocess
+ 
+ from .gap_includes cimport *
+ from .element cimport *
+@@ -178,6 +179,16 @@ def gap_root():
+     if os.path.exists(sage.env.GAP_ROOT_DIR):
+         return sage.env.GAP_ROOT_DIR
+ 
++    gap_expr = 'JoinStringsWithSeparator(KERNEL_INFO().GAP_ROOT_PATHS,";")'
++    gap_root_paths = subprocess.getoutput(
++        f"gap -r -q --bare --nointeract -c 'Display({gap_expr});'"
++        ).strip().split(';')
++
++    for gapdir in gap_root_paths:
++        if os.path.exists(os.path.join(gapdir, 'sysinfo.gap')):
++            sage.env.GAP_ROOT_DIR = gapdir
++            return gapdir
++
+     # Attempt to figure out the appropriate GAP_ROOT by reading the
+     # local/bin/gap shell script; this is an ugly hack that exists for
+     # historical reasons; the best approach to setting where Sage looks for
+diff --git a/src/sage_setup/optional_extension.py b/src/sage_setup/optional_extension.py
+index f252849384..4034e3e196 100644
+--- a/src/sage_setup/optional_extension.py
++++ b/src/sage_setup/optional_extension.py
+@@ -80,7 +80,7 @@ def OptionalExtension(*args, **kwds):
+         sage: print(ext.__class__.__name__)
+         CythonizeExtension
+         sage: ext = OptionalExtension("foo", ["foo.c"], package="gap")
+-        sage: print(ext.__class__.__name__)
++        sage: print(ext.__class__.__name__)     # not tested - fails with system gap
+         Extension
+     """
+     try:
+-- 
+2.34.1
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
deleted file mode 100644
index f132591d48ac..000000000000
--- a/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/src/sage_setup/optional_extension.py b/src/sage_setup/optional_extension.py
-index f252849384..4034e3e196 100644
---- a/src/sage_setup/optional_extension.py
-+++ b/src/sage_setup/optional_extension.py
-@@ -80,7 +80,7 @@ def OptionalExtension(*args, **kwds):
-         sage: print(ext.__class__.__name__)
-         CythonizeExtension
-         sage: ext = OptionalExtension("foo", ["foo.c"], package="gap")
--        sage: print(ext.__class__.__name__)
-+        sage: print(ext.__class__.__name__)     # not tested - fails with system gap
-         Extension
-     """
-     try:
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 02b0af4ad16d..0d8ce1f7a70a 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -161,6 +161,7 @@ post_configure() {
 	# we set some variables, right after configure has created sage_conf.py
 	cat <<-EOF >> pkgs/sage-conf/sage_conf.py
 	GAP_ROOT_DIR = "/usr/share/gap"
+	GAP_SO = "$(objdump -p /usr/lib/libgap.so | awk '/SONAME/{print $2}')"
 	EOF
 }
 

From 3a380c61dde77f6a5667d10297b29f2fb8521cac Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Thu, 13 Jan 2022 15:47:33 -0300
Subject: [PATCH 32/48] New package: sagemath-test

---
 srcpkgs/sagemath-test/template                | 32 +++++++++++++++++++
 .../patches/zzz-skip_doctest_shebang.patch    | 11 +++++++
 2 files changed, 43 insertions(+)
 create mode 100644 srcpkgs/sagemath-test/template
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch

diff --git a/srcpkgs/sagemath-test/template b/srcpkgs/sagemath-test/template
new file mode 100644
index 000000000000..3e0b1c3233fd
--- /dev/null
+++ b/srcpkgs/sagemath-test/template
@@ -0,0 +1,32 @@
+# Template file for 'sagemath-test'
+pkgname=sagemath-test
+version=1
+revision=1
+build_style=meta
+checkdepends="sagemath"
+short_desc="Dummy package to test sagemath"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-2.0-or-later"
+homepage="none"
+
+# TODO: install base-voidstrap, uninstall base-chroot, and remove orphans
+# so we can check sagemath depends are enough to run sage on void
+
+do_check() {
+	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
+		_test_args=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	fi
+	if [ -z "$_test_args" ]; then
+		_test_args=--all
+	fi
+	if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
+		# for CI use a predictable random seed
+		_test_args="--random-seed=0 $_test_args"
+	fi
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args="--long $_test_args"
+	else
+		_test_args="--warn-long 5.0 $_test_args"
+	fi
+	/usr/bin/sage* -tp ${XBPS_MAKEJOBS} ${_test_args}
+}
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch
new file mode 100644
index 000000000000..04fa2acbf3ec
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch
@@ -0,0 +1,11 @@
+--- a/src/sage/tests/cmdline.py
++++ b/src/sage/tests/cmdline.py
+@@ -488,7 +488,7 @@ def test_executable(args, input="", timeout=100.0, pydebug_ignore_warnings=False
+         0
+ 
+         sage: (out, err, ret) = test_executable(["sage", "--cython"])
+-        sage: print(err)
++        sage: print(err)  # not tested - broken when shebang is rewritten
+         Cython (http://cython.org) is a compiler for code written in the
+         Cython language.  Cython is based on Pyrex by Greg Ewing.
+         ...

From 0bdbdb1787e5c102fbc0704352d3552821dd8202 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 11:34:23 -0300
Subject: [PATCH 33/48] sagemath: cleanup and one patch

---
 .../zzz-skip_doctest_sage_setup_find.patch    | 12 ++++++++
 srcpkgs/sagemath/template                     | 30 ++++---------------
 2 files changed, 18 insertions(+), 24 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch

diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch
new file mode 100644
index 000000000000..15aed02f9aaa
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch
@@ -0,0 +1,12 @@
+--- a/src/sage_setup/find.py
++++ b/src/sage_setup/find.py
+@@ -301,7 +301,7 @@ def find_extra_files(src_dir, modules, cythonized_dir, special_filenames=[]):
+         sage: extras["sage/libs/mpfr"]
+         [...sage/libs/mpfr/types.pxd...]
+         sage: extras["sage/ext/interpreters"]
+-        ['.../src/sage/ext/interpreters/wrapper_cdf.pxd', ...wrapper_cdf.h...]
++        ['.../src/sage/ext/interpreters/wrapper_cdf.pxd', ...]
+     """
+     from Cython.Utils import is_package_dir
+ 
+--
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 0d8ce1f7a70a..f25cb745c9c4 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -4,7 +4,8 @@ version=9.5.rc0
 revision=1
 wrksrc=sage-$version
 build_style=configure
-configure_args="--enable-build-as-root"
+configure_args="--enable-build-as-root --with-system-python3
+ --enable-system-site-packages"
 make_check_target=ptest
 # for now skip building docs
 make_build_target=build
@@ -22,13 +23,8 @@ distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
 checksum=8012e3ac35290fa9b2cb837eeca149925784c2378b486731226944e4afd8a4e6
 python_version=3
 
-build_options="debug system_python3 system_site_packages"
+build_options="debug"
 desc_option_debug="Build with debug symbols"
-desc_option_system_python="Build using system python 3"
-desc_option_system_python="Build using system python site-packages"
-build_options_default="system_python3 system_site_packages"
-configure_args+=" $(vopt_with system_python3)"
-configure_args+=" $(vopt_enable system_site_packages)"
 
 # path where sage will be installed
 _SAGE_ROOT=/usr/lib/sage-${version}
@@ -112,9 +108,6 @@ for u in ${_upstream}; do
 	skip_extraction+=" ${u##*[/>]}"
 done
 
-# 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
@@ -165,16 +158,6 @@ post_configure() {
 	EOF
 }
 
-# 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() {
 	vlicense COPYING.txt
 	vdoc README.md
@@ -301,7 +284,6 @@ _sage_python3_modules="
  python3-wheel python3-zipp pythran
  "
 
-if [ "$build_option_system_site_packages" ]; then
-	makedepends+=" $_sage_python3_modules"
-	depends+=" $_sage_python3_modules"
-fi
+# python packages are build and runtime dependencies
+makedepends+=" $_sage_python3_modules"
+depends+=" $_sage_python3_modules"

From 27ec15d3f6d3574e7344677e37d681fe92021fdd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 11:34:32 -0300
Subject: [PATCH 34/48] sagemath: update to 9.5.rc1.

---
 srcpkgs/sagemath/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f25cb745c9c4..f5d9d0f0fabd 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -1,6 +1,6 @@
 # Template file for 'sagemath'
 pkgname=sagemath
-version=9.5.rc0
+version=9.5.rc1
 revision=1
 wrksrc=sage-$version
 build_style=configure
@@ -20,7 +20,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
-checksum=8012e3ac35290fa9b2cb837eeca149925784c2378b486731226944e4afd8a4e6
+checksum=b015c54f7411669ef70bac2b2fde260e7f45724bcff170957b1f9fd08131f2c3
 python_version=3
 
 build_options="debug"

From ea41077edf87970f6ae8d9d62231f8d2362c9100 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 14:53:11 -0300
Subject: [PATCH 35/48] sagemath: patch not needed with singular 4.3.0

---
 ...zzz-skip_doctest_singular_4.2.1--see_33134.patch | 13 -------------
 1 file changed, 13 deletions(-)
 delete mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch

diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
deleted file mode 100644
index 438078a92036..000000000000
--- a/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/src/sage/rings/polynomial/hilbert.pyx b/src/sage/rings/polynomial/hilbert.pyx
-index 4cd91d0a46..323b168c4e 100644
---- a/src/sage/rings/polynomial/hilbert.pyx
-+++ b/src/sage/rings/polynomial/hilbert.pyx
-@@ -578,7 +578,7 @@ def hilbert_poincare_series(I, grading=None):
- 
-     This example exceeded the capabilities of Singular before version 4.2.1p2::
- 
--        sage: J.hilbert_numerator(algorithm='singular')
-+        sage: J.hilbert_numerator(algorithm='singular')   # not tested - requires singular 4.2.1p2
-         120*t^33 - 3465*t^32 + 48180*t^31 - 429374*t^30 + 2753520*t^29 - 13522410*t^28 + 52832780*t^27 - 168384150*t^26 + 445188744*t^25 - 987193350*t^24 + 1847488500*t^23 + 1372406746*t^22 - 403422496*t^21 - 8403314*t^20 - 471656596*t^19 + 1806623746*t^18 + 752776200*t^17 + 752776200*t^16 - 1580830020*t^15 + 1673936550*t^14 - 1294246800*t^13 + 786893250*t^12 - 382391100*t^11 + 146679390*t^10 - 42299400*t^9 + 7837830*t^8 - 172260*t^7 - 468930*t^6 + 183744*t^5 - 39270*t^4 + 5060*t^3 - 330*t^2 + 1
- 
-     """

From 8143ee82f5b3ee1140f279b73bc3fd3a2de8d16c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 14:53:25 -0300
Subject: [PATCH 36/48] sagemath: install /usr/bin/sage

---
 srcpkgs/sagemath/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f5d9d0f0fabd..49821fc982e4 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -181,7 +181,8 @@ do_install() {
 	vmkdir 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}
+	ln -sfT $_SAGE_ROOT/sage ${DESTDIR}/usr/bin/sage-${version}
+	ln -sfT sage-${version} ${DESTDIR}/usr/bin/sage
 }
 
 do_check() {

From 7ec27d7d6067abc9d832f456f81f3b53521efc9f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 16:31:25 -0300
Subject: [PATCH 37/48] New package: python3-cvxopt-1.2.7

---
 srcpkgs/python3-cvxopt/template | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 srcpkgs/python3-cvxopt/template

diff --git a/srcpkgs/python3-cvxopt/template b/srcpkgs/python3-cvxopt/template
new file mode 100644
index 000000000000..0fb769b294e0
--- /dev/null
+++ b/srcpkgs/python3-cvxopt/template
@@ -0,0 +1,20 @@
+# Template file for 'python3-cvxopt'
+pkgname=python3-cvxopt
+version=1.2.7
+revision=1
+wrksrc="cvxopt-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools"
+makedepends="python3-devel blas-devel lapack-devel SuiteSparse-devel gsl-devel glpk-devel"
+checkdepends="python3-pytest"
+short_desc="Python software for convex optimization"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-3.0-or-later"
+homepage="http://cvxopt.org/"
+distfiles="${PYPI_SITE}/c/cvxopt/cvxopt-${version}.tar.gz"
+checksum=3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
+
+pre_build() {
+	export CVXOPT_BUILD_GSL=1
+	export CVXOPT_BUILD_GLPK=1
+}

From 49769070effce73cb5c324ab444147fc181b12db Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 23:37:14 -0300
Subject: [PATCH 38/48] sagemath: rearrange upstream packages and indent

This doesn't change anything, it separates _upstream and
checksum in three blocks to make it easier to edit.
---
 srcpkgs/sagemath/template | 140 ++++++++++++++++++++------------------
 1 file changed, 74 insertions(+), 66 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 49821fc982e4..4317f1e80893 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -31,76 +31,84 @@ _SAGE_ROOT=/usr/lib/sage-${version}
 
 _SAGE_UPSTREAM_MIRROR=https://mirrors.mit.edu/sage/spkg/upstream
 
+# packages were sage is the upstream
 _upstream="
-${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
-
-${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
-${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
-${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
-${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
-${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
-${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
-${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
-${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
-${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
-${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
-${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
-${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
-${PYPI_SITE}/P/PyCygwin/PyCygwin-0.1.tar.gz
-${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
-${PYPI_SITE}/s/setuptools/setuptools-59.2.0.tar.gz
-${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
-${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
-${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
-
-https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
-http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
-https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
-https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
+ ${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
+ ${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
+ ${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
+"
+checksum+="
+ c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
+ d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
+ 5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
+ ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
+ 169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
+ cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
+ edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+ b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
+ cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
 "
 
+# packages from pypi (python modules)
+_upstream+="
+ ${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
+ ${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
+ ${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
+ ${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
+ ${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
+ ${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
+ ${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
+ ${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
+ ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
+ ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
+ ${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
+ ${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
+ ${PYPI_SITE}/P/PyCygwin/PyCygwin-0.1.tar.gz
+ ${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
+ ${PYPI_SITE}/s/setuptools/setuptools-59.2.0.tar.gz
+ ${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
+ ${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
+ ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
+"
+checksum+="
+ dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
+ 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
+ 3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
+ 03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
+ 5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
+ cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
+ 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+ a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
+ d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
+ 5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
+ 471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
+ 78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
+ 45a5e295590c469a49b2804bfdb89059e942d768ad3b813f484d7b5bff48d226
+ ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
+ 157d21de9d055ab9e8ea3186d91e7f4f865e11f42deafa952d90842671fc2576
+ 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
+ 545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
+ dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
+"
+
+# other upstream packages
+_upstream+="
+ https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
+ http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
+ https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+ https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
+"
 checksum+="
-c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
-d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
-5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
-ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
-169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
-cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
-edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
-b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
-cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
-
-dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
-4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
-3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
-03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
-5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
-cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
-581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
-a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
-d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
-5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
-471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
-78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
-45a5e295590c469a49b2804bfdb89059e942d768ad3b813f484d7b5bff48d226
-ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
-157d21de9d055ab9e8ea3186d91e7f4f865e11f42deafa952d90842671fc2576
-6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
-545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
-dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
-
-c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
-07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
-3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
-718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
+ c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
+ 07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
+ 3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+ 718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
 "
 
 for u in ${_upstream}; do

From be5f0c86cb081d87d6658b5b7b39030268711088 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 23:37:58 -0300
Subject: [PATCH 39/48] sagemath: use system cvxopt and importlib_resources

---
 srcpkgs/sagemath/template | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 4317f1e80893..5eb70a6267bb 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -59,12 +59,10 @@ checksum+="
 _upstream+="
  ${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
  ${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
- ${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
  ${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
  ${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
  ${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
  ${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
- ${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
  ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
  ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
  ${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
@@ -79,12 +77,10 @@ _upstream+="
 checksum+="
  dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
  4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
- 3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
  03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
  5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
  cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
  581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
- a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
  d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
  5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
  471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
@@ -257,9 +253,6 @@ makedepends+="
 # TODO: optional
 # 4ti2 coxeter3 libsemigroups lrslib pdf2svg perl_mongodb polymake
 
-# TODO: standard
-# cvxopt importlib_resources
-
 # python packages for trac-29665
 _sage_python3_modules="
  python3-Babel python3-Jinja2 python3-MarkupSafe python3-Pillow
@@ -291,6 +284,8 @@ _sage_python3_modules="
  python3-tornado python3-traitlets python3-typing_extensions
  python3-tzlocal python3-urllib3 python3-wcwidth python3-webencodings
  python3-wheel python3-zipp pythran
+
+ python3-cvxopt python3-importlib_resources
  "
 
 # python packages are build and runtime dependencies

From f0af0898ca3a490cfc245f49e928470302c16c27 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 01:48:08 -0300
Subject: [PATCH 40/48] sagemath-test: fix sage binary (now is just 'sage')

---
 srcpkgs/sagemath-test/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/sagemath-test/template b/srcpkgs/sagemath-test/template
index 3e0b1c3233fd..1c0d71683a1b 100644
--- a/srcpkgs/sagemath-test/template
+++ b/srcpkgs/sagemath-test/template
@@ -28,5 +28,5 @@ do_check() {
 	else
 		_test_args="--warn-long 5.0 $_test_args"
 	fi
-	/usr/bin/sage* -tp ${XBPS_MAKEJOBS} ${_test_args}
+	sage -tp ${XBPS_MAKEJOBS} ${_test_args}
 }

From 95eaa2c36333b09eba6dc377ba4a86a2b3ee78a5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 10:49:04 -0300
Subject: [PATCH 41/48] sagemath: disallow fuzz in patches

---
 ...49c415e11d0522bff9013bc1509264b26ebf.patch | 27 -------------------
 srcpkgs/sagemath/template                     |  1 +
 2 files changed, 1 insertion(+), 27 deletions(-)
 delete mode 100644 srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch

diff --git a/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch b/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
deleted file mode 100644
index d32f1e4d5e9f..000000000000
--- a/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 836249c415e11d0522bff9013bc1509264b26ebf Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
-Date: Sun, 9 Jan 2022 16:51:22 -0300
-Subject: trac 33135: add filter to ignore deprecation warnings
-
----
- src/sage/all.py | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/src/sage/all.py b/src/sage/all.py
-index 01ef327..19ca3d4 100644
---- a/src/sage/all.py
-+++ b/src/sage/all.py
-@@ -96,6 +96,10 @@ warnings.filterwarnings('ignore', category=DeprecationWarning,
- warnings.filterwarnings('ignore', category=DeprecationWarning,
-                         module='pythran')
- 
-+warnings.filterwarnings('ignore', category=DeprecationWarning,
-+                        message='The distutils(.sysconfig module| package) is deprecated',
-+                        module='numpy|sage.env|sage.features')
-+
- ################ end setup warnings ###############################
- 
- 
--- 
-cgit v1.0-1-gd88e
-
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 5eb70a6267bb..e5a728b2217d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -22,6 +22,7 @@ homepage="http://sagemath.org/"
 distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
 checksum=b015c54f7411669ef70bac2b2fde260e7f45724bcff170957b1f9fd08131f2c3
 python_version=3
+patch_args="-F0 -Np1"
 
 build_options="debug"
 desc_option_debug="Build with debug symbols"

From 1d307a5b46f8a852536aad4fbec2b77085e56184 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 13:27:53 -0300
Subject: [PATCH 42/48] sagemath: disable packages that are not needed

 - appnope: only needed for macos
 - fonttools: only needed to build matplotlib
 - importlib_resources: only needed for old python
 - pycygwin: only needed for cygwin
 - setuptools_scm_git_archive: only needed to build matplotlib
 - setuptools_wheel: not needed
 - sphinxcontrib_websupport: only needed to build sphinx
 - cppy: force use from system python3-cppy
---
 srcpkgs/sagemath/template | 51 +++++++++++++++++++++++++++------------
 1 file changed, 35 insertions(+), 16 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index e5a728b2217d..f15bfbf76e0a 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -58,39 +58,29 @@ checksum+="
 
 # packages from pypi (python modules)
 _upstream+="
- ${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
- ${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
  ${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
  ${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
  ${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
- ${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
+
  ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
  ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
  ${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
  ${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
- ${PYPI_SITE}/P/PyCygwin/PyCygwin-0.1.tar.gz
+
  ${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
- ${PYPI_SITE}/s/setuptools/setuptools-59.2.0.tar.gz
- ${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
- ${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
  ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
 "
 checksum+="
- dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
- 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
  03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
  5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
  cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
- 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+
  d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
  5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
  471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
  78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
- 45a5e295590c469a49b2804bfdb89059e942d768ad3b813f484d7b5bff48d226
+
  ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
- 157d21de9d055ab9e8ea3186d91e7f4f865e11f42deafa952d90842671fc2576
- 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
- 545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
  dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
 "
 
@@ -108,6 +98,22 @@ checksum+="
  718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
 "
 
+# these packages are not needed, don't install
+_dontinstall="
+ appnope
+ fonttools
+ importlib_resources
+ pycygwin
+ setuptools_scm_git_archive
+ setuptools_wheel
+ sphinxcontrib_websupport
+"
+
+# these packages can be used from system
+_usefromsystem="
+ cppy
+"
+
 for u in ${_upstream}; do
 	distfiles+=" $u"
 	skip_extraction+=" ${u##*[/>]}"
@@ -145,8 +151,20 @@ do_clean() {
 	rm -rf $wrksrc $_SAGE_ROOT
 }
 
-pre_configure() {
+post_patch() {
 	./bootstrap
+}
+
+pre_configure() {
+	for spkg in $_dontinstall; do
+		configure_args+=" sage_spkg_install_$spkg=no"
+		configure_args+=" sage_require_$spkg=no"
+	done
+
+	for spkg in $_usefromsystem; do
+		configure_args+=" sage_spkg_install_$spkg=no"
+		configure_args+=" sage_require_$spkg=yes"
+	done
 
 	if [ "$build_option_debug" ]; then
 		export SAGE_DEBUG=yes
@@ -286,7 +304,8 @@ _sage_python3_modules="
  python3-tzlocal python3-urllib3 python3-wcwidth python3-webencodings
  python3-wheel python3-zipp pythran
 
- python3-cvxopt python3-importlib_resources
+ python3-cvxopt
+ python3-cppy
  "
 
 # python packages are build and runtime dependencies

From fec4d063e2ed623777b2ce3f558b5fcd839dc185 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 17:32:39 -0300
Subject: [PATCH 43/48] New package: python3-cysignals-1.11.2

---
 .../python3-cysignals/patches/fix-write.patch | 46 +++++++++++++++++++
 srcpkgs/python3-cysignals/template            | 19 ++++++++
 2 files changed, 65 insertions(+)
 create mode 100644 srcpkgs/python3-cysignals/patches/fix-write.patch
 create mode 100644 srcpkgs/python3-cysignals/template

diff --git a/srcpkgs/python3-cysignals/patches/fix-write.patch b/srcpkgs/python3-cysignals/patches/fix-write.patch
new file mode 100644
index 000000000000..18206bd808d7
--- /dev/null
+++ b/srcpkgs/python3-cysignals/patches/fix-write.patch
@@ -0,0 +1,46 @@
+Fix a doctest failure which triggers in i686.
+
+The example is in the function `test_bad_str()` in the file `tests.pyx`.
+The test pases a bad string to `sig_str()` and then raises `SIGILL`. The
+signal handler eventually raises a Python exception which in turn raises
+a `SIGSEGV` when accessing the bad string. An error message is expected,
+but that doesn't happen.
+
+Presumably the segfault happens inside some stdio function which leaves
+stdio buffers in an inconsistent state so the latter `fprintf` doesn't
+work properly. From signal-safety(7):
+
+    Suppose that the main program is in the middle of a call to a
+    stdio function such as printf(3) where the buffer and associated
+    variables have been partially updated.  If, at that moment, the
+    program is interrupted by a signal handler that also calls
+    printf(3), then the second call to printf(3) will operate on
+    inconsistent data, with unpredictable results.
+
+We fix this by replacing the `fprintf` by calls to `write`, which is
+async-signal-safe according to POSIX.
+
+--- a/src/cysignals/implementation.c      2022-01-16 22:36:45.143796872 +0000
++++ b/src/cysignals/implementation.c      2022-01-17 02:22:31.196695043 +0000
+@@ -638,12 +622,15 @@
+ #endif
+ 
+     if (s) {
++        /* Using fprintf from inside a signal handler is undefined, see signal-safety(7) */
++        const char * message =
++            "\n"
++            "This probably occurred because a *compiled* module has a bug\n"
++            "in it and is not properly wrapped with sig_on(), sig_off().\n"
++            "Python will now terminate.\n"
++            "------------------------------------------------------------------------\n";
++        write(2, s, strlen(s));
++        write(2, message, strlen(message));
+-        fprintf(stderr,
+-            "%s\n"
+-            "This probably occurred because a *compiled* module has a bug\n"
+-            "in it and is not properly wrapped with sig_on(), sig_off().\n"
+-            "Python will now terminate.\n", s);
+-        print_sep();
+     }
+ 
+ dienow:
diff --git a/srcpkgs/python3-cysignals/template b/srcpkgs/python3-cysignals/template
new file mode 100644
index 000000000000..4655eead2a9c
--- /dev/null
+++ b/srcpkgs/python3-cysignals/template
@@ -0,0 +1,19 @@
+# Template file for 'python3-cysignals'
+pkgname=python3-cysignals
+version=1.11.2
+revision=1
+wrksrc="cysignals-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools python3-Cython autoconf"
+makedepends="python3-devel pari-devel"
+short_desc="Interrupt and signal handling for Cython "
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/sagemath/cysignals"
+distfiles="${PYPI_SITE}/c/cysignals/cysignals-${version}.tar.gz"
+checksum=5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
+nocross=yes # runs binaries built for target
+
+do_check() {
+	make check
+}

From 97f4e3be91bd4f30a89db3bb6887dc0846cd9e91 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 18:28:55 -0300
Subject: [PATCH 44/48] New package: python3-cypari2-2.1.2

---
 srcpkgs/python3-cypari2/template | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 srcpkgs/python3-cypari2/template

diff --git a/srcpkgs/python3-cypari2/template b/srcpkgs/python3-cypari2/template
new file mode 100644
index 000000000000..18755ec020b4
--- /dev/null
+++ b/srcpkgs/python3-cypari2/template
@@ -0,0 +1,19 @@
+# Template file for 'python3-cypari2'
+pkgname=python3-cypari2
+version=2.1.2
+revision=1
+wrksrc=cypari2-${version}
+build_style=python3-module
+hostmakedepends="python3-setuptools python3-Cython pari perl"
+makedepends="python3-devel python3-cysignals pari-devel gmp-devel"
+short_desc="Python interface to the number theory library PARI/GP"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-2.0-or-later"
+homepage="https://github.com/sagemath/cypari2"
+distfiles="${PYPI_SITE}/c/cypari2/cypari2-${version}.tar.gz"
+checksum=03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
+
+do_check() {
+	PYTHONPATH="$(cd build/lib* && pwd)" \
+		make check
+}

From dca176d202e0adbac1c0cca79e8919acfb53bcb8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 18:56:29 -0300
Subject: [PATCH 45/48] New package: python3-pplpy-0.8.7

---
 srcpkgs/python3-pplpy/template | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 srcpkgs/python3-pplpy/template

diff --git a/srcpkgs/python3-pplpy/template b/srcpkgs/python3-pplpy/template
new file mode 100644
index 000000000000..1cb69ffe6a07
--- /dev/null
+++ b/srcpkgs/python3-pplpy/template
@@ -0,0 +1,21 @@
+# Template file for 'python3-pplpy'
+pkgname=python3-pplpy
+version=0.8.7
+revision=1
+wrksrc="pplpy-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools python3-Cython"
+makedepends="python3-cysignals python3-gmpy2 python3-devel gmp-devel
+ gmpxx-devel ppl-devel mpfr-devel libmpc-devel pari-devel"
+short_desc="Python wrapper to the C++ Parma Polyhedra Library (PPL)"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-3.0-or-later"
+homepage="https://gitlab.com/videlec/pplpy"
+changelog="https://gitlab.com/videlec/pplpy/-/raw/master/CHANGES.txt"
+distfiles="${PYPI_SITE}/p/pplpy/pplpy-${version}.tar.gz"
+checksum=500bd0f4ae1a76956fae7fcba77854f5ec3e64fce76803664983763c3f2bd8bd
+
+do_check() {
+	PYTHONPATH=$(cd build/lib* && pwd) \
+		python setup.py test
+}

From 80c9b9342d5a6e496f9ac5419b670926ff84a310 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 01:14:24 -0300
Subject: [PATCH 46/48] New package: python3-fpylll-0.5.6

---
 srcpkgs/python3-fpylll/template | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 srcpkgs/python3-fpylll/template

diff --git a/srcpkgs/python3-fpylll/template b/srcpkgs/python3-fpylll/template
new file mode 100644
index 000000000000..dd2adcee6fce
--- /dev/null
+++ b/srcpkgs/python3-fpylll/template
@@ -0,0 +1,25 @@
+# Template file for 'python3-fpylll'
+pkgname=python3-fpylll
+version=0.5.6
+revision=1
+wrksrc="fpylll-${version}"
+build_style=python3-module
+hostmakedepends="python3-Cython"
+makedepends="python3-cysignals python3-devel gmp-devel mpfr-devel fplll-devel
+ pari-devel"
+checkdepends="python3-pytest python3-numpy"
+short_desc="Python wrapper to fplll (floating point lattice algorithms)"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-2.0-or-later"
+homepage="https://github.com/fplll/fpylll"
+distfiles="${PYPI_SITE}/f/fpylll/fpylll-${version}.tar.gz"
+checksum=6eb8a63fb933c0bf92f290dd66fd884807659214d0ce524afe3687a6a6b13a8b
+
+case $XBPS_TARGET_MACHINE in
+	# skip a test with numerical noise on 32 bit
+	i686*) make_check_args="-k not(averaged_simulate_prob)" ;;
+esac
+
+pre_check() {
+	export PY_IGNORE_IMPORTMISMATCH=1
+}

From 09fd6926bdea64c140a2356f156bf074a8d13f4b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 18:32:13 -0300
Subject: [PATCH 47/48] sagemath: use system Cython, cysignals, cypari2, pplpy,
 fpylll

---
 srcpkgs/sagemath/template | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f15bfbf76e0a..ba22ffbeaf30 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -58,26 +58,18 @@ checksum+="
 
 # packages from pypi (python modules)
 _upstream+="
- ${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
- ${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
- ${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
 
  ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
  ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
- ${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
  ${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
 
  ${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
  ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
 "
 checksum+="
- 03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
- 5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
- cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
 
  d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
  5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
- 471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
  78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
 
  ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
@@ -86,13 +78,11 @@ checksum+="
 
 # other upstream packages
 _upstream+="
- https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
  http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
  https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
  https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
 "
 checksum+="
- c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
  07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
  3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
  718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
@@ -107,11 +97,17 @@ _dontinstall="
  setuptools_scm_git_archive
  setuptools_wheel
  sphinxcontrib_websupport
+ pplpy_doc
 "
 
 # these packages can be used from system
 _usefromsystem="
  cppy
+ cython
+ cysignals
+ cypari
+ pplpy
+ fpylll
 "
 
 for u in ${_upstream}; do
@@ -306,6 +302,11 @@ _sage_python3_modules="
 
  python3-cvxopt
  python3-cppy
+ python3-Cython
+ python3-cysignals
+ python3-cypari2
+ python3-pplpy
+ python3-fpylll
  "
 
 # python packages are build and runtime dependencies

From d27012d85b95ae364f7833ce8adab7c1c80857a2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 01:15:55 -0300
Subject: [PATCH 48/48] sagemath: update to 9.5.rc2.

---
 srcpkgs/sagemath/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index ba22ffbeaf30..b9bd590b61ca 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -1,6 +1,6 @@
 # Template file for 'sagemath'
 pkgname=sagemath
-version=9.5.rc1
+version=9.5.rc2
 revision=1
 wrksrc=sage-$version
 build_style=configure
@@ -20,7 +20,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
-checksum=b015c54f7411669ef70bac2b2fde260e7f45724bcff170957b1f9fd08131f2c3
+checksum=c7eba867c11ab1b6d04535dd8df54640d3de0625ad96cdac17b17af977d96dce
 python_version=3
 patch_args="-F0 -Np1"
 

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.rc2
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (209 preceding siblings ...)
  2022-01-17  5:54 ` [PR PATCH] [Updated] " tornaria
@ 2022-01-17  5:55 ` tornaria
  2022-01-17  9:37 ` dkwo
                   ` (37 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-17  5:55 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1014165489

Comment:
CI is broken at this time. Let's try with a commit before the ICU update...

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.rc2
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (210 preceding siblings ...)
  2022-01-17  5:55 ` tornaria
@ 2022-01-17  9:37 ` dkwo
  2022-01-17 10:42 ` tornaria
                   ` (36 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2022-01-17  9:37 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1014320340

Comment:
Do we miss anything to build `sage` as a python module?
I can spot `pynac`, what else?

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.rc2
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (211 preceding siblings ...)
  2022-01-17  9:37 ` dkwo
@ 2022-01-17 10:42 ` tornaria
  2022-01-17 10:50 ` dkwo
                   ` (35 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-17 10:42 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1014378550

Comment:
> Do we miss anything to build `sage` as a python module? I can spot `pynac`, what else?

We are very close, as you can see in the template we are only missing:
```
# packages were sage is the upstream
_upstream="
 ${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
 ${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
 ${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
 ${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
 ${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
 ${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
 ${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
 ${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
 ${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
"
# packages from pypi (python modules)
_upstream+="
 ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
 ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
 ${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
 ${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
 ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
"
# other upstream packages
_upstream+="
 http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
 https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
 https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
"
```

The 5 from pypi should be very easy. Among the rest there's a bunch of databases which will be very easy to package separate from sagemath (we should do it since they update much much less than sagemath itself).

---

I run all tests locally on our three nocross arches, both in the build and installed using sagemath-test. Everything passes so #35088 and #35089 are ready to merge.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.rc2
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (212 preceding siblings ...)
  2022-01-17 10:42 ` tornaria
@ 2022-01-17 10:50 ` dkwo
  2022-01-17 13:07 ` [PR PATCH] [Updated] " tornaria
                   ` (34 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2022-01-17 10:50 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1014385052

Comment:
It seems to me `jmol` and `mathjax` we already have.
I do not see `pynac` there though..

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: sagemath-9.5.rc2
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (213 preceding siblings ...)
  2022-01-17 10:50 ` dkwo
@ 2022-01-17 13:07 ` tornaria
  2022-01-17 16:20 ` dkwo
                   ` (33 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-17 13:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1152 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.rc2
This is WIP, so I can get feedback.

Supported architectures: x86_64, x86_64-musl, i686. We also try to make sure it works with musl-1.2.

The testsuite can be run normal (-Q) or long (-K). For CI it runs normal (~ 1/2 time) and it uses a fixed random seed 0 to avoid random failures. When running locally, the random seed is random so one may get occasional test failures that depend on a particular value of the random seed.

The package `sagemath-test` is a dummy package whose purpose is to run the testsuite with sage installed as a package and without the build directory. For this to make sense, the masterdir has to be clean (without traces of the sagemath build, this should be ok after running "pkg" or "pkg -Q").

Pending PR for dependencies:
- [ ] #34789 Needs review/testing
- [ ] #35088
- [ ] #35089

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: 666674 bytes --]

From 32f3e2286e51fa25fb83ca4c2e89e594058a1adf 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/50] 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 f4c53a0c7f9fd2e472ba5d3774a45fb12eb93881 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/50] 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 a8bd626442046f920b17764cc05bffa3bd714e44 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/50] 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 c4a5ce15e9f8f9a365a87860aa20033638c3253e 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/50] 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 ab4e24a8515271d93b43fddae2acd5c71cf9b9c4 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/50] 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 c6a3ff806fa97348f963d78bcdb4ebc5a407e61a 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/50] 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 d8ad8a1525190a288773f02da3d139e42019d33f 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/50] 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 3317f99da530d78d311f9b16c7f06435b13c81ca 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/50] 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 54ad0fde0afdb32cbfd3b3e20f1d336a1b998b5c 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/50] 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 f419b3c8b862a638dfe27fe8a22d132b03bca87d 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/50] 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 d8658bb4fc3fa81e7cf022fd9b31911b8ff74aaf 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/50] 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 18594e223e1972b88bb8116218263acb2407775a 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/50] 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 e755bca3e7a22ab00aae9378f93ea04d194f4207 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/50] 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 e1b9721bd780c9a2f9dbd159b78aabbb6da270b0 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/50] 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 8783f69b6ffe3aa3f8df51a817e315c175a8378e 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/50] 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 7faa009fcee7ce5473e0c4ccfeb9e6011c910bca 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/50] 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 5b4e5f557459241dfd5fca02cc89476b000a1373 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/50] 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 b1dd0a9a48de7300b11d1dd638f51639aafd354b 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/50] 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 1ae807111aa6b46843037891b625a2775cd223eb 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/50] 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

From 1f44f728ec67741d12d5d4563c00d4f71cb76d90 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 27 Dec 2021 20:19:19 -0300
Subject: [PATCH 20/50] sagemath: fix license and tests

Now tests can be run with -Q (normal) or -K (--long)
---
 srcpkgs/sagemath/template | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index c5009269c7fc..33b40acbabeb 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -16,7 +16,7 @@ depends="giac git FlintQS zn_poly sympow
  "
 short_desc="Open source mathematics software"
 maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
-license="GPL-3.0-or-later"
+license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
 checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
@@ -155,15 +155,17 @@ do_install() {
 }
 
 do_check() {
-	TEST=--all
 	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
-		TEST="$(sed -e 's/#.*//' ${XBPS_DISTDIR}/sagemath-check)"
+		_test_args=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	fi
+	if [ -z "$_test_args" ]; then
+		_test_args=--all
+	fi
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args="--long $_test_args"
 	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} ${OPT} ${TEST}
-	#./sage -t ${OPT} ${TEST}
+	./sage -tp ${XBPS_MAKEJOBS} ${_test_args}
 }
 
 ### copied from sage-deps, to be kept in sync

From a8ad28dbc15d0ac2cc1dd1309e8fb974e8686abb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 28 Dec 2021 23:08:17 -0300
Subject: [PATCH 21/50] sagemath: fix long time test

---
 .../patches/zzz-fix_long_time_test--see_33091.patch | 13 +++++++++++++
 ...=> zzz-skip_doctest_giac-1.7.0--see_31563.patch} |  0
 2 files changed, 13 insertions(+)
 create mode 100644 srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
 rename srcpkgs/sagemath/patches/{skip-doctest-giac-1.7.0--see-trac-31563.patch => zzz-skip_doctest_giac-1.7.0--see_31563.patch} (100%)

diff --git a/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch b/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
new file mode 100644
index 000000000000..ca360dee9f6e
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage/matrix/matrix2.pyx b/src/sage/matrix/matrix2.pyx
+index 7d319bd54b..c1a2eed6f1 100644
+--- a/src/sage/matrix/matrix2.pyx
++++ b/src/sage/matrix/matrix2.pyx
+@@ -17215,7 +17215,7 @@ cdef class Matrix(Matrix1):
+ 
+             sage: set_random_seed()
+             sage: K = random_cone(max_ambient_dim=5)
+-            sage: all(L.change_ring(SR).is_Z_operator_on(K)
++            sage: all(L.change_ring(SR).is_Z_operator_on(K) # long time
+             ....:     for L in K.Z_operators_gens())  # long time
+             True
+ 
diff --git a/srcpkgs/sagemath/patches/skip-doctest-giac-1.7.0--see-trac-31563.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_31563.patch
similarity index 100%
rename from srcpkgs/sagemath/patches/skip-doctest-giac-1.7.0--see-trac-31563.patch
rename to srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_31563.patch

From cf5081ea8109fbb917edf66832b11adc824d5015 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 31 Dec 2021 13:52:34 -0300
Subject: [PATCH 22/50] python3-Sphinx: update to 4.3.2.

---
 srcpkgs/python3-Sphinx/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/python3-Sphinx/template b/srcpkgs/python3-Sphinx/template
index 8b0493c1f92c..29f892d16157 100644
--- a/srcpkgs/python3-Sphinx/template
+++ b/srcpkgs/python3-Sphinx/template
@@ -1,6 +1,6 @@
 # Template file for 'python3-Sphinx'
 pkgname=python3-Sphinx
-version=4.2.0
+version=4.3.2
 revision=1
 wrksrc=Sphinx-${version}
 build_style=python3-module
@@ -17,8 +17,9 @@ short_desc="Python 3 documentation generator"
 maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
 license="BSD-3-Clause"
 homepage="http://sphinx-doc.org"
+changelog="https://www.sphinx-doc.org/en/master/changes.html"
 distfiles="${PYPI_SITE}/S/Sphinx/Sphinx-${version}.tar.gz"
-checksum=94078db9184491e15bce0a56d9186e0aec95f16ac20b12d00e06d4e36f1058a6
+checksum=0a8836751a68306b3fe97ecbe44db786f8479c3bf4b80e3a7f5c838657b4698c
 conflicts="python-Sphinx>=0"
 
 post_install() {

From f5b5b2cc77c8139672a1f45267c85510b7142505 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 28 Dec 2021 23:08:17 -0300
Subject: [PATCH 23/50] sagemath: use system python site-packages

 - patch from #29665 for that
 - patch on top of that to allow a few more python packages:
   gmpy2, sphinx, typing_extensions, ptyprocess
 - add all available python packages to makedepends and depends
 - add ffmpeg and ImageMagick to makedepends
 - in standard check (-Q) warn if individual test > 5.0s
---
 ...184f7498a2046065e669723e68efe2d65cee.patch | 5629 +++++++++++++++++
 .../zzz-dont_run_pytest--see_31924.patch      |   27 +
 .../zzz-more_site_packages_not_in_29665.patch |   42 +
 srcpkgs/sagemath/template                     |   52 +-
 4 files changed, 5747 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch

diff --git a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
new file mode 100644
index 000000000000..b641113927e7
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
@@ -0,0 +1,5629 @@
+From 05fcaabe95082f42ba134780d579390d7b6153e2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 19:30:58 -0400
+Subject: Trac #29665: add --enable-system-site-packages option to ./configure.
+
+This new option is experimental and disabled by default. When it is
+enabled, the string "--system-site-packages" is appended to a new
+environment variable SAGE_VENV_FLAGS that is then passed to the
+sage-venv command during the build using autoconf substitution.
+Thusly the correct setting finds its way into local/pyvenv.cfg.
+---
+ build/make/Makefile.in |  2 +-
+ configure.ac           | 11 +++++++++++
+ 2 files changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/build/make/Makefile.in b/build/make/Makefile.in
+index f870cc3..68627ab 100644
+--- a/build/make/Makefile.in
++++ b/build/make/Makefile.in
+@@ -211,7 +211,7 @@ endif
+ inst_python3_venv = $(SAGE_VENV)/pyvenv.cfg
+ 
+ $(inst_python3_venv):
+-	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv "$(SAGE_VENV)"
++	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv @SAGE_VENV_FLAGS@ "$(SAGE_VENV)"
+ endif
+ 
+ # Build everything and start Sage.
+diff --git a/configure.ac b/configure.ac
+index 351f487..db30a91 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -435,6 +435,17 @@ AC_ARG_ENABLE([download-from-upstream-url],
+   [AS_HELP_STRING([--enable-download-from-upstream-url],
+     [allow downloading packages from their upstream URL if they cannot be found on the Sage mirrors])])
+ 
++AC_ARG_ENABLE(
++  [system-site-packages], [AS_HELP_STRING(
++    [--enable-system-site-packages],
++    [allow sage to use python packages from the system (experimental; default: no)]
++  )], [
++  AS_IF([test "x$enable_system_site_packages" = "xyes"], [
++    SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
++  ])
++])
++AC_SUBST([SAGE_VENV_FLAGS])
++
+ SAGE_SPKG_OPTIONS=""
+ AS_IF([test "x$enable_experimental_packages" = "xyes"], [
+   AS_VAR_APPEND([SAGE_SPKG_OPTIONS], [" -y"])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9372d1f663edf4e89f9c186336815ca04cff59dc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 19:41:14 -0400
+Subject: Trac #29665: new SAGE_PYTHON_PACKAGE_CHECK() autoconf macro.
+
+This new macro encapsulates the check for system installations of
+python packages. It uses setuptools.version's pkg_resources to
+check if the contents of install-requires.txt are satisfied for
+the given package; and if not, tells the build system to install
+the SPKG instead.
+---
+ m4/sage_python_package_check.m4 | 49 +++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 49 insertions(+)
+ create mode 100644 m4/sage_python_package_check.m4
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+new file mode 100644
+index 00000000..77b0a0c
+--- /dev/null
++++ b/m4/sage_python_package_check.m4
+@@ -0,0 +1,49 @@
++#
++# SYNOPSIS
++#
++#   SAGE_PYTHON_PACKAGE_CHECK(package)
++#
++# DESCRIPTION
++#
++#   Determine if the system copy of a python package can be used by sage.
++#
++#   This macro uses setuptools.version's pkg_resources to check that the
++#   "install-requires.txt" file for the named package is satisfied, and
++#   it can typically fail in four ways:
++#
++#     1. If --enable-system-site-packages was not passed to ./configure,
++#
++#     2. If we are not using the system python (no $PYTHON_FOR_VENV),
++#
++#     3. If setuptools is not available to the system python,
++#
++#     4. If the contents of install-requires.txt are not met (wrong
++#        version, no version, etc.) by the system python.
++#
++#   In any of those cases, we set sage_spkg_install_$package to "yes"
++#   so that the corresponding SPKG is installed. Otherwise, we do
++#   nothing, since the default value of sage_spkg_install_$package
++#   is "no" (to use the system copy).
++#
++#   The SAGE_SPKG_CONFIGURE_PYTHON3() macro is AC_REQUIRE'd to ensure
++#   that $PYTHON_FOR_VENV is available, if it is going to be available.
++#
++
++AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
++  AS_IF([test "${enable_system_site_packages}" = "yes"], [
++    AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
++
++    dnl strip all comments from install-requires.txt; this should leave
++    dnl only a single line containing the version specification for this
++    dnl package.
++    SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
++    AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++    AS_IF(
++      ["${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())"],
++      [AC_MSG_RESULT(yes)],
++      [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
++    )
++  ], [
++    sage_spkg_install_$1=yes
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a0dac8ad81ad6369d479bba30d2388de59e5cecb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:21:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for py.
+
+---
+ build/pkgs/py/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/py/spkg-configure.m4
+
+diff --git a/build/pkgs/py/spkg-configure.m4 b/build/pkgs/py/spkg-configure.m4
+new file mode 100644
+index 00000000..ded7034
+--- /dev/null
++++ b/build/pkgs/py/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([py], [SAGE_PYTHON_PACKAGE_CHECK([py])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 87c463a25ab4432dc1fba4f7a9703284e5b8f620 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:24:15 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for wheel.
+
+---
+ build/pkgs/wheel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wheel/spkg-configure.m4
+
+diff --git a/build/pkgs/wheel/spkg-configure.m4 b/build/pkgs/wheel/spkg-configure.m4
+new file mode 100644
+index 00000000..7897ea9
+--- /dev/null
++++ b/build/pkgs/wheel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([wheel], [SAGE_PYTHON_PACKAGE_CHECK([wheel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 804094b3a980f262f4d53d7be8b1be43ac0c55e0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:25:15 -0400
+Subject: Trac #29665: new spkg-configure.m4 for cvxopt.
+
+This includes a SAGE_SPKG_DEPCHECK([gsl glpk suitesparse],... because
+those C dependencies wind up linked into shared libraries like,
+
+  /usr/.../cvxopt/glpk.cpython-39-x86_64-linux-gnu.so
+
+that could potentially conflict with (for example) the glpk SPKG.
+---
+ build/pkgs/cvxopt/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/cvxopt/spkg-configure.m4
+
+diff --git a/build/pkgs/cvxopt/spkg-configure.m4 b/build/pkgs/cvxopt/spkg-configure.m4
+new file mode 100644
+index 00000000..c4aa619
+--- /dev/null
++++ b/build/pkgs/cvxopt/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([cvxopt], [
++  SAGE_SPKG_DEPCHECK([gsl glpk suitesparse], [
++    SAGE_PYTHON_PACKAGE_CHECK([cvxopt])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3f171955ff8d15da2c98aee0d2e254e95a55a2b5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:28:10 -0400
+Subject: Trac #29665: new spkg-configure.m4 for pyzmq.
+
+This includes a SAGE_SPKG_DEPCHECK([zeromq],... because libzmq winds
+up linked into shared libraries like,
+
+  /usr/.../zmq/backend/cython/message.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the zeromq SPKG.
+---
+ build/pkgs/pyzmq/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/pyzmq/spkg-configure.m4
+
+diff --git a/build/pkgs/pyzmq/spkg-configure.m4 b/build/pkgs/pyzmq/spkg-configure.m4
+new file mode 100644
+index 00000000..ae2b126
+--- /dev/null
++++ b/build/pkgs/pyzmq/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([pyzmq], [
++  SAGE_SPKG_DEPCHECK([zeromq], [
++    SAGE_PYTHON_PACKAGE_CHECK([pyzmq])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20d3aa9da9fc98a6e6a47599cd1b6d1d3785a4c4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:31:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for requests.
+
+---
+ build/pkgs/requests/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/requests/spkg-configure.m4
+
+diff --git a/build/pkgs/requests/spkg-configure.m4 b/build/pkgs/requests/spkg-configure.m4
+new file mode 100644
+index 00000000..f50a66c
+--- /dev/null
++++ b/build/pkgs/requests/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([requests], [SAGE_PYTHON_PACKAGE_CHECK([requests])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4df57ee47f2576b6b7bf9265248e06e90616b689 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:13:34 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for six.
+
+---
+ build/pkgs/six/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/six/spkg-configure.m4
+
+diff --git a/build/pkgs/six/spkg-configure.m4 b/build/pkgs/six/spkg-configure.m4
+new file mode 100644
+index 00000000..a382b81
+--- /dev/null
++++ b/build/pkgs/six/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([six], [SAGE_PYTHON_PACKAGE_CHECK([six])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f4462652d02ca729cc6d7cb36ee4d7d662deafb0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:14:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for packaging.
+
+---
+ build/pkgs/packaging/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/packaging/spkg-configure.m4
+
+diff --git a/build/pkgs/packaging/spkg-configure.m4 b/build/pkgs/packaging/spkg-configure.m4
+new file mode 100644
+index 00000000..398f9e1
+--- /dev/null
++++ b/build/pkgs/packaging/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([packaging], [SAGE_PYTHON_PACKAGE_CHECK([packaging])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4d64677fffce48077e4bc3e20ec833c70e6e9b65 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:18:53 -0400
+Subject: Trac #29665: new spkg-configure.m4 for numpy.
+
+This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack
+wind up linked into shared libraries like,
+
+  /usr/.../numpy/linalg/lapack_lite.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the openblas SPKG.
+---
+ build/pkgs/numpy/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/numpy/spkg-configure.m4
+
+diff --git a/build/pkgs/numpy/spkg-configure.m4 b/build/pkgs/numpy/spkg-configure.m4
+new file mode 100644
+index 00000000..16f9a90
+--- /dev/null
++++ b/build/pkgs/numpy/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([numpy], [
++  SAGE_SPKG_DEPCHECK([openblas], [
++   SAGE_PYTHON_PACKAGE_CHECK([numpy])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 85dfe5bb32f3c470966b477bae68a921e846d11f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:58:48 -0400
+Subject: Trac #29665: new spkg-configure.m4 for scipy.
+
+This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack
+wind up linked into shared libraries like,
+
+  /usr/.../scipy/linalg/_flinalg.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the openblas SPKG.
+---
+ build/pkgs/scipy/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/scipy/spkg-configure.m4
+
+diff --git a/build/pkgs/scipy/spkg-configure.m4 b/build/pkgs/scipy/spkg-configure.m4
+new file mode 100644
+index 00000000..0b7294a
+--- /dev/null
++++ b/build/pkgs/scipy/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([scipy], [
++  SAGE_SPKG_DEPCHECK([openblas], [
++    SAGE_PYTHON_PACKAGE_CHECK([scipy])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5616f1491036fda95f4d3e840c8c8b531c97323b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 07:19:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pluggy.
+
+---
+ build/pkgs/pluggy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pluggy/spkg-configure.m4
+
+diff --git a/build/pkgs/pluggy/spkg-configure.m4 b/build/pkgs/pluggy/spkg-configure.m4
+new file mode 100644
+index 00000000..11b1fce
+--- /dev/null
++++ b/build/pkgs/pluggy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pluggy], [SAGE_PYTHON_PACKAGE_CHECK([pluggy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6bceae3d356878cfe5fce40c9998dead003a3844 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 07:24:12 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pickleshare.
+
+---
+ build/pkgs/pickleshare/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pickleshare/spkg-configure.m4
+
+diff --git a/build/pkgs/pickleshare/spkg-configure.m4 b/build/pkgs/pickleshare/spkg-configure.m4
+new file mode 100644
+index 00000000..80e9b7c
+--- /dev/null
++++ b/build/pkgs/pickleshare/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pickleshare], [SAGE_PYTHON_PACKAGE_CHECK([pickleshare])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From da2ab534f4a256c82ed4f1c5f0f5c320529b5e9f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 08:53:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for html5lib.
+
+---
+ build/pkgs/html5lib/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/html5lib/spkg-configure.m4
+
+diff --git a/build/pkgs/html5lib/spkg-configure.m4 b/build/pkgs/html5lib/spkg-configure.m4
+new file mode 100644
+index 00000000..f421b7e
+--- /dev/null
++++ b/build/pkgs/html5lib/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([html5lib], [SAGE_PYTHON_PACKAGE_CHECK([html5lib])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5e464134afdf6055b7b5804208f759561c5435cd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 18:30:47 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for networkx.
+
+---
+ build/pkgs/networkx/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/networkx/spkg-configure.m4
+
+diff --git a/build/pkgs/networkx/spkg-configure.m4 b/build/pkgs/networkx/spkg-configure.m4
+new file mode 100644
+index 00000000..926671e
+--- /dev/null
++++ b/build/pkgs/networkx/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([networkx], [SAGE_PYTHON_PACKAGE_CHECK([networkx])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c4d40770cd9c7fda811e31759a5f4aedc320f3f9 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:33:24 -0400
+Subject: Trac #29665: new spkg-configure.m4 for matplotlib.
+
+This includes a SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull],...
+because those dependencies wind up linked into shared libraries like,
+
+  /usr/lib/.../matplotlib/ft2font.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with their SPKG counterparts.
+---
+ build/pkgs/matplotlib/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/matplotlib/spkg-configure.m4
+
+diff --git a/build/pkgs/matplotlib/spkg-configure.m4 b/build/pkgs/matplotlib/spkg-configure.m4
+new file mode 100644
+index 00000000..39c2d29
+--- /dev/null
++++ b/build/pkgs/matplotlib/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([matplotlib], [
++  SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull], [
++    SAGE_PYTHON_PACKAGE_CHECK([matplotlib])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7834dc3ac349201af632f89a9de7cd1967931010 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:35:00 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for bleach.
+
+---
+ build/pkgs/bleach/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/bleach/spkg-configure.m4
+
+diff --git a/build/pkgs/bleach/spkg-configure.m4 b/build/pkgs/bleach/spkg-configure.m4
+new file mode 100644
+index 00000000..3c9bb26
+--- /dev/null
++++ b/build/pkgs/bleach/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([bleach], [SAGE_PYTHON_PACKAGE_CHECK([bleach])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 84cad343287a2c69a4a21b9fa3b92301ff88645b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:37:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for decorator.
+
+---
+ build/pkgs/decorator/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/decorator/spkg-configure.m4
+
+diff --git a/build/pkgs/decorator/spkg-configure.m4 b/build/pkgs/decorator/spkg-configure.m4
+new file mode 100644
+index 00000000..e062778
+--- /dev/null
++++ b/build/pkgs/decorator/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([decorator], [SAGE_PYTHON_PACKAGE_CHECK([decorator])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 25693212572e69d452bc95c923ada13744359eb7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:38:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for idna.
+
+---
+ build/pkgs/idna/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/idna/spkg-configure.m4
+
+diff --git a/build/pkgs/idna/spkg-configure.m4 b/build/pkgs/idna/spkg-configure.m4
+new file mode 100644
+index 00000000..9d363f2
+--- /dev/null
++++ b/build/pkgs/idna/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([idna], [SAGE_PYTHON_PACKAGE_CHECK([idna])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6d5616472f6cdc6cf496bba6fe07bd4ef44dfdaf Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:39:23 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for certifi.
+
+---
+ build/pkgs/certifi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/certifi/spkg-configure.m4
+
+diff --git a/build/pkgs/certifi/spkg-configure.m4 b/build/pkgs/certifi/spkg-configure.m4
+new file mode 100644
+index 00000000..ddd4061
+--- /dev/null
++++ b/build/pkgs/certifi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([certifi], [SAGE_PYTHON_PACKAGE_CHECK([certifi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9412a07023b275e29e8d1af9b8ee3e767042e7fd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:40:59 -0400
+Subject: Trac #29665: new spkg-configure.m4 for pillow.
+
+This includes an SAGE_SPKG_DEPCHECK([bzip2 freetype libpng zlib],...
+because those dependencies wind up linked into shared libraries like,
+
+  /usr/.../PIL/_imagingft.cpython-39-x86_64-linux-gnu.so
+
+and potentially conflict with their SPKG counterparts.
+---
+ build/pkgs/pillow/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/pillow/spkg-configure.m4
+
+diff --git a/build/pkgs/pillow/spkg-configure.m4 b/build/pkgs/pillow/spkg-configure.m4
+new file mode 100644
+index 00000000..f2e68e2
+--- /dev/null
++++ b/build/pkgs/pillow/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([pillow], [
++  SAGE_SPKG_DEPCHECK([bzip2 freetype libpng zlib], [
++    SAGE_PYTHON_PACKAGE_CHECK([pillow])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From eede914311481fdb75b363b7a799075e876a2b4f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:44:13 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for mpmath.
+
+---
+ build/pkgs/mpmath/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mpmath/spkg-configure.m4
+
+diff --git a/build/pkgs/mpmath/spkg-configure.m4 b/build/pkgs/mpmath/spkg-configure.m4
+new file mode 100644
+index 00000000..f43c838
+--- /dev/null
++++ b/build/pkgs/mpmath/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([mpmath], [SAGE_PYTHON_PACKAGE_CHECK([mpmath])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 363a825885832c0b580ff53fe61f5c79e70c4728 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:44:56 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for sympy.
+
+---
+ build/pkgs/sympy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sympy/spkg-configure.m4
+
+diff --git a/build/pkgs/sympy/spkg-configure.m4 b/build/pkgs/sympy/spkg-configure.m4
+new file mode 100644
+index 00000000..fa0f1f5
+--- /dev/null
++++ b/build/pkgs/sympy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([sympy], [SAGE_PYTHON_PACKAGE_CHECK([sympy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0667964c914e4a01dda697190a054ff96cea92d6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:47:06 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pygments.
+
+---
+ build/pkgs/pygments/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pygments/spkg-configure.m4
+
+diff --git a/build/pkgs/pygments/spkg-configure.m4 b/build/pkgs/pygments/spkg-configure.m4
+new file mode 100644
+index 00000000..99f29e3
+--- /dev/null
++++ b/build/pkgs/pygments/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pygments], [SAGE_PYTHON_PACKAGE_CHECK([pygments])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f787c233aa05d8e90f7c6ad18f76bd2fa36bfbfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:48:50 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for jinja2.
+
+---
+ build/pkgs/jinja2/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jinja2/spkg-configure.m4
+
+diff --git a/build/pkgs/jinja2/spkg-configure.m4 b/build/pkgs/jinja2/spkg-configure.m4
+new file mode 100644
+index 00000000..0970d1c
+--- /dev/null
++++ b/build/pkgs/jinja2/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jinja2], [SAGE_PYTHON_PACKAGE_CHECK([jinja2])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 309d8f8e2b7078b5efbbe824b69ec1d9b1e639f0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:43:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pandocfilters.
+
+---
+ build/pkgs/pandocfilters/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/pandocfilters/spkg-configure.m4
+
+diff --git a/build/pkgs/pandocfilters/spkg-configure.m4 b/build/pkgs/pandocfilters/spkg-configure.m4
+new file mode 100644
+index 00000000..3e9537f
+--- /dev/null
++++ b/build/pkgs/pandocfilters/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([pandocfilters], [
++  SAGE_PYTHON_PACKAGE_CHECK([pandocfilters])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f57bfda49777a6ba1cd123553acd75dc347c5521 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:44:46 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for webencodings.
+
+---
+ build/pkgs/webencodings/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/webencodings/spkg-configure.m4
+
+diff --git a/build/pkgs/webencodings/spkg-configure.m4 b/build/pkgs/webencodings/spkg-configure.m4
+new file mode 100644
+index 00000000..1b9a5c4
+--- /dev/null
++++ b/build/pkgs/webencodings/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([webencodings], [
++  SAGE_PYTHON_PACKAGE_CHECK([webencodings])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7f193a62d7a2ea0b6a3ca6beb12390d91c25bbfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:48:26 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pytz.
+
+---
+ build/pkgs/pytz/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pytz/spkg-configure.m4
+
+diff --git a/build/pkgs/pytz/spkg-configure.m4 b/build/pkgs/pytz/spkg-configure.m4
+new file mode 100644
+index 00000000..366521b
+--- /dev/null
++++ b/build/pkgs/pytz/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pytz], [SAGE_PYTHON_PACKAGE_CHECK([pytz])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bfd3fdd887c3465c03465248de4997eed4a82915 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:51:16 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for texttable.
+
+---
+ build/pkgs/texttable/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/texttable/spkg-configure.m4
+
+diff --git a/build/pkgs/texttable/spkg-configure.m4 b/build/pkgs/texttable/spkg-configure.m4
+new file mode 100644
+index 00000000..42a3de1
+--- /dev/null
++++ b/build/pkgs/texttable/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([texttable], [SAGE_PYTHON_PACKAGE_CHECK([texttable])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 914bf0cc57abc46129b27c1525782dbe16da31a2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:53:41 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for babel.
+
+---
+ build/pkgs/babel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/babel/spkg-configure.m4
+
+diff --git a/build/pkgs/babel/spkg-configure.m4 b/build/pkgs/babel/spkg-configure.m4
+new file mode 100644
+index 00000000..d7b9a71
+--- /dev/null
++++ b/build/pkgs/babel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([babel], [SAGE_PYTHON_PACKAGE_CHECK([babel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 56977abd1eafbc87c765a2892cfe525382648259 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 14 Oct 2021 08:06:59 -0400
+Subject: Trac #29665: force system python3 with --enable-system-site-packages.
+
+When the python SPKG is used, the --enable-system-site-packages flag
+will essentially do nothing, and that may confuse users who have
+wasted a few hours building sage. (Generally, they will want to fix
+detection of their system python3 first.)
+
+To forestall that, we now set "--with-system-python3=force" whenever
+the "--enable-system-site-packages" flag is passed.
+---
+ configure.ac | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index db30a91..6fafb83 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -438,10 +438,19 @@ AC_ARG_ENABLE([download-from-upstream-url],
+ AC_ARG_ENABLE(
+   [system-site-packages], [AS_HELP_STRING(
+     [--enable-system-site-packages],
+-    [allow sage to use python packages from the system (experimental; default: no)]
++    [allow the use of python packages from the system (experimental; default: no)]
+   )], [
+   AS_IF([test "x$enable_system_site_packages" = "xyes"], [
+     SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
++
++    dnl We want to raise an error if the user asked for "system site
++    dnl packages" but the system python will not be used. Technically
++    dnl that causes no problems (SAGE_PYTHON_PACKAGE_CHECK always fails,
++    dnl so SPKGs are used for all python packages), but it may be confusing
++    dnl to end users who expect the flag to actually give them access to
++    dnl their system python packages and who may not be paying close
++    dnl attention to their ./configure output.
++    with_system_python3="force"
+   ])
+ ])
+ AC_SUBST([SAGE_VENV_FLAGS])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 02b369fd24ef7cf8997082e7850b9cf022cae34b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 01:18:35 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for setuptools.
+
+---
+ build/pkgs/setuptools/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/setuptools/spkg-configure.m4
+
+diff --git a/build/pkgs/setuptools/spkg-configure.m4 b/build/pkgs/setuptools/spkg-configure.m4
+new file mode 100644
+index 00000000..a2ad811
+--- /dev/null
++++ b/build/pkgs/setuptools/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([setuptools], [SAGE_PYTHON_PACKAGE_CHECK([setuptools])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 05117317d38693978efaf36e81d8b02bae44b257 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 01:15:48 -0400
+Subject: Trac #29665: poison PYTHONUSERBASE when testing for "system"
+ packages.
+
+When we're detecting system installations of python packages, we want
+to hide anything that was installed with e.g. "pip install --user". To
+accomplish that, we mimic the PYTHONUSERBASE poisoning from sage-env
+within the SAGE_PYTHON_PACKAGE_CHECK() macro.
+---
+ m4/sage_python_package_check.m4 | 18 +++++++++++++++++-
+ 1 file changed, 17 insertions(+), 1 deletion(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 77b0a0c..b8cdba4 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -38,11 +38,27 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     dnl package.
+     SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
+     AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++
++    dnl To prevent user-site (pip install --user) packages from being
++    dnl detected as "system" packages, we poison PYTHONUSERBASE. The
++    dnl sage-env script also does this at runtime; we mimic that
++    dnl implementation to ensure that the behaviors at ./configure and
++    dnl runtime are identical. Beware that (as in sage-env) the poisoning
++    dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
++    dnl user points PYTHONUSERBASE to any path (even the default), then
++    dnl his local pip packages will be detected.
++    PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
++    AS_IF([test -z "${PYTHONUSERBASE}"], [
++      PYTHONUSERBASE="${HOME}/.sage/local"
++    ])
++
+     AS_IF(
+-      ["${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())"],
++      [PYTHONUSERBASE="${PYTHONUSERBASE}" "${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" 2>/dev/null],
+       [AC_MSG_RESULT(yes)],
+       [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+     )
++
++    PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d75c1492f63a584b5ec5f424ddd7f7c4a6d502d3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:20:04 -0400
+Subject: Trac #29665: run SAGE_PYTHON_PACKAGE_CHECK() inside a venv.
+
+To recreate the runtime environment as closely as possible, we now use
+a venv (with system site packages enabled) when checking for system
+copies of python packages.
+---
+ m4/sage_python_package_check.m4 | 76 +++++++++++++++++++++++++++--------------
+ 1 file changed, 51 insertions(+), 25 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index b8cdba4..7cbd6c0 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -15,9 +15,11 @@
+ #
+ #     2. If we are not using the system python (no $PYTHON_FOR_VENV),
+ #
+-#     3. If setuptools is not available to the system python,
++#     3. If we are unable to create a venv with the system python,
+ #
+-#     4. If the contents of install-requires.txt are not met (wrong
++#     4. If setuptools is not available to the system python,
++#
++#     5. If the contents of install-requires.txt are not met (wrong
+ #        version, no version, etc.) by the system python.
+ #
+ #   In any of those cases, we set sage_spkg_install_$package to "yes"
+@@ -27,38 +29,62 @@
+ #
+ #   The SAGE_SPKG_CONFIGURE_PYTHON3() macro is AC_REQUIRE'd to ensure
+ #   that $PYTHON_FOR_VENV is available, if it is going to be available.
++#   The check is run inside a new venv, and with the PYTHONUSERBASE
++#   variable poisoned in the same manner as sage-env poisons it, to
++#   ensure that the ./configure- and run-time views of the system
++#   are as similar as possible.
+ #
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
+     AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
+ 
+-    dnl strip all comments from install-requires.txt; this should leave
+-    dnl only a single line containing the version specification for this
+-    dnl package.
+-    SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
+-    AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++    dnl We run this check inside a python venv, because that's ultimately
++    dnl how the system $PYTHON_FOR_VENV will be used.
++    AC_MSG_CHECKING([if we can create a python venv in config.venv])
+ 
+-    dnl To prevent user-site (pip install --user) packages from being
+-    dnl detected as "system" packages, we poison PYTHONUSERBASE. The
+-    dnl sage-env script also does this at runtime; we mimic that
+-    dnl implementation to ensure that the behaviors at ./configure and
+-    dnl runtime are identical. Beware that (as in sage-env) the poisoning
+-    dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
+-    dnl user points PYTHONUSERBASE to any path (even the default), then
+-    dnl his local pip packages will be detected.
+-    PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
+-    AS_IF([test -z "${PYTHONUSERBASE}"], [
+-      PYTHONUSERBASE="${HOME}/.sage/local"
+-    ])
++    dnl Use --clear because ./configure typically clobbers its output files.
++    AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
++                                        --clear                dnl
++                                        --without-pip          dnl
++					config.venv], [
++      AC_MSG_RESULT(yes)
++      dnl strip all comments from install-requires.txt; this should leave
++      dnl only a single line containing the version specification for this
++      dnl package.
++      SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
++      AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++
++      dnl To prevent user-site (pip install --user) packages from being
++      dnl detected as "system" packages, we poison PYTHONUSERBASE. The
++      dnl sage-env script also does this at runtime; we mimic that
++      dnl implementation to ensure that the behaviors at ./configure and
++      dnl runtime are identical. Beware that (as in sage-env) the poisoning
++      dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
++      dnl user points PYTHONUSERBASE to any path (even the default), then
++      dnl his local pip packages will be detected.
++      PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
++      AS_IF([test -z "${PYTHONUSERBASE}"], [
++        PYTHONUSERBASE="${HOME}/.sage/local"
++      ])
+ 
+-    AS_IF(
+-      [PYTHONUSERBASE="${PYTHONUSERBASE}" "${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" 2>/dev/null],
+-      [AC_MSG_RESULT(yes)],
+-      [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+-    )
++      AS_IF(
++        [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
++           "from setuptools.version import pkg_resources;              dnl
++            pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" dnl
++	 2>/dev/null],
++        [AC_MSG_RESULT(yes)],
++        [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
++      )
++
++      PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
++    ], [
++      dnl failed to create a venv for some reason
++      AC_MSG_RESULT(no)
++      sage_spkg_install_$1=yes
++    ])
+ 
+-    PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
++    rm -rf config.venv
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 87646c3264a04ffd98a12d67074f93e1943a1e96 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:38:08 -0400
+Subject: Trac #29665: log SAGE_PYTHON_PACKAGE_CHECK() failures to config.log.
+
+---
+ m4/sage_python_package_check.m4 | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 7cbd6c0..e0e0b9f 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -47,7 +47,8 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
+                                         --clear                dnl
+                                         --without-pip          dnl
+-					config.venv], [
++                                        config.venv            dnl
++                                        2>&AS_MESSAGE_LOG_FD], [
+       AC_MSG_RESULT(yes)
+       dnl strip all comments from install-requires.txt; this should leave
+       dnl only a single line containing the version specification for this
+@@ -72,7 +73,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+         [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
+            "from setuptools.version import pkg_resources;              dnl
+             pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" dnl
+-	 2>/dev/null],
++	 2>&AS_MESSAGE_LOG_FD],
+         [AC_MSG_RESULT(yes)],
+         [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+       )
+-- 
+cgit v1.0-1-gd88e
+
+
+From f7dfffd1c64816e2ae4e0f420b22065c5c5bf2cb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:45:37 -0400
+Subject: Trac #29665: don't clobber a plain file named config.venv.
+
+When SAGE_PYTHON_PACKAGE_CHECK() is cleaning up, we no longer remove
+"config.venv" unconditionally. Instead, we remove it only if it is a
+directory. This is also how "pyvenv --clear" works.
+---
+ m4/sage_python_package_check.m4 | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index e0e0b9f..127a078 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -85,7 +85,9 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+       sage_spkg_install_$1=yes
+     ])
+ 
+-    rm -rf config.venv
++    dnl Clean up config.venv, but only if we could have created it.
++    dnl (The --clear flag to pyvenv will not clobber a plain file.)
++    AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9849c77313b895dcfb786d2ea54e36585bd31ce2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 16 Oct 2021 08:14:42 -0400
+Subject: Trac #29665: don't announce system python packages that won't be
+ used.
+
+When --enable-system-site-packages was not given, the python packages
+using SAGE_PYTHON_PACKAGE_CHECK() in spkg-configure.m4 cannot be used.
+Rather than suggest that users install them anyway, that macro now
+hacks the value of sage_use_system_$package to be "no" when the use
+of system site packages is disabled at the python level.
+---
+ m4/sage_python_package_check.m4 | 17 +++++++++++++++++
+ 1 file changed, 17 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 127a078..7ee82a7 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -89,6 +89,23 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     dnl (The --clear flag to pyvenv will not clobber a plain file.)
+     AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
++    dnl System site packages are disabled.
+     sage_spkg_install_$1=yes
++
++    dnl We have to retroactively hack the --with-system-foo={no,yes,force}
++    dnl mechanism here because it wasn't designed with the ability to
++    dnl disable arbitrary chunks of system packages in mind. The easy cases
++    dnl are "no" and "force" which require no action; "no" means we won't
++    dnl suggest the package anyway, and "force" will raise an error when
++    dnl the system-package check fails.
++    dnl
++    dnl The default of "yes" is more troubling because it is the default. To
++    dnl avoid prompting users to install packages that won't be used, we want
++    dnl to ignore "yes" when reporting the "hint: install these packages..."
++    dnl at the end of ./configure. To accomplish that, we change "yes" to
++    dnl "no" here, essentially changing the default for packages using this
++    dnl macro when --enable-system-site-packages is disabled. Packages with
++    dnl "no" are not suggested to the user.
++    AS_IF([test "${sage_use_system_$1}" = "yes"],[sage_use_system_$1=no])
+   ])
+ ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3e6ad737b94aaac234d615ecaf1a2455eb607f1a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 17 Oct 2021 06:16:21 -0400
+Subject: Trac #29665: add Gentoo package information for python packages.
+
+---
+ build/pkgs/babel/distros/gentoo.txt         | 1 +
+ build/pkgs/bleach/distros/gentoo.txt        | 1 +
+ build/pkgs/certifi/distros/gentoo.txt       | 1 +
+ build/pkgs/cvxopt/distros/gentoo.txt        | 1 +
+ build/pkgs/decorator/distros/gentoo.txt     | 1 +
+ build/pkgs/html5lib/distros/gentoo.txt      | 1 +
+ build/pkgs/idna/distros/gentoo.txt          | 1 +
+ build/pkgs/jinja2/distros/gentoo.txt        | 1 +
+ build/pkgs/matplotlib/distros/gentoo.txt    | 1 +
+ build/pkgs/mpmath/distros/gentoo.txt        | 1 +
+ build/pkgs/networkx/distros/gentoo.txt      | 1 +
+ build/pkgs/numpy/distros/gentoo.txt         | 1 +
+ build/pkgs/packaging/distros/gentoo.txt     | 1 +
+ build/pkgs/pandocfilters/distros/gentoo.txt | 1 +
+ build/pkgs/pickleshare/distros/gentoo.txt   | 1 +
+ build/pkgs/pillow/distros/gentoo.txt        | 1 +
+ build/pkgs/pluggy/distros/gentoo.txt        | 1 +
+ build/pkgs/pygments/distros/gentoo.txt      | 1 +
+ build/pkgs/pytz/distros/gentoo.txt          | 1 +
+ build/pkgs/pyzmq/distros/gentoo.txt         | 1 +
+ build/pkgs/requests/distros/gentoo.txt      | 1 +
+ build/pkgs/scipy/distros/gentoo.txt         | 1 +
+ build/pkgs/setuptools/distros/gentoo.txt    | 1 +
+ build/pkgs/six/distros/gentoo.txt           | 1 +
+ build/pkgs/sympy/distros/gentoo.txt         | 1 +
+ build/pkgs/texttable/distros/gentoo.txt     | 1 +
+ build/pkgs/toml/distros/gentoo.txt          | 1 +
+ build/pkgs/webencodings/distros/gentoo.txt  | 1 +
+ 28 files changed, 28 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/gentoo.txt
+ create mode 100644 build/pkgs/bleach/distros/gentoo.txt
+ create mode 100644 build/pkgs/certifi/distros/gentoo.txt
+ create mode 100644 build/pkgs/cvxopt/distros/gentoo.txt
+ create mode 100644 build/pkgs/decorator/distros/gentoo.txt
+ create mode 100644 build/pkgs/html5lib/distros/gentoo.txt
+ create mode 100644 build/pkgs/idna/distros/gentoo.txt
+ create mode 100644 build/pkgs/jinja2/distros/gentoo.txt
+ create mode 100644 build/pkgs/matplotlib/distros/gentoo.txt
+ create mode 100644 build/pkgs/mpmath/distros/gentoo.txt
+ create mode 100644 build/pkgs/networkx/distros/gentoo.txt
+ create mode 100644 build/pkgs/numpy/distros/gentoo.txt
+ create mode 100644 build/pkgs/packaging/distros/gentoo.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/gentoo.txt
+ create mode 100644 build/pkgs/pickleshare/distros/gentoo.txt
+ create mode 100644 build/pkgs/pillow/distros/gentoo.txt
+ create mode 100644 build/pkgs/pluggy/distros/gentoo.txt
+ create mode 100644 build/pkgs/pygments/distros/gentoo.txt
+ create mode 100644 build/pkgs/pytz/distros/gentoo.txt
+ create mode 100644 build/pkgs/pyzmq/distros/gentoo.txt
+ create mode 100644 build/pkgs/requests/distros/gentoo.txt
+ create mode 100644 build/pkgs/scipy/distros/gentoo.txt
+ create mode 100644 build/pkgs/setuptools/distros/gentoo.txt
+ create mode 100644 build/pkgs/six/distros/gentoo.txt
+ create mode 100644 build/pkgs/sympy/distros/gentoo.txt
+ create mode 100644 build/pkgs/texttable/distros/gentoo.txt
+ create mode 100644 build/pkgs/toml/distros/gentoo.txt
+ create mode 100644 build/pkgs/webencodings/distros/gentoo.txt
+
+diff --git a/build/pkgs/babel/distros/gentoo.txt b/build/pkgs/babel/distros/gentoo.txt
+new file mode 100644
+index 00000000..2d2c34f
+--- /dev/null
++++ b/build/pkgs/babel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/Babel
+diff --git a/build/pkgs/bleach/distros/gentoo.txt b/build/pkgs/bleach/distros/gentoo.txt
+new file mode 100644
+index 00000000..b4f9744
+--- /dev/null
++++ b/build/pkgs/bleach/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/bleach
+diff --git a/build/pkgs/certifi/distros/gentoo.txt b/build/pkgs/certifi/distros/gentoo.txt
+new file mode 100644
+index 00000000..72e2e91
+--- /dev/null
++++ b/build/pkgs/certifi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/certifi
+diff --git a/build/pkgs/cvxopt/distros/gentoo.txt b/build/pkgs/cvxopt/distros/gentoo.txt
+new file mode 100644
+index 00000000..b312391
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/cvxopt
+diff --git a/build/pkgs/decorator/distros/gentoo.txt b/build/pkgs/decorator/distros/gentoo.txt
+new file mode 100644
+index 00000000..fea5a67
+--- /dev/null
++++ b/build/pkgs/decorator/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/decorator
+diff --git a/build/pkgs/html5lib/distros/gentoo.txt b/build/pkgs/html5lib/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c2be76
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/html5lib
+diff --git a/build/pkgs/idna/distros/gentoo.txt b/build/pkgs/idna/distros/gentoo.txt
+new file mode 100644
+index 00000000..68ef51c
+--- /dev/null
++++ b/build/pkgs/idna/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/idna
+diff --git a/build/pkgs/jinja2/distros/gentoo.txt b/build/pkgs/jinja2/distros/gentoo.txt
+new file mode 100644
+index 00000000..15a27ae
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jinja
+diff --git a/build/pkgs/matplotlib/distros/gentoo.txt b/build/pkgs/matplotlib/distros/gentoo.txt
+new file mode 100644
+index 00000000..bcfefb5
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/matplotlib
+diff --git a/build/pkgs/mpmath/distros/gentoo.txt b/build/pkgs/mpmath/distros/gentoo.txt
+new file mode 100644
+index 00000000..946c62d
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/mpmath
+diff --git a/build/pkgs/networkx/distros/gentoo.txt b/build/pkgs/networkx/distros/gentoo.txt
+new file mode 100644
+index 00000000..dd97742
+--- /dev/null
++++ b/build/pkgs/networkx/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/networkx
+diff --git a/build/pkgs/numpy/distros/gentoo.txt b/build/pkgs/numpy/distros/gentoo.txt
+new file mode 100644
+index 00000000..d2179d4
+--- /dev/null
++++ b/build/pkgs/numpy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/numpy
+diff --git a/build/pkgs/packaging/distros/gentoo.txt b/build/pkgs/packaging/distros/gentoo.txt
+new file mode 100644
+index 00000000..e5309ed
+--- /dev/null
++++ b/build/pkgs/packaging/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/packaging
+diff --git a/build/pkgs/pandocfilters/distros/gentoo.txt b/build/pkgs/pandocfilters/distros/gentoo.txt
+new file mode 100644
+index 00000000..a726fda
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/gentoo.txt b/build/pkgs/pickleshare/distros/gentoo.txt
+new file mode 100644
+index 00000000..14fad0f
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pickleshare
+diff --git a/build/pkgs/pillow/distros/gentoo.txt b/build/pkgs/pillow/distros/gentoo.txt
+new file mode 100644
+index 00000000..1243649
+--- /dev/null
++++ b/build/pkgs/pillow/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pillow
+diff --git a/build/pkgs/pluggy/distros/gentoo.txt b/build/pkgs/pluggy/distros/gentoo.txt
+new file mode 100644
+index 00000000..7b33876
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pluggy
+diff --git a/build/pkgs/pygments/distros/gentoo.txt b/build/pkgs/pygments/distros/gentoo.txt
+new file mode 100644
+index 00000000..a584f32
+--- /dev/null
++++ b/build/pkgs/pygments/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pygments
+diff --git a/build/pkgs/pytz/distros/gentoo.txt b/build/pkgs/pytz/distros/gentoo.txt
+new file mode 100644
+index 00000000..902a18b
+--- /dev/null
++++ b/build/pkgs/pytz/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pytz
+diff --git a/build/pkgs/pyzmq/distros/gentoo.txt b/build/pkgs/pyzmq/distros/gentoo.txt
+new file mode 100644
+index 00000000..77c2429
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyzmq
+diff --git a/build/pkgs/requests/distros/gentoo.txt b/build/pkgs/requests/distros/gentoo.txt
+new file mode 100644
+index 00000000..d3dc941
+--- /dev/null
++++ b/build/pkgs/requests/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/requests
+diff --git a/build/pkgs/scipy/distros/gentoo.txt b/build/pkgs/scipy/distros/gentoo.txt
+new file mode 100644
+index 00000000..11dabd2
+--- /dev/null
++++ b/build/pkgs/scipy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/scipy
+diff --git a/build/pkgs/setuptools/distros/gentoo.txt b/build/pkgs/setuptools/distros/gentoo.txt
+new file mode 100644
+index 00000000..3a4fa34
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/setuptools
+diff --git a/build/pkgs/six/distros/gentoo.txt b/build/pkgs/six/distros/gentoo.txt
+new file mode 100644
+index 00000000..f73f648
+--- /dev/null
++++ b/build/pkgs/six/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/six
+diff --git a/build/pkgs/sympy/distros/gentoo.txt b/build/pkgs/sympy/distros/gentoo.txt
+new file mode 100644
+index 00000000..b5a5034
+--- /dev/null
++++ b/build/pkgs/sympy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sympy
+diff --git a/build/pkgs/texttable/distros/gentoo.txt b/build/pkgs/texttable/distros/gentoo.txt
+new file mode 100644
+index 00000000..b33a7a7
+--- /dev/null
++++ b/build/pkgs/texttable/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/texttable
+diff --git a/build/pkgs/toml/distros/gentoo.txt b/build/pkgs/toml/distros/gentoo.txt
+new file mode 100644
+index 00000000..64fcea3
+--- /dev/null
++++ b/build/pkgs/toml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/toml
+diff --git a/build/pkgs/webencodings/distros/gentoo.txt b/build/pkgs/webencodings/distros/gentoo.txt
+new file mode 100644
+index 00000000..7539b0f
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/webencodings
+-- 
+cgit v1.0-1-gd88e
+
+
+From 088380f884124c9608160b613ba031c5f023f604 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 18:43:04 -0700
+Subject: build/pkgs: Add distros/fedora.txt for Python packages
+
+---
+ build/pkgs/babel/distros/fedora.txt         | 1 +
+ build/pkgs/bleach/distros/fedora.txt        | 1 +
+ build/pkgs/certifi/distros/fedora.txt       | 1 +
+ build/pkgs/cvxopt/distros/fedora.txt        | 1 +
+ build/pkgs/decorator/distros/fedora.txt     | 1 +
+ build/pkgs/html5lib/distros/fedora.txt      | 1 +
+ build/pkgs/idna/distros/fedora.txt          | 1 +
+ build/pkgs/jinja2/distros/fedora.txt        | 1 +
+ build/pkgs/matplotlib/distros/fedora.txt    | 1 +
+ build/pkgs/mpmath/distros/fedora.txt        | 1 +
+ build/pkgs/networkx/distros/fedora.txt      | 1 +
+ build/pkgs/numpy/distros/fedora.txt         | 1 +
+ build/pkgs/packaging/distros/fedora.txt     | 1 +
+ build/pkgs/pandocfilters/distros/fedora.txt | 1 +
+ build/pkgs/pickleshare/distros/fedora.txt   | 1 +
+ build/pkgs/pillow/distros/fedora.txt        | 1 +
+ build/pkgs/pluggy/distros/fedora.txt        | 1 +
+ build/pkgs/py/distros/fedora.txt            | 1 +
+ build/pkgs/pygments/distros/fedora.txt      | 1 +
+ build/pkgs/pytz/distros/fedora.txt          | 1 +
+ build/pkgs/pyzmq/distros/fedora.txt         | 1 +
+ build/pkgs/requests/distros/fedora.txt      | 1 +
+ build/pkgs/scipy/distros/fedora.txt         | 1 +
+ build/pkgs/setuptools/distros/fedora.txt    | 1 +
+ build/pkgs/six/distros/fedora.txt           | 1 +
+ build/pkgs/sympy/distros/fedora.txt         | 1 +
+ build/pkgs/texttable/distros/fedora.txt     | 1 +
+ build/pkgs/toml/distros/fedora.txt          | 1 +
+ build/pkgs/webencodings/distros/fedora.txt  | 1 +
+ build/pkgs/wheel/distros/fedora.txt         | 1 +
+ 30 files changed, 30 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/fedora.txt
+ create mode 100644 build/pkgs/bleach/distros/fedora.txt
+ create mode 100644 build/pkgs/certifi/distros/fedora.txt
+ create mode 100644 build/pkgs/cvxopt/distros/fedora.txt
+ create mode 100644 build/pkgs/decorator/distros/fedora.txt
+ create mode 100644 build/pkgs/html5lib/distros/fedora.txt
+ create mode 100644 build/pkgs/idna/distros/fedora.txt
+ create mode 100644 build/pkgs/jinja2/distros/fedora.txt
+ create mode 100644 build/pkgs/matplotlib/distros/fedora.txt
+ create mode 100644 build/pkgs/mpmath/distros/fedora.txt
+ create mode 100644 build/pkgs/networkx/distros/fedora.txt
+ create mode 100644 build/pkgs/numpy/distros/fedora.txt
+ create mode 100644 build/pkgs/packaging/distros/fedora.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/fedora.txt
+ create mode 100644 build/pkgs/pickleshare/distros/fedora.txt
+ create mode 100644 build/pkgs/pillow/distros/fedora.txt
+ create mode 100644 build/pkgs/pluggy/distros/fedora.txt
+ create mode 100644 build/pkgs/py/distros/fedora.txt
+ create mode 100644 build/pkgs/pygments/distros/fedora.txt
+ create mode 100644 build/pkgs/pytz/distros/fedora.txt
+ create mode 100644 build/pkgs/pyzmq/distros/fedora.txt
+ create mode 100644 build/pkgs/requests/distros/fedora.txt
+ create mode 100644 build/pkgs/scipy/distros/fedora.txt
+ create mode 100644 build/pkgs/setuptools/distros/fedora.txt
+ create mode 100644 build/pkgs/six/distros/fedora.txt
+ create mode 100644 build/pkgs/sympy/distros/fedora.txt
+ create mode 100644 build/pkgs/texttable/distros/fedora.txt
+ create mode 100644 build/pkgs/toml/distros/fedora.txt
+ create mode 100644 build/pkgs/webencodings/distros/fedora.txt
+ create mode 100644 build/pkgs/wheel/distros/fedora.txt
+
+diff --git a/build/pkgs/babel/distros/fedora.txt b/build/pkgs/babel/distros/fedora.txt
+new file mode 100644
+index 00000000..98f6593
+--- /dev/null
++++ b/build/pkgs/babel/distros/fedora.txt
+@@ -0,0 +1 @@
++babel
+diff --git a/build/pkgs/bleach/distros/fedora.txt b/build/pkgs/bleach/distros/fedora.txt
+new file mode 100644
+index 00000000..c5422cc
+--- /dev/null
++++ b/build/pkgs/bleach/distros/fedora.txt
+@@ -0,0 +1 @@
++python-bleach
+diff --git a/build/pkgs/certifi/distros/fedora.txt b/build/pkgs/certifi/distros/fedora.txt
+new file mode 100644
+index 00000000..be421c8
+--- /dev/null
++++ b/build/pkgs/certifi/distros/fedora.txt
+@@ -0,0 +1 @@
++python-certifi
+diff --git a/build/pkgs/cvxopt/distros/fedora.txt b/build/pkgs/cvxopt/distros/fedora.txt
+new file mode 100644
+index 00000000..f15770f
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/fedora.txt
+@@ -0,0 +1 @@
++python-cvxopt
+diff --git a/build/pkgs/decorator/distros/fedora.txt b/build/pkgs/decorator/distros/fedora.txt
+new file mode 100644
+index 00000000..0795604
+--- /dev/null
++++ b/build/pkgs/decorator/distros/fedora.txt
+@@ -0,0 +1 @@
++python-decorator
+diff --git a/build/pkgs/html5lib/distros/fedora.txt b/build/pkgs/html5lib/distros/fedora.txt
+new file mode 100644
+index 00000000..b821491
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/fedora.txt
+@@ -0,0 +1 @@
++python-html5lib
+diff --git a/build/pkgs/idna/distros/fedora.txt b/build/pkgs/idna/distros/fedora.txt
+new file mode 100644
+index 00000000..a73e70c
+--- /dev/null
++++ b/build/pkgs/idna/distros/fedora.txt
+@@ -0,0 +1 @@
++python-idna
+diff --git a/build/pkgs/jinja2/distros/fedora.txt b/build/pkgs/jinja2/distros/fedora.txt
+new file mode 100644
+index 00000000..f5f3caf
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/fedora.txt
+@@ -0,0 +1 @@
++python-jinja2
+diff --git a/build/pkgs/matplotlib/distros/fedora.txt b/build/pkgs/matplotlib/distros/fedora.txt
+new file mode 100644
+index 00000000..f6d856e
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/fedora.txt
+@@ -0,0 +1 @@
++python-matplotlib
+diff --git a/build/pkgs/mpmath/distros/fedora.txt b/build/pkgs/mpmath/distros/fedora.txt
+new file mode 100644
+index 00000000..a7dc8d5
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/fedora.txt
+@@ -0,0 +1 @@
++python-mpmath
+diff --git a/build/pkgs/networkx/distros/fedora.txt b/build/pkgs/networkx/distros/fedora.txt
+new file mode 100644
+index 00000000..293f943
+--- /dev/null
++++ b/build/pkgs/networkx/distros/fedora.txt
+@@ -0,0 +1 @@
++python-networkx
+diff --git a/build/pkgs/numpy/distros/fedora.txt b/build/pkgs/numpy/distros/fedora.txt
+new file mode 100644
+index 00000000..c8722b9
+--- /dev/null
++++ b/build/pkgs/numpy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-numpy
+diff --git a/build/pkgs/packaging/distros/fedora.txt b/build/pkgs/packaging/distros/fedora.txt
+new file mode 100644
+index 00000000..02ad855
+--- /dev/null
++++ b/build/pkgs/packaging/distros/fedora.txt
+@@ -0,0 +1 @@
++python-packaging
+diff --git a/build/pkgs/pandocfilters/distros/fedora.txt b/build/pkgs/pandocfilters/distros/fedora.txt
+new file mode 100644
+index 00000000..e7a86d0
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/fedora.txt b/build/pkgs/pickleshare/distros/fedora.txt
+new file mode 100644
+index 00000000..6d991a2
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pickleshare
+diff --git a/build/pkgs/pillow/distros/fedora.txt b/build/pkgs/pillow/distros/fedora.txt
+new file mode 100644
+index 00000000..86dbb1d
+--- /dev/null
++++ b/build/pkgs/pillow/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pillow
+diff --git a/build/pkgs/pluggy/distros/fedora.txt b/build/pkgs/pluggy/distros/fedora.txt
+new file mode 100644
+index 00000000..c869e54
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pluggy
+diff --git a/build/pkgs/py/distros/fedora.txt b/build/pkgs/py/distros/fedora.txt
+new file mode 100644
+index 00000000..b348d39
+--- /dev/null
++++ b/build/pkgs/py/distros/fedora.txt
+@@ -0,0 +1 @@
++python-py
+diff --git a/build/pkgs/pygments/distros/fedora.txt b/build/pkgs/pygments/distros/fedora.txt
+new file mode 100644
+index 00000000..f3e72a8
+--- /dev/null
++++ b/build/pkgs/pygments/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pygments
+diff --git a/build/pkgs/pytz/distros/fedora.txt b/build/pkgs/pytz/distros/fedora.txt
+new file mode 100644
+index 00000000..2cccc9e
+--- /dev/null
++++ b/build/pkgs/pytz/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pytz
+diff --git a/build/pkgs/pyzmq/distros/fedora.txt b/build/pkgs/pyzmq/distros/fedora.txt
+new file mode 100644
+index 00000000..23f64d1
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pyzmq
+diff --git a/build/pkgs/requests/distros/fedora.txt b/build/pkgs/requests/distros/fedora.txt
+new file mode 100644
+index 00000000..93a7bc1
+--- /dev/null
++++ b/build/pkgs/requests/distros/fedora.txt
+@@ -0,0 +1 @@
++python-requests
+diff --git a/build/pkgs/scipy/distros/fedora.txt b/build/pkgs/scipy/distros/fedora.txt
+new file mode 100644
+index 00000000..7ff2882
+--- /dev/null
++++ b/build/pkgs/scipy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-scipy
+diff --git a/build/pkgs/setuptools/distros/fedora.txt b/build/pkgs/setuptools/distros/fedora.txt
+new file mode 100644
+index 00000000..e1ad178
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/fedora.txt
+@@ -0,0 +1 @@
++python-setuptools
+diff --git a/build/pkgs/six/distros/fedora.txt b/build/pkgs/six/distros/fedora.txt
+new file mode 100644
+index 00000000..787c530
+--- /dev/null
++++ b/build/pkgs/six/distros/fedora.txt
+@@ -0,0 +1 @@
++python-six
+diff --git a/build/pkgs/sympy/distros/fedora.txt b/build/pkgs/sympy/distros/fedora.txt
+new file mode 100644
+index 00000000..126c88a
+--- /dev/null
++++ b/build/pkgs/sympy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-sympy
+diff --git a/build/pkgs/texttable/distros/fedora.txt b/build/pkgs/texttable/distros/fedora.txt
+new file mode 100644
+index 00000000..8d1ccec
+--- /dev/null
++++ b/build/pkgs/texttable/distros/fedora.txt
+@@ -0,0 +1 @@
++python-texttable
+diff --git a/build/pkgs/toml/distros/fedora.txt b/build/pkgs/toml/distros/fedora.txt
+new file mode 100644
+index 00000000..821ee77
+--- /dev/null
++++ b/build/pkgs/toml/distros/fedora.txt
+@@ -0,0 +1 @@
++python-toml
+diff --git a/build/pkgs/webencodings/distros/fedora.txt b/build/pkgs/webencodings/distros/fedora.txt
+new file mode 100644
+index 00000000..12ddba9
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/fedora.txt
+@@ -0,0 +1 @@
++python-webencodings
+diff --git a/build/pkgs/wheel/distros/fedora.txt b/build/pkgs/wheel/distros/fedora.txt
+new file mode 100644
+index 00000000..ae4cbb9
+--- /dev/null
++++ b/build/pkgs/wheel/distros/fedora.txt
+@@ -0,0 +1 @@
++python-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From ad1d5a20380b147c774903066031442f31094626 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 21:04:04 -0700
+Subject: build/pkgs: Add distros/arch.txt for Python packages
+
+---
+ build/pkgs/babel/distros/arch.txt         | 1 +
+ build/pkgs/bleach/distros/arch.txt        | 1 +
+ build/pkgs/certifi/distros/arch.txt       | 1 +
+ build/pkgs/cvxopt/distros/arch.txt        | 1 +
+ build/pkgs/decorator/distros/arch.txt     | 1 +
+ build/pkgs/html5lib/distros/arch.txt      | 1 +
+ build/pkgs/idna/distros/arch.txt          | 1 +
+ build/pkgs/matplotlib/distros/arch.txt    | 1 +
+ build/pkgs/mpmath/distros/arch.txt        | 1 +
+ build/pkgs/networkx/distros/arch.txt      | 1 +
+ build/pkgs/numpy/distros/arch.txt         | 1 +
+ build/pkgs/packaging/distros/arch.txt     | 1 +
+ build/pkgs/pandocfilters/distros/arch.txt | 1 +
+ build/pkgs/pickleshare/distros/arch.txt   | 1 +
+ build/pkgs/pillow/distros/arch.txt        | 1 +
+ build/pkgs/pluggy/distros/arch.txt        | 1 +
+ build/pkgs/py/distros/arch.txt            | 1 +
+ build/pkgs/pygments/distros/arch.txt      | 1 +
+ build/pkgs/pytz/distros/arch.txt          | 1 +
+ build/pkgs/pyzmq/distros/arch.txt         | 1 +
+ build/pkgs/requests/distros/arch.txt      | 1 +
+ build/pkgs/scipy/distros/arch.txt         | 1 +
+ build/pkgs/setuptools/distros/arch.txt    | 1 +
+ build/pkgs/six/distros/arch.txt           | 1 +
+ build/pkgs/sympy/distros/arch.txt         | 1 +
+ build/pkgs/texttable/distros/arch.txt     | 1 +
+ build/pkgs/toml/distros/arch.txt          | 1 +
+ build/pkgs/webencodings/distros/arch.txt  | 1 +
+ build/pkgs/wheel/distros/arch.txt         | 1 +
+ 29 files changed, 29 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/arch.txt
+ create mode 100644 build/pkgs/bleach/distros/arch.txt
+ create mode 100644 build/pkgs/certifi/distros/arch.txt
+ create mode 100644 build/pkgs/cvxopt/distros/arch.txt
+ create mode 100644 build/pkgs/decorator/distros/arch.txt
+ create mode 100644 build/pkgs/html5lib/distros/arch.txt
+ create mode 100644 build/pkgs/idna/distros/arch.txt
+ create mode 100644 build/pkgs/matplotlib/distros/arch.txt
+ create mode 100644 build/pkgs/mpmath/distros/arch.txt
+ create mode 100644 build/pkgs/networkx/distros/arch.txt
+ create mode 100644 build/pkgs/numpy/distros/arch.txt
+ create mode 100644 build/pkgs/packaging/distros/arch.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/arch.txt
+ create mode 100644 build/pkgs/pickleshare/distros/arch.txt
+ create mode 100644 build/pkgs/pillow/distros/arch.txt
+ create mode 100644 build/pkgs/pluggy/distros/arch.txt
+ create mode 100644 build/pkgs/py/distros/arch.txt
+ create mode 100644 build/pkgs/pygments/distros/arch.txt
+ create mode 100644 build/pkgs/pytz/distros/arch.txt
+ create mode 100644 build/pkgs/pyzmq/distros/arch.txt
+ create mode 100644 build/pkgs/requests/distros/arch.txt
+ create mode 100644 build/pkgs/scipy/distros/arch.txt
+ create mode 100644 build/pkgs/setuptools/distros/arch.txt
+ create mode 100644 build/pkgs/six/distros/arch.txt
+ create mode 100644 build/pkgs/sympy/distros/arch.txt
+ create mode 100644 build/pkgs/texttable/distros/arch.txt
+ create mode 100644 build/pkgs/toml/distros/arch.txt
+ create mode 100644 build/pkgs/webencodings/distros/arch.txt
+ create mode 100644 build/pkgs/wheel/distros/arch.txt
+
+diff --git a/build/pkgs/babel/distros/arch.txt b/build/pkgs/babel/distros/arch.txt
+new file mode 100644
+index 00000000..f2d828c
+--- /dev/null
++++ b/build/pkgs/babel/distros/arch.txt
+@@ -0,0 +1 @@
++python-babel
+diff --git a/build/pkgs/bleach/distros/arch.txt b/build/pkgs/bleach/distros/arch.txt
+new file mode 100644
+index 00000000..c5422cc
+--- /dev/null
++++ b/build/pkgs/bleach/distros/arch.txt
+@@ -0,0 +1 @@
++python-bleach
+diff --git a/build/pkgs/certifi/distros/arch.txt b/build/pkgs/certifi/distros/arch.txt
+new file mode 100644
+index 00000000..be421c8
+--- /dev/null
++++ b/build/pkgs/certifi/distros/arch.txt
+@@ -0,0 +1 @@
++python-certifi
+diff --git a/build/pkgs/cvxopt/distros/arch.txt b/build/pkgs/cvxopt/distros/arch.txt
+new file mode 100644
+index 00000000..f15770f
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/arch.txt
+@@ -0,0 +1 @@
++python-cvxopt
+diff --git a/build/pkgs/decorator/distros/arch.txt b/build/pkgs/decorator/distros/arch.txt
+new file mode 100644
+index 00000000..0795604
+--- /dev/null
++++ b/build/pkgs/decorator/distros/arch.txt
+@@ -0,0 +1 @@
++python-decorator
+diff --git a/build/pkgs/html5lib/distros/arch.txt b/build/pkgs/html5lib/distros/arch.txt
+new file mode 100644
+index 00000000..b821491
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/arch.txt
+@@ -0,0 +1 @@
++python-html5lib
+diff --git a/build/pkgs/idna/distros/arch.txt b/build/pkgs/idna/distros/arch.txt
+new file mode 100644
+index 00000000..a73e70c
+--- /dev/null
++++ b/build/pkgs/idna/distros/arch.txt
+@@ -0,0 +1 @@
++python-idna
+diff --git a/build/pkgs/matplotlib/distros/arch.txt b/build/pkgs/matplotlib/distros/arch.txt
+new file mode 100644
+index 00000000..f6d856e
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/arch.txt
+@@ -0,0 +1 @@
++python-matplotlib
+diff --git a/build/pkgs/mpmath/distros/arch.txt b/build/pkgs/mpmath/distros/arch.txt
+new file mode 100644
+index 00000000..a7dc8d5
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/arch.txt
+@@ -0,0 +1 @@
++python-mpmath
+diff --git a/build/pkgs/networkx/distros/arch.txt b/build/pkgs/networkx/distros/arch.txt
+new file mode 100644
+index 00000000..293f943
+--- /dev/null
++++ b/build/pkgs/networkx/distros/arch.txt
+@@ -0,0 +1 @@
++python-networkx
+diff --git a/build/pkgs/numpy/distros/arch.txt b/build/pkgs/numpy/distros/arch.txt
+new file mode 100644
+index 00000000..c8722b9
+--- /dev/null
++++ b/build/pkgs/numpy/distros/arch.txt
+@@ -0,0 +1 @@
++python-numpy
+diff --git a/build/pkgs/packaging/distros/arch.txt b/build/pkgs/packaging/distros/arch.txt
+new file mode 100644
+index 00000000..02ad855
+--- /dev/null
++++ b/build/pkgs/packaging/distros/arch.txt
+@@ -0,0 +1 @@
++python-packaging
+diff --git a/build/pkgs/pandocfilters/distros/arch.txt b/build/pkgs/pandocfilters/distros/arch.txt
+new file mode 100644
+index 00000000..e7a86d0
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/arch.txt
+@@ -0,0 +1 @@
++python-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/arch.txt b/build/pkgs/pickleshare/distros/arch.txt
+new file mode 100644
+index 00000000..6d991a2
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/arch.txt
+@@ -0,0 +1 @@
++python-pickleshare
+diff --git a/build/pkgs/pillow/distros/arch.txt b/build/pkgs/pillow/distros/arch.txt
+new file mode 100644
+index 00000000..86dbb1d
+--- /dev/null
++++ b/build/pkgs/pillow/distros/arch.txt
+@@ -0,0 +1 @@
++python-pillow
+diff --git a/build/pkgs/pluggy/distros/arch.txt b/build/pkgs/pluggy/distros/arch.txt
+new file mode 100644
+index 00000000..c869e54
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/arch.txt
+@@ -0,0 +1 @@
++python-pluggy
+diff --git a/build/pkgs/py/distros/arch.txt b/build/pkgs/py/distros/arch.txt
+new file mode 100644
+index 00000000..b348d39
+--- /dev/null
++++ b/build/pkgs/py/distros/arch.txt
+@@ -0,0 +1 @@
++python-py
+diff --git a/build/pkgs/pygments/distros/arch.txt b/build/pkgs/pygments/distros/arch.txt
+new file mode 100644
+index 00000000..f3e72a8
+--- /dev/null
++++ b/build/pkgs/pygments/distros/arch.txt
+@@ -0,0 +1 @@
++python-pygments
+diff --git a/build/pkgs/pytz/distros/arch.txt b/build/pkgs/pytz/distros/arch.txt
+new file mode 100644
+index 00000000..2cccc9e
+--- /dev/null
++++ b/build/pkgs/pytz/distros/arch.txt
+@@ -0,0 +1 @@
++python-pytz
+diff --git a/build/pkgs/pyzmq/distros/arch.txt b/build/pkgs/pyzmq/distros/arch.txt
+new file mode 100644
+index 00000000..23f64d1
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/arch.txt
+@@ -0,0 +1 @@
++python-pyzmq
+diff --git a/build/pkgs/requests/distros/arch.txt b/build/pkgs/requests/distros/arch.txt
+new file mode 100644
+index 00000000..93a7bc1
+--- /dev/null
++++ b/build/pkgs/requests/distros/arch.txt
+@@ -0,0 +1 @@
++python-requests
+diff --git a/build/pkgs/scipy/distros/arch.txt b/build/pkgs/scipy/distros/arch.txt
+new file mode 100644
+index 00000000..7ff2882
+--- /dev/null
++++ b/build/pkgs/scipy/distros/arch.txt
+@@ -0,0 +1 @@
++python-scipy
+diff --git a/build/pkgs/setuptools/distros/arch.txt b/build/pkgs/setuptools/distros/arch.txt
+new file mode 100644
+index 00000000..e1ad178
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/arch.txt
+@@ -0,0 +1 @@
++python-setuptools
+diff --git a/build/pkgs/six/distros/arch.txt b/build/pkgs/six/distros/arch.txt
+new file mode 100644
+index 00000000..787c530
+--- /dev/null
++++ b/build/pkgs/six/distros/arch.txt
+@@ -0,0 +1 @@
++python-six
+diff --git a/build/pkgs/sympy/distros/arch.txt b/build/pkgs/sympy/distros/arch.txt
+new file mode 100644
+index 00000000..126c88a
+--- /dev/null
++++ b/build/pkgs/sympy/distros/arch.txt
+@@ -0,0 +1 @@
++python-sympy
+diff --git a/build/pkgs/texttable/distros/arch.txt b/build/pkgs/texttable/distros/arch.txt
+new file mode 100644
+index 00000000..8d1ccec
+--- /dev/null
++++ b/build/pkgs/texttable/distros/arch.txt
+@@ -0,0 +1 @@
++python-texttable
+diff --git a/build/pkgs/toml/distros/arch.txt b/build/pkgs/toml/distros/arch.txt
+new file mode 100644
+index 00000000..821ee77
+--- /dev/null
++++ b/build/pkgs/toml/distros/arch.txt
+@@ -0,0 +1 @@
++python-toml
+diff --git a/build/pkgs/webencodings/distros/arch.txt b/build/pkgs/webencodings/distros/arch.txt
+new file mode 100644
+index 00000000..12ddba9
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/arch.txt
+@@ -0,0 +1 @@
++python-webencodings
+diff --git a/build/pkgs/wheel/distros/arch.txt b/build/pkgs/wheel/distros/arch.txt
+new file mode 100644
+index 00000000..ae4cbb9
+--- /dev/null
++++ b/build/pkgs/wheel/distros/arch.txt
+@@ -0,0 +1 @@
++python-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5087abee08f2a89ddaf422ec72a84575fe724a79 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 21:20:56 -0700
+Subject: build/pkgs: Add distros/opensuse.txt for Python packages
+
+---
+ build/pkgs/bleach/distros/opensuse.txt        | 1 +
+ build/pkgs/cvxopt/distros/opensuse.txt        | 1 +
+ build/pkgs/html5lib/distros/opensuse.txt      | 1 +
+ build/pkgs/idna/distros/opensuse.txt          | 1 +
+ build/pkgs/jinja2/distros/opensuse.txt        | 2 +-
+ build/pkgs/mpmath/distros/opensuse.txt        | 1 +
+ build/pkgs/numpy/distros/opensuse.txt         | 1 +
+ build/pkgs/packaging/distros/opensuse.txt     | 1 +
+ build/pkgs/pandocfilters/distros/opensuse.txt | 1 +
+ build/pkgs/pluggy/distros/opensuse.txt        | 1 +
+ build/pkgs/py/distros/opensuse.txt            | 1 +
+ build/pkgs/pygments/distros/opensuse.txt      | 2 +-
+ build/pkgs/sympy/distros/opensuse.txt         | 1 +
+ build/pkgs/texttable/distros/opensuse.txt     | 1 +
+ build/pkgs/toml/distros/opensuse.txt          | 1 +
+ 15 files changed, 15 insertions(+), 2 deletions(-)
+ create mode 100644 build/pkgs/bleach/distros/opensuse.txt
+ create mode 100644 build/pkgs/cvxopt/distros/opensuse.txt
+ create mode 100644 build/pkgs/html5lib/distros/opensuse.txt
+ create mode 100644 build/pkgs/idna/distros/opensuse.txt
+ create mode 100644 build/pkgs/mpmath/distros/opensuse.txt
+ create mode 100644 build/pkgs/numpy/distros/opensuse.txt
+ create mode 100644 build/pkgs/packaging/distros/opensuse.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/opensuse.txt
+ create mode 100644 build/pkgs/pluggy/distros/opensuse.txt
+ create mode 100644 build/pkgs/py/distros/opensuse.txt
+ create mode 100644 build/pkgs/sympy/distros/opensuse.txt
+ create mode 100644 build/pkgs/texttable/distros/opensuse.txt
+ create mode 100644 build/pkgs/toml/distros/opensuse.txt
+
+diff --git a/build/pkgs/bleach/distros/opensuse.txt b/build/pkgs/bleach/distros/opensuse.txt
+new file mode 100644
+index 00000000..6d37c4c
+--- /dev/null
++++ b/build/pkgs/bleach/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-bleach
+diff --git a/build/pkgs/cvxopt/distros/opensuse.txt b/build/pkgs/cvxopt/distros/opensuse.txt
+new file mode 100644
+index 00000000..2bb6ad1
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-cvxopt
+diff --git a/build/pkgs/html5lib/distros/opensuse.txt b/build/pkgs/html5lib/distros/opensuse.txt
+new file mode 100644
+index 00000000..6d7b8df
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-html5lib
+diff --git a/build/pkgs/idna/distros/opensuse.txt b/build/pkgs/idna/distros/opensuse.txt
+new file mode 100644
+index 00000000..de48e70
+--- /dev/null
++++ b/build/pkgs/idna/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-idna
+diff --git a/build/pkgs/jinja2/distros/opensuse.txt b/build/pkgs/jinja2/distros/opensuse.txt
+index 5d90a22..f2db865 100644
+--- a/build/pkgs/jinja2/distros/opensuse.txt
++++ b/build/pkgs/jinja2/distros/opensuse.txt
+@@ -1 +1 @@
+-python3-Jinja2
++python3-jinja2
+diff --git a/build/pkgs/mpmath/distros/opensuse.txt b/build/pkgs/mpmath/distros/opensuse.txt
+new file mode 100644
+index 00000000..fbc82a9
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-mpmath
+diff --git a/build/pkgs/numpy/distros/opensuse.txt b/build/pkgs/numpy/distros/opensuse.txt
+new file mode 100644
+index 00000000..79d5c5a
+--- /dev/null
++++ b/build/pkgs/numpy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-numpy
+diff --git a/build/pkgs/packaging/distros/opensuse.txt b/build/pkgs/packaging/distros/opensuse.txt
+new file mode 100644
+index 00000000..8f1c0ff
+--- /dev/null
++++ b/build/pkgs/packaging/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-packaging
+diff --git a/build/pkgs/pandocfilters/distros/opensuse.txt b/build/pkgs/pandocfilters/distros/opensuse.txt
+new file mode 100644
+index 00000000..d0d4c24
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-pandocfilters
+diff --git a/build/pkgs/pluggy/distros/opensuse.txt b/build/pkgs/pluggy/distros/opensuse.txt
+new file mode 100644
+index 00000000..43a3acf
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-pluggy
+diff --git a/build/pkgs/py/distros/opensuse.txt b/build/pkgs/py/distros/opensuse.txt
+new file mode 100644
+index 00000000..81fefe6
+--- /dev/null
++++ b/build/pkgs/py/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-py
+diff --git a/build/pkgs/pygments/distros/opensuse.txt b/build/pkgs/pygments/distros/opensuse.txt
+index 9ff5740..3ab3792 100644
+--- a/build/pkgs/pygments/distros/opensuse.txt
++++ b/build/pkgs/pygments/distros/opensuse.txt
+@@ -1 +1 @@
+-python3-Pygments
++python3-pygments
+diff --git a/build/pkgs/sympy/distros/opensuse.txt b/build/pkgs/sympy/distros/opensuse.txt
+new file mode 100644
+index 00000000..db423c8
+--- /dev/null
++++ b/build/pkgs/sympy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-sympy
+diff --git a/build/pkgs/texttable/distros/opensuse.txt b/build/pkgs/texttable/distros/opensuse.txt
+new file mode 100644
+index 00000000..8f8e7e2
+--- /dev/null
++++ b/build/pkgs/texttable/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-texttable
+diff --git a/build/pkgs/toml/distros/opensuse.txt b/build/pkgs/toml/distros/opensuse.txt
+new file mode 100644
+index 00000000..543e89d
+--- /dev/null
++++ b/build/pkgs/toml/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-toml
+-- 
+cgit v1.0-1-gd88e
+
+
+From a480ba7ace1370d106ae831e904ea22b72af1be7 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 22:45:04 -0700
+Subject: build/pkgs: Add distros/debian.txt for Python packages
+
+---
+ build/pkgs/babel/distros/debian.txt         | 1 +
+ build/pkgs/bleach/distros/debian.txt        | 1 +
+ build/pkgs/certifi/distros/debian.txt       | 1 +
+ build/pkgs/cvxopt/distros/debian.txt        | 1 +
+ build/pkgs/decorator/distros/debian.txt     | 1 +
+ build/pkgs/html5lib/distros/debian.txt      | 1 +
+ build/pkgs/idna/distros/debian.txt          | 1 +
+ build/pkgs/jinja2/distros/debian.txt        | 1 +
+ build/pkgs/matplotlib/distros/debian.txt    | 1 +
+ build/pkgs/mpmath/distros/debian.txt        | 1 +
+ build/pkgs/networkx/distros/debian.txt      | 1 +
+ build/pkgs/numpy/distros/debian.txt         | 1 +
+ build/pkgs/packaging/distros/debian.txt     | 1 +
+ build/pkgs/pandocfilters/distros/debian.txt | 1 +
+ build/pkgs/pickleshare/distros/debian.txt   | 1 +
+ build/pkgs/pillow/distros/debian.txt        | 1 +
+ build/pkgs/pluggy/distros/debian.txt        | 1 +
+ build/pkgs/py/distros/debian.txt            | 1 +
+ build/pkgs/pygments/distros/debian.txt      | 1 +
+ build/pkgs/pytz/distros/debian.txt          | 1 +
+ build/pkgs/requests/distros/debian.txt      | 1 +
+ build/pkgs/scipy/distros/debian.txt         | 1 +
+ build/pkgs/setuptools/distros/debian.txt    | 1 +
+ build/pkgs/six/distros/debian.txt           | 1 +
+ build/pkgs/sympy/distros/debian.txt         | 1 +
+ build/pkgs/texttable/distros/debian.txt     | 1 +
+ build/pkgs/toml/distros/debian.txt          | 1 +
+ build/pkgs/webencodings/distros/debian.txt  | 1 +
+ build/pkgs/wheel/distros/debian.txt         | 1 +
+ 29 files changed, 29 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/debian.txt
+ create mode 100644 build/pkgs/bleach/distros/debian.txt
+ create mode 100644 build/pkgs/certifi/distros/debian.txt
+ create mode 100644 build/pkgs/cvxopt/distros/debian.txt
+ create mode 100644 build/pkgs/decorator/distros/debian.txt
+ create mode 100644 build/pkgs/html5lib/distros/debian.txt
+ create mode 100644 build/pkgs/idna/distros/debian.txt
+ create mode 100644 build/pkgs/jinja2/distros/debian.txt
+ create mode 100644 build/pkgs/matplotlib/distros/debian.txt
+ create mode 100644 build/pkgs/mpmath/distros/debian.txt
+ create mode 100644 build/pkgs/networkx/distros/debian.txt
+ create mode 100644 build/pkgs/numpy/distros/debian.txt
+ create mode 100644 build/pkgs/packaging/distros/debian.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/debian.txt
+ create mode 100644 build/pkgs/pickleshare/distros/debian.txt
+ create mode 100644 build/pkgs/pillow/distros/debian.txt
+ create mode 100644 build/pkgs/pluggy/distros/debian.txt
+ create mode 100644 build/pkgs/py/distros/debian.txt
+ create mode 100644 build/pkgs/pygments/distros/debian.txt
+ create mode 100644 build/pkgs/pytz/distros/debian.txt
+ create mode 100644 build/pkgs/requests/distros/debian.txt
+ create mode 100644 build/pkgs/scipy/distros/debian.txt
+ create mode 100644 build/pkgs/setuptools/distros/debian.txt
+ create mode 100644 build/pkgs/six/distros/debian.txt
+ create mode 100644 build/pkgs/sympy/distros/debian.txt
+ create mode 100644 build/pkgs/texttable/distros/debian.txt
+ create mode 100644 build/pkgs/toml/distros/debian.txt
+ create mode 100644 build/pkgs/webencodings/distros/debian.txt
+ create mode 100644 build/pkgs/wheel/distros/debian.txt
+
+diff --git a/build/pkgs/babel/distros/debian.txt b/build/pkgs/babel/distros/debian.txt
+new file mode 100644
+index 00000000..e623eb6
+--- /dev/null
++++ b/build/pkgs/babel/distros/debian.txt
+@@ -0,0 +1 @@
++python3-babel
+diff --git a/build/pkgs/bleach/distros/debian.txt b/build/pkgs/bleach/distros/debian.txt
+new file mode 100644
+index 00000000..6d37c4c
+--- /dev/null
++++ b/build/pkgs/bleach/distros/debian.txt
+@@ -0,0 +1 @@
++python3-bleach
+diff --git a/build/pkgs/certifi/distros/debian.txt b/build/pkgs/certifi/distros/debian.txt
+new file mode 100644
+index 00000000..f585a82
+--- /dev/null
++++ b/build/pkgs/certifi/distros/debian.txt
+@@ -0,0 +1 @@
++python3-certifi
+diff --git a/build/pkgs/cvxopt/distros/debian.txt b/build/pkgs/cvxopt/distros/debian.txt
+new file mode 100644
+index 00000000..2bb6ad1
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/debian.txt
+@@ -0,0 +1 @@
++python3-cvxopt
+diff --git a/build/pkgs/decorator/distros/debian.txt b/build/pkgs/decorator/distros/debian.txt
+new file mode 100644
+index 00000000..46c478e
+--- /dev/null
++++ b/build/pkgs/decorator/distros/debian.txt
+@@ -0,0 +1 @@
++python3-decorator
+diff --git a/build/pkgs/html5lib/distros/debian.txt b/build/pkgs/html5lib/distros/debian.txt
+new file mode 100644
+index 00000000..6d7b8df
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/debian.txt
+@@ -0,0 +1 @@
++python3-html5lib
+diff --git a/build/pkgs/idna/distros/debian.txt b/build/pkgs/idna/distros/debian.txt
+new file mode 100644
+index 00000000..de48e70
+--- /dev/null
++++ b/build/pkgs/idna/distros/debian.txt
+@@ -0,0 +1 @@
++python3-idna
+diff --git a/build/pkgs/jinja2/distros/debian.txt b/build/pkgs/jinja2/distros/debian.txt
+new file mode 100644
+index 00000000..f2db865
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/debian.txt
+@@ -0,0 +1 @@
++python3-jinja2
+diff --git a/build/pkgs/matplotlib/distros/debian.txt b/build/pkgs/matplotlib/distros/debian.txt
+new file mode 100644
+index 00000000..1374329
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/debian.txt
+@@ -0,0 +1 @@
++python3-matplotlib
+diff --git a/build/pkgs/mpmath/distros/debian.txt b/build/pkgs/mpmath/distros/debian.txt
+new file mode 100644
+index 00000000..fbc82a9
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/debian.txt
+@@ -0,0 +1 @@
++python3-mpmath
+diff --git a/build/pkgs/networkx/distros/debian.txt b/build/pkgs/networkx/distros/debian.txt
+new file mode 100644
+index 00000000..6779066
+--- /dev/null
++++ b/build/pkgs/networkx/distros/debian.txt
+@@ -0,0 +1 @@
++python3-networkx
+diff --git a/build/pkgs/numpy/distros/debian.txt b/build/pkgs/numpy/distros/debian.txt
+new file mode 100644
+index 00000000..79d5c5a
+--- /dev/null
++++ b/build/pkgs/numpy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-numpy
+diff --git a/build/pkgs/packaging/distros/debian.txt b/build/pkgs/packaging/distros/debian.txt
+new file mode 100644
+index 00000000..8f1c0ff
+--- /dev/null
++++ b/build/pkgs/packaging/distros/debian.txt
+@@ -0,0 +1 @@
++python3-packaging
+diff --git a/build/pkgs/pandocfilters/distros/debian.txt b/build/pkgs/pandocfilters/distros/debian.txt
+new file mode 100644
+index 00000000..d0d4c24
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/debian.txt b/build/pkgs/pickleshare/distros/debian.txt
+new file mode 100644
+index 00000000..a00907d
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pickleshare
+diff --git a/build/pkgs/pillow/distros/debian.txt b/build/pkgs/pillow/distros/debian.txt
+new file mode 100644
+index 00000000..3319fcd
+--- /dev/null
++++ b/build/pkgs/pillow/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pillow
+diff --git a/build/pkgs/pluggy/distros/debian.txt b/build/pkgs/pluggy/distros/debian.txt
+new file mode 100644
+index 00000000..43a3acf
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pluggy
+diff --git a/build/pkgs/py/distros/debian.txt b/build/pkgs/py/distros/debian.txt
+new file mode 100644
+index 00000000..81fefe6
+--- /dev/null
++++ b/build/pkgs/py/distros/debian.txt
+@@ -0,0 +1 @@
++python3-py
+diff --git a/build/pkgs/pygments/distros/debian.txt b/build/pkgs/pygments/distros/debian.txt
+new file mode 100644
+index 00000000..3ab3792
+--- /dev/null
++++ b/build/pkgs/pygments/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pygments
+diff --git a/build/pkgs/pytz/distros/debian.txt b/build/pkgs/pytz/distros/debian.txt
+new file mode 100644
+index 00000000..db20908
+--- /dev/null
++++ b/build/pkgs/pytz/distros/debian.txt
+@@ -0,0 +1 @@
++python3-tz
+diff --git a/build/pkgs/requests/distros/debian.txt b/build/pkgs/requests/distros/debian.txt
+new file mode 100644
+index 00000000..43147b2
+--- /dev/null
++++ b/build/pkgs/requests/distros/debian.txt
+@@ -0,0 +1 @@
++python3-requests
+diff --git a/build/pkgs/scipy/distros/debian.txt b/build/pkgs/scipy/distros/debian.txt
+new file mode 100644
+index 00000000..12b3666
+--- /dev/null
++++ b/build/pkgs/scipy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-scipy
+diff --git a/build/pkgs/setuptools/distros/debian.txt b/build/pkgs/setuptools/distros/debian.txt
+new file mode 100644
+index 00000000..1c0901c
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/debian.txt
+@@ -0,0 +1 @@
++python3-setuptools
+diff --git a/build/pkgs/six/distros/debian.txt b/build/pkgs/six/distros/debian.txt
+new file mode 100644
+index 00000000..68ff859
+--- /dev/null
++++ b/build/pkgs/six/distros/debian.txt
+@@ -0,0 +1 @@
++python3-six
+diff --git a/build/pkgs/sympy/distros/debian.txt b/build/pkgs/sympy/distros/debian.txt
+new file mode 100644
+index 00000000..db423c8
+--- /dev/null
++++ b/build/pkgs/sympy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-sympy
+diff --git a/build/pkgs/texttable/distros/debian.txt b/build/pkgs/texttable/distros/debian.txt
+new file mode 100644
+index 00000000..8f8e7e2
+--- /dev/null
++++ b/build/pkgs/texttable/distros/debian.txt
+@@ -0,0 +1 @@
++python3-texttable
+diff --git a/build/pkgs/toml/distros/debian.txt b/build/pkgs/toml/distros/debian.txt
+new file mode 100644
+index 00000000..543e89d
+--- /dev/null
++++ b/build/pkgs/toml/distros/debian.txt
+@@ -0,0 +1 @@
++python3-toml
+diff --git a/build/pkgs/webencodings/distros/debian.txt b/build/pkgs/webencodings/distros/debian.txt
+new file mode 100644
+index 00000000..ac30c2f
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/debian.txt
+@@ -0,0 +1 @@
++python3-webencodings
+diff --git a/build/pkgs/wheel/distros/debian.txt b/build/pkgs/wheel/distros/debian.txt
+new file mode 100644
+index 00000000..3c066725
+--- /dev/null
++++ b/build/pkgs/wheel/distros/debian.txt
+@@ -0,0 +1 @@
++python3-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 93bf30d7de292551c3050e2dd74651d69ba4bd46 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 18 Oct 2021 07:50:34 -0400
+Subject: Trac #29665: add more documentation for SAGE_PYTHON_PACKAGE_CHECK().
+
+An earlier commit allows SAGE_PYTHON_PACKAGE_CHECK(package) to tweak the
+value of sage_use_system_$package if --enable-system-site-packages was
+not used. This essentially changes the default --with-system-$package=yes
+to "no" in that case. Here we update the documentation to reflect it.
+---
+ m4/sage_python_package_check.m4 | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 7ee82a7..95eefd0 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -34,6 +34,10 @@
+ #   ensure that the ./configure- and run-time views of the system
+ #   are as similar as possible.
+ #
++#   To avoid suggesting these system packages to users who have not
++#   set --enable-system-site-packages, this macro also changes the
++#   default for --with-system-foo from "yes" to "no" in that case.
++#
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
+-- 
+cgit v1.0-1-gd88e
+
+
+From d771e49d57ecdf3622434bc09cbfb87ad3bb7744 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 18 Oct 2021 07:42:46 -0400
+Subject: Trac #29665: improve SAGE_PYTHON_PACKAGE_CHECK() failure message.
+
+When --enable-system-site-packages is off, SAGE_PYTHON_PACKAGE_CHECK()
+will always install the corresponding SPKG. We improve the ./configure
+output in that case to make it clear that the decision was based on
+the value of --enable-system-site-packages and not the "real" check.
+---
+ m4/sage_python_package_check.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 95eefd0..5f0f084 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -40,7 +40,9 @@
+ #
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
++  AC_MSG_CHECKING([if --enable-system-site-packages was used])
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
++    AC_MSG_RESULT(yes)
+     AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
+ 
+     dnl We run this check inside a python venv, because that's ultimately
+@@ -94,6 +96,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
+     dnl System site packages are disabled.
++    AC_MSG_RESULT(no; skipping check)
+     sage_spkg_install_$1=yes
+ 
+     dnl We have to retroactively hack the --with-system-foo={no,yes,force}
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5bb43c1b78a1deb3364f235305937c2f823e5e18 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 24 Oct 2021 20:29:25 -0400
+Subject: Trac #29665: use sage-venv in SAGE_PYTHON_PACKAGE_CHECK().
+
+For consistency with the rest of the build system, we now use the
+build/bin/sage-venv script to create the venv in this autoconf macro
+rather than invoking $PYTHON_FOR_VENV with "-m venv" directly.
+---
+ m4/sage_python_package_check.m4 | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 5f0f084..5547b35 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -50,11 +50,11 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AC_MSG_CHECKING([if we can create a python venv in config.venv])
+ 
+     dnl Use --clear because ./configure typically clobbers its output files.
+-    AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
+-                                        --clear                dnl
+-                                        --without-pip          dnl
+-                                        config.venv            dnl
+-                                        2>&AS_MESSAGE_LOG_FD], [
++    AS_IF(["${PYTHON_FOR_VENV}" build/bin/sage-venv      dnl
++                                  --system-site-packages dnl
++                                  --clear                dnl
++                                  config.venv            dnl
++                                  2>&AS_MESSAGE_LOG_FD], [
+       AC_MSG_RESULT(yes)
+       dnl strip all comments from install-requires.txt; this should leave
+       dnl only a single line containing the version specification for this
+-- 
+cgit v1.0-1-gd88e
+
+
+From c78363d6326addff16ca5abac897949a6be72bf4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:10:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for urllib3.
+
+---
+ build/pkgs/urllib3/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/urllib3/spkg-configure.m4
+
+diff --git a/build/pkgs/urllib3/spkg-configure.m4 b/build/pkgs/urllib3/spkg-configure.m4
+new file mode 100644
+index 00000000..d7ef3e1
+--- /dev/null
++++ b/build/pkgs/urllib3/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([urllib3], [SAGE_PYTHON_PACKAGE_CHECK([urllib3])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f416d5abcae495ea8301fad024b279ea9e997b29 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:15:18 -0400
+Subject: Trac #29665: add Gentoo package information for urllib3.
+
+---
+ build/pkgs/urllib3/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/urllib3/distros/gentoo.txt
+
+diff --git a/build/pkgs/urllib3/distros/gentoo.txt b/build/pkgs/urllib3/distros/gentoo.txt
+new file mode 100644
+index 00000000..172a535
+--- /dev/null
++++ b/build/pkgs/urllib3/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/urllib3
+-- 
+cgit v1.0-1-gd88e
+
+
+From 852068b992bf7959500c650f54cb92e5b68d7ef8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:15:58 -0400
+Subject: Trac #29665: add Gentoo package information for nbformat.
+
+---
+ build/pkgs/nbformat/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbformat/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbformat/distros/gentoo.txt b/build/pkgs/nbformat/distros/gentoo.txt
+new file mode 100644
+index 00000000..006b1f2
+--- /dev/null
++++ b/build/pkgs/nbformat/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbformat
+-- 
+cgit v1.0-1-gd88e
+
+
+From 66179fd28fcc92ee840dcd87bb4db25cea968d66 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:34:16 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for nbformat.
+
+---
+ build/pkgs/nbformat/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbformat/spkg-configure.m4
+
+diff --git a/build/pkgs/nbformat/spkg-configure.m4 b/build/pkgs/nbformat/spkg-configure.m4
+new file mode 100644
+index 00000000..5a7f8c4
+--- /dev/null
++++ b/build/pkgs/nbformat/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbformat], [SAGE_PYTHON_PACKAGE_CHECK([nbformat])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 874005e81ed20f27a5f895030dcdbdfc5f73ad80 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:47:01 -0400
+Subject: Trac #29665: add Gentoo package information for zipp.
+
+---
+ build/pkgs/zipp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/zipp/distros/gentoo.txt
+
+diff --git a/build/pkgs/zipp/distros/gentoo.txt b/build/pkgs/zipp/distros/gentoo.txt
+new file mode 100644
+index 00000000..7f59450
+--- /dev/null
++++ b/build/pkgs/zipp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/zipp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0cc2a7355b5554c1fb79c742ebf02eff54465b3e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:47:35 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for zipp.
+
+---
+ build/pkgs/zipp/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/zipp/spkg-configure.m4
+
+diff --git a/build/pkgs/zipp/spkg-configure.m4 b/build/pkgs/zipp/spkg-configure.m4
+new file mode 100644
+index 00000000..0fe3a9c
+--- /dev/null
++++ b/build/pkgs/zipp/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([zipp], [SAGE_PYTHON_PACKAGE_CHECK([zipp])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6073ad8e56c21fc862749bbd84a56d543fb9458c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:48:37 -0400
+Subject: Trac #29665: add Gentoo package information for wcwidth.
+
+---
+ build/pkgs/wcwidth/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wcwidth/distros/gentoo.txt
+
+diff --git a/build/pkgs/wcwidth/distros/gentoo.txt b/build/pkgs/wcwidth/distros/gentoo.txt
+new file mode 100644
+index 00000000..edeb80b
+--- /dev/null
++++ b/build/pkgs/wcwidth/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/wcwidth
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9793d6172c64d61a015fbe61bd45863759124fad Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:51:10 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for wcwidth.
+
+---
+ build/pkgs/wcwidth/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wcwidth/spkg-configure.m4
+
+diff --git a/build/pkgs/wcwidth/spkg-configure.m4 b/build/pkgs/wcwidth/spkg-configure.m4
+new file mode 100644
+index 00000000..5bde15a
+--- /dev/null
++++ b/build/pkgs/wcwidth/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([wcwidth], [SAGE_PYTHON_PACKAGE_CHECK([wcwidth])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20232f370a43c146ca4e696c72a2cbcc498db060 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:52:36 -0400
+Subject: Trac #29665: add Gentoo package information for testpath.
+
+---
+ build/pkgs/testpath/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/testpath/distros/gentoo.txt
+
+diff --git a/build/pkgs/testpath/distros/gentoo.txt b/build/pkgs/testpath/distros/gentoo.txt
+new file mode 100644
+index 00000000..efa10a0
+--- /dev/null
++++ b/build/pkgs/testpath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/testpath
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1b0785b2aad8844e74345fe950baf097e2b43d24 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:55:22 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for testpath.
+
+---
+ build/pkgs/testpath/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/testpath/spkg-configure.m4
+
+diff --git a/build/pkgs/testpath/spkg-configure.m4 b/build/pkgs/testpath/spkg-configure.m4
+new file mode 100644
+index 00000000..d8fc2a7
+--- /dev/null
++++ b/build/pkgs/testpath/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([testpath], [SAGE_PYTHON_PACKAGE_CHECK([testpath])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 10fc3829ecd956d732b1b069fdfe81f0d6d5cdc2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:56:06 -0400
+Subject: Trac #29665: add Gentoo package information for jedi.
+
+---
+ build/pkgs/jedi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jedi/distros/gentoo.txt
+
+diff --git a/build/pkgs/jedi/distros/gentoo.txt b/build/pkgs/jedi/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c85a46
+--- /dev/null
++++ b/build/pkgs/jedi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jedi
+-- 
+cgit v1.0-1-gd88e
+
+
+From a75824d74c281c7639028ca01dabeed266f56998 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:06:37 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for jedi.
+
+---
+ build/pkgs/jedi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jedi/spkg-configure.m4
+
+diff --git a/build/pkgs/jedi/spkg-configure.m4 b/build/pkgs/jedi/spkg-configure.m4
+new file mode 100644
+index 00000000..a37dbcc
+--- /dev/null
++++ b/build/pkgs/jedi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jedi], [SAGE_PYTHON_PACKAGE_CHECK([jedi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 17af01373d43f6acbbdbc23e073e372d3fdadf8b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:07:47 -0400
+Subject: Trac #29665: add Gentoo package information for tomli.
+
+---
+ build/pkgs/tomli/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tomli/distros/gentoo.txt
+
+diff --git a/build/pkgs/tomli/distros/gentoo.txt b/build/pkgs/tomli/distros/gentoo.txt
+new file mode 100644
+index 00000000..0458e25
+--- /dev/null
++++ b/build/pkgs/tomli/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/tomli
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0d3b5994ae612be11992467c4a3f1a74b81400fe Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:08:12 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for tomli.
+
+---
+ build/pkgs/tomli/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tomli/spkg-configure.m4
+
+diff --git a/build/pkgs/tomli/spkg-configure.m4 b/build/pkgs/tomli/spkg-configure.m4
+new file mode 100644
+index 00000000..95a8b8b
+--- /dev/null
++++ b/build/pkgs/tomli/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tomli], [SAGE_PYTHON_PACKAGE_CHECK([tomli])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From dce1c515781b0eeb8eb9c2bc7aba581560c1fac1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:09:22 -0400
+Subject: Trac #29665: add Gentoo package information for defusedxml.
+
+---
+ build/pkgs/defusedxml/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/defusedxml/distros/gentoo.txt
+
+diff --git a/build/pkgs/defusedxml/distros/gentoo.txt b/build/pkgs/defusedxml/distros/gentoo.txt
+new file mode 100644
+index 00000000..2804214
+--- /dev/null
++++ b/build/pkgs/defusedxml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/defusedxml
+-- 
+cgit v1.0-1-gd88e
+
+
+From 02e1e1cd7f8bdae3ca5b7d35ce70af28a44e9b7c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:11:14 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for defusedxml.
+
+---
+ build/pkgs/defusedxml/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/defusedxml/spkg-configure.m4
+
+diff --git a/build/pkgs/defusedxml/spkg-configure.m4 b/build/pkgs/defusedxml/spkg-configure.m4
+new file mode 100644
+index 00000000..e02f345
+--- /dev/null
++++ b/build/pkgs/defusedxml/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([defusedxml], [SAGE_PYTHON_PACKAGE_CHECK([defusedxml])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e0ba4ebb5cfc637b5d26b85de9f34e0a160d2b9c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:12:22 -0400
+Subject: Trac #29665: add Gentoo package information for ipywidgets.
+
+---
+ build/pkgs/ipywidgets/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipywidgets/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipywidgets/distros/gentoo.txt b/build/pkgs/ipywidgets/distros/gentoo.txt
+new file mode 100644
+index 00000000..7c76967
+--- /dev/null
++++ b/build/pkgs/ipywidgets/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipywidgets
+-- 
+cgit v1.0-1-gd88e
+
+
+From 49df7e7d93c7a31b7c46d5d224a35fd313a29a32 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:15:53 -0400
+Subject: Trac #29665: add Gentoo package information for simplegeneric.
+
+---
+ build/pkgs/simplegeneric/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/simplegeneric/distros/gentoo.txt
+
+diff --git a/build/pkgs/simplegeneric/distros/gentoo.txt b/build/pkgs/simplegeneric/distros/gentoo.txt
+new file mode 100644
+index 00000000..a86e90d
+--- /dev/null
++++ b/build/pkgs/simplegeneric/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/simplegeneric
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2a893635d5804749e6fec7ed7289c921ecb5300a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:16:33 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for simplegeneric.
+
+---
+ build/pkgs/simplegeneric/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/simplegeneric/spkg-configure.m4
+
+diff --git a/build/pkgs/simplegeneric/spkg-configure.m4 b/build/pkgs/simplegeneric/spkg-configure.m4
+new file mode 100644
+index 00000000..13715ab
+--- /dev/null
++++ b/build/pkgs/simplegeneric/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([simplegeneric], [SAGE_PYTHON_PACKAGE_CHECK([simplegeneric])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a8fe7ecd6e3163e7d01261e5497ac452a8cc95ab Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:17:18 -0400
+Subject: Trac #29665: add Gentoo package information for imagesize.
+
+---
+ build/pkgs/imagesize/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/imagesize/distros/gentoo.txt
+
+diff --git a/build/pkgs/imagesize/distros/gentoo.txt b/build/pkgs/imagesize/distros/gentoo.txt
+new file mode 100644
+index 00000000..54350ba
+--- /dev/null
++++ b/build/pkgs/imagesize/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/imagesize
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2ad837c5dd1fca0f50ce6d5042a9344210a54f84 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:17:48 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for imagesize.
+
+---
+ build/pkgs/imagesize/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/imagesize/spkg-configure.m4
+
+diff --git a/build/pkgs/imagesize/spkg-configure.m4 b/build/pkgs/imagesize/spkg-configure.m4
+new file mode 100644
+index 00000000..20210ef
+--- /dev/null
++++ b/build/pkgs/imagesize/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([imagesize], [SAGE_PYTHON_PACKAGE_CHECK([imagesize])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bf47415b5bfca2d7bf24e20de35662bf331623b9 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:18:49 -0400
+Subject: Trac #29665: add Gentoo package information for mistune.
+
+---
+ build/pkgs/mistune/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mistune/distros/gentoo.txt
+
+diff --git a/build/pkgs/mistune/distros/gentoo.txt b/build/pkgs/mistune/distros/gentoo.txt
+new file mode 100644
+index 00000000..56f0a4e
+--- /dev/null
++++ b/build/pkgs/mistune/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/mistune
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6898a74fd0c65a40c5220ba68b4062ac6fe060c6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:21:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for mistune.
+
+---
+ build/pkgs/mistune/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mistune/spkg-configure.m4
+
+diff --git a/build/pkgs/mistune/spkg-configure.m4 b/build/pkgs/mistune/spkg-configure.m4
+new file mode 100644
+index 00000000..972f33d
+--- /dev/null
++++ b/build/pkgs/mistune/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([mistune], [SAGE_PYTHON_PACKAGE_CHECK([mistune])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 62735e4ccf2031cd39eb5e04b03bdfd97005d808 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:22:48 -0400
+Subject: Trac #29665: add Gentoo package information for backcall.
+
+---
+ build/pkgs/backcall/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/backcall/distros/gentoo.txt
+
+diff --git a/build/pkgs/backcall/distros/gentoo.txt b/build/pkgs/backcall/distros/gentoo.txt
+new file mode 100644
+index 00000000..266a222
+--- /dev/null
++++ b/build/pkgs/backcall/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/backcall
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9ef3ea42d4a33c7cdb623fa5417ae300cf323183 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:25:10 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for backcall.
+
+---
+ build/pkgs/backcall/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/backcall/spkg-configure.m4
+
+diff --git a/build/pkgs/backcall/spkg-configure.m4 b/build/pkgs/backcall/spkg-configure.m4
+new file mode 100644
+index 00000000..d6b11c4
+--- /dev/null
++++ b/build/pkgs/backcall/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([backcall], [SAGE_PYTHON_PACKAGE_CHECK([backcall])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1b3ea2a3c40fea0fb58435f5e5304368ea58dff8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:25:58 -0400
+Subject: Trac #29665: add Gentoo package information for parso.
+
+---
+ build/pkgs/parso/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/parso/distros/gentoo.txt
+
+diff --git a/build/pkgs/parso/distros/gentoo.txt b/build/pkgs/parso/distros/gentoo.txt
+new file mode 100644
+index 00000000..f9ce4c7
+--- /dev/null
++++ b/build/pkgs/parso/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/parso
+-- 
+cgit v1.0-1-gd88e
+
+
+From 963a3a2c563ec71a1f5be2395722d0e824cb0b11 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:26:22 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for parso.
+
+---
+ build/pkgs/parso/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/parso/spkg-configure.m4
+
+diff --git a/build/pkgs/parso/spkg-configure.m4 b/build/pkgs/parso/spkg-configure.m4
+new file mode 100644
+index 00000000..1ca6f1b
+--- /dev/null
++++ b/build/pkgs/parso/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([parso], [SAGE_PYTHON_PACKAGE_CHECK([parso])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 943053dfc474b6549bcc7d6ef2971ea43588b35c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:27:00 -0400
+Subject: Trac #29665: add Gentoo package information for pyparsing.
+
+---
+ build/pkgs/pyparsing/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyparsing/distros/gentoo.txt
+
+diff --git a/build/pkgs/pyparsing/distros/gentoo.txt b/build/pkgs/pyparsing/distros/gentoo.txt
+new file mode 100644
+index 00000000..ef0419f
+--- /dev/null
++++ b/build/pkgs/pyparsing/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyparsing
+-- 
+cgit v1.0-1-gd88e
+
+
+From bd682eaa2ac41dd84e7a52e2b0c5442fc8fd8919 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:27:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pyparsing.
+
+---
+ build/pkgs/pyparsing/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyparsing/spkg-configure.m4
+
+diff --git a/build/pkgs/pyparsing/spkg-configure.m4 b/build/pkgs/pyparsing/spkg-configure.m4
+new file mode 100644
+index 00000000..d2b4c00
+--- /dev/null
++++ b/build/pkgs/pyparsing/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pyparsing], [SAGE_PYTHON_PACKAGE_CHECK([pyparsing])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 74f36a9c0ec7c63b7e6c40066e42f4b15c2f978e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:17:42 -0400
+Subject: Trac #29665: add Gentoo package information for debugpy.
+
+---
+ build/pkgs/debugpy/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/debugpy/distros/gentoo.txt
+
+diff --git a/build/pkgs/debugpy/distros/gentoo.txt b/build/pkgs/debugpy/distros/gentoo.txt
+new file mode 100644
+index 00000000..8b797ce
+--- /dev/null
++++ b/build/pkgs/debugpy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/debugpy
+-- 
+cgit v1.0-1-gd88e
+
+
+From be072fa87ac5c373d9dc9b54c0bd68734d5709bc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:21:17 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for debugpy.
+
+---
+ build/pkgs/debugpy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/debugpy/spkg-configure.m4
+
+diff --git a/build/pkgs/debugpy/spkg-configure.m4 b/build/pkgs/debugpy/spkg-configure.m4
+new file mode 100644
+index 00000000..db605ff
+--- /dev/null
++++ b/build/pkgs/debugpy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([debugpy], [SAGE_PYTHON_PACKAGE_CHECK([debugpy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6f777ce2f2e14b94e91c8b7bbac82f9017460aba Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:23:56 -0400
+Subject: Trac #29665: add Gentoo package information for tzlocal.
+
+---
+ build/pkgs/tzlocal/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tzlocal/distros/gentoo.txt
+
+diff --git a/build/pkgs/tzlocal/distros/gentoo.txt b/build/pkgs/tzlocal/distros/gentoo.txt
+new file mode 100644
+index 00000000..2018442
+--- /dev/null
++++ b/build/pkgs/tzlocal/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/tzlocal
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3bd078fc15ae13982249452711baafae91038191 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:24:51 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for tzlocal.
+
+---
+ build/pkgs/tzlocal/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tzlocal/spkg-configure.m4
+
+diff --git a/build/pkgs/tzlocal/spkg-configure.m4 b/build/pkgs/tzlocal/spkg-configure.m4
+new file mode 100644
+index 00000000..e020b28
+--- /dev/null
++++ b/build/pkgs/tzlocal/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tzlocal], [SAGE_PYTHON_PACKAGE_CHECK([tzlocal])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 91b0882fc62214923da9ee7b6dccb05d8a1d11d1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:26:13 -0400
+Subject: Trac #29665: add Gentoo package information for pycparser.
+
+---
+ build/pkgs/pycparser/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pycparser/distros/gentoo.txt
+
+diff --git a/build/pkgs/pycparser/distros/gentoo.txt b/build/pkgs/pycparser/distros/gentoo.txt
+new file mode 100644
+index 00000000..5e87307
+--- /dev/null
++++ b/build/pkgs/pycparser/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pycparser
+-- 
+cgit v1.0-1-gd88e
+
+
+From beabde92fe6e057faf516fe82d27f1e903e55ce6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:27:27 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pycparser.
+
+---
+ build/pkgs/pycparser/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pycparser/spkg-configure.m4
+
+diff --git a/build/pkgs/pycparser/spkg-configure.m4 b/build/pkgs/pycparser/spkg-configure.m4
+new file mode 100644
+index 00000000..4b9b900
+--- /dev/null
++++ b/build/pkgs/pycparser/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pycparser], [SAGE_PYTHON_PACKAGE_CHECK([pycparser])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 86c2788dc7fd1169314e9598c91fa81045553677 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:29:36 -0400
+Subject: Trac #29665: add Gentoo package information for cycler.
+
+---
+ build/pkgs/cycler/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cycler/distros/gentoo.txt
+
+diff --git a/build/pkgs/cycler/distros/gentoo.txt b/build/pkgs/cycler/distros/gentoo.txt
+new file mode 100644
+index 00000000..4b21543
+--- /dev/null
++++ b/build/pkgs/cycler/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/cycler
+-- 
+cgit v1.0-1-gd88e
+
+
+From 67c5a944101ddf329f0a61c61d4e784f58a5c5b0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:30:27 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for cycler.
+
+---
+ build/pkgs/cycler/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cycler/spkg-configure.m4
+
+diff --git a/build/pkgs/cycler/spkg-configure.m4 b/build/pkgs/cycler/spkg-configure.m4
+new file mode 100644
+index 00000000..239571a
+--- /dev/null
++++ b/build/pkgs/cycler/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([cycler], [SAGE_PYTHON_PACKAGE_CHECK([cycler])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ef6d490251abfa41f7a0910274700a8a6a65f629 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:31:19 -0400
+Subject: Trac #29665: add Gentoo package information for traitlets.
+
+---
+ build/pkgs/traitlets/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/traitlets/distros/gentoo.txt
+
+diff --git a/build/pkgs/traitlets/distros/gentoo.txt b/build/pkgs/traitlets/distros/gentoo.txt
+new file mode 100644
+index 00000000..46bfaab
+--- /dev/null
++++ b/build/pkgs/traitlets/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/traitlets
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1f922b458d34088d9f6773312209e69f19ee45dc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:31:50 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for traitlets.
+
+---
+ build/pkgs/traitlets/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/traitlets/spkg-configure.m4
+
+diff --git a/build/pkgs/traitlets/spkg-configure.m4 b/build/pkgs/traitlets/spkg-configure.m4
+new file mode 100644
+index 00000000..df2382b
+--- /dev/null
++++ b/build/pkgs/traitlets/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([traitlets], [SAGE_PYTHON_PACKAGE_CHECK([traitlets])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 95b89a9ced0acb6d971a27fa63b97ea58a11f4e1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:33:35 -0400
+Subject: Trac #29665: add Gentoo package information for argcomplete.
+
+---
+ build/pkgs/argcomplete/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argcomplete/distros/gentoo.txt
+
+diff --git a/build/pkgs/argcomplete/distros/gentoo.txt b/build/pkgs/argcomplete/distros/gentoo.txt
+new file mode 100644
+index 00000000..b150949
+--- /dev/null
++++ b/build/pkgs/argcomplete/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/argcomplete
+-- 
+cgit v1.0-1-gd88e
+
+
+From b4cd8ef384e6e5bae0de0f3c113fb5f9e6e1a71e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:34:14 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for argcomplete.
+
+---
+ build/pkgs/argcomplete/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argcomplete/spkg-configure.m4
+
+diff --git a/build/pkgs/argcomplete/spkg-configure.m4 b/build/pkgs/argcomplete/spkg-configure.m4
+new file mode 100644
+index 00000000..cbd7ccf
+--- /dev/null
++++ b/build/pkgs/argcomplete/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([argcomplete], [SAGE_PYTHON_PACKAGE_CHECK([argcomplete])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4cc610e8331970cc018d7ea87af928fa73a292c1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:36:21 -0400
+Subject: Trac #29665: add Gentoo package information for ptyprocess.
+
+---
+ build/pkgs/ptyprocess/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ptyprocess/distros/gentoo.txt
+
+diff --git a/build/pkgs/ptyprocess/distros/gentoo.txt b/build/pkgs/ptyprocess/distros/gentoo.txt
+new file mode 100644
+index 00000000..571a851
+--- /dev/null
++++ b/build/pkgs/ptyprocess/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ptyprocess
+-- 
+cgit v1.0-1-gd88e
+
+
+From cd15f97221bf5933b07900e4f77cb55401eede26 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:37:02 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ptyprocess.
+
+---
+ build/pkgs/ptyprocess/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ptyprocess/spkg-configure.m4
+
+diff --git a/build/pkgs/ptyprocess/spkg-configure.m4 b/build/pkgs/ptyprocess/spkg-configure.m4
+new file mode 100644
+index 00000000..bfacbae
+--- /dev/null
++++ b/build/pkgs/ptyprocess/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ptyprocess], [SAGE_PYTHON_PACKAGE_CHECK([ptyprocess])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb5f45b15f99e4ba28e1b1f6042a0e8ea17f1dfc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:38:22 -0400
+Subject: Trac #29665: add Gentoo package information for attrs.
+
+---
+ build/pkgs/attrs/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/attrs/distros/gentoo.txt
+
+diff --git a/build/pkgs/attrs/distros/gentoo.txt b/build/pkgs/attrs/distros/gentoo.txt
+new file mode 100644
+index 00000000..3b906fa
+--- /dev/null
++++ b/build/pkgs/attrs/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/attrs
+-- 
+cgit v1.0-1-gd88e
+
+
+From 321707ebf8e9af1e4ac3a5b5b094b4226bb3a7a5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:38:55 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for attrs.
+
+---
+ build/pkgs/attrs/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/attrs/spkg-configure.m4
+
+diff --git a/build/pkgs/attrs/spkg-configure.m4 b/build/pkgs/attrs/spkg-configure.m4
+new file mode 100644
+index 00000000..ba6a9b7
+--- /dev/null
++++ b/build/pkgs/attrs/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([attrs], [SAGE_PYTHON_PACKAGE_CHECK([attrs])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 69a498a4e8854ecdfc2f1a134104983c0dcb9e32 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:40:09 -0400
+Subject: Trac #29665: add Gentoo package information for send2trash.
+
+---
+ build/pkgs/send2trash/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/send2trash/distros/gentoo.txt
+
+diff --git a/build/pkgs/send2trash/distros/gentoo.txt b/build/pkgs/send2trash/distros/gentoo.txt
+new file mode 100644
+index 00000000..a89b179
+--- /dev/null
++++ b/build/pkgs/send2trash/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/send2trash
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9baed17c84e1bdf5abd17c20766e5cd7dddc5b53 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:41:45 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for send2trash.
+
+---
+ build/pkgs/send2trash/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/send2trash/spkg-configure.m4
+
+diff --git a/build/pkgs/send2trash/spkg-configure.m4 b/build/pkgs/send2trash/spkg-configure.m4
+new file mode 100644
+index 00000000..3bbb727
+--- /dev/null
++++ b/build/pkgs/send2trash/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([send2trash], [SAGE_PYTHON_PACKAGE_CHECK([send2trash])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b9b552b2a2aaccaeb7c5b25be0b681f107522d09 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:43:27 -0400
+Subject: Trac #29665: add Gentoo package information for pyrsistent.
+
+---
+ build/pkgs/pyrsistent/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyrsistent/distros/gentoo.txt
+
+diff --git a/build/pkgs/pyrsistent/distros/gentoo.txt b/build/pkgs/pyrsistent/distros/gentoo.txt
+new file mode 100644
+index 00000000..83439ce
+--- /dev/null
++++ b/build/pkgs/pyrsistent/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyrsistent
+-- 
+cgit v1.0-1-gd88e
+
+
+From a17b31fac6104852762f57daa749443147bdf121 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:44:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pyrsistent.
+
+---
+ build/pkgs/pyrsistent/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyrsistent/spkg-configure.m4
+
+diff --git a/build/pkgs/pyrsistent/spkg-configure.m4 b/build/pkgs/pyrsistent/spkg-configure.m4
+new file mode 100644
+index 00000000..f7ca75d
+--- /dev/null
++++ b/build/pkgs/pyrsistent/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pyrsistent], [SAGE_PYTHON_PACKAGE_CHECK([pyrsistent])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 68520decad6d6937918d7a6af65ca5bd476e5d02 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:45:45 -0400
+Subject: Trac #29665: add Gentoo package information for entrypoints.
+
+---
+ build/pkgs/entrypoints/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/entrypoints/distros/gentoo.txt
+
+diff --git a/build/pkgs/entrypoints/distros/gentoo.txt b/build/pkgs/entrypoints/distros/gentoo.txt
+new file mode 100644
+index 00000000..684ddd0
+--- /dev/null
++++ b/build/pkgs/entrypoints/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/entrypoints
+-- 
+cgit v1.0-1-gd88e
+
+
+From 34213eccb642a6bad64d89acaefa83ee702cb483 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:46:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for entrypoints.
+
+---
+ build/pkgs/entrypoints/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/entrypoints/spkg-configure.m4
+
+diff --git a/build/pkgs/entrypoints/spkg-configure.m4 b/build/pkgs/entrypoints/spkg-configure.m4
+new file mode 100644
+index 00000000..caed658
+--- /dev/null
++++ b/build/pkgs/entrypoints/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([entrypoints], [SAGE_PYTHON_PACKAGE_CHECK([entrypoints])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8e985614345da1a58fcdc127a9c0ddd790f9b5d2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:48:26 -0400
+Subject: Trac #29665: add Gentoo package information for markupsafe.
+
+---
+ build/pkgs/markupsafe/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/markupsafe/distros/gentoo.txt
+
+diff --git a/build/pkgs/markupsafe/distros/gentoo.txt b/build/pkgs/markupsafe/distros/gentoo.txt
+new file mode 100644
+index 00000000..9654e35
+--- /dev/null
++++ b/build/pkgs/markupsafe/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/markupsafe
+-- 
+cgit v1.0-1-gd88e
+
+
+From d370f229ae0988856f2e0d1f6ee2df2c47169106 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:48:55 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for markupsafe.
+
+---
+ build/pkgs/markupsafe/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/markupsafe/spkg-configure.m4
+
+diff --git a/build/pkgs/markupsafe/spkg-configure.m4 b/build/pkgs/markupsafe/spkg-configure.m4
+new file mode 100644
+index 00000000..79eb8db
+--- /dev/null
++++ b/build/pkgs/markupsafe/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([markupsafe], [SAGE_PYTHON_PACKAGE_CHECK([markupsafe])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c49b285ad9e25e6bc81a7e75d461d234fdd3ea68 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:30:49 -0400
+Subject: Trac #29665: add Gentoo package information for flit_core.
+
+---
+ build/pkgs/flit_core/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/flit_core/distros/gentoo.txt
+
+diff --git a/build/pkgs/flit_core/distros/gentoo.txt b/build/pkgs/flit_core/distros/gentoo.txt
+new file mode 100644
+index 00000000..fe6bea9
+--- /dev/null
++++ b/build/pkgs/flit_core/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/flit_core
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b0ce1c4f23cd9fc4316e1eb2b9b4bde394957f3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:32:11 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for flit_core.
+
+---
+ build/pkgs/flit_core/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/flit_core/spkg-configure.m4
+
+diff --git a/build/pkgs/flit_core/spkg-configure.m4 b/build/pkgs/flit_core/spkg-configure.m4
+new file mode 100644
+index 00000000..ee67557
+--- /dev/null
++++ b/build/pkgs/flit_core/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([flit_core], [SAGE_PYTHON_PACKAGE_CHECK([flit_core])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f006c231a81428b1e1e792f889bf974f90e3c831 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:34:06 -0400
+Subject: Trac #29665: add Gentoo package information for nest_asyncio.
+
+---
+ build/pkgs/nest_asyncio/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nest_asyncio/distros/gentoo.txt
+
+diff --git a/build/pkgs/nest_asyncio/distros/gentoo.txt b/build/pkgs/nest_asyncio/distros/gentoo.txt
+new file mode 100644
+index 00000000..ab742d2
+--- /dev/null
++++ b/build/pkgs/nest_asyncio/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nest_asyncio
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4a58d0a96a84475e765a01a64f5f44c48a317e0b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:34:43 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for nest_asyncio.
+
+---
+ build/pkgs/nest_asyncio/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nest_asyncio/spkg-configure.m4
+
+diff --git a/build/pkgs/nest_asyncio/spkg-configure.m4 b/build/pkgs/nest_asyncio/spkg-configure.m4
+new file mode 100644
+index 00000000..4d81527
+--- /dev/null
++++ b/build/pkgs/nest_asyncio/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nest_asyncio], [SAGE_PYTHON_PACKAGE_CHECK([nest_asyncio])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e50af937777ea778908bc09a7a79db3dd80fdf25 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:37:02 -0400
+Subject: Trac #29665: add Gentoo package information for ipython_genutils.
+
+---
+ build/pkgs/ipython_genutils/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython_genutils/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipython_genutils/distros/gentoo.txt b/build/pkgs/ipython_genutils/distros/gentoo.txt
+new file mode 100644
+index 00000000..01bc49d
+--- /dev/null
++++ b/build/pkgs/ipython_genutils/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipython_genutils
+-- 
+cgit v1.0-1-gd88e
+
+
+From ec3c0ce9db2ba13c1a49d1bcfb7a4b249cb7ae83 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:39:20 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipython_genutils.
+
+---
+ build/pkgs/ipython_genutils/spkg-configure.m4 | 4 ++++
+ 1 file changed, 4 insertions(+)
+ create mode 100644 build/pkgs/ipython_genutils/spkg-configure.m4
+
+diff --git a/build/pkgs/ipython_genutils/spkg-configure.m4 b/build/pkgs/ipython_genutils/spkg-configure.m4
+new file mode 100644
+index 00000000..b0ba86a
+--- /dev/null
++++ b/build/pkgs/ipython_genutils/spkg-configure.m4
+@@ -0,0 +1,4 @@
++SAGE_SPKG_CONFIGURE(
++  [ipython_genutils],
++  [SAGE_PYTHON_PACKAGE_CHECK([ipython_genutils])]
++)
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5c9e2e265115e5f10d4b459a475467e30b4bddde Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:40:03 -0400
+Subject: Trac #29665: add Gentoo package information for ipython.
+
+---
+ build/pkgs/ipython/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipython/distros/gentoo.txt b/build/pkgs/ipython/distros/gentoo.txt
+new file mode 100644
+index 00000000..8b76f18
+--- /dev/null
++++ b/build/pkgs/ipython/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipython
+-- 
+cgit v1.0-1-gd88e
+
+
+From 621e707ddd040a902d7dddf0bed1de2b54ab22f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 07:37:56 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipython.
+
+---
+ build/pkgs/ipython/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython/spkg-configure.m4
+
+diff --git a/build/pkgs/ipython/spkg-configure.m4 b/build/pkgs/ipython/spkg-configure.m4
+new file mode 100644
+index 00000000..02ab89f
+--- /dev/null
++++ b/build/pkgs/ipython/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipython], [SAGE_PYTHON_PACKAGE_CHECK([ipython])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20a0613f6d441da436f3e7b8047a72bf490882bd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 07:51:11 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipywidgets.
+
+---
+ build/pkgs/ipywidgets/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipywidgets/spkg-configure.m4
+
+diff --git a/build/pkgs/ipywidgets/spkg-configure.m4 b/build/pkgs/ipywidgets/spkg-configure.m4
+new file mode 100644
+index 00000000..51ca9be
+--- /dev/null
++++ b/build/pkgs/ipywidgets/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipywidgets], [SAGE_PYTHON_PACKAGE_CHECK([ipywidgets])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 76bcd386633acc02a1a3026339d0cbd258ada04e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 10:05:16 -0400
+Subject: Trac #29665: add Gentoo package information for wheel.
+
+---
+ build/pkgs/wheel/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wheel/distros/gentoo.txt
+
+diff --git a/build/pkgs/wheel/distros/gentoo.txt b/build/pkgs/wheel/distros/gentoo.txt
+new file mode 100644
+index 00000000..ec571d5
+--- /dev/null
++++ b/build/pkgs/wheel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 96c2dd2ca7812f5333bb9d45eadb7ac408e364ce Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:51:44 -0500
+Subject: Trac #29665: add Gentoo package information for terminado.
+
+---
+ build/pkgs/terminado/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/terminado/distros/gentoo.txt
+
+diff --git a/build/pkgs/terminado/distros/gentoo.txt b/build/pkgs/terminado/distros/gentoo.txt
+new file mode 100644
+index 00000000..1df16f1
+--- /dev/null
++++ b/build/pkgs/terminado/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/terminado
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0de0f5f3d235a4339b21e37ea13c9f5e59a82e59 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:52:35 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for terminado.
+
+---
+ build/pkgs/terminado/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/terminado/spkg-configure.m4
+
+diff --git a/build/pkgs/terminado/spkg-configure.m4 b/build/pkgs/terminado/spkg-configure.m4
+new file mode 100644
+index 00000000..5defc2f
+--- /dev/null
++++ b/build/pkgs/terminado/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([terminado], [SAGE_PYTHON_PACKAGE_CHECK([terminado])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d14a745c770b02822557e7cee0a98de1cb2f3a12 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:56:15 -0500
+Subject: Trac #29665: add Gentoo package information for cffi.
+
+---
+ build/pkgs/cffi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cffi/distros/gentoo.txt
+
+diff --git a/build/pkgs/cffi/distros/gentoo.txt b/build/pkgs/cffi/distros/gentoo.txt
+new file mode 100644
+index 00000000..81eeb81
+--- /dev/null
++++ b/build/pkgs/cffi/distros/gentoo.txt
+@@ -0,0 +1 @@
++virtual/python-cffi
+-- 
+cgit v1.0-1-gd88e
+
+
+From ce393c04afc69fe050e38f780d4e117164687d80 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:57:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for cffi.
+
+---
+ build/pkgs/cffi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cffi/spkg-configure.m4
+
+diff --git a/build/pkgs/cffi/spkg-configure.m4 b/build/pkgs/cffi/spkg-configure.m4
+new file mode 100644
+index 00000000..dc81875
+--- /dev/null
++++ b/build/pkgs/cffi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([cffi], [SAGE_PYTHON_PACKAGE_CHECK([cffi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 467093315b3fdd57c8caa2f95cf99ad52b0b84fb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:57:57 -0500
+Subject: Trac #29665: add Gentoo package information for pip.
+
+---
+ build/pkgs/pip/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pip/distros/gentoo.txt
+
+diff --git a/build/pkgs/pip/distros/gentoo.txt b/build/pkgs/pip/distros/gentoo.txt
+new file mode 100644
+index 00000000..1845454
+--- /dev/null
++++ b/build/pkgs/pip/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pip[vanilla]
+-- 
+cgit v1.0-1-gd88e
+
+
+From c597fd23f9f68dabbcb7e698d0569c3e6458f6d1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 09:07:26 -0500
+Subject: Trac #29665: new spkg-configure.m4 for pip.
+
+---
+ build/pkgs/pip/spkg-configure.m4 | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+ create mode 100644 build/pkgs/pip/spkg-configure.m4
+
+diff --git a/build/pkgs/pip/spkg-configure.m4 b/build/pkgs/pip/spkg-configure.m4
+new file mode 100644
+index 00000000..c7a5562
+--- /dev/null
++++ b/build/pkgs/pip/spkg-configure.m4
+@@ -0,0 +1,12 @@
++SAGE_SPKG_CONFIGURE([pip], [
++  dnl always run this macro because it changes the default value of
++  dnl the --with-system-<package> option.
++  SAGE_PYTHON_PACKAGE_CHECK([pip])
++
++  dnl if we might not install the spkg, make sure that "pip" is in
++  dnl the user's PATH, too.
++  AS_IF([test "x$sage_spkg_install_pip" != "xyes"], [
++    AC_CHECK_PROG(HAVE_PIP, pip, yes, no)
++    AS_IF([test "x$HAVE_PIP" = "xno"], [sage_spkg_install_pip=yes])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ef8f1e807bc55d7b8321777486fa867a7c135419 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 9 Nov 2021 09:09:04 -0500
+Subject: Trac #29665: set $SAGE_PIP_INSTALL_FLAGS for
+ --enable-system-site-packages.
+
+We need to pass some special flags to "pip install" to make it do the
+right thing in the precence of system-site packages. Here we introduce
+a new autoconf variable, SAGE_PIP_INSTALL_FLAGS, that will be used
+to pass those flags to the build system.
+
+With autoconf aware of the variable, we substitute its value into the
+sage-build-env-config script for use in spkg-install.in.
+---
+ build/bin/sage-build-env-config.in | 1 +
+ configure.ac                       | 9 +++++++++
+ 2 files changed, 10 insertions(+)
+
+diff --git a/build/bin/sage-build-env-config.in b/build/bin/sage-build-env-config.in
+index 92e7dad..ad62e5f 100644
+--- a/build/bin/sage-build-env-config.in
++++ b/build/bin/sage-build-env-config.in
+@@ -53,6 +53,7 @@ export SAGE_PARI_CFG="@SAGE_PARI_CFG@"
+ 
+ export SAGE_GLPK_PREFIX="@SAGE_GLPK_PREFIX@"
+ export SAGE_FREETYPE_PREFIX="@SAGE_FREETYPE_PREFIX@"
++export SAGE_PIP_INSTALL_FLAGS="@SAGE_PIP_INSTALL_FLAGS@"
+ export SAGE_SUITESPARSE_PREFIX="@SAGE_SUITESPARSE_PREFIX@"
+ 
+ export SAGE_CONFIGURE_FFLAS_FFPACK="@SAGE_CONFIGURE_FFLAS_FFPACK@"
+diff --git a/configure.ac b/configure.ac
+index 6fafb83..6ed07ac 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -441,6 +441,14 @@ AC_ARG_ENABLE(
+     [allow the use of python packages from the system (experimental; default: no)]
+   )], [
+   AS_IF([test "x$enable_system_site_packages" = "xyes"], [
++    dnl When installing python SPKGs in the presence of system-site
++    dnl packages, we need to --ignore-installed so that a patched SPKG
++    dnl can be installed in the presence of an unpatched system package
++    dnl that appears (to pip) to be identical. The --no-deps flag is
++    dnl then needed because --ignore-installed will make any installed
++    dnl dependencies invisible to pip, who does not appreciate that.
++    SAGE_PIP_INSTALL_FLAGS="${SAGE_PIP_INSTALL_FLAGS} --no-deps --ignore-installed"
++
+     SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
+ 
+     dnl We want to raise an error if the user asked for "system site
+@@ -453,6 +461,7 @@ AC_ARG_ENABLE(
+     with_system_python3="force"
+   ])
+ ])
++AC_SUBST([SAGE_PIP_INSTALL_FLAGS])
+ AC_SUBST([SAGE_VENV_FLAGS])
+ 
+ SAGE_SPKG_OPTIONS=""
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3cf365fef84e809e74abd2eb388e7a8e9af9d739 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 9 Nov 2021 21:01:58 -0500
+Subject: Trac #29665: pass $SAGE_PIP_INSTALL_FLAGS to sdh_pip_install.
+
+Since sdh_pip_install is usually called from spkg-install.in, the
+variables from sage-build-env-config will be available. Here we pass
+the contents of $SAGE_PIP_INSTALL_FLAGS to sage-pip-install
+unconditionally, and hope that the user ignores this variable unless
+he truly knows what he is doing.
+---
+ build/bin/sage-dist-helpers | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/build/bin/sage-dist-helpers b/build/bin/sage-dist-helpers
+index fe364e5..1032ac3 100644
+--- a/build/bin/sage-dist-helpers
++++ b/build/bin/sage-dist-helpers
+@@ -303,7 +303,11 @@ sdh_store_wheel() {
+ }
+ 
+ sdh_store_and_pip_install_wheel() {
+-    local pip_options=""
++    # The $SAGE_PIP_INSTALL_FLAGS variable is set by sage-build-env-config.
++    # We skip sanity checking its contents since you should either let sage
++    # decide what it contains, or really know what you are doing.
++    local pip_options="${SAGE_PIP_INSTALL_FLAGS}"
++
+     while [ $# -gt 0 ]; do
+         case $1 in
+             -*) pip_options="$pip_options $1"
+-- 
+cgit v1.0-1-gd88e
+
+
+From 50f0438ee857b8f0b7d7ad924e6bba9c5e1bc033 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:10:46 -0500
+Subject: Trac #29665: add Gentoo package information for pexpect.
+
+---
+ build/pkgs/pexpect/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pexpect/distros/gentoo.txt
+
+diff --git a/build/pkgs/pexpect/distros/gentoo.txt b/build/pkgs/pexpect/distros/gentoo.txt
+new file mode 100644
+index 00000000..30c4b60
+--- /dev/null
++++ b/build/pkgs/pexpect/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pexpect
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4d784688d997290b462646fa7f36114a41f3f453 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:11:25 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pexpect.
+
+---
+ build/pkgs/pexpect/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pexpect/spkg-configure.m4
+
+diff --git a/build/pkgs/pexpect/spkg-configure.m4 b/build/pkgs/pexpect/spkg-configure.m4
+new file mode 100644
+index 00000000..6520856
+--- /dev/null
++++ b/build/pkgs/pexpect/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pexpect], [SAGE_PYTHON_PACKAGE_CHECK([pexpect])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6447122dc76a3b7a58340dbed942db66530b5b07 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:12:05 -0500
+Subject: Trac #29665: add Gentoo package information for docutils.
+
+---
+ build/pkgs/docutils/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/docutils/distros/gentoo.txt
+
+diff --git a/build/pkgs/docutils/distros/gentoo.txt b/build/pkgs/docutils/distros/gentoo.txt
+new file mode 100644
+index 00000000..fe4a452
+--- /dev/null
++++ b/build/pkgs/docutils/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/docutils
+-- 
+cgit v1.0-1-gd88e
+
+
+From 709041480a5fc729b0ee7f1a8a3b16d4d65321b5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:12:38 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for docutils.
+
+---
+ build/pkgs/docutils/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/docutils/spkg-configure.m4
+
+diff --git a/build/pkgs/docutils/spkg-configure.m4 b/build/pkgs/docutils/spkg-configure.m4
+new file mode 100644
+index 00000000..3584e45
+--- /dev/null
++++ b/build/pkgs/docutils/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([docutils], [SAGE_PYTHON_PACKAGE_CHECK([docutils])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 782d38b48ab87afccc43fbc071e7b7ed48fb0a20 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:14:37 -0500
+Subject: Trac #29665: add Gentoo package information for nbclient.
+
+---
+ build/pkgs/nbclient/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbclient/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbclient/distros/gentoo.txt b/build/pkgs/nbclient/distros/gentoo.txt
+new file mode 100644
+index 00000000..06ff18d
+--- /dev/null
++++ b/build/pkgs/nbclient/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbclient
+-- 
+cgit v1.0-1-gd88e
+
+
+From 19ce09336532336f69db74381932d51a429dfaca Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:15:11 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for nbclient.
+
+---
+ build/pkgs/nbclient/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbclient/spkg-configure.m4
+
+diff --git a/build/pkgs/nbclient/spkg-configure.m4 b/build/pkgs/nbclient/spkg-configure.m4
+new file mode 100644
+index 00000000..14178b7
+--- /dev/null
++++ b/build/pkgs/nbclient/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbclient], [SAGE_PYTHON_PACKAGE_CHECK([nbclient])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c063b9de42c1780368000a563d0dbe80b6fff169 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:17:36 -0500
+Subject: Trac #29665: add Gentoo package information for argon2_cffi.
+
+---
+ build/pkgs/argon2_cffi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argon2_cffi/distros/gentoo.txt
+
+diff --git a/build/pkgs/argon2_cffi/distros/gentoo.txt b/build/pkgs/argon2_cffi/distros/gentoo.txt
+new file mode 100644
+index 00000000..2f12ca8
+--- /dev/null
++++ b/build/pkgs/argon2_cffi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/argon2-cffi
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0b4d5699dd51ea52550fba7db9e1cbb8bbac1892 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:18:35 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for argon2_cffi.
+
+---
+ build/pkgs/argon2_cffi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argon2_cffi/spkg-configure.m4
+
+diff --git a/build/pkgs/argon2_cffi/spkg-configure.m4 b/build/pkgs/argon2_cffi/spkg-configure.m4
+new file mode 100644
+index 00000000..03ebc63
+--- /dev/null
++++ b/build/pkgs/argon2_cffi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([argon2_cffi], [SAGE_PYTHON_PACKAGE_CHECK([argon2_cffi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2b4119558a6e0b1aa512848539a237676b035c83 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:30:48 -0500
+Subject: Trac #29665: fix package name in dateutil's install-requires.txt.
+
+---
+ build/pkgs/dateutil/install-requires.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/build/pkgs/dateutil/install-requires.txt b/build/pkgs/dateutil/install-requires.txt
+index 0ae93da..face537 100644
+--- a/build/pkgs/dateutil/install-requires.txt
++++ b/build/pkgs/dateutil/install-requires.txt
+@@ -1 +1 @@
+-dateutil >=2.8.1
++python-dateutil >=2.8.1
+-- 
+cgit v1.0-1-gd88e
+
+
+From df371b7c4d20a3353d43940306ad22e11aba29da Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:31:41 -0500
+Subject: Trac #29665: add Gentoo package information for dateutil.
+
+---
+ build/pkgs/dateutil/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/dateutil/distros/gentoo.txt
+
+diff --git a/build/pkgs/dateutil/distros/gentoo.txt b/build/pkgs/dateutil/distros/gentoo.txt
+new file mode 100644
+index 00000000..e129df7
+--- /dev/null
++++ b/build/pkgs/dateutil/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/python-dateutil
+-- 
+cgit v1.0-1-gd88e
+
+
+From 577695dfdf661ee26c0ffd767bdbf479d95f7fb4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:32:21 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for dateutil.
+
+---
+ build/pkgs/dateutil/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/dateutil/spkg-configure.m4
+
+diff --git a/build/pkgs/dateutil/spkg-configure.m4 b/build/pkgs/dateutil/spkg-configure.m4
+new file mode 100644
+index 00000000..fdcd127
+--- /dev/null
++++ b/build/pkgs/dateutil/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([dateutil], [SAGE_PYTHON_PACKAGE_CHECK([dateutil])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1984651caac624ec4bb58814ca1d57fe66f9881a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:33:51 -0500
+Subject: Trac #29665: add Gentoo package information for setuptools_scm.
+
+---
+ build/pkgs/setuptools_scm/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/setuptools_scm/distros/gentoo.txt
+
+diff --git a/build/pkgs/setuptools_scm/distros/gentoo.txt b/build/pkgs/setuptools_scm/distros/gentoo.txt
+new file mode 100644
+index 00000000..8989597
+--- /dev/null
++++ b/build/pkgs/setuptools_scm/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/setuptools_scm
+-- 
+cgit v1.0-1-gd88e
+
+
+From ebf7c854ed966e7353759be485c4f5a57b9a10fa Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:34:49 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for setuptools_scm.
+
+---
+ build/pkgs/setuptools_scm/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/setuptools_scm/spkg-configure.m4
+
+diff --git a/build/pkgs/setuptools_scm/spkg-configure.m4 b/build/pkgs/setuptools_scm/spkg-configure.m4
+new file mode 100644
+index 00000000..437148c
+--- /dev/null
++++ b/build/pkgs/setuptools_scm/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([setuptools_scm], [
++  SAGE_PYTHON_PACKAGE_CHECK([setuptools_scm])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0dee0d0c28f31b1f619e44c710a3c9e22d2b2544 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:36:33 -0500
+Subject: Trac #29665: add Gentoo package information for nbconvert.
+
+---
+ build/pkgs/nbconvert/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbconvert/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbconvert/distros/gentoo.txt b/build/pkgs/nbconvert/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c45a10
+--- /dev/null
++++ b/build/pkgs/nbconvert/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbconvert
+-- 
+cgit v1.0-1-gd88e
+
+
+From 473789eb11b1838bc32dc8a63509ee199afc8912 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:37:37 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for nbconvert.
+
+---
+ build/pkgs/nbconvert/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbconvert/spkg-configure.m4
+
+diff --git a/build/pkgs/nbconvert/spkg-configure.m4 b/build/pkgs/nbconvert/spkg-configure.m4
+new file mode 100644
+index 00000000..9b5dee3
+--- /dev/null
++++ b/build/pkgs/nbconvert/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbconvert], [SAGE_PYTHON_PACKAGE_CHECK([nbconvert])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f0703b594e57c980d605aa9bc8316c45a7858b3b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:41:51 -0500
+Subject: Trac #29665: add Gentoo package information for jupyter_core.
+
+---
+ build/pkgs/jupyter_core/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyter_core/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyter_core/distros/gentoo.txt b/build/pkgs/jupyter_core/distros/gentoo.txt
+new file mode 100644
+index 00000000..f168c5a
+--- /dev/null
++++ b/build/pkgs/jupyter_core/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyter_core
+-- 
+cgit v1.0-1-gd88e
+
+
+From 061a307cc4a6680d8500fde834975064e59540d5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:42:48 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jupyter_core.
+
+---
+ build/pkgs/jupyter_core/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyter_core/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyter_core/spkg-configure.m4 b/build/pkgs/jupyter_core/spkg-configure.m4
+new file mode 100644
+index 00000000..67df9c3
+--- /dev/null
++++ b/build/pkgs/jupyter_core/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyter_core], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyter_core])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b85abe964ce0b98b5842efe9cbad9bdb1c89202f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:47:08 -0500
+Subject: Trac #29665: add Gentoo package information for jupyter_client.
+
+---
+ build/pkgs/jupyter_client/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyter_client/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyter_client/distros/gentoo.txt b/build/pkgs/jupyter_client/distros/gentoo.txt
+new file mode 100644
+index 00000000..4f1de88
+--- /dev/null
++++ b/build/pkgs/jupyter_client/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyter_client
+-- 
+cgit v1.0-1-gd88e
+
+
+From 86323ff1e0b2507933df6bc2a96c9175957640c5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:48:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jupyter_client.
+
+---
+ build/pkgs/jupyter_client/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyter_client/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyter_client/spkg-configure.m4 b/build/pkgs/jupyter_client/spkg-configure.m4
+new file mode 100644
+index 00000000..fbd3498
+--- /dev/null
++++ b/build/pkgs/jupyter_client/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyter_client], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyter_client])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a8475e27dd30d752d05ab6fea6579e8623501d82 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:48:58 -0500
+Subject: Trac #29665: add Gentoo package information for snowballstemmer.
+
+---
+ build/pkgs/snowballstemmer/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/snowballstemmer/distros/gentoo.txt
+
+diff --git a/build/pkgs/snowballstemmer/distros/gentoo.txt b/build/pkgs/snowballstemmer/distros/gentoo.txt
+new file mode 100644
+index 00000000..63fd851
+--- /dev/null
++++ b/build/pkgs/snowballstemmer/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/snowballstemmer
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0833c9b781062b4ed86d619e050a6f5d60e36080 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:49:38 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for snowballstemmer.
+
+---
+ build/pkgs/snowballstemmer/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/snowballstemmer/spkg-configure.m4
+
+diff --git a/build/pkgs/snowballstemmer/spkg-configure.m4 b/build/pkgs/snowballstemmer/spkg-configure.m4
+new file mode 100644
+index 00000000..6aa0882
+--- /dev/null
++++ b/build/pkgs/snowballstemmer/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([snowballstemmer], [
++  SAGE_PYTHON_PACKAGE_CHECK([snowballstemmer])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 50a1cf2a2bcd7eeec64cbc3f70e3e9fbe5d850fe Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:50:47 -0500
+Subject: Trac #29665: add Gentoo package information for tornado.
+
+---
+ build/pkgs/tornado/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tornado/distros/gentoo.txt
+
+diff --git a/build/pkgs/tornado/distros/gentoo.txt b/build/pkgs/tornado/distros/gentoo.txt
+new file mode 100644
+index 00000000..6ae4b9f
+--- /dev/null
++++ b/build/pkgs/tornado/distros/gentoo.txt
+@@ -0,0 +1 @@
++www-servers/tornado
+-- 
+cgit v1.0-1-gd88e
+
+
+From 118f4da6e03476c726363e8e22ecda32f13bfc33 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:51:26 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for tornado.
+
+---
+ build/pkgs/tornado/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tornado/spkg-configure.m4
+
+diff --git a/build/pkgs/tornado/spkg-configure.m4 b/build/pkgs/tornado/spkg-configure.m4
+new file mode 100644
+index 00000000..1ee5bc9
+--- /dev/null
++++ b/build/pkgs/tornado/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tornado], [SAGE_PYTHON_PACKAGE_CHECK([tornado])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3850701747a6c8ef60840bdfdb589b28d4cd2b9a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:52:21 -0500
+Subject: Trac #29665: add Gentoo package information for jsonschema.
+
+---
+ build/pkgs/jsonschema/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jsonschema/distros/gentoo.txt
+
+diff --git a/build/pkgs/jsonschema/distros/gentoo.txt b/build/pkgs/jsonschema/distros/gentoo.txt
+new file mode 100644
+index 00000000..d708e4c
+--- /dev/null
++++ b/build/pkgs/jsonschema/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jsonschema
+-- 
+cgit v1.0-1-gd88e
+
+
+From 76e3917c8af781af00f642cfada7a79594429e30 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:54:03 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jsonschema.
+
+---
+ build/pkgs/jsonschema/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jsonschema/spkg-configure.m4
+
+diff --git a/build/pkgs/jsonschema/spkg-configure.m4 b/build/pkgs/jsonschema/spkg-configure.m4
+new file mode 100644
+index 00000000..b9e5e21
+--- /dev/null
++++ b/build/pkgs/jsonschema/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jsonschema], [SAGE_PYTHON_PACKAGE_CHECK([jsonschema])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From fd4a16c11669b6dd73ac6325bca820e76db00402 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:55:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ widgetsnbextension.
+
+---
+ build/pkgs/widgetsnbextension/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/widgetsnbextension/spkg-configure.m4
+
+diff --git a/build/pkgs/widgetsnbextension/spkg-configure.m4 b/build/pkgs/widgetsnbextension/spkg-configure.m4
+new file mode 100644
+index 00000000..bf82daf
+--- /dev/null
++++ b/build/pkgs/widgetsnbextension/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([widgetsnbextension], [
++  SAGE_PYTHON_PACKAGE_CHECK([widgetsnbextension])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8079a9f384e3c8480e157dd98c3db2f43c987f4e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:57:20 -0500
+Subject: Trac #29665: add Gentoo package information for importlib_resources.
+
+---
+ build/pkgs/importlib_resources/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/importlib_resources/distros/gentoo.txt
+
+diff --git a/build/pkgs/importlib_resources/distros/gentoo.txt b/build/pkgs/importlib_resources/distros/gentoo.txt
+new file mode 100644
+index 00000000..d5e1f2c
+--- /dev/null
++++ b/build/pkgs/importlib_resources/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/importlib_resources
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2c430d7c52f02779a6c41b98ac2f4edd8b6759c3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:58:00 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ importlib_resources.
+
+---
+ build/pkgs/importlib_resources/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/importlib_resources/spkg-configure.m4
+
+diff --git a/build/pkgs/importlib_resources/spkg-configure.m4 b/build/pkgs/importlib_resources/spkg-configure.m4
+new file mode 100644
+index 00000000..50df55b
+--- /dev/null
++++ b/build/pkgs/importlib_resources/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([importlib_resources], [
++  SAGE_PYTHON_PACKAGE_CHECK([importlib_resources])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 00d13d7bf2e50aae2ccef3b2b30293c70a922af2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:58:38 -0500
+Subject: Trac #29665: add Gentoo package information for kiwisolver.
+
+---
+ build/pkgs/kiwisolver/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/kiwisolver/distros/gentoo.txt
+
+diff --git a/build/pkgs/kiwisolver/distros/gentoo.txt b/build/pkgs/kiwisolver/distros/gentoo.txt
+new file mode 100644
+index 00000000..7b30c95
+--- /dev/null
++++ b/build/pkgs/kiwisolver/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/kiwisolver
+-- 
+cgit v1.0-1-gd88e
+
+
+From 72b7907ef7ea9fa4ff6948ea34cfe2f693ee6c31 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:59:09 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for kiwisolver.
+
+---
+ build/pkgs/kiwisolver/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/kiwisolver/spkg-configure.m4
+
+diff --git a/build/pkgs/kiwisolver/spkg-configure.m4 b/build/pkgs/kiwisolver/spkg-configure.m4
+new file mode 100644
+index 00000000..4e7ac97
+--- /dev/null
++++ b/build/pkgs/kiwisolver/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([kiwisolver], [SAGE_PYTHON_PACKAGE_CHECK([kiwisolver])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 479351279e4e0ea7e2d146434f0daba038765cfd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:00:04 -0500
+Subject: Trac #29665: add Gentoo package information for notebook.
+
+---
+ build/pkgs/notebook/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/notebook/distros/gentoo.txt
+
+diff --git a/build/pkgs/notebook/distros/gentoo.txt b/build/pkgs/notebook/distros/gentoo.txt
+new file mode 100644
+index 00000000..6475d72
+--- /dev/null
++++ b/build/pkgs/notebook/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/notebook
+-- 
+cgit v1.0-1-gd88e
+
+
+From f4d9242ea654977f8ad7865c82eec593e11a36bc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:01:42 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for notebook.
+
+---
+ build/pkgs/notebook/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/notebook/spkg-configure.m4
+
+diff --git a/build/pkgs/notebook/spkg-configure.m4 b/build/pkgs/notebook/spkg-configure.m4
+new file mode 100644
+index 00000000..a17ba95
+--- /dev/null
++++ b/build/pkgs/notebook/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([notebook], [SAGE_PYTHON_PACKAGE_CHECK([notebook])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9837070c7f8e9a71283b84d49d4fd2c94b78a464 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:02:38 -0500
+Subject: Trac #29665: add Gentoo package information for matplotlib_inline.
+
+---
+ build/pkgs/matplotlib_inline/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/matplotlib_inline/distros/gentoo.txt
+
+diff --git a/build/pkgs/matplotlib_inline/distros/gentoo.txt b/build/pkgs/matplotlib_inline/distros/gentoo.txt
+new file mode 100644
+index 00000000..6a5859c
+--- /dev/null
++++ b/build/pkgs/matplotlib_inline/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/matplotlib-inline
+-- 
+cgit v1.0-1-gd88e
+
+
+From 750be73b25b92b4875e47d044360ac0e1116ec3e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:03:28 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for matplotlib_inline.
+
+---
+ build/pkgs/matplotlib_inline/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/matplotlib_inline/spkg-configure.m4
+
+diff --git a/build/pkgs/matplotlib_inline/spkg-configure.m4 b/build/pkgs/matplotlib_inline/spkg-configure.m4
+new file mode 100644
+index 00000000..e59658f
+--- /dev/null
++++ b/build/pkgs/matplotlib_inline/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([matplotlib_inline], [
++  SAGE_PYTHON_PACKAGE_CHECK([matplotlib_inline])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 273505f49698dcd2ab30c2756b07113c9b7e7791 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:04:10 -0500
+Subject: Trac #29665: add Gentoo package information for ipykernel.
+
+---
+ build/pkgs/ipykernel/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipykernel/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipykernel/distros/gentoo.txt b/build/pkgs/ipykernel/distros/gentoo.txt
+new file mode 100644
+index 00000000..88aab61
+--- /dev/null
++++ b/build/pkgs/ipykernel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipykernel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 629ad36c9e4ae0cdff4a013289b4f2911442445e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:04:46 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for ipykernel.
+
+---
+ build/pkgs/ipykernel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipykernel/spkg-configure.m4
+
+diff --git a/build/pkgs/ipykernel/spkg-configure.m4 b/build/pkgs/ipykernel/spkg-configure.m4
+new file mode 100644
+index 00000000..94ecc2d
+--- /dev/null
++++ b/build/pkgs/ipykernel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipykernel], [SAGE_PYTHON_PACKAGE_CHECK([ipykernel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b8d709edb6a24fd5868ee2818b56e78257b2eafa Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:05:26 -0500
+Subject: Trac #29665: add Gentoo package information for prompt_toolkit.
+
+---
+ build/pkgs/prompt_toolkit/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/prompt_toolkit/distros/gentoo.txt
+
+diff --git a/build/pkgs/prompt_toolkit/distros/gentoo.txt b/build/pkgs/prompt_toolkit/distros/gentoo.txt
+new file mode 100644
+index 00000000..6902484
+--- /dev/null
++++ b/build/pkgs/prompt_toolkit/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/prompt_toolkit
+-- 
+cgit v1.0-1-gd88e
+
+
+From 16c0b5e767ae4dac4440510b7253e5c8642b7d2c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:10:39 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for prompt_toolkit.
+
+---
+ build/pkgs/prompt_toolkit/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/prompt_toolkit/spkg-configure.m4
+
+diff --git a/build/pkgs/prompt_toolkit/spkg-configure.m4 b/build/pkgs/prompt_toolkit/spkg-configure.m4
+new file mode 100644
+index 00000000..fd8c1a6
+--- /dev/null
++++ b/build/pkgs/prompt_toolkit/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([prompt_toolkit], [
++  SAGE_PYTHON_PACKAGE_CHECK([prompt_toolkit])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0cd9283e8bb6c8ae413fc8f715c021f7ec3ca2c8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:12:10 -0500
+Subject: Trac #29665: add Gentoo package information for charset_normalizer.
+
+---
+ build/pkgs/charset_normalizer/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/charset_normalizer/distros/gentoo.txt
+
+diff --git a/build/pkgs/charset_normalizer/distros/gentoo.txt b/build/pkgs/charset_normalizer/distros/gentoo.txt
+new file mode 100644
+index 00000000..eefeb89
+--- /dev/null
++++ b/build/pkgs/charset_normalizer/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/charset_normalizer
+-- 
+cgit v1.0-1-gd88e
+
+
+From a04b01a9ab59097d189edcc5ddcb461faede83b2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:12:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ charset_normalizer.
+
+---
+ build/pkgs/charset_normalizer/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/charset_normalizer/spkg-configure.m4
+
+diff --git a/build/pkgs/charset_normalizer/spkg-configure.m4 b/build/pkgs/charset_normalizer/spkg-configure.m4
+new file mode 100644
+index 00000000..18b18cf
+--- /dev/null
++++ b/build/pkgs/charset_normalizer/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([charset_normalizer], [
++  SAGE_PYTHON_PACKAGE_CHECK([charset_normalizer])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d2ea08138711c53046f977b586f33b09b176b2e3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:13:37 -0500
+Subject: Trac #29665: add Gentoo package information for prometheus_client.
+
+---
+ build/pkgs/prometheus_client/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/prometheus_client/distros/gentoo.txt
+
+diff --git a/build/pkgs/prometheus_client/distros/gentoo.txt b/build/pkgs/prometheus_client/distros/gentoo.txt
+new file mode 100644
+index 00000000..aa2889c
+--- /dev/null
++++ b/build/pkgs/prometheus_client/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/prometheus_client
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b0393200e9edd3e26b8a55ba67e5710e7403fcb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:15:09 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for prometheus_client.
+
+---
+ build/pkgs/prometheus_client/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/prometheus_client/spkg-configure.m4
+
+diff --git a/build/pkgs/prometheus_client/spkg-configure.m4 b/build/pkgs/prometheus_client/spkg-configure.m4
+new file mode 100644
+index 00000000..b494588
+--- /dev/null
++++ b/build/pkgs/prometheus_client/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([prometheus_client], [
++  SAGE_PYTHON_PACKAGE_CHECK([prometheus_client])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From cdcd85284f43ca4ad18353ec3527b2901e57b788 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:17:23 -0500
+Subject: Trac #29665: add Gentoo package information for pybind11.
+
+---
+ build/pkgs/pybind11/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pybind11/distros/gentoo.txt
+
+diff --git a/build/pkgs/pybind11/distros/gentoo.txt b/build/pkgs/pybind11/distros/gentoo.txt
+new file mode 100644
+index 00000000..0c500b3
+--- /dev/null
++++ b/build/pkgs/pybind11/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pybind11
+-- 
+cgit v1.0-1-gd88e
+
+
+From efdd1eb64c4799fe3cdf2221824182941b3fda2d Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:17:51 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pybind11.
+
+---
+ build/pkgs/pybind11/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pybind11/spkg-configure.m4
+
+diff --git a/build/pkgs/pybind11/spkg-configure.m4 b/build/pkgs/pybind11/spkg-configure.m4
+new file mode 100644
+index 00000000..cce1cf5
+--- /dev/null
++++ b/build/pkgs/pybind11/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pybind11], [SAGE_PYTHON_PACKAGE_CHECK([pybind11])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b2128f33b68ea33927284116ea598dd186902400 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:19:23 -0500
+Subject: Trac #29665: add Gentoo package information for pkgconfig.
+
+---
+ build/pkgs/pkgconfig/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pkgconfig/distros/gentoo.txt
+
+diff --git a/build/pkgs/pkgconfig/distros/gentoo.txt b/build/pkgs/pkgconfig/distros/gentoo.txt
+new file mode 100644
+index 00000000..32e8618
+--- /dev/null
++++ b/build/pkgs/pkgconfig/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pkgconfig
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b373b49e06aadeb36dc57e500da9a322460e658 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:19:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pkgconfig.
+
+---
+ build/pkgs/pkgconfig/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pkgconfig/spkg-configure.m4
+
+diff --git a/build/pkgs/pkgconfig/spkg-configure.m4 b/build/pkgs/pkgconfig/spkg-configure.m4
+new file mode 100644
+index 00000000..6708293
+--- /dev/null
++++ b/build/pkgs/pkgconfig/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pkgconfig], [SAGE_PYTHON_PACKAGE_CHECK([pkgconfig])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ce578729eb0d14baab365351ba9a9ffffb7b79f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:21:10 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_serializinghtml.
+
+---
+ build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt b/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+new file mode 100644
+index 00000000..38bca8f
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-serializinghtml
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb0f42c32bbce0e4488678312f5e2d88c6f42c9b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:21:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_serializinghtml.
+
+---
+ build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4 b/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+new file mode 100644
+index 00000000..be8e625
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_serializinghtml], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_serializinghtml])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e47dcf985e40475de85c9436a85537751318bc3d Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:22:54 -0500
+Subject: Trac #29665: add Gentoo package information for sphinxcontrib_jsmath.
+
+---
+ build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt b/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+new file mode 100644
+index 00000000..041a471
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-jsmath
+-- 
+cgit v1.0-1-gd88e
+
+
+From 72cff6fd35f93de4fa855bc870569dd733ff5c24 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:23:49 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_jsmath.
+
+---
+ build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4 b/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+new file mode 100644
+index 00000000..e46bde2
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_jsmath], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_jsmath])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a36395d70f759449cd63c1b0990fbdcb4cb25ca0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:24:26 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_devhelp.
+
+---
+ build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..9b5c899
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-devhelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9953a5dd1646ed0ad51d2e3935cf609bc9e7fd1c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:25:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_devhelp.
+
+---
+ build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+new file mode 100644
+index 00000000..8728136
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_devhelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_devhelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b199d5363aad93f3cb23f7904c9553a28b06348f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:25:53 -0500
+Subject: Trac #29665: add Gentoo package information for sphinxcontrib_qthelp.
+
+---
+ build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..7210099
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-qthelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 94ac8806739f3938e73f5857328e91e0d42e98d2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:26:28 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_qthelp.
+
+---
+ build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+new file mode 100644
+index 00000000..81ea5e1
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_qthelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_qthelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From beedc154aa405e8a58aee8889f510db07adc89a7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:26:54 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_applehelp.
+
+---
+ build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..66ac8da
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-applehelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 07d47c3673d6b35423b71f621cb400989c0101c2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:27:19 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_applehelp.
+
+---
+ build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+new file mode 100644
+index 00000000..e834aed
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_applehelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_applehelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 333a66546c5d421735c49dbafd7370a827f22781 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:27:46 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_htmlhelp.
+
+---
+ build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..e080bac
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-htmlhelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From bfaeb3962254439b63f1f2e0e883de462c7831be Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:29:18 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_htmlhelp.
+
+---
+ build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+new file mode 100644
+index 00000000..c77b003
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_htmlhelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_htmlhelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 782cde13da06e8b85806cb7cbc8aceee0364e639 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:30:23 -0500
+Subject: Trac #29665: add Gentoo package information for jupyterlab_pygments.
+
+---
+ build/pkgs/jupyterlab_pygments/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyterlab_pygments/distros/gentoo.txt b/build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+new file mode 100644
+index 00000000..c57b4f1
+--- /dev/null
++++ b/build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyterlab_pygments
+-- 
+cgit v1.0-1-gd88e
+
+
+From 39f974cfa4a8c6e5dd897f152f83ec82f40ee9f7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:31:13 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ jupyterlab_pygments.
+
+---
+ build/pkgs/jupyterlab_pygments/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyterlab_pygments/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyterlab_pygments/spkg-configure.m4 b/build/pkgs/jupyterlab_pygments/spkg-configure.m4
+new file mode 100644
+index 00000000..e46e21f
+--- /dev/null
++++ b/build/pkgs/jupyterlab_pygments/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyterlab_pygments], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyterlab_pygments])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From db704620700fd36cec3bf6125938f3ee00a9eb5e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:29:15 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for ply.
+
+---
+ build/pkgs/ply/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ply/spkg-configure.m4
+
+diff --git a/build/pkgs/ply/spkg-configure.m4 b/build/pkgs/ply/spkg-configure.m4
+new file mode 100644
+index 00000000..ffb0030
+--- /dev/null
++++ b/build/pkgs/ply/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ply], [SAGE_PYTHON_PACKAGE_CHECK([ply])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6aac31dabcdfdef228d7780398a3fda1a4cc566f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:29:51 -0500
+Subject: Trac #29665: add Gentoo package information for ply.
+
+---
+ build/pkgs/ply/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ply/distros/gentoo.txt
+
+diff --git a/build/pkgs/ply/distros/gentoo.txt b/build/pkgs/ply/distros/gentoo.txt
+new file mode 100644
+index 00000000..c8b1630
+--- /dev/null
++++ b/build/pkgs/ply/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ply
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb8d3372936ec37470d69687a0f91592129460ae Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:30:33 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for gast.
+
+---
+ build/pkgs/gast/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/gast/spkg-configure.m4
+
+diff --git a/build/pkgs/gast/spkg-configure.m4 b/build/pkgs/gast/spkg-configure.m4
+new file mode 100644
+index 00000000..26ec59f
+--- /dev/null
++++ b/build/pkgs/gast/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([gast], [SAGE_PYTHON_PACKAGE_CHECK([gast])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1cdc4046a88f1c2b4e5c162f66c6db6090b24194 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:31:15 -0500
+Subject: Trac #29665: add Gentoo package information for gast.
+
+---
+ build/pkgs/gast/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/gast/distros/gentoo.txt
+
+diff --git a/build/pkgs/gast/distros/gentoo.txt b/build/pkgs/gast/distros/gentoo.txt
+new file mode 100644
+index 00000000..3be5e7e
+--- /dev/null
++++ b/build/pkgs/gast/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/gast
+-- 
+cgit v1.0-1-gd88e
+
+
+From 96068b8a3742b65d619190e1d9fa5db399e6b4f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:32:20 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pythran.
+
+---
+ build/pkgs/pythran/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pythran/spkg-configure.m4
+
+diff --git a/build/pkgs/pythran/spkg-configure.m4 b/build/pkgs/pythran/spkg-configure.m4
+new file mode 100644
+index 00000000..592e95b
+--- /dev/null
++++ b/build/pkgs/pythran/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pythran], [SAGE_PYTHON_PACKAGE_CHECK([pythran])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1fa0fad3ae8f7e559c6fc315c6773a7d8aac0bfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:32:55 -0500
+Subject: Trac #29665: add Gentoo package information for pythran.
+
+---
+ build/pkgs/pythran/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pythran/distros/gentoo.txt
+
+diff --git a/build/pkgs/pythran/distros/gentoo.txt b/build/pkgs/pythran/distros/gentoo.txt
+new file mode 100644
+index 00000000..1bb7cdc
+--- /dev/null
++++ b/build/pkgs/pythran/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pythran
+-- 
+cgit v1.0-1-gd88e
+
+
+From d26370e5b8c88e76abfb7c27e3defb71c9e9f711 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:33:50 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for beniget.
+
+---
+ build/pkgs/beniget/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/beniget/spkg-configure.m4
+
+diff --git a/build/pkgs/beniget/spkg-configure.m4 b/build/pkgs/beniget/spkg-configure.m4
+new file mode 100644
+index 00000000..8ae6101
+--- /dev/null
++++ b/build/pkgs/beniget/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([beniget], [SAGE_PYTHON_PACKAGE_CHECK([beniget])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From eeeb296ed9b9694a865534103fd58e62a151ef5e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:34:22 -0500
+Subject: Trac #29665: add Gentoo package information for beniget.
+
+---
+ build/pkgs/beniget/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/beniget/distros/gentoo.txt
+
+diff --git a/build/pkgs/beniget/distros/gentoo.txt b/build/pkgs/beniget/distros/gentoo.txt
+new file mode 100644
+index 00000000..1a5972c
+--- /dev/null
++++ b/build/pkgs/beniget/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/beniget
+-- 
+cgit v1.0-1-gd88e
+
+
+From 078b2ff272d0eeff5cce40ad7eb176d9ddd7bdff Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:35:37 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for alabaster.
+
+---
+ build/pkgs/alabaster/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/alabaster/spkg-configure.m4
+
+diff --git a/build/pkgs/alabaster/spkg-configure.m4 b/build/pkgs/alabaster/spkg-configure.m4
+new file mode 100644
+index 00000000..4eca6e0
+--- /dev/null
++++ b/build/pkgs/alabaster/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([alabaster], [SAGE_PYTHON_PACKAGE_CHECK([alabaster])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7dc264353e5f64110431ff28c1b8b7e89699e9bd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:36:06 -0500
+Subject: Trac #29665: add Gentoo package information for alabaster.
+
+---
+ build/pkgs/alabaster/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/alabaster/distros/gentoo.txt
+
+diff --git a/build/pkgs/alabaster/distros/gentoo.txt b/build/pkgs/alabaster/distros/gentoo.txt
+new file mode 100644
+index 00000000..cffece6
+--- /dev/null
++++ b/build/pkgs/alabaster/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/alabaster
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8011a5e675e7e61a77ce34a299ee961a9f44253f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:43:59 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ importlib_metadata.
+
+---
+ build/pkgs/importlib_metadata/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/importlib_metadata/spkg-configure.m4
+
+diff --git a/build/pkgs/importlib_metadata/spkg-configure.m4 b/build/pkgs/importlib_metadata/spkg-configure.m4
+new file mode 100644
+index 00000000..0554e52
+--- /dev/null
++++ b/build/pkgs/importlib_metadata/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([importlib_metadata], [
++  SAGE_PYTHON_PACKAGE_CHECK([importlib_metadata])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 928ca0019e3ec6c4541a16b28bcc6710df6d010b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:44:28 -0500
+Subject: Trac #29665: add Gentoo package information for importlib_metadata.
+
+---
+ build/pkgs/importlib_metadata/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/importlib_metadata/distros/gentoo.txt
+
+diff --git a/build/pkgs/importlib_metadata/distros/gentoo.txt b/build/pkgs/importlib_metadata/distros/gentoo.txt
+new file mode 100644
+index 00000000..4f92786
+--- /dev/null
++++ b/build/pkgs/importlib_metadata/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/importlib_metadata
+-- 
+cgit v1.0-1-gd88e
+
+
+From 135f184f7498a2046065e669723e68efe2d65cee Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 21:16:58 -0500
+Subject: Trac #29665: fix sage.misc.package doctest with system alabaster.
+
+When alabaster from the system is used, these tests won't be able to
+find its SPKG installed. Add some ellipses, and switch one test to
+look for sage_conf instead.
+---
+ src/sage/misc/package.py | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/sage/misc/package.py b/src/sage/misc/package.py
+index 84f3d50..c7ad206 100644
+--- a/src/sage/misc/package.py
++++ b/src/sage/misc/package.py
+@@ -386,9 +386,9 @@ def installed_packages(exclude_pip=True):
+     EXAMPLES::
+ 
+         sage: sorted(installed_packages().keys())  # optional - build
+-        [...'alabaster', ...'sage_conf', ...]
+-        sage: installed_packages()['alabaster']  # optional - build, random
+-        '0.7.12'
++        [...'sage_conf', ...]
++        sage: installed_packages()['sage_conf']  # optional - build, random
++        '9.5'
+ 
+     .. SEEALSO::
+ 
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch b/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
new file mode 100644
index 000000000000..7ef3826aa4d2
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
@@ -0,0 +1,27 @@
+diff --git a/src/bin/sage-runtests b/src/bin/sage-runtests
+index 589dc8cd37..6bb8bf99a4 100755
+--- a/src/bin/sage-runtests
++++ b/src/bin/sage-runtests
+@@ -154,21 +154,4 @@ if __name__ == "__main__":
+     DC = DocTestController(args, args.filenames)
+     err = DC.run()
+ 
+-    try:
+-        exit_code_pytest = 0
+-        import pytest
+-        pytest_options = ["--import-mode", "importlib"]
+-        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.")
+-
+-    if err == 0:
+-        sys.exit(exit_code_pytest)
+-    else:
+-        sys.exit(err)
++    sys.exit(err)
diff --git a/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch b/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
new file mode 100644
index 000000000000..093e3d56eb33
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
@@ -0,0 +1,42 @@
+More site packages not included in trac 29665
+
+diff --git a/build/pkgs/gmpy2/spkg-configure.m4 b/build/pkgs/gmpy2/spkg-configure.m4
+new file mode 100644
+index 0000000000..2d0390f7db
+--- /dev/null
++++ b/build/pkgs/gmpy2/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([gmpy2], [SAGE_PYTHON_PACKAGE_CHECK([gmpy2])])
+diff --git a/build/pkgs/sphinx/spkg-configure.m4 b/build/pkgs/sphinx/spkg-configure.m4
+new file mode 100644
+index 0000000000..e149fbb2cf
+--- /dev/null
++++ b/build/pkgs/sphinx/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([sphinx], [SAGE_PYTHON_PACKAGE_CHECK([sphinx])])
+diff --git a/build/pkgs/typing_extensions/spkg-configure.m4 b/build/pkgs/typing_extensions/spkg-configure.m4
+new file mode 100644
+index 0000000000..d475fd8257
+--- /dev/null
++++ b/build/pkgs/typing_extensions/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([typing_extensions], [SAGE_PYTHON_PACKAGE_CHECK([typing_extensions])])
+-- 
+diff --git a/build/pkgs/gmpy2/install-requires.txt b/build/pkgs/gmpy2/install-requires.txt
+index 51d24518ef..c25feff557 100644
+--- a/build/pkgs/gmpy2/install-requires.txt
++++ b/build/pkgs/gmpy2/install-requires.txt
+@@ -1,3 +1 @@
+-# We would like to write gmpy2 >=2.1.0b5, but pipenv does not accept prereleases in version ranges
+-# https://github.com/pypa/pipenv/issues/1760
+-gmpy2 ==2.1.0rc1
++gmpy2 >=2.1
+diff --git a/build/pkgs/ptyprocess/install-requires.txt b/build/pkgs/ptyprocess/install-requires.txt
+index de89260872..7c336f636c 100644
+--- a/build/pkgs/ptyprocess/install-requires.txt
++++ b/build/pkgs/ptyprocess/install-requires.txt
+@@ -1,3 +1,3 @@
+-ptyprocess ==0.5.1
++ptyprocess
+ # https://trac.sagemath.org/ticket/31280#comment:42 and following
+ # sagelib is not compatible with ptyprocess 0.5.2, 0.6, and 0.7
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 33b40acbabeb..a32c5d18f378 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -22,11 +22,13 @@ distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
 checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
 python_version=3
 
-build_options="debug system_python3"
+build_options="debug system_python3 system_site_packages"
 desc_option_debug="Build with debug symbols"
 desc_option_system_python="Build using system python 3"
-build_options_default="system_python3"
+desc_option_system_python="Build using system python site-packages"
+build_options_default="system_python3 system_site_packages"
 configure_args+=" $(vopt_with system_python3)"
+configure_args+=" $(vopt_enable system_site_packages)"
 
 # path where sage will be installed
 _SAGE_ROOT=/usr/lib/sage-${version}
@@ -163,6 +165,8 @@ do_check() {
 	fi
 	if [ "$XBPS_CHECK_PKGS" = full ]; then
 		_test_args="--long $_test_args"
+	else
+		_test_args="--warn-long 5.0 $_test_args"
 	fi
 	# since make check will build the docs, run test like this instead
 	./sage -tp ${XBPS_MAKEJOBS} ${_test_args}
@@ -182,7 +186,7 @@ makedepends+=" automake gettext gettext-devel"
 # other host dependencies
 makedepends+=" cmake curl git ninja pandoc patch pkg-config python3 tox"
 
-# already in void
+# standard dependencies
 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
@@ -202,7 +206,49 @@ makedepends+="
  brial-devel cliquer-devel gfan libbraiding-devel libhomfly-devel
  lrcalc-devel nauty-devel palp tachyon
  maxima-ecl primesieve-devel primecount-devel
+ ffmpeg ImageMagick
 "
 
 # TODO: optional
 # 4ti2 coxeter3 libsemigroups lrslib pdf2svg perl_mongodb polymake
+
+# TODO: standard
+# cvxopt importlib_resources
+
+# python packages for trac-29665
+_sage_python3_modules="
+ python3-Babel python3-Jinja2 python3-MarkupSafe python3-Pillow
+ python3-Pygments python3-Sphinx python3-alabaster python3-argcomplete
+ python3-argon2 python3-attrs python3-backcall python3-beniget
+ python3-bleach python3-certifi python3-cffi python3-charset-normalizer
+ python3-cycler python3-dateutil python3-decorator python3-defusedxml
+ python3-docutils python3-entrypoints python3-flit_core python3-gast
+ python3-gmpy2 python3-html5lib python3-idna python3-imagesize
+ python3-importlib_metadata python3-ipython python3-ipython_genutils
+ python3-ipython_ipykernel python3-jedi python3-jsonschema
+ python3-jupyter_client python3-jupyter_core python3-jupyter_ipywidgets
+ python3-jupyter_nbconvert python3-jupyter_nbformat
+ python3-jupyter_notebook python3-jupyterlab_pygments python3-kiwisolver
+ python3-matplotlib python3-matplotlib-inline python3-mistune
+ python3-mpmath python3-nbclient python3-nest_asyncio python3-networkx
+ python3-numpy python3-packaging python3-pandocfilters python3-parsing
+ python3-parso python3-pexpect python3-pickleshare python3-pip
+ python3-pkgconfig python3-pluggy python3-ply python3-prometheus_client
+ python3-prompt_toolkit python3-ptyprocess python3-py python3-pybind11
+ python3-pycparser python3-pyrsistent python3-pytz python3-pyzmq
+ python3-requests python3-scipy python3-send2trash python3-setuptools
+ python3-setuptools_scm python3-simplegeneric python3-six
+ python3-snowballstemmer python3-sphinxcontrib-applehelp
+ python3-sphinxcontrib-devhelp python3-sphinxcontrib-htmlhelp
+ python3-sphinxcontrib-jsmath python3-sphinxcontrib-qthelp
+ python3-sphinxcontrib-serializinghtml python3-sympy python3-terminado
+ python3-testpath python3-texttable python3-toml python3-tomli
+ python3-tornado python3-traitlets python3-typing_extensions
+ python3-tzlocal python3-urllib3 python3-wcwidth python3-webencodings
+ python3-wheel python3-zipp pythran
+ "
+
+if [ "$build_option_system_site_packages" ]; then
+	makedepends+=" $_sage_python3_modules"
+	depends+=" $_sage_python3_modules"
+fi

From 899e40ad0d7939e6484df92080922a0723a28ca9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 3 Jan 2022 20:47:52 -0300
Subject: [PATCH 24/50] sagemath: use small source tarball + upstream packages

---
 srcpkgs/sagemath/template | 97 ++++++++++++++++++++++++++-------------
 1 file changed, 64 insertions(+), 33 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index a32c5d18f378..0de0061b09df 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -18,8 +18,8 @@ short_desc="Open source mathematics software"
 maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
-distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
-checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
+distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
+checksum=aea4c5a8d3b32af2fba644269b9daf4f62471471ba2d7d83da0f8098a5f53225
 python_version=3
 
 build_options="debug system_python3 system_site_packages"
@@ -33,42 +33,72 @@ configure_args+=" $(vopt_enable system_site_packages)"
 # 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} ;;
-esac
+_SAGE_UPSTREAM_MIRROR=https://mirrors.mit.edu/sage/spkg/upstream
 
-# extra upstream packages (trac-32968 / trac-33040)
 _upstream="
- https://pypi.io/packages/source/s/sphinx/Sphinx-4.3.1.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
+${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
+${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
+${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
+${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
+${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
+${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
+${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
+https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
+https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
+http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
+${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
+${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
+${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
+${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
+${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
+https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
+${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
+https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
+${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
 "
 
 checksum+="
- 32a5b3e9a1b176cc25ed048557d4d3d01af635e6b76c5bc7a43b0a34447fbd45
-
- 9c87405839a19696e837b3b818fed3f5f69f16f1eec1a1ad77e043dcea9c772f
- fc4453705b81d03568d5b808ad8f09c77c47534f6ac2e72e733f9ca4714aa75c
- acad2d8b20a1af07d4e4c9d2e9285c5ed9104354062f275f3fcd88dcef4f1326
- 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
- 78884e7c1d4b00ce3cea67b44566851c4343c120abd683433ce934a68ea58872
- 0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86
- b8e2f83c56e141920c39464b852de3719dfbfb6e3c99a2d8da0edf4fb33176ed
- d9bdec0013ef1eb5a84ab39a3b3868911598afa494f5faa038647101504e2b81
- b2e9810e09c3a47b73ce9cab5a72243a1258f61e7900969097a817232246ce1c
- 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
- 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
+c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
+d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
+4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
+3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
+03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
+5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
+cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
+5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
+581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
+6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
+07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
+a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
+ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
+d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
+169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
+5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
+cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
+471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
+78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
+edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
+b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
+3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
+545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
+cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
+718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
+dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
 "
 
 for u in ${_upstream}; do
@@ -101,6 +131,7 @@ post_extract() {
 	mv -T $wrksrc $_SAGE_ROOT
 	ln -srfT $_SAGE_ROOT $wrksrc
 
+	mkdir -p $wrksrc/upstream
 	for u in ${_upstream}; do
 		cp "$XBPS_SRCDISTDIR/${pkgname}-${version}/${u##*[/>]}" $wrksrc/upstream
 	done

From e11081a34f37e456ad308a05b3da376070de8b16 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 13:38:02 -0300
Subject: [PATCH 25/50] sagemath: for CI use fixed random-seed=0

---
 srcpkgs/sagemath/template | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 0de0061b09df..b5b99d2c122d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -194,6 +194,10 @@ do_check() {
 	if [ -z "$_test_args" ]; then
 		_test_args=--all
 	fi
+	if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
+		# for CI use a predictable random seed
+		_test_args="--random-seed=0 $_test_args"
+	fi
 	if [ "$XBPS_CHECK_PKGS" = full ]; then
 		_test_args="--long $_test_args"
 	else

From 6b1a8633a396d7bef03753d3d232095a62e2982b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 14:40:27 -0300
Subject: [PATCH 26/50] sagemath: upstream two patches

---
 ...ble-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch} |  6 +++---
 ...rse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch} | 10 +++++-----
 2 files changed, 8 insertions(+), 8 deletions(-)
 rename srcpkgs/sagemath/patches/{0001-sage-site-exec-only-if-it-is-executable.patch => trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch} (94%)
 rename srcpkgs/sagemath/patches/{0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch => trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch} (81%)

diff --git a/srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch b/srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
similarity index 94%
rename from srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch
rename to srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
index ce17c6d6e954..7fdb3d697222 100644
--- a/srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch
+++ b/srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
@@ -1,14 +1,14 @@
 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
+Subject: 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
+index 4c0fa17..153e610 100755
 --- a/src/bin/sage
 +++ b/src/bin/sage
 @@ -129,7 +129,7 @@ usage() {
@@ -39,5 +39,5 @@ index 4c0fa17426..153e610a2e 100755
              # fallthrough if there is no sage-site script
          fi
 -- 
-2.34.1
+cgit v1.0-1-gd88e
 
diff --git a/srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch b/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
similarity index 81%
rename from srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch
rename to srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
index bab6d8441d42..350c41ac3928 100644
--- a/srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch
+++ b/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
@@ -1,16 +1,16 @@
-From 57e3eba28c9b4ee6bd3407d0715b8bd00aaf04a7 Mon Sep 17 00:00:00 2001
+From 53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6 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
+Subject: sagetex: Fix a warning when byte-compiling sagetexparse.py
 
 ---
- .../sagetex/patches/sagetex-fix-warning.patch    | 16 ++++++++++++++++
+ build/pkgs/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
+index 00000000..d82ab67
 --- /dev/null
 +++ b/build/pkgs/sagetex/patches/sagetex-fix-warning.patch
 @@ -0,0 +1,16 @@
@@ -31,5 +31,5 @@ index 0000000000..d82ab675dd
 +     self.result += t.code[1:-1] + '\n\n'
 + 
 -- 
-2.34.1
+cgit v1.0-1-gd88e
 

From 2ec6f6de7f6023b10b180a06c572895fd63b3d4c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 19:57:59 -0300
Subject: [PATCH 27/50] sagemath: reorder upstream sources and add two missing
 ones

---
 srcpkgs/sagemath/template | 60 ++++++++++++++++++++++-----------------
 1 file changed, 34 insertions(+), 26 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index b5b99d2c122d..f53cba947c88 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -36,69 +36,77 @@ _SAGE_ROOT=/usr/lib/sage-${version}
 _SAGE_UPSTREAM_MIRROR=https://mirrors.mit.edu/sage/spkg/upstream
 
 _upstream="
-${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
 ${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
 ${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
+
+${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
 ${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
 ${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
 ${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
 ${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
 ${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
 ${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
-https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
-https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
-http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
 ${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
 ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
 ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
 ${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
 ${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${PYPI_SITE}/P/PyCygwin/PyCygwin-0.1.tar.gz
 ${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
-https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+${PYPI_SITE}/s/setuptools/setuptools-59.2.0.tar.gz
 ${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
 ${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
-https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
 ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
+
+https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
+https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
+http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
+https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
 "
 
 checksum+="
-dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
 c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
 d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
+5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
+ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
+169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
+cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
+edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
+cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
+
+dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
 3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
 03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
 5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
 cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
-5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
-c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
-6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
-07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
 a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
-ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
 d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
-169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
 5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
-cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
 471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
 78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
-edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+45a5e295590c469a49b2804bfdb89059e942d768ad3b813f484d7b5bff48d226
 ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
-b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
-3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+157d21de9d055ab9e8ea3186d91e7f4f865e11f42deafa952d90842671fc2576
 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
 545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
-cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
-718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
 dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
+
+c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
+6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
+07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
+3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
 "
 
 for u in ${_upstream}; do

From 3b6948e38352c4cd05ac958e2badd56a36d46b7f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 9 Jan 2022 12:45:47 -0300
Subject: [PATCH 28/50] sagemath: do not download anything patch

---
 .../patches/00-Do_not_download_anything.patch         | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 srcpkgs/sagemath/patches/00-Do_not_download_anything.patch

diff --git a/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch b/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch
new file mode 100644
index 000000000000..35aef7b8d456
--- /dev/null
+++ b/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch
@@ -0,0 +1,11 @@
+--- a/build/sage_bootstrap/tarball.py	2022-01-07 19:17:06.754747955 -0300
++++ b/build/sage_bootstrap/tarball.py	2022-01-07 19:25:31.844139381 -0300
+@@ -158,6 +158,8 @@
+                             .format(destination=destination))
+         successful_download = False
+         log.info('Attempting to download package {0} from mirrors'.format(self.filename))
++        log.info('ERROR: downloading is disabled, add file to template instead')
++        return
+         for mirror in MirrorList():
+             url = mirror + '/'.join(['spkg', 'upstream', self.package.name, self.filename])
+             log.info(url)

From 36abe91e9fb0dcf744995c499bde0bf40b711c42 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 9 Jan 2022 13:27:49 -0300
Subject: [PATCH 29/50] sagemath: update to 9.5.rc0.

---
 ...184f7498a2046065e669723e68efe2d65cee.patch |    6 +-
 ...1d4ced4264f65ab704f725f6f5879b012796.patch |  263 ----
 ...a54526829b79d5d236a40f83ddc6ce7b2696.patch | 1196 -----------------
 ...9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch |   27 -
 ...3f4f32246ad9ded6d37f1f2f12a589a81f4.patch} |    4 +-
 ...03138d0403be7c7cb303de2bc0a0e0b6793c.patch |   82 --
 ...f3a1611fed0cc66fb838eb85739646dd34d.patch} |   94 +-
 ...49c415e11d0522bff9013bc1509264b26ebf.patch |   27 +
 ...ip_doctest_singular_4.2.1--see_33134.patch |   13 +
 srcpkgs/sagemath/template                     |    6 +-
 10 files changed, 72 insertions(+), 1646 deletions(-)
 delete mode 100644 srcpkgs/sagemath/patches/trac-30766-system_python_3.10-df9f1d4ced4264f65ab704f725f6f5879b012796.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
 rename srcpkgs/sagemath/patches/{trac-33064-sage_docbuild_ignore_cache_save_permission_error-f767cf1eadfd8ab540a31c5c5ef09d56df09b90e.patch => trac-33064-sage_docbuild_ignore_cache_save_permission_error-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch} (92%)
 delete mode 100644 srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
 rename srcpkgs/sagemath/patches/{trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch => trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch} (63%)
 create mode 100644 srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch

diff --git a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
index b641113927e7..0ecb27c593cd 100644
--- a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
+++ b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
@@ -5615,9 +5615,9 @@ index 84f3d50..c7ad206 100644
      EXAMPLES::
  
          sage: sorted(installed_packages().keys())  # optional - build
--        [...'alabaster', ...'sage_conf', ...]
--        sage: installed_packages()['alabaster']  # optional - build, random
--        '0.7.12'
+-        [...'gmpy2', ...'sage_conf', ...]
+-        sage: installed_packages()['gmpy2']  # optional - build, random
+-        '2.1.0b5'
 +        [...'sage_conf', ...]
 +        sage: installed_packages()['sage_conf']  # optional - build, random
 +        '9.5'
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
deleted file mode 100644
index a1cb4c834482..000000000000
--- a/srcpkgs/sagemath/patches/trac-30766-system_python_3.10-df9f1d4ced4264f65ab704f725f6f5879b012796.patch
+++ /dev/null
@@ -1,263 +0,0 @@
-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-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch b/srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
deleted file mode 100644
index 3ae6fe01822d..000000000000
--- a/srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
+++ /dev/null
@@ -1,1196 +0,0 @@
-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/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch b/srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
deleted file mode 100644
index 485fb0176f45..000000000000
--- a/srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-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: 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 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"
- 
- # 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)
--- 
-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-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
similarity index 92%
rename from srcpkgs/sagemath/patches/trac-33064-sage_docbuild_ignore_cache_save_permission_error-f767cf1eadfd8ab540a31c5c5ef09d56df09b90e.patch
rename to srcpkgs/sagemath/patches/trac-33064-sage_docbuild_ignore_cache_save_permission_error-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
index 20fa12e570eb..04f04cfd6718 100644
--- 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-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
@@ -1,4 +1,4 @@
-From f767cf1eadfd8ab540a31c5c5ef09d56df09b90e Mon Sep 17 00:00:00 2001
+From e89193f4f32246ad9ded6d37f1f2f12a589a81f4 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
@@ -8,7 +8,7 @@ Subject: sage_docbuild: do not fail when cache cannot be saved
  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
+index 466ca82..f8c8ebd 100644
 --- a/src/sage_docbuild/__init__.py
 +++ b/src/sage_docbuild/__init__.py
 @@ -856,9 +856,12 @@ class ReferenceSubBuilder(DocBuilder):
diff --git a/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch b/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
deleted file mode 100644
index 6bc5193b75ee..000000000000
--- a/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-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
-
-
-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/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch b/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
similarity index 63%
rename from srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch
rename to srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
index 3794aa7f019b..04fca4815a00 100644
--- a/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch
+++ b/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
@@ -1,4 +1,4 @@
-From 7d3381b21e4716cfa8a33915621a12f0eba74233 Mon Sep 17 00:00:00 2001
+From 18d0477153af6f453a0e84f78030535f6a36ce87 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
@@ -10,56 +10,56 @@ Subject: doctests: remove dochtml label from some tests that don't need docs
  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
+index c788623..527ed90 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  # optional - sagemath_doc_html
+-        sage: thematic_index = os.path.join(SAGE_DOC, "html", "en", "thematic_tutorials", "index.html")  # optional - sagemath_doc_html
 +        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
+         sage: for line in open(thematic_index).readlines():  # optional - sagemath_doc_html
          ....:     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
+index 4c56aea..583ca06 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  # optional - sagemath_doc_html
+-    sage: docfilename = os.path.join(SAGE_DOC, 'html', 'en', 'reference', 'calculus', 'sage', 'symbolic', 'expression.html')  # optional - sagemath_doc_html
 +    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
+     sage: with open(docfilename) as fobj:  # optional - sagemath_doc_html
      ....:     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='',
+@@ -845,12 +845,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  # optional - sagemath_doc_html
+-        sage: len(_search_src_or_doc('src', r'matrix\(', 'incidence_structures', 'self', 'combinat', interact=False).splitlines()) > 1  # optional - sagemath_doc_html
 +        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)
+         sage: 'abvar/homology' in _search_src_or_doc('doc', 'homology', 'variety', interact=False)  # optional - sagemath_doc_html, 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)  # optional - sagemath_doc_html
 +        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:
+@@ -1369,7 +1369,7 @@ class _sage_doc:
  
-         sage: browse_sage_doc._open("reference", testing=True)[0]  # optional - dochtml, indirect doctest
+         sage: browse_sage_doc._open("reference", testing=True)[0]  # optional - sagemath_doc_html, 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]  # optional - sagemath_doc_html
 +        sage: browse_sage_doc(identity_matrix, 'rst')[-107:-47]
          'Full MatrixSpace of 3 by 3 sparse matrices over Integer Ring'
      """
@@ -68,7 +68,7 @@ index eb70516..b4848ed 100644
 cgit v1.0-1-gd88e
 
 
-From 42a76c3f82edecc9c6c53c661251677e3e907584 Mon Sep 17 00:00:00 2001
+From 88dd9f3a1611fed0cc66fb838eb85739646dd34d 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
@@ -78,7 +78,7 @@ Subject: doctests: add dochtml label to some tests that need docs installed
  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
+index f8c8ebd..d329009 100644
 --- a/src/sage_docbuild/__init__.py
 +++ b/src/sage_docbuild/__init__.py
 @@ -105,7 +105,7 @@ def builder_helper(type):
@@ -86,7 +86,7 @@ index 4a71c91..dd233bd 100644
          sage: from sage_docbuild import _build_many as build_many
          sage: helper = builder_helper("html")
 -        sage: try:
-+        sage: try:  # optional - dochtml
++        sage: try:  # optional - sagemath_doc_html
          ....:     build_many(build_ref_doc, [("docname", "en", "html", {})])
          ....: except Exception as E:
          ....:     "Non-exception during docbuild: abort pool operation" in str(E)
@@ -95,7 +95,7 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import DocBuilder
              sage: b = DocBuilder('tutorial')
 -            sage: b._output_dir('html')
-+            sage: b._output_dir('html')         # optional - dochtml
++            sage: b._output_dir('html')         # optional - sagemath_doc_html
              '.../html/en/tutorial'
          """
          d = os.path.join(SAGE_DOC, type, self.lang, self.name)
@@ -104,7 +104,7 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import DocBuilder
              sage: b = DocBuilder('tutorial')
 -            sage: b._doctrees_dir()
-+            sage: b._doctrees_dir()             # optional - docthml
++            sage: b._doctrees_dir()             # optional - sagemath_doc_html
              '.../doctrees/en/tutorial'
          """
          d = os.path.join(SAGE_DOC, 'doctrees', self.lang, self.name)
@@ -113,7 +113,7 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import ReferenceBuilder
              sage: b = ReferenceBuilder('reference')
 -            sage: b._output_dir('html')
-+            sage: b._output_dir('html')         # optional - dochtml
++            sage: b._output_dir('html')         # optional - sagemath_doc_html
              '.../html/en/reference'
          """
          if lang is None:
@@ -122,56 +122,10 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import ReferenceTopBuilder
              sage: b = ReferenceTopBuilder('reference')
 -            sage: b._output_dir('html')
-+            sage: b._output_dir('html')         # optional - dochtml
++            sage: b._output_dir('html')         # optional - sagemath_doc_html
              '.../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/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch b/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
new file mode 100644
index 000000000000..d32f1e4d5e9f
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
@@ -0,0 +1,27 @@
+From 836249c415e11d0522bff9013bc1509264b26ebf Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Sun, 9 Jan 2022 16:51:22 -0300
+Subject: trac 33135: add filter to ignore deprecation warnings
+
+---
+ src/sage/all.py | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/sage/all.py b/src/sage/all.py
+index 01ef327..19ca3d4 100644
+--- a/src/sage/all.py
++++ b/src/sage/all.py
+@@ -96,6 +96,10 @@ warnings.filterwarnings('ignore', category=DeprecationWarning,
+ warnings.filterwarnings('ignore', category=DeprecationWarning,
+                         module='pythran')
+ 
++warnings.filterwarnings('ignore', category=DeprecationWarning,
++                        message='The distutils(.sysconfig module| package) is deprecated',
++                        module='numpy|sage.env|sage.features')
++
+ ################ end setup warnings ###############################
+ 
+ 
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
new file mode 100644
index 000000000000..438078a92036
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage/rings/polynomial/hilbert.pyx b/src/sage/rings/polynomial/hilbert.pyx
+index 4cd91d0a46..323b168c4e 100644
+--- a/src/sage/rings/polynomial/hilbert.pyx
++++ b/src/sage/rings/polynomial/hilbert.pyx
+@@ -578,7 +578,7 @@ def hilbert_poincare_series(I, grading=None):
+ 
+     This example exceeded the capabilities of Singular before version 4.2.1p2::
+ 
+-        sage: J.hilbert_numerator(algorithm='singular')
++        sage: J.hilbert_numerator(algorithm='singular')   # not tested - requires singular 4.2.1p2
+         120*t^33 - 3465*t^32 + 48180*t^31 - 429374*t^30 + 2753520*t^29 - 13522410*t^28 + 52832780*t^27 - 168384150*t^26 + 445188744*t^25 - 987193350*t^24 + 1847488500*t^23 + 1372406746*t^22 - 403422496*t^21 - 8403314*t^20 - 471656596*t^19 + 1806623746*t^18 + 752776200*t^17 + 752776200*t^16 - 1580830020*t^15 + 1673936550*t^14 - 1294246800*t^13 + 786893250*t^12 - 382391100*t^11 + 146679390*t^10 - 42299400*t^9 + 7837830*t^8 - 172260*t^7 - 468930*t^6 + 183744*t^5 - 39270*t^4 + 5060*t^3 - 330*t^2 + 1
+ 
+     """
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f53cba947c88..f688629fc26d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -1,6 +1,6 @@
 # Template file for 'sagemath'
 pkgname=sagemath
-version=9.5.beta9
+version=9.5.rc0
 revision=1
 wrksrc=sage-$version
 build_style=configure
@@ -19,7 +19,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
-checksum=aea4c5a8d3b32af2fba644269b9daf4f62471471ba2d7d83da0f8098a5f53225
+checksum=8012e3ac35290fa9b2cb837eeca149925784c2378b486731226944e4afd8a4e6
 python_version=3
 
 build_options="debug system_python3 system_site_packages"
@@ -128,7 +128,7 @@ nostrip=yes
 noshlibprovides=yes
 
 # don't rewrite python shebang as sage uses its own python (for now)
-_no_python_shebang=yes
+#_no_python_shebang=yes
 
 # compile python code in sage venv
 pycompile_dirs="$_SAGE_ROOT/venv/"

From 75c7f82e4cdc84d9bafcc64c2cbe5d79be98a2e3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 10 Jan 2022 16:32:54 -0300
Subject: [PATCH 30/50] sagemath: use system gap

---
 ...f491e5ce599ba185f5e93f02e0fcebd76c9e.patch | 57 +++++++++++++++++++
 .../patches/zzz-skip_doctest_system_gap.patch | 13 +++++
 srcpkgs/sagemath/template                     | 15 ++++-
 3 files changed, 82 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch

diff --git a/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch b/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
new file mode 100644
index 000000000000..da88a369db0d
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
@@ -0,0 +1,57 @@
+From 2c981351bb60089530b0598d3e9a909a23d4d4d8 Mon Sep 17 00:00:00 2001
+From: Thierry Thomas <thierry@FreeBSD.org>
+Date: Mon, 22 Mar 2021 03:04:12 +0100
+Subject: 29644: Add spkg-configure.m4 for gap
+
+---
+ build/pkgs/gap/spkg-configure.m4 | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+ create mode 100644 build/pkgs/gap/spkg-configure.m4
+
+diff --git a/build/pkgs/gap/spkg-configure.m4 b/build/pkgs/gap/spkg-configure.m4
+new file mode 100644
+index 00000000..91cd089
+--- /dev/null
++++ b/build/pkgs/gap/spkg-configure.m4
+@@ -0,0 +1,8 @@
++SAGE_SPKG_CONFIGURE([gap], [
++    SAGE_SPKG_DEPCHECK([gmp], [
++       AC_CHECK_HEADER([gap/system.h], [
++        AC_SEARCH_LIBS([GAP_COMM], [gap], [
++        ], [sage_spkg_install_gap=yes])
++       ], [sage_spkg_install_gap=yes])
++    ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2a41f491e5ce599ba185f5e93f02e0fcebd76c9e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Samuel=20Leli=C3=A8vre?= <samuel.lelievre@gmail.com>
+Date: Mon, 22 Mar 2021 03:05:31 +0100
+Subject: 29644: Add distro information for gap
+
+---
+ build/pkgs/gap/distros/fedora.txt | 1 +
+ build/pkgs/gap/distros/gentoo.txt | 1 +
+ 2 files changed, 2 insertions(+)
+ create mode 100644 build/pkgs/gap/distros/fedora.txt
+ create mode 100644 build/pkgs/gap/distros/gentoo.txt
+
+diff --git a/build/pkgs/gap/distros/fedora.txt b/build/pkgs/gap/distros/fedora.txt
+new file mode 100644
+index 00000000..ea4feae
+--- /dev/null
++++ b/build/pkgs/gap/distros/fedora.txt
+@@ -0,0 +1 @@
++gap
+diff --git a/build/pkgs/gap/distros/gentoo.txt b/build/pkgs/gap/distros/gentoo.txt
+new file mode 100644
+index 00000000..ea64ec9
+--- /dev/null
++++ b/build/pkgs/gap/distros/gentoo.txt
+@@ -0,0 +1 @@
++sci-mathematics/gap
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
new file mode 100644
index 000000000000..f132591d48ac
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage_setup/optional_extension.py b/src/sage_setup/optional_extension.py
+index f252849384..4034e3e196 100644
+--- a/src/sage_setup/optional_extension.py
++++ b/src/sage_setup/optional_extension.py
+@@ -80,7 +80,7 @@ def OptionalExtension(*args, **kwds):
+         sage: print(ext.__class__.__name__)
+         CythonizeExtension
+         sage: ext = OptionalExtension("foo", ["foo.c"], package="gap")
+-        sage: print(ext.__class__.__name__)
++        sage: print(ext.__class__.__name__)     # not tested - fails with system gap
+         Extension
+     """
+     try:
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f688629fc26d..02b0af4ad16d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -66,7 +66,6 @@ ${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
 ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
 
 https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
-https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
 http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
 https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
 https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
@@ -103,7 +102,6 @@ ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
 dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
 
 c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
-6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
 07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
 3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
 718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
@@ -159,6 +157,13 @@ pre_configure() {
 	export MAKE="make -j ${XBPS_MAKEJOBS}"
 }
 
+post_configure() {
+	# we set some variables, right after configure has created sage_conf.py
+	cat <<-EOF >> pkgs/sage-conf/sage_conf.py
+	GAP_ROOT_DIR = "/usr/share/gap"
+	EOF
+}
+
 # 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
@@ -248,7 +253,11 @@ makedepends+="
  gengetopt texinfo
  brial-devel cliquer-devel gfan libbraiding-devel libhomfly-devel
  lrcalc-devel nauty-devel palp tachyon
- maxima-ecl primesieve-devel primecount-devel
+ maxima-ecl primesieve-devel primecount-devel gap-devel
+"
+
+# optional dependencies
+makedepends+="
  ffmpeg ImageMagick
 "
 

From e97cfacc19183c4cfc0e6cc8b64e95efdd010292 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Thu, 13 Jan 2022 03:21:19 -0300
Subject: [PATCH 31/50] sagemath: fixes for system gap

---
 .../zzz-fixes_for_system_gap--see_29644.patch | 96 +++++++++++++++++++
 .../patches/zzz-skip_doctest_system_gap.patch | 13 ---
 srcpkgs/sagemath/template                     |  1 +
 3 files changed, 97 insertions(+), 13 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
 delete mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch

diff --git a/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch b/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
new file mode 100644
index 000000000000..741d2b23a7f5
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
@@ -0,0 +1,96 @@
+From 346b4ea4c92f4287d3c097b92817cf2abfcddd8c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Thu, 13 Jan 2022 01:41:31 -0300
+Subject: [PATCH] gap: fixes for using system gap
+
+ - fix _get_shared_lib_path() so we don't need to configure GAP_SO
+ - fix gap_root() so we don't need to configure GAP_ROOT_DIR
+ - skip a useless test that cannot succeed on system gap
+ - use gap_root() in saved_workspace.py instead of GAP_ROOT_DIR
+---
+ src/sage/env.py                      |  2 +-
+ src/sage/libs/gap/saved_workspace.py |  4 ++--
+ src/sage/libs/gap/util.pyx           | 11 +++++++++++
+ src/sage_setup/optional_extension.py |  2 +-
+ 4 files changed, 15 insertions(+), 4 deletions(-)
+
+diff --git a/src/sage/env.py b/src/sage/env.py
+index c4953cfa65..c16696d298 100644
+--- a/src/sage/env.py
++++ b/src/sage/env.py
+@@ -293,7 +293,7 @@ def _get_shared_lib_path(*libnames: str) -> Optional[str]:
+             if sys.platform == 'darwin':
+                 ext = 'dylib'
+             else:
+-                ext = 'so'
++                ext = 'so*'
+ 
+             if SAGE_LOCAL:
+                 search_directories.append(Path(SAGE_LOCAL) / 'lib')
+diff --git a/src/sage/libs/gap/saved_workspace.py b/src/sage/libs/gap/saved_workspace.py
+index ad5adec36d..59c498795f 100644
+--- a/src/sage/libs/gap/saved_workspace.py
++++ b/src/sage/libs/gap/saved_workspace.py
+@@ -8,7 +8,7 @@ workspaces.
+ 
+ import os
+ import glob
+-from sage.env import GAP_ROOT_DIR
++from sage.libs.gap.util import gap_root
+ from sage.interfaces.gap_workspace import gap_workspace_file
+ 
+ 
+@@ -31,7 +31,7 @@ def timestamp():
+     """
+     libgap_dir = os.path.dirname(__file__)
+     libgap_files = glob.glob(os.path.join(libgap_dir, '*'))
+-    gap_packages = glob.glob(os.path.join(GAP_ROOT_DIR, 'pkg', '*'))
++    gap_packages = glob.glob(os.path.join(gap_root(), 'pkg', '*'))
+     files = libgap_files + gap_packages
+     if len(files) == 0:
+         print('Unable to find LibGAP files.')
+diff --git a/src/sage/libs/gap/util.pyx b/src/sage/libs/gap/util.pyx
+index 08c4c40cc0..c7dd557c35 100644
+--- a/src/sage/libs/gap/util.pyx
++++ b/src/sage/libs/gap/util.pyx
+@@ -23,6 +23,7 @@ from cysignals.signals cimport sig_on, sig_off
+ import os
+ import warnings
+ import sage.env
++import subprocess
+ 
+ from .gap_includes cimport *
+ from .element cimport *
+@@ -178,6 +179,16 @@ def gap_root():
+     if os.path.exists(sage.env.GAP_ROOT_DIR):
+         return sage.env.GAP_ROOT_DIR
+ 
++    gap_expr = 'JoinStringsWithSeparator(KERNEL_INFO().GAP_ROOT_PATHS,";")'
++    gap_root_paths = subprocess.getoutput(
++        f"gap -r -q --bare --nointeract -c 'Display({gap_expr});'"
++        ).strip().split(';')
++
++    for gapdir in gap_root_paths:
++        if os.path.exists(os.path.join(gapdir, 'sysinfo.gap')):
++            sage.env.GAP_ROOT_DIR = gapdir
++            return gapdir
++
+     # Attempt to figure out the appropriate GAP_ROOT by reading the
+     # local/bin/gap shell script; this is an ugly hack that exists for
+     # historical reasons; the best approach to setting where Sage looks for
+diff --git a/src/sage_setup/optional_extension.py b/src/sage_setup/optional_extension.py
+index f252849384..4034e3e196 100644
+--- a/src/sage_setup/optional_extension.py
++++ b/src/sage_setup/optional_extension.py
+@@ -80,7 +80,7 @@ def OptionalExtension(*args, **kwds):
+         sage: print(ext.__class__.__name__)
+         CythonizeExtension
+         sage: ext = OptionalExtension("foo", ["foo.c"], package="gap")
+-        sage: print(ext.__class__.__name__)
++        sage: print(ext.__class__.__name__)     # not tested - fails with system gap
+         Extension
+     """
+     try:
+-- 
+2.34.1
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
deleted file mode 100644
index f132591d48ac..000000000000
--- a/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/src/sage_setup/optional_extension.py b/src/sage_setup/optional_extension.py
-index f252849384..4034e3e196 100644
---- a/src/sage_setup/optional_extension.py
-+++ b/src/sage_setup/optional_extension.py
-@@ -80,7 +80,7 @@ def OptionalExtension(*args, **kwds):
-         sage: print(ext.__class__.__name__)
-         CythonizeExtension
-         sage: ext = OptionalExtension("foo", ["foo.c"], package="gap")
--        sage: print(ext.__class__.__name__)
-+        sage: print(ext.__class__.__name__)     # not tested - fails with system gap
-         Extension
-     """
-     try:
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 02b0af4ad16d..0d8ce1f7a70a 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -161,6 +161,7 @@ post_configure() {
 	# we set some variables, right after configure has created sage_conf.py
 	cat <<-EOF >> pkgs/sage-conf/sage_conf.py
 	GAP_ROOT_DIR = "/usr/share/gap"
+	GAP_SO = "$(objdump -p /usr/lib/libgap.so | awk '/SONAME/{print $2}')"
 	EOF
 }
 

From 3a380c61dde77f6a5667d10297b29f2fb8521cac Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Thu, 13 Jan 2022 15:47:33 -0300
Subject: [PATCH 32/50] New package: sagemath-test

---
 srcpkgs/sagemath-test/template                | 32 +++++++++++++++++++
 .../patches/zzz-skip_doctest_shebang.patch    | 11 +++++++
 2 files changed, 43 insertions(+)
 create mode 100644 srcpkgs/sagemath-test/template
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch

diff --git a/srcpkgs/sagemath-test/template b/srcpkgs/sagemath-test/template
new file mode 100644
index 000000000000..3e0b1c3233fd
--- /dev/null
+++ b/srcpkgs/sagemath-test/template
@@ -0,0 +1,32 @@
+# Template file for 'sagemath-test'
+pkgname=sagemath-test
+version=1
+revision=1
+build_style=meta
+checkdepends="sagemath"
+short_desc="Dummy package to test sagemath"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-2.0-or-later"
+homepage="none"
+
+# TODO: install base-voidstrap, uninstall base-chroot, and remove orphans
+# so we can check sagemath depends are enough to run sage on void
+
+do_check() {
+	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
+		_test_args=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	fi
+	if [ -z "$_test_args" ]; then
+		_test_args=--all
+	fi
+	if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
+		# for CI use a predictable random seed
+		_test_args="--random-seed=0 $_test_args"
+	fi
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args="--long $_test_args"
+	else
+		_test_args="--warn-long 5.0 $_test_args"
+	fi
+	/usr/bin/sage* -tp ${XBPS_MAKEJOBS} ${_test_args}
+}
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch
new file mode 100644
index 000000000000..04fa2acbf3ec
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch
@@ -0,0 +1,11 @@
+--- a/src/sage/tests/cmdline.py
++++ b/src/sage/tests/cmdline.py
+@@ -488,7 +488,7 @@ def test_executable(args, input="", timeout=100.0, pydebug_ignore_warnings=False
+         0
+ 
+         sage: (out, err, ret) = test_executable(["sage", "--cython"])
+-        sage: print(err)
++        sage: print(err)  # not tested - broken when shebang is rewritten
+         Cython (http://cython.org) is a compiler for code written in the
+         Cython language.  Cython is based on Pyrex by Greg Ewing.
+         ...

From 0bdbdb1787e5c102fbc0704352d3552821dd8202 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 11:34:23 -0300
Subject: [PATCH 33/50] sagemath: cleanup and one patch

---
 .../zzz-skip_doctest_sage_setup_find.patch    | 12 ++++++++
 srcpkgs/sagemath/template                     | 30 ++++---------------
 2 files changed, 18 insertions(+), 24 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch

diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch
new file mode 100644
index 000000000000..15aed02f9aaa
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch
@@ -0,0 +1,12 @@
+--- a/src/sage_setup/find.py
++++ b/src/sage_setup/find.py
+@@ -301,7 +301,7 @@ def find_extra_files(src_dir, modules, cythonized_dir, special_filenames=[]):
+         sage: extras["sage/libs/mpfr"]
+         [...sage/libs/mpfr/types.pxd...]
+         sage: extras["sage/ext/interpreters"]
+-        ['.../src/sage/ext/interpreters/wrapper_cdf.pxd', ...wrapper_cdf.h...]
++        ['.../src/sage/ext/interpreters/wrapper_cdf.pxd', ...]
+     """
+     from Cython.Utils import is_package_dir
+ 
+--
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 0d8ce1f7a70a..f25cb745c9c4 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -4,7 +4,8 @@ version=9.5.rc0
 revision=1
 wrksrc=sage-$version
 build_style=configure
-configure_args="--enable-build-as-root"
+configure_args="--enable-build-as-root --with-system-python3
+ --enable-system-site-packages"
 make_check_target=ptest
 # for now skip building docs
 make_build_target=build
@@ -22,13 +23,8 @@ distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
 checksum=8012e3ac35290fa9b2cb837eeca149925784c2378b486731226944e4afd8a4e6
 python_version=3
 
-build_options="debug system_python3 system_site_packages"
+build_options="debug"
 desc_option_debug="Build with debug symbols"
-desc_option_system_python="Build using system python 3"
-desc_option_system_python="Build using system python site-packages"
-build_options_default="system_python3 system_site_packages"
-configure_args+=" $(vopt_with system_python3)"
-configure_args+=" $(vopt_enable system_site_packages)"
 
 # path where sage will be installed
 _SAGE_ROOT=/usr/lib/sage-${version}
@@ -112,9 +108,6 @@ for u in ${_upstream}; do
 	skip_extraction+=" ${u##*[/>]}"
 done
 
-# 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
@@ -165,16 +158,6 @@ post_configure() {
 	EOF
 }
 
-# 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() {
 	vlicense COPYING.txt
 	vdoc README.md
@@ -301,7 +284,6 @@ _sage_python3_modules="
  python3-wheel python3-zipp pythran
  "
 
-if [ "$build_option_system_site_packages" ]; then
-	makedepends+=" $_sage_python3_modules"
-	depends+=" $_sage_python3_modules"
-fi
+# python packages are build and runtime dependencies
+makedepends+=" $_sage_python3_modules"
+depends+=" $_sage_python3_modules"

From 27ec15d3f6d3574e7344677e37d681fe92021fdd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 11:34:32 -0300
Subject: [PATCH 34/50] sagemath: update to 9.5.rc1.

---
 srcpkgs/sagemath/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f25cb745c9c4..f5d9d0f0fabd 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -1,6 +1,6 @@
 # Template file for 'sagemath'
 pkgname=sagemath
-version=9.5.rc0
+version=9.5.rc1
 revision=1
 wrksrc=sage-$version
 build_style=configure
@@ -20,7 +20,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
-checksum=8012e3ac35290fa9b2cb837eeca149925784c2378b486731226944e4afd8a4e6
+checksum=b015c54f7411669ef70bac2b2fde260e7f45724bcff170957b1f9fd08131f2c3
 python_version=3
 
 build_options="debug"

From ea41077edf87970f6ae8d9d62231f8d2362c9100 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 14:53:11 -0300
Subject: [PATCH 35/50] sagemath: patch not needed with singular 4.3.0

---
 ...zzz-skip_doctest_singular_4.2.1--see_33134.patch | 13 -------------
 1 file changed, 13 deletions(-)
 delete mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch

diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
deleted file mode 100644
index 438078a92036..000000000000
--- a/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/src/sage/rings/polynomial/hilbert.pyx b/src/sage/rings/polynomial/hilbert.pyx
-index 4cd91d0a46..323b168c4e 100644
---- a/src/sage/rings/polynomial/hilbert.pyx
-+++ b/src/sage/rings/polynomial/hilbert.pyx
-@@ -578,7 +578,7 @@ def hilbert_poincare_series(I, grading=None):
- 
-     This example exceeded the capabilities of Singular before version 4.2.1p2::
- 
--        sage: J.hilbert_numerator(algorithm='singular')
-+        sage: J.hilbert_numerator(algorithm='singular')   # not tested - requires singular 4.2.1p2
-         120*t^33 - 3465*t^32 + 48180*t^31 - 429374*t^30 + 2753520*t^29 - 13522410*t^28 + 52832780*t^27 - 168384150*t^26 + 445188744*t^25 - 987193350*t^24 + 1847488500*t^23 + 1372406746*t^22 - 403422496*t^21 - 8403314*t^20 - 471656596*t^19 + 1806623746*t^18 + 752776200*t^17 + 752776200*t^16 - 1580830020*t^15 + 1673936550*t^14 - 1294246800*t^13 + 786893250*t^12 - 382391100*t^11 + 146679390*t^10 - 42299400*t^9 + 7837830*t^8 - 172260*t^7 - 468930*t^6 + 183744*t^5 - 39270*t^4 + 5060*t^3 - 330*t^2 + 1
- 
-     """

From 8143ee82f5b3ee1140f279b73bc3fd3a2de8d16c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 14:53:25 -0300
Subject: [PATCH 36/50] sagemath: install /usr/bin/sage

---
 srcpkgs/sagemath/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f5d9d0f0fabd..49821fc982e4 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -181,7 +181,8 @@ do_install() {
 	vmkdir 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}
+	ln -sfT $_SAGE_ROOT/sage ${DESTDIR}/usr/bin/sage-${version}
+	ln -sfT sage-${version} ${DESTDIR}/usr/bin/sage
 }
 
 do_check() {

From 7ec27d7d6067abc9d832f456f81f3b53521efc9f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 16:31:25 -0300
Subject: [PATCH 37/50] New package: python3-cvxopt-1.2.7

---
 srcpkgs/python3-cvxopt/template | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 srcpkgs/python3-cvxopt/template

diff --git a/srcpkgs/python3-cvxopt/template b/srcpkgs/python3-cvxopt/template
new file mode 100644
index 000000000000..0fb769b294e0
--- /dev/null
+++ b/srcpkgs/python3-cvxopt/template
@@ -0,0 +1,20 @@
+# Template file for 'python3-cvxopt'
+pkgname=python3-cvxopt
+version=1.2.7
+revision=1
+wrksrc="cvxopt-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools"
+makedepends="python3-devel blas-devel lapack-devel SuiteSparse-devel gsl-devel glpk-devel"
+checkdepends="python3-pytest"
+short_desc="Python software for convex optimization"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-3.0-or-later"
+homepage="http://cvxopt.org/"
+distfiles="${PYPI_SITE}/c/cvxopt/cvxopt-${version}.tar.gz"
+checksum=3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
+
+pre_build() {
+	export CVXOPT_BUILD_GSL=1
+	export CVXOPT_BUILD_GLPK=1
+}

From 49769070effce73cb5c324ab444147fc181b12db Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 23:37:14 -0300
Subject: [PATCH 38/50] sagemath: rearrange upstream packages and indent

This doesn't change anything, it separates _upstream and
checksum in three blocks to make it easier to edit.
---
 srcpkgs/sagemath/template | 140 ++++++++++++++++++++------------------
 1 file changed, 74 insertions(+), 66 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 49821fc982e4..4317f1e80893 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -31,76 +31,84 @@ _SAGE_ROOT=/usr/lib/sage-${version}
 
 _SAGE_UPSTREAM_MIRROR=https://mirrors.mit.edu/sage/spkg/upstream
 
+# packages were sage is the upstream
 _upstream="
-${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
-
-${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
-${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
-${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
-${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
-${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
-${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
-${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
-${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
-${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
-${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
-${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
-${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
-${PYPI_SITE}/P/PyCygwin/PyCygwin-0.1.tar.gz
-${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
-${PYPI_SITE}/s/setuptools/setuptools-59.2.0.tar.gz
-${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
-${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
-${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
-
-https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
-http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
-https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
-https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
+ ${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
+ ${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
+ ${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
+"
+checksum+="
+ c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
+ d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
+ 5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
+ ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
+ 169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
+ cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
+ edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+ b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
+ cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
 "
 
+# packages from pypi (python modules)
+_upstream+="
+ ${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
+ ${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
+ ${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
+ ${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
+ ${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
+ ${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
+ ${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
+ ${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
+ ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
+ ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
+ ${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
+ ${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
+ ${PYPI_SITE}/P/PyCygwin/PyCygwin-0.1.tar.gz
+ ${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
+ ${PYPI_SITE}/s/setuptools/setuptools-59.2.0.tar.gz
+ ${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
+ ${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
+ ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
+"
+checksum+="
+ dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
+ 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
+ 3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
+ 03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
+ 5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
+ cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
+ 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+ a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
+ d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
+ 5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
+ 471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
+ 78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
+ 45a5e295590c469a49b2804bfdb89059e942d768ad3b813f484d7b5bff48d226
+ ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
+ 157d21de9d055ab9e8ea3186d91e7f4f865e11f42deafa952d90842671fc2576
+ 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
+ 545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
+ dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
+"
+
+# other upstream packages
+_upstream+="
+ https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
+ http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
+ https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+ https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
+"
 checksum+="
-c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
-d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
-5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
-ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
-169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
-cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
-edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
-b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
-cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
-
-dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
-4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
-3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
-03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
-5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
-cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
-581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
-a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
-d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
-5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
-471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
-78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
-45a5e295590c469a49b2804bfdb89059e942d768ad3b813f484d7b5bff48d226
-ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
-157d21de9d055ab9e8ea3186d91e7f4f865e11f42deafa952d90842671fc2576
-6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
-545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
-dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
-
-c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
-07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
-3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
-718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
+ c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
+ 07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
+ 3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+ 718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
 "
 
 for u in ${_upstream}; do

From be5f0c86cb081d87d6658b5b7b39030268711088 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 23:37:58 -0300
Subject: [PATCH 39/50] sagemath: use system cvxopt and importlib_resources

---
 srcpkgs/sagemath/template | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 4317f1e80893..5eb70a6267bb 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -59,12 +59,10 @@ checksum+="
 _upstream+="
  ${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
  ${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
- ${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
  ${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
  ${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
  ${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
  ${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
- ${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
  ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
  ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
  ${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
@@ -79,12 +77,10 @@ _upstream+="
 checksum+="
  dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
  4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
- 3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
  03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
  5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
  cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
  581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
- a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
  d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
  5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
  471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
@@ -257,9 +253,6 @@ makedepends+="
 # TODO: optional
 # 4ti2 coxeter3 libsemigroups lrslib pdf2svg perl_mongodb polymake
 
-# TODO: standard
-# cvxopt importlib_resources
-
 # python packages for trac-29665
 _sage_python3_modules="
  python3-Babel python3-Jinja2 python3-MarkupSafe python3-Pillow
@@ -291,6 +284,8 @@ _sage_python3_modules="
  python3-tornado python3-traitlets python3-typing_extensions
  python3-tzlocal python3-urllib3 python3-wcwidth python3-webencodings
  python3-wheel python3-zipp pythran
+
+ python3-cvxopt python3-importlib_resources
  "
 
 # python packages are build and runtime dependencies

From f0af0898ca3a490cfc245f49e928470302c16c27 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 01:48:08 -0300
Subject: [PATCH 40/50] sagemath-test: fix sage binary (now is just 'sage')

---
 srcpkgs/sagemath-test/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/sagemath-test/template b/srcpkgs/sagemath-test/template
index 3e0b1c3233fd..1c0d71683a1b 100644
--- a/srcpkgs/sagemath-test/template
+++ b/srcpkgs/sagemath-test/template
@@ -28,5 +28,5 @@ do_check() {
 	else
 		_test_args="--warn-long 5.0 $_test_args"
 	fi
-	/usr/bin/sage* -tp ${XBPS_MAKEJOBS} ${_test_args}
+	sage -tp ${XBPS_MAKEJOBS} ${_test_args}
 }

From 95eaa2c36333b09eba6dc377ba4a86a2b3ee78a5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 10:49:04 -0300
Subject: [PATCH 41/50] sagemath: disallow fuzz in patches

---
 ...49c415e11d0522bff9013bc1509264b26ebf.patch | 27 -------------------
 srcpkgs/sagemath/template                     |  1 +
 2 files changed, 1 insertion(+), 27 deletions(-)
 delete mode 100644 srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch

diff --git a/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch b/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
deleted file mode 100644
index d32f1e4d5e9f..000000000000
--- a/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 836249c415e11d0522bff9013bc1509264b26ebf Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
-Date: Sun, 9 Jan 2022 16:51:22 -0300
-Subject: trac 33135: add filter to ignore deprecation warnings
-
----
- src/sage/all.py | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/src/sage/all.py b/src/sage/all.py
-index 01ef327..19ca3d4 100644
---- a/src/sage/all.py
-+++ b/src/sage/all.py
-@@ -96,6 +96,10 @@ warnings.filterwarnings('ignore', category=DeprecationWarning,
- warnings.filterwarnings('ignore', category=DeprecationWarning,
-                         module='pythran')
- 
-+warnings.filterwarnings('ignore', category=DeprecationWarning,
-+                        message='The distutils(.sysconfig module| package) is deprecated',
-+                        module='numpy|sage.env|sage.features')
-+
- ################ end setup warnings ###############################
- 
- 
--- 
-cgit v1.0-1-gd88e
-
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 5eb70a6267bb..e5a728b2217d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -22,6 +22,7 @@ homepage="http://sagemath.org/"
 distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
 checksum=b015c54f7411669ef70bac2b2fde260e7f45724bcff170957b1f9fd08131f2c3
 python_version=3
+patch_args="-F0 -Np1"
 
 build_options="debug"
 desc_option_debug="Build with debug symbols"

From 1d307a5b46f8a852536aad4fbec2b77085e56184 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 13:27:53 -0300
Subject: [PATCH 42/50] sagemath: disable packages that are not needed

 - appnope: only needed for macos
 - fonttools: only needed to build matplotlib
 - importlib_resources: only needed for old python
 - pycygwin: only needed for cygwin
 - setuptools_scm_git_archive: only needed to build matplotlib
 - setuptools_wheel: not needed
 - sphinxcontrib_websupport: only needed to build sphinx
 - cppy: force use from system python3-cppy
---
 srcpkgs/sagemath/template | 51 +++++++++++++++++++++++++++------------
 1 file changed, 35 insertions(+), 16 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index e5a728b2217d..f15bfbf76e0a 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -58,39 +58,29 @@ checksum+="
 
 # packages from pypi (python modules)
 _upstream+="
- ${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
- ${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
  ${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
  ${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
  ${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
- ${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
+
  ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
  ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
  ${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
  ${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
- ${PYPI_SITE}/P/PyCygwin/PyCygwin-0.1.tar.gz
+
  ${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
- ${PYPI_SITE}/s/setuptools/setuptools-59.2.0.tar.gz
- ${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
- ${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
  ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
 "
 checksum+="
- dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
- 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
  03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
  5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
  cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
- 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+
  d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
  5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
  471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
  78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
- 45a5e295590c469a49b2804bfdb89059e942d768ad3b813f484d7b5bff48d226
+
  ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
- 157d21de9d055ab9e8ea3186d91e7f4f865e11f42deafa952d90842671fc2576
- 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
- 545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
  dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
 "
 
@@ -108,6 +98,22 @@ checksum+="
  718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
 "
 
+# these packages are not needed, don't install
+_dontinstall="
+ appnope
+ fonttools
+ importlib_resources
+ pycygwin
+ setuptools_scm_git_archive
+ setuptools_wheel
+ sphinxcontrib_websupport
+"
+
+# these packages can be used from system
+_usefromsystem="
+ cppy
+"
+
 for u in ${_upstream}; do
 	distfiles+=" $u"
 	skip_extraction+=" ${u##*[/>]}"
@@ -145,8 +151,20 @@ do_clean() {
 	rm -rf $wrksrc $_SAGE_ROOT
 }
 
-pre_configure() {
+post_patch() {
 	./bootstrap
+}
+
+pre_configure() {
+	for spkg in $_dontinstall; do
+		configure_args+=" sage_spkg_install_$spkg=no"
+		configure_args+=" sage_require_$spkg=no"
+	done
+
+	for spkg in $_usefromsystem; do
+		configure_args+=" sage_spkg_install_$spkg=no"
+		configure_args+=" sage_require_$spkg=yes"
+	done
 
 	if [ "$build_option_debug" ]; then
 		export SAGE_DEBUG=yes
@@ -286,7 +304,8 @@ _sage_python3_modules="
  python3-tzlocal python3-urllib3 python3-wcwidth python3-webencodings
  python3-wheel python3-zipp pythran
 
- python3-cvxopt python3-importlib_resources
+ python3-cvxopt
+ python3-cppy
  "
 
 # python packages are build and runtime dependencies

From fec4d063e2ed623777b2ce3f558b5fcd839dc185 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 17:32:39 -0300
Subject: [PATCH 43/50] New package: python3-cysignals-1.11.2

---
 .../python3-cysignals/patches/fix-write.patch | 46 +++++++++++++++++++
 srcpkgs/python3-cysignals/template            | 19 ++++++++
 2 files changed, 65 insertions(+)
 create mode 100644 srcpkgs/python3-cysignals/patches/fix-write.patch
 create mode 100644 srcpkgs/python3-cysignals/template

diff --git a/srcpkgs/python3-cysignals/patches/fix-write.patch b/srcpkgs/python3-cysignals/patches/fix-write.patch
new file mode 100644
index 000000000000..18206bd808d7
--- /dev/null
+++ b/srcpkgs/python3-cysignals/patches/fix-write.patch
@@ -0,0 +1,46 @@
+Fix a doctest failure which triggers in i686.
+
+The example is in the function `test_bad_str()` in the file `tests.pyx`.
+The test pases a bad string to `sig_str()` and then raises `SIGILL`. The
+signal handler eventually raises a Python exception which in turn raises
+a `SIGSEGV` when accessing the bad string. An error message is expected,
+but that doesn't happen.
+
+Presumably the segfault happens inside some stdio function which leaves
+stdio buffers in an inconsistent state so the latter `fprintf` doesn't
+work properly. From signal-safety(7):
+
+    Suppose that the main program is in the middle of a call to a
+    stdio function such as printf(3) where the buffer and associated
+    variables have been partially updated.  If, at that moment, the
+    program is interrupted by a signal handler that also calls
+    printf(3), then the second call to printf(3) will operate on
+    inconsistent data, with unpredictable results.
+
+We fix this by replacing the `fprintf` by calls to `write`, which is
+async-signal-safe according to POSIX.
+
+--- a/src/cysignals/implementation.c      2022-01-16 22:36:45.143796872 +0000
++++ b/src/cysignals/implementation.c      2022-01-17 02:22:31.196695043 +0000
+@@ -638,12 +622,15 @@
+ #endif
+ 
+     if (s) {
++        /* Using fprintf from inside a signal handler is undefined, see signal-safety(7) */
++        const char * message =
++            "\n"
++            "This probably occurred because a *compiled* module has a bug\n"
++            "in it and is not properly wrapped with sig_on(), sig_off().\n"
++            "Python will now terminate.\n"
++            "------------------------------------------------------------------------\n";
++        write(2, s, strlen(s));
++        write(2, message, strlen(message));
+-        fprintf(stderr,
+-            "%s\n"
+-            "This probably occurred because a *compiled* module has a bug\n"
+-            "in it and is not properly wrapped with sig_on(), sig_off().\n"
+-            "Python will now terminate.\n", s);
+-        print_sep();
+     }
+ 
+ dienow:
diff --git a/srcpkgs/python3-cysignals/template b/srcpkgs/python3-cysignals/template
new file mode 100644
index 000000000000..4655eead2a9c
--- /dev/null
+++ b/srcpkgs/python3-cysignals/template
@@ -0,0 +1,19 @@
+# Template file for 'python3-cysignals'
+pkgname=python3-cysignals
+version=1.11.2
+revision=1
+wrksrc="cysignals-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools python3-Cython autoconf"
+makedepends="python3-devel pari-devel"
+short_desc="Interrupt and signal handling for Cython "
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/sagemath/cysignals"
+distfiles="${PYPI_SITE}/c/cysignals/cysignals-${version}.tar.gz"
+checksum=5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
+nocross=yes # runs binaries built for target
+
+do_check() {
+	make check
+}

From 97f4e3be91bd4f30a89db3bb6887dc0846cd9e91 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 18:28:55 -0300
Subject: [PATCH 44/50] New package: python3-cypari2-2.1.2

---
 srcpkgs/python3-cypari2/template | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 srcpkgs/python3-cypari2/template

diff --git a/srcpkgs/python3-cypari2/template b/srcpkgs/python3-cypari2/template
new file mode 100644
index 000000000000..18755ec020b4
--- /dev/null
+++ b/srcpkgs/python3-cypari2/template
@@ -0,0 +1,19 @@
+# Template file for 'python3-cypari2'
+pkgname=python3-cypari2
+version=2.1.2
+revision=1
+wrksrc=cypari2-${version}
+build_style=python3-module
+hostmakedepends="python3-setuptools python3-Cython pari perl"
+makedepends="python3-devel python3-cysignals pari-devel gmp-devel"
+short_desc="Python interface to the number theory library PARI/GP"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-2.0-or-later"
+homepage="https://github.com/sagemath/cypari2"
+distfiles="${PYPI_SITE}/c/cypari2/cypari2-${version}.tar.gz"
+checksum=03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
+
+do_check() {
+	PYTHONPATH="$(cd build/lib* && pwd)" \
+		make check
+}

From dca176d202e0adbac1c0cca79e8919acfb53bcb8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 18:56:29 -0300
Subject: [PATCH 45/50] New package: python3-pplpy-0.8.7

---
 srcpkgs/python3-pplpy/template | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 srcpkgs/python3-pplpy/template

diff --git a/srcpkgs/python3-pplpy/template b/srcpkgs/python3-pplpy/template
new file mode 100644
index 000000000000..1cb69ffe6a07
--- /dev/null
+++ b/srcpkgs/python3-pplpy/template
@@ -0,0 +1,21 @@
+# Template file for 'python3-pplpy'
+pkgname=python3-pplpy
+version=0.8.7
+revision=1
+wrksrc="pplpy-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools python3-Cython"
+makedepends="python3-cysignals python3-gmpy2 python3-devel gmp-devel
+ gmpxx-devel ppl-devel mpfr-devel libmpc-devel pari-devel"
+short_desc="Python wrapper to the C++ Parma Polyhedra Library (PPL)"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-3.0-or-later"
+homepage="https://gitlab.com/videlec/pplpy"
+changelog="https://gitlab.com/videlec/pplpy/-/raw/master/CHANGES.txt"
+distfiles="${PYPI_SITE}/p/pplpy/pplpy-${version}.tar.gz"
+checksum=500bd0f4ae1a76956fae7fcba77854f5ec3e64fce76803664983763c3f2bd8bd
+
+do_check() {
+	PYTHONPATH=$(cd build/lib* && pwd) \
+		python setup.py test
+}

From 80c9b9342d5a6e496f9ac5419b670926ff84a310 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 01:14:24 -0300
Subject: [PATCH 46/50] New package: python3-fpylll-0.5.6

---
 srcpkgs/python3-fpylll/template | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 srcpkgs/python3-fpylll/template

diff --git a/srcpkgs/python3-fpylll/template b/srcpkgs/python3-fpylll/template
new file mode 100644
index 000000000000..dd2adcee6fce
--- /dev/null
+++ b/srcpkgs/python3-fpylll/template
@@ -0,0 +1,25 @@
+# Template file for 'python3-fpylll'
+pkgname=python3-fpylll
+version=0.5.6
+revision=1
+wrksrc="fpylll-${version}"
+build_style=python3-module
+hostmakedepends="python3-Cython"
+makedepends="python3-cysignals python3-devel gmp-devel mpfr-devel fplll-devel
+ pari-devel"
+checkdepends="python3-pytest python3-numpy"
+short_desc="Python wrapper to fplll (floating point lattice algorithms)"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-2.0-or-later"
+homepage="https://github.com/fplll/fpylll"
+distfiles="${PYPI_SITE}/f/fpylll/fpylll-${version}.tar.gz"
+checksum=6eb8a63fb933c0bf92f290dd66fd884807659214d0ce524afe3687a6a6b13a8b
+
+case $XBPS_TARGET_MACHINE in
+	# skip a test with numerical noise on 32 bit
+	i686*) make_check_args="-k not(averaged_simulate_prob)" ;;
+esac
+
+pre_check() {
+	export PY_IGNORE_IMPORTMISMATCH=1
+}

From 09fd6926bdea64c140a2356f156bf074a8d13f4b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 18:32:13 -0300
Subject: [PATCH 47/50] sagemath: use system Cython, cysignals, cypari2, pplpy,
 fpylll

---
 srcpkgs/sagemath/template | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f15bfbf76e0a..ba22ffbeaf30 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -58,26 +58,18 @@ checksum+="
 
 # packages from pypi (python modules)
 _upstream+="
- ${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
- ${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
- ${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
 
  ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
  ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
- ${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
  ${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
 
  ${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
  ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
 "
 checksum+="
- 03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
- 5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
- cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
 
  d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
  5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
- 471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
  78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
 
  ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
@@ -86,13 +78,11 @@ checksum+="
 
 # other upstream packages
 _upstream+="
- https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
  http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
  https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
  https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
 "
 checksum+="
- c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
  07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
  3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
  718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
@@ -107,11 +97,17 @@ _dontinstall="
  setuptools_scm_git_archive
  setuptools_wheel
  sphinxcontrib_websupport
+ pplpy_doc
 "
 
 # these packages can be used from system
 _usefromsystem="
  cppy
+ cython
+ cysignals
+ cypari
+ pplpy
+ fpylll
 "
 
 for u in ${_upstream}; do
@@ -306,6 +302,11 @@ _sage_python3_modules="
 
  python3-cvxopt
  python3-cppy
+ python3-Cython
+ python3-cysignals
+ python3-cypari2
+ python3-pplpy
+ python3-fpylll
  "
 
 # python packages are build and runtime dependencies

From d27012d85b95ae364f7833ce8adab7c1c80857a2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 01:15:55 -0300
Subject: [PATCH 48/50] sagemath: update to 9.5.rc2.

---
 srcpkgs/sagemath/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index ba22ffbeaf30..b9bd590b61ca 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -1,6 +1,6 @@
 # Template file for 'sagemath'
 pkgname=sagemath
-version=9.5.rc1
+version=9.5.rc2
 revision=1
 wrksrc=sage-$version
 build_style=configure
@@ -20,7 +20,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
-checksum=b015c54f7411669ef70bac2b2fde260e7f45724bcff170957b1f9fd08131f2c3
+checksum=c7eba867c11ab1b6d04535dd8df54640d3de0625ad96cdac17b17af977d96dce
 python_version=3
 patch_args="-F0 -Np1"
 

From 41ec1da54bb68d1ba49a48c0b46b0020611460b6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 09:52:14 -0300
Subject: [PATCH 49/50] sagemath: add timing information for doctests

This makes doctesting faster on many threads
---
 srcpkgs/sagemath-test/files/timings2.json |   1 +
 srcpkgs/sagemath-test/template            |  22 +-
 srcpkgs/sagemath/files/timings2.json      | 255 ++++++++++++++++++++++
 srcpkgs/sagemath/template                 |  21 +-
 4 files changed, 279 insertions(+), 20 deletions(-)
 create mode 120000 srcpkgs/sagemath-test/files/timings2.json
 create mode 100644 srcpkgs/sagemath/files/timings2.json

diff --git a/srcpkgs/sagemath-test/files/timings2.json b/srcpkgs/sagemath-test/files/timings2.json
new file mode 120000
index 000000000000..25d5309fc818
--- /dev/null
+++ b/srcpkgs/sagemath-test/files/timings2.json
@@ -0,0 +1 @@
+../../sagemath/files/timings2.json
\ No newline at end of file
diff --git a/srcpkgs/sagemath-test/template b/srcpkgs/sagemath-test/template
index 1c0d71683a1b..e3b1242bd338 100644
--- a/srcpkgs/sagemath-test/template
+++ b/srcpkgs/sagemath-test/template
@@ -14,19 +14,21 @@ homepage="none"
 
 do_check() {
 	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
-		_test_args=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+		_test_files=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	else
+		_test_files=--all
 	fi
-	if [ -z "$_test_args" ]; then
-		_test_args=--all
+	cp ${FILESDIR}/timings2.json .
+	_test_args="--stats_path=timings2.json"
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args+=" --long --warn-long 20.0"
+	else
+		_test_args+=" --warn-long 10.0"
 	fi
 	if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
 		# for CI use a predictable random seed
-		_test_args="--random-seed=0 $_test_args"
-	fi
-	if [ "$XBPS_CHECK_PKGS" = full ]; then
-		_test_args="--long $_test_args"
-	else
-		_test_args="--warn-long 5.0 $_test_args"
+		_test_args+=" --random-seed=0"
 	fi
-	sage -tp ${XBPS_MAKEJOBS} ${_test_args}
+	# since make check will build the docs, run test like this instead
+	sage -tp ${XBPS_MAKEJOBS} ${_test_args} ${_test_files}
 }
diff --git a/srcpkgs/sagemath/files/timings2.json b/srcpkgs/sagemath/files/timings2.json
new file mode 100644
index 000000000000..958a56d9d6f5
--- /dev/null
+++ b/srcpkgs/sagemath/files/timings2.json
@@ -0,0 +1,255 @@
+{
+  "doc.en.constructions.calculus": {"walltime": 64},
+  "doc.en.constructions.plotting": {"walltime": 28},
+  "doc.en.prep.Advanced-2DPlotting": {"walltime": 13},
+  "doc.en.thematic_tutorials.geometry.polyhedra_tutorial": {"walltime": 12},
+  "doc.en.thematic_tutorials.sandpile": {"walltime": 15},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_advanced": {"walltime": 31},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_cartesian": {"walltime": 36},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_change": {"walltime": 28},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_curvilinear": {"walltime": 35},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_plane": {"walltime": 18},
+  "sage.algebras.commutative_dga": {"walltime": 13},
+  "sage.algebras.lie_algebras.classical_lie_algebra": {"walltime": 121},
+  "sage.algebras.lie_algebras.nilpotent_lie_algebra": {"walltime": 13},
+  "sage.algebras.quantum_clifford": {"walltime": 13},
+  "sage.algebras.quatalg.quaternion_algebra": {"walltime": 10},
+  "sage.algebras.steenrod.steenrod_algebra": {"walltime": 51},
+  "sage.arith.misc": {"walltime": 24},
+  "sage.calculus.calculus": {"walltime": 16},
+  "sage.calculus.functional": {"walltime": 12},
+  "sage.calculus.riemann": {"walltime": 49},
+  "sage.calculus.tests": {"walltime": 15},
+  "sage.calculus.transforms.dwt": {"walltime": 25},
+  "sage.categories.finite_monoids": {"walltime": 13},
+  "sage.categories.super_hopf_algebras_with_basis": {"walltime": 27},
+  "sage.coding.ag_code": {"walltime": 48},
+  "sage.coding.ag_code_decoders": {"walltime": 187},
+  "sage.coding.linear_code": {"walltime": 19},
+  "sage.combinat.backtrack": {"walltime": 30},
+  "sage.combinat.chas.wqsym": {"walltime": 42},
+  "sage.combinat.cluster_algebra_quiver.cluster_seed": {"walltime": 60},
+  "sage.combinat.cluster_algebra_quiver.quiver": {"walltime": 169},
+  "sage.combinat.crystals.affine_factorization": {"walltime": 13},
+  "sage.combinat.crystals.alcove_path": {"walltime": 37},
+  "sage.combinat.crystals.kirillov_reshetikhin": {"walltime": 16},
+  "sage.combinat.crystals.littelmann_path": {"walltime": 13},
+  "sage.combinat.crystals.mv_polytopes": {"walltime": 20},
+  "sage.combinat.crystals.pbw_crystal": {"walltime": 21},
+  "sage.combinat.designs.database": {"walltime": 21},
+  "sage.combinat.designs.gen_quadrangles_with_spread": {"walltime": 114},
+  "sage.combinat.designs.orthogonal_arrays_build_recursive": {"walltime": 12},
+  "sage.combinat.diagram_algebras": {"walltime": 49},
+  "sage.combinat.fqsym": {"walltime": 22},
+  "sage.combinat.k_tableau": {"walltime": 14},
+  "sage.combinat.ncsf_qsym.ncsf": {"walltime": 14},
+  "sage.combinat.ncsf_qsym.qsym": {"walltime": 12},
+  "sage.combinat.partition": {"walltime": 11},
+  "sage.combinat.partition_kleshchev": {"walltime": 19},
+  "sage.combinat.posets.moebius_algebra": {"walltime": 12},
+  "sage.combinat.rigged_configurations.kr_tableaux": {"walltime": 28},
+  "sage.combinat.rigged_configurations.rigged_configurations": {"walltime": 13},
+  "sage.combinat.rigged_configurations.tensor_product_kr_tableaux": {"walltime": 15},
+  "sage.combinat.root_system.integrable_representations": {"walltime": 12},
+  "sage.combinat.root_system.non_symmetric_macdonald_polynomials": {"walltime": 21},
+  "sage.combinat.root_system.plot": {"walltime": 37},
+  "sage.combinat.root_system.root_lattice_realization_algebras": {"walltime": 17},
+  "sage.combinat.root_system.root_lattice_realizations": {"walltime": 24},
+  "sage.combinat.rsk": {"walltime": 36},
+  "sage.combinat.sf.classical": {"walltime": 11},
+  "sage.combinat.sf.k_dual": {"walltime": 13},
+  "sage.combinat.sf.llt": {"walltime": 13},
+  "sage.combinat.sf.macdonald": {"walltime": 58},
+  "sage.combinat.sf.sfa": {"walltime": 25},
+  "sage.combinat.shifted_primed_tableau": {"walltime": 14},
+  "sage.combinat.symmetric_group_algebra": {"walltime": 11},
+  "sage.combinat.tableau": {"walltime": 20},
+  "sage.combinat.tableau_tuple": {"walltime": 29},
+  "sage.combinat.tiling": {"walltime": 305},
+  "sage.combinat.tutorial": {"walltime": 13},
+  "sage.combinat.words.paths": {"walltime": 85},
+  "sage.crypto.block_cipher.des": {"walltime": 21},
+  "sage.crypto.mq.sr": {"walltime": 53},
+  "sage.crypto.sbox": {"walltime": 14},
+  "sage.doctest.forker": {"walltime": 14},
+  "sage.doctest.sources": {"walltime": 93},
+  "sage.doctest.test": {"walltime": 149},
+  "sage.dynamics.arithmetic_dynamics.projective_ds": {"walltime": 48},
+  "sage.dynamics.complex_dynamics.mandel_julia": {"walltime": 16},
+  "sage.functions.bessel": {"walltime": 14},
+  "sage.functions.exp_integral": {"walltime": 12},
+  "sage.functions.other": {"walltime": 15},
+  "sage.geometry.cone": {"walltime": 24},
+  "sage.geometry.hyperplane_arrangement.arrangement": {"walltime": 14},
+  "sage.geometry.lattice_polytope": {"walltime": 12},
+  "sage.geometry.polyhedral_complex": {"walltime": 11},
+  "sage.geometry.polyhedron.base": {"walltime": 33},
+  "sage.geometry.polyhedron.library": {"walltime": 41},
+  "sage.geometry.riemannian_manifolds.parametrized_surface3d": {"walltime": 22},
+  "sage.geometry.triangulation.base": {"walltime": 22},
+  "sage.geometry.triangulation.point_configuration": {"walltime": 14},
+  "sage.graphs.connectivity": {"walltime": 17},
+  "sage.graphs.generators.basic": {"walltime": 10},
+  "sage.graphs.generators.classical_geometries": {"walltime": 30},
+  "sage.graphs.generators.distance_regular": {"walltime": 196},
+  "sage.graphs.generators.families": {"walltime": 21},
+  "sage.graphs.generators.smallgraphs": {"walltime": 22},
+  "sage.graphs.generic_graph": {"walltime": 29},
+  "sage.graphs.genus": {"walltime": 12},
+  "sage.graphs.graph": {"walltime": 20},
+  "sage.graphs.strongly_regular_db": {"walltime": 22},
+  "sage.groups.cubic_braid": {"walltime": 19},
+  "sage.groups.fqf_orthogonal": {"walltime": 19},
+  "sage.groups.lie_gps.nilpotent_lie_group": {"walltime": 10},
+  "sage.groups.matrix_gps.heisenberg": {"walltime": 41},
+  "sage.groups.perm_gps.cubegroup": {"walltime": 11},
+  "sage.homology.homology_vector_space_with_basis": {"walltime": 10},
+  "sage.interacts.test_jupyter": {"walltime": 17},
+  "sage.interfaces.gap": {"walltime": 11},
+  "sage.interfaces.maxima_abstract": {"walltime": 46},
+  "sage.libs.eclib.interface": {"walltime": 22},
+  "sage.libs.eclib.mwrank": {"walltime": 16},
+  "sage.libs.gap.test_long": {"walltime": 43},
+  "sage.libs.giac": {"walltime": 42},
+  "sage.manifolds.chart": {"walltime": 34},
+  "sage.manifolds.differentiable.affine_connection": {"walltime": 138},
+  "sage.manifolds.differentiable.automorphismfield": {"walltime": 33},
+  "sage.manifolds.differentiable.characteristic_cohomology_class": {"walltime": 260},
+  "sage.manifolds.differentiable.curve": {"walltime": 18},
+  "sage.manifolds.differentiable.degenerate": {"walltime": 27},
+  "sage.manifolds.differentiable.degenerate_submanifold": {"walltime": 239},
+  "sage.manifolds.differentiable.diff_form": {"walltime": 48},
+  "sage.manifolds.differentiable.diff_map": {"walltime": 10},
+  "sage.manifolds.differentiable.examples.euclidean": {"walltime": 48},
+  "sage.manifolds.differentiable.examples.sphere": {"walltime": 33},
+  "sage.manifolds.differentiable.integrated_curve": {"walltime": 29},
+  "sage.manifolds.differentiable.levi_civita_connection": {"walltime": 27},
+  "sage.manifolds.differentiable.manifold": {"walltime": 12},
+  "sage.manifolds.differentiable.manifold_homset": {"walltime": 16},
+  "sage.manifolds.differentiable.metric": {"walltime": 95},
+  "sage.manifolds.differentiable.mixed_form": {"walltime": 14},
+  "sage.manifolds.differentiable.mixed_form_algebra": {"walltime": 11},
+  "sage.manifolds.differentiable.multivectorfield": {"walltime": 71},
+  "sage.manifolds.differentiable.pseudo_riemannian": {"walltime": 20},
+  "sage.manifolds.differentiable.pseudo_riemannian_submanifold": {"walltime": 127},
+  "sage.manifolds.differentiable.scalarfield": {"walltime": 19},
+  "sage.manifolds.differentiable.tangent_vector": {"walltime": 17},
+  "sage.manifolds.differentiable.tensorfield": {"walltime": 128},
+  "sage.manifolds.differentiable.tensorfield_paral": {"walltime": 15},
+  "sage.manifolds.differentiable.vector_bundle": {"walltime": 13},
+  "sage.manifolds.differentiable.vectorfield": {"walltime": 53},
+  "sage.manifolds.point": {"walltime": 21},
+  "sage.manifolds.scalarfield": {"walltime": 15},
+  "sage.manifolds.section": {"walltime": 28},
+  "sage.matrix.matrix2": {"walltime": 18},
+  "sage.matrix.matrix_integer_dense": {"walltime": 15},
+  "sage.matrix.matrix_integer_dense_hnf": {"walltime": 35},
+  "sage.matroids.catalog": {"walltime": 59},
+  "sage.misc.cachefunc": {"walltime": 13},
+  "sage.misc.functional": {"walltime": 10},
+  "sage.misc.randstate": {"walltime": 16},
+  "sage.misc.sagedoc": {"walltime": 56},
+  "sage.misc.sageinspect": {"walltime": 38},
+  "sage.modular.abvar.abvar": {"walltime": 12},
+  "sage.modular.abvar.lseries": {"walltime": 10},
+  "sage.modular.btquotients.pautomorphicform": {"walltime": 31},
+  "sage.modular.hypergeometric_motive": {"walltime": 12},
+  "sage.modular.local_comp.local_comp": {"walltime": 27},
+  "sage.modular.local_comp.type_space": {"walltime": 24},
+  "sage.modular.modform.ambient_R": {"walltime": 11},
+  "sage.modular.modform.cuspidal_submodule": {"walltime": 15},
+  "sage.modular.modform.element": {"walltime": 60},
+  "sage.modular.modform.ring": {"walltime": 50},
+  "sage.modular.modform_hecketriangle.abstract_space": {"walltime": 12},
+  "sage.modular.modform_hecketriangle.graded_ring_element": {"walltime": 23},
+  "sage.modular.modform_hecketriangle.hecke_triangle_group_element": {"walltime": 26},
+  "sage.modular.modform_hecketriangle.readme": {"walltime": 19},
+  "sage.modular.modsym.ambient": {"walltime": 15},
+  "sage.modular.pollack_stevens.modsym": {"walltime": 63},
+  "sage.modular.pollack_stevens.padic_lseries": {"walltime": 36},
+  "sage.modules.finite_submodule_iter": {"walltime": 22},
+  "sage.modules.free_module": {"walltime": 22},
+  "sage.modules.free_module_integer": {"walltime": 28},
+  "sage.modules.torsion_quadratic_module": {"walltime": 22},
+  "sage.plot.animate": {"walltime": 129},
+  "sage.plot.contour_plot": {"walltime": 38},
+  "sage.plot.graphics": {"walltime": 43},
+  "sage.plot.line": {"walltime": 12},
+  "sage.plot.matrix_plot": {"walltime": 15},
+  "sage.plot.multigraphics": {"walltime": 26},
+  "sage.plot.plot": {"walltime": 77},
+  "sage.plot.plot3d.base": {"walltime": 12},
+  "sage.plot.plot3d.implicit_plot3d": {"walltime": 20},
+  "sage.plot.plot3d.parametric_plot3d": {"walltime": 11},
+  "sage.plot.plot3d.plot3d": {"walltime": 18},
+  "sage.plot.plot3d.transform": {"walltime": 34},
+  "sage.quadratic_forms.genera.genus": {"walltime": 19},
+  "sage.quadratic_forms.quadratic_form__local_representation_conditions": {"walltime": 48},
+  "sage.rings.asymptotic.asymptotic_expansion_generators": {"walltime": 61},
+  "sage.rings.asymptotic.asymptotics_multivariate_generating_functions": {"walltime": 36},
+  "sage.rings.function_field.function_field": {"walltime": 225},
+  "sage.rings.function_field.function_field_valuation": {"walltime": 47},
+  "sage.rings.function_field.ideal": {"walltime": 10},
+  "sage.rings.integer": {"walltime": 164},
+  "sage.rings.number_field.number_field": {"walltime": 79},
+  "sage.rings.number_field.number_field_element": {"walltime": 13},
+  "sage.rings.number_field.totallyreal": {"walltime": 14},
+  "sage.rings.padics.padic_base_leaves": {"walltime": 76},
+  "sage.rings.padics.padic_extension_leaves": {"walltime": 46},
+  "sage.rings.padics.padic_generic_element": {"walltime": 14},
+  "sage.rings.padics.padic_lattice_element": {"walltime": 25},
+  "sage.rings.padics.relative_extension_leaves": {"walltime": 42},
+  "sage.rings.polynomial.multi_polynomial_ideal": {"walltime": 11},
+  "sage.rings.polynomial.multi_polynomial_sequence": {"walltime": 28},
+  "sage.rings.polynomial.polynomial_element": {"walltime": 16},
+  "sage.rings.polynomial.polynomial_zmod_flint": {"walltime": 336},
+  "sage.rings.qqbar": {"walltime": 21},
+  "sage.rings.tests": {"walltime": 19},
+  "sage.rings.valuation.augmented_valuation": {"walltime": 28},
+  "sage.rings.valuation.mapped_valuation": {"walltime": 56},
+  "sage.schemes.curves.affine_curve": {"walltime": 23},
+  "sage.schemes.curves.projective_curve": {"walltime": 24},
+  "sage.schemes.cyclic_covers.cycliccover_finite_field": {"walltime": 78},
+  "sage.schemes.elliptic_curves.BSD": {"walltime": 10},
+  "sage.schemes.elliptic_curves.constructor": {"walltime": 27},
+  "sage.schemes.elliptic_curves.ell_curve_isogeny": {"walltime": 21},
+  "sage.schemes.elliptic_curves.ell_egros": {"walltime": 28},
+  "sage.schemes.elliptic_curves.ell_modular_symbols": {"walltime": 12},
+  "sage.schemes.elliptic_curves.ell_number_field": {"walltime": 120},
+  "sage.schemes.elliptic_curves.ell_rational_field": {"walltime": 133},
+  "sage.schemes.elliptic_curves.gal_reps_number_field": {"walltime": 35},
+  "sage.schemes.elliptic_curves.gp_simon": {"walltime": 22},
+  "sage.schemes.elliptic_curves.heegner": {"walltime": 39},
+  "sage.schemes.elliptic_curves.height": {"walltime": 56},
+  "sage.schemes.elliptic_curves.isogeny_class": {"walltime": 38},
+  "sage.schemes.elliptic_curves.isogeny_small_degree": {"walltime": 274},
+  "sage.schemes.elliptic_curves.kraus": {"walltime": 12},
+  "sage.schemes.elliptic_curves.mod_sym_num": {"walltime": 12},
+  "sage.schemes.elliptic_curves.padics": {"walltime": 15},
+  "sage.schemes.elliptic_curves.saturation": {"walltime": 19},
+  "sage.schemes.elliptic_curves.sha_tate": {"walltime": 23},
+  "sage.schemes.hyperelliptic_curves.hyperelliptic_finite_field": {"walltime": 65},
+  "sage.schemes.hyperelliptic_curves.hyperelliptic_padic_field": {"walltime": 25},
+  "sage.schemes.projective.projective_rational_point": {"walltime": 11},
+  "sage.schemes.riemann_surfaces.riemann_surface": {"walltime": 53},
+  "sage.stats.distributions.discrete_gaussian_integer": {"walltime": 10},
+  "sage.structure.coerce_dict": {"walltime": 33},
+  "sage.structure.element": {"walltime": 16},
+  "sage.symbolic.expression": {"walltime": 38},
+  "sage.symbolic.integration.integral": {"walltime": 35},
+  "sage.symbolic.random_tests": {"walltime": 31},
+  "sage.symbolic.relation": {"walltime": 11},
+  "sage.tests.book_schilling_zabrocki_kschur_primer": {"walltime": 36},
+  "sage.tests.book_stein_ent": {"walltime": 15},
+  "sage.tests.books.computational-mathematics-with-sagemath.combinat_doctest": {"walltime": 40},
+  "sage.tests.books.computational-mathematics-with-sagemath.float_doctest": {"walltime": 17},
+  "sage.tests.books.computational-mathematics-with-sagemath.graphique_doctest": {"walltime": 29},
+  "sage.tests.books.computational-mathematics-with-sagemath.integration_doctest": {"walltime": 28},
+  "sage.tests.books.computational-mathematics-with-sagemath.nonlinear_doctest": {"walltime": 11},
+  "sage.tests.books.computational-mathematics-with-sagemath.sol.graphique_doctest": {"walltime": 17},
+  "sage.tests.books.computational-mathematics-with-sagemath.sol.numbertheory_doctest": {"walltime": 14},
+  "sage.tests.books.computational-mathematics-with-sagemath.sol.polynomes_doctest": {"walltime": 19},
+  "sage.tests.cmdline": {"walltime": 44},
+  "sage.tests.gosper-sum": {"walltime": 11},
+  "sage.topology.simplicial_complex_examples": {"walltime": 14}
+}
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index b9bd590b61ca..8f27de532058 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -206,22 +206,23 @@ do_install() {
 
 do_check() {
 	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
-		_test_args=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+		_test_files=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	else
+		_test_files=--all
 	fi
-	if [ -z "$_test_args" ]; then
-		_test_args=--all
+	cp ${FILESDIR}/timings2.json .
+	_test_args="--stats_path=timings2.json"
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args+=" --long --warn-long 20.0"
+	else
+		_test_args+=" --warn-long 10.0"
 	fi
 	if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
 		# for CI use a predictable random seed
-		_test_args="--random-seed=0 $_test_args"
-	fi
-	if [ "$XBPS_CHECK_PKGS" = full ]; then
-		_test_args="--long $_test_args"
-	else
-		_test_args="--warn-long 5.0 $_test_args"
+		_test_args+=" --random-seed=0"
 	fi
 	# since make check will build the docs, run test like this instead
-	./sage -tp ${XBPS_MAKEJOBS} ${_test_args}
+	./sage -tp ${XBPS_MAKEJOBS} ${_test_args} ${_test_files}
 }
 
 ### copied from sage-deps, to be kept in sync

From ee15ca43ec30d0e43a975b970ce4a41feaf8e835 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 02:54:00 -0300
Subject: [PATCH 50/50] changed_templates: do not merge with master

---
 common/travis/changed_templates.sh | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/common/travis/changed_templates.sh b/common/travis/changed_templates.sh
index 686436ce4327..5501b968cf1e 100755
--- a/common/travis/changed_templates.sh
+++ b/common/travis/changed_templates.sh
@@ -20,6 +20,9 @@ base="$($GIT_CMD merge-base FETCH_HEAD "$tip")" || {
 	exit 1
 }
 
+# tip = commit of the PR; this avoids merging to master
+$GIT_CMD checkout "$tip"
+
 echo "$base $tip" >/tmp/revisions
 
 /bin/echo -e '\x1b[32mChanged packages:\x1b[0m'

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.rc2
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (214 preceding siblings ...)
  2022-01-17 13:07 ` [PR PATCH] [Updated] " tornaria
@ 2022-01-17 16:20 ` dkwo
  2022-01-17 17:05 ` dkwo
                   ` (32 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2022-01-17 16:20 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1014707245

Comment:
Forget about pynac, it seems that from 9.5 it will be just a part of sage the library.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.rc2
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (215 preceding siblings ...)
  2022-01-17 16:20 ` dkwo
@ 2022-01-17 17:05 ` dkwo
  2022-01-17 17:17 ` tornaria
                   ` (31 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2022-01-17 17:05 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1014742244

Comment:
Also, from [here](https://git.sagemath.org/sage.git/tree/build/pkgs/ratpoints/SPKG.rst) it seems `ratpoints` has been assimilated by PARI/GP, and  it will be removed from Sage, so no need for that.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.rc2
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (216 preceding siblings ...)
  2022-01-17 17:05 ` dkwo
@ 2022-01-17 17:17 ` tornaria
  2022-01-17 17:24 ` dkwo
                   ` (30 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-17 17:17 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1014752702

Comment:
> Also, from [here](https://git.sagemath.org/sage.git/tree/build/pkgs/ratpoints/SPKG.rst) it seems `ratpoints` has been assimilated by PARI/GP, and it will be removed from Sage, so no need for that.

Not for 9.5 AFAICT

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.rc2
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (217 preceding siblings ...)
  2022-01-17 17:17 ` tornaria
@ 2022-01-17 17:24 ` dkwo
  2022-01-18  1:46 ` [PR PATCH] [Updated] " tornaria
                   ` (29 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2022-01-17 17:24 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1014757374

Comment:
but see https://trac.sagemath.org/ticket/24531


^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: sagemath-9.5.rc2
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (218 preceding siblings ...)
  2022-01-17 17:24 ` dkwo
@ 2022-01-18  1:46 ` tornaria
  2022-01-18  1:47 ` tornaria
                   ` (28 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-18  1:46 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1180 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.rc2
This is WIP, so I can get feedback.

Supported architectures: x86_64, x86_64-musl, i686. We also try to make sure it works with musl-1.2.

The testsuite can be run normal (-Q) or long (-K). For CI it runs normal (~ 1/2 time) and it uses a fixed random seed 0 to avoid random failures. When running locally, the random seed is random so one may get occasional test failures that depend on a particular value of the random seed.

The package `sagemath-test` is a dummy package whose purpose is to run the testsuite with sage installed as a package and without the build directory. For this to make sense, the masterdir has to be clean (without traces of the sagemath build, this should be ok after running "pkg" or "pkg -Q").

Pending PR for dependencies:
- [ ] #34789 Needs review/testing
- [ ] #35088
- [ ] #35089
- [ ] #35098
- [ ] #35101

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: 760362 bytes --]

From 32f3e2286e51fa25fb83ca4c2e89e594058a1adf 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/59] 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 f4c53a0c7f9fd2e472ba5d3774a45fb12eb93881 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/59] 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 a8bd626442046f920b17764cc05bffa3bd714e44 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/59] 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 c4a5ce15e9f8f9a365a87860aa20033638c3253e 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/59] 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 ab4e24a8515271d93b43fddae2acd5c71cf9b9c4 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/59] 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 c6a3ff806fa97348f963d78bcdb4ebc5a407e61a 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/59] 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 d8ad8a1525190a288773f02da3d139e42019d33f 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/59] 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 3317f99da530d78d311f9b16c7f06435b13c81ca 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/59] 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 54ad0fde0afdb32cbfd3b3e20f1d336a1b998b5c 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/59] 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 f419b3c8b862a638dfe27fe8a22d132b03bca87d 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/59] 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 d8658bb4fc3fa81e7cf022fd9b31911b8ff74aaf 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/59] 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 18594e223e1972b88bb8116218263acb2407775a 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/59] 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 e755bca3e7a22ab00aae9378f93ea04d194f4207 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/59] 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 e1b9721bd780c9a2f9dbd159b78aabbb6da270b0 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/59] 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 8783f69b6ffe3aa3f8df51a817e315c175a8378e 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/59] 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 7faa009fcee7ce5473e0c4ccfeb9e6011c910bca 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/59] 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 5b4e5f557459241dfd5fca02cc89476b000a1373 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/59] 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 b1dd0a9a48de7300b11d1dd638f51639aafd354b 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/59] 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 1ae807111aa6b46843037891b625a2775cd223eb 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/59] 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

From 1f44f728ec67741d12d5d4563c00d4f71cb76d90 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 27 Dec 2021 20:19:19 -0300
Subject: [PATCH 20/59] sagemath: fix license and tests

Now tests can be run with -Q (normal) or -K (--long)
---
 srcpkgs/sagemath/template | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index c5009269c7fc..33b40acbabeb 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -16,7 +16,7 @@ depends="giac git FlintQS zn_poly sympow
  "
 short_desc="Open source mathematics software"
 maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
-license="GPL-3.0-or-later"
+license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
 checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
@@ -155,15 +155,17 @@ do_install() {
 }
 
 do_check() {
-	TEST=--all
 	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
-		TEST="$(sed -e 's/#.*//' ${XBPS_DISTDIR}/sagemath-check)"
+		_test_args=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	fi
+	if [ -z "$_test_args" ]; then
+		_test_args=--all
+	fi
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args="--long $_test_args"
 	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} ${OPT} ${TEST}
-	#./sage -t ${OPT} ${TEST}
+	./sage -tp ${XBPS_MAKEJOBS} ${_test_args}
 }
 
 ### copied from sage-deps, to be kept in sync

From a8ad28dbc15d0ac2cc1dd1309e8fb974e8686abb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 28 Dec 2021 23:08:17 -0300
Subject: [PATCH 21/59] sagemath: fix long time test

---
 .../patches/zzz-fix_long_time_test--see_33091.patch | 13 +++++++++++++
 ...=> zzz-skip_doctest_giac-1.7.0--see_31563.patch} |  0
 2 files changed, 13 insertions(+)
 create mode 100644 srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
 rename srcpkgs/sagemath/patches/{skip-doctest-giac-1.7.0--see-trac-31563.patch => zzz-skip_doctest_giac-1.7.0--see_31563.patch} (100%)

diff --git a/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch b/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
new file mode 100644
index 000000000000..ca360dee9f6e
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage/matrix/matrix2.pyx b/src/sage/matrix/matrix2.pyx
+index 7d319bd54b..c1a2eed6f1 100644
+--- a/src/sage/matrix/matrix2.pyx
++++ b/src/sage/matrix/matrix2.pyx
+@@ -17215,7 +17215,7 @@ cdef class Matrix(Matrix1):
+ 
+             sage: set_random_seed()
+             sage: K = random_cone(max_ambient_dim=5)
+-            sage: all(L.change_ring(SR).is_Z_operator_on(K)
++            sage: all(L.change_ring(SR).is_Z_operator_on(K) # long time
+             ....:     for L in K.Z_operators_gens())  # long time
+             True
+ 
diff --git a/srcpkgs/sagemath/patches/skip-doctest-giac-1.7.0--see-trac-31563.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_31563.patch
similarity index 100%
rename from srcpkgs/sagemath/patches/skip-doctest-giac-1.7.0--see-trac-31563.patch
rename to srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_31563.patch

From cf5081ea8109fbb917edf66832b11adc824d5015 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 31 Dec 2021 13:52:34 -0300
Subject: [PATCH 22/59] python3-Sphinx: update to 4.3.2.

---
 srcpkgs/python3-Sphinx/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/python3-Sphinx/template b/srcpkgs/python3-Sphinx/template
index 8b0493c1f92c..29f892d16157 100644
--- a/srcpkgs/python3-Sphinx/template
+++ b/srcpkgs/python3-Sphinx/template
@@ -1,6 +1,6 @@
 # Template file for 'python3-Sphinx'
 pkgname=python3-Sphinx
-version=4.2.0
+version=4.3.2
 revision=1
 wrksrc=Sphinx-${version}
 build_style=python3-module
@@ -17,8 +17,9 @@ short_desc="Python 3 documentation generator"
 maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
 license="BSD-3-Clause"
 homepage="http://sphinx-doc.org"
+changelog="https://www.sphinx-doc.org/en/master/changes.html"
 distfiles="${PYPI_SITE}/S/Sphinx/Sphinx-${version}.tar.gz"
-checksum=94078db9184491e15bce0a56d9186e0aec95f16ac20b12d00e06d4e36f1058a6
+checksum=0a8836751a68306b3fe97ecbe44db786f8479c3bf4b80e3a7f5c838657b4698c
 conflicts="python-Sphinx>=0"
 
 post_install() {

From f5b5b2cc77c8139672a1f45267c85510b7142505 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 28 Dec 2021 23:08:17 -0300
Subject: [PATCH 23/59] sagemath: use system python site-packages

 - patch from #29665 for that
 - patch on top of that to allow a few more python packages:
   gmpy2, sphinx, typing_extensions, ptyprocess
 - add all available python packages to makedepends and depends
 - add ffmpeg and ImageMagick to makedepends
 - in standard check (-Q) warn if individual test > 5.0s
---
 ...184f7498a2046065e669723e68efe2d65cee.patch | 5629 +++++++++++++++++
 .../zzz-dont_run_pytest--see_31924.patch      |   27 +
 .../zzz-more_site_packages_not_in_29665.patch |   42 +
 srcpkgs/sagemath/template                     |   52 +-
 4 files changed, 5747 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch

diff --git a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
new file mode 100644
index 000000000000..b641113927e7
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
@@ -0,0 +1,5629 @@
+From 05fcaabe95082f42ba134780d579390d7b6153e2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 19:30:58 -0400
+Subject: Trac #29665: add --enable-system-site-packages option to ./configure.
+
+This new option is experimental and disabled by default. When it is
+enabled, the string "--system-site-packages" is appended to a new
+environment variable SAGE_VENV_FLAGS that is then passed to the
+sage-venv command during the build using autoconf substitution.
+Thusly the correct setting finds its way into local/pyvenv.cfg.
+---
+ build/make/Makefile.in |  2 +-
+ configure.ac           | 11 +++++++++++
+ 2 files changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/build/make/Makefile.in b/build/make/Makefile.in
+index f870cc3..68627ab 100644
+--- a/build/make/Makefile.in
++++ b/build/make/Makefile.in
+@@ -211,7 +211,7 @@ endif
+ inst_python3_venv = $(SAGE_VENV)/pyvenv.cfg
+ 
+ $(inst_python3_venv):
+-	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv "$(SAGE_VENV)"
++	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv @SAGE_VENV_FLAGS@ "$(SAGE_VENV)"
+ endif
+ 
+ # Build everything and start Sage.
+diff --git a/configure.ac b/configure.ac
+index 351f487..db30a91 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -435,6 +435,17 @@ AC_ARG_ENABLE([download-from-upstream-url],
+   [AS_HELP_STRING([--enable-download-from-upstream-url],
+     [allow downloading packages from their upstream URL if they cannot be found on the Sage mirrors])])
+ 
++AC_ARG_ENABLE(
++  [system-site-packages], [AS_HELP_STRING(
++    [--enable-system-site-packages],
++    [allow sage to use python packages from the system (experimental; default: no)]
++  )], [
++  AS_IF([test "x$enable_system_site_packages" = "xyes"], [
++    SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
++  ])
++])
++AC_SUBST([SAGE_VENV_FLAGS])
++
+ SAGE_SPKG_OPTIONS=""
+ AS_IF([test "x$enable_experimental_packages" = "xyes"], [
+   AS_VAR_APPEND([SAGE_SPKG_OPTIONS], [" -y"])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9372d1f663edf4e89f9c186336815ca04cff59dc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 19:41:14 -0400
+Subject: Trac #29665: new SAGE_PYTHON_PACKAGE_CHECK() autoconf macro.
+
+This new macro encapsulates the check for system installations of
+python packages. It uses setuptools.version's pkg_resources to
+check if the contents of install-requires.txt are satisfied for
+the given package; and if not, tells the build system to install
+the SPKG instead.
+---
+ m4/sage_python_package_check.m4 | 49 +++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 49 insertions(+)
+ create mode 100644 m4/sage_python_package_check.m4
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+new file mode 100644
+index 00000000..77b0a0c
+--- /dev/null
++++ b/m4/sage_python_package_check.m4
+@@ -0,0 +1,49 @@
++#
++# SYNOPSIS
++#
++#   SAGE_PYTHON_PACKAGE_CHECK(package)
++#
++# DESCRIPTION
++#
++#   Determine if the system copy of a python package can be used by sage.
++#
++#   This macro uses setuptools.version's pkg_resources to check that the
++#   "install-requires.txt" file for the named package is satisfied, and
++#   it can typically fail in four ways:
++#
++#     1. If --enable-system-site-packages was not passed to ./configure,
++#
++#     2. If we are not using the system python (no $PYTHON_FOR_VENV),
++#
++#     3. If setuptools is not available to the system python,
++#
++#     4. If the contents of install-requires.txt are not met (wrong
++#        version, no version, etc.) by the system python.
++#
++#   In any of those cases, we set sage_spkg_install_$package to "yes"
++#   so that the corresponding SPKG is installed. Otherwise, we do
++#   nothing, since the default value of sage_spkg_install_$package
++#   is "no" (to use the system copy).
++#
++#   The SAGE_SPKG_CONFIGURE_PYTHON3() macro is AC_REQUIRE'd to ensure
++#   that $PYTHON_FOR_VENV is available, if it is going to be available.
++#
++
++AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
++  AS_IF([test "${enable_system_site_packages}" = "yes"], [
++    AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
++
++    dnl strip all comments from install-requires.txt; this should leave
++    dnl only a single line containing the version specification for this
++    dnl package.
++    SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
++    AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++    AS_IF(
++      ["${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())"],
++      [AC_MSG_RESULT(yes)],
++      [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
++    )
++  ], [
++    sage_spkg_install_$1=yes
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a0dac8ad81ad6369d479bba30d2388de59e5cecb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:21:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for py.
+
+---
+ build/pkgs/py/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/py/spkg-configure.m4
+
+diff --git a/build/pkgs/py/spkg-configure.m4 b/build/pkgs/py/spkg-configure.m4
+new file mode 100644
+index 00000000..ded7034
+--- /dev/null
++++ b/build/pkgs/py/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([py], [SAGE_PYTHON_PACKAGE_CHECK([py])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 87c463a25ab4432dc1fba4f7a9703284e5b8f620 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:24:15 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for wheel.
+
+---
+ build/pkgs/wheel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wheel/spkg-configure.m4
+
+diff --git a/build/pkgs/wheel/spkg-configure.m4 b/build/pkgs/wheel/spkg-configure.m4
+new file mode 100644
+index 00000000..7897ea9
+--- /dev/null
++++ b/build/pkgs/wheel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([wheel], [SAGE_PYTHON_PACKAGE_CHECK([wheel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 804094b3a980f262f4d53d7be8b1be43ac0c55e0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:25:15 -0400
+Subject: Trac #29665: new spkg-configure.m4 for cvxopt.
+
+This includes a SAGE_SPKG_DEPCHECK([gsl glpk suitesparse],... because
+those C dependencies wind up linked into shared libraries like,
+
+  /usr/.../cvxopt/glpk.cpython-39-x86_64-linux-gnu.so
+
+that could potentially conflict with (for example) the glpk SPKG.
+---
+ build/pkgs/cvxopt/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/cvxopt/spkg-configure.m4
+
+diff --git a/build/pkgs/cvxopt/spkg-configure.m4 b/build/pkgs/cvxopt/spkg-configure.m4
+new file mode 100644
+index 00000000..c4aa619
+--- /dev/null
++++ b/build/pkgs/cvxopt/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([cvxopt], [
++  SAGE_SPKG_DEPCHECK([gsl glpk suitesparse], [
++    SAGE_PYTHON_PACKAGE_CHECK([cvxopt])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3f171955ff8d15da2c98aee0d2e254e95a55a2b5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:28:10 -0400
+Subject: Trac #29665: new spkg-configure.m4 for pyzmq.
+
+This includes a SAGE_SPKG_DEPCHECK([zeromq],... because libzmq winds
+up linked into shared libraries like,
+
+  /usr/.../zmq/backend/cython/message.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the zeromq SPKG.
+---
+ build/pkgs/pyzmq/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/pyzmq/spkg-configure.m4
+
+diff --git a/build/pkgs/pyzmq/spkg-configure.m4 b/build/pkgs/pyzmq/spkg-configure.m4
+new file mode 100644
+index 00000000..ae2b126
+--- /dev/null
++++ b/build/pkgs/pyzmq/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([pyzmq], [
++  SAGE_SPKG_DEPCHECK([zeromq], [
++    SAGE_PYTHON_PACKAGE_CHECK([pyzmq])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20d3aa9da9fc98a6e6a47599cd1b6d1d3785a4c4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:31:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for requests.
+
+---
+ build/pkgs/requests/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/requests/spkg-configure.m4
+
+diff --git a/build/pkgs/requests/spkg-configure.m4 b/build/pkgs/requests/spkg-configure.m4
+new file mode 100644
+index 00000000..f50a66c
+--- /dev/null
++++ b/build/pkgs/requests/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([requests], [SAGE_PYTHON_PACKAGE_CHECK([requests])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4df57ee47f2576b6b7bf9265248e06e90616b689 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:13:34 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for six.
+
+---
+ build/pkgs/six/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/six/spkg-configure.m4
+
+diff --git a/build/pkgs/six/spkg-configure.m4 b/build/pkgs/six/spkg-configure.m4
+new file mode 100644
+index 00000000..a382b81
+--- /dev/null
++++ b/build/pkgs/six/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([six], [SAGE_PYTHON_PACKAGE_CHECK([six])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f4462652d02ca729cc6d7cb36ee4d7d662deafb0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:14:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for packaging.
+
+---
+ build/pkgs/packaging/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/packaging/spkg-configure.m4
+
+diff --git a/build/pkgs/packaging/spkg-configure.m4 b/build/pkgs/packaging/spkg-configure.m4
+new file mode 100644
+index 00000000..398f9e1
+--- /dev/null
++++ b/build/pkgs/packaging/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([packaging], [SAGE_PYTHON_PACKAGE_CHECK([packaging])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4d64677fffce48077e4bc3e20ec833c70e6e9b65 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:18:53 -0400
+Subject: Trac #29665: new spkg-configure.m4 for numpy.
+
+This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack
+wind up linked into shared libraries like,
+
+  /usr/.../numpy/linalg/lapack_lite.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the openblas SPKG.
+---
+ build/pkgs/numpy/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/numpy/spkg-configure.m4
+
+diff --git a/build/pkgs/numpy/spkg-configure.m4 b/build/pkgs/numpy/spkg-configure.m4
+new file mode 100644
+index 00000000..16f9a90
+--- /dev/null
++++ b/build/pkgs/numpy/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([numpy], [
++  SAGE_SPKG_DEPCHECK([openblas], [
++   SAGE_PYTHON_PACKAGE_CHECK([numpy])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 85dfe5bb32f3c470966b477bae68a921e846d11f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:58:48 -0400
+Subject: Trac #29665: new spkg-configure.m4 for scipy.
+
+This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack
+wind up linked into shared libraries like,
+
+  /usr/.../scipy/linalg/_flinalg.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the openblas SPKG.
+---
+ build/pkgs/scipy/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/scipy/spkg-configure.m4
+
+diff --git a/build/pkgs/scipy/spkg-configure.m4 b/build/pkgs/scipy/spkg-configure.m4
+new file mode 100644
+index 00000000..0b7294a
+--- /dev/null
++++ b/build/pkgs/scipy/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([scipy], [
++  SAGE_SPKG_DEPCHECK([openblas], [
++    SAGE_PYTHON_PACKAGE_CHECK([scipy])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5616f1491036fda95f4d3e840c8c8b531c97323b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 07:19:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pluggy.
+
+---
+ build/pkgs/pluggy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pluggy/spkg-configure.m4
+
+diff --git a/build/pkgs/pluggy/spkg-configure.m4 b/build/pkgs/pluggy/spkg-configure.m4
+new file mode 100644
+index 00000000..11b1fce
+--- /dev/null
++++ b/build/pkgs/pluggy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pluggy], [SAGE_PYTHON_PACKAGE_CHECK([pluggy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6bceae3d356878cfe5fce40c9998dead003a3844 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 07:24:12 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pickleshare.
+
+---
+ build/pkgs/pickleshare/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pickleshare/spkg-configure.m4
+
+diff --git a/build/pkgs/pickleshare/spkg-configure.m4 b/build/pkgs/pickleshare/spkg-configure.m4
+new file mode 100644
+index 00000000..80e9b7c
+--- /dev/null
++++ b/build/pkgs/pickleshare/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pickleshare], [SAGE_PYTHON_PACKAGE_CHECK([pickleshare])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From da2ab534f4a256c82ed4f1c5f0f5c320529b5e9f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 08:53:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for html5lib.
+
+---
+ build/pkgs/html5lib/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/html5lib/spkg-configure.m4
+
+diff --git a/build/pkgs/html5lib/spkg-configure.m4 b/build/pkgs/html5lib/spkg-configure.m4
+new file mode 100644
+index 00000000..f421b7e
+--- /dev/null
++++ b/build/pkgs/html5lib/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([html5lib], [SAGE_PYTHON_PACKAGE_CHECK([html5lib])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5e464134afdf6055b7b5804208f759561c5435cd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 18:30:47 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for networkx.
+
+---
+ build/pkgs/networkx/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/networkx/spkg-configure.m4
+
+diff --git a/build/pkgs/networkx/spkg-configure.m4 b/build/pkgs/networkx/spkg-configure.m4
+new file mode 100644
+index 00000000..926671e
+--- /dev/null
++++ b/build/pkgs/networkx/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([networkx], [SAGE_PYTHON_PACKAGE_CHECK([networkx])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c4d40770cd9c7fda811e31759a5f4aedc320f3f9 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:33:24 -0400
+Subject: Trac #29665: new spkg-configure.m4 for matplotlib.
+
+This includes a SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull],...
+because those dependencies wind up linked into shared libraries like,
+
+  /usr/lib/.../matplotlib/ft2font.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with their SPKG counterparts.
+---
+ build/pkgs/matplotlib/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/matplotlib/spkg-configure.m4
+
+diff --git a/build/pkgs/matplotlib/spkg-configure.m4 b/build/pkgs/matplotlib/spkg-configure.m4
+new file mode 100644
+index 00000000..39c2d29
+--- /dev/null
++++ b/build/pkgs/matplotlib/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([matplotlib], [
++  SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull], [
++    SAGE_PYTHON_PACKAGE_CHECK([matplotlib])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7834dc3ac349201af632f89a9de7cd1967931010 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:35:00 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for bleach.
+
+---
+ build/pkgs/bleach/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/bleach/spkg-configure.m4
+
+diff --git a/build/pkgs/bleach/spkg-configure.m4 b/build/pkgs/bleach/spkg-configure.m4
+new file mode 100644
+index 00000000..3c9bb26
+--- /dev/null
++++ b/build/pkgs/bleach/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([bleach], [SAGE_PYTHON_PACKAGE_CHECK([bleach])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 84cad343287a2c69a4a21b9fa3b92301ff88645b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:37:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for decorator.
+
+---
+ build/pkgs/decorator/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/decorator/spkg-configure.m4
+
+diff --git a/build/pkgs/decorator/spkg-configure.m4 b/build/pkgs/decorator/spkg-configure.m4
+new file mode 100644
+index 00000000..e062778
+--- /dev/null
++++ b/build/pkgs/decorator/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([decorator], [SAGE_PYTHON_PACKAGE_CHECK([decorator])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 25693212572e69d452bc95c923ada13744359eb7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:38:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for idna.
+
+---
+ build/pkgs/idna/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/idna/spkg-configure.m4
+
+diff --git a/build/pkgs/idna/spkg-configure.m4 b/build/pkgs/idna/spkg-configure.m4
+new file mode 100644
+index 00000000..9d363f2
+--- /dev/null
++++ b/build/pkgs/idna/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([idna], [SAGE_PYTHON_PACKAGE_CHECK([idna])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6d5616472f6cdc6cf496bba6fe07bd4ef44dfdaf Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:39:23 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for certifi.
+
+---
+ build/pkgs/certifi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/certifi/spkg-configure.m4
+
+diff --git a/build/pkgs/certifi/spkg-configure.m4 b/build/pkgs/certifi/spkg-configure.m4
+new file mode 100644
+index 00000000..ddd4061
+--- /dev/null
++++ b/build/pkgs/certifi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([certifi], [SAGE_PYTHON_PACKAGE_CHECK([certifi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9412a07023b275e29e8d1af9b8ee3e767042e7fd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:40:59 -0400
+Subject: Trac #29665: new spkg-configure.m4 for pillow.
+
+This includes an SAGE_SPKG_DEPCHECK([bzip2 freetype libpng zlib],...
+because those dependencies wind up linked into shared libraries like,
+
+  /usr/.../PIL/_imagingft.cpython-39-x86_64-linux-gnu.so
+
+and potentially conflict with their SPKG counterparts.
+---
+ build/pkgs/pillow/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/pillow/spkg-configure.m4
+
+diff --git a/build/pkgs/pillow/spkg-configure.m4 b/build/pkgs/pillow/spkg-configure.m4
+new file mode 100644
+index 00000000..f2e68e2
+--- /dev/null
++++ b/build/pkgs/pillow/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([pillow], [
++  SAGE_SPKG_DEPCHECK([bzip2 freetype libpng zlib], [
++    SAGE_PYTHON_PACKAGE_CHECK([pillow])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From eede914311481fdb75b363b7a799075e876a2b4f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:44:13 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for mpmath.
+
+---
+ build/pkgs/mpmath/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mpmath/spkg-configure.m4
+
+diff --git a/build/pkgs/mpmath/spkg-configure.m4 b/build/pkgs/mpmath/spkg-configure.m4
+new file mode 100644
+index 00000000..f43c838
+--- /dev/null
++++ b/build/pkgs/mpmath/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([mpmath], [SAGE_PYTHON_PACKAGE_CHECK([mpmath])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 363a825885832c0b580ff53fe61f5c79e70c4728 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:44:56 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for sympy.
+
+---
+ build/pkgs/sympy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sympy/spkg-configure.m4
+
+diff --git a/build/pkgs/sympy/spkg-configure.m4 b/build/pkgs/sympy/spkg-configure.m4
+new file mode 100644
+index 00000000..fa0f1f5
+--- /dev/null
++++ b/build/pkgs/sympy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([sympy], [SAGE_PYTHON_PACKAGE_CHECK([sympy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0667964c914e4a01dda697190a054ff96cea92d6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:47:06 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pygments.
+
+---
+ build/pkgs/pygments/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pygments/spkg-configure.m4
+
+diff --git a/build/pkgs/pygments/spkg-configure.m4 b/build/pkgs/pygments/spkg-configure.m4
+new file mode 100644
+index 00000000..99f29e3
+--- /dev/null
++++ b/build/pkgs/pygments/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pygments], [SAGE_PYTHON_PACKAGE_CHECK([pygments])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f787c233aa05d8e90f7c6ad18f76bd2fa36bfbfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:48:50 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for jinja2.
+
+---
+ build/pkgs/jinja2/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jinja2/spkg-configure.m4
+
+diff --git a/build/pkgs/jinja2/spkg-configure.m4 b/build/pkgs/jinja2/spkg-configure.m4
+new file mode 100644
+index 00000000..0970d1c
+--- /dev/null
++++ b/build/pkgs/jinja2/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jinja2], [SAGE_PYTHON_PACKAGE_CHECK([jinja2])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 309d8f8e2b7078b5efbbe824b69ec1d9b1e639f0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:43:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pandocfilters.
+
+---
+ build/pkgs/pandocfilters/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/pandocfilters/spkg-configure.m4
+
+diff --git a/build/pkgs/pandocfilters/spkg-configure.m4 b/build/pkgs/pandocfilters/spkg-configure.m4
+new file mode 100644
+index 00000000..3e9537f
+--- /dev/null
++++ b/build/pkgs/pandocfilters/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([pandocfilters], [
++  SAGE_PYTHON_PACKAGE_CHECK([pandocfilters])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f57bfda49777a6ba1cd123553acd75dc347c5521 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:44:46 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for webencodings.
+
+---
+ build/pkgs/webencodings/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/webencodings/spkg-configure.m4
+
+diff --git a/build/pkgs/webencodings/spkg-configure.m4 b/build/pkgs/webencodings/spkg-configure.m4
+new file mode 100644
+index 00000000..1b9a5c4
+--- /dev/null
++++ b/build/pkgs/webencodings/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([webencodings], [
++  SAGE_PYTHON_PACKAGE_CHECK([webencodings])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7f193a62d7a2ea0b6a3ca6beb12390d91c25bbfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:48:26 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pytz.
+
+---
+ build/pkgs/pytz/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pytz/spkg-configure.m4
+
+diff --git a/build/pkgs/pytz/spkg-configure.m4 b/build/pkgs/pytz/spkg-configure.m4
+new file mode 100644
+index 00000000..366521b
+--- /dev/null
++++ b/build/pkgs/pytz/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pytz], [SAGE_PYTHON_PACKAGE_CHECK([pytz])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bfd3fdd887c3465c03465248de4997eed4a82915 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:51:16 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for texttable.
+
+---
+ build/pkgs/texttable/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/texttable/spkg-configure.m4
+
+diff --git a/build/pkgs/texttable/spkg-configure.m4 b/build/pkgs/texttable/spkg-configure.m4
+new file mode 100644
+index 00000000..42a3de1
+--- /dev/null
++++ b/build/pkgs/texttable/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([texttable], [SAGE_PYTHON_PACKAGE_CHECK([texttable])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 914bf0cc57abc46129b27c1525782dbe16da31a2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:53:41 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for babel.
+
+---
+ build/pkgs/babel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/babel/spkg-configure.m4
+
+diff --git a/build/pkgs/babel/spkg-configure.m4 b/build/pkgs/babel/spkg-configure.m4
+new file mode 100644
+index 00000000..d7b9a71
+--- /dev/null
++++ b/build/pkgs/babel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([babel], [SAGE_PYTHON_PACKAGE_CHECK([babel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 56977abd1eafbc87c765a2892cfe525382648259 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 14 Oct 2021 08:06:59 -0400
+Subject: Trac #29665: force system python3 with --enable-system-site-packages.
+
+When the python SPKG is used, the --enable-system-site-packages flag
+will essentially do nothing, and that may confuse users who have
+wasted a few hours building sage. (Generally, they will want to fix
+detection of their system python3 first.)
+
+To forestall that, we now set "--with-system-python3=force" whenever
+the "--enable-system-site-packages" flag is passed.
+---
+ configure.ac | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index db30a91..6fafb83 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -438,10 +438,19 @@ AC_ARG_ENABLE([download-from-upstream-url],
+ AC_ARG_ENABLE(
+   [system-site-packages], [AS_HELP_STRING(
+     [--enable-system-site-packages],
+-    [allow sage to use python packages from the system (experimental; default: no)]
++    [allow the use of python packages from the system (experimental; default: no)]
+   )], [
+   AS_IF([test "x$enable_system_site_packages" = "xyes"], [
+     SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
++
++    dnl We want to raise an error if the user asked for "system site
++    dnl packages" but the system python will not be used. Technically
++    dnl that causes no problems (SAGE_PYTHON_PACKAGE_CHECK always fails,
++    dnl so SPKGs are used for all python packages), but it may be confusing
++    dnl to end users who expect the flag to actually give them access to
++    dnl their system python packages and who may not be paying close
++    dnl attention to their ./configure output.
++    with_system_python3="force"
+   ])
+ ])
+ AC_SUBST([SAGE_VENV_FLAGS])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 02b369fd24ef7cf8997082e7850b9cf022cae34b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 01:18:35 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for setuptools.
+
+---
+ build/pkgs/setuptools/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/setuptools/spkg-configure.m4
+
+diff --git a/build/pkgs/setuptools/spkg-configure.m4 b/build/pkgs/setuptools/spkg-configure.m4
+new file mode 100644
+index 00000000..a2ad811
+--- /dev/null
++++ b/build/pkgs/setuptools/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([setuptools], [SAGE_PYTHON_PACKAGE_CHECK([setuptools])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 05117317d38693978efaf36e81d8b02bae44b257 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 01:15:48 -0400
+Subject: Trac #29665: poison PYTHONUSERBASE when testing for "system"
+ packages.
+
+When we're detecting system installations of python packages, we want
+to hide anything that was installed with e.g. "pip install --user". To
+accomplish that, we mimic the PYTHONUSERBASE poisoning from sage-env
+within the SAGE_PYTHON_PACKAGE_CHECK() macro.
+---
+ m4/sage_python_package_check.m4 | 18 +++++++++++++++++-
+ 1 file changed, 17 insertions(+), 1 deletion(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 77b0a0c..b8cdba4 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -38,11 +38,27 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     dnl package.
+     SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
+     AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++
++    dnl To prevent user-site (pip install --user) packages from being
++    dnl detected as "system" packages, we poison PYTHONUSERBASE. The
++    dnl sage-env script also does this at runtime; we mimic that
++    dnl implementation to ensure that the behaviors at ./configure and
++    dnl runtime are identical. Beware that (as in sage-env) the poisoning
++    dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
++    dnl user points PYTHONUSERBASE to any path (even the default), then
++    dnl his local pip packages will be detected.
++    PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
++    AS_IF([test -z "${PYTHONUSERBASE}"], [
++      PYTHONUSERBASE="${HOME}/.sage/local"
++    ])
++
+     AS_IF(
+-      ["${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())"],
++      [PYTHONUSERBASE="${PYTHONUSERBASE}" "${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" 2>/dev/null],
+       [AC_MSG_RESULT(yes)],
+       [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+     )
++
++    PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d75c1492f63a584b5ec5f424ddd7f7c4a6d502d3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:20:04 -0400
+Subject: Trac #29665: run SAGE_PYTHON_PACKAGE_CHECK() inside a venv.
+
+To recreate the runtime environment as closely as possible, we now use
+a venv (with system site packages enabled) when checking for system
+copies of python packages.
+---
+ m4/sage_python_package_check.m4 | 76 +++++++++++++++++++++++++++--------------
+ 1 file changed, 51 insertions(+), 25 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index b8cdba4..7cbd6c0 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -15,9 +15,11 @@
+ #
+ #     2. If we are not using the system python (no $PYTHON_FOR_VENV),
+ #
+-#     3. If setuptools is not available to the system python,
++#     3. If we are unable to create a venv with the system python,
+ #
+-#     4. If the contents of install-requires.txt are not met (wrong
++#     4. If setuptools is not available to the system python,
++#
++#     5. If the contents of install-requires.txt are not met (wrong
+ #        version, no version, etc.) by the system python.
+ #
+ #   In any of those cases, we set sage_spkg_install_$package to "yes"
+@@ -27,38 +29,62 @@
+ #
+ #   The SAGE_SPKG_CONFIGURE_PYTHON3() macro is AC_REQUIRE'd to ensure
+ #   that $PYTHON_FOR_VENV is available, if it is going to be available.
++#   The check is run inside a new venv, and with the PYTHONUSERBASE
++#   variable poisoned in the same manner as sage-env poisons it, to
++#   ensure that the ./configure- and run-time views of the system
++#   are as similar as possible.
+ #
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
+     AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
+ 
+-    dnl strip all comments from install-requires.txt; this should leave
+-    dnl only a single line containing the version specification for this
+-    dnl package.
+-    SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
+-    AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++    dnl We run this check inside a python venv, because that's ultimately
++    dnl how the system $PYTHON_FOR_VENV will be used.
++    AC_MSG_CHECKING([if we can create a python venv in config.venv])
+ 
+-    dnl To prevent user-site (pip install --user) packages from being
+-    dnl detected as "system" packages, we poison PYTHONUSERBASE. The
+-    dnl sage-env script also does this at runtime; we mimic that
+-    dnl implementation to ensure that the behaviors at ./configure and
+-    dnl runtime are identical. Beware that (as in sage-env) the poisoning
+-    dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
+-    dnl user points PYTHONUSERBASE to any path (even the default), then
+-    dnl his local pip packages will be detected.
+-    PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
+-    AS_IF([test -z "${PYTHONUSERBASE}"], [
+-      PYTHONUSERBASE="${HOME}/.sage/local"
+-    ])
++    dnl Use --clear because ./configure typically clobbers its output files.
++    AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
++                                        --clear                dnl
++                                        --without-pip          dnl
++					config.venv], [
++      AC_MSG_RESULT(yes)
++      dnl strip all comments from install-requires.txt; this should leave
++      dnl only a single line containing the version specification for this
++      dnl package.
++      SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
++      AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++
++      dnl To prevent user-site (pip install --user) packages from being
++      dnl detected as "system" packages, we poison PYTHONUSERBASE. The
++      dnl sage-env script also does this at runtime; we mimic that
++      dnl implementation to ensure that the behaviors at ./configure and
++      dnl runtime are identical. Beware that (as in sage-env) the poisoning
++      dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
++      dnl user points PYTHONUSERBASE to any path (even the default), then
++      dnl his local pip packages will be detected.
++      PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
++      AS_IF([test -z "${PYTHONUSERBASE}"], [
++        PYTHONUSERBASE="${HOME}/.sage/local"
++      ])
+ 
+-    AS_IF(
+-      [PYTHONUSERBASE="${PYTHONUSERBASE}" "${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" 2>/dev/null],
+-      [AC_MSG_RESULT(yes)],
+-      [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+-    )
++      AS_IF(
++        [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
++           "from setuptools.version import pkg_resources;              dnl
++            pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" dnl
++	 2>/dev/null],
++        [AC_MSG_RESULT(yes)],
++        [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
++      )
++
++      PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
++    ], [
++      dnl failed to create a venv for some reason
++      AC_MSG_RESULT(no)
++      sage_spkg_install_$1=yes
++    ])
+ 
+-    PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
++    rm -rf config.venv
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 87646c3264a04ffd98a12d67074f93e1943a1e96 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:38:08 -0400
+Subject: Trac #29665: log SAGE_PYTHON_PACKAGE_CHECK() failures to config.log.
+
+---
+ m4/sage_python_package_check.m4 | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 7cbd6c0..e0e0b9f 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -47,7 +47,8 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
+                                         --clear                dnl
+                                         --without-pip          dnl
+-					config.venv], [
++                                        config.venv            dnl
++                                        2>&AS_MESSAGE_LOG_FD], [
+       AC_MSG_RESULT(yes)
+       dnl strip all comments from install-requires.txt; this should leave
+       dnl only a single line containing the version specification for this
+@@ -72,7 +73,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+         [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
+            "from setuptools.version import pkg_resources;              dnl
+             pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" dnl
+-	 2>/dev/null],
++	 2>&AS_MESSAGE_LOG_FD],
+         [AC_MSG_RESULT(yes)],
+         [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+       )
+-- 
+cgit v1.0-1-gd88e
+
+
+From f7dfffd1c64816e2ae4e0f420b22065c5c5bf2cb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:45:37 -0400
+Subject: Trac #29665: don't clobber a plain file named config.venv.
+
+When SAGE_PYTHON_PACKAGE_CHECK() is cleaning up, we no longer remove
+"config.venv" unconditionally. Instead, we remove it only if it is a
+directory. This is also how "pyvenv --clear" works.
+---
+ m4/sage_python_package_check.m4 | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index e0e0b9f..127a078 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -85,7 +85,9 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+       sage_spkg_install_$1=yes
+     ])
+ 
+-    rm -rf config.venv
++    dnl Clean up config.venv, but only if we could have created it.
++    dnl (The --clear flag to pyvenv will not clobber a plain file.)
++    AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9849c77313b895dcfb786d2ea54e36585bd31ce2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 16 Oct 2021 08:14:42 -0400
+Subject: Trac #29665: don't announce system python packages that won't be
+ used.
+
+When --enable-system-site-packages was not given, the python packages
+using SAGE_PYTHON_PACKAGE_CHECK() in spkg-configure.m4 cannot be used.
+Rather than suggest that users install them anyway, that macro now
+hacks the value of sage_use_system_$package to be "no" when the use
+of system site packages is disabled at the python level.
+---
+ m4/sage_python_package_check.m4 | 17 +++++++++++++++++
+ 1 file changed, 17 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 127a078..7ee82a7 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -89,6 +89,23 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     dnl (The --clear flag to pyvenv will not clobber a plain file.)
+     AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
++    dnl System site packages are disabled.
+     sage_spkg_install_$1=yes
++
++    dnl We have to retroactively hack the --with-system-foo={no,yes,force}
++    dnl mechanism here because it wasn't designed with the ability to
++    dnl disable arbitrary chunks of system packages in mind. The easy cases
++    dnl are "no" and "force" which require no action; "no" means we won't
++    dnl suggest the package anyway, and "force" will raise an error when
++    dnl the system-package check fails.
++    dnl
++    dnl The default of "yes" is more troubling because it is the default. To
++    dnl avoid prompting users to install packages that won't be used, we want
++    dnl to ignore "yes" when reporting the "hint: install these packages..."
++    dnl at the end of ./configure. To accomplish that, we change "yes" to
++    dnl "no" here, essentially changing the default for packages using this
++    dnl macro when --enable-system-site-packages is disabled. Packages with
++    dnl "no" are not suggested to the user.
++    AS_IF([test "${sage_use_system_$1}" = "yes"],[sage_use_system_$1=no])
+   ])
+ ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3e6ad737b94aaac234d615ecaf1a2455eb607f1a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 17 Oct 2021 06:16:21 -0400
+Subject: Trac #29665: add Gentoo package information for python packages.
+
+---
+ build/pkgs/babel/distros/gentoo.txt         | 1 +
+ build/pkgs/bleach/distros/gentoo.txt        | 1 +
+ build/pkgs/certifi/distros/gentoo.txt       | 1 +
+ build/pkgs/cvxopt/distros/gentoo.txt        | 1 +
+ build/pkgs/decorator/distros/gentoo.txt     | 1 +
+ build/pkgs/html5lib/distros/gentoo.txt      | 1 +
+ build/pkgs/idna/distros/gentoo.txt          | 1 +
+ build/pkgs/jinja2/distros/gentoo.txt        | 1 +
+ build/pkgs/matplotlib/distros/gentoo.txt    | 1 +
+ build/pkgs/mpmath/distros/gentoo.txt        | 1 +
+ build/pkgs/networkx/distros/gentoo.txt      | 1 +
+ build/pkgs/numpy/distros/gentoo.txt         | 1 +
+ build/pkgs/packaging/distros/gentoo.txt     | 1 +
+ build/pkgs/pandocfilters/distros/gentoo.txt | 1 +
+ build/pkgs/pickleshare/distros/gentoo.txt   | 1 +
+ build/pkgs/pillow/distros/gentoo.txt        | 1 +
+ build/pkgs/pluggy/distros/gentoo.txt        | 1 +
+ build/pkgs/pygments/distros/gentoo.txt      | 1 +
+ build/pkgs/pytz/distros/gentoo.txt          | 1 +
+ build/pkgs/pyzmq/distros/gentoo.txt         | 1 +
+ build/pkgs/requests/distros/gentoo.txt      | 1 +
+ build/pkgs/scipy/distros/gentoo.txt         | 1 +
+ build/pkgs/setuptools/distros/gentoo.txt    | 1 +
+ build/pkgs/six/distros/gentoo.txt           | 1 +
+ build/pkgs/sympy/distros/gentoo.txt         | 1 +
+ build/pkgs/texttable/distros/gentoo.txt     | 1 +
+ build/pkgs/toml/distros/gentoo.txt          | 1 +
+ build/pkgs/webencodings/distros/gentoo.txt  | 1 +
+ 28 files changed, 28 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/gentoo.txt
+ create mode 100644 build/pkgs/bleach/distros/gentoo.txt
+ create mode 100644 build/pkgs/certifi/distros/gentoo.txt
+ create mode 100644 build/pkgs/cvxopt/distros/gentoo.txt
+ create mode 100644 build/pkgs/decorator/distros/gentoo.txt
+ create mode 100644 build/pkgs/html5lib/distros/gentoo.txt
+ create mode 100644 build/pkgs/idna/distros/gentoo.txt
+ create mode 100644 build/pkgs/jinja2/distros/gentoo.txt
+ create mode 100644 build/pkgs/matplotlib/distros/gentoo.txt
+ create mode 100644 build/pkgs/mpmath/distros/gentoo.txt
+ create mode 100644 build/pkgs/networkx/distros/gentoo.txt
+ create mode 100644 build/pkgs/numpy/distros/gentoo.txt
+ create mode 100644 build/pkgs/packaging/distros/gentoo.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/gentoo.txt
+ create mode 100644 build/pkgs/pickleshare/distros/gentoo.txt
+ create mode 100644 build/pkgs/pillow/distros/gentoo.txt
+ create mode 100644 build/pkgs/pluggy/distros/gentoo.txt
+ create mode 100644 build/pkgs/pygments/distros/gentoo.txt
+ create mode 100644 build/pkgs/pytz/distros/gentoo.txt
+ create mode 100644 build/pkgs/pyzmq/distros/gentoo.txt
+ create mode 100644 build/pkgs/requests/distros/gentoo.txt
+ create mode 100644 build/pkgs/scipy/distros/gentoo.txt
+ create mode 100644 build/pkgs/setuptools/distros/gentoo.txt
+ create mode 100644 build/pkgs/six/distros/gentoo.txt
+ create mode 100644 build/pkgs/sympy/distros/gentoo.txt
+ create mode 100644 build/pkgs/texttable/distros/gentoo.txt
+ create mode 100644 build/pkgs/toml/distros/gentoo.txt
+ create mode 100644 build/pkgs/webencodings/distros/gentoo.txt
+
+diff --git a/build/pkgs/babel/distros/gentoo.txt b/build/pkgs/babel/distros/gentoo.txt
+new file mode 100644
+index 00000000..2d2c34f
+--- /dev/null
++++ b/build/pkgs/babel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/Babel
+diff --git a/build/pkgs/bleach/distros/gentoo.txt b/build/pkgs/bleach/distros/gentoo.txt
+new file mode 100644
+index 00000000..b4f9744
+--- /dev/null
++++ b/build/pkgs/bleach/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/bleach
+diff --git a/build/pkgs/certifi/distros/gentoo.txt b/build/pkgs/certifi/distros/gentoo.txt
+new file mode 100644
+index 00000000..72e2e91
+--- /dev/null
++++ b/build/pkgs/certifi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/certifi
+diff --git a/build/pkgs/cvxopt/distros/gentoo.txt b/build/pkgs/cvxopt/distros/gentoo.txt
+new file mode 100644
+index 00000000..b312391
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/cvxopt
+diff --git a/build/pkgs/decorator/distros/gentoo.txt b/build/pkgs/decorator/distros/gentoo.txt
+new file mode 100644
+index 00000000..fea5a67
+--- /dev/null
++++ b/build/pkgs/decorator/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/decorator
+diff --git a/build/pkgs/html5lib/distros/gentoo.txt b/build/pkgs/html5lib/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c2be76
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/html5lib
+diff --git a/build/pkgs/idna/distros/gentoo.txt b/build/pkgs/idna/distros/gentoo.txt
+new file mode 100644
+index 00000000..68ef51c
+--- /dev/null
++++ b/build/pkgs/idna/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/idna
+diff --git a/build/pkgs/jinja2/distros/gentoo.txt b/build/pkgs/jinja2/distros/gentoo.txt
+new file mode 100644
+index 00000000..15a27ae
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jinja
+diff --git a/build/pkgs/matplotlib/distros/gentoo.txt b/build/pkgs/matplotlib/distros/gentoo.txt
+new file mode 100644
+index 00000000..bcfefb5
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/matplotlib
+diff --git a/build/pkgs/mpmath/distros/gentoo.txt b/build/pkgs/mpmath/distros/gentoo.txt
+new file mode 100644
+index 00000000..946c62d
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/mpmath
+diff --git a/build/pkgs/networkx/distros/gentoo.txt b/build/pkgs/networkx/distros/gentoo.txt
+new file mode 100644
+index 00000000..dd97742
+--- /dev/null
++++ b/build/pkgs/networkx/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/networkx
+diff --git a/build/pkgs/numpy/distros/gentoo.txt b/build/pkgs/numpy/distros/gentoo.txt
+new file mode 100644
+index 00000000..d2179d4
+--- /dev/null
++++ b/build/pkgs/numpy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/numpy
+diff --git a/build/pkgs/packaging/distros/gentoo.txt b/build/pkgs/packaging/distros/gentoo.txt
+new file mode 100644
+index 00000000..e5309ed
+--- /dev/null
++++ b/build/pkgs/packaging/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/packaging
+diff --git a/build/pkgs/pandocfilters/distros/gentoo.txt b/build/pkgs/pandocfilters/distros/gentoo.txt
+new file mode 100644
+index 00000000..a726fda
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/gentoo.txt b/build/pkgs/pickleshare/distros/gentoo.txt
+new file mode 100644
+index 00000000..14fad0f
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pickleshare
+diff --git a/build/pkgs/pillow/distros/gentoo.txt b/build/pkgs/pillow/distros/gentoo.txt
+new file mode 100644
+index 00000000..1243649
+--- /dev/null
++++ b/build/pkgs/pillow/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pillow
+diff --git a/build/pkgs/pluggy/distros/gentoo.txt b/build/pkgs/pluggy/distros/gentoo.txt
+new file mode 100644
+index 00000000..7b33876
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pluggy
+diff --git a/build/pkgs/pygments/distros/gentoo.txt b/build/pkgs/pygments/distros/gentoo.txt
+new file mode 100644
+index 00000000..a584f32
+--- /dev/null
++++ b/build/pkgs/pygments/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pygments
+diff --git a/build/pkgs/pytz/distros/gentoo.txt b/build/pkgs/pytz/distros/gentoo.txt
+new file mode 100644
+index 00000000..902a18b
+--- /dev/null
++++ b/build/pkgs/pytz/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pytz
+diff --git a/build/pkgs/pyzmq/distros/gentoo.txt b/build/pkgs/pyzmq/distros/gentoo.txt
+new file mode 100644
+index 00000000..77c2429
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyzmq
+diff --git a/build/pkgs/requests/distros/gentoo.txt b/build/pkgs/requests/distros/gentoo.txt
+new file mode 100644
+index 00000000..d3dc941
+--- /dev/null
++++ b/build/pkgs/requests/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/requests
+diff --git a/build/pkgs/scipy/distros/gentoo.txt b/build/pkgs/scipy/distros/gentoo.txt
+new file mode 100644
+index 00000000..11dabd2
+--- /dev/null
++++ b/build/pkgs/scipy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/scipy
+diff --git a/build/pkgs/setuptools/distros/gentoo.txt b/build/pkgs/setuptools/distros/gentoo.txt
+new file mode 100644
+index 00000000..3a4fa34
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/setuptools
+diff --git a/build/pkgs/six/distros/gentoo.txt b/build/pkgs/six/distros/gentoo.txt
+new file mode 100644
+index 00000000..f73f648
+--- /dev/null
++++ b/build/pkgs/six/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/six
+diff --git a/build/pkgs/sympy/distros/gentoo.txt b/build/pkgs/sympy/distros/gentoo.txt
+new file mode 100644
+index 00000000..b5a5034
+--- /dev/null
++++ b/build/pkgs/sympy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sympy
+diff --git a/build/pkgs/texttable/distros/gentoo.txt b/build/pkgs/texttable/distros/gentoo.txt
+new file mode 100644
+index 00000000..b33a7a7
+--- /dev/null
++++ b/build/pkgs/texttable/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/texttable
+diff --git a/build/pkgs/toml/distros/gentoo.txt b/build/pkgs/toml/distros/gentoo.txt
+new file mode 100644
+index 00000000..64fcea3
+--- /dev/null
++++ b/build/pkgs/toml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/toml
+diff --git a/build/pkgs/webencodings/distros/gentoo.txt b/build/pkgs/webencodings/distros/gentoo.txt
+new file mode 100644
+index 00000000..7539b0f
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/webencodings
+-- 
+cgit v1.0-1-gd88e
+
+
+From 088380f884124c9608160b613ba031c5f023f604 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 18:43:04 -0700
+Subject: build/pkgs: Add distros/fedora.txt for Python packages
+
+---
+ build/pkgs/babel/distros/fedora.txt         | 1 +
+ build/pkgs/bleach/distros/fedora.txt        | 1 +
+ build/pkgs/certifi/distros/fedora.txt       | 1 +
+ build/pkgs/cvxopt/distros/fedora.txt        | 1 +
+ build/pkgs/decorator/distros/fedora.txt     | 1 +
+ build/pkgs/html5lib/distros/fedora.txt      | 1 +
+ build/pkgs/idna/distros/fedora.txt          | 1 +
+ build/pkgs/jinja2/distros/fedora.txt        | 1 +
+ build/pkgs/matplotlib/distros/fedora.txt    | 1 +
+ build/pkgs/mpmath/distros/fedora.txt        | 1 +
+ build/pkgs/networkx/distros/fedora.txt      | 1 +
+ build/pkgs/numpy/distros/fedora.txt         | 1 +
+ build/pkgs/packaging/distros/fedora.txt     | 1 +
+ build/pkgs/pandocfilters/distros/fedora.txt | 1 +
+ build/pkgs/pickleshare/distros/fedora.txt   | 1 +
+ build/pkgs/pillow/distros/fedora.txt        | 1 +
+ build/pkgs/pluggy/distros/fedora.txt        | 1 +
+ build/pkgs/py/distros/fedora.txt            | 1 +
+ build/pkgs/pygments/distros/fedora.txt      | 1 +
+ build/pkgs/pytz/distros/fedora.txt          | 1 +
+ build/pkgs/pyzmq/distros/fedora.txt         | 1 +
+ build/pkgs/requests/distros/fedora.txt      | 1 +
+ build/pkgs/scipy/distros/fedora.txt         | 1 +
+ build/pkgs/setuptools/distros/fedora.txt    | 1 +
+ build/pkgs/six/distros/fedora.txt           | 1 +
+ build/pkgs/sympy/distros/fedora.txt         | 1 +
+ build/pkgs/texttable/distros/fedora.txt     | 1 +
+ build/pkgs/toml/distros/fedora.txt          | 1 +
+ build/pkgs/webencodings/distros/fedora.txt  | 1 +
+ build/pkgs/wheel/distros/fedora.txt         | 1 +
+ 30 files changed, 30 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/fedora.txt
+ create mode 100644 build/pkgs/bleach/distros/fedora.txt
+ create mode 100644 build/pkgs/certifi/distros/fedora.txt
+ create mode 100644 build/pkgs/cvxopt/distros/fedora.txt
+ create mode 100644 build/pkgs/decorator/distros/fedora.txt
+ create mode 100644 build/pkgs/html5lib/distros/fedora.txt
+ create mode 100644 build/pkgs/idna/distros/fedora.txt
+ create mode 100644 build/pkgs/jinja2/distros/fedora.txt
+ create mode 100644 build/pkgs/matplotlib/distros/fedora.txt
+ create mode 100644 build/pkgs/mpmath/distros/fedora.txt
+ create mode 100644 build/pkgs/networkx/distros/fedora.txt
+ create mode 100644 build/pkgs/numpy/distros/fedora.txt
+ create mode 100644 build/pkgs/packaging/distros/fedora.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/fedora.txt
+ create mode 100644 build/pkgs/pickleshare/distros/fedora.txt
+ create mode 100644 build/pkgs/pillow/distros/fedora.txt
+ create mode 100644 build/pkgs/pluggy/distros/fedora.txt
+ create mode 100644 build/pkgs/py/distros/fedora.txt
+ create mode 100644 build/pkgs/pygments/distros/fedora.txt
+ create mode 100644 build/pkgs/pytz/distros/fedora.txt
+ create mode 100644 build/pkgs/pyzmq/distros/fedora.txt
+ create mode 100644 build/pkgs/requests/distros/fedora.txt
+ create mode 100644 build/pkgs/scipy/distros/fedora.txt
+ create mode 100644 build/pkgs/setuptools/distros/fedora.txt
+ create mode 100644 build/pkgs/six/distros/fedora.txt
+ create mode 100644 build/pkgs/sympy/distros/fedora.txt
+ create mode 100644 build/pkgs/texttable/distros/fedora.txt
+ create mode 100644 build/pkgs/toml/distros/fedora.txt
+ create mode 100644 build/pkgs/webencodings/distros/fedora.txt
+ create mode 100644 build/pkgs/wheel/distros/fedora.txt
+
+diff --git a/build/pkgs/babel/distros/fedora.txt b/build/pkgs/babel/distros/fedora.txt
+new file mode 100644
+index 00000000..98f6593
+--- /dev/null
++++ b/build/pkgs/babel/distros/fedora.txt
+@@ -0,0 +1 @@
++babel
+diff --git a/build/pkgs/bleach/distros/fedora.txt b/build/pkgs/bleach/distros/fedora.txt
+new file mode 100644
+index 00000000..c5422cc
+--- /dev/null
++++ b/build/pkgs/bleach/distros/fedora.txt
+@@ -0,0 +1 @@
++python-bleach
+diff --git a/build/pkgs/certifi/distros/fedora.txt b/build/pkgs/certifi/distros/fedora.txt
+new file mode 100644
+index 00000000..be421c8
+--- /dev/null
++++ b/build/pkgs/certifi/distros/fedora.txt
+@@ -0,0 +1 @@
++python-certifi
+diff --git a/build/pkgs/cvxopt/distros/fedora.txt b/build/pkgs/cvxopt/distros/fedora.txt
+new file mode 100644
+index 00000000..f15770f
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/fedora.txt
+@@ -0,0 +1 @@
++python-cvxopt
+diff --git a/build/pkgs/decorator/distros/fedora.txt b/build/pkgs/decorator/distros/fedora.txt
+new file mode 100644
+index 00000000..0795604
+--- /dev/null
++++ b/build/pkgs/decorator/distros/fedora.txt
+@@ -0,0 +1 @@
++python-decorator
+diff --git a/build/pkgs/html5lib/distros/fedora.txt b/build/pkgs/html5lib/distros/fedora.txt
+new file mode 100644
+index 00000000..b821491
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/fedora.txt
+@@ -0,0 +1 @@
++python-html5lib
+diff --git a/build/pkgs/idna/distros/fedora.txt b/build/pkgs/idna/distros/fedora.txt
+new file mode 100644
+index 00000000..a73e70c
+--- /dev/null
++++ b/build/pkgs/idna/distros/fedora.txt
+@@ -0,0 +1 @@
++python-idna
+diff --git a/build/pkgs/jinja2/distros/fedora.txt b/build/pkgs/jinja2/distros/fedora.txt
+new file mode 100644
+index 00000000..f5f3caf
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/fedora.txt
+@@ -0,0 +1 @@
++python-jinja2
+diff --git a/build/pkgs/matplotlib/distros/fedora.txt b/build/pkgs/matplotlib/distros/fedora.txt
+new file mode 100644
+index 00000000..f6d856e
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/fedora.txt
+@@ -0,0 +1 @@
++python-matplotlib
+diff --git a/build/pkgs/mpmath/distros/fedora.txt b/build/pkgs/mpmath/distros/fedora.txt
+new file mode 100644
+index 00000000..a7dc8d5
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/fedora.txt
+@@ -0,0 +1 @@
++python-mpmath
+diff --git a/build/pkgs/networkx/distros/fedora.txt b/build/pkgs/networkx/distros/fedora.txt
+new file mode 100644
+index 00000000..293f943
+--- /dev/null
++++ b/build/pkgs/networkx/distros/fedora.txt
+@@ -0,0 +1 @@
++python-networkx
+diff --git a/build/pkgs/numpy/distros/fedora.txt b/build/pkgs/numpy/distros/fedora.txt
+new file mode 100644
+index 00000000..c8722b9
+--- /dev/null
++++ b/build/pkgs/numpy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-numpy
+diff --git a/build/pkgs/packaging/distros/fedora.txt b/build/pkgs/packaging/distros/fedora.txt
+new file mode 100644
+index 00000000..02ad855
+--- /dev/null
++++ b/build/pkgs/packaging/distros/fedora.txt
+@@ -0,0 +1 @@
++python-packaging
+diff --git a/build/pkgs/pandocfilters/distros/fedora.txt b/build/pkgs/pandocfilters/distros/fedora.txt
+new file mode 100644
+index 00000000..e7a86d0
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/fedora.txt b/build/pkgs/pickleshare/distros/fedora.txt
+new file mode 100644
+index 00000000..6d991a2
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pickleshare
+diff --git a/build/pkgs/pillow/distros/fedora.txt b/build/pkgs/pillow/distros/fedora.txt
+new file mode 100644
+index 00000000..86dbb1d
+--- /dev/null
++++ b/build/pkgs/pillow/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pillow
+diff --git a/build/pkgs/pluggy/distros/fedora.txt b/build/pkgs/pluggy/distros/fedora.txt
+new file mode 100644
+index 00000000..c869e54
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pluggy
+diff --git a/build/pkgs/py/distros/fedora.txt b/build/pkgs/py/distros/fedora.txt
+new file mode 100644
+index 00000000..b348d39
+--- /dev/null
++++ b/build/pkgs/py/distros/fedora.txt
+@@ -0,0 +1 @@
++python-py
+diff --git a/build/pkgs/pygments/distros/fedora.txt b/build/pkgs/pygments/distros/fedora.txt
+new file mode 100644
+index 00000000..f3e72a8
+--- /dev/null
++++ b/build/pkgs/pygments/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pygments
+diff --git a/build/pkgs/pytz/distros/fedora.txt b/build/pkgs/pytz/distros/fedora.txt
+new file mode 100644
+index 00000000..2cccc9e
+--- /dev/null
++++ b/build/pkgs/pytz/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pytz
+diff --git a/build/pkgs/pyzmq/distros/fedora.txt b/build/pkgs/pyzmq/distros/fedora.txt
+new file mode 100644
+index 00000000..23f64d1
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pyzmq
+diff --git a/build/pkgs/requests/distros/fedora.txt b/build/pkgs/requests/distros/fedora.txt
+new file mode 100644
+index 00000000..93a7bc1
+--- /dev/null
++++ b/build/pkgs/requests/distros/fedora.txt
+@@ -0,0 +1 @@
++python-requests
+diff --git a/build/pkgs/scipy/distros/fedora.txt b/build/pkgs/scipy/distros/fedora.txt
+new file mode 100644
+index 00000000..7ff2882
+--- /dev/null
++++ b/build/pkgs/scipy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-scipy
+diff --git a/build/pkgs/setuptools/distros/fedora.txt b/build/pkgs/setuptools/distros/fedora.txt
+new file mode 100644
+index 00000000..e1ad178
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/fedora.txt
+@@ -0,0 +1 @@
++python-setuptools
+diff --git a/build/pkgs/six/distros/fedora.txt b/build/pkgs/six/distros/fedora.txt
+new file mode 100644
+index 00000000..787c530
+--- /dev/null
++++ b/build/pkgs/six/distros/fedora.txt
+@@ -0,0 +1 @@
++python-six
+diff --git a/build/pkgs/sympy/distros/fedora.txt b/build/pkgs/sympy/distros/fedora.txt
+new file mode 100644
+index 00000000..126c88a
+--- /dev/null
++++ b/build/pkgs/sympy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-sympy
+diff --git a/build/pkgs/texttable/distros/fedora.txt b/build/pkgs/texttable/distros/fedora.txt
+new file mode 100644
+index 00000000..8d1ccec
+--- /dev/null
++++ b/build/pkgs/texttable/distros/fedora.txt
+@@ -0,0 +1 @@
++python-texttable
+diff --git a/build/pkgs/toml/distros/fedora.txt b/build/pkgs/toml/distros/fedora.txt
+new file mode 100644
+index 00000000..821ee77
+--- /dev/null
++++ b/build/pkgs/toml/distros/fedora.txt
+@@ -0,0 +1 @@
++python-toml
+diff --git a/build/pkgs/webencodings/distros/fedora.txt b/build/pkgs/webencodings/distros/fedora.txt
+new file mode 100644
+index 00000000..12ddba9
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/fedora.txt
+@@ -0,0 +1 @@
++python-webencodings
+diff --git a/build/pkgs/wheel/distros/fedora.txt b/build/pkgs/wheel/distros/fedora.txt
+new file mode 100644
+index 00000000..ae4cbb9
+--- /dev/null
++++ b/build/pkgs/wheel/distros/fedora.txt
+@@ -0,0 +1 @@
++python-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From ad1d5a20380b147c774903066031442f31094626 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 21:04:04 -0700
+Subject: build/pkgs: Add distros/arch.txt for Python packages
+
+---
+ build/pkgs/babel/distros/arch.txt         | 1 +
+ build/pkgs/bleach/distros/arch.txt        | 1 +
+ build/pkgs/certifi/distros/arch.txt       | 1 +
+ build/pkgs/cvxopt/distros/arch.txt        | 1 +
+ build/pkgs/decorator/distros/arch.txt     | 1 +
+ build/pkgs/html5lib/distros/arch.txt      | 1 +
+ build/pkgs/idna/distros/arch.txt          | 1 +
+ build/pkgs/matplotlib/distros/arch.txt    | 1 +
+ build/pkgs/mpmath/distros/arch.txt        | 1 +
+ build/pkgs/networkx/distros/arch.txt      | 1 +
+ build/pkgs/numpy/distros/arch.txt         | 1 +
+ build/pkgs/packaging/distros/arch.txt     | 1 +
+ build/pkgs/pandocfilters/distros/arch.txt | 1 +
+ build/pkgs/pickleshare/distros/arch.txt   | 1 +
+ build/pkgs/pillow/distros/arch.txt        | 1 +
+ build/pkgs/pluggy/distros/arch.txt        | 1 +
+ build/pkgs/py/distros/arch.txt            | 1 +
+ build/pkgs/pygments/distros/arch.txt      | 1 +
+ build/pkgs/pytz/distros/arch.txt          | 1 +
+ build/pkgs/pyzmq/distros/arch.txt         | 1 +
+ build/pkgs/requests/distros/arch.txt      | 1 +
+ build/pkgs/scipy/distros/arch.txt         | 1 +
+ build/pkgs/setuptools/distros/arch.txt    | 1 +
+ build/pkgs/six/distros/arch.txt           | 1 +
+ build/pkgs/sympy/distros/arch.txt         | 1 +
+ build/pkgs/texttable/distros/arch.txt     | 1 +
+ build/pkgs/toml/distros/arch.txt          | 1 +
+ build/pkgs/webencodings/distros/arch.txt  | 1 +
+ build/pkgs/wheel/distros/arch.txt         | 1 +
+ 29 files changed, 29 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/arch.txt
+ create mode 100644 build/pkgs/bleach/distros/arch.txt
+ create mode 100644 build/pkgs/certifi/distros/arch.txt
+ create mode 100644 build/pkgs/cvxopt/distros/arch.txt
+ create mode 100644 build/pkgs/decorator/distros/arch.txt
+ create mode 100644 build/pkgs/html5lib/distros/arch.txt
+ create mode 100644 build/pkgs/idna/distros/arch.txt
+ create mode 100644 build/pkgs/matplotlib/distros/arch.txt
+ create mode 100644 build/pkgs/mpmath/distros/arch.txt
+ create mode 100644 build/pkgs/networkx/distros/arch.txt
+ create mode 100644 build/pkgs/numpy/distros/arch.txt
+ create mode 100644 build/pkgs/packaging/distros/arch.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/arch.txt
+ create mode 100644 build/pkgs/pickleshare/distros/arch.txt
+ create mode 100644 build/pkgs/pillow/distros/arch.txt
+ create mode 100644 build/pkgs/pluggy/distros/arch.txt
+ create mode 100644 build/pkgs/py/distros/arch.txt
+ create mode 100644 build/pkgs/pygments/distros/arch.txt
+ create mode 100644 build/pkgs/pytz/distros/arch.txt
+ create mode 100644 build/pkgs/pyzmq/distros/arch.txt
+ create mode 100644 build/pkgs/requests/distros/arch.txt
+ create mode 100644 build/pkgs/scipy/distros/arch.txt
+ create mode 100644 build/pkgs/setuptools/distros/arch.txt
+ create mode 100644 build/pkgs/six/distros/arch.txt
+ create mode 100644 build/pkgs/sympy/distros/arch.txt
+ create mode 100644 build/pkgs/texttable/distros/arch.txt
+ create mode 100644 build/pkgs/toml/distros/arch.txt
+ create mode 100644 build/pkgs/webencodings/distros/arch.txt
+ create mode 100644 build/pkgs/wheel/distros/arch.txt
+
+diff --git a/build/pkgs/babel/distros/arch.txt b/build/pkgs/babel/distros/arch.txt
+new file mode 100644
+index 00000000..f2d828c
+--- /dev/null
++++ b/build/pkgs/babel/distros/arch.txt
+@@ -0,0 +1 @@
++python-babel
+diff --git a/build/pkgs/bleach/distros/arch.txt b/build/pkgs/bleach/distros/arch.txt
+new file mode 100644
+index 00000000..c5422cc
+--- /dev/null
++++ b/build/pkgs/bleach/distros/arch.txt
+@@ -0,0 +1 @@
++python-bleach
+diff --git a/build/pkgs/certifi/distros/arch.txt b/build/pkgs/certifi/distros/arch.txt
+new file mode 100644
+index 00000000..be421c8
+--- /dev/null
++++ b/build/pkgs/certifi/distros/arch.txt
+@@ -0,0 +1 @@
++python-certifi
+diff --git a/build/pkgs/cvxopt/distros/arch.txt b/build/pkgs/cvxopt/distros/arch.txt
+new file mode 100644
+index 00000000..f15770f
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/arch.txt
+@@ -0,0 +1 @@
++python-cvxopt
+diff --git a/build/pkgs/decorator/distros/arch.txt b/build/pkgs/decorator/distros/arch.txt
+new file mode 100644
+index 00000000..0795604
+--- /dev/null
++++ b/build/pkgs/decorator/distros/arch.txt
+@@ -0,0 +1 @@
++python-decorator
+diff --git a/build/pkgs/html5lib/distros/arch.txt b/build/pkgs/html5lib/distros/arch.txt
+new file mode 100644
+index 00000000..b821491
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/arch.txt
+@@ -0,0 +1 @@
++python-html5lib
+diff --git a/build/pkgs/idna/distros/arch.txt b/build/pkgs/idna/distros/arch.txt
+new file mode 100644
+index 00000000..a73e70c
+--- /dev/null
++++ b/build/pkgs/idna/distros/arch.txt
+@@ -0,0 +1 @@
++python-idna
+diff --git a/build/pkgs/matplotlib/distros/arch.txt b/build/pkgs/matplotlib/distros/arch.txt
+new file mode 100644
+index 00000000..f6d856e
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/arch.txt
+@@ -0,0 +1 @@
++python-matplotlib
+diff --git a/build/pkgs/mpmath/distros/arch.txt b/build/pkgs/mpmath/distros/arch.txt
+new file mode 100644
+index 00000000..a7dc8d5
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/arch.txt
+@@ -0,0 +1 @@
++python-mpmath
+diff --git a/build/pkgs/networkx/distros/arch.txt b/build/pkgs/networkx/distros/arch.txt
+new file mode 100644
+index 00000000..293f943
+--- /dev/null
++++ b/build/pkgs/networkx/distros/arch.txt
+@@ -0,0 +1 @@
++python-networkx
+diff --git a/build/pkgs/numpy/distros/arch.txt b/build/pkgs/numpy/distros/arch.txt
+new file mode 100644
+index 00000000..c8722b9
+--- /dev/null
++++ b/build/pkgs/numpy/distros/arch.txt
+@@ -0,0 +1 @@
++python-numpy
+diff --git a/build/pkgs/packaging/distros/arch.txt b/build/pkgs/packaging/distros/arch.txt
+new file mode 100644
+index 00000000..02ad855
+--- /dev/null
++++ b/build/pkgs/packaging/distros/arch.txt
+@@ -0,0 +1 @@
++python-packaging
+diff --git a/build/pkgs/pandocfilters/distros/arch.txt b/build/pkgs/pandocfilters/distros/arch.txt
+new file mode 100644
+index 00000000..e7a86d0
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/arch.txt
+@@ -0,0 +1 @@
++python-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/arch.txt b/build/pkgs/pickleshare/distros/arch.txt
+new file mode 100644
+index 00000000..6d991a2
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/arch.txt
+@@ -0,0 +1 @@
++python-pickleshare
+diff --git a/build/pkgs/pillow/distros/arch.txt b/build/pkgs/pillow/distros/arch.txt
+new file mode 100644
+index 00000000..86dbb1d
+--- /dev/null
++++ b/build/pkgs/pillow/distros/arch.txt
+@@ -0,0 +1 @@
++python-pillow
+diff --git a/build/pkgs/pluggy/distros/arch.txt b/build/pkgs/pluggy/distros/arch.txt
+new file mode 100644
+index 00000000..c869e54
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/arch.txt
+@@ -0,0 +1 @@
++python-pluggy
+diff --git a/build/pkgs/py/distros/arch.txt b/build/pkgs/py/distros/arch.txt
+new file mode 100644
+index 00000000..b348d39
+--- /dev/null
++++ b/build/pkgs/py/distros/arch.txt
+@@ -0,0 +1 @@
++python-py
+diff --git a/build/pkgs/pygments/distros/arch.txt b/build/pkgs/pygments/distros/arch.txt
+new file mode 100644
+index 00000000..f3e72a8
+--- /dev/null
++++ b/build/pkgs/pygments/distros/arch.txt
+@@ -0,0 +1 @@
++python-pygments
+diff --git a/build/pkgs/pytz/distros/arch.txt b/build/pkgs/pytz/distros/arch.txt
+new file mode 100644
+index 00000000..2cccc9e
+--- /dev/null
++++ b/build/pkgs/pytz/distros/arch.txt
+@@ -0,0 +1 @@
++python-pytz
+diff --git a/build/pkgs/pyzmq/distros/arch.txt b/build/pkgs/pyzmq/distros/arch.txt
+new file mode 100644
+index 00000000..23f64d1
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/arch.txt
+@@ -0,0 +1 @@
++python-pyzmq
+diff --git a/build/pkgs/requests/distros/arch.txt b/build/pkgs/requests/distros/arch.txt
+new file mode 100644
+index 00000000..93a7bc1
+--- /dev/null
++++ b/build/pkgs/requests/distros/arch.txt
+@@ -0,0 +1 @@
++python-requests
+diff --git a/build/pkgs/scipy/distros/arch.txt b/build/pkgs/scipy/distros/arch.txt
+new file mode 100644
+index 00000000..7ff2882
+--- /dev/null
++++ b/build/pkgs/scipy/distros/arch.txt
+@@ -0,0 +1 @@
++python-scipy
+diff --git a/build/pkgs/setuptools/distros/arch.txt b/build/pkgs/setuptools/distros/arch.txt
+new file mode 100644
+index 00000000..e1ad178
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/arch.txt
+@@ -0,0 +1 @@
++python-setuptools
+diff --git a/build/pkgs/six/distros/arch.txt b/build/pkgs/six/distros/arch.txt
+new file mode 100644
+index 00000000..787c530
+--- /dev/null
++++ b/build/pkgs/six/distros/arch.txt
+@@ -0,0 +1 @@
++python-six
+diff --git a/build/pkgs/sympy/distros/arch.txt b/build/pkgs/sympy/distros/arch.txt
+new file mode 100644
+index 00000000..126c88a
+--- /dev/null
++++ b/build/pkgs/sympy/distros/arch.txt
+@@ -0,0 +1 @@
++python-sympy
+diff --git a/build/pkgs/texttable/distros/arch.txt b/build/pkgs/texttable/distros/arch.txt
+new file mode 100644
+index 00000000..8d1ccec
+--- /dev/null
++++ b/build/pkgs/texttable/distros/arch.txt
+@@ -0,0 +1 @@
++python-texttable
+diff --git a/build/pkgs/toml/distros/arch.txt b/build/pkgs/toml/distros/arch.txt
+new file mode 100644
+index 00000000..821ee77
+--- /dev/null
++++ b/build/pkgs/toml/distros/arch.txt
+@@ -0,0 +1 @@
++python-toml
+diff --git a/build/pkgs/webencodings/distros/arch.txt b/build/pkgs/webencodings/distros/arch.txt
+new file mode 100644
+index 00000000..12ddba9
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/arch.txt
+@@ -0,0 +1 @@
++python-webencodings
+diff --git a/build/pkgs/wheel/distros/arch.txt b/build/pkgs/wheel/distros/arch.txt
+new file mode 100644
+index 00000000..ae4cbb9
+--- /dev/null
++++ b/build/pkgs/wheel/distros/arch.txt
+@@ -0,0 +1 @@
++python-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5087abee08f2a89ddaf422ec72a84575fe724a79 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 21:20:56 -0700
+Subject: build/pkgs: Add distros/opensuse.txt for Python packages
+
+---
+ build/pkgs/bleach/distros/opensuse.txt        | 1 +
+ build/pkgs/cvxopt/distros/opensuse.txt        | 1 +
+ build/pkgs/html5lib/distros/opensuse.txt      | 1 +
+ build/pkgs/idna/distros/opensuse.txt          | 1 +
+ build/pkgs/jinja2/distros/opensuse.txt        | 2 +-
+ build/pkgs/mpmath/distros/opensuse.txt        | 1 +
+ build/pkgs/numpy/distros/opensuse.txt         | 1 +
+ build/pkgs/packaging/distros/opensuse.txt     | 1 +
+ build/pkgs/pandocfilters/distros/opensuse.txt | 1 +
+ build/pkgs/pluggy/distros/opensuse.txt        | 1 +
+ build/pkgs/py/distros/opensuse.txt            | 1 +
+ build/pkgs/pygments/distros/opensuse.txt      | 2 +-
+ build/pkgs/sympy/distros/opensuse.txt         | 1 +
+ build/pkgs/texttable/distros/opensuse.txt     | 1 +
+ build/pkgs/toml/distros/opensuse.txt          | 1 +
+ 15 files changed, 15 insertions(+), 2 deletions(-)
+ create mode 100644 build/pkgs/bleach/distros/opensuse.txt
+ create mode 100644 build/pkgs/cvxopt/distros/opensuse.txt
+ create mode 100644 build/pkgs/html5lib/distros/opensuse.txt
+ create mode 100644 build/pkgs/idna/distros/opensuse.txt
+ create mode 100644 build/pkgs/mpmath/distros/opensuse.txt
+ create mode 100644 build/pkgs/numpy/distros/opensuse.txt
+ create mode 100644 build/pkgs/packaging/distros/opensuse.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/opensuse.txt
+ create mode 100644 build/pkgs/pluggy/distros/opensuse.txt
+ create mode 100644 build/pkgs/py/distros/opensuse.txt
+ create mode 100644 build/pkgs/sympy/distros/opensuse.txt
+ create mode 100644 build/pkgs/texttable/distros/opensuse.txt
+ create mode 100644 build/pkgs/toml/distros/opensuse.txt
+
+diff --git a/build/pkgs/bleach/distros/opensuse.txt b/build/pkgs/bleach/distros/opensuse.txt
+new file mode 100644
+index 00000000..6d37c4c
+--- /dev/null
++++ b/build/pkgs/bleach/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-bleach
+diff --git a/build/pkgs/cvxopt/distros/opensuse.txt b/build/pkgs/cvxopt/distros/opensuse.txt
+new file mode 100644
+index 00000000..2bb6ad1
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-cvxopt
+diff --git a/build/pkgs/html5lib/distros/opensuse.txt b/build/pkgs/html5lib/distros/opensuse.txt
+new file mode 100644
+index 00000000..6d7b8df
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-html5lib
+diff --git a/build/pkgs/idna/distros/opensuse.txt b/build/pkgs/idna/distros/opensuse.txt
+new file mode 100644
+index 00000000..de48e70
+--- /dev/null
++++ b/build/pkgs/idna/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-idna
+diff --git a/build/pkgs/jinja2/distros/opensuse.txt b/build/pkgs/jinja2/distros/opensuse.txt
+index 5d90a22..f2db865 100644
+--- a/build/pkgs/jinja2/distros/opensuse.txt
++++ b/build/pkgs/jinja2/distros/opensuse.txt
+@@ -1 +1 @@
+-python3-Jinja2
++python3-jinja2
+diff --git a/build/pkgs/mpmath/distros/opensuse.txt b/build/pkgs/mpmath/distros/opensuse.txt
+new file mode 100644
+index 00000000..fbc82a9
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-mpmath
+diff --git a/build/pkgs/numpy/distros/opensuse.txt b/build/pkgs/numpy/distros/opensuse.txt
+new file mode 100644
+index 00000000..79d5c5a
+--- /dev/null
++++ b/build/pkgs/numpy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-numpy
+diff --git a/build/pkgs/packaging/distros/opensuse.txt b/build/pkgs/packaging/distros/opensuse.txt
+new file mode 100644
+index 00000000..8f1c0ff
+--- /dev/null
++++ b/build/pkgs/packaging/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-packaging
+diff --git a/build/pkgs/pandocfilters/distros/opensuse.txt b/build/pkgs/pandocfilters/distros/opensuse.txt
+new file mode 100644
+index 00000000..d0d4c24
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-pandocfilters
+diff --git a/build/pkgs/pluggy/distros/opensuse.txt b/build/pkgs/pluggy/distros/opensuse.txt
+new file mode 100644
+index 00000000..43a3acf
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-pluggy
+diff --git a/build/pkgs/py/distros/opensuse.txt b/build/pkgs/py/distros/opensuse.txt
+new file mode 100644
+index 00000000..81fefe6
+--- /dev/null
++++ b/build/pkgs/py/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-py
+diff --git a/build/pkgs/pygments/distros/opensuse.txt b/build/pkgs/pygments/distros/opensuse.txt
+index 9ff5740..3ab3792 100644
+--- a/build/pkgs/pygments/distros/opensuse.txt
++++ b/build/pkgs/pygments/distros/opensuse.txt
+@@ -1 +1 @@
+-python3-Pygments
++python3-pygments
+diff --git a/build/pkgs/sympy/distros/opensuse.txt b/build/pkgs/sympy/distros/opensuse.txt
+new file mode 100644
+index 00000000..db423c8
+--- /dev/null
++++ b/build/pkgs/sympy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-sympy
+diff --git a/build/pkgs/texttable/distros/opensuse.txt b/build/pkgs/texttable/distros/opensuse.txt
+new file mode 100644
+index 00000000..8f8e7e2
+--- /dev/null
++++ b/build/pkgs/texttable/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-texttable
+diff --git a/build/pkgs/toml/distros/opensuse.txt b/build/pkgs/toml/distros/opensuse.txt
+new file mode 100644
+index 00000000..543e89d
+--- /dev/null
++++ b/build/pkgs/toml/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-toml
+-- 
+cgit v1.0-1-gd88e
+
+
+From a480ba7ace1370d106ae831e904ea22b72af1be7 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 22:45:04 -0700
+Subject: build/pkgs: Add distros/debian.txt for Python packages
+
+---
+ build/pkgs/babel/distros/debian.txt         | 1 +
+ build/pkgs/bleach/distros/debian.txt        | 1 +
+ build/pkgs/certifi/distros/debian.txt       | 1 +
+ build/pkgs/cvxopt/distros/debian.txt        | 1 +
+ build/pkgs/decorator/distros/debian.txt     | 1 +
+ build/pkgs/html5lib/distros/debian.txt      | 1 +
+ build/pkgs/idna/distros/debian.txt          | 1 +
+ build/pkgs/jinja2/distros/debian.txt        | 1 +
+ build/pkgs/matplotlib/distros/debian.txt    | 1 +
+ build/pkgs/mpmath/distros/debian.txt        | 1 +
+ build/pkgs/networkx/distros/debian.txt      | 1 +
+ build/pkgs/numpy/distros/debian.txt         | 1 +
+ build/pkgs/packaging/distros/debian.txt     | 1 +
+ build/pkgs/pandocfilters/distros/debian.txt | 1 +
+ build/pkgs/pickleshare/distros/debian.txt   | 1 +
+ build/pkgs/pillow/distros/debian.txt        | 1 +
+ build/pkgs/pluggy/distros/debian.txt        | 1 +
+ build/pkgs/py/distros/debian.txt            | 1 +
+ build/pkgs/pygments/distros/debian.txt      | 1 +
+ build/pkgs/pytz/distros/debian.txt          | 1 +
+ build/pkgs/requests/distros/debian.txt      | 1 +
+ build/pkgs/scipy/distros/debian.txt         | 1 +
+ build/pkgs/setuptools/distros/debian.txt    | 1 +
+ build/pkgs/six/distros/debian.txt           | 1 +
+ build/pkgs/sympy/distros/debian.txt         | 1 +
+ build/pkgs/texttable/distros/debian.txt     | 1 +
+ build/pkgs/toml/distros/debian.txt          | 1 +
+ build/pkgs/webencodings/distros/debian.txt  | 1 +
+ build/pkgs/wheel/distros/debian.txt         | 1 +
+ 29 files changed, 29 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/debian.txt
+ create mode 100644 build/pkgs/bleach/distros/debian.txt
+ create mode 100644 build/pkgs/certifi/distros/debian.txt
+ create mode 100644 build/pkgs/cvxopt/distros/debian.txt
+ create mode 100644 build/pkgs/decorator/distros/debian.txt
+ create mode 100644 build/pkgs/html5lib/distros/debian.txt
+ create mode 100644 build/pkgs/idna/distros/debian.txt
+ create mode 100644 build/pkgs/jinja2/distros/debian.txt
+ create mode 100644 build/pkgs/matplotlib/distros/debian.txt
+ create mode 100644 build/pkgs/mpmath/distros/debian.txt
+ create mode 100644 build/pkgs/networkx/distros/debian.txt
+ create mode 100644 build/pkgs/numpy/distros/debian.txt
+ create mode 100644 build/pkgs/packaging/distros/debian.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/debian.txt
+ create mode 100644 build/pkgs/pickleshare/distros/debian.txt
+ create mode 100644 build/pkgs/pillow/distros/debian.txt
+ create mode 100644 build/pkgs/pluggy/distros/debian.txt
+ create mode 100644 build/pkgs/py/distros/debian.txt
+ create mode 100644 build/pkgs/pygments/distros/debian.txt
+ create mode 100644 build/pkgs/pytz/distros/debian.txt
+ create mode 100644 build/pkgs/requests/distros/debian.txt
+ create mode 100644 build/pkgs/scipy/distros/debian.txt
+ create mode 100644 build/pkgs/setuptools/distros/debian.txt
+ create mode 100644 build/pkgs/six/distros/debian.txt
+ create mode 100644 build/pkgs/sympy/distros/debian.txt
+ create mode 100644 build/pkgs/texttable/distros/debian.txt
+ create mode 100644 build/pkgs/toml/distros/debian.txt
+ create mode 100644 build/pkgs/webencodings/distros/debian.txt
+ create mode 100644 build/pkgs/wheel/distros/debian.txt
+
+diff --git a/build/pkgs/babel/distros/debian.txt b/build/pkgs/babel/distros/debian.txt
+new file mode 100644
+index 00000000..e623eb6
+--- /dev/null
++++ b/build/pkgs/babel/distros/debian.txt
+@@ -0,0 +1 @@
++python3-babel
+diff --git a/build/pkgs/bleach/distros/debian.txt b/build/pkgs/bleach/distros/debian.txt
+new file mode 100644
+index 00000000..6d37c4c
+--- /dev/null
++++ b/build/pkgs/bleach/distros/debian.txt
+@@ -0,0 +1 @@
++python3-bleach
+diff --git a/build/pkgs/certifi/distros/debian.txt b/build/pkgs/certifi/distros/debian.txt
+new file mode 100644
+index 00000000..f585a82
+--- /dev/null
++++ b/build/pkgs/certifi/distros/debian.txt
+@@ -0,0 +1 @@
++python3-certifi
+diff --git a/build/pkgs/cvxopt/distros/debian.txt b/build/pkgs/cvxopt/distros/debian.txt
+new file mode 100644
+index 00000000..2bb6ad1
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/debian.txt
+@@ -0,0 +1 @@
++python3-cvxopt
+diff --git a/build/pkgs/decorator/distros/debian.txt b/build/pkgs/decorator/distros/debian.txt
+new file mode 100644
+index 00000000..46c478e
+--- /dev/null
++++ b/build/pkgs/decorator/distros/debian.txt
+@@ -0,0 +1 @@
++python3-decorator
+diff --git a/build/pkgs/html5lib/distros/debian.txt b/build/pkgs/html5lib/distros/debian.txt
+new file mode 100644
+index 00000000..6d7b8df
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/debian.txt
+@@ -0,0 +1 @@
++python3-html5lib
+diff --git a/build/pkgs/idna/distros/debian.txt b/build/pkgs/idna/distros/debian.txt
+new file mode 100644
+index 00000000..de48e70
+--- /dev/null
++++ b/build/pkgs/idna/distros/debian.txt
+@@ -0,0 +1 @@
++python3-idna
+diff --git a/build/pkgs/jinja2/distros/debian.txt b/build/pkgs/jinja2/distros/debian.txt
+new file mode 100644
+index 00000000..f2db865
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/debian.txt
+@@ -0,0 +1 @@
++python3-jinja2
+diff --git a/build/pkgs/matplotlib/distros/debian.txt b/build/pkgs/matplotlib/distros/debian.txt
+new file mode 100644
+index 00000000..1374329
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/debian.txt
+@@ -0,0 +1 @@
++python3-matplotlib
+diff --git a/build/pkgs/mpmath/distros/debian.txt b/build/pkgs/mpmath/distros/debian.txt
+new file mode 100644
+index 00000000..fbc82a9
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/debian.txt
+@@ -0,0 +1 @@
++python3-mpmath
+diff --git a/build/pkgs/networkx/distros/debian.txt b/build/pkgs/networkx/distros/debian.txt
+new file mode 100644
+index 00000000..6779066
+--- /dev/null
++++ b/build/pkgs/networkx/distros/debian.txt
+@@ -0,0 +1 @@
++python3-networkx
+diff --git a/build/pkgs/numpy/distros/debian.txt b/build/pkgs/numpy/distros/debian.txt
+new file mode 100644
+index 00000000..79d5c5a
+--- /dev/null
++++ b/build/pkgs/numpy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-numpy
+diff --git a/build/pkgs/packaging/distros/debian.txt b/build/pkgs/packaging/distros/debian.txt
+new file mode 100644
+index 00000000..8f1c0ff
+--- /dev/null
++++ b/build/pkgs/packaging/distros/debian.txt
+@@ -0,0 +1 @@
++python3-packaging
+diff --git a/build/pkgs/pandocfilters/distros/debian.txt b/build/pkgs/pandocfilters/distros/debian.txt
+new file mode 100644
+index 00000000..d0d4c24
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/debian.txt b/build/pkgs/pickleshare/distros/debian.txt
+new file mode 100644
+index 00000000..a00907d
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pickleshare
+diff --git a/build/pkgs/pillow/distros/debian.txt b/build/pkgs/pillow/distros/debian.txt
+new file mode 100644
+index 00000000..3319fcd
+--- /dev/null
++++ b/build/pkgs/pillow/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pillow
+diff --git a/build/pkgs/pluggy/distros/debian.txt b/build/pkgs/pluggy/distros/debian.txt
+new file mode 100644
+index 00000000..43a3acf
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pluggy
+diff --git a/build/pkgs/py/distros/debian.txt b/build/pkgs/py/distros/debian.txt
+new file mode 100644
+index 00000000..81fefe6
+--- /dev/null
++++ b/build/pkgs/py/distros/debian.txt
+@@ -0,0 +1 @@
++python3-py
+diff --git a/build/pkgs/pygments/distros/debian.txt b/build/pkgs/pygments/distros/debian.txt
+new file mode 100644
+index 00000000..3ab3792
+--- /dev/null
++++ b/build/pkgs/pygments/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pygments
+diff --git a/build/pkgs/pytz/distros/debian.txt b/build/pkgs/pytz/distros/debian.txt
+new file mode 100644
+index 00000000..db20908
+--- /dev/null
++++ b/build/pkgs/pytz/distros/debian.txt
+@@ -0,0 +1 @@
++python3-tz
+diff --git a/build/pkgs/requests/distros/debian.txt b/build/pkgs/requests/distros/debian.txt
+new file mode 100644
+index 00000000..43147b2
+--- /dev/null
++++ b/build/pkgs/requests/distros/debian.txt
+@@ -0,0 +1 @@
++python3-requests
+diff --git a/build/pkgs/scipy/distros/debian.txt b/build/pkgs/scipy/distros/debian.txt
+new file mode 100644
+index 00000000..12b3666
+--- /dev/null
++++ b/build/pkgs/scipy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-scipy
+diff --git a/build/pkgs/setuptools/distros/debian.txt b/build/pkgs/setuptools/distros/debian.txt
+new file mode 100644
+index 00000000..1c0901c
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/debian.txt
+@@ -0,0 +1 @@
++python3-setuptools
+diff --git a/build/pkgs/six/distros/debian.txt b/build/pkgs/six/distros/debian.txt
+new file mode 100644
+index 00000000..68ff859
+--- /dev/null
++++ b/build/pkgs/six/distros/debian.txt
+@@ -0,0 +1 @@
++python3-six
+diff --git a/build/pkgs/sympy/distros/debian.txt b/build/pkgs/sympy/distros/debian.txt
+new file mode 100644
+index 00000000..db423c8
+--- /dev/null
++++ b/build/pkgs/sympy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-sympy
+diff --git a/build/pkgs/texttable/distros/debian.txt b/build/pkgs/texttable/distros/debian.txt
+new file mode 100644
+index 00000000..8f8e7e2
+--- /dev/null
++++ b/build/pkgs/texttable/distros/debian.txt
+@@ -0,0 +1 @@
++python3-texttable
+diff --git a/build/pkgs/toml/distros/debian.txt b/build/pkgs/toml/distros/debian.txt
+new file mode 100644
+index 00000000..543e89d
+--- /dev/null
++++ b/build/pkgs/toml/distros/debian.txt
+@@ -0,0 +1 @@
++python3-toml
+diff --git a/build/pkgs/webencodings/distros/debian.txt b/build/pkgs/webencodings/distros/debian.txt
+new file mode 100644
+index 00000000..ac30c2f
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/debian.txt
+@@ -0,0 +1 @@
++python3-webencodings
+diff --git a/build/pkgs/wheel/distros/debian.txt b/build/pkgs/wheel/distros/debian.txt
+new file mode 100644
+index 00000000..3c066725
+--- /dev/null
++++ b/build/pkgs/wheel/distros/debian.txt
+@@ -0,0 +1 @@
++python3-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 93bf30d7de292551c3050e2dd74651d69ba4bd46 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 18 Oct 2021 07:50:34 -0400
+Subject: Trac #29665: add more documentation for SAGE_PYTHON_PACKAGE_CHECK().
+
+An earlier commit allows SAGE_PYTHON_PACKAGE_CHECK(package) to tweak the
+value of sage_use_system_$package if --enable-system-site-packages was
+not used. This essentially changes the default --with-system-$package=yes
+to "no" in that case. Here we update the documentation to reflect it.
+---
+ m4/sage_python_package_check.m4 | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 7ee82a7..95eefd0 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -34,6 +34,10 @@
+ #   ensure that the ./configure- and run-time views of the system
+ #   are as similar as possible.
+ #
++#   To avoid suggesting these system packages to users who have not
++#   set --enable-system-site-packages, this macro also changes the
++#   default for --with-system-foo from "yes" to "no" in that case.
++#
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
+-- 
+cgit v1.0-1-gd88e
+
+
+From d771e49d57ecdf3622434bc09cbfb87ad3bb7744 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 18 Oct 2021 07:42:46 -0400
+Subject: Trac #29665: improve SAGE_PYTHON_PACKAGE_CHECK() failure message.
+
+When --enable-system-site-packages is off, SAGE_PYTHON_PACKAGE_CHECK()
+will always install the corresponding SPKG. We improve the ./configure
+output in that case to make it clear that the decision was based on
+the value of --enable-system-site-packages and not the "real" check.
+---
+ m4/sage_python_package_check.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 95eefd0..5f0f084 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -40,7 +40,9 @@
+ #
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
++  AC_MSG_CHECKING([if --enable-system-site-packages was used])
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
++    AC_MSG_RESULT(yes)
+     AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
+ 
+     dnl We run this check inside a python venv, because that's ultimately
+@@ -94,6 +96,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
+     dnl System site packages are disabled.
++    AC_MSG_RESULT(no; skipping check)
+     sage_spkg_install_$1=yes
+ 
+     dnl We have to retroactively hack the --with-system-foo={no,yes,force}
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5bb43c1b78a1deb3364f235305937c2f823e5e18 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 24 Oct 2021 20:29:25 -0400
+Subject: Trac #29665: use sage-venv in SAGE_PYTHON_PACKAGE_CHECK().
+
+For consistency with the rest of the build system, we now use the
+build/bin/sage-venv script to create the venv in this autoconf macro
+rather than invoking $PYTHON_FOR_VENV with "-m venv" directly.
+---
+ m4/sage_python_package_check.m4 | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 5f0f084..5547b35 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -50,11 +50,11 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AC_MSG_CHECKING([if we can create a python venv in config.venv])
+ 
+     dnl Use --clear because ./configure typically clobbers its output files.
+-    AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
+-                                        --clear                dnl
+-                                        --without-pip          dnl
+-                                        config.venv            dnl
+-                                        2>&AS_MESSAGE_LOG_FD], [
++    AS_IF(["${PYTHON_FOR_VENV}" build/bin/sage-venv      dnl
++                                  --system-site-packages dnl
++                                  --clear                dnl
++                                  config.venv            dnl
++                                  2>&AS_MESSAGE_LOG_FD], [
+       AC_MSG_RESULT(yes)
+       dnl strip all comments from install-requires.txt; this should leave
+       dnl only a single line containing the version specification for this
+-- 
+cgit v1.0-1-gd88e
+
+
+From c78363d6326addff16ca5abac897949a6be72bf4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:10:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for urllib3.
+
+---
+ build/pkgs/urllib3/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/urllib3/spkg-configure.m4
+
+diff --git a/build/pkgs/urllib3/spkg-configure.m4 b/build/pkgs/urllib3/spkg-configure.m4
+new file mode 100644
+index 00000000..d7ef3e1
+--- /dev/null
++++ b/build/pkgs/urllib3/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([urllib3], [SAGE_PYTHON_PACKAGE_CHECK([urllib3])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f416d5abcae495ea8301fad024b279ea9e997b29 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:15:18 -0400
+Subject: Trac #29665: add Gentoo package information for urllib3.
+
+---
+ build/pkgs/urllib3/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/urllib3/distros/gentoo.txt
+
+diff --git a/build/pkgs/urllib3/distros/gentoo.txt b/build/pkgs/urllib3/distros/gentoo.txt
+new file mode 100644
+index 00000000..172a535
+--- /dev/null
++++ b/build/pkgs/urllib3/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/urllib3
+-- 
+cgit v1.0-1-gd88e
+
+
+From 852068b992bf7959500c650f54cb92e5b68d7ef8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:15:58 -0400
+Subject: Trac #29665: add Gentoo package information for nbformat.
+
+---
+ build/pkgs/nbformat/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbformat/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbformat/distros/gentoo.txt b/build/pkgs/nbformat/distros/gentoo.txt
+new file mode 100644
+index 00000000..006b1f2
+--- /dev/null
++++ b/build/pkgs/nbformat/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbformat
+-- 
+cgit v1.0-1-gd88e
+
+
+From 66179fd28fcc92ee840dcd87bb4db25cea968d66 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:34:16 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for nbformat.
+
+---
+ build/pkgs/nbformat/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbformat/spkg-configure.m4
+
+diff --git a/build/pkgs/nbformat/spkg-configure.m4 b/build/pkgs/nbformat/spkg-configure.m4
+new file mode 100644
+index 00000000..5a7f8c4
+--- /dev/null
++++ b/build/pkgs/nbformat/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbformat], [SAGE_PYTHON_PACKAGE_CHECK([nbformat])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 874005e81ed20f27a5f895030dcdbdfc5f73ad80 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:47:01 -0400
+Subject: Trac #29665: add Gentoo package information for zipp.
+
+---
+ build/pkgs/zipp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/zipp/distros/gentoo.txt
+
+diff --git a/build/pkgs/zipp/distros/gentoo.txt b/build/pkgs/zipp/distros/gentoo.txt
+new file mode 100644
+index 00000000..7f59450
+--- /dev/null
++++ b/build/pkgs/zipp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/zipp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0cc2a7355b5554c1fb79c742ebf02eff54465b3e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:47:35 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for zipp.
+
+---
+ build/pkgs/zipp/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/zipp/spkg-configure.m4
+
+diff --git a/build/pkgs/zipp/spkg-configure.m4 b/build/pkgs/zipp/spkg-configure.m4
+new file mode 100644
+index 00000000..0fe3a9c
+--- /dev/null
++++ b/build/pkgs/zipp/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([zipp], [SAGE_PYTHON_PACKAGE_CHECK([zipp])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6073ad8e56c21fc862749bbd84a56d543fb9458c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:48:37 -0400
+Subject: Trac #29665: add Gentoo package information for wcwidth.
+
+---
+ build/pkgs/wcwidth/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wcwidth/distros/gentoo.txt
+
+diff --git a/build/pkgs/wcwidth/distros/gentoo.txt b/build/pkgs/wcwidth/distros/gentoo.txt
+new file mode 100644
+index 00000000..edeb80b
+--- /dev/null
++++ b/build/pkgs/wcwidth/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/wcwidth
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9793d6172c64d61a015fbe61bd45863759124fad Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:51:10 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for wcwidth.
+
+---
+ build/pkgs/wcwidth/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wcwidth/spkg-configure.m4
+
+diff --git a/build/pkgs/wcwidth/spkg-configure.m4 b/build/pkgs/wcwidth/spkg-configure.m4
+new file mode 100644
+index 00000000..5bde15a
+--- /dev/null
++++ b/build/pkgs/wcwidth/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([wcwidth], [SAGE_PYTHON_PACKAGE_CHECK([wcwidth])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20232f370a43c146ca4e696c72a2cbcc498db060 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:52:36 -0400
+Subject: Trac #29665: add Gentoo package information for testpath.
+
+---
+ build/pkgs/testpath/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/testpath/distros/gentoo.txt
+
+diff --git a/build/pkgs/testpath/distros/gentoo.txt b/build/pkgs/testpath/distros/gentoo.txt
+new file mode 100644
+index 00000000..efa10a0
+--- /dev/null
++++ b/build/pkgs/testpath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/testpath
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1b0785b2aad8844e74345fe950baf097e2b43d24 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:55:22 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for testpath.
+
+---
+ build/pkgs/testpath/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/testpath/spkg-configure.m4
+
+diff --git a/build/pkgs/testpath/spkg-configure.m4 b/build/pkgs/testpath/spkg-configure.m4
+new file mode 100644
+index 00000000..d8fc2a7
+--- /dev/null
++++ b/build/pkgs/testpath/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([testpath], [SAGE_PYTHON_PACKAGE_CHECK([testpath])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 10fc3829ecd956d732b1b069fdfe81f0d6d5cdc2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:56:06 -0400
+Subject: Trac #29665: add Gentoo package information for jedi.
+
+---
+ build/pkgs/jedi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jedi/distros/gentoo.txt
+
+diff --git a/build/pkgs/jedi/distros/gentoo.txt b/build/pkgs/jedi/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c85a46
+--- /dev/null
++++ b/build/pkgs/jedi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jedi
+-- 
+cgit v1.0-1-gd88e
+
+
+From a75824d74c281c7639028ca01dabeed266f56998 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:06:37 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for jedi.
+
+---
+ build/pkgs/jedi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jedi/spkg-configure.m4
+
+diff --git a/build/pkgs/jedi/spkg-configure.m4 b/build/pkgs/jedi/spkg-configure.m4
+new file mode 100644
+index 00000000..a37dbcc
+--- /dev/null
++++ b/build/pkgs/jedi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jedi], [SAGE_PYTHON_PACKAGE_CHECK([jedi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 17af01373d43f6acbbdbc23e073e372d3fdadf8b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:07:47 -0400
+Subject: Trac #29665: add Gentoo package information for tomli.
+
+---
+ build/pkgs/tomli/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tomli/distros/gentoo.txt
+
+diff --git a/build/pkgs/tomli/distros/gentoo.txt b/build/pkgs/tomli/distros/gentoo.txt
+new file mode 100644
+index 00000000..0458e25
+--- /dev/null
++++ b/build/pkgs/tomli/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/tomli
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0d3b5994ae612be11992467c4a3f1a74b81400fe Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:08:12 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for tomli.
+
+---
+ build/pkgs/tomli/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tomli/spkg-configure.m4
+
+diff --git a/build/pkgs/tomli/spkg-configure.m4 b/build/pkgs/tomli/spkg-configure.m4
+new file mode 100644
+index 00000000..95a8b8b
+--- /dev/null
++++ b/build/pkgs/tomli/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tomli], [SAGE_PYTHON_PACKAGE_CHECK([tomli])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From dce1c515781b0eeb8eb9c2bc7aba581560c1fac1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:09:22 -0400
+Subject: Trac #29665: add Gentoo package information for defusedxml.
+
+---
+ build/pkgs/defusedxml/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/defusedxml/distros/gentoo.txt
+
+diff --git a/build/pkgs/defusedxml/distros/gentoo.txt b/build/pkgs/defusedxml/distros/gentoo.txt
+new file mode 100644
+index 00000000..2804214
+--- /dev/null
++++ b/build/pkgs/defusedxml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/defusedxml
+-- 
+cgit v1.0-1-gd88e
+
+
+From 02e1e1cd7f8bdae3ca5b7d35ce70af28a44e9b7c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:11:14 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for defusedxml.
+
+---
+ build/pkgs/defusedxml/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/defusedxml/spkg-configure.m4
+
+diff --git a/build/pkgs/defusedxml/spkg-configure.m4 b/build/pkgs/defusedxml/spkg-configure.m4
+new file mode 100644
+index 00000000..e02f345
+--- /dev/null
++++ b/build/pkgs/defusedxml/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([defusedxml], [SAGE_PYTHON_PACKAGE_CHECK([defusedxml])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e0ba4ebb5cfc637b5d26b85de9f34e0a160d2b9c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:12:22 -0400
+Subject: Trac #29665: add Gentoo package information for ipywidgets.
+
+---
+ build/pkgs/ipywidgets/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipywidgets/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipywidgets/distros/gentoo.txt b/build/pkgs/ipywidgets/distros/gentoo.txt
+new file mode 100644
+index 00000000..7c76967
+--- /dev/null
++++ b/build/pkgs/ipywidgets/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipywidgets
+-- 
+cgit v1.0-1-gd88e
+
+
+From 49df7e7d93c7a31b7c46d5d224a35fd313a29a32 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:15:53 -0400
+Subject: Trac #29665: add Gentoo package information for simplegeneric.
+
+---
+ build/pkgs/simplegeneric/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/simplegeneric/distros/gentoo.txt
+
+diff --git a/build/pkgs/simplegeneric/distros/gentoo.txt b/build/pkgs/simplegeneric/distros/gentoo.txt
+new file mode 100644
+index 00000000..a86e90d
+--- /dev/null
++++ b/build/pkgs/simplegeneric/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/simplegeneric
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2a893635d5804749e6fec7ed7289c921ecb5300a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:16:33 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for simplegeneric.
+
+---
+ build/pkgs/simplegeneric/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/simplegeneric/spkg-configure.m4
+
+diff --git a/build/pkgs/simplegeneric/spkg-configure.m4 b/build/pkgs/simplegeneric/spkg-configure.m4
+new file mode 100644
+index 00000000..13715ab
+--- /dev/null
++++ b/build/pkgs/simplegeneric/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([simplegeneric], [SAGE_PYTHON_PACKAGE_CHECK([simplegeneric])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a8fe7ecd6e3163e7d01261e5497ac452a8cc95ab Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:17:18 -0400
+Subject: Trac #29665: add Gentoo package information for imagesize.
+
+---
+ build/pkgs/imagesize/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/imagesize/distros/gentoo.txt
+
+diff --git a/build/pkgs/imagesize/distros/gentoo.txt b/build/pkgs/imagesize/distros/gentoo.txt
+new file mode 100644
+index 00000000..54350ba
+--- /dev/null
++++ b/build/pkgs/imagesize/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/imagesize
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2ad837c5dd1fca0f50ce6d5042a9344210a54f84 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:17:48 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for imagesize.
+
+---
+ build/pkgs/imagesize/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/imagesize/spkg-configure.m4
+
+diff --git a/build/pkgs/imagesize/spkg-configure.m4 b/build/pkgs/imagesize/spkg-configure.m4
+new file mode 100644
+index 00000000..20210ef
+--- /dev/null
++++ b/build/pkgs/imagesize/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([imagesize], [SAGE_PYTHON_PACKAGE_CHECK([imagesize])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bf47415b5bfca2d7bf24e20de35662bf331623b9 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:18:49 -0400
+Subject: Trac #29665: add Gentoo package information for mistune.
+
+---
+ build/pkgs/mistune/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mistune/distros/gentoo.txt
+
+diff --git a/build/pkgs/mistune/distros/gentoo.txt b/build/pkgs/mistune/distros/gentoo.txt
+new file mode 100644
+index 00000000..56f0a4e
+--- /dev/null
++++ b/build/pkgs/mistune/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/mistune
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6898a74fd0c65a40c5220ba68b4062ac6fe060c6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:21:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for mistune.
+
+---
+ build/pkgs/mistune/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mistune/spkg-configure.m4
+
+diff --git a/build/pkgs/mistune/spkg-configure.m4 b/build/pkgs/mistune/spkg-configure.m4
+new file mode 100644
+index 00000000..972f33d
+--- /dev/null
++++ b/build/pkgs/mistune/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([mistune], [SAGE_PYTHON_PACKAGE_CHECK([mistune])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 62735e4ccf2031cd39eb5e04b03bdfd97005d808 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:22:48 -0400
+Subject: Trac #29665: add Gentoo package information for backcall.
+
+---
+ build/pkgs/backcall/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/backcall/distros/gentoo.txt
+
+diff --git a/build/pkgs/backcall/distros/gentoo.txt b/build/pkgs/backcall/distros/gentoo.txt
+new file mode 100644
+index 00000000..266a222
+--- /dev/null
++++ b/build/pkgs/backcall/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/backcall
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9ef3ea42d4a33c7cdb623fa5417ae300cf323183 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:25:10 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for backcall.
+
+---
+ build/pkgs/backcall/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/backcall/spkg-configure.m4
+
+diff --git a/build/pkgs/backcall/spkg-configure.m4 b/build/pkgs/backcall/spkg-configure.m4
+new file mode 100644
+index 00000000..d6b11c4
+--- /dev/null
++++ b/build/pkgs/backcall/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([backcall], [SAGE_PYTHON_PACKAGE_CHECK([backcall])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1b3ea2a3c40fea0fb58435f5e5304368ea58dff8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:25:58 -0400
+Subject: Trac #29665: add Gentoo package information for parso.
+
+---
+ build/pkgs/parso/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/parso/distros/gentoo.txt
+
+diff --git a/build/pkgs/parso/distros/gentoo.txt b/build/pkgs/parso/distros/gentoo.txt
+new file mode 100644
+index 00000000..f9ce4c7
+--- /dev/null
++++ b/build/pkgs/parso/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/parso
+-- 
+cgit v1.0-1-gd88e
+
+
+From 963a3a2c563ec71a1f5be2395722d0e824cb0b11 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:26:22 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for parso.
+
+---
+ build/pkgs/parso/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/parso/spkg-configure.m4
+
+diff --git a/build/pkgs/parso/spkg-configure.m4 b/build/pkgs/parso/spkg-configure.m4
+new file mode 100644
+index 00000000..1ca6f1b
+--- /dev/null
++++ b/build/pkgs/parso/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([parso], [SAGE_PYTHON_PACKAGE_CHECK([parso])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 943053dfc474b6549bcc7d6ef2971ea43588b35c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:27:00 -0400
+Subject: Trac #29665: add Gentoo package information for pyparsing.
+
+---
+ build/pkgs/pyparsing/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyparsing/distros/gentoo.txt
+
+diff --git a/build/pkgs/pyparsing/distros/gentoo.txt b/build/pkgs/pyparsing/distros/gentoo.txt
+new file mode 100644
+index 00000000..ef0419f
+--- /dev/null
++++ b/build/pkgs/pyparsing/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyparsing
+-- 
+cgit v1.0-1-gd88e
+
+
+From bd682eaa2ac41dd84e7a52e2b0c5442fc8fd8919 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:27:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pyparsing.
+
+---
+ build/pkgs/pyparsing/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyparsing/spkg-configure.m4
+
+diff --git a/build/pkgs/pyparsing/spkg-configure.m4 b/build/pkgs/pyparsing/spkg-configure.m4
+new file mode 100644
+index 00000000..d2b4c00
+--- /dev/null
++++ b/build/pkgs/pyparsing/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pyparsing], [SAGE_PYTHON_PACKAGE_CHECK([pyparsing])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 74f36a9c0ec7c63b7e6c40066e42f4b15c2f978e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:17:42 -0400
+Subject: Trac #29665: add Gentoo package information for debugpy.
+
+---
+ build/pkgs/debugpy/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/debugpy/distros/gentoo.txt
+
+diff --git a/build/pkgs/debugpy/distros/gentoo.txt b/build/pkgs/debugpy/distros/gentoo.txt
+new file mode 100644
+index 00000000..8b797ce
+--- /dev/null
++++ b/build/pkgs/debugpy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/debugpy
+-- 
+cgit v1.0-1-gd88e
+
+
+From be072fa87ac5c373d9dc9b54c0bd68734d5709bc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:21:17 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for debugpy.
+
+---
+ build/pkgs/debugpy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/debugpy/spkg-configure.m4
+
+diff --git a/build/pkgs/debugpy/spkg-configure.m4 b/build/pkgs/debugpy/spkg-configure.m4
+new file mode 100644
+index 00000000..db605ff
+--- /dev/null
++++ b/build/pkgs/debugpy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([debugpy], [SAGE_PYTHON_PACKAGE_CHECK([debugpy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6f777ce2f2e14b94e91c8b7bbac82f9017460aba Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:23:56 -0400
+Subject: Trac #29665: add Gentoo package information for tzlocal.
+
+---
+ build/pkgs/tzlocal/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tzlocal/distros/gentoo.txt
+
+diff --git a/build/pkgs/tzlocal/distros/gentoo.txt b/build/pkgs/tzlocal/distros/gentoo.txt
+new file mode 100644
+index 00000000..2018442
+--- /dev/null
++++ b/build/pkgs/tzlocal/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/tzlocal
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3bd078fc15ae13982249452711baafae91038191 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:24:51 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for tzlocal.
+
+---
+ build/pkgs/tzlocal/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tzlocal/spkg-configure.m4
+
+diff --git a/build/pkgs/tzlocal/spkg-configure.m4 b/build/pkgs/tzlocal/spkg-configure.m4
+new file mode 100644
+index 00000000..e020b28
+--- /dev/null
++++ b/build/pkgs/tzlocal/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tzlocal], [SAGE_PYTHON_PACKAGE_CHECK([tzlocal])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 91b0882fc62214923da9ee7b6dccb05d8a1d11d1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:26:13 -0400
+Subject: Trac #29665: add Gentoo package information for pycparser.
+
+---
+ build/pkgs/pycparser/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pycparser/distros/gentoo.txt
+
+diff --git a/build/pkgs/pycparser/distros/gentoo.txt b/build/pkgs/pycparser/distros/gentoo.txt
+new file mode 100644
+index 00000000..5e87307
+--- /dev/null
++++ b/build/pkgs/pycparser/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pycparser
+-- 
+cgit v1.0-1-gd88e
+
+
+From beabde92fe6e057faf516fe82d27f1e903e55ce6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:27:27 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pycparser.
+
+---
+ build/pkgs/pycparser/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pycparser/spkg-configure.m4
+
+diff --git a/build/pkgs/pycparser/spkg-configure.m4 b/build/pkgs/pycparser/spkg-configure.m4
+new file mode 100644
+index 00000000..4b9b900
+--- /dev/null
++++ b/build/pkgs/pycparser/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pycparser], [SAGE_PYTHON_PACKAGE_CHECK([pycparser])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 86c2788dc7fd1169314e9598c91fa81045553677 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:29:36 -0400
+Subject: Trac #29665: add Gentoo package information for cycler.
+
+---
+ build/pkgs/cycler/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cycler/distros/gentoo.txt
+
+diff --git a/build/pkgs/cycler/distros/gentoo.txt b/build/pkgs/cycler/distros/gentoo.txt
+new file mode 100644
+index 00000000..4b21543
+--- /dev/null
++++ b/build/pkgs/cycler/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/cycler
+-- 
+cgit v1.0-1-gd88e
+
+
+From 67c5a944101ddf329f0a61c61d4e784f58a5c5b0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:30:27 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for cycler.
+
+---
+ build/pkgs/cycler/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cycler/spkg-configure.m4
+
+diff --git a/build/pkgs/cycler/spkg-configure.m4 b/build/pkgs/cycler/spkg-configure.m4
+new file mode 100644
+index 00000000..239571a
+--- /dev/null
++++ b/build/pkgs/cycler/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([cycler], [SAGE_PYTHON_PACKAGE_CHECK([cycler])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ef6d490251abfa41f7a0910274700a8a6a65f629 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:31:19 -0400
+Subject: Trac #29665: add Gentoo package information for traitlets.
+
+---
+ build/pkgs/traitlets/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/traitlets/distros/gentoo.txt
+
+diff --git a/build/pkgs/traitlets/distros/gentoo.txt b/build/pkgs/traitlets/distros/gentoo.txt
+new file mode 100644
+index 00000000..46bfaab
+--- /dev/null
++++ b/build/pkgs/traitlets/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/traitlets
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1f922b458d34088d9f6773312209e69f19ee45dc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:31:50 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for traitlets.
+
+---
+ build/pkgs/traitlets/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/traitlets/spkg-configure.m4
+
+diff --git a/build/pkgs/traitlets/spkg-configure.m4 b/build/pkgs/traitlets/spkg-configure.m4
+new file mode 100644
+index 00000000..df2382b
+--- /dev/null
++++ b/build/pkgs/traitlets/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([traitlets], [SAGE_PYTHON_PACKAGE_CHECK([traitlets])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 95b89a9ced0acb6d971a27fa63b97ea58a11f4e1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:33:35 -0400
+Subject: Trac #29665: add Gentoo package information for argcomplete.
+
+---
+ build/pkgs/argcomplete/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argcomplete/distros/gentoo.txt
+
+diff --git a/build/pkgs/argcomplete/distros/gentoo.txt b/build/pkgs/argcomplete/distros/gentoo.txt
+new file mode 100644
+index 00000000..b150949
+--- /dev/null
++++ b/build/pkgs/argcomplete/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/argcomplete
+-- 
+cgit v1.0-1-gd88e
+
+
+From b4cd8ef384e6e5bae0de0f3c113fb5f9e6e1a71e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:34:14 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for argcomplete.
+
+---
+ build/pkgs/argcomplete/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argcomplete/spkg-configure.m4
+
+diff --git a/build/pkgs/argcomplete/spkg-configure.m4 b/build/pkgs/argcomplete/spkg-configure.m4
+new file mode 100644
+index 00000000..cbd7ccf
+--- /dev/null
++++ b/build/pkgs/argcomplete/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([argcomplete], [SAGE_PYTHON_PACKAGE_CHECK([argcomplete])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4cc610e8331970cc018d7ea87af928fa73a292c1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:36:21 -0400
+Subject: Trac #29665: add Gentoo package information for ptyprocess.
+
+---
+ build/pkgs/ptyprocess/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ptyprocess/distros/gentoo.txt
+
+diff --git a/build/pkgs/ptyprocess/distros/gentoo.txt b/build/pkgs/ptyprocess/distros/gentoo.txt
+new file mode 100644
+index 00000000..571a851
+--- /dev/null
++++ b/build/pkgs/ptyprocess/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ptyprocess
+-- 
+cgit v1.0-1-gd88e
+
+
+From cd15f97221bf5933b07900e4f77cb55401eede26 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:37:02 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ptyprocess.
+
+---
+ build/pkgs/ptyprocess/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ptyprocess/spkg-configure.m4
+
+diff --git a/build/pkgs/ptyprocess/spkg-configure.m4 b/build/pkgs/ptyprocess/spkg-configure.m4
+new file mode 100644
+index 00000000..bfacbae
+--- /dev/null
++++ b/build/pkgs/ptyprocess/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ptyprocess], [SAGE_PYTHON_PACKAGE_CHECK([ptyprocess])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb5f45b15f99e4ba28e1b1f6042a0e8ea17f1dfc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:38:22 -0400
+Subject: Trac #29665: add Gentoo package information for attrs.
+
+---
+ build/pkgs/attrs/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/attrs/distros/gentoo.txt
+
+diff --git a/build/pkgs/attrs/distros/gentoo.txt b/build/pkgs/attrs/distros/gentoo.txt
+new file mode 100644
+index 00000000..3b906fa
+--- /dev/null
++++ b/build/pkgs/attrs/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/attrs
+-- 
+cgit v1.0-1-gd88e
+
+
+From 321707ebf8e9af1e4ac3a5b5b094b4226bb3a7a5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:38:55 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for attrs.
+
+---
+ build/pkgs/attrs/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/attrs/spkg-configure.m4
+
+diff --git a/build/pkgs/attrs/spkg-configure.m4 b/build/pkgs/attrs/spkg-configure.m4
+new file mode 100644
+index 00000000..ba6a9b7
+--- /dev/null
++++ b/build/pkgs/attrs/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([attrs], [SAGE_PYTHON_PACKAGE_CHECK([attrs])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 69a498a4e8854ecdfc2f1a134104983c0dcb9e32 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:40:09 -0400
+Subject: Trac #29665: add Gentoo package information for send2trash.
+
+---
+ build/pkgs/send2trash/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/send2trash/distros/gentoo.txt
+
+diff --git a/build/pkgs/send2trash/distros/gentoo.txt b/build/pkgs/send2trash/distros/gentoo.txt
+new file mode 100644
+index 00000000..a89b179
+--- /dev/null
++++ b/build/pkgs/send2trash/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/send2trash
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9baed17c84e1bdf5abd17c20766e5cd7dddc5b53 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:41:45 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for send2trash.
+
+---
+ build/pkgs/send2trash/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/send2trash/spkg-configure.m4
+
+diff --git a/build/pkgs/send2trash/spkg-configure.m4 b/build/pkgs/send2trash/spkg-configure.m4
+new file mode 100644
+index 00000000..3bbb727
+--- /dev/null
++++ b/build/pkgs/send2trash/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([send2trash], [SAGE_PYTHON_PACKAGE_CHECK([send2trash])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b9b552b2a2aaccaeb7c5b25be0b681f107522d09 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:43:27 -0400
+Subject: Trac #29665: add Gentoo package information for pyrsistent.
+
+---
+ build/pkgs/pyrsistent/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyrsistent/distros/gentoo.txt
+
+diff --git a/build/pkgs/pyrsistent/distros/gentoo.txt b/build/pkgs/pyrsistent/distros/gentoo.txt
+new file mode 100644
+index 00000000..83439ce
+--- /dev/null
++++ b/build/pkgs/pyrsistent/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyrsistent
+-- 
+cgit v1.0-1-gd88e
+
+
+From a17b31fac6104852762f57daa749443147bdf121 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:44:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pyrsistent.
+
+---
+ build/pkgs/pyrsistent/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyrsistent/spkg-configure.m4
+
+diff --git a/build/pkgs/pyrsistent/spkg-configure.m4 b/build/pkgs/pyrsistent/spkg-configure.m4
+new file mode 100644
+index 00000000..f7ca75d
+--- /dev/null
++++ b/build/pkgs/pyrsistent/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pyrsistent], [SAGE_PYTHON_PACKAGE_CHECK([pyrsistent])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 68520decad6d6937918d7a6af65ca5bd476e5d02 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:45:45 -0400
+Subject: Trac #29665: add Gentoo package information for entrypoints.
+
+---
+ build/pkgs/entrypoints/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/entrypoints/distros/gentoo.txt
+
+diff --git a/build/pkgs/entrypoints/distros/gentoo.txt b/build/pkgs/entrypoints/distros/gentoo.txt
+new file mode 100644
+index 00000000..684ddd0
+--- /dev/null
++++ b/build/pkgs/entrypoints/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/entrypoints
+-- 
+cgit v1.0-1-gd88e
+
+
+From 34213eccb642a6bad64d89acaefa83ee702cb483 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:46:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for entrypoints.
+
+---
+ build/pkgs/entrypoints/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/entrypoints/spkg-configure.m4
+
+diff --git a/build/pkgs/entrypoints/spkg-configure.m4 b/build/pkgs/entrypoints/spkg-configure.m4
+new file mode 100644
+index 00000000..caed658
+--- /dev/null
++++ b/build/pkgs/entrypoints/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([entrypoints], [SAGE_PYTHON_PACKAGE_CHECK([entrypoints])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8e985614345da1a58fcdc127a9c0ddd790f9b5d2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:48:26 -0400
+Subject: Trac #29665: add Gentoo package information for markupsafe.
+
+---
+ build/pkgs/markupsafe/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/markupsafe/distros/gentoo.txt
+
+diff --git a/build/pkgs/markupsafe/distros/gentoo.txt b/build/pkgs/markupsafe/distros/gentoo.txt
+new file mode 100644
+index 00000000..9654e35
+--- /dev/null
++++ b/build/pkgs/markupsafe/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/markupsafe
+-- 
+cgit v1.0-1-gd88e
+
+
+From d370f229ae0988856f2e0d1f6ee2df2c47169106 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:48:55 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for markupsafe.
+
+---
+ build/pkgs/markupsafe/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/markupsafe/spkg-configure.m4
+
+diff --git a/build/pkgs/markupsafe/spkg-configure.m4 b/build/pkgs/markupsafe/spkg-configure.m4
+new file mode 100644
+index 00000000..79eb8db
+--- /dev/null
++++ b/build/pkgs/markupsafe/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([markupsafe], [SAGE_PYTHON_PACKAGE_CHECK([markupsafe])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c49b285ad9e25e6bc81a7e75d461d234fdd3ea68 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:30:49 -0400
+Subject: Trac #29665: add Gentoo package information for flit_core.
+
+---
+ build/pkgs/flit_core/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/flit_core/distros/gentoo.txt
+
+diff --git a/build/pkgs/flit_core/distros/gentoo.txt b/build/pkgs/flit_core/distros/gentoo.txt
+new file mode 100644
+index 00000000..fe6bea9
+--- /dev/null
++++ b/build/pkgs/flit_core/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/flit_core
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b0ce1c4f23cd9fc4316e1eb2b9b4bde394957f3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:32:11 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for flit_core.
+
+---
+ build/pkgs/flit_core/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/flit_core/spkg-configure.m4
+
+diff --git a/build/pkgs/flit_core/spkg-configure.m4 b/build/pkgs/flit_core/spkg-configure.m4
+new file mode 100644
+index 00000000..ee67557
+--- /dev/null
++++ b/build/pkgs/flit_core/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([flit_core], [SAGE_PYTHON_PACKAGE_CHECK([flit_core])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f006c231a81428b1e1e792f889bf974f90e3c831 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:34:06 -0400
+Subject: Trac #29665: add Gentoo package information for nest_asyncio.
+
+---
+ build/pkgs/nest_asyncio/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nest_asyncio/distros/gentoo.txt
+
+diff --git a/build/pkgs/nest_asyncio/distros/gentoo.txt b/build/pkgs/nest_asyncio/distros/gentoo.txt
+new file mode 100644
+index 00000000..ab742d2
+--- /dev/null
++++ b/build/pkgs/nest_asyncio/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nest_asyncio
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4a58d0a96a84475e765a01a64f5f44c48a317e0b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:34:43 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for nest_asyncio.
+
+---
+ build/pkgs/nest_asyncio/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nest_asyncio/spkg-configure.m4
+
+diff --git a/build/pkgs/nest_asyncio/spkg-configure.m4 b/build/pkgs/nest_asyncio/spkg-configure.m4
+new file mode 100644
+index 00000000..4d81527
+--- /dev/null
++++ b/build/pkgs/nest_asyncio/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nest_asyncio], [SAGE_PYTHON_PACKAGE_CHECK([nest_asyncio])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e50af937777ea778908bc09a7a79db3dd80fdf25 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:37:02 -0400
+Subject: Trac #29665: add Gentoo package information for ipython_genutils.
+
+---
+ build/pkgs/ipython_genutils/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython_genutils/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipython_genutils/distros/gentoo.txt b/build/pkgs/ipython_genutils/distros/gentoo.txt
+new file mode 100644
+index 00000000..01bc49d
+--- /dev/null
++++ b/build/pkgs/ipython_genutils/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipython_genutils
+-- 
+cgit v1.0-1-gd88e
+
+
+From ec3c0ce9db2ba13c1a49d1bcfb7a4b249cb7ae83 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:39:20 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipython_genutils.
+
+---
+ build/pkgs/ipython_genutils/spkg-configure.m4 | 4 ++++
+ 1 file changed, 4 insertions(+)
+ create mode 100644 build/pkgs/ipython_genutils/spkg-configure.m4
+
+diff --git a/build/pkgs/ipython_genutils/spkg-configure.m4 b/build/pkgs/ipython_genutils/spkg-configure.m4
+new file mode 100644
+index 00000000..b0ba86a
+--- /dev/null
++++ b/build/pkgs/ipython_genutils/spkg-configure.m4
+@@ -0,0 +1,4 @@
++SAGE_SPKG_CONFIGURE(
++  [ipython_genutils],
++  [SAGE_PYTHON_PACKAGE_CHECK([ipython_genutils])]
++)
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5c9e2e265115e5f10d4b459a475467e30b4bddde Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:40:03 -0400
+Subject: Trac #29665: add Gentoo package information for ipython.
+
+---
+ build/pkgs/ipython/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipython/distros/gentoo.txt b/build/pkgs/ipython/distros/gentoo.txt
+new file mode 100644
+index 00000000..8b76f18
+--- /dev/null
++++ b/build/pkgs/ipython/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipython
+-- 
+cgit v1.0-1-gd88e
+
+
+From 621e707ddd040a902d7dddf0bed1de2b54ab22f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 07:37:56 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipython.
+
+---
+ build/pkgs/ipython/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython/spkg-configure.m4
+
+diff --git a/build/pkgs/ipython/spkg-configure.m4 b/build/pkgs/ipython/spkg-configure.m4
+new file mode 100644
+index 00000000..02ab89f
+--- /dev/null
++++ b/build/pkgs/ipython/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipython], [SAGE_PYTHON_PACKAGE_CHECK([ipython])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20a0613f6d441da436f3e7b8047a72bf490882bd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 07:51:11 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipywidgets.
+
+---
+ build/pkgs/ipywidgets/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipywidgets/spkg-configure.m4
+
+diff --git a/build/pkgs/ipywidgets/spkg-configure.m4 b/build/pkgs/ipywidgets/spkg-configure.m4
+new file mode 100644
+index 00000000..51ca9be
+--- /dev/null
++++ b/build/pkgs/ipywidgets/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipywidgets], [SAGE_PYTHON_PACKAGE_CHECK([ipywidgets])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 76bcd386633acc02a1a3026339d0cbd258ada04e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 10:05:16 -0400
+Subject: Trac #29665: add Gentoo package information for wheel.
+
+---
+ build/pkgs/wheel/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wheel/distros/gentoo.txt
+
+diff --git a/build/pkgs/wheel/distros/gentoo.txt b/build/pkgs/wheel/distros/gentoo.txt
+new file mode 100644
+index 00000000..ec571d5
+--- /dev/null
++++ b/build/pkgs/wheel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 96c2dd2ca7812f5333bb9d45eadb7ac408e364ce Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:51:44 -0500
+Subject: Trac #29665: add Gentoo package information for terminado.
+
+---
+ build/pkgs/terminado/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/terminado/distros/gentoo.txt
+
+diff --git a/build/pkgs/terminado/distros/gentoo.txt b/build/pkgs/terminado/distros/gentoo.txt
+new file mode 100644
+index 00000000..1df16f1
+--- /dev/null
++++ b/build/pkgs/terminado/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/terminado
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0de0f5f3d235a4339b21e37ea13c9f5e59a82e59 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:52:35 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for terminado.
+
+---
+ build/pkgs/terminado/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/terminado/spkg-configure.m4
+
+diff --git a/build/pkgs/terminado/spkg-configure.m4 b/build/pkgs/terminado/spkg-configure.m4
+new file mode 100644
+index 00000000..5defc2f
+--- /dev/null
++++ b/build/pkgs/terminado/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([terminado], [SAGE_PYTHON_PACKAGE_CHECK([terminado])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d14a745c770b02822557e7cee0a98de1cb2f3a12 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:56:15 -0500
+Subject: Trac #29665: add Gentoo package information for cffi.
+
+---
+ build/pkgs/cffi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cffi/distros/gentoo.txt
+
+diff --git a/build/pkgs/cffi/distros/gentoo.txt b/build/pkgs/cffi/distros/gentoo.txt
+new file mode 100644
+index 00000000..81eeb81
+--- /dev/null
++++ b/build/pkgs/cffi/distros/gentoo.txt
+@@ -0,0 +1 @@
++virtual/python-cffi
+-- 
+cgit v1.0-1-gd88e
+
+
+From ce393c04afc69fe050e38f780d4e117164687d80 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:57:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for cffi.
+
+---
+ build/pkgs/cffi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cffi/spkg-configure.m4
+
+diff --git a/build/pkgs/cffi/spkg-configure.m4 b/build/pkgs/cffi/spkg-configure.m4
+new file mode 100644
+index 00000000..dc81875
+--- /dev/null
++++ b/build/pkgs/cffi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([cffi], [SAGE_PYTHON_PACKAGE_CHECK([cffi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 467093315b3fdd57c8caa2f95cf99ad52b0b84fb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:57:57 -0500
+Subject: Trac #29665: add Gentoo package information for pip.
+
+---
+ build/pkgs/pip/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pip/distros/gentoo.txt
+
+diff --git a/build/pkgs/pip/distros/gentoo.txt b/build/pkgs/pip/distros/gentoo.txt
+new file mode 100644
+index 00000000..1845454
+--- /dev/null
++++ b/build/pkgs/pip/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pip[vanilla]
+-- 
+cgit v1.0-1-gd88e
+
+
+From c597fd23f9f68dabbcb7e698d0569c3e6458f6d1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 09:07:26 -0500
+Subject: Trac #29665: new spkg-configure.m4 for pip.
+
+---
+ build/pkgs/pip/spkg-configure.m4 | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+ create mode 100644 build/pkgs/pip/spkg-configure.m4
+
+diff --git a/build/pkgs/pip/spkg-configure.m4 b/build/pkgs/pip/spkg-configure.m4
+new file mode 100644
+index 00000000..c7a5562
+--- /dev/null
++++ b/build/pkgs/pip/spkg-configure.m4
+@@ -0,0 +1,12 @@
++SAGE_SPKG_CONFIGURE([pip], [
++  dnl always run this macro because it changes the default value of
++  dnl the --with-system-<package> option.
++  SAGE_PYTHON_PACKAGE_CHECK([pip])
++
++  dnl if we might not install the spkg, make sure that "pip" is in
++  dnl the user's PATH, too.
++  AS_IF([test "x$sage_spkg_install_pip" != "xyes"], [
++    AC_CHECK_PROG(HAVE_PIP, pip, yes, no)
++    AS_IF([test "x$HAVE_PIP" = "xno"], [sage_spkg_install_pip=yes])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ef8f1e807bc55d7b8321777486fa867a7c135419 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 9 Nov 2021 09:09:04 -0500
+Subject: Trac #29665: set $SAGE_PIP_INSTALL_FLAGS for
+ --enable-system-site-packages.
+
+We need to pass some special flags to "pip install" to make it do the
+right thing in the precence of system-site packages. Here we introduce
+a new autoconf variable, SAGE_PIP_INSTALL_FLAGS, that will be used
+to pass those flags to the build system.
+
+With autoconf aware of the variable, we substitute its value into the
+sage-build-env-config script for use in spkg-install.in.
+---
+ build/bin/sage-build-env-config.in | 1 +
+ configure.ac                       | 9 +++++++++
+ 2 files changed, 10 insertions(+)
+
+diff --git a/build/bin/sage-build-env-config.in b/build/bin/sage-build-env-config.in
+index 92e7dad..ad62e5f 100644
+--- a/build/bin/sage-build-env-config.in
++++ b/build/bin/sage-build-env-config.in
+@@ -53,6 +53,7 @@ export SAGE_PARI_CFG="@SAGE_PARI_CFG@"
+ 
+ export SAGE_GLPK_PREFIX="@SAGE_GLPK_PREFIX@"
+ export SAGE_FREETYPE_PREFIX="@SAGE_FREETYPE_PREFIX@"
++export SAGE_PIP_INSTALL_FLAGS="@SAGE_PIP_INSTALL_FLAGS@"
+ export SAGE_SUITESPARSE_PREFIX="@SAGE_SUITESPARSE_PREFIX@"
+ 
+ export SAGE_CONFIGURE_FFLAS_FFPACK="@SAGE_CONFIGURE_FFLAS_FFPACK@"
+diff --git a/configure.ac b/configure.ac
+index 6fafb83..6ed07ac 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -441,6 +441,14 @@ AC_ARG_ENABLE(
+     [allow the use of python packages from the system (experimental; default: no)]
+   )], [
+   AS_IF([test "x$enable_system_site_packages" = "xyes"], [
++    dnl When installing python SPKGs in the presence of system-site
++    dnl packages, we need to --ignore-installed so that a patched SPKG
++    dnl can be installed in the presence of an unpatched system package
++    dnl that appears (to pip) to be identical. The --no-deps flag is
++    dnl then needed because --ignore-installed will make any installed
++    dnl dependencies invisible to pip, who does not appreciate that.
++    SAGE_PIP_INSTALL_FLAGS="${SAGE_PIP_INSTALL_FLAGS} --no-deps --ignore-installed"
++
+     SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
+ 
+     dnl We want to raise an error if the user asked for "system site
+@@ -453,6 +461,7 @@ AC_ARG_ENABLE(
+     with_system_python3="force"
+   ])
+ ])
++AC_SUBST([SAGE_PIP_INSTALL_FLAGS])
+ AC_SUBST([SAGE_VENV_FLAGS])
+ 
+ SAGE_SPKG_OPTIONS=""
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3cf365fef84e809e74abd2eb388e7a8e9af9d739 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 9 Nov 2021 21:01:58 -0500
+Subject: Trac #29665: pass $SAGE_PIP_INSTALL_FLAGS to sdh_pip_install.
+
+Since sdh_pip_install is usually called from spkg-install.in, the
+variables from sage-build-env-config will be available. Here we pass
+the contents of $SAGE_PIP_INSTALL_FLAGS to sage-pip-install
+unconditionally, and hope that the user ignores this variable unless
+he truly knows what he is doing.
+---
+ build/bin/sage-dist-helpers | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/build/bin/sage-dist-helpers b/build/bin/sage-dist-helpers
+index fe364e5..1032ac3 100644
+--- a/build/bin/sage-dist-helpers
++++ b/build/bin/sage-dist-helpers
+@@ -303,7 +303,11 @@ sdh_store_wheel() {
+ }
+ 
+ sdh_store_and_pip_install_wheel() {
+-    local pip_options=""
++    # The $SAGE_PIP_INSTALL_FLAGS variable is set by sage-build-env-config.
++    # We skip sanity checking its contents since you should either let sage
++    # decide what it contains, or really know what you are doing.
++    local pip_options="${SAGE_PIP_INSTALL_FLAGS}"
++
+     while [ $# -gt 0 ]; do
+         case $1 in
+             -*) pip_options="$pip_options $1"
+-- 
+cgit v1.0-1-gd88e
+
+
+From 50f0438ee857b8f0b7d7ad924e6bba9c5e1bc033 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:10:46 -0500
+Subject: Trac #29665: add Gentoo package information for pexpect.
+
+---
+ build/pkgs/pexpect/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pexpect/distros/gentoo.txt
+
+diff --git a/build/pkgs/pexpect/distros/gentoo.txt b/build/pkgs/pexpect/distros/gentoo.txt
+new file mode 100644
+index 00000000..30c4b60
+--- /dev/null
++++ b/build/pkgs/pexpect/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pexpect
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4d784688d997290b462646fa7f36114a41f3f453 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:11:25 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pexpect.
+
+---
+ build/pkgs/pexpect/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pexpect/spkg-configure.m4
+
+diff --git a/build/pkgs/pexpect/spkg-configure.m4 b/build/pkgs/pexpect/spkg-configure.m4
+new file mode 100644
+index 00000000..6520856
+--- /dev/null
++++ b/build/pkgs/pexpect/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pexpect], [SAGE_PYTHON_PACKAGE_CHECK([pexpect])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6447122dc76a3b7a58340dbed942db66530b5b07 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:12:05 -0500
+Subject: Trac #29665: add Gentoo package information for docutils.
+
+---
+ build/pkgs/docutils/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/docutils/distros/gentoo.txt
+
+diff --git a/build/pkgs/docutils/distros/gentoo.txt b/build/pkgs/docutils/distros/gentoo.txt
+new file mode 100644
+index 00000000..fe4a452
+--- /dev/null
++++ b/build/pkgs/docutils/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/docutils
+-- 
+cgit v1.0-1-gd88e
+
+
+From 709041480a5fc729b0ee7f1a8a3b16d4d65321b5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:12:38 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for docutils.
+
+---
+ build/pkgs/docutils/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/docutils/spkg-configure.m4
+
+diff --git a/build/pkgs/docutils/spkg-configure.m4 b/build/pkgs/docutils/spkg-configure.m4
+new file mode 100644
+index 00000000..3584e45
+--- /dev/null
++++ b/build/pkgs/docutils/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([docutils], [SAGE_PYTHON_PACKAGE_CHECK([docutils])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 782d38b48ab87afccc43fbc071e7b7ed48fb0a20 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:14:37 -0500
+Subject: Trac #29665: add Gentoo package information for nbclient.
+
+---
+ build/pkgs/nbclient/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbclient/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbclient/distros/gentoo.txt b/build/pkgs/nbclient/distros/gentoo.txt
+new file mode 100644
+index 00000000..06ff18d
+--- /dev/null
++++ b/build/pkgs/nbclient/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbclient
+-- 
+cgit v1.0-1-gd88e
+
+
+From 19ce09336532336f69db74381932d51a429dfaca Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:15:11 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for nbclient.
+
+---
+ build/pkgs/nbclient/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbclient/spkg-configure.m4
+
+diff --git a/build/pkgs/nbclient/spkg-configure.m4 b/build/pkgs/nbclient/spkg-configure.m4
+new file mode 100644
+index 00000000..14178b7
+--- /dev/null
++++ b/build/pkgs/nbclient/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbclient], [SAGE_PYTHON_PACKAGE_CHECK([nbclient])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c063b9de42c1780368000a563d0dbe80b6fff169 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:17:36 -0500
+Subject: Trac #29665: add Gentoo package information for argon2_cffi.
+
+---
+ build/pkgs/argon2_cffi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argon2_cffi/distros/gentoo.txt
+
+diff --git a/build/pkgs/argon2_cffi/distros/gentoo.txt b/build/pkgs/argon2_cffi/distros/gentoo.txt
+new file mode 100644
+index 00000000..2f12ca8
+--- /dev/null
++++ b/build/pkgs/argon2_cffi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/argon2-cffi
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0b4d5699dd51ea52550fba7db9e1cbb8bbac1892 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:18:35 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for argon2_cffi.
+
+---
+ build/pkgs/argon2_cffi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argon2_cffi/spkg-configure.m4
+
+diff --git a/build/pkgs/argon2_cffi/spkg-configure.m4 b/build/pkgs/argon2_cffi/spkg-configure.m4
+new file mode 100644
+index 00000000..03ebc63
+--- /dev/null
++++ b/build/pkgs/argon2_cffi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([argon2_cffi], [SAGE_PYTHON_PACKAGE_CHECK([argon2_cffi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2b4119558a6e0b1aa512848539a237676b035c83 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:30:48 -0500
+Subject: Trac #29665: fix package name in dateutil's install-requires.txt.
+
+---
+ build/pkgs/dateutil/install-requires.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/build/pkgs/dateutil/install-requires.txt b/build/pkgs/dateutil/install-requires.txt
+index 0ae93da..face537 100644
+--- a/build/pkgs/dateutil/install-requires.txt
++++ b/build/pkgs/dateutil/install-requires.txt
+@@ -1 +1 @@
+-dateutil >=2.8.1
++python-dateutil >=2.8.1
+-- 
+cgit v1.0-1-gd88e
+
+
+From df371b7c4d20a3353d43940306ad22e11aba29da Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:31:41 -0500
+Subject: Trac #29665: add Gentoo package information for dateutil.
+
+---
+ build/pkgs/dateutil/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/dateutil/distros/gentoo.txt
+
+diff --git a/build/pkgs/dateutil/distros/gentoo.txt b/build/pkgs/dateutil/distros/gentoo.txt
+new file mode 100644
+index 00000000..e129df7
+--- /dev/null
++++ b/build/pkgs/dateutil/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/python-dateutil
+-- 
+cgit v1.0-1-gd88e
+
+
+From 577695dfdf661ee26c0ffd767bdbf479d95f7fb4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:32:21 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for dateutil.
+
+---
+ build/pkgs/dateutil/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/dateutil/spkg-configure.m4
+
+diff --git a/build/pkgs/dateutil/spkg-configure.m4 b/build/pkgs/dateutil/spkg-configure.m4
+new file mode 100644
+index 00000000..fdcd127
+--- /dev/null
++++ b/build/pkgs/dateutil/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([dateutil], [SAGE_PYTHON_PACKAGE_CHECK([dateutil])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1984651caac624ec4bb58814ca1d57fe66f9881a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:33:51 -0500
+Subject: Trac #29665: add Gentoo package information for setuptools_scm.
+
+---
+ build/pkgs/setuptools_scm/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/setuptools_scm/distros/gentoo.txt
+
+diff --git a/build/pkgs/setuptools_scm/distros/gentoo.txt b/build/pkgs/setuptools_scm/distros/gentoo.txt
+new file mode 100644
+index 00000000..8989597
+--- /dev/null
++++ b/build/pkgs/setuptools_scm/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/setuptools_scm
+-- 
+cgit v1.0-1-gd88e
+
+
+From ebf7c854ed966e7353759be485c4f5a57b9a10fa Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:34:49 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for setuptools_scm.
+
+---
+ build/pkgs/setuptools_scm/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/setuptools_scm/spkg-configure.m4
+
+diff --git a/build/pkgs/setuptools_scm/spkg-configure.m4 b/build/pkgs/setuptools_scm/spkg-configure.m4
+new file mode 100644
+index 00000000..437148c
+--- /dev/null
++++ b/build/pkgs/setuptools_scm/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([setuptools_scm], [
++  SAGE_PYTHON_PACKAGE_CHECK([setuptools_scm])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0dee0d0c28f31b1f619e44c710a3c9e22d2b2544 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:36:33 -0500
+Subject: Trac #29665: add Gentoo package information for nbconvert.
+
+---
+ build/pkgs/nbconvert/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbconvert/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbconvert/distros/gentoo.txt b/build/pkgs/nbconvert/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c45a10
+--- /dev/null
++++ b/build/pkgs/nbconvert/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbconvert
+-- 
+cgit v1.0-1-gd88e
+
+
+From 473789eb11b1838bc32dc8a63509ee199afc8912 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:37:37 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for nbconvert.
+
+---
+ build/pkgs/nbconvert/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbconvert/spkg-configure.m4
+
+diff --git a/build/pkgs/nbconvert/spkg-configure.m4 b/build/pkgs/nbconvert/spkg-configure.m4
+new file mode 100644
+index 00000000..9b5dee3
+--- /dev/null
++++ b/build/pkgs/nbconvert/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbconvert], [SAGE_PYTHON_PACKAGE_CHECK([nbconvert])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f0703b594e57c980d605aa9bc8316c45a7858b3b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:41:51 -0500
+Subject: Trac #29665: add Gentoo package information for jupyter_core.
+
+---
+ build/pkgs/jupyter_core/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyter_core/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyter_core/distros/gentoo.txt b/build/pkgs/jupyter_core/distros/gentoo.txt
+new file mode 100644
+index 00000000..f168c5a
+--- /dev/null
++++ b/build/pkgs/jupyter_core/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyter_core
+-- 
+cgit v1.0-1-gd88e
+
+
+From 061a307cc4a6680d8500fde834975064e59540d5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:42:48 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jupyter_core.
+
+---
+ build/pkgs/jupyter_core/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyter_core/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyter_core/spkg-configure.m4 b/build/pkgs/jupyter_core/spkg-configure.m4
+new file mode 100644
+index 00000000..67df9c3
+--- /dev/null
++++ b/build/pkgs/jupyter_core/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyter_core], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyter_core])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b85abe964ce0b98b5842efe9cbad9bdb1c89202f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:47:08 -0500
+Subject: Trac #29665: add Gentoo package information for jupyter_client.
+
+---
+ build/pkgs/jupyter_client/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyter_client/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyter_client/distros/gentoo.txt b/build/pkgs/jupyter_client/distros/gentoo.txt
+new file mode 100644
+index 00000000..4f1de88
+--- /dev/null
++++ b/build/pkgs/jupyter_client/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyter_client
+-- 
+cgit v1.0-1-gd88e
+
+
+From 86323ff1e0b2507933df6bc2a96c9175957640c5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:48:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jupyter_client.
+
+---
+ build/pkgs/jupyter_client/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyter_client/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyter_client/spkg-configure.m4 b/build/pkgs/jupyter_client/spkg-configure.m4
+new file mode 100644
+index 00000000..fbd3498
+--- /dev/null
++++ b/build/pkgs/jupyter_client/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyter_client], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyter_client])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a8475e27dd30d752d05ab6fea6579e8623501d82 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:48:58 -0500
+Subject: Trac #29665: add Gentoo package information for snowballstemmer.
+
+---
+ build/pkgs/snowballstemmer/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/snowballstemmer/distros/gentoo.txt
+
+diff --git a/build/pkgs/snowballstemmer/distros/gentoo.txt b/build/pkgs/snowballstemmer/distros/gentoo.txt
+new file mode 100644
+index 00000000..63fd851
+--- /dev/null
++++ b/build/pkgs/snowballstemmer/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/snowballstemmer
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0833c9b781062b4ed86d619e050a6f5d60e36080 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:49:38 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for snowballstemmer.
+
+---
+ build/pkgs/snowballstemmer/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/snowballstemmer/spkg-configure.m4
+
+diff --git a/build/pkgs/snowballstemmer/spkg-configure.m4 b/build/pkgs/snowballstemmer/spkg-configure.m4
+new file mode 100644
+index 00000000..6aa0882
+--- /dev/null
++++ b/build/pkgs/snowballstemmer/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([snowballstemmer], [
++  SAGE_PYTHON_PACKAGE_CHECK([snowballstemmer])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 50a1cf2a2bcd7eeec64cbc3f70e3e9fbe5d850fe Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:50:47 -0500
+Subject: Trac #29665: add Gentoo package information for tornado.
+
+---
+ build/pkgs/tornado/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tornado/distros/gentoo.txt
+
+diff --git a/build/pkgs/tornado/distros/gentoo.txt b/build/pkgs/tornado/distros/gentoo.txt
+new file mode 100644
+index 00000000..6ae4b9f
+--- /dev/null
++++ b/build/pkgs/tornado/distros/gentoo.txt
+@@ -0,0 +1 @@
++www-servers/tornado
+-- 
+cgit v1.0-1-gd88e
+
+
+From 118f4da6e03476c726363e8e22ecda32f13bfc33 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:51:26 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for tornado.
+
+---
+ build/pkgs/tornado/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tornado/spkg-configure.m4
+
+diff --git a/build/pkgs/tornado/spkg-configure.m4 b/build/pkgs/tornado/spkg-configure.m4
+new file mode 100644
+index 00000000..1ee5bc9
+--- /dev/null
++++ b/build/pkgs/tornado/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tornado], [SAGE_PYTHON_PACKAGE_CHECK([tornado])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3850701747a6c8ef60840bdfdb589b28d4cd2b9a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:52:21 -0500
+Subject: Trac #29665: add Gentoo package information for jsonschema.
+
+---
+ build/pkgs/jsonschema/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jsonschema/distros/gentoo.txt
+
+diff --git a/build/pkgs/jsonschema/distros/gentoo.txt b/build/pkgs/jsonschema/distros/gentoo.txt
+new file mode 100644
+index 00000000..d708e4c
+--- /dev/null
++++ b/build/pkgs/jsonschema/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jsonschema
+-- 
+cgit v1.0-1-gd88e
+
+
+From 76e3917c8af781af00f642cfada7a79594429e30 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:54:03 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jsonschema.
+
+---
+ build/pkgs/jsonschema/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jsonschema/spkg-configure.m4
+
+diff --git a/build/pkgs/jsonschema/spkg-configure.m4 b/build/pkgs/jsonschema/spkg-configure.m4
+new file mode 100644
+index 00000000..b9e5e21
+--- /dev/null
++++ b/build/pkgs/jsonschema/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jsonschema], [SAGE_PYTHON_PACKAGE_CHECK([jsonschema])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From fd4a16c11669b6dd73ac6325bca820e76db00402 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:55:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ widgetsnbextension.
+
+---
+ build/pkgs/widgetsnbextension/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/widgetsnbextension/spkg-configure.m4
+
+diff --git a/build/pkgs/widgetsnbextension/spkg-configure.m4 b/build/pkgs/widgetsnbextension/spkg-configure.m4
+new file mode 100644
+index 00000000..bf82daf
+--- /dev/null
++++ b/build/pkgs/widgetsnbextension/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([widgetsnbextension], [
++  SAGE_PYTHON_PACKAGE_CHECK([widgetsnbextension])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8079a9f384e3c8480e157dd98c3db2f43c987f4e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:57:20 -0500
+Subject: Trac #29665: add Gentoo package information for importlib_resources.
+
+---
+ build/pkgs/importlib_resources/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/importlib_resources/distros/gentoo.txt
+
+diff --git a/build/pkgs/importlib_resources/distros/gentoo.txt b/build/pkgs/importlib_resources/distros/gentoo.txt
+new file mode 100644
+index 00000000..d5e1f2c
+--- /dev/null
++++ b/build/pkgs/importlib_resources/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/importlib_resources
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2c430d7c52f02779a6c41b98ac2f4edd8b6759c3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:58:00 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ importlib_resources.
+
+---
+ build/pkgs/importlib_resources/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/importlib_resources/spkg-configure.m4
+
+diff --git a/build/pkgs/importlib_resources/spkg-configure.m4 b/build/pkgs/importlib_resources/spkg-configure.m4
+new file mode 100644
+index 00000000..50df55b
+--- /dev/null
++++ b/build/pkgs/importlib_resources/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([importlib_resources], [
++  SAGE_PYTHON_PACKAGE_CHECK([importlib_resources])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 00d13d7bf2e50aae2ccef3b2b30293c70a922af2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:58:38 -0500
+Subject: Trac #29665: add Gentoo package information for kiwisolver.
+
+---
+ build/pkgs/kiwisolver/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/kiwisolver/distros/gentoo.txt
+
+diff --git a/build/pkgs/kiwisolver/distros/gentoo.txt b/build/pkgs/kiwisolver/distros/gentoo.txt
+new file mode 100644
+index 00000000..7b30c95
+--- /dev/null
++++ b/build/pkgs/kiwisolver/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/kiwisolver
+-- 
+cgit v1.0-1-gd88e
+
+
+From 72b7907ef7ea9fa4ff6948ea34cfe2f693ee6c31 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:59:09 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for kiwisolver.
+
+---
+ build/pkgs/kiwisolver/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/kiwisolver/spkg-configure.m4
+
+diff --git a/build/pkgs/kiwisolver/spkg-configure.m4 b/build/pkgs/kiwisolver/spkg-configure.m4
+new file mode 100644
+index 00000000..4e7ac97
+--- /dev/null
++++ b/build/pkgs/kiwisolver/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([kiwisolver], [SAGE_PYTHON_PACKAGE_CHECK([kiwisolver])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 479351279e4e0ea7e2d146434f0daba038765cfd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:00:04 -0500
+Subject: Trac #29665: add Gentoo package information for notebook.
+
+---
+ build/pkgs/notebook/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/notebook/distros/gentoo.txt
+
+diff --git a/build/pkgs/notebook/distros/gentoo.txt b/build/pkgs/notebook/distros/gentoo.txt
+new file mode 100644
+index 00000000..6475d72
+--- /dev/null
++++ b/build/pkgs/notebook/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/notebook
+-- 
+cgit v1.0-1-gd88e
+
+
+From f4d9242ea654977f8ad7865c82eec593e11a36bc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:01:42 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for notebook.
+
+---
+ build/pkgs/notebook/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/notebook/spkg-configure.m4
+
+diff --git a/build/pkgs/notebook/spkg-configure.m4 b/build/pkgs/notebook/spkg-configure.m4
+new file mode 100644
+index 00000000..a17ba95
+--- /dev/null
++++ b/build/pkgs/notebook/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([notebook], [SAGE_PYTHON_PACKAGE_CHECK([notebook])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9837070c7f8e9a71283b84d49d4fd2c94b78a464 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:02:38 -0500
+Subject: Trac #29665: add Gentoo package information for matplotlib_inline.
+
+---
+ build/pkgs/matplotlib_inline/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/matplotlib_inline/distros/gentoo.txt
+
+diff --git a/build/pkgs/matplotlib_inline/distros/gentoo.txt b/build/pkgs/matplotlib_inline/distros/gentoo.txt
+new file mode 100644
+index 00000000..6a5859c
+--- /dev/null
++++ b/build/pkgs/matplotlib_inline/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/matplotlib-inline
+-- 
+cgit v1.0-1-gd88e
+
+
+From 750be73b25b92b4875e47d044360ac0e1116ec3e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:03:28 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for matplotlib_inline.
+
+---
+ build/pkgs/matplotlib_inline/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/matplotlib_inline/spkg-configure.m4
+
+diff --git a/build/pkgs/matplotlib_inline/spkg-configure.m4 b/build/pkgs/matplotlib_inline/spkg-configure.m4
+new file mode 100644
+index 00000000..e59658f
+--- /dev/null
++++ b/build/pkgs/matplotlib_inline/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([matplotlib_inline], [
++  SAGE_PYTHON_PACKAGE_CHECK([matplotlib_inline])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 273505f49698dcd2ab30c2756b07113c9b7e7791 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:04:10 -0500
+Subject: Trac #29665: add Gentoo package information for ipykernel.
+
+---
+ build/pkgs/ipykernel/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipykernel/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipykernel/distros/gentoo.txt b/build/pkgs/ipykernel/distros/gentoo.txt
+new file mode 100644
+index 00000000..88aab61
+--- /dev/null
++++ b/build/pkgs/ipykernel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipykernel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 629ad36c9e4ae0cdff4a013289b4f2911442445e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:04:46 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for ipykernel.
+
+---
+ build/pkgs/ipykernel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipykernel/spkg-configure.m4
+
+diff --git a/build/pkgs/ipykernel/spkg-configure.m4 b/build/pkgs/ipykernel/spkg-configure.m4
+new file mode 100644
+index 00000000..94ecc2d
+--- /dev/null
++++ b/build/pkgs/ipykernel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipykernel], [SAGE_PYTHON_PACKAGE_CHECK([ipykernel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b8d709edb6a24fd5868ee2818b56e78257b2eafa Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:05:26 -0500
+Subject: Trac #29665: add Gentoo package information for prompt_toolkit.
+
+---
+ build/pkgs/prompt_toolkit/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/prompt_toolkit/distros/gentoo.txt
+
+diff --git a/build/pkgs/prompt_toolkit/distros/gentoo.txt b/build/pkgs/prompt_toolkit/distros/gentoo.txt
+new file mode 100644
+index 00000000..6902484
+--- /dev/null
++++ b/build/pkgs/prompt_toolkit/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/prompt_toolkit
+-- 
+cgit v1.0-1-gd88e
+
+
+From 16c0b5e767ae4dac4440510b7253e5c8642b7d2c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:10:39 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for prompt_toolkit.
+
+---
+ build/pkgs/prompt_toolkit/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/prompt_toolkit/spkg-configure.m4
+
+diff --git a/build/pkgs/prompt_toolkit/spkg-configure.m4 b/build/pkgs/prompt_toolkit/spkg-configure.m4
+new file mode 100644
+index 00000000..fd8c1a6
+--- /dev/null
++++ b/build/pkgs/prompt_toolkit/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([prompt_toolkit], [
++  SAGE_PYTHON_PACKAGE_CHECK([prompt_toolkit])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0cd9283e8bb6c8ae413fc8f715c021f7ec3ca2c8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:12:10 -0500
+Subject: Trac #29665: add Gentoo package information for charset_normalizer.
+
+---
+ build/pkgs/charset_normalizer/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/charset_normalizer/distros/gentoo.txt
+
+diff --git a/build/pkgs/charset_normalizer/distros/gentoo.txt b/build/pkgs/charset_normalizer/distros/gentoo.txt
+new file mode 100644
+index 00000000..eefeb89
+--- /dev/null
++++ b/build/pkgs/charset_normalizer/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/charset_normalizer
+-- 
+cgit v1.0-1-gd88e
+
+
+From a04b01a9ab59097d189edcc5ddcb461faede83b2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:12:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ charset_normalizer.
+
+---
+ build/pkgs/charset_normalizer/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/charset_normalizer/spkg-configure.m4
+
+diff --git a/build/pkgs/charset_normalizer/spkg-configure.m4 b/build/pkgs/charset_normalizer/spkg-configure.m4
+new file mode 100644
+index 00000000..18b18cf
+--- /dev/null
++++ b/build/pkgs/charset_normalizer/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([charset_normalizer], [
++  SAGE_PYTHON_PACKAGE_CHECK([charset_normalizer])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d2ea08138711c53046f977b586f33b09b176b2e3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:13:37 -0500
+Subject: Trac #29665: add Gentoo package information for prometheus_client.
+
+---
+ build/pkgs/prometheus_client/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/prometheus_client/distros/gentoo.txt
+
+diff --git a/build/pkgs/prometheus_client/distros/gentoo.txt b/build/pkgs/prometheus_client/distros/gentoo.txt
+new file mode 100644
+index 00000000..aa2889c
+--- /dev/null
++++ b/build/pkgs/prometheus_client/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/prometheus_client
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b0393200e9edd3e26b8a55ba67e5710e7403fcb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:15:09 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for prometheus_client.
+
+---
+ build/pkgs/prometheus_client/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/prometheus_client/spkg-configure.m4
+
+diff --git a/build/pkgs/prometheus_client/spkg-configure.m4 b/build/pkgs/prometheus_client/spkg-configure.m4
+new file mode 100644
+index 00000000..b494588
+--- /dev/null
++++ b/build/pkgs/prometheus_client/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([prometheus_client], [
++  SAGE_PYTHON_PACKAGE_CHECK([prometheus_client])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From cdcd85284f43ca4ad18353ec3527b2901e57b788 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:17:23 -0500
+Subject: Trac #29665: add Gentoo package information for pybind11.
+
+---
+ build/pkgs/pybind11/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pybind11/distros/gentoo.txt
+
+diff --git a/build/pkgs/pybind11/distros/gentoo.txt b/build/pkgs/pybind11/distros/gentoo.txt
+new file mode 100644
+index 00000000..0c500b3
+--- /dev/null
++++ b/build/pkgs/pybind11/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pybind11
+-- 
+cgit v1.0-1-gd88e
+
+
+From efdd1eb64c4799fe3cdf2221824182941b3fda2d Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:17:51 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pybind11.
+
+---
+ build/pkgs/pybind11/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pybind11/spkg-configure.m4
+
+diff --git a/build/pkgs/pybind11/spkg-configure.m4 b/build/pkgs/pybind11/spkg-configure.m4
+new file mode 100644
+index 00000000..cce1cf5
+--- /dev/null
++++ b/build/pkgs/pybind11/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pybind11], [SAGE_PYTHON_PACKAGE_CHECK([pybind11])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b2128f33b68ea33927284116ea598dd186902400 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:19:23 -0500
+Subject: Trac #29665: add Gentoo package information for pkgconfig.
+
+---
+ build/pkgs/pkgconfig/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pkgconfig/distros/gentoo.txt
+
+diff --git a/build/pkgs/pkgconfig/distros/gentoo.txt b/build/pkgs/pkgconfig/distros/gentoo.txt
+new file mode 100644
+index 00000000..32e8618
+--- /dev/null
++++ b/build/pkgs/pkgconfig/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pkgconfig
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b373b49e06aadeb36dc57e500da9a322460e658 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:19:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pkgconfig.
+
+---
+ build/pkgs/pkgconfig/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pkgconfig/spkg-configure.m4
+
+diff --git a/build/pkgs/pkgconfig/spkg-configure.m4 b/build/pkgs/pkgconfig/spkg-configure.m4
+new file mode 100644
+index 00000000..6708293
+--- /dev/null
++++ b/build/pkgs/pkgconfig/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pkgconfig], [SAGE_PYTHON_PACKAGE_CHECK([pkgconfig])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ce578729eb0d14baab365351ba9a9ffffb7b79f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:21:10 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_serializinghtml.
+
+---
+ build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt b/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+new file mode 100644
+index 00000000..38bca8f
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-serializinghtml
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb0f42c32bbce0e4488678312f5e2d88c6f42c9b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:21:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_serializinghtml.
+
+---
+ build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4 b/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+new file mode 100644
+index 00000000..be8e625
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_serializinghtml], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_serializinghtml])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e47dcf985e40475de85c9436a85537751318bc3d Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:22:54 -0500
+Subject: Trac #29665: add Gentoo package information for sphinxcontrib_jsmath.
+
+---
+ build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt b/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+new file mode 100644
+index 00000000..041a471
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-jsmath
+-- 
+cgit v1.0-1-gd88e
+
+
+From 72cff6fd35f93de4fa855bc870569dd733ff5c24 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:23:49 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_jsmath.
+
+---
+ build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4 b/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+new file mode 100644
+index 00000000..e46bde2
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_jsmath], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_jsmath])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a36395d70f759449cd63c1b0990fbdcb4cb25ca0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:24:26 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_devhelp.
+
+---
+ build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..9b5c899
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-devhelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9953a5dd1646ed0ad51d2e3935cf609bc9e7fd1c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:25:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_devhelp.
+
+---
+ build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+new file mode 100644
+index 00000000..8728136
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_devhelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_devhelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b199d5363aad93f3cb23f7904c9553a28b06348f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:25:53 -0500
+Subject: Trac #29665: add Gentoo package information for sphinxcontrib_qthelp.
+
+---
+ build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..7210099
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-qthelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 94ac8806739f3938e73f5857328e91e0d42e98d2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:26:28 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_qthelp.
+
+---
+ build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+new file mode 100644
+index 00000000..81ea5e1
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_qthelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_qthelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From beedc154aa405e8a58aee8889f510db07adc89a7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:26:54 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_applehelp.
+
+---
+ build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..66ac8da
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-applehelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 07d47c3673d6b35423b71f621cb400989c0101c2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:27:19 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_applehelp.
+
+---
+ build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+new file mode 100644
+index 00000000..e834aed
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_applehelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_applehelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 333a66546c5d421735c49dbafd7370a827f22781 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:27:46 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_htmlhelp.
+
+---
+ build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..e080bac
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-htmlhelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From bfaeb3962254439b63f1f2e0e883de462c7831be Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:29:18 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_htmlhelp.
+
+---
+ build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+new file mode 100644
+index 00000000..c77b003
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_htmlhelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_htmlhelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 782cde13da06e8b85806cb7cbc8aceee0364e639 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:30:23 -0500
+Subject: Trac #29665: add Gentoo package information for jupyterlab_pygments.
+
+---
+ build/pkgs/jupyterlab_pygments/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyterlab_pygments/distros/gentoo.txt b/build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+new file mode 100644
+index 00000000..c57b4f1
+--- /dev/null
++++ b/build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyterlab_pygments
+-- 
+cgit v1.0-1-gd88e
+
+
+From 39f974cfa4a8c6e5dd897f152f83ec82f40ee9f7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:31:13 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ jupyterlab_pygments.
+
+---
+ build/pkgs/jupyterlab_pygments/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyterlab_pygments/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyterlab_pygments/spkg-configure.m4 b/build/pkgs/jupyterlab_pygments/spkg-configure.m4
+new file mode 100644
+index 00000000..e46e21f
+--- /dev/null
++++ b/build/pkgs/jupyterlab_pygments/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyterlab_pygments], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyterlab_pygments])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From db704620700fd36cec3bf6125938f3ee00a9eb5e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:29:15 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for ply.
+
+---
+ build/pkgs/ply/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ply/spkg-configure.m4
+
+diff --git a/build/pkgs/ply/spkg-configure.m4 b/build/pkgs/ply/spkg-configure.m4
+new file mode 100644
+index 00000000..ffb0030
+--- /dev/null
++++ b/build/pkgs/ply/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ply], [SAGE_PYTHON_PACKAGE_CHECK([ply])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6aac31dabcdfdef228d7780398a3fda1a4cc566f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:29:51 -0500
+Subject: Trac #29665: add Gentoo package information for ply.
+
+---
+ build/pkgs/ply/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ply/distros/gentoo.txt
+
+diff --git a/build/pkgs/ply/distros/gentoo.txt b/build/pkgs/ply/distros/gentoo.txt
+new file mode 100644
+index 00000000..c8b1630
+--- /dev/null
++++ b/build/pkgs/ply/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ply
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb8d3372936ec37470d69687a0f91592129460ae Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:30:33 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for gast.
+
+---
+ build/pkgs/gast/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/gast/spkg-configure.m4
+
+diff --git a/build/pkgs/gast/spkg-configure.m4 b/build/pkgs/gast/spkg-configure.m4
+new file mode 100644
+index 00000000..26ec59f
+--- /dev/null
++++ b/build/pkgs/gast/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([gast], [SAGE_PYTHON_PACKAGE_CHECK([gast])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1cdc4046a88f1c2b4e5c162f66c6db6090b24194 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:31:15 -0500
+Subject: Trac #29665: add Gentoo package information for gast.
+
+---
+ build/pkgs/gast/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/gast/distros/gentoo.txt
+
+diff --git a/build/pkgs/gast/distros/gentoo.txt b/build/pkgs/gast/distros/gentoo.txt
+new file mode 100644
+index 00000000..3be5e7e
+--- /dev/null
++++ b/build/pkgs/gast/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/gast
+-- 
+cgit v1.0-1-gd88e
+
+
+From 96068b8a3742b65d619190e1d9fa5db399e6b4f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:32:20 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pythran.
+
+---
+ build/pkgs/pythran/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pythran/spkg-configure.m4
+
+diff --git a/build/pkgs/pythran/spkg-configure.m4 b/build/pkgs/pythran/spkg-configure.m4
+new file mode 100644
+index 00000000..592e95b
+--- /dev/null
++++ b/build/pkgs/pythran/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pythran], [SAGE_PYTHON_PACKAGE_CHECK([pythran])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1fa0fad3ae8f7e559c6fc315c6773a7d8aac0bfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:32:55 -0500
+Subject: Trac #29665: add Gentoo package information for pythran.
+
+---
+ build/pkgs/pythran/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pythran/distros/gentoo.txt
+
+diff --git a/build/pkgs/pythran/distros/gentoo.txt b/build/pkgs/pythran/distros/gentoo.txt
+new file mode 100644
+index 00000000..1bb7cdc
+--- /dev/null
++++ b/build/pkgs/pythran/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pythran
+-- 
+cgit v1.0-1-gd88e
+
+
+From d26370e5b8c88e76abfb7c27e3defb71c9e9f711 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:33:50 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for beniget.
+
+---
+ build/pkgs/beniget/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/beniget/spkg-configure.m4
+
+diff --git a/build/pkgs/beniget/spkg-configure.m4 b/build/pkgs/beniget/spkg-configure.m4
+new file mode 100644
+index 00000000..8ae6101
+--- /dev/null
++++ b/build/pkgs/beniget/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([beniget], [SAGE_PYTHON_PACKAGE_CHECK([beniget])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From eeeb296ed9b9694a865534103fd58e62a151ef5e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:34:22 -0500
+Subject: Trac #29665: add Gentoo package information for beniget.
+
+---
+ build/pkgs/beniget/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/beniget/distros/gentoo.txt
+
+diff --git a/build/pkgs/beniget/distros/gentoo.txt b/build/pkgs/beniget/distros/gentoo.txt
+new file mode 100644
+index 00000000..1a5972c
+--- /dev/null
++++ b/build/pkgs/beniget/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/beniget
+-- 
+cgit v1.0-1-gd88e
+
+
+From 078b2ff272d0eeff5cce40ad7eb176d9ddd7bdff Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:35:37 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for alabaster.
+
+---
+ build/pkgs/alabaster/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/alabaster/spkg-configure.m4
+
+diff --git a/build/pkgs/alabaster/spkg-configure.m4 b/build/pkgs/alabaster/spkg-configure.m4
+new file mode 100644
+index 00000000..4eca6e0
+--- /dev/null
++++ b/build/pkgs/alabaster/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([alabaster], [SAGE_PYTHON_PACKAGE_CHECK([alabaster])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7dc264353e5f64110431ff28c1b8b7e89699e9bd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:36:06 -0500
+Subject: Trac #29665: add Gentoo package information for alabaster.
+
+---
+ build/pkgs/alabaster/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/alabaster/distros/gentoo.txt
+
+diff --git a/build/pkgs/alabaster/distros/gentoo.txt b/build/pkgs/alabaster/distros/gentoo.txt
+new file mode 100644
+index 00000000..cffece6
+--- /dev/null
++++ b/build/pkgs/alabaster/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/alabaster
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8011a5e675e7e61a77ce34a299ee961a9f44253f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:43:59 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ importlib_metadata.
+
+---
+ build/pkgs/importlib_metadata/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/importlib_metadata/spkg-configure.m4
+
+diff --git a/build/pkgs/importlib_metadata/spkg-configure.m4 b/build/pkgs/importlib_metadata/spkg-configure.m4
+new file mode 100644
+index 00000000..0554e52
+--- /dev/null
++++ b/build/pkgs/importlib_metadata/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([importlib_metadata], [
++  SAGE_PYTHON_PACKAGE_CHECK([importlib_metadata])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 928ca0019e3ec6c4541a16b28bcc6710df6d010b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:44:28 -0500
+Subject: Trac #29665: add Gentoo package information for importlib_metadata.
+
+---
+ build/pkgs/importlib_metadata/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/importlib_metadata/distros/gentoo.txt
+
+diff --git a/build/pkgs/importlib_metadata/distros/gentoo.txt b/build/pkgs/importlib_metadata/distros/gentoo.txt
+new file mode 100644
+index 00000000..4f92786
+--- /dev/null
++++ b/build/pkgs/importlib_metadata/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/importlib_metadata
+-- 
+cgit v1.0-1-gd88e
+
+
+From 135f184f7498a2046065e669723e68efe2d65cee Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 21:16:58 -0500
+Subject: Trac #29665: fix sage.misc.package doctest with system alabaster.
+
+When alabaster from the system is used, these tests won't be able to
+find its SPKG installed. Add some ellipses, and switch one test to
+look for sage_conf instead.
+---
+ src/sage/misc/package.py | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/sage/misc/package.py b/src/sage/misc/package.py
+index 84f3d50..c7ad206 100644
+--- a/src/sage/misc/package.py
++++ b/src/sage/misc/package.py
+@@ -386,9 +386,9 @@ def installed_packages(exclude_pip=True):
+     EXAMPLES::
+ 
+         sage: sorted(installed_packages().keys())  # optional - build
+-        [...'alabaster', ...'sage_conf', ...]
+-        sage: installed_packages()['alabaster']  # optional - build, random
+-        '0.7.12'
++        [...'sage_conf', ...]
++        sage: installed_packages()['sage_conf']  # optional - build, random
++        '9.5'
+ 
+     .. SEEALSO::
+ 
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch b/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
new file mode 100644
index 000000000000..7ef3826aa4d2
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
@@ -0,0 +1,27 @@
+diff --git a/src/bin/sage-runtests b/src/bin/sage-runtests
+index 589dc8cd37..6bb8bf99a4 100755
+--- a/src/bin/sage-runtests
++++ b/src/bin/sage-runtests
+@@ -154,21 +154,4 @@ if __name__ == "__main__":
+     DC = DocTestController(args, args.filenames)
+     err = DC.run()
+ 
+-    try:
+-        exit_code_pytest = 0
+-        import pytest
+-        pytest_options = ["--import-mode", "importlib"]
+-        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.")
+-
+-    if err == 0:
+-        sys.exit(exit_code_pytest)
+-    else:
+-        sys.exit(err)
++    sys.exit(err)
diff --git a/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch b/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
new file mode 100644
index 000000000000..093e3d56eb33
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
@@ -0,0 +1,42 @@
+More site packages not included in trac 29665
+
+diff --git a/build/pkgs/gmpy2/spkg-configure.m4 b/build/pkgs/gmpy2/spkg-configure.m4
+new file mode 100644
+index 0000000000..2d0390f7db
+--- /dev/null
++++ b/build/pkgs/gmpy2/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([gmpy2], [SAGE_PYTHON_PACKAGE_CHECK([gmpy2])])
+diff --git a/build/pkgs/sphinx/spkg-configure.m4 b/build/pkgs/sphinx/spkg-configure.m4
+new file mode 100644
+index 0000000000..e149fbb2cf
+--- /dev/null
++++ b/build/pkgs/sphinx/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([sphinx], [SAGE_PYTHON_PACKAGE_CHECK([sphinx])])
+diff --git a/build/pkgs/typing_extensions/spkg-configure.m4 b/build/pkgs/typing_extensions/spkg-configure.m4
+new file mode 100644
+index 0000000000..d475fd8257
+--- /dev/null
++++ b/build/pkgs/typing_extensions/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([typing_extensions], [SAGE_PYTHON_PACKAGE_CHECK([typing_extensions])])
+-- 
+diff --git a/build/pkgs/gmpy2/install-requires.txt b/build/pkgs/gmpy2/install-requires.txt
+index 51d24518ef..c25feff557 100644
+--- a/build/pkgs/gmpy2/install-requires.txt
++++ b/build/pkgs/gmpy2/install-requires.txt
+@@ -1,3 +1 @@
+-# We would like to write gmpy2 >=2.1.0b5, but pipenv does not accept prereleases in version ranges
+-# https://github.com/pypa/pipenv/issues/1760
+-gmpy2 ==2.1.0rc1
++gmpy2 >=2.1
+diff --git a/build/pkgs/ptyprocess/install-requires.txt b/build/pkgs/ptyprocess/install-requires.txt
+index de89260872..7c336f636c 100644
+--- a/build/pkgs/ptyprocess/install-requires.txt
++++ b/build/pkgs/ptyprocess/install-requires.txt
+@@ -1,3 +1,3 @@
+-ptyprocess ==0.5.1
++ptyprocess
+ # https://trac.sagemath.org/ticket/31280#comment:42 and following
+ # sagelib is not compatible with ptyprocess 0.5.2, 0.6, and 0.7
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 33b40acbabeb..a32c5d18f378 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -22,11 +22,13 @@ distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
 checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
 python_version=3
 
-build_options="debug system_python3"
+build_options="debug system_python3 system_site_packages"
 desc_option_debug="Build with debug symbols"
 desc_option_system_python="Build using system python 3"
-build_options_default="system_python3"
+desc_option_system_python="Build using system python site-packages"
+build_options_default="system_python3 system_site_packages"
 configure_args+=" $(vopt_with system_python3)"
+configure_args+=" $(vopt_enable system_site_packages)"
 
 # path where sage will be installed
 _SAGE_ROOT=/usr/lib/sage-${version}
@@ -163,6 +165,8 @@ do_check() {
 	fi
 	if [ "$XBPS_CHECK_PKGS" = full ]; then
 		_test_args="--long $_test_args"
+	else
+		_test_args="--warn-long 5.0 $_test_args"
 	fi
 	# since make check will build the docs, run test like this instead
 	./sage -tp ${XBPS_MAKEJOBS} ${_test_args}
@@ -182,7 +186,7 @@ makedepends+=" automake gettext gettext-devel"
 # other host dependencies
 makedepends+=" cmake curl git ninja pandoc patch pkg-config python3 tox"
 
-# already in void
+# standard dependencies
 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
@@ -202,7 +206,49 @@ makedepends+="
  brial-devel cliquer-devel gfan libbraiding-devel libhomfly-devel
  lrcalc-devel nauty-devel palp tachyon
  maxima-ecl primesieve-devel primecount-devel
+ ffmpeg ImageMagick
 "
 
 # TODO: optional
 # 4ti2 coxeter3 libsemigroups lrslib pdf2svg perl_mongodb polymake
+
+# TODO: standard
+# cvxopt importlib_resources
+
+# python packages for trac-29665
+_sage_python3_modules="
+ python3-Babel python3-Jinja2 python3-MarkupSafe python3-Pillow
+ python3-Pygments python3-Sphinx python3-alabaster python3-argcomplete
+ python3-argon2 python3-attrs python3-backcall python3-beniget
+ python3-bleach python3-certifi python3-cffi python3-charset-normalizer
+ python3-cycler python3-dateutil python3-decorator python3-defusedxml
+ python3-docutils python3-entrypoints python3-flit_core python3-gast
+ python3-gmpy2 python3-html5lib python3-idna python3-imagesize
+ python3-importlib_metadata python3-ipython python3-ipython_genutils
+ python3-ipython_ipykernel python3-jedi python3-jsonschema
+ python3-jupyter_client python3-jupyter_core python3-jupyter_ipywidgets
+ python3-jupyter_nbconvert python3-jupyter_nbformat
+ python3-jupyter_notebook python3-jupyterlab_pygments python3-kiwisolver
+ python3-matplotlib python3-matplotlib-inline python3-mistune
+ python3-mpmath python3-nbclient python3-nest_asyncio python3-networkx
+ python3-numpy python3-packaging python3-pandocfilters python3-parsing
+ python3-parso python3-pexpect python3-pickleshare python3-pip
+ python3-pkgconfig python3-pluggy python3-ply python3-prometheus_client
+ python3-prompt_toolkit python3-ptyprocess python3-py python3-pybind11
+ python3-pycparser python3-pyrsistent python3-pytz python3-pyzmq
+ python3-requests python3-scipy python3-send2trash python3-setuptools
+ python3-setuptools_scm python3-simplegeneric python3-six
+ python3-snowballstemmer python3-sphinxcontrib-applehelp
+ python3-sphinxcontrib-devhelp python3-sphinxcontrib-htmlhelp
+ python3-sphinxcontrib-jsmath python3-sphinxcontrib-qthelp
+ python3-sphinxcontrib-serializinghtml python3-sympy python3-terminado
+ python3-testpath python3-texttable python3-toml python3-tomli
+ python3-tornado python3-traitlets python3-typing_extensions
+ python3-tzlocal python3-urllib3 python3-wcwidth python3-webencodings
+ python3-wheel python3-zipp pythran
+ "
+
+if [ "$build_option_system_site_packages" ]; then
+	makedepends+=" $_sage_python3_modules"
+	depends+=" $_sage_python3_modules"
+fi

From 899e40ad0d7939e6484df92080922a0723a28ca9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 3 Jan 2022 20:47:52 -0300
Subject: [PATCH 24/59] sagemath: use small source tarball + upstream packages

---
 srcpkgs/sagemath/template | 97 ++++++++++++++++++++++++++-------------
 1 file changed, 64 insertions(+), 33 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index a32c5d18f378..0de0061b09df 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -18,8 +18,8 @@ short_desc="Open source mathematics software"
 maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
-distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
-checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
+distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
+checksum=aea4c5a8d3b32af2fba644269b9daf4f62471471ba2d7d83da0f8098a5f53225
 python_version=3
 
 build_options="debug system_python3 system_site_packages"
@@ -33,42 +33,72 @@ configure_args+=" $(vopt_enable system_site_packages)"
 # 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} ;;
-esac
+_SAGE_UPSTREAM_MIRROR=https://mirrors.mit.edu/sage/spkg/upstream
 
-# extra upstream packages (trac-32968 / trac-33040)
 _upstream="
- https://pypi.io/packages/source/s/sphinx/Sphinx-4.3.1.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
+${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
+${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
+${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
+${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
+${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
+${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
+${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
+https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
+https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
+http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
+${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
+${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
+${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
+${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
+${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
+https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
+${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
+https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
+${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
 "
 
 checksum+="
- 32a5b3e9a1b176cc25ed048557d4d3d01af635e6b76c5bc7a43b0a34447fbd45
-
- 9c87405839a19696e837b3b818fed3f5f69f16f1eec1a1ad77e043dcea9c772f
- fc4453705b81d03568d5b808ad8f09c77c47534f6ac2e72e733f9ca4714aa75c
- acad2d8b20a1af07d4e4c9d2e9285c5ed9104354062f275f3fcd88dcef4f1326
- 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
- 78884e7c1d4b00ce3cea67b44566851c4343c120abd683433ce934a68ea58872
- 0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86
- b8e2f83c56e141920c39464b852de3719dfbfb6e3c99a2d8da0edf4fb33176ed
- d9bdec0013ef1eb5a84ab39a3b3868911598afa494f5faa038647101504e2b81
- b2e9810e09c3a47b73ce9cab5a72243a1258f61e7900969097a817232246ce1c
- 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
- 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
+c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
+d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
+4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
+3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
+03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
+5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
+cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
+5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
+581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
+6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
+07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
+a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
+ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
+d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
+169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
+5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
+cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
+471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
+78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
+edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
+b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
+3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
+545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
+cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
+718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
+dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
 "
 
 for u in ${_upstream}; do
@@ -101,6 +131,7 @@ post_extract() {
 	mv -T $wrksrc $_SAGE_ROOT
 	ln -srfT $_SAGE_ROOT $wrksrc
 
+	mkdir -p $wrksrc/upstream
 	for u in ${_upstream}; do
 		cp "$XBPS_SRCDISTDIR/${pkgname}-${version}/${u##*[/>]}" $wrksrc/upstream
 	done

From e11081a34f37e456ad308a05b3da376070de8b16 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 13:38:02 -0300
Subject: [PATCH 25/59] sagemath: for CI use fixed random-seed=0

---
 srcpkgs/sagemath/template | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 0de0061b09df..b5b99d2c122d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -194,6 +194,10 @@ do_check() {
 	if [ -z "$_test_args" ]; then
 		_test_args=--all
 	fi
+	if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
+		# for CI use a predictable random seed
+		_test_args="--random-seed=0 $_test_args"
+	fi
 	if [ "$XBPS_CHECK_PKGS" = full ]; then
 		_test_args="--long $_test_args"
 	else

From 6b1a8633a396d7bef03753d3d232095a62e2982b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 14:40:27 -0300
Subject: [PATCH 26/59] sagemath: upstream two patches

---
 ...ble-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch} |  6 +++---
 ...rse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch} | 10 +++++-----
 2 files changed, 8 insertions(+), 8 deletions(-)
 rename srcpkgs/sagemath/patches/{0001-sage-site-exec-only-if-it-is-executable.patch => trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch} (94%)
 rename srcpkgs/sagemath/patches/{0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch => trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch} (81%)

diff --git a/srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch b/srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
similarity index 94%
rename from srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch
rename to srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
index ce17c6d6e954..7fdb3d697222 100644
--- a/srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch
+++ b/srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
@@ -1,14 +1,14 @@
 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
+Subject: 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
+index 4c0fa17..153e610 100755
 --- a/src/bin/sage
 +++ b/src/bin/sage
 @@ -129,7 +129,7 @@ usage() {
@@ -39,5 +39,5 @@ index 4c0fa17426..153e610a2e 100755
              # fallthrough if there is no sage-site script
          fi
 -- 
-2.34.1
+cgit v1.0-1-gd88e
 
diff --git a/srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch b/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
similarity index 81%
rename from srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch
rename to srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
index bab6d8441d42..350c41ac3928 100644
--- a/srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch
+++ b/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
@@ -1,16 +1,16 @@
-From 57e3eba28c9b4ee6bd3407d0715b8bd00aaf04a7 Mon Sep 17 00:00:00 2001
+From 53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6 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
+Subject: sagetex: Fix a warning when byte-compiling sagetexparse.py
 
 ---
- .../sagetex/patches/sagetex-fix-warning.patch    | 16 ++++++++++++++++
+ build/pkgs/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
+index 00000000..d82ab67
 --- /dev/null
 +++ b/build/pkgs/sagetex/patches/sagetex-fix-warning.patch
 @@ -0,0 +1,16 @@
@@ -31,5 +31,5 @@ index 0000000000..d82ab675dd
 +     self.result += t.code[1:-1] + '\n\n'
 + 
 -- 
-2.34.1
+cgit v1.0-1-gd88e
 

From 2ec6f6de7f6023b10b180a06c572895fd63b3d4c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 19:57:59 -0300
Subject: [PATCH 27/59] sagemath: reorder upstream sources and add two missing
 ones

---
 srcpkgs/sagemath/template | 60 ++++++++++++++++++++++-----------------
 1 file changed, 34 insertions(+), 26 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index b5b99d2c122d..f53cba947c88 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -36,69 +36,77 @@ _SAGE_ROOT=/usr/lib/sage-${version}
 _SAGE_UPSTREAM_MIRROR=https://mirrors.mit.edu/sage/spkg/upstream
 
 _upstream="
-${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
 ${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
 ${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
+
+${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
 ${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
 ${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
 ${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
 ${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
 ${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
 ${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
-https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
-https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
-http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
 ${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
 ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
 ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
 ${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
 ${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${PYPI_SITE}/P/PyCygwin/PyCygwin-0.1.tar.gz
 ${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
-https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+${PYPI_SITE}/s/setuptools/setuptools-59.2.0.tar.gz
 ${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
 ${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
-https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
 ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
+
+https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
+https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
+http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
+https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
 "
 
 checksum+="
-dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
 c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
 d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
+5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
+ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
+169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
+cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
+edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
+cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
+
+dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
 3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
 03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
 5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
 cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
-5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
-c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
-6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
-07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
 a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
-ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
 d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
-169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
 5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
-cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
 471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
 78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
-edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+45a5e295590c469a49b2804bfdb89059e942d768ad3b813f484d7b5bff48d226
 ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
-b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
-3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+157d21de9d055ab9e8ea3186d91e7f4f865e11f42deafa952d90842671fc2576
 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
 545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
-cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
-718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
 dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
+
+c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
+6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
+07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
+3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
 "
 
 for u in ${_upstream}; do

From 3b6948e38352c4cd05ac958e2badd56a36d46b7f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 9 Jan 2022 12:45:47 -0300
Subject: [PATCH 28/59] sagemath: do not download anything patch

---
 .../patches/00-Do_not_download_anything.patch         | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 srcpkgs/sagemath/patches/00-Do_not_download_anything.patch

diff --git a/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch b/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch
new file mode 100644
index 000000000000..35aef7b8d456
--- /dev/null
+++ b/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch
@@ -0,0 +1,11 @@
+--- a/build/sage_bootstrap/tarball.py	2022-01-07 19:17:06.754747955 -0300
++++ b/build/sage_bootstrap/tarball.py	2022-01-07 19:25:31.844139381 -0300
+@@ -158,6 +158,8 @@
+                             .format(destination=destination))
+         successful_download = False
+         log.info('Attempting to download package {0} from mirrors'.format(self.filename))
++        log.info('ERROR: downloading is disabled, add file to template instead')
++        return
+         for mirror in MirrorList():
+             url = mirror + '/'.join(['spkg', 'upstream', self.package.name, self.filename])
+             log.info(url)

From 36abe91e9fb0dcf744995c499bde0bf40b711c42 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 9 Jan 2022 13:27:49 -0300
Subject: [PATCH 29/59] sagemath: update to 9.5.rc0.

---
 ...184f7498a2046065e669723e68efe2d65cee.patch |    6 +-
 ...1d4ced4264f65ab704f725f6f5879b012796.patch |  263 ----
 ...a54526829b79d5d236a40f83ddc6ce7b2696.patch | 1196 -----------------
 ...9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch |   27 -
 ...3f4f32246ad9ded6d37f1f2f12a589a81f4.patch} |    4 +-
 ...03138d0403be7c7cb303de2bc0a0e0b6793c.patch |   82 --
 ...f3a1611fed0cc66fb838eb85739646dd34d.patch} |   94 +-
 ...49c415e11d0522bff9013bc1509264b26ebf.patch |   27 +
 ...ip_doctest_singular_4.2.1--see_33134.patch |   13 +
 srcpkgs/sagemath/template                     |    6 +-
 10 files changed, 72 insertions(+), 1646 deletions(-)
 delete mode 100644 srcpkgs/sagemath/patches/trac-30766-system_python_3.10-df9f1d4ced4264f65ab704f725f6f5879b012796.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
 rename srcpkgs/sagemath/patches/{trac-33064-sage_docbuild_ignore_cache_save_permission_error-f767cf1eadfd8ab540a31c5c5ef09d56df09b90e.patch => trac-33064-sage_docbuild_ignore_cache_save_permission_error-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch} (92%)
 delete mode 100644 srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
 rename srcpkgs/sagemath/patches/{trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch => trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch} (63%)
 create mode 100644 srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch

diff --git a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
index b641113927e7..0ecb27c593cd 100644
--- a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
+++ b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
@@ -5615,9 +5615,9 @@ index 84f3d50..c7ad206 100644
      EXAMPLES::
  
          sage: sorted(installed_packages().keys())  # optional - build
--        [...'alabaster', ...'sage_conf', ...]
--        sage: installed_packages()['alabaster']  # optional - build, random
--        '0.7.12'
+-        [...'gmpy2', ...'sage_conf', ...]
+-        sage: installed_packages()['gmpy2']  # optional - build, random
+-        '2.1.0b5'
 +        [...'sage_conf', ...]
 +        sage: installed_packages()['sage_conf']  # optional - build, random
 +        '9.5'
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
deleted file mode 100644
index a1cb4c834482..000000000000
--- a/srcpkgs/sagemath/patches/trac-30766-system_python_3.10-df9f1d4ced4264f65ab704f725f6f5879b012796.patch
+++ /dev/null
@@ -1,263 +0,0 @@
-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-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch b/srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
deleted file mode 100644
index 3ae6fe01822d..000000000000
--- a/srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
+++ /dev/null
@@ -1,1196 +0,0 @@
-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/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch b/srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
deleted file mode 100644
index 485fb0176f45..000000000000
--- a/srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-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: 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 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"
- 
- # 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)
--- 
-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-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
similarity index 92%
rename from srcpkgs/sagemath/patches/trac-33064-sage_docbuild_ignore_cache_save_permission_error-f767cf1eadfd8ab540a31c5c5ef09d56df09b90e.patch
rename to srcpkgs/sagemath/patches/trac-33064-sage_docbuild_ignore_cache_save_permission_error-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
index 20fa12e570eb..04f04cfd6718 100644
--- 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-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
@@ -1,4 +1,4 @@
-From f767cf1eadfd8ab540a31c5c5ef09d56df09b90e Mon Sep 17 00:00:00 2001
+From e89193f4f32246ad9ded6d37f1f2f12a589a81f4 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
@@ -8,7 +8,7 @@ Subject: sage_docbuild: do not fail when cache cannot be saved
  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
+index 466ca82..f8c8ebd 100644
 --- a/src/sage_docbuild/__init__.py
 +++ b/src/sage_docbuild/__init__.py
 @@ -856,9 +856,12 @@ class ReferenceSubBuilder(DocBuilder):
diff --git a/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch b/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
deleted file mode 100644
index 6bc5193b75ee..000000000000
--- a/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-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
-
-
-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/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch b/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
similarity index 63%
rename from srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch
rename to srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
index 3794aa7f019b..04fca4815a00 100644
--- a/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch
+++ b/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
@@ -1,4 +1,4 @@
-From 7d3381b21e4716cfa8a33915621a12f0eba74233 Mon Sep 17 00:00:00 2001
+From 18d0477153af6f453a0e84f78030535f6a36ce87 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
@@ -10,56 +10,56 @@ Subject: doctests: remove dochtml label from some tests that don't need docs
  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
+index c788623..527ed90 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  # optional - sagemath_doc_html
+-        sage: thematic_index = os.path.join(SAGE_DOC, "html", "en", "thematic_tutorials", "index.html")  # optional - sagemath_doc_html
 +        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
+         sage: for line in open(thematic_index).readlines():  # optional - sagemath_doc_html
          ....:     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
+index 4c56aea..583ca06 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  # optional - sagemath_doc_html
+-    sage: docfilename = os.path.join(SAGE_DOC, 'html', 'en', 'reference', 'calculus', 'sage', 'symbolic', 'expression.html')  # optional - sagemath_doc_html
 +    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
+     sage: with open(docfilename) as fobj:  # optional - sagemath_doc_html
      ....:     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='',
+@@ -845,12 +845,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  # optional - sagemath_doc_html
+-        sage: len(_search_src_or_doc('src', r'matrix\(', 'incidence_structures', 'self', 'combinat', interact=False).splitlines()) > 1  # optional - sagemath_doc_html
 +        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)
+         sage: 'abvar/homology' in _search_src_or_doc('doc', 'homology', 'variety', interact=False)  # optional - sagemath_doc_html, 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)  # optional - sagemath_doc_html
 +        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:
+@@ -1369,7 +1369,7 @@ class _sage_doc:
  
-         sage: browse_sage_doc._open("reference", testing=True)[0]  # optional - dochtml, indirect doctest
+         sage: browse_sage_doc._open("reference", testing=True)[0]  # optional - sagemath_doc_html, 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]  # optional - sagemath_doc_html
 +        sage: browse_sage_doc(identity_matrix, 'rst')[-107:-47]
          'Full MatrixSpace of 3 by 3 sparse matrices over Integer Ring'
      """
@@ -68,7 +68,7 @@ index eb70516..b4848ed 100644
 cgit v1.0-1-gd88e
 
 
-From 42a76c3f82edecc9c6c53c661251677e3e907584 Mon Sep 17 00:00:00 2001
+From 88dd9f3a1611fed0cc66fb838eb85739646dd34d 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
@@ -78,7 +78,7 @@ Subject: doctests: add dochtml label to some tests that need docs installed
  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
+index f8c8ebd..d329009 100644
 --- a/src/sage_docbuild/__init__.py
 +++ b/src/sage_docbuild/__init__.py
 @@ -105,7 +105,7 @@ def builder_helper(type):
@@ -86,7 +86,7 @@ index 4a71c91..dd233bd 100644
          sage: from sage_docbuild import _build_many as build_many
          sage: helper = builder_helper("html")
 -        sage: try:
-+        sage: try:  # optional - dochtml
++        sage: try:  # optional - sagemath_doc_html
          ....:     build_many(build_ref_doc, [("docname", "en", "html", {})])
          ....: except Exception as E:
          ....:     "Non-exception during docbuild: abort pool operation" in str(E)
@@ -95,7 +95,7 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import DocBuilder
              sage: b = DocBuilder('tutorial')
 -            sage: b._output_dir('html')
-+            sage: b._output_dir('html')         # optional - dochtml
++            sage: b._output_dir('html')         # optional - sagemath_doc_html
              '.../html/en/tutorial'
          """
          d = os.path.join(SAGE_DOC, type, self.lang, self.name)
@@ -104,7 +104,7 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import DocBuilder
              sage: b = DocBuilder('tutorial')
 -            sage: b._doctrees_dir()
-+            sage: b._doctrees_dir()             # optional - docthml
++            sage: b._doctrees_dir()             # optional - sagemath_doc_html
              '.../doctrees/en/tutorial'
          """
          d = os.path.join(SAGE_DOC, 'doctrees', self.lang, self.name)
@@ -113,7 +113,7 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import ReferenceBuilder
              sage: b = ReferenceBuilder('reference')
 -            sage: b._output_dir('html')
-+            sage: b._output_dir('html')         # optional - dochtml
++            sage: b._output_dir('html')         # optional - sagemath_doc_html
              '.../html/en/reference'
          """
          if lang is None:
@@ -122,56 +122,10 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import ReferenceTopBuilder
              sage: b = ReferenceTopBuilder('reference')
 -            sage: b._output_dir('html')
-+            sage: b._output_dir('html')         # optional - dochtml
++            sage: b._output_dir('html')         # optional - sagemath_doc_html
              '.../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/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch b/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
new file mode 100644
index 000000000000..d32f1e4d5e9f
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
@@ -0,0 +1,27 @@
+From 836249c415e11d0522bff9013bc1509264b26ebf Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Sun, 9 Jan 2022 16:51:22 -0300
+Subject: trac 33135: add filter to ignore deprecation warnings
+
+---
+ src/sage/all.py | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/sage/all.py b/src/sage/all.py
+index 01ef327..19ca3d4 100644
+--- a/src/sage/all.py
++++ b/src/sage/all.py
+@@ -96,6 +96,10 @@ warnings.filterwarnings('ignore', category=DeprecationWarning,
+ warnings.filterwarnings('ignore', category=DeprecationWarning,
+                         module='pythran')
+ 
++warnings.filterwarnings('ignore', category=DeprecationWarning,
++                        message='The distutils(.sysconfig module| package) is deprecated',
++                        module='numpy|sage.env|sage.features')
++
+ ################ end setup warnings ###############################
+ 
+ 
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
new file mode 100644
index 000000000000..438078a92036
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage/rings/polynomial/hilbert.pyx b/src/sage/rings/polynomial/hilbert.pyx
+index 4cd91d0a46..323b168c4e 100644
+--- a/src/sage/rings/polynomial/hilbert.pyx
++++ b/src/sage/rings/polynomial/hilbert.pyx
+@@ -578,7 +578,7 @@ def hilbert_poincare_series(I, grading=None):
+ 
+     This example exceeded the capabilities of Singular before version 4.2.1p2::
+ 
+-        sage: J.hilbert_numerator(algorithm='singular')
++        sage: J.hilbert_numerator(algorithm='singular')   # not tested - requires singular 4.2.1p2
+         120*t^33 - 3465*t^32 + 48180*t^31 - 429374*t^30 + 2753520*t^29 - 13522410*t^28 + 52832780*t^27 - 168384150*t^26 + 445188744*t^25 - 987193350*t^24 + 1847488500*t^23 + 1372406746*t^22 - 403422496*t^21 - 8403314*t^20 - 471656596*t^19 + 1806623746*t^18 + 752776200*t^17 + 752776200*t^16 - 1580830020*t^15 + 1673936550*t^14 - 1294246800*t^13 + 786893250*t^12 - 382391100*t^11 + 146679390*t^10 - 42299400*t^9 + 7837830*t^8 - 172260*t^7 - 468930*t^6 + 183744*t^5 - 39270*t^4 + 5060*t^3 - 330*t^2 + 1
+ 
+     """
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f53cba947c88..f688629fc26d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -1,6 +1,6 @@
 # Template file for 'sagemath'
 pkgname=sagemath
-version=9.5.beta9
+version=9.5.rc0
 revision=1
 wrksrc=sage-$version
 build_style=configure
@@ -19,7 +19,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
-checksum=aea4c5a8d3b32af2fba644269b9daf4f62471471ba2d7d83da0f8098a5f53225
+checksum=8012e3ac35290fa9b2cb837eeca149925784c2378b486731226944e4afd8a4e6
 python_version=3
 
 build_options="debug system_python3 system_site_packages"
@@ -128,7 +128,7 @@ nostrip=yes
 noshlibprovides=yes
 
 # don't rewrite python shebang as sage uses its own python (for now)
-_no_python_shebang=yes
+#_no_python_shebang=yes
 
 # compile python code in sage venv
 pycompile_dirs="$_SAGE_ROOT/venv/"

From 75c7f82e4cdc84d9bafcc64c2cbe5d79be98a2e3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 10 Jan 2022 16:32:54 -0300
Subject: [PATCH 30/59] sagemath: use system gap

---
 ...f491e5ce599ba185f5e93f02e0fcebd76c9e.patch | 57 +++++++++++++++++++
 .../patches/zzz-skip_doctest_system_gap.patch | 13 +++++
 srcpkgs/sagemath/template                     | 15 ++++-
 3 files changed, 82 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch

diff --git a/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch b/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
new file mode 100644
index 000000000000..da88a369db0d
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
@@ -0,0 +1,57 @@
+From 2c981351bb60089530b0598d3e9a909a23d4d4d8 Mon Sep 17 00:00:00 2001
+From: Thierry Thomas <thierry@FreeBSD.org>
+Date: Mon, 22 Mar 2021 03:04:12 +0100
+Subject: 29644: Add spkg-configure.m4 for gap
+
+---
+ build/pkgs/gap/spkg-configure.m4 | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+ create mode 100644 build/pkgs/gap/spkg-configure.m4
+
+diff --git a/build/pkgs/gap/spkg-configure.m4 b/build/pkgs/gap/spkg-configure.m4
+new file mode 100644
+index 00000000..91cd089
+--- /dev/null
++++ b/build/pkgs/gap/spkg-configure.m4
+@@ -0,0 +1,8 @@
++SAGE_SPKG_CONFIGURE([gap], [
++    SAGE_SPKG_DEPCHECK([gmp], [
++       AC_CHECK_HEADER([gap/system.h], [
++        AC_SEARCH_LIBS([GAP_COMM], [gap], [
++        ], [sage_spkg_install_gap=yes])
++       ], [sage_spkg_install_gap=yes])
++    ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2a41f491e5ce599ba185f5e93f02e0fcebd76c9e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Samuel=20Leli=C3=A8vre?= <samuel.lelievre@gmail.com>
+Date: Mon, 22 Mar 2021 03:05:31 +0100
+Subject: 29644: Add distro information for gap
+
+---
+ build/pkgs/gap/distros/fedora.txt | 1 +
+ build/pkgs/gap/distros/gentoo.txt | 1 +
+ 2 files changed, 2 insertions(+)
+ create mode 100644 build/pkgs/gap/distros/fedora.txt
+ create mode 100644 build/pkgs/gap/distros/gentoo.txt
+
+diff --git a/build/pkgs/gap/distros/fedora.txt b/build/pkgs/gap/distros/fedora.txt
+new file mode 100644
+index 00000000..ea4feae
+--- /dev/null
++++ b/build/pkgs/gap/distros/fedora.txt
+@@ -0,0 +1 @@
++gap
+diff --git a/build/pkgs/gap/distros/gentoo.txt b/build/pkgs/gap/distros/gentoo.txt
+new file mode 100644
+index 00000000..ea64ec9
+--- /dev/null
++++ b/build/pkgs/gap/distros/gentoo.txt
+@@ -0,0 +1 @@
++sci-mathematics/gap
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
new file mode 100644
index 000000000000..f132591d48ac
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage_setup/optional_extension.py b/src/sage_setup/optional_extension.py
+index f252849384..4034e3e196 100644
+--- a/src/sage_setup/optional_extension.py
++++ b/src/sage_setup/optional_extension.py
+@@ -80,7 +80,7 @@ def OptionalExtension(*args, **kwds):
+         sage: print(ext.__class__.__name__)
+         CythonizeExtension
+         sage: ext = OptionalExtension("foo", ["foo.c"], package="gap")
+-        sage: print(ext.__class__.__name__)
++        sage: print(ext.__class__.__name__)     # not tested - fails with system gap
+         Extension
+     """
+     try:
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f688629fc26d..02b0af4ad16d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -66,7 +66,6 @@ ${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
 ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
 
 https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
-https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
 http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
 https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
 https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
@@ -103,7 +102,6 @@ ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
 dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
 
 c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
-6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
 07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
 3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
 718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
@@ -159,6 +157,13 @@ pre_configure() {
 	export MAKE="make -j ${XBPS_MAKEJOBS}"
 }
 
+post_configure() {
+	# we set some variables, right after configure has created sage_conf.py
+	cat <<-EOF >> pkgs/sage-conf/sage_conf.py
+	GAP_ROOT_DIR = "/usr/share/gap"
+	EOF
+}
+
 # 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
@@ -248,7 +253,11 @@ makedepends+="
  gengetopt texinfo
  brial-devel cliquer-devel gfan libbraiding-devel libhomfly-devel
  lrcalc-devel nauty-devel palp tachyon
- maxima-ecl primesieve-devel primecount-devel
+ maxima-ecl primesieve-devel primecount-devel gap-devel
+"
+
+# optional dependencies
+makedepends+="
  ffmpeg ImageMagick
 "
 

From e97cfacc19183c4cfc0e6cc8b64e95efdd010292 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Thu, 13 Jan 2022 03:21:19 -0300
Subject: [PATCH 31/59] sagemath: fixes for system gap

---
 .../zzz-fixes_for_system_gap--see_29644.patch | 96 +++++++++++++++++++
 .../patches/zzz-skip_doctest_system_gap.patch | 13 ---
 srcpkgs/sagemath/template                     |  1 +
 3 files changed, 97 insertions(+), 13 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
 delete mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch

diff --git a/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch b/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
new file mode 100644
index 000000000000..741d2b23a7f5
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
@@ -0,0 +1,96 @@
+From 346b4ea4c92f4287d3c097b92817cf2abfcddd8c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Thu, 13 Jan 2022 01:41:31 -0300
+Subject: [PATCH] gap: fixes for using system gap
+
+ - fix _get_shared_lib_path() so we don't need to configure GAP_SO
+ - fix gap_root() so we don't need to configure GAP_ROOT_DIR
+ - skip a useless test that cannot succeed on system gap
+ - use gap_root() in saved_workspace.py instead of GAP_ROOT_DIR
+---
+ src/sage/env.py                      |  2 +-
+ src/sage/libs/gap/saved_workspace.py |  4 ++--
+ src/sage/libs/gap/util.pyx           | 11 +++++++++++
+ src/sage_setup/optional_extension.py |  2 +-
+ 4 files changed, 15 insertions(+), 4 deletions(-)
+
+diff --git a/src/sage/env.py b/src/sage/env.py
+index c4953cfa65..c16696d298 100644
+--- a/src/sage/env.py
++++ b/src/sage/env.py
+@@ -293,7 +293,7 @@ def _get_shared_lib_path(*libnames: str) -> Optional[str]:
+             if sys.platform == 'darwin':
+                 ext = 'dylib'
+             else:
+-                ext = 'so'
++                ext = 'so*'
+ 
+             if SAGE_LOCAL:
+                 search_directories.append(Path(SAGE_LOCAL) / 'lib')
+diff --git a/src/sage/libs/gap/saved_workspace.py b/src/sage/libs/gap/saved_workspace.py
+index ad5adec36d..59c498795f 100644
+--- a/src/sage/libs/gap/saved_workspace.py
++++ b/src/sage/libs/gap/saved_workspace.py
+@@ -8,7 +8,7 @@ workspaces.
+ 
+ import os
+ import glob
+-from sage.env import GAP_ROOT_DIR
++from sage.libs.gap.util import gap_root
+ from sage.interfaces.gap_workspace import gap_workspace_file
+ 
+ 
+@@ -31,7 +31,7 @@ def timestamp():
+     """
+     libgap_dir = os.path.dirname(__file__)
+     libgap_files = glob.glob(os.path.join(libgap_dir, '*'))
+-    gap_packages = glob.glob(os.path.join(GAP_ROOT_DIR, 'pkg', '*'))
++    gap_packages = glob.glob(os.path.join(gap_root(), 'pkg', '*'))
+     files = libgap_files + gap_packages
+     if len(files) == 0:
+         print('Unable to find LibGAP files.')
+diff --git a/src/sage/libs/gap/util.pyx b/src/sage/libs/gap/util.pyx
+index 08c4c40cc0..c7dd557c35 100644
+--- a/src/sage/libs/gap/util.pyx
++++ b/src/sage/libs/gap/util.pyx
+@@ -23,6 +23,7 @@ from cysignals.signals cimport sig_on, sig_off
+ import os
+ import warnings
+ import sage.env
++import subprocess
+ 
+ from .gap_includes cimport *
+ from .element cimport *
+@@ -178,6 +179,16 @@ def gap_root():
+     if os.path.exists(sage.env.GAP_ROOT_DIR):
+         return sage.env.GAP_ROOT_DIR
+ 
++    gap_expr = 'JoinStringsWithSeparator(KERNEL_INFO().GAP_ROOT_PATHS,";")'
++    gap_root_paths = subprocess.getoutput(
++        f"gap -r -q --bare --nointeract -c 'Display({gap_expr});'"
++        ).strip().split(';')
++
++    for gapdir in gap_root_paths:
++        if os.path.exists(os.path.join(gapdir, 'sysinfo.gap')):
++            sage.env.GAP_ROOT_DIR = gapdir
++            return gapdir
++
+     # Attempt to figure out the appropriate GAP_ROOT by reading the
+     # local/bin/gap shell script; this is an ugly hack that exists for
+     # historical reasons; the best approach to setting where Sage looks for
+diff --git a/src/sage_setup/optional_extension.py b/src/sage_setup/optional_extension.py
+index f252849384..4034e3e196 100644
+--- a/src/sage_setup/optional_extension.py
++++ b/src/sage_setup/optional_extension.py
+@@ -80,7 +80,7 @@ def OptionalExtension(*args, **kwds):
+         sage: print(ext.__class__.__name__)
+         CythonizeExtension
+         sage: ext = OptionalExtension("foo", ["foo.c"], package="gap")
+-        sage: print(ext.__class__.__name__)
++        sage: print(ext.__class__.__name__)     # not tested - fails with system gap
+         Extension
+     """
+     try:
+-- 
+2.34.1
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
deleted file mode 100644
index f132591d48ac..000000000000
--- a/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/src/sage_setup/optional_extension.py b/src/sage_setup/optional_extension.py
-index f252849384..4034e3e196 100644
---- a/src/sage_setup/optional_extension.py
-+++ b/src/sage_setup/optional_extension.py
-@@ -80,7 +80,7 @@ def OptionalExtension(*args, **kwds):
-         sage: print(ext.__class__.__name__)
-         CythonizeExtension
-         sage: ext = OptionalExtension("foo", ["foo.c"], package="gap")
--        sage: print(ext.__class__.__name__)
-+        sage: print(ext.__class__.__name__)     # not tested - fails with system gap
-         Extension
-     """
-     try:
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 02b0af4ad16d..0d8ce1f7a70a 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -161,6 +161,7 @@ post_configure() {
 	# we set some variables, right after configure has created sage_conf.py
 	cat <<-EOF >> pkgs/sage-conf/sage_conf.py
 	GAP_ROOT_DIR = "/usr/share/gap"
+	GAP_SO = "$(objdump -p /usr/lib/libgap.so | awk '/SONAME/{print $2}')"
 	EOF
 }
 

From 3a380c61dde77f6a5667d10297b29f2fb8521cac Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Thu, 13 Jan 2022 15:47:33 -0300
Subject: [PATCH 32/59] New package: sagemath-test

---
 srcpkgs/sagemath-test/template                | 32 +++++++++++++++++++
 .../patches/zzz-skip_doctest_shebang.patch    | 11 +++++++
 2 files changed, 43 insertions(+)
 create mode 100644 srcpkgs/sagemath-test/template
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch

diff --git a/srcpkgs/sagemath-test/template b/srcpkgs/sagemath-test/template
new file mode 100644
index 000000000000..3e0b1c3233fd
--- /dev/null
+++ b/srcpkgs/sagemath-test/template
@@ -0,0 +1,32 @@
+# Template file for 'sagemath-test'
+pkgname=sagemath-test
+version=1
+revision=1
+build_style=meta
+checkdepends="sagemath"
+short_desc="Dummy package to test sagemath"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-2.0-or-later"
+homepage="none"
+
+# TODO: install base-voidstrap, uninstall base-chroot, and remove orphans
+# so we can check sagemath depends are enough to run sage on void
+
+do_check() {
+	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
+		_test_args=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	fi
+	if [ -z "$_test_args" ]; then
+		_test_args=--all
+	fi
+	if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
+		# for CI use a predictable random seed
+		_test_args="--random-seed=0 $_test_args"
+	fi
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args="--long $_test_args"
+	else
+		_test_args="--warn-long 5.0 $_test_args"
+	fi
+	/usr/bin/sage* -tp ${XBPS_MAKEJOBS} ${_test_args}
+}
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch
new file mode 100644
index 000000000000..04fa2acbf3ec
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch
@@ -0,0 +1,11 @@
+--- a/src/sage/tests/cmdline.py
++++ b/src/sage/tests/cmdline.py
+@@ -488,7 +488,7 @@ def test_executable(args, input="", timeout=100.0, pydebug_ignore_warnings=False
+         0
+ 
+         sage: (out, err, ret) = test_executable(["sage", "--cython"])
+-        sage: print(err)
++        sage: print(err)  # not tested - broken when shebang is rewritten
+         Cython (http://cython.org) is a compiler for code written in the
+         Cython language.  Cython is based on Pyrex by Greg Ewing.
+         ...

From 0bdbdb1787e5c102fbc0704352d3552821dd8202 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 11:34:23 -0300
Subject: [PATCH 33/59] sagemath: cleanup and one patch

---
 .../zzz-skip_doctest_sage_setup_find.patch    | 12 ++++++++
 srcpkgs/sagemath/template                     | 30 ++++---------------
 2 files changed, 18 insertions(+), 24 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch

diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch
new file mode 100644
index 000000000000..15aed02f9aaa
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch
@@ -0,0 +1,12 @@
+--- a/src/sage_setup/find.py
++++ b/src/sage_setup/find.py
+@@ -301,7 +301,7 @@ def find_extra_files(src_dir, modules, cythonized_dir, special_filenames=[]):
+         sage: extras["sage/libs/mpfr"]
+         [...sage/libs/mpfr/types.pxd...]
+         sage: extras["sage/ext/interpreters"]
+-        ['.../src/sage/ext/interpreters/wrapper_cdf.pxd', ...wrapper_cdf.h...]
++        ['.../src/sage/ext/interpreters/wrapper_cdf.pxd', ...]
+     """
+     from Cython.Utils import is_package_dir
+ 
+--
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 0d8ce1f7a70a..f25cb745c9c4 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -4,7 +4,8 @@ version=9.5.rc0
 revision=1
 wrksrc=sage-$version
 build_style=configure
-configure_args="--enable-build-as-root"
+configure_args="--enable-build-as-root --with-system-python3
+ --enable-system-site-packages"
 make_check_target=ptest
 # for now skip building docs
 make_build_target=build
@@ -22,13 +23,8 @@ distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
 checksum=8012e3ac35290fa9b2cb837eeca149925784c2378b486731226944e4afd8a4e6
 python_version=3
 
-build_options="debug system_python3 system_site_packages"
+build_options="debug"
 desc_option_debug="Build with debug symbols"
-desc_option_system_python="Build using system python 3"
-desc_option_system_python="Build using system python site-packages"
-build_options_default="system_python3 system_site_packages"
-configure_args+=" $(vopt_with system_python3)"
-configure_args+=" $(vopt_enable system_site_packages)"
 
 # path where sage will be installed
 _SAGE_ROOT=/usr/lib/sage-${version}
@@ -112,9 +108,6 @@ for u in ${_upstream}; do
 	skip_extraction+=" ${u##*[/>]}"
 done
 
-# 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
@@ -165,16 +158,6 @@ post_configure() {
 	EOF
 }
 
-# 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() {
 	vlicense COPYING.txt
 	vdoc README.md
@@ -301,7 +284,6 @@ _sage_python3_modules="
  python3-wheel python3-zipp pythran
  "
 
-if [ "$build_option_system_site_packages" ]; then
-	makedepends+=" $_sage_python3_modules"
-	depends+=" $_sage_python3_modules"
-fi
+# python packages are build and runtime dependencies
+makedepends+=" $_sage_python3_modules"
+depends+=" $_sage_python3_modules"

From 27ec15d3f6d3574e7344677e37d681fe92021fdd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 11:34:32 -0300
Subject: [PATCH 34/59] sagemath: update to 9.5.rc1.

---
 srcpkgs/sagemath/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f25cb745c9c4..f5d9d0f0fabd 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -1,6 +1,6 @@
 # Template file for 'sagemath'
 pkgname=sagemath
-version=9.5.rc0
+version=9.5.rc1
 revision=1
 wrksrc=sage-$version
 build_style=configure
@@ -20,7 +20,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
-checksum=8012e3ac35290fa9b2cb837eeca149925784c2378b486731226944e4afd8a4e6
+checksum=b015c54f7411669ef70bac2b2fde260e7f45724bcff170957b1f9fd08131f2c3
 python_version=3
 
 build_options="debug"

From ea41077edf87970f6ae8d9d62231f8d2362c9100 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 14:53:11 -0300
Subject: [PATCH 35/59] sagemath: patch not needed with singular 4.3.0

---
 ...zzz-skip_doctest_singular_4.2.1--see_33134.patch | 13 -------------
 1 file changed, 13 deletions(-)
 delete mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch

diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
deleted file mode 100644
index 438078a92036..000000000000
--- a/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/src/sage/rings/polynomial/hilbert.pyx b/src/sage/rings/polynomial/hilbert.pyx
-index 4cd91d0a46..323b168c4e 100644
---- a/src/sage/rings/polynomial/hilbert.pyx
-+++ b/src/sage/rings/polynomial/hilbert.pyx
-@@ -578,7 +578,7 @@ def hilbert_poincare_series(I, grading=None):
- 
-     This example exceeded the capabilities of Singular before version 4.2.1p2::
- 
--        sage: J.hilbert_numerator(algorithm='singular')
-+        sage: J.hilbert_numerator(algorithm='singular')   # not tested - requires singular 4.2.1p2
-         120*t^33 - 3465*t^32 + 48180*t^31 - 429374*t^30 + 2753520*t^29 - 13522410*t^28 + 52832780*t^27 - 168384150*t^26 + 445188744*t^25 - 987193350*t^24 + 1847488500*t^23 + 1372406746*t^22 - 403422496*t^21 - 8403314*t^20 - 471656596*t^19 + 1806623746*t^18 + 752776200*t^17 + 752776200*t^16 - 1580830020*t^15 + 1673936550*t^14 - 1294246800*t^13 + 786893250*t^12 - 382391100*t^11 + 146679390*t^10 - 42299400*t^9 + 7837830*t^8 - 172260*t^7 - 468930*t^6 + 183744*t^5 - 39270*t^4 + 5060*t^3 - 330*t^2 + 1
- 
-     """

From 8143ee82f5b3ee1140f279b73bc3fd3a2de8d16c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 14:53:25 -0300
Subject: [PATCH 36/59] sagemath: install /usr/bin/sage

---
 srcpkgs/sagemath/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f5d9d0f0fabd..49821fc982e4 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -181,7 +181,8 @@ do_install() {
 	vmkdir 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}
+	ln -sfT $_SAGE_ROOT/sage ${DESTDIR}/usr/bin/sage-${version}
+	ln -sfT sage-${version} ${DESTDIR}/usr/bin/sage
 }
 
 do_check() {

From 7ec27d7d6067abc9d832f456f81f3b53521efc9f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 16:31:25 -0300
Subject: [PATCH 37/59] New package: python3-cvxopt-1.2.7

---
 srcpkgs/python3-cvxopt/template | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 srcpkgs/python3-cvxopt/template

diff --git a/srcpkgs/python3-cvxopt/template b/srcpkgs/python3-cvxopt/template
new file mode 100644
index 000000000000..0fb769b294e0
--- /dev/null
+++ b/srcpkgs/python3-cvxopt/template
@@ -0,0 +1,20 @@
+# Template file for 'python3-cvxopt'
+pkgname=python3-cvxopt
+version=1.2.7
+revision=1
+wrksrc="cvxopt-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools"
+makedepends="python3-devel blas-devel lapack-devel SuiteSparse-devel gsl-devel glpk-devel"
+checkdepends="python3-pytest"
+short_desc="Python software for convex optimization"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-3.0-or-later"
+homepage="http://cvxopt.org/"
+distfiles="${PYPI_SITE}/c/cvxopt/cvxopt-${version}.tar.gz"
+checksum=3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
+
+pre_build() {
+	export CVXOPT_BUILD_GSL=1
+	export CVXOPT_BUILD_GLPK=1
+}

From 49769070effce73cb5c324ab444147fc181b12db Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 23:37:14 -0300
Subject: [PATCH 38/59] sagemath: rearrange upstream packages and indent

This doesn't change anything, it separates _upstream and
checksum in three blocks to make it easier to edit.
---
 srcpkgs/sagemath/template | 140 ++++++++++++++++++++------------------
 1 file changed, 74 insertions(+), 66 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 49821fc982e4..4317f1e80893 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -31,76 +31,84 @@ _SAGE_ROOT=/usr/lib/sage-${version}
 
 _SAGE_UPSTREAM_MIRROR=https://mirrors.mit.edu/sage/spkg/upstream
 
+# packages were sage is the upstream
 _upstream="
-${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
-
-${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
-${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
-${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
-${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
-${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
-${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
-${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
-${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
-${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
-${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
-${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
-${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
-${PYPI_SITE}/P/PyCygwin/PyCygwin-0.1.tar.gz
-${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
-${PYPI_SITE}/s/setuptools/setuptools-59.2.0.tar.gz
-${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
-${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
-${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
-
-https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
-http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
-https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
-https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
+ ${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
+ ${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
+ ${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
+"
+checksum+="
+ c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
+ d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
+ 5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
+ ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
+ 169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
+ cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
+ edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+ b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
+ cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
 "
 
+# packages from pypi (python modules)
+_upstream+="
+ ${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
+ ${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
+ ${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
+ ${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
+ ${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
+ ${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
+ ${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
+ ${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
+ ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
+ ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
+ ${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
+ ${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
+ ${PYPI_SITE}/P/PyCygwin/PyCygwin-0.1.tar.gz
+ ${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
+ ${PYPI_SITE}/s/setuptools/setuptools-59.2.0.tar.gz
+ ${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
+ ${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
+ ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
+"
+checksum+="
+ dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
+ 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
+ 3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
+ 03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
+ 5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
+ cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
+ 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+ a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
+ d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
+ 5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
+ 471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
+ 78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
+ 45a5e295590c469a49b2804bfdb89059e942d768ad3b813f484d7b5bff48d226
+ ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
+ 157d21de9d055ab9e8ea3186d91e7f4f865e11f42deafa952d90842671fc2576
+ 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
+ 545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
+ dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
+"
+
+# other upstream packages
+_upstream+="
+ https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
+ http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
+ https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+ https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
+"
 checksum+="
-c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
-d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
-5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
-ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
-169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
-cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
-edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
-b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
-cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
-
-dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
-4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
-3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
-03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
-5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
-cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
-581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
-a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
-d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
-5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
-471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
-78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
-45a5e295590c469a49b2804bfdb89059e942d768ad3b813f484d7b5bff48d226
-ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
-157d21de9d055ab9e8ea3186d91e7f4f865e11f42deafa952d90842671fc2576
-6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
-545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
-dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
-
-c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
-07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
-3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
-718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
+ c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
+ 07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
+ 3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+ 718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
 "
 
 for u in ${_upstream}; do

From be5f0c86cb081d87d6658b5b7b39030268711088 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 23:37:58 -0300
Subject: [PATCH 39/59] sagemath: use system cvxopt and importlib_resources

---
 srcpkgs/sagemath/template | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 4317f1e80893..5eb70a6267bb 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -59,12 +59,10 @@ checksum+="
 _upstream+="
  ${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
  ${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
- ${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
  ${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
  ${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
  ${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
  ${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
- ${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
  ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
  ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
  ${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
@@ -79,12 +77,10 @@ _upstream+="
 checksum+="
  dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
  4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
- 3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
  03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
  5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
  cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
  581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
- a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
  d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
  5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
  471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
@@ -257,9 +253,6 @@ makedepends+="
 # TODO: optional
 # 4ti2 coxeter3 libsemigroups lrslib pdf2svg perl_mongodb polymake
 
-# TODO: standard
-# cvxopt importlib_resources
-
 # python packages for trac-29665
 _sage_python3_modules="
  python3-Babel python3-Jinja2 python3-MarkupSafe python3-Pillow
@@ -291,6 +284,8 @@ _sage_python3_modules="
  python3-tornado python3-traitlets python3-typing_extensions
  python3-tzlocal python3-urllib3 python3-wcwidth python3-webencodings
  python3-wheel python3-zipp pythran
+
+ python3-cvxopt python3-importlib_resources
  "
 
 # python packages are build and runtime dependencies

From f0af0898ca3a490cfc245f49e928470302c16c27 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 01:48:08 -0300
Subject: [PATCH 40/59] sagemath-test: fix sage binary (now is just 'sage')

---
 srcpkgs/sagemath-test/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/sagemath-test/template b/srcpkgs/sagemath-test/template
index 3e0b1c3233fd..1c0d71683a1b 100644
--- a/srcpkgs/sagemath-test/template
+++ b/srcpkgs/sagemath-test/template
@@ -28,5 +28,5 @@ do_check() {
 	else
 		_test_args="--warn-long 5.0 $_test_args"
 	fi
-	/usr/bin/sage* -tp ${XBPS_MAKEJOBS} ${_test_args}
+	sage -tp ${XBPS_MAKEJOBS} ${_test_args}
 }

From 95eaa2c36333b09eba6dc377ba4a86a2b3ee78a5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 10:49:04 -0300
Subject: [PATCH 41/59] sagemath: disallow fuzz in patches

---
 ...49c415e11d0522bff9013bc1509264b26ebf.patch | 27 -------------------
 srcpkgs/sagemath/template                     |  1 +
 2 files changed, 1 insertion(+), 27 deletions(-)
 delete mode 100644 srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch

diff --git a/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch b/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
deleted file mode 100644
index d32f1e4d5e9f..000000000000
--- a/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 836249c415e11d0522bff9013bc1509264b26ebf Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
-Date: Sun, 9 Jan 2022 16:51:22 -0300
-Subject: trac 33135: add filter to ignore deprecation warnings
-
----
- src/sage/all.py | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/src/sage/all.py b/src/sage/all.py
-index 01ef327..19ca3d4 100644
---- a/src/sage/all.py
-+++ b/src/sage/all.py
-@@ -96,6 +96,10 @@ warnings.filterwarnings('ignore', category=DeprecationWarning,
- warnings.filterwarnings('ignore', category=DeprecationWarning,
-                         module='pythran')
- 
-+warnings.filterwarnings('ignore', category=DeprecationWarning,
-+                        message='The distutils(.sysconfig module| package) is deprecated',
-+                        module='numpy|sage.env|sage.features')
-+
- ################ end setup warnings ###############################
- 
- 
--- 
-cgit v1.0-1-gd88e
-
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 5eb70a6267bb..e5a728b2217d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -22,6 +22,7 @@ homepage="http://sagemath.org/"
 distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
 checksum=b015c54f7411669ef70bac2b2fde260e7f45724bcff170957b1f9fd08131f2c3
 python_version=3
+patch_args="-F0 -Np1"
 
 build_options="debug"
 desc_option_debug="Build with debug symbols"

From 1d307a5b46f8a852536aad4fbec2b77085e56184 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 13:27:53 -0300
Subject: [PATCH 42/59] sagemath: disable packages that are not needed

 - appnope: only needed for macos
 - fonttools: only needed to build matplotlib
 - importlib_resources: only needed for old python
 - pycygwin: only needed for cygwin
 - setuptools_scm_git_archive: only needed to build matplotlib
 - setuptools_wheel: not needed
 - sphinxcontrib_websupport: only needed to build sphinx
 - cppy: force use from system python3-cppy
---
 srcpkgs/sagemath/template | 51 +++++++++++++++++++++++++++------------
 1 file changed, 35 insertions(+), 16 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index e5a728b2217d..f15bfbf76e0a 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -58,39 +58,29 @@ checksum+="
 
 # packages from pypi (python modules)
 _upstream+="
- ${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
- ${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
  ${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
  ${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
  ${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
- ${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
+
  ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
  ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
  ${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
  ${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
- ${PYPI_SITE}/P/PyCygwin/PyCygwin-0.1.tar.gz
+
  ${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
- ${PYPI_SITE}/s/setuptools/setuptools-59.2.0.tar.gz
- ${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
- ${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
  ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
 "
 checksum+="
- dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
- 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
  03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
  5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
  cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
- 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+
  d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
  5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
  471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
  78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
- 45a5e295590c469a49b2804bfdb89059e942d768ad3b813f484d7b5bff48d226
+
  ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
- 157d21de9d055ab9e8ea3186d91e7f4f865e11f42deafa952d90842671fc2576
- 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
- 545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
  dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
 "
 
@@ -108,6 +98,22 @@ checksum+="
  718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
 "
 
+# these packages are not needed, don't install
+_dontinstall="
+ appnope
+ fonttools
+ importlib_resources
+ pycygwin
+ setuptools_scm_git_archive
+ setuptools_wheel
+ sphinxcontrib_websupport
+"
+
+# these packages can be used from system
+_usefromsystem="
+ cppy
+"
+
 for u in ${_upstream}; do
 	distfiles+=" $u"
 	skip_extraction+=" ${u##*[/>]}"
@@ -145,8 +151,20 @@ do_clean() {
 	rm -rf $wrksrc $_SAGE_ROOT
 }
 
-pre_configure() {
+post_patch() {
 	./bootstrap
+}
+
+pre_configure() {
+	for spkg in $_dontinstall; do
+		configure_args+=" sage_spkg_install_$spkg=no"
+		configure_args+=" sage_require_$spkg=no"
+	done
+
+	for spkg in $_usefromsystem; do
+		configure_args+=" sage_spkg_install_$spkg=no"
+		configure_args+=" sage_require_$spkg=yes"
+	done
 
 	if [ "$build_option_debug" ]; then
 		export SAGE_DEBUG=yes
@@ -286,7 +304,8 @@ _sage_python3_modules="
  python3-tzlocal python3-urllib3 python3-wcwidth python3-webencodings
  python3-wheel python3-zipp pythran
 
- python3-cvxopt python3-importlib_resources
+ python3-cvxopt
+ python3-cppy
  "
 
 # python packages are build and runtime dependencies

From fec4d063e2ed623777b2ce3f558b5fcd839dc185 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 17:32:39 -0300
Subject: [PATCH 43/59] New package: python3-cysignals-1.11.2

---
 .../python3-cysignals/patches/fix-write.patch | 46 +++++++++++++++++++
 srcpkgs/python3-cysignals/template            | 19 ++++++++
 2 files changed, 65 insertions(+)
 create mode 100644 srcpkgs/python3-cysignals/patches/fix-write.patch
 create mode 100644 srcpkgs/python3-cysignals/template

diff --git a/srcpkgs/python3-cysignals/patches/fix-write.patch b/srcpkgs/python3-cysignals/patches/fix-write.patch
new file mode 100644
index 000000000000..18206bd808d7
--- /dev/null
+++ b/srcpkgs/python3-cysignals/patches/fix-write.patch
@@ -0,0 +1,46 @@
+Fix a doctest failure which triggers in i686.
+
+The example is in the function `test_bad_str()` in the file `tests.pyx`.
+The test pases a bad string to `sig_str()` and then raises `SIGILL`. The
+signal handler eventually raises a Python exception which in turn raises
+a `SIGSEGV` when accessing the bad string. An error message is expected,
+but that doesn't happen.
+
+Presumably the segfault happens inside some stdio function which leaves
+stdio buffers in an inconsistent state so the latter `fprintf` doesn't
+work properly. From signal-safety(7):
+
+    Suppose that the main program is in the middle of a call to a
+    stdio function such as printf(3) where the buffer and associated
+    variables have been partially updated.  If, at that moment, the
+    program is interrupted by a signal handler that also calls
+    printf(3), then the second call to printf(3) will operate on
+    inconsistent data, with unpredictable results.
+
+We fix this by replacing the `fprintf` by calls to `write`, which is
+async-signal-safe according to POSIX.
+
+--- a/src/cysignals/implementation.c      2022-01-16 22:36:45.143796872 +0000
++++ b/src/cysignals/implementation.c      2022-01-17 02:22:31.196695043 +0000
+@@ -638,12 +622,15 @@
+ #endif
+ 
+     if (s) {
++        /* Using fprintf from inside a signal handler is undefined, see signal-safety(7) */
++        const char * message =
++            "\n"
++            "This probably occurred because a *compiled* module has a bug\n"
++            "in it and is not properly wrapped with sig_on(), sig_off().\n"
++            "Python will now terminate.\n"
++            "------------------------------------------------------------------------\n";
++        write(2, s, strlen(s));
++        write(2, message, strlen(message));
+-        fprintf(stderr,
+-            "%s\n"
+-            "This probably occurred because a *compiled* module has a bug\n"
+-            "in it and is not properly wrapped with sig_on(), sig_off().\n"
+-            "Python will now terminate.\n", s);
+-        print_sep();
+     }
+ 
+ dienow:
diff --git a/srcpkgs/python3-cysignals/template b/srcpkgs/python3-cysignals/template
new file mode 100644
index 000000000000..4655eead2a9c
--- /dev/null
+++ b/srcpkgs/python3-cysignals/template
@@ -0,0 +1,19 @@
+# Template file for 'python3-cysignals'
+pkgname=python3-cysignals
+version=1.11.2
+revision=1
+wrksrc="cysignals-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools python3-Cython autoconf"
+makedepends="python3-devel pari-devel"
+short_desc="Interrupt and signal handling for Cython "
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/sagemath/cysignals"
+distfiles="${PYPI_SITE}/c/cysignals/cysignals-${version}.tar.gz"
+checksum=5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
+nocross=yes # runs binaries built for target
+
+do_check() {
+	make check
+}

From 97f4e3be91bd4f30a89db3bb6887dc0846cd9e91 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 18:28:55 -0300
Subject: [PATCH 44/59] New package: python3-cypari2-2.1.2

---
 srcpkgs/python3-cypari2/template | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 srcpkgs/python3-cypari2/template

diff --git a/srcpkgs/python3-cypari2/template b/srcpkgs/python3-cypari2/template
new file mode 100644
index 000000000000..18755ec020b4
--- /dev/null
+++ b/srcpkgs/python3-cypari2/template
@@ -0,0 +1,19 @@
+# Template file for 'python3-cypari2'
+pkgname=python3-cypari2
+version=2.1.2
+revision=1
+wrksrc=cypari2-${version}
+build_style=python3-module
+hostmakedepends="python3-setuptools python3-Cython pari perl"
+makedepends="python3-devel python3-cysignals pari-devel gmp-devel"
+short_desc="Python interface to the number theory library PARI/GP"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-2.0-or-later"
+homepage="https://github.com/sagemath/cypari2"
+distfiles="${PYPI_SITE}/c/cypari2/cypari2-${version}.tar.gz"
+checksum=03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
+
+do_check() {
+	PYTHONPATH="$(cd build/lib* && pwd)" \
+		make check
+}

From dca176d202e0adbac1c0cca79e8919acfb53bcb8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 18:56:29 -0300
Subject: [PATCH 45/59] New package: python3-pplpy-0.8.7

---
 srcpkgs/python3-pplpy/template | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 srcpkgs/python3-pplpy/template

diff --git a/srcpkgs/python3-pplpy/template b/srcpkgs/python3-pplpy/template
new file mode 100644
index 000000000000..1cb69ffe6a07
--- /dev/null
+++ b/srcpkgs/python3-pplpy/template
@@ -0,0 +1,21 @@
+# Template file for 'python3-pplpy'
+pkgname=python3-pplpy
+version=0.8.7
+revision=1
+wrksrc="pplpy-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools python3-Cython"
+makedepends="python3-cysignals python3-gmpy2 python3-devel gmp-devel
+ gmpxx-devel ppl-devel mpfr-devel libmpc-devel pari-devel"
+short_desc="Python wrapper to the C++ Parma Polyhedra Library (PPL)"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-3.0-or-later"
+homepage="https://gitlab.com/videlec/pplpy"
+changelog="https://gitlab.com/videlec/pplpy/-/raw/master/CHANGES.txt"
+distfiles="${PYPI_SITE}/p/pplpy/pplpy-${version}.tar.gz"
+checksum=500bd0f4ae1a76956fae7fcba77854f5ec3e64fce76803664983763c3f2bd8bd
+
+do_check() {
+	PYTHONPATH=$(cd build/lib* && pwd) \
+		python setup.py test
+}

From 80c9b9342d5a6e496f9ac5419b670926ff84a310 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 01:14:24 -0300
Subject: [PATCH 46/59] New package: python3-fpylll-0.5.6

---
 srcpkgs/python3-fpylll/template | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 srcpkgs/python3-fpylll/template

diff --git a/srcpkgs/python3-fpylll/template b/srcpkgs/python3-fpylll/template
new file mode 100644
index 000000000000..dd2adcee6fce
--- /dev/null
+++ b/srcpkgs/python3-fpylll/template
@@ -0,0 +1,25 @@
+# Template file for 'python3-fpylll'
+pkgname=python3-fpylll
+version=0.5.6
+revision=1
+wrksrc="fpylll-${version}"
+build_style=python3-module
+hostmakedepends="python3-Cython"
+makedepends="python3-cysignals python3-devel gmp-devel mpfr-devel fplll-devel
+ pari-devel"
+checkdepends="python3-pytest python3-numpy"
+short_desc="Python wrapper to fplll (floating point lattice algorithms)"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-2.0-or-later"
+homepage="https://github.com/fplll/fpylll"
+distfiles="${PYPI_SITE}/f/fpylll/fpylll-${version}.tar.gz"
+checksum=6eb8a63fb933c0bf92f290dd66fd884807659214d0ce524afe3687a6a6b13a8b
+
+case $XBPS_TARGET_MACHINE in
+	# skip a test with numerical noise on 32 bit
+	i686*) make_check_args="-k not(averaged_simulate_prob)" ;;
+esac
+
+pre_check() {
+	export PY_IGNORE_IMPORTMISMATCH=1
+}

From 09fd6926bdea64c140a2356f156bf074a8d13f4b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 18:32:13 -0300
Subject: [PATCH 47/59] sagemath: use system Cython, cysignals, cypari2, pplpy,
 fpylll

---
 srcpkgs/sagemath/template | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f15bfbf76e0a..ba22ffbeaf30 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -58,26 +58,18 @@ checksum+="
 
 # packages from pypi (python modules)
 _upstream+="
- ${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
- ${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
- ${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
 
  ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
  ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
- ${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
  ${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
 
  ${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
  ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
 "
 checksum+="
- 03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
- 5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
- cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
 
  d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
  5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
- 471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
  78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
 
  ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
@@ -86,13 +78,11 @@ checksum+="
 
 # other upstream packages
 _upstream+="
- https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
  http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
  https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
  https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
 "
 checksum+="
- c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
  07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
  3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
  718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
@@ -107,11 +97,17 @@ _dontinstall="
  setuptools_scm_git_archive
  setuptools_wheel
  sphinxcontrib_websupport
+ pplpy_doc
 "
 
 # these packages can be used from system
 _usefromsystem="
  cppy
+ cython
+ cysignals
+ cypari
+ pplpy
+ fpylll
 "
 
 for u in ${_upstream}; do
@@ -306,6 +302,11 @@ _sage_python3_modules="
 
  python3-cvxopt
  python3-cppy
+ python3-Cython
+ python3-cysignals
+ python3-cypari2
+ python3-pplpy
+ python3-fpylll
  "
 
 # python packages are build and runtime dependencies

From d27012d85b95ae364f7833ce8adab7c1c80857a2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 01:15:55 -0300
Subject: [PATCH 48/59] sagemath: update to 9.5.rc2.

---
 srcpkgs/sagemath/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index ba22ffbeaf30..b9bd590b61ca 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -1,6 +1,6 @@
 # Template file for 'sagemath'
 pkgname=sagemath
-version=9.5.rc1
+version=9.5.rc2
 revision=1
 wrksrc=sage-$version
 build_style=configure
@@ -20,7 +20,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
-checksum=b015c54f7411669ef70bac2b2fde260e7f45724bcff170957b1f9fd08131f2c3
+checksum=c7eba867c11ab1b6d04535dd8df54640d3de0625ad96cdac17b17af977d96dce
 python_version=3
 patch_args="-F0 -Np1"
 

From 41ec1da54bb68d1ba49a48c0b46b0020611460b6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 09:52:14 -0300
Subject: [PATCH 49/59] sagemath: add timing information for doctests

This makes doctesting faster on many threads
---
 srcpkgs/sagemath-test/files/timings2.json |   1 +
 srcpkgs/sagemath-test/template            |  22 +-
 srcpkgs/sagemath/files/timings2.json      | 255 ++++++++++++++++++++++
 srcpkgs/sagemath/template                 |  21 +-
 4 files changed, 279 insertions(+), 20 deletions(-)
 create mode 120000 srcpkgs/sagemath-test/files/timings2.json
 create mode 100644 srcpkgs/sagemath/files/timings2.json

diff --git a/srcpkgs/sagemath-test/files/timings2.json b/srcpkgs/sagemath-test/files/timings2.json
new file mode 120000
index 000000000000..25d5309fc818
--- /dev/null
+++ b/srcpkgs/sagemath-test/files/timings2.json
@@ -0,0 +1 @@
+../../sagemath/files/timings2.json
\ No newline at end of file
diff --git a/srcpkgs/sagemath-test/template b/srcpkgs/sagemath-test/template
index 1c0d71683a1b..e3b1242bd338 100644
--- a/srcpkgs/sagemath-test/template
+++ b/srcpkgs/sagemath-test/template
@@ -14,19 +14,21 @@ homepage="none"
 
 do_check() {
 	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
-		_test_args=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+		_test_files=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	else
+		_test_files=--all
 	fi
-	if [ -z "$_test_args" ]; then
-		_test_args=--all
+	cp ${FILESDIR}/timings2.json .
+	_test_args="--stats_path=timings2.json"
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args+=" --long --warn-long 20.0"
+	else
+		_test_args+=" --warn-long 10.0"
 	fi
 	if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
 		# for CI use a predictable random seed
-		_test_args="--random-seed=0 $_test_args"
-	fi
-	if [ "$XBPS_CHECK_PKGS" = full ]; then
-		_test_args="--long $_test_args"
-	else
-		_test_args="--warn-long 5.0 $_test_args"
+		_test_args+=" --random-seed=0"
 	fi
-	sage -tp ${XBPS_MAKEJOBS} ${_test_args}
+	# since make check will build the docs, run test like this instead
+	sage -tp ${XBPS_MAKEJOBS} ${_test_args} ${_test_files}
 }
diff --git a/srcpkgs/sagemath/files/timings2.json b/srcpkgs/sagemath/files/timings2.json
new file mode 100644
index 000000000000..958a56d9d6f5
--- /dev/null
+++ b/srcpkgs/sagemath/files/timings2.json
@@ -0,0 +1,255 @@
+{
+  "doc.en.constructions.calculus": {"walltime": 64},
+  "doc.en.constructions.plotting": {"walltime": 28},
+  "doc.en.prep.Advanced-2DPlotting": {"walltime": 13},
+  "doc.en.thematic_tutorials.geometry.polyhedra_tutorial": {"walltime": 12},
+  "doc.en.thematic_tutorials.sandpile": {"walltime": 15},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_advanced": {"walltime": 31},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_cartesian": {"walltime": 36},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_change": {"walltime": 28},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_curvilinear": {"walltime": 35},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_plane": {"walltime": 18},
+  "sage.algebras.commutative_dga": {"walltime": 13},
+  "sage.algebras.lie_algebras.classical_lie_algebra": {"walltime": 121},
+  "sage.algebras.lie_algebras.nilpotent_lie_algebra": {"walltime": 13},
+  "sage.algebras.quantum_clifford": {"walltime": 13},
+  "sage.algebras.quatalg.quaternion_algebra": {"walltime": 10},
+  "sage.algebras.steenrod.steenrod_algebra": {"walltime": 51},
+  "sage.arith.misc": {"walltime": 24},
+  "sage.calculus.calculus": {"walltime": 16},
+  "sage.calculus.functional": {"walltime": 12},
+  "sage.calculus.riemann": {"walltime": 49},
+  "sage.calculus.tests": {"walltime": 15},
+  "sage.calculus.transforms.dwt": {"walltime": 25},
+  "sage.categories.finite_monoids": {"walltime": 13},
+  "sage.categories.super_hopf_algebras_with_basis": {"walltime": 27},
+  "sage.coding.ag_code": {"walltime": 48},
+  "sage.coding.ag_code_decoders": {"walltime": 187},
+  "sage.coding.linear_code": {"walltime": 19},
+  "sage.combinat.backtrack": {"walltime": 30},
+  "sage.combinat.chas.wqsym": {"walltime": 42},
+  "sage.combinat.cluster_algebra_quiver.cluster_seed": {"walltime": 60},
+  "sage.combinat.cluster_algebra_quiver.quiver": {"walltime": 169},
+  "sage.combinat.crystals.affine_factorization": {"walltime": 13},
+  "sage.combinat.crystals.alcove_path": {"walltime": 37},
+  "sage.combinat.crystals.kirillov_reshetikhin": {"walltime": 16},
+  "sage.combinat.crystals.littelmann_path": {"walltime": 13},
+  "sage.combinat.crystals.mv_polytopes": {"walltime": 20},
+  "sage.combinat.crystals.pbw_crystal": {"walltime": 21},
+  "sage.combinat.designs.database": {"walltime": 21},
+  "sage.combinat.designs.gen_quadrangles_with_spread": {"walltime": 114},
+  "sage.combinat.designs.orthogonal_arrays_build_recursive": {"walltime": 12},
+  "sage.combinat.diagram_algebras": {"walltime": 49},
+  "sage.combinat.fqsym": {"walltime": 22},
+  "sage.combinat.k_tableau": {"walltime": 14},
+  "sage.combinat.ncsf_qsym.ncsf": {"walltime": 14},
+  "sage.combinat.ncsf_qsym.qsym": {"walltime": 12},
+  "sage.combinat.partition": {"walltime": 11},
+  "sage.combinat.partition_kleshchev": {"walltime": 19},
+  "sage.combinat.posets.moebius_algebra": {"walltime": 12},
+  "sage.combinat.rigged_configurations.kr_tableaux": {"walltime": 28},
+  "sage.combinat.rigged_configurations.rigged_configurations": {"walltime": 13},
+  "sage.combinat.rigged_configurations.tensor_product_kr_tableaux": {"walltime": 15},
+  "sage.combinat.root_system.integrable_representations": {"walltime": 12},
+  "sage.combinat.root_system.non_symmetric_macdonald_polynomials": {"walltime": 21},
+  "sage.combinat.root_system.plot": {"walltime": 37},
+  "sage.combinat.root_system.root_lattice_realization_algebras": {"walltime": 17},
+  "sage.combinat.root_system.root_lattice_realizations": {"walltime": 24},
+  "sage.combinat.rsk": {"walltime": 36},
+  "sage.combinat.sf.classical": {"walltime": 11},
+  "sage.combinat.sf.k_dual": {"walltime": 13},
+  "sage.combinat.sf.llt": {"walltime": 13},
+  "sage.combinat.sf.macdonald": {"walltime": 58},
+  "sage.combinat.sf.sfa": {"walltime": 25},
+  "sage.combinat.shifted_primed_tableau": {"walltime": 14},
+  "sage.combinat.symmetric_group_algebra": {"walltime": 11},
+  "sage.combinat.tableau": {"walltime": 20},
+  "sage.combinat.tableau_tuple": {"walltime": 29},
+  "sage.combinat.tiling": {"walltime": 305},
+  "sage.combinat.tutorial": {"walltime": 13},
+  "sage.combinat.words.paths": {"walltime": 85},
+  "sage.crypto.block_cipher.des": {"walltime": 21},
+  "sage.crypto.mq.sr": {"walltime": 53},
+  "sage.crypto.sbox": {"walltime": 14},
+  "sage.doctest.forker": {"walltime": 14},
+  "sage.doctest.sources": {"walltime": 93},
+  "sage.doctest.test": {"walltime": 149},
+  "sage.dynamics.arithmetic_dynamics.projective_ds": {"walltime": 48},
+  "sage.dynamics.complex_dynamics.mandel_julia": {"walltime": 16},
+  "sage.functions.bessel": {"walltime": 14},
+  "sage.functions.exp_integral": {"walltime": 12},
+  "sage.functions.other": {"walltime": 15},
+  "sage.geometry.cone": {"walltime": 24},
+  "sage.geometry.hyperplane_arrangement.arrangement": {"walltime": 14},
+  "sage.geometry.lattice_polytope": {"walltime": 12},
+  "sage.geometry.polyhedral_complex": {"walltime": 11},
+  "sage.geometry.polyhedron.base": {"walltime": 33},
+  "sage.geometry.polyhedron.library": {"walltime": 41},
+  "sage.geometry.riemannian_manifolds.parametrized_surface3d": {"walltime": 22},
+  "sage.geometry.triangulation.base": {"walltime": 22},
+  "sage.geometry.triangulation.point_configuration": {"walltime": 14},
+  "sage.graphs.connectivity": {"walltime": 17},
+  "sage.graphs.generators.basic": {"walltime": 10},
+  "sage.graphs.generators.classical_geometries": {"walltime": 30},
+  "sage.graphs.generators.distance_regular": {"walltime": 196},
+  "sage.graphs.generators.families": {"walltime": 21},
+  "sage.graphs.generators.smallgraphs": {"walltime": 22},
+  "sage.graphs.generic_graph": {"walltime": 29},
+  "sage.graphs.genus": {"walltime": 12},
+  "sage.graphs.graph": {"walltime": 20},
+  "sage.graphs.strongly_regular_db": {"walltime": 22},
+  "sage.groups.cubic_braid": {"walltime": 19},
+  "sage.groups.fqf_orthogonal": {"walltime": 19},
+  "sage.groups.lie_gps.nilpotent_lie_group": {"walltime": 10},
+  "sage.groups.matrix_gps.heisenberg": {"walltime": 41},
+  "sage.groups.perm_gps.cubegroup": {"walltime": 11},
+  "sage.homology.homology_vector_space_with_basis": {"walltime": 10},
+  "sage.interacts.test_jupyter": {"walltime": 17},
+  "sage.interfaces.gap": {"walltime": 11},
+  "sage.interfaces.maxima_abstract": {"walltime": 46},
+  "sage.libs.eclib.interface": {"walltime": 22},
+  "sage.libs.eclib.mwrank": {"walltime": 16},
+  "sage.libs.gap.test_long": {"walltime": 43},
+  "sage.libs.giac": {"walltime": 42},
+  "sage.manifolds.chart": {"walltime": 34},
+  "sage.manifolds.differentiable.affine_connection": {"walltime": 138},
+  "sage.manifolds.differentiable.automorphismfield": {"walltime": 33},
+  "sage.manifolds.differentiable.characteristic_cohomology_class": {"walltime": 260},
+  "sage.manifolds.differentiable.curve": {"walltime": 18},
+  "sage.manifolds.differentiable.degenerate": {"walltime": 27},
+  "sage.manifolds.differentiable.degenerate_submanifold": {"walltime": 239},
+  "sage.manifolds.differentiable.diff_form": {"walltime": 48},
+  "sage.manifolds.differentiable.diff_map": {"walltime": 10},
+  "sage.manifolds.differentiable.examples.euclidean": {"walltime": 48},
+  "sage.manifolds.differentiable.examples.sphere": {"walltime": 33},
+  "sage.manifolds.differentiable.integrated_curve": {"walltime": 29},
+  "sage.manifolds.differentiable.levi_civita_connection": {"walltime": 27},
+  "sage.manifolds.differentiable.manifold": {"walltime": 12},
+  "sage.manifolds.differentiable.manifold_homset": {"walltime": 16},
+  "sage.manifolds.differentiable.metric": {"walltime": 95},
+  "sage.manifolds.differentiable.mixed_form": {"walltime": 14},
+  "sage.manifolds.differentiable.mixed_form_algebra": {"walltime": 11},
+  "sage.manifolds.differentiable.multivectorfield": {"walltime": 71},
+  "sage.manifolds.differentiable.pseudo_riemannian": {"walltime": 20},
+  "sage.manifolds.differentiable.pseudo_riemannian_submanifold": {"walltime": 127},
+  "sage.manifolds.differentiable.scalarfield": {"walltime": 19},
+  "sage.manifolds.differentiable.tangent_vector": {"walltime": 17},
+  "sage.manifolds.differentiable.tensorfield": {"walltime": 128},
+  "sage.manifolds.differentiable.tensorfield_paral": {"walltime": 15},
+  "sage.manifolds.differentiable.vector_bundle": {"walltime": 13},
+  "sage.manifolds.differentiable.vectorfield": {"walltime": 53},
+  "sage.manifolds.point": {"walltime": 21},
+  "sage.manifolds.scalarfield": {"walltime": 15},
+  "sage.manifolds.section": {"walltime": 28},
+  "sage.matrix.matrix2": {"walltime": 18},
+  "sage.matrix.matrix_integer_dense": {"walltime": 15},
+  "sage.matrix.matrix_integer_dense_hnf": {"walltime": 35},
+  "sage.matroids.catalog": {"walltime": 59},
+  "sage.misc.cachefunc": {"walltime": 13},
+  "sage.misc.functional": {"walltime": 10},
+  "sage.misc.randstate": {"walltime": 16},
+  "sage.misc.sagedoc": {"walltime": 56},
+  "sage.misc.sageinspect": {"walltime": 38},
+  "sage.modular.abvar.abvar": {"walltime": 12},
+  "sage.modular.abvar.lseries": {"walltime": 10},
+  "sage.modular.btquotients.pautomorphicform": {"walltime": 31},
+  "sage.modular.hypergeometric_motive": {"walltime": 12},
+  "sage.modular.local_comp.local_comp": {"walltime": 27},
+  "sage.modular.local_comp.type_space": {"walltime": 24},
+  "sage.modular.modform.ambient_R": {"walltime": 11},
+  "sage.modular.modform.cuspidal_submodule": {"walltime": 15},
+  "sage.modular.modform.element": {"walltime": 60},
+  "sage.modular.modform.ring": {"walltime": 50},
+  "sage.modular.modform_hecketriangle.abstract_space": {"walltime": 12},
+  "sage.modular.modform_hecketriangle.graded_ring_element": {"walltime": 23},
+  "sage.modular.modform_hecketriangle.hecke_triangle_group_element": {"walltime": 26},
+  "sage.modular.modform_hecketriangle.readme": {"walltime": 19},
+  "sage.modular.modsym.ambient": {"walltime": 15},
+  "sage.modular.pollack_stevens.modsym": {"walltime": 63},
+  "sage.modular.pollack_stevens.padic_lseries": {"walltime": 36},
+  "sage.modules.finite_submodule_iter": {"walltime": 22},
+  "sage.modules.free_module": {"walltime": 22},
+  "sage.modules.free_module_integer": {"walltime": 28},
+  "sage.modules.torsion_quadratic_module": {"walltime": 22},
+  "sage.plot.animate": {"walltime": 129},
+  "sage.plot.contour_plot": {"walltime": 38},
+  "sage.plot.graphics": {"walltime": 43},
+  "sage.plot.line": {"walltime": 12},
+  "sage.plot.matrix_plot": {"walltime": 15},
+  "sage.plot.multigraphics": {"walltime": 26},
+  "sage.plot.plot": {"walltime": 77},
+  "sage.plot.plot3d.base": {"walltime": 12},
+  "sage.plot.plot3d.implicit_plot3d": {"walltime": 20},
+  "sage.plot.plot3d.parametric_plot3d": {"walltime": 11},
+  "sage.plot.plot3d.plot3d": {"walltime": 18},
+  "sage.plot.plot3d.transform": {"walltime": 34},
+  "sage.quadratic_forms.genera.genus": {"walltime": 19},
+  "sage.quadratic_forms.quadratic_form__local_representation_conditions": {"walltime": 48},
+  "sage.rings.asymptotic.asymptotic_expansion_generators": {"walltime": 61},
+  "sage.rings.asymptotic.asymptotics_multivariate_generating_functions": {"walltime": 36},
+  "sage.rings.function_field.function_field": {"walltime": 225},
+  "sage.rings.function_field.function_field_valuation": {"walltime": 47},
+  "sage.rings.function_field.ideal": {"walltime": 10},
+  "sage.rings.integer": {"walltime": 164},
+  "sage.rings.number_field.number_field": {"walltime": 79},
+  "sage.rings.number_field.number_field_element": {"walltime": 13},
+  "sage.rings.number_field.totallyreal": {"walltime": 14},
+  "sage.rings.padics.padic_base_leaves": {"walltime": 76},
+  "sage.rings.padics.padic_extension_leaves": {"walltime": 46},
+  "sage.rings.padics.padic_generic_element": {"walltime": 14},
+  "sage.rings.padics.padic_lattice_element": {"walltime": 25},
+  "sage.rings.padics.relative_extension_leaves": {"walltime": 42},
+  "sage.rings.polynomial.multi_polynomial_ideal": {"walltime": 11},
+  "sage.rings.polynomial.multi_polynomial_sequence": {"walltime": 28},
+  "sage.rings.polynomial.polynomial_element": {"walltime": 16},
+  "sage.rings.polynomial.polynomial_zmod_flint": {"walltime": 336},
+  "sage.rings.qqbar": {"walltime": 21},
+  "sage.rings.tests": {"walltime": 19},
+  "sage.rings.valuation.augmented_valuation": {"walltime": 28},
+  "sage.rings.valuation.mapped_valuation": {"walltime": 56},
+  "sage.schemes.curves.affine_curve": {"walltime": 23},
+  "sage.schemes.curves.projective_curve": {"walltime": 24},
+  "sage.schemes.cyclic_covers.cycliccover_finite_field": {"walltime": 78},
+  "sage.schemes.elliptic_curves.BSD": {"walltime": 10},
+  "sage.schemes.elliptic_curves.constructor": {"walltime": 27},
+  "sage.schemes.elliptic_curves.ell_curve_isogeny": {"walltime": 21},
+  "sage.schemes.elliptic_curves.ell_egros": {"walltime": 28},
+  "sage.schemes.elliptic_curves.ell_modular_symbols": {"walltime": 12},
+  "sage.schemes.elliptic_curves.ell_number_field": {"walltime": 120},
+  "sage.schemes.elliptic_curves.ell_rational_field": {"walltime": 133},
+  "sage.schemes.elliptic_curves.gal_reps_number_field": {"walltime": 35},
+  "sage.schemes.elliptic_curves.gp_simon": {"walltime": 22},
+  "sage.schemes.elliptic_curves.heegner": {"walltime": 39},
+  "sage.schemes.elliptic_curves.height": {"walltime": 56},
+  "sage.schemes.elliptic_curves.isogeny_class": {"walltime": 38},
+  "sage.schemes.elliptic_curves.isogeny_small_degree": {"walltime": 274},
+  "sage.schemes.elliptic_curves.kraus": {"walltime": 12},
+  "sage.schemes.elliptic_curves.mod_sym_num": {"walltime": 12},
+  "sage.schemes.elliptic_curves.padics": {"walltime": 15},
+  "sage.schemes.elliptic_curves.saturation": {"walltime": 19},
+  "sage.schemes.elliptic_curves.sha_tate": {"walltime": 23},
+  "sage.schemes.hyperelliptic_curves.hyperelliptic_finite_field": {"walltime": 65},
+  "sage.schemes.hyperelliptic_curves.hyperelliptic_padic_field": {"walltime": 25},
+  "sage.schemes.projective.projective_rational_point": {"walltime": 11},
+  "sage.schemes.riemann_surfaces.riemann_surface": {"walltime": 53},
+  "sage.stats.distributions.discrete_gaussian_integer": {"walltime": 10},
+  "sage.structure.coerce_dict": {"walltime": 33},
+  "sage.structure.element": {"walltime": 16},
+  "sage.symbolic.expression": {"walltime": 38},
+  "sage.symbolic.integration.integral": {"walltime": 35},
+  "sage.symbolic.random_tests": {"walltime": 31},
+  "sage.symbolic.relation": {"walltime": 11},
+  "sage.tests.book_schilling_zabrocki_kschur_primer": {"walltime": 36},
+  "sage.tests.book_stein_ent": {"walltime": 15},
+  "sage.tests.books.computational-mathematics-with-sagemath.combinat_doctest": {"walltime": 40},
+  "sage.tests.books.computational-mathematics-with-sagemath.float_doctest": {"walltime": 17},
+  "sage.tests.books.computational-mathematics-with-sagemath.graphique_doctest": {"walltime": 29},
+  "sage.tests.books.computational-mathematics-with-sagemath.integration_doctest": {"walltime": 28},
+  "sage.tests.books.computational-mathematics-with-sagemath.nonlinear_doctest": {"walltime": 11},
+  "sage.tests.books.computational-mathematics-with-sagemath.sol.graphique_doctest": {"walltime": 17},
+  "sage.tests.books.computational-mathematics-with-sagemath.sol.numbertheory_doctest": {"walltime": 14},
+  "sage.tests.books.computational-mathematics-with-sagemath.sol.polynomes_doctest": {"walltime": 19},
+  "sage.tests.cmdline": {"walltime": 44},
+  "sage.tests.gosper-sum": {"walltime": 11},
+  "sage.topology.simplicial_complex_examples": {"walltime": 14}
+}
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index b9bd590b61ca..8f27de532058 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -206,22 +206,23 @@ do_install() {
 
 do_check() {
 	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
-		_test_args=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+		_test_files=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	else
+		_test_files=--all
 	fi
-	if [ -z "$_test_args" ]; then
-		_test_args=--all
+	cp ${FILESDIR}/timings2.json .
+	_test_args="--stats_path=timings2.json"
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args+=" --long --warn-long 20.0"
+	else
+		_test_args+=" --warn-long 10.0"
 	fi
 	if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
 		# for CI use a predictable random seed
-		_test_args="--random-seed=0 $_test_args"
-	fi
-	if [ "$XBPS_CHECK_PKGS" = full ]; then
-		_test_args="--long $_test_args"
-	else
-		_test_args="--warn-long 5.0 $_test_args"
+		_test_args+=" --random-seed=0"
 	fi
 	# since make check will build the docs, run test like this instead
-	./sage -tp ${XBPS_MAKEJOBS} ${_test_args}
+	./sage -tp ${XBPS_MAKEJOBS} ${_test_args} ${_test_files}
 }
 
 ### copied from sage-deps, to be kept in sync

From ee15ca43ec30d0e43a975b970ce4a41feaf8e835 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 02:54:00 -0300
Subject: [PATCH 50/59] changed_templates: do not merge with master

---
 common/travis/changed_templates.sh | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/common/travis/changed_templates.sh b/common/travis/changed_templates.sh
index 686436ce4327..5501b968cf1e 100755
--- a/common/travis/changed_templates.sh
+++ b/common/travis/changed_templates.sh
@@ -20,6 +20,9 @@ base="$($GIT_CMD merge-base FETCH_HEAD "$tip")" || {
 	exit 1
 }
 
+# tip = commit of the PR; this avoids merging to master
+$GIT_CMD checkout "$tip"
+
 echo "$base $tip" >/tmp/revisions
 
 /bin/echo -e '\x1b[32mChanged packages:\x1b[0m'

From bccf99adbd2a5da513c452f1ec680fda7fb6253d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 10:26:57 -0300
Subject: [PATCH 51/59] sagemath: round timings to power of 2 for stability

---
 srcpkgs/sagemath/files/timings2.json | 629 ++++++++++++++++-----------
 1 file changed, 386 insertions(+), 243 deletions(-)

diff --git a/srcpkgs/sagemath/files/timings2.json b/srcpkgs/sagemath/files/timings2.json
index 958a56d9d6f5..71a9aa84ce58 100644
--- a/srcpkgs/sagemath/files/timings2.json
+++ b/srcpkgs/sagemath/files/timings2.json
@@ -1,255 +1,398 @@
 {
+  "doc.ca.intro.index": {"walltime": 8},
   "doc.en.constructions.calculus": {"walltime": 64},
-  "doc.en.constructions.plotting": {"walltime": 28},
-  "doc.en.prep.Advanced-2DPlotting": {"walltime": 13},
-  "doc.en.thematic_tutorials.geometry.polyhedra_tutorial": {"walltime": 12},
-  "doc.en.thematic_tutorials.sandpile": {"walltime": 15},
-  "doc.en.thematic_tutorials.vector_calculus.vector_calc_advanced": {"walltime": 31},
-  "doc.en.thematic_tutorials.vector_calculus.vector_calc_cartesian": {"walltime": 36},
-  "doc.en.thematic_tutorials.vector_calculus.vector_calc_change": {"walltime": 28},
-  "doc.en.thematic_tutorials.vector_calculus.vector_calc_curvilinear": {"walltime": 35},
-  "doc.en.thematic_tutorials.vector_calculus.vector_calc_plane": {"walltime": 18},
-  "sage.algebras.commutative_dga": {"walltime": 13},
-  "sage.algebras.lie_algebras.classical_lie_algebra": {"walltime": 121},
-  "sage.algebras.lie_algebras.nilpotent_lie_algebra": {"walltime": 13},
-  "sage.algebras.quantum_clifford": {"walltime": 13},
-  "sage.algebras.quatalg.quaternion_algebra": {"walltime": 10},
-  "sage.algebras.steenrod.steenrod_algebra": {"walltime": 51},
-  "sage.arith.misc": {"walltime": 24},
+  "doc.en.constructions.plotting": {"walltime": 32},
+  "doc.en.prep.Advanced-2DPlotting": {"walltime": 16},
+  "doc.en.prep.Calculus": {"walltime": 8},
+  "doc.en.prep.Symbolics-and-Basic-Plotting": {"walltime": 8},
+  "doc.en.thematic_tutorials.explicit_methods_in_number_theory.birds_other": {"walltime": 8},
+  "doc.en.thematic_tutorials.explicit_methods_in_number_theory.elliptic_curves": {"walltime": 8},
+  "doc.en.thematic_tutorials.geometry.polyhedra_tutorial": {"walltime": 16},
+  "doc.en.thematic_tutorials.sandpile": {"walltime": 16},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_advanced": {"walltime": 32},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_cartesian": {"walltime": 32},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_change": {"walltime": 32},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_curvilinear": {"walltime": 32},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_plane": {"walltime": 16},
+  "doc.ja.tutorial.tour_plotting": {"walltime": 8},
+  "sage.algebras.cluster_algebra": {"walltime": 8},
+  "sage.algebras.commutative_dga": {"walltime": 16},
+  "sage.algebras.hecke_algebras.ariki_koike_algebra": {"walltime": 8},
+  "sage.algebras.iwahori_hecke_algebra": {"walltime": 8},
+  "sage.algebras.lie_algebras.classical_lie_algebra": {"walltime": 128},
+  "sage.algebras.lie_algebras.nilpotent_lie_algebra": {"walltime": 16},
+  "sage.algebras.quantum_clifford": {"walltime": 16},
+  "sage.algebras.quantum_groups.fock_space": {"walltime": 8},
+  "sage.algebras.quatalg.quaternion_algebra": {"walltime": 8},
+  "sage.algebras.steenrod.steenrod_algebra": {"walltime": 64},
+  "sage.algebras.steenrod.steenrod_algebra_bases": {"walltime": 8},
+  "sage.algebras.yangian": {"walltime": 8},
+  "sage.arith.misc": {"walltime": 32},
   "sage.calculus.calculus": {"walltime": 16},
-  "sage.calculus.functional": {"walltime": 12},
-  "sage.calculus.riemann": {"walltime": 49},
-  "sage.calculus.tests": {"walltime": 15},
-  "sage.calculus.transforms.dwt": {"walltime": 25},
-  "sage.categories.finite_monoids": {"walltime": 13},
-  "sage.categories.super_hopf_algebras_with_basis": {"walltime": 27},
-  "sage.coding.ag_code": {"walltime": 48},
-  "sage.coding.ag_code_decoders": {"walltime": 187},
-  "sage.coding.linear_code": {"walltime": 19},
-  "sage.combinat.backtrack": {"walltime": 30},
-  "sage.combinat.chas.wqsym": {"walltime": 42},
-  "sage.combinat.cluster_algebra_quiver.cluster_seed": {"walltime": 60},
-  "sage.combinat.cluster_algebra_quiver.quiver": {"walltime": 169},
-  "sage.combinat.crystals.affine_factorization": {"walltime": 13},
-  "sage.combinat.crystals.alcove_path": {"walltime": 37},
+  "sage.calculus.desolvers": {"walltime": 8},
+  "sage.calculus.functional": {"walltime": 8},
+  "sage.calculus.riemann": {"walltime": 64},
+  "sage.calculus.tests": {"walltime": 16},
+  "sage.calculus.transforms.dwt": {"walltime": 16},
+  "sage.calculus.transforms.fft": {"walltime": 8},
+  "sage.categories.coxeter_groups": {"walltime": 8},
+  "sage.categories.finite_monoids": {"walltime": 16},
+  "sage.categories.lie_conformal_algebras": {"walltime": 8},
+  "sage.categories.loop_crystals": {"walltime": 8},
+  "sage.categories.pushout": {"walltime": 8},
+  "sage.categories.super_hopf_algebras_with_basis": {"walltime": 32},
+  "sage.categories.super_lie_conformal_algebras": {"walltime": 8},
+  "sage.coding.ag_code": {"walltime": 64},
+  "sage.coding.ag_code_decoders": {"walltime": 128},
+  "sage.coding.binary_code": {"walltime": 8},
+  "sage.coding.linear_code": {"walltime": 16},
+  "sage.combinat.backtrack": {"walltime": 32},
+  "sage.combinat.chas.wqsym": {"walltime": 32},
+  "sage.combinat.cluster_algebra_quiver.cluster_seed": {"walltime": 64},
+  "sage.combinat.cluster_algebra_quiver.quiver": {"walltime": 128},
+  "sage.combinat.crystals.affine_factorization": {"walltime": 16},
+  "sage.combinat.crystals.alcove_path": {"walltime": 32},
+  "sage.combinat.crystals.highest_weight_crystals": {"walltime": 8},
   "sage.combinat.crystals.kirillov_reshetikhin": {"walltime": 16},
-  "sage.combinat.crystals.littelmann_path": {"walltime": 13},
-  "sage.combinat.crystals.mv_polytopes": {"walltime": 20},
-  "sage.combinat.crystals.pbw_crystal": {"walltime": 21},
-  "sage.combinat.designs.database": {"walltime": 21},
-  "sage.combinat.designs.gen_quadrangles_with_spread": {"walltime": 114},
-  "sage.combinat.designs.orthogonal_arrays_build_recursive": {"walltime": 12},
-  "sage.combinat.diagram_algebras": {"walltime": 49},
-  "sage.combinat.fqsym": {"walltime": 22},
-  "sage.combinat.k_tableau": {"walltime": 14},
-  "sage.combinat.ncsf_qsym.ncsf": {"walltime": 14},
-  "sage.combinat.ncsf_qsym.qsym": {"walltime": 12},
-  "sage.combinat.partition": {"walltime": 11},
-  "sage.combinat.partition_kleshchev": {"walltime": 19},
-  "sage.combinat.posets.moebius_algebra": {"walltime": 12},
-  "sage.combinat.rigged_configurations.kr_tableaux": {"walltime": 28},
-  "sage.combinat.rigged_configurations.rigged_configurations": {"walltime": 13},
-  "sage.combinat.rigged_configurations.tensor_product_kr_tableaux": {"walltime": 15},
-  "sage.combinat.root_system.integrable_representations": {"walltime": 12},
-  "sage.combinat.root_system.non_symmetric_macdonald_polynomials": {"walltime": 21},
-  "sage.combinat.root_system.plot": {"walltime": 37},
-  "sage.combinat.root_system.root_lattice_realization_algebras": {"walltime": 17},
-  "sage.combinat.root_system.root_lattice_realizations": {"walltime": 24},
-  "sage.combinat.rsk": {"walltime": 36},
-  "sage.combinat.sf.classical": {"walltime": 11},
-  "sage.combinat.sf.k_dual": {"walltime": 13},
-  "sage.combinat.sf.llt": {"walltime": 13},
-  "sage.combinat.sf.macdonald": {"walltime": 58},
-  "sage.combinat.sf.sfa": {"walltime": 25},
-  "sage.combinat.shifted_primed_tableau": {"walltime": 14},
-  "sage.combinat.symmetric_group_algebra": {"walltime": 11},
-  "sage.combinat.tableau": {"walltime": 20},
-  "sage.combinat.tableau_tuple": {"walltime": 29},
-  "sage.combinat.tiling": {"walltime": 305},
-  "sage.combinat.tutorial": {"walltime": 13},
-  "sage.combinat.words.paths": {"walltime": 85},
-  "sage.crypto.block_cipher.des": {"walltime": 21},
-  "sage.crypto.mq.sr": {"walltime": 53},
-  "sage.crypto.sbox": {"walltime": 14},
-  "sage.doctest.forker": {"walltime": 14},
-  "sage.doctest.sources": {"walltime": 93},
-  "sage.doctest.test": {"walltime": 149},
-  "sage.dynamics.arithmetic_dynamics.projective_ds": {"walltime": 48},
+  "sage.combinat.crystals.letters": {"walltime": 8},
+  "sage.combinat.crystals.littelmann_path": {"walltime": 16},
+  "sage.combinat.crystals.mv_polytopes": {"walltime": 16},
+  "sage.combinat.crystals.pbw_crystal": {"walltime": 16},
+  "sage.combinat.crystals.star_crystal": {"walltime": 8},
+  "sage.combinat.designs.bibd": {"walltime": 8},
+  "sage.combinat.designs.database": {"walltime": 16},
+  "sage.combinat.designs.difference_family": {"walltime": 8},
+  "sage.combinat.designs.gen_quadrangles_with_spread": {"walltime": 128},
+  "sage.combinat.designs.orthogonal_arrays_build_recursive": {"walltime": 16},
+  "sage.combinat.designs.orthogonal_arrays_find_recursive": {"walltime": 8},
+  "sage.combinat.diagram_algebras": {"walltime": 64},
+  "sage.combinat.fqsym": {"walltime": 32},
+  "sage.combinat.free_prelie_algebra": {"walltime": 8},
+  "sage.combinat.fully_commutative_elements": {"walltime": 8},
+  "sage.combinat.grossman_larson_algebras": {"walltime": 8},
+  "sage.combinat.interval_posets": {"walltime": 8},
+  "sage.combinat.k_regular_sequence": {"walltime": 8},
+  "sage.combinat.k_tableau": {"walltime": 16},
+  "sage.combinat.matrices.hadamard_matrix": {"walltime": 8},
+  "sage.combinat.multiset_partition_into_sets_ordered": {"walltime": 8},
+  "sage.combinat.ncsf_qsym.ncsf": {"walltime": 16},
+  "sage.combinat.ncsf_qsym.qsym": {"walltime": 16},
+  "sage.combinat.partition": {"walltime": 16},
+  "sage.combinat.partition_kleshchev": {"walltime": 16},
+  "sage.combinat.partition_tuple": {"walltime": 8},
+  "sage.combinat.posets.moebius_algebra": {"walltime": 16},
+  "sage.combinat.posets.posets": {"walltime": 8},
+  "sage.combinat.rigged_configurations.kr_tableaux": {"walltime": 32},
+  "sage.combinat.rigged_configurations.rigged_configurations": {"walltime": 16},
+  "sage.combinat.rigged_configurations.tensor_product_kr_tableaux": {"walltime": 16},
+  "sage.combinat.root_system.associahedron": {"walltime": 8},
+  "sage.combinat.root_system.branching_rules": {"walltime": 8},
+  "sage.combinat.root_system.fusion_ring": {"walltime": 8},
+  "sage.combinat.root_system.integrable_representations": {"walltime": 16},
+  "sage.combinat.root_system.non_symmetric_macdonald_polynomials": {"walltime": 16},
+  "sage.combinat.root_system.pieri_factors": {"walltime": 8},
+  "sage.combinat.root_system.plot": {"walltime": 32},
+  "sage.combinat.root_system.root_lattice_realization_algebras": {"walltime": 16},
+  "sage.combinat.root_system.root_lattice_realizations": {"walltime": 16},
+  "sage.combinat.root_system.root_system": {"walltime": 8},
+  "sage.combinat.root_system.weyl_group": {"walltime": 8},
+  "sage.combinat.rsk": {"walltime": 32},
+  "sage.combinat.sf.classical": {"walltime": 16},
+  "sage.combinat.sf.jack": {"walltime": 16},
+  "sage.combinat.sf.k_dual": {"walltime": 16},
+  "sage.combinat.sf.llt": {"walltime": 16},
+  "sage.combinat.sf.macdonald": {"walltime": 64},
+  "sage.combinat.sf.new_kschur": {"walltime": 8},
+  "sage.combinat.sf.sfa": {"walltime": 32},
+  "sage.combinat.shifted_primed_tableau": {"walltime": 16},
+  "sage.combinat.skew_tableau": {"walltime": 8},
+  "sage.combinat.symmetric_group_algebra": {"walltime": 16},
+  "sage.combinat.tableau": {"walltime": 32},
+  "sage.combinat.tableau_tuple": {"walltime": 32},
+  "sage.combinat.tiling": {"walltime": 256},
+  "sage.combinat.tutorial": {"walltime": 16},
+  "sage.combinat.words.paths": {"walltime": 64},
+  "sage.crypto.block_cipher.des": {"walltime": 16},
+  "sage.crypto.mq.sr": {"walltime": 64},
+  "sage.crypto.sbox": {"walltime": 16},
+  "sage.crypto.sboxes": {"walltime": 8},
+  "sage.doctest.forker": {"walltime": 16},
+  "sage.doctest.sources": {"walltime": 64},
+  "sage.doctest.test": {"walltime": 128},
+  "sage.dynamics.arithmetic_dynamics.projective_ds": {"walltime": 64},
+  "sage.dynamics.arithmetic_dynamics.wehlerK3": {"walltime": 8},
+  "sage.dynamics.cellular_automata.glca": {"walltime": 8},
+  "sage.dynamics.cellular_automata.solitons": {"walltime": 8},
   "sage.dynamics.complex_dynamics.mandel_julia": {"walltime": 16},
-  "sage.functions.bessel": {"walltime": 14},
-  "sage.functions.exp_integral": {"walltime": 12},
-  "sage.functions.other": {"walltime": 15},
-  "sage.geometry.cone": {"walltime": 24},
-  "sage.geometry.hyperplane_arrangement.arrangement": {"walltime": 14},
-  "sage.geometry.lattice_polytope": {"walltime": 12},
-  "sage.geometry.polyhedral_complex": {"walltime": 11},
-  "sage.geometry.polyhedron.base": {"walltime": 33},
-  "sage.geometry.polyhedron.library": {"walltime": 41},
-  "sage.geometry.riemannian_manifolds.parametrized_surface3d": {"walltime": 22},
-  "sage.geometry.triangulation.base": {"walltime": 22},
-  "sage.geometry.triangulation.point_configuration": {"walltime": 14},
-  "sage.graphs.connectivity": {"walltime": 17},
-  "sage.graphs.generators.basic": {"walltime": 10},
-  "sage.graphs.generators.classical_geometries": {"walltime": 30},
-  "sage.graphs.generators.distance_regular": {"walltime": 196},
-  "sage.graphs.generators.families": {"walltime": 21},
-  "sage.graphs.generators.smallgraphs": {"walltime": 22},
-  "sage.graphs.generic_graph": {"walltime": 29},
-  "sage.graphs.genus": {"walltime": 12},
-  "sage.graphs.graph": {"walltime": 20},
-  "sage.graphs.strongly_regular_db": {"walltime": 22},
-  "sage.groups.cubic_braid": {"walltime": 19},
-  "sage.groups.fqf_orthogonal": {"walltime": 19},
-  "sage.groups.lie_gps.nilpotent_lie_group": {"walltime": 10},
-  "sage.groups.matrix_gps.heisenberg": {"walltime": 41},
-  "sage.groups.perm_gps.cubegroup": {"walltime": 11},
-  "sage.homology.homology_vector_space_with_basis": {"walltime": 10},
-  "sage.interacts.test_jupyter": {"walltime": 17},
-  "sage.interfaces.gap": {"walltime": 11},
-  "sage.interfaces.maxima_abstract": {"walltime": 46},
-  "sage.libs.eclib.interface": {"walltime": 22},
+  "sage.functions.bessel": {"walltime": 16},
+  "sage.functions.exp_integral": {"walltime": 8},
+  "sage.functions.hypergeometric": {"walltime": 8},
+  "sage.functions.other": {"walltime": 16},
+  "sage.functions.piecewise": {"walltime": 8},
+  "sage.games.quantumino": {"walltime": 8},
+  "sage.geometry.cone": {"walltime": 32},
+  "sage.geometry.fan": {"walltime": 8},
+  "sage.geometry.hyperbolic_space.hyperbolic_geodesic": {"walltime": 8},
+  "sage.geometry.hyperplane_arrangement.arrangement": {"walltime": 16},
+  "sage.geometry.hyperplane_arrangement.library": {"walltime": 8},
+  "sage.geometry.hyperplane_arrangement.plot": {"walltime": 8},
+  "sage.geometry.lattice_polytope": {"walltime": 16},
+  "sage.geometry.polyhedral_complex": {"walltime": 8},
+  "sage.geometry.polyhedron.base": {"walltime": 32},
+  "sage.geometry.polyhedron.library": {"walltime": 32},
+  "sage.geometry.polyhedron.plot": {"walltime": 8},
+  "sage.geometry.riemannian_manifolds.parametrized_surface3d": {"walltime": 16},
+  "sage.geometry.triangulation.base": {"walltime": 32},
+  "sage.geometry.triangulation.point_configuration": {"walltime": 16},
+  "sage.graphs.chrompoly": {"walltime": 8},
+  "sage.graphs.connectivity": {"walltime": 16},
+  "sage.graphs.generators.basic": {"walltime": 16},
+  "sage.graphs.generators.classical_geometries": {"walltime": 32},
+  "sage.graphs.generators.distance_regular": {"walltime": 256},
+  "sage.graphs.generators.families": {"walltime": 32},
+  "sage.graphs.generators.smallgraphs": {"walltime": 16},
+  "sage.graphs.generic_graph": {"walltime": 32},
+  "sage.graphs.genus": {"walltime": 16},
+  "sage.graphs.graph": {"walltime": 16},
+  "sage.graphs.graph_generators": {"walltime": 8},
+  "sage.graphs.graph_list": {"walltime": 8},
+  "sage.graphs.graph_plot": {"walltime": 8},
+  "sage.graphs.strongly_regular_db": {"walltime": 16},
+  "sage.groups.cubic_braid": {"walltime": 16},
+  "sage.groups.fqf_orthogonal": {"walltime": 16},
+  "sage.groups.libgap_mixin": {"walltime": 8},
+  "sage.groups.libgap_morphism": {"walltime": 8},
+  "sage.groups.lie_gps.nilpotent_lie_group": {"walltime": 16},
+  "sage.groups.matrix_gps.finitely_generated": {"walltime": 8},
+  "sage.groups.matrix_gps.heisenberg": {"walltime": 32},
+  "sage.groups.matrix_gps.linear": {"walltime": 8},
+  "sage.groups.perm_gps.cubegroup": {"walltime": 16},
+  "sage.groups.perm_gps.partn_ref.refinement_graphs": {"walltime": 8},
+  "sage.groups.perm_gps.permgroup": {"walltime": 8},
+  "sage.groups.perm_gps.permgroup_named": {"walltime": 8},
+  "sage.homology.hochschild_complex": {"walltime": 8},
+  "sage.homology.homology_vector_space_with_basis": {"walltime": 8},
+  "sage.interacts.test_jupyter": {"walltime": 16},
+  "sage.interfaces.ecm": {"walltime": 8},
+  "sage.interfaces.expect": {"walltime": 8},
+  "sage.interfaces.gap": {"walltime": 16},
+  "sage.interfaces.maxima": {"walltime": 8},
+  "sage.interfaces.maxima_abstract": {"walltime": 64},
+  "sage.interfaces.psage": {"walltime": 8},
+  "sage.interfaces.sage0": {"walltime": 8},
+  "sage.lfunctions.zero_sums": {"walltime": 8},
+  "sage.libs.eclib.interface": {"walltime": 16},
   "sage.libs.eclib.mwrank": {"walltime": 16},
-  "sage.libs.gap.test_long": {"walltime": 43},
-  "sage.libs.giac": {"walltime": 42},
-  "sage.manifolds.chart": {"walltime": 34},
-  "sage.manifolds.differentiable.affine_connection": {"walltime": 138},
-  "sage.manifolds.differentiable.automorphismfield": {"walltime": 33},
-  "sage.manifolds.differentiable.characteristic_cohomology_class": {"walltime": 260},
-  "sage.manifolds.differentiable.curve": {"walltime": 18},
-  "sage.manifolds.differentiable.degenerate": {"walltime": 27},
-  "sage.manifolds.differentiable.degenerate_submanifold": {"walltime": 239},
-  "sage.manifolds.differentiable.diff_form": {"walltime": 48},
-  "sage.manifolds.differentiable.diff_map": {"walltime": 10},
-  "sage.manifolds.differentiable.examples.euclidean": {"walltime": 48},
-  "sage.manifolds.differentiable.examples.sphere": {"walltime": 33},
-  "sage.manifolds.differentiable.integrated_curve": {"walltime": 29},
-  "sage.manifolds.differentiable.levi_civita_connection": {"walltime": 27},
-  "sage.manifolds.differentiable.manifold": {"walltime": 12},
+  "sage.libs.gap.test_long": {"walltime": 32},
+  "sage.libs.giac": {"walltime": 32},
+  "sage.manifolds.catalog": {"walltime": 8},
+  "sage.manifolds.chart": {"walltime": 32},
+  "sage.manifolds.chart_func": {"walltime": 8},
+  "sage.manifolds.continuous_map": {"walltime": 8},
+  "sage.manifolds.differentiable.affine_connection": {"walltime": 128},
+  "sage.manifolds.differentiable.automorphismfield": {"walltime": 32},
+  "sage.manifolds.differentiable.automorphismfield_group": {"walltime": 8},
+  "sage.manifolds.differentiable.bundle_connection": {"walltime": 8},
+  "sage.manifolds.differentiable.characteristic_cohomology_class": {"walltime": 256},
+  "sage.manifolds.differentiable.curve": {"walltime": 16},
+  "sage.manifolds.differentiable.degenerate": {"walltime": 32},
+  "sage.manifolds.differentiable.degenerate_submanifold": {"walltime": 256},
+  "sage.manifolds.differentiable.diff_form": {"walltime": 64},
+  "sage.manifolds.differentiable.diff_map": {"walltime": 8},
+  "sage.manifolds.differentiable.examples.euclidean": {"walltime": 32},
+  "sage.manifolds.differentiable.examples.sphere": {"walltime": 32},
+  "sage.manifolds.differentiable.integrated_curve": {"walltime": 32},
+  "sage.manifolds.differentiable.levi_civita_connection": {"walltime": 32},
+  "sage.manifolds.differentiable.manifold": {"walltime": 16},
   "sage.manifolds.differentiable.manifold_homset": {"walltime": 16},
-  "sage.manifolds.differentiable.metric": {"walltime": 95},
-  "sage.manifolds.differentiable.mixed_form": {"walltime": 14},
-  "sage.manifolds.differentiable.mixed_form_algebra": {"walltime": 11},
-  "sage.manifolds.differentiable.multivectorfield": {"walltime": 71},
-  "sage.manifolds.differentiable.pseudo_riemannian": {"walltime": 20},
-  "sage.manifolds.differentiable.pseudo_riemannian_submanifold": {"walltime": 127},
-  "sage.manifolds.differentiable.scalarfield": {"walltime": 19},
-  "sage.manifolds.differentiable.tangent_vector": {"walltime": 17},
+  "sage.manifolds.differentiable.metric": {"walltime": 64},
+  "sage.manifolds.differentiable.mixed_form": {"walltime": 16},
+  "sage.manifolds.differentiable.mixed_form_algebra": {"walltime": 8},
+  "sage.manifolds.differentiable.multivectorfield": {"walltime": 64},
+  "sage.manifolds.differentiable.pseudo_riemannian": {"walltime": 16},
+  "sage.manifolds.differentiable.pseudo_riemannian_submanifold": {"walltime": 128},
+  "sage.manifolds.differentiable.scalarfield": {"walltime": 16},
+  "sage.manifolds.differentiable.scalarfield_algebra": {"walltime": 8},
+  "sage.manifolds.differentiable.tangent_vector": {"walltime": 16},
   "sage.manifolds.differentiable.tensorfield": {"walltime": 128},
-  "sage.manifolds.differentiable.tensorfield_paral": {"walltime": 15},
-  "sage.manifolds.differentiable.vector_bundle": {"walltime": 13},
-  "sage.manifolds.differentiable.vectorfield": {"walltime": 53},
-  "sage.manifolds.point": {"walltime": 21},
-  "sage.manifolds.scalarfield": {"walltime": 15},
-  "sage.manifolds.section": {"walltime": 28},
-  "sage.matrix.matrix2": {"walltime": 18},
-  "sage.matrix.matrix_integer_dense": {"walltime": 15},
-  "sage.matrix.matrix_integer_dense_hnf": {"walltime": 35},
-  "sage.matroids.catalog": {"walltime": 59},
-  "sage.misc.cachefunc": {"walltime": 13},
-  "sage.misc.functional": {"walltime": 10},
+  "sage.manifolds.differentiable.tensorfield_paral": {"walltime": 16},
+  "sage.manifolds.differentiable.vector_bundle": {"walltime": 16},
+  "sage.manifolds.differentiable.vectorfield": {"walltime": 64},
+  "sage.manifolds.differentiable.vectorframe": {"walltime": 8},
+  "sage.manifolds.point": {"walltime": 16},
+  "sage.manifolds.scalarfield": {"walltime": 16},
+  "sage.manifolds.scalarfield_algebra": {"walltime": 8},
+  "sage.manifolds.section": {"walltime": 32},
+  "sage.manifolds.trivialization": {"walltime": 8},
+  "sage.manifolds.vector_bundle": {"walltime": 8},
+  "sage.matrix.benchmark": {"walltime": 8},
+  "sage.matrix.matrix2": {"walltime": 16},
+  "sage.matrix.matrix_integer_dense": {"walltime": 16},
+  "sage.matrix.matrix_integer_dense_hnf": {"walltime": 32},
+  "sage.matrix.matrix_mod2_dense": {"walltime": 8},
+  "sage.matrix.matrix_rational_dense": {"walltime": 8},
+  "sage.matrix.special": {"walltime": 8},
+  "sage.matroids.catalog": {"walltime": 64},
+  "sage.misc.cachefunc": {"walltime": 16},
+  "sage.misc.cython": {"walltime": 8},
+  "sage.misc.functional": {"walltime": 8},
   "sage.misc.randstate": {"walltime": 16},
-  "sage.misc.sagedoc": {"walltime": 56},
-  "sage.misc.sageinspect": {"walltime": 38},
-  "sage.modular.abvar.abvar": {"walltime": 12},
-  "sage.modular.abvar.lseries": {"walltime": 10},
-  "sage.modular.btquotients.pautomorphicform": {"walltime": 31},
-  "sage.modular.hypergeometric_motive": {"walltime": 12},
-  "sage.modular.local_comp.local_comp": {"walltime": 27},
-  "sage.modular.local_comp.type_space": {"walltime": 24},
-  "sage.modular.modform.ambient_R": {"walltime": 11},
-  "sage.modular.modform.cuspidal_submodule": {"walltime": 15},
-  "sage.modular.modform.element": {"walltime": 60},
-  "sage.modular.modform.ring": {"walltime": 50},
-  "sage.modular.modform_hecketriangle.abstract_space": {"walltime": 12},
-  "sage.modular.modform_hecketriangle.graded_ring_element": {"walltime": 23},
-  "sage.modular.modform_hecketriangle.hecke_triangle_group_element": {"walltime": 26},
-  "sage.modular.modform_hecketriangle.readme": {"walltime": 19},
-  "sage.modular.modsym.ambient": {"walltime": 15},
-  "sage.modular.pollack_stevens.modsym": {"walltime": 63},
-  "sage.modular.pollack_stevens.padic_lseries": {"walltime": 36},
-  "sage.modules.finite_submodule_iter": {"walltime": 22},
-  "sage.modules.free_module": {"walltime": 22},
-  "sage.modules.free_module_integer": {"walltime": 28},
-  "sage.modules.torsion_quadratic_module": {"walltime": 22},
-  "sage.plot.animate": {"walltime": 129},
-  "sage.plot.contour_plot": {"walltime": 38},
-  "sage.plot.graphics": {"walltime": 43},
-  "sage.plot.line": {"walltime": 12},
-  "sage.plot.matrix_plot": {"walltime": 15},
-  "sage.plot.multigraphics": {"walltime": 26},
-  "sage.plot.plot": {"walltime": 77},
-  "sage.plot.plot3d.base": {"walltime": 12},
-  "sage.plot.plot3d.implicit_plot3d": {"walltime": 20},
-  "sage.plot.plot3d.parametric_plot3d": {"walltime": 11},
-  "sage.plot.plot3d.plot3d": {"walltime": 18},
-  "sage.plot.plot3d.transform": {"walltime": 34},
-  "sage.quadratic_forms.genera.genus": {"walltime": 19},
-  "sage.quadratic_forms.quadratic_form__local_representation_conditions": {"walltime": 48},
-  "sage.rings.asymptotic.asymptotic_expansion_generators": {"walltime": 61},
-  "sage.rings.asymptotic.asymptotics_multivariate_generating_functions": {"walltime": 36},
-  "sage.rings.function_field.function_field": {"walltime": 225},
-  "sage.rings.function_field.function_field_valuation": {"walltime": 47},
-  "sage.rings.function_field.ideal": {"walltime": 10},
-  "sage.rings.integer": {"walltime": 164},
-  "sage.rings.number_field.number_field": {"walltime": 79},
-  "sage.rings.number_field.number_field_element": {"walltime": 13},
-  "sage.rings.number_field.totallyreal": {"walltime": 14},
-  "sage.rings.padics.padic_base_leaves": {"walltime": 76},
-  "sage.rings.padics.padic_extension_leaves": {"walltime": 46},
-  "sage.rings.padics.padic_generic_element": {"walltime": 14},
-  "sage.rings.padics.padic_lattice_element": {"walltime": 25},
-  "sage.rings.padics.relative_extension_leaves": {"walltime": 42},
-  "sage.rings.polynomial.multi_polynomial_ideal": {"walltime": 11},
-  "sage.rings.polynomial.multi_polynomial_sequence": {"walltime": 28},
+  "sage.misc.sagedoc": {"walltime": 64},
+  "sage.misc.sageinspect": {"walltime": 32},
+  "sage.modular.abvar.abvar": {"walltime": 16},
+  "sage.modular.abvar.homspace": {"walltime": 8},
+  "sage.modular.abvar.lseries": {"walltime": 8},
+  "sage.modular.arithgroup.arithgroup_perm": {"walltime": 8},
+  "sage.modular.arithgroup.tests": {"walltime": 8},
+  "sage.modular.btquotients.pautomorphicform": {"walltime": 32},
+  "sage.modular.hypergeometric_motive": {"walltime": 16},
+  "sage.modular.local_comp.local_comp": {"walltime": 32},
+  "sage.modular.local_comp.type_space": {"walltime": 16},
+  "sage.modular.modform.ambient_R": {"walltime": 16},
+  "sage.modular.modform.constructor": {"walltime": 8},
+  "sage.modular.modform.cuspidal_submodule": {"walltime": 16},
+  "sage.modular.modform.element": {"walltime": 64},
+  "sage.modular.modform.ring": {"walltime": 64},
+  "sage.modular.modform.space": {"walltime": 8},
+  "sage.modular.modform_hecketriangle.abstract_space": {"walltime": 16},
+  "sage.modular.modform_hecketriangle.graded_ring_element": {"walltime": 16},
+  "sage.modular.modform_hecketriangle.hecke_triangle_group_element": {"walltime": 32},
+  "sage.modular.modform_hecketriangle.readme": {"walltime": 16},
+  "sage.modular.modform_hecketriangle.space": {"walltime": 8},
+  "sage.modular.modsym.ambient": {"walltime": 16},
+  "sage.modular.modsym.space": {"walltime": 8},
+  "sage.modular.pollack_stevens.modsym": {"walltime": 64},
+  "sage.modular.pollack_stevens.padic_lseries": {"walltime": 32},
+  "sage.modules.finite_submodule_iter": {"walltime": 16},
+  "sage.modules.free_module": {"walltime": 16},
+  "sage.modules.free_module_element": {"walltime": 8},
+  "sage.modules.free_module_integer": {"walltime": 32},
+  "sage.modules.free_quadratic_module_integer_symmetric": {"walltime": 8},
+  "sage.modules.torsion_quadratic_module": {"walltime": 16},
+  "sage.parallel.map_reduce": {"walltime": 8},
+  "sage.plot.animate": {"walltime": 128},
+  "sage.plot.arrow": {"walltime": 8},
+  "sage.plot.circle": {"walltime": 8},
+  "sage.plot.complex_plot": {"walltime": 8},
+  "sage.plot.contour_plot": {"walltime": 32},
+  "sage.plot.density_plot": {"walltime": 8},
+  "sage.plot.graphics": {"walltime": 32},
+  "sage.plot.line": {"walltime": 8},
+  "sage.plot.matrix_plot": {"walltime": 16},
+  "sage.plot.multigraphics": {"walltime": 16},
+  "sage.plot.plot": {"walltime": 64},
+  "sage.plot.plot3d.base": {"walltime": 8},
+  "sage.plot.plot3d.implicit_plot3d": {"walltime": 16},
+  "sage.plot.plot3d.implicit_surface": {"walltime": 8},
+  "sage.plot.plot3d.parametric_plot3d": {"walltime": 8},
+  "sage.plot.plot3d.parametric_surface": {"walltime": 8},
+  "sage.plot.plot3d.plot3d": {"walltime": 16},
+  "sage.plot.plot3d.tachyon": {"walltime": 8},
+  "sage.plot.plot3d.transform": {"walltime": 32},
+  "sage.plot.point": {"walltime": 8},
+  "sage.plot.polygon": {"walltime": 8},
+  "sage.plot.streamline_plot": {"walltime": 8},
+  "sage.quadratic_forms.genera.genus": {"walltime": 16},
+  "sage.quadratic_forms.quadratic_form__automorphisms": {"walltime": 8},
+  "sage.quadratic_forms.quadratic_form__local_representation_conditions": {"walltime": 64},
+  "sage.quadratic_forms.quadratic_form__neighbors": {"walltime": 8},
+  "sage.quadratic_forms.quadratic_form__siegel_product": {"walltime": 8},
+  "sage.repl.ipython_extension": {"walltime": 8},
+  "sage.rings.asymptotic.asymptotic_expansion_generators": {"walltime": 64},
+  "sage.rings.asymptotic.asymptotic_ring": {"walltime": 8},
+  "sage.rings.asymptotic.asymptotics_multivariate_generating_functions": {"walltime": 32},
+  "sage.rings.asymptotic.term_monoid": {"walltime": 8},
+  "sage.rings.continued_fraction": {"walltime": 8},
+  "sage.rings.finite_rings.finite_field_base": {"walltime": 8},
+  "sage.rings.function_field.function_field": {"walltime": 256},
+  "sage.rings.function_field.function_field_valuation": {"walltime": 64},
+  "sage.rings.function_field.ideal": {"walltime": 8},
+  "sage.rings.function_field.place": {"walltime": 8},
+  "sage.rings.integer": {"walltime": 128},
+  "sage.rings.invariants.invariant_theory": {"walltime": 8},
+  "sage.rings.number_field.bdd_height": {"walltime": 8},
+  "sage.rings.number_field.number_field": {"walltime": 64},
+  "sage.rings.number_field.number_field_element": {"walltime": 16},
+  "sage.rings.number_field.splitting_field": {"walltime": 8},
+  "sage.rings.number_field.totallyreal": {"walltime": 16},
+  "sage.rings.number_field.totallyreal_rel": {"walltime": 8},
+  "sage.rings.padics.padic_base_leaves": {"walltime": 64},
+  "sage.rings.padics.padic_extension_leaves": {"walltime": 64},
+  "sage.rings.padics.padic_generic_element": {"walltime": 16},
+  "sage.rings.padics.padic_lattice_element": {"walltime": 32},
+  "sage.rings.padics.relative_extension_leaves": {"walltime": 32},
+  "sage.rings.polynomial.multi_polynomial_ideal": {"walltime": 8},
+  "sage.rings.polynomial.multi_polynomial_sequence": {"walltime": 8},
+  "sage.rings.polynomial.ore_function_element": {"walltime": 8},
   "sage.rings.polynomial.polynomial_element": {"walltime": 16},
-  "sage.rings.polynomial.polynomial_zmod_flint": {"walltime": 336},
-  "sage.rings.qqbar": {"walltime": 21},
-  "sage.rings.tests": {"walltime": 19},
-  "sage.rings.valuation.augmented_valuation": {"walltime": 28},
-  "sage.rings.valuation.mapped_valuation": {"walltime": 56},
-  "sage.schemes.curves.affine_curve": {"walltime": 23},
-  "sage.schemes.curves.projective_curve": {"walltime": 24},
-  "sage.schemes.cyclic_covers.cycliccover_finite_field": {"walltime": 78},
-  "sage.schemes.elliptic_curves.BSD": {"walltime": 10},
-  "sage.schemes.elliptic_curves.constructor": {"walltime": 27},
-  "sage.schemes.elliptic_curves.ell_curve_isogeny": {"walltime": 21},
-  "sage.schemes.elliptic_curves.ell_egros": {"walltime": 28},
-  "sage.schemes.elliptic_curves.ell_modular_symbols": {"walltime": 12},
-  "sage.schemes.elliptic_curves.ell_number_field": {"walltime": 120},
-  "sage.schemes.elliptic_curves.ell_rational_field": {"walltime": 133},
-  "sage.schemes.elliptic_curves.gal_reps_number_field": {"walltime": 35},
-  "sage.schemes.elliptic_curves.gp_simon": {"walltime": 22},
-  "sage.schemes.elliptic_curves.heegner": {"walltime": 39},
-  "sage.schemes.elliptic_curves.height": {"walltime": 56},
-  "sage.schemes.elliptic_curves.isogeny_class": {"walltime": 38},
-  "sage.schemes.elliptic_curves.isogeny_small_degree": {"walltime": 274},
-  "sage.schemes.elliptic_curves.kraus": {"walltime": 12},
-  "sage.schemes.elliptic_curves.mod_sym_num": {"walltime": 12},
-  "sage.schemes.elliptic_curves.padics": {"walltime": 15},
-  "sage.schemes.elliptic_curves.saturation": {"walltime": 19},
-  "sage.schemes.elliptic_curves.sha_tate": {"walltime": 23},
-  "sage.schemes.hyperelliptic_curves.hyperelliptic_finite_field": {"walltime": 65},
-  "sage.schemes.hyperelliptic_curves.hyperelliptic_padic_field": {"walltime": 25},
-  "sage.schemes.projective.projective_rational_point": {"walltime": 11},
-  "sage.schemes.riemann_surfaces.riemann_surface": {"walltime": 53},
-  "sage.stats.distributions.discrete_gaussian_integer": {"walltime": 10},
-  "sage.structure.coerce_dict": {"walltime": 33},
+  "sage.rings.polynomial.polynomial_rational_flint": {"walltime": 8},
+  "sage.rings.polynomial.polynomial_zmod_flint": {"walltime": 512},
+  "sage.rings.qqbar": {"walltime": 16},
+  "sage.rings.tests": {"walltime": 16},
+  "sage.rings.valuation.augmented_valuation": {"walltime": 32},
+  "sage.rings.valuation.mapped_valuation": {"walltime": 64},
+  "sage.rings.valuation.valuation": {"walltime": 8},
+  "sage.sandpiles.sandpile": {"walltime": 16},
+  "sage.schemes.curves.affine_curve": {"walltime": 16},
+  "sage.schemes.curves.closed_point": {"walltime": 8},
+  "sage.schemes.curves.projective_curve": {"walltime": 32},
+  "sage.schemes.cyclic_covers.cycliccover_finite_field": {"walltime": 64},
+  "sage.schemes.elliptic_curves.BSD": {"walltime": 8},
+  "sage.schemes.elliptic_curves.Qcurves": {"walltime": 8},
+  "sage.schemes.elliptic_curves.constructor": {"walltime": 32},
+  "sage.schemes.elliptic_curves.ell_curve_isogeny": {"walltime": 16},
+  "sage.schemes.elliptic_curves.ell_egros": {"walltime": 32},
+  "sage.schemes.elliptic_curves.ell_finite_field": {"walltime": 8},
+  "sage.schemes.elliptic_curves.ell_generic": {"walltime": 8},
+  "sage.schemes.elliptic_curves.ell_modular_symbols": {"walltime": 16},
+  "sage.schemes.elliptic_curves.ell_number_field": {"walltime": 128},
+  "sage.schemes.elliptic_curves.ell_point": {"walltime": 8},
+  "sage.schemes.elliptic_curves.ell_rational_field": {"walltime": 128},
+  "sage.schemes.elliptic_curves.gal_reps_number_field": {"walltime": 32},
+  "sage.schemes.elliptic_curves.gp_simon": {"walltime": 16},
+  "sage.schemes.elliptic_curves.heegner": {"walltime": 32},
+  "sage.schemes.elliptic_curves.height": {"walltime": 64},
+  "sage.schemes.elliptic_curves.isogeny_class": {"walltime": 32},
+  "sage.schemes.elliptic_curves.isogeny_small_degree": {"walltime": 256},
+  "sage.schemes.elliptic_curves.kraus": {"walltime": 16},
+  "sage.schemes.elliptic_curves.mod_sym_num": {"walltime": 8},
+  "sage.schemes.elliptic_curves.padic_lseries": {"walltime": 8},
+  "sage.schemes.elliptic_curves.padics": {"walltime": 16},
+  "sage.schemes.elliptic_curves.saturation": {"walltime": 16},
+  "sage.schemes.elliptic_curves.sha_tate": {"walltime": 32},
+  "sage.schemes.hyperelliptic_curves.hyperelliptic_finite_field": {"walltime": 64},
+  "sage.schemes.hyperelliptic_curves.hyperelliptic_generic": {"walltime": 8},
+  "sage.schemes.hyperelliptic_curves.hyperelliptic_padic_field": {"walltime": 32},
+  "sage.schemes.hyperelliptic_curves.monsky_washnitzer": {"walltime": 8},
+  "sage.schemes.projective.projective_rational_point": {"walltime": 8},
+  "sage.schemes.riemann_surfaces.riemann_surface": {"walltime": 64},
+  "sage.schemes.toric.chow_group": {"walltime": 8},
+  "sage.schemes.toric.sheaf.klyachko": {"walltime": 8},
+  "sage.stats.distributions.discrete_gaussian_integer": {"walltime": 8},
+  "sage.stats.time_series": {"walltime": 8},
+  "sage.structure.coerce_dict": {"walltime": 32},
   "sage.structure.element": {"walltime": 16},
-  "sage.symbolic.expression": {"walltime": 38},
-  "sage.symbolic.integration.integral": {"walltime": 35},
-  "sage.symbolic.random_tests": {"walltime": 31},
-  "sage.symbolic.relation": {"walltime": 11},
-  "sage.tests.book_schilling_zabrocki_kschur_primer": {"walltime": 36},
-  "sage.tests.book_stein_ent": {"walltime": 15},
-  "sage.tests.books.computational-mathematics-with-sagemath.combinat_doctest": {"walltime": 40},
-  "sage.tests.books.computational-mathematics-with-sagemath.float_doctest": {"walltime": 17},
-  "sage.tests.books.computational-mathematics-with-sagemath.graphique_doctest": {"walltime": 29},
-  "sage.tests.books.computational-mathematics-with-sagemath.integration_doctest": {"walltime": 28},
-  "sage.tests.books.computational-mathematics-with-sagemath.nonlinear_doctest": {"walltime": 11},
-  "sage.tests.books.computational-mathematics-with-sagemath.sol.graphique_doctest": {"walltime": 17},
-  "sage.tests.books.computational-mathematics-with-sagemath.sol.numbertheory_doctest": {"walltime": 14},
-  "sage.tests.books.computational-mathematics-with-sagemath.sol.polynomes_doctest": {"walltime": 19},
-  "sage.tests.cmdline": {"walltime": 44},
-  "sage.tests.gosper-sum": {"walltime": 11},
-  "sage.topology.simplicial_complex_examples": {"walltime": 14}
+  "sage.structure.sage_object": {"walltime": 8},
+  "sage.symbolic.expression": {"walltime": 32},
+  "sage.symbolic.integration.integral": {"walltime": 32},
+  "sage.symbolic.random_tests": {"walltime": 32},
+  "sage.symbolic.relation": {"walltime": 8},
+  "sage.tests.book_schilling_zabrocki_kschur_primer": {"walltime": 32},
+  "sage.tests.book_stein_ent": {"walltime": 16},
+  "sage.tests.books.computational-mathematics-with-sagemath.combinat_doctest": {"walltime": 32},
+  "sage.tests.books.computational-mathematics-with-sagemath.float_doctest": {"walltime": 16},
+  "sage.tests.books.computational-mathematics-with-sagemath.graphique_doctest": {"walltime": 32},
+  "sage.tests.books.computational-mathematics-with-sagemath.graphtheory_doctest": {"walltime": 8},
+  "sage.tests.books.computational-mathematics-with-sagemath.integration_doctest": {"walltime": 32},
+  "sage.tests.books.computational-mathematics-with-sagemath.mpoly_doctest": {"walltime": 8},
+  "sage.tests.books.computational-mathematics-with-sagemath.nonlinear_doctest": {"walltime": 8},
+  "sage.tests.books.computational-mathematics-with-sagemath.recequadiff_doctest": {"walltime": 8},
+  "sage.tests.books.computational-mathematics-with-sagemath.sol.graphique_doctest": {"walltime": 16},
+  "sage.tests.books.computational-mathematics-with-sagemath.sol.numbertheory_doctest": {"walltime": 16},
+  "sage.tests.books.computational-mathematics-with-sagemath.sol.polynomes_doctest": {"walltime": 16},
+  "sage.tests.cmdline": {"walltime": 64},
+  "sage.tests.gosper-sum": {"walltime": 16},
+  "sage.tests.parigp": {"walltime": 8},
+  "sage.topology.simplicial_complex": {"walltime": 8},
+  "sage.topology.simplicial_complex_examples": {"walltime": 16}
 }

From 4ae419192d759cafc2cabde5b63e4f59a4ac8769 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 13:05:37 -0300
Subject: [PATCH 52/59] New package: python3-memory_allocator-0.1.2

---
 srcpkgs/python3-memory_allocator/template | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 srcpkgs/python3-memory_allocator/template

diff --git a/srcpkgs/python3-memory_allocator/template b/srcpkgs/python3-memory_allocator/template
new file mode 100644
index 000000000000..e4fbb51478fa
--- /dev/null
+++ b/srcpkgs/python3-memory_allocator/template
@@ -0,0 +1,14 @@
+# Template file for 'python3-memory_allocator'
+pkgname=python3-memory_allocator
+version=0.1.2
+revision=1
+wrksrc=memory_allocator-$version
+build_style=python3-module
+hostmakedepends="python3-setuptools python3-Cython"
+makedepends="python3-devel"
+short_desc="Extension class to allocate memory easily with cython"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-3.0-or-later"
+homepage="https://github.com/kliem/memory_allocator"
+distfiles="${PYPI_SITE}/m/memory_allocator/memory_allocator-${version}.tar.gz"
+checksum=ddf42a2dcc678062f30c63c868335204d46a4ecdf4db0dc43ed4529f1d0ffab9

From 2d8ac143f29ad6c6b8039a3a8a60b8a401ef9e11 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 17:44:04 -0300
Subject: [PATCH 53/59] New package: python3-primecountpy-0.1.0

---
 srcpkgs/python3-primecountpy/template | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 srcpkgs/python3-primecountpy/template

diff --git a/srcpkgs/python3-primecountpy/template b/srcpkgs/python3-primecountpy/template
new file mode 100644
index 000000000000..fecc774b3983
--- /dev/null
+++ b/srcpkgs/python3-primecountpy/template
@@ -0,0 +1,16 @@
+# Template file for 'python3-primecountpy'
+pkgname=python3-primecountpy
+version=0.1.0
+revision=1
+wrksrc=primecountpy-${version}
+build_style=python3-module
+hostmakedepends="python3-setuptools python3-Cython"
+makedepends="python3-cysignals python3-devel primecount-devel pari-devel"
+short_desc="Python interface to the C++ library primecount"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-3.0-or-later"
+homepage="https://github.com/dimpase/primecountpy"
+distfiles="${PYPI_SITE}/p/primecountpy/primecountpy-${version}.tar.gz"
+checksum=78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
+
+make_check=no # no way to check before installing

From 74d4d7faaf0f58cd3298794e7b72b4543fa5136c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 20:02:33 -0300
Subject: [PATCH 54/59] New package: sage-data-combinatorial_designs-20140630

---
 srcpkgs/sage-data-combinatorial_designs/template | 16 ++++++++++++++++
 srcpkgs/sage-data-combinatorial_designs/update   |  1 +
 2 files changed, 17 insertions(+)
 create mode 100644 srcpkgs/sage-data-combinatorial_designs/template
 create mode 100644 srcpkgs/sage-data-combinatorial_designs/update

diff --git a/srcpkgs/sage-data-combinatorial_designs/template b/srcpkgs/sage-data-combinatorial_designs/template
new file mode 100644
index 000000000000..dcec3dbf554b
--- /dev/null
+++ b/srcpkgs/sage-data-combinatorial_designs/template
@@ -0,0 +1,16 @@
+# Template file for 'sage-data-combinatorial_designs'
+pkgname=sage-data-combinatorial_designs
+version=20140630
+revision=1
+wrksrc="combinatorial_designs-$version"
+short_desc="Data for combinatorial designs"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="Public Domain"
+homepage="https://mirrors.mit.edu/sage/spkg/upstream/combinatorial_designs/"
+distfiles="https://mirrors.mit.edu/sage/spkg/upstream/combinatorial_designs/combinatorial_designs-$version.tar.bz2"
+checksum=c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
+
+do_install() {
+	vmkdir usr/share/sagemath/combinatorial_designs
+	vcopy * usr/share/sagemath/combinatorial_designs
+}
diff --git a/srcpkgs/sage-data-combinatorial_designs/update b/srcpkgs/sage-data-combinatorial_designs/update
new file mode 100644
index 000000000000..d66b1a8e41a0
--- /dev/null
+++ b/srcpkgs/sage-data-combinatorial_designs/update
@@ -0,0 +1 @@
+pkgname=combinatorial_designs

From 24dd3b90c06747baf5f1544e248507c85402c7b2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 20:02:34 -0300
Subject: [PATCH 55/59] New package: sage-data-conway_polynomials-0.5

---
 srcpkgs/sage-data-conway_polynomials/template | 21 +++++++++++++++++++
 srcpkgs/sage-data-conway_polynomials/update   |  1 +
 2 files changed, 22 insertions(+)
 create mode 100644 srcpkgs/sage-data-conway_polynomials/template
 create mode 100644 srcpkgs/sage-data-conway_polynomials/update

diff --git a/srcpkgs/sage-data-conway_polynomials/template b/srcpkgs/sage-data-conway_polynomials/template
new file mode 100644
index 000000000000..57264da84c2f
--- /dev/null
+++ b/srcpkgs/sage-data-conway_polynomials/template
@@ -0,0 +1,21 @@
+# Template file for 'sage-data-conway_polynomials'
+pkgname=sage-data-conway_polynomials
+version=0.5
+revision=1
+wrksrc="conway_polynomials-$version"
+hostmakedepends="python3"
+short_desc="Database of Conway polynomials over finite fields"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="Public Domain, GPL-2.0-or-later"
+homepage="https://mirrors.mit.edu/sage/spkg/upstream/conway_polynomials/"
+distfiles="https://mirrors.mit.edu/sage/spkg/upstream/conway_polynomials/conway_polynomials-$version.tar.bz2
+ https://github.com/sagemath/sage/raw/9.4/build/pkgs/conway_polynomials/spkg-install.py"
+checksum="d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
+ da85e913282d059ca36e14cefc92f891da469e8d7127f13a1ce96c6fb5c296af"
+skip_extraction=spkg-install.py
+
+do_install() {
+	ln -s . src
+	SAGE_SHARE=${DESTDIR}/usr/share/sagemath PYTHONPATH=${PWD} \
+		python3 ${XBPS_SRCDISTDIR}/${pkgname}-${version}/spkg-install.py
+}
diff --git a/srcpkgs/sage-data-conway_polynomials/update b/srcpkgs/sage-data-conway_polynomials/update
new file mode 100644
index 000000000000..628e2749f014
--- /dev/null
+++ b/srcpkgs/sage-data-conway_polynomials/update
@@ -0,0 +1 @@
+pkgname=conway_polynomials

From a30dbe07d6f10bf6e41acf7861ff62d9078f6936 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 20:02:34 -0300
Subject: [PATCH 56/59] New package: sage-data-elliptic_curves-0.8.1

---
 srcpkgs/sage-data-elliptic_curves/template | 21 +++++++++++++++++++++
 srcpkgs/sage-data-elliptic_curves/update   |  1 +
 2 files changed, 22 insertions(+)
 create mode 100644 srcpkgs/sage-data-elliptic_curves/template
 create mode 100644 srcpkgs/sage-data-elliptic_curves/update

diff --git a/srcpkgs/sage-data-elliptic_curves/template b/srcpkgs/sage-data-elliptic_curves/template
new file mode 100644
index 000000000000..5103f9b87374
--- /dev/null
+++ b/srcpkgs/sage-data-elliptic_curves/template
@@ -0,0 +1,21 @@
+# Template file for 'sage-data-elliptic_curves'
+pkgname=sage-data-elliptic_curves
+version=0.8.1
+revision=1
+wrksrc="elliptic_curves-$version"
+hostmakedepends="python3"
+short_desc="Database of elliptic curves"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="Public Domain, GPL-2.0-or-later"
+homepage="https://mirrors.mit.edu/sage/spkg/upstream/elliptic_curves/"
+distfiles="https://mirrors.mit.edu/sage/spkg/upstream/elliptic_curves/elliptic_curves-$version.tar.bz2
+ https://github.com/sagemath/sage/raw/9.4/build/pkgs/elliptic_curves/spkg-install.py"
+checksum="5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
+ 856d482872f72db47c7b718761bb1a205947b276df99b55d087a57130932cf84"
+skip_extraction=spkg-install.py
+
+do_install() {
+	ln -s . src
+	SAGE_SHARE=${DESTDIR}/usr/share/sagemath \
+		python3 ${XBPS_SRCDISTDIR}/${pkgname}-${version}/spkg-install.py
+}
diff --git a/srcpkgs/sage-data-elliptic_curves/update b/srcpkgs/sage-data-elliptic_curves/update
new file mode 100644
index 000000000000..8155f52ce93b
--- /dev/null
+++ b/srcpkgs/sage-data-elliptic_curves/update
@@ -0,0 +1 @@
+pkgname=elliptic_curves

From 8341cfe0058686b69b3828740c53c563f7fa2fc1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 20:02:35 -0300
Subject: [PATCH 57/59] New package: sage-data-polytopes_db-20170220

---
 srcpkgs/sage-data-polytopes_db/template | 16 ++++++++++++++++
 srcpkgs/sage-data-polytopes_db/update   |  1 +
 2 files changed, 17 insertions(+)
 create mode 100644 srcpkgs/sage-data-polytopes_db/template
 create mode 100644 srcpkgs/sage-data-polytopes_db/update

diff --git a/srcpkgs/sage-data-polytopes_db/template b/srcpkgs/sage-data-polytopes_db/template
new file mode 100644
index 000000000000..d0f9f297d84b
--- /dev/null
+++ b/srcpkgs/sage-data-polytopes_db/template
@@ -0,0 +1,16 @@
+# Template file for 'sage-data-polytopes_db'
+pkgname=sage-data-polytopes_db
+version=20170220
+revision=1
+wrksrc="polytopes_db-$version"
+short_desc="Database of 2 and 3-dimensional reflexive polytopes"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="Public Domain"
+homepage="https://mirrors.mit.edu/sage/spkg/upstream/polytopes_db/"
+distfiles="https://mirrors.mit.edu/sage/spkg/upstream/polytopes_db/polytopes_db-$version.tar.bz2"
+checksum=cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
+
+do_install() {
+	vmkdir usr/share/sagemath/reflexive_polytopes
+	vcopy * usr/share/sagemath/reflexive_polytopes
+}
diff --git a/srcpkgs/sage-data-polytopes_db/update b/srcpkgs/sage-data-polytopes_db/update
new file mode 100644
index 000000000000..f51653b547fd
--- /dev/null
+++ b/srcpkgs/sage-data-polytopes_db/update
@@ -0,0 +1 @@
+pkgname=polytopes_db

From d7bdadcdfc5fa5bb51b1c5f0ee3a299ec06734b8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 20:02:35 -0300
Subject: [PATCH 58/59] New package: sage-data-graphs-20210214

---
 srcpkgs/sage-data-graphs/template | 16 ++++++++++++++++
 srcpkgs/sage-data-graphs/update   |  1 +
 2 files changed, 17 insertions(+)
 create mode 100644 srcpkgs/sage-data-graphs/template
 create mode 100644 srcpkgs/sage-data-graphs/update

diff --git a/srcpkgs/sage-data-graphs/template b/srcpkgs/sage-data-graphs/template
new file mode 100644
index 000000000000..9ca16b6cf53a
--- /dev/null
+++ b/srcpkgs/sage-data-graphs/template
@@ -0,0 +1,16 @@
+# Template file for 'sage-data-graphs'
+pkgname=sage-data-graphs
+version=20210214
+revision=1
+wrksrc="graphs-$version"
+short_desc="Database of graphs"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="Public Domain"
+homepage="https://mirrors.mit.edu/sage/spkg/upstream/graphs/"
+distfiles="https://mirrors.mit.edu/sage/spkg/upstream/graphs/graphs-$version.tar.bz2"
+checksum=07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
+
+do_install() {
+	vmkdir usr/share/sagemath/graphs
+	vcopy * usr/share/sagemath/graphs
+}
diff --git a/srcpkgs/sage-data-graphs/update b/srcpkgs/sage-data-graphs/update
new file mode 100644
index 000000000000..c5c7c7dd5253
--- /dev/null
+++ b/srcpkgs/sage-data-graphs/update
@@ -0,0 +1 @@
+pkgname=graphs

From 0dd2e7aecd69934145ca6aa0f47c8d2f4b60509f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 22:45:22 -0300
Subject: [PATCH 59/59] sagemath: all but two packages from system

---
 .../patches/zzz-remove_ratpoints.patch        | 887 ++++++++++++++++++
 srcpkgs/sagemath/template                     | 152 +--
 2 files changed, 970 insertions(+), 69 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/zzz-remove_ratpoints.patch

diff --git a/srcpkgs/sagemath/patches/zzz-remove_ratpoints.patch b/srcpkgs/sagemath/patches/zzz-remove_ratpoints.patch
new file mode 100644
index 000000000000..0842d9d7f6d5
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-remove_ratpoints.patch
@@ -0,0 +1,887 @@
+From 3178a5e1e4f7174343fd913494ae255b3e05fb85 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Mon, 17 Jan 2022 21:04:42 -0300
+Subject: [PATCH] ratpoints: remove deprecated package
+
+---
+ .github/workflows/ci-cygwin-minimal.yml       |   2 +-
+ .github/workflows/ci-cygwin-standard.yml      |   2 +-
+ COPYING.txt                                   |   1 -
+ build/pkgs/ratpoints/SPKG.rst                 |  29 --
+ build/pkgs/ratpoints/checksums.ini            |   4 -
+ build/pkgs/ratpoints/dependencies             |   5 -
+ build/pkgs/ratpoints/distros/arch.txt         |   1 -
+ build/pkgs/ratpoints/distros/conda.txt        |   1 -
+ build/pkgs/ratpoints/distros/debian.txt       |   1 -
+ build/pkgs/ratpoints/distros/nix.txt          |   1 -
+ build/pkgs/ratpoints/distros/repology.txt     |   1 -
+ build/pkgs/ratpoints/package-version.txt      |   1 -
+ build/pkgs/ratpoints/patches/Makefile.patch   |  37 ---
+ .../patches/sturm_and_rp_private.patch        | 194 ------------
+ build/pkgs/ratpoints/spkg-install.in          |  46 ---
+ build/pkgs/ratpoints/type                     |   1 -
+ build/pkgs/sagelib/dependencies               |   2 +-
+ src/sage/libs/ratpoints.pxd                   |  74 -----
+ src/sage/libs/ratpoints.pyx                   | 283 ------------------
+ .../elliptic_curves/descent_two_isogeny.pyx   |   2 -
+ src/sage_setup/library_order.py               |   2 +-
+ 21 files changed, 4 insertions(+), 686 deletions(-)
+ delete mode 100644 build/pkgs/ratpoints/SPKG.rst
+ delete mode 100644 build/pkgs/ratpoints/checksums.ini
+ delete mode 100644 build/pkgs/ratpoints/dependencies
+ delete mode 100644 build/pkgs/ratpoints/distros/arch.txt
+ delete mode 100644 build/pkgs/ratpoints/distros/conda.txt
+ delete mode 100644 build/pkgs/ratpoints/distros/debian.txt
+ delete mode 100644 build/pkgs/ratpoints/distros/nix.txt
+ delete mode 100644 build/pkgs/ratpoints/distros/repology.txt
+ delete mode 100644 build/pkgs/ratpoints/package-version.txt
+ delete mode 100644 build/pkgs/ratpoints/patches/Makefile.patch
+ delete mode 100644 build/pkgs/ratpoints/patches/sturm_and_rp_private.patch
+ delete mode 100644 build/pkgs/ratpoints/spkg-install.in
+ delete mode 100644 build/pkgs/ratpoints/type
+ delete mode 100644 src/sage/libs/ratpoints.pxd
+ delete mode 100644 src/sage/libs/ratpoints.pyx
+
+diff --git a/.github/workflows/ci-cygwin-minimal.yml b/.github/workflows/ci-cygwin-minimal.yml
+index 9e847e7474..9df1365657 100644
+--- a/.github/workflows/ci-cygwin-minimal.yml
++++ b/.github/workflows/ci-cygwin-minimal.yml
+@@ -217,7 +217,7 @@ jobs:
+     env:
+       STAGE: ii-b
+       PREVIOUS_STAGES: i-*
+-      TARGETS: singular maxima gap pari gfan palp flintqs ratpoints arb ecm givaro
++      TARGETS: singular maxima gap pari gfan palp flintqs arb ecm givaro
+       LOCAL_ARTIFACT_NAME: sage-local-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
+       LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
+ 
+diff --git a/.github/workflows/ci-cygwin-standard.yml b/.github/workflows/ci-cygwin-standard.yml
+index cbbe0f46a8..8aee1c2c3c 100644
+--- a/.github/workflows/ci-cygwin-standard.yml
++++ b/.github/workflows/ci-cygwin-standard.yml
+@@ -217,7 +217,7 @@ jobs:
+     env:
+       STAGE: ii-b
+       PREVIOUS_STAGES: i-*
+-      TARGETS: singular maxima gap pari gfan palp flintqs ratpoints arb ecm givaro
++      TARGETS: singular maxima gap pari gfan palp flintqs arb ecm givaro
+       LOCAL_ARTIFACT_NAME: sage-local-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
+       LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
+ 
+diff --git a/COPYING.txt b/COPYING.txt
+index 1176a856a0..a3e9cc6645 100644
+--- a/COPYING.txt
++++ b/COPYING.txt
+@@ -107,7 +107,6 @@ pynac                       GPLv2+
+ pyparsing                   MIT License
+ python                      Python License (see below)
+ R                           GPLv2+
+-ratpoints                   GPLv2+
+ readline                    GPLv3+
+ rpy                         GPLv2+
+ rubiks/dietz                GPL, any version
+diff --git a/build/pkgs/ratpoints/SPKG.rst b/build/pkgs/ratpoints/SPKG.rst
+deleted file mode 100644
+index 6607094bec..0000000000
+--- a/build/pkgs/ratpoints/SPKG.rst
++++ /dev/null
+@@ -1,29 +0,0 @@
+-ratpoints: Find rational points on hyperelliptic curves
+-=======================================================
+-
+-Description
+------------
+-
+-Michael Stoll's program which searches for rational points on
+-hyperelliptic curves.
+-
+-NOTE: the ratpoints package has been assimilated by PARI/GP. Therefore,
+-this package (as Sage package) is deprecated. In the future, it will be
+-removed from Sage.
+-
+-
+-Upstream Contact
+-----------------
+-
+--  Author: Michael Stoll
+--  Email: Michael.Stoll@uni-bayreuth.de
+--  Website: http://www.mathe2.uni-bayreuth.de/stoll/programs/
+-
+-
+-Note on SSE2 instructions
+-~~~~~~~~~~~~~~~~~~~~~~~~~
+-
+--  On several architectures, the SSE2 instructions used by ratpoints
+-   cause
+-   compiler errors. In the case that ratpoints fails to build with SSE2
+-   instructions enabled, the build is repeated with SSE2 disabled.
+diff --git a/build/pkgs/ratpoints/checksums.ini b/build/pkgs/ratpoints/checksums.ini
+deleted file mode 100644
+index 46ba1c9ec1..0000000000
+--- a/build/pkgs/ratpoints/checksums.ini
++++ /dev/null
+@@ -1,4 +0,0 @@
+-tarball=ratpoints-VERSION.tar.bz2
+-sha1=14fbc3dd50742794e0b33d2dd1217e5dd8ad2623
+-md5=9bf091d1b90132433f0a1fc6b585d024
+-cksum=670991933
+diff --git a/build/pkgs/ratpoints/dependencies b/build/pkgs/ratpoints/dependencies
+deleted file mode 100644
+index 9a77ea16f7..0000000000
+--- a/build/pkgs/ratpoints/dependencies
++++ /dev/null
+@@ -1,5 +0,0 @@
+-$(MP_LIBRARY)
+-
+-----------
+-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/ratpoints/distros/arch.txt b/build/pkgs/ratpoints/distros/arch.txt
+deleted file mode 100644
+index e137758627..0000000000
+--- a/build/pkgs/ratpoints/distros/arch.txt
++++ /dev/null
+@@ -1 +0,0 @@
+-ratpoints
+diff --git a/build/pkgs/ratpoints/distros/conda.txt b/build/pkgs/ratpoints/distros/conda.txt
+deleted file mode 100644
+index e137758627..0000000000
+--- a/build/pkgs/ratpoints/distros/conda.txt
++++ /dev/null
+@@ -1 +0,0 @@
+-ratpoints
+diff --git a/build/pkgs/ratpoints/distros/debian.txt b/build/pkgs/ratpoints/distros/debian.txt
+deleted file mode 100644
+index dabd28d624..0000000000
+--- a/build/pkgs/ratpoints/distros/debian.txt
++++ /dev/null
+@@ -1 +0,0 @@
+-libratpoints-dev
+diff --git a/build/pkgs/ratpoints/distros/nix.txt b/build/pkgs/ratpoints/distros/nix.txt
+deleted file mode 100644
+index e137758627..0000000000
+--- a/build/pkgs/ratpoints/distros/nix.txt
++++ /dev/null
+@@ -1 +0,0 @@
+-ratpoints
+diff --git a/build/pkgs/ratpoints/distros/repology.txt b/build/pkgs/ratpoints/distros/repology.txt
+deleted file mode 100644
+index e137758627..0000000000
+--- a/build/pkgs/ratpoints/distros/repology.txt
++++ /dev/null
+@@ -1 +0,0 @@
+-ratpoints
+diff --git a/build/pkgs/ratpoints/package-version.txt b/build/pkgs/ratpoints/package-version.txt
+deleted file mode 100644
+index efed46a7bd..0000000000
+--- a/build/pkgs/ratpoints/package-version.txt
++++ /dev/null
+@@ -1 +0,0 @@
+-2.1.3.p5
+diff --git a/build/pkgs/ratpoints/patches/Makefile.patch b/build/pkgs/ratpoints/patches/Makefile.patch
+deleted file mode 100644
+index 093d7c0018..0000000000
+--- a/build/pkgs/ratpoints/patches/Makefile.patch
++++ /dev/null
+@@ -1,37 +0,0 @@
+---- src/Makefile	2009-10-01 01:08:54.000000000 +0200
+-+++ patches/Makefile	2012-03-17 13:57:33.026315142 +0100
+-@@ -21,11 +21,11 @@
+- #
+- #    Michael Stoll, September 21, 2009
+- 
+--CC = gcc
+-+CC ?= gcc
+- RM = rm -f
+- INSTALL = cp
+- 
+--INSTALL_DIR = /usr/local
+-+INSTALL_DIR ?= /usr/local
+- 
+- DISTFILES = Makefile ratpoints.h rp-private.h primes.h \
+-             gen_find_points_h.c gen_init_sieve_h.c \
+-@@ -47,14 +47,14 @@
+- 	diff -q testbase rptest.out
+- 
+- install-bin: ratpoints
+--	${INSTALL} ratpoints ${INSTALL_DIR}/bin/
+--	chmod 755 ${INSTALL_DIR}/bin/ratpoints
+-+	${INSTALL} ratpoints "${INSTALL_DIR}/bin/"
+-+	chmod 755 "${INSTALL_DIR}/bin/ratpoints"
+- 
+- install-lib: ratpoints.h libratpoints.a
+--	${INSTALL} ratpoints.h ${INSTALL_DIR}/include/
+--	chmod 644 ${INSTALL_DIR}/include/ratpoints.h
+--	${INSTALL} libratpoints.a ${INSTALL_DIR}/lib/
+--	chmod 644 ${INSTALL_DIR}/lib/libratpoints.a
+-+	${INSTALL} ratpoints.h "${INSTALL_DIR}/include/"
+-+	chmod 644 "${INSTALL_DIR}/include/ratpoints.h"
+-+	${INSTALL} libratpoints.a "${INSTALL_DIR}/lib/"
+-+	chmod 644 "${INSTALL_DIR}/lib/libratpoints.a"
+- 
+- install: install-bin install-lib
+- 
+diff --git a/build/pkgs/ratpoints/patches/sturm_and_rp_private.patch b/build/pkgs/ratpoints/patches/sturm_and_rp_private.patch
+deleted file mode 100644
+index 664198c4de..0000000000
+--- a/build/pkgs/ratpoints/patches/sturm_and_rp_private.patch
++++ /dev/null
+@@ -1,194 +0,0 @@
+-diff --git a/rp-private.h b/rp-private.h
+-index b4c7dad..0c7193e 100644
+---- a/rp-private.h
+-+++ b/rp-private.h
+-@@ -36,7 +36,7 @@
+- #define LONG_SHIFT ((LONG_LENGTH == 16) ? 4 : \
+-                     (LONG_LENGTH == 32) ? 5 : \
+- 		    (LONG_LENGTH == 64) ? 6 : 0)
+--#define LONG_MASK (~(-1L<<LONG_SHIFT))
+-+#define LONG_MASK (~(-(1L<<LONG_SHIFT)))
+- 
+- /* Check if SSE instructions can be used.
+-    We assume that one SSE word of 128 bit is two long's,
+-diff --git a/sturm.c b/sturm.c
+-index c78d7c6..5fd2cf5 100644
+---- a/sturm.c
+-+++ b/sturm.c
+-@@ -27,7 +27,6 @@
+-  ***********************************************************************/
+- 
+- #include "ratpoints.h"
+--
+- /**************************************************************************
+-  * Arguments of _ratpoints_compute_sturm() : (from the args argument)     *
+-  *                                                                        *
+-@@ -53,7 +52,7 @@
+- /* A helper function: evaluate the polynomial in cofs[] of given degree
+-   at num/2^denexp and return the sign. */
+- 
+--static long eval_sign(ratpoints_args *args, mpz_t *cofs, long degree,
+-+static long eval_sign(const ratpoints_args *args, const mpz_t *cofs, long degree,
+-                       long num, long denexp)
+- {
+-   long n, e, s;
+-@@ -70,11 +69,80 @@ static long eval_sign(ratpoints_args *args, mpz_t *cofs, long degree,
+-   return(s);
+- }
+- 
+-+static const    long max = (long)(((unsigned long)(-1))>>1);
+-+static const    long min = (long)(-(((unsigned long)(-1))>>1));
+-+    /* recursive helper function */
+-+static void iterate(long nl, long nr, long del, long der, long cleft, long cright,
+-+                 long sl, long sr, long depth,
+-+		 ratpoints_interval **iptr, const ratpoints_interval *ivlo,
+-+		 const ratpoints_args *args, const long k, const long sturm_degs[],
+-+                 const mpz_t sturm[][args->degree + 1])
+-+    { /* nl/2^del, nr/2^der : interval left/right endpoints,
+-+         cleft, cright: sign change counts at endpoints,
+-+         sl, sr: signs at endpoints,
+-+         depth: iteration depth */
+-+     long iter = args->sturm;
+-+      if(cleft == cright && sl < 0) { return; }
+-+         /* here we know the polynomial is negative on the interval */
+-+      if((cleft == cright && sl > 0) || depth >= iter)
+-+      /* we have to add/extend an interval if we either know that
+-+         the polynomial is positive on the interval (first condition)
+-+         or the maximal iteration depth has been reached (second condition) */
+-+      { double l = ((double)nl)/((double)(1<<del));
+-+        double u = ((double)nr)/((double)(1<<der));
+-+        if(*iptr == ivlo)
+-+        { (*iptr)->low = l; (*iptr)->up  = u; (*iptr)++; }
+-+        else
+-+        { if(((*iptr)-1)->up == l) /* extend interval */
+-+          { ((*iptr)-1)->up = u; }
+-+          else /* new interval */
+-+          { (*iptr)->low = l; (*iptr)->up  = u; (*iptr)++; }
+-+        }
+-+        return;
+-+      }
+-+      /* now we must split the interval and evaluate the sturm sequence
+-+         at the midpoint */
+-+      { long nm, dem, s0, s1, s2, s, cmid = 0, n;
+-+        if(nl == min)
+-+        { if(nr == max) { nm = 0; dem = 0; }
+-+          else { nm = (nr == 0) ? -1 : 2*nr; dem = 0; }
+-+        }
+-+        else
+-+        { if(nr == max) { nm = (nl == 0) ? 1 : 2*nl; dem = 0; }
+-+          else /* "normal" case */
+-+          { if(del == der) /* then both are zero */
+-+            { if(((nl+nr) & 1) == 0) { nm = (nl+nr)>>1; dem = 0; }
+-+              else { nm = nl+nr; dem = 1; }
+-+            }
+-+            else /* here one de* is greater */
+-+            { if(del > der) { nm = nl + (nr<<(del-der)); dem = del+1; }
+-+              else { nm = (nl<<(der-del)) + nr; dem = der+1; }
+-+            }
+-+          }
+-+        }
+-+        s0 = eval_sign(args, sturm[0], sturm_degs[0], nm, dem);
+-+        s1 = eval_sign(args, sturm[1], sturm_degs[1], nm, dem);
+-+        if(s0*s1 == -1) { cmid++; }
+-+        s = (s1 == 0) ? s0 : s1;
+-+        for(n = 2; n <= k; n++)
+-+        { s2 = eval_sign(args, sturm[n], sturm_degs[n], nm, dem);
+-+          if(s2 == -s) { cmid++; s = s2; }
+-+          else if(s2 != 0) { s = s2; }
+-+        }
+-+        /* now recurse */
+-+        iterate(nl, nm, del, dem, cleft, (s0==0) ? (cmid+1) : cmid,
+-+                sl, (s0==0) ? -s1 : s0, depth+1,
+-+                iptr, ivlo, args, k, sturm_degs, sturm);
+-+        iterate(nm, nr, dem, der, cmid, cright,
+-+                (s0==0) ? s1 : s0, sr, depth+1,
+-+		iptr, ivlo, args, k, sturm_degs, sturm);
+-+      }
+-+    } /* end iterate() */
+-+
+- long _ratpoints_compute_sturm(ratpoints_args *args)
+- { 
+-   mpz_t *cofs = args->cof;
+-   long degree = args->degree;
+--  long iter = args->sturm; 
+-   ratpoints_interval *ivlist = args->domain;
+-   long num_iv = args->num_inter;
+-   long n, m, k, new_num;
+-@@ -165,75 +233,12 @@ long _ratpoints_compute_sturm(ratpoints_args *args)
+-   /* recall: typedef struct {double low; double up;} ratpoints_interval; */
+-   { ratpoints_interval ivlocal[1 + (degree>>1)];
+-     ratpoints_interval *iptr = &ivlocal[0];
+--    long max = (long)(((unsigned long)(-1))>>1);
+--    long min = -max;
+-     long num_intervals;
+-     long slcf = mpz_cmp_si(cofs[degree], 0);
+- 
+--    /* recursive helper function */
+--    void iterate(long nl, long nr, long del, long der, long cleft, long cright,
+--                 long sl, long sr, long depth)
+--    { /* nl/2^del, nr/2^der : interval left/right endpoints,
+--         cleft, cright: sign change counts at endpoints,
+--         sl, sr: signs at endpoints,
+--         depth: iteration depth */
+--      if(cleft == cright && sl < 0) { return; }
+--         /* here we know the polynomial is negative on the interval */
+--      if((cleft == cright && sl > 0) || depth >= iter) 
+--      /* we have to add/extend an interval if we either know that
+--         the polynomial is positive on the interval (first condition)
+--         or the maximal iteration depth has been reached (second condition) */
+--      { double l = ((double)nl)/((double)(1<<del));
+--        double u = ((double)nr)/((double)(1<<der));
+--        if(iptr == &ivlocal[0])
+--        { iptr->low = l; iptr->up  = u; iptr++; }
+--        else
+--        { if((iptr-1)->up == l) /* extend interval */
+--          { (iptr-1)->up = u; }
+--          else /* new interval */
+--          { iptr->low = l; iptr->up  = u; iptr++; }
+--        }
+--        return; 
+--      }
+--      /* now we must split the interval and evaluate the sturm sequence
+--         at the midpoint */
+--      { long nm, dem, s0, s1, s2, s, cmid = 0, n;
+--        if(nl == min)
+--        { if(nr == max) { nm = 0; dem = 0; }
+--          else { nm = (nr == 0) ? -1 : 2*nr; dem = 0; }
+--        }
+--        else
+--        { if(nr == max) { nm = (nl == 0) ? 1 : 2*nl; dem = 0; } 
+--          else /* "normal" case */
+--          { if(del == der) /* then both are zero */
+--            { if(((nl+nr) & 1) == 0) { nm = (nl+nr)>>1; dem = 0; }
+--              else { nm = nl+nr; dem = 1; } 
+--            }
+--            else /* here one de* is greater */
+--            { if(del > der) { nm = nl + (nr<<(del-der)); dem = del+1; }
+--              else { nm = (nl<<(der-del)) + nr; dem = der+1; }
+--            }
+--          }
+--        }
+--        s0 = eval_sign(args, sturm[0], sturm_degs[0], nm, dem);
+--        s1 = eval_sign(args, sturm[1], sturm_degs[1], nm, dem);
+--        if(s0*s1 == -1) { cmid++; }
+--        s = (s1 == 0) ? s0 : s1;
+--        for(n = 2; n <= k; n++)
+--        { s2 = eval_sign(args, sturm[n], sturm_degs[n], nm, dem);
+--          if(s2 == -s) { cmid++; s = s2; }
+--          else if(s2 != 0) { s = s2; }
+--        }
+--        /* now recurse */
+--        iterate(nl, nm, del, dem, cleft, (s0==0) ? (cmid+1) : cmid, 
+--                sl, (s0==0) ? -s1 : s0, depth+1);
+--        iterate(nm, nr, dem, der, cmid, cright, 
+--                (s0==0) ? s1 : s0, sr, depth+1);
+--      }
+--    } /* end iterate() */
+--
+-     iterate(min, max, 0, 0, count2, count1, 
+--            (degree & 1) ? -slcf : slcf, slcf, 0);
+-+            (degree & 1) ? -slcf : slcf, slcf, 0,
+-+	    &iptr, &ivlocal[0], args, k, sturm_degs, sturm);
+-     num_intervals = iptr - &ivlocal[0];
+-     /* intersect with given intervals */
+-     { ratpoints_interval local_copy[num_iv];
+diff --git a/build/pkgs/ratpoints/spkg-install.in b/build/pkgs/ratpoints/spkg-install.in
+deleted file mode 100644
+index b6856c4d4a..0000000000
+--- a/build/pkgs/ratpoints/spkg-install.in
++++ /dev/null
+@@ -1,46 +0,0 @@
+-PRIME_SIZE=7
+-
+-CCFLAGS_NO_SSE="-I$SAGE_LOCAL/include -Wall -O2 -fPIC -DRATPOINTS_MAX_BITS_IN_PRIME=$PRIME_SIZE"
+-CCFLAGS2="-L$SAGE_LOCAL/lib -lgmp -lm $LDFLAGS"
+-CCFLAGS3="-L. -lratpoints"
+-
+-if [[ "$UNAME" = "Darwin" ]]; then
+-    CCFLAGS1="$CCFLAGS_NO_SSE"
+-    echo "Building without SSE2 instructions (MacOS X)."
+-else
+-    CCFLAGS1="$CCFLAGS_NO_SSE -DUSE_SSE"
+-    echo "Attempting to build ratpoints making use of SSE2 instructions."
+-fi
+-
+-# Copy CFLAGS set externally to CCFLAGS.
+-CCFLAGS="$CFLAGS"
+-
+-export CCFLAGS1
+-export CCFLAGS2
+-export CCFLAGS3
+-export CCFLAGS
+-
+-cd src/
+-
+-#############################
+-# Build (just) the library: #
+-#############################
+-
+-# PLEASE, don't break this again by deleting "libratpoints.a".  See trac 8267.
+-if ! $MAKE libratpoints.a; then
+-    [ "$UNAME" = "Darwin" ] && sdh_die "Error building ratpoints."
+-    echo "Build failed. Trying without SSE2 instructions."
+-    CCFLAGS1="$CCFLAGS_NO_SSE"
+-    sdh_make libratpoints.a
+-fi
+-
+-##############################################
+-# Install (just) the library and its header: #
+-##############################################
+-
+-# The following requires that the Makefile got patched;
+-# otherwise one could pass 'INSTALL_DIR=...' on the 'make'
+-# command line:
+-export INSTALL_DIR="$SAGE_DESTDIR_LOCAL"
+-mkdir -p "$INSTALL_DIR"/{lib,include}
+-sdh_make install-lib
+diff --git a/build/pkgs/ratpoints/type b/build/pkgs/ratpoints/type
+deleted file mode 100644
+index a6a7b9cd72..0000000000
+--- a/build/pkgs/ratpoints/type
++++ /dev/null
+@@ -1 +0,0 @@
+-standard
+diff --git a/build/pkgs/sagelib/dependencies b/build/pkgs/sagelib/dependencies
+index 9c7797b1f4..6a7d4b8132 100644
+--- a/build/pkgs/sagelib/dependencies
++++ b/build/pkgs/sagelib/dependencies
+@@ -1,4 +1,4 @@
+-FORCE $(SCRIPTS) arb boost_cropped $(BLAS) brial cliquer cypari cysignals cython ecl eclib ecm flint libgd gap giac givaro glpk gmpy2 gsl iml jinja2 jupyter_core lcalc lrcalc libbraiding libhomfly libpng linbox m4ri m4rie memory_allocator mpc mpfi mpfr $(MP_LIBRARY) ntl numpy pari pip pkgconfig planarity ppl pplpy primesieve primecount primecountpy pycygwin $(PYTHON) ratpoints requests rw sage_conf singular symmetrica zn_poly $(PCFILES) | $(PYTHON_TOOLCHAIN) sage_setup
++FORCE $(SCRIPTS) arb boost_cropped $(BLAS) brial cliquer cypari cysignals cython ecl eclib ecm flint libgd gap giac givaro glpk gmpy2 gsl iml jinja2 jupyter_core lcalc lrcalc libbraiding libhomfly libpng linbox m4ri m4rie memory_allocator mpc mpfi mpfr $(MP_LIBRARY) ntl numpy pari pip pkgconfig planarity ppl pplpy primesieve primecount primecountpy pycygwin $(PYTHON) requests rw sage_conf singular symmetrica zn_poly $(PCFILES) | $(PYTHON_TOOLCHAIN) sage_setup
+ 
+ ----------
+ All lines of this file are ignored except the first.
+diff --git a/src/sage/libs/ratpoints.pxd b/src/sage/libs/ratpoints.pxd
+deleted file mode 100644
+index 67e309b109..0000000000
+--- a/src/sage/libs/ratpoints.pxd
++++ /dev/null
+@@ -1,74 +0,0 @@
+-from sage.rings.integer cimport Integer
+-from sage.libs.gmp.mpz cimport *
+-
+-cdef extern from "ratpoints.h":
+-    long RATPOINTS_MAX_DEGREE
+-    long RATPOINTS_ARRAY_SIZE
+-    long RATPOINTS_DEFAULT_SP1
+-    long RATPOINTS_DEFAULT_SP2
+-    long RATPOINTS_DEFAULT_NUM_PRIMES
+-    long RATPOINTS_DEFAULT_MAX_FORBIDDEN
+-    long RATPOINTS_DEFAULT_STURM
+-    long RATPOINTS_NON_SQUAREFREE
+-    long RATPOINTS_BAD_ARGS
+-
+-    # for args flags:
+-    long RATPOINTS_NO_CHECK # when set, do not check whether the surviving
+-                            # x-coordinates give rise to rational points
+-    long RATPOINTS_NO_Y # when set, only list x coordinates instead of actual points
+-    long RATPOINTS_NO_REVERSE # when set, do not modify the mpz_t array
+-    long RATPOINTS_NO_JACOBI # when set, prevent use of Jacobi symbol test
+-    long RATPOINTS_VERBOSE # when set, print some output on what ratpoints is doing
+-    # define RATPOINTS_FLAGS_INPUT_MASK \
+-    # (RATPOINTS_NO_CHECK | RATPOINTS_NO_Y | RATPOINTS_NO_REVERSE | \
+-    #  RATPOINTS_NO_JACOBI | RATPOINTS_VERBOSE)
+-
+-
+-    ctypedef struct ratpoints_interval:
+-        double low
+-        double up
+-    ctypedef struct ratpoints_args:
+-        mpz_t *cof
+-        long degree
+-        long height
+-        ratpoints_interval *domain
+-        long num_inter
+-        long b_low
+-        long b_high
+-        long sp1
+-        long sp2
+-        long array_size
+-        long sturm
+-        long num_primes
+-        long max_forbidden
+-        unsigned int flags
+-        # from here: private data
+-        # mpz_t *work
+-        # void *se_buffer
+-        # void *se_next
+-        # void *ba_buffer
+-        # void *ba_next
+-        # int *int_buffer
+-        # int *int_next
+-        # void *sieve_list
+-    long find_points(ratpoints_args*, int proc(long, long, mpz_t, void*, int*), void*)
+-    void find_points_init(ratpoints_args*)
+-    long find_points_work(ratpoints_args*, int proc(long, long, mpz_t, void*, int*), void*)
+-    void find_points_clear(ratpoints_args*)
+-
+-ctypedef struct point_list:
+-    long *xes
+-    mpz_t *ys
+-    long *zs
+-    long array_size
+-    long num_points
+-    long max_num_points
+-
+-ctypedef struct info_struct_exists_only:
+-    int verbose
+-
+-cdef int ratpoints_mpz_exists_only(mpz_t *, long, int, bint) except -1
+-
+-
+-
+-
+diff --git a/src/sage/libs/ratpoints.pyx b/src/sage/libs/ratpoints.pyx
+deleted file mode 100644
+index 257dfe3eeb..0000000000
+--- a/src/sage/libs/ratpoints.pyx
++++ /dev/null
+@@ -1,283 +0,0 @@
+-# distutils: libraries = ratpoints
+-r"""
+-Hyperelliptic Curve Point Finding, via ratpoints (deprecated)
+-
+-This module is deprecated, use PARI instead::
+-
+-    sage: pari(EllipticCurve("389a1")).ellratpoints(4)
+-    [[-2, 0], [-2, -1], [-1, 1], [-1, -2], [0, 0], [0, -1], [1, 0], [1, -1], [3, 5], [3, -6], [4, 8], [4, -9], [-3/4, 7/8], [-3/4, -15/8]]
+-    sage: pari("[x^3 + x^2 - 2*x, 1]").hyperellratpoints(4)
+-    [[-2, 0], [-2, -1], [-1, 1], [-1, -2], [0, 0], [0, -1], [1, 0], [1, -1], [3, 5], [3, -6], [4, 8], [4, -9], [-3/4, 7/8], [-3/4, -15/8]]
+-"""
+-
+-from cysignals.memory cimport sig_malloc, sig_realloc, sig_free
+-from cysignals.signals cimport sig_on, sig_off
+-
+-from sage.misc.superseded import deprecation_cython as deprecation
+-deprecation(24531, "the module sage.libs.ratpoints is deprecated; use pari.ellratpoints or pari.hyperellratpoints instead")
+-
+-
+-cdef int process(long x, long z, mpz_t y, void *info0, int *quit):
+-    # ratpoints calls this function when it finds a point [x : y : z]
+-    # info0 is the pointer passed to ratpoints originally
+-    # if quit[0] is set to a nonzero value, ratpoints will abort immediately
+-    cdef point_list *plist = <point_list *> info0
+-    cdef long i
+-    if plist.array_size == plist.num_points:
+-        i = plist.array_size
+-        plist.array_size *= 2
+-        plist.xes = <long *> sig_realloc(plist.xes, plist.array_size * sizeof(long))
+-        plist.ys = <mpz_t *> sig_realloc(plist.ys, plist.array_size * sizeof(mpz_t))
+-        plist.zs = <long *> sig_realloc(plist.zs, plist.array_size * sizeof(long))
+-        while i < plist.array_size:
+-            mpz_init(plist.ys[i])
+-            i += 1
+-    plist.xes[plist.num_points] = x
+-    mpz_set(plist.ys[plist.num_points], y)
+-    plist.zs[plist.num_points] = z
+-    plist.num_points += 1
+-    if plist.max_num_points > 0:
+-        if plist.max_num_points == plist.num_points:
+-            quit[0] = -1
+-    return 1 # weight for counting the points
+-
+-def ratpoints(list coeffs, long H, verbose=False, long max=0,
+-              min_x_denom=None, max_x_denom=None, intervals=[]):
+-    """
+-    Access the ratpoints library to find points on the hyperelliptic curve:
+-
+-    `y^2 = a_n x^n + \cdots + a_1 x + a_0.`
+-
+-    INPUT:
+-
+-    - ``coeffs`` -- list of integer coefficients `a_0` , `a_1`, ..., `a_n`
+-
+-    - ``H`` -- the bound for the denominator and the absolute value of the
+-      numerator of the `x`-coordinate
+-
+-    - ``verbose`` -- if ``True``, ratpoints will print comments about
+-      its progress
+-
+-    - ``max`` -- maximum number of points to find (if 0, find all of them)
+-
+-    OUTPUT:
+-
+-    The points output by this program are points in (1, ceil(n/2), 1)-weighted
+-    projective space. If n is even, then the associated homogeneous equation is
+-    `y^2 = a_n x^n + \cdots + a_1 x z^{n-1} + a_0 z^n` while if n is odd, it is
+-    `y^2 = a_n x^n z + \cdots + a_1 x z^n + a_0 z^{n+1}`.
+-
+-    EXAMPLES::
+-
+-        sage: from sage.libs.ratpoints import ratpoints
+-        doctest:...: DeprecationWarning: the module sage.libs.ratpoints is deprecated; use pari.ellratpoints or pari.hyperellratpoints instead
+-        See http://trac.sagemath.org/24531 for details.
+-        sage: for x,y,z in ratpoints([1..6], 200):
+-        ....:     print(-1*y^2 + 1*z^6 + 2*x*z^5 + 3*x^2*z^4 + 4*x^3*z^3 + 5*x^4*z^2 + 6*x^5*z)
+-        0
+-        0
+-        0
+-        0
+-        0
+-        0
+-        0
+-        sage: for x,y,z in ratpoints([1..5], 200):
+-        ....:    print(-1*y^2 + 1*z^4 + 2*x*z^3 + 3*x^2*z^2 + 4*x^3*z + 5*x^4)
+-        0
+-        0
+-        0
+-        0
+-        0
+-        0
+-        0
+-        0
+-
+-        sage: for x,y,z in ratpoints([1..200], 1000):
+-        ....:    print("{} {} {}".format(x,y,z))
+-        1 0 0
+-        0 1 1
+-        0 -1 1
+-        201 25353012004564588029934064107520000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 200
+-        201 -25353012004564588029934064107520000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 200
+-
+-    The denominator of `x` can be restricted, for example to find
+-    integral points::
+-
+-        sage: from sage.libs.ratpoints import ratpoints
+-        sage: coeffs = [400, -112, 0, 1]
+-        sage: ratpoints(coeffs, 10^6, max_x_denom=1, intervals=[[-10,0],[1000,2000]])
+-        [(1, 0, 0), (-8, 28, 1), (-8, -28, 1), (-7, 29, 1), (-7, -29, 1),
+-         (-4, 28, 1), (-4, -28, 1), (0, 20, 1), (0, -20, 1), (1368, 50596, 1),
+-         (1368, -50596, 1), (1624, 65444, 1), (1624, -65444, 1)]
+-
+-        sage: ratpoints(coeffs, 1000, min_x_denom=100, max_x_denom=200)
+-        [(1, 0, 0),
+-        (-656, 426316, 121),
+-        (-656, -426316, 121),
+-        (452, 85052, 121),
+-        (452, -85052, 121),
+-        (988, 80036, 121),
+-        (988, -80036, 121),
+-        (-556, 773188, 169),
+-        (-556, -773188, 169),
+-        (264, 432068, 169),
+-        (264, -432068, 169)]
+-
+-    Finding the integral points on the compact component of an elliptic curve::
+-
+-        sage: E = EllipticCurve([0,1,0,-35220,-1346400])
+-        sage: e1, e2, e3 = E.division_polynomial(2).roots(multiplicities=False)
+-        sage: coeffs = [E.a6(),E.a4(),E.a2(),1]
+-        sage: ratpoints(coeffs, 1000, max_x_denom=1, intervals=[[e3,e2]])
+-        [(1, 0, 0),
+-        (-165, 0, 1),
+-        (-162, 366, 1),
+-        (-162, -366, 1),
+-        (-120, 1080, 1),
+-        (-120, -1080, 1),
+-        (-90, 1050, 1),
+-        (-90, -1050, 1),
+-        (-85, 1020, 1),
+-        (-85, -1020, 1),
+-        (-42, 246, 1),
+-        (-42, -246, 1),
+-        (-40, 0, 1)]
+-    """
+-    cdef ratpoints_args args
+-    cdef long i, total, verby
+-    cdef Integer sage_int, s_x, s_y, s_z
+-    cdef point_list *plist
+-
+-
+-    verby = ~0 if verbose else 0
+-
+-    # Set the coefficient array:
+-    coeffs = [Integer(a) for a in coeffs]
+-    args.degree = len(coeffs)-1
+-    args.cof = <mpz_t *> sig_malloc((args.degree+1) * sizeof(mpz_t))
+-
+-    # Create an array to hold the points found:
+-    plist = <point_list *> sig_malloc(sizeof(point_list))
+-    if max == 0:
+-        plist.array_size = 64
+-    else:
+-        plist.array_size = max
+-    plist.xes = <long *> sig_malloc(plist.array_size * sizeof(long))
+-    plist.ys = <mpz_t *> sig_malloc(plist.array_size * sizeof(mpz_t))
+-    for i from 0 <= i < plist.array_size:
+-        mpz_init(plist.ys[i])
+-    plist.zs = <long *> sig_malloc(plist.array_size * sizeof(long))
+-    plist.num_points = 0
+-    plist.max_num_points = max
+-
+-    # Set the height bound:
+-    args.height = H
+-
+-    # Set the intervals to be searched, including any specified:
+-    args.num_inter = len(intervals)
+-    args.domain = <ratpoints_interval *> sig_malloc((args.num_inter + args.degree) * sizeof(ratpoints_interval))
+-    for i,I in enumerate(intervals):
+-        args.domain[i].low = I[0]
+-        args.domain[i].up  = I[1]
+-
+-    # Set the minimum and maximum denominators:
+-    if not min_x_denom:  min_x_denom = 1
+-    if not max_x_denom:  max_x_denom = H
+-    args.b_low = min_x_denom
+-    args.b_high = max_x_denom
+-
+-    # Set the remaining arguments, whose non-default use is technical
+-    # (see ratpoints documentation)
+-    args.sp1 = RATPOINTS_DEFAULT_SP1
+-    args.sp2 = RATPOINTS_DEFAULT_SP2
+-    args.array_size = RATPOINTS_ARRAY_SIZE
+-    args.sturm = RATPOINTS_DEFAULT_STURM
+-    args.num_primes = RATPOINTS_DEFAULT_NUM_PRIMES
+-    args.max_forbidden = RATPOINTS_DEFAULT_MAX_FORBIDDEN
+-    args.flags = (RATPOINTS_VERBOSE & verby)
+-
+-    for i from 0 <= i <= args.degree:
+-        mpz_init(args.cof[i])
+-        sage_int = <Integer> coeffs[i]
+-        mpz_set(args.cof[i], sage_int.value)
+-
+-    sig_on()
+-    total = find_points(&args, process, <void *>plist)
+-    sig_off()
+-    if total == RATPOINTS_NON_SQUAREFREE:
+-        raise RuntimeError('Polynomial must be square-free')
+-    if total == RATPOINTS_BAD_ARGS:
+-        raise RuntimeError('Bad arguments to ratpoints')
+-
+-    for i from 0 <= i <= args.degree:
+-        mpz_clear(args.cof[i])
+-
+-    sig_free(args.cof)
+-    sig_free(args.domain)
+-
+-    cdef list L = []
+-    for i from 0 <= i < plist.num_points:
+-        s_x = Integer(0)
+-        s_y = Integer(0)
+-        s_z = Integer(0)
+-        mpz_set_si(s_x.value, plist.xes[i])
+-        mpz_set(s_y.value, plist.ys[i])
+-        mpz_set_si(s_z.value, plist.zs[i])
+-        L.append((s_x,s_y,s_z))
+-
+-    for i from 0 <= i < plist.array_size:
+-        mpz_clear(plist.ys[i])
+-    sig_free(plist.xes)
+-    sig_free(plist.ys)
+-    sig_free(plist.zs)
+-    sig_free(plist)
+-
+-    return L
+-
+-cdef int process_exists_only(long x, long z, mpz_t y, void *info0, int *quit):
+-    cdef info_struct_exists_only *info_s = <info_struct_exists_only *>info0
+-    cdef Integer YY
+-    if info_s.verbose:
+-        YY = Integer(0); mpz_set(YY.value, y)
+-        print('Found point [ %d : %d : %d ], quitting' % (x, YY, z))
+-    quit[0] = -1
+-    return 1
+-
+-cdef int ratpoints_mpz_exists_only(mpz_t *coeffs, long H, int degree, bint verbose) except -1:
+-    """
+-    Direct call to ratpoints to search for existence only.
+-
+-    WARNING - The coefficient array will be modified by ratpoints.
+-    """
+-    cdef ratpoints_args args
+-    cdef info_struct_exists_only info_s
+-    cdef long total, verby = ~0 if verbose else 0
+-    info_s.verbose = verbose
+-    assert degree <= RATPOINTS_MAX_DEGREE
+-    args.degree = degree
+-    args.cof = coeffs
+-    args.domain = <ratpoints_interval *> sig_malloc(2*args.degree * sizeof(ratpoints_interval))
+-    args.height = H
+-    args.num_inter = 0
+-    args.b_low = 1
+-    args.b_high = H
+-    args.sp1 = RATPOINTS_DEFAULT_SP1
+-    args.sp2 = RATPOINTS_DEFAULT_SP2
+-    args.array_size = RATPOINTS_ARRAY_SIZE
+-    args.sturm = RATPOINTS_DEFAULT_STURM
+-    args.num_primes = RATPOINTS_DEFAULT_NUM_PRIMES
+-    args.max_forbidden = RATPOINTS_DEFAULT_MAX_FORBIDDEN
+-    args.flags = (RATPOINTS_VERBOSE & verby)
+-    sig_on()
+-    total = find_points(&args, process_exists_only, <void *>(&info_s))
+-    sig_off()
+-    sig_free(args.domain)
+-    if total == RATPOINTS_NON_SQUAREFREE:
+-        raise RuntimeError('Polynomial must be square-free')
+-    if total == RATPOINTS_BAD_ARGS:
+-        raise RuntimeError('Bad arguments to ratpoints')
+-    return 1 if (total > 0) else 0
+-
+-
+-
+-
+diff --git a/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx b/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx
+index 1cc70925fa..c2f994a650 100644
+--- a/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx
++++ b/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx
+@@ -1,5 +1,3 @@
+-# distutils: libraries = ratpoints
+-
+ r"""
+ Descent on elliptic curves over `\QQ` with a 2-isogeny
+ """
+diff --git a/src/sage_setup/library_order.py b/src/sage_setup/library_order.py
+index 8830d44a95..0b450b3723 100644
+--- a/src/sage_setup/library_order.py
++++ b/src/sage_setup/library_order.py
+@@ -25,7 +25,7 @@ library_order_list = aliases.get("SINGULAR_LIBRARIES", []) + [
+     "giac", "intl", "curl",
+     "ec", "ecm"
+ ] + aliases.get("LINBOX_LIBRARIES", []) + aliases.get("FFLASFFPACK_LIBRARIES", []) + aliases.get("GSL_LIBRARIES", []) + [
+-    "pari", "flint", "ratpoints", "ecl", "glpk", "ppl",
++    "pari", "flint", "ecl", "glpk", "ppl",
+ ] + arb_dylib_names + [
+     "mpfi", "mpfr", "mpc", "ntl", "gmp", "gmpxx",
+     "brial",
+-- 
+2.34.1
+
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 8f27de532058..d3ebd921210d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -32,64 +32,26 @@ _SAGE_ROOT=/usr/lib/sage-${version}
 
 _SAGE_UPSTREAM_MIRROR=https://mirrors.mit.edu/sage/spkg/upstream
 
-# packages were sage is the upstream
-_upstream="
- ${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
- ${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
- ${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
- ${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
- ${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
- ${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
- ${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
- ${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
- ${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
-"
-checksum+="
- c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
- d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
- 5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
- ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
- 169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
- cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
- edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
- b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
- cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
-"
-
-# packages from pypi (python modules)
-_upstream+="
-
- ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
- ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
- ${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
-
- ${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
- ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
-"
-checksum+="
-
- d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
- 5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
- 78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
-
- ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
- dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
-"
-
-# other upstream packages
-_upstream+="
- http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
- https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
- https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
+# these packages can be used from system
+_spkg_system="
+ cppy
+ cython
+ cysignals
+ cypari
+ pplpy
+ fpylll
+ memory_allocator
 "
-checksum+="
- 07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
- 3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
- 718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
+# databases to be used from system
+_databases="
+ combinatorial_designs
+ conway_polynomials
+ elliptic_curves
+ graphs
+ polytopes_db
 "
-
-# these packages are not needed, don't install
-_dontinstall="
+### these packages are not needed, skip
+_spkg_skip="
  appnope
  fonttools
  importlib_resources
@@ -98,18 +60,60 @@ _dontinstall="
  setuptools_wheel
  sphinxcontrib_websupport
  pplpy_doc
+ vcversioner
 "
 
-# these packages can be used from system
-_usefromsystem="
- cppy
- cython
- cysignals
- cypari
- pplpy
- fpylll
+_upstream=""
+
+# threejs
+_upstream+=" https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz"
+checksum+=" 718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8"
+_need_to_pass_doctests="
+ threejs
 "
 
+# primecountpy (use from system?)
+_upstream+=" ${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz"
+checksum+=" 78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676"
+_need_to_build="
+ primecountpy
+"
+
+### these might be necessary to run the notebook... for now skip as doctest pass
+_spkg_skip+="
+ jmol
+ mathjax
+ sagenb_export
+ thebe
+ sagetex
+ jupyter_jsmol
+ rpy2
+"
+#_upstream+="
+# ${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
+# ${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
+# ${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
+# ${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
+# https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+# ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
+# ${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
+#"
+#checksum+="
+# ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
+# 169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
+# b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
+# cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
+# 3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+# d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
+# ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
+#"
+
+for db in $_databases; do
+	_spkg_system+=" $db"
+	depends+=" sage-data-$db"
+	checkdepends+=" sage-data-$db"
+done
+
 for u in ${_upstream}; do
 	distfiles+=" $u"
 	skip_extraction+=" ${u##*[/>]}"
@@ -152,12 +156,12 @@ post_patch() {
 }
 
 pre_configure() {
-	for spkg in $_dontinstall; do
+	for spkg in $_spkg_skip; do
 		configure_args+=" sage_spkg_install_$spkg=no"
 		configure_args+=" sage_require_$spkg=no"
 	done
 
-	for spkg in $_usefromsystem; do
+	for spkg in $_spkg_system; do
 		configure_args+=" sage_spkg_install_$spkg=no"
 		configure_args+=" sage_require_$spkg=yes"
 	done
@@ -174,6 +178,13 @@ post_configure() {
 	cat <<-EOF >> pkgs/sage-conf/sage_conf.py
 	GAP_ROOT_DIR = "/usr/share/gap"
 	GAP_SO = "$(objdump -p /usr/lib/libgap.so | awk '/SONAME/{print $2}')"
+	CONWAY_POLYNOMIALS_DATA_DIR = "/usr/share/sagemath/conway_polynomials"
+	GRAPHS_DATA_DIR = "/usr/share/sagemath/graphs"
+	ELLCURVE_DATA_DIR = "/usr/share/sagemath/ellcurves"
+	POLYTOPE_DATA_DIR = "/usr/share/sagemath/reflexive_polytopes"
+	COMBINATORIAL_DESIGN_DATA_DIR = "/usr/share/sagemath/combinatorial_designs"
+	CREMONA_MINI_DATA_DIR = "/usr/share/sagemath/cremona"
+	CREMONA_LARGE_DATA_DIR = "/usr/share/sagemath/cremona"
 	EOF
 }
 
@@ -213,9 +224,9 @@ do_check() {
 	cp ${FILESDIR}/timings2.json .
 	_test_args="--stats_path=timings2.json"
 	if [ "$XBPS_CHECK_PKGS" = full ]; then
-		_test_args+=" --long --warn-long 20.0"
+		_test_args+=" --long --warn-long 60.0"
 	else
-		_test_args+=" --warn-long 10.0"
+		_test_args+=" --warn-long 30.0"
 	fi
 	if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
 		# for CI use a predictable random seed
@@ -308,7 +319,10 @@ _sage_python3_modules="
  python3-cypari2
  python3-pplpy
  python3-fpylll
- "
+
+ python3-primecountpy
+ python3-memory_allocator
+"
 
 # python packages are build and runtime dependencies
 makedepends+=" $_sage_python3_modules"

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.rc2
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (219 preceding siblings ...)
  2022-01-18  1:46 ` [PR PATCH] [Updated] " tornaria
@ 2022-01-18  1:47 ` tornaria
  2022-01-18  9:05 ` dkwo
                   ` (27 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-18  1:47 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1015000272

Comment:
It's working using only two upstream packages not-from-system (primecountpy and threejs). I packaged primecountpy (included here) but I couldn't make it work with sage.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.rc2
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (220 preceding siblings ...)
  2022-01-18  1:47 ` tornaria
@ 2022-01-18  9:05 ` dkwo
  2022-01-18  9:56 ` [PR PATCH] [Updated] " tornaria
                   ` (26 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2022-01-18  9:05 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1015204526

Comment:
This seems already quite satisfactory to me.
Consider that they're going to make changes to [three.js](https://trac.sagemath.org/ticket/30123), which hopefully will also solve some of our problems with jupyter symlinks, as well as [mathjax](https://trac.sagemath.org/ticket/30296), so we shouldn't waste too much time on these imho.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: sagemath-9.5.rc2
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (221 preceding siblings ...)
  2022-01-18  9:05 ` dkwo
@ 2022-01-18  9:56 ` tornaria
  2022-01-18 21:55 ` tornaria
                   ` (25 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-18  9:56 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1180 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.rc2
This is WIP, so I can get feedback.

Supported architectures: x86_64, x86_64-musl, i686. We also try to make sure it works with musl-1.2.

The testsuite can be run normal (-Q) or long (-K). For CI it runs normal (~ 1/2 time) and it uses a fixed random seed 0 to avoid random failures. When running locally, the random seed is random so one may get occasional test failures that depend on a particular value of the random seed.

The package `sagemath-test` is a dummy package whose purpose is to run the testsuite with sage installed as a package and without the build directory. For this to make sense, the masterdir has to be clean (without traces of the sagemath build, this should be ok after running "pkg" or "pkg -Q").

Pending PR for dependencies:
- [ ] #34789 Needs review/testing
- [ ] #35088
- [ ] #35089
- [ ] #35098
- [ ] #35101

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: 761550 bytes --]

From 32f3e2286e51fa25fb83ca4c2e89e594058a1adf 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/60] 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 f4c53a0c7f9fd2e472ba5d3774a45fb12eb93881 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/60] 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 a8bd626442046f920b17764cc05bffa3bd714e44 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/60] 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 c4a5ce15e9f8f9a365a87860aa20033638c3253e 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/60] 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 ab4e24a8515271d93b43fddae2acd5c71cf9b9c4 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/60] 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 c6a3ff806fa97348f963d78bcdb4ebc5a407e61a 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/60] 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 d8ad8a1525190a288773f02da3d139e42019d33f 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/60] 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 3317f99da530d78d311f9b16c7f06435b13c81ca 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/60] 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 54ad0fde0afdb32cbfd3b3e20f1d336a1b998b5c 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/60] 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 f419b3c8b862a638dfe27fe8a22d132b03bca87d 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/60] 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 d8658bb4fc3fa81e7cf022fd9b31911b8ff74aaf 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/60] 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 18594e223e1972b88bb8116218263acb2407775a 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/60] 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 e755bca3e7a22ab00aae9378f93ea04d194f4207 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/60] 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 e1b9721bd780c9a2f9dbd159b78aabbb6da270b0 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/60] 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 8783f69b6ffe3aa3f8df51a817e315c175a8378e 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/60] 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 7faa009fcee7ce5473e0c4ccfeb9e6011c910bca 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/60] 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 5b4e5f557459241dfd5fca02cc89476b000a1373 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/60] 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 b1dd0a9a48de7300b11d1dd638f51639aafd354b 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/60] 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 1ae807111aa6b46843037891b625a2775cd223eb 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/60] 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

From 1f44f728ec67741d12d5d4563c00d4f71cb76d90 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 27 Dec 2021 20:19:19 -0300
Subject: [PATCH 20/60] sagemath: fix license and tests

Now tests can be run with -Q (normal) or -K (--long)
---
 srcpkgs/sagemath/template | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index c5009269c7fc..33b40acbabeb 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -16,7 +16,7 @@ depends="giac git FlintQS zn_poly sympow
  "
 short_desc="Open source mathematics software"
 maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
-license="GPL-3.0-or-later"
+license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
 checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
@@ -155,15 +155,17 @@ do_install() {
 }
 
 do_check() {
-	TEST=--all
 	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
-		TEST="$(sed -e 's/#.*//' ${XBPS_DISTDIR}/sagemath-check)"
+		_test_args=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	fi
+	if [ -z "$_test_args" ]; then
+		_test_args=--all
+	fi
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args="--long $_test_args"
 	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} ${OPT} ${TEST}
-	#./sage -t ${OPT} ${TEST}
+	./sage -tp ${XBPS_MAKEJOBS} ${_test_args}
 }
 
 ### copied from sage-deps, to be kept in sync

From a8ad28dbc15d0ac2cc1dd1309e8fb974e8686abb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 28 Dec 2021 23:08:17 -0300
Subject: [PATCH 21/60] sagemath: fix long time test

---
 .../patches/zzz-fix_long_time_test--see_33091.patch | 13 +++++++++++++
 ...=> zzz-skip_doctest_giac-1.7.0--see_31563.patch} |  0
 2 files changed, 13 insertions(+)
 create mode 100644 srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
 rename srcpkgs/sagemath/patches/{skip-doctest-giac-1.7.0--see-trac-31563.patch => zzz-skip_doctest_giac-1.7.0--see_31563.patch} (100%)

diff --git a/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch b/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
new file mode 100644
index 000000000000..ca360dee9f6e
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage/matrix/matrix2.pyx b/src/sage/matrix/matrix2.pyx
+index 7d319bd54b..c1a2eed6f1 100644
+--- a/src/sage/matrix/matrix2.pyx
++++ b/src/sage/matrix/matrix2.pyx
+@@ -17215,7 +17215,7 @@ cdef class Matrix(Matrix1):
+ 
+             sage: set_random_seed()
+             sage: K = random_cone(max_ambient_dim=5)
+-            sage: all(L.change_ring(SR).is_Z_operator_on(K)
++            sage: all(L.change_ring(SR).is_Z_operator_on(K) # long time
+             ....:     for L in K.Z_operators_gens())  # long time
+             True
+ 
diff --git a/srcpkgs/sagemath/patches/skip-doctest-giac-1.7.0--see-trac-31563.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_31563.patch
similarity index 100%
rename from srcpkgs/sagemath/patches/skip-doctest-giac-1.7.0--see-trac-31563.patch
rename to srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_31563.patch

From cf5081ea8109fbb917edf66832b11adc824d5015 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 31 Dec 2021 13:52:34 -0300
Subject: [PATCH 22/60] python3-Sphinx: update to 4.3.2.

---
 srcpkgs/python3-Sphinx/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/python3-Sphinx/template b/srcpkgs/python3-Sphinx/template
index 8b0493c1f92c..29f892d16157 100644
--- a/srcpkgs/python3-Sphinx/template
+++ b/srcpkgs/python3-Sphinx/template
@@ -1,6 +1,6 @@
 # Template file for 'python3-Sphinx'
 pkgname=python3-Sphinx
-version=4.2.0
+version=4.3.2
 revision=1
 wrksrc=Sphinx-${version}
 build_style=python3-module
@@ -17,8 +17,9 @@ short_desc="Python 3 documentation generator"
 maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
 license="BSD-3-Clause"
 homepage="http://sphinx-doc.org"
+changelog="https://www.sphinx-doc.org/en/master/changes.html"
 distfiles="${PYPI_SITE}/S/Sphinx/Sphinx-${version}.tar.gz"
-checksum=94078db9184491e15bce0a56d9186e0aec95f16ac20b12d00e06d4e36f1058a6
+checksum=0a8836751a68306b3fe97ecbe44db786f8479c3bf4b80e3a7f5c838657b4698c
 conflicts="python-Sphinx>=0"
 
 post_install() {

From f5b5b2cc77c8139672a1f45267c85510b7142505 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 28 Dec 2021 23:08:17 -0300
Subject: [PATCH 23/60] sagemath: use system python site-packages

 - patch from #29665 for that
 - patch on top of that to allow a few more python packages:
   gmpy2, sphinx, typing_extensions, ptyprocess
 - add all available python packages to makedepends and depends
 - add ffmpeg and ImageMagick to makedepends
 - in standard check (-Q) warn if individual test > 5.0s
---
 ...184f7498a2046065e669723e68efe2d65cee.patch | 5629 +++++++++++++++++
 .../zzz-dont_run_pytest--see_31924.patch      |   27 +
 .../zzz-more_site_packages_not_in_29665.patch |   42 +
 srcpkgs/sagemath/template                     |   52 +-
 4 files changed, 5747 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch

diff --git a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
new file mode 100644
index 000000000000..b641113927e7
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
@@ -0,0 +1,5629 @@
+From 05fcaabe95082f42ba134780d579390d7b6153e2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 19:30:58 -0400
+Subject: Trac #29665: add --enable-system-site-packages option to ./configure.
+
+This new option is experimental and disabled by default. When it is
+enabled, the string "--system-site-packages" is appended to a new
+environment variable SAGE_VENV_FLAGS that is then passed to the
+sage-venv command during the build using autoconf substitution.
+Thusly the correct setting finds its way into local/pyvenv.cfg.
+---
+ build/make/Makefile.in |  2 +-
+ configure.ac           | 11 +++++++++++
+ 2 files changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/build/make/Makefile.in b/build/make/Makefile.in
+index f870cc3..68627ab 100644
+--- a/build/make/Makefile.in
++++ b/build/make/Makefile.in
+@@ -211,7 +211,7 @@ endif
+ inst_python3_venv = $(SAGE_VENV)/pyvenv.cfg
+ 
+ $(inst_python3_venv):
+-	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv "$(SAGE_VENV)"
++	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv @SAGE_VENV_FLAGS@ "$(SAGE_VENV)"
+ endif
+ 
+ # Build everything and start Sage.
+diff --git a/configure.ac b/configure.ac
+index 351f487..db30a91 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -435,6 +435,17 @@ AC_ARG_ENABLE([download-from-upstream-url],
+   [AS_HELP_STRING([--enable-download-from-upstream-url],
+     [allow downloading packages from their upstream URL if they cannot be found on the Sage mirrors])])
+ 
++AC_ARG_ENABLE(
++  [system-site-packages], [AS_HELP_STRING(
++    [--enable-system-site-packages],
++    [allow sage to use python packages from the system (experimental; default: no)]
++  )], [
++  AS_IF([test "x$enable_system_site_packages" = "xyes"], [
++    SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
++  ])
++])
++AC_SUBST([SAGE_VENV_FLAGS])
++
+ SAGE_SPKG_OPTIONS=""
+ AS_IF([test "x$enable_experimental_packages" = "xyes"], [
+   AS_VAR_APPEND([SAGE_SPKG_OPTIONS], [" -y"])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9372d1f663edf4e89f9c186336815ca04cff59dc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 19:41:14 -0400
+Subject: Trac #29665: new SAGE_PYTHON_PACKAGE_CHECK() autoconf macro.
+
+This new macro encapsulates the check for system installations of
+python packages. It uses setuptools.version's pkg_resources to
+check if the contents of install-requires.txt are satisfied for
+the given package; and if not, tells the build system to install
+the SPKG instead.
+---
+ m4/sage_python_package_check.m4 | 49 +++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 49 insertions(+)
+ create mode 100644 m4/sage_python_package_check.m4
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+new file mode 100644
+index 00000000..77b0a0c
+--- /dev/null
++++ b/m4/sage_python_package_check.m4
+@@ -0,0 +1,49 @@
++#
++# SYNOPSIS
++#
++#   SAGE_PYTHON_PACKAGE_CHECK(package)
++#
++# DESCRIPTION
++#
++#   Determine if the system copy of a python package can be used by sage.
++#
++#   This macro uses setuptools.version's pkg_resources to check that the
++#   "install-requires.txt" file for the named package is satisfied, and
++#   it can typically fail in four ways:
++#
++#     1. If --enable-system-site-packages was not passed to ./configure,
++#
++#     2. If we are not using the system python (no $PYTHON_FOR_VENV),
++#
++#     3. If setuptools is not available to the system python,
++#
++#     4. If the contents of install-requires.txt are not met (wrong
++#        version, no version, etc.) by the system python.
++#
++#   In any of those cases, we set sage_spkg_install_$package to "yes"
++#   so that the corresponding SPKG is installed. Otherwise, we do
++#   nothing, since the default value of sage_spkg_install_$package
++#   is "no" (to use the system copy).
++#
++#   The SAGE_SPKG_CONFIGURE_PYTHON3() macro is AC_REQUIRE'd to ensure
++#   that $PYTHON_FOR_VENV is available, if it is going to be available.
++#
++
++AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
++  AS_IF([test "${enable_system_site_packages}" = "yes"], [
++    AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
++
++    dnl strip all comments from install-requires.txt; this should leave
++    dnl only a single line containing the version specification for this
++    dnl package.
++    SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
++    AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++    AS_IF(
++      ["${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())"],
++      [AC_MSG_RESULT(yes)],
++      [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
++    )
++  ], [
++    sage_spkg_install_$1=yes
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a0dac8ad81ad6369d479bba30d2388de59e5cecb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:21:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for py.
+
+---
+ build/pkgs/py/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/py/spkg-configure.m4
+
+diff --git a/build/pkgs/py/spkg-configure.m4 b/build/pkgs/py/spkg-configure.m4
+new file mode 100644
+index 00000000..ded7034
+--- /dev/null
++++ b/build/pkgs/py/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([py], [SAGE_PYTHON_PACKAGE_CHECK([py])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 87c463a25ab4432dc1fba4f7a9703284e5b8f620 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:24:15 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for wheel.
+
+---
+ build/pkgs/wheel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wheel/spkg-configure.m4
+
+diff --git a/build/pkgs/wheel/spkg-configure.m4 b/build/pkgs/wheel/spkg-configure.m4
+new file mode 100644
+index 00000000..7897ea9
+--- /dev/null
++++ b/build/pkgs/wheel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([wheel], [SAGE_PYTHON_PACKAGE_CHECK([wheel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 804094b3a980f262f4d53d7be8b1be43ac0c55e0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:25:15 -0400
+Subject: Trac #29665: new spkg-configure.m4 for cvxopt.
+
+This includes a SAGE_SPKG_DEPCHECK([gsl glpk suitesparse],... because
+those C dependencies wind up linked into shared libraries like,
+
+  /usr/.../cvxopt/glpk.cpython-39-x86_64-linux-gnu.so
+
+that could potentially conflict with (for example) the glpk SPKG.
+---
+ build/pkgs/cvxopt/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/cvxopt/spkg-configure.m4
+
+diff --git a/build/pkgs/cvxopt/spkg-configure.m4 b/build/pkgs/cvxopt/spkg-configure.m4
+new file mode 100644
+index 00000000..c4aa619
+--- /dev/null
++++ b/build/pkgs/cvxopt/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([cvxopt], [
++  SAGE_SPKG_DEPCHECK([gsl glpk suitesparse], [
++    SAGE_PYTHON_PACKAGE_CHECK([cvxopt])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3f171955ff8d15da2c98aee0d2e254e95a55a2b5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:28:10 -0400
+Subject: Trac #29665: new spkg-configure.m4 for pyzmq.
+
+This includes a SAGE_SPKG_DEPCHECK([zeromq],... because libzmq winds
+up linked into shared libraries like,
+
+  /usr/.../zmq/backend/cython/message.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the zeromq SPKG.
+---
+ build/pkgs/pyzmq/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/pyzmq/spkg-configure.m4
+
+diff --git a/build/pkgs/pyzmq/spkg-configure.m4 b/build/pkgs/pyzmq/spkg-configure.m4
+new file mode 100644
+index 00000000..ae2b126
+--- /dev/null
++++ b/build/pkgs/pyzmq/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([pyzmq], [
++  SAGE_SPKG_DEPCHECK([zeromq], [
++    SAGE_PYTHON_PACKAGE_CHECK([pyzmq])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20d3aa9da9fc98a6e6a47599cd1b6d1d3785a4c4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:31:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for requests.
+
+---
+ build/pkgs/requests/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/requests/spkg-configure.m4
+
+diff --git a/build/pkgs/requests/spkg-configure.m4 b/build/pkgs/requests/spkg-configure.m4
+new file mode 100644
+index 00000000..f50a66c
+--- /dev/null
++++ b/build/pkgs/requests/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([requests], [SAGE_PYTHON_PACKAGE_CHECK([requests])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4df57ee47f2576b6b7bf9265248e06e90616b689 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:13:34 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for six.
+
+---
+ build/pkgs/six/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/six/spkg-configure.m4
+
+diff --git a/build/pkgs/six/spkg-configure.m4 b/build/pkgs/six/spkg-configure.m4
+new file mode 100644
+index 00000000..a382b81
+--- /dev/null
++++ b/build/pkgs/six/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([six], [SAGE_PYTHON_PACKAGE_CHECK([six])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f4462652d02ca729cc6d7cb36ee4d7d662deafb0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:14:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for packaging.
+
+---
+ build/pkgs/packaging/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/packaging/spkg-configure.m4
+
+diff --git a/build/pkgs/packaging/spkg-configure.m4 b/build/pkgs/packaging/spkg-configure.m4
+new file mode 100644
+index 00000000..398f9e1
+--- /dev/null
++++ b/build/pkgs/packaging/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([packaging], [SAGE_PYTHON_PACKAGE_CHECK([packaging])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4d64677fffce48077e4bc3e20ec833c70e6e9b65 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:18:53 -0400
+Subject: Trac #29665: new spkg-configure.m4 for numpy.
+
+This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack
+wind up linked into shared libraries like,
+
+  /usr/.../numpy/linalg/lapack_lite.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the openblas SPKG.
+---
+ build/pkgs/numpy/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/numpy/spkg-configure.m4
+
+diff --git a/build/pkgs/numpy/spkg-configure.m4 b/build/pkgs/numpy/spkg-configure.m4
+new file mode 100644
+index 00000000..16f9a90
+--- /dev/null
++++ b/build/pkgs/numpy/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([numpy], [
++  SAGE_SPKG_DEPCHECK([openblas], [
++   SAGE_PYTHON_PACKAGE_CHECK([numpy])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 85dfe5bb32f3c470966b477bae68a921e846d11f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:58:48 -0400
+Subject: Trac #29665: new spkg-configure.m4 for scipy.
+
+This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack
+wind up linked into shared libraries like,
+
+  /usr/.../scipy/linalg/_flinalg.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the openblas SPKG.
+---
+ build/pkgs/scipy/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/scipy/spkg-configure.m4
+
+diff --git a/build/pkgs/scipy/spkg-configure.m4 b/build/pkgs/scipy/spkg-configure.m4
+new file mode 100644
+index 00000000..0b7294a
+--- /dev/null
++++ b/build/pkgs/scipy/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([scipy], [
++  SAGE_SPKG_DEPCHECK([openblas], [
++    SAGE_PYTHON_PACKAGE_CHECK([scipy])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5616f1491036fda95f4d3e840c8c8b531c97323b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 07:19:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pluggy.
+
+---
+ build/pkgs/pluggy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pluggy/spkg-configure.m4
+
+diff --git a/build/pkgs/pluggy/spkg-configure.m4 b/build/pkgs/pluggy/spkg-configure.m4
+new file mode 100644
+index 00000000..11b1fce
+--- /dev/null
++++ b/build/pkgs/pluggy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pluggy], [SAGE_PYTHON_PACKAGE_CHECK([pluggy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6bceae3d356878cfe5fce40c9998dead003a3844 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 07:24:12 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pickleshare.
+
+---
+ build/pkgs/pickleshare/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pickleshare/spkg-configure.m4
+
+diff --git a/build/pkgs/pickleshare/spkg-configure.m4 b/build/pkgs/pickleshare/spkg-configure.m4
+new file mode 100644
+index 00000000..80e9b7c
+--- /dev/null
++++ b/build/pkgs/pickleshare/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pickleshare], [SAGE_PYTHON_PACKAGE_CHECK([pickleshare])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From da2ab534f4a256c82ed4f1c5f0f5c320529b5e9f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 08:53:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for html5lib.
+
+---
+ build/pkgs/html5lib/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/html5lib/spkg-configure.m4
+
+diff --git a/build/pkgs/html5lib/spkg-configure.m4 b/build/pkgs/html5lib/spkg-configure.m4
+new file mode 100644
+index 00000000..f421b7e
+--- /dev/null
++++ b/build/pkgs/html5lib/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([html5lib], [SAGE_PYTHON_PACKAGE_CHECK([html5lib])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5e464134afdf6055b7b5804208f759561c5435cd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 18:30:47 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for networkx.
+
+---
+ build/pkgs/networkx/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/networkx/spkg-configure.m4
+
+diff --git a/build/pkgs/networkx/spkg-configure.m4 b/build/pkgs/networkx/spkg-configure.m4
+new file mode 100644
+index 00000000..926671e
+--- /dev/null
++++ b/build/pkgs/networkx/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([networkx], [SAGE_PYTHON_PACKAGE_CHECK([networkx])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c4d40770cd9c7fda811e31759a5f4aedc320f3f9 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:33:24 -0400
+Subject: Trac #29665: new spkg-configure.m4 for matplotlib.
+
+This includes a SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull],...
+because those dependencies wind up linked into shared libraries like,
+
+  /usr/lib/.../matplotlib/ft2font.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with their SPKG counterparts.
+---
+ build/pkgs/matplotlib/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/matplotlib/spkg-configure.m4
+
+diff --git a/build/pkgs/matplotlib/spkg-configure.m4 b/build/pkgs/matplotlib/spkg-configure.m4
+new file mode 100644
+index 00000000..39c2d29
+--- /dev/null
++++ b/build/pkgs/matplotlib/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([matplotlib], [
++  SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull], [
++    SAGE_PYTHON_PACKAGE_CHECK([matplotlib])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7834dc3ac349201af632f89a9de7cd1967931010 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:35:00 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for bleach.
+
+---
+ build/pkgs/bleach/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/bleach/spkg-configure.m4
+
+diff --git a/build/pkgs/bleach/spkg-configure.m4 b/build/pkgs/bleach/spkg-configure.m4
+new file mode 100644
+index 00000000..3c9bb26
+--- /dev/null
++++ b/build/pkgs/bleach/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([bleach], [SAGE_PYTHON_PACKAGE_CHECK([bleach])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 84cad343287a2c69a4a21b9fa3b92301ff88645b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:37:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for decorator.
+
+---
+ build/pkgs/decorator/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/decorator/spkg-configure.m4
+
+diff --git a/build/pkgs/decorator/spkg-configure.m4 b/build/pkgs/decorator/spkg-configure.m4
+new file mode 100644
+index 00000000..e062778
+--- /dev/null
++++ b/build/pkgs/decorator/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([decorator], [SAGE_PYTHON_PACKAGE_CHECK([decorator])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 25693212572e69d452bc95c923ada13744359eb7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:38:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for idna.
+
+---
+ build/pkgs/idna/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/idna/spkg-configure.m4
+
+diff --git a/build/pkgs/idna/spkg-configure.m4 b/build/pkgs/idna/spkg-configure.m4
+new file mode 100644
+index 00000000..9d363f2
+--- /dev/null
++++ b/build/pkgs/idna/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([idna], [SAGE_PYTHON_PACKAGE_CHECK([idna])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6d5616472f6cdc6cf496bba6fe07bd4ef44dfdaf Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:39:23 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for certifi.
+
+---
+ build/pkgs/certifi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/certifi/spkg-configure.m4
+
+diff --git a/build/pkgs/certifi/spkg-configure.m4 b/build/pkgs/certifi/spkg-configure.m4
+new file mode 100644
+index 00000000..ddd4061
+--- /dev/null
++++ b/build/pkgs/certifi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([certifi], [SAGE_PYTHON_PACKAGE_CHECK([certifi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9412a07023b275e29e8d1af9b8ee3e767042e7fd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:40:59 -0400
+Subject: Trac #29665: new spkg-configure.m4 for pillow.
+
+This includes an SAGE_SPKG_DEPCHECK([bzip2 freetype libpng zlib],...
+because those dependencies wind up linked into shared libraries like,
+
+  /usr/.../PIL/_imagingft.cpython-39-x86_64-linux-gnu.so
+
+and potentially conflict with their SPKG counterparts.
+---
+ build/pkgs/pillow/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/pillow/spkg-configure.m4
+
+diff --git a/build/pkgs/pillow/spkg-configure.m4 b/build/pkgs/pillow/spkg-configure.m4
+new file mode 100644
+index 00000000..f2e68e2
+--- /dev/null
++++ b/build/pkgs/pillow/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([pillow], [
++  SAGE_SPKG_DEPCHECK([bzip2 freetype libpng zlib], [
++    SAGE_PYTHON_PACKAGE_CHECK([pillow])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From eede914311481fdb75b363b7a799075e876a2b4f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:44:13 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for mpmath.
+
+---
+ build/pkgs/mpmath/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mpmath/spkg-configure.m4
+
+diff --git a/build/pkgs/mpmath/spkg-configure.m4 b/build/pkgs/mpmath/spkg-configure.m4
+new file mode 100644
+index 00000000..f43c838
+--- /dev/null
++++ b/build/pkgs/mpmath/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([mpmath], [SAGE_PYTHON_PACKAGE_CHECK([mpmath])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 363a825885832c0b580ff53fe61f5c79e70c4728 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:44:56 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for sympy.
+
+---
+ build/pkgs/sympy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sympy/spkg-configure.m4
+
+diff --git a/build/pkgs/sympy/spkg-configure.m4 b/build/pkgs/sympy/spkg-configure.m4
+new file mode 100644
+index 00000000..fa0f1f5
+--- /dev/null
++++ b/build/pkgs/sympy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([sympy], [SAGE_PYTHON_PACKAGE_CHECK([sympy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0667964c914e4a01dda697190a054ff96cea92d6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:47:06 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pygments.
+
+---
+ build/pkgs/pygments/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pygments/spkg-configure.m4
+
+diff --git a/build/pkgs/pygments/spkg-configure.m4 b/build/pkgs/pygments/spkg-configure.m4
+new file mode 100644
+index 00000000..99f29e3
+--- /dev/null
++++ b/build/pkgs/pygments/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pygments], [SAGE_PYTHON_PACKAGE_CHECK([pygments])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f787c233aa05d8e90f7c6ad18f76bd2fa36bfbfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:48:50 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for jinja2.
+
+---
+ build/pkgs/jinja2/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jinja2/spkg-configure.m4
+
+diff --git a/build/pkgs/jinja2/spkg-configure.m4 b/build/pkgs/jinja2/spkg-configure.m4
+new file mode 100644
+index 00000000..0970d1c
+--- /dev/null
++++ b/build/pkgs/jinja2/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jinja2], [SAGE_PYTHON_PACKAGE_CHECK([jinja2])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 309d8f8e2b7078b5efbbe824b69ec1d9b1e639f0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:43:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pandocfilters.
+
+---
+ build/pkgs/pandocfilters/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/pandocfilters/spkg-configure.m4
+
+diff --git a/build/pkgs/pandocfilters/spkg-configure.m4 b/build/pkgs/pandocfilters/spkg-configure.m4
+new file mode 100644
+index 00000000..3e9537f
+--- /dev/null
++++ b/build/pkgs/pandocfilters/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([pandocfilters], [
++  SAGE_PYTHON_PACKAGE_CHECK([pandocfilters])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f57bfda49777a6ba1cd123553acd75dc347c5521 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:44:46 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for webencodings.
+
+---
+ build/pkgs/webencodings/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/webencodings/spkg-configure.m4
+
+diff --git a/build/pkgs/webencodings/spkg-configure.m4 b/build/pkgs/webencodings/spkg-configure.m4
+new file mode 100644
+index 00000000..1b9a5c4
+--- /dev/null
++++ b/build/pkgs/webencodings/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([webencodings], [
++  SAGE_PYTHON_PACKAGE_CHECK([webencodings])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7f193a62d7a2ea0b6a3ca6beb12390d91c25bbfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:48:26 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pytz.
+
+---
+ build/pkgs/pytz/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pytz/spkg-configure.m4
+
+diff --git a/build/pkgs/pytz/spkg-configure.m4 b/build/pkgs/pytz/spkg-configure.m4
+new file mode 100644
+index 00000000..366521b
+--- /dev/null
++++ b/build/pkgs/pytz/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pytz], [SAGE_PYTHON_PACKAGE_CHECK([pytz])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bfd3fdd887c3465c03465248de4997eed4a82915 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:51:16 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for texttable.
+
+---
+ build/pkgs/texttable/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/texttable/spkg-configure.m4
+
+diff --git a/build/pkgs/texttable/spkg-configure.m4 b/build/pkgs/texttable/spkg-configure.m4
+new file mode 100644
+index 00000000..42a3de1
+--- /dev/null
++++ b/build/pkgs/texttable/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([texttable], [SAGE_PYTHON_PACKAGE_CHECK([texttable])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 914bf0cc57abc46129b27c1525782dbe16da31a2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:53:41 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for babel.
+
+---
+ build/pkgs/babel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/babel/spkg-configure.m4
+
+diff --git a/build/pkgs/babel/spkg-configure.m4 b/build/pkgs/babel/spkg-configure.m4
+new file mode 100644
+index 00000000..d7b9a71
+--- /dev/null
++++ b/build/pkgs/babel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([babel], [SAGE_PYTHON_PACKAGE_CHECK([babel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 56977abd1eafbc87c765a2892cfe525382648259 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 14 Oct 2021 08:06:59 -0400
+Subject: Trac #29665: force system python3 with --enable-system-site-packages.
+
+When the python SPKG is used, the --enable-system-site-packages flag
+will essentially do nothing, and that may confuse users who have
+wasted a few hours building sage. (Generally, they will want to fix
+detection of their system python3 first.)
+
+To forestall that, we now set "--with-system-python3=force" whenever
+the "--enable-system-site-packages" flag is passed.
+---
+ configure.ac | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index db30a91..6fafb83 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -438,10 +438,19 @@ AC_ARG_ENABLE([download-from-upstream-url],
+ AC_ARG_ENABLE(
+   [system-site-packages], [AS_HELP_STRING(
+     [--enable-system-site-packages],
+-    [allow sage to use python packages from the system (experimental; default: no)]
++    [allow the use of python packages from the system (experimental; default: no)]
+   )], [
+   AS_IF([test "x$enable_system_site_packages" = "xyes"], [
+     SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
++
++    dnl We want to raise an error if the user asked for "system site
++    dnl packages" but the system python will not be used. Technically
++    dnl that causes no problems (SAGE_PYTHON_PACKAGE_CHECK always fails,
++    dnl so SPKGs are used for all python packages), but it may be confusing
++    dnl to end users who expect the flag to actually give them access to
++    dnl their system python packages and who may not be paying close
++    dnl attention to their ./configure output.
++    with_system_python3="force"
+   ])
+ ])
+ AC_SUBST([SAGE_VENV_FLAGS])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 02b369fd24ef7cf8997082e7850b9cf022cae34b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 01:18:35 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for setuptools.
+
+---
+ build/pkgs/setuptools/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/setuptools/spkg-configure.m4
+
+diff --git a/build/pkgs/setuptools/spkg-configure.m4 b/build/pkgs/setuptools/spkg-configure.m4
+new file mode 100644
+index 00000000..a2ad811
+--- /dev/null
++++ b/build/pkgs/setuptools/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([setuptools], [SAGE_PYTHON_PACKAGE_CHECK([setuptools])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 05117317d38693978efaf36e81d8b02bae44b257 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 01:15:48 -0400
+Subject: Trac #29665: poison PYTHONUSERBASE when testing for "system"
+ packages.
+
+When we're detecting system installations of python packages, we want
+to hide anything that was installed with e.g. "pip install --user". To
+accomplish that, we mimic the PYTHONUSERBASE poisoning from sage-env
+within the SAGE_PYTHON_PACKAGE_CHECK() macro.
+---
+ m4/sage_python_package_check.m4 | 18 +++++++++++++++++-
+ 1 file changed, 17 insertions(+), 1 deletion(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 77b0a0c..b8cdba4 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -38,11 +38,27 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     dnl package.
+     SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
+     AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++
++    dnl To prevent user-site (pip install --user) packages from being
++    dnl detected as "system" packages, we poison PYTHONUSERBASE. The
++    dnl sage-env script also does this at runtime; we mimic that
++    dnl implementation to ensure that the behaviors at ./configure and
++    dnl runtime are identical. Beware that (as in sage-env) the poisoning
++    dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
++    dnl user points PYTHONUSERBASE to any path (even the default), then
++    dnl his local pip packages will be detected.
++    PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
++    AS_IF([test -z "${PYTHONUSERBASE}"], [
++      PYTHONUSERBASE="${HOME}/.sage/local"
++    ])
++
+     AS_IF(
+-      ["${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())"],
++      [PYTHONUSERBASE="${PYTHONUSERBASE}" "${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" 2>/dev/null],
+       [AC_MSG_RESULT(yes)],
+       [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+     )
++
++    PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d75c1492f63a584b5ec5f424ddd7f7c4a6d502d3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:20:04 -0400
+Subject: Trac #29665: run SAGE_PYTHON_PACKAGE_CHECK() inside a venv.
+
+To recreate the runtime environment as closely as possible, we now use
+a venv (with system site packages enabled) when checking for system
+copies of python packages.
+---
+ m4/sage_python_package_check.m4 | 76 +++++++++++++++++++++++++++--------------
+ 1 file changed, 51 insertions(+), 25 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index b8cdba4..7cbd6c0 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -15,9 +15,11 @@
+ #
+ #     2. If we are not using the system python (no $PYTHON_FOR_VENV),
+ #
+-#     3. If setuptools is not available to the system python,
++#     3. If we are unable to create a venv with the system python,
+ #
+-#     4. If the contents of install-requires.txt are not met (wrong
++#     4. If setuptools is not available to the system python,
++#
++#     5. If the contents of install-requires.txt are not met (wrong
+ #        version, no version, etc.) by the system python.
+ #
+ #   In any of those cases, we set sage_spkg_install_$package to "yes"
+@@ -27,38 +29,62 @@
+ #
+ #   The SAGE_SPKG_CONFIGURE_PYTHON3() macro is AC_REQUIRE'd to ensure
+ #   that $PYTHON_FOR_VENV is available, if it is going to be available.
++#   The check is run inside a new venv, and with the PYTHONUSERBASE
++#   variable poisoned in the same manner as sage-env poisons it, to
++#   ensure that the ./configure- and run-time views of the system
++#   are as similar as possible.
+ #
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
+     AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
+ 
+-    dnl strip all comments from install-requires.txt; this should leave
+-    dnl only a single line containing the version specification for this
+-    dnl package.
+-    SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
+-    AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++    dnl We run this check inside a python venv, because that's ultimately
++    dnl how the system $PYTHON_FOR_VENV will be used.
++    AC_MSG_CHECKING([if we can create a python venv in config.venv])
+ 
+-    dnl To prevent user-site (pip install --user) packages from being
+-    dnl detected as "system" packages, we poison PYTHONUSERBASE. The
+-    dnl sage-env script also does this at runtime; we mimic that
+-    dnl implementation to ensure that the behaviors at ./configure and
+-    dnl runtime are identical. Beware that (as in sage-env) the poisoning
+-    dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
+-    dnl user points PYTHONUSERBASE to any path (even the default), then
+-    dnl his local pip packages will be detected.
+-    PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
+-    AS_IF([test -z "${PYTHONUSERBASE}"], [
+-      PYTHONUSERBASE="${HOME}/.sage/local"
+-    ])
++    dnl Use --clear because ./configure typically clobbers its output files.
++    AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
++                                        --clear                dnl
++                                        --without-pip          dnl
++					config.venv], [
++      AC_MSG_RESULT(yes)
++      dnl strip all comments from install-requires.txt; this should leave
++      dnl only a single line containing the version specification for this
++      dnl package.
++      SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
++      AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++
++      dnl To prevent user-site (pip install --user) packages from being
++      dnl detected as "system" packages, we poison PYTHONUSERBASE. The
++      dnl sage-env script also does this at runtime; we mimic that
++      dnl implementation to ensure that the behaviors at ./configure and
++      dnl runtime are identical. Beware that (as in sage-env) the poisoning
++      dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
++      dnl user points PYTHONUSERBASE to any path (even the default), then
++      dnl his local pip packages will be detected.
++      PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
++      AS_IF([test -z "${PYTHONUSERBASE}"], [
++        PYTHONUSERBASE="${HOME}/.sage/local"
++      ])
+ 
+-    AS_IF(
+-      [PYTHONUSERBASE="${PYTHONUSERBASE}" "${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" 2>/dev/null],
+-      [AC_MSG_RESULT(yes)],
+-      [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+-    )
++      AS_IF(
++        [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
++           "from setuptools.version import pkg_resources;              dnl
++            pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" dnl
++	 2>/dev/null],
++        [AC_MSG_RESULT(yes)],
++        [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
++      )
++
++      PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
++    ], [
++      dnl failed to create a venv for some reason
++      AC_MSG_RESULT(no)
++      sage_spkg_install_$1=yes
++    ])
+ 
+-    PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
++    rm -rf config.venv
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 87646c3264a04ffd98a12d67074f93e1943a1e96 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:38:08 -0400
+Subject: Trac #29665: log SAGE_PYTHON_PACKAGE_CHECK() failures to config.log.
+
+---
+ m4/sage_python_package_check.m4 | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 7cbd6c0..e0e0b9f 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -47,7 +47,8 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
+                                         --clear                dnl
+                                         --without-pip          dnl
+-					config.venv], [
++                                        config.venv            dnl
++                                        2>&AS_MESSAGE_LOG_FD], [
+       AC_MSG_RESULT(yes)
+       dnl strip all comments from install-requires.txt; this should leave
+       dnl only a single line containing the version specification for this
+@@ -72,7 +73,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+         [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
+            "from setuptools.version import pkg_resources;              dnl
+             pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" dnl
+-	 2>/dev/null],
++	 2>&AS_MESSAGE_LOG_FD],
+         [AC_MSG_RESULT(yes)],
+         [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+       )
+-- 
+cgit v1.0-1-gd88e
+
+
+From f7dfffd1c64816e2ae4e0f420b22065c5c5bf2cb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:45:37 -0400
+Subject: Trac #29665: don't clobber a plain file named config.venv.
+
+When SAGE_PYTHON_PACKAGE_CHECK() is cleaning up, we no longer remove
+"config.venv" unconditionally. Instead, we remove it only if it is a
+directory. This is also how "pyvenv --clear" works.
+---
+ m4/sage_python_package_check.m4 | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index e0e0b9f..127a078 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -85,7 +85,9 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+       sage_spkg_install_$1=yes
+     ])
+ 
+-    rm -rf config.venv
++    dnl Clean up config.venv, but only if we could have created it.
++    dnl (The --clear flag to pyvenv will not clobber a plain file.)
++    AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9849c77313b895dcfb786d2ea54e36585bd31ce2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 16 Oct 2021 08:14:42 -0400
+Subject: Trac #29665: don't announce system python packages that won't be
+ used.
+
+When --enable-system-site-packages was not given, the python packages
+using SAGE_PYTHON_PACKAGE_CHECK() in spkg-configure.m4 cannot be used.
+Rather than suggest that users install them anyway, that macro now
+hacks the value of sage_use_system_$package to be "no" when the use
+of system site packages is disabled at the python level.
+---
+ m4/sage_python_package_check.m4 | 17 +++++++++++++++++
+ 1 file changed, 17 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 127a078..7ee82a7 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -89,6 +89,23 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     dnl (The --clear flag to pyvenv will not clobber a plain file.)
+     AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
++    dnl System site packages are disabled.
+     sage_spkg_install_$1=yes
++
++    dnl We have to retroactively hack the --with-system-foo={no,yes,force}
++    dnl mechanism here because it wasn't designed with the ability to
++    dnl disable arbitrary chunks of system packages in mind. The easy cases
++    dnl are "no" and "force" which require no action; "no" means we won't
++    dnl suggest the package anyway, and "force" will raise an error when
++    dnl the system-package check fails.
++    dnl
++    dnl The default of "yes" is more troubling because it is the default. To
++    dnl avoid prompting users to install packages that won't be used, we want
++    dnl to ignore "yes" when reporting the "hint: install these packages..."
++    dnl at the end of ./configure. To accomplish that, we change "yes" to
++    dnl "no" here, essentially changing the default for packages using this
++    dnl macro when --enable-system-site-packages is disabled. Packages with
++    dnl "no" are not suggested to the user.
++    AS_IF([test "${sage_use_system_$1}" = "yes"],[sage_use_system_$1=no])
+   ])
+ ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3e6ad737b94aaac234d615ecaf1a2455eb607f1a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 17 Oct 2021 06:16:21 -0400
+Subject: Trac #29665: add Gentoo package information for python packages.
+
+---
+ build/pkgs/babel/distros/gentoo.txt         | 1 +
+ build/pkgs/bleach/distros/gentoo.txt        | 1 +
+ build/pkgs/certifi/distros/gentoo.txt       | 1 +
+ build/pkgs/cvxopt/distros/gentoo.txt        | 1 +
+ build/pkgs/decorator/distros/gentoo.txt     | 1 +
+ build/pkgs/html5lib/distros/gentoo.txt      | 1 +
+ build/pkgs/idna/distros/gentoo.txt          | 1 +
+ build/pkgs/jinja2/distros/gentoo.txt        | 1 +
+ build/pkgs/matplotlib/distros/gentoo.txt    | 1 +
+ build/pkgs/mpmath/distros/gentoo.txt        | 1 +
+ build/pkgs/networkx/distros/gentoo.txt      | 1 +
+ build/pkgs/numpy/distros/gentoo.txt         | 1 +
+ build/pkgs/packaging/distros/gentoo.txt     | 1 +
+ build/pkgs/pandocfilters/distros/gentoo.txt | 1 +
+ build/pkgs/pickleshare/distros/gentoo.txt   | 1 +
+ build/pkgs/pillow/distros/gentoo.txt        | 1 +
+ build/pkgs/pluggy/distros/gentoo.txt        | 1 +
+ build/pkgs/pygments/distros/gentoo.txt      | 1 +
+ build/pkgs/pytz/distros/gentoo.txt          | 1 +
+ build/pkgs/pyzmq/distros/gentoo.txt         | 1 +
+ build/pkgs/requests/distros/gentoo.txt      | 1 +
+ build/pkgs/scipy/distros/gentoo.txt         | 1 +
+ build/pkgs/setuptools/distros/gentoo.txt    | 1 +
+ build/pkgs/six/distros/gentoo.txt           | 1 +
+ build/pkgs/sympy/distros/gentoo.txt         | 1 +
+ build/pkgs/texttable/distros/gentoo.txt     | 1 +
+ build/pkgs/toml/distros/gentoo.txt          | 1 +
+ build/pkgs/webencodings/distros/gentoo.txt  | 1 +
+ 28 files changed, 28 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/gentoo.txt
+ create mode 100644 build/pkgs/bleach/distros/gentoo.txt
+ create mode 100644 build/pkgs/certifi/distros/gentoo.txt
+ create mode 100644 build/pkgs/cvxopt/distros/gentoo.txt
+ create mode 100644 build/pkgs/decorator/distros/gentoo.txt
+ create mode 100644 build/pkgs/html5lib/distros/gentoo.txt
+ create mode 100644 build/pkgs/idna/distros/gentoo.txt
+ create mode 100644 build/pkgs/jinja2/distros/gentoo.txt
+ create mode 100644 build/pkgs/matplotlib/distros/gentoo.txt
+ create mode 100644 build/pkgs/mpmath/distros/gentoo.txt
+ create mode 100644 build/pkgs/networkx/distros/gentoo.txt
+ create mode 100644 build/pkgs/numpy/distros/gentoo.txt
+ create mode 100644 build/pkgs/packaging/distros/gentoo.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/gentoo.txt
+ create mode 100644 build/pkgs/pickleshare/distros/gentoo.txt
+ create mode 100644 build/pkgs/pillow/distros/gentoo.txt
+ create mode 100644 build/pkgs/pluggy/distros/gentoo.txt
+ create mode 100644 build/pkgs/pygments/distros/gentoo.txt
+ create mode 100644 build/pkgs/pytz/distros/gentoo.txt
+ create mode 100644 build/pkgs/pyzmq/distros/gentoo.txt
+ create mode 100644 build/pkgs/requests/distros/gentoo.txt
+ create mode 100644 build/pkgs/scipy/distros/gentoo.txt
+ create mode 100644 build/pkgs/setuptools/distros/gentoo.txt
+ create mode 100644 build/pkgs/six/distros/gentoo.txt
+ create mode 100644 build/pkgs/sympy/distros/gentoo.txt
+ create mode 100644 build/pkgs/texttable/distros/gentoo.txt
+ create mode 100644 build/pkgs/toml/distros/gentoo.txt
+ create mode 100644 build/pkgs/webencodings/distros/gentoo.txt
+
+diff --git a/build/pkgs/babel/distros/gentoo.txt b/build/pkgs/babel/distros/gentoo.txt
+new file mode 100644
+index 00000000..2d2c34f
+--- /dev/null
++++ b/build/pkgs/babel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/Babel
+diff --git a/build/pkgs/bleach/distros/gentoo.txt b/build/pkgs/bleach/distros/gentoo.txt
+new file mode 100644
+index 00000000..b4f9744
+--- /dev/null
++++ b/build/pkgs/bleach/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/bleach
+diff --git a/build/pkgs/certifi/distros/gentoo.txt b/build/pkgs/certifi/distros/gentoo.txt
+new file mode 100644
+index 00000000..72e2e91
+--- /dev/null
++++ b/build/pkgs/certifi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/certifi
+diff --git a/build/pkgs/cvxopt/distros/gentoo.txt b/build/pkgs/cvxopt/distros/gentoo.txt
+new file mode 100644
+index 00000000..b312391
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/cvxopt
+diff --git a/build/pkgs/decorator/distros/gentoo.txt b/build/pkgs/decorator/distros/gentoo.txt
+new file mode 100644
+index 00000000..fea5a67
+--- /dev/null
++++ b/build/pkgs/decorator/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/decorator
+diff --git a/build/pkgs/html5lib/distros/gentoo.txt b/build/pkgs/html5lib/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c2be76
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/html5lib
+diff --git a/build/pkgs/idna/distros/gentoo.txt b/build/pkgs/idna/distros/gentoo.txt
+new file mode 100644
+index 00000000..68ef51c
+--- /dev/null
++++ b/build/pkgs/idna/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/idna
+diff --git a/build/pkgs/jinja2/distros/gentoo.txt b/build/pkgs/jinja2/distros/gentoo.txt
+new file mode 100644
+index 00000000..15a27ae
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jinja
+diff --git a/build/pkgs/matplotlib/distros/gentoo.txt b/build/pkgs/matplotlib/distros/gentoo.txt
+new file mode 100644
+index 00000000..bcfefb5
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/matplotlib
+diff --git a/build/pkgs/mpmath/distros/gentoo.txt b/build/pkgs/mpmath/distros/gentoo.txt
+new file mode 100644
+index 00000000..946c62d
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/mpmath
+diff --git a/build/pkgs/networkx/distros/gentoo.txt b/build/pkgs/networkx/distros/gentoo.txt
+new file mode 100644
+index 00000000..dd97742
+--- /dev/null
++++ b/build/pkgs/networkx/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/networkx
+diff --git a/build/pkgs/numpy/distros/gentoo.txt b/build/pkgs/numpy/distros/gentoo.txt
+new file mode 100644
+index 00000000..d2179d4
+--- /dev/null
++++ b/build/pkgs/numpy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/numpy
+diff --git a/build/pkgs/packaging/distros/gentoo.txt b/build/pkgs/packaging/distros/gentoo.txt
+new file mode 100644
+index 00000000..e5309ed
+--- /dev/null
++++ b/build/pkgs/packaging/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/packaging
+diff --git a/build/pkgs/pandocfilters/distros/gentoo.txt b/build/pkgs/pandocfilters/distros/gentoo.txt
+new file mode 100644
+index 00000000..a726fda
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/gentoo.txt b/build/pkgs/pickleshare/distros/gentoo.txt
+new file mode 100644
+index 00000000..14fad0f
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pickleshare
+diff --git a/build/pkgs/pillow/distros/gentoo.txt b/build/pkgs/pillow/distros/gentoo.txt
+new file mode 100644
+index 00000000..1243649
+--- /dev/null
++++ b/build/pkgs/pillow/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pillow
+diff --git a/build/pkgs/pluggy/distros/gentoo.txt b/build/pkgs/pluggy/distros/gentoo.txt
+new file mode 100644
+index 00000000..7b33876
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pluggy
+diff --git a/build/pkgs/pygments/distros/gentoo.txt b/build/pkgs/pygments/distros/gentoo.txt
+new file mode 100644
+index 00000000..a584f32
+--- /dev/null
++++ b/build/pkgs/pygments/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pygments
+diff --git a/build/pkgs/pytz/distros/gentoo.txt b/build/pkgs/pytz/distros/gentoo.txt
+new file mode 100644
+index 00000000..902a18b
+--- /dev/null
++++ b/build/pkgs/pytz/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pytz
+diff --git a/build/pkgs/pyzmq/distros/gentoo.txt b/build/pkgs/pyzmq/distros/gentoo.txt
+new file mode 100644
+index 00000000..77c2429
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyzmq
+diff --git a/build/pkgs/requests/distros/gentoo.txt b/build/pkgs/requests/distros/gentoo.txt
+new file mode 100644
+index 00000000..d3dc941
+--- /dev/null
++++ b/build/pkgs/requests/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/requests
+diff --git a/build/pkgs/scipy/distros/gentoo.txt b/build/pkgs/scipy/distros/gentoo.txt
+new file mode 100644
+index 00000000..11dabd2
+--- /dev/null
++++ b/build/pkgs/scipy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/scipy
+diff --git a/build/pkgs/setuptools/distros/gentoo.txt b/build/pkgs/setuptools/distros/gentoo.txt
+new file mode 100644
+index 00000000..3a4fa34
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/setuptools
+diff --git a/build/pkgs/six/distros/gentoo.txt b/build/pkgs/six/distros/gentoo.txt
+new file mode 100644
+index 00000000..f73f648
+--- /dev/null
++++ b/build/pkgs/six/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/six
+diff --git a/build/pkgs/sympy/distros/gentoo.txt b/build/pkgs/sympy/distros/gentoo.txt
+new file mode 100644
+index 00000000..b5a5034
+--- /dev/null
++++ b/build/pkgs/sympy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sympy
+diff --git a/build/pkgs/texttable/distros/gentoo.txt b/build/pkgs/texttable/distros/gentoo.txt
+new file mode 100644
+index 00000000..b33a7a7
+--- /dev/null
++++ b/build/pkgs/texttable/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/texttable
+diff --git a/build/pkgs/toml/distros/gentoo.txt b/build/pkgs/toml/distros/gentoo.txt
+new file mode 100644
+index 00000000..64fcea3
+--- /dev/null
++++ b/build/pkgs/toml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/toml
+diff --git a/build/pkgs/webencodings/distros/gentoo.txt b/build/pkgs/webencodings/distros/gentoo.txt
+new file mode 100644
+index 00000000..7539b0f
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/webencodings
+-- 
+cgit v1.0-1-gd88e
+
+
+From 088380f884124c9608160b613ba031c5f023f604 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 18:43:04 -0700
+Subject: build/pkgs: Add distros/fedora.txt for Python packages
+
+---
+ build/pkgs/babel/distros/fedora.txt         | 1 +
+ build/pkgs/bleach/distros/fedora.txt        | 1 +
+ build/pkgs/certifi/distros/fedora.txt       | 1 +
+ build/pkgs/cvxopt/distros/fedora.txt        | 1 +
+ build/pkgs/decorator/distros/fedora.txt     | 1 +
+ build/pkgs/html5lib/distros/fedora.txt      | 1 +
+ build/pkgs/idna/distros/fedora.txt          | 1 +
+ build/pkgs/jinja2/distros/fedora.txt        | 1 +
+ build/pkgs/matplotlib/distros/fedora.txt    | 1 +
+ build/pkgs/mpmath/distros/fedora.txt        | 1 +
+ build/pkgs/networkx/distros/fedora.txt      | 1 +
+ build/pkgs/numpy/distros/fedora.txt         | 1 +
+ build/pkgs/packaging/distros/fedora.txt     | 1 +
+ build/pkgs/pandocfilters/distros/fedora.txt | 1 +
+ build/pkgs/pickleshare/distros/fedora.txt   | 1 +
+ build/pkgs/pillow/distros/fedora.txt        | 1 +
+ build/pkgs/pluggy/distros/fedora.txt        | 1 +
+ build/pkgs/py/distros/fedora.txt            | 1 +
+ build/pkgs/pygments/distros/fedora.txt      | 1 +
+ build/pkgs/pytz/distros/fedora.txt          | 1 +
+ build/pkgs/pyzmq/distros/fedora.txt         | 1 +
+ build/pkgs/requests/distros/fedora.txt      | 1 +
+ build/pkgs/scipy/distros/fedora.txt         | 1 +
+ build/pkgs/setuptools/distros/fedora.txt    | 1 +
+ build/pkgs/six/distros/fedora.txt           | 1 +
+ build/pkgs/sympy/distros/fedora.txt         | 1 +
+ build/pkgs/texttable/distros/fedora.txt     | 1 +
+ build/pkgs/toml/distros/fedora.txt          | 1 +
+ build/pkgs/webencodings/distros/fedora.txt  | 1 +
+ build/pkgs/wheel/distros/fedora.txt         | 1 +
+ 30 files changed, 30 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/fedora.txt
+ create mode 100644 build/pkgs/bleach/distros/fedora.txt
+ create mode 100644 build/pkgs/certifi/distros/fedora.txt
+ create mode 100644 build/pkgs/cvxopt/distros/fedora.txt
+ create mode 100644 build/pkgs/decorator/distros/fedora.txt
+ create mode 100644 build/pkgs/html5lib/distros/fedora.txt
+ create mode 100644 build/pkgs/idna/distros/fedora.txt
+ create mode 100644 build/pkgs/jinja2/distros/fedora.txt
+ create mode 100644 build/pkgs/matplotlib/distros/fedora.txt
+ create mode 100644 build/pkgs/mpmath/distros/fedora.txt
+ create mode 100644 build/pkgs/networkx/distros/fedora.txt
+ create mode 100644 build/pkgs/numpy/distros/fedora.txt
+ create mode 100644 build/pkgs/packaging/distros/fedora.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/fedora.txt
+ create mode 100644 build/pkgs/pickleshare/distros/fedora.txt
+ create mode 100644 build/pkgs/pillow/distros/fedora.txt
+ create mode 100644 build/pkgs/pluggy/distros/fedora.txt
+ create mode 100644 build/pkgs/py/distros/fedora.txt
+ create mode 100644 build/pkgs/pygments/distros/fedora.txt
+ create mode 100644 build/pkgs/pytz/distros/fedora.txt
+ create mode 100644 build/pkgs/pyzmq/distros/fedora.txt
+ create mode 100644 build/pkgs/requests/distros/fedora.txt
+ create mode 100644 build/pkgs/scipy/distros/fedora.txt
+ create mode 100644 build/pkgs/setuptools/distros/fedora.txt
+ create mode 100644 build/pkgs/six/distros/fedora.txt
+ create mode 100644 build/pkgs/sympy/distros/fedora.txt
+ create mode 100644 build/pkgs/texttable/distros/fedora.txt
+ create mode 100644 build/pkgs/toml/distros/fedora.txt
+ create mode 100644 build/pkgs/webencodings/distros/fedora.txt
+ create mode 100644 build/pkgs/wheel/distros/fedora.txt
+
+diff --git a/build/pkgs/babel/distros/fedora.txt b/build/pkgs/babel/distros/fedora.txt
+new file mode 100644
+index 00000000..98f6593
+--- /dev/null
++++ b/build/pkgs/babel/distros/fedora.txt
+@@ -0,0 +1 @@
++babel
+diff --git a/build/pkgs/bleach/distros/fedora.txt b/build/pkgs/bleach/distros/fedora.txt
+new file mode 100644
+index 00000000..c5422cc
+--- /dev/null
++++ b/build/pkgs/bleach/distros/fedora.txt
+@@ -0,0 +1 @@
++python-bleach
+diff --git a/build/pkgs/certifi/distros/fedora.txt b/build/pkgs/certifi/distros/fedora.txt
+new file mode 100644
+index 00000000..be421c8
+--- /dev/null
++++ b/build/pkgs/certifi/distros/fedora.txt
+@@ -0,0 +1 @@
++python-certifi
+diff --git a/build/pkgs/cvxopt/distros/fedora.txt b/build/pkgs/cvxopt/distros/fedora.txt
+new file mode 100644
+index 00000000..f15770f
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/fedora.txt
+@@ -0,0 +1 @@
++python-cvxopt
+diff --git a/build/pkgs/decorator/distros/fedora.txt b/build/pkgs/decorator/distros/fedora.txt
+new file mode 100644
+index 00000000..0795604
+--- /dev/null
++++ b/build/pkgs/decorator/distros/fedora.txt
+@@ -0,0 +1 @@
++python-decorator
+diff --git a/build/pkgs/html5lib/distros/fedora.txt b/build/pkgs/html5lib/distros/fedora.txt
+new file mode 100644
+index 00000000..b821491
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/fedora.txt
+@@ -0,0 +1 @@
++python-html5lib
+diff --git a/build/pkgs/idna/distros/fedora.txt b/build/pkgs/idna/distros/fedora.txt
+new file mode 100644
+index 00000000..a73e70c
+--- /dev/null
++++ b/build/pkgs/idna/distros/fedora.txt
+@@ -0,0 +1 @@
++python-idna
+diff --git a/build/pkgs/jinja2/distros/fedora.txt b/build/pkgs/jinja2/distros/fedora.txt
+new file mode 100644
+index 00000000..f5f3caf
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/fedora.txt
+@@ -0,0 +1 @@
++python-jinja2
+diff --git a/build/pkgs/matplotlib/distros/fedora.txt b/build/pkgs/matplotlib/distros/fedora.txt
+new file mode 100644
+index 00000000..f6d856e
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/fedora.txt
+@@ -0,0 +1 @@
++python-matplotlib
+diff --git a/build/pkgs/mpmath/distros/fedora.txt b/build/pkgs/mpmath/distros/fedora.txt
+new file mode 100644
+index 00000000..a7dc8d5
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/fedora.txt
+@@ -0,0 +1 @@
++python-mpmath
+diff --git a/build/pkgs/networkx/distros/fedora.txt b/build/pkgs/networkx/distros/fedora.txt
+new file mode 100644
+index 00000000..293f943
+--- /dev/null
++++ b/build/pkgs/networkx/distros/fedora.txt
+@@ -0,0 +1 @@
++python-networkx
+diff --git a/build/pkgs/numpy/distros/fedora.txt b/build/pkgs/numpy/distros/fedora.txt
+new file mode 100644
+index 00000000..c8722b9
+--- /dev/null
++++ b/build/pkgs/numpy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-numpy
+diff --git a/build/pkgs/packaging/distros/fedora.txt b/build/pkgs/packaging/distros/fedora.txt
+new file mode 100644
+index 00000000..02ad855
+--- /dev/null
++++ b/build/pkgs/packaging/distros/fedora.txt
+@@ -0,0 +1 @@
++python-packaging
+diff --git a/build/pkgs/pandocfilters/distros/fedora.txt b/build/pkgs/pandocfilters/distros/fedora.txt
+new file mode 100644
+index 00000000..e7a86d0
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/fedora.txt b/build/pkgs/pickleshare/distros/fedora.txt
+new file mode 100644
+index 00000000..6d991a2
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pickleshare
+diff --git a/build/pkgs/pillow/distros/fedora.txt b/build/pkgs/pillow/distros/fedora.txt
+new file mode 100644
+index 00000000..86dbb1d
+--- /dev/null
++++ b/build/pkgs/pillow/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pillow
+diff --git a/build/pkgs/pluggy/distros/fedora.txt b/build/pkgs/pluggy/distros/fedora.txt
+new file mode 100644
+index 00000000..c869e54
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pluggy
+diff --git a/build/pkgs/py/distros/fedora.txt b/build/pkgs/py/distros/fedora.txt
+new file mode 100644
+index 00000000..b348d39
+--- /dev/null
++++ b/build/pkgs/py/distros/fedora.txt
+@@ -0,0 +1 @@
++python-py
+diff --git a/build/pkgs/pygments/distros/fedora.txt b/build/pkgs/pygments/distros/fedora.txt
+new file mode 100644
+index 00000000..f3e72a8
+--- /dev/null
++++ b/build/pkgs/pygments/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pygments
+diff --git a/build/pkgs/pytz/distros/fedora.txt b/build/pkgs/pytz/distros/fedora.txt
+new file mode 100644
+index 00000000..2cccc9e
+--- /dev/null
++++ b/build/pkgs/pytz/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pytz
+diff --git a/build/pkgs/pyzmq/distros/fedora.txt b/build/pkgs/pyzmq/distros/fedora.txt
+new file mode 100644
+index 00000000..23f64d1
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pyzmq
+diff --git a/build/pkgs/requests/distros/fedora.txt b/build/pkgs/requests/distros/fedora.txt
+new file mode 100644
+index 00000000..93a7bc1
+--- /dev/null
++++ b/build/pkgs/requests/distros/fedora.txt
+@@ -0,0 +1 @@
++python-requests
+diff --git a/build/pkgs/scipy/distros/fedora.txt b/build/pkgs/scipy/distros/fedora.txt
+new file mode 100644
+index 00000000..7ff2882
+--- /dev/null
++++ b/build/pkgs/scipy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-scipy
+diff --git a/build/pkgs/setuptools/distros/fedora.txt b/build/pkgs/setuptools/distros/fedora.txt
+new file mode 100644
+index 00000000..e1ad178
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/fedora.txt
+@@ -0,0 +1 @@
++python-setuptools
+diff --git a/build/pkgs/six/distros/fedora.txt b/build/pkgs/six/distros/fedora.txt
+new file mode 100644
+index 00000000..787c530
+--- /dev/null
++++ b/build/pkgs/six/distros/fedora.txt
+@@ -0,0 +1 @@
++python-six
+diff --git a/build/pkgs/sympy/distros/fedora.txt b/build/pkgs/sympy/distros/fedora.txt
+new file mode 100644
+index 00000000..126c88a
+--- /dev/null
++++ b/build/pkgs/sympy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-sympy
+diff --git a/build/pkgs/texttable/distros/fedora.txt b/build/pkgs/texttable/distros/fedora.txt
+new file mode 100644
+index 00000000..8d1ccec
+--- /dev/null
++++ b/build/pkgs/texttable/distros/fedora.txt
+@@ -0,0 +1 @@
++python-texttable
+diff --git a/build/pkgs/toml/distros/fedora.txt b/build/pkgs/toml/distros/fedora.txt
+new file mode 100644
+index 00000000..821ee77
+--- /dev/null
++++ b/build/pkgs/toml/distros/fedora.txt
+@@ -0,0 +1 @@
++python-toml
+diff --git a/build/pkgs/webencodings/distros/fedora.txt b/build/pkgs/webencodings/distros/fedora.txt
+new file mode 100644
+index 00000000..12ddba9
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/fedora.txt
+@@ -0,0 +1 @@
++python-webencodings
+diff --git a/build/pkgs/wheel/distros/fedora.txt b/build/pkgs/wheel/distros/fedora.txt
+new file mode 100644
+index 00000000..ae4cbb9
+--- /dev/null
++++ b/build/pkgs/wheel/distros/fedora.txt
+@@ -0,0 +1 @@
++python-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From ad1d5a20380b147c774903066031442f31094626 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 21:04:04 -0700
+Subject: build/pkgs: Add distros/arch.txt for Python packages
+
+---
+ build/pkgs/babel/distros/arch.txt         | 1 +
+ build/pkgs/bleach/distros/arch.txt        | 1 +
+ build/pkgs/certifi/distros/arch.txt       | 1 +
+ build/pkgs/cvxopt/distros/arch.txt        | 1 +
+ build/pkgs/decorator/distros/arch.txt     | 1 +
+ build/pkgs/html5lib/distros/arch.txt      | 1 +
+ build/pkgs/idna/distros/arch.txt          | 1 +
+ build/pkgs/matplotlib/distros/arch.txt    | 1 +
+ build/pkgs/mpmath/distros/arch.txt        | 1 +
+ build/pkgs/networkx/distros/arch.txt      | 1 +
+ build/pkgs/numpy/distros/arch.txt         | 1 +
+ build/pkgs/packaging/distros/arch.txt     | 1 +
+ build/pkgs/pandocfilters/distros/arch.txt | 1 +
+ build/pkgs/pickleshare/distros/arch.txt   | 1 +
+ build/pkgs/pillow/distros/arch.txt        | 1 +
+ build/pkgs/pluggy/distros/arch.txt        | 1 +
+ build/pkgs/py/distros/arch.txt            | 1 +
+ build/pkgs/pygments/distros/arch.txt      | 1 +
+ build/pkgs/pytz/distros/arch.txt          | 1 +
+ build/pkgs/pyzmq/distros/arch.txt         | 1 +
+ build/pkgs/requests/distros/arch.txt      | 1 +
+ build/pkgs/scipy/distros/arch.txt         | 1 +
+ build/pkgs/setuptools/distros/arch.txt    | 1 +
+ build/pkgs/six/distros/arch.txt           | 1 +
+ build/pkgs/sympy/distros/arch.txt         | 1 +
+ build/pkgs/texttable/distros/arch.txt     | 1 +
+ build/pkgs/toml/distros/arch.txt          | 1 +
+ build/pkgs/webencodings/distros/arch.txt  | 1 +
+ build/pkgs/wheel/distros/arch.txt         | 1 +
+ 29 files changed, 29 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/arch.txt
+ create mode 100644 build/pkgs/bleach/distros/arch.txt
+ create mode 100644 build/pkgs/certifi/distros/arch.txt
+ create mode 100644 build/pkgs/cvxopt/distros/arch.txt
+ create mode 100644 build/pkgs/decorator/distros/arch.txt
+ create mode 100644 build/pkgs/html5lib/distros/arch.txt
+ create mode 100644 build/pkgs/idna/distros/arch.txt
+ create mode 100644 build/pkgs/matplotlib/distros/arch.txt
+ create mode 100644 build/pkgs/mpmath/distros/arch.txt
+ create mode 100644 build/pkgs/networkx/distros/arch.txt
+ create mode 100644 build/pkgs/numpy/distros/arch.txt
+ create mode 100644 build/pkgs/packaging/distros/arch.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/arch.txt
+ create mode 100644 build/pkgs/pickleshare/distros/arch.txt
+ create mode 100644 build/pkgs/pillow/distros/arch.txt
+ create mode 100644 build/pkgs/pluggy/distros/arch.txt
+ create mode 100644 build/pkgs/py/distros/arch.txt
+ create mode 100644 build/pkgs/pygments/distros/arch.txt
+ create mode 100644 build/pkgs/pytz/distros/arch.txt
+ create mode 100644 build/pkgs/pyzmq/distros/arch.txt
+ create mode 100644 build/pkgs/requests/distros/arch.txt
+ create mode 100644 build/pkgs/scipy/distros/arch.txt
+ create mode 100644 build/pkgs/setuptools/distros/arch.txt
+ create mode 100644 build/pkgs/six/distros/arch.txt
+ create mode 100644 build/pkgs/sympy/distros/arch.txt
+ create mode 100644 build/pkgs/texttable/distros/arch.txt
+ create mode 100644 build/pkgs/toml/distros/arch.txt
+ create mode 100644 build/pkgs/webencodings/distros/arch.txt
+ create mode 100644 build/pkgs/wheel/distros/arch.txt
+
+diff --git a/build/pkgs/babel/distros/arch.txt b/build/pkgs/babel/distros/arch.txt
+new file mode 100644
+index 00000000..f2d828c
+--- /dev/null
++++ b/build/pkgs/babel/distros/arch.txt
+@@ -0,0 +1 @@
++python-babel
+diff --git a/build/pkgs/bleach/distros/arch.txt b/build/pkgs/bleach/distros/arch.txt
+new file mode 100644
+index 00000000..c5422cc
+--- /dev/null
++++ b/build/pkgs/bleach/distros/arch.txt
+@@ -0,0 +1 @@
++python-bleach
+diff --git a/build/pkgs/certifi/distros/arch.txt b/build/pkgs/certifi/distros/arch.txt
+new file mode 100644
+index 00000000..be421c8
+--- /dev/null
++++ b/build/pkgs/certifi/distros/arch.txt
+@@ -0,0 +1 @@
++python-certifi
+diff --git a/build/pkgs/cvxopt/distros/arch.txt b/build/pkgs/cvxopt/distros/arch.txt
+new file mode 100644
+index 00000000..f15770f
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/arch.txt
+@@ -0,0 +1 @@
++python-cvxopt
+diff --git a/build/pkgs/decorator/distros/arch.txt b/build/pkgs/decorator/distros/arch.txt
+new file mode 100644
+index 00000000..0795604
+--- /dev/null
++++ b/build/pkgs/decorator/distros/arch.txt
+@@ -0,0 +1 @@
++python-decorator
+diff --git a/build/pkgs/html5lib/distros/arch.txt b/build/pkgs/html5lib/distros/arch.txt
+new file mode 100644
+index 00000000..b821491
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/arch.txt
+@@ -0,0 +1 @@
++python-html5lib
+diff --git a/build/pkgs/idna/distros/arch.txt b/build/pkgs/idna/distros/arch.txt
+new file mode 100644
+index 00000000..a73e70c
+--- /dev/null
++++ b/build/pkgs/idna/distros/arch.txt
+@@ -0,0 +1 @@
++python-idna
+diff --git a/build/pkgs/matplotlib/distros/arch.txt b/build/pkgs/matplotlib/distros/arch.txt
+new file mode 100644
+index 00000000..f6d856e
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/arch.txt
+@@ -0,0 +1 @@
++python-matplotlib
+diff --git a/build/pkgs/mpmath/distros/arch.txt b/build/pkgs/mpmath/distros/arch.txt
+new file mode 100644
+index 00000000..a7dc8d5
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/arch.txt
+@@ -0,0 +1 @@
++python-mpmath
+diff --git a/build/pkgs/networkx/distros/arch.txt b/build/pkgs/networkx/distros/arch.txt
+new file mode 100644
+index 00000000..293f943
+--- /dev/null
++++ b/build/pkgs/networkx/distros/arch.txt
+@@ -0,0 +1 @@
++python-networkx
+diff --git a/build/pkgs/numpy/distros/arch.txt b/build/pkgs/numpy/distros/arch.txt
+new file mode 100644
+index 00000000..c8722b9
+--- /dev/null
++++ b/build/pkgs/numpy/distros/arch.txt
+@@ -0,0 +1 @@
++python-numpy
+diff --git a/build/pkgs/packaging/distros/arch.txt b/build/pkgs/packaging/distros/arch.txt
+new file mode 100644
+index 00000000..02ad855
+--- /dev/null
++++ b/build/pkgs/packaging/distros/arch.txt
+@@ -0,0 +1 @@
++python-packaging
+diff --git a/build/pkgs/pandocfilters/distros/arch.txt b/build/pkgs/pandocfilters/distros/arch.txt
+new file mode 100644
+index 00000000..e7a86d0
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/arch.txt
+@@ -0,0 +1 @@
++python-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/arch.txt b/build/pkgs/pickleshare/distros/arch.txt
+new file mode 100644
+index 00000000..6d991a2
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/arch.txt
+@@ -0,0 +1 @@
++python-pickleshare
+diff --git a/build/pkgs/pillow/distros/arch.txt b/build/pkgs/pillow/distros/arch.txt
+new file mode 100644
+index 00000000..86dbb1d
+--- /dev/null
++++ b/build/pkgs/pillow/distros/arch.txt
+@@ -0,0 +1 @@
++python-pillow
+diff --git a/build/pkgs/pluggy/distros/arch.txt b/build/pkgs/pluggy/distros/arch.txt
+new file mode 100644
+index 00000000..c869e54
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/arch.txt
+@@ -0,0 +1 @@
++python-pluggy
+diff --git a/build/pkgs/py/distros/arch.txt b/build/pkgs/py/distros/arch.txt
+new file mode 100644
+index 00000000..b348d39
+--- /dev/null
++++ b/build/pkgs/py/distros/arch.txt
+@@ -0,0 +1 @@
++python-py
+diff --git a/build/pkgs/pygments/distros/arch.txt b/build/pkgs/pygments/distros/arch.txt
+new file mode 100644
+index 00000000..f3e72a8
+--- /dev/null
++++ b/build/pkgs/pygments/distros/arch.txt
+@@ -0,0 +1 @@
++python-pygments
+diff --git a/build/pkgs/pytz/distros/arch.txt b/build/pkgs/pytz/distros/arch.txt
+new file mode 100644
+index 00000000..2cccc9e
+--- /dev/null
++++ b/build/pkgs/pytz/distros/arch.txt
+@@ -0,0 +1 @@
++python-pytz
+diff --git a/build/pkgs/pyzmq/distros/arch.txt b/build/pkgs/pyzmq/distros/arch.txt
+new file mode 100644
+index 00000000..23f64d1
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/arch.txt
+@@ -0,0 +1 @@
++python-pyzmq
+diff --git a/build/pkgs/requests/distros/arch.txt b/build/pkgs/requests/distros/arch.txt
+new file mode 100644
+index 00000000..93a7bc1
+--- /dev/null
++++ b/build/pkgs/requests/distros/arch.txt
+@@ -0,0 +1 @@
++python-requests
+diff --git a/build/pkgs/scipy/distros/arch.txt b/build/pkgs/scipy/distros/arch.txt
+new file mode 100644
+index 00000000..7ff2882
+--- /dev/null
++++ b/build/pkgs/scipy/distros/arch.txt
+@@ -0,0 +1 @@
++python-scipy
+diff --git a/build/pkgs/setuptools/distros/arch.txt b/build/pkgs/setuptools/distros/arch.txt
+new file mode 100644
+index 00000000..e1ad178
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/arch.txt
+@@ -0,0 +1 @@
++python-setuptools
+diff --git a/build/pkgs/six/distros/arch.txt b/build/pkgs/six/distros/arch.txt
+new file mode 100644
+index 00000000..787c530
+--- /dev/null
++++ b/build/pkgs/six/distros/arch.txt
+@@ -0,0 +1 @@
++python-six
+diff --git a/build/pkgs/sympy/distros/arch.txt b/build/pkgs/sympy/distros/arch.txt
+new file mode 100644
+index 00000000..126c88a
+--- /dev/null
++++ b/build/pkgs/sympy/distros/arch.txt
+@@ -0,0 +1 @@
++python-sympy
+diff --git a/build/pkgs/texttable/distros/arch.txt b/build/pkgs/texttable/distros/arch.txt
+new file mode 100644
+index 00000000..8d1ccec
+--- /dev/null
++++ b/build/pkgs/texttable/distros/arch.txt
+@@ -0,0 +1 @@
++python-texttable
+diff --git a/build/pkgs/toml/distros/arch.txt b/build/pkgs/toml/distros/arch.txt
+new file mode 100644
+index 00000000..821ee77
+--- /dev/null
++++ b/build/pkgs/toml/distros/arch.txt
+@@ -0,0 +1 @@
++python-toml
+diff --git a/build/pkgs/webencodings/distros/arch.txt b/build/pkgs/webencodings/distros/arch.txt
+new file mode 100644
+index 00000000..12ddba9
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/arch.txt
+@@ -0,0 +1 @@
++python-webencodings
+diff --git a/build/pkgs/wheel/distros/arch.txt b/build/pkgs/wheel/distros/arch.txt
+new file mode 100644
+index 00000000..ae4cbb9
+--- /dev/null
++++ b/build/pkgs/wheel/distros/arch.txt
+@@ -0,0 +1 @@
++python-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5087abee08f2a89ddaf422ec72a84575fe724a79 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 21:20:56 -0700
+Subject: build/pkgs: Add distros/opensuse.txt for Python packages
+
+---
+ build/pkgs/bleach/distros/opensuse.txt        | 1 +
+ build/pkgs/cvxopt/distros/opensuse.txt        | 1 +
+ build/pkgs/html5lib/distros/opensuse.txt      | 1 +
+ build/pkgs/idna/distros/opensuse.txt          | 1 +
+ build/pkgs/jinja2/distros/opensuse.txt        | 2 +-
+ build/pkgs/mpmath/distros/opensuse.txt        | 1 +
+ build/pkgs/numpy/distros/opensuse.txt         | 1 +
+ build/pkgs/packaging/distros/opensuse.txt     | 1 +
+ build/pkgs/pandocfilters/distros/opensuse.txt | 1 +
+ build/pkgs/pluggy/distros/opensuse.txt        | 1 +
+ build/pkgs/py/distros/opensuse.txt            | 1 +
+ build/pkgs/pygments/distros/opensuse.txt      | 2 +-
+ build/pkgs/sympy/distros/opensuse.txt         | 1 +
+ build/pkgs/texttable/distros/opensuse.txt     | 1 +
+ build/pkgs/toml/distros/opensuse.txt          | 1 +
+ 15 files changed, 15 insertions(+), 2 deletions(-)
+ create mode 100644 build/pkgs/bleach/distros/opensuse.txt
+ create mode 100644 build/pkgs/cvxopt/distros/opensuse.txt
+ create mode 100644 build/pkgs/html5lib/distros/opensuse.txt
+ create mode 100644 build/pkgs/idna/distros/opensuse.txt
+ create mode 100644 build/pkgs/mpmath/distros/opensuse.txt
+ create mode 100644 build/pkgs/numpy/distros/opensuse.txt
+ create mode 100644 build/pkgs/packaging/distros/opensuse.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/opensuse.txt
+ create mode 100644 build/pkgs/pluggy/distros/opensuse.txt
+ create mode 100644 build/pkgs/py/distros/opensuse.txt
+ create mode 100644 build/pkgs/sympy/distros/opensuse.txt
+ create mode 100644 build/pkgs/texttable/distros/opensuse.txt
+ create mode 100644 build/pkgs/toml/distros/opensuse.txt
+
+diff --git a/build/pkgs/bleach/distros/opensuse.txt b/build/pkgs/bleach/distros/opensuse.txt
+new file mode 100644
+index 00000000..6d37c4c
+--- /dev/null
++++ b/build/pkgs/bleach/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-bleach
+diff --git a/build/pkgs/cvxopt/distros/opensuse.txt b/build/pkgs/cvxopt/distros/opensuse.txt
+new file mode 100644
+index 00000000..2bb6ad1
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-cvxopt
+diff --git a/build/pkgs/html5lib/distros/opensuse.txt b/build/pkgs/html5lib/distros/opensuse.txt
+new file mode 100644
+index 00000000..6d7b8df
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-html5lib
+diff --git a/build/pkgs/idna/distros/opensuse.txt b/build/pkgs/idna/distros/opensuse.txt
+new file mode 100644
+index 00000000..de48e70
+--- /dev/null
++++ b/build/pkgs/idna/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-idna
+diff --git a/build/pkgs/jinja2/distros/opensuse.txt b/build/pkgs/jinja2/distros/opensuse.txt
+index 5d90a22..f2db865 100644
+--- a/build/pkgs/jinja2/distros/opensuse.txt
++++ b/build/pkgs/jinja2/distros/opensuse.txt
+@@ -1 +1 @@
+-python3-Jinja2
++python3-jinja2
+diff --git a/build/pkgs/mpmath/distros/opensuse.txt b/build/pkgs/mpmath/distros/opensuse.txt
+new file mode 100644
+index 00000000..fbc82a9
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-mpmath
+diff --git a/build/pkgs/numpy/distros/opensuse.txt b/build/pkgs/numpy/distros/opensuse.txt
+new file mode 100644
+index 00000000..79d5c5a
+--- /dev/null
++++ b/build/pkgs/numpy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-numpy
+diff --git a/build/pkgs/packaging/distros/opensuse.txt b/build/pkgs/packaging/distros/opensuse.txt
+new file mode 100644
+index 00000000..8f1c0ff
+--- /dev/null
++++ b/build/pkgs/packaging/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-packaging
+diff --git a/build/pkgs/pandocfilters/distros/opensuse.txt b/build/pkgs/pandocfilters/distros/opensuse.txt
+new file mode 100644
+index 00000000..d0d4c24
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-pandocfilters
+diff --git a/build/pkgs/pluggy/distros/opensuse.txt b/build/pkgs/pluggy/distros/opensuse.txt
+new file mode 100644
+index 00000000..43a3acf
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-pluggy
+diff --git a/build/pkgs/py/distros/opensuse.txt b/build/pkgs/py/distros/opensuse.txt
+new file mode 100644
+index 00000000..81fefe6
+--- /dev/null
++++ b/build/pkgs/py/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-py
+diff --git a/build/pkgs/pygments/distros/opensuse.txt b/build/pkgs/pygments/distros/opensuse.txt
+index 9ff5740..3ab3792 100644
+--- a/build/pkgs/pygments/distros/opensuse.txt
++++ b/build/pkgs/pygments/distros/opensuse.txt
+@@ -1 +1 @@
+-python3-Pygments
++python3-pygments
+diff --git a/build/pkgs/sympy/distros/opensuse.txt b/build/pkgs/sympy/distros/opensuse.txt
+new file mode 100644
+index 00000000..db423c8
+--- /dev/null
++++ b/build/pkgs/sympy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-sympy
+diff --git a/build/pkgs/texttable/distros/opensuse.txt b/build/pkgs/texttable/distros/opensuse.txt
+new file mode 100644
+index 00000000..8f8e7e2
+--- /dev/null
++++ b/build/pkgs/texttable/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-texttable
+diff --git a/build/pkgs/toml/distros/opensuse.txt b/build/pkgs/toml/distros/opensuse.txt
+new file mode 100644
+index 00000000..543e89d
+--- /dev/null
++++ b/build/pkgs/toml/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-toml
+-- 
+cgit v1.0-1-gd88e
+
+
+From a480ba7ace1370d106ae831e904ea22b72af1be7 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 22:45:04 -0700
+Subject: build/pkgs: Add distros/debian.txt for Python packages
+
+---
+ build/pkgs/babel/distros/debian.txt         | 1 +
+ build/pkgs/bleach/distros/debian.txt        | 1 +
+ build/pkgs/certifi/distros/debian.txt       | 1 +
+ build/pkgs/cvxopt/distros/debian.txt        | 1 +
+ build/pkgs/decorator/distros/debian.txt     | 1 +
+ build/pkgs/html5lib/distros/debian.txt      | 1 +
+ build/pkgs/idna/distros/debian.txt          | 1 +
+ build/pkgs/jinja2/distros/debian.txt        | 1 +
+ build/pkgs/matplotlib/distros/debian.txt    | 1 +
+ build/pkgs/mpmath/distros/debian.txt        | 1 +
+ build/pkgs/networkx/distros/debian.txt      | 1 +
+ build/pkgs/numpy/distros/debian.txt         | 1 +
+ build/pkgs/packaging/distros/debian.txt     | 1 +
+ build/pkgs/pandocfilters/distros/debian.txt | 1 +
+ build/pkgs/pickleshare/distros/debian.txt   | 1 +
+ build/pkgs/pillow/distros/debian.txt        | 1 +
+ build/pkgs/pluggy/distros/debian.txt        | 1 +
+ build/pkgs/py/distros/debian.txt            | 1 +
+ build/pkgs/pygments/distros/debian.txt      | 1 +
+ build/pkgs/pytz/distros/debian.txt          | 1 +
+ build/pkgs/requests/distros/debian.txt      | 1 +
+ build/pkgs/scipy/distros/debian.txt         | 1 +
+ build/pkgs/setuptools/distros/debian.txt    | 1 +
+ build/pkgs/six/distros/debian.txt           | 1 +
+ build/pkgs/sympy/distros/debian.txt         | 1 +
+ build/pkgs/texttable/distros/debian.txt     | 1 +
+ build/pkgs/toml/distros/debian.txt          | 1 +
+ build/pkgs/webencodings/distros/debian.txt  | 1 +
+ build/pkgs/wheel/distros/debian.txt         | 1 +
+ 29 files changed, 29 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/debian.txt
+ create mode 100644 build/pkgs/bleach/distros/debian.txt
+ create mode 100644 build/pkgs/certifi/distros/debian.txt
+ create mode 100644 build/pkgs/cvxopt/distros/debian.txt
+ create mode 100644 build/pkgs/decorator/distros/debian.txt
+ create mode 100644 build/pkgs/html5lib/distros/debian.txt
+ create mode 100644 build/pkgs/idna/distros/debian.txt
+ create mode 100644 build/pkgs/jinja2/distros/debian.txt
+ create mode 100644 build/pkgs/matplotlib/distros/debian.txt
+ create mode 100644 build/pkgs/mpmath/distros/debian.txt
+ create mode 100644 build/pkgs/networkx/distros/debian.txt
+ create mode 100644 build/pkgs/numpy/distros/debian.txt
+ create mode 100644 build/pkgs/packaging/distros/debian.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/debian.txt
+ create mode 100644 build/pkgs/pickleshare/distros/debian.txt
+ create mode 100644 build/pkgs/pillow/distros/debian.txt
+ create mode 100644 build/pkgs/pluggy/distros/debian.txt
+ create mode 100644 build/pkgs/py/distros/debian.txt
+ create mode 100644 build/pkgs/pygments/distros/debian.txt
+ create mode 100644 build/pkgs/pytz/distros/debian.txt
+ create mode 100644 build/pkgs/requests/distros/debian.txt
+ create mode 100644 build/pkgs/scipy/distros/debian.txt
+ create mode 100644 build/pkgs/setuptools/distros/debian.txt
+ create mode 100644 build/pkgs/six/distros/debian.txt
+ create mode 100644 build/pkgs/sympy/distros/debian.txt
+ create mode 100644 build/pkgs/texttable/distros/debian.txt
+ create mode 100644 build/pkgs/toml/distros/debian.txt
+ create mode 100644 build/pkgs/webencodings/distros/debian.txt
+ create mode 100644 build/pkgs/wheel/distros/debian.txt
+
+diff --git a/build/pkgs/babel/distros/debian.txt b/build/pkgs/babel/distros/debian.txt
+new file mode 100644
+index 00000000..e623eb6
+--- /dev/null
++++ b/build/pkgs/babel/distros/debian.txt
+@@ -0,0 +1 @@
++python3-babel
+diff --git a/build/pkgs/bleach/distros/debian.txt b/build/pkgs/bleach/distros/debian.txt
+new file mode 100644
+index 00000000..6d37c4c
+--- /dev/null
++++ b/build/pkgs/bleach/distros/debian.txt
+@@ -0,0 +1 @@
++python3-bleach
+diff --git a/build/pkgs/certifi/distros/debian.txt b/build/pkgs/certifi/distros/debian.txt
+new file mode 100644
+index 00000000..f585a82
+--- /dev/null
++++ b/build/pkgs/certifi/distros/debian.txt
+@@ -0,0 +1 @@
++python3-certifi
+diff --git a/build/pkgs/cvxopt/distros/debian.txt b/build/pkgs/cvxopt/distros/debian.txt
+new file mode 100644
+index 00000000..2bb6ad1
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/debian.txt
+@@ -0,0 +1 @@
++python3-cvxopt
+diff --git a/build/pkgs/decorator/distros/debian.txt b/build/pkgs/decorator/distros/debian.txt
+new file mode 100644
+index 00000000..46c478e
+--- /dev/null
++++ b/build/pkgs/decorator/distros/debian.txt
+@@ -0,0 +1 @@
++python3-decorator
+diff --git a/build/pkgs/html5lib/distros/debian.txt b/build/pkgs/html5lib/distros/debian.txt
+new file mode 100644
+index 00000000..6d7b8df
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/debian.txt
+@@ -0,0 +1 @@
++python3-html5lib
+diff --git a/build/pkgs/idna/distros/debian.txt b/build/pkgs/idna/distros/debian.txt
+new file mode 100644
+index 00000000..de48e70
+--- /dev/null
++++ b/build/pkgs/idna/distros/debian.txt
+@@ -0,0 +1 @@
++python3-idna
+diff --git a/build/pkgs/jinja2/distros/debian.txt b/build/pkgs/jinja2/distros/debian.txt
+new file mode 100644
+index 00000000..f2db865
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/debian.txt
+@@ -0,0 +1 @@
++python3-jinja2
+diff --git a/build/pkgs/matplotlib/distros/debian.txt b/build/pkgs/matplotlib/distros/debian.txt
+new file mode 100644
+index 00000000..1374329
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/debian.txt
+@@ -0,0 +1 @@
++python3-matplotlib
+diff --git a/build/pkgs/mpmath/distros/debian.txt b/build/pkgs/mpmath/distros/debian.txt
+new file mode 100644
+index 00000000..fbc82a9
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/debian.txt
+@@ -0,0 +1 @@
++python3-mpmath
+diff --git a/build/pkgs/networkx/distros/debian.txt b/build/pkgs/networkx/distros/debian.txt
+new file mode 100644
+index 00000000..6779066
+--- /dev/null
++++ b/build/pkgs/networkx/distros/debian.txt
+@@ -0,0 +1 @@
++python3-networkx
+diff --git a/build/pkgs/numpy/distros/debian.txt b/build/pkgs/numpy/distros/debian.txt
+new file mode 100644
+index 00000000..79d5c5a
+--- /dev/null
++++ b/build/pkgs/numpy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-numpy
+diff --git a/build/pkgs/packaging/distros/debian.txt b/build/pkgs/packaging/distros/debian.txt
+new file mode 100644
+index 00000000..8f1c0ff
+--- /dev/null
++++ b/build/pkgs/packaging/distros/debian.txt
+@@ -0,0 +1 @@
++python3-packaging
+diff --git a/build/pkgs/pandocfilters/distros/debian.txt b/build/pkgs/pandocfilters/distros/debian.txt
+new file mode 100644
+index 00000000..d0d4c24
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/debian.txt b/build/pkgs/pickleshare/distros/debian.txt
+new file mode 100644
+index 00000000..a00907d
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pickleshare
+diff --git a/build/pkgs/pillow/distros/debian.txt b/build/pkgs/pillow/distros/debian.txt
+new file mode 100644
+index 00000000..3319fcd
+--- /dev/null
++++ b/build/pkgs/pillow/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pillow
+diff --git a/build/pkgs/pluggy/distros/debian.txt b/build/pkgs/pluggy/distros/debian.txt
+new file mode 100644
+index 00000000..43a3acf
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pluggy
+diff --git a/build/pkgs/py/distros/debian.txt b/build/pkgs/py/distros/debian.txt
+new file mode 100644
+index 00000000..81fefe6
+--- /dev/null
++++ b/build/pkgs/py/distros/debian.txt
+@@ -0,0 +1 @@
++python3-py
+diff --git a/build/pkgs/pygments/distros/debian.txt b/build/pkgs/pygments/distros/debian.txt
+new file mode 100644
+index 00000000..3ab3792
+--- /dev/null
++++ b/build/pkgs/pygments/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pygments
+diff --git a/build/pkgs/pytz/distros/debian.txt b/build/pkgs/pytz/distros/debian.txt
+new file mode 100644
+index 00000000..db20908
+--- /dev/null
++++ b/build/pkgs/pytz/distros/debian.txt
+@@ -0,0 +1 @@
++python3-tz
+diff --git a/build/pkgs/requests/distros/debian.txt b/build/pkgs/requests/distros/debian.txt
+new file mode 100644
+index 00000000..43147b2
+--- /dev/null
++++ b/build/pkgs/requests/distros/debian.txt
+@@ -0,0 +1 @@
++python3-requests
+diff --git a/build/pkgs/scipy/distros/debian.txt b/build/pkgs/scipy/distros/debian.txt
+new file mode 100644
+index 00000000..12b3666
+--- /dev/null
++++ b/build/pkgs/scipy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-scipy
+diff --git a/build/pkgs/setuptools/distros/debian.txt b/build/pkgs/setuptools/distros/debian.txt
+new file mode 100644
+index 00000000..1c0901c
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/debian.txt
+@@ -0,0 +1 @@
++python3-setuptools
+diff --git a/build/pkgs/six/distros/debian.txt b/build/pkgs/six/distros/debian.txt
+new file mode 100644
+index 00000000..68ff859
+--- /dev/null
++++ b/build/pkgs/six/distros/debian.txt
+@@ -0,0 +1 @@
++python3-six
+diff --git a/build/pkgs/sympy/distros/debian.txt b/build/pkgs/sympy/distros/debian.txt
+new file mode 100644
+index 00000000..db423c8
+--- /dev/null
++++ b/build/pkgs/sympy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-sympy
+diff --git a/build/pkgs/texttable/distros/debian.txt b/build/pkgs/texttable/distros/debian.txt
+new file mode 100644
+index 00000000..8f8e7e2
+--- /dev/null
++++ b/build/pkgs/texttable/distros/debian.txt
+@@ -0,0 +1 @@
++python3-texttable
+diff --git a/build/pkgs/toml/distros/debian.txt b/build/pkgs/toml/distros/debian.txt
+new file mode 100644
+index 00000000..543e89d
+--- /dev/null
++++ b/build/pkgs/toml/distros/debian.txt
+@@ -0,0 +1 @@
++python3-toml
+diff --git a/build/pkgs/webencodings/distros/debian.txt b/build/pkgs/webencodings/distros/debian.txt
+new file mode 100644
+index 00000000..ac30c2f
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/debian.txt
+@@ -0,0 +1 @@
++python3-webencodings
+diff --git a/build/pkgs/wheel/distros/debian.txt b/build/pkgs/wheel/distros/debian.txt
+new file mode 100644
+index 00000000..3c066725
+--- /dev/null
++++ b/build/pkgs/wheel/distros/debian.txt
+@@ -0,0 +1 @@
++python3-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 93bf30d7de292551c3050e2dd74651d69ba4bd46 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 18 Oct 2021 07:50:34 -0400
+Subject: Trac #29665: add more documentation for SAGE_PYTHON_PACKAGE_CHECK().
+
+An earlier commit allows SAGE_PYTHON_PACKAGE_CHECK(package) to tweak the
+value of sage_use_system_$package if --enable-system-site-packages was
+not used. This essentially changes the default --with-system-$package=yes
+to "no" in that case. Here we update the documentation to reflect it.
+---
+ m4/sage_python_package_check.m4 | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 7ee82a7..95eefd0 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -34,6 +34,10 @@
+ #   ensure that the ./configure- and run-time views of the system
+ #   are as similar as possible.
+ #
++#   To avoid suggesting these system packages to users who have not
++#   set --enable-system-site-packages, this macro also changes the
++#   default for --with-system-foo from "yes" to "no" in that case.
++#
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
+-- 
+cgit v1.0-1-gd88e
+
+
+From d771e49d57ecdf3622434bc09cbfb87ad3bb7744 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 18 Oct 2021 07:42:46 -0400
+Subject: Trac #29665: improve SAGE_PYTHON_PACKAGE_CHECK() failure message.
+
+When --enable-system-site-packages is off, SAGE_PYTHON_PACKAGE_CHECK()
+will always install the corresponding SPKG. We improve the ./configure
+output in that case to make it clear that the decision was based on
+the value of --enable-system-site-packages and not the "real" check.
+---
+ m4/sage_python_package_check.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 95eefd0..5f0f084 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -40,7 +40,9 @@
+ #
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
++  AC_MSG_CHECKING([if --enable-system-site-packages was used])
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
++    AC_MSG_RESULT(yes)
+     AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
+ 
+     dnl We run this check inside a python venv, because that's ultimately
+@@ -94,6 +96,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
+     dnl System site packages are disabled.
++    AC_MSG_RESULT(no; skipping check)
+     sage_spkg_install_$1=yes
+ 
+     dnl We have to retroactively hack the --with-system-foo={no,yes,force}
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5bb43c1b78a1deb3364f235305937c2f823e5e18 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 24 Oct 2021 20:29:25 -0400
+Subject: Trac #29665: use sage-venv in SAGE_PYTHON_PACKAGE_CHECK().
+
+For consistency with the rest of the build system, we now use the
+build/bin/sage-venv script to create the venv in this autoconf macro
+rather than invoking $PYTHON_FOR_VENV with "-m venv" directly.
+---
+ m4/sage_python_package_check.m4 | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 5f0f084..5547b35 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -50,11 +50,11 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AC_MSG_CHECKING([if we can create a python venv in config.venv])
+ 
+     dnl Use --clear because ./configure typically clobbers its output files.
+-    AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
+-                                        --clear                dnl
+-                                        --without-pip          dnl
+-                                        config.venv            dnl
+-                                        2>&AS_MESSAGE_LOG_FD], [
++    AS_IF(["${PYTHON_FOR_VENV}" build/bin/sage-venv      dnl
++                                  --system-site-packages dnl
++                                  --clear                dnl
++                                  config.venv            dnl
++                                  2>&AS_MESSAGE_LOG_FD], [
+       AC_MSG_RESULT(yes)
+       dnl strip all comments from install-requires.txt; this should leave
+       dnl only a single line containing the version specification for this
+-- 
+cgit v1.0-1-gd88e
+
+
+From c78363d6326addff16ca5abac897949a6be72bf4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:10:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for urllib3.
+
+---
+ build/pkgs/urllib3/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/urllib3/spkg-configure.m4
+
+diff --git a/build/pkgs/urllib3/spkg-configure.m4 b/build/pkgs/urllib3/spkg-configure.m4
+new file mode 100644
+index 00000000..d7ef3e1
+--- /dev/null
++++ b/build/pkgs/urllib3/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([urllib3], [SAGE_PYTHON_PACKAGE_CHECK([urllib3])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f416d5abcae495ea8301fad024b279ea9e997b29 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:15:18 -0400
+Subject: Trac #29665: add Gentoo package information for urllib3.
+
+---
+ build/pkgs/urllib3/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/urllib3/distros/gentoo.txt
+
+diff --git a/build/pkgs/urllib3/distros/gentoo.txt b/build/pkgs/urllib3/distros/gentoo.txt
+new file mode 100644
+index 00000000..172a535
+--- /dev/null
++++ b/build/pkgs/urllib3/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/urllib3
+-- 
+cgit v1.0-1-gd88e
+
+
+From 852068b992bf7959500c650f54cb92e5b68d7ef8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:15:58 -0400
+Subject: Trac #29665: add Gentoo package information for nbformat.
+
+---
+ build/pkgs/nbformat/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbformat/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbformat/distros/gentoo.txt b/build/pkgs/nbformat/distros/gentoo.txt
+new file mode 100644
+index 00000000..006b1f2
+--- /dev/null
++++ b/build/pkgs/nbformat/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbformat
+-- 
+cgit v1.0-1-gd88e
+
+
+From 66179fd28fcc92ee840dcd87bb4db25cea968d66 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:34:16 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for nbformat.
+
+---
+ build/pkgs/nbformat/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbformat/spkg-configure.m4
+
+diff --git a/build/pkgs/nbformat/spkg-configure.m4 b/build/pkgs/nbformat/spkg-configure.m4
+new file mode 100644
+index 00000000..5a7f8c4
+--- /dev/null
++++ b/build/pkgs/nbformat/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbformat], [SAGE_PYTHON_PACKAGE_CHECK([nbformat])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 874005e81ed20f27a5f895030dcdbdfc5f73ad80 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:47:01 -0400
+Subject: Trac #29665: add Gentoo package information for zipp.
+
+---
+ build/pkgs/zipp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/zipp/distros/gentoo.txt
+
+diff --git a/build/pkgs/zipp/distros/gentoo.txt b/build/pkgs/zipp/distros/gentoo.txt
+new file mode 100644
+index 00000000..7f59450
+--- /dev/null
++++ b/build/pkgs/zipp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/zipp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0cc2a7355b5554c1fb79c742ebf02eff54465b3e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:47:35 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for zipp.
+
+---
+ build/pkgs/zipp/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/zipp/spkg-configure.m4
+
+diff --git a/build/pkgs/zipp/spkg-configure.m4 b/build/pkgs/zipp/spkg-configure.m4
+new file mode 100644
+index 00000000..0fe3a9c
+--- /dev/null
++++ b/build/pkgs/zipp/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([zipp], [SAGE_PYTHON_PACKAGE_CHECK([zipp])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6073ad8e56c21fc862749bbd84a56d543fb9458c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:48:37 -0400
+Subject: Trac #29665: add Gentoo package information for wcwidth.
+
+---
+ build/pkgs/wcwidth/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wcwidth/distros/gentoo.txt
+
+diff --git a/build/pkgs/wcwidth/distros/gentoo.txt b/build/pkgs/wcwidth/distros/gentoo.txt
+new file mode 100644
+index 00000000..edeb80b
+--- /dev/null
++++ b/build/pkgs/wcwidth/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/wcwidth
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9793d6172c64d61a015fbe61bd45863759124fad Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:51:10 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for wcwidth.
+
+---
+ build/pkgs/wcwidth/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wcwidth/spkg-configure.m4
+
+diff --git a/build/pkgs/wcwidth/spkg-configure.m4 b/build/pkgs/wcwidth/spkg-configure.m4
+new file mode 100644
+index 00000000..5bde15a
+--- /dev/null
++++ b/build/pkgs/wcwidth/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([wcwidth], [SAGE_PYTHON_PACKAGE_CHECK([wcwidth])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20232f370a43c146ca4e696c72a2cbcc498db060 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:52:36 -0400
+Subject: Trac #29665: add Gentoo package information for testpath.
+
+---
+ build/pkgs/testpath/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/testpath/distros/gentoo.txt
+
+diff --git a/build/pkgs/testpath/distros/gentoo.txt b/build/pkgs/testpath/distros/gentoo.txt
+new file mode 100644
+index 00000000..efa10a0
+--- /dev/null
++++ b/build/pkgs/testpath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/testpath
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1b0785b2aad8844e74345fe950baf097e2b43d24 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:55:22 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for testpath.
+
+---
+ build/pkgs/testpath/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/testpath/spkg-configure.m4
+
+diff --git a/build/pkgs/testpath/spkg-configure.m4 b/build/pkgs/testpath/spkg-configure.m4
+new file mode 100644
+index 00000000..d8fc2a7
+--- /dev/null
++++ b/build/pkgs/testpath/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([testpath], [SAGE_PYTHON_PACKAGE_CHECK([testpath])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 10fc3829ecd956d732b1b069fdfe81f0d6d5cdc2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:56:06 -0400
+Subject: Trac #29665: add Gentoo package information for jedi.
+
+---
+ build/pkgs/jedi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jedi/distros/gentoo.txt
+
+diff --git a/build/pkgs/jedi/distros/gentoo.txt b/build/pkgs/jedi/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c85a46
+--- /dev/null
++++ b/build/pkgs/jedi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jedi
+-- 
+cgit v1.0-1-gd88e
+
+
+From a75824d74c281c7639028ca01dabeed266f56998 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:06:37 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for jedi.
+
+---
+ build/pkgs/jedi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jedi/spkg-configure.m4
+
+diff --git a/build/pkgs/jedi/spkg-configure.m4 b/build/pkgs/jedi/spkg-configure.m4
+new file mode 100644
+index 00000000..a37dbcc
+--- /dev/null
++++ b/build/pkgs/jedi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jedi], [SAGE_PYTHON_PACKAGE_CHECK([jedi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 17af01373d43f6acbbdbc23e073e372d3fdadf8b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:07:47 -0400
+Subject: Trac #29665: add Gentoo package information for tomli.
+
+---
+ build/pkgs/tomli/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tomli/distros/gentoo.txt
+
+diff --git a/build/pkgs/tomli/distros/gentoo.txt b/build/pkgs/tomli/distros/gentoo.txt
+new file mode 100644
+index 00000000..0458e25
+--- /dev/null
++++ b/build/pkgs/tomli/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/tomli
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0d3b5994ae612be11992467c4a3f1a74b81400fe Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:08:12 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for tomli.
+
+---
+ build/pkgs/tomli/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tomli/spkg-configure.m4
+
+diff --git a/build/pkgs/tomli/spkg-configure.m4 b/build/pkgs/tomli/spkg-configure.m4
+new file mode 100644
+index 00000000..95a8b8b
+--- /dev/null
++++ b/build/pkgs/tomli/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tomli], [SAGE_PYTHON_PACKAGE_CHECK([tomli])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From dce1c515781b0eeb8eb9c2bc7aba581560c1fac1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:09:22 -0400
+Subject: Trac #29665: add Gentoo package information for defusedxml.
+
+---
+ build/pkgs/defusedxml/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/defusedxml/distros/gentoo.txt
+
+diff --git a/build/pkgs/defusedxml/distros/gentoo.txt b/build/pkgs/defusedxml/distros/gentoo.txt
+new file mode 100644
+index 00000000..2804214
+--- /dev/null
++++ b/build/pkgs/defusedxml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/defusedxml
+-- 
+cgit v1.0-1-gd88e
+
+
+From 02e1e1cd7f8bdae3ca5b7d35ce70af28a44e9b7c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:11:14 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for defusedxml.
+
+---
+ build/pkgs/defusedxml/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/defusedxml/spkg-configure.m4
+
+diff --git a/build/pkgs/defusedxml/spkg-configure.m4 b/build/pkgs/defusedxml/spkg-configure.m4
+new file mode 100644
+index 00000000..e02f345
+--- /dev/null
++++ b/build/pkgs/defusedxml/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([defusedxml], [SAGE_PYTHON_PACKAGE_CHECK([defusedxml])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e0ba4ebb5cfc637b5d26b85de9f34e0a160d2b9c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:12:22 -0400
+Subject: Trac #29665: add Gentoo package information for ipywidgets.
+
+---
+ build/pkgs/ipywidgets/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipywidgets/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipywidgets/distros/gentoo.txt b/build/pkgs/ipywidgets/distros/gentoo.txt
+new file mode 100644
+index 00000000..7c76967
+--- /dev/null
++++ b/build/pkgs/ipywidgets/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipywidgets
+-- 
+cgit v1.0-1-gd88e
+
+
+From 49df7e7d93c7a31b7c46d5d224a35fd313a29a32 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:15:53 -0400
+Subject: Trac #29665: add Gentoo package information for simplegeneric.
+
+---
+ build/pkgs/simplegeneric/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/simplegeneric/distros/gentoo.txt
+
+diff --git a/build/pkgs/simplegeneric/distros/gentoo.txt b/build/pkgs/simplegeneric/distros/gentoo.txt
+new file mode 100644
+index 00000000..a86e90d
+--- /dev/null
++++ b/build/pkgs/simplegeneric/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/simplegeneric
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2a893635d5804749e6fec7ed7289c921ecb5300a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:16:33 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for simplegeneric.
+
+---
+ build/pkgs/simplegeneric/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/simplegeneric/spkg-configure.m4
+
+diff --git a/build/pkgs/simplegeneric/spkg-configure.m4 b/build/pkgs/simplegeneric/spkg-configure.m4
+new file mode 100644
+index 00000000..13715ab
+--- /dev/null
++++ b/build/pkgs/simplegeneric/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([simplegeneric], [SAGE_PYTHON_PACKAGE_CHECK([simplegeneric])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a8fe7ecd6e3163e7d01261e5497ac452a8cc95ab Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:17:18 -0400
+Subject: Trac #29665: add Gentoo package information for imagesize.
+
+---
+ build/pkgs/imagesize/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/imagesize/distros/gentoo.txt
+
+diff --git a/build/pkgs/imagesize/distros/gentoo.txt b/build/pkgs/imagesize/distros/gentoo.txt
+new file mode 100644
+index 00000000..54350ba
+--- /dev/null
++++ b/build/pkgs/imagesize/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/imagesize
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2ad837c5dd1fca0f50ce6d5042a9344210a54f84 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:17:48 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for imagesize.
+
+---
+ build/pkgs/imagesize/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/imagesize/spkg-configure.m4
+
+diff --git a/build/pkgs/imagesize/spkg-configure.m4 b/build/pkgs/imagesize/spkg-configure.m4
+new file mode 100644
+index 00000000..20210ef
+--- /dev/null
++++ b/build/pkgs/imagesize/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([imagesize], [SAGE_PYTHON_PACKAGE_CHECK([imagesize])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bf47415b5bfca2d7bf24e20de35662bf331623b9 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:18:49 -0400
+Subject: Trac #29665: add Gentoo package information for mistune.
+
+---
+ build/pkgs/mistune/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mistune/distros/gentoo.txt
+
+diff --git a/build/pkgs/mistune/distros/gentoo.txt b/build/pkgs/mistune/distros/gentoo.txt
+new file mode 100644
+index 00000000..56f0a4e
+--- /dev/null
++++ b/build/pkgs/mistune/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/mistune
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6898a74fd0c65a40c5220ba68b4062ac6fe060c6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:21:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for mistune.
+
+---
+ build/pkgs/mistune/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mistune/spkg-configure.m4
+
+diff --git a/build/pkgs/mistune/spkg-configure.m4 b/build/pkgs/mistune/spkg-configure.m4
+new file mode 100644
+index 00000000..972f33d
+--- /dev/null
++++ b/build/pkgs/mistune/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([mistune], [SAGE_PYTHON_PACKAGE_CHECK([mistune])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 62735e4ccf2031cd39eb5e04b03bdfd97005d808 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:22:48 -0400
+Subject: Trac #29665: add Gentoo package information for backcall.
+
+---
+ build/pkgs/backcall/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/backcall/distros/gentoo.txt
+
+diff --git a/build/pkgs/backcall/distros/gentoo.txt b/build/pkgs/backcall/distros/gentoo.txt
+new file mode 100644
+index 00000000..266a222
+--- /dev/null
++++ b/build/pkgs/backcall/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/backcall
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9ef3ea42d4a33c7cdb623fa5417ae300cf323183 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:25:10 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for backcall.
+
+---
+ build/pkgs/backcall/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/backcall/spkg-configure.m4
+
+diff --git a/build/pkgs/backcall/spkg-configure.m4 b/build/pkgs/backcall/spkg-configure.m4
+new file mode 100644
+index 00000000..d6b11c4
+--- /dev/null
++++ b/build/pkgs/backcall/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([backcall], [SAGE_PYTHON_PACKAGE_CHECK([backcall])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1b3ea2a3c40fea0fb58435f5e5304368ea58dff8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:25:58 -0400
+Subject: Trac #29665: add Gentoo package information for parso.
+
+---
+ build/pkgs/parso/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/parso/distros/gentoo.txt
+
+diff --git a/build/pkgs/parso/distros/gentoo.txt b/build/pkgs/parso/distros/gentoo.txt
+new file mode 100644
+index 00000000..f9ce4c7
+--- /dev/null
++++ b/build/pkgs/parso/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/parso
+-- 
+cgit v1.0-1-gd88e
+
+
+From 963a3a2c563ec71a1f5be2395722d0e824cb0b11 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:26:22 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for parso.
+
+---
+ build/pkgs/parso/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/parso/spkg-configure.m4
+
+diff --git a/build/pkgs/parso/spkg-configure.m4 b/build/pkgs/parso/spkg-configure.m4
+new file mode 100644
+index 00000000..1ca6f1b
+--- /dev/null
++++ b/build/pkgs/parso/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([parso], [SAGE_PYTHON_PACKAGE_CHECK([parso])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 943053dfc474b6549bcc7d6ef2971ea43588b35c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:27:00 -0400
+Subject: Trac #29665: add Gentoo package information for pyparsing.
+
+---
+ build/pkgs/pyparsing/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyparsing/distros/gentoo.txt
+
+diff --git a/build/pkgs/pyparsing/distros/gentoo.txt b/build/pkgs/pyparsing/distros/gentoo.txt
+new file mode 100644
+index 00000000..ef0419f
+--- /dev/null
++++ b/build/pkgs/pyparsing/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyparsing
+-- 
+cgit v1.0-1-gd88e
+
+
+From bd682eaa2ac41dd84e7a52e2b0c5442fc8fd8919 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:27:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pyparsing.
+
+---
+ build/pkgs/pyparsing/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyparsing/spkg-configure.m4
+
+diff --git a/build/pkgs/pyparsing/spkg-configure.m4 b/build/pkgs/pyparsing/spkg-configure.m4
+new file mode 100644
+index 00000000..d2b4c00
+--- /dev/null
++++ b/build/pkgs/pyparsing/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pyparsing], [SAGE_PYTHON_PACKAGE_CHECK([pyparsing])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 74f36a9c0ec7c63b7e6c40066e42f4b15c2f978e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:17:42 -0400
+Subject: Trac #29665: add Gentoo package information for debugpy.
+
+---
+ build/pkgs/debugpy/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/debugpy/distros/gentoo.txt
+
+diff --git a/build/pkgs/debugpy/distros/gentoo.txt b/build/pkgs/debugpy/distros/gentoo.txt
+new file mode 100644
+index 00000000..8b797ce
+--- /dev/null
++++ b/build/pkgs/debugpy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/debugpy
+-- 
+cgit v1.0-1-gd88e
+
+
+From be072fa87ac5c373d9dc9b54c0bd68734d5709bc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:21:17 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for debugpy.
+
+---
+ build/pkgs/debugpy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/debugpy/spkg-configure.m4
+
+diff --git a/build/pkgs/debugpy/spkg-configure.m4 b/build/pkgs/debugpy/spkg-configure.m4
+new file mode 100644
+index 00000000..db605ff
+--- /dev/null
++++ b/build/pkgs/debugpy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([debugpy], [SAGE_PYTHON_PACKAGE_CHECK([debugpy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6f777ce2f2e14b94e91c8b7bbac82f9017460aba Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:23:56 -0400
+Subject: Trac #29665: add Gentoo package information for tzlocal.
+
+---
+ build/pkgs/tzlocal/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tzlocal/distros/gentoo.txt
+
+diff --git a/build/pkgs/tzlocal/distros/gentoo.txt b/build/pkgs/tzlocal/distros/gentoo.txt
+new file mode 100644
+index 00000000..2018442
+--- /dev/null
++++ b/build/pkgs/tzlocal/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/tzlocal
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3bd078fc15ae13982249452711baafae91038191 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:24:51 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for tzlocal.
+
+---
+ build/pkgs/tzlocal/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tzlocal/spkg-configure.m4
+
+diff --git a/build/pkgs/tzlocal/spkg-configure.m4 b/build/pkgs/tzlocal/spkg-configure.m4
+new file mode 100644
+index 00000000..e020b28
+--- /dev/null
++++ b/build/pkgs/tzlocal/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tzlocal], [SAGE_PYTHON_PACKAGE_CHECK([tzlocal])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 91b0882fc62214923da9ee7b6dccb05d8a1d11d1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:26:13 -0400
+Subject: Trac #29665: add Gentoo package information for pycparser.
+
+---
+ build/pkgs/pycparser/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pycparser/distros/gentoo.txt
+
+diff --git a/build/pkgs/pycparser/distros/gentoo.txt b/build/pkgs/pycparser/distros/gentoo.txt
+new file mode 100644
+index 00000000..5e87307
+--- /dev/null
++++ b/build/pkgs/pycparser/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pycparser
+-- 
+cgit v1.0-1-gd88e
+
+
+From beabde92fe6e057faf516fe82d27f1e903e55ce6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:27:27 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pycparser.
+
+---
+ build/pkgs/pycparser/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pycparser/spkg-configure.m4
+
+diff --git a/build/pkgs/pycparser/spkg-configure.m4 b/build/pkgs/pycparser/spkg-configure.m4
+new file mode 100644
+index 00000000..4b9b900
+--- /dev/null
++++ b/build/pkgs/pycparser/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pycparser], [SAGE_PYTHON_PACKAGE_CHECK([pycparser])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 86c2788dc7fd1169314e9598c91fa81045553677 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:29:36 -0400
+Subject: Trac #29665: add Gentoo package information for cycler.
+
+---
+ build/pkgs/cycler/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cycler/distros/gentoo.txt
+
+diff --git a/build/pkgs/cycler/distros/gentoo.txt b/build/pkgs/cycler/distros/gentoo.txt
+new file mode 100644
+index 00000000..4b21543
+--- /dev/null
++++ b/build/pkgs/cycler/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/cycler
+-- 
+cgit v1.0-1-gd88e
+
+
+From 67c5a944101ddf329f0a61c61d4e784f58a5c5b0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:30:27 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for cycler.
+
+---
+ build/pkgs/cycler/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cycler/spkg-configure.m4
+
+diff --git a/build/pkgs/cycler/spkg-configure.m4 b/build/pkgs/cycler/spkg-configure.m4
+new file mode 100644
+index 00000000..239571a
+--- /dev/null
++++ b/build/pkgs/cycler/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([cycler], [SAGE_PYTHON_PACKAGE_CHECK([cycler])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ef6d490251abfa41f7a0910274700a8a6a65f629 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:31:19 -0400
+Subject: Trac #29665: add Gentoo package information for traitlets.
+
+---
+ build/pkgs/traitlets/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/traitlets/distros/gentoo.txt
+
+diff --git a/build/pkgs/traitlets/distros/gentoo.txt b/build/pkgs/traitlets/distros/gentoo.txt
+new file mode 100644
+index 00000000..46bfaab
+--- /dev/null
++++ b/build/pkgs/traitlets/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/traitlets
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1f922b458d34088d9f6773312209e69f19ee45dc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:31:50 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for traitlets.
+
+---
+ build/pkgs/traitlets/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/traitlets/spkg-configure.m4
+
+diff --git a/build/pkgs/traitlets/spkg-configure.m4 b/build/pkgs/traitlets/spkg-configure.m4
+new file mode 100644
+index 00000000..df2382b
+--- /dev/null
++++ b/build/pkgs/traitlets/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([traitlets], [SAGE_PYTHON_PACKAGE_CHECK([traitlets])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 95b89a9ced0acb6d971a27fa63b97ea58a11f4e1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:33:35 -0400
+Subject: Trac #29665: add Gentoo package information for argcomplete.
+
+---
+ build/pkgs/argcomplete/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argcomplete/distros/gentoo.txt
+
+diff --git a/build/pkgs/argcomplete/distros/gentoo.txt b/build/pkgs/argcomplete/distros/gentoo.txt
+new file mode 100644
+index 00000000..b150949
+--- /dev/null
++++ b/build/pkgs/argcomplete/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/argcomplete
+-- 
+cgit v1.0-1-gd88e
+
+
+From b4cd8ef384e6e5bae0de0f3c113fb5f9e6e1a71e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:34:14 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for argcomplete.
+
+---
+ build/pkgs/argcomplete/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argcomplete/spkg-configure.m4
+
+diff --git a/build/pkgs/argcomplete/spkg-configure.m4 b/build/pkgs/argcomplete/spkg-configure.m4
+new file mode 100644
+index 00000000..cbd7ccf
+--- /dev/null
++++ b/build/pkgs/argcomplete/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([argcomplete], [SAGE_PYTHON_PACKAGE_CHECK([argcomplete])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4cc610e8331970cc018d7ea87af928fa73a292c1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:36:21 -0400
+Subject: Trac #29665: add Gentoo package information for ptyprocess.
+
+---
+ build/pkgs/ptyprocess/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ptyprocess/distros/gentoo.txt
+
+diff --git a/build/pkgs/ptyprocess/distros/gentoo.txt b/build/pkgs/ptyprocess/distros/gentoo.txt
+new file mode 100644
+index 00000000..571a851
+--- /dev/null
++++ b/build/pkgs/ptyprocess/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ptyprocess
+-- 
+cgit v1.0-1-gd88e
+
+
+From cd15f97221bf5933b07900e4f77cb55401eede26 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:37:02 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ptyprocess.
+
+---
+ build/pkgs/ptyprocess/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ptyprocess/spkg-configure.m4
+
+diff --git a/build/pkgs/ptyprocess/spkg-configure.m4 b/build/pkgs/ptyprocess/spkg-configure.m4
+new file mode 100644
+index 00000000..bfacbae
+--- /dev/null
++++ b/build/pkgs/ptyprocess/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ptyprocess], [SAGE_PYTHON_PACKAGE_CHECK([ptyprocess])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb5f45b15f99e4ba28e1b1f6042a0e8ea17f1dfc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:38:22 -0400
+Subject: Trac #29665: add Gentoo package information for attrs.
+
+---
+ build/pkgs/attrs/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/attrs/distros/gentoo.txt
+
+diff --git a/build/pkgs/attrs/distros/gentoo.txt b/build/pkgs/attrs/distros/gentoo.txt
+new file mode 100644
+index 00000000..3b906fa
+--- /dev/null
++++ b/build/pkgs/attrs/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/attrs
+-- 
+cgit v1.0-1-gd88e
+
+
+From 321707ebf8e9af1e4ac3a5b5b094b4226bb3a7a5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:38:55 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for attrs.
+
+---
+ build/pkgs/attrs/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/attrs/spkg-configure.m4
+
+diff --git a/build/pkgs/attrs/spkg-configure.m4 b/build/pkgs/attrs/spkg-configure.m4
+new file mode 100644
+index 00000000..ba6a9b7
+--- /dev/null
++++ b/build/pkgs/attrs/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([attrs], [SAGE_PYTHON_PACKAGE_CHECK([attrs])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 69a498a4e8854ecdfc2f1a134104983c0dcb9e32 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:40:09 -0400
+Subject: Trac #29665: add Gentoo package information for send2trash.
+
+---
+ build/pkgs/send2trash/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/send2trash/distros/gentoo.txt
+
+diff --git a/build/pkgs/send2trash/distros/gentoo.txt b/build/pkgs/send2trash/distros/gentoo.txt
+new file mode 100644
+index 00000000..a89b179
+--- /dev/null
++++ b/build/pkgs/send2trash/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/send2trash
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9baed17c84e1bdf5abd17c20766e5cd7dddc5b53 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:41:45 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for send2trash.
+
+---
+ build/pkgs/send2trash/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/send2trash/spkg-configure.m4
+
+diff --git a/build/pkgs/send2trash/spkg-configure.m4 b/build/pkgs/send2trash/spkg-configure.m4
+new file mode 100644
+index 00000000..3bbb727
+--- /dev/null
++++ b/build/pkgs/send2trash/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([send2trash], [SAGE_PYTHON_PACKAGE_CHECK([send2trash])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b9b552b2a2aaccaeb7c5b25be0b681f107522d09 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:43:27 -0400
+Subject: Trac #29665: add Gentoo package information for pyrsistent.
+
+---
+ build/pkgs/pyrsistent/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyrsistent/distros/gentoo.txt
+
+diff --git a/build/pkgs/pyrsistent/distros/gentoo.txt b/build/pkgs/pyrsistent/distros/gentoo.txt
+new file mode 100644
+index 00000000..83439ce
+--- /dev/null
++++ b/build/pkgs/pyrsistent/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyrsistent
+-- 
+cgit v1.0-1-gd88e
+
+
+From a17b31fac6104852762f57daa749443147bdf121 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:44:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pyrsistent.
+
+---
+ build/pkgs/pyrsistent/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyrsistent/spkg-configure.m4
+
+diff --git a/build/pkgs/pyrsistent/spkg-configure.m4 b/build/pkgs/pyrsistent/spkg-configure.m4
+new file mode 100644
+index 00000000..f7ca75d
+--- /dev/null
++++ b/build/pkgs/pyrsistent/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pyrsistent], [SAGE_PYTHON_PACKAGE_CHECK([pyrsistent])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 68520decad6d6937918d7a6af65ca5bd476e5d02 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:45:45 -0400
+Subject: Trac #29665: add Gentoo package information for entrypoints.
+
+---
+ build/pkgs/entrypoints/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/entrypoints/distros/gentoo.txt
+
+diff --git a/build/pkgs/entrypoints/distros/gentoo.txt b/build/pkgs/entrypoints/distros/gentoo.txt
+new file mode 100644
+index 00000000..684ddd0
+--- /dev/null
++++ b/build/pkgs/entrypoints/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/entrypoints
+-- 
+cgit v1.0-1-gd88e
+
+
+From 34213eccb642a6bad64d89acaefa83ee702cb483 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:46:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for entrypoints.
+
+---
+ build/pkgs/entrypoints/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/entrypoints/spkg-configure.m4
+
+diff --git a/build/pkgs/entrypoints/spkg-configure.m4 b/build/pkgs/entrypoints/spkg-configure.m4
+new file mode 100644
+index 00000000..caed658
+--- /dev/null
++++ b/build/pkgs/entrypoints/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([entrypoints], [SAGE_PYTHON_PACKAGE_CHECK([entrypoints])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8e985614345da1a58fcdc127a9c0ddd790f9b5d2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:48:26 -0400
+Subject: Trac #29665: add Gentoo package information for markupsafe.
+
+---
+ build/pkgs/markupsafe/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/markupsafe/distros/gentoo.txt
+
+diff --git a/build/pkgs/markupsafe/distros/gentoo.txt b/build/pkgs/markupsafe/distros/gentoo.txt
+new file mode 100644
+index 00000000..9654e35
+--- /dev/null
++++ b/build/pkgs/markupsafe/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/markupsafe
+-- 
+cgit v1.0-1-gd88e
+
+
+From d370f229ae0988856f2e0d1f6ee2df2c47169106 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:48:55 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for markupsafe.
+
+---
+ build/pkgs/markupsafe/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/markupsafe/spkg-configure.m4
+
+diff --git a/build/pkgs/markupsafe/spkg-configure.m4 b/build/pkgs/markupsafe/spkg-configure.m4
+new file mode 100644
+index 00000000..79eb8db
+--- /dev/null
++++ b/build/pkgs/markupsafe/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([markupsafe], [SAGE_PYTHON_PACKAGE_CHECK([markupsafe])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c49b285ad9e25e6bc81a7e75d461d234fdd3ea68 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:30:49 -0400
+Subject: Trac #29665: add Gentoo package information for flit_core.
+
+---
+ build/pkgs/flit_core/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/flit_core/distros/gentoo.txt
+
+diff --git a/build/pkgs/flit_core/distros/gentoo.txt b/build/pkgs/flit_core/distros/gentoo.txt
+new file mode 100644
+index 00000000..fe6bea9
+--- /dev/null
++++ b/build/pkgs/flit_core/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/flit_core
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b0ce1c4f23cd9fc4316e1eb2b9b4bde394957f3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:32:11 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for flit_core.
+
+---
+ build/pkgs/flit_core/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/flit_core/spkg-configure.m4
+
+diff --git a/build/pkgs/flit_core/spkg-configure.m4 b/build/pkgs/flit_core/spkg-configure.m4
+new file mode 100644
+index 00000000..ee67557
+--- /dev/null
++++ b/build/pkgs/flit_core/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([flit_core], [SAGE_PYTHON_PACKAGE_CHECK([flit_core])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f006c231a81428b1e1e792f889bf974f90e3c831 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:34:06 -0400
+Subject: Trac #29665: add Gentoo package information for nest_asyncio.
+
+---
+ build/pkgs/nest_asyncio/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nest_asyncio/distros/gentoo.txt
+
+diff --git a/build/pkgs/nest_asyncio/distros/gentoo.txt b/build/pkgs/nest_asyncio/distros/gentoo.txt
+new file mode 100644
+index 00000000..ab742d2
+--- /dev/null
++++ b/build/pkgs/nest_asyncio/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nest_asyncio
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4a58d0a96a84475e765a01a64f5f44c48a317e0b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:34:43 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for nest_asyncio.
+
+---
+ build/pkgs/nest_asyncio/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nest_asyncio/spkg-configure.m4
+
+diff --git a/build/pkgs/nest_asyncio/spkg-configure.m4 b/build/pkgs/nest_asyncio/spkg-configure.m4
+new file mode 100644
+index 00000000..4d81527
+--- /dev/null
++++ b/build/pkgs/nest_asyncio/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nest_asyncio], [SAGE_PYTHON_PACKAGE_CHECK([nest_asyncio])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e50af937777ea778908bc09a7a79db3dd80fdf25 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:37:02 -0400
+Subject: Trac #29665: add Gentoo package information for ipython_genutils.
+
+---
+ build/pkgs/ipython_genutils/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython_genutils/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipython_genutils/distros/gentoo.txt b/build/pkgs/ipython_genutils/distros/gentoo.txt
+new file mode 100644
+index 00000000..01bc49d
+--- /dev/null
++++ b/build/pkgs/ipython_genutils/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipython_genutils
+-- 
+cgit v1.0-1-gd88e
+
+
+From ec3c0ce9db2ba13c1a49d1bcfb7a4b249cb7ae83 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:39:20 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipython_genutils.
+
+---
+ build/pkgs/ipython_genutils/spkg-configure.m4 | 4 ++++
+ 1 file changed, 4 insertions(+)
+ create mode 100644 build/pkgs/ipython_genutils/spkg-configure.m4
+
+diff --git a/build/pkgs/ipython_genutils/spkg-configure.m4 b/build/pkgs/ipython_genutils/spkg-configure.m4
+new file mode 100644
+index 00000000..b0ba86a
+--- /dev/null
++++ b/build/pkgs/ipython_genutils/spkg-configure.m4
+@@ -0,0 +1,4 @@
++SAGE_SPKG_CONFIGURE(
++  [ipython_genutils],
++  [SAGE_PYTHON_PACKAGE_CHECK([ipython_genutils])]
++)
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5c9e2e265115e5f10d4b459a475467e30b4bddde Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:40:03 -0400
+Subject: Trac #29665: add Gentoo package information for ipython.
+
+---
+ build/pkgs/ipython/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipython/distros/gentoo.txt b/build/pkgs/ipython/distros/gentoo.txt
+new file mode 100644
+index 00000000..8b76f18
+--- /dev/null
++++ b/build/pkgs/ipython/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipython
+-- 
+cgit v1.0-1-gd88e
+
+
+From 621e707ddd040a902d7dddf0bed1de2b54ab22f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 07:37:56 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipython.
+
+---
+ build/pkgs/ipython/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython/spkg-configure.m4
+
+diff --git a/build/pkgs/ipython/spkg-configure.m4 b/build/pkgs/ipython/spkg-configure.m4
+new file mode 100644
+index 00000000..02ab89f
+--- /dev/null
++++ b/build/pkgs/ipython/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipython], [SAGE_PYTHON_PACKAGE_CHECK([ipython])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20a0613f6d441da436f3e7b8047a72bf490882bd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 07:51:11 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipywidgets.
+
+---
+ build/pkgs/ipywidgets/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipywidgets/spkg-configure.m4
+
+diff --git a/build/pkgs/ipywidgets/spkg-configure.m4 b/build/pkgs/ipywidgets/spkg-configure.m4
+new file mode 100644
+index 00000000..51ca9be
+--- /dev/null
++++ b/build/pkgs/ipywidgets/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipywidgets], [SAGE_PYTHON_PACKAGE_CHECK([ipywidgets])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 76bcd386633acc02a1a3026339d0cbd258ada04e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 10:05:16 -0400
+Subject: Trac #29665: add Gentoo package information for wheel.
+
+---
+ build/pkgs/wheel/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wheel/distros/gentoo.txt
+
+diff --git a/build/pkgs/wheel/distros/gentoo.txt b/build/pkgs/wheel/distros/gentoo.txt
+new file mode 100644
+index 00000000..ec571d5
+--- /dev/null
++++ b/build/pkgs/wheel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 96c2dd2ca7812f5333bb9d45eadb7ac408e364ce Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:51:44 -0500
+Subject: Trac #29665: add Gentoo package information for terminado.
+
+---
+ build/pkgs/terminado/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/terminado/distros/gentoo.txt
+
+diff --git a/build/pkgs/terminado/distros/gentoo.txt b/build/pkgs/terminado/distros/gentoo.txt
+new file mode 100644
+index 00000000..1df16f1
+--- /dev/null
++++ b/build/pkgs/terminado/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/terminado
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0de0f5f3d235a4339b21e37ea13c9f5e59a82e59 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:52:35 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for terminado.
+
+---
+ build/pkgs/terminado/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/terminado/spkg-configure.m4
+
+diff --git a/build/pkgs/terminado/spkg-configure.m4 b/build/pkgs/terminado/spkg-configure.m4
+new file mode 100644
+index 00000000..5defc2f
+--- /dev/null
++++ b/build/pkgs/terminado/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([terminado], [SAGE_PYTHON_PACKAGE_CHECK([terminado])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d14a745c770b02822557e7cee0a98de1cb2f3a12 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:56:15 -0500
+Subject: Trac #29665: add Gentoo package information for cffi.
+
+---
+ build/pkgs/cffi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cffi/distros/gentoo.txt
+
+diff --git a/build/pkgs/cffi/distros/gentoo.txt b/build/pkgs/cffi/distros/gentoo.txt
+new file mode 100644
+index 00000000..81eeb81
+--- /dev/null
++++ b/build/pkgs/cffi/distros/gentoo.txt
+@@ -0,0 +1 @@
++virtual/python-cffi
+-- 
+cgit v1.0-1-gd88e
+
+
+From ce393c04afc69fe050e38f780d4e117164687d80 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:57:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for cffi.
+
+---
+ build/pkgs/cffi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cffi/spkg-configure.m4
+
+diff --git a/build/pkgs/cffi/spkg-configure.m4 b/build/pkgs/cffi/spkg-configure.m4
+new file mode 100644
+index 00000000..dc81875
+--- /dev/null
++++ b/build/pkgs/cffi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([cffi], [SAGE_PYTHON_PACKAGE_CHECK([cffi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 467093315b3fdd57c8caa2f95cf99ad52b0b84fb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:57:57 -0500
+Subject: Trac #29665: add Gentoo package information for pip.
+
+---
+ build/pkgs/pip/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pip/distros/gentoo.txt
+
+diff --git a/build/pkgs/pip/distros/gentoo.txt b/build/pkgs/pip/distros/gentoo.txt
+new file mode 100644
+index 00000000..1845454
+--- /dev/null
++++ b/build/pkgs/pip/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pip[vanilla]
+-- 
+cgit v1.0-1-gd88e
+
+
+From c597fd23f9f68dabbcb7e698d0569c3e6458f6d1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 09:07:26 -0500
+Subject: Trac #29665: new spkg-configure.m4 for pip.
+
+---
+ build/pkgs/pip/spkg-configure.m4 | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+ create mode 100644 build/pkgs/pip/spkg-configure.m4
+
+diff --git a/build/pkgs/pip/spkg-configure.m4 b/build/pkgs/pip/spkg-configure.m4
+new file mode 100644
+index 00000000..c7a5562
+--- /dev/null
++++ b/build/pkgs/pip/spkg-configure.m4
+@@ -0,0 +1,12 @@
++SAGE_SPKG_CONFIGURE([pip], [
++  dnl always run this macro because it changes the default value of
++  dnl the --with-system-<package> option.
++  SAGE_PYTHON_PACKAGE_CHECK([pip])
++
++  dnl if we might not install the spkg, make sure that "pip" is in
++  dnl the user's PATH, too.
++  AS_IF([test "x$sage_spkg_install_pip" != "xyes"], [
++    AC_CHECK_PROG(HAVE_PIP, pip, yes, no)
++    AS_IF([test "x$HAVE_PIP" = "xno"], [sage_spkg_install_pip=yes])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ef8f1e807bc55d7b8321777486fa867a7c135419 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 9 Nov 2021 09:09:04 -0500
+Subject: Trac #29665: set $SAGE_PIP_INSTALL_FLAGS for
+ --enable-system-site-packages.
+
+We need to pass some special flags to "pip install" to make it do the
+right thing in the precence of system-site packages. Here we introduce
+a new autoconf variable, SAGE_PIP_INSTALL_FLAGS, that will be used
+to pass those flags to the build system.
+
+With autoconf aware of the variable, we substitute its value into the
+sage-build-env-config script for use in spkg-install.in.
+---
+ build/bin/sage-build-env-config.in | 1 +
+ configure.ac                       | 9 +++++++++
+ 2 files changed, 10 insertions(+)
+
+diff --git a/build/bin/sage-build-env-config.in b/build/bin/sage-build-env-config.in
+index 92e7dad..ad62e5f 100644
+--- a/build/bin/sage-build-env-config.in
++++ b/build/bin/sage-build-env-config.in
+@@ -53,6 +53,7 @@ export SAGE_PARI_CFG="@SAGE_PARI_CFG@"
+ 
+ export SAGE_GLPK_PREFIX="@SAGE_GLPK_PREFIX@"
+ export SAGE_FREETYPE_PREFIX="@SAGE_FREETYPE_PREFIX@"
++export SAGE_PIP_INSTALL_FLAGS="@SAGE_PIP_INSTALL_FLAGS@"
+ export SAGE_SUITESPARSE_PREFIX="@SAGE_SUITESPARSE_PREFIX@"
+ 
+ export SAGE_CONFIGURE_FFLAS_FFPACK="@SAGE_CONFIGURE_FFLAS_FFPACK@"
+diff --git a/configure.ac b/configure.ac
+index 6fafb83..6ed07ac 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -441,6 +441,14 @@ AC_ARG_ENABLE(
+     [allow the use of python packages from the system (experimental; default: no)]
+   )], [
+   AS_IF([test "x$enable_system_site_packages" = "xyes"], [
++    dnl When installing python SPKGs in the presence of system-site
++    dnl packages, we need to --ignore-installed so that a patched SPKG
++    dnl can be installed in the presence of an unpatched system package
++    dnl that appears (to pip) to be identical. The --no-deps flag is
++    dnl then needed because --ignore-installed will make any installed
++    dnl dependencies invisible to pip, who does not appreciate that.
++    SAGE_PIP_INSTALL_FLAGS="${SAGE_PIP_INSTALL_FLAGS} --no-deps --ignore-installed"
++
+     SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
+ 
+     dnl We want to raise an error if the user asked for "system site
+@@ -453,6 +461,7 @@ AC_ARG_ENABLE(
+     with_system_python3="force"
+   ])
+ ])
++AC_SUBST([SAGE_PIP_INSTALL_FLAGS])
+ AC_SUBST([SAGE_VENV_FLAGS])
+ 
+ SAGE_SPKG_OPTIONS=""
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3cf365fef84e809e74abd2eb388e7a8e9af9d739 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 9 Nov 2021 21:01:58 -0500
+Subject: Trac #29665: pass $SAGE_PIP_INSTALL_FLAGS to sdh_pip_install.
+
+Since sdh_pip_install is usually called from spkg-install.in, the
+variables from sage-build-env-config will be available. Here we pass
+the contents of $SAGE_PIP_INSTALL_FLAGS to sage-pip-install
+unconditionally, and hope that the user ignores this variable unless
+he truly knows what he is doing.
+---
+ build/bin/sage-dist-helpers | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/build/bin/sage-dist-helpers b/build/bin/sage-dist-helpers
+index fe364e5..1032ac3 100644
+--- a/build/bin/sage-dist-helpers
++++ b/build/bin/sage-dist-helpers
+@@ -303,7 +303,11 @@ sdh_store_wheel() {
+ }
+ 
+ sdh_store_and_pip_install_wheel() {
+-    local pip_options=""
++    # The $SAGE_PIP_INSTALL_FLAGS variable is set by sage-build-env-config.
++    # We skip sanity checking its contents since you should either let sage
++    # decide what it contains, or really know what you are doing.
++    local pip_options="${SAGE_PIP_INSTALL_FLAGS}"
++
+     while [ $# -gt 0 ]; do
+         case $1 in
+             -*) pip_options="$pip_options $1"
+-- 
+cgit v1.0-1-gd88e
+
+
+From 50f0438ee857b8f0b7d7ad924e6bba9c5e1bc033 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:10:46 -0500
+Subject: Trac #29665: add Gentoo package information for pexpect.
+
+---
+ build/pkgs/pexpect/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pexpect/distros/gentoo.txt
+
+diff --git a/build/pkgs/pexpect/distros/gentoo.txt b/build/pkgs/pexpect/distros/gentoo.txt
+new file mode 100644
+index 00000000..30c4b60
+--- /dev/null
++++ b/build/pkgs/pexpect/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pexpect
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4d784688d997290b462646fa7f36114a41f3f453 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:11:25 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pexpect.
+
+---
+ build/pkgs/pexpect/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pexpect/spkg-configure.m4
+
+diff --git a/build/pkgs/pexpect/spkg-configure.m4 b/build/pkgs/pexpect/spkg-configure.m4
+new file mode 100644
+index 00000000..6520856
+--- /dev/null
++++ b/build/pkgs/pexpect/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pexpect], [SAGE_PYTHON_PACKAGE_CHECK([pexpect])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6447122dc76a3b7a58340dbed942db66530b5b07 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:12:05 -0500
+Subject: Trac #29665: add Gentoo package information for docutils.
+
+---
+ build/pkgs/docutils/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/docutils/distros/gentoo.txt
+
+diff --git a/build/pkgs/docutils/distros/gentoo.txt b/build/pkgs/docutils/distros/gentoo.txt
+new file mode 100644
+index 00000000..fe4a452
+--- /dev/null
++++ b/build/pkgs/docutils/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/docutils
+-- 
+cgit v1.0-1-gd88e
+
+
+From 709041480a5fc729b0ee7f1a8a3b16d4d65321b5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:12:38 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for docutils.
+
+---
+ build/pkgs/docutils/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/docutils/spkg-configure.m4
+
+diff --git a/build/pkgs/docutils/spkg-configure.m4 b/build/pkgs/docutils/spkg-configure.m4
+new file mode 100644
+index 00000000..3584e45
+--- /dev/null
++++ b/build/pkgs/docutils/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([docutils], [SAGE_PYTHON_PACKAGE_CHECK([docutils])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 782d38b48ab87afccc43fbc071e7b7ed48fb0a20 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:14:37 -0500
+Subject: Trac #29665: add Gentoo package information for nbclient.
+
+---
+ build/pkgs/nbclient/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbclient/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbclient/distros/gentoo.txt b/build/pkgs/nbclient/distros/gentoo.txt
+new file mode 100644
+index 00000000..06ff18d
+--- /dev/null
++++ b/build/pkgs/nbclient/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbclient
+-- 
+cgit v1.0-1-gd88e
+
+
+From 19ce09336532336f69db74381932d51a429dfaca Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:15:11 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for nbclient.
+
+---
+ build/pkgs/nbclient/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbclient/spkg-configure.m4
+
+diff --git a/build/pkgs/nbclient/spkg-configure.m4 b/build/pkgs/nbclient/spkg-configure.m4
+new file mode 100644
+index 00000000..14178b7
+--- /dev/null
++++ b/build/pkgs/nbclient/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbclient], [SAGE_PYTHON_PACKAGE_CHECK([nbclient])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c063b9de42c1780368000a563d0dbe80b6fff169 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:17:36 -0500
+Subject: Trac #29665: add Gentoo package information for argon2_cffi.
+
+---
+ build/pkgs/argon2_cffi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argon2_cffi/distros/gentoo.txt
+
+diff --git a/build/pkgs/argon2_cffi/distros/gentoo.txt b/build/pkgs/argon2_cffi/distros/gentoo.txt
+new file mode 100644
+index 00000000..2f12ca8
+--- /dev/null
++++ b/build/pkgs/argon2_cffi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/argon2-cffi
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0b4d5699dd51ea52550fba7db9e1cbb8bbac1892 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:18:35 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for argon2_cffi.
+
+---
+ build/pkgs/argon2_cffi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argon2_cffi/spkg-configure.m4
+
+diff --git a/build/pkgs/argon2_cffi/spkg-configure.m4 b/build/pkgs/argon2_cffi/spkg-configure.m4
+new file mode 100644
+index 00000000..03ebc63
+--- /dev/null
++++ b/build/pkgs/argon2_cffi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([argon2_cffi], [SAGE_PYTHON_PACKAGE_CHECK([argon2_cffi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2b4119558a6e0b1aa512848539a237676b035c83 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:30:48 -0500
+Subject: Trac #29665: fix package name in dateutil's install-requires.txt.
+
+---
+ build/pkgs/dateutil/install-requires.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/build/pkgs/dateutil/install-requires.txt b/build/pkgs/dateutil/install-requires.txt
+index 0ae93da..face537 100644
+--- a/build/pkgs/dateutil/install-requires.txt
++++ b/build/pkgs/dateutil/install-requires.txt
+@@ -1 +1 @@
+-dateutil >=2.8.1
++python-dateutil >=2.8.1
+-- 
+cgit v1.0-1-gd88e
+
+
+From df371b7c4d20a3353d43940306ad22e11aba29da Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:31:41 -0500
+Subject: Trac #29665: add Gentoo package information for dateutil.
+
+---
+ build/pkgs/dateutil/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/dateutil/distros/gentoo.txt
+
+diff --git a/build/pkgs/dateutil/distros/gentoo.txt b/build/pkgs/dateutil/distros/gentoo.txt
+new file mode 100644
+index 00000000..e129df7
+--- /dev/null
++++ b/build/pkgs/dateutil/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/python-dateutil
+-- 
+cgit v1.0-1-gd88e
+
+
+From 577695dfdf661ee26c0ffd767bdbf479d95f7fb4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:32:21 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for dateutil.
+
+---
+ build/pkgs/dateutil/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/dateutil/spkg-configure.m4
+
+diff --git a/build/pkgs/dateutil/spkg-configure.m4 b/build/pkgs/dateutil/spkg-configure.m4
+new file mode 100644
+index 00000000..fdcd127
+--- /dev/null
++++ b/build/pkgs/dateutil/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([dateutil], [SAGE_PYTHON_PACKAGE_CHECK([dateutil])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1984651caac624ec4bb58814ca1d57fe66f9881a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:33:51 -0500
+Subject: Trac #29665: add Gentoo package information for setuptools_scm.
+
+---
+ build/pkgs/setuptools_scm/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/setuptools_scm/distros/gentoo.txt
+
+diff --git a/build/pkgs/setuptools_scm/distros/gentoo.txt b/build/pkgs/setuptools_scm/distros/gentoo.txt
+new file mode 100644
+index 00000000..8989597
+--- /dev/null
++++ b/build/pkgs/setuptools_scm/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/setuptools_scm
+-- 
+cgit v1.0-1-gd88e
+
+
+From ebf7c854ed966e7353759be485c4f5a57b9a10fa Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:34:49 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for setuptools_scm.
+
+---
+ build/pkgs/setuptools_scm/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/setuptools_scm/spkg-configure.m4
+
+diff --git a/build/pkgs/setuptools_scm/spkg-configure.m4 b/build/pkgs/setuptools_scm/spkg-configure.m4
+new file mode 100644
+index 00000000..437148c
+--- /dev/null
++++ b/build/pkgs/setuptools_scm/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([setuptools_scm], [
++  SAGE_PYTHON_PACKAGE_CHECK([setuptools_scm])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0dee0d0c28f31b1f619e44c710a3c9e22d2b2544 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:36:33 -0500
+Subject: Trac #29665: add Gentoo package information for nbconvert.
+
+---
+ build/pkgs/nbconvert/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbconvert/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbconvert/distros/gentoo.txt b/build/pkgs/nbconvert/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c45a10
+--- /dev/null
++++ b/build/pkgs/nbconvert/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbconvert
+-- 
+cgit v1.0-1-gd88e
+
+
+From 473789eb11b1838bc32dc8a63509ee199afc8912 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:37:37 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for nbconvert.
+
+---
+ build/pkgs/nbconvert/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbconvert/spkg-configure.m4
+
+diff --git a/build/pkgs/nbconvert/spkg-configure.m4 b/build/pkgs/nbconvert/spkg-configure.m4
+new file mode 100644
+index 00000000..9b5dee3
+--- /dev/null
++++ b/build/pkgs/nbconvert/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbconvert], [SAGE_PYTHON_PACKAGE_CHECK([nbconvert])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f0703b594e57c980d605aa9bc8316c45a7858b3b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:41:51 -0500
+Subject: Trac #29665: add Gentoo package information for jupyter_core.
+
+---
+ build/pkgs/jupyter_core/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyter_core/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyter_core/distros/gentoo.txt b/build/pkgs/jupyter_core/distros/gentoo.txt
+new file mode 100644
+index 00000000..f168c5a
+--- /dev/null
++++ b/build/pkgs/jupyter_core/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyter_core
+-- 
+cgit v1.0-1-gd88e
+
+
+From 061a307cc4a6680d8500fde834975064e59540d5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:42:48 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jupyter_core.
+
+---
+ build/pkgs/jupyter_core/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyter_core/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyter_core/spkg-configure.m4 b/build/pkgs/jupyter_core/spkg-configure.m4
+new file mode 100644
+index 00000000..67df9c3
+--- /dev/null
++++ b/build/pkgs/jupyter_core/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyter_core], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyter_core])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b85abe964ce0b98b5842efe9cbad9bdb1c89202f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:47:08 -0500
+Subject: Trac #29665: add Gentoo package information for jupyter_client.
+
+---
+ build/pkgs/jupyter_client/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyter_client/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyter_client/distros/gentoo.txt b/build/pkgs/jupyter_client/distros/gentoo.txt
+new file mode 100644
+index 00000000..4f1de88
+--- /dev/null
++++ b/build/pkgs/jupyter_client/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyter_client
+-- 
+cgit v1.0-1-gd88e
+
+
+From 86323ff1e0b2507933df6bc2a96c9175957640c5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:48:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jupyter_client.
+
+---
+ build/pkgs/jupyter_client/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyter_client/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyter_client/spkg-configure.m4 b/build/pkgs/jupyter_client/spkg-configure.m4
+new file mode 100644
+index 00000000..fbd3498
+--- /dev/null
++++ b/build/pkgs/jupyter_client/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyter_client], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyter_client])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a8475e27dd30d752d05ab6fea6579e8623501d82 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:48:58 -0500
+Subject: Trac #29665: add Gentoo package information for snowballstemmer.
+
+---
+ build/pkgs/snowballstemmer/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/snowballstemmer/distros/gentoo.txt
+
+diff --git a/build/pkgs/snowballstemmer/distros/gentoo.txt b/build/pkgs/snowballstemmer/distros/gentoo.txt
+new file mode 100644
+index 00000000..63fd851
+--- /dev/null
++++ b/build/pkgs/snowballstemmer/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/snowballstemmer
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0833c9b781062b4ed86d619e050a6f5d60e36080 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:49:38 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for snowballstemmer.
+
+---
+ build/pkgs/snowballstemmer/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/snowballstemmer/spkg-configure.m4
+
+diff --git a/build/pkgs/snowballstemmer/spkg-configure.m4 b/build/pkgs/snowballstemmer/spkg-configure.m4
+new file mode 100644
+index 00000000..6aa0882
+--- /dev/null
++++ b/build/pkgs/snowballstemmer/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([snowballstemmer], [
++  SAGE_PYTHON_PACKAGE_CHECK([snowballstemmer])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 50a1cf2a2bcd7eeec64cbc3f70e3e9fbe5d850fe Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:50:47 -0500
+Subject: Trac #29665: add Gentoo package information for tornado.
+
+---
+ build/pkgs/tornado/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tornado/distros/gentoo.txt
+
+diff --git a/build/pkgs/tornado/distros/gentoo.txt b/build/pkgs/tornado/distros/gentoo.txt
+new file mode 100644
+index 00000000..6ae4b9f
+--- /dev/null
++++ b/build/pkgs/tornado/distros/gentoo.txt
+@@ -0,0 +1 @@
++www-servers/tornado
+-- 
+cgit v1.0-1-gd88e
+
+
+From 118f4da6e03476c726363e8e22ecda32f13bfc33 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:51:26 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for tornado.
+
+---
+ build/pkgs/tornado/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tornado/spkg-configure.m4
+
+diff --git a/build/pkgs/tornado/spkg-configure.m4 b/build/pkgs/tornado/spkg-configure.m4
+new file mode 100644
+index 00000000..1ee5bc9
+--- /dev/null
++++ b/build/pkgs/tornado/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tornado], [SAGE_PYTHON_PACKAGE_CHECK([tornado])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3850701747a6c8ef60840bdfdb589b28d4cd2b9a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:52:21 -0500
+Subject: Trac #29665: add Gentoo package information for jsonschema.
+
+---
+ build/pkgs/jsonschema/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jsonschema/distros/gentoo.txt
+
+diff --git a/build/pkgs/jsonschema/distros/gentoo.txt b/build/pkgs/jsonschema/distros/gentoo.txt
+new file mode 100644
+index 00000000..d708e4c
+--- /dev/null
++++ b/build/pkgs/jsonschema/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jsonschema
+-- 
+cgit v1.0-1-gd88e
+
+
+From 76e3917c8af781af00f642cfada7a79594429e30 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:54:03 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jsonschema.
+
+---
+ build/pkgs/jsonschema/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jsonschema/spkg-configure.m4
+
+diff --git a/build/pkgs/jsonschema/spkg-configure.m4 b/build/pkgs/jsonschema/spkg-configure.m4
+new file mode 100644
+index 00000000..b9e5e21
+--- /dev/null
++++ b/build/pkgs/jsonschema/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jsonschema], [SAGE_PYTHON_PACKAGE_CHECK([jsonschema])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From fd4a16c11669b6dd73ac6325bca820e76db00402 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:55:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ widgetsnbextension.
+
+---
+ build/pkgs/widgetsnbextension/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/widgetsnbextension/spkg-configure.m4
+
+diff --git a/build/pkgs/widgetsnbextension/spkg-configure.m4 b/build/pkgs/widgetsnbextension/spkg-configure.m4
+new file mode 100644
+index 00000000..bf82daf
+--- /dev/null
++++ b/build/pkgs/widgetsnbextension/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([widgetsnbextension], [
++  SAGE_PYTHON_PACKAGE_CHECK([widgetsnbextension])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8079a9f384e3c8480e157dd98c3db2f43c987f4e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:57:20 -0500
+Subject: Trac #29665: add Gentoo package information for importlib_resources.
+
+---
+ build/pkgs/importlib_resources/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/importlib_resources/distros/gentoo.txt
+
+diff --git a/build/pkgs/importlib_resources/distros/gentoo.txt b/build/pkgs/importlib_resources/distros/gentoo.txt
+new file mode 100644
+index 00000000..d5e1f2c
+--- /dev/null
++++ b/build/pkgs/importlib_resources/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/importlib_resources
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2c430d7c52f02779a6c41b98ac2f4edd8b6759c3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:58:00 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ importlib_resources.
+
+---
+ build/pkgs/importlib_resources/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/importlib_resources/spkg-configure.m4
+
+diff --git a/build/pkgs/importlib_resources/spkg-configure.m4 b/build/pkgs/importlib_resources/spkg-configure.m4
+new file mode 100644
+index 00000000..50df55b
+--- /dev/null
++++ b/build/pkgs/importlib_resources/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([importlib_resources], [
++  SAGE_PYTHON_PACKAGE_CHECK([importlib_resources])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 00d13d7bf2e50aae2ccef3b2b30293c70a922af2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:58:38 -0500
+Subject: Trac #29665: add Gentoo package information for kiwisolver.
+
+---
+ build/pkgs/kiwisolver/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/kiwisolver/distros/gentoo.txt
+
+diff --git a/build/pkgs/kiwisolver/distros/gentoo.txt b/build/pkgs/kiwisolver/distros/gentoo.txt
+new file mode 100644
+index 00000000..7b30c95
+--- /dev/null
++++ b/build/pkgs/kiwisolver/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/kiwisolver
+-- 
+cgit v1.0-1-gd88e
+
+
+From 72b7907ef7ea9fa4ff6948ea34cfe2f693ee6c31 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:59:09 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for kiwisolver.
+
+---
+ build/pkgs/kiwisolver/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/kiwisolver/spkg-configure.m4
+
+diff --git a/build/pkgs/kiwisolver/spkg-configure.m4 b/build/pkgs/kiwisolver/spkg-configure.m4
+new file mode 100644
+index 00000000..4e7ac97
+--- /dev/null
++++ b/build/pkgs/kiwisolver/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([kiwisolver], [SAGE_PYTHON_PACKAGE_CHECK([kiwisolver])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 479351279e4e0ea7e2d146434f0daba038765cfd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:00:04 -0500
+Subject: Trac #29665: add Gentoo package information for notebook.
+
+---
+ build/pkgs/notebook/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/notebook/distros/gentoo.txt
+
+diff --git a/build/pkgs/notebook/distros/gentoo.txt b/build/pkgs/notebook/distros/gentoo.txt
+new file mode 100644
+index 00000000..6475d72
+--- /dev/null
++++ b/build/pkgs/notebook/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/notebook
+-- 
+cgit v1.0-1-gd88e
+
+
+From f4d9242ea654977f8ad7865c82eec593e11a36bc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:01:42 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for notebook.
+
+---
+ build/pkgs/notebook/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/notebook/spkg-configure.m4
+
+diff --git a/build/pkgs/notebook/spkg-configure.m4 b/build/pkgs/notebook/spkg-configure.m4
+new file mode 100644
+index 00000000..a17ba95
+--- /dev/null
++++ b/build/pkgs/notebook/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([notebook], [SAGE_PYTHON_PACKAGE_CHECK([notebook])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9837070c7f8e9a71283b84d49d4fd2c94b78a464 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:02:38 -0500
+Subject: Trac #29665: add Gentoo package information for matplotlib_inline.
+
+---
+ build/pkgs/matplotlib_inline/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/matplotlib_inline/distros/gentoo.txt
+
+diff --git a/build/pkgs/matplotlib_inline/distros/gentoo.txt b/build/pkgs/matplotlib_inline/distros/gentoo.txt
+new file mode 100644
+index 00000000..6a5859c
+--- /dev/null
++++ b/build/pkgs/matplotlib_inline/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/matplotlib-inline
+-- 
+cgit v1.0-1-gd88e
+
+
+From 750be73b25b92b4875e47d044360ac0e1116ec3e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:03:28 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for matplotlib_inline.
+
+---
+ build/pkgs/matplotlib_inline/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/matplotlib_inline/spkg-configure.m4
+
+diff --git a/build/pkgs/matplotlib_inline/spkg-configure.m4 b/build/pkgs/matplotlib_inline/spkg-configure.m4
+new file mode 100644
+index 00000000..e59658f
+--- /dev/null
++++ b/build/pkgs/matplotlib_inline/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([matplotlib_inline], [
++  SAGE_PYTHON_PACKAGE_CHECK([matplotlib_inline])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 273505f49698dcd2ab30c2756b07113c9b7e7791 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:04:10 -0500
+Subject: Trac #29665: add Gentoo package information for ipykernel.
+
+---
+ build/pkgs/ipykernel/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipykernel/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipykernel/distros/gentoo.txt b/build/pkgs/ipykernel/distros/gentoo.txt
+new file mode 100644
+index 00000000..88aab61
+--- /dev/null
++++ b/build/pkgs/ipykernel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipykernel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 629ad36c9e4ae0cdff4a013289b4f2911442445e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:04:46 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for ipykernel.
+
+---
+ build/pkgs/ipykernel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipykernel/spkg-configure.m4
+
+diff --git a/build/pkgs/ipykernel/spkg-configure.m4 b/build/pkgs/ipykernel/spkg-configure.m4
+new file mode 100644
+index 00000000..94ecc2d
+--- /dev/null
++++ b/build/pkgs/ipykernel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipykernel], [SAGE_PYTHON_PACKAGE_CHECK([ipykernel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b8d709edb6a24fd5868ee2818b56e78257b2eafa Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:05:26 -0500
+Subject: Trac #29665: add Gentoo package information for prompt_toolkit.
+
+---
+ build/pkgs/prompt_toolkit/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/prompt_toolkit/distros/gentoo.txt
+
+diff --git a/build/pkgs/prompt_toolkit/distros/gentoo.txt b/build/pkgs/prompt_toolkit/distros/gentoo.txt
+new file mode 100644
+index 00000000..6902484
+--- /dev/null
++++ b/build/pkgs/prompt_toolkit/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/prompt_toolkit
+-- 
+cgit v1.0-1-gd88e
+
+
+From 16c0b5e767ae4dac4440510b7253e5c8642b7d2c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:10:39 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for prompt_toolkit.
+
+---
+ build/pkgs/prompt_toolkit/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/prompt_toolkit/spkg-configure.m4
+
+diff --git a/build/pkgs/prompt_toolkit/spkg-configure.m4 b/build/pkgs/prompt_toolkit/spkg-configure.m4
+new file mode 100644
+index 00000000..fd8c1a6
+--- /dev/null
++++ b/build/pkgs/prompt_toolkit/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([prompt_toolkit], [
++  SAGE_PYTHON_PACKAGE_CHECK([prompt_toolkit])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0cd9283e8bb6c8ae413fc8f715c021f7ec3ca2c8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:12:10 -0500
+Subject: Trac #29665: add Gentoo package information for charset_normalizer.
+
+---
+ build/pkgs/charset_normalizer/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/charset_normalizer/distros/gentoo.txt
+
+diff --git a/build/pkgs/charset_normalizer/distros/gentoo.txt b/build/pkgs/charset_normalizer/distros/gentoo.txt
+new file mode 100644
+index 00000000..eefeb89
+--- /dev/null
++++ b/build/pkgs/charset_normalizer/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/charset_normalizer
+-- 
+cgit v1.0-1-gd88e
+
+
+From a04b01a9ab59097d189edcc5ddcb461faede83b2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:12:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ charset_normalizer.
+
+---
+ build/pkgs/charset_normalizer/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/charset_normalizer/spkg-configure.m4
+
+diff --git a/build/pkgs/charset_normalizer/spkg-configure.m4 b/build/pkgs/charset_normalizer/spkg-configure.m4
+new file mode 100644
+index 00000000..18b18cf
+--- /dev/null
++++ b/build/pkgs/charset_normalizer/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([charset_normalizer], [
++  SAGE_PYTHON_PACKAGE_CHECK([charset_normalizer])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d2ea08138711c53046f977b586f33b09b176b2e3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:13:37 -0500
+Subject: Trac #29665: add Gentoo package information for prometheus_client.
+
+---
+ build/pkgs/prometheus_client/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/prometheus_client/distros/gentoo.txt
+
+diff --git a/build/pkgs/prometheus_client/distros/gentoo.txt b/build/pkgs/prometheus_client/distros/gentoo.txt
+new file mode 100644
+index 00000000..aa2889c
+--- /dev/null
++++ b/build/pkgs/prometheus_client/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/prometheus_client
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b0393200e9edd3e26b8a55ba67e5710e7403fcb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:15:09 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for prometheus_client.
+
+---
+ build/pkgs/prometheus_client/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/prometheus_client/spkg-configure.m4
+
+diff --git a/build/pkgs/prometheus_client/spkg-configure.m4 b/build/pkgs/prometheus_client/spkg-configure.m4
+new file mode 100644
+index 00000000..b494588
+--- /dev/null
++++ b/build/pkgs/prometheus_client/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([prometheus_client], [
++  SAGE_PYTHON_PACKAGE_CHECK([prometheus_client])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From cdcd85284f43ca4ad18353ec3527b2901e57b788 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:17:23 -0500
+Subject: Trac #29665: add Gentoo package information for pybind11.
+
+---
+ build/pkgs/pybind11/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pybind11/distros/gentoo.txt
+
+diff --git a/build/pkgs/pybind11/distros/gentoo.txt b/build/pkgs/pybind11/distros/gentoo.txt
+new file mode 100644
+index 00000000..0c500b3
+--- /dev/null
++++ b/build/pkgs/pybind11/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pybind11
+-- 
+cgit v1.0-1-gd88e
+
+
+From efdd1eb64c4799fe3cdf2221824182941b3fda2d Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:17:51 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pybind11.
+
+---
+ build/pkgs/pybind11/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pybind11/spkg-configure.m4
+
+diff --git a/build/pkgs/pybind11/spkg-configure.m4 b/build/pkgs/pybind11/spkg-configure.m4
+new file mode 100644
+index 00000000..cce1cf5
+--- /dev/null
++++ b/build/pkgs/pybind11/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pybind11], [SAGE_PYTHON_PACKAGE_CHECK([pybind11])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b2128f33b68ea33927284116ea598dd186902400 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:19:23 -0500
+Subject: Trac #29665: add Gentoo package information for pkgconfig.
+
+---
+ build/pkgs/pkgconfig/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pkgconfig/distros/gentoo.txt
+
+diff --git a/build/pkgs/pkgconfig/distros/gentoo.txt b/build/pkgs/pkgconfig/distros/gentoo.txt
+new file mode 100644
+index 00000000..32e8618
+--- /dev/null
++++ b/build/pkgs/pkgconfig/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pkgconfig
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b373b49e06aadeb36dc57e500da9a322460e658 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:19:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pkgconfig.
+
+---
+ build/pkgs/pkgconfig/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pkgconfig/spkg-configure.m4
+
+diff --git a/build/pkgs/pkgconfig/spkg-configure.m4 b/build/pkgs/pkgconfig/spkg-configure.m4
+new file mode 100644
+index 00000000..6708293
+--- /dev/null
++++ b/build/pkgs/pkgconfig/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pkgconfig], [SAGE_PYTHON_PACKAGE_CHECK([pkgconfig])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ce578729eb0d14baab365351ba9a9ffffb7b79f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:21:10 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_serializinghtml.
+
+---
+ build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt b/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+new file mode 100644
+index 00000000..38bca8f
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-serializinghtml
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb0f42c32bbce0e4488678312f5e2d88c6f42c9b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:21:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_serializinghtml.
+
+---
+ build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4 b/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+new file mode 100644
+index 00000000..be8e625
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_serializinghtml], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_serializinghtml])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e47dcf985e40475de85c9436a85537751318bc3d Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:22:54 -0500
+Subject: Trac #29665: add Gentoo package information for sphinxcontrib_jsmath.
+
+---
+ build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt b/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+new file mode 100644
+index 00000000..041a471
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-jsmath
+-- 
+cgit v1.0-1-gd88e
+
+
+From 72cff6fd35f93de4fa855bc870569dd733ff5c24 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:23:49 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_jsmath.
+
+---
+ build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4 b/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+new file mode 100644
+index 00000000..e46bde2
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_jsmath], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_jsmath])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a36395d70f759449cd63c1b0990fbdcb4cb25ca0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:24:26 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_devhelp.
+
+---
+ build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..9b5c899
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-devhelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9953a5dd1646ed0ad51d2e3935cf609bc9e7fd1c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:25:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_devhelp.
+
+---
+ build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+new file mode 100644
+index 00000000..8728136
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_devhelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_devhelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b199d5363aad93f3cb23f7904c9553a28b06348f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:25:53 -0500
+Subject: Trac #29665: add Gentoo package information for sphinxcontrib_qthelp.
+
+---
+ build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..7210099
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-qthelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 94ac8806739f3938e73f5857328e91e0d42e98d2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:26:28 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_qthelp.
+
+---
+ build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+new file mode 100644
+index 00000000..81ea5e1
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_qthelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_qthelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From beedc154aa405e8a58aee8889f510db07adc89a7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:26:54 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_applehelp.
+
+---
+ build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..66ac8da
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-applehelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 07d47c3673d6b35423b71f621cb400989c0101c2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:27:19 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_applehelp.
+
+---
+ build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+new file mode 100644
+index 00000000..e834aed
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_applehelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_applehelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 333a66546c5d421735c49dbafd7370a827f22781 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:27:46 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_htmlhelp.
+
+---
+ build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..e080bac
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-htmlhelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From bfaeb3962254439b63f1f2e0e883de462c7831be Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:29:18 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_htmlhelp.
+
+---
+ build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+new file mode 100644
+index 00000000..c77b003
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_htmlhelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_htmlhelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 782cde13da06e8b85806cb7cbc8aceee0364e639 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:30:23 -0500
+Subject: Trac #29665: add Gentoo package information for jupyterlab_pygments.
+
+---
+ build/pkgs/jupyterlab_pygments/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyterlab_pygments/distros/gentoo.txt b/build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+new file mode 100644
+index 00000000..c57b4f1
+--- /dev/null
++++ b/build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyterlab_pygments
+-- 
+cgit v1.0-1-gd88e
+
+
+From 39f974cfa4a8c6e5dd897f152f83ec82f40ee9f7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:31:13 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ jupyterlab_pygments.
+
+---
+ build/pkgs/jupyterlab_pygments/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyterlab_pygments/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyterlab_pygments/spkg-configure.m4 b/build/pkgs/jupyterlab_pygments/spkg-configure.m4
+new file mode 100644
+index 00000000..e46e21f
+--- /dev/null
++++ b/build/pkgs/jupyterlab_pygments/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyterlab_pygments], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyterlab_pygments])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From db704620700fd36cec3bf6125938f3ee00a9eb5e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:29:15 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for ply.
+
+---
+ build/pkgs/ply/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ply/spkg-configure.m4
+
+diff --git a/build/pkgs/ply/spkg-configure.m4 b/build/pkgs/ply/spkg-configure.m4
+new file mode 100644
+index 00000000..ffb0030
+--- /dev/null
++++ b/build/pkgs/ply/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ply], [SAGE_PYTHON_PACKAGE_CHECK([ply])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6aac31dabcdfdef228d7780398a3fda1a4cc566f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:29:51 -0500
+Subject: Trac #29665: add Gentoo package information for ply.
+
+---
+ build/pkgs/ply/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ply/distros/gentoo.txt
+
+diff --git a/build/pkgs/ply/distros/gentoo.txt b/build/pkgs/ply/distros/gentoo.txt
+new file mode 100644
+index 00000000..c8b1630
+--- /dev/null
++++ b/build/pkgs/ply/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ply
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb8d3372936ec37470d69687a0f91592129460ae Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:30:33 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for gast.
+
+---
+ build/pkgs/gast/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/gast/spkg-configure.m4
+
+diff --git a/build/pkgs/gast/spkg-configure.m4 b/build/pkgs/gast/spkg-configure.m4
+new file mode 100644
+index 00000000..26ec59f
+--- /dev/null
++++ b/build/pkgs/gast/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([gast], [SAGE_PYTHON_PACKAGE_CHECK([gast])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1cdc4046a88f1c2b4e5c162f66c6db6090b24194 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:31:15 -0500
+Subject: Trac #29665: add Gentoo package information for gast.
+
+---
+ build/pkgs/gast/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/gast/distros/gentoo.txt
+
+diff --git a/build/pkgs/gast/distros/gentoo.txt b/build/pkgs/gast/distros/gentoo.txt
+new file mode 100644
+index 00000000..3be5e7e
+--- /dev/null
++++ b/build/pkgs/gast/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/gast
+-- 
+cgit v1.0-1-gd88e
+
+
+From 96068b8a3742b65d619190e1d9fa5db399e6b4f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:32:20 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pythran.
+
+---
+ build/pkgs/pythran/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pythran/spkg-configure.m4
+
+diff --git a/build/pkgs/pythran/spkg-configure.m4 b/build/pkgs/pythran/spkg-configure.m4
+new file mode 100644
+index 00000000..592e95b
+--- /dev/null
++++ b/build/pkgs/pythran/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pythran], [SAGE_PYTHON_PACKAGE_CHECK([pythran])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1fa0fad3ae8f7e559c6fc315c6773a7d8aac0bfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:32:55 -0500
+Subject: Trac #29665: add Gentoo package information for pythran.
+
+---
+ build/pkgs/pythran/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pythran/distros/gentoo.txt
+
+diff --git a/build/pkgs/pythran/distros/gentoo.txt b/build/pkgs/pythran/distros/gentoo.txt
+new file mode 100644
+index 00000000..1bb7cdc
+--- /dev/null
++++ b/build/pkgs/pythran/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pythran
+-- 
+cgit v1.0-1-gd88e
+
+
+From d26370e5b8c88e76abfb7c27e3defb71c9e9f711 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:33:50 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for beniget.
+
+---
+ build/pkgs/beniget/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/beniget/spkg-configure.m4
+
+diff --git a/build/pkgs/beniget/spkg-configure.m4 b/build/pkgs/beniget/spkg-configure.m4
+new file mode 100644
+index 00000000..8ae6101
+--- /dev/null
++++ b/build/pkgs/beniget/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([beniget], [SAGE_PYTHON_PACKAGE_CHECK([beniget])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From eeeb296ed9b9694a865534103fd58e62a151ef5e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:34:22 -0500
+Subject: Trac #29665: add Gentoo package information for beniget.
+
+---
+ build/pkgs/beniget/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/beniget/distros/gentoo.txt
+
+diff --git a/build/pkgs/beniget/distros/gentoo.txt b/build/pkgs/beniget/distros/gentoo.txt
+new file mode 100644
+index 00000000..1a5972c
+--- /dev/null
++++ b/build/pkgs/beniget/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/beniget
+-- 
+cgit v1.0-1-gd88e
+
+
+From 078b2ff272d0eeff5cce40ad7eb176d9ddd7bdff Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:35:37 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for alabaster.
+
+---
+ build/pkgs/alabaster/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/alabaster/spkg-configure.m4
+
+diff --git a/build/pkgs/alabaster/spkg-configure.m4 b/build/pkgs/alabaster/spkg-configure.m4
+new file mode 100644
+index 00000000..4eca6e0
+--- /dev/null
++++ b/build/pkgs/alabaster/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([alabaster], [SAGE_PYTHON_PACKAGE_CHECK([alabaster])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7dc264353e5f64110431ff28c1b8b7e89699e9bd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:36:06 -0500
+Subject: Trac #29665: add Gentoo package information for alabaster.
+
+---
+ build/pkgs/alabaster/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/alabaster/distros/gentoo.txt
+
+diff --git a/build/pkgs/alabaster/distros/gentoo.txt b/build/pkgs/alabaster/distros/gentoo.txt
+new file mode 100644
+index 00000000..cffece6
+--- /dev/null
++++ b/build/pkgs/alabaster/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/alabaster
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8011a5e675e7e61a77ce34a299ee961a9f44253f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:43:59 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ importlib_metadata.
+
+---
+ build/pkgs/importlib_metadata/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/importlib_metadata/spkg-configure.m4
+
+diff --git a/build/pkgs/importlib_metadata/spkg-configure.m4 b/build/pkgs/importlib_metadata/spkg-configure.m4
+new file mode 100644
+index 00000000..0554e52
+--- /dev/null
++++ b/build/pkgs/importlib_metadata/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([importlib_metadata], [
++  SAGE_PYTHON_PACKAGE_CHECK([importlib_metadata])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 928ca0019e3ec6c4541a16b28bcc6710df6d010b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:44:28 -0500
+Subject: Trac #29665: add Gentoo package information for importlib_metadata.
+
+---
+ build/pkgs/importlib_metadata/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/importlib_metadata/distros/gentoo.txt
+
+diff --git a/build/pkgs/importlib_metadata/distros/gentoo.txt b/build/pkgs/importlib_metadata/distros/gentoo.txt
+new file mode 100644
+index 00000000..4f92786
+--- /dev/null
++++ b/build/pkgs/importlib_metadata/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/importlib_metadata
+-- 
+cgit v1.0-1-gd88e
+
+
+From 135f184f7498a2046065e669723e68efe2d65cee Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 21:16:58 -0500
+Subject: Trac #29665: fix sage.misc.package doctest with system alabaster.
+
+When alabaster from the system is used, these tests won't be able to
+find its SPKG installed. Add some ellipses, and switch one test to
+look for sage_conf instead.
+---
+ src/sage/misc/package.py | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/sage/misc/package.py b/src/sage/misc/package.py
+index 84f3d50..c7ad206 100644
+--- a/src/sage/misc/package.py
++++ b/src/sage/misc/package.py
+@@ -386,9 +386,9 @@ def installed_packages(exclude_pip=True):
+     EXAMPLES::
+ 
+         sage: sorted(installed_packages().keys())  # optional - build
+-        [...'alabaster', ...'sage_conf', ...]
+-        sage: installed_packages()['alabaster']  # optional - build, random
+-        '0.7.12'
++        [...'sage_conf', ...]
++        sage: installed_packages()['sage_conf']  # optional - build, random
++        '9.5'
+ 
+     .. SEEALSO::
+ 
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch b/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
new file mode 100644
index 000000000000..7ef3826aa4d2
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
@@ -0,0 +1,27 @@
+diff --git a/src/bin/sage-runtests b/src/bin/sage-runtests
+index 589dc8cd37..6bb8bf99a4 100755
+--- a/src/bin/sage-runtests
++++ b/src/bin/sage-runtests
+@@ -154,21 +154,4 @@ if __name__ == "__main__":
+     DC = DocTestController(args, args.filenames)
+     err = DC.run()
+ 
+-    try:
+-        exit_code_pytest = 0
+-        import pytest
+-        pytest_options = ["--import-mode", "importlib"]
+-        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.")
+-
+-    if err == 0:
+-        sys.exit(exit_code_pytest)
+-    else:
+-        sys.exit(err)
++    sys.exit(err)
diff --git a/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch b/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
new file mode 100644
index 000000000000..093e3d56eb33
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
@@ -0,0 +1,42 @@
+More site packages not included in trac 29665
+
+diff --git a/build/pkgs/gmpy2/spkg-configure.m4 b/build/pkgs/gmpy2/spkg-configure.m4
+new file mode 100644
+index 0000000000..2d0390f7db
+--- /dev/null
++++ b/build/pkgs/gmpy2/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([gmpy2], [SAGE_PYTHON_PACKAGE_CHECK([gmpy2])])
+diff --git a/build/pkgs/sphinx/spkg-configure.m4 b/build/pkgs/sphinx/spkg-configure.m4
+new file mode 100644
+index 0000000000..e149fbb2cf
+--- /dev/null
++++ b/build/pkgs/sphinx/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([sphinx], [SAGE_PYTHON_PACKAGE_CHECK([sphinx])])
+diff --git a/build/pkgs/typing_extensions/spkg-configure.m4 b/build/pkgs/typing_extensions/spkg-configure.m4
+new file mode 100644
+index 0000000000..d475fd8257
+--- /dev/null
++++ b/build/pkgs/typing_extensions/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([typing_extensions], [SAGE_PYTHON_PACKAGE_CHECK([typing_extensions])])
+-- 
+diff --git a/build/pkgs/gmpy2/install-requires.txt b/build/pkgs/gmpy2/install-requires.txt
+index 51d24518ef..c25feff557 100644
+--- a/build/pkgs/gmpy2/install-requires.txt
++++ b/build/pkgs/gmpy2/install-requires.txt
+@@ -1,3 +1 @@
+-# We would like to write gmpy2 >=2.1.0b5, but pipenv does not accept prereleases in version ranges
+-# https://github.com/pypa/pipenv/issues/1760
+-gmpy2 ==2.1.0rc1
++gmpy2 >=2.1
+diff --git a/build/pkgs/ptyprocess/install-requires.txt b/build/pkgs/ptyprocess/install-requires.txt
+index de89260872..7c336f636c 100644
+--- a/build/pkgs/ptyprocess/install-requires.txt
++++ b/build/pkgs/ptyprocess/install-requires.txt
+@@ -1,3 +1,3 @@
+-ptyprocess ==0.5.1
++ptyprocess
+ # https://trac.sagemath.org/ticket/31280#comment:42 and following
+ # sagelib is not compatible with ptyprocess 0.5.2, 0.6, and 0.7
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 33b40acbabeb..a32c5d18f378 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -22,11 +22,13 @@ distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
 checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
 python_version=3
 
-build_options="debug system_python3"
+build_options="debug system_python3 system_site_packages"
 desc_option_debug="Build with debug symbols"
 desc_option_system_python="Build using system python 3"
-build_options_default="system_python3"
+desc_option_system_python="Build using system python site-packages"
+build_options_default="system_python3 system_site_packages"
 configure_args+=" $(vopt_with system_python3)"
+configure_args+=" $(vopt_enable system_site_packages)"
 
 # path where sage will be installed
 _SAGE_ROOT=/usr/lib/sage-${version}
@@ -163,6 +165,8 @@ do_check() {
 	fi
 	if [ "$XBPS_CHECK_PKGS" = full ]; then
 		_test_args="--long $_test_args"
+	else
+		_test_args="--warn-long 5.0 $_test_args"
 	fi
 	# since make check will build the docs, run test like this instead
 	./sage -tp ${XBPS_MAKEJOBS} ${_test_args}
@@ -182,7 +186,7 @@ makedepends+=" automake gettext gettext-devel"
 # other host dependencies
 makedepends+=" cmake curl git ninja pandoc patch pkg-config python3 tox"
 
-# already in void
+# standard dependencies
 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
@@ -202,7 +206,49 @@ makedepends+="
  brial-devel cliquer-devel gfan libbraiding-devel libhomfly-devel
  lrcalc-devel nauty-devel palp tachyon
  maxima-ecl primesieve-devel primecount-devel
+ ffmpeg ImageMagick
 "
 
 # TODO: optional
 # 4ti2 coxeter3 libsemigroups lrslib pdf2svg perl_mongodb polymake
+
+# TODO: standard
+# cvxopt importlib_resources
+
+# python packages for trac-29665
+_sage_python3_modules="
+ python3-Babel python3-Jinja2 python3-MarkupSafe python3-Pillow
+ python3-Pygments python3-Sphinx python3-alabaster python3-argcomplete
+ python3-argon2 python3-attrs python3-backcall python3-beniget
+ python3-bleach python3-certifi python3-cffi python3-charset-normalizer
+ python3-cycler python3-dateutil python3-decorator python3-defusedxml
+ python3-docutils python3-entrypoints python3-flit_core python3-gast
+ python3-gmpy2 python3-html5lib python3-idna python3-imagesize
+ python3-importlib_metadata python3-ipython python3-ipython_genutils
+ python3-ipython_ipykernel python3-jedi python3-jsonschema
+ python3-jupyter_client python3-jupyter_core python3-jupyter_ipywidgets
+ python3-jupyter_nbconvert python3-jupyter_nbformat
+ python3-jupyter_notebook python3-jupyterlab_pygments python3-kiwisolver
+ python3-matplotlib python3-matplotlib-inline python3-mistune
+ python3-mpmath python3-nbclient python3-nest_asyncio python3-networkx
+ python3-numpy python3-packaging python3-pandocfilters python3-parsing
+ python3-parso python3-pexpect python3-pickleshare python3-pip
+ python3-pkgconfig python3-pluggy python3-ply python3-prometheus_client
+ python3-prompt_toolkit python3-ptyprocess python3-py python3-pybind11
+ python3-pycparser python3-pyrsistent python3-pytz python3-pyzmq
+ python3-requests python3-scipy python3-send2trash python3-setuptools
+ python3-setuptools_scm python3-simplegeneric python3-six
+ python3-snowballstemmer python3-sphinxcontrib-applehelp
+ python3-sphinxcontrib-devhelp python3-sphinxcontrib-htmlhelp
+ python3-sphinxcontrib-jsmath python3-sphinxcontrib-qthelp
+ python3-sphinxcontrib-serializinghtml python3-sympy python3-terminado
+ python3-testpath python3-texttable python3-toml python3-tomli
+ python3-tornado python3-traitlets python3-typing_extensions
+ python3-tzlocal python3-urllib3 python3-wcwidth python3-webencodings
+ python3-wheel python3-zipp pythran
+ "
+
+if [ "$build_option_system_site_packages" ]; then
+	makedepends+=" $_sage_python3_modules"
+	depends+=" $_sage_python3_modules"
+fi

From 899e40ad0d7939e6484df92080922a0723a28ca9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 3 Jan 2022 20:47:52 -0300
Subject: [PATCH 24/60] sagemath: use small source tarball + upstream packages

---
 srcpkgs/sagemath/template | 97 ++++++++++++++++++++++++++-------------
 1 file changed, 64 insertions(+), 33 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index a32c5d18f378..0de0061b09df 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -18,8 +18,8 @@ short_desc="Open source mathematics software"
 maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
-distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
-checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
+distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
+checksum=aea4c5a8d3b32af2fba644269b9daf4f62471471ba2d7d83da0f8098a5f53225
 python_version=3
 
 build_options="debug system_python3 system_site_packages"
@@ -33,42 +33,72 @@ configure_args+=" $(vopt_enable system_site_packages)"
 # 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} ;;
-esac
+_SAGE_UPSTREAM_MIRROR=https://mirrors.mit.edu/sage/spkg/upstream
 
-# extra upstream packages (trac-32968 / trac-33040)
 _upstream="
- https://pypi.io/packages/source/s/sphinx/Sphinx-4.3.1.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
+${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
+${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
+${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
+${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
+${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
+${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
+${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
+https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
+https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
+http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
+${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
+${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
+${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
+${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
+${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
+https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
+${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
+https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
+${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
 "
 
 checksum+="
- 32a5b3e9a1b176cc25ed048557d4d3d01af635e6b76c5bc7a43b0a34447fbd45
-
- 9c87405839a19696e837b3b818fed3f5f69f16f1eec1a1ad77e043dcea9c772f
- fc4453705b81d03568d5b808ad8f09c77c47534f6ac2e72e733f9ca4714aa75c
- acad2d8b20a1af07d4e4c9d2e9285c5ed9104354062f275f3fcd88dcef4f1326
- 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
- 78884e7c1d4b00ce3cea67b44566851c4343c120abd683433ce934a68ea58872
- 0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86
- b8e2f83c56e141920c39464b852de3719dfbfb6e3c99a2d8da0edf4fb33176ed
- d9bdec0013ef1eb5a84ab39a3b3868911598afa494f5faa038647101504e2b81
- b2e9810e09c3a47b73ce9cab5a72243a1258f61e7900969097a817232246ce1c
- 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
- 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
+c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
+d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
+4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
+3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
+03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
+5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
+cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
+5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
+581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
+6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
+07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
+a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
+ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
+d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
+169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
+5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
+cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
+471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
+78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
+edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
+b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
+3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
+545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
+cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
+718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
+dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
 "
 
 for u in ${_upstream}; do
@@ -101,6 +131,7 @@ post_extract() {
 	mv -T $wrksrc $_SAGE_ROOT
 	ln -srfT $_SAGE_ROOT $wrksrc
 
+	mkdir -p $wrksrc/upstream
 	for u in ${_upstream}; do
 		cp "$XBPS_SRCDISTDIR/${pkgname}-${version}/${u##*[/>]}" $wrksrc/upstream
 	done

From e11081a34f37e456ad308a05b3da376070de8b16 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 13:38:02 -0300
Subject: [PATCH 25/60] sagemath: for CI use fixed random-seed=0

---
 srcpkgs/sagemath/template | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 0de0061b09df..b5b99d2c122d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -194,6 +194,10 @@ do_check() {
 	if [ -z "$_test_args" ]; then
 		_test_args=--all
 	fi
+	if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
+		# for CI use a predictable random seed
+		_test_args="--random-seed=0 $_test_args"
+	fi
 	if [ "$XBPS_CHECK_PKGS" = full ]; then
 		_test_args="--long $_test_args"
 	else

From 6b1a8633a396d7bef03753d3d232095a62e2982b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 14:40:27 -0300
Subject: [PATCH 26/60] sagemath: upstream two patches

---
 ...ble-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch} |  6 +++---
 ...rse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch} | 10 +++++-----
 2 files changed, 8 insertions(+), 8 deletions(-)
 rename srcpkgs/sagemath/patches/{0001-sage-site-exec-only-if-it-is-executable.patch => trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch} (94%)
 rename srcpkgs/sagemath/patches/{0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch => trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch} (81%)

diff --git a/srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch b/srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
similarity index 94%
rename from srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch
rename to srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
index ce17c6d6e954..7fdb3d697222 100644
--- a/srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch
+++ b/srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
@@ -1,14 +1,14 @@
 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
+Subject: 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
+index 4c0fa17..153e610 100755
 --- a/src/bin/sage
 +++ b/src/bin/sage
 @@ -129,7 +129,7 @@ usage() {
@@ -39,5 +39,5 @@ index 4c0fa17426..153e610a2e 100755
              # fallthrough if there is no sage-site script
          fi
 -- 
-2.34.1
+cgit v1.0-1-gd88e
 
diff --git a/srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch b/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
similarity index 81%
rename from srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch
rename to srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
index bab6d8441d42..350c41ac3928 100644
--- a/srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch
+++ b/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
@@ -1,16 +1,16 @@
-From 57e3eba28c9b4ee6bd3407d0715b8bd00aaf04a7 Mon Sep 17 00:00:00 2001
+From 53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6 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
+Subject: sagetex: Fix a warning when byte-compiling sagetexparse.py
 
 ---
- .../sagetex/patches/sagetex-fix-warning.patch    | 16 ++++++++++++++++
+ build/pkgs/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
+index 00000000..d82ab67
 --- /dev/null
 +++ b/build/pkgs/sagetex/patches/sagetex-fix-warning.patch
 @@ -0,0 +1,16 @@
@@ -31,5 +31,5 @@ index 0000000000..d82ab675dd
 +     self.result += t.code[1:-1] + '\n\n'
 + 
 -- 
-2.34.1
+cgit v1.0-1-gd88e
 

From 2ec6f6de7f6023b10b180a06c572895fd63b3d4c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 19:57:59 -0300
Subject: [PATCH 27/60] sagemath: reorder upstream sources and add two missing
 ones

---
 srcpkgs/sagemath/template | 60 ++++++++++++++++++++++-----------------
 1 file changed, 34 insertions(+), 26 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index b5b99d2c122d..f53cba947c88 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -36,69 +36,77 @@ _SAGE_ROOT=/usr/lib/sage-${version}
 _SAGE_UPSTREAM_MIRROR=https://mirrors.mit.edu/sage/spkg/upstream
 
 _upstream="
-${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
 ${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
 ${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
+
+${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
 ${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
 ${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
 ${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
 ${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
 ${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
 ${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
-https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
-https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
-http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
 ${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
 ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
 ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
 ${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
 ${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${PYPI_SITE}/P/PyCygwin/PyCygwin-0.1.tar.gz
 ${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
-https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+${PYPI_SITE}/s/setuptools/setuptools-59.2.0.tar.gz
 ${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
 ${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
-https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
 ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
+
+https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
+https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
+http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
+https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
 "
 
 checksum+="
-dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
 c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
 d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
+5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
+ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
+169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
+cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
+edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
+cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
+
+dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
 3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
 03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
 5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
 cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
-5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
-c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
-6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
-07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
 a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
-ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
 d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
-169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
 5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
-cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
 471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
 78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
-edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+45a5e295590c469a49b2804bfdb89059e942d768ad3b813f484d7b5bff48d226
 ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
-b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
-3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+157d21de9d055ab9e8ea3186d91e7f4f865e11f42deafa952d90842671fc2576
 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
 545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
-cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
-718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
 dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
+
+c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
+6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
+07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
+3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
 "
 
 for u in ${_upstream}; do

From 3b6948e38352c4cd05ac958e2badd56a36d46b7f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 9 Jan 2022 12:45:47 -0300
Subject: [PATCH 28/60] sagemath: do not download anything patch

---
 .../patches/00-Do_not_download_anything.patch         | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 srcpkgs/sagemath/patches/00-Do_not_download_anything.patch

diff --git a/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch b/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch
new file mode 100644
index 000000000000..35aef7b8d456
--- /dev/null
+++ b/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch
@@ -0,0 +1,11 @@
+--- a/build/sage_bootstrap/tarball.py	2022-01-07 19:17:06.754747955 -0300
++++ b/build/sage_bootstrap/tarball.py	2022-01-07 19:25:31.844139381 -0300
+@@ -158,6 +158,8 @@
+                             .format(destination=destination))
+         successful_download = False
+         log.info('Attempting to download package {0} from mirrors'.format(self.filename))
++        log.info('ERROR: downloading is disabled, add file to template instead')
++        return
+         for mirror in MirrorList():
+             url = mirror + '/'.join(['spkg', 'upstream', self.package.name, self.filename])
+             log.info(url)

From 36abe91e9fb0dcf744995c499bde0bf40b711c42 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 9 Jan 2022 13:27:49 -0300
Subject: [PATCH 29/60] sagemath: update to 9.5.rc0.

---
 ...184f7498a2046065e669723e68efe2d65cee.patch |    6 +-
 ...1d4ced4264f65ab704f725f6f5879b012796.patch |  263 ----
 ...a54526829b79d5d236a40f83ddc6ce7b2696.patch | 1196 -----------------
 ...9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch |   27 -
 ...3f4f32246ad9ded6d37f1f2f12a589a81f4.patch} |    4 +-
 ...03138d0403be7c7cb303de2bc0a0e0b6793c.patch |   82 --
 ...f3a1611fed0cc66fb838eb85739646dd34d.patch} |   94 +-
 ...49c415e11d0522bff9013bc1509264b26ebf.patch |   27 +
 ...ip_doctest_singular_4.2.1--see_33134.patch |   13 +
 srcpkgs/sagemath/template                     |    6 +-
 10 files changed, 72 insertions(+), 1646 deletions(-)
 delete mode 100644 srcpkgs/sagemath/patches/trac-30766-system_python_3.10-df9f1d4ced4264f65ab704f725f6f5879b012796.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
 rename srcpkgs/sagemath/patches/{trac-33064-sage_docbuild_ignore_cache_save_permission_error-f767cf1eadfd8ab540a31c5c5ef09d56df09b90e.patch => trac-33064-sage_docbuild_ignore_cache_save_permission_error-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch} (92%)
 delete mode 100644 srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
 rename srcpkgs/sagemath/patches/{trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch => trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch} (63%)
 create mode 100644 srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch

diff --git a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
index b641113927e7..0ecb27c593cd 100644
--- a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
+++ b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
@@ -5615,9 +5615,9 @@ index 84f3d50..c7ad206 100644
      EXAMPLES::
  
          sage: sorted(installed_packages().keys())  # optional - build
--        [...'alabaster', ...'sage_conf', ...]
--        sage: installed_packages()['alabaster']  # optional - build, random
--        '0.7.12'
+-        [...'gmpy2', ...'sage_conf', ...]
+-        sage: installed_packages()['gmpy2']  # optional - build, random
+-        '2.1.0b5'
 +        [...'sage_conf', ...]
 +        sage: installed_packages()['sage_conf']  # optional - build, random
 +        '9.5'
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
deleted file mode 100644
index a1cb4c834482..000000000000
--- a/srcpkgs/sagemath/patches/trac-30766-system_python_3.10-df9f1d4ced4264f65ab704f725f6f5879b012796.patch
+++ /dev/null
@@ -1,263 +0,0 @@
-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-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch b/srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
deleted file mode 100644
index 3ae6fe01822d..000000000000
--- a/srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
+++ /dev/null
@@ -1,1196 +0,0 @@
-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/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch b/srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
deleted file mode 100644
index 485fb0176f45..000000000000
--- a/srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-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: 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 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"
- 
- # 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)
--- 
-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-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
similarity index 92%
rename from srcpkgs/sagemath/patches/trac-33064-sage_docbuild_ignore_cache_save_permission_error-f767cf1eadfd8ab540a31c5c5ef09d56df09b90e.patch
rename to srcpkgs/sagemath/patches/trac-33064-sage_docbuild_ignore_cache_save_permission_error-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
index 20fa12e570eb..04f04cfd6718 100644
--- 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-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
@@ -1,4 +1,4 @@
-From f767cf1eadfd8ab540a31c5c5ef09d56df09b90e Mon Sep 17 00:00:00 2001
+From e89193f4f32246ad9ded6d37f1f2f12a589a81f4 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
@@ -8,7 +8,7 @@ Subject: sage_docbuild: do not fail when cache cannot be saved
  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
+index 466ca82..f8c8ebd 100644
 --- a/src/sage_docbuild/__init__.py
 +++ b/src/sage_docbuild/__init__.py
 @@ -856,9 +856,12 @@ class ReferenceSubBuilder(DocBuilder):
diff --git a/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch b/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
deleted file mode 100644
index 6bc5193b75ee..000000000000
--- a/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-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
-
-
-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/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch b/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
similarity index 63%
rename from srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch
rename to srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
index 3794aa7f019b..04fca4815a00 100644
--- a/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch
+++ b/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
@@ -1,4 +1,4 @@
-From 7d3381b21e4716cfa8a33915621a12f0eba74233 Mon Sep 17 00:00:00 2001
+From 18d0477153af6f453a0e84f78030535f6a36ce87 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
@@ -10,56 +10,56 @@ Subject: doctests: remove dochtml label from some tests that don't need docs
  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
+index c788623..527ed90 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  # optional - sagemath_doc_html
+-        sage: thematic_index = os.path.join(SAGE_DOC, "html", "en", "thematic_tutorials", "index.html")  # optional - sagemath_doc_html
 +        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
+         sage: for line in open(thematic_index).readlines():  # optional - sagemath_doc_html
          ....:     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
+index 4c56aea..583ca06 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  # optional - sagemath_doc_html
+-    sage: docfilename = os.path.join(SAGE_DOC, 'html', 'en', 'reference', 'calculus', 'sage', 'symbolic', 'expression.html')  # optional - sagemath_doc_html
 +    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
+     sage: with open(docfilename) as fobj:  # optional - sagemath_doc_html
      ....:     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='',
+@@ -845,12 +845,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  # optional - sagemath_doc_html
+-        sage: len(_search_src_or_doc('src', r'matrix\(', 'incidence_structures', 'self', 'combinat', interact=False).splitlines()) > 1  # optional - sagemath_doc_html
 +        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)
+         sage: 'abvar/homology' in _search_src_or_doc('doc', 'homology', 'variety', interact=False)  # optional - sagemath_doc_html, 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)  # optional - sagemath_doc_html
 +        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:
+@@ -1369,7 +1369,7 @@ class _sage_doc:
  
-         sage: browse_sage_doc._open("reference", testing=True)[0]  # optional - dochtml, indirect doctest
+         sage: browse_sage_doc._open("reference", testing=True)[0]  # optional - sagemath_doc_html, 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]  # optional - sagemath_doc_html
 +        sage: browse_sage_doc(identity_matrix, 'rst')[-107:-47]
          'Full MatrixSpace of 3 by 3 sparse matrices over Integer Ring'
      """
@@ -68,7 +68,7 @@ index eb70516..b4848ed 100644
 cgit v1.0-1-gd88e
 
 
-From 42a76c3f82edecc9c6c53c661251677e3e907584 Mon Sep 17 00:00:00 2001
+From 88dd9f3a1611fed0cc66fb838eb85739646dd34d 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
@@ -78,7 +78,7 @@ Subject: doctests: add dochtml label to some tests that need docs installed
  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
+index f8c8ebd..d329009 100644
 --- a/src/sage_docbuild/__init__.py
 +++ b/src/sage_docbuild/__init__.py
 @@ -105,7 +105,7 @@ def builder_helper(type):
@@ -86,7 +86,7 @@ index 4a71c91..dd233bd 100644
          sage: from sage_docbuild import _build_many as build_many
          sage: helper = builder_helper("html")
 -        sage: try:
-+        sage: try:  # optional - dochtml
++        sage: try:  # optional - sagemath_doc_html
          ....:     build_many(build_ref_doc, [("docname", "en", "html", {})])
          ....: except Exception as E:
          ....:     "Non-exception during docbuild: abort pool operation" in str(E)
@@ -95,7 +95,7 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import DocBuilder
              sage: b = DocBuilder('tutorial')
 -            sage: b._output_dir('html')
-+            sage: b._output_dir('html')         # optional - dochtml
++            sage: b._output_dir('html')         # optional - sagemath_doc_html
              '.../html/en/tutorial'
          """
          d = os.path.join(SAGE_DOC, type, self.lang, self.name)
@@ -104,7 +104,7 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import DocBuilder
              sage: b = DocBuilder('tutorial')
 -            sage: b._doctrees_dir()
-+            sage: b._doctrees_dir()             # optional - docthml
++            sage: b._doctrees_dir()             # optional - sagemath_doc_html
              '.../doctrees/en/tutorial'
          """
          d = os.path.join(SAGE_DOC, 'doctrees', self.lang, self.name)
@@ -113,7 +113,7 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import ReferenceBuilder
              sage: b = ReferenceBuilder('reference')
 -            sage: b._output_dir('html')
-+            sage: b._output_dir('html')         # optional - dochtml
++            sage: b._output_dir('html')         # optional - sagemath_doc_html
              '.../html/en/reference'
          """
          if lang is None:
@@ -122,56 +122,10 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import ReferenceTopBuilder
              sage: b = ReferenceTopBuilder('reference')
 -            sage: b._output_dir('html')
-+            sage: b._output_dir('html')         # optional - dochtml
++            sage: b._output_dir('html')         # optional - sagemath_doc_html
              '.../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/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch b/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
new file mode 100644
index 000000000000..d32f1e4d5e9f
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
@@ -0,0 +1,27 @@
+From 836249c415e11d0522bff9013bc1509264b26ebf Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Sun, 9 Jan 2022 16:51:22 -0300
+Subject: trac 33135: add filter to ignore deprecation warnings
+
+---
+ src/sage/all.py | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/sage/all.py b/src/sage/all.py
+index 01ef327..19ca3d4 100644
+--- a/src/sage/all.py
++++ b/src/sage/all.py
+@@ -96,6 +96,10 @@ warnings.filterwarnings('ignore', category=DeprecationWarning,
+ warnings.filterwarnings('ignore', category=DeprecationWarning,
+                         module='pythran')
+ 
++warnings.filterwarnings('ignore', category=DeprecationWarning,
++                        message='The distutils(.sysconfig module| package) is deprecated',
++                        module='numpy|sage.env|sage.features')
++
+ ################ end setup warnings ###############################
+ 
+ 
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
new file mode 100644
index 000000000000..438078a92036
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage/rings/polynomial/hilbert.pyx b/src/sage/rings/polynomial/hilbert.pyx
+index 4cd91d0a46..323b168c4e 100644
+--- a/src/sage/rings/polynomial/hilbert.pyx
++++ b/src/sage/rings/polynomial/hilbert.pyx
+@@ -578,7 +578,7 @@ def hilbert_poincare_series(I, grading=None):
+ 
+     This example exceeded the capabilities of Singular before version 4.2.1p2::
+ 
+-        sage: J.hilbert_numerator(algorithm='singular')
++        sage: J.hilbert_numerator(algorithm='singular')   # not tested - requires singular 4.2.1p2
+         120*t^33 - 3465*t^32 + 48180*t^31 - 429374*t^30 + 2753520*t^29 - 13522410*t^28 + 52832780*t^27 - 168384150*t^26 + 445188744*t^25 - 987193350*t^24 + 1847488500*t^23 + 1372406746*t^22 - 403422496*t^21 - 8403314*t^20 - 471656596*t^19 + 1806623746*t^18 + 752776200*t^17 + 752776200*t^16 - 1580830020*t^15 + 1673936550*t^14 - 1294246800*t^13 + 786893250*t^12 - 382391100*t^11 + 146679390*t^10 - 42299400*t^9 + 7837830*t^8 - 172260*t^7 - 468930*t^6 + 183744*t^5 - 39270*t^4 + 5060*t^3 - 330*t^2 + 1
+ 
+     """
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f53cba947c88..f688629fc26d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -1,6 +1,6 @@
 # Template file for 'sagemath'
 pkgname=sagemath
-version=9.5.beta9
+version=9.5.rc0
 revision=1
 wrksrc=sage-$version
 build_style=configure
@@ -19,7 +19,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
-checksum=aea4c5a8d3b32af2fba644269b9daf4f62471471ba2d7d83da0f8098a5f53225
+checksum=8012e3ac35290fa9b2cb837eeca149925784c2378b486731226944e4afd8a4e6
 python_version=3
 
 build_options="debug system_python3 system_site_packages"
@@ -128,7 +128,7 @@ nostrip=yes
 noshlibprovides=yes
 
 # don't rewrite python shebang as sage uses its own python (for now)
-_no_python_shebang=yes
+#_no_python_shebang=yes
 
 # compile python code in sage venv
 pycompile_dirs="$_SAGE_ROOT/venv/"

From 75c7f82e4cdc84d9bafcc64c2cbe5d79be98a2e3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 10 Jan 2022 16:32:54 -0300
Subject: [PATCH 30/60] sagemath: use system gap

---
 ...f491e5ce599ba185f5e93f02e0fcebd76c9e.patch | 57 +++++++++++++++++++
 .../patches/zzz-skip_doctest_system_gap.patch | 13 +++++
 srcpkgs/sagemath/template                     | 15 ++++-
 3 files changed, 82 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch

diff --git a/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch b/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
new file mode 100644
index 000000000000..da88a369db0d
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
@@ -0,0 +1,57 @@
+From 2c981351bb60089530b0598d3e9a909a23d4d4d8 Mon Sep 17 00:00:00 2001
+From: Thierry Thomas <thierry@FreeBSD.org>
+Date: Mon, 22 Mar 2021 03:04:12 +0100
+Subject: 29644: Add spkg-configure.m4 for gap
+
+---
+ build/pkgs/gap/spkg-configure.m4 | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+ create mode 100644 build/pkgs/gap/spkg-configure.m4
+
+diff --git a/build/pkgs/gap/spkg-configure.m4 b/build/pkgs/gap/spkg-configure.m4
+new file mode 100644
+index 00000000..91cd089
+--- /dev/null
++++ b/build/pkgs/gap/spkg-configure.m4
+@@ -0,0 +1,8 @@
++SAGE_SPKG_CONFIGURE([gap], [
++    SAGE_SPKG_DEPCHECK([gmp], [
++       AC_CHECK_HEADER([gap/system.h], [
++        AC_SEARCH_LIBS([GAP_COMM], [gap], [
++        ], [sage_spkg_install_gap=yes])
++       ], [sage_spkg_install_gap=yes])
++    ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2a41f491e5ce599ba185f5e93f02e0fcebd76c9e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Samuel=20Leli=C3=A8vre?= <samuel.lelievre@gmail.com>
+Date: Mon, 22 Mar 2021 03:05:31 +0100
+Subject: 29644: Add distro information for gap
+
+---
+ build/pkgs/gap/distros/fedora.txt | 1 +
+ build/pkgs/gap/distros/gentoo.txt | 1 +
+ 2 files changed, 2 insertions(+)
+ create mode 100644 build/pkgs/gap/distros/fedora.txt
+ create mode 100644 build/pkgs/gap/distros/gentoo.txt
+
+diff --git a/build/pkgs/gap/distros/fedora.txt b/build/pkgs/gap/distros/fedora.txt
+new file mode 100644
+index 00000000..ea4feae
+--- /dev/null
++++ b/build/pkgs/gap/distros/fedora.txt
+@@ -0,0 +1 @@
++gap
+diff --git a/build/pkgs/gap/distros/gentoo.txt b/build/pkgs/gap/distros/gentoo.txt
+new file mode 100644
+index 00000000..ea64ec9
+--- /dev/null
++++ b/build/pkgs/gap/distros/gentoo.txt
+@@ -0,0 +1 @@
++sci-mathematics/gap
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
new file mode 100644
index 000000000000..f132591d48ac
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage_setup/optional_extension.py b/src/sage_setup/optional_extension.py
+index f252849384..4034e3e196 100644
+--- a/src/sage_setup/optional_extension.py
++++ b/src/sage_setup/optional_extension.py
+@@ -80,7 +80,7 @@ def OptionalExtension(*args, **kwds):
+         sage: print(ext.__class__.__name__)
+         CythonizeExtension
+         sage: ext = OptionalExtension("foo", ["foo.c"], package="gap")
+-        sage: print(ext.__class__.__name__)
++        sage: print(ext.__class__.__name__)     # not tested - fails with system gap
+         Extension
+     """
+     try:
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f688629fc26d..02b0af4ad16d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -66,7 +66,6 @@ ${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
 ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
 
 https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
-https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
 http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
 https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
 https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
@@ -103,7 +102,6 @@ ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
 dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
 
 c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
-6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
 07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
 3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
 718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
@@ -159,6 +157,13 @@ pre_configure() {
 	export MAKE="make -j ${XBPS_MAKEJOBS}"
 }
 
+post_configure() {
+	# we set some variables, right after configure has created sage_conf.py
+	cat <<-EOF >> pkgs/sage-conf/sage_conf.py
+	GAP_ROOT_DIR = "/usr/share/gap"
+	EOF
+}
+
 # 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
@@ -248,7 +253,11 @@ makedepends+="
  gengetopt texinfo
  brial-devel cliquer-devel gfan libbraiding-devel libhomfly-devel
  lrcalc-devel nauty-devel palp tachyon
- maxima-ecl primesieve-devel primecount-devel
+ maxima-ecl primesieve-devel primecount-devel gap-devel
+"
+
+# optional dependencies
+makedepends+="
  ffmpeg ImageMagick
 "
 

From e97cfacc19183c4cfc0e6cc8b64e95efdd010292 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Thu, 13 Jan 2022 03:21:19 -0300
Subject: [PATCH 31/60] sagemath: fixes for system gap

---
 .../zzz-fixes_for_system_gap--see_29644.patch | 96 +++++++++++++++++++
 .../patches/zzz-skip_doctest_system_gap.patch | 13 ---
 srcpkgs/sagemath/template                     |  1 +
 3 files changed, 97 insertions(+), 13 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
 delete mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch

diff --git a/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch b/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
new file mode 100644
index 000000000000..741d2b23a7f5
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
@@ -0,0 +1,96 @@
+From 346b4ea4c92f4287d3c097b92817cf2abfcddd8c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Thu, 13 Jan 2022 01:41:31 -0300
+Subject: [PATCH] gap: fixes for using system gap
+
+ - fix _get_shared_lib_path() so we don't need to configure GAP_SO
+ - fix gap_root() so we don't need to configure GAP_ROOT_DIR
+ - skip a useless test that cannot succeed on system gap
+ - use gap_root() in saved_workspace.py instead of GAP_ROOT_DIR
+---
+ src/sage/env.py                      |  2 +-
+ src/sage/libs/gap/saved_workspace.py |  4 ++--
+ src/sage/libs/gap/util.pyx           | 11 +++++++++++
+ src/sage_setup/optional_extension.py |  2 +-
+ 4 files changed, 15 insertions(+), 4 deletions(-)
+
+diff --git a/src/sage/env.py b/src/sage/env.py
+index c4953cfa65..c16696d298 100644
+--- a/src/sage/env.py
++++ b/src/sage/env.py
+@@ -293,7 +293,7 @@ def _get_shared_lib_path(*libnames: str) -> Optional[str]:
+             if sys.platform == 'darwin':
+                 ext = 'dylib'
+             else:
+-                ext = 'so'
++                ext = 'so*'
+ 
+             if SAGE_LOCAL:
+                 search_directories.append(Path(SAGE_LOCAL) / 'lib')
+diff --git a/src/sage/libs/gap/saved_workspace.py b/src/sage/libs/gap/saved_workspace.py
+index ad5adec36d..59c498795f 100644
+--- a/src/sage/libs/gap/saved_workspace.py
++++ b/src/sage/libs/gap/saved_workspace.py
+@@ -8,7 +8,7 @@ workspaces.
+ 
+ import os
+ import glob
+-from sage.env import GAP_ROOT_DIR
++from sage.libs.gap.util import gap_root
+ from sage.interfaces.gap_workspace import gap_workspace_file
+ 
+ 
+@@ -31,7 +31,7 @@ def timestamp():
+     """
+     libgap_dir = os.path.dirname(__file__)
+     libgap_files = glob.glob(os.path.join(libgap_dir, '*'))
+-    gap_packages = glob.glob(os.path.join(GAP_ROOT_DIR, 'pkg', '*'))
++    gap_packages = glob.glob(os.path.join(gap_root(), 'pkg', '*'))
+     files = libgap_files + gap_packages
+     if len(files) == 0:
+         print('Unable to find LibGAP files.')
+diff --git a/src/sage/libs/gap/util.pyx b/src/sage/libs/gap/util.pyx
+index 08c4c40cc0..c7dd557c35 100644
+--- a/src/sage/libs/gap/util.pyx
++++ b/src/sage/libs/gap/util.pyx
+@@ -23,6 +23,7 @@ from cysignals.signals cimport sig_on, sig_off
+ import os
+ import warnings
+ import sage.env
++import subprocess
+ 
+ from .gap_includes cimport *
+ from .element cimport *
+@@ -178,6 +179,16 @@ def gap_root():
+     if os.path.exists(sage.env.GAP_ROOT_DIR):
+         return sage.env.GAP_ROOT_DIR
+ 
++    gap_expr = 'JoinStringsWithSeparator(KERNEL_INFO().GAP_ROOT_PATHS,";")'
++    gap_root_paths = subprocess.getoutput(
++        f"gap -r -q --bare --nointeract -c 'Display({gap_expr});'"
++        ).strip().split(';')
++
++    for gapdir in gap_root_paths:
++        if os.path.exists(os.path.join(gapdir, 'sysinfo.gap')):
++            sage.env.GAP_ROOT_DIR = gapdir
++            return gapdir
++
+     # Attempt to figure out the appropriate GAP_ROOT by reading the
+     # local/bin/gap shell script; this is an ugly hack that exists for
+     # historical reasons; the best approach to setting where Sage looks for
+diff --git a/src/sage_setup/optional_extension.py b/src/sage_setup/optional_extension.py
+index f252849384..4034e3e196 100644
+--- a/src/sage_setup/optional_extension.py
++++ b/src/sage_setup/optional_extension.py
+@@ -80,7 +80,7 @@ def OptionalExtension(*args, **kwds):
+         sage: print(ext.__class__.__name__)
+         CythonizeExtension
+         sage: ext = OptionalExtension("foo", ["foo.c"], package="gap")
+-        sage: print(ext.__class__.__name__)
++        sage: print(ext.__class__.__name__)     # not tested - fails with system gap
+         Extension
+     """
+     try:
+-- 
+2.34.1
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
deleted file mode 100644
index f132591d48ac..000000000000
--- a/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/src/sage_setup/optional_extension.py b/src/sage_setup/optional_extension.py
-index f252849384..4034e3e196 100644
---- a/src/sage_setup/optional_extension.py
-+++ b/src/sage_setup/optional_extension.py
-@@ -80,7 +80,7 @@ def OptionalExtension(*args, **kwds):
-         sage: print(ext.__class__.__name__)
-         CythonizeExtension
-         sage: ext = OptionalExtension("foo", ["foo.c"], package="gap")
--        sage: print(ext.__class__.__name__)
-+        sage: print(ext.__class__.__name__)     # not tested - fails with system gap
-         Extension
-     """
-     try:
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 02b0af4ad16d..0d8ce1f7a70a 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -161,6 +161,7 @@ post_configure() {
 	# we set some variables, right after configure has created sage_conf.py
 	cat <<-EOF >> pkgs/sage-conf/sage_conf.py
 	GAP_ROOT_DIR = "/usr/share/gap"
+	GAP_SO = "$(objdump -p /usr/lib/libgap.so | awk '/SONAME/{print $2}')"
 	EOF
 }
 

From 3a380c61dde77f6a5667d10297b29f2fb8521cac Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Thu, 13 Jan 2022 15:47:33 -0300
Subject: [PATCH 32/60] New package: sagemath-test

---
 srcpkgs/sagemath-test/template                | 32 +++++++++++++++++++
 .../patches/zzz-skip_doctest_shebang.patch    | 11 +++++++
 2 files changed, 43 insertions(+)
 create mode 100644 srcpkgs/sagemath-test/template
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch

diff --git a/srcpkgs/sagemath-test/template b/srcpkgs/sagemath-test/template
new file mode 100644
index 000000000000..3e0b1c3233fd
--- /dev/null
+++ b/srcpkgs/sagemath-test/template
@@ -0,0 +1,32 @@
+# Template file for 'sagemath-test'
+pkgname=sagemath-test
+version=1
+revision=1
+build_style=meta
+checkdepends="sagemath"
+short_desc="Dummy package to test sagemath"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-2.0-or-later"
+homepage="none"
+
+# TODO: install base-voidstrap, uninstall base-chroot, and remove orphans
+# so we can check sagemath depends are enough to run sage on void
+
+do_check() {
+	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
+		_test_args=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	fi
+	if [ -z "$_test_args" ]; then
+		_test_args=--all
+	fi
+	if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
+		# for CI use a predictable random seed
+		_test_args="--random-seed=0 $_test_args"
+	fi
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args="--long $_test_args"
+	else
+		_test_args="--warn-long 5.0 $_test_args"
+	fi
+	/usr/bin/sage* -tp ${XBPS_MAKEJOBS} ${_test_args}
+}
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch
new file mode 100644
index 000000000000..04fa2acbf3ec
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch
@@ -0,0 +1,11 @@
+--- a/src/sage/tests/cmdline.py
++++ b/src/sage/tests/cmdline.py
+@@ -488,7 +488,7 @@ def test_executable(args, input="", timeout=100.0, pydebug_ignore_warnings=False
+         0
+ 
+         sage: (out, err, ret) = test_executable(["sage", "--cython"])
+-        sage: print(err)
++        sage: print(err)  # not tested - broken when shebang is rewritten
+         Cython (http://cython.org) is a compiler for code written in the
+         Cython language.  Cython is based on Pyrex by Greg Ewing.
+         ...

From 0bdbdb1787e5c102fbc0704352d3552821dd8202 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 11:34:23 -0300
Subject: [PATCH 33/60] sagemath: cleanup and one patch

---
 .../zzz-skip_doctest_sage_setup_find.patch    | 12 ++++++++
 srcpkgs/sagemath/template                     | 30 ++++---------------
 2 files changed, 18 insertions(+), 24 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch

diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch
new file mode 100644
index 000000000000..15aed02f9aaa
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch
@@ -0,0 +1,12 @@
+--- a/src/sage_setup/find.py
++++ b/src/sage_setup/find.py
+@@ -301,7 +301,7 @@ def find_extra_files(src_dir, modules, cythonized_dir, special_filenames=[]):
+         sage: extras["sage/libs/mpfr"]
+         [...sage/libs/mpfr/types.pxd...]
+         sage: extras["sage/ext/interpreters"]
+-        ['.../src/sage/ext/interpreters/wrapper_cdf.pxd', ...wrapper_cdf.h...]
++        ['.../src/sage/ext/interpreters/wrapper_cdf.pxd', ...]
+     """
+     from Cython.Utils import is_package_dir
+ 
+--
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 0d8ce1f7a70a..f25cb745c9c4 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -4,7 +4,8 @@ version=9.5.rc0
 revision=1
 wrksrc=sage-$version
 build_style=configure
-configure_args="--enable-build-as-root"
+configure_args="--enable-build-as-root --with-system-python3
+ --enable-system-site-packages"
 make_check_target=ptest
 # for now skip building docs
 make_build_target=build
@@ -22,13 +23,8 @@ distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
 checksum=8012e3ac35290fa9b2cb837eeca149925784c2378b486731226944e4afd8a4e6
 python_version=3
 
-build_options="debug system_python3 system_site_packages"
+build_options="debug"
 desc_option_debug="Build with debug symbols"
-desc_option_system_python="Build using system python 3"
-desc_option_system_python="Build using system python site-packages"
-build_options_default="system_python3 system_site_packages"
-configure_args+=" $(vopt_with system_python3)"
-configure_args+=" $(vopt_enable system_site_packages)"
 
 # path where sage will be installed
 _SAGE_ROOT=/usr/lib/sage-${version}
@@ -112,9 +108,6 @@ for u in ${_upstream}; do
 	skip_extraction+=" ${u##*[/>]}"
 done
 
-# 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
@@ -165,16 +158,6 @@ post_configure() {
 	EOF
 }
 
-# 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() {
 	vlicense COPYING.txt
 	vdoc README.md
@@ -301,7 +284,6 @@ _sage_python3_modules="
  python3-wheel python3-zipp pythran
  "
 
-if [ "$build_option_system_site_packages" ]; then
-	makedepends+=" $_sage_python3_modules"
-	depends+=" $_sage_python3_modules"
-fi
+# python packages are build and runtime dependencies
+makedepends+=" $_sage_python3_modules"
+depends+=" $_sage_python3_modules"

From 27ec15d3f6d3574e7344677e37d681fe92021fdd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 11:34:32 -0300
Subject: [PATCH 34/60] sagemath: update to 9.5.rc1.

---
 srcpkgs/sagemath/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f25cb745c9c4..f5d9d0f0fabd 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -1,6 +1,6 @@
 # Template file for 'sagemath'
 pkgname=sagemath
-version=9.5.rc0
+version=9.5.rc1
 revision=1
 wrksrc=sage-$version
 build_style=configure
@@ -20,7 +20,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
-checksum=8012e3ac35290fa9b2cb837eeca149925784c2378b486731226944e4afd8a4e6
+checksum=b015c54f7411669ef70bac2b2fde260e7f45724bcff170957b1f9fd08131f2c3
 python_version=3
 
 build_options="debug"

From ea41077edf87970f6ae8d9d62231f8d2362c9100 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 14:53:11 -0300
Subject: [PATCH 35/60] sagemath: patch not needed with singular 4.3.0

---
 ...zzz-skip_doctest_singular_4.2.1--see_33134.patch | 13 -------------
 1 file changed, 13 deletions(-)
 delete mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch

diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
deleted file mode 100644
index 438078a92036..000000000000
--- a/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/src/sage/rings/polynomial/hilbert.pyx b/src/sage/rings/polynomial/hilbert.pyx
-index 4cd91d0a46..323b168c4e 100644
---- a/src/sage/rings/polynomial/hilbert.pyx
-+++ b/src/sage/rings/polynomial/hilbert.pyx
-@@ -578,7 +578,7 @@ def hilbert_poincare_series(I, grading=None):
- 
-     This example exceeded the capabilities of Singular before version 4.2.1p2::
- 
--        sage: J.hilbert_numerator(algorithm='singular')
-+        sage: J.hilbert_numerator(algorithm='singular')   # not tested - requires singular 4.2.1p2
-         120*t^33 - 3465*t^32 + 48180*t^31 - 429374*t^30 + 2753520*t^29 - 13522410*t^28 + 52832780*t^27 - 168384150*t^26 + 445188744*t^25 - 987193350*t^24 + 1847488500*t^23 + 1372406746*t^22 - 403422496*t^21 - 8403314*t^20 - 471656596*t^19 + 1806623746*t^18 + 752776200*t^17 + 752776200*t^16 - 1580830020*t^15 + 1673936550*t^14 - 1294246800*t^13 + 786893250*t^12 - 382391100*t^11 + 146679390*t^10 - 42299400*t^9 + 7837830*t^8 - 172260*t^7 - 468930*t^6 + 183744*t^5 - 39270*t^4 + 5060*t^3 - 330*t^2 + 1
- 
-     """

From 8143ee82f5b3ee1140f279b73bc3fd3a2de8d16c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 14:53:25 -0300
Subject: [PATCH 36/60] sagemath: install /usr/bin/sage

---
 srcpkgs/sagemath/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f5d9d0f0fabd..49821fc982e4 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -181,7 +181,8 @@ do_install() {
 	vmkdir 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}
+	ln -sfT $_SAGE_ROOT/sage ${DESTDIR}/usr/bin/sage-${version}
+	ln -sfT sage-${version} ${DESTDIR}/usr/bin/sage
 }
 
 do_check() {

From 7ec27d7d6067abc9d832f456f81f3b53521efc9f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 16:31:25 -0300
Subject: [PATCH 37/60] New package: python3-cvxopt-1.2.7

---
 srcpkgs/python3-cvxopt/template | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 srcpkgs/python3-cvxopt/template

diff --git a/srcpkgs/python3-cvxopt/template b/srcpkgs/python3-cvxopt/template
new file mode 100644
index 000000000000..0fb769b294e0
--- /dev/null
+++ b/srcpkgs/python3-cvxopt/template
@@ -0,0 +1,20 @@
+# Template file for 'python3-cvxopt'
+pkgname=python3-cvxopt
+version=1.2.7
+revision=1
+wrksrc="cvxopt-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools"
+makedepends="python3-devel blas-devel lapack-devel SuiteSparse-devel gsl-devel glpk-devel"
+checkdepends="python3-pytest"
+short_desc="Python software for convex optimization"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-3.0-or-later"
+homepage="http://cvxopt.org/"
+distfiles="${PYPI_SITE}/c/cvxopt/cvxopt-${version}.tar.gz"
+checksum=3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
+
+pre_build() {
+	export CVXOPT_BUILD_GSL=1
+	export CVXOPT_BUILD_GLPK=1
+}

From 49769070effce73cb5c324ab444147fc181b12db Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 23:37:14 -0300
Subject: [PATCH 38/60] sagemath: rearrange upstream packages and indent

This doesn't change anything, it separates _upstream and
checksum in three blocks to make it easier to edit.
---
 srcpkgs/sagemath/template | 140 ++++++++++++++++++++------------------
 1 file changed, 74 insertions(+), 66 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 49821fc982e4..4317f1e80893 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -31,76 +31,84 @@ _SAGE_ROOT=/usr/lib/sage-${version}
 
 _SAGE_UPSTREAM_MIRROR=https://mirrors.mit.edu/sage/spkg/upstream
 
+# packages were sage is the upstream
 _upstream="
-${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
-
-${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
-${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
-${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
-${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
-${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
-${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
-${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
-${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
-${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
-${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
-${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
-${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
-${PYPI_SITE}/P/PyCygwin/PyCygwin-0.1.tar.gz
-${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
-${PYPI_SITE}/s/setuptools/setuptools-59.2.0.tar.gz
-${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
-${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
-${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
-
-https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
-http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
-https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
-https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
+ ${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
+ ${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
+ ${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
+"
+checksum+="
+ c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
+ d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
+ 5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
+ ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
+ 169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
+ cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
+ edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+ b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
+ cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
 "
 
+# packages from pypi (python modules)
+_upstream+="
+ ${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
+ ${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
+ ${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
+ ${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
+ ${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
+ ${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
+ ${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
+ ${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
+ ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
+ ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
+ ${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
+ ${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
+ ${PYPI_SITE}/P/PyCygwin/PyCygwin-0.1.tar.gz
+ ${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
+ ${PYPI_SITE}/s/setuptools/setuptools-59.2.0.tar.gz
+ ${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
+ ${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
+ ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
+"
+checksum+="
+ dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
+ 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
+ 3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
+ 03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
+ 5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
+ cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
+ 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+ a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
+ d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
+ 5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
+ 471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
+ 78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
+ 45a5e295590c469a49b2804bfdb89059e942d768ad3b813f484d7b5bff48d226
+ ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
+ 157d21de9d055ab9e8ea3186d91e7f4f865e11f42deafa952d90842671fc2576
+ 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
+ 545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
+ dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
+"
+
+# other upstream packages
+_upstream+="
+ https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
+ http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
+ https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+ https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
+"
 checksum+="
-c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
-d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
-5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
-ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
-169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
-cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
-edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
-b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
-cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
-
-dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
-4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
-3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
-03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
-5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
-cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
-581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
-a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
-d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
-5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
-471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
-78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
-45a5e295590c469a49b2804bfdb89059e942d768ad3b813f484d7b5bff48d226
-ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
-157d21de9d055ab9e8ea3186d91e7f4f865e11f42deafa952d90842671fc2576
-6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
-545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
-dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
-
-c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
-07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
-3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
-718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
+ c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
+ 07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
+ 3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+ 718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
 "
 
 for u in ${_upstream}; do

From be5f0c86cb081d87d6658b5b7b39030268711088 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 23:37:58 -0300
Subject: [PATCH 39/60] sagemath: use system cvxopt and importlib_resources

---
 srcpkgs/sagemath/template | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 4317f1e80893..5eb70a6267bb 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -59,12 +59,10 @@ checksum+="
 _upstream+="
  ${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
  ${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
- ${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
  ${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
  ${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
  ${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
  ${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
- ${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
  ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
  ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
  ${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
@@ -79,12 +77,10 @@ _upstream+="
 checksum+="
  dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
  4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
- 3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
  03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
  5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
  cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
  581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
- a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
  d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
  5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
  471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
@@ -257,9 +253,6 @@ makedepends+="
 # TODO: optional
 # 4ti2 coxeter3 libsemigroups lrslib pdf2svg perl_mongodb polymake
 
-# TODO: standard
-# cvxopt importlib_resources
-
 # python packages for trac-29665
 _sage_python3_modules="
  python3-Babel python3-Jinja2 python3-MarkupSafe python3-Pillow
@@ -291,6 +284,8 @@ _sage_python3_modules="
  python3-tornado python3-traitlets python3-typing_extensions
  python3-tzlocal python3-urllib3 python3-wcwidth python3-webencodings
  python3-wheel python3-zipp pythran
+
+ python3-cvxopt python3-importlib_resources
  "
 
 # python packages are build and runtime dependencies

From f0af0898ca3a490cfc245f49e928470302c16c27 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 01:48:08 -0300
Subject: [PATCH 40/60] sagemath-test: fix sage binary (now is just 'sage')

---
 srcpkgs/sagemath-test/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/sagemath-test/template b/srcpkgs/sagemath-test/template
index 3e0b1c3233fd..1c0d71683a1b 100644
--- a/srcpkgs/sagemath-test/template
+++ b/srcpkgs/sagemath-test/template
@@ -28,5 +28,5 @@ do_check() {
 	else
 		_test_args="--warn-long 5.0 $_test_args"
 	fi
-	/usr/bin/sage* -tp ${XBPS_MAKEJOBS} ${_test_args}
+	sage -tp ${XBPS_MAKEJOBS} ${_test_args}
 }

From 95eaa2c36333b09eba6dc377ba4a86a2b3ee78a5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 10:49:04 -0300
Subject: [PATCH 41/60] sagemath: disallow fuzz in patches

---
 ...49c415e11d0522bff9013bc1509264b26ebf.patch | 27 -------------------
 srcpkgs/sagemath/template                     |  1 +
 2 files changed, 1 insertion(+), 27 deletions(-)
 delete mode 100644 srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch

diff --git a/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch b/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
deleted file mode 100644
index d32f1e4d5e9f..000000000000
--- a/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 836249c415e11d0522bff9013bc1509264b26ebf Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
-Date: Sun, 9 Jan 2022 16:51:22 -0300
-Subject: trac 33135: add filter to ignore deprecation warnings
-
----
- src/sage/all.py | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/src/sage/all.py b/src/sage/all.py
-index 01ef327..19ca3d4 100644
---- a/src/sage/all.py
-+++ b/src/sage/all.py
-@@ -96,6 +96,10 @@ warnings.filterwarnings('ignore', category=DeprecationWarning,
- warnings.filterwarnings('ignore', category=DeprecationWarning,
-                         module='pythran')
- 
-+warnings.filterwarnings('ignore', category=DeprecationWarning,
-+                        message='The distutils(.sysconfig module| package) is deprecated',
-+                        module='numpy|sage.env|sage.features')
-+
- ################ end setup warnings ###############################
- 
- 
--- 
-cgit v1.0-1-gd88e
-
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 5eb70a6267bb..e5a728b2217d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -22,6 +22,7 @@ homepage="http://sagemath.org/"
 distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
 checksum=b015c54f7411669ef70bac2b2fde260e7f45724bcff170957b1f9fd08131f2c3
 python_version=3
+patch_args="-F0 -Np1"
 
 build_options="debug"
 desc_option_debug="Build with debug symbols"

From 1d307a5b46f8a852536aad4fbec2b77085e56184 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 13:27:53 -0300
Subject: [PATCH 42/60] sagemath: disable packages that are not needed

 - appnope: only needed for macos
 - fonttools: only needed to build matplotlib
 - importlib_resources: only needed for old python
 - pycygwin: only needed for cygwin
 - setuptools_scm_git_archive: only needed to build matplotlib
 - setuptools_wheel: not needed
 - sphinxcontrib_websupport: only needed to build sphinx
 - cppy: force use from system python3-cppy
---
 srcpkgs/sagemath/template | 51 +++++++++++++++++++++++++++------------
 1 file changed, 35 insertions(+), 16 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index e5a728b2217d..f15bfbf76e0a 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -58,39 +58,29 @@ checksum+="
 
 # packages from pypi (python modules)
 _upstream+="
- ${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
- ${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
  ${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
  ${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
  ${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
- ${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
+
  ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
  ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
  ${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
  ${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
- ${PYPI_SITE}/P/PyCygwin/PyCygwin-0.1.tar.gz
+
  ${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
- ${PYPI_SITE}/s/setuptools/setuptools-59.2.0.tar.gz
- ${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
- ${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
  ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
 "
 checksum+="
- dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
- 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
  03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
  5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
  cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
- 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+
  d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
  5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
  471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
  78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
- 45a5e295590c469a49b2804bfdb89059e942d768ad3b813f484d7b5bff48d226
+
  ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
- 157d21de9d055ab9e8ea3186d91e7f4f865e11f42deafa952d90842671fc2576
- 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
- 545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
  dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
 "
 
@@ -108,6 +98,22 @@ checksum+="
  718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
 "
 
+# these packages are not needed, don't install
+_dontinstall="
+ appnope
+ fonttools
+ importlib_resources
+ pycygwin
+ setuptools_scm_git_archive
+ setuptools_wheel
+ sphinxcontrib_websupport
+"
+
+# these packages can be used from system
+_usefromsystem="
+ cppy
+"
+
 for u in ${_upstream}; do
 	distfiles+=" $u"
 	skip_extraction+=" ${u##*[/>]}"
@@ -145,8 +151,20 @@ do_clean() {
 	rm -rf $wrksrc $_SAGE_ROOT
 }
 
-pre_configure() {
+post_patch() {
 	./bootstrap
+}
+
+pre_configure() {
+	for spkg in $_dontinstall; do
+		configure_args+=" sage_spkg_install_$spkg=no"
+		configure_args+=" sage_require_$spkg=no"
+	done
+
+	for spkg in $_usefromsystem; do
+		configure_args+=" sage_spkg_install_$spkg=no"
+		configure_args+=" sage_require_$spkg=yes"
+	done
 
 	if [ "$build_option_debug" ]; then
 		export SAGE_DEBUG=yes
@@ -286,7 +304,8 @@ _sage_python3_modules="
  python3-tzlocal python3-urllib3 python3-wcwidth python3-webencodings
  python3-wheel python3-zipp pythran
 
- python3-cvxopt python3-importlib_resources
+ python3-cvxopt
+ python3-cppy
  "
 
 # python packages are build and runtime dependencies

From fec4d063e2ed623777b2ce3f558b5fcd839dc185 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 17:32:39 -0300
Subject: [PATCH 43/60] New package: python3-cysignals-1.11.2

---
 .../python3-cysignals/patches/fix-write.patch | 46 +++++++++++++++++++
 srcpkgs/python3-cysignals/template            | 19 ++++++++
 2 files changed, 65 insertions(+)
 create mode 100644 srcpkgs/python3-cysignals/patches/fix-write.patch
 create mode 100644 srcpkgs/python3-cysignals/template

diff --git a/srcpkgs/python3-cysignals/patches/fix-write.patch b/srcpkgs/python3-cysignals/patches/fix-write.patch
new file mode 100644
index 000000000000..18206bd808d7
--- /dev/null
+++ b/srcpkgs/python3-cysignals/patches/fix-write.patch
@@ -0,0 +1,46 @@
+Fix a doctest failure which triggers in i686.
+
+The example is in the function `test_bad_str()` in the file `tests.pyx`.
+The test pases a bad string to `sig_str()` and then raises `SIGILL`. The
+signal handler eventually raises a Python exception which in turn raises
+a `SIGSEGV` when accessing the bad string. An error message is expected,
+but that doesn't happen.
+
+Presumably the segfault happens inside some stdio function which leaves
+stdio buffers in an inconsistent state so the latter `fprintf` doesn't
+work properly. From signal-safety(7):
+
+    Suppose that the main program is in the middle of a call to a
+    stdio function such as printf(3) where the buffer and associated
+    variables have been partially updated.  If, at that moment, the
+    program is interrupted by a signal handler that also calls
+    printf(3), then the second call to printf(3) will operate on
+    inconsistent data, with unpredictable results.
+
+We fix this by replacing the `fprintf` by calls to `write`, which is
+async-signal-safe according to POSIX.
+
+--- a/src/cysignals/implementation.c      2022-01-16 22:36:45.143796872 +0000
++++ b/src/cysignals/implementation.c      2022-01-17 02:22:31.196695043 +0000
+@@ -638,12 +622,15 @@
+ #endif
+ 
+     if (s) {
++        /* Using fprintf from inside a signal handler is undefined, see signal-safety(7) */
++        const char * message =
++            "\n"
++            "This probably occurred because a *compiled* module has a bug\n"
++            "in it and is not properly wrapped with sig_on(), sig_off().\n"
++            "Python will now terminate.\n"
++            "------------------------------------------------------------------------\n";
++        write(2, s, strlen(s));
++        write(2, message, strlen(message));
+-        fprintf(stderr,
+-            "%s\n"
+-            "This probably occurred because a *compiled* module has a bug\n"
+-            "in it and is not properly wrapped with sig_on(), sig_off().\n"
+-            "Python will now terminate.\n", s);
+-        print_sep();
+     }
+ 
+ dienow:
diff --git a/srcpkgs/python3-cysignals/template b/srcpkgs/python3-cysignals/template
new file mode 100644
index 000000000000..4655eead2a9c
--- /dev/null
+++ b/srcpkgs/python3-cysignals/template
@@ -0,0 +1,19 @@
+# Template file for 'python3-cysignals'
+pkgname=python3-cysignals
+version=1.11.2
+revision=1
+wrksrc="cysignals-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools python3-Cython autoconf"
+makedepends="python3-devel pari-devel"
+short_desc="Interrupt and signal handling for Cython "
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/sagemath/cysignals"
+distfiles="${PYPI_SITE}/c/cysignals/cysignals-${version}.tar.gz"
+checksum=5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
+nocross=yes # runs binaries built for target
+
+do_check() {
+	make check
+}

From 97f4e3be91bd4f30a89db3bb6887dc0846cd9e91 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 18:28:55 -0300
Subject: [PATCH 44/60] New package: python3-cypari2-2.1.2

---
 srcpkgs/python3-cypari2/template | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 srcpkgs/python3-cypari2/template

diff --git a/srcpkgs/python3-cypari2/template b/srcpkgs/python3-cypari2/template
new file mode 100644
index 000000000000..18755ec020b4
--- /dev/null
+++ b/srcpkgs/python3-cypari2/template
@@ -0,0 +1,19 @@
+# Template file for 'python3-cypari2'
+pkgname=python3-cypari2
+version=2.1.2
+revision=1
+wrksrc=cypari2-${version}
+build_style=python3-module
+hostmakedepends="python3-setuptools python3-Cython pari perl"
+makedepends="python3-devel python3-cysignals pari-devel gmp-devel"
+short_desc="Python interface to the number theory library PARI/GP"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-2.0-or-later"
+homepage="https://github.com/sagemath/cypari2"
+distfiles="${PYPI_SITE}/c/cypari2/cypari2-${version}.tar.gz"
+checksum=03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
+
+do_check() {
+	PYTHONPATH="$(cd build/lib* && pwd)" \
+		make check
+}

From dca176d202e0adbac1c0cca79e8919acfb53bcb8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 18:56:29 -0300
Subject: [PATCH 45/60] New package: python3-pplpy-0.8.7

---
 srcpkgs/python3-pplpy/template | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 srcpkgs/python3-pplpy/template

diff --git a/srcpkgs/python3-pplpy/template b/srcpkgs/python3-pplpy/template
new file mode 100644
index 000000000000..1cb69ffe6a07
--- /dev/null
+++ b/srcpkgs/python3-pplpy/template
@@ -0,0 +1,21 @@
+# Template file for 'python3-pplpy'
+pkgname=python3-pplpy
+version=0.8.7
+revision=1
+wrksrc="pplpy-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools python3-Cython"
+makedepends="python3-cysignals python3-gmpy2 python3-devel gmp-devel
+ gmpxx-devel ppl-devel mpfr-devel libmpc-devel pari-devel"
+short_desc="Python wrapper to the C++ Parma Polyhedra Library (PPL)"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-3.0-or-later"
+homepage="https://gitlab.com/videlec/pplpy"
+changelog="https://gitlab.com/videlec/pplpy/-/raw/master/CHANGES.txt"
+distfiles="${PYPI_SITE}/p/pplpy/pplpy-${version}.tar.gz"
+checksum=500bd0f4ae1a76956fae7fcba77854f5ec3e64fce76803664983763c3f2bd8bd
+
+do_check() {
+	PYTHONPATH=$(cd build/lib* && pwd) \
+		python setup.py test
+}

From 80c9b9342d5a6e496f9ac5419b670926ff84a310 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 01:14:24 -0300
Subject: [PATCH 46/60] New package: python3-fpylll-0.5.6

---
 srcpkgs/python3-fpylll/template | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 srcpkgs/python3-fpylll/template

diff --git a/srcpkgs/python3-fpylll/template b/srcpkgs/python3-fpylll/template
new file mode 100644
index 000000000000..dd2adcee6fce
--- /dev/null
+++ b/srcpkgs/python3-fpylll/template
@@ -0,0 +1,25 @@
+# Template file for 'python3-fpylll'
+pkgname=python3-fpylll
+version=0.5.6
+revision=1
+wrksrc="fpylll-${version}"
+build_style=python3-module
+hostmakedepends="python3-Cython"
+makedepends="python3-cysignals python3-devel gmp-devel mpfr-devel fplll-devel
+ pari-devel"
+checkdepends="python3-pytest python3-numpy"
+short_desc="Python wrapper to fplll (floating point lattice algorithms)"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-2.0-or-later"
+homepage="https://github.com/fplll/fpylll"
+distfiles="${PYPI_SITE}/f/fpylll/fpylll-${version}.tar.gz"
+checksum=6eb8a63fb933c0bf92f290dd66fd884807659214d0ce524afe3687a6a6b13a8b
+
+case $XBPS_TARGET_MACHINE in
+	# skip a test with numerical noise on 32 bit
+	i686*) make_check_args="-k not(averaged_simulate_prob)" ;;
+esac
+
+pre_check() {
+	export PY_IGNORE_IMPORTMISMATCH=1
+}

From 09fd6926bdea64c140a2356f156bf074a8d13f4b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 18:32:13 -0300
Subject: [PATCH 47/60] sagemath: use system Cython, cysignals, cypari2, pplpy,
 fpylll

---
 srcpkgs/sagemath/template | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f15bfbf76e0a..ba22ffbeaf30 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -58,26 +58,18 @@ checksum+="
 
 # packages from pypi (python modules)
 _upstream+="
- ${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
- ${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
- ${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
 
  ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
  ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
- ${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
  ${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
 
  ${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
  ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
 "
 checksum+="
- 03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
- 5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
- cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
 
  d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
  5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
- 471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
  78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
 
  ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
@@ -86,13 +78,11 @@ checksum+="
 
 # other upstream packages
 _upstream+="
- https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
  http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
  https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
  https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
 "
 checksum+="
- c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
  07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
  3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
  718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
@@ -107,11 +97,17 @@ _dontinstall="
  setuptools_scm_git_archive
  setuptools_wheel
  sphinxcontrib_websupport
+ pplpy_doc
 "
 
 # these packages can be used from system
 _usefromsystem="
  cppy
+ cython
+ cysignals
+ cypari
+ pplpy
+ fpylll
 "
 
 for u in ${_upstream}; do
@@ -306,6 +302,11 @@ _sage_python3_modules="
 
  python3-cvxopt
  python3-cppy
+ python3-Cython
+ python3-cysignals
+ python3-cypari2
+ python3-pplpy
+ python3-fpylll
  "
 
 # python packages are build and runtime dependencies

From d27012d85b95ae364f7833ce8adab7c1c80857a2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 01:15:55 -0300
Subject: [PATCH 48/60] sagemath: update to 9.5.rc2.

---
 srcpkgs/sagemath/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index ba22ffbeaf30..b9bd590b61ca 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -1,6 +1,6 @@
 # Template file for 'sagemath'
 pkgname=sagemath
-version=9.5.rc1
+version=9.5.rc2
 revision=1
 wrksrc=sage-$version
 build_style=configure
@@ -20,7 +20,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
-checksum=b015c54f7411669ef70bac2b2fde260e7f45724bcff170957b1f9fd08131f2c3
+checksum=c7eba867c11ab1b6d04535dd8df54640d3de0625ad96cdac17b17af977d96dce
 python_version=3
 patch_args="-F0 -Np1"
 

From 41ec1da54bb68d1ba49a48c0b46b0020611460b6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 09:52:14 -0300
Subject: [PATCH 49/60] sagemath: add timing information for doctests

This makes doctesting faster on many threads
---
 srcpkgs/sagemath-test/files/timings2.json |   1 +
 srcpkgs/sagemath-test/template            |  22 +-
 srcpkgs/sagemath/files/timings2.json      | 255 ++++++++++++++++++++++
 srcpkgs/sagemath/template                 |  21 +-
 4 files changed, 279 insertions(+), 20 deletions(-)
 create mode 120000 srcpkgs/sagemath-test/files/timings2.json
 create mode 100644 srcpkgs/sagemath/files/timings2.json

diff --git a/srcpkgs/sagemath-test/files/timings2.json b/srcpkgs/sagemath-test/files/timings2.json
new file mode 120000
index 000000000000..25d5309fc818
--- /dev/null
+++ b/srcpkgs/sagemath-test/files/timings2.json
@@ -0,0 +1 @@
+../../sagemath/files/timings2.json
\ No newline at end of file
diff --git a/srcpkgs/sagemath-test/template b/srcpkgs/sagemath-test/template
index 1c0d71683a1b..e3b1242bd338 100644
--- a/srcpkgs/sagemath-test/template
+++ b/srcpkgs/sagemath-test/template
@@ -14,19 +14,21 @@ homepage="none"
 
 do_check() {
 	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
-		_test_args=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+		_test_files=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	else
+		_test_files=--all
 	fi
-	if [ -z "$_test_args" ]; then
-		_test_args=--all
+	cp ${FILESDIR}/timings2.json .
+	_test_args="--stats_path=timings2.json"
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args+=" --long --warn-long 20.0"
+	else
+		_test_args+=" --warn-long 10.0"
 	fi
 	if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
 		# for CI use a predictable random seed
-		_test_args="--random-seed=0 $_test_args"
-	fi
-	if [ "$XBPS_CHECK_PKGS" = full ]; then
-		_test_args="--long $_test_args"
-	else
-		_test_args="--warn-long 5.0 $_test_args"
+		_test_args+=" --random-seed=0"
 	fi
-	sage -tp ${XBPS_MAKEJOBS} ${_test_args}
+	# since make check will build the docs, run test like this instead
+	sage -tp ${XBPS_MAKEJOBS} ${_test_args} ${_test_files}
 }
diff --git a/srcpkgs/sagemath/files/timings2.json b/srcpkgs/sagemath/files/timings2.json
new file mode 100644
index 000000000000..958a56d9d6f5
--- /dev/null
+++ b/srcpkgs/sagemath/files/timings2.json
@@ -0,0 +1,255 @@
+{
+  "doc.en.constructions.calculus": {"walltime": 64},
+  "doc.en.constructions.plotting": {"walltime": 28},
+  "doc.en.prep.Advanced-2DPlotting": {"walltime": 13},
+  "doc.en.thematic_tutorials.geometry.polyhedra_tutorial": {"walltime": 12},
+  "doc.en.thematic_tutorials.sandpile": {"walltime": 15},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_advanced": {"walltime": 31},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_cartesian": {"walltime": 36},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_change": {"walltime": 28},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_curvilinear": {"walltime": 35},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_plane": {"walltime": 18},
+  "sage.algebras.commutative_dga": {"walltime": 13},
+  "sage.algebras.lie_algebras.classical_lie_algebra": {"walltime": 121},
+  "sage.algebras.lie_algebras.nilpotent_lie_algebra": {"walltime": 13},
+  "sage.algebras.quantum_clifford": {"walltime": 13},
+  "sage.algebras.quatalg.quaternion_algebra": {"walltime": 10},
+  "sage.algebras.steenrod.steenrod_algebra": {"walltime": 51},
+  "sage.arith.misc": {"walltime": 24},
+  "sage.calculus.calculus": {"walltime": 16},
+  "sage.calculus.functional": {"walltime": 12},
+  "sage.calculus.riemann": {"walltime": 49},
+  "sage.calculus.tests": {"walltime": 15},
+  "sage.calculus.transforms.dwt": {"walltime": 25},
+  "sage.categories.finite_monoids": {"walltime": 13},
+  "sage.categories.super_hopf_algebras_with_basis": {"walltime": 27},
+  "sage.coding.ag_code": {"walltime": 48},
+  "sage.coding.ag_code_decoders": {"walltime": 187},
+  "sage.coding.linear_code": {"walltime": 19},
+  "sage.combinat.backtrack": {"walltime": 30},
+  "sage.combinat.chas.wqsym": {"walltime": 42},
+  "sage.combinat.cluster_algebra_quiver.cluster_seed": {"walltime": 60},
+  "sage.combinat.cluster_algebra_quiver.quiver": {"walltime": 169},
+  "sage.combinat.crystals.affine_factorization": {"walltime": 13},
+  "sage.combinat.crystals.alcove_path": {"walltime": 37},
+  "sage.combinat.crystals.kirillov_reshetikhin": {"walltime": 16},
+  "sage.combinat.crystals.littelmann_path": {"walltime": 13},
+  "sage.combinat.crystals.mv_polytopes": {"walltime": 20},
+  "sage.combinat.crystals.pbw_crystal": {"walltime": 21},
+  "sage.combinat.designs.database": {"walltime": 21},
+  "sage.combinat.designs.gen_quadrangles_with_spread": {"walltime": 114},
+  "sage.combinat.designs.orthogonal_arrays_build_recursive": {"walltime": 12},
+  "sage.combinat.diagram_algebras": {"walltime": 49},
+  "sage.combinat.fqsym": {"walltime": 22},
+  "sage.combinat.k_tableau": {"walltime": 14},
+  "sage.combinat.ncsf_qsym.ncsf": {"walltime": 14},
+  "sage.combinat.ncsf_qsym.qsym": {"walltime": 12},
+  "sage.combinat.partition": {"walltime": 11},
+  "sage.combinat.partition_kleshchev": {"walltime": 19},
+  "sage.combinat.posets.moebius_algebra": {"walltime": 12},
+  "sage.combinat.rigged_configurations.kr_tableaux": {"walltime": 28},
+  "sage.combinat.rigged_configurations.rigged_configurations": {"walltime": 13},
+  "sage.combinat.rigged_configurations.tensor_product_kr_tableaux": {"walltime": 15},
+  "sage.combinat.root_system.integrable_representations": {"walltime": 12},
+  "sage.combinat.root_system.non_symmetric_macdonald_polynomials": {"walltime": 21},
+  "sage.combinat.root_system.plot": {"walltime": 37},
+  "sage.combinat.root_system.root_lattice_realization_algebras": {"walltime": 17},
+  "sage.combinat.root_system.root_lattice_realizations": {"walltime": 24},
+  "sage.combinat.rsk": {"walltime": 36},
+  "sage.combinat.sf.classical": {"walltime": 11},
+  "sage.combinat.sf.k_dual": {"walltime": 13},
+  "sage.combinat.sf.llt": {"walltime": 13},
+  "sage.combinat.sf.macdonald": {"walltime": 58},
+  "sage.combinat.sf.sfa": {"walltime": 25},
+  "sage.combinat.shifted_primed_tableau": {"walltime": 14},
+  "sage.combinat.symmetric_group_algebra": {"walltime": 11},
+  "sage.combinat.tableau": {"walltime": 20},
+  "sage.combinat.tableau_tuple": {"walltime": 29},
+  "sage.combinat.tiling": {"walltime": 305},
+  "sage.combinat.tutorial": {"walltime": 13},
+  "sage.combinat.words.paths": {"walltime": 85},
+  "sage.crypto.block_cipher.des": {"walltime": 21},
+  "sage.crypto.mq.sr": {"walltime": 53},
+  "sage.crypto.sbox": {"walltime": 14},
+  "sage.doctest.forker": {"walltime": 14},
+  "sage.doctest.sources": {"walltime": 93},
+  "sage.doctest.test": {"walltime": 149},
+  "sage.dynamics.arithmetic_dynamics.projective_ds": {"walltime": 48},
+  "sage.dynamics.complex_dynamics.mandel_julia": {"walltime": 16},
+  "sage.functions.bessel": {"walltime": 14},
+  "sage.functions.exp_integral": {"walltime": 12},
+  "sage.functions.other": {"walltime": 15},
+  "sage.geometry.cone": {"walltime": 24},
+  "sage.geometry.hyperplane_arrangement.arrangement": {"walltime": 14},
+  "sage.geometry.lattice_polytope": {"walltime": 12},
+  "sage.geometry.polyhedral_complex": {"walltime": 11},
+  "sage.geometry.polyhedron.base": {"walltime": 33},
+  "sage.geometry.polyhedron.library": {"walltime": 41},
+  "sage.geometry.riemannian_manifolds.parametrized_surface3d": {"walltime": 22},
+  "sage.geometry.triangulation.base": {"walltime": 22},
+  "sage.geometry.triangulation.point_configuration": {"walltime": 14},
+  "sage.graphs.connectivity": {"walltime": 17},
+  "sage.graphs.generators.basic": {"walltime": 10},
+  "sage.graphs.generators.classical_geometries": {"walltime": 30},
+  "sage.graphs.generators.distance_regular": {"walltime": 196},
+  "sage.graphs.generators.families": {"walltime": 21},
+  "sage.graphs.generators.smallgraphs": {"walltime": 22},
+  "sage.graphs.generic_graph": {"walltime": 29},
+  "sage.graphs.genus": {"walltime": 12},
+  "sage.graphs.graph": {"walltime": 20},
+  "sage.graphs.strongly_regular_db": {"walltime": 22},
+  "sage.groups.cubic_braid": {"walltime": 19},
+  "sage.groups.fqf_orthogonal": {"walltime": 19},
+  "sage.groups.lie_gps.nilpotent_lie_group": {"walltime": 10},
+  "sage.groups.matrix_gps.heisenberg": {"walltime": 41},
+  "sage.groups.perm_gps.cubegroup": {"walltime": 11},
+  "sage.homology.homology_vector_space_with_basis": {"walltime": 10},
+  "sage.interacts.test_jupyter": {"walltime": 17},
+  "sage.interfaces.gap": {"walltime": 11},
+  "sage.interfaces.maxima_abstract": {"walltime": 46},
+  "sage.libs.eclib.interface": {"walltime": 22},
+  "sage.libs.eclib.mwrank": {"walltime": 16},
+  "sage.libs.gap.test_long": {"walltime": 43},
+  "sage.libs.giac": {"walltime": 42},
+  "sage.manifolds.chart": {"walltime": 34},
+  "sage.manifolds.differentiable.affine_connection": {"walltime": 138},
+  "sage.manifolds.differentiable.automorphismfield": {"walltime": 33},
+  "sage.manifolds.differentiable.characteristic_cohomology_class": {"walltime": 260},
+  "sage.manifolds.differentiable.curve": {"walltime": 18},
+  "sage.manifolds.differentiable.degenerate": {"walltime": 27},
+  "sage.manifolds.differentiable.degenerate_submanifold": {"walltime": 239},
+  "sage.manifolds.differentiable.diff_form": {"walltime": 48},
+  "sage.manifolds.differentiable.diff_map": {"walltime": 10},
+  "sage.manifolds.differentiable.examples.euclidean": {"walltime": 48},
+  "sage.manifolds.differentiable.examples.sphere": {"walltime": 33},
+  "sage.manifolds.differentiable.integrated_curve": {"walltime": 29},
+  "sage.manifolds.differentiable.levi_civita_connection": {"walltime": 27},
+  "sage.manifolds.differentiable.manifold": {"walltime": 12},
+  "sage.manifolds.differentiable.manifold_homset": {"walltime": 16},
+  "sage.manifolds.differentiable.metric": {"walltime": 95},
+  "sage.manifolds.differentiable.mixed_form": {"walltime": 14},
+  "sage.manifolds.differentiable.mixed_form_algebra": {"walltime": 11},
+  "sage.manifolds.differentiable.multivectorfield": {"walltime": 71},
+  "sage.manifolds.differentiable.pseudo_riemannian": {"walltime": 20},
+  "sage.manifolds.differentiable.pseudo_riemannian_submanifold": {"walltime": 127},
+  "sage.manifolds.differentiable.scalarfield": {"walltime": 19},
+  "sage.manifolds.differentiable.tangent_vector": {"walltime": 17},
+  "sage.manifolds.differentiable.tensorfield": {"walltime": 128},
+  "sage.manifolds.differentiable.tensorfield_paral": {"walltime": 15},
+  "sage.manifolds.differentiable.vector_bundle": {"walltime": 13},
+  "sage.manifolds.differentiable.vectorfield": {"walltime": 53},
+  "sage.manifolds.point": {"walltime": 21},
+  "sage.manifolds.scalarfield": {"walltime": 15},
+  "sage.manifolds.section": {"walltime": 28},
+  "sage.matrix.matrix2": {"walltime": 18},
+  "sage.matrix.matrix_integer_dense": {"walltime": 15},
+  "sage.matrix.matrix_integer_dense_hnf": {"walltime": 35},
+  "sage.matroids.catalog": {"walltime": 59},
+  "sage.misc.cachefunc": {"walltime": 13},
+  "sage.misc.functional": {"walltime": 10},
+  "sage.misc.randstate": {"walltime": 16},
+  "sage.misc.sagedoc": {"walltime": 56},
+  "sage.misc.sageinspect": {"walltime": 38},
+  "sage.modular.abvar.abvar": {"walltime": 12},
+  "sage.modular.abvar.lseries": {"walltime": 10},
+  "sage.modular.btquotients.pautomorphicform": {"walltime": 31},
+  "sage.modular.hypergeometric_motive": {"walltime": 12},
+  "sage.modular.local_comp.local_comp": {"walltime": 27},
+  "sage.modular.local_comp.type_space": {"walltime": 24},
+  "sage.modular.modform.ambient_R": {"walltime": 11},
+  "sage.modular.modform.cuspidal_submodule": {"walltime": 15},
+  "sage.modular.modform.element": {"walltime": 60},
+  "sage.modular.modform.ring": {"walltime": 50},
+  "sage.modular.modform_hecketriangle.abstract_space": {"walltime": 12},
+  "sage.modular.modform_hecketriangle.graded_ring_element": {"walltime": 23},
+  "sage.modular.modform_hecketriangle.hecke_triangle_group_element": {"walltime": 26},
+  "sage.modular.modform_hecketriangle.readme": {"walltime": 19},
+  "sage.modular.modsym.ambient": {"walltime": 15},
+  "sage.modular.pollack_stevens.modsym": {"walltime": 63},
+  "sage.modular.pollack_stevens.padic_lseries": {"walltime": 36},
+  "sage.modules.finite_submodule_iter": {"walltime": 22},
+  "sage.modules.free_module": {"walltime": 22},
+  "sage.modules.free_module_integer": {"walltime": 28},
+  "sage.modules.torsion_quadratic_module": {"walltime": 22},
+  "sage.plot.animate": {"walltime": 129},
+  "sage.plot.contour_plot": {"walltime": 38},
+  "sage.plot.graphics": {"walltime": 43},
+  "sage.plot.line": {"walltime": 12},
+  "sage.plot.matrix_plot": {"walltime": 15},
+  "sage.plot.multigraphics": {"walltime": 26},
+  "sage.plot.plot": {"walltime": 77},
+  "sage.plot.plot3d.base": {"walltime": 12},
+  "sage.plot.plot3d.implicit_plot3d": {"walltime": 20},
+  "sage.plot.plot3d.parametric_plot3d": {"walltime": 11},
+  "sage.plot.plot3d.plot3d": {"walltime": 18},
+  "sage.plot.plot3d.transform": {"walltime": 34},
+  "sage.quadratic_forms.genera.genus": {"walltime": 19},
+  "sage.quadratic_forms.quadratic_form__local_representation_conditions": {"walltime": 48},
+  "sage.rings.asymptotic.asymptotic_expansion_generators": {"walltime": 61},
+  "sage.rings.asymptotic.asymptotics_multivariate_generating_functions": {"walltime": 36},
+  "sage.rings.function_field.function_field": {"walltime": 225},
+  "sage.rings.function_field.function_field_valuation": {"walltime": 47},
+  "sage.rings.function_field.ideal": {"walltime": 10},
+  "sage.rings.integer": {"walltime": 164},
+  "sage.rings.number_field.number_field": {"walltime": 79},
+  "sage.rings.number_field.number_field_element": {"walltime": 13},
+  "sage.rings.number_field.totallyreal": {"walltime": 14},
+  "sage.rings.padics.padic_base_leaves": {"walltime": 76},
+  "sage.rings.padics.padic_extension_leaves": {"walltime": 46},
+  "sage.rings.padics.padic_generic_element": {"walltime": 14},
+  "sage.rings.padics.padic_lattice_element": {"walltime": 25},
+  "sage.rings.padics.relative_extension_leaves": {"walltime": 42},
+  "sage.rings.polynomial.multi_polynomial_ideal": {"walltime": 11},
+  "sage.rings.polynomial.multi_polynomial_sequence": {"walltime": 28},
+  "sage.rings.polynomial.polynomial_element": {"walltime": 16},
+  "sage.rings.polynomial.polynomial_zmod_flint": {"walltime": 336},
+  "sage.rings.qqbar": {"walltime": 21},
+  "sage.rings.tests": {"walltime": 19},
+  "sage.rings.valuation.augmented_valuation": {"walltime": 28},
+  "sage.rings.valuation.mapped_valuation": {"walltime": 56},
+  "sage.schemes.curves.affine_curve": {"walltime": 23},
+  "sage.schemes.curves.projective_curve": {"walltime": 24},
+  "sage.schemes.cyclic_covers.cycliccover_finite_field": {"walltime": 78},
+  "sage.schemes.elliptic_curves.BSD": {"walltime": 10},
+  "sage.schemes.elliptic_curves.constructor": {"walltime": 27},
+  "sage.schemes.elliptic_curves.ell_curve_isogeny": {"walltime": 21},
+  "sage.schemes.elliptic_curves.ell_egros": {"walltime": 28},
+  "sage.schemes.elliptic_curves.ell_modular_symbols": {"walltime": 12},
+  "sage.schemes.elliptic_curves.ell_number_field": {"walltime": 120},
+  "sage.schemes.elliptic_curves.ell_rational_field": {"walltime": 133},
+  "sage.schemes.elliptic_curves.gal_reps_number_field": {"walltime": 35},
+  "sage.schemes.elliptic_curves.gp_simon": {"walltime": 22},
+  "sage.schemes.elliptic_curves.heegner": {"walltime": 39},
+  "sage.schemes.elliptic_curves.height": {"walltime": 56},
+  "sage.schemes.elliptic_curves.isogeny_class": {"walltime": 38},
+  "sage.schemes.elliptic_curves.isogeny_small_degree": {"walltime": 274},
+  "sage.schemes.elliptic_curves.kraus": {"walltime": 12},
+  "sage.schemes.elliptic_curves.mod_sym_num": {"walltime": 12},
+  "sage.schemes.elliptic_curves.padics": {"walltime": 15},
+  "sage.schemes.elliptic_curves.saturation": {"walltime": 19},
+  "sage.schemes.elliptic_curves.sha_tate": {"walltime": 23},
+  "sage.schemes.hyperelliptic_curves.hyperelliptic_finite_field": {"walltime": 65},
+  "sage.schemes.hyperelliptic_curves.hyperelliptic_padic_field": {"walltime": 25},
+  "sage.schemes.projective.projective_rational_point": {"walltime": 11},
+  "sage.schemes.riemann_surfaces.riemann_surface": {"walltime": 53},
+  "sage.stats.distributions.discrete_gaussian_integer": {"walltime": 10},
+  "sage.structure.coerce_dict": {"walltime": 33},
+  "sage.structure.element": {"walltime": 16},
+  "sage.symbolic.expression": {"walltime": 38},
+  "sage.symbolic.integration.integral": {"walltime": 35},
+  "sage.symbolic.random_tests": {"walltime": 31},
+  "sage.symbolic.relation": {"walltime": 11},
+  "sage.tests.book_schilling_zabrocki_kschur_primer": {"walltime": 36},
+  "sage.tests.book_stein_ent": {"walltime": 15},
+  "sage.tests.books.computational-mathematics-with-sagemath.combinat_doctest": {"walltime": 40},
+  "sage.tests.books.computational-mathematics-with-sagemath.float_doctest": {"walltime": 17},
+  "sage.tests.books.computational-mathematics-with-sagemath.graphique_doctest": {"walltime": 29},
+  "sage.tests.books.computational-mathematics-with-sagemath.integration_doctest": {"walltime": 28},
+  "sage.tests.books.computational-mathematics-with-sagemath.nonlinear_doctest": {"walltime": 11},
+  "sage.tests.books.computational-mathematics-with-sagemath.sol.graphique_doctest": {"walltime": 17},
+  "sage.tests.books.computational-mathematics-with-sagemath.sol.numbertheory_doctest": {"walltime": 14},
+  "sage.tests.books.computational-mathematics-with-sagemath.sol.polynomes_doctest": {"walltime": 19},
+  "sage.tests.cmdline": {"walltime": 44},
+  "sage.tests.gosper-sum": {"walltime": 11},
+  "sage.topology.simplicial_complex_examples": {"walltime": 14}
+}
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index b9bd590b61ca..8f27de532058 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -206,22 +206,23 @@ do_install() {
 
 do_check() {
 	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
-		_test_args=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+		_test_files=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	else
+		_test_files=--all
 	fi
-	if [ -z "$_test_args" ]; then
-		_test_args=--all
+	cp ${FILESDIR}/timings2.json .
+	_test_args="--stats_path=timings2.json"
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args+=" --long --warn-long 20.0"
+	else
+		_test_args+=" --warn-long 10.0"
 	fi
 	if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
 		# for CI use a predictable random seed
-		_test_args="--random-seed=0 $_test_args"
-	fi
-	if [ "$XBPS_CHECK_PKGS" = full ]; then
-		_test_args="--long $_test_args"
-	else
-		_test_args="--warn-long 5.0 $_test_args"
+		_test_args+=" --random-seed=0"
 	fi
 	# since make check will build the docs, run test like this instead
-	./sage -tp ${XBPS_MAKEJOBS} ${_test_args}
+	./sage -tp ${XBPS_MAKEJOBS} ${_test_args} ${_test_files}
 }
 
 ### copied from sage-deps, to be kept in sync

From ee15ca43ec30d0e43a975b970ce4a41feaf8e835 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 02:54:00 -0300
Subject: [PATCH 50/60] changed_templates: do not merge with master

---
 common/travis/changed_templates.sh | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/common/travis/changed_templates.sh b/common/travis/changed_templates.sh
index 686436ce4327..5501b968cf1e 100755
--- a/common/travis/changed_templates.sh
+++ b/common/travis/changed_templates.sh
@@ -20,6 +20,9 @@ base="$($GIT_CMD merge-base FETCH_HEAD "$tip")" || {
 	exit 1
 }
 
+# tip = commit of the PR; this avoids merging to master
+$GIT_CMD checkout "$tip"
+
 echo "$base $tip" >/tmp/revisions
 
 /bin/echo -e '\x1b[32mChanged packages:\x1b[0m'

From bccf99adbd2a5da513c452f1ec680fda7fb6253d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 10:26:57 -0300
Subject: [PATCH 51/60] sagemath: round timings to power of 2 for stability

---
 srcpkgs/sagemath/files/timings2.json | 629 ++++++++++++++++-----------
 1 file changed, 386 insertions(+), 243 deletions(-)

diff --git a/srcpkgs/sagemath/files/timings2.json b/srcpkgs/sagemath/files/timings2.json
index 958a56d9d6f5..71a9aa84ce58 100644
--- a/srcpkgs/sagemath/files/timings2.json
+++ b/srcpkgs/sagemath/files/timings2.json
@@ -1,255 +1,398 @@
 {
+  "doc.ca.intro.index": {"walltime": 8},
   "doc.en.constructions.calculus": {"walltime": 64},
-  "doc.en.constructions.plotting": {"walltime": 28},
-  "doc.en.prep.Advanced-2DPlotting": {"walltime": 13},
-  "doc.en.thematic_tutorials.geometry.polyhedra_tutorial": {"walltime": 12},
-  "doc.en.thematic_tutorials.sandpile": {"walltime": 15},
-  "doc.en.thematic_tutorials.vector_calculus.vector_calc_advanced": {"walltime": 31},
-  "doc.en.thematic_tutorials.vector_calculus.vector_calc_cartesian": {"walltime": 36},
-  "doc.en.thematic_tutorials.vector_calculus.vector_calc_change": {"walltime": 28},
-  "doc.en.thematic_tutorials.vector_calculus.vector_calc_curvilinear": {"walltime": 35},
-  "doc.en.thematic_tutorials.vector_calculus.vector_calc_plane": {"walltime": 18},
-  "sage.algebras.commutative_dga": {"walltime": 13},
-  "sage.algebras.lie_algebras.classical_lie_algebra": {"walltime": 121},
-  "sage.algebras.lie_algebras.nilpotent_lie_algebra": {"walltime": 13},
-  "sage.algebras.quantum_clifford": {"walltime": 13},
-  "sage.algebras.quatalg.quaternion_algebra": {"walltime": 10},
-  "sage.algebras.steenrod.steenrod_algebra": {"walltime": 51},
-  "sage.arith.misc": {"walltime": 24},
+  "doc.en.constructions.plotting": {"walltime": 32},
+  "doc.en.prep.Advanced-2DPlotting": {"walltime": 16},
+  "doc.en.prep.Calculus": {"walltime": 8},
+  "doc.en.prep.Symbolics-and-Basic-Plotting": {"walltime": 8},
+  "doc.en.thematic_tutorials.explicit_methods_in_number_theory.birds_other": {"walltime": 8},
+  "doc.en.thematic_tutorials.explicit_methods_in_number_theory.elliptic_curves": {"walltime": 8},
+  "doc.en.thematic_tutorials.geometry.polyhedra_tutorial": {"walltime": 16},
+  "doc.en.thematic_tutorials.sandpile": {"walltime": 16},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_advanced": {"walltime": 32},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_cartesian": {"walltime": 32},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_change": {"walltime": 32},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_curvilinear": {"walltime": 32},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_plane": {"walltime": 16},
+  "doc.ja.tutorial.tour_plotting": {"walltime": 8},
+  "sage.algebras.cluster_algebra": {"walltime": 8},
+  "sage.algebras.commutative_dga": {"walltime": 16},
+  "sage.algebras.hecke_algebras.ariki_koike_algebra": {"walltime": 8},
+  "sage.algebras.iwahori_hecke_algebra": {"walltime": 8},
+  "sage.algebras.lie_algebras.classical_lie_algebra": {"walltime": 128},
+  "sage.algebras.lie_algebras.nilpotent_lie_algebra": {"walltime": 16},
+  "sage.algebras.quantum_clifford": {"walltime": 16},
+  "sage.algebras.quantum_groups.fock_space": {"walltime": 8},
+  "sage.algebras.quatalg.quaternion_algebra": {"walltime": 8},
+  "sage.algebras.steenrod.steenrod_algebra": {"walltime": 64},
+  "sage.algebras.steenrod.steenrod_algebra_bases": {"walltime": 8},
+  "sage.algebras.yangian": {"walltime": 8},
+  "sage.arith.misc": {"walltime": 32},
   "sage.calculus.calculus": {"walltime": 16},
-  "sage.calculus.functional": {"walltime": 12},
-  "sage.calculus.riemann": {"walltime": 49},
-  "sage.calculus.tests": {"walltime": 15},
-  "sage.calculus.transforms.dwt": {"walltime": 25},
-  "sage.categories.finite_monoids": {"walltime": 13},
-  "sage.categories.super_hopf_algebras_with_basis": {"walltime": 27},
-  "sage.coding.ag_code": {"walltime": 48},
-  "sage.coding.ag_code_decoders": {"walltime": 187},
-  "sage.coding.linear_code": {"walltime": 19},
-  "sage.combinat.backtrack": {"walltime": 30},
-  "sage.combinat.chas.wqsym": {"walltime": 42},
-  "sage.combinat.cluster_algebra_quiver.cluster_seed": {"walltime": 60},
-  "sage.combinat.cluster_algebra_quiver.quiver": {"walltime": 169},
-  "sage.combinat.crystals.affine_factorization": {"walltime": 13},
-  "sage.combinat.crystals.alcove_path": {"walltime": 37},
+  "sage.calculus.desolvers": {"walltime": 8},
+  "sage.calculus.functional": {"walltime": 8},
+  "sage.calculus.riemann": {"walltime": 64},
+  "sage.calculus.tests": {"walltime": 16},
+  "sage.calculus.transforms.dwt": {"walltime": 16},
+  "sage.calculus.transforms.fft": {"walltime": 8},
+  "sage.categories.coxeter_groups": {"walltime": 8},
+  "sage.categories.finite_monoids": {"walltime": 16},
+  "sage.categories.lie_conformal_algebras": {"walltime": 8},
+  "sage.categories.loop_crystals": {"walltime": 8},
+  "sage.categories.pushout": {"walltime": 8},
+  "sage.categories.super_hopf_algebras_with_basis": {"walltime": 32},
+  "sage.categories.super_lie_conformal_algebras": {"walltime": 8},
+  "sage.coding.ag_code": {"walltime": 64},
+  "sage.coding.ag_code_decoders": {"walltime": 128},
+  "sage.coding.binary_code": {"walltime": 8},
+  "sage.coding.linear_code": {"walltime": 16},
+  "sage.combinat.backtrack": {"walltime": 32},
+  "sage.combinat.chas.wqsym": {"walltime": 32},
+  "sage.combinat.cluster_algebra_quiver.cluster_seed": {"walltime": 64},
+  "sage.combinat.cluster_algebra_quiver.quiver": {"walltime": 128},
+  "sage.combinat.crystals.affine_factorization": {"walltime": 16},
+  "sage.combinat.crystals.alcove_path": {"walltime": 32},
+  "sage.combinat.crystals.highest_weight_crystals": {"walltime": 8},
   "sage.combinat.crystals.kirillov_reshetikhin": {"walltime": 16},
-  "sage.combinat.crystals.littelmann_path": {"walltime": 13},
-  "sage.combinat.crystals.mv_polytopes": {"walltime": 20},
-  "sage.combinat.crystals.pbw_crystal": {"walltime": 21},
-  "sage.combinat.designs.database": {"walltime": 21},
-  "sage.combinat.designs.gen_quadrangles_with_spread": {"walltime": 114},
-  "sage.combinat.designs.orthogonal_arrays_build_recursive": {"walltime": 12},
-  "sage.combinat.diagram_algebras": {"walltime": 49},
-  "sage.combinat.fqsym": {"walltime": 22},
-  "sage.combinat.k_tableau": {"walltime": 14},
-  "sage.combinat.ncsf_qsym.ncsf": {"walltime": 14},
-  "sage.combinat.ncsf_qsym.qsym": {"walltime": 12},
-  "sage.combinat.partition": {"walltime": 11},
-  "sage.combinat.partition_kleshchev": {"walltime": 19},
-  "sage.combinat.posets.moebius_algebra": {"walltime": 12},
-  "sage.combinat.rigged_configurations.kr_tableaux": {"walltime": 28},
-  "sage.combinat.rigged_configurations.rigged_configurations": {"walltime": 13},
-  "sage.combinat.rigged_configurations.tensor_product_kr_tableaux": {"walltime": 15},
-  "sage.combinat.root_system.integrable_representations": {"walltime": 12},
-  "sage.combinat.root_system.non_symmetric_macdonald_polynomials": {"walltime": 21},
-  "sage.combinat.root_system.plot": {"walltime": 37},
-  "sage.combinat.root_system.root_lattice_realization_algebras": {"walltime": 17},
-  "sage.combinat.root_system.root_lattice_realizations": {"walltime": 24},
-  "sage.combinat.rsk": {"walltime": 36},
-  "sage.combinat.sf.classical": {"walltime": 11},
-  "sage.combinat.sf.k_dual": {"walltime": 13},
-  "sage.combinat.sf.llt": {"walltime": 13},
-  "sage.combinat.sf.macdonald": {"walltime": 58},
-  "sage.combinat.sf.sfa": {"walltime": 25},
-  "sage.combinat.shifted_primed_tableau": {"walltime": 14},
-  "sage.combinat.symmetric_group_algebra": {"walltime": 11},
-  "sage.combinat.tableau": {"walltime": 20},
-  "sage.combinat.tableau_tuple": {"walltime": 29},
-  "sage.combinat.tiling": {"walltime": 305},
-  "sage.combinat.tutorial": {"walltime": 13},
-  "sage.combinat.words.paths": {"walltime": 85},
-  "sage.crypto.block_cipher.des": {"walltime": 21},
-  "sage.crypto.mq.sr": {"walltime": 53},
-  "sage.crypto.sbox": {"walltime": 14},
-  "sage.doctest.forker": {"walltime": 14},
-  "sage.doctest.sources": {"walltime": 93},
-  "sage.doctest.test": {"walltime": 149},
-  "sage.dynamics.arithmetic_dynamics.projective_ds": {"walltime": 48},
+  "sage.combinat.crystals.letters": {"walltime": 8},
+  "sage.combinat.crystals.littelmann_path": {"walltime": 16},
+  "sage.combinat.crystals.mv_polytopes": {"walltime": 16},
+  "sage.combinat.crystals.pbw_crystal": {"walltime": 16},
+  "sage.combinat.crystals.star_crystal": {"walltime": 8},
+  "sage.combinat.designs.bibd": {"walltime": 8},
+  "sage.combinat.designs.database": {"walltime": 16},
+  "sage.combinat.designs.difference_family": {"walltime": 8},
+  "sage.combinat.designs.gen_quadrangles_with_spread": {"walltime": 128},
+  "sage.combinat.designs.orthogonal_arrays_build_recursive": {"walltime": 16},
+  "sage.combinat.designs.orthogonal_arrays_find_recursive": {"walltime": 8},
+  "sage.combinat.diagram_algebras": {"walltime": 64},
+  "sage.combinat.fqsym": {"walltime": 32},
+  "sage.combinat.free_prelie_algebra": {"walltime": 8},
+  "sage.combinat.fully_commutative_elements": {"walltime": 8},
+  "sage.combinat.grossman_larson_algebras": {"walltime": 8},
+  "sage.combinat.interval_posets": {"walltime": 8},
+  "sage.combinat.k_regular_sequence": {"walltime": 8},
+  "sage.combinat.k_tableau": {"walltime": 16},
+  "sage.combinat.matrices.hadamard_matrix": {"walltime": 8},
+  "sage.combinat.multiset_partition_into_sets_ordered": {"walltime": 8},
+  "sage.combinat.ncsf_qsym.ncsf": {"walltime": 16},
+  "sage.combinat.ncsf_qsym.qsym": {"walltime": 16},
+  "sage.combinat.partition": {"walltime": 16},
+  "sage.combinat.partition_kleshchev": {"walltime": 16},
+  "sage.combinat.partition_tuple": {"walltime": 8},
+  "sage.combinat.posets.moebius_algebra": {"walltime": 16},
+  "sage.combinat.posets.posets": {"walltime": 8},
+  "sage.combinat.rigged_configurations.kr_tableaux": {"walltime": 32},
+  "sage.combinat.rigged_configurations.rigged_configurations": {"walltime": 16},
+  "sage.combinat.rigged_configurations.tensor_product_kr_tableaux": {"walltime": 16},
+  "sage.combinat.root_system.associahedron": {"walltime": 8},
+  "sage.combinat.root_system.branching_rules": {"walltime": 8},
+  "sage.combinat.root_system.fusion_ring": {"walltime": 8},
+  "sage.combinat.root_system.integrable_representations": {"walltime": 16},
+  "sage.combinat.root_system.non_symmetric_macdonald_polynomials": {"walltime": 16},
+  "sage.combinat.root_system.pieri_factors": {"walltime": 8},
+  "sage.combinat.root_system.plot": {"walltime": 32},
+  "sage.combinat.root_system.root_lattice_realization_algebras": {"walltime": 16},
+  "sage.combinat.root_system.root_lattice_realizations": {"walltime": 16},
+  "sage.combinat.root_system.root_system": {"walltime": 8},
+  "sage.combinat.root_system.weyl_group": {"walltime": 8},
+  "sage.combinat.rsk": {"walltime": 32},
+  "sage.combinat.sf.classical": {"walltime": 16},
+  "sage.combinat.sf.jack": {"walltime": 16},
+  "sage.combinat.sf.k_dual": {"walltime": 16},
+  "sage.combinat.sf.llt": {"walltime": 16},
+  "sage.combinat.sf.macdonald": {"walltime": 64},
+  "sage.combinat.sf.new_kschur": {"walltime": 8},
+  "sage.combinat.sf.sfa": {"walltime": 32},
+  "sage.combinat.shifted_primed_tableau": {"walltime": 16},
+  "sage.combinat.skew_tableau": {"walltime": 8},
+  "sage.combinat.symmetric_group_algebra": {"walltime": 16},
+  "sage.combinat.tableau": {"walltime": 32},
+  "sage.combinat.tableau_tuple": {"walltime": 32},
+  "sage.combinat.tiling": {"walltime": 256},
+  "sage.combinat.tutorial": {"walltime": 16},
+  "sage.combinat.words.paths": {"walltime": 64},
+  "sage.crypto.block_cipher.des": {"walltime": 16},
+  "sage.crypto.mq.sr": {"walltime": 64},
+  "sage.crypto.sbox": {"walltime": 16},
+  "sage.crypto.sboxes": {"walltime": 8},
+  "sage.doctest.forker": {"walltime": 16},
+  "sage.doctest.sources": {"walltime": 64},
+  "sage.doctest.test": {"walltime": 128},
+  "sage.dynamics.arithmetic_dynamics.projective_ds": {"walltime": 64},
+  "sage.dynamics.arithmetic_dynamics.wehlerK3": {"walltime": 8},
+  "sage.dynamics.cellular_automata.glca": {"walltime": 8},
+  "sage.dynamics.cellular_automata.solitons": {"walltime": 8},
   "sage.dynamics.complex_dynamics.mandel_julia": {"walltime": 16},
-  "sage.functions.bessel": {"walltime": 14},
-  "sage.functions.exp_integral": {"walltime": 12},
-  "sage.functions.other": {"walltime": 15},
-  "sage.geometry.cone": {"walltime": 24},
-  "sage.geometry.hyperplane_arrangement.arrangement": {"walltime": 14},
-  "sage.geometry.lattice_polytope": {"walltime": 12},
-  "sage.geometry.polyhedral_complex": {"walltime": 11},
-  "sage.geometry.polyhedron.base": {"walltime": 33},
-  "sage.geometry.polyhedron.library": {"walltime": 41},
-  "sage.geometry.riemannian_manifolds.parametrized_surface3d": {"walltime": 22},
-  "sage.geometry.triangulation.base": {"walltime": 22},
-  "sage.geometry.triangulation.point_configuration": {"walltime": 14},
-  "sage.graphs.connectivity": {"walltime": 17},
-  "sage.graphs.generators.basic": {"walltime": 10},
-  "sage.graphs.generators.classical_geometries": {"walltime": 30},
-  "sage.graphs.generators.distance_regular": {"walltime": 196},
-  "sage.graphs.generators.families": {"walltime": 21},
-  "sage.graphs.generators.smallgraphs": {"walltime": 22},
-  "sage.graphs.generic_graph": {"walltime": 29},
-  "sage.graphs.genus": {"walltime": 12},
-  "sage.graphs.graph": {"walltime": 20},
-  "sage.graphs.strongly_regular_db": {"walltime": 22},
-  "sage.groups.cubic_braid": {"walltime": 19},
-  "sage.groups.fqf_orthogonal": {"walltime": 19},
-  "sage.groups.lie_gps.nilpotent_lie_group": {"walltime": 10},
-  "sage.groups.matrix_gps.heisenberg": {"walltime": 41},
-  "sage.groups.perm_gps.cubegroup": {"walltime": 11},
-  "sage.homology.homology_vector_space_with_basis": {"walltime": 10},
-  "sage.interacts.test_jupyter": {"walltime": 17},
-  "sage.interfaces.gap": {"walltime": 11},
-  "sage.interfaces.maxima_abstract": {"walltime": 46},
-  "sage.libs.eclib.interface": {"walltime": 22},
+  "sage.functions.bessel": {"walltime": 16},
+  "sage.functions.exp_integral": {"walltime": 8},
+  "sage.functions.hypergeometric": {"walltime": 8},
+  "sage.functions.other": {"walltime": 16},
+  "sage.functions.piecewise": {"walltime": 8},
+  "sage.games.quantumino": {"walltime": 8},
+  "sage.geometry.cone": {"walltime": 32},
+  "sage.geometry.fan": {"walltime": 8},
+  "sage.geometry.hyperbolic_space.hyperbolic_geodesic": {"walltime": 8},
+  "sage.geometry.hyperplane_arrangement.arrangement": {"walltime": 16},
+  "sage.geometry.hyperplane_arrangement.library": {"walltime": 8},
+  "sage.geometry.hyperplane_arrangement.plot": {"walltime": 8},
+  "sage.geometry.lattice_polytope": {"walltime": 16},
+  "sage.geometry.polyhedral_complex": {"walltime": 8},
+  "sage.geometry.polyhedron.base": {"walltime": 32},
+  "sage.geometry.polyhedron.library": {"walltime": 32},
+  "sage.geometry.polyhedron.plot": {"walltime": 8},
+  "sage.geometry.riemannian_manifolds.parametrized_surface3d": {"walltime": 16},
+  "sage.geometry.triangulation.base": {"walltime": 32},
+  "sage.geometry.triangulation.point_configuration": {"walltime": 16},
+  "sage.graphs.chrompoly": {"walltime": 8},
+  "sage.graphs.connectivity": {"walltime": 16},
+  "sage.graphs.generators.basic": {"walltime": 16},
+  "sage.graphs.generators.classical_geometries": {"walltime": 32},
+  "sage.graphs.generators.distance_regular": {"walltime": 256},
+  "sage.graphs.generators.families": {"walltime": 32},
+  "sage.graphs.generators.smallgraphs": {"walltime": 16},
+  "sage.graphs.generic_graph": {"walltime": 32},
+  "sage.graphs.genus": {"walltime": 16},
+  "sage.graphs.graph": {"walltime": 16},
+  "sage.graphs.graph_generators": {"walltime": 8},
+  "sage.graphs.graph_list": {"walltime": 8},
+  "sage.graphs.graph_plot": {"walltime": 8},
+  "sage.graphs.strongly_regular_db": {"walltime": 16},
+  "sage.groups.cubic_braid": {"walltime": 16},
+  "sage.groups.fqf_orthogonal": {"walltime": 16},
+  "sage.groups.libgap_mixin": {"walltime": 8},
+  "sage.groups.libgap_morphism": {"walltime": 8},
+  "sage.groups.lie_gps.nilpotent_lie_group": {"walltime": 16},
+  "sage.groups.matrix_gps.finitely_generated": {"walltime": 8},
+  "sage.groups.matrix_gps.heisenberg": {"walltime": 32},
+  "sage.groups.matrix_gps.linear": {"walltime": 8},
+  "sage.groups.perm_gps.cubegroup": {"walltime": 16},
+  "sage.groups.perm_gps.partn_ref.refinement_graphs": {"walltime": 8},
+  "sage.groups.perm_gps.permgroup": {"walltime": 8},
+  "sage.groups.perm_gps.permgroup_named": {"walltime": 8},
+  "sage.homology.hochschild_complex": {"walltime": 8},
+  "sage.homology.homology_vector_space_with_basis": {"walltime": 8},
+  "sage.interacts.test_jupyter": {"walltime": 16},
+  "sage.interfaces.ecm": {"walltime": 8},
+  "sage.interfaces.expect": {"walltime": 8},
+  "sage.interfaces.gap": {"walltime": 16},
+  "sage.interfaces.maxima": {"walltime": 8},
+  "sage.interfaces.maxima_abstract": {"walltime": 64},
+  "sage.interfaces.psage": {"walltime": 8},
+  "sage.interfaces.sage0": {"walltime": 8},
+  "sage.lfunctions.zero_sums": {"walltime": 8},
+  "sage.libs.eclib.interface": {"walltime": 16},
   "sage.libs.eclib.mwrank": {"walltime": 16},
-  "sage.libs.gap.test_long": {"walltime": 43},
-  "sage.libs.giac": {"walltime": 42},
-  "sage.manifolds.chart": {"walltime": 34},
-  "sage.manifolds.differentiable.affine_connection": {"walltime": 138},
-  "sage.manifolds.differentiable.automorphismfield": {"walltime": 33},
-  "sage.manifolds.differentiable.characteristic_cohomology_class": {"walltime": 260},
-  "sage.manifolds.differentiable.curve": {"walltime": 18},
-  "sage.manifolds.differentiable.degenerate": {"walltime": 27},
-  "sage.manifolds.differentiable.degenerate_submanifold": {"walltime": 239},
-  "sage.manifolds.differentiable.diff_form": {"walltime": 48},
-  "sage.manifolds.differentiable.diff_map": {"walltime": 10},
-  "sage.manifolds.differentiable.examples.euclidean": {"walltime": 48},
-  "sage.manifolds.differentiable.examples.sphere": {"walltime": 33},
-  "sage.manifolds.differentiable.integrated_curve": {"walltime": 29},
-  "sage.manifolds.differentiable.levi_civita_connection": {"walltime": 27},
-  "sage.manifolds.differentiable.manifold": {"walltime": 12},
+  "sage.libs.gap.test_long": {"walltime": 32},
+  "sage.libs.giac": {"walltime": 32},
+  "sage.manifolds.catalog": {"walltime": 8},
+  "sage.manifolds.chart": {"walltime": 32},
+  "sage.manifolds.chart_func": {"walltime": 8},
+  "sage.manifolds.continuous_map": {"walltime": 8},
+  "sage.manifolds.differentiable.affine_connection": {"walltime": 128},
+  "sage.manifolds.differentiable.automorphismfield": {"walltime": 32},
+  "sage.manifolds.differentiable.automorphismfield_group": {"walltime": 8},
+  "sage.manifolds.differentiable.bundle_connection": {"walltime": 8},
+  "sage.manifolds.differentiable.characteristic_cohomology_class": {"walltime": 256},
+  "sage.manifolds.differentiable.curve": {"walltime": 16},
+  "sage.manifolds.differentiable.degenerate": {"walltime": 32},
+  "sage.manifolds.differentiable.degenerate_submanifold": {"walltime": 256},
+  "sage.manifolds.differentiable.diff_form": {"walltime": 64},
+  "sage.manifolds.differentiable.diff_map": {"walltime": 8},
+  "sage.manifolds.differentiable.examples.euclidean": {"walltime": 32},
+  "sage.manifolds.differentiable.examples.sphere": {"walltime": 32},
+  "sage.manifolds.differentiable.integrated_curve": {"walltime": 32},
+  "sage.manifolds.differentiable.levi_civita_connection": {"walltime": 32},
+  "sage.manifolds.differentiable.manifold": {"walltime": 16},
   "sage.manifolds.differentiable.manifold_homset": {"walltime": 16},
-  "sage.manifolds.differentiable.metric": {"walltime": 95},
-  "sage.manifolds.differentiable.mixed_form": {"walltime": 14},
-  "sage.manifolds.differentiable.mixed_form_algebra": {"walltime": 11},
-  "sage.manifolds.differentiable.multivectorfield": {"walltime": 71},
-  "sage.manifolds.differentiable.pseudo_riemannian": {"walltime": 20},
-  "sage.manifolds.differentiable.pseudo_riemannian_submanifold": {"walltime": 127},
-  "sage.manifolds.differentiable.scalarfield": {"walltime": 19},
-  "sage.manifolds.differentiable.tangent_vector": {"walltime": 17},
+  "sage.manifolds.differentiable.metric": {"walltime": 64},
+  "sage.manifolds.differentiable.mixed_form": {"walltime": 16},
+  "sage.manifolds.differentiable.mixed_form_algebra": {"walltime": 8},
+  "sage.manifolds.differentiable.multivectorfield": {"walltime": 64},
+  "sage.manifolds.differentiable.pseudo_riemannian": {"walltime": 16},
+  "sage.manifolds.differentiable.pseudo_riemannian_submanifold": {"walltime": 128},
+  "sage.manifolds.differentiable.scalarfield": {"walltime": 16},
+  "sage.manifolds.differentiable.scalarfield_algebra": {"walltime": 8},
+  "sage.manifolds.differentiable.tangent_vector": {"walltime": 16},
   "sage.manifolds.differentiable.tensorfield": {"walltime": 128},
-  "sage.manifolds.differentiable.tensorfield_paral": {"walltime": 15},
-  "sage.manifolds.differentiable.vector_bundle": {"walltime": 13},
-  "sage.manifolds.differentiable.vectorfield": {"walltime": 53},
-  "sage.manifolds.point": {"walltime": 21},
-  "sage.manifolds.scalarfield": {"walltime": 15},
-  "sage.manifolds.section": {"walltime": 28},
-  "sage.matrix.matrix2": {"walltime": 18},
-  "sage.matrix.matrix_integer_dense": {"walltime": 15},
-  "sage.matrix.matrix_integer_dense_hnf": {"walltime": 35},
-  "sage.matroids.catalog": {"walltime": 59},
-  "sage.misc.cachefunc": {"walltime": 13},
-  "sage.misc.functional": {"walltime": 10},
+  "sage.manifolds.differentiable.tensorfield_paral": {"walltime": 16},
+  "sage.manifolds.differentiable.vector_bundle": {"walltime": 16},
+  "sage.manifolds.differentiable.vectorfield": {"walltime": 64},
+  "sage.manifolds.differentiable.vectorframe": {"walltime": 8},
+  "sage.manifolds.point": {"walltime": 16},
+  "sage.manifolds.scalarfield": {"walltime": 16},
+  "sage.manifolds.scalarfield_algebra": {"walltime": 8},
+  "sage.manifolds.section": {"walltime": 32},
+  "sage.manifolds.trivialization": {"walltime": 8},
+  "sage.manifolds.vector_bundle": {"walltime": 8},
+  "sage.matrix.benchmark": {"walltime": 8},
+  "sage.matrix.matrix2": {"walltime": 16},
+  "sage.matrix.matrix_integer_dense": {"walltime": 16},
+  "sage.matrix.matrix_integer_dense_hnf": {"walltime": 32},
+  "sage.matrix.matrix_mod2_dense": {"walltime": 8},
+  "sage.matrix.matrix_rational_dense": {"walltime": 8},
+  "sage.matrix.special": {"walltime": 8},
+  "sage.matroids.catalog": {"walltime": 64},
+  "sage.misc.cachefunc": {"walltime": 16},
+  "sage.misc.cython": {"walltime": 8},
+  "sage.misc.functional": {"walltime": 8},
   "sage.misc.randstate": {"walltime": 16},
-  "sage.misc.sagedoc": {"walltime": 56},
-  "sage.misc.sageinspect": {"walltime": 38},
-  "sage.modular.abvar.abvar": {"walltime": 12},
-  "sage.modular.abvar.lseries": {"walltime": 10},
-  "sage.modular.btquotients.pautomorphicform": {"walltime": 31},
-  "sage.modular.hypergeometric_motive": {"walltime": 12},
-  "sage.modular.local_comp.local_comp": {"walltime": 27},
-  "sage.modular.local_comp.type_space": {"walltime": 24},
-  "sage.modular.modform.ambient_R": {"walltime": 11},
-  "sage.modular.modform.cuspidal_submodule": {"walltime": 15},
-  "sage.modular.modform.element": {"walltime": 60},
-  "sage.modular.modform.ring": {"walltime": 50},
-  "sage.modular.modform_hecketriangle.abstract_space": {"walltime": 12},
-  "sage.modular.modform_hecketriangle.graded_ring_element": {"walltime": 23},
-  "sage.modular.modform_hecketriangle.hecke_triangle_group_element": {"walltime": 26},
-  "sage.modular.modform_hecketriangle.readme": {"walltime": 19},
-  "sage.modular.modsym.ambient": {"walltime": 15},
-  "sage.modular.pollack_stevens.modsym": {"walltime": 63},
-  "sage.modular.pollack_stevens.padic_lseries": {"walltime": 36},
-  "sage.modules.finite_submodule_iter": {"walltime": 22},
-  "sage.modules.free_module": {"walltime": 22},
-  "sage.modules.free_module_integer": {"walltime": 28},
-  "sage.modules.torsion_quadratic_module": {"walltime": 22},
-  "sage.plot.animate": {"walltime": 129},
-  "sage.plot.contour_plot": {"walltime": 38},
-  "sage.plot.graphics": {"walltime": 43},
-  "sage.plot.line": {"walltime": 12},
-  "sage.plot.matrix_plot": {"walltime": 15},
-  "sage.plot.multigraphics": {"walltime": 26},
-  "sage.plot.plot": {"walltime": 77},
-  "sage.plot.plot3d.base": {"walltime": 12},
-  "sage.plot.plot3d.implicit_plot3d": {"walltime": 20},
-  "sage.plot.plot3d.parametric_plot3d": {"walltime": 11},
-  "sage.plot.plot3d.plot3d": {"walltime": 18},
-  "sage.plot.plot3d.transform": {"walltime": 34},
-  "sage.quadratic_forms.genera.genus": {"walltime": 19},
-  "sage.quadratic_forms.quadratic_form__local_representation_conditions": {"walltime": 48},
-  "sage.rings.asymptotic.asymptotic_expansion_generators": {"walltime": 61},
-  "sage.rings.asymptotic.asymptotics_multivariate_generating_functions": {"walltime": 36},
-  "sage.rings.function_field.function_field": {"walltime": 225},
-  "sage.rings.function_field.function_field_valuation": {"walltime": 47},
-  "sage.rings.function_field.ideal": {"walltime": 10},
-  "sage.rings.integer": {"walltime": 164},
-  "sage.rings.number_field.number_field": {"walltime": 79},
-  "sage.rings.number_field.number_field_element": {"walltime": 13},
-  "sage.rings.number_field.totallyreal": {"walltime": 14},
-  "sage.rings.padics.padic_base_leaves": {"walltime": 76},
-  "sage.rings.padics.padic_extension_leaves": {"walltime": 46},
-  "sage.rings.padics.padic_generic_element": {"walltime": 14},
-  "sage.rings.padics.padic_lattice_element": {"walltime": 25},
-  "sage.rings.padics.relative_extension_leaves": {"walltime": 42},
-  "sage.rings.polynomial.multi_polynomial_ideal": {"walltime": 11},
-  "sage.rings.polynomial.multi_polynomial_sequence": {"walltime": 28},
+  "sage.misc.sagedoc": {"walltime": 64},
+  "sage.misc.sageinspect": {"walltime": 32},
+  "sage.modular.abvar.abvar": {"walltime": 16},
+  "sage.modular.abvar.homspace": {"walltime": 8},
+  "sage.modular.abvar.lseries": {"walltime": 8},
+  "sage.modular.arithgroup.arithgroup_perm": {"walltime": 8},
+  "sage.modular.arithgroup.tests": {"walltime": 8},
+  "sage.modular.btquotients.pautomorphicform": {"walltime": 32},
+  "sage.modular.hypergeometric_motive": {"walltime": 16},
+  "sage.modular.local_comp.local_comp": {"walltime": 32},
+  "sage.modular.local_comp.type_space": {"walltime": 16},
+  "sage.modular.modform.ambient_R": {"walltime": 16},
+  "sage.modular.modform.constructor": {"walltime": 8},
+  "sage.modular.modform.cuspidal_submodule": {"walltime": 16},
+  "sage.modular.modform.element": {"walltime": 64},
+  "sage.modular.modform.ring": {"walltime": 64},
+  "sage.modular.modform.space": {"walltime": 8},
+  "sage.modular.modform_hecketriangle.abstract_space": {"walltime": 16},
+  "sage.modular.modform_hecketriangle.graded_ring_element": {"walltime": 16},
+  "sage.modular.modform_hecketriangle.hecke_triangle_group_element": {"walltime": 32},
+  "sage.modular.modform_hecketriangle.readme": {"walltime": 16},
+  "sage.modular.modform_hecketriangle.space": {"walltime": 8},
+  "sage.modular.modsym.ambient": {"walltime": 16},
+  "sage.modular.modsym.space": {"walltime": 8},
+  "sage.modular.pollack_stevens.modsym": {"walltime": 64},
+  "sage.modular.pollack_stevens.padic_lseries": {"walltime": 32},
+  "sage.modules.finite_submodule_iter": {"walltime": 16},
+  "sage.modules.free_module": {"walltime": 16},
+  "sage.modules.free_module_element": {"walltime": 8},
+  "sage.modules.free_module_integer": {"walltime": 32},
+  "sage.modules.free_quadratic_module_integer_symmetric": {"walltime": 8},
+  "sage.modules.torsion_quadratic_module": {"walltime": 16},
+  "sage.parallel.map_reduce": {"walltime": 8},
+  "sage.plot.animate": {"walltime": 128},
+  "sage.plot.arrow": {"walltime": 8},
+  "sage.plot.circle": {"walltime": 8},
+  "sage.plot.complex_plot": {"walltime": 8},
+  "sage.plot.contour_plot": {"walltime": 32},
+  "sage.plot.density_plot": {"walltime": 8},
+  "sage.plot.graphics": {"walltime": 32},
+  "sage.plot.line": {"walltime": 8},
+  "sage.plot.matrix_plot": {"walltime": 16},
+  "sage.plot.multigraphics": {"walltime": 16},
+  "sage.plot.plot": {"walltime": 64},
+  "sage.plot.plot3d.base": {"walltime": 8},
+  "sage.plot.plot3d.implicit_plot3d": {"walltime": 16},
+  "sage.plot.plot3d.implicit_surface": {"walltime": 8},
+  "sage.plot.plot3d.parametric_plot3d": {"walltime": 8},
+  "sage.plot.plot3d.parametric_surface": {"walltime": 8},
+  "sage.plot.plot3d.plot3d": {"walltime": 16},
+  "sage.plot.plot3d.tachyon": {"walltime": 8},
+  "sage.plot.plot3d.transform": {"walltime": 32},
+  "sage.plot.point": {"walltime": 8},
+  "sage.plot.polygon": {"walltime": 8},
+  "sage.plot.streamline_plot": {"walltime": 8},
+  "sage.quadratic_forms.genera.genus": {"walltime": 16},
+  "sage.quadratic_forms.quadratic_form__automorphisms": {"walltime": 8},
+  "sage.quadratic_forms.quadratic_form__local_representation_conditions": {"walltime": 64},
+  "sage.quadratic_forms.quadratic_form__neighbors": {"walltime": 8},
+  "sage.quadratic_forms.quadratic_form__siegel_product": {"walltime": 8},
+  "sage.repl.ipython_extension": {"walltime": 8},
+  "sage.rings.asymptotic.asymptotic_expansion_generators": {"walltime": 64},
+  "sage.rings.asymptotic.asymptotic_ring": {"walltime": 8},
+  "sage.rings.asymptotic.asymptotics_multivariate_generating_functions": {"walltime": 32},
+  "sage.rings.asymptotic.term_monoid": {"walltime": 8},
+  "sage.rings.continued_fraction": {"walltime": 8},
+  "sage.rings.finite_rings.finite_field_base": {"walltime": 8},
+  "sage.rings.function_field.function_field": {"walltime": 256},
+  "sage.rings.function_field.function_field_valuation": {"walltime": 64},
+  "sage.rings.function_field.ideal": {"walltime": 8},
+  "sage.rings.function_field.place": {"walltime": 8},
+  "sage.rings.integer": {"walltime": 128},
+  "sage.rings.invariants.invariant_theory": {"walltime": 8},
+  "sage.rings.number_field.bdd_height": {"walltime": 8},
+  "sage.rings.number_field.number_field": {"walltime": 64},
+  "sage.rings.number_field.number_field_element": {"walltime": 16},
+  "sage.rings.number_field.splitting_field": {"walltime": 8},
+  "sage.rings.number_field.totallyreal": {"walltime": 16},
+  "sage.rings.number_field.totallyreal_rel": {"walltime": 8},
+  "sage.rings.padics.padic_base_leaves": {"walltime": 64},
+  "sage.rings.padics.padic_extension_leaves": {"walltime": 64},
+  "sage.rings.padics.padic_generic_element": {"walltime": 16},
+  "sage.rings.padics.padic_lattice_element": {"walltime": 32},
+  "sage.rings.padics.relative_extension_leaves": {"walltime": 32},
+  "sage.rings.polynomial.multi_polynomial_ideal": {"walltime": 8},
+  "sage.rings.polynomial.multi_polynomial_sequence": {"walltime": 8},
+  "sage.rings.polynomial.ore_function_element": {"walltime": 8},
   "sage.rings.polynomial.polynomial_element": {"walltime": 16},
-  "sage.rings.polynomial.polynomial_zmod_flint": {"walltime": 336},
-  "sage.rings.qqbar": {"walltime": 21},
-  "sage.rings.tests": {"walltime": 19},
-  "sage.rings.valuation.augmented_valuation": {"walltime": 28},
-  "sage.rings.valuation.mapped_valuation": {"walltime": 56},
-  "sage.schemes.curves.affine_curve": {"walltime": 23},
-  "sage.schemes.curves.projective_curve": {"walltime": 24},
-  "sage.schemes.cyclic_covers.cycliccover_finite_field": {"walltime": 78},
-  "sage.schemes.elliptic_curves.BSD": {"walltime": 10},
-  "sage.schemes.elliptic_curves.constructor": {"walltime": 27},
-  "sage.schemes.elliptic_curves.ell_curve_isogeny": {"walltime": 21},
-  "sage.schemes.elliptic_curves.ell_egros": {"walltime": 28},
-  "sage.schemes.elliptic_curves.ell_modular_symbols": {"walltime": 12},
-  "sage.schemes.elliptic_curves.ell_number_field": {"walltime": 120},
-  "sage.schemes.elliptic_curves.ell_rational_field": {"walltime": 133},
-  "sage.schemes.elliptic_curves.gal_reps_number_field": {"walltime": 35},
-  "sage.schemes.elliptic_curves.gp_simon": {"walltime": 22},
-  "sage.schemes.elliptic_curves.heegner": {"walltime": 39},
-  "sage.schemes.elliptic_curves.height": {"walltime": 56},
-  "sage.schemes.elliptic_curves.isogeny_class": {"walltime": 38},
-  "sage.schemes.elliptic_curves.isogeny_small_degree": {"walltime": 274},
-  "sage.schemes.elliptic_curves.kraus": {"walltime": 12},
-  "sage.schemes.elliptic_curves.mod_sym_num": {"walltime": 12},
-  "sage.schemes.elliptic_curves.padics": {"walltime": 15},
-  "sage.schemes.elliptic_curves.saturation": {"walltime": 19},
-  "sage.schemes.elliptic_curves.sha_tate": {"walltime": 23},
-  "sage.schemes.hyperelliptic_curves.hyperelliptic_finite_field": {"walltime": 65},
-  "sage.schemes.hyperelliptic_curves.hyperelliptic_padic_field": {"walltime": 25},
-  "sage.schemes.projective.projective_rational_point": {"walltime": 11},
-  "sage.schemes.riemann_surfaces.riemann_surface": {"walltime": 53},
-  "sage.stats.distributions.discrete_gaussian_integer": {"walltime": 10},
-  "sage.structure.coerce_dict": {"walltime": 33},
+  "sage.rings.polynomial.polynomial_rational_flint": {"walltime": 8},
+  "sage.rings.polynomial.polynomial_zmod_flint": {"walltime": 512},
+  "sage.rings.qqbar": {"walltime": 16},
+  "sage.rings.tests": {"walltime": 16},
+  "sage.rings.valuation.augmented_valuation": {"walltime": 32},
+  "sage.rings.valuation.mapped_valuation": {"walltime": 64},
+  "sage.rings.valuation.valuation": {"walltime": 8},
+  "sage.sandpiles.sandpile": {"walltime": 16},
+  "sage.schemes.curves.affine_curve": {"walltime": 16},
+  "sage.schemes.curves.closed_point": {"walltime": 8},
+  "sage.schemes.curves.projective_curve": {"walltime": 32},
+  "sage.schemes.cyclic_covers.cycliccover_finite_field": {"walltime": 64},
+  "sage.schemes.elliptic_curves.BSD": {"walltime": 8},
+  "sage.schemes.elliptic_curves.Qcurves": {"walltime": 8},
+  "sage.schemes.elliptic_curves.constructor": {"walltime": 32},
+  "sage.schemes.elliptic_curves.ell_curve_isogeny": {"walltime": 16},
+  "sage.schemes.elliptic_curves.ell_egros": {"walltime": 32},
+  "sage.schemes.elliptic_curves.ell_finite_field": {"walltime": 8},
+  "sage.schemes.elliptic_curves.ell_generic": {"walltime": 8},
+  "sage.schemes.elliptic_curves.ell_modular_symbols": {"walltime": 16},
+  "sage.schemes.elliptic_curves.ell_number_field": {"walltime": 128},
+  "sage.schemes.elliptic_curves.ell_point": {"walltime": 8},
+  "sage.schemes.elliptic_curves.ell_rational_field": {"walltime": 128},
+  "sage.schemes.elliptic_curves.gal_reps_number_field": {"walltime": 32},
+  "sage.schemes.elliptic_curves.gp_simon": {"walltime": 16},
+  "sage.schemes.elliptic_curves.heegner": {"walltime": 32},
+  "sage.schemes.elliptic_curves.height": {"walltime": 64},
+  "sage.schemes.elliptic_curves.isogeny_class": {"walltime": 32},
+  "sage.schemes.elliptic_curves.isogeny_small_degree": {"walltime": 256},
+  "sage.schemes.elliptic_curves.kraus": {"walltime": 16},
+  "sage.schemes.elliptic_curves.mod_sym_num": {"walltime": 8},
+  "sage.schemes.elliptic_curves.padic_lseries": {"walltime": 8},
+  "sage.schemes.elliptic_curves.padics": {"walltime": 16},
+  "sage.schemes.elliptic_curves.saturation": {"walltime": 16},
+  "sage.schemes.elliptic_curves.sha_tate": {"walltime": 32},
+  "sage.schemes.hyperelliptic_curves.hyperelliptic_finite_field": {"walltime": 64},
+  "sage.schemes.hyperelliptic_curves.hyperelliptic_generic": {"walltime": 8},
+  "sage.schemes.hyperelliptic_curves.hyperelliptic_padic_field": {"walltime": 32},
+  "sage.schemes.hyperelliptic_curves.monsky_washnitzer": {"walltime": 8},
+  "sage.schemes.projective.projective_rational_point": {"walltime": 8},
+  "sage.schemes.riemann_surfaces.riemann_surface": {"walltime": 64},
+  "sage.schemes.toric.chow_group": {"walltime": 8},
+  "sage.schemes.toric.sheaf.klyachko": {"walltime": 8},
+  "sage.stats.distributions.discrete_gaussian_integer": {"walltime": 8},
+  "sage.stats.time_series": {"walltime": 8},
+  "sage.structure.coerce_dict": {"walltime": 32},
   "sage.structure.element": {"walltime": 16},
-  "sage.symbolic.expression": {"walltime": 38},
-  "sage.symbolic.integration.integral": {"walltime": 35},
-  "sage.symbolic.random_tests": {"walltime": 31},
-  "sage.symbolic.relation": {"walltime": 11},
-  "sage.tests.book_schilling_zabrocki_kschur_primer": {"walltime": 36},
-  "sage.tests.book_stein_ent": {"walltime": 15},
-  "sage.tests.books.computational-mathematics-with-sagemath.combinat_doctest": {"walltime": 40},
-  "sage.tests.books.computational-mathematics-with-sagemath.float_doctest": {"walltime": 17},
-  "sage.tests.books.computational-mathematics-with-sagemath.graphique_doctest": {"walltime": 29},
-  "sage.tests.books.computational-mathematics-with-sagemath.integration_doctest": {"walltime": 28},
-  "sage.tests.books.computational-mathematics-with-sagemath.nonlinear_doctest": {"walltime": 11},
-  "sage.tests.books.computational-mathematics-with-sagemath.sol.graphique_doctest": {"walltime": 17},
-  "sage.tests.books.computational-mathematics-with-sagemath.sol.numbertheory_doctest": {"walltime": 14},
-  "sage.tests.books.computational-mathematics-with-sagemath.sol.polynomes_doctest": {"walltime": 19},
-  "sage.tests.cmdline": {"walltime": 44},
-  "sage.tests.gosper-sum": {"walltime": 11},
-  "sage.topology.simplicial_complex_examples": {"walltime": 14}
+  "sage.structure.sage_object": {"walltime": 8},
+  "sage.symbolic.expression": {"walltime": 32},
+  "sage.symbolic.integration.integral": {"walltime": 32},
+  "sage.symbolic.random_tests": {"walltime": 32},
+  "sage.symbolic.relation": {"walltime": 8},
+  "sage.tests.book_schilling_zabrocki_kschur_primer": {"walltime": 32},
+  "sage.tests.book_stein_ent": {"walltime": 16},
+  "sage.tests.books.computational-mathematics-with-sagemath.combinat_doctest": {"walltime": 32},
+  "sage.tests.books.computational-mathematics-with-sagemath.float_doctest": {"walltime": 16},
+  "sage.tests.books.computational-mathematics-with-sagemath.graphique_doctest": {"walltime": 32},
+  "sage.tests.books.computational-mathematics-with-sagemath.graphtheory_doctest": {"walltime": 8},
+  "sage.tests.books.computational-mathematics-with-sagemath.integration_doctest": {"walltime": 32},
+  "sage.tests.books.computational-mathematics-with-sagemath.mpoly_doctest": {"walltime": 8},
+  "sage.tests.books.computational-mathematics-with-sagemath.nonlinear_doctest": {"walltime": 8},
+  "sage.tests.books.computational-mathematics-with-sagemath.recequadiff_doctest": {"walltime": 8},
+  "sage.tests.books.computational-mathematics-with-sagemath.sol.graphique_doctest": {"walltime": 16},
+  "sage.tests.books.computational-mathematics-with-sagemath.sol.numbertheory_doctest": {"walltime": 16},
+  "sage.tests.books.computational-mathematics-with-sagemath.sol.polynomes_doctest": {"walltime": 16},
+  "sage.tests.cmdline": {"walltime": 64},
+  "sage.tests.gosper-sum": {"walltime": 16},
+  "sage.tests.parigp": {"walltime": 8},
+  "sage.topology.simplicial_complex": {"walltime": 8},
+  "sage.topology.simplicial_complex_examples": {"walltime": 16}
 }

From 4ae419192d759cafc2cabde5b63e4f59a4ac8769 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 13:05:37 -0300
Subject: [PATCH 52/60] New package: python3-memory_allocator-0.1.2

---
 srcpkgs/python3-memory_allocator/template | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 srcpkgs/python3-memory_allocator/template

diff --git a/srcpkgs/python3-memory_allocator/template b/srcpkgs/python3-memory_allocator/template
new file mode 100644
index 000000000000..e4fbb51478fa
--- /dev/null
+++ b/srcpkgs/python3-memory_allocator/template
@@ -0,0 +1,14 @@
+# Template file for 'python3-memory_allocator'
+pkgname=python3-memory_allocator
+version=0.1.2
+revision=1
+wrksrc=memory_allocator-$version
+build_style=python3-module
+hostmakedepends="python3-setuptools python3-Cython"
+makedepends="python3-devel"
+short_desc="Extension class to allocate memory easily with cython"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-3.0-or-later"
+homepage="https://github.com/kliem/memory_allocator"
+distfiles="${PYPI_SITE}/m/memory_allocator/memory_allocator-${version}.tar.gz"
+checksum=ddf42a2dcc678062f30c63c868335204d46a4ecdf4db0dc43ed4529f1d0ffab9

From 2d8ac143f29ad6c6b8039a3a8a60b8a401ef9e11 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 17:44:04 -0300
Subject: [PATCH 53/60] New package: python3-primecountpy-0.1.0

---
 srcpkgs/python3-primecountpy/template | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 srcpkgs/python3-primecountpy/template

diff --git a/srcpkgs/python3-primecountpy/template b/srcpkgs/python3-primecountpy/template
new file mode 100644
index 000000000000..fecc774b3983
--- /dev/null
+++ b/srcpkgs/python3-primecountpy/template
@@ -0,0 +1,16 @@
+# Template file for 'python3-primecountpy'
+pkgname=python3-primecountpy
+version=0.1.0
+revision=1
+wrksrc=primecountpy-${version}
+build_style=python3-module
+hostmakedepends="python3-setuptools python3-Cython"
+makedepends="python3-cysignals python3-devel primecount-devel pari-devel"
+short_desc="Python interface to the C++ library primecount"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-3.0-or-later"
+homepage="https://github.com/dimpase/primecountpy"
+distfiles="${PYPI_SITE}/p/primecountpy/primecountpy-${version}.tar.gz"
+checksum=78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
+
+make_check=no # no way to check before installing

From 74d4d7faaf0f58cd3298794e7b72b4543fa5136c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 20:02:33 -0300
Subject: [PATCH 54/60] New package: sage-data-combinatorial_designs-20140630

---
 srcpkgs/sage-data-combinatorial_designs/template | 16 ++++++++++++++++
 srcpkgs/sage-data-combinatorial_designs/update   |  1 +
 2 files changed, 17 insertions(+)
 create mode 100644 srcpkgs/sage-data-combinatorial_designs/template
 create mode 100644 srcpkgs/sage-data-combinatorial_designs/update

diff --git a/srcpkgs/sage-data-combinatorial_designs/template b/srcpkgs/sage-data-combinatorial_designs/template
new file mode 100644
index 000000000000..dcec3dbf554b
--- /dev/null
+++ b/srcpkgs/sage-data-combinatorial_designs/template
@@ -0,0 +1,16 @@
+# Template file for 'sage-data-combinatorial_designs'
+pkgname=sage-data-combinatorial_designs
+version=20140630
+revision=1
+wrksrc="combinatorial_designs-$version"
+short_desc="Data for combinatorial designs"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="Public Domain"
+homepage="https://mirrors.mit.edu/sage/spkg/upstream/combinatorial_designs/"
+distfiles="https://mirrors.mit.edu/sage/spkg/upstream/combinatorial_designs/combinatorial_designs-$version.tar.bz2"
+checksum=c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
+
+do_install() {
+	vmkdir usr/share/sagemath/combinatorial_designs
+	vcopy * usr/share/sagemath/combinatorial_designs
+}
diff --git a/srcpkgs/sage-data-combinatorial_designs/update b/srcpkgs/sage-data-combinatorial_designs/update
new file mode 100644
index 000000000000..d66b1a8e41a0
--- /dev/null
+++ b/srcpkgs/sage-data-combinatorial_designs/update
@@ -0,0 +1 @@
+pkgname=combinatorial_designs

From 24dd3b90c06747baf5f1544e248507c85402c7b2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 20:02:34 -0300
Subject: [PATCH 55/60] New package: sage-data-conway_polynomials-0.5

---
 srcpkgs/sage-data-conway_polynomials/template | 21 +++++++++++++++++++
 srcpkgs/sage-data-conway_polynomials/update   |  1 +
 2 files changed, 22 insertions(+)
 create mode 100644 srcpkgs/sage-data-conway_polynomials/template
 create mode 100644 srcpkgs/sage-data-conway_polynomials/update

diff --git a/srcpkgs/sage-data-conway_polynomials/template b/srcpkgs/sage-data-conway_polynomials/template
new file mode 100644
index 000000000000..57264da84c2f
--- /dev/null
+++ b/srcpkgs/sage-data-conway_polynomials/template
@@ -0,0 +1,21 @@
+# Template file for 'sage-data-conway_polynomials'
+pkgname=sage-data-conway_polynomials
+version=0.5
+revision=1
+wrksrc="conway_polynomials-$version"
+hostmakedepends="python3"
+short_desc="Database of Conway polynomials over finite fields"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="Public Domain, GPL-2.0-or-later"
+homepage="https://mirrors.mit.edu/sage/spkg/upstream/conway_polynomials/"
+distfiles="https://mirrors.mit.edu/sage/spkg/upstream/conway_polynomials/conway_polynomials-$version.tar.bz2
+ https://github.com/sagemath/sage/raw/9.4/build/pkgs/conway_polynomials/spkg-install.py"
+checksum="d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
+ da85e913282d059ca36e14cefc92f891da469e8d7127f13a1ce96c6fb5c296af"
+skip_extraction=spkg-install.py
+
+do_install() {
+	ln -s . src
+	SAGE_SHARE=${DESTDIR}/usr/share/sagemath PYTHONPATH=${PWD} \
+		python3 ${XBPS_SRCDISTDIR}/${pkgname}-${version}/spkg-install.py
+}
diff --git a/srcpkgs/sage-data-conway_polynomials/update b/srcpkgs/sage-data-conway_polynomials/update
new file mode 100644
index 000000000000..628e2749f014
--- /dev/null
+++ b/srcpkgs/sage-data-conway_polynomials/update
@@ -0,0 +1 @@
+pkgname=conway_polynomials

From a30dbe07d6f10bf6e41acf7861ff62d9078f6936 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 20:02:34 -0300
Subject: [PATCH 56/60] New package: sage-data-elliptic_curves-0.8.1

---
 srcpkgs/sage-data-elliptic_curves/template | 21 +++++++++++++++++++++
 srcpkgs/sage-data-elliptic_curves/update   |  1 +
 2 files changed, 22 insertions(+)
 create mode 100644 srcpkgs/sage-data-elliptic_curves/template
 create mode 100644 srcpkgs/sage-data-elliptic_curves/update

diff --git a/srcpkgs/sage-data-elliptic_curves/template b/srcpkgs/sage-data-elliptic_curves/template
new file mode 100644
index 000000000000..5103f9b87374
--- /dev/null
+++ b/srcpkgs/sage-data-elliptic_curves/template
@@ -0,0 +1,21 @@
+# Template file for 'sage-data-elliptic_curves'
+pkgname=sage-data-elliptic_curves
+version=0.8.1
+revision=1
+wrksrc="elliptic_curves-$version"
+hostmakedepends="python3"
+short_desc="Database of elliptic curves"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="Public Domain, GPL-2.0-or-later"
+homepage="https://mirrors.mit.edu/sage/spkg/upstream/elliptic_curves/"
+distfiles="https://mirrors.mit.edu/sage/spkg/upstream/elliptic_curves/elliptic_curves-$version.tar.bz2
+ https://github.com/sagemath/sage/raw/9.4/build/pkgs/elliptic_curves/spkg-install.py"
+checksum="5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
+ 856d482872f72db47c7b718761bb1a205947b276df99b55d087a57130932cf84"
+skip_extraction=spkg-install.py
+
+do_install() {
+	ln -s . src
+	SAGE_SHARE=${DESTDIR}/usr/share/sagemath \
+		python3 ${XBPS_SRCDISTDIR}/${pkgname}-${version}/spkg-install.py
+}
diff --git a/srcpkgs/sage-data-elliptic_curves/update b/srcpkgs/sage-data-elliptic_curves/update
new file mode 100644
index 000000000000..8155f52ce93b
--- /dev/null
+++ b/srcpkgs/sage-data-elliptic_curves/update
@@ -0,0 +1 @@
+pkgname=elliptic_curves

From 8341cfe0058686b69b3828740c53c563f7fa2fc1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 20:02:35 -0300
Subject: [PATCH 57/60] New package: sage-data-polytopes_db-20170220

---
 srcpkgs/sage-data-polytopes_db/template | 16 ++++++++++++++++
 srcpkgs/sage-data-polytopes_db/update   |  1 +
 2 files changed, 17 insertions(+)
 create mode 100644 srcpkgs/sage-data-polytopes_db/template
 create mode 100644 srcpkgs/sage-data-polytopes_db/update

diff --git a/srcpkgs/sage-data-polytopes_db/template b/srcpkgs/sage-data-polytopes_db/template
new file mode 100644
index 000000000000..d0f9f297d84b
--- /dev/null
+++ b/srcpkgs/sage-data-polytopes_db/template
@@ -0,0 +1,16 @@
+# Template file for 'sage-data-polytopes_db'
+pkgname=sage-data-polytopes_db
+version=20170220
+revision=1
+wrksrc="polytopes_db-$version"
+short_desc="Database of 2 and 3-dimensional reflexive polytopes"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="Public Domain"
+homepage="https://mirrors.mit.edu/sage/spkg/upstream/polytopes_db/"
+distfiles="https://mirrors.mit.edu/sage/spkg/upstream/polytopes_db/polytopes_db-$version.tar.bz2"
+checksum=cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
+
+do_install() {
+	vmkdir usr/share/sagemath/reflexive_polytopes
+	vcopy * usr/share/sagemath/reflexive_polytopes
+}
diff --git a/srcpkgs/sage-data-polytopes_db/update b/srcpkgs/sage-data-polytopes_db/update
new file mode 100644
index 000000000000..f51653b547fd
--- /dev/null
+++ b/srcpkgs/sage-data-polytopes_db/update
@@ -0,0 +1 @@
+pkgname=polytopes_db

From d7bdadcdfc5fa5bb51b1c5f0ee3a299ec06734b8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 20:02:35 -0300
Subject: [PATCH 58/60] New package: sage-data-graphs-20210214

---
 srcpkgs/sage-data-graphs/template | 16 ++++++++++++++++
 srcpkgs/sage-data-graphs/update   |  1 +
 2 files changed, 17 insertions(+)
 create mode 100644 srcpkgs/sage-data-graphs/template
 create mode 100644 srcpkgs/sage-data-graphs/update

diff --git a/srcpkgs/sage-data-graphs/template b/srcpkgs/sage-data-graphs/template
new file mode 100644
index 000000000000..9ca16b6cf53a
--- /dev/null
+++ b/srcpkgs/sage-data-graphs/template
@@ -0,0 +1,16 @@
+# Template file for 'sage-data-graphs'
+pkgname=sage-data-graphs
+version=20210214
+revision=1
+wrksrc="graphs-$version"
+short_desc="Database of graphs"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="Public Domain"
+homepage="https://mirrors.mit.edu/sage/spkg/upstream/graphs/"
+distfiles="https://mirrors.mit.edu/sage/spkg/upstream/graphs/graphs-$version.tar.bz2"
+checksum=07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
+
+do_install() {
+	vmkdir usr/share/sagemath/graphs
+	vcopy * usr/share/sagemath/graphs
+}
diff --git a/srcpkgs/sage-data-graphs/update b/srcpkgs/sage-data-graphs/update
new file mode 100644
index 000000000000..c5c7c7dd5253
--- /dev/null
+++ b/srcpkgs/sage-data-graphs/update
@@ -0,0 +1 @@
+pkgname=graphs

From 0dd2e7aecd69934145ca6aa0f47c8d2f4b60509f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 22:45:22 -0300
Subject: [PATCH 59/60] sagemath: all but two packages from system

---
 .../patches/zzz-remove_ratpoints.patch        | 887 ++++++++++++++++++
 srcpkgs/sagemath/template                     | 152 +--
 2 files changed, 970 insertions(+), 69 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/zzz-remove_ratpoints.patch

diff --git a/srcpkgs/sagemath/patches/zzz-remove_ratpoints.patch b/srcpkgs/sagemath/patches/zzz-remove_ratpoints.patch
new file mode 100644
index 000000000000..0842d9d7f6d5
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-remove_ratpoints.patch
@@ -0,0 +1,887 @@
+From 3178a5e1e4f7174343fd913494ae255b3e05fb85 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Mon, 17 Jan 2022 21:04:42 -0300
+Subject: [PATCH] ratpoints: remove deprecated package
+
+---
+ .github/workflows/ci-cygwin-minimal.yml       |   2 +-
+ .github/workflows/ci-cygwin-standard.yml      |   2 +-
+ COPYING.txt                                   |   1 -
+ build/pkgs/ratpoints/SPKG.rst                 |  29 --
+ build/pkgs/ratpoints/checksums.ini            |   4 -
+ build/pkgs/ratpoints/dependencies             |   5 -
+ build/pkgs/ratpoints/distros/arch.txt         |   1 -
+ build/pkgs/ratpoints/distros/conda.txt        |   1 -
+ build/pkgs/ratpoints/distros/debian.txt       |   1 -
+ build/pkgs/ratpoints/distros/nix.txt          |   1 -
+ build/pkgs/ratpoints/distros/repology.txt     |   1 -
+ build/pkgs/ratpoints/package-version.txt      |   1 -
+ build/pkgs/ratpoints/patches/Makefile.patch   |  37 ---
+ .../patches/sturm_and_rp_private.patch        | 194 ------------
+ build/pkgs/ratpoints/spkg-install.in          |  46 ---
+ build/pkgs/ratpoints/type                     |   1 -
+ build/pkgs/sagelib/dependencies               |   2 +-
+ src/sage/libs/ratpoints.pxd                   |  74 -----
+ src/sage/libs/ratpoints.pyx                   | 283 ------------------
+ .../elliptic_curves/descent_two_isogeny.pyx   |   2 -
+ src/sage_setup/library_order.py               |   2 +-
+ 21 files changed, 4 insertions(+), 686 deletions(-)
+ delete mode 100644 build/pkgs/ratpoints/SPKG.rst
+ delete mode 100644 build/pkgs/ratpoints/checksums.ini
+ delete mode 100644 build/pkgs/ratpoints/dependencies
+ delete mode 100644 build/pkgs/ratpoints/distros/arch.txt
+ delete mode 100644 build/pkgs/ratpoints/distros/conda.txt
+ delete mode 100644 build/pkgs/ratpoints/distros/debian.txt
+ delete mode 100644 build/pkgs/ratpoints/distros/nix.txt
+ delete mode 100644 build/pkgs/ratpoints/distros/repology.txt
+ delete mode 100644 build/pkgs/ratpoints/package-version.txt
+ delete mode 100644 build/pkgs/ratpoints/patches/Makefile.patch
+ delete mode 100644 build/pkgs/ratpoints/patches/sturm_and_rp_private.patch
+ delete mode 100644 build/pkgs/ratpoints/spkg-install.in
+ delete mode 100644 build/pkgs/ratpoints/type
+ delete mode 100644 src/sage/libs/ratpoints.pxd
+ delete mode 100644 src/sage/libs/ratpoints.pyx
+
+diff --git a/.github/workflows/ci-cygwin-minimal.yml b/.github/workflows/ci-cygwin-minimal.yml
+index 9e847e7474..9df1365657 100644
+--- a/.github/workflows/ci-cygwin-minimal.yml
++++ b/.github/workflows/ci-cygwin-minimal.yml
+@@ -217,7 +217,7 @@ jobs:
+     env:
+       STAGE: ii-b
+       PREVIOUS_STAGES: i-*
+-      TARGETS: singular maxima gap pari gfan palp flintqs ratpoints arb ecm givaro
++      TARGETS: singular maxima gap pari gfan palp flintqs arb ecm givaro
+       LOCAL_ARTIFACT_NAME: sage-local-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
+       LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
+ 
+diff --git a/.github/workflows/ci-cygwin-standard.yml b/.github/workflows/ci-cygwin-standard.yml
+index cbbe0f46a8..8aee1c2c3c 100644
+--- a/.github/workflows/ci-cygwin-standard.yml
++++ b/.github/workflows/ci-cygwin-standard.yml
+@@ -217,7 +217,7 @@ jobs:
+     env:
+       STAGE: ii-b
+       PREVIOUS_STAGES: i-*
+-      TARGETS: singular maxima gap pari gfan palp flintqs ratpoints arb ecm givaro
++      TARGETS: singular maxima gap pari gfan palp flintqs arb ecm givaro
+       LOCAL_ARTIFACT_NAME: sage-local-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
+       LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
+ 
+diff --git a/COPYING.txt b/COPYING.txt
+index 1176a856a0..a3e9cc6645 100644
+--- a/COPYING.txt
++++ b/COPYING.txt
+@@ -107,7 +107,6 @@ pynac                       GPLv2+
+ pyparsing                   MIT License
+ python                      Python License (see below)
+ R                           GPLv2+
+-ratpoints                   GPLv2+
+ readline                    GPLv3+
+ rpy                         GPLv2+
+ rubiks/dietz                GPL, any version
+diff --git a/build/pkgs/ratpoints/SPKG.rst b/build/pkgs/ratpoints/SPKG.rst
+deleted file mode 100644
+index 6607094bec..0000000000
+--- a/build/pkgs/ratpoints/SPKG.rst
++++ /dev/null
+@@ -1,29 +0,0 @@
+-ratpoints: Find rational points on hyperelliptic curves
+-=======================================================
+-
+-Description
+------------
+-
+-Michael Stoll's program which searches for rational points on
+-hyperelliptic curves.
+-
+-NOTE: the ratpoints package has been assimilated by PARI/GP. Therefore,
+-this package (as Sage package) is deprecated. In the future, it will be
+-removed from Sage.
+-
+-
+-Upstream Contact
+-----------------
+-
+--  Author: Michael Stoll
+--  Email: Michael.Stoll@uni-bayreuth.de
+--  Website: http://www.mathe2.uni-bayreuth.de/stoll/programs/
+-
+-
+-Note on SSE2 instructions
+-~~~~~~~~~~~~~~~~~~~~~~~~~
+-
+--  On several architectures, the SSE2 instructions used by ratpoints
+-   cause
+-   compiler errors. In the case that ratpoints fails to build with SSE2
+-   instructions enabled, the build is repeated with SSE2 disabled.
+diff --git a/build/pkgs/ratpoints/checksums.ini b/build/pkgs/ratpoints/checksums.ini
+deleted file mode 100644
+index 46ba1c9ec1..0000000000
+--- a/build/pkgs/ratpoints/checksums.ini
++++ /dev/null
+@@ -1,4 +0,0 @@
+-tarball=ratpoints-VERSION.tar.bz2
+-sha1=14fbc3dd50742794e0b33d2dd1217e5dd8ad2623
+-md5=9bf091d1b90132433f0a1fc6b585d024
+-cksum=670991933
+diff --git a/build/pkgs/ratpoints/dependencies b/build/pkgs/ratpoints/dependencies
+deleted file mode 100644
+index 9a77ea16f7..0000000000
+--- a/build/pkgs/ratpoints/dependencies
++++ /dev/null
+@@ -1,5 +0,0 @@
+-$(MP_LIBRARY)
+-
+-----------
+-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/ratpoints/distros/arch.txt b/build/pkgs/ratpoints/distros/arch.txt
+deleted file mode 100644
+index e137758627..0000000000
+--- a/build/pkgs/ratpoints/distros/arch.txt
++++ /dev/null
+@@ -1 +0,0 @@
+-ratpoints
+diff --git a/build/pkgs/ratpoints/distros/conda.txt b/build/pkgs/ratpoints/distros/conda.txt
+deleted file mode 100644
+index e137758627..0000000000
+--- a/build/pkgs/ratpoints/distros/conda.txt
++++ /dev/null
+@@ -1 +0,0 @@
+-ratpoints
+diff --git a/build/pkgs/ratpoints/distros/debian.txt b/build/pkgs/ratpoints/distros/debian.txt
+deleted file mode 100644
+index dabd28d624..0000000000
+--- a/build/pkgs/ratpoints/distros/debian.txt
++++ /dev/null
+@@ -1 +0,0 @@
+-libratpoints-dev
+diff --git a/build/pkgs/ratpoints/distros/nix.txt b/build/pkgs/ratpoints/distros/nix.txt
+deleted file mode 100644
+index e137758627..0000000000
+--- a/build/pkgs/ratpoints/distros/nix.txt
++++ /dev/null
+@@ -1 +0,0 @@
+-ratpoints
+diff --git a/build/pkgs/ratpoints/distros/repology.txt b/build/pkgs/ratpoints/distros/repology.txt
+deleted file mode 100644
+index e137758627..0000000000
+--- a/build/pkgs/ratpoints/distros/repology.txt
++++ /dev/null
+@@ -1 +0,0 @@
+-ratpoints
+diff --git a/build/pkgs/ratpoints/package-version.txt b/build/pkgs/ratpoints/package-version.txt
+deleted file mode 100644
+index efed46a7bd..0000000000
+--- a/build/pkgs/ratpoints/package-version.txt
++++ /dev/null
+@@ -1 +0,0 @@
+-2.1.3.p5
+diff --git a/build/pkgs/ratpoints/patches/Makefile.patch b/build/pkgs/ratpoints/patches/Makefile.patch
+deleted file mode 100644
+index 093d7c0018..0000000000
+--- a/build/pkgs/ratpoints/patches/Makefile.patch
++++ /dev/null
+@@ -1,37 +0,0 @@
+---- src/Makefile	2009-10-01 01:08:54.000000000 +0200
+-+++ patches/Makefile	2012-03-17 13:57:33.026315142 +0100
+-@@ -21,11 +21,11 @@
+- #
+- #    Michael Stoll, September 21, 2009
+- 
+--CC = gcc
+-+CC ?= gcc
+- RM = rm -f
+- INSTALL = cp
+- 
+--INSTALL_DIR = /usr/local
+-+INSTALL_DIR ?= /usr/local
+- 
+- DISTFILES = Makefile ratpoints.h rp-private.h primes.h \
+-             gen_find_points_h.c gen_init_sieve_h.c \
+-@@ -47,14 +47,14 @@
+- 	diff -q testbase rptest.out
+- 
+- install-bin: ratpoints
+--	${INSTALL} ratpoints ${INSTALL_DIR}/bin/
+--	chmod 755 ${INSTALL_DIR}/bin/ratpoints
+-+	${INSTALL} ratpoints "${INSTALL_DIR}/bin/"
+-+	chmod 755 "${INSTALL_DIR}/bin/ratpoints"
+- 
+- install-lib: ratpoints.h libratpoints.a
+--	${INSTALL} ratpoints.h ${INSTALL_DIR}/include/
+--	chmod 644 ${INSTALL_DIR}/include/ratpoints.h
+--	${INSTALL} libratpoints.a ${INSTALL_DIR}/lib/
+--	chmod 644 ${INSTALL_DIR}/lib/libratpoints.a
+-+	${INSTALL} ratpoints.h "${INSTALL_DIR}/include/"
+-+	chmod 644 "${INSTALL_DIR}/include/ratpoints.h"
+-+	${INSTALL} libratpoints.a "${INSTALL_DIR}/lib/"
+-+	chmod 644 "${INSTALL_DIR}/lib/libratpoints.a"
+- 
+- install: install-bin install-lib
+- 
+diff --git a/build/pkgs/ratpoints/patches/sturm_and_rp_private.patch b/build/pkgs/ratpoints/patches/sturm_and_rp_private.patch
+deleted file mode 100644
+index 664198c4de..0000000000
+--- a/build/pkgs/ratpoints/patches/sturm_and_rp_private.patch
++++ /dev/null
+@@ -1,194 +0,0 @@
+-diff --git a/rp-private.h b/rp-private.h
+-index b4c7dad..0c7193e 100644
+---- a/rp-private.h
+-+++ b/rp-private.h
+-@@ -36,7 +36,7 @@
+- #define LONG_SHIFT ((LONG_LENGTH == 16) ? 4 : \
+-                     (LONG_LENGTH == 32) ? 5 : \
+- 		    (LONG_LENGTH == 64) ? 6 : 0)
+--#define LONG_MASK (~(-1L<<LONG_SHIFT))
+-+#define LONG_MASK (~(-(1L<<LONG_SHIFT)))
+- 
+- /* Check if SSE instructions can be used.
+-    We assume that one SSE word of 128 bit is two long's,
+-diff --git a/sturm.c b/sturm.c
+-index c78d7c6..5fd2cf5 100644
+---- a/sturm.c
+-+++ b/sturm.c
+-@@ -27,7 +27,6 @@
+-  ***********************************************************************/
+- 
+- #include "ratpoints.h"
+--
+- /**************************************************************************
+-  * Arguments of _ratpoints_compute_sturm() : (from the args argument)     *
+-  *                                                                        *
+-@@ -53,7 +52,7 @@
+- /* A helper function: evaluate the polynomial in cofs[] of given degree
+-   at num/2^denexp and return the sign. */
+- 
+--static long eval_sign(ratpoints_args *args, mpz_t *cofs, long degree,
+-+static long eval_sign(const ratpoints_args *args, const mpz_t *cofs, long degree,
+-                       long num, long denexp)
+- {
+-   long n, e, s;
+-@@ -70,11 +69,80 @@ static long eval_sign(ratpoints_args *args, mpz_t *cofs, long degree,
+-   return(s);
+- }
+- 
+-+static const    long max = (long)(((unsigned long)(-1))>>1);
+-+static const    long min = (long)(-(((unsigned long)(-1))>>1));
+-+    /* recursive helper function */
+-+static void iterate(long nl, long nr, long del, long der, long cleft, long cright,
+-+                 long sl, long sr, long depth,
+-+		 ratpoints_interval **iptr, const ratpoints_interval *ivlo,
+-+		 const ratpoints_args *args, const long k, const long sturm_degs[],
+-+                 const mpz_t sturm[][args->degree + 1])
+-+    { /* nl/2^del, nr/2^der : interval left/right endpoints,
+-+         cleft, cright: sign change counts at endpoints,
+-+         sl, sr: signs at endpoints,
+-+         depth: iteration depth */
+-+     long iter = args->sturm;
+-+      if(cleft == cright && sl < 0) { return; }
+-+         /* here we know the polynomial is negative on the interval */
+-+      if((cleft == cright && sl > 0) || depth >= iter)
+-+      /* we have to add/extend an interval if we either know that
+-+         the polynomial is positive on the interval (first condition)
+-+         or the maximal iteration depth has been reached (second condition) */
+-+      { double l = ((double)nl)/((double)(1<<del));
+-+        double u = ((double)nr)/((double)(1<<der));
+-+        if(*iptr == ivlo)
+-+        { (*iptr)->low = l; (*iptr)->up  = u; (*iptr)++; }
+-+        else
+-+        { if(((*iptr)-1)->up == l) /* extend interval */
+-+          { ((*iptr)-1)->up = u; }
+-+          else /* new interval */
+-+          { (*iptr)->low = l; (*iptr)->up  = u; (*iptr)++; }
+-+        }
+-+        return;
+-+      }
+-+      /* now we must split the interval and evaluate the sturm sequence
+-+         at the midpoint */
+-+      { long nm, dem, s0, s1, s2, s, cmid = 0, n;
+-+        if(nl == min)
+-+        { if(nr == max) { nm = 0; dem = 0; }
+-+          else { nm = (nr == 0) ? -1 : 2*nr; dem = 0; }
+-+        }
+-+        else
+-+        { if(nr == max) { nm = (nl == 0) ? 1 : 2*nl; dem = 0; }
+-+          else /* "normal" case */
+-+          { if(del == der) /* then both are zero */
+-+            { if(((nl+nr) & 1) == 0) { nm = (nl+nr)>>1; dem = 0; }
+-+              else { nm = nl+nr; dem = 1; }
+-+            }
+-+            else /* here one de* is greater */
+-+            { if(del > der) { nm = nl + (nr<<(del-der)); dem = del+1; }
+-+              else { nm = (nl<<(der-del)) + nr; dem = der+1; }
+-+            }
+-+          }
+-+        }
+-+        s0 = eval_sign(args, sturm[0], sturm_degs[0], nm, dem);
+-+        s1 = eval_sign(args, sturm[1], sturm_degs[1], nm, dem);
+-+        if(s0*s1 == -1) { cmid++; }
+-+        s = (s1 == 0) ? s0 : s1;
+-+        for(n = 2; n <= k; n++)
+-+        { s2 = eval_sign(args, sturm[n], sturm_degs[n], nm, dem);
+-+          if(s2 == -s) { cmid++; s = s2; }
+-+          else if(s2 != 0) { s = s2; }
+-+        }
+-+        /* now recurse */
+-+        iterate(nl, nm, del, dem, cleft, (s0==0) ? (cmid+1) : cmid,
+-+                sl, (s0==0) ? -s1 : s0, depth+1,
+-+                iptr, ivlo, args, k, sturm_degs, sturm);
+-+        iterate(nm, nr, dem, der, cmid, cright,
+-+                (s0==0) ? s1 : s0, sr, depth+1,
+-+		iptr, ivlo, args, k, sturm_degs, sturm);
+-+      }
+-+    } /* end iterate() */
+-+
+- long _ratpoints_compute_sturm(ratpoints_args *args)
+- { 
+-   mpz_t *cofs = args->cof;
+-   long degree = args->degree;
+--  long iter = args->sturm; 
+-   ratpoints_interval *ivlist = args->domain;
+-   long num_iv = args->num_inter;
+-   long n, m, k, new_num;
+-@@ -165,75 +233,12 @@ long _ratpoints_compute_sturm(ratpoints_args *args)
+-   /* recall: typedef struct {double low; double up;} ratpoints_interval; */
+-   { ratpoints_interval ivlocal[1 + (degree>>1)];
+-     ratpoints_interval *iptr = &ivlocal[0];
+--    long max = (long)(((unsigned long)(-1))>>1);
+--    long min = -max;
+-     long num_intervals;
+-     long slcf = mpz_cmp_si(cofs[degree], 0);
+- 
+--    /* recursive helper function */
+--    void iterate(long nl, long nr, long del, long der, long cleft, long cright,
+--                 long sl, long sr, long depth)
+--    { /* nl/2^del, nr/2^der : interval left/right endpoints,
+--         cleft, cright: sign change counts at endpoints,
+--         sl, sr: signs at endpoints,
+--         depth: iteration depth */
+--      if(cleft == cright && sl < 0) { return; }
+--         /* here we know the polynomial is negative on the interval */
+--      if((cleft == cright && sl > 0) || depth >= iter) 
+--      /* we have to add/extend an interval if we either know that
+--         the polynomial is positive on the interval (first condition)
+--         or the maximal iteration depth has been reached (second condition) */
+--      { double l = ((double)nl)/((double)(1<<del));
+--        double u = ((double)nr)/((double)(1<<der));
+--        if(iptr == &ivlocal[0])
+--        { iptr->low = l; iptr->up  = u; iptr++; }
+--        else
+--        { if((iptr-1)->up == l) /* extend interval */
+--          { (iptr-1)->up = u; }
+--          else /* new interval */
+--          { iptr->low = l; iptr->up  = u; iptr++; }
+--        }
+--        return; 
+--      }
+--      /* now we must split the interval and evaluate the sturm sequence
+--         at the midpoint */
+--      { long nm, dem, s0, s1, s2, s, cmid = 0, n;
+--        if(nl == min)
+--        { if(nr == max) { nm = 0; dem = 0; }
+--          else { nm = (nr == 0) ? -1 : 2*nr; dem = 0; }
+--        }
+--        else
+--        { if(nr == max) { nm = (nl == 0) ? 1 : 2*nl; dem = 0; } 
+--          else /* "normal" case */
+--          { if(del == der) /* then both are zero */
+--            { if(((nl+nr) & 1) == 0) { nm = (nl+nr)>>1; dem = 0; }
+--              else { nm = nl+nr; dem = 1; } 
+--            }
+--            else /* here one de* is greater */
+--            { if(del > der) { nm = nl + (nr<<(del-der)); dem = del+1; }
+--              else { nm = (nl<<(der-del)) + nr; dem = der+1; }
+--            }
+--          }
+--        }
+--        s0 = eval_sign(args, sturm[0], sturm_degs[0], nm, dem);
+--        s1 = eval_sign(args, sturm[1], sturm_degs[1], nm, dem);
+--        if(s0*s1 == -1) { cmid++; }
+--        s = (s1 == 0) ? s0 : s1;
+--        for(n = 2; n <= k; n++)
+--        { s2 = eval_sign(args, sturm[n], sturm_degs[n], nm, dem);
+--          if(s2 == -s) { cmid++; s = s2; }
+--          else if(s2 != 0) { s = s2; }
+--        }
+--        /* now recurse */
+--        iterate(nl, nm, del, dem, cleft, (s0==0) ? (cmid+1) : cmid, 
+--                sl, (s0==0) ? -s1 : s0, depth+1);
+--        iterate(nm, nr, dem, der, cmid, cright, 
+--                (s0==0) ? s1 : s0, sr, depth+1);
+--      }
+--    } /* end iterate() */
+--
+-     iterate(min, max, 0, 0, count2, count1, 
+--            (degree & 1) ? -slcf : slcf, slcf, 0);
+-+            (degree & 1) ? -slcf : slcf, slcf, 0,
+-+	    &iptr, &ivlocal[0], args, k, sturm_degs, sturm);
+-     num_intervals = iptr - &ivlocal[0];
+-     /* intersect with given intervals */
+-     { ratpoints_interval local_copy[num_iv];
+diff --git a/build/pkgs/ratpoints/spkg-install.in b/build/pkgs/ratpoints/spkg-install.in
+deleted file mode 100644
+index b6856c4d4a..0000000000
+--- a/build/pkgs/ratpoints/spkg-install.in
++++ /dev/null
+@@ -1,46 +0,0 @@
+-PRIME_SIZE=7
+-
+-CCFLAGS_NO_SSE="-I$SAGE_LOCAL/include -Wall -O2 -fPIC -DRATPOINTS_MAX_BITS_IN_PRIME=$PRIME_SIZE"
+-CCFLAGS2="-L$SAGE_LOCAL/lib -lgmp -lm $LDFLAGS"
+-CCFLAGS3="-L. -lratpoints"
+-
+-if [[ "$UNAME" = "Darwin" ]]; then
+-    CCFLAGS1="$CCFLAGS_NO_SSE"
+-    echo "Building without SSE2 instructions (MacOS X)."
+-else
+-    CCFLAGS1="$CCFLAGS_NO_SSE -DUSE_SSE"
+-    echo "Attempting to build ratpoints making use of SSE2 instructions."
+-fi
+-
+-# Copy CFLAGS set externally to CCFLAGS.
+-CCFLAGS="$CFLAGS"
+-
+-export CCFLAGS1
+-export CCFLAGS2
+-export CCFLAGS3
+-export CCFLAGS
+-
+-cd src/
+-
+-#############################
+-# Build (just) the library: #
+-#############################
+-
+-# PLEASE, don't break this again by deleting "libratpoints.a".  See trac 8267.
+-if ! $MAKE libratpoints.a; then
+-    [ "$UNAME" = "Darwin" ] && sdh_die "Error building ratpoints."
+-    echo "Build failed. Trying without SSE2 instructions."
+-    CCFLAGS1="$CCFLAGS_NO_SSE"
+-    sdh_make libratpoints.a
+-fi
+-
+-##############################################
+-# Install (just) the library and its header: #
+-##############################################
+-
+-# The following requires that the Makefile got patched;
+-# otherwise one could pass 'INSTALL_DIR=...' on the 'make'
+-# command line:
+-export INSTALL_DIR="$SAGE_DESTDIR_LOCAL"
+-mkdir -p "$INSTALL_DIR"/{lib,include}
+-sdh_make install-lib
+diff --git a/build/pkgs/ratpoints/type b/build/pkgs/ratpoints/type
+deleted file mode 100644
+index a6a7b9cd72..0000000000
+--- a/build/pkgs/ratpoints/type
++++ /dev/null
+@@ -1 +0,0 @@
+-standard
+diff --git a/build/pkgs/sagelib/dependencies b/build/pkgs/sagelib/dependencies
+index 9c7797b1f4..6a7d4b8132 100644
+--- a/build/pkgs/sagelib/dependencies
++++ b/build/pkgs/sagelib/dependencies
+@@ -1,4 +1,4 @@
+-FORCE $(SCRIPTS) arb boost_cropped $(BLAS) brial cliquer cypari cysignals cython ecl eclib ecm flint libgd gap giac givaro glpk gmpy2 gsl iml jinja2 jupyter_core lcalc lrcalc libbraiding libhomfly libpng linbox m4ri m4rie memory_allocator mpc mpfi mpfr $(MP_LIBRARY) ntl numpy pari pip pkgconfig planarity ppl pplpy primesieve primecount primecountpy pycygwin $(PYTHON) ratpoints requests rw sage_conf singular symmetrica zn_poly $(PCFILES) | $(PYTHON_TOOLCHAIN) sage_setup
++FORCE $(SCRIPTS) arb boost_cropped $(BLAS) brial cliquer cypari cysignals cython ecl eclib ecm flint libgd gap giac givaro glpk gmpy2 gsl iml jinja2 jupyter_core lcalc lrcalc libbraiding libhomfly libpng linbox m4ri m4rie memory_allocator mpc mpfi mpfr $(MP_LIBRARY) ntl numpy pari pip pkgconfig planarity ppl pplpy primesieve primecount primecountpy pycygwin $(PYTHON) requests rw sage_conf singular symmetrica zn_poly $(PCFILES) | $(PYTHON_TOOLCHAIN) sage_setup
+ 
+ ----------
+ All lines of this file are ignored except the first.
+diff --git a/src/sage/libs/ratpoints.pxd b/src/sage/libs/ratpoints.pxd
+deleted file mode 100644
+index 67e309b109..0000000000
+--- a/src/sage/libs/ratpoints.pxd
++++ /dev/null
+@@ -1,74 +0,0 @@
+-from sage.rings.integer cimport Integer
+-from sage.libs.gmp.mpz cimport *
+-
+-cdef extern from "ratpoints.h":
+-    long RATPOINTS_MAX_DEGREE
+-    long RATPOINTS_ARRAY_SIZE
+-    long RATPOINTS_DEFAULT_SP1
+-    long RATPOINTS_DEFAULT_SP2
+-    long RATPOINTS_DEFAULT_NUM_PRIMES
+-    long RATPOINTS_DEFAULT_MAX_FORBIDDEN
+-    long RATPOINTS_DEFAULT_STURM
+-    long RATPOINTS_NON_SQUAREFREE
+-    long RATPOINTS_BAD_ARGS
+-
+-    # for args flags:
+-    long RATPOINTS_NO_CHECK # when set, do not check whether the surviving
+-                            # x-coordinates give rise to rational points
+-    long RATPOINTS_NO_Y # when set, only list x coordinates instead of actual points
+-    long RATPOINTS_NO_REVERSE # when set, do not modify the mpz_t array
+-    long RATPOINTS_NO_JACOBI # when set, prevent use of Jacobi symbol test
+-    long RATPOINTS_VERBOSE # when set, print some output on what ratpoints is doing
+-    # define RATPOINTS_FLAGS_INPUT_MASK \
+-    # (RATPOINTS_NO_CHECK | RATPOINTS_NO_Y | RATPOINTS_NO_REVERSE | \
+-    #  RATPOINTS_NO_JACOBI | RATPOINTS_VERBOSE)
+-
+-
+-    ctypedef struct ratpoints_interval:
+-        double low
+-        double up
+-    ctypedef struct ratpoints_args:
+-        mpz_t *cof
+-        long degree
+-        long height
+-        ratpoints_interval *domain
+-        long num_inter
+-        long b_low
+-        long b_high
+-        long sp1
+-        long sp2
+-        long array_size
+-        long sturm
+-        long num_primes
+-        long max_forbidden
+-        unsigned int flags
+-        # from here: private data
+-        # mpz_t *work
+-        # void *se_buffer
+-        # void *se_next
+-        # void *ba_buffer
+-        # void *ba_next
+-        # int *int_buffer
+-        # int *int_next
+-        # void *sieve_list
+-    long find_points(ratpoints_args*, int proc(long, long, mpz_t, void*, int*), void*)
+-    void find_points_init(ratpoints_args*)
+-    long find_points_work(ratpoints_args*, int proc(long, long, mpz_t, void*, int*), void*)
+-    void find_points_clear(ratpoints_args*)
+-
+-ctypedef struct point_list:
+-    long *xes
+-    mpz_t *ys
+-    long *zs
+-    long array_size
+-    long num_points
+-    long max_num_points
+-
+-ctypedef struct info_struct_exists_only:
+-    int verbose
+-
+-cdef int ratpoints_mpz_exists_only(mpz_t *, long, int, bint) except -1
+-
+-
+-
+-
+diff --git a/src/sage/libs/ratpoints.pyx b/src/sage/libs/ratpoints.pyx
+deleted file mode 100644
+index 257dfe3eeb..0000000000
+--- a/src/sage/libs/ratpoints.pyx
++++ /dev/null
+@@ -1,283 +0,0 @@
+-# distutils: libraries = ratpoints
+-r"""
+-Hyperelliptic Curve Point Finding, via ratpoints (deprecated)
+-
+-This module is deprecated, use PARI instead::
+-
+-    sage: pari(EllipticCurve("389a1")).ellratpoints(4)
+-    [[-2, 0], [-2, -1], [-1, 1], [-1, -2], [0, 0], [0, -1], [1, 0], [1, -1], [3, 5], [3, -6], [4, 8], [4, -9], [-3/4, 7/8], [-3/4, -15/8]]
+-    sage: pari("[x^3 + x^2 - 2*x, 1]").hyperellratpoints(4)
+-    [[-2, 0], [-2, -1], [-1, 1], [-1, -2], [0, 0], [0, -1], [1, 0], [1, -1], [3, 5], [3, -6], [4, 8], [4, -9], [-3/4, 7/8], [-3/4, -15/8]]
+-"""
+-
+-from cysignals.memory cimport sig_malloc, sig_realloc, sig_free
+-from cysignals.signals cimport sig_on, sig_off
+-
+-from sage.misc.superseded import deprecation_cython as deprecation
+-deprecation(24531, "the module sage.libs.ratpoints is deprecated; use pari.ellratpoints or pari.hyperellratpoints instead")
+-
+-
+-cdef int process(long x, long z, mpz_t y, void *info0, int *quit):
+-    # ratpoints calls this function when it finds a point [x : y : z]
+-    # info0 is the pointer passed to ratpoints originally
+-    # if quit[0] is set to a nonzero value, ratpoints will abort immediately
+-    cdef point_list *plist = <point_list *> info0
+-    cdef long i
+-    if plist.array_size == plist.num_points:
+-        i = plist.array_size
+-        plist.array_size *= 2
+-        plist.xes = <long *> sig_realloc(plist.xes, plist.array_size * sizeof(long))
+-        plist.ys = <mpz_t *> sig_realloc(plist.ys, plist.array_size * sizeof(mpz_t))
+-        plist.zs = <long *> sig_realloc(plist.zs, plist.array_size * sizeof(long))
+-        while i < plist.array_size:
+-            mpz_init(plist.ys[i])
+-            i += 1
+-    plist.xes[plist.num_points] = x
+-    mpz_set(plist.ys[plist.num_points], y)
+-    plist.zs[plist.num_points] = z
+-    plist.num_points += 1
+-    if plist.max_num_points > 0:
+-        if plist.max_num_points == plist.num_points:
+-            quit[0] = -1
+-    return 1 # weight for counting the points
+-
+-def ratpoints(list coeffs, long H, verbose=False, long max=0,
+-              min_x_denom=None, max_x_denom=None, intervals=[]):
+-    """
+-    Access the ratpoints library to find points on the hyperelliptic curve:
+-
+-    `y^2 = a_n x^n + \cdots + a_1 x + a_0.`
+-
+-    INPUT:
+-
+-    - ``coeffs`` -- list of integer coefficients `a_0` , `a_1`, ..., `a_n`
+-
+-    - ``H`` -- the bound for the denominator and the absolute value of the
+-      numerator of the `x`-coordinate
+-
+-    - ``verbose`` -- if ``True``, ratpoints will print comments about
+-      its progress
+-
+-    - ``max`` -- maximum number of points to find (if 0, find all of them)
+-
+-    OUTPUT:
+-
+-    The points output by this program are points in (1, ceil(n/2), 1)-weighted
+-    projective space. If n is even, then the associated homogeneous equation is
+-    `y^2 = a_n x^n + \cdots + a_1 x z^{n-1} + a_0 z^n` while if n is odd, it is
+-    `y^2 = a_n x^n z + \cdots + a_1 x z^n + a_0 z^{n+1}`.
+-
+-    EXAMPLES::
+-
+-        sage: from sage.libs.ratpoints import ratpoints
+-        doctest:...: DeprecationWarning: the module sage.libs.ratpoints is deprecated; use pari.ellratpoints or pari.hyperellratpoints instead
+-        See http://trac.sagemath.org/24531 for details.
+-        sage: for x,y,z in ratpoints([1..6], 200):
+-        ....:     print(-1*y^2 + 1*z^6 + 2*x*z^5 + 3*x^2*z^4 + 4*x^3*z^3 + 5*x^4*z^2 + 6*x^5*z)
+-        0
+-        0
+-        0
+-        0
+-        0
+-        0
+-        0
+-        sage: for x,y,z in ratpoints([1..5], 200):
+-        ....:    print(-1*y^2 + 1*z^4 + 2*x*z^3 + 3*x^2*z^2 + 4*x^3*z + 5*x^4)
+-        0
+-        0
+-        0
+-        0
+-        0
+-        0
+-        0
+-        0
+-
+-        sage: for x,y,z in ratpoints([1..200], 1000):
+-        ....:    print("{} {} {}".format(x,y,z))
+-        1 0 0
+-        0 1 1
+-        0 -1 1
+-        201 25353012004564588029934064107520000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 200
+-        201 -25353012004564588029934064107520000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 200
+-
+-    The denominator of `x` can be restricted, for example to find
+-    integral points::
+-
+-        sage: from sage.libs.ratpoints import ratpoints
+-        sage: coeffs = [400, -112, 0, 1]
+-        sage: ratpoints(coeffs, 10^6, max_x_denom=1, intervals=[[-10,0],[1000,2000]])
+-        [(1, 0, 0), (-8, 28, 1), (-8, -28, 1), (-7, 29, 1), (-7, -29, 1),
+-         (-4, 28, 1), (-4, -28, 1), (0, 20, 1), (0, -20, 1), (1368, 50596, 1),
+-         (1368, -50596, 1), (1624, 65444, 1), (1624, -65444, 1)]
+-
+-        sage: ratpoints(coeffs, 1000, min_x_denom=100, max_x_denom=200)
+-        [(1, 0, 0),
+-        (-656, 426316, 121),
+-        (-656, -426316, 121),
+-        (452, 85052, 121),
+-        (452, -85052, 121),
+-        (988, 80036, 121),
+-        (988, -80036, 121),
+-        (-556, 773188, 169),
+-        (-556, -773188, 169),
+-        (264, 432068, 169),
+-        (264, -432068, 169)]
+-
+-    Finding the integral points on the compact component of an elliptic curve::
+-
+-        sage: E = EllipticCurve([0,1,0,-35220,-1346400])
+-        sage: e1, e2, e3 = E.division_polynomial(2).roots(multiplicities=False)
+-        sage: coeffs = [E.a6(),E.a4(),E.a2(),1]
+-        sage: ratpoints(coeffs, 1000, max_x_denom=1, intervals=[[e3,e2]])
+-        [(1, 0, 0),
+-        (-165, 0, 1),
+-        (-162, 366, 1),
+-        (-162, -366, 1),
+-        (-120, 1080, 1),
+-        (-120, -1080, 1),
+-        (-90, 1050, 1),
+-        (-90, -1050, 1),
+-        (-85, 1020, 1),
+-        (-85, -1020, 1),
+-        (-42, 246, 1),
+-        (-42, -246, 1),
+-        (-40, 0, 1)]
+-    """
+-    cdef ratpoints_args args
+-    cdef long i, total, verby
+-    cdef Integer sage_int, s_x, s_y, s_z
+-    cdef point_list *plist
+-
+-
+-    verby = ~0 if verbose else 0
+-
+-    # Set the coefficient array:
+-    coeffs = [Integer(a) for a in coeffs]
+-    args.degree = len(coeffs)-1
+-    args.cof = <mpz_t *> sig_malloc((args.degree+1) * sizeof(mpz_t))
+-
+-    # Create an array to hold the points found:
+-    plist = <point_list *> sig_malloc(sizeof(point_list))
+-    if max == 0:
+-        plist.array_size = 64
+-    else:
+-        plist.array_size = max
+-    plist.xes = <long *> sig_malloc(plist.array_size * sizeof(long))
+-    plist.ys = <mpz_t *> sig_malloc(plist.array_size * sizeof(mpz_t))
+-    for i from 0 <= i < plist.array_size:
+-        mpz_init(plist.ys[i])
+-    plist.zs = <long *> sig_malloc(plist.array_size * sizeof(long))
+-    plist.num_points = 0
+-    plist.max_num_points = max
+-
+-    # Set the height bound:
+-    args.height = H
+-
+-    # Set the intervals to be searched, including any specified:
+-    args.num_inter = len(intervals)
+-    args.domain = <ratpoints_interval *> sig_malloc((args.num_inter + args.degree) * sizeof(ratpoints_interval))
+-    for i,I in enumerate(intervals):
+-        args.domain[i].low = I[0]
+-        args.domain[i].up  = I[1]
+-
+-    # Set the minimum and maximum denominators:
+-    if not min_x_denom:  min_x_denom = 1
+-    if not max_x_denom:  max_x_denom = H
+-    args.b_low = min_x_denom
+-    args.b_high = max_x_denom
+-
+-    # Set the remaining arguments, whose non-default use is technical
+-    # (see ratpoints documentation)
+-    args.sp1 = RATPOINTS_DEFAULT_SP1
+-    args.sp2 = RATPOINTS_DEFAULT_SP2
+-    args.array_size = RATPOINTS_ARRAY_SIZE
+-    args.sturm = RATPOINTS_DEFAULT_STURM
+-    args.num_primes = RATPOINTS_DEFAULT_NUM_PRIMES
+-    args.max_forbidden = RATPOINTS_DEFAULT_MAX_FORBIDDEN
+-    args.flags = (RATPOINTS_VERBOSE & verby)
+-
+-    for i from 0 <= i <= args.degree:
+-        mpz_init(args.cof[i])
+-        sage_int = <Integer> coeffs[i]
+-        mpz_set(args.cof[i], sage_int.value)
+-
+-    sig_on()
+-    total = find_points(&args, process, <void *>plist)
+-    sig_off()
+-    if total == RATPOINTS_NON_SQUAREFREE:
+-        raise RuntimeError('Polynomial must be square-free')
+-    if total == RATPOINTS_BAD_ARGS:
+-        raise RuntimeError('Bad arguments to ratpoints')
+-
+-    for i from 0 <= i <= args.degree:
+-        mpz_clear(args.cof[i])
+-
+-    sig_free(args.cof)
+-    sig_free(args.domain)
+-
+-    cdef list L = []
+-    for i from 0 <= i < plist.num_points:
+-        s_x = Integer(0)
+-        s_y = Integer(0)
+-        s_z = Integer(0)
+-        mpz_set_si(s_x.value, plist.xes[i])
+-        mpz_set(s_y.value, plist.ys[i])
+-        mpz_set_si(s_z.value, plist.zs[i])
+-        L.append((s_x,s_y,s_z))
+-
+-    for i from 0 <= i < plist.array_size:
+-        mpz_clear(plist.ys[i])
+-    sig_free(plist.xes)
+-    sig_free(plist.ys)
+-    sig_free(plist.zs)
+-    sig_free(plist)
+-
+-    return L
+-
+-cdef int process_exists_only(long x, long z, mpz_t y, void *info0, int *quit):
+-    cdef info_struct_exists_only *info_s = <info_struct_exists_only *>info0
+-    cdef Integer YY
+-    if info_s.verbose:
+-        YY = Integer(0); mpz_set(YY.value, y)
+-        print('Found point [ %d : %d : %d ], quitting' % (x, YY, z))
+-    quit[0] = -1
+-    return 1
+-
+-cdef int ratpoints_mpz_exists_only(mpz_t *coeffs, long H, int degree, bint verbose) except -1:
+-    """
+-    Direct call to ratpoints to search for existence only.
+-
+-    WARNING - The coefficient array will be modified by ratpoints.
+-    """
+-    cdef ratpoints_args args
+-    cdef info_struct_exists_only info_s
+-    cdef long total, verby = ~0 if verbose else 0
+-    info_s.verbose = verbose
+-    assert degree <= RATPOINTS_MAX_DEGREE
+-    args.degree = degree
+-    args.cof = coeffs
+-    args.domain = <ratpoints_interval *> sig_malloc(2*args.degree * sizeof(ratpoints_interval))
+-    args.height = H
+-    args.num_inter = 0
+-    args.b_low = 1
+-    args.b_high = H
+-    args.sp1 = RATPOINTS_DEFAULT_SP1
+-    args.sp2 = RATPOINTS_DEFAULT_SP2
+-    args.array_size = RATPOINTS_ARRAY_SIZE
+-    args.sturm = RATPOINTS_DEFAULT_STURM
+-    args.num_primes = RATPOINTS_DEFAULT_NUM_PRIMES
+-    args.max_forbidden = RATPOINTS_DEFAULT_MAX_FORBIDDEN
+-    args.flags = (RATPOINTS_VERBOSE & verby)
+-    sig_on()
+-    total = find_points(&args, process_exists_only, <void *>(&info_s))
+-    sig_off()
+-    sig_free(args.domain)
+-    if total == RATPOINTS_NON_SQUAREFREE:
+-        raise RuntimeError('Polynomial must be square-free')
+-    if total == RATPOINTS_BAD_ARGS:
+-        raise RuntimeError('Bad arguments to ratpoints')
+-    return 1 if (total > 0) else 0
+-
+-
+-
+-
+diff --git a/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx b/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx
+index 1cc70925fa..c2f994a650 100644
+--- a/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx
++++ b/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx
+@@ -1,5 +1,3 @@
+-# distutils: libraries = ratpoints
+-
+ r"""
+ Descent on elliptic curves over `\QQ` with a 2-isogeny
+ """
+diff --git a/src/sage_setup/library_order.py b/src/sage_setup/library_order.py
+index 8830d44a95..0b450b3723 100644
+--- a/src/sage_setup/library_order.py
++++ b/src/sage_setup/library_order.py
+@@ -25,7 +25,7 @@ library_order_list = aliases.get("SINGULAR_LIBRARIES", []) + [
+     "giac", "intl", "curl",
+     "ec", "ecm"
+ ] + aliases.get("LINBOX_LIBRARIES", []) + aliases.get("FFLASFFPACK_LIBRARIES", []) + aliases.get("GSL_LIBRARIES", []) + [
+-    "pari", "flint", "ratpoints", "ecl", "glpk", "ppl",
++    "pari", "flint", "ecl", "glpk", "ppl",
+ ] + arb_dylib_names + [
+     "mpfi", "mpfr", "mpc", "ntl", "gmp", "gmpxx",
+     "brial",
+-- 
+2.34.1
+
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 8f27de532058..d3ebd921210d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -32,64 +32,26 @@ _SAGE_ROOT=/usr/lib/sage-${version}
 
 _SAGE_UPSTREAM_MIRROR=https://mirrors.mit.edu/sage/spkg/upstream
 
-# packages were sage is the upstream
-_upstream="
- ${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
- ${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
- ${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
- ${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
- ${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
- ${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
- ${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
- ${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
- ${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
-"
-checksum+="
- c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
- d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
- 5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
- ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
- 169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
- cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
- edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
- b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
- cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
-"
-
-# packages from pypi (python modules)
-_upstream+="
-
- ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
- ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
- ${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
-
- ${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
- ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
-"
-checksum+="
-
- d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
- 5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
- 78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
-
- ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
- dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
-"
-
-# other upstream packages
-_upstream+="
- http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
- https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
- https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
+# these packages can be used from system
+_spkg_system="
+ cppy
+ cython
+ cysignals
+ cypari
+ pplpy
+ fpylll
+ memory_allocator
 "
-checksum+="
- 07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
- 3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
- 718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
+# databases to be used from system
+_databases="
+ combinatorial_designs
+ conway_polynomials
+ elliptic_curves
+ graphs
+ polytopes_db
 "
-
-# these packages are not needed, don't install
-_dontinstall="
+### these packages are not needed, skip
+_spkg_skip="
  appnope
  fonttools
  importlib_resources
@@ -98,18 +60,60 @@ _dontinstall="
  setuptools_wheel
  sphinxcontrib_websupport
  pplpy_doc
+ vcversioner
 "
 
-# these packages can be used from system
-_usefromsystem="
- cppy
- cython
- cysignals
- cypari
- pplpy
- fpylll
+_upstream=""
+
+# threejs
+_upstream+=" https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz"
+checksum+=" 718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8"
+_need_to_pass_doctests="
+ threejs
 "
 
+# primecountpy (use from system?)
+_upstream+=" ${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz"
+checksum+=" 78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676"
+_need_to_build="
+ primecountpy
+"
+
+### these might be necessary to run the notebook... for now skip as doctest pass
+_spkg_skip+="
+ jmol
+ mathjax
+ sagenb_export
+ thebe
+ sagetex
+ jupyter_jsmol
+ rpy2
+"
+#_upstream+="
+# ${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
+# ${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
+# ${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
+# ${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
+# https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+# ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
+# ${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
+#"
+#checksum+="
+# ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
+# 169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
+# b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
+# cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
+# 3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+# d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
+# ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
+#"
+
+for db in $_databases; do
+	_spkg_system+=" $db"
+	depends+=" sage-data-$db"
+	checkdepends+=" sage-data-$db"
+done
+
 for u in ${_upstream}; do
 	distfiles+=" $u"
 	skip_extraction+=" ${u##*[/>]}"
@@ -152,12 +156,12 @@ post_patch() {
 }
 
 pre_configure() {
-	for spkg in $_dontinstall; do
+	for spkg in $_spkg_skip; do
 		configure_args+=" sage_spkg_install_$spkg=no"
 		configure_args+=" sage_require_$spkg=no"
 	done
 
-	for spkg in $_usefromsystem; do
+	for spkg in $_spkg_system; do
 		configure_args+=" sage_spkg_install_$spkg=no"
 		configure_args+=" sage_require_$spkg=yes"
 	done
@@ -174,6 +178,13 @@ post_configure() {
 	cat <<-EOF >> pkgs/sage-conf/sage_conf.py
 	GAP_ROOT_DIR = "/usr/share/gap"
 	GAP_SO = "$(objdump -p /usr/lib/libgap.so | awk '/SONAME/{print $2}')"
+	CONWAY_POLYNOMIALS_DATA_DIR = "/usr/share/sagemath/conway_polynomials"
+	GRAPHS_DATA_DIR = "/usr/share/sagemath/graphs"
+	ELLCURVE_DATA_DIR = "/usr/share/sagemath/ellcurves"
+	POLYTOPE_DATA_DIR = "/usr/share/sagemath/reflexive_polytopes"
+	COMBINATORIAL_DESIGN_DATA_DIR = "/usr/share/sagemath/combinatorial_designs"
+	CREMONA_MINI_DATA_DIR = "/usr/share/sagemath/cremona"
+	CREMONA_LARGE_DATA_DIR = "/usr/share/sagemath/cremona"
 	EOF
 }
 
@@ -213,9 +224,9 @@ do_check() {
 	cp ${FILESDIR}/timings2.json .
 	_test_args="--stats_path=timings2.json"
 	if [ "$XBPS_CHECK_PKGS" = full ]; then
-		_test_args+=" --long --warn-long 20.0"
+		_test_args+=" --long --warn-long 60.0"
 	else
-		_test_args+=" --warn-long 10.0"
+		_test_args+=" --warn-long 30.0"
 	fi
 	if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
 		# for CI use a predictable random seed
@@ -308,7 +319,10 @@ _sage_python3_modules="
  python3-cypari2
  python3-pplpy
  python3-fpylll
- "
+
+ python3-primecountpy
+ python3-memory_allocator
+"
 
 # python packages are build and runtime dependencies
 makedepends+=" $_sage_python3_modules"

From fd6939d5fd4abb4cfe642fbe73b9a859b6ff3b6b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 18 Jan 2022 06:55:53 -0300
Subject: [PATCH 60/60] sagemath: fix do_install()

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

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index d3ebd921210d..4d63eabac13c 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -63,10 +63,8 @@ _spkg_skip="
  vcversioner
 "
 
-_upstream=""
-
 # threejs
-_upstream+=" https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz"
+_upstream="https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz"
 checksum+=" 718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8"
 _need_to_pass_doctests="
  threejs
@@ -198,7 +196,7 @@ do_install() {
 		vcopy local/$f $_SAGE_ROOT/local
 	done
 	vmkdir $_SAGE_ROOT/$(readlink venv)
-	for f in pyvenv.cfg bin etc lib share; do
+	for f in pyvenv.cfg bin lib share; do
 		vcopy venv/$f $_SAGE_ROOT/venv/
 	done
 	vcopy "src" $_SAGE_ROOT # only src/sage ?

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: sagemath-9.5.rc2
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (222 preceding siblings ...)
  2022-01-18  9:56 ` [PR PATCH] [Updated] " tornaria
@ 2022-01-18 21:55 ` tornaria
  2022-01-19 11:01 ` tornaria
                   ` (24 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-18 21:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1180 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.rc2
This is WIP, so I can get feedback.

Supported architectures: x86_64, x86_64-musl, i686. We also try to make sure it works with musl-1.2.

The testsuite can be run normal (-Q) or long (-K). For CI it runs normal (~ 1/2 time) and it uses a fixed random seed 0 to avoid random failures. When running locally, the random seed is random so one may get occasional test failures that depend on a particular value of the random seed.

The package `sagemath-test` is a dummy package whose purpose is to run the testsuite with sage installed as a package and without the build directory. For this to make sense, the masterdir has to be clean (without traces of the sagemath build, this should be ok after running "pkg" or "pkg -Q").

Pending PR for dependencies:
- [ ] #34789 Needs review/testing
- [ ] #35088
- [ ] #35089
- [ ] #35098
- [ ] #35101

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: 771822 bytes --]

From 32f3e2286e51fa25fb83ca4c2e89e594058a1adf 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/63] 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 f4c53a0c7f9fd2e472ba5d3774a45fb12eb93881 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/63] 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 a8bd626442046f920b17764cc05bffa3bd714e44 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/63] 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 c4a5ce15e9f8f9a365a87860aa20033638c3253e 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/63] 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 ab4e24a8515271d93b43fddae2acd5c71cf9b9c4 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/63] 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 c6a3ff806fa97348f963d78bcdb4ebc5a407e61a 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/63] 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 d8ad8a1525190a288773f02da3d139e42019d33f 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/63] 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 3317f99da530d78d311f9b16c7f06435b13c81ca 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/63] 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 54ad0fde0afdb32cbfd3b3e20f1d336a1b998b5c 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/63] 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 f419b3c8b862a638dfe27fe8a22d132b03bca87d 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/63] 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 d8658bb4fc3fa81e7cf022fd9b31911b8ff74aaf 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/63] 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 18594e223e1972b88bb8116218263acb2407775a 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/63] 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 e755bca3e7a22ab00aae9378f93ea04d194f4207 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/63] 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 e1b9721bd780c9a2f9dbd159b78aabbb6da270b0 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/63] 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 8783f69b6ffe3aa3f8df51a817e315c175a8378e 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/63] 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 7faa009fcee7ce5473e0c4ccfeb9e6011c910bca 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/63] 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 5b4e5f557459241dfd5fca02cc89476b000a1373 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/63] 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 b1dd0a9a48de7300b11d1dd638f51639aafd354b 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/63] 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 1ae807111aa6b46843037891b625a2775cd223eb 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/63] 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

From 1f44f728ec67741d12d5d4563c00d4f71cb76d90 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 27 Dec 2021 20:19:19 -0300
Subject: [PATCH 20/63] sagemath: fix license and tests

Now tests can be run with -Q (normal) or -K (--long)
---
 srcpkgs/sagemath/template | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index c5009269c7fc..33b40acbabeb 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -16,7 +16,7 @@ depends="giac git FlintQS zn_poly sympow
  "
 short_desc="Open source mathematics software"
 maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
-license="GPL-3.0-or-later"
+license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
 checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
@@ -155,15 +155,17 @@ do_install() {
 }
 
 do_check() {
-	TEST=--all
 	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
-		TEST="$(sed -e 's/#.*//' ${XBPS_DISTDIR}/sagemath-check)"
+		_test_args=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	fi
+	if [ -z "$_test_args" ]; then
+		_test_args=--all
+	fi
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args="--long $_test_args"
 	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} ${OPT} ${TEST}
-	#./sage -t ${OPT} ${TEST}
+	./sage -tp ${XBPS_MAKEJOBS} ${_test_args}
 }
 
 ### copied from sage-deps, to be kept in sync

From a8ad28dbc15d0ac2cc1dd1309e8fb974e8686abb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 28 Dec 2021 23:08:17 -0300
Subject: [PATCH 21/63] sagemath: fix long time test

---
 .../patches/zzz-fix_long_time_test--see_33091.patch | 13 +++++++++++++
 ...=> zzz-skip_doctest_giac-1.7.0--see_31563.patch} |  0
 2 files changed, 13 insertions(+)
 create mode 100644 srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
 rename srcpkgs/sagemath/patches/{skip-doctest-giac-1.7.0--see-trac-31563.patch => zzz-skip_doctest_giac-1.7.0--see_31563.patch} (100%)

diff --git a/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch b/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
new file mode 100644
index 000000000000..ca360dee9f6e
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage/matrix/matrix2.pyx b/src/sage/matrix/matrix2.pyx
+index 7d319bd54b..c1a2eed6f1 100644
+--- a/src/sage/matrix/matrix2.pyx
++++ b/src/sage/matrix/matrix2.pyx
+@@ -17215,7 +17215,7 @@ cdef class Matrix(Matrix1):
+ 
+             sage: set_random_seed()
+             sage: K = random_cone(max_ambient_dim=5)
+-            sage: all(L.change_ring(SR).is_Z_operator_on(K)
++            sage: all(L.change_ring(SR).is_Z_operator_on(K) # long time
+             ....:     for L in K.Z_operators_gens())  # long time
+             True
+ 
diff --git a/srcpkgs/sagemath/patches/skip-doctest-giac-1.7.0--see-trac-31563.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_31563.patch
similarity index 100%
rename from srcpkgs/sagemath/patches/skip-doctest-giac-1.7.0--see-trac-31563.patch
rename to srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_31563.patch

From cf5081ea8109fbb917edf66832b11adc824d5015 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 31 Dec 2021 13:52:34 -0300
Subject: [PATCH 22/63] python3-Sphinx: update to 4.3.2.

---
 srcpkgs/python3-Sphinx/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/python3-Sphinx/template b/srcpkgs/python3-Sphinx/template
index 8b0493c1f92c..29f892d16157 100644
--- a/srcpkgs/python3-Sphinx/template
+++ b/srcpkgs/python3-Sphinx/template
@@ -1,6 +1,6 @@
 # Template file for 'python3-Sphinx'
 pkgname=python3-Sphinx
-version=4.2.0
+version=4.3.2
 revision=1
 wrksrc=Sphinx-${version}
 build_style=python3-module
@@ -17,8 +17,9 @@ short_desc="Python 3 documentation generator"
 maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
 license="BSD-3-Clause"
 homepage="http://sphinx-doc.org"
+changelog="https://www.sphinx-doc.org/en/master/changes.html"
 distfiles="${PYPI_SITE}/S/Sphinx/Sphinx-${version}.tar.gz"
-checksum=94078db9184491e15bce0a56d9186e0aec95f16ac20b12d00e06d4e36f1058a6
+checksum=0a8836751a68306b3fe97ecbe44db786f8479c3bf4b80e3a7f5c838657b4698c
 conflicts="python-Sphinx>=0"
 
 post_install() {

From f5b5b2cc77c8139672a1f45267c85510b7142505 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 28 Dec 2021 23:08:17 -0300
Subject: [PATCH 23/63] sagemath: use system python site-packages

 - patch from #29665 for that
 - patch on top of that to allow a few more python packages:
   gmpy2, sphinx, typing_extensions, ptyprocess
 - add all available python packages to makedepends and depends
 - add ffmpeg and ImageMagick to makedepends
 - in standard check (-Q) warn if individual test > 5.0s
---
 ...184f7498a2046065e669723e68efe2d65cee.patch | 5629 +++++++++++++++++
 .../zzz-dont_run_pytest--see_31924.patch      |   27 +
 .../zzz-more_site_packages_not_in_29665.patch |   42 +
 srcpkgs/sagemath/template                     |   52 +-
 4 files changed, 5747 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch

diff --git a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
new file mode 100644
index 000000000000..b641113927e7
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
@@ -0,0 +1,5629 @@
+From 05fcaabe95082f42ba134780d579390d7b6153e2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 19:30:58 -0400
+Subject: Trac #29665: add --enable-system-site-packages option to ./configure.
+
+This new option is experimental and disabled by default. When it is
+enabled, the string "--system-site-packages" is appended to a new
+environment variable SAGE_VENV_FLAGS that is then passed to the
+sage-venv command during the build using autoconf substitution.
+Thusly the correct setting finds its way into local/pyvenv.cfg.
+---
+ build/make/Makefile.in |  2 +-
+ configure.ac           | 11 +++++++++++
+ 2 files changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/build/make/Makefile.in b/build/make/Makefile.in
+index f870cc3..68627ab 100644
+--- a/build/make/Makefile.in
++++ b/build/make/Makefile.in
+@@ -211,7 +211,7 @@ endif
+ inst_python3_venv = $(SAGE_VENV)/pyvenv.cfg
+ 
+ $(inst_python3_venv):
+-	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv "$(SAGE_VENV)"
++	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv @SAGE_VENV_FLAGS@ "$(SAGE_VENV)"
+ endif
+ 
+ # Build everything and start Sage.
+diff --git a/configure.ac b/configure.ac
+index 351f487..db30a91 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -435,6 +435,17 @@ AC_ARG_ENABLE([download-from-upstream-url],
+   [AS_HELP_STRING([--enable-download-from-upstream-url],
+     [allow downloading packages from their upstream URL if they cannot be found on the Sage mirrors])])
+ 
++AC_ARG_ENABLE(
++  [system-site-packages], [AS_HELP_STRING(
++    [--enable-system-site-packages],
++    [allow sage to use python packages from the system (experimental; default: no)]
++  )], [
++  AS_IF([test "x$enable_system_site_packages" = "xyes"], [
++    SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
++  ])
++])
++AC_SUBST([SAGE_VENV_FLAGS])
++
+ SAGE_SPKG_OPTIONS=""
+ AS_IF([test "x$enable_experimental_packages" = "xyes"], [
+   AS_VAR_APPEND([SAGE_SPKG_OPTIONS], [" -y"])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9372d1f663edf4e89f9c186336815ca04cff59dc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 19:41:14 -0400
+Subject: Trac #29665: new SAGE_PYTHON_PACKAGE_CHECK() autoconf macro.
+
+This new macro encapsulates the check for system installations of
+python packages. It uses setuptools.version's pkg_resources to
+check if the contents of install-requires.txt are satisfied for
+the given package; and if not, tells the build system to install
+the SPKG instead.
+---
+ m4/sage_python_package_check.m4 | 49 +++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 49 insertions(+)
+ create mode 100644 m4/sage_python_package_check.m4
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+new file mode 100644
+index 00000000..77b0a0c
+--- /dev/null
++++ b/m4/sage_python_package_check.m4
+@@ -0,0 +1,49 @@
++#
++# SYNOPSIS
++#
++#   SAGE_PYTHON_PACKAGE_CHECK(package)
++#
++# DESCRIPTION
++#
++#   Determine if the system copy of a python package can be used by sage.
++#
++#   This macro uses setuptools.version's pkg_resources to check that the
++#   "install-requires.txt" file for the named package is satisfied, and
++#   it can typically fail in four ways:
++#
++#     1. If --enable-system-site-packages was not passed to ./configure,
++#
++#     2. If we are not using the system python (no $PYTHON_FOR_VENV),
++#
++#     3. If setuptools is not available to the system python,
++#
++#     4. If the contents of install-requires.txt are not met (wrong
++#        version, no version, etc.) by the system python.
++#
++#   In any of those cases, we set sage_spkg_install_$package to "yes"
++#   so that the corresponding SPKG is installed. Otherwise, we do
++#   nothing, since the default value of sage_spkg_install_$package
++#   is "no" (to use the system copy).
++#
++#   The SAGE_SPKG_CONFIGURE_PYTHON3() macro is AC_REQUIRE'd to ensure
++#   that $PYTHON_FOR_VENV is available, if it is going to be available.
++#
++
++AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
++  AS_IF([test "${enable_system_site_packages}" = "yes"], [
++    AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
++
++    dnl strip all comments from install-requires.txt; this should leave
++    dnl only a single line containing the version specification for this
++    dnl package.
++    SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
++    AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++    AS_IF(
++      ["${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())"],
++      [AC_MSG_RESULT(yes)],
++      [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
++    )
++  ], [
++    sage_spkg_install_$1=yes
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a0dac8ad81ad6369d479bba30d2388de59e5cecb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:21:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for py.
+
+---
+ build/pkgs/py/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/py/spkg-configure.m4
+
+diff --git a/build/pkgs/py/spkg-configure.m4 b/build/pkgs/py/spkg-configure.m4
+new file mode 100644
+index 00000000..ded7034
+--- /dev/null
++++ b/build/pkgs/py/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([py], [SAGE_PYTHON_PACKAGE_CHECK([py])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 87c463a25ab4432dc1fba4f7a9703284e5b8f620 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:24:15 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for wheel.
+
+---
+ build/pkgs/wheel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wheel/spkg-configure.m4
+
+diff --git a/build/pkgs/wheel/spkg-configure.m4 b/build/pkgs/wheel/spkg-configure.m4
+new file mode 100644
+index 00000000..7897ea9
+--- /dev/null
++++ b/build/pkgs/wheel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([wheel], [SAGE_PYTHON_PACKAGE_CHECK([wheel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 804094b3a980f262f4d53d7be8b1be43ac0c55e0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:25:15 -0400
+Subject: Trac #29665: new spkg-configure.m4 for cvxopt.
+
+This includes a SAGE_SPKG_DEPCHECK([gsl glpk suitesparse],... because
+those C dependencies wind up linked into shared libraries like,
+
+  /usr/.../cvxopt/glpk.cpython-39-x86_64-linux-gnu.so
+
+that could potentially conflict with (for example) the glpk SPKG.
+---
+ build/pkgs/cvxopt/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/cvxopt/spkg-configure.m4
+
+diff --git a/build/pkgs/cvxopt/spkg-configure.m4 b/build/pkgs/cvxopt/spkg-configure.m4
+new file mode 100644
+index 00000000..c4aa619
+--- /dev/null
++++ b/build/pkgs/cvxopt/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([cvxopt], [
++  SAGE_SPKG_DEPCHECK([gsl glpk suitesparse], [
++    SAGE_PYTHON_PACKAGE_CHECK([cvxopt])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3f171955ff8d15da2c98aee0d2e254e95a55a2b5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:28:10 -0400
+Subject: Trac #29665: new spkg-configure.m4 for pyzmq.
+
+This includes a SAGE_SPKG_DEPCHECK([zeromq],... because libzmq winds
+up linked into shared libraries like,
+
+  /usr/.../zmq/backend/cython/message.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the zeromq SPKG.
+---
+ build/pkgs/pyzmq/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/pyzmq/spkg-configure.m4
+
+diff --git a/build/pkgs/pyzmq/spkg-configure.m4 b/build/pkgs/pyzmq/spkg-configure.m4
+new file mode 100644
+index 00000000..ae2b126
+--- /dev/null
++++ b/build/pkgs/pyzmq/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([pyzmq], [
++  SAGE_SPKG_DEPCHECK([zeromq], [
++    SAGE_PYTHON_PACKAGE_CHECK([pyzmq])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20d3aa9da9fc98a6e6a47599cd1b6d1d3785a4c4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:31:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for requests.
+
+---
+ build/pkgs/requests/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/requests/spkg-configure.m4
+
+diff --git a/build/pkgs/requests/spkg-configure.m4 b/build/pkgs/requests/spkg-configure.m4
+new file mode 100644
+index 00000000..f50a66c
+--- /dev/null
++++ b/build/pkgs/requests/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([requests], [SAGE_PYTHON_PACKAGE_CHECK([requests])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4df57ee47f2576b6b7bf9265248e06e90616b689 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:13:34 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for six.
+
+---
+ build/pkgs/six/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/six/spkg-configure.m4
+
+diff --git a/build/pkgs/six/spkg-configure.m4 b/build/pkgs/six/spkg-configure.m4
+new file mode 100644
+index 00000000..a382b81
+--- /dev/null
++++ b/build/pkgs/six/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([six], [SAGE_PYTHON_PACKAGE_CHECK([six])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f4462652d02ca729cc6d7cb36ee4d7d662deafb0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:14:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for packaging.
+
+---
+ build/pkgs/packaging/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/packaging/spkg-configure.m4
+
+diff --git a/build/pkgs/packaging/spkg-configure.m4 b/build/pkgs/packaging/spkg-configure.m4
+new file mode 100644
+index 00000000..398f9e1
+--- /dev/null
++++ b/build/pkgs/packaging/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([packaging], [SAGE_PYTHON_PACKAGE_CHECK([packaging])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4d64677fffce48077e4bc3e20ec833c70e6e9b65 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:18:53 -0400
+Subject: Trac #29665: new spkg-configure.m4 for numpy.
+
+This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack
+wind up linked into shared libraries like,
+
+  /usr/.../numpy/linalg/lapack_lite.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the openblas SPKG.
+---
+ build/pkgs/numpy/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/numpy/spkg-configure.m4
+
+diff --git a/build/pkgs/numpy/spkg-configure.m4 b/build/pkgs/numpy/spkg-configure.m4
+new file mode 100644
+index 00000000..16f9a90
+--- /dev/null
++++ b/build/pkgs/numpy/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([numpy], [
++  SAGE_SPKG_DEPCHECK([openblas], [
++   SAGE_PYTHON_PACKAGE_CHECK([numpy])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 85dfe5bb32f3c470966b477bae68a921e846d11f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:58:48 -0400
+Subject: Trac #29665: new spkg-configure.m4 for scipy.
+
+This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack
+wind up linked into shared libraries like,
+
+  /usr/.../scipy/linalg/_flinalg.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the openblas SPKG.
+---
+ build/pkgs/scipy/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/scipy/spkg-configure.m4
+
+diff --git a/build/pkgs/scipy/spkg-configure.m4 b/build/pkgs/scipy/spkg-configure.m4
+new file mode 100644
+index 00000000..0b7294a
+--- /dev/null
++++ b/build/pkgs/scipy/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([scipy], [
++  SAGE_SPKG_DEPCHECK([openblas], [
++    SAGE_PYTHON_PACKAGE_CHECK([scipy])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5616f1491036fda95f4d3e840c8c8b531c97323b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 07:19:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pluggy.
+
+---
+ build/pkgs/pluggy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pluggy/spkg-configure.m4
+
+diff --git a/build/pkgs/pluggy/spkg-configure.m4 b/build/pkgs/pluggy/spkg-configure.m4
+new file mode 100644
+index 00000000..11b1fce
+--- /dev/null
++++ b/build/pkgs/pluggy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pluggy], [SAGE_PYTHON_PACKAGE_CHECK([pluggy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6bceae3d356878cfe5fce40c9998dead003a3844 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 07:24:12 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pickleshare.
+
+---
+ build/pkgs/pickleshare/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pickleshare/spkg-configure.m4
+
+diff --git a/build/pkgs/pickleshare/spkg-configure.m4 b/build/pkgs/pickleshare/spkg-configure.m4
+new file mode 100644
+index 00000000..80e9b7c
+--- /dev/null
++++ b/build/pkgs/pickleshare/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pickleshare], [SAGE_PYTHON_PACKAGE_CHECK([pickleshare])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From da2ab534f4a256c82ed4f1c5f0f5c320529b5e9f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 08:53:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for html5lib.
+
+---
+ build/pkgs/html5lib/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/html5lib/spkg-configure.m4
+
+diff --git a/build/pkgs/html5lib/spkg-configure.m4 b/build/pkgs/html5lib/spkg-configure.m4
+new file mode 100644
+index 00000000..f421b7e
+--- /dev/null
++++ b/build/pkgs/html5lib/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([html5lib], [SAGE_PYTHON_PACKAGE_CHECK([html5lib])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5e464134afdf6055b7b5804208f759561c5435cd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 18:30:47 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for networkx.
+
+---
+ build/pkgs/networkx/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/networkx/spkg-configure.m4
+
+diff --git a/build/pkgs/networkx/spkg-configure.m4 b/build/pkgs/networkx/spkg-configure.m4
+new file mode 100644
+index 00000000..926671e
+--- /dev/null
++++ b/build/pkgs/networkx/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([networkx], [SAGE_PYTHON_PACKAGE_CHECK([networkx])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c4d40770cd9c7fda811e31759a5f4aedc320f3f9 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:33:24 -0400
+Subject: Trac #29665: new spkg-configure.m4 for matplotlib.
+
+This includes a SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull],...
+because those dependencies wind up linked into shared libraries like,
+
+  /usr/lib/.../matplotlib/ft2font.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with their SPKG counterparts.
+---
+ build/pkgs/matplotlib/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/matplotlib/spkg-configure.m4
+
+diff --git a/build/pkgs/matplotlib/spkg-configure.m4 b/build/pkgs/matplotlib/spkg-configure.m4
+new file mode 100644
+index 00000000..39c2d29
+--- /dev/null
++++ b/build/pkgs/matplotlib/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([matplotlib], [
++  SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull], [
++    SAGE_PYTHON_PACKAGE_CHECK([matplotlib])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7834dc3ac349201af632f89a9de7cd1967931010 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:35:00 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for bleach.
+
+---
+ build/pkgs/bleach/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/bleach/spkg-configure.m4
+
+diff --git a/build/pkgs/bleach/spkg-configure.m4 b/build/pkgs/bleach/spkg-configure.m4
+new file mode 100644
+index 00000000..3c9bb26
+--- /dev/null
++++ b/build/pkgs/bleach/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([bleach], [SAGE_PYTHON_PACKAGE_CHECK([bleach])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 84cad343287a2c69a4a21b9fa3b92301ff88645b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:37:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for decorator.
+
+---
+ build/pkgs/decorator/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/decorator/spkg-configure.m4
+
+diff --git a/build/pkgs/decorator/spkg-configure.m4 b/build/pkgs/decorator/spkg-configure.m4
+new file mode 100644
+index 00000000..e062778
+--- /dev/null
++++ b/build/pkgs/decorator/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([decorator], [SAGE_PYTHON_PACKAGE_CHECK([decorator])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 25693212572e69d452bc95c923ada13744359eb7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:38:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for idna.
+
+---
+ build/pkgs/idna/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/idna/spkg-configure.m4
+
+diff --git a/build/pkgs/idna/spkg-configure.m4 b/build/pkgs/idna/spkg-configure.m4
+new file mode 100644
+index 00000000..9d363f2
+--- /dev/null
++++ b/build/pkgs/idna/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([idna], [SAGE_PYTHON_PACKAGE_CHECK([idna])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6d5616472f6cdc6cf496bba6fe07bd4ef44dfdaf Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:39:23 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for certifi.
+
+---
+ build/pkgs/certifi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/certifi/spkg-configure.m4
+
+diff --git a/build/pkgs/certifi/spkg-configure.m4 b/build/pkgs/certifi/spkg-configure.m4
+new file mode 100644
+index 00000000..ddd4061
+--- /dev/null
++++ b/build/pkgs/certifi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([certifi], [SAGE_PYTHON_PACKAGE_CHECK([certifi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9412a07023b275e29e8d1af9b8ee3e767042e7fd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:40:59 -0400
+Subject: Trac #29665: new spkg-configure.m4 for pillow.
+
+This includes an SAGE_SPKG_DEPCHECK([bzip2 freetype libpng zlib],...
+because those dependencies wind up linked into shared libraries like,
+
+  /usr/.../PIL/_imagingft.cpython-39-x86_64-linux-gnu.so
+
+and potentially conflict with their SPKG counterparts.
+---
+ build/pkgs/pillow/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/pillow/spkg-configure.m4
+
+diff --git a/build/pkgs/pillow/spkg-configure.m4 b/build/pkgs/pillow/spkg-configure.m4
+new file mode 100644
+index 00000000..f2e68e2
+--- /dev/null
++++ b/build/pkgs/pillow/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([pillow], [
++  SAGE_SPKG_DEPCHECK([bzip2 freetype libpng zlib], [
++    SAGE_PYTHON_PACKAGE_CHECK([pillow])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From eede914311481fdb75b363b7a799075e876a2b4f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:44:13 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for mpmath.
+
+---
+ build/pkgs/mpmath/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mpmath/spkg-configure.m4
+
+diff --git a/build/pkgs/mpmath/spkg-configure.m4 b/build/pkgs/mpmath/spkg-configure.m4
+new file mode 100644
+index 00000000..f43c838
+--- /dev/null
++++ b/build/pkgs/mpmath/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([mpmath], [SAGE_PYTHON_PACKAGE_CHECK([mpmath])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 363a825885832c0b580ff53fe61f5c79e70c4728 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:44:56 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for sympy.
+
+---
+ build/pkgs/sympy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sympy/spkg-configure.m4
+
+diff --git a/build/pkgs/sympy/spkg-configure.m4 b/build/pkgs/sympy/spkg-configure.m4
+new file mode 100644
+index 00000000..fa0f1f5
+--- /dev/null
++++ b/build/pkgs/sympy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([sympy], [SAGE_PYTHON_PACKAGE_CHECK([sympy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0667964c914e4a01dda697190a054ff96cea92d6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:47:06 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pygments.
+
+---
+ build/pkgs/pygments/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pygments/spkg-configure.m4
+
+diff --git a/build/pkgs/pygments/spkg-configure.m4 b/build/pkgs/pygments/spkg-configure.m4
+new file mode 100644
+index 00000000..99f29e3
+--- /dev/null
++++ b/build/pkgs/pygments/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pygments], [SAGE_PYTHON_PACKAGE_CHECK([pygments])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f787c233aa05d8e90f7c6ad18f76bd2fa36bfbfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:48:50 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for jinja2.
+
+---
+ build/pkgs/jinja2/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jinja2/spkg-configure.m4
+
+diff --git a/build/pkgs/jinja2/spkg-configure.m4 b/build/pkgs/jinja2/spkg-configure.m4
+new file mode 100644
+index 00000000..0970d1c
+--- /dev/null
++++ b/build/pkgs/jinja2/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jinja2], [SAGE_PYTHON_PACKAGE_CHECK([jinja2])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 309d8f8e2b7078b5efbbe824b69ec1d9b1e639f0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:43:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pandocfilters.
+
+---
+ build/pkgs/pandocfilters/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/pandocfilters/spkg-configure.m4
+
+diff --git a/build/pkgs/pandocfilters/spkg-configure.m4 b/build/pkgs/pandocfilters/spkg-configure.m4
+new file mode 100644
+index 00000000..3e9537f
+--- /dev/null
++++ b/build/pkgs/pandocfilters/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([pandocfilters], [
++  SAGE_PYTHON_PACKAGE_CHECK([pandocfilters])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f57bfda49777a6ba1cd123553acd75dc347c5521 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:44:46 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for webencodings.
+
+---
+ build/pkgs/webencodings/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/webencodings/spkg-configure.m4
+
+diff --git a/build/pkgs/webencodings/spkg-configure.m4 b/build/pkgs/webencodings/spkg-configure.m4
+new file mode 100644
+index 00000000..1b9a5c4
+--- /dev/null
++++ b/build/pkgs/webencodings/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([webencodings], [
++  SAGE_PYTHON_PACKAGE_CHECK([webencodings])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7f193a62d7a2ea0b6a3ca6beb12390d91c25bbfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:48:26 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pytz.
+
+---
+ build/pkgs/pytz/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pytz/spkg-configure.m4
+
+diff --git a/build/pkgs/pytz/spkg-configure.m4 b/build/pkgs/pytz/spkg-configure.m4
+new file mode 100644
+index 00000000..366521b
+--- /dev/null
++++ b/build/pkgs/pytz/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pytz], [SAGE_PYTHON_PACKAGE_CHECK([pytz])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bfd3fdd887c3465c03465248de4997eed4a82915 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:51:16 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for texttable.
+
+---
+ build/pkgs/texttable/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/texttable/spkg-configure.m4
+
+diff --git a/build/pkgs/texttable/spkg-configure.m4 b/build/pkgs/texttable/spkg-configure.m4
+new file mode 100644
+index 00000000..42a3de1
+--- /dev/null
++++ b/build/pkgs/texttable/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([texttable], [SAGE_PYTHON_PACKAGE_CHECK([texttable])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 914bf0cc57abc46129b27c1525782dbe16da31a2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:53:41 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for babel.
+
+---
+ build/pkgs/babel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/babel/spkg-configure.m4
+
+diff --git a/build/pkgs/babel/spkg-configure.m4 b/build/pkgs/babel/spkg-configure.m4
+new file mode 100644
+index 00000000..d7b9a71
+--- /dev/null
++++ b/build/pkgs/babel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([babel], [SAGE_PYTHON_PACKAGE_CHECK([babel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 56977abd1eafbc87c765a2892cfe525382648259 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 14 Oct 2021 08:06:59 -0400
+Subject: Trac #29665: force system python3 with --enable-system-site-packages.
+
+When the python SPKG is used, the --enable-system-site-packages flag
+will essentially do nothing, and that may confuse users who have
+wasted a few hours building sage. (Generally, they will want to fix
+detection of their system python3 first.)
+
+To forestall that, we now set "--with-system-python3=force" whenever
+the "--enable-system-site-packages" flag is passed.
+---
+ configure.ac | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index db30a91..6fafb83 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -438,10 +438,19 @@ AC_ARG_ENABLE([download-from-upstream-url],
+ AC_ARG_ENABLE(
+   [system-site-packages], [AS_HELP_STRING(
+     [--enable-system-site-packages],
+-    [allow sage to use python packages from the system (experimental; default: no)]
++    [allow the use of python packages from the system (experimental; default: no)]
+   )], [
+   AS_IF([test "x$enable_system_site_packages" = "xyes"], [
+     SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
++
++    dnl We want to raise an error if the user asked for "system site
++    dnl packages" but the system python will not be used. Technically
++    dnl that causes no problems (SAGE_PYTHON_PACKAGE_CHECK always fails,
++    dnl so SPKGs are used for all python packages), but it may be confusing
++    dnl to end users who expect the flag to actually give them access to
++    dnl their system python packages and who may not be paying close
++    dnl attention to their ./configure output.
++    with_system_python3="force"
+   ])
+ ])
+ AC_SUBST([SAGE_VENV_FLAGS])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 02b369fd24ef7cf8997082e7850b9cf022cae34b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 01:18:35 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for setuptools.
+
+---
+ build/pkgs/setuptools/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/setuptools/spkg-configure.m4
+
+diff --git a/build/pkgs/setuptools/spkg-configure.m4 b/build/pkgs/setuptools/spkg-configure.m4
+new file mode 100644
+index 00000000..a2ad811
+--- /dev/null
++++ b/build/pkgs/setuptools/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([setuptools], [SAGE_PYTHON_PACKAGE_CHECK([setuptools])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 05117317d38693978efaf36e81d8b02bae44b257 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 01:15:48 -0400
+Subject: Trac #29665: poison PYTHONUSERBASE when testing for "system"
+ packages.
+
+When we're detecting system installations of python packages, we want
+to hide anything that was installed with e.g. "pip install --user". To
+accomplish that, we mimic the PYTHONUSERBASE poisoning from sage-env
+within the SAGE_PYTHON_PACKAGE_CHECK() macro.
+---
+ m4/sage_python_package_check.m4 | 18 +++++++++++++++++-
+ 1 file changed, 17 insertions(+), 1 deletion(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 77b0a0c..b8cdba4 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -38,11 +38,27 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     dnl package.
+     SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
+     AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++
++    dnl To prevent user-site (pip install --user) packages from being
++    dnl detected as "system" packages, we poison PYTHONUSERBASE. The
++    dnl sage-env script also does this at runtime; we mimic that
++    dnl implementation to ensure that the behaviors at ./configure and
++    dnl runtime are identical. Beware that (as in sage-env) the poisoning
++    dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
++    dnl user points PYTHONUSERBASE to any path (even the default), then
++    dnl his local pip packages will be detected.
++    PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
++    AS_IF([test -z "${PYTHONUSERBASE}"], [
++      PYTHONUSERBASE="${HOME}/.sage/local"
++    ])
++
+     AS_IF(
+-      ["${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())"],
++      [PYTHONUSERBASE="${PYTHONUSERBASE}" "${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" 2>/dev/null],
+       [AC_MSG_RESULT(yes)],
+       [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+     )
++
++    PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d75c1492f63a584b5ec5f424ddd7f7c4a6d502d3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:20:04 -0400
+Subject: Trac #29665: run SAGE_PYTHON_PACKAGE_CHECK() inside a venv.
+
+To recreate the runtime environment as closely as possible, we now use
+a venv (with system site packages enabled) when checking for system
+copies of python packages.
+---
+ m4/sage_python_package_check.m4 | 76 +++++++++++++++++++++++++++--------------
+ 1 file changed, 51 insertions(+), 25 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index b8cdba4..7cbd6c0 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -15,9 +15,11 @@
+ #
+ #     2. If we are not using the system python (no $PYTHON_FOR_VENV),
+ #
+-#     3. If setuptools is not available to the system python,
++#     3. If we are unable to create a venv with the system python,
+ #
+-#     4. If the contents of install-requires.txt are not met (wrong
++#     4. If setuptools is not available to the system python,
++#
++#     5. If the contents of install-requires.txt are not met (wrong
+ #        version, no version, etc.) by the system python.
+ #
+ #   In any of those cases, we set sage_spkg_install_$package to "yes"
+@@ -27,38 +29,62 @@
+ #
+ #   The SAGE_SPKG_CONFIGURE_PYTHON3() macro is AC_REQUIRE'd to ensure
+ #   that $PYTHON_FOR_VENV is available, if it is going to be available.
++#   The check is run inside a new venv, and with the PYTHONUSERBASE
++#   variable poisoned in the same manner as sage-env poisons it, to
++#   ensure that the ./configure- and run-time views of the system
++#   are as similar as possible.
+ #
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
+     AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
+ 
+-    dnl strip all comments from install-requires.txt; this should leave
+-    dnl only a single line containing the version specification for this
+-    dnl package.
+-    SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
+-    AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++    dnl We run this check inside a python venv, because that's ultimately
++    dnl how the system $PYTHON_FOR_VENV will be used.
++    AC_MSG_CHECKING([if we can create a python venv in config.venv])
+ 
+-    dnl To prevent user-site (pip install --user) packages from being
+-    dnl detected as "system" packages, we poison PYTHONUSERBASE. The
+-    dnl sage-env script also does this at runtime; we mimic that
+-    dnl implementation to ensure that the behaviors at ./configure and
+-    dnl runtime are identical. Beware that (as in sage-env) the poisoning
+-    dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
+-    dnl user points PYTHONUSERBASE to any path (even the default), then
+-    dnl his local pip packages will be detected.
+-    PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
+-    AS_IF([test -z "${PYTHONUSERBASE}"], [
+-      PYTHONUSERBASE="${HOME}/.sage/local"
+-    ])
++    dnl Use --clear because ./configure typically clobbers its output files.
++    AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
++                                        --clear                dnl
++                                        --without-pip          dnl
++					config.venv], [
++      AC_MSG_RESULT(yes)
++      dnl strip all comments from install-requires.txt; this should leave
++      dnl only a single line containing the version specification for this
++      dnl package.
++      SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
++      AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++
++      dnl To prevent user-site (pip install --user) packages from being
++      dnl detected as "system" packages, we poison PYTHONUSERBASE. The
++      dnl sage-env script also does this at runtime; we mimic that
++      dnl implementation to ensure that the behaviors at ./configure and
++      dnl runtime are identical. Beware that (as in sage-env) the poisoning
++      dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
++      dnl user points PYTHONUSERBASE to any path (even the default), then
++      dnl his local pip packages will be detected.
++      PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
++      AS_IF([test -z "${PYTHONUSERBASE}"], [
++        PYTHONUSERBASE="${HOME}/.sage/local"
++      ])
+ 
+-    AS_IF(
+-      [PYTHONUSERBASE="${PYTHONUSERBASE}" "${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" 2>/dev/null],
+-      [AC_MSG_RESULT(yes)],
+-      [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+-    )
++      AS_IF(
++        [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
++           "from setuptools.version import pkg_resources;              dnl
++            pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" dnl
++	 2>/dev/null],
++        [AC_MSG_RESULT(yes)],
++        [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
++      )
++
++      PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
++    ], [
++      dnl failed to create a venv for some reason
++      AC_MSG_RESULT(no)
++      sage_spkg_install_$1=yes
++    ])
+ 
+-    PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
++    rm -rf config.venv
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 87646c3264a04ffd98a12d67074f93e1943a1e96 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:38:08 -0400
+Subject: Trac #29665: log SAGE_PYTHON_PACKAGE_CHECK() failures to config.log.
+
+---
+ m4/sage_python_package_check.m4 | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 7cbd6c0..e0e0b9f 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -47,7 +47,8 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
+                                         --clear                dnl
+                                         --without-pip          dnl
+-					config.venv], [
++                                        config.venv            dnl
++                                        2>&AS_MESSAGE_LOG_FD], [
+       AC_MSG_RESULT(yes)
+       dnl strip all comments from install-requires.txt; this should leave
+       dnl only a single line containing the version specification for this
+@@ -72,7 +73,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+         [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
+            "from setuptools.version import pkg_resources;              dnl
+             pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" dnl
+-	 2>/dev/null],
++	 2>&AS_MESSAGE_LOG_FD],
+         [AC_MSG_RESULT(yes)],
+         [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+       )
+-- 
+cgit v1.0-1-gd88e
+
+
+From f7dfffd1c64816e2ae4e0f420b22065c5c5bf2cb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:45:37 -0400
+Subject: Trac #29665: don't clobber a plain file named config.venv.
+
+When SAGE_PYTHON_PACKAGE_CHECK() is cleaning up, we no longer remove
+"config.venv" unconditionally. Instead, we remove it only if it is a
+directory. This is also how "pyvenv --clear" works.
+---
+ m4/sage_python_package_check.m4 | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index e0e0b9f..127a078 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -85,7 +85,9 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+       sage_spkg_install_$1=yes
+     ])
+ 
+-    rm -rf config.venv
++    dnl Clean up config.venv, but only if we could have created it.
++    dnl (The --clear flag to pyvenv will not clobber a plain file.)
++    AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9849c77313b895dcfb786d2ea54e36585bd31ce2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 16 Oct 2021 08:14:42 -0400
+Subject: Trac #29665: don't announce system python packages that won't be
+ used.
+
+When --enable-system-site-packages was not given, the python packages
+using SAGE_PYTHON_PACKAGE_CHECK() in spkg-configure.m4 cannot be used.
+Rather than suggest that users install them anyway, that macro now
+hacks the value of sage_use_system_$package to be "no" when the use
+of system site packages is disabled at the python level.
+---
+ m4/sage_python_package_check.m4 | 17 +++++++++++++++++
+ 1 file changed, 17 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 127a078..7ee82a7 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -89,6 +89,23 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     dnl (The --clear flag to pyvenv will not clobber a plain file.)
+     AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
++    dnl System site packages are disabled.
+     sage_spkg_install_$1=yes
++
++    dnl We have to retroactively hack the --with-system-foo={no,yes,force}
++    dnl mechanism here because it wasn't designed with the ability to
++    dnl disable arbitrary chunks of system packages in mind. The easy cases
++    dnl are "no" and "force" which require no action; "no" means we won't
++    dnl suggest the package anyway, and "force" will raise an error when
++    dnl the system-package check fails.
++    dnl
++    dnl The default of "yes" is more troubling because it is the default. To
++    dnl avoid prompting users to install packages that won't be used, we want
++    dnl to ignore "yes" when reporting the "hint: install these packages..."
++    dnl at the end of ./configure. To accomplish that, we change "yes" to
++    dnl "no" here, essentially changing the default for packages using this
++    dnl macro when --enable-system-site-packages is disabled. Packages with
++    dnl "no" are not suggested to the user.
++    AS_IF([test "${sage_use_system_$1}" = "yes"],[sage_use_system_$1=no])
+   ])
+ ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3e6ad737b94aaac234d615ecaf1a2455eb607f1a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 17 Oct 2021 06:16:21 -0400
+Subject: Trac #29665: add Gentoo package information for python packages.
+
+---
+ build/pkgs/babel/distros/gentoo.txt         | 1 +
+ build/pkgs/bleach/distros/gentoo.txt        | 1 +
+ build/pkgs/certifi/distros/gentoo.txt       | 1 +
+ build/pkgs/cvxopt/distros/gentoo.txt        | 1 +
+ build/pkgs/decorator/distros/gentoo.txt     | 1 +
+ build/pkgs/html5lib/distros/gentoo.txt      | 1 +
+ build/pkgs/idna/distros/gentoo.txt          | 1 +
+ build/pkgs/jinja2/distros/gentoo.txt        | 1 +
+ build/pkgs/matplotlib/distros/gentoo.txt    | 1 +
+ build/pkgs/mpmath/distros/gentoo.txt        | 1 +
+ build/pkgs/networkx/distros/gentoo.txt      | 1 +
+ build/pkgs/numpy/distros/gentoo.txt         | 1 +
+ build/pkgs/packaging/distros/gentoo.txt     | 1 +
+ build/pkgs/pandocfilters/distros/gentoo.txt | 1 +
+ build/pkgs/pickleshare/distros/gentoo.txt   | 1 +
+ build/pkgs/pillow/distros/gentoo.txt        | 1 +
+ build/pkgs/pluggy/distros/gentoo.txt        | 1 +
+ build/pkgs/pygments/distros/gentoo.txt      | 1 +
+ build/pkgs/pytz/distros/gentoo.txt          | 1 +
+ build/pkgs/pyzmq/distros/gentoo.txt         | 1 +
+ build/pkgs/requests/distros/gentoo.txt      | 1 +
+ build/pkgs/scipy/distros/gentoo.txt         | 1 +
+ build/pkgs/setuptools/distros/gentoo.txt    | 1 +
+ build/pkgs/six/distros/gentoo.txt           | 1 +
+ build/pkgs/sympy/distros/gentoo.txt         | 1 +
+ build/pkgs/texttable/distros/gentoo.txt     | 1 +
+ build/pkgs/toml/distros/gentoo.txt          | 1 +
+ build/pkgs/webencodings/distros/gentoo.txt  | 1 +
+ 28 files changed, 28 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/gentoo.txt
+ create mode 100644 build/pkgs/bleach/distros/gentoo.txt
+ create mode 100644 build/pkgs/certifi/distros/gentoo.txt
+ create mode 100644 build/pkgs/cvxopt/distros/gentoo.txt
+ create mode 100644 build/pkgs/decorator/distros/gentoo.txt
+ create mode 100644 build/pkgs/html5lib/distros/gentoo.txt
+ create mode 100644 build/pkgs/idna/distros/gentoo.txt
+ create mode 100644 build/pkgs/jinja2/distros/gentoo.txt
+ create mode 100644 build/pkgs/matplotlib/distros/gentoo.txt
+ create mode 100644 build/pkgs/mpmath/distros/gentoo.txt
+ create mode 100644 build/pkgs/networkx/distros/gentoo.txt
+ create mode 100644 build/pkgs/numpy/distros/gentoo.txt
+ create mode 100644 build/pkgs/packaging/distros/gentoo.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/gentoo.txt
+ create mode 100644 build/pkgs/pickleshare/distros/gentoo.txt
+ create mode 100644 build/pkgs/pillow/distros/gentoo.txt
+ create mode 100644 build/pkgs/pluggy/distros/gentoo.txt
+ create mode 100644 build/pkgs/pygments/distros/gentoo.txt
+ create mode 100644 build/pkgs/pytz/distros/gentoo.txt
+ create mode 100644 build/pkgs/pyzmq/distros/gentoo.txt
+ create mode 100644 build/pkgs/requests/distros/gentoo.txt
+ create mode 100644 build/pkgs/scipy/distros/gentoo.txt
+ create mode 100644 build/pkgs/setuptools/distros/gentoo.txt
+ create mode 100644 build/pkgs/six/distros/gentoo.txt
+ create mode 100644 build/pkgs/sympy/distros/gentoo.txt
+ create mode 100644 build/pkgs/texttable/distros/gentoo.txt
+ create mode 100644 build/pkgs/toml/distros/gentoo.txt
+ create mode 100644 build/pkgs/webencodings/distros/gentoo.txt
+
+diff --git a/build/pkgs/babel/distros/gentoo.txt b/build/pkgs/babel/distros/gentoo.txt
+new file mode 100644
+index 00000000..2d2c34f
+--- /dev/null
++++ b/build/pkgs/babel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/Babel
+diff --git a/build/pkgs/bleach/distros/gentoo.txt b/build/pkgs/bleach/distros/gentoo.txt
+new file mode 100644
+index 00000000..b4f9744
+--- /dev/null
++++ b/build/pkgs/bleach/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/bleach
+diff --git a/build/pkgs/certifi/distros/gentoo.txt b/build/pkgs/certifi/distros/gentoo.txt
+new file mode 100644
+index 00000000..72e2e91
+--- /dev/null
++++ b/build/pkgs/certifi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/certifi
+diff --git a/build/pkgs/cvxopt/distros/gentoo.txt b/build/pkgs/cvxopt/distros/gentoo.txt
+new file mode 100644
+index 00000000..b312391
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/cvxopt
+diff --git a/build/pkgs/decorator/distros/gentoo.txt b/build/pkgs/decorator/distros/gentoo.txt
+new file mode 100644
+index 00000000..fea5a67
+--- /dev/null
++++ b/build/pkgs/decorator/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/decorator
+diff --git a/build/pkgs/html5lib/distros/gentoo.txt b/build/pkgs/html5lib/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c2be76
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/html5lib
+diff --git a/build/pkgs/idna/distros/gentoo.txt b/build/pkgs/idna/distros/gentoo.txt
+new file mode 100644
+index 00000000..68ef51c
+--- /dev/null
++++ b/build/pkgs/idna/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/idna
+diff --git a/build/pkgs/jinja2/distros/gentoo.txt b/build/pkgs/jinja2/distros/gentoo.txt
+new file mode 100644
+index 00000000..15a27ae
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jinja
+diff --git a/build/pkgs/matplotlib/distros/gentoo.txt b/build/pkgs/matplotlib/distros/gentoo.txt
+new file mode 100644
+index 00000000..bcfefb5
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/matplotlib
+diff --git a/build/pkgs/mpmath/distros/gentoo.txt b/build/pkgs/mpmath/distros/gentoo.txt
+new file mode 100644
+index 00000000..946c62d
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/mpmath
+diff --git a/build/pkgs/networkx/distros/gentoo.txt b/build/pkgs/networkx/distros/gentoo.txt
+new file mode 100644
+index 00000000..dd97742
+--- /dev/null
++++ b/build/pkgs/networkx/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/networkx
+diff --git a/build/pkgs/numpy/distros/gentoo.txt b/build/pkgs/numpy/distros/gentoo.txt
+new file mode 100644
+index 00000000..d2179d4
+--- /dev/null
++++ b/build/pkgs/numpy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/numpy
+diff --git a/build/pkgs/packaging/distros/gentoo.txt b/build/pkgs/packaging/distros/gentoo.txt
+new file mode 100644
+index 00000000..e5309ed
+--- /dev/null
++++ b/build/pkgs/packaging/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/packaging
+diff --git a/build/pkgs/pandocfilters/distros/gentoo.txt b/build/pkgs/pandocfilters/distros/gentoo.txt
+new file mode 100644
+index 00000000..a726fda
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/gentoo.txt b/build/pkgs/pickleshare/distros/gentoo.txt
+new file mode 100644
+index 00000000..14fad0f
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pickleshare
+diff --git a/build/pkgs/pillow/distros/gentoo.txt b/build/pkgs/pillow/distros/gentoo.txt
+new file mode 100644
+index 00000000..1243649
+--- /dev/null
++++ b/build/pkgs/pillow/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pillow
+diff --git a/build/pkgs/pluggy/distros/gentoo.txt b/build/pkgs/pluggy/distros/gentoo.txt
+new file mode 100644
+index 00000000..7b33876
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pluggy
+diff --git a/build/pkgs/pygments/distros/gentoo.txt b/build/pkgs/pygments/distros/gentoo.txt
+new file mode 100644
+index 00000000..a584f32
+--- /dev/null
++++ b/build/pkgs/pygments/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pygments
+diff --git a/build/pkgs/pytz/distros/gentoo.txt b/build/pkgs/pytz/distros/gentoo.txt
+new file mode 100644
+index 00000000..902a18b
+--- /dev/null
++++ b/build/pkgs/pytz/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pytz
+diff --git a/build/pkgs/pyzmq/distros/gentoo.txt b/build/pkgs/pyzmq/distros/gentoo.txt
+new file mode 100644
+index 00000000..77c2429
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyzmq
+diff --git a/build/pkgs/requests/distros/gentoo.txt b/build/pkgs/requests/distros/gentoo.txt
+new file mode 100644
+index 00000000..d3dc941
+--- /dev/null
++++ b/build/pkgs/requests/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/requests
+diff --git a/build/pkgs/scipy/distros/gentoo.txt b/build/pkgs/scipy/distros/gentoo.txt
+new file mode 100644
+index 00000000..11dabd2
+--- /dev/null
++++ b/build/pkgs/scipy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/scipy
+diff --git a/build/pkgs/setuptools/distros/gentoo.txt b/build/pkgs/setuptools/distros/gentoo.txt
+new file mode 100644
+index 00000000..3a4fa34
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/setuptools
+diff --git a/build/pkgs/six/distros/gentoo.txt b/build/pkgs/six/distros/gentoo.txt
+new file mode 100644
+index 00000000..f73f648
+--- /dev/null
++++ b/build/pkgs/six/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/six
+diff --git a/build/pkgs/sympy/distros/gentoo.txt b/build/pkgs/sympy/distros/gentoo.txt
+new file mode 100644
+index 00000000..b5a5034
+--- /dev/null
++++ b/build/pkgs/sympy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sympy
+diff --git a/build/pkgs/texttable/distros/gentoo.txt b/build/pkgs/texttable/distros/gentoo.txt
+new file mode 100644
+index 00000000..b33a7a7
+--- /dev/null
++++ b/build/pkgs/texttable/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/texttable
+diff --git a/build/pkgs/toml/distros/gentoo.txt b/build/pkgs/toml/distros/gentoo.txt
+new file mode 100644
+index 00000000..64fcea3
+--- /dev/null
++++ b/build/pkgs/toml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/toml
+diff --git a/build/pkgs/webencodings/distros/gentoo.txt b/build/pkgs/webencodings/distros/gentoo.txt
+new file mode 100644
+index 00000000..7539b0f
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/webencodings
+-- 
+cgit v1.0-1-gd88e
+
+
+From 088380f884124c9608160b613ba031c5f023f604 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 18:43:04 -0700
+Subject: build/pkgs: Add distros/fedora.txt for Python packages
+
+---
+ build/pkgs/babel/distros/fedora.txt         | 1 +
+ build/pkgs/bleach/distros/fedora.txt        | 1 +
+ build/pkgs/certifi/distros/fedora.txt       | 1 +
+ build/pkgs/cvxopt/distros/fedora.txt        | 1 +
+ build/pkgs/decorator/distros/fedora.txt     | 1 +
+ build/pkgs/html5lib/distros/fedora.txt      | 1 +
+ build/pkgs/idna/distros/fedora.txt          | 1 +
+ build/pkgs/jinja2/distros/fedora.txt        | 1 +
+ build/pkgs/matplotlib/distros/fedora.txt    | 1 +
+ build/pkgs/mpmath/distros/fedora.txt        | 1 +
+ build/pkgs/networkx/distros/fedora.txt      | 1 +
+ build/pkgs/numpy/distros/fedora.txt         | 1 +
+ build/pkgs/packaging/distros/fedora.txt     | 1 +
+ build/pkgs/pandocfilters/distros/fedora.txt | 1 +
+ build/pkgs/pickleshare/distros/fedora.txt   | 1 +
+ build/pkgs/pillow/distros/fedora.txt        | 1 +
+ build/pkgs/pluggy/distros/fedora.txt        | 1 +
+ build/pkgs/py/distros/fedora.txt            | 1 +
+ build/pkgs/pygments/distros/fedora.txt      | 1 +
+ build/pkgs/pytz/distros/fedora.txt          | 1 +
+ build/pkgs/pyzmq/distros/fedora.txt         | 1 +
+ build/pkgs/requests/distros/fedora.txt      | 1 +
+ build/pkgs/scipy/distros/fedora.txt         | 1 +
+ build/pkgs/setuptools/distros/fedora.txt    | 1 +
+ build/pkgs/six/distros/fedora.txt           | 1 +
+ build/pkgs/sympy/distros/fedora.txt         | 1 +
+ build/pkgs/texttable/distros/fedora.txt     | 1 +
+ build/pkgs/toml/distros/fedora.txt          | 1 +
+ build/pkgs/webencodings/distros/fedora.txt  | 1 +
+ build/pkgs/wheel/distros/fedora.txt         | 1 +
+ 30 files changed, 30 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/fedora.txt
+ create mode 100644 build/pkgs/bleach/distros/fedora.txt
+ create mode 100644 build/pkgs/certifi/distros/fedora.txt
+ create mode 100644 build/pkgs/cvxopt/distros/fedora.txt
+ create mode 100644 build/pkgs/decorator/distros/fedora.txt
+ create mode 100644 build/pkgs/html5lib/distros/fedora.txt
+ create mode 100644 build/pkgs/idna/distros/fedora.txt
+ create mode 100644 build/pkgs/jinja2/distros/fedora.txt
+ create mode 100644 build/pkgs/matplotlib/distros/fedora.txt
+ create mode 100644 build/pkgs/mpmath/distros/fedora.txt
+ create mode 100644 build/pkgs/networkx/distros/fedora.txt
+ create mode 100644 build/pkgs/numpy/distros/fedora.txt
+ create mode 100644 build/pkgs/packaging/distros/fedora.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/fedora.txt
+ create mode 100644 build/pkgs/pickleshare/distros/fedora.txt
+ create mode 100644 build/pkgs/pillow/distros/fedora.txt
+ create mode 100644 build/pkgs/pluggy/distros/fedora.txt
+ create mode 100644 build/pkgs/py/distros/fedora.txt
+ create mode 100644 build/pkgs/pygments/distros/fedora.txt
+ create mode 100644 build/pkgs/pytz/distros/fedora.txt
+ create mode 100644 build/pkgs/pyzmq/distros/fedora.txt
+ create mode 100644 build/pkgs/requests/distros/fedora.txt
+ create mode 100644 build/pkgs/scipy/distros/fedora.txt
+ create mode 100644 build/pkgs/setuptools/distros/fedora.txt
+ create mode 100644 build/pkgs/six/distros/fedora.txt
+ create mode 100644 build/pkgs/sympy/distros/fedora.txt
+ create mode 100644 build/pkgs/texttable/distros/fedora.txt
+ create mode 100644 build/pkgs/toml/distros/fedora.txt
+ create mode 100644 build/pkgs/webencodings/distros/fedora.txt
+ create mode 100644 build/pkgs/wheel/distros/fedora.txt
+
+diff --git a/build/pkgs/babel/distros/fedora.txt b/build/pkgs/babel/distros/fedora.txt
+new file mode 100644
+index 00000000..98f6593
+--- /dev/null
++++ b/build/pkgs/babel/distros/fedora.txt
+@@ -0,0 +1 @@
++babel
+diff --git a/build/pkgs/bleach/distros/fedora.txt b/build/pkgs/bleach/distros/fedora.txt
+new file mode 100644
+index 00000000..c5422cc
+--- /dev/null
++++ b/build/pkgs/bleach/distros/fedora.txt
+@@ -0,0 +1 @@
++python-bleach
+diff --git a/build/pkgs/certifi/distros/fedora.txt b/build/pkgs/certifi/distros/fedora.txt
+new file mode 100644
+index 00000000..be421c8
+--- /dev/null
++++ b/build/pkgs/certifi/distros/fedora.txt
+@@ -0,0 +1 @@
++python-certifi
+diff --git a/build/pkgs/cvxopt/distros/fedora.txt b/build/pkgs/cvxopt/distros/fedora.txt
+new file mode 100644
+index 00000000..f15770f
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/fedora.txt
+@@ -0,0 +1 @@
++python-cvxopt
+diff --git a/build/pkgs/decorator/distros/fedora.txt b/build/pkgs/decorator/distros/fedora.txt
+new file mode 100644
+index 00000000..0795604
+--- /dev/null
++++ b/build/pkgs/decorator/distros/fedora.txt
+@@ -0,0 +1 @@
++python-decorator
+diff --git a/build/pkgs/html5lib/distros/fedora.txt b/build/pkgs/html5lib/distros/fedora.txt
+new file mode 100644
+index 00000000..b821491
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/fedora.txt
+@@ -0,0 +1 @@
++python-html5lib
+diff --git a/build/pkgs/idna/distros/fedora.txt b/build/pkgs/idna/distros/fedora.txt
+new file mode 100644
+index 00000000..a73e70c
+--- /dev/null
++++ b/build/pkgs/idna/distros/fedora.txt
+@@ -0,0 +1 @@
++python-idna
+diff --git a/build/pkgs/jinja2/distros/fedora.txt b/build/pkgs/jinja2/distros/fedora.txt
+new file mode 100644
+index 00000000..f5f3caf
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/fedora.txt
+@@ -0,0 +1 @@
++python-jinja2
+diff --git a/build/pkgs/matplotlib/distros/fedora.txt b/build/pkgs/matplotlib/distros/fedora.txt
+new file mode 100644
+index 00000000..f6d856e
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/fedora.txt
+@@ -0,0 +1 @@
++python-matplotlib
+diff --git a/build/pkgs/mpmath/distros/fedora.txt b/build/pkgs/mpmath/distros/fedora.txt
+new file mode 100644
+index 00000000..a7dc8d5
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/fedora.txt
+@@ -0,0 +1 @@
++python-mpmath
+diff --git a/build/pkgs/networkx/distros/fedora.txt b/build/pkgs/networkx/distros/fedora.txt
+new file mode 100644
+index 00000000..293f943
+--- /dev/null
++++ b/build/pkgs/networkx/distros/fedora.txt
+@@ -0,0 +1 @@
++python-networkx
+diff --git a/build/pkgs/numpy/distros/fedora.txt b/build/pkgs/numpy/distros/fedora.txt
+new file mode 100644
+index 00000000..c8722b9
+--- /dev/null
++++ b/build/pkgs/numpy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-numpy
+diff --git a/build/pkgs/packaging/distros/fedora.txt b/build/pkgs/packaging/distros/fedora.txt
+new file mode 100644
+index 00000000..02ad855
+--- /dev/null
++++ b/build/pkgs/packaging/distros/fedora.txt
+@@ -0,0 +1 @@
++python-packaging
+diff --git a/build/pkgs/pandocfilters/distros/fedora.txt b/build/pkgs/pandocfilters/distros/fedora.txt
+new file mode 100644
+index 00000000..e7a86d0
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/fedora.txt b/build/pkgs/pickleshare/distros/fedora.txt
+new file mode 100644
+index 00000000..6d991a2
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pickleshare
+diff --git a/build/pkgs/pillow/distros/fedora.txt b/build/pkgs/pillow/distros/fedora.txt
+new file mode 100644
+index 00000000..86dbb1d
+--- /dev/null
++++ b/build/pkgs/pillow/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pillow
+diff --git a/build/pkgs/pluggy/distros/fedora.txt b/build/pkgs/pluggy/distros/fedora.txt
+new file mode 100644
+index 00000000..c869e54
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pluggy
+diff --git a/build/pkgs/py/distros/fedora.txt b/build/pkgs/py/distros/fedora.txt
+new file mode 100644
+index 00000000..b348d39
+--- /dev/null
++++ b/build/pkgs/py/distros/fedora.txt
+@@ -0,0 +1 @@
++python-py
+diff --git a/build/pkgs/pygments/distros/fedora.txt b/build/pkgs/pygments/distros/fedora.txt
+new file mode 100644
+index 00000000..f3e72a8
+--- /dev/null
++++ b/build/pkgs/pygments/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pygments
+diff --git a/build/pkgs/pytz/distros/fedora.txt b/build/pkgs/pytz/distros/fedora.txt
+new file mode 100644
+index 00000000..2cccc9e
+--- /dev/null
++++ b/build/pkgs/pytz/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pytz
+diff --git a/build/pkgs/pyzmq/distros/fedora.txt b/build/pkgs/pyzmq/distros/fedora.txt
+new file mode 100644
+index 00000000..23f64d1
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pyzmq
+diff --git a/build/pkgs/requests/distros/fedora.txt b/build/pkgs/requests/distros/fedora.txt
+new file mode 100644
+index 00000000..93a7bc1
+--- /dev/null
++++ b/build/pkgs/requests/distros/fedora.txt
+@@ -0,0 +1 @@
++python-requests
+diff --git a/build/pkgs/scipy/distros/fedora.txt b/build/pkgs/scipy/distros/fedora.txt
+new file mode 100644
+index 00000000..7ff2882
+--- /dev/null
++++ b/build/pkgs/scipy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-scipy
+diff --git a/build/pkgs/setuptools/distros/fedora.txt b/build/pkgs/setuptools/distros/fedora.txt
+new file mode 100644
+index 00000000..e1ad178
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/fedora.txt
+@@ -0,0 +1 @@
++python-setuptools
+diff --git a/build/pkgs/six/distros/fedora.txt b/build/pkgs/six/distros/fedora.txt
+new file mode 100644
+index 00000000..787c530
+--- /dev/null
++++ b/build/pkgs/six/distros/fedora.txt
+@@ -0,0 +1 @@
++python-six
+diff --git a/build/pkgs/sympy/distros/fedora.txt b/build/pkgs/sympy/distros/fedora.txt
+new file mode 100644
+index 00000000..126c88a
+--- /dev/null
++++ b/build/pkgs/sympy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-sympy
+diff --git a/build/pkgs/texttable/distros/fedora.txt b/build/pkgs/texttable/distros/fedora.txt
+new file mode 100644
+index 00000000..8d1ccec
+--- /dev/null
++++ b/build/pkgs/texttable/distros/fedora.txt
+@@ -0,0 +1 @@
++python-texttable
+diff --git a/build/pkgs/toml/distros/fedora.txt b/build/pkgs/toml/distros/fedora.txt
+new file mode 100644
+index 00000000..821ee77
+--- /dev/null
++++ b/build/pkgs/toml/distros/fedora.txt
+@@ -0,0 +1 @@
++python-toml
+diff --git a/build/pkgs/webencodings/distros/fedora.txt b/build/pkgs/webencodings/distros/fedora.txt
+new file mode 100644
+index 00000000..12ddba9
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/fedora.txt
+@@ -0,0 +1 @@
++python-webencodings
+diff --git a/build/pkgs/wheel/distros/fedora.txt b/build/pkgs/wheel/distros/fedora.txt
+new file mode 100644
+index 00000000..ae4cbb9
+--- /dev/null
++++ b/build/pkgs/wheel/distros/fedora.txt
+@@ -0,0 +1 @@
++python-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From ad1d5a20380b147c774903066031442f31094626 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 21:04:04 -0700
+Subject: build/pkgs: Add distros/arch.txt for Python packages
+
+---
+ build/pkgs/babel/distros/arch.txt         | 1 +
+ build/pkgs/bleach/distros/arch.txt        | 1 +
+ build/pkgs/certifi/distros/arch.txt       | 1 +
+ build/pkgs/cvxopt/distros/arch.txt        | 1 +
+ build/pkgs/decorator/distros/arch.txt     | 1 +
+ build/pkgs/html5lib/distros/arch.txt      | 1 +
+ build/pkgs/idna/distros/arch.txt          | 1 +
+ build/pkgs/matplotlib/distros/arch.txt    | 1 +
+ build/pkgs/mpmath/distros/arch.txt        | 1 +
+ build/pkgs/networkx/distros/arch.txt      | 1 +
+ build/pkgs/numpy/distros/arch.txt         | 1 +
+ build/pkgs/packaging/distros/arch.txt     | 1 +
+ build/pkgs/pandocfilters/distros/arch.txt | 1 +
+ build/pkgs/pickleshare/distros/arch.txt   | 1 +
+ build/pkgs/pillow/distros/arch.txt        | 1 +
+ build/pkgs/pluggy/distros/arch.txt        | 1 +
+ build/pkgs/py/distros/arch.txt            | 1 +
+ build/pkgs/pygments/distros/arch.txt      | 1 +
+ build/pkgs/pytz/distros/arch.txt          | 1 +
+ build/pkgs/pyzmq/distros/arch.txt         | 1 +
+ build/pkgs/requests/distros/arch.txt      | 1 +
+ build/pkgs/scipy/distros/arch.txt         | 1 +
+ build/pkgs/setuptools/distros/arch.txt    | 1 +
+ build/pkgs/six/distros/arch.txt           | 1 +
+ build/pkgs/sympy/distros/arch.txt         | 1 +
+ build/pkgs/texttable/distros/arch.txt     | 1 +
+ build/pkgs/toml/distros/arch.txt          | 1 +
+ build/pkgs/webencodings/distros/arch.txt  | 1 +
+ build/pkgs/wheel/distros/arch.txt         | 1 +
+ 29 files changed, 29 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/arch.txt
+ create mode 100644 build/pkgs/bleach/distros/arch.txt
+ create mode 100644 build/pkgs/certifi/distros/arch.txt
+ create mode 100644 build/pkgs/cvxopt/distros/arch.txt
+ create mode 100644 build/pkgs/decorator/distros/arch.txt
+ create mode 100644 build/pkgs/html5lib/distros/arch.txt
+ create mode 100644 build/pkgs/idna/distros/arch.txt
+ create mode 100644 build/pkgs/matplotlib/distros/arch.txt
+ create mode 100644 build/pkgs/mpmath/distros/arch.txt
+ create mode 100644 build/pkgs/networkx/distros/arch.txt
+ create mode 100644 build/pkgs/numpy/distros/arch.txt
+ create mode 100644 build/pkgs/packaging/distros/arch.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/arch.txt
+ create mode 100644 build/pkgs/pickleshare/distros/arch.txt
+ create mode 100644 build/pkgs/pillow/distros/arch.txt
+ create mode 100644 build/pkgs/pluggy/distros/arch.txt
+ create mode 100644 build/pkgs/py/distros/arch.txt
+ create mode 100644 build/pkgs/pygments/distros/arch.txt
+ create mode 100644 build/pkgs/pytz/distros/arch.txt
+ create mode 100644 build/pkgs/pyzmq/distros/arch.txt
+ create mode 100644 build/pkgs/requests/distros/arch.txt
+ create mode 100644 build/pkgs/scipy/distros/arch.txt
+ create mode 100644 build/pkgs/setuptools/distros/arch.txt
+ create mode 100644 build/pkgs/six/distros/arch.txt
+ create mode 100644 build/pkgs/sympy/distros/arch.txt
+ create mode 100644 build/pkgs/texttable/distros/arch.txt
+ create mode 100644 build/pkgs/toml/distros/arch.txt
+ create mode 100644 build/pkgs/webencodings/distros/arch.txt
+ create mode 100644 build/pkgs/wheel/distros/arch.txt
+
+diff --git a/build/pkgs/babel/distros/arch.txt b/build/pkgs/babel/distros/arch.txt
+new file mode 100644
+index 00000000..f2d828c
+--- /dev/null
++++ b/build/pkgs/babel/distros/arch.txt
+@@ -0,0 +1 @@
++python-babel
+diff --git a/build/pkgs/bleach/distros/arch.txt b/build/pkgs/bleach/distros/arch.txt
+new file mode 100644
+index 00000000..c5422cc
+--- /dev/null
++++ b/build/pkgs/bleach/distros/arch.txt
+@@ -0,0 +1 @@
++python-bleach
+diff --git a/build/pkgs/certifi/distros/arch.txt b/build/pkgs/certifi/distros/arch.txt
+new file mode 100644
+index 00000000..be421c8
+--- /dev/null
++++ b/build/pkgs/certifi/distros/arch.txt
+@@ -0,0 +1 @@
++python-certifi
+diff --git a/build/pkgs/cvxopt/distros/arch.txt b/build/pkgs/cvxopt/distros/arch.txt
+new file mode 100644
+index 00000000..f15770f
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/arch.txt
+@@ -0,0 +1 @@
++python-cvxopt
+diff --git a/build/pkgs/decorator/distros/arch.txt b/build/pkgs/decorator/distros/arch.txt
+new file mode 100644
+index 00000000..0795604
+--- /dev/null
++++ b/build/pkgs/decorator/distros/arch.txt
+@@ -0,0 +1 @@
++python-decorator
+diff --git a/build/pkgs/html5lib/distros/arch.txt b/build/pkgs/html5lib/distros/arch.txt
+new file mode 100644
+index 00000000..b821491
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/arch.txt
+@@ -0,0 +1 @@
++python-html5lib
+diff --git a/build/pkgs/idna/distros/arch.txt b/build/pkgs/idna/distros/arch.txt
+new file mode 100644
+index 00000000..a73e70c
+--- /dev/null
++++ b/build/pkgs/idna/distros/arch.txt
+@@ -0,0 +1 @@
++python-idna
+diff --git a/build/pkgs/matplotlib/distros/arch.txt b/build/pkgs/matplotlib/distros/arch.txt
+new file mode 100644
+index 00000000..f6d856e
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/arch.txt
+@@ -0,0 +1 @@
++python-matplotlib
+diff --git a/build/pkgs/mpmath/distros/arch.txt b/build/pkgs/mpmath/distros/arch.txt
+new file mode 100644
+index 00000000..a7dc8d5
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/arch.txt
+@@ -0,0 +1 @@
++python-mpmath
+diff --git a/build/pkgs/networkx/distros/arch.txt b/build/pkgs/networkx/distros/arch.txt
+new file mode 100644
+index 00000000..293f943
+--- /dev/null
++++ b/build/pkgs/networkx/distros/arch.txt
+@@ -0,0 +1 @@
++python-networkx
+diff --git a/build/pkgs/numpy/distros/arch.txt b/build/pkgs/numpy/distros/arch.txt
+new file mode 100644
+index 00000000..c8722b9
+--- /dev/null
++++ b/build/pkgs/numpy/distros/arch.txt
+@@ -0,0 +1 @@
++python-numpy
+diff --git a/build/pkgs/packaging/distros/arch.txt b/build/pkgs/packaging/distros/arch.txt
+new file mode 100644
+index 00000000..02ad855
+--- /dev/null
++++ b/build/pkgs/packaging/distros/arch.txt
+@@ -0,0 +1 @@
++python-packaging
+diff --git a/build/pkgs/pandocfilters/distros/arch.txt b/build/pkgs/pandocfilters/distros/arch.txt
+new file mode 100644
+index 00000000..e7a86d0
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/arch.txt
+@@ -0,0 +1 @@
++python-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/arch.txt b/build/pkgs/pickleshare/distros/arch.txt
+new file mode 100644
+index 00000000..6d991a2
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/arch.txt
+@@ -0,0 +1 @@
++python-pickleshare
+diff --git a/build/pkgs/pillow/distros/arch.txt b/build/pkgs/pillow/distros/arch.txt
+new file mode 100644
+index 00000000..86dbb1d
+--- /dev/null
++++ b/build/pkgs/pillow/distros/arch.txt
+@@ -0,0 +1 @@
++python-pillow
+diff --git a/build/pkgs/pluggy/distros/arch.txt b/build/pkgs/pluggy/distros/arch.txt
+new file mode 100644
+index 00000000..c869e54
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/arch.txt
+@@ -0,0 +1 @@
++python-pluggy
+diff --git a/build/pkgs/py/distros/arch.txt b/build/pkgs/py/distros/arch.txt
+new file mode 100644
+index 00000000..b348d39
+--- /dev/null
++++ b/build/pkgs/py/distros/arch.txt
+@@ -0,0 +1 @@
++python-py
+diff --git a/build/pkgs/pygments/distros/arch.txt b/build/pkgs/pygments/distros/arch.txt
+new file mode 100644
+index 00000000..f3e72a8
+--- /dev/null
++++ b/build/pkgs/pygments/distros/arch.txt
+@@ -0,0 +1 @@
++python-pygments
+diff --git a/build/pkgs/pytz/distros/arch.txt b/build/pkgs/pytz/distros/arch.txt
+new file mode 100644
+index 00000000..2cccc9e
+--- /dev/null
++++ b/build/pkgs/pytz/distros/arch.txt
+@@ -0,0 +1 @@
++python-pytz
+diff --git a/build/pkgs/pyzmq/distros/arch.txt b/build/pkgs/pyzmq/distros/arch.txt
+new file mode 100644
+index 00000000..23f64d1
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/arch.txt
+@@ -0,0 +1 @@
++python-pyzmq
+diff --git a/build/pkgs/requests/distros/arch.txt b/build/pkgs/requests/distros/arch.txt
+new file mode 100644
+index 00000000..93a7bc1
+--- /dev/null
++++ b/build/pkgs/requests/distros/arch.txt
+@@ -0,0 +1 @@
++python-requests
+diff --git a/build/pkgs/scipy/distros/arch.txt b/build/pkgs/scipy/distros/arch.txt
+new file mode 100644
+index 00000000..7ff2882
+--- /dev/null
++++ b/build/pkgs/scipy/distros/arch.txt
+@@ -0,0 +1 @@
++python-scipy
+diff --git a/build/pkgs/setuptools/distros/arch.txt b/build/pkgs/setuptools/distros/arch.txt
+new file mode 100644
+index 00000000..e1ad178
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/arch.txt
+@@ -0,0 +1 @@
++python-setuptools
+diff --git a/build/pkgs/six/distros/arch.txt b/build/pkgs/six/distros/arch.txt
+new file mode 100644
+index 00000000..787c530
+--- /dev/null
++++ b/build/pkgs/six/distros/arch.txt
+@@ -0,0 +1 @@
++python-six
+diff --git a/build/pkgs/sympy/distros/arch.txt b/build/pkgs/sympy/distros/arch.txt
+new file mode 100644
+index 00000000..126c88a
+--- /dev/null
++++ b/build/pkgs/sympy/distros/arch.txt
+@@ -0,0 +1 @@
++python-sympy
+diff --git a/build/pkgs/texttable/distros/arch.txt b/build/pkgs/texttable/distros/arch.txt
+new file mode 100644
+index 00000000..8d1ccec
+--- /dev/null
++++ b/build/pkgs/texttable/distros/arch.txt
+@@ -0,0 +1 @@
++python-texttable
+diff --git a/build/pkgs/toml/distros/arch.txt b/build/pkgs/toml/distros/arch.txt
+new file mode 100644
+index 00000000..821ee77
+--- /dev/null
++++ b/build/pkgs/toml/distros/arch.txt
+@@ -0,0 +1 @@
++python-toml
+diff --git a/build/pkgs/webencodings/distros/arch.txt b/build/pkgs/webencodings/distros/arch.txt
+new file mode 100644
+index 00000000..12ddba9
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/arch.txt
+@@ -0,0 +1 @@
++python-webencodings
+diff --git a/build/pkgs/wheel/distros/arch.txt b/build/pkgs/wheel/distros/arch.txt
+new file mode 100644
+index 00000000..ae4cbb9
+--- /dev/null
++++ b/build/pkgs/wheel/distros/arch.txt
+@@ -0,0 +1 @@
++python-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5087abee08f2a89ddaf422ec72a84575fe724a79 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 21:20:56 -0700
+Subject: build/pkgs: Add distros/opensuse.txt for Python packages
+
+---
+ build/pkgs/bleach/distros/opensuse.txt        | 1 +
+ build/pkgs/cvxopt/distros/opensuse.txt        | 1 +
+ build/pkgs/html5lib/distros/opensuse.txt      | 1 +
+ build/pkgs/idna/distros/opensuse.txt          | 1 +
+ build/pkgs/jinja2/distros/opensuse.txt        | 2 +-
+ build/pkgs/mpmath/distros/opensuse.txt        | 1 +
+ build/pkgs/numpy/distros/opensuse.txt         | 1 +
+ build/pkgs/packaging/distros/opensuse.txt     | 1 +
+ build/pkgs/pandocfilters/distros/opensuse.txt | 1 +
+ build/pkgs/pluggy/distros/opensuse.txt        | 1 +
+ build/pkgs/py/distros/opensuse.txt            | 1 +
+ build/pkgs/pygments/distros/opensuse.txt      | 2 +-
+ build/pkgs/sympy/distros/opensuse.txt         | 1 +
+ build/pkgs/texttable/distros/opensuse.txt     | 1 +
+ build/pkgs/toml/distros/opensuse.txt          | 1 +
+ 15 files changed, 15 insertions(+), 2 deletions(-)
+ create mode 100644 build/pkgs/bleach/distros/opensuse.txt
+ create mode 100644 build/pkgs/cvxopt/distros/opensuse.txt
+ create mode 100644 build/pkgs/html5lib/distros/opensuse.txt
+ create mode 100644 build/pkgs/idna/distros/opensuse.txt
+ create mode 100644 build/pkgs/mpmath/distros/opensuse.txt
+ create mode 100644 build/pkgs/numpy/distros/opensuse.txt
+ create mode 100644 build/pkgs/packaging/distros/opensuse.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/opensuse.txt
+ create mode 100644 build/pkgs/pluggy/distros/opensuse.txt
+ create mode 100644 build/pkgs/py/distros/opensuse.txt
+ create mode 100644 build/pkgs/sympy/distros/opensuse.txt
+ create mode 100644 build/pkgs/texttable/distros/opensuse.txt
+ create mode 100644 build/pkgs/toml/distros/opensuse.txt
+
+diff --git a/build/pkgs/bleach/distros/opensuse.txt b/build/pkgs/bleach/distros/opensuse.txt
+new file mode 100644
+index 00000000..6d37c4c
+--- /dev/null
++++ b/build/pkgs/bleach/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-bleach
+diff --git a/build/pkgs/cvxopt/distros/opensuse.txt b/build/pkgs/cvxopt/distros/opensuse.txt
+new file mode 100644
+index 00000000..2bb6ad1
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-cvxopt
+diff --git a/build/pkgs/html5lib/distros/opensuse.txt b/build/pkgs/html5lib/distros/opensuse.txt
+new file mode 100644
+index 00000000..6d7b8df
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-html5lib
+diff --git a/build/pkgs/idna/distros/opensuse.txt b/build/pkgs/idna/distros/opensuse.txt
+new file mode 100644
+index 00000000..de48e70
+--- /dev/null
++++ b/build/pkgs/idna/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-idna
+diff --git a/build/pkgs/jinja2/distros/opensuse.txt b/build/pkgs/jinja2/distros/opensuse.txt
+index 5d90a22..f2db865 100644
+--- a/build/pkgs/jinja2/distros/opensuse.txt
++++ b/build/pkgs/jinja2/distros/opensuse.txt
+@@ -1 +1 @@
+-python3-Jinja2
++python3-jinja2
+diff --git a/build/pkgs/mpmath/distros/opensuse.txt b/build/pkgs/mpmath/distros/opensuse.txt
+new file mode 100644
+index 00000000..fbc82a9
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-mpmath
+diff --git a/build/pkgs/numpy/distros/opensuse.txt b/build/pkgs/numpy/distros/opensuse.txt
+new file mode 100644
+index 00000000..79d5c5a
+--- /dev/null
++++ b/build/pkgs/numpy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-numpy
+diff --git a/build/pkgs/packaging/distros/opensuse.txt b/build/pkgs/packaging/distros/opensuse.txt
+new file mode 100644
+index 00000000..8f1c0ff
+--- /dev/null
++++ b/build/pkgs/packaging/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-packaging
+diff --git a/build/pkgs/pandocfilters/distros/opensuse.txt b/build/pkgs/pandocfilters/distros/opensuse.txt
+new file mode 100644
+index 00000000..d0d4c24
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-pandocfilters
+diff --git a/build/pkgs/pluggy/distros/opensuse.txt b/build/pkgs/pluggy/distros/opensuse.txt
+new file mode 100644
+index 00000000..43a3acf
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-pluggy
+diff --git a/build/pkgs/py/distros/opensuse.txt b/build/pkgs/py/distros/opensuse.txt
+new file mode 100644
+index 00000000..81fefe6
+--- /dev/null
++++ b/build/pkgs/py/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-py
+diff --git a/build/pkgs/pygments/distros/opensuse.txt b/build/pkgs/pygments/distros/opensuse.txt
+index 9ff5740..3ab3792 100644
+--- a/build/pkgs/pygments/distros/opensuse.txt
++++ b/build/pkgs/pygments/distros/opensuse.txt
+@@ -1 +1 @@
+-python3-Pygments
++python3-pygments
+diff --git a/build/pkgs/sympy/distros/opensuse.txt b/build/pkgs/sympy/distros/opensuse.txt
+new file mode 100644
+index 00000000..db423c8
+--- /dev/null
++++ b/build/pkgs/sympy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-sympy
+diff --git a/build/pkgs/texttable/distros/opensuse.txt b/build/pkgs/texttable/distros/opensuse.txt
+new file mode 100644
+index 00000000..8f8e7e2
+--- /dev/null
++++ b/build/pkgs/texttable/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-texttable
+diff --git a/build/pkgs/toml/distros/opensuse.txt b/build/pkgs/toml/distros/opensuse.txt
+new file mode 100644
+index 00000000..543e89d
+--- /dev/null
++++ b/build/pkgs/toml/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-toml
+-- 
+cgit v1.0-1-gd88e
+
+
+From a480ba7ace1370d106ae831e904ea22b72af1be7 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 22:45:04 -0700
+Subject: build/pkgs: Add distros/debian.txt for Python packages
+
+---
+ build/pkgs/babel/distros/debian.txt         | 1 +
+ build/pkgs/bleach/distros/debian.txt        | 1 +
+ build/pkgs/certifi/distros/debian.txt       | 1 +
+ build/pkgs/cvxopt/distros/debian.txt        | 1 +
+ build/pkgs/decorator/distros/debian.txt     | 1 +
+ build/pkgs/html5lib/distros/debian.txt      | 1 +
+ build/pkgs/idna/distros/debian.txt          | 1 +
+ build/pkgs/jinja2/distros/debian.txt        | 1 +
+ build/pkgs/matplotlib/distros/debian.txt    | 1 +
+ build/pkgs/mpmath/distros/debian.txt        | 1 +
+ build/pkgs/networkx/distros/debian.txt      | 1 +
+ build/pkgs/numpy/distros/debian.txt         | 1 +
+ build/pkgs/packaging/distros/debian.txt     | 1 +
+ build/pkgs/pandocfilters/distros/debian.txt | 1 +
+ build/pkgs/pickleshare/distros/debian.txt   | 1 +
+ build/pkgs/pillow/distros/debian.txt        | 1 +
+ build/pkgs/pluggy/distros/debian.txt        | 1 +
+ build/pkgs/py/distros/debian.txt            | 1 +
+ build/pkgs/pygments/distros/debian.txt      | 1 +
+ build/pkgs/pytz/distros/debian.txt          | 1 +
+ build/pkgs/requests/distros/debian.txt      | 1 +
+ build/pkgs/scipy/distros/debian.txt         | 1 +
+ build/pkgs/setuptools/distros/debian.txt    | 1 +
+ build/pkgs/six/distros/debian.txt           | 1 +
+ build/pkgs/sympy/distros/debian.txt         | 1 +
+ build/pkgs/texttable/distros/debian.txt     | 1 +
+ build/pkgs/toml/distros/debian.txt          | 1 +
+ build/pkgs/webencodings/distros/debian.txt  | 1 +
+ build/pkgs/wheel/distros/debian.txt         | 1 +
+ 29 files changed, 29 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/debian.txt
+ create mode 100644 build/pkgs/bleach/distros/debian.txt
+ create mode 100644 build/pkgs/certifi/distros/debian.txt
+ create mode 100644 build/pkgs/cvxopt/distros/debian.txt
+ create mode 100644 build/pkgs/decorator/distros/debian.txt
+ create mode 100644 build/pkgs/html5lib/distros/debian.txt
+ create mode 100644 build/pkgs/idna/distros/debian.txt
+ create mode 100644 build/pkgs/jinja2/distros/debian.txt
+ create mode 100644 build/pkgs/matplotlib/distros/debian.txt
+ create mode 100644 build/pkgs/mpmath/distros/debian.txt
+ create mode 100644 build/pkgs/networkx/distros/debian.txt
+ create mode 100644 build/pkgs/numpy/distros/debian.txt
+ create mode 100644 build/pkgs/packaging/distros/debian.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/debian.txt
+ create mode 100644 build/pkgs/pickleshare/distros/debian.txt
+ create mode 100644 build/pkgs/pillow/distros/debian.txt
+ create mode 100644 build/pkgs/pluggy/distros/debian.txt
+ create mode 100644 build/pkgs/py/distros/debian.txt
+ create mode 100644 build/pkgs/pygments/distros/debian.txt
+ create mode 100644 build/pkgs/pytz/distros/debian.txt
+ create mode 100644 build/pkgs/requests/distros/debian.txt
+ create mode 100644 build/pkgs/scipy/distros/debian.txt
+ create mode 100644 build/pkgs/setuptools/distros/debian.txt
+ create mode 100644 build/pkgs/six/distros/debian.txt
+ create mode 100644 build/pkgs/sympy/distros/debian.txt
+ create mode 100644 build/pkgs/texttable/distros/debian.txt
+ create mode 100644 build/pkgs/toml/distros/debian.txt
+ create mode 100644 build/pkgs/webencodings/distros/debian.txt
+ create mode 100644 build/pkgs/wheel/distros/debian.txt
+
+diff --git a/build/pkgs/babel/distros/debian.txt b/build/pkgs/babel/distros/debian.txt
+new file mode 100644
+index 00000000..e623eb6
+--- /dev/null
++++ b/build/pkgs/babel/distros/debian.txt
+@@ -0,0 +1 @@
++python3-babel
+diff --git a/build/pkgs/bleach/distros/debian.txt b/build/pkgs/bleach/distros/debian.txt
+new file mode 100644
+index 00000000..6d37c4c
+--- /dev/null
++++ b/build/pkgs/bleach/distros/debian.txt
+@@ -0,0 +1 @@
++python3-bleach
+diff --git a/build/pkgs/certifi/distros/debian.txt b/build/pkgs/certifi/distros/debian.txt
+new file mode 100644
+index 00000000..f585a82
+--- /dev/null
++++ b/build/pkgs/certifi/distros/debian.txt
+@@ -0,0 +1 @@
++python3-certifi
+diff --git a/build/pkgs/cvxopt/distros/debian.txt b/build/pkgs/cvxopt/distros/debian.txt
+new file mode 100644
+index 00000000..2bb6ad1
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/debian.txt
+@@ -0,0 +1 @@
++python3-cvxopt
+diff --git a/build/pkgs/decorator/distros/debian.txt b/build/pkgs/decorator/distros/debian.txt
+new file mode 100644
+index 00000000..46c478e
+--- /dev/null
++++ b/build/pkgs/decorator/distros/debian.txt
+@@ -0,0 +1 @@
++python3-decorator
+diff --git a/build/pkgs/html5lib/distros/debian.txt b/build/pkgs/html5lib/distros/debian.txt
+new file mode 100644
+index 00000000..6d7b8df
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/debian.txt
+@@ -0,0 +1 @@
++python3-html5lib
+diff --git a/build/pkgs/idna/distros/debian.txt b/build/pkgs/idna/distros/debian.txt
+new file mode 100644
+index 00000000..de48e70
+--- /dev/null
++++ b/build/pkgs/idna/distros/debian.txt
+@@ -0,0 +1 @@
++python3-idna
+diff --git a/build/pkgs/jinja2/distros/debian.txt b/build/pkgs/jinja2/distros/debian.txt
+new file mode 100644
+index 00000000..f2db865
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/debian.txt
+@@ -0,0 +1 @@
++python3-jinja2
+diff --git a/build/pkgs/matplotlib/distros/debian.txt b/build/pkgs/matplotlib/distros/debian.txt
+new file mode 100644
+index 00000000..1374329
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/debian.txt
+@@ -0,0 +1 @@
++python3-matplotlib
+diff --git a/build/pkgs/mpmath/distros/debian.txt b/build/pkgs/mpmath/distros/debian.txt
+new file mode 100644
+index 00000000..fbc82a9
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/debian.txt
+@@ -0,0 +1 @@
++python3-mpmath
+diff --git a/build/pkgs/networkx/distros/debian.txt b/build/pkgs/networkx/distros/debian.txt
+new file mode 100644
+index 00000000..6779066
+--- /dev/null
++++ b/build/pkgs/networkx/distros/debian.txt
+@@ -0,0 +1 @@
++python3-networkx
+diff --git a/build/pkgs/numpy/distros/debian.txt b/build/pkgs/numpy/distros/debian.txt
+new file mode 100644
+index 00000000..79d5c5a
+--- /dev/null
++++ b/build/pkgs/numpy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-numpy
+diff --git a/build/pkgs/packaging/distros/debian.txt b/build/pkgs/packaging/distros/debian.txt
+new file mode 100644
+index 00000000..8f1c0ff
+--- /dev/null
++++ b/build/pkgs/packaging/distros/debian.txt
+@@ -0,0 +1 @@
++python3-packaging
+diff --git a/build/pkgs/pandocfilters/distros/debian.txt b/build/pkgs/pandocfilters/distros/debian.txt
+new file mode 100644
+index 00000000..d0d4c24
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/debian.txt b/build/pkgs/pickleshare/distros/debian.txt
+new file mode 100644
+index 00000000..a00907d
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pickleshare
+diff --git a/build/pkgs/pillow/distros/debian.txt b/build/pkgs/pillow/distros/debian.txt
+new file mode 100644
+index 00000000..3319fcd
+--- /dev/null
++++ b/build/pkgs/pillow/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pillow
+diff --git a/build/pkgs/pluggy/distros/debian.txt b/build/pkgs/pluggy/distros/debian.txt
+new file mode 100644
+index 00000000..43a3acf
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pluggy
+diff --git a/build/pkgs/py/distros/debian.txt b/build/pkgs/py/distros/debian.txt
+new file mode 100644
+index 00000000..81fefe6
+--- /dev/null
++++ b/build/pkgs/py/distros/debian.txt
+@@ -0,0 +1 @@
++python3-py
+diff --git a/build/pkgs/pygments/distros/debian.txt b/build/pkgs/pygments/distros/debian.txt
+new file mode 100644
+index 00000000..3ab3792
+--- /dev/null
++++ b/build/pkgs/pygments/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pygments
+diff --git a/build/pkgs/pytz/distros/debian.txt b/build/pkgs/pytz/distros/debian.txt
+new file mode 100644
+index 00000000..db20908
+--- /dev/null
++++ b/build/pkgs/pytz/distros/debian.txt
+@@ -0,0 +1 @@
++python3-tz
+diff --git a/build/pkgs/requests/distros/debian.txt b/build/pkgs/requests/distros/debian.txt
+new file mode 100644
+index 00000000..43147b2
+--- /dev/null
++++ b/build/pkgs/requests/distros/debian.txt
+@@ -0,0 +1 @@
++python3-requests
+diff --git a/build/pkgs/scipy/distros/debian.txt b/build/pkgs/scipy/distros/debian.txt
+new file mode 100644
+index 00000000..12b3666
+--- /dev/null
++++ b/build/pkgs/scipy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-scipy
+diff --git a/build/pkgs/setuptools/distros/debian.txt b/build/pkgs/setuptools/distros/debian.txt
+new file mode 100644
+index 00000000..1c0901c
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/debian.txt
+@@ -0,0 +1 @@
++python3-setuptools
+diff --git a/build/pkgs/six/distros/debian.txt b/build/pkgs/six/distros/debian.txt
+new file mode 100644
+index 00000000..68ff859
+--- /dev/null
++++ b/build/pkgs/six/distros/debian.txt
+@@ -0,0 +1 @@
++python3-six
+diff --git a/build/pkgs/sympy/distros/debian.txt b/build/pkgs/sympy/distros/debian.txt
+new file mode 100644
+index 00000000..db423c8
+--- /dev/null
++++ b/build/pkgs/sympy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-sympy
+diff --git a/build/pkgs/texttable/distros/debian.txt b/build/pkgs/texttable/distros/debian.txt
+new file mode 100644
+index 00000000..8f8e7e2
+--- /dev/null
++++ b/build/pkgs/texttable/distros/debian.txt
+@@ -0,0 +1 @@
++python3-texttable
+diff --git a/build/pkgs/toml/distros/debian.txt b/build/pkgs/toml/distros/debian.txt
+new file mode 100644
+index 00000000..543e89d
+--- /dev/null
++++ b/build/pkgs/toml/distros/debian.txt
+@@ -0,0 +1 @@
++python3-toml
+diff --git a/build/pkgs/webencodings/distros/debian.txt b/build/pkgs/webencodings/distros/debian.txt
+new file mode 100644
+index 00000000..ac30c2f
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/debian.txt
+@@ -0,0 +1 @@
++python3-webencodings
+diff --git a/build/pkgs/wheel/distros/debian.txt b/build/pkgs/wheel/distros/debian.txt
+new file mode 100644
+index 00000000..3c066725
+--- /dev/null
++++ b/build/pkgs/wheel/distros/debian.txt
+@@ -0,0 +1 @@
++python3-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 93bf30d7de292551c3050e2dd74651d69ba4bd46 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 18 Oct 2021 07:50:34 -0400
+Subject: Trac #29665: add more documentation for SAGE_PYTHON_PACKAGE_CHECK().
+
+An earlier commit allows SAGE_PYTHON_PACKAGE_CHECK(package) to tweak the
+value of sage_use_system_$package if --enable-system-site-packages was
+not used. This essentially changes the default --with-system-$package=yes
+to "no" in that case. Here we update the documentation to reflect it.
+---
+ m4/sage_python_package_check.m4 | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 7ee82a7..95eefd0 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -34,6 +34,10 @@
+ #   ensure that the ./configure- and run-time views of the system
+ #   are as similar as possible.
+ #
++#   To avoid suggesting these system packages to users who have not
++#   set --enable-system-site-packages, this macro also changes the
++#   default for --with-system-foo from "yes" to "no" in that case.
++#
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
+-- 
+cgit v1.0-1-gd88e
+
+
+From d771e49d57ecdf3622434bc09cbfb87ad3bb7744 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 18 Oct 2021 07:42:46 -0400
+Subject: Trac #29665: improve SAGE_PYTHON_PACKAGE_CHECK() failure message.
+
+When --enable-system-site-packages is off, SAGE_PYTHON_PACKAGE_CHECK()
+will always install the corresponding SPKG. We improve the ./configure
+output in that case to make it clear that the decision was based on
+the value of --enable-system-site-packages and not the "real" check.
+---
+ m4/sage_python_package_check.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 95eefd0..5f0f084 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -40,7 +40,9 @@
+ #
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
++  AC_MSG_CHECKING([if --enable-system-site-packages was used])
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
++    AC_MSG_RESULT(yes)
+     AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
+ 
+     dnl We run this check inside a python venv, because that's ultimately
+@@ -94,6 +96,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
+     dnl System site packages are disabled.
++    AC_MSG_RESULT(no; skipping check)
+     sage_spkg_install_$1=yes
+ 
+     dnl We have to retroactively hack the --with-system-foo={no,yes,force}
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5bb43c1b78a1deb3364f235305937c2f823e5e18 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 24 Oct 2021 20:29:25 -0400
+Subject: Trac #29665: use sage-venv in SAGE_PYTHON_PACKAGE_CHECK().
+
+For consistency with the rest of the build system, we now use the
+build/bin/sage-venv script to create the venv in this autoconf macro
+rather than invoking $PYTHON_FOR_VENV with "-m venv" directly.
+---
+ m4/sage_python_package_check.m4 | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 5f0f084..5547b35 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -50,11 +50,11 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AC_MSG_CHECKING([if we can create a python venv in config.venv])
+ 
+     dnl Use --clear because ./configure typically clobbers its output files.
+-    AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
+-                                        --clear                dnl
+-                                        --without-pip          dnl
+-                                        config.venv            dnl
+-                                        2>&AS_MESSAGE_LOG_FD], [
++    AS_IF(["${PYTHON_FOR_VENV}" build/bin/sage-venv      dnl
++                                  --system-site-packages dnl
++                                  --clear                dnl
++                                  config.venv            dnl
++                                  2>&AS_MESSAGE_LOG_FD], [
+       AC_MSG_RESULT(yes)
+       dnl strip all comments from install-requires.txt; this should leave
+       dnl only a single line containing the version specification for this
+-- 
+cgit v1.0-1-gd88e
+
+
+From c78363d6326addff16ca5abac897949a6be72bf4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:10:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for urllib3.
+
+---
+ build/pkgs/urllib3/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/urllib3/spkg-configure.m4
+
+diff --git a/build/pkgs/urllib3/spkg-configure.m4 b/build/pkgs/urllib3/spkg-configure.m4
+new file mode 100644
+index 00000000..d7ef3e1
+--- /dev/null
++++ b/build/pkgs/urllib3/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([urllib3], [SAGE_PYTHON_PACKAGE_CHECK([urllib3])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f416d5abcae495ea8301fad024b279ea9e997b29 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:15:18 -0400
+Subject: Trac #29665: add Gentoo package information for urllib3.
+
+---
+ build/pkgs/urllib3/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/urllib3/distros/gentoo.txt
+
+diff --git a/build/pkgs/urllib3/distros/gentoo.txt b/build/pkgs/urllib3/distros/gentoo.txt
+new file mode 100644
+index 00000000..172a535
+--- /dev/null
++++ b/build/pkgs/urllib3/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/urllib3
+-- 
+cgit v1.0-1-gd88e
+
+
+From 852068b992bf7959500c650f54cb92e5b68d7ef8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:15:58 -0400
+Subject: Trac #29665: add Gentoo package information for nbformat.
+
+---
+ build/pkgs/nbformat/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbformat/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbformat/distros/gentoo.txt b/build/pkgs/nbformat/distros/gentoo.txt
+new file mode 100644
+index 00000000..006b1f2
+--- /dev/null
++++ b/build/pkgs/nbformat/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbformat
+-- 
+cgit v1.0-1-gd88e
+
+
+From 66179fd28fcc92ee840dcd87bb4db25cea968d66 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:34:16 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for nbformat.
+
+---
+ build/pkgs/nbformat/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbformat/spkg-configure.m4
+
+diff --git a/build/pkgs/nbformat/spkg-configure.m4 b/build/pkgs/nbformat/spkg-configure.m4
+new file mode 100644
+index 00000000..5a7f8c4
+--- /dev/null
++++ b/build/pkgs/nbformat/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbformat], [SAGE_PYTHON_PACKAGE_CHECK([nbformat])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 874005e81ed20f27a5f895030dcdbdfc5f73ad80 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:47:01 -0400
+Subject: Trac #29665: add Gentoo package information for zipp.
+
+---
+ build/pkgs/zipp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/zipp/distros/gentoo.txt
+
+diff --git a/build/pkgs/zipp/distros/gentoo.txt b/build/pkgs/zipp/distros/gentoo.txt
+new file mode 100644
+index 00000000..7f59450
+--- /dev/null
++++ b/build/pkgs/zipp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/zipp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0cc2a7355b5554c1fb79c742ebf02eff54465b3e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:47:35 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for zipp.
+
+---
+ build/pkgs/zipp/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/zipp/spkg-configure.m4
+
+diff --git a/build/pkgs/zipp/spkg-configure.m4 b/build/pkgs/zipp/spkg-configure.m4
+new file mode 100644
+index 00000000..0fe3a9c
+--- /dev/null
++++ b/build/pkgs/zipp/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([zipp], [SAGE_PYTHON_PACKAGE_CHECK([zipp])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6073ad8e56c21fc862749bbd84a56d543fb9458c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:48:37 -0400
+Subject: Trac #29665: add Gentoo package information for wcwidth.
+
+---
+ build/pkgs/wcwidth/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wcwidth/distros/gentoo.txt
+
+diff --git a/build/pkgs/wcwidth/distros/gentoo.txt b/build/pkgs/wcwidth/distros/gentoo.txt
+new file mode 100644
+index 00000000..edeb80b
+--- /dev/null
++++ b/build/pkgs/wcwidth/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/wcwidth
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9793d6172c64d61a015fbe61bd45863759124fad Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:51:10 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for wcwidth.
+
+---
+ build/pkgs/wcwidth/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wcwidth/spkg-configure.m4
+
+diff --git a/build/pkgs/wcwidth/spkg-configure.m4 b/build/pkgs/wcwidth/spkg-configure.m4
+new file mode 100644
+index 00000000..5bde15a
+--- /dev/null
++++ b/build/pkgs/wcwidth/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([wcwidth], [SAGE_PYTHON_PACKAGE_CHECK([wcwidth])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20232f370a43c146ca4e696c72a2cbcc498db060 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:52:36 -0400
+Subject: Trac #29665: add Gentoo package information for testpath.
+
+---
+ build/pkgs/testpath/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/testpath/distros/gentoo.txt
+
+diff --git a/build/pkgs/testpath/distros/gentoo.txt b/build/pkgs/testpath/distros/gentoo.txt
+new file mode 100644
+index 00000000..efa10a0
+--- /dev/null
++++ b/build/pkgs/testpath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/testpath
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1b0785b2aad8844e74345fe950baf097e2b43d24 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:55:22 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for testpath.
+
+---
+ build/pkgs/testpath/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/testpath/spkg-configure.m4
+
+diff --git a/build/pkgs/testpath/spkg-configure.m4 b/build/pkgs/testpath/spkg-configure.m4
+new file mode 100644
+index 00000000..d8fc2a7
+--- /dev/null
++++ b/build/pkgs/testpath/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([testpath], [SAGE_PYTHON_PACKAGE_CHECK([testpath])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 10fc3829ecd956d732b1b069fdfe81f0d6d5cdc2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:56:06 -0400
+Subject: Trac #29665: add Gentoo package information for jedi.
+
+---
+ build/pkgs/jedi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jedi/distros/gentoo.txt
+
+diff --git a/build/pkgs/jedi/distros/gentoo.txt b/build/pkgs/jedi/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c85a46
+--- /dev/null
++++ b/build/pkgs/jedi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jedi
+-- 
+cgit v1.0-1-gd88e
+
+
+From a75824d74c281c7639028ca01dabeed266f56998 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:06:37 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for jedi.
+
+---
+ build/pkgs/jedi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jedi/spkg-configure.m4
+
+diff --git a/build/pkgs/jedi/spkg-configure.m4 b/build/pkgs/jedi/spkg-configure.m4
+new file mode 100644
+index 00000000..a37dbcc
+--- /dev/null
++++ b/build/pkgs/jedi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jedi], [SAGE_PYTHON_PACKAGE_CHECK([jedi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 17af01373d43f6acbbdbc23e073e372d3fdadf8b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:07:47 -0400
+Subject: Trac #29665: add Gentoo package information for tomli.
+
+---
+ build/pkgs/tomli/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tomli/distros/gentoo.txt
+
+diff --git a/build/pkgs/tomli/distros/gentoo.txt b/build/pkgs/tomli/distros/gentoo.txt
+new file mode 100644
+index 00000000..0458e25
+--- /dev/null
++++ b/build/pkgs/tomli/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/tomli
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0d3b5994ae612be11992467c4a3f1a74b81400fe Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:08:12 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for tomli.
+
+---
+ build/pkgs/tomli/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tomli/spkg-configure.m4
+
+diff --git a/build/pkgs/tomli/spkg-configure.m4 b/build/pkgs/tomli/spkg-configure.m4
+new file mode 100644
+index 00000000..95a8b8b
+--- /dev/null
++++ b/build/pkgs/tomli/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tomli], [SAGE_PYTHON_PACKAGE_CHECK([tomli])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From dce1c515781b0eeb8eb9c2bc7aba581560c1fac1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:09:22 -0400
+Subject: Trac #29665: add Gentoo package information for defusedxml.
+
+---
+ build/pkgs/defusedxml/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/defusedxml/distros/gentoo.txt
+
+diff --git a/build/pkgs/defusedxml/distros/gentoo.txt b/build/pkgs/defusedxml/distros/gentoo.txt
+new file mode 100644
+index 00000000..2804214
+--- /dev/null
++++ b/build/pkgs/defusedxml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/defusedxml
+-- 
+cgit v1.0-1-gd88e
+
+
+From 02e1e1cd7f8bdae3ca5b7d35ce70af28a44e9b7c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:11:14 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for defusedxml.
+
+---
+ build/pkgs/defusedxml/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/defusedxml/spkg-configure.m4
+
+diff --git a/build/pkgs/defusedxml/spkg-configure.m4 b/build/pkgs/defusedxml/spkg-configure.m4
+new file mode 100644
+index 00000000..e02f345
+--- /dev/null
++++ b/build/pkgs/defusedxml/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([defusedxml], [SAGE_PYTHON_PACKAGE_CHECK([defusedxml])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e0ba4ebb5cfc637b5d26b85de9f34e0a160d2b9c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:12:22 -0400
+Subject: Trac #29665: add Gentoo package information for ipywidgets.
+
+---
+ build/pkgs/ipywidgets/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipywidgets/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipywidgets/distros/gentoo.txt b/build/pkgs/ipywidgets/distros/gentoo.txt
+new file mode 100644
+index 00000000..7c76967
+--- /dev/null
++++ b/build/pkgs/ipywidgets/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipywidgets
+-- 
+cgit v1.0-1-gd88e
+
+
+From 49df7e7d93c7a31b7c46d5d224a35fd313a29a32 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:15:53 -0400
+Subject: Trac #29665: add Gentoo package information for simplegeneric.
+
+---
+ build/pkgs/simplegeneric/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/simplegeneric/distros/gentoo.txt
+
+diff --git a/build/pkgs/simplegeneric/distros/gentoo.txt b/build/pkgs/simplegeneric/distros/gentoo.txt
+new file mode 100644
+index 00000000..a86e90d
+--- /dev/null
++++ b/build/pkgs/simplegeneric/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/simplegeneric
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2a893635d5804749e6fec7ed7289c921ecb5300a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:16:33 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for simplegeneric.
+
+---
+ build/pkgs/simplegeneric/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/simplegeneric/spkg-configure.m4
+
+diff --git a/build/pkgs/simplegeneric/spkg-configure.m4 b/build/pkgs/simplegeneric/spkg-configure.m4
+new file mode 100644
+index 00000000..13715ab
+--- /dev/null
++++ b/build/pkgs/simplegeneric/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([simplegeneric], [SAGE_PYTHON_PACKAGE_CHECK([simplegeneric])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a8fe7ecd6e3163e7d01261e5497ac452a8cc95ab Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:17:18 -0400
+Subject: Trac #29665: add Gentoo package information for imagesize.
+
+---
+ build/pkgs/imagesize/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/imagesize/distros/gentoo.txt
+
+diff --git a/build/pkgs/imagesize/distros/gentoo.txt b/build/pkgs/imagesize/distros/gentoo.txt
+new file mode 100644
+index 00000000..54350ba
+--- /dev/null
++++ b/build/pkgs/imagesize/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/imagesize
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2ad837c5dd1fca0f50ce6d5042a9344210a54f84 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:17:48 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for imagesize.
+
+---
+ build/pkgs/imagesize/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/imagesize/spkg-configure.m4
+
+diff --git a/build/pkgs/imagesize/spkg-configure.m4 b/build/pkgs/imagesize/spkg-configure.m4
+new file mode 100644
+index 00000000..20210ef
+--- /dev/null
++++ b/build/pkgs/imagesize/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([imagesize], [SAGE_PYTHON_PACKAGE_CHECK([imagesize])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bf47415b5bfca2d7bf24e20de35662bf331623b9 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:18:49 -0400
+Subject: Trac #29665: add Gentoo package information for mistune.
+
+---
+ build/pkgs/mistune/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mistune/distros/gentoo.txt
+
+diff --git a/build/pkgs/mistune/distros/gentoo.txt b/build/pkgs/mistune/distros/gentoo.txt
+new file mode 100644
+index 00000000..56f0a4e
+--- /dev/null
++++ b/build/pkgs/mistune/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/mistune
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6898a74fd0c65a40c5220ba68b4062ac6fe060c6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:21:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for mistune.
+
+---
+ build/pkgs/mistune/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mistune/spkg-configure.m4
+
+diff --git a/build/pkgs/mistune/spkg-configure.m4 b/build/pkgs/mistune/spkg-configure.m4
+new file mode 100644
+index 00000000..972f33d
+--- /dev/null
++++ b/build/pkgs/mistune/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([mistune], [SAGE_PYTHON_PACKAGE_CHECK([mistune])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 62735e4ccf2031cd39eb5e04b03bdfd97005d808 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:22:48 -0400
+Subject: Trac #29665: add Gentoo package information for backcall.
+
+---
+ build/pkgs/backcall/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/backcall/distros/gentoo.txt
+
+diff --git a/build/pkgs/backcall/distros/gentoo.txt b/build/pkgs/backcall/distros/gentoo.txt
+new file mode 100644
+index 00000000..266a222
+--- /dev/null
++++ b/build/pkgs/backcall/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/backcall
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9ef3ea42d4a33c7cdb623fa5417ae300cf323183 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:25:10 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for backcall.
+
+---
+ build/pkgs/backcall/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/backcall/spkg-configure.m4
+
+diff --git a/build/pkgs/backcall/spkg-configure.m4 b/build/pkgs/backcall/spkg-configure.m4
+new file mode 100644
+index 00000000..d6b11c4
+--- /dev/null
++++ b/build/pkgs/backcall/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([backcall], [SAGE_PYTHON_PACKAGE_CHECK([backcall])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1b3ea2a3c40fea0fb58435f5e5304368ea58dff8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:25:58 -0400
+Subject: Trac #29665: add Gentoo package information for parso.
+
+---
+ build/pkgs/parso/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/parso/distros/gentoo.txt
+
+diff --git a/build/pkgs/parso/distros/gentoo.txt b/build/pkgs/parso/distros/gentoo.txt
+new file mode 100644
+index 00000000..f9ce4c7
+--- /dev/null
++++ b/build/pkgs/parso/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/parso
+-- 
+cgit v1.0-1-gd88e
+
+
+From 963a3a2c563ec71a1f5be2395722d0e824cb0b11 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:26:22 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for parso.
+
+---
+ build/pkgs/parso/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/parso/spkg-configure.m4
+
+diff --git a/build/pkgs/parso/spkg-configure.m4 b/build/pkgs/parso/spkg-configure.m4
+new file mode 100644
+index 00000000..1ca6f1b
+--- /dev/null
++++ b/build/pkgs/parso/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([parso], [SAGE_PYTHON_PACKAGE_CHECK([parso])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 943053dfc474b6549bcc7d6ef2971ea43588b35c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:27:00 -0400
+Subject: Trac #29665: add Gentoo package information for pyparsing.
+
+---
+ build/pkgs/pyparsing/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyparsing/distros/gentoo.txt
+
+diff --git a/build/pkgs/pyparsing/distros/gentoo.txt b/build/pkgs/pyparsing/distros/gentoo.txt
+new file mode 100644
+index 00000000..ef0419f
+--- /dev/null
++++ b/build/pkgs/pyparsing/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyparsing
+-- 
+cgit v1.0-1-gd88e
+
+
+From bd682eaa2ac41dd84e7a52e2b0c5442fc8fd8919 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:27:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pyparsing.
+
+---
+ build/pkgs/pyparsing/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyparsing/spkg-configure.m4
+
+diff --git a/build/pkgs/pyparsing/spkg-configure.m4 b/build/pkgs/pyparsing/spkg-configure.m4
+new file mode 100644
+index 00000000..d2b4c00
+--- /dev/null
++++ b/build/pkgs/pyparsing/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pyparsing], [SAGE_PYTHON_PACKAGE_CHECK([pyparsing])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 74f36a9c0ec7c63b7e6c40066e42f4b15c2f978e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:17:42 -0400
+Subject: Trac #29665: add Gentoo package information for debugpy.
+
+---
+ build/pkgs/debugpy/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/debugpy/distros/gentoo.txt
+
+diff --git a/build/pkgs/debugpy/distros/gentoo.txt b/build/pkgs/debugpy/distros/gentoo.txt
+new file mode 100644
+index 00000000..8b797ce
+--- /dev/null
++++ b/build/pkgs/debugpy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/debugpy
+-- 
+cgit v1.0-1-gd88e
+
+
+From be072fa87ac5c373d9dc9b54c0bd68734d5709bc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:21:17 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for debugpy.
+
+---
+ build/pkgs/debugpy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/debugpy/spkg-configure.m4
+
+diff --git a/build/pkgs/debugpy/spkg-configure.m4 b/build/pkgs/debugpy/spkg-configure.m4
+new file mode 100644
+index 00000000..db605ff
+--- /dev/null
++++ b/build/pkgs/debugpy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([debugpy], [SAGE_PYTHON_PACKAGE_CHECK([debugpy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6f777ce2f2e14b94e91c8b7bbac82f9017460aba Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:23:56 -0400
+Subject: Trac #29665: add Gentoo package information for tzlocal.
+
+---
+ build/pkgs/tzlocal/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tzlocal/distros/gentoo.txt
+
+diff --git a/build/pkgs/tzlocal/distros/gentoo.txt b/build/pkgs/tzlocal/distros/gentoo.txt
+new file mode 100644
+index 00000000..2018442
+--- /dev/null
++++ b/build/pkgs/tzlocal/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/tzlocal
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3bd078fc15ae13982249452711baafae91038191 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:24:51 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for tzlocal.
+
+---
+ build/pkgs/tzlocal/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tzlocal/spkg-configure.m4
+
+diff --git a/build/pkgs/tzlocal/spkg-configure.m4 b/build/pkgs/tzlocal/spkg-configure.m4
+new file mode 100644
+index 00000000..e020b28
+--- /dev/null
++++ b/build/pkgs/tzlocal/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tzlocal], [SAGE_PYTHON_PACKAGE_CHECK([tzlocal])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 91b0882fc62214923da9ee7b6dccb05d8a1d11d1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:26:13 -0400
+Subject: Trac #29665: add Gentoo package information for pycparser.
+
+---
+ build/pkgs/pycparser/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pycparser/distros/gentoo.txt
+
+diff --git a/build/pkgs/pycparser/distros/gentoo.txt b/build/pkgs/pycparser/distros/gentoo.txt
+new file mode 100644
+index 00000000..5e87307
+--- /dev/null
++++ b/build/pkgs/pycparser/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pycparser
+-- 
+cgit v1.0-1-gd88e
+
+
+From beabde92fe6e057faf516fe82d27f1e903e55ce6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:27:27 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pycparser.
+
+---
+ build/pkgs/pycparser/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pycparser/spkg-configure.m4
+
+diff --git a/build/pkgs/pycparser/spkg-configure.m4 b/build/pkgs/pycparser/spkg-configure.m4
+new file mode 100644
+index 00000000..4b9b900
+--- /dev/null
++++ b/build/pkgs/pycparser/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pycparser], [SAGE_PYTHON_PACKAGE_CHECK([pycparser])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 86c2788dc7fd1169314e9598c91fa81045553677 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:29:36 -0400
+Subject: Trac #29665: add Gentoo package information for cycler.
+
+---
+ build/pkgs/cycler/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cycler/distros/gentoo.txt
+
+diff --git a/build/pkgs/cycler/distros/gentoo.txt b/build/pkgs/cycler/distros/gentoo.txt
+new file mode 100644
+index 00000000..4b21543
+--- /dev/null
++++ b/build/pkgs/cycler/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/cycler
+-- 
+cgit v1.0-1-gd88e
+
+
+From 67c5a944101ddf329f0a61c61d4e784f58a5c5b0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:30:27 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for cycler.
+
+---
+ build/pkgs/cycler/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cycler/spkg-configure.m4
+
+diff --git a/build/pkgs/cycler/spkg-configure.m4 b/build/pkgs/cycler/spkg-configure.m4
+new file mode 100644
+index 00000000..239571a
+--- /dev/null
++++ b/build/pkgs/cycler/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([cycler], [SAGE_PYTHON_PACKAGE_CHECK([cycler])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ef6d490251abfa41f7a0910274700a8a6a65f629 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:31:19 -0400
+Subject: Trac #29665: add Gentoo package information for traitlets.
+
+---
+ build/pkgs/traitlets/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/traitlets/distros/gentoo.txt
+
+diff --git a/build/pkgs/traitlets/distros/gentoo.txt b/build/pkgs/traitlets/distros/gentoo.txt
+new file mode 100644
+index 00000000..46bfaab
+--- /dev/null
++++ b/build/pkgs/traitlets/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/traitlets
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1f922b458d34088d9f6773312209e69f19ee45dc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:31:50 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for traitlets.
+
+---
+ build/pkgs/traitlets/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/traitlets/spkg-configure.m4
+
+diff --git a/build/pkgs/traitlets/spkg-configure.m4 b/build/pkgs/traitlets/spkg-configure.m4
+new file mode 100644
+index 00000000..df2382b
+--- /dev/null
++++ b/build/pkgs/traitlets/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([traitlets], [SAGE_PYTHON_PACKAGE_CHECK([traitlets])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 95b89a9ced0acb6d971a27fa63b97ea58a11f4e1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:33:35 -0400
+Subject: Trac #29665: add Gentoo package information for argcomplete.
+
+---
+ build/pkgs/argcomplete/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argcomplete/distros/gentoo.txt
+
+diff --git a/build/pkgs/argcomplete/distros/gentoo.txt b/build/pkgs/argcomplete/distros/gentoo.txt
+new file mode 100644
+index 00000000..b150949
+--- /dev/null
++++ b/build/pkgs/argcomplete/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/argcomplete
+-- 
+cgit v1.0-1-gd88e
+
+
+From b4cd8ef384e6e5bae0de0f3c113fb5f9e6e1a71e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:34:14 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for argcomplete.
+
+---
+ build/pkgs/argcomplete/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argcomplete/spkg-configure.m4
+
+diff --git a/build/pkgs/argcomplete/spkg-configure.m4 b/build/pkgs/argcomplete/spkg-configure.m4
+new file mode 100644
+index 00000000..cbd7ccf
+--- /dev/null
++++ b/build/pkgs/argcomplete/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([argcomplete], [SAGE_PYTHON_PACKAGE_CHECK([argcomplete])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4cc610e8331970cc018d7ea87af928fa73a292c1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:36:21 -0400
+Subject: Trac #29665: add Gentoo package information for ptyprocess.
+
+---
+ build/pkgs/ptyprocess/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ptyprocess/distros/gentoo.txt
+
+diff --git a/build/pkgs/ptyprocess/distros/gentoo.txt b/build/pkgs/ptyprocess/distros/gentoo.txt
+new file mode 100644
+index 00000000..571a851
+--- /dev/null
++++ b/build/pkgs/ptyprocess/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ptyprocess
+-- 
+cgit v1.0-1-gd88e
+
+
+From cd15f97221bf5933b07900e4f77cb55401eede26 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:37:02 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ptyprocess.
+
+---
+ build/pkgs/ptyprocess/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ptyprocess/spkg-configure.m4
+
+diff --git a/build/pkgs/ptyprocess/spkg-configure.m4 b/build/pkgs/ptyprocess/spkg-configure.m4
+new file mode 100644
+index 00000000..bfacbae
+--- /dev/null
++++ b/build/pkgs/ptyprocess/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ptyprocess], [SAGE_PYTHON_PACKAGE_CHECK([ptyprocess])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb5f45b15f99e4ba28e1b1f6042a0e8ea17f1dfc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:38:22 -0400
+Subject: Trac #29665: add Gentoo package information for attrs.
+
+---
+ build/pkgs/attrs/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/attrs/distros/gentoo.txt
+
+diff --git a/build/pkgs/attrs/distros/gentoo.txt b/build/pkgs/attrs/distros/gentoo.txt
+new file mode 100644
+index 00000000..3b906fa
+--- /dev/null
++++ b/build/pkgs/attrs/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/attrs
+-- 
+cgit v1.0-1-gd88e
+
+
+From 321707ebf8e9af1e4ac3a5b5b094b4226bb3a7a5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:38:55 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for attrs.
+
+---
+ build/pkgs/attrs/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/attrs/spkg-configure.m4
+
+diff --git a/build/pkgs/attrs/spkg-configure.m4 b/build/pkgs/attrs/spkg-configure.m4
+new file mode 100644
+index 00000000..ba6a9b7
+--- /dev/null
++++ b/build/pkgs/attrs/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([attrs], [SAGE_PYTHON_PACKAGE_CHECK([attrs])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 69a498a4e8854ecdfc2f1a134104983c0dcb9e32 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:40:09 -0400
+Subject: Trac #29665: add Gentoo package information for send2trash.
+
+---
+ build/pkgs/send2trash/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/send2trash/distros/gentoo.txt
+
+diff --git a/build/pkgs/send2trash/distros/gentoo.txt b/build/pkgs/send2trash/distros/gentoo.txt
+new file mode 100644
+index 00000000..a89b179
+--- /dev/null
++++ b/build/pkgs/send2trash/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/send2trash
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9baed17c84e1bdf5abd17c20766e5cd7dddc5b53 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:41:45 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for send2trash.
+
+---
+ build/pkgs/send2trash/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/send2trash/spkg-configure.m4
+
+diff --git a/build/pkgs/send2trash/spkg-configure.m4 b/build/pkgs/send2trash/spkg-configure.m4
+new file mode 100644
+index 00000000..3bbb727
+--- /dev/null
++++ b/build/pkgs/send2trash/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([send2trash], [SAGE_PYTHON_PACKAGE_CHECK([send2trash])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b9b552b2a2aaccaeb7c5b25be0b681f107522d09 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:43:27 -0400
+Subject: Trac #29665: add Gentoo package information for pyrsistent.
+
+---
+ build/pkgs/pyrsistent/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyrsistent/distros/gentoo.txt
+
+diff --git a/build/pkgs/pyrsistent/distros/gentoo.txt b/build/pkgs/pyrsistent/distros/gentoo.txt
+new file mode 100644
+index 00000000..83439ce
+--- /dev/null
++++ b/build/pkgs/pyrsistent/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyrsistent
+-- 
+cgit v1.0-1-gd88e
+
+
+From a17b31fac6104852762f57daa749443147bdf121 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:44:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pyrsistent.
+
+---
+ build/pkgs/pyrsistent/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyrsistent/spkg-configure.m4
+
+diff --git a/build/pkgs/pyrsistent/spkg-configure.m4 b/build/pkgs/pyrsistent/spkg-configure.m4
+new file mode 100644
+index 00000000..f7ca75d
+--- /dev/null
++++ b/build/pkgs/pyrsistent/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pyrsistent], [SAGE_PYTHON_PACKAGE_CHECK([pyrsistent])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 68520decad6d6937918d7a6af65ca5bd476e5d02 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:45:45 -0400
+Subject: Trac #29665: add Gentoo package information for entrypoints.
+
+---
+ build/pkgs/entrypoints/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/entrypoints/distros/gentoo.txt
+
+diff --git a/build/pkgs/entrypoints/distros/gentoo.txt b/build/pkgs/entrypoints/distros/gentoo.txt
+new file mode 100644
+index 00000000..684ddd0
+--- /dev/null
++++ b/build/pkgs/entrypoints/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/entrypoints
+-- 
+cgit v1.0-1-gd88e
+
+
+From 34213eccb642a6bad64d89acaefa83ee702cb483 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:46:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for entrypoints.
+
+---
+ build/pkgs/entrypoints/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/entrypoints/spkg-configure.m4
+
+diff --git a/build/pkgs/entrypoints/spkg-configure.m4 b/build/pkgs/entrypoints/spkg-configure.m4
+new file mode 100644
+index 00000000..caed658
+--- /dev/null
++++ b/build/pkgs/entrypoints/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([entrypoints], [SAGE_PYTHON_PACKAGE_CHECK([entrypoints])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8e985614345da1a58fcdc127a9c0ddd790f9b5d2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:48:26 -0400
+Subject: Trac #29665: add Gentoo package information for markupsafe.
+
+---
+ build/pkgs/markupsafe/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/markupsafe/distros/gentoo.txt
+
+diff --git a/build/pkgs/markupsafe/distros/gentoo.txt b/build/pkgs/markupsafe/distros/gentoo.txt
+new file mode 100644
+index 00000000..9654e35
+--- /dev/null
++++ b/build/pkgs/markupsafe/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/markupsafe
+-- 
+cgit v1.0-1-gd88e
+
+
+From d370f229ae0988856f2e0d1f6ee2df2c47169106 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:48:55 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for markupsafe.
+
+---
+ build/pkgs/markupsafe/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/markupsafe/spkg-configure.m4
+
+diff --git a/build/pkgs/markupsafe/spkg-configure.m4 b/build/pkgs/markupsafe/spkg-configure.m4
+new file mode 100644
+index 00000000..79eb8db
+--- /dev/null
++++ b/build/pkgs/markupsafe/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([markupsafe], [SAGE_PYTHON_PACKAGE_CHECK([markupsafe])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c49b285ad9e25e6bc81a7e75d461d234fdd3ea68 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:30:49 -0400
+Subject: Trac #29665: add Gentoo package information for flit_core.
+
+---
+ build/pkgs/flit_core/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/flit_core/distros/gentoo.txt
+
+diff --git a/build/pkgs/flit_core/distros/gentoo.txt b/build/pkgs/flit_core/distros/gentoo.txt
+new file mode 100644
+index 00000000..fe6bea9
+--- /dev/null
++++ b/build/pkgs/flit_core/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/flit_core
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b0ce1c4f23cd9fc4316e1eb2b9b4bde394957f3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:32:11 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for flit_core.
+
+---
+ build/pkgs/flit_core/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/flit_core/spkg-configure.m4
+
+diff --git a/build/pkgs/flit_core/spkg-configure.m4 b/build/pkgs/flit_core/spkg-configure.m4
+new file mode 100644
+index 00000000..ee67557
+--- /dev/null
++++ b/build/pkgs/flit_core/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([flit_core], [SAGE_PYTHON_PACKAGE_CHECK([flit_core])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f006c231a81428b1e1e792f889bf974f90e3c831 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:34:06 -0400
+Subject: Trac #29665: add Gentoo package information for nest_asyncio.
+
+---
+ build/pkgs/nest_asyncio/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nest_asyncio/distros/gentoo.txt
+
+diff --git a/build/pkgs/nest_asyncio/distros/gentoo.txt b/build/pkgs/nest_asyncio/distros/gentoo.txt
+new file mode 100644
+index 00000000..ab742d2
+--- /dev/null
++++ b/build/pkgs/nest_asyncio/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nest_asyncio
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4a58d0a96a84475e765a01a64f5f44c48a317e0b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:34:43 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for nest_asyncio.
+
+---
+ build/pkgs/nest_asyncio/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nest_asyncio/spkg-configure.m4
+
+diff --git a/build/pkgs/nest_asyncio/spkg-configure.m4 b/build/pkgs/nest_asyncio/spkg-configure.m4
+new file mode 100644
+index 00000000..4d81527
+--- /dev/null
++++ b/build/pkgs/nest_asyncio/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nest_asyncio], [SAGE_PYTHON_PACKAGE_CHECK([nest_asyncio])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e50af937777ea778908bc09a7a79db3dd80fdf25 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:37:02 -0400
+Subject: Trac #29665: add Gentoo package information for ipython_genutils.
+
+---
+ build/pkgs/ipython_genutils/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython_genutils/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipython_genutils/distros/gentoo.txt b/build/pkgs/ipython_genutils/distros/gentoo.txt
+new file mode 100644
+index 00000000..01bc49d
+--- /dev/null
++++ b/build/pkgs/ipython_genutils/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipython_genutils
+-- 
+cgit v1.0-1-gd88e
+
+
+From ec3c0ce9db2ba13c1a49d1bcfb7a4b249cb7ae83 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:39:20 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipython_genutils.
+
+---
+ build/pkgs/ipython_genutils/spkg-configure.m4 | 4 ++++
+ 1 file changed, 4 insertions(+)
+ create mode 100644 build/pkgs/ipython_genutils/spkg-configure.m4
+
+diff --git a/build/pkgs/ipython_genutils/spkg-configure.m4 b/build/pkgs/ipython_genutils/spkg-configure.m4
+new file mode 100644
+index 00000000..b0ba86a
+--- /dev/null
++++ b/build/pkgs/ipython_genutils/spkg-configure.m4
+@@ -0,0 +1,4 @@
++SAGE_SPKG_CONFIGURE(
++  [ipython_genutils],
++  [SAGE_PYTHON_PACKAGE_CHECK([ipython_genutils])]
++)
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5c9e2e265115e5f10d4b459a475467e30b4bddde Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:40:03 -0400
+Subject: Trac #29665: add Gentoo package information for ipython.
+
+---
+ build/pkgs/ipython/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipython/distros/gentoo.txt b/build/pkgs/ipython/distros/gentoo.txt
+new file mode 100644
+index 00000000..8b76f18
+--- /dev/null
++++ b/build/pkgs/ipython/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipython
+-- 
+cgit v1.0-1-gd88e
+
+
+From 621e707ddd040a902d7dddf0bed1de2b54ab22f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 07:37:56 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipython.
+
+---
+ build/pkgs/ipython/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython/spkg-configure.m4
+
+diff --git a/build/pkgs/ipython/spkg-configure.m4 b/build/pkgs/ipython/spkg-configure.m4
+new file mode 100644
+index 00000000..02ab89f
+--- /dev/null
++++ b/build/pkgs/ipython/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipython], [SAGE_PYTHON_PACKAGE_CHECK([ipython])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20a0613f6d441da436f3e7b8047a72bf490882bd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 07:51:11 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipywidgets.
+
+---
+ build/pkgs/ipywidgets/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipywidgets/spkg-configure.m4
+
+diff --git a/build/pkgs/ipywidgets/spkg-configure.m4 b/build/pkgs/ipywidgets/spkg-configure.m4
+new file mode 100644
+index 00000000..51ca9be
+--- /dev/null
++++ b/build/pkgs/ipywidgets/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipywidgets], [SAGE_PYTHON_PACKAGE_CHECK([ipywidgets])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 76bcd386633acc02a1a3026339d0cbd258ada04e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 10:05:16 -0400
+Subject: Trac #29665: add Gentoo package information for wheel.
+
+---
+ build/pkgs/wheel/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wheel/distros/gentoo.txt
+
+diff --git a/build/pkgs/wheel/distros/gentoo.txt b/build/pkgs/wheel/distros/gentoo.txt
+new file mode 100644
+index 00000000..ec571d5
+--- /dev/null
++++ b/build/pkgs/wheel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 96c2dd2ca7812f5333bb9d45eadb7ac408e364ce Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:51:44 -0500
+Subject: Trac #29665: add Gentoo package information for terminado.
+
+---
+ build/pkgs/terminado/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/terminado/distros/gentoo.txt
+
+diff --git a/build/pkgs/terminado/distros/gentoo.txt b/build/pkgs/terminado/distros/gentoo.txt
+new file mode 100644
+index 00000000..1df16f1
+--- /dev/null
++++ b/build/pkgs/terminado/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/terminado
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0de0f5f3d235a4339b21e37ea13c9f5e59a82e59 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:52:35 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for terminado.
+
+---
+ build/pkgs/terminado/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/terminado/spkg-configure.m4
+
+diff --git a/build/pkgs/terminado/spkg-configure.m4 b/build/pkgs/terminado/spkg-configure.m4
+new file mode 100644
+index 00000000..5defc2f
+--- /dev/null
++++ b/build/pkgs/terminado/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([terminado], [SAGE_PYTHON_PACKAGE_CHECK([terminado])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d14a745c770b02822557e7cee0a98de1cb2f3a12 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:56:15 -0500
+Subject: Trac #29665: add Gentoo package information for cffi.
+
+---
+ build/pkgs/cffi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cffi/distros/gentoo.txt
+
+diff --git a/build/pkgs/cffi/distros/gentoo.txt b/build/pkgs/cffi/distros/gentoo.txt
+new file mode 100644
+index 00000000..81eeb81
+--- /dev/null
++++ b/build/pkgs/cffi/distros/gentoo.txt
+@@ -0,0 +1 @@
++virtual/python-cffi
+-- 
+cgit v1.0-1-gd88e
+
+
+From ce393c04afc69fe050e38f780d4e117164687d80 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:57:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for cffi.
+
+---
+ build/pkgs/cffi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cffi/spkg-configure.m4
+
+diff --git a/build/pkgs/cffi/spkg-configure.m4 b/build/pkgs/cffi/spkg-configure.m4
+new file mode 100644
+index 00000000..dc81875
+--- /dev/null
++++ b/build/pkgs/cffi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([cffi], [SAGE_PYTHON_PACKAGE_CHECK([cffi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 467093315b3fdd57c8caa2f95cf99ad52b0b84fb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:57:57 -0500
+Subject: Trac #29665: add Gentoo package information for pip.
+
+---
+ build/pkgs/pip/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pip/distros/gentoo.txt
+
+diff --git a/build/pkgs/pip/distros/gentoo.txt b/build/pkgs/pip/distros/gentoo.txt
+new file mode 100644
+index 00000000..1845454
+--- /dev/null
++++ b/build/pkgs/pip/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pip[vanilla]
+-- 
+cgit v1.0-1-gd88e
+
+
+From c597fd23f9f68dabbcb7e698d0569c3e6458f6d1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 09:07:26 -0500
+Subject: Trac #29665: new spkg-configure.m4 for pip.
+
+---
+ build/pkgs/pip/spkg-configure.m4 | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+ create mode 100644 build/pkgs/pip/spkg-configure.m4
+
+diff --git a/build/pkgs/pip/spkg-configure.m4 b/build/pkgs/pip/spkg-configure.m4
+new file mode 100644
+index 00000000..c7a5562
+--- /dev/null
++++ b/build/pkgs/pip/spkg-configure.m4
+@@ -0,0 +1,12 @@
++SAGE_SPKG_CONFIGURE([pip], [
++  dnl always run this macro because it changes the default value of
++  dnl the --with-system-<package> option.
++  SAGE_PYTHON_PACKAGE_CHECK([pip])
++
++  dnl if we might not install the spkg, make sure that "pip" is in
++  dnl the user's PATH, too.
++  AS_IF([test "x$sage_spkg_install_pip" != "xyes"], [
++    AC_CHECK_PROG(HAVE_PIP, pip, yes, no)
++    AS_IF([test "x$HAVE_PIP" = "xno"], [sage_spkg_install_pip=yes])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ef8f1e807bc55d7b8321777486fa867a7c135419 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 9 Nov 2021 09:09:04 -0500
+Subject: Trac #29665: set $SAGE_PIP_INSTALL_FLAGS for
+ --enable-system-site-packages.
+
+We need to pass some special flags to "pip install" to make it do the
+right thing in the precence of system-site packages. Here we introduce
+a new autoconf variable, SAGE_PIP_INSTALL_FLAGS, that will be used
+to pass those flags to the build system.
+
+With autoconf aware of the variable, we substitute its value into the
+sage-build-env-config script for use in spkg-install.in.
+---
+ build/bin/sage-build-env-config.in | 1 +
+ configure.ac                       | 9 +++++++++
+ 2 files changed, 10 insertions(+)
+
+diff --git a/build/bin/sage-build-env-config.in b/build/bin/sage-build-env-config.in
+index 92e7dad..ad62e5f 100644
+--- a/build/bin/sage-build-env-config.in
++++ b/build/bin/sage-build-env-config.in
+@@ -53,6 +53,7 @@ export SAGE_PARI_CFG="@SAGE_PARI_CFG@"
+ 
+ export SAGE_GLPK_PREFIX="@SAGE_GLPK_PREFIX@"
+ export SAGE_FREETYPE_PREFIX="@SAGE_FREETYPE_PREFIX@"
++export SAGE_PIP_INSTALL_FLAGS="@SAGE_PIP_INSTALL_FLAGS@"
+ export SAGE_SUITESPARSE_PREFIX="@SAGE_SUITESPARSE_PREFIX@"
+ 
+ export SAGE_CONFIGURE_FFLAS_FFPACK="@SAGE_CONFIGURE_FFLAS_FFPACK@"
+diff --git a/configure.ac b/configure.ac
+index 6fafb83..6ed07ac 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -441,6 +441,14 @@ AC_ARG_ENABLE(
+     [allow the use of python packages from the system (experimental; default: no)]
+   )], [
+   AS_IF([test "x$enable_system_site_packages" = "xyes"], [
++    dnl When installing python SPKGs in the presence of system-site
++    dnl packages, we need to --ignore-installed so that a patched SPKG
++    dnl can be installed in the presence of an unpatched system package
++    dnl that appears (to pip) to be identical. The --no-deps flag is
++    dnl then needed because --ignore-installed will make any installed
++    dnl dependencies invisible to pip, who does not appreciate that.
++    SAGE_PIP_INSTALL_FLAGS="${SAGE_PIP_INSTALL_FLAGS} --no-deps --ignore-installed"
++
+     SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
+ 
+     dnl We want to raise an error if the user asked for "system site
+@@ -453,6 +461,7 @@ AC_ARG_ENABLE(
+     with_system_python3="force"
+   ])
+ ])
++AC_SUBST([SAGE_PIP_INSTALL_FLAGS])
+ AC_SUBST([SAGE_VENV_FLAGS])
+ 
+ SAGE_SPKG_OPTIONS=""
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3cf365fef84e809e74abd2eb388e7a8e9af9d739 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 9 Nov 2021 21:01:58 -0500
+Subject: Trac #29665: pass $SAGE_PIP_INSTALL_FLAGS to sdh_pip_install.
+
+Since sdh_pip_install is usually called from spkg-install.in, the
+variables from sage-build-env-config will be available. Here we pass
+the contents of $SAGE_PIP_INSTALL_FLAGS to sage-pip-install
+unconditionally, and hope that the user ignores this variable unless
+he truly knows what he is doing.
+---
+ build/bin/sage-dist-helpers | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/build/bin/sage-dist-helpers b/build/bin/sage-dist-helpers
+index fe364e5..1032ac3 100644
+--- a/build/bin/sage-dist-helpers
++++ b/build/bin/sage-dist-helpers
+@@ -303,7 +303,11 @@ sdh_store_wheel() {
+ }
+ 
+ sdh_store_and_pip_install_wheel() {
+-    local pip_options=""
++    # The $SAGE_PIP_INSTALL_FLAGS variable is set by sage-build-env-config.
++    # We skip sanity checking its contents since you should either let sage
++    # decide what it contains, or really know what you are doing.
++    local pip_options="${SAGE_PIP_INSTALL_FLAGS}"
++
+     while [ $# -gt 0 ]; do
+         case $1 in
+             -*) pip_options="$pip_options $1"
+-- 
+cgit v1.0-1-gd88e
+
+
+From 50f0438ee857b8f0b7d7ad924e6bba9c5e1bc033 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:10:46 -0500
+Subject: Trac #29665: add Gentoo package information for pexpect.
+
+---
+ build/pkgs/pexpect/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pexpect/distros/gentoo.txt
+
+diff --git a/build/pkgs/pexpect/distros/gentoo.txt b/build/pkgs/pexpect/distros/gentoo.txt
+new file mode 100644
+index 00000000..30c4b60
+--- /dev/null
++++ b/build/pkgs/pexpect/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pexpect
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4d784688d997290b462646fa7f36114a41f3f453 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:11:25 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pexpect.
+
+---
+ build/pkgs/pexpect/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pexpect/spkg-configure.m4
+
+diff --git a/build/pkgs/pexpect/spkg-configure.m4 b/build/pkgs/pexpect/spkg-configure.m4
+new file mode 100644
+index 00000000..6520856
+--- /dev/null
++++ b/build/pkgs/pexpect/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pexpect], [SAGE_PYTHON_PACKAGE_CHECK([pexpect])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6447122dc76a3b7a58340dbed942db66530b5b07 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:12:05 -0500
+Subject: Trac #29665: add Gentoo package information for docutils.
+
+---
+ build/pkgs/docutils/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/docutils/distros/gentoo.txt
+
+diff --git a/build/pkgs/docutils/distros/gentoo.txt b/build/pkgs/docutils/distros/gentoo.txt
+new file mode 100644
+index 00000000..fe4a452
+--- /dev/null
++++ b/build/pkgs/docutils/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/docutils
+-- 
+cgit v1.0-1-gd88e
+
+
+From 709041480a5fc729b0ee7f1a8a3b16d4d65321b5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:12:38 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for docutils.
+
+---
+ build/pkgs/docutils/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/docutils/spkg-configure.m4
+
+diff --git a/build/pkgs/docutils/spkg-configure.m4 b/build/pkgs/docutils/spkg-configure.m4
+new file mode 100644
+index 00000000..3584e45
+--- /dev/null
++++ b/build/pkgs/docutils/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([docutils], [SAGE_PYTHON_PACKAGE_CHECK([docutils])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 782d38b48ab87afccc43fbc071e7b7ed48fb0a20 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:14:37 -0500
+Subject: Trac #29665: add Gentoo package information for nbclient.
+
+---
+ build/pkgs/nbclient/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbclient/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbclient/distros/gentoo.txt b/build/pkgs/nbclient/distros/gentoo.txt
+new file mode 100644
+index 00000000..06ff18d
+--- /dev/null
++++ b/build/pkgs/nbclient/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbclient
+-- 
+cgit v1.0-1-gd88e
+
+
+From 19ce09336532336f69db74381932d51a429dfaca Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:15:11 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for nbclient.
+
+---
+ build/pkgs/nbclient/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbclient/spkg-configure.m4
+
+diff --git a/build/pkgs/nbclient/spkg-configure.m4 b/build/pkgs/nbclient/spkg-configure.m4
+new file mode 100644
+index 00000000..14178b7
+--- /dev/null
++++ b/build/pkgs/nbclient/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbclient], [SAGE_PYTHON_PACKAGE_CHECK([nbclient])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c063b9de42c1780368000a563d0dbe80b6fff169 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:17:36 -0500
+Subject: Trac #29665: add Gentoo package information for argon2_cffi.
+
+---
+ build/pkgs/argon2_cffi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argon2_cffi/distros/gentoo.txt
+
+diff --git a/build/pkgs/argon2_cffi/distros/gentoo.txt b/build/pkgs/argon2_cffi/distros/gentoo.txt
+new file mode 100644
+index 00000000..2f12ca8
+--- /dev/null
++++ b/build/pkgs/argon2_cffi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/argon2-cffi
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0b4d5699dd51ea52550fba7db9e1cbb8bbac1892 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:18:35 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for argon2_cffi.
+
+---
+ build/pkgs/argon2_cffi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argon2_cffi/spkg-configure.m4
+
+diff --git a/build/pkgs/argon2_cffi/spkg-configure.m4 b/build/pkgs/argon2_cffi/spkg-configure.m4
+new file mode 100644
+index 00000000..03ebc63
+--- /dev/null
++++ b/build/pkgs/argon2_cffi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([argon2_cffi], [SAGE_PYTHON_PACKAGE_CHECK([argon2_cffi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2b4119558a6e0b1aa512848539a237676b035c83 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:30:48 -0500
+Subject: Trac #29665: fix package name in dateutil's install-requires.txt.
+
+---
+ build/pkgs/dateutil/install-requires.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/build/pkgs/dateutil/install-requires.txt b/build/pkgs/dateutil/install-requires.txt
+index 0ae93da..face537 100644
+--- a/build/pkgs/dateutil/install-requires.txt
++++ b/build/pkgs/dateutil/install-requires.txt
+@@ -1 +1 @@
+-dateutil >=2.8.1
++python-dateutil >=2.8.1
+-- 
+cgit v1.0-1-gd88e
+
+
+From df371b7c4d20a3353d43940306ad22e11aba29da Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:31:41 -0500
+Subject: Trac #29665: add Gentoo package information for dateutil.
+
+---
+ build/pkgs/dateutil/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/dateutil/distros/gentoo.txt
+
+diff --git a/build/pkgs/dateutil/distros/gentoo.txt b/build/pkgs/dateutil/distros/gentoo.txt
+new file mode 100644
+index 00000000..e129df7
+--- /dev/null
++++ b/build/pkgs/dateutil/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/python-dateutil
+-- 
+cgit v1.0-1-gd88e
+
+
+From 577695dfdf661ee26c0ffd767bdbf479d95f7fb4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:32:21 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for dateutil.
+
+---
+ build/pkgs/dateutil/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/dateutil/spkg-configure.m4
+
+diff --git a/build/pkgs/dateutil/spkg-configure.m4 b/build/pkgs/dateutil/spkg-configure.m4
+new file mode 100644
+index 00000000..fdcd127
+--- /dev/null
++++ b/build/pkgs/dateutil/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([dateutil], [SAGE_PYTHON_PACKAGE_CHECK([dateutil])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1984651caac624ec4bb58814ca1d57fe66f9881a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:33:51 -0500
+Subject: Trac #29665: add Gentoo package information for setuptools_scm.
+
+---
+ build/pkgs/setuptools_scm/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/setuptools_scm/distros/gentoo.txt
+
+diff --git a/build/pkgs/setuptools_scm/distros/gentoo.txt b/build/pkgs/setuptools_scm/distros/gentoo.txt
+new file mode 100644
+index 00000000..8989597
+--- /dev/null
++++ b/build/pkgs/setuptools_scm/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/setuptools_scm
+-- 
+cgit v1.0-1-gd88e
+
+
+From ebf7c854ed966e7353759be485c4f5a57b9a10fa Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:34:49 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for setuptools_scm.
+
+---
+ build/pkgs/setuptools_scm/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/setuptools_scm/spkg-configure.m4
+
+diff --git a/build/pkgs/setuptools_scm/spkg-configure.m4 b/build/pkgs/setuptools_scm/spkg-configure.m4
+new file mode 100644
+index 00000000..437148c
+--- /dev/null
++++ b/build/pkgs/setuptools_scm/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([setuptools_scm], [
++  SAGE_PYTHON_PACKAGE_CHECK([setuptools_scm])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0dee0d0c28f31b1f619e44c710a3c9e22d2b2544 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:36:33 -0500
+Subject: Trac #29665: add Gentoo package information for nbconvert.
+
+---
+ build/pkgs/nbconvert/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbconvert/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbconvert/distros/gentoo.txt b/build/pkgs/nbconvert/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c45a10
+--- /dev/null
++++ b/build/pkgs/nbconvert/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbconvert
+-- 
+cgit v1.0-1-gd88e
+
+
+From 473789eb11b1838bc32dc8a63509ee199afc8912 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:37:37 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for nbconvert.
+
+---
+ build/pkgs/nbconvert/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbconvert/spkg-configure.m4
+
+diff --git a/build/pkgs/nbconvert/spkg-configure.m4 b/build/pkgs/nbconvert/spkg-configure.m4
+new file mode 100644
+index 00000000..9b5dee3
+--- /dev/null
++++ b/build/pkgs/nbconvert/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbconvert], [SAGE_PYTHON_PACKAGE_CHECK([nbconvert])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f0703b594e57c980d605aa9bc8316c45a7858b3b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:41:51 -0500
+Subject: Trac #29665: add Gentoo package information for jupyter_core.
+
+---
+ build/pkgs/jupyter_core/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyter_core/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyter_core/distros/gentoo.txt b/build/pkgs/jupyter_core/distros/gentoo.txt
+new file mode 100644
+index 00000000..f168c5a
+--- /dev/null
++++ b/build/pkgs/jupyter_core/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyter_core
+-- 
+cgit v1.0-1-gd88e
+
+
+From 061a307cc4a6680d8500fde834975064e59540d5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:42:48 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jupyter_core.
+
+---
+ build/pkgs/jupyter_core/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyter_core/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyter_core/spkg-configure.m4 b/build/pkgs/jupyter_core/spkg-configure.m4
+new file mode 100644
+index 00000000..67df9c3
+--- /dev/null
++++ b/build/pkgs/jupyter_core/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyter_core], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyter_core])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b85abe964ce0b98b5842efe9cbad9bdb1c89202f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:47:08 -0500
+Subject: Trac #29665: add Gentoo package information for jupyter_client.
+
+---
+ build/pkgs/jupyter_client/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyter_client/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyter_client/distros/gentoo.txt b/build/pkgs/jupyter_client/distros/gentoo.txt
+new file mode 100644
+index 00000000..4f1de88
+--- /dev/null
++++ b/build/pkgs/jupyter_client/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyter_client
+-- 
+cgit v1.0-1-gd88e
+
+
+From 86323ff1e0b2507933df6bc2a96c9175957640c5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:48:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jupyter_client.
+
+---
+ build/pkgs/jupyter_client/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyter_client/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyter_client/spkg-configure.m4 b/build/pkgs/jupyter_client/spkg-configure.m4
+new file mode 100644
+index 00000000..fbd3498
+--- /dev/null
++++ b/build/pkgs/jupyter_client/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyter_client], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyter_client])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a8475e27dd30d752d05ab6fea6579e8623501d82 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:48:58 -0500
+Subject: Trac #29665: add Gentoo package information for snowballstemmer.
+
+---
+ build/pkgs/snowballstemmer/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/snowballstemmer/distros/gentoo.txt
+
+diff --git a/build/pkgs/snowballstemmer/distros/gentoo.txt b/build/pkgs/snowballstemmer/distros/gentoo.txt
+new file mode 100644
+index 00000000..63fd851
+--- /dev/null
++++ b/build/pkgs/snowballstemmer/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/snowballstemmer
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0833c9b781062b4ed86d619e050a6f5d60e36080 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:49:38 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for snowballstemmer.
+
+---
+ build/pkgs/snowballstemmer/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/snowballstemmer/spkg-configure.m4
+
+diff --git a/build/pkgs/snowballstemmer/spkg-configure.m4 b/build/pkgs/snowballstemmer/spkg-configure.m4
+new file mode 100644
+index 00000000..6aa0882
+--- /dev/null
++++ b/build/pkgs/snowballstemmer/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([snowballstemmer], [
++  SAGE_PYTHON_PACKAGE_CHECK([snowballstemmer])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 50a1cf2a2bcd7eeec64cbc3f70e3e9fbe5d850fe Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:50:47 -0500
+Subject: Trac #29665: add Gentoo package information for tornado.
+
+---
+ build/pkgs/tornado/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tornado/distros/gentoo.txt
+
+diff --git a/build/pkgs/tornado/distros/gentoo.txt b/build/pkgs/tornado/distros/gentoo.txt
+new file mode 100644
+index 00000000..6ae4b9f
+--- /dev/null
++++ b/build/pkgs/tornado/distros/gentoo.txt
+@@ -0,0 +1 @@
++www-servers/tornado
+-- 
+cgit v1.0-1-gd88e
+
+
+From 118f4da6e03476c726363e8e22ecda32f13bfc33 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:51:26 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for tornado.
+
+---
+ build/pkgs/tornado/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tornado/spkg-configure.m4
+
+diff --git a/build/pkgs/tornado/spkg-configure.m4 b/build/pkgs/tornado/spkg-configure.m4
+new file mode 100644
+index 00000000..1ee5bc9
+--- /dev/null
++++ b/build/pkgs/tornado/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tornado], [SAGE_PYTHON_PACKAGE_CHECK([tornado])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3850701747a6c8ef60840bdfdb589b28d4cd2b9a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:52:21 -0500
+Subject: Trac #29665: add Gentoo package information for jsonschema.
+
+---
+ build/pkgs/jsonschema/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jsonschema/distros/gentoo.txt
+
+diff --git a/build/pkgs/jsonschema/distros/gentoo.txt b/build/pkgs/jsonschema/distros/gentoo.txt
+new file mode 100644
+index 00000000..d708e4c
+--- /dev/null
++++ b/build/pkgs/jsonschema/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jsonschema
+-- 
+cgit v1.0-1-gd88e
+
+
+From 76e3917c8af781af00f642cfada7a79594429e30 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:54:03 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jsonschema.
+
+---
+ build/pkgs/jsonschema/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jsonschema/spkg-configure.m4
+
+diff --git a/build/pkgs/jsonschema/spkg-configure.m4 b/build/pkgs/jsonschema/spkg-configure.m4
+new file mode 100644
+index 00000000..b9e5e21
+--- /dev/null
++++ b/build/pkgs/jsonschema/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jsonschema], [SAGE_PYTHON_PACKAGE_CHECK([jsonschema])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From fd4a16c11669b6dd73ac6325bca820e76db00402 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:55:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ widgetsnbextension.
+
+---
+ build/pkgs/widgetsnbextension/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/widgetsnbextension/spkg-configure.m4
+
+diff --git a/build/pkgs/widgetsnbextension/spkg-configure.m4 b/build/pkgs/widgetsnbextension/spkg-configure.m4
+new file mode 100644
+index 00000000..bf82daf
+--- /dev/null
++++ b/build/pkgs/widgetsnbextension/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([widgetsnbextension], [
++  SAGE_PYTHON_PACKAGE_CHECK([widgetsnbextension])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8079a9f384e3c8480e157dd98c3db2f43c987f4e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:57:20 -0500
+Subject: Trac #29665: add Gentoo package information for importlib_resources.
+
+---
+ build/pkgs/importlib_resources/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/importlib_resources/distros/gentoo.txt
+
+diff --git a/build/pkgs/importlib_resources/distros/gentoo.txt b/build/pkgs/importlib_resources/distros/gentoo.txt
+new file mode 100644
+index 00000000..d5e1f2c
+--- /dev/null
++++ b/build/pkgs/importlib_resources/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/importlib_resources
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2c430d7c52f02779a6c41b98ac2f4edd8b6759c3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:58:00 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ importlib_resources.
+
+---
+ build/pkgs/importlib_resources/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/importlib_resources/spkg-configure.m4
+
+diff --git a/build/pkgs/importlib_resources/spkg-configure.m4 b/build/pkgs/importlib_resources/spkg-configure.m4
+new file mode 100644
+index 00000000..50df55b
+--- /dev/null
++++ b/build/pkgs/importlib_resources/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([importlib_resources], [
++  SAGE_PYTHON_PACKAGE_CHECK([importlib_resources])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 00d13d7bf2e50aae2ccef3b2b30293c70a922af2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:58:38 -0500
+Subject: Trac #29665: add Gentoo package information for kiwisolver.
+
+---
+ build/pkgs/kiwisolver/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/kiwisolver/distros/gentoo.txt
+
+diff --git a/build/pkgs/kiwisolver/distros/gentoo.txt b/build/pkgs/kiwisolver/distros/gentoo.txt
+new file mode 100644
+index 00000000..7b30c95
+--- /dev/null
++++ b/build/pkgs/kiwisolver/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/kiwisolver
+-- 
+cgit v1.0-1-gd88e
+
+
+From 72b7907ef7ea9fa4ff6948ea34cfe2f693ee6c31 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:59:09 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for kiwisolver.
+
+---
+ build/pkgs/kiwisolver/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/kiwisolver/spkg-configure.m4
+
+diff --git a/build/pkgs/kiwisolver/spkg-configure.m4 b/build/pkgs/kiwisolver/spkg-configure.m4
+new file mode 100644
+index 00000000..4e7ac97
+--- /dev/null
++++ b/build/pkgs/kiwisolver/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([kiwisolver], [SAGE_PYTHON_PACKAGE_CHECK([kiwisolver])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 479351279e4e0ea7e2d146434f0daba038765cfd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:00:04 -0500
+Subject: Trac #29665: add Gentoo package information for notebook.
+
+---
+ build/pkgs/notebook/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/notebook/distros/gentoo.txt
+
+diff --git a/build/pkgs/notebook/distros/gentoo.txt b/build/pkgs/notebook/distros/gentoo.txt
+new file mode 100644
+index 00000000..6475d72
+--- /dev/null
++++ b/build/pkgs/notebook/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/notebook
+-- 
+cgit v1.0-1-gd88e
+
+
+From f4d9242ea654977f8ad7865c82eec593e11a36bc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:01:42 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for notebook.
+
+---
+ build/pkgs/notebook/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/notebook/spkg-configure.m4
+
+diff --git a/build/pkgs/notebook/spkg-configure.m4 b/build/pkgs/notebook/spkg-configure.m4
+new file mode 100644
+index 00000000..a17ba95
+--- /dev/null
++++ b/build/pkgs/notebook/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([notebook], [SAGE_PYTHON_PACKAGE_CHECK([notebook])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9837070c7f8e9a71283b84d49d4fd2c94b78a464 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:02:38 -0500
+Subject: Trac #29665: add Gentoo package information for matplotlib_inline.
+
+---
+ build/pkgs/matplotlib_inline/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/matplotlib_inline/distros/gentoo.txt
+
+diff --git a/build/pkgs/matplotlib_inline/distros/gentoo.txt b/build/pkgs/matplotlib_inline/distros/gentoo.txt
+new file mode 100644
+index 00000000..6a5859c
+--- /dev/null
++++ b/build/pkgs/matplotlib_inline/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/matplotlib-inline
+-- 
+cgit v1.0-1-gd88e
+
+
+From 750be73b25b92b4875e47d044360ac0e1116ec3e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:03:28 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for matplotlib_inline.
+
+---
+ build/pkgs/matplotlib_inline/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/matplotlib_inline/spkg-configure.m4
+
+diff --git a/build/pkgs/matplotlib_inline/spkg-configure.m4 b/build/pkgs/matplotlib_inline/spkg-configure.m4
+new file mode 100644
+index 00000000..e59658f
+--- /dev/null
++++ b/build/pkgs/matplotlib_inline/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([matplotlib_inline], [
++  SAGE_PYTHON_PACKAGE_CHECK([matplotlib_inline])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 273505f49698dcd2ab30c2756b07113c9b7e7791 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:04:10 -0500
+Subject: Trac #29665: add Gentoo package information for ipykernel.
+
+---
+ build/pkgs/ipykernel/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipykernel/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipykernel/distros/gentoo.txt b/build/pkgs/ipykernel/distros/gentoo.txt
+new file mode 100644
+index 00000000..88aab61
+--- /dev/null
++++ b/build/pkgs/ipykernel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipykernel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 629ad36c9e4ae0cdff4a013289b4f2911442445e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:04:46 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for ipykernel.
+
+---
+ build/pkgs/ipykernel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipykernel/spkg-configure.m4
+
+diff --git a/build/pkgs/ipykernel/spkg-configure.m4 b/build/pkgs/ipykernel/spkg-configure.m4
+new file mode 100644
+index 00000000..94ecc2d
+--- /dev/null
++++ b/build/pkgs/ipykernel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipykernel], [SAGE_PYTHON_PACKAGE_CHECK([ipykernel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b8d709edb6a24fd5868ee2818b56e78257b2eafa Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:05:26 -0500
+Subject: Trac #29665: add Gentoo package information for prompt_toolkit.
+
+---
+ build/pkgs/prompt_toolkit/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/prompt_toolkit/distros/gentoo.txt
+
+diff --git a/build/pkgs/prompt_toolkit/distros/gentoo.txt b/build/pkgs/prompt_toolkit/distros/gentoo.txt
+new file mode 100644
+index 00000000..6902484
+--- /dev/null
++++ b/build/pkgs/prompt_toolkit/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/prompt_toolkit
+-- 
+cgit v1.0-1-gd88e
+
+
+From 16c0b5e767ae4dac4440510b7253e5c8642b7d2c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:10:39 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for prompt_toolkit.
+
+---
+ build/pkgs/prompt_toolkit/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/prompt_toolkit/spkg-configure.m4
+
+diff --git a/build/pkgs/prompt_toolkit/spkg-configure.m4 b/build/pkgs/prompt_toolkit/spkg-configure.m4
+new file mode 100644
+index 00000000..fd8c1a6
+--- /dev/null
++++ b/build/pkgs/prompt_toolkit/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([prompt_toolkit], [
++  SAGE_PYTHON_PACKAGE_CHECK([prompt_toolkit])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0cd9283e8bb6c8ae413fc8f715c021f7ec3ca2c8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:12:10 -0500
+Subject: Trac #29665: add Gentoo package information for charset_normalizer.
+
+---
+ build/pkgs/charset_normalizer/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/charset_normalizer/distros/gentoo.txt
+
+diff --git a/build/pkgs/charset_normalizer/distros/gentoo.txt b/build/pkgs/charset_normalizer/distros/gentoo.txt
+new file mode 100644
+index 00000000..eefeb89
+--- /dev/null
++++ b/build/pkgs/charset_normalizer/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/charset_normalizer
+-- 
+cgit v1.0-1-gd88e
+
+
+From a04b01a9ab59097d189edcc5ddcb461faede83b2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:12:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ charset_normalizer.
+
+---
+ build/pkgs/charset_normalizer/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/charset_normalizer/spkg-configure.m4
+
+diff --git a/build/pkgs/charset_normalizer/spkg-configure.m4 b/build/pkgs/charset_normalizer/spkg-configure.m4
+new file mode 100644
+index 00000000..18b18cf
+--- /dev/null
++++ b/build/pkgs/charset_normalizer/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([charset_normalizer], [
++  SAGE_PYTHON_PACKAGE_CHECK([charset_normalizer])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d2ea08138711c53046f977b586f33b09b176b2e3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:13:37 -0500
+Subject: Trac #29665: add Gentoo package information for prometheus_client.
+
+---
+ build/pkgs/prometheus_client/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/prometheus_client/distros/gentoo.txt
+
+diff --git a/build/pkgs/prometheus_client/distros/gentoo.txt b/build/pkgs/prometheus_client/distros/gentoo.txt
+new file mode 100644
+index 00000000..aa2889c
+--- /dev/null
++++ b/build/pkgs/prometheus_client/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/prometheus_client
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b0393200e9edd3e26b8a55ba67e5710e7403fcb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:15:09 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for prometheus_client.
+
+---
+ build/pkgs/prometheus_client/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/prometheus_client/spkg-configure.m4
+
+diff --git a/build/pkgs/prometheus_client/spkg-configure.m4 b/build/pkgs/prometheus_client/spkg-configure.m4
+new file mode 100644
+index 00000000..b494588
+--- /dev/null
++++ b/build/pkgs/prometheus_client/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([prometheus_client], [
++  SAGE_PYTHON_PACKAGE_CHECK([prometheus_client])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From cdcd85284f43ca4ad18353ec3527b2901e57b788 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:17:23 -0500
+Subject: Trac #29665: add Gentoo package information for pybind11.
+
+---
+ build/pkgs/pybind11/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pybind11/distros/gentoo.txt
+
+diff --git a/build/pkgs/pybind11/distros/gentoo.txt b/build/pkgs/pybind11/distros/gentoo.txt
+new file mode 100644
+index 00000000..0c500b3
+--- /dev/null
++++ b/build/pkgs/pybind11/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pybind11
+-- 
+cgit v1.0-1-gd88e
+
+
+From efdd1eb64c4799fe3cdf2221824182941b3fda2d Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:17:51 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pybind11.
+
+---
+ build/pkgs/pybind11/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pybind11/spkg-configure.m4
+
+diff --git a/build/pkgs/pybind11/spkg-configure.m4 b/build/pkgs/pybind11/spkg-configure.m4
+new file mode 100644
+index 00000000..cce1cf5
+--- /dev/null
++++ b/build/pkgs/pybind11/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pybind11], [SAGE_PYTHON_PACKAGE_CHECK([pybind11])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b2128f33b68ea33927284116ea598dd186902400 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:19:23 -0500
+Subject: Trac #29665: add Gentoo package information for pkgconfig.
+
+---
+ build/pkgs/pkgconfig/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pkgconfig/distros/gentoo.txt
+
+diff --git a/build/pkgs/pkgconfig/distros/gentoo.txt b/build/pkgs/pkgconfig/distros/gentoo.txt
+new file mode 100644
+index 00000000..32e8618
+--- /dev/null
++++ b/build/pkgs/pkgconfig/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pkgconfig
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b373b49e06aadeb36dc57e500da9a322460e658 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:19:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pkgconfig.
+
+---
+ build/pkgs/pkgconfig/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pkgconfig/spkg-configure.m4
+
+diff --git a/build/pkgs/pkgconfig/spkg-configure.m4 b/build/pkgs/pkgconfig/spkg-configure.m4
+new file mode 100644
+index 00000000..6708293
+--- /dev/null
++++ b/build/pkgs/pkgconfig/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pkgconfig], [SAGE_PYTHON_PACKAGE_CHECK([pkgconfig])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ce578729eb0d14baab365351ba9a9ffffb7b79f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:21:10 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_serializinghtml.
+
+---
+ build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt b/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+new file mode 100644
+index 00000000..38bca8f
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-serializinghtml
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb0f42c32bbce0e4488678312f5e2d88c6f42c9b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:21:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_serializinghtml.
+
+---
+ build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4 b/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+new file mode 100644
+index 00000000..be8e625
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_serializinghtml], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_serializinghtml])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e47dcf985e40475de85c9436a85537751318bc3d Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:22:54 -0500
+Subject: Trac #29665: add Gentoo package information for sphinxcontrib_jsmath.
+
+---
+ build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt b/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+new file mode 100644
+index 00000000..041a471
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-jsmath
+-- 
+cgit v1.0-1-gd88e
+
+
+From 72cff6fd35f93de4fa855bc870569dd733ff5c24 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:23:49 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_jsmath.
+
+---
+ build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4 b/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+new file mode 100644
+index 00000000..e46bde2
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_jsmath], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_jsmath])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a36395d70f759449cd63c1b0990fbdcb4cb25ca0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:24:26 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_devhelp.
+
+---
+ build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..9b5c899
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-devhelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9953a5dd1646ed0ad51d2e3935cf609bc9e7fd1c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:25:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_devhelp.
+
+---
+ build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+new file mode 100644
+index 00000000..8728136
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_devhelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_devhelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b199d5363aad93f3cb23f7904c9553a28b06348f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:25:53 -0500
+Subject: Trac #29665: add Gentoo package information for sphinxcontrib_qthelp.
+
+---
+ build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..7210099
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-qthelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 94ac8806739f3938e73f5857328e91e0d42e98d2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:26:28 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_qthelp.
+
+---
+ build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+new file mode 100644
+index 00000000..81ea5e1
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_qthelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_qthelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From beedc154aa405e8a58aee8889f510db07adc89a7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:26:54 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_applehelp.
+
+---
+ build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..66ac8da
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-applehelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 07d47c3673d6b35423b71f621cb400989c0101c2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:27:19 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_applehelp.
+
+---
+ build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+new file mode 100644
+index 00000000..e834aed
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_applehelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_applehelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 333a66546c5d421735c49dbafd7370a827f22781 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:27:46 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_htmlhelp.
+
+---
+ build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..e080bac
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-htmlhelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From bfaeb3962254439b63f1f2e0e883de462c7831be Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:29:18 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_htmlhelp.
+
+---
+ build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+new file mode 100644
+index 00000000..c77b003
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_htmlhelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_htmlhelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 782cde13da06e8b85806cb7cbc8aceee0364e639 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:30:23 -0500
+Subject: Trac #29665: add Gentoo package information for jupyterlab_pygments.
+
+---
+ build/pkgs/jupyterlab_pygments/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyterlab_pygments/distros/gentoo.txt b/build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+new file mode 100644
+index 00000000..c57b4f1
+--- /dev/null
++++ b/build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyterlab_pygments
+-- 
+cgit v1.0-1-gd88e
+
+
+From 39f974cfa4a8c6e5dd897f152f83ec82f40ee9f7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:31:13 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ jupyterlab_pygments.
+
+---
+ build/pkgs/jupyterlab_pygments/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyterlab_pygments/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyterlab_pygments/spkg-configure.m4 b/build/pkgs/jupyterlab_pygments/spkg-configure.m4
+new file mode 100644
+index 00000000..e46e21f
+--- /dev/null
++++ b/build/pkgs/jupyterlab_pygments/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyterlab_pygments], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyterlab_pygments])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From db704620700fd36cec3bf6125938f3ee00a9eb5e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:29:15 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for ply.
+
+---
+ build/pkgs/ply/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ply/spkg-configure.m4
+
+diff --git a/build/pkgs/ply/spkg-configure.m4 b/build/pkgs/ply/spkg-configure.m4
+new file mode 100644
+index 00000000..ffb0030
+--- /dev/null
++++ b/build/pkgs/ply/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ply], [SAGE_PYTHON_PACKAGE_CHECK([ply])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6aac31dabcdfdef228d7780398a3fda1a4cc566f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:29:51 -0500
+Subject: Trac #29665: add Gentoo package information for ply.
+
+---
+ build/pkgs/ply/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ply/distros/gentoo.txt
+
+diff --git a/build/pkgs/ply/distros/gentoo.txt b/build/pkgs/ply/distros/gentoo.txt
+new file mode 100644
+index 00000000..c8b1630
+--- /dev/null
++++ b/build/pkgs/ply/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ply
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb8d3372936ec37470d69687a0f91592129460ae Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:30:33 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for gast.
+
+---
+ build/pkgs/gast/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/gast/spkg-configure.m4
+
+diff --git a/build/pkgs/gast/spkg-configure.m4 b/build/pkgs/gast/spkg-configure.m4
+new file mode 100644
+index 00000000..26ec59f
+--- /dev/null
++++ b/build/pkgs/gast/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([gast], [SAGE_PYTHON_PACKAGE_CHECK([gast])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1cdc4046a88f1c2b4e5c162f66c6db6090b24194 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:31:15 -0500
+Subject: Trac #29665: add Gentoo package information for gast.
+
+---
+ build/pkgs/gast/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/gast/distros/gentoo.txt
+
+diff --git a/build/pkgs/gast/distros/gentoo.txt b/build/pkgs/gast/distros/gentoo.txt
+new file mode 100644
+index 00000000..3be5e7e
+--- /dev/null
++++ b/build/pkgs/gast/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/gast
+-- 
+cgit v1.0-1-gd88e
+
+
+From 96068b8a3742b65d619190e1d9fa5db399e6b4f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:32:20 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pythran.
+
+---
+ build/pkgs/pythran/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pythran/spkg-configure.m4
+
+diff --git a/build/pkgs/pythran/spkg-configure.m4 b/build/pkgs/pythran/spkg-configure.m4
+new file mode 100644
+index 00000000..592e95b
+--- /dev/null
++++ b/build/pkgs/pythran/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pythran], [SAGE_PYTHON_PACKAGE_CHECK([pythran])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1fa0fad3ae8f7e559c6fc315c6773a7d8aac0bfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:32:55 -0500
+Subject: Trac #29665: add Gentoo package information for pythran.
+
+---
+ build/pkgs/pythran/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pythran/distros/gentoo.txt
+
+diff --git a/build/pkgs/pythran/distros/gentoo.txt b/build/pkgs/pythran/distros/gentoo.txt
+new file mode 100644
+index 00000000..1bb7cdc
+--- /dev/null
++++ b/build/pkgs/pythran/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pythran
+-- 
+cgit v1.0-1-gd88e
+
+
+From d26370e5b8c88e76abfb7c27e3defb71c9e9f711 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:33:50 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for beniget.
+
+---
+ build/pkgs/beniget/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/beniget/spkg-configure.m4
+
+diff --git a/build/pkgs/beniget/spkg-configure.m4 b/build/pkgs/beniget/spkg-configure.m4
+new file mode 100644
+index 00000000..8ae6101
+--- /dev/null
++++ b/build/pkgs/beniget/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([beniget], [SAGE_PYTHON_PACKAGE_CHECK([beniget])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From eeeb296ed9b9694a865534103fd58e62a151ef5e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:34:22 -0500
+Subject: Trac #29665: add Gentoo package information for beniget.
+
+---
+ build/pkgs/beniget/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/beniget/distros/gentoo.txt
+
+diff --git a/build/pkgs/beniget/distros/gentoo.txt b/build/pkgs/beniget/distros/gentoo.txt
+new file mode 100644
+index 00000000..1a5972c
+--- /dev/null
++++ b/build/pkgs/beniget/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/beniget
+-- 
+cgit v1.0-1-gd88e
+
+
+From 078b2ff272d0eeff5cce40ad7eb176d9ddd7bdff Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:35:37 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for alabaster.
+
+---
+ build/pkgs/alabaster/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/alabaster/spkg-configure.m4
+
+diff --git a/build/pkgs/alabaster/spkg-configure.m4 b/build/pkgs/alabaster/spkg-configure.m4
+new file mode 100644
+index 00000000..4eca6e0
+--- /dev/null
++++ b/build/pkgs/alabaster/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([alabaster], [SAGE_PYTHON_PACKAGE_CHECK([alabaster])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7dc264353e5f64110431ff28c1b8b7e89699e9bd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:36:06 -0500
+Subject: Trac #29665: add Gentoo package information for alabaster.
+
+---
+ build/pkgs/alabaster/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/alabaster/distros/gentoo.txt
+
+diff --git a/build/pkgs/alabaster/distros/gentoo.txt b/build/pkgs/alabaster/distros/gentoo.txt
+new file mode 100644
+index 00000000..cffece6
+--- /dev/null
++++ b/build/pkgs/alabaster/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/alabaster
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8011a5e675e7e61a77ce34a299ee961a9f44253f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:43:59 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ importlib_metadata.
+
+---
+ build/pkgs/importlib_metadata/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/importlib_metadata/spkg-configure.m4
+
+diff --git a/build/pkgs/importlib_metadata/spkg-configure.m4 b/build/pkgs/importlib_metadata/spkg-configure.m4
+new file mode 100644
+index 00000000..0554e52
+--- /dev/null
++++ b/build/pkgs/importlib_metadata/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([importlib_metadata], [
++  SAGE_PYTHON_PACKAGE_CHECK([importlib_metadata])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 928ca0019e3ec6c4541a16b28bcc6710df6d010b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:44:28 -0500
+Subject: Trac #29665: add Gentoo package information for importlib_metadata.
+
+---
+ build/pkgs/importlib_metadata/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/importlib_metadata/distros/gentoo.txt
+
+diff --git a/build/pkgs/importlib_metadata/distros/gentoo.txt b/build/pkgs/importlib_metadata/distros/gentoo.txt
+new file mode 100644
+index 00000000..4f92786
+--- /dev/null
++++ b/build/pkgs/importlib_metadata/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/importlib_metadata
+-- 
+cgit v1.0-1-gd88e
+
+
+From 135f184f7498a2046065e669723e68efe2d65cee Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 21:16:58 -0500
+Subject: Trac #29665: fix sage.misc.package doctest with system alabaster.
+
+When alabaster from the system is used, these tests won't be able to
+find its SPKG installed. Add some ellipses, and switch one test to
+look for sage_conf instead.
+---
+ src/sage/misc/package.py | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/sage/misc/package.py b/src/sage/misc/package.py
+index 84f3d50..c7ad206 100644
+--- a/src/sage/misc/package.py
++++ b/src/sage/misc/package.py
+@@ -386,9 +386,9 @@ def installed_packages(exclude_pip=True):
+     EXAMPLES::
+ 
+         sage: sorted(installed_packages().keys())  # optional - build
+-        [...'alabaster', ...'sage_conf', ...]
+-        sage: installed_packages()['alabaster']  # optional - build, random
+-        '0.7.12'
++        [...'sage_conf', ...]
++        sage: installed_packages()['sage_conf']  # optional - build, random
++        '9.5'
+ 
+     .. SEEALSO::
+ 
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch b/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
new file mode 100644
index 000000000000..7ef3826aa4d2
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
@@ -0,0 +1,27 @@
+diff --git a/src/bin/sage-runtests b/src/bin/sage-runtests
+index 589dc8cd37..6bb8bf99a4 100755
+--- a/src/bin/sage-runtests
++++ b/src/bin/sage-runtests
+@@ -154,21 +154,4 @@ if __name__ == "__main__":
+     DC = DocTestController(args, args.filenames)
+     err = DC.run()
+ 
+-    try:
+-        exit_code_pytest = 0
+-        import pytest
+-        pytest_options = ["--import-mode", "importlib"]
+-        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.")
+-
+-    if err == 0:
+-        sys.exit(exit_code_pytest)
+-    else:
+-        sys.exit(err)
++    sys.exit(err)
diff --git a/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch b/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
new file mode 100644
index 000000000000..093e3d56eb33
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
@@ -0,0 +1,42 @@
+More site packages not included in trac 29665
+
+diff --git a/build/pkgs/gmpy2/spkg-configure.m4 b/build/pkgs/gmpy2/spkg-configure.m4
+new file mode 100644
+index 0000000000..2d0390f7db
+--- /dev/null
++++ b/build/pkgs/gmpy2/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([gmpy2], [SAGE_PYTHON_PACKAGE_CHECK([gmpy2])])
+diff --git a/build/pkgs/sphinx/spkg-configure.m4 b/build/pkgs/sphinx/spkg-configure.m4
+new file mode 100644
+index 0000000000..e149fbb2cf
+--- /dev/null
++++ b/build/pkgs/sphinx/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([sphinx], [SAGE_PYTHON_PACKAGE_CHECK([sphinx])])
+diff --git a/build/pkgs/typing_extensions/spkg-configure.m4 b/build/pkgs/typing_extensions/spkg-configure.m4
+new file mode 100644
+index 0000000000..d475fd8257
+--- /dev/null
++++ b/build/pkgs/typing_extensions/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([typing_extensions], [SAGE_PYTHON_PACKAGE_CHECK([typing_extensions])])
+-- 
+diff --git a/build/pkgs/gmpy2/install-requires.txt b/build/pkgs/gmpy2/install-requires.txt
+index 51d24518ef..c25feff557 100644
+--- a/build/pkgs/gmpy2/install-requires.txt
++++ b/build/pkgs/gmpy2/install-requires.txt
+@@ -1,3 +1 @@
+-# We would like to write gmpy2 >=2.1.0b5, but pipenv does not accept prereleases in version ranges
+-# https://github.com/pypa/pipenv/issues/1760
+-gmpy2 ==2.1.0rc1
++gmpy2 >=2.1
+diff --git a/build/pkgs/ptyprocess/install-requires.txt b/build/pkgs/ptyprocess/install-requires.txt
+index de89260872..7c336f636c 100644
+--- a/build/pkgs/ptyprocess/install-requires.txt
++++ b/build/pkgs/ptyprocess/install-requires.txt
+@@ -1,3 +1,3 @@
+-ptyprocess ==0.5.1
++ptyprocess
+ # https://trac.sagemath.org/ticket/31280#comment:42 and following
+ # sagelib is not compatible with ptyprocess 0.5.2, 0.6, and 0.7
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 33b40acbabeb..a32c5d18f378 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -22,11 +22,13 @@ distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
 checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
 python_version=3
 
-build_options="debug system_python3"
+build_options="debug system_python3 system_site_packages"
 desc_option_debug="Build with debug symbols"
 desc_option_system_python="Build using system python 3"
-build_options_default="system_python3"
+desc_option_system_python="Build using system python site-packages"
+build_options_default="system_python3 system_site_packages"
 configure_args+=" $(vopt_with system_python3)"
+configure_args+=" $(vopt_enable system_site_packages)"
 
 # path where sage will be installed
 _SAGE_ROOT=/usr/lib/sage-${version}
@@ -163,6 +165,8 @@ do_check() {
 	fi
 	if [ "$XBPS_CHECK_PKGS" = full ]; then
 		_test_args="--long $_test_args"
+	else
+		_test_args="--warn-long 5.0 $_test_args"
 	fi
 	# since make check will build the docs, run test like this instead
 	./sage -tp ${XBPS_MAKEJOBS} ${_test_args}
@@ -182,7 +186,7 @@ makedepends+=" automake gettext gettext-devel"
 # other host dependencies
 makedepends+=" cmake curl git ninja pandoc patch pkg-config python3 tox"
 
-# already in void
+# standard dependencies
 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
@@ -202,7 +206,49 @@ makedepends+="
  brial-devel cliquer-devel gfan libbraiding-devel libhomfly-devel
  lrcalc-devel nauty-devel palp tachyon
  maxima-ecl primesieve-devel primecount-devel
+ ffmpeg ImageMagick
 "
 
 # TODO: optional
 # 4ti2 coxeter3 libsemigroups lrslib pdf2svg perl_mongodb polymake
+
+# TODO: standard
+# cvxopt importlib_resources
+
+# python packages for trac-29665
+_sage_python3_modules="
+ python3-Babel python3-Jinja2 python3-MarkupSafe python3-Pillow
+ python3-Pygments python3-Sphinx python3-alabaster python3-argcomplete
+ python3-argon2 python3-attrs python3-backcall python3-beniget
+ python3-bleach python3-certifi python3-cffi python3-charset-normalizer
+ python3-cycler python3-dateutil python3-decorator python3-defusedxml
+ python3-docutils python3-entrypoints python3-flit_core python3-gast
+ python3-gmpy2 python3-html5lib python3-idna python3-imagesize
+ python3-importlib_metadata python3-ipython python3-ipython_genutils
+ python3-ipython_ipykernel python3-jedi python3-jsonschema
+ python3-jupyter_client python3-jupyter_core python3-jupyter_ipywidgets
+ python3-jupyter_nbconvert python3-jupyter_nbformat
+ python3-jupyter_notebook python3-jupyterlab_pygments python3-kiwisolver
+ python3-matplotlib python3-matplotlib-inline python3-mistune
+ python3-mpmath python3-nbclient python3-nest_asyncio python3-networkx
+ python3-numpy python3-packaging python3-pandocfilters python3-parsing
+ python3-parso python3-pexpect python3-pickleshare python3-pip
+ python3-pkgconfig python3-pluggy python3-ply python3-prometheus_client
+ python3-prompt_toolkit python3-ptyprocess python3-py python3-pybind11
+ python3-pycparser python3-pyrsistent python3-pytz python3-pyzmq
+ python3-requests python3-scipy python3-send2trash python3-setuptools
+ python3-setuptools_scm python3-simplegeneric python3-six
+ python3-snowballstemmer python3-sphinxcontrib-applehelp
+ python3-sphinxcontrib-devhelp python3-sphinxcontrib-htmlhelp
+ python3-sphinxcontrib-jsmath python3-sphinxcontrib-qthelp
+ python3-sphinxcontrib-serializinghtml python3-sympy python3-terminado
+ python3-testpath python3-texttable python3-toml python3-tomli
+ python3-tornado python3-traitlets python3-typing_extensions
+ python3-tzlocal python3-urllib3 python3-wcwidth python3-webencodings
+ python3-wheel python3-zipp pythran
+ "
+
+if [ "$build_option_system_site_packages" ]; then
+	makedepends+=" $_sage_python3_modules"
+	depends+=" $_sage_python3_modules"
+fi

From 899e40ad0d7939e6484df92080922a0723a28ca9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 3 Jan 2022 20:47:52 -0300
Subject: [PATCH 24/63] sagemath: use small source tarball + upstream packages

---
 srcpkgs/sagemath/template | 97 ++++++++++++++++++++++++++-------------
 1 file changed, 64 insertions(+), 33 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index a32c5d18f378..0de0061b09df 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -18,8 +18,8 @@ short_desc="Open source mathematics software"
 maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
-distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
-checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
+distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
+checksum=aea4c5a8d3b32af2fba644269b9daf4f62471471ba2d7d83da0f8098a5f53225
 python_version=3
 
 build_options="debug system_python3 system_site_packages"
@@ -33,42 +33,72 @@ configure_args+=" $(vopt_enable system_site_packages)"
 # 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} ;;
-esac
+_SAGE_UPSTREAM_MIRROR=https://mirrors.mit.edu/sage/spkg/upstream
 
-# extra upstream packages (trac-32968 / trac-33040)
 _upstream="
- https://pypi.io/packages/source/s/sphinx/Sphinx-4.3.1.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
+${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
+${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
+${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
+${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
+${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
+${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
+${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
+https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
+https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
+http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
+${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
+${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
+${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
+${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
+${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
+https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
+${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
+https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
+${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
 "
 
 checksum+="
- 32a5b3e9a1b176cc25ed048557d4d3d01af635e6b76c5bc7a43b0a34447fbd45
-
- 9c87405839a19696e837b3b818fed3f5f69f16f1eec1a1ad77e043dcea9c772f
- fc4453705b81d03568d5b808ad8f09c77c47534f6ac2e72e733f9ca4714aa75c
- acad2d8b20a1af07d4e4c9d2e9285c5ed9104354062f275f3fcd88dcef4f1326
- 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
- 78884e7c1d4b00ce3cea67b44566851c4343c120abd683433ce934a68ea58872
- 0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86
- b8e2f83c56e141920c39464b852de3719dfbfb6e3c99a2d8da0edf4fb33176ed
- d9bdec0013ef1eb5a84ab39a3b3868911598afa494f5faa038647101504e2b81
- b2e9810e09c3a47b73ce9cab5a72243a1258f61e7900969097a817232246ce1c
- 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
- 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
+c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
+d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
+4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
+3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
+03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
+5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
+cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
+5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
+581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
+6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
+07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
+a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
+ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
+d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
+169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
+5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
+cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
+471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
+78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
+edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
+b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
+3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
+545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
+cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
+718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
+dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
 "
 
 for u in ${_upstream}; do
@@ -101,6 +131,7 @@ post_extract() {
 	mv -T $wrksrc $_SAGE_ROOT
 	ln -srfT $_SAGE_ROOT $wrksrc
 
+	mkdir -p $wrksrc/upstream
 	for u in ${_upstream}; do
 		cp "$XBPS_SRCDISTDIR/${pkgname}-${version}/${u##*[/>]}" $wrksrc/upstream
 	done

From e11081a34f37e456ad308a05b3da376070de8b16 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 13:38:02 -0300
Subject: [PATCH 25/63] sagemath: for CI use fixed random-seed=0

---
 srcpkgs/sagemath/template | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 0de0061b09df..b5b99d2c122d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -194,6 +194,10 @@ do_check() {
 	if [ -z "$_test_args" ]; then
 		_test_args=--all
 	fi
+	if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
+		# for CI use a predictable random seed
+		_test_args="--random-seed=0 $_test_args"
+	fi
 	if [ "$XBPS_CHECK_PKGS" = full ]; then
 		_test_args="--long $_test_args"
 	else

From 6b1a8633a396d7bef03753d3d232095a62e2982b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 14:40:27 -0300
Subject: [PATCH 26/63] sagemath: upstream two patches

---
 ...ble-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch} |  6 +++---
 ...rse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch} | 10 +++++-----
 2 files changed, 8 insertions(+), 8 deletions(-)
 rename srcpkgs/sagemath/patches/{0001-sage-site-exec-only-if-it-is-executable.patch => trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch} (94%)
 rename srcpkgs/sagemath/patches/{0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch => trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch} (81%)

diff --git a/srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch b/srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
similarity index 94%
rename from srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch
rename to srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
index ce17c6d6e954..7fdb3d697222 100644
--- a/srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch
+++ b/srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
@@ -1,14 +1,14 @@
 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
+Subject: 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
+index 4c0fa17..153e610 100755
 --- a/src/bin/sage
 +++ b/src/bin/sage
 @@ -129,7 +129,7 @@ usage() {
@@ -39,5 +39,5 @@ index 4c0fa17426..153e610a2e 100755
              # fallthrough if there is no sage-site script
          fi
 -- 
-2.34.1
+cgit v1.0-1-gd88e
 
diff --git a/srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch b/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
similarity index 81%
rename from srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch
rename to srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
index bab6d8441d42..350c41ac3928 100644
--- a/srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch
+++ b/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
@@ -1,16 +1,16 @@
-From 57e3eba28c9b4ee6bd3407d0715b8bd00aaf04a7 Mon Sep 17 00:00:00 2001
+From 53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6 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
+Subject: sagetex: Fix a warning when byte-compiling sagetexparse.py
 
 ---
- .../sagetex/patches/sagetex-fix-warning.patch    | 16 ++++++++++++++++
+ build/pkgs/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
+index 00000000..d82ab67
 --- /dev/null
 +++ b/build/pkgs/sagetex/patches/sagetex-fix-warning.patch
 @@ -0,0 +1,16 @@
@@ -31,5 +31,5 @@ index 0000000000..d82ab675dd
 +     self.result += t.code[1:-1] + '\n\n'
 + 
 -- 
-2.34.1
+cgit v1.0-1-gd88e
 

From 2ec6f6de7f6023b10b180a06c572895fd63b3d4c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 19:57:59 -0300
Subject: [PATCH 27/63] sagemath: reorder upstream sources and add two missing
 ones

---
 srcpkgs/sagemath/template | 60 ++++++++++++++++++++++-----------------
 1 file changed, 34 insertions(+), 26 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index b5b99d2c122d..f53cba947c88 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -36,69 +36,77 @@ _SAGE_ROOT=/usr/lib/sage-${version}
 _SAGE_UPSTREAM_MIRROR=https://mirrors.mit.edu/sage/spkg/upstream
 
 _upstream="
-${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
 ${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
 ${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
+
+${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
 ${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
 ${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
 ${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
 ${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
 ${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
 ${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
-https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
-https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
-http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
 ${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
 ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
 ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
 ${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
 ${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${PYPI_SITE}/P/PyCygwin/PyCygwin-0.1.tar.gz
 ${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
-https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+${PYPI_SITE}/s/setuptools/setuptools-59.2.0.tar.gz
 ${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
 ${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
-https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
 ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
+
+https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
+https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
+http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
+https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
 "
 
 checksum+="
-dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
 c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
 d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
+5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
+ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
+169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
+cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
+edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
+cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
+
+dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
 3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
 03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
 5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
 cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
-5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
-c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
-6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
-07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
 a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
-ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
 d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
-169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
 5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
-cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
 471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
 78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
-edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+45a5e295590c469a49b2804bfdb89059e942d768ad3b813f484d7b5bff48d226
 ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
-b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
-3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+157d21de9d055ab9e8ea3186d91e7f4f865e11f42deafa952d90842671fc2576
 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
 545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
-cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
-718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
 dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
+
+c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
+6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
+07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
+3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
 "
 
 for u in ${_upstream}; do

From 3b6948e38352c4cd05ac958e2badd56a36d46b7f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 9 Jan 2022 12:45:47 -0300
Subject: [PATCH 28/63] sagemath: do not download anything patch

---
 .../patches/00-Do_not_download_anything.patch         | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 srcpkgs/sagemath/patches/00-Do_not_download_anything.patch

diff --git a/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch b/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch
new file mode 100644
index 000000000000..35aef7b8d456
--- /dev/null
+++ b/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch
@@ -0,0 +1,11 @@
+--- a/build/sage_bootstrap/tarball.py	2022-01-07 19:17:06.754747955 -0300
++++ b/build/sage_bootstrap/tarball.py	2022-01-07 19:25:31.844139381 -0300
+@@ -158,6 +158,8 @@
+                             .format(destination=destination))
+         successful_download = False
+         log.info('Attempting to download package {0} from mirrors'.format(self.filename))
++        log.info('ERROR: downloading is disabled, add file to template instead')
++        return
+         for mirror in MirrorList():
+             url = mirror + '/'.join(['spkg', 'upstream', self.package.name, self.filename])
+             log.info(url)

From 36abe91e9fb0dcf744995c499bde0bf40b711c42 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 9 Jan 2022 13:27:49 -0300
Subject: [PATCH 29/63] sagemath: update to 9.5.rc0.

---
 ...184f7498a2046065e669723e68efe2d65cee.patch |    6 +-
 ...1d4ced4264f65ab704f725f6f5879b012796.patch |  263 ----
 ...a54526829b79d5d236a40f83ddc6ce7b2696.patch | 1196 -----------------
 ...9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch |   27 -
 ...3f4f32246ad9ded6d37f1f2f12a589a81f4.patch} |    4 +-
 ...03138d0403be7c7cb303de2bc0a0e0b6793c.patch |   82 --
 ...f3a1611fed0cc66fb838eb85739646dd34d.patch} |   94 +-
 ...49c415e11d0522bff9013bc1509264b26ebf.patch |   27 +
 ...ip_doctest_singular_4.2.1--see_33134.patch |   13 +
 srcpkgs/sagemath/template                     |    6 +-
 10 files changed, 72 insertions(+), 1646 deletions(-)
 delete mode 100644 srcpkgs/sagemath/patches/trac-30766-system_python_3.10-df9f1d4ced4264f65ab704f725f6f5879b012796.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
 rename srcpkgs/sagemath/patches/{trac-33064-sage_docbuild_ignore_cache_save_permission_error-f767cf1eadfd8ab540a31c5c5ef09d56df09b90e.patch => trac-33064-sage_docbuild_ignore_cache_save_permission_error-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch} (92%)
 delete mode 100644 srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
 rename srcpkgs/sagemath/patches/{trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch => trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch} (63%)
 create mode 100644 srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch

diff --git a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
index b641113927e7..0ecb27c593cd 100644
--- a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
+++ b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
@@ -5615,9 +5615,9 @@ index 84f3d50..c7ad206 100644
      EXAMPLES::
  
          sage: sorted(installed_packages().keys())  # optional - build
--        [...'alabaster', ...'sage_conf', ...]
--        sage: installed_packages()['alabaster']  # optional - build, random
--        '0.7.12'
+-        [...'gmpy2', ...'sage_conf', ...]
+-        sage: installed_packages()['gmpy2']  # optional - build, random
+-        '2.1.0b5'
 +        [...'sage_conf', ...]
 +        sage: installed_packages()['sage_conf']  # optional - build, random
 +        '9.5'
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
deleted file mode 100644
index a1cb4c834482..000000000000
--- a/srcpkgs/sagemath/patches/trac-30766-system_python_3.10-df9f1d4ced4264f65ab704f725f6f5879b012796.patch
+++ /dev/null
@@ -1,263 +0,0 @@
-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-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch b/srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
deleted file mode 100644
index 3ae6fe01822d..000000000000
--- a/srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
+++ /dev/null
@@ -1,1196 +0,0 @@
-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/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch b/srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
deleted file mode 100644
index 485fb0176f45..000000000000
--- a/srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-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: 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 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"
- 
- # 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)
--- 
-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-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
similarity index 92%
rename from srcpkgs/sagemath/patches/trac-33064-sage_docbuild_ignore_cache_save_permission_error-f767cf1eadfd8ab540a31c5c5ef09d56df09b90e.patch
rename to srcpkgs/sagemath/patches/trac-33064-sage_docbuild_ignore_cache_save_permission_error-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
index 20fa12e570eb..04f04cfd6718 100644
--- 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-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
@@ -1,4 +1,4 @@
-From f767cf1eadfd8ab540a31c5c5ef09d56df09b90e Mon Sep 17 00:00:00 2001
+From e89193f4f32246ad9ded6d37f1f2f12a589a81f4 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
@@ -8,7 +8,7 @@ Subject: sage_docbuild: do not fail when cache cannot be saved
  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
+index 466ca82..f8c8ebd 100644
 --- a/src/sage_docbuild/__init__.py
 +++ b/src/sage_docbuild/__init__.py
 @@ -856,9 +856,12 @@ class ReferenceSubBuilder(DocBuilder):
diff --git a/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch b/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
deleted file mode 100644
index 6bc5193b75ee..000000000000
--- a/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-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
-
-
-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/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch b/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
similarity index 63%
rename from srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch
rename to srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
index 3794aa7f019b..04fca4815a00 100644
--- a/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch
+++ b/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
@@ -1,4 +1,4 @@
-From 7d3381b21e4716cfa8a33915621a12f0eba74233 Mon Sep 17 00:00:00 2001
+From 18d0477153af6f453a0e84f78030535f6a36ce87 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
@@ -10,56 +10,56 @@ Subject: doctests: remove dochtml label from some tests that don't need docs
  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
+index c788623..527ed90 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  # optional - sagemath_doc_html
+-        sage: thematic_index = os.path.join(SAGE_DOC, "html", "en", "thematic_tutorials", "index.html")  # optional - sagemath_doc_html
 +        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
+         sage: for line in open(thematic_index).readlines():  # optional - sagemath_doc_html
          ....:     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
+index 4c56aea..583ca06 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  # optional - sagemath_doc_html
+-    sage: docfilename = os.path.join(SAGE_DOC, 'html', 'en', 'reference', 'calculus', 'sage', 'symbolic', 'expression.html')  # optional - sagemath_doc_html
 +    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
+     sage: with open(docfilename) as fobj:  # optional - sagemath_doc_html
      ....:     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='',
+@@ -845,12 +845,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  # optional - sagemath_doc_html
+-        sage: len(_search_src_or_doc('src', r'matrix\(', 'incidence_structures', 'self', 'combinat', interact=False).splitlines()) > 1  # optional - sagemath_doc_html
 +        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)
+         sage: 'abvar/homology' in _search_src_or_doc('doc', 'homology', 'variety', interact=False)  # optional - sagemath_doc_html, 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)  # optional - sagemath_doc_html
 +        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:
+@@ -1369,7 +1369,7 @@ class _sage_doc:
  
-         sage: browse_sage_doc._open("reference", testing=True)[0]  # optional - dochtml, indirect doctest
+         sage: browse_sage_doc._open("reference", testing=True)[0]  # optional - sagemath_doc_html, 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]  # optional - sagemath_doc_html
 +        sage: browse_sage_doc(identity_matrix, 'rst')[-107:-47]
          'Full MatrixSpace of 3 by 3 sparse matrices over Integer Ring'
      """
@@ -68,7 +68,7 @@ index eb70516..b4848ed 100644
 cgit v1.0-1-gd88e
 
 
-From 42a76c3f82edecc9c6c53c661251677e3e907584 Mon Sep 17 00:00:00 2001
+From 88dd9f3a1611fed0cc66fb838eb85739646dd34d 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
@@ -78,7 +78,7 @@ Subject: doctests: add dochtml label to some tests that need docs installed
  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
+index f8c8ebd..d329009 100644
 --- a/src/sage_docbuild/__init__.py
 +++ b/src/sage_docbuild/__init__.py
 @@ -105,7 +105,7 @@ def builder_helper(type):
@@ -86,7 +86,7 @@ index 4a71c91..dd233bd 100644
          sage: from sage_docbuild import _build_many as build_many
          sage: helper = builder_helper("html")
 -        sage: try:
-+        sage: try:  # optional - dochtml
++        sage: try:  # optional - sagemath_doc_html
          ....:     build_many(build_ref_doc, [("docname", "en", "html", {})])
          ....: except Exception as E:
          ....:     "Non-exception during docbuild: abort pool operation" in str(E)
@@ -95,7 +95,7 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import DocBuilder
              sage: b = DocBuilder('tutorial')
 -            sage: b._output_dir('html')
-+            sage: b._output_dir('html')         # optional - dochtml
++            sage: b._output_dir('html')         # optional - sagemath_doc_html
              '.../html/en/tutorial'
          """
          d = os.path.join(SAGE_DOC, type, self.lang, self.name)
@@ -104,7 +104,7 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import DocBuilder
              sage: b = DocBuilder('tutorial')
 -            sage: b._doctrees_dir()
-+            sage: b._doctrees_dir()             # optional - docthml
++            sage: b._doctrees_dir()             # optional - sagemath_doc_html
              '.../doctrees/en/tutorial'
          """
          d = os.path.join(SAGE_DOC, 'doctrees', self.lang, self.name)
@@ -113,7 +113,7 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import ReferenceBuilder
              sage: b = ReferenceBuilder('reference')
 -            sage: b._output_dir('html')
-+            sage: b._output_dir('html')         # optional - dochtml
++            sage: b._output_dir('html')         # optional - sagemath_doc_html
              '.../html/en/reference'
          """
          if lang is None:
@@ -122,56 +122,10 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import ReferenceTopBuilder
              sage: b = ReferenceTopBuilder('reference')
 -            sage: b._output_dir('html')
-+            sage: b._output_dir('html')         # optional - dochtml
++            sage: b._output_dir('html')         # optional - sagemath_doc_html
              '.../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/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch b/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
new file mode 100644
index 000000000000..d32f1e4d5e9f
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
@@ -0,0 +1,27 @@
+From 836249c415e11d0522bff9013bc1509264b26ebf Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Sun, 9 Jan 2022 16:51:22 -0300
+Subject: trac 33135: add filter to ignore deprecation warnings
+
+---
+ src/sage/all.py | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/sage/all.py b/src/sage/all.py
+index 01ef327..19ca3d4 100644
+--- a/src/sage/all.py
++++ b/src/sage/all.py
+@@ -96,6 +96,10 @@ warnings.filterwarnings('ignore', category=DeprecationWarning,
+ warnings.filterwarnings('ignore', category=DeprecationWarning,
+                         module='pythran')
+ 
++warnings.filterwarnings('ignore', category=DeprecationWarning,
++                        message='The distutils(.sysconfig module| package) is deprecated',
++                        module='numpy|sage.env|sage.features')
++
+ ################ end setup warnings ###############################
+ 
+ 
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
new file mode 100644
index 000000000000..438078a92036
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage/rings/polynomial/hilbert.pyx b/src/sage/rings/polynomial/hilbert.pyx
+index 4cd91d0a46..323b168c4e 100644
+--- a/src/sage/rings/polynomial/hilbert.pyx
++++ b/src/sage/rings/polynomial/hilbert.pyx
+@@ -578,7 +578,7 @@ def hilbert_poincare_series(I, grading=None):
+ 
+     This example exceeded the capabilities of Singular before version 4.2.1p2::
+ 
+-        sage: J.hilbert_numerator(algorithm='singular')
++        sage: J.hilbert_numerator(algorithm='singular')   # not tested - requires singular 4.2.1p2
+         120*t^33 - 3465*t^32 + 48180*t^31 - 429374*t^30 + 2753520*t^29 - 13522410*t^28 + 52832780*t^27 - 168384150*t^26 + 445188744*t^25 - 987193350*t^24 + 1847488500*t^23 + 1372406746*t^22 - 403422496*t^21 - 8403314*t^20 - 471656596*t^19 + 1806623746*t^18 + 752776200*t^17 + 752776200*t^16 - 1580830020*t^15 + 1673936550*t^14 - 1294246800*t^13 + 786893250*t^12 - 382391100*t^11 + 146679390*t^10 - 42299400*t^9 + 7837830*t^8 - 172260*t^7 - 468930*t^6 + 183744*t^5 - 39270*t^4 + 5060*t^3 - 330*t^2 + 1
+ 
+     """
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f53cba947c88..f688629fc26d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -1,6 +1,6 @@
 # Template file for 'sagemath'
 pkgname=sagemath
-version=9.5.beta9
+version=9.5.rc0
 revision=1
 wrksrc=sage-$version
 build_style=configure
@@ -19,7 +19,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
-checksum=aea4c5a8d3b32af2fba644269b9daf4f62471471ba2d7d83da0f8098a5f53225
+checksum=8012e3ac35290fa9b2cb837eeca149925784c2378b486731226944e4afd8a4e6
 python_version=3
 
 build_options="debug system_python3 system_site_packages"
@@ -128,7 +128,7 @@ nostrip=yes
 noshlibprovides=yes
 
 # don't rewrite python shebang as sage uses its own python (for now)
-_no_python_shebang=yes
+#_no_python_shebang=yes
 
 # compile python code in sage venv
 pycompile_dirs="$_SAGE_ROOT/venv/"

From 75c7f82e4cdc84d9bafcc64c2cbe5d79be98a2e3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 10 Jan 2022 16:32:54 -0300
Subject: [PATCH 30/63] sagemath: use system gap

---
 ...f491e5ce599ba185f5e93f02e0fcebd76c9e.patch | 57 +++++++++++++++++++
 .../patches/zzz-skip_doctest_system_gap.patch | 13 +++++
 srcpkgs/sagemath/template                     | 15 ++++-
 3 files changed, 82 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch

diff --git a/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch b/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
new file mode 100644
index 000000000000..da88a369db0d
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
@@ -0,0 +1,57 @@
+From 2c981351bb60089530b0598d3e9a909a23d4d4d8 Mon Sep 17 00:00:00 2001
+From: Thierry Thomas <thierry@FreeBSD.org>
+Date: Mon, 22 Mar 2021 03:04:12 +0100
+Subject: 29644: Add spkg-configure.m4 for gap
+
+---
+ build/pkgs/gap/spkg-configure.m4 | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+ create mode 100644 build/pkgs/gap/spkg-configure.m4
+
+diff --git a/build/pkgs/gap/spkg-configure.m4 b/build/pkgs/gap/spkg-configure.m4
+new file mode 100644
+index 00000000..91cd089
+--- /dev/null
++++ b/build/pkgs/gap/spkg-configure.m4
+@@ -0,0 +1,8 @@
++SAGE_SPKG_CONFIGURE([gap], [
++    SAGE_SPKG_DEPCHECK([gmp], [
++       AC_CHECK_HEADER([gap/system.h], [
++        AC_SEARCH_LIBS([GAP_COMM], [gap], [
++        ], [sage_spkg_install_gap=yes])
++       ], [sage_spkg_install_gap=yes])
++    ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2a41f491e5ce599ba185f5e93f02e0fcebd76c9e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Samuel=20Leli=C3=A8vre?= <samuel.lelievre@gmail.com>
+Date: Mon, 22 Mar 2021 03:05:31 +0100
+Subject: 29644: Add distro information for gap
+
+---
+ build/pkgs/gap/distros/fedora.txt | 1 +
+ build/pkgs/gap/distros/gentoo.txt | 1 +
+ 2 files changed, 2 insertions(+)
+ create mode 100644 build/pkgs/gap/distros/fedora.txt
+ create mode 100644 build/pkgs/gap/distros/gentoo.txt
+
+diff --git a/build/pkgs/gap/distros/fedora.txt b/build/pkgs/gap/distros/fedora.txt
+new file mode 100644
+index 00000000..ea4feae
+--- /dev/null
++++ b/build/pkgs/gap/distros/fedora.txt
+@@ -0,0 +1 @@
++gap
+diff --git a/build/pkgs/gap/distros/gentoo.txt b/build/pkgs/gap/distros/gentoo.txt
+new file mode 100644
+index 00000000..ea64ec9
+--- /dev/null
++++ b/build/pkgs/gap/distros/gentoo.txt
+@@ -0,0 +1 @@
++sci-mathematics/gap
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
new file mode 100644
index 000000000000..f132591d48ac
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage_setup/optional_extension.py b/src/sage_setup/optional_extension.py
+index f252849384..4034e3e196 100644
+--- a/src/sage_setup/optional_extension.py
++++ b/src/sage_setup/optional_extension.py
+@@ -80,7 +80,7 @@ def OptionalExtension(*args, **kwds):
+         sage: print(ext.__class__.__name__)
+         CythonizeExtension
+         sage: ext = OptionalExtension("foo", ["foo.c"], package="gap")
+-        sage: print(ext.__class__.__name__)
++        sage: print(ext.__class__.__name__)     # not tested - fails with system gap
+         Extension
+     """
+     try:
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f688629fc26d..02b0af4ad16d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -66,7 +66,6 @@ ${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
 ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
 
 https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
-https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
 http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
 https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
 https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
@@ -103,7 +102,6 @@ ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
 dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
 
 c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
-6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
 07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
 3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
 718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
@@ -159,6 +157,13 @@ pre_configure() {
 	export MAKE="make -j ${XBPS_MAKEJOBS}"
 }
 
+post_configure() {
+	# we set some variables, right after configure has created sage_conf.py
+	cat <<-EOF >> pkgs/sage-conf/sage_conf.py
+	GAP_ROOT_DIR = "/usr/share/gap"
+	EOF
+}
+
 # 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
@@ -248,7 +253,11 @@ makedepends+="
  gengetopt texinfo
  brial-devel cliquer-devel gfan libbraiding-devel libhomfly-devel
  lrcalc-devel nauty-devel palp tachyon
- maxima-ecl primesieve-devel primecount-devel
+ maxima-ecl primesieve-devel primecount-devel gap-devel
+"
+
+# optional dependencies
+makedepends+="
  ffmpeg ImageMagick
 "
 

From e97cfacc19183c4cfc0e6cc8b64e95efdd010292 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Thu, 13 Jan 2022 03:21:19 -0300
Subject: [PATCH 31/63] sagemath: fixes for system gap

---
 .../zzz-fixes_for_system_gap--see_29644.patch | 96 +++++++++++++++++++
 .../patches/zzz-skip_doctest_system_gap.patch | 13 ---
 srcpkgs/sagemath/template                     |  1 +
 3 files changed, 97 insertions(+), 13 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
 delete mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch

diff --git a/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch b/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
new file mode 100644
index 000000000000..741d2b23a7f5
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
@@ -0,0 +1,96 @@
+From 346b4ea4c92f4287d3c097b92817cf2abfcddd8c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Thu, 13 Jan 2022 01:41:31 -0300
+Subject: [PATCH] gap: fixes for using system gap
+
+ - fix _get_shared_lib_path() so we don't need to configure GAP_SO
+ - fix gap_root() so we don't need to configure GAP_ROOT_DIR
+ - skip a useless test that cannot succeed on system gap
+ - use gap_root() in saved_workspace.py instead of GAP_ROOT_DIR
+---
+ src/sage/env.py                      |  2 +-
+ src/sage/libs/gap/saved_workspace.py |  4 ++--
+ src/sage/libs/gap/util.pyx           | 11 +++++++++++
+ src/sage_setup/optional_extension.py |  2 +-
+ 4 files changed, 15 insertions(+), 4 deletions(-)
+
+diff --git a/src/sage/env.py b/src/sage/env.py
+index c4953cfa65..c16696d298 100644
+--- a/src/sage/env.py
++++ b/src/sage/env.py
+@@ -293,7 +293,7 @@ def _get_shared_lib_path(*libnames: str) -> Optional[str]:
+             if sys.platform == 'darwin':
+                 ext = 'dylib'
+             else:
+-                ext = 'so'
++                ext = 'so*'
+ 
+             if SAGE_LOCAL:
+                 search_directories.append(Path(SAGE_LOCAL) / 'lib')
+diff --git a/src/sage/libs/gap/saved_workspace.py b/src/sage/libs/gap/saved_workspace.py
+index ad5adec36d..59c498795f 100644
+--- a/src/sage/libs/gap/saved_workspace.py
++++ b/src/sage/libs/gap/saved_workspace.py
+@@ -8,7 +8,7 @@ workspaces.
+ 
+ import os
+ import glob
+-from sage.env import GAP_ROOT_DIR
++from sage.libs.gap.util import gap_root
+ from sage.interfaces.gap_workspace import gap_workspace_file
+ 
+ 
+@@ -31,7 +31,7 @@ def timestamp():
+     """
+     libgap_dir = os.path.dirname(__file__)
+     libgap_files = glob.glob(os.path.join(libgap_dir, '*'))
+-    gap_packages = glob.glob(os.path.join(GAP_ROOT_DIR, 'pkg', '*'))
++    gap_packages = glob.glob(os.path.join(gap_root(), 'pkg', '*'))
+     files = libgap_files + gap_packages
+     if len(files) == 0:
+         print('Unable to find LibGAP files.')
+diff --git a/src/sage/libs/gap/util.pyx b/src/sage/libs/gap/util.pyx
+index 08c4c40cc0..c7dd557c35 100644
+--- a/src/sage/libs/gap/util.pyx
++++ b/src/sage/libs/gap/util.pyx
+@@ -23,6 +23,7 @@ from cysignals.signals cimport sig_on, sig_off
+ import os
+ import warnings
+ import sage.env
++import subprocess
+ 
+ from .gap_includes cimport *
+ from .element cimport *
+@@ -178,6 +179,16 @@ def gap_root():
+     if os.path.exists(sage.env.GAP_ROOT_DIR):
+         return sage.env.GAP_ROOT_DIR
+ 
++    gap_expr = 'JoinStringsWithSeparator(KERNEL_INFO().GAP_ROOT_PATHS,";")'
++    gap_root_paths = subprocess.getoutput(
++        f"gap -r -q --bare --nointeract -c 'Display({gap_expr});'"
++        ).strip().split(';')
++
++    for gapdir in gap_root_paths:
++        if os.path.exists(os.path.join(gapdir, 'sysinfo.gap')):
++            sage.env.GAP_ROOT_DIR = gapdir
++            return gapdir
++
+     # Attempt to figure out the appropriate GAP_ROOT by reading the
+     # local/bin/gap shell script; this is an ugly hack that exists for
+     # historical reasons; the best approach to setting where Sage looks for
+diff --git a/src/sage_setup/optional_extension.py b/src/sage_setup/optional_extension.py
+index f252849384..4034e3e196 100644
+--- a/src/sage_setup/optional_extension.py
++++ b/src/sage_setup/optional_extension.py
+@@ -80,7 +80,7 @@ def OptionalExtension(*args, **kwds):
+         sage: print(ext.__class__.__name__)
+         CythonizeExtension
+         sage: ext = OptionalExtension("foo", ["foo.c"], package="gap")
+-        sage: print(ext.__class__.__name__)
++        sage: print(ext.__class__.__name__)     # not tested - fails with system gap
+         Extension
+     """
+     try:
+-- 
+2.34.1
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
deleted file mode 100644
index f132591d48ac..000000000000
--- a/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/src/sage_setup/optional_extension.py b/src/sage_setup/optional_extension.py
-index f252849384..4034e3e196 100644
---- a/src/sage_setup/optional_extension.py
-+++ b/src/sage_setup/optional_extension.py
-@@ -80,7 +80,7 @@ def OptionalExtension(*args, **kwds):
-         sage: print(ext.__class__.__name__)
-         CythonizeExtension
-         sage: ext = OptionalExtension("foo", ["foo.c"], package="gap")
--        sage: print(ext.__class__.__name__)
-+        sage: print(ext.__class__.__name__)     # not tested - fails with system gap
-         Extension
-     """
-     try:
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 02b0af4ad16d..0d8ce1f7a70a 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -161,6 +161,7 @@ post_configure() {
 	# we set some variables, right after configure has created sage_conf.py
 	cat <<-EOF >> pkgs/sage-conf/sage_conf.py
 	GAP_ROOT_DIR = "/usr/share/gap"
+	GAP_SO = "$(objdump -p /usr/lib/libgap.so | awk '/SONAME/{print $2}')"
 	EOF
 }
 

From 3a380c61dde77f6a5667d10297b29f2fb8521cac Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Thu, 13 Jan 2022 15:47:33 -0300
Subject: [PATCH 32/63] New package: sagemath-test

---
 srcpkgs/sagemath-test/template                | 32 +++++++++++++++++++
 .../patches/zzz-skip_doctest_shebang.patch    | 11 +++++++
 2 files changed, 43 insertions(+)
 create mode 100644 srcpkgs/sagemath-test/template
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch

diff --git a/srcpkgs/sagemath-test/template b/srcpkgs/sagemath-test/template
new file mode 100644
index 000000000000..3e0b1c3233fd
--- /dev/null
+++ b/srcpkgs/sagemath-test/template
@@ -0,0 +1,32 @@
+# Template file for 'sagemath-test'
+pkgname=sagemath-test
+version=1
+revision=1
+build_style=meta
+checkdepends="sagemath"
+short_desc="Dummy package to test sagemath"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-2.0-or-later"
+homepage="none"
+
+# TODO: install base-voidstrap, uninstall base-chroot, and remove orphans
+# so we can check sagemath depends are enough to run sage on void
+
+do_check() {
+	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
+		_test_args=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	fi
+	if [ -z "$_test_args" ]; then
+		_test_args=--all
+	fi
+	if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
+		# for CI use a predictable random seed
+		_test_args="--random-seed=0 $_test_args"
+	fi
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args="--long $_test_args"
+	else
+		_test_args="--warn-long 5.0 $_test_args"
+	fi
+	/usr/bin/sage* -tp ${XBPS_MAKEJOBS} ${_test_args}
+}
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch
new file mode 100644
index 000000000000..04fa2acbf3ec
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch
@@ -0,0 +1,11 @@
+--- a/src/sage/tests/cmdline.py
++++ b/src/sage/tests/cmdline.py
+@@ -488,7 +488,7 @@ def test_executable(args, input="", timeout=100.0, pydebug_ignore_warnings=False
+         0
+ 
+         sage: (out, err, ret) = test_executable(["sage", "--cython"])
+-        sage: print(err)
++        sage: print(err)  # not tested - broken when shebang is rewritten
+         Cython (http://cython.org) is a compiler for code written in the
+         Cython language.  Cython is based on Pyrex by Greg Ewing.
+         ...

From 0bdbdb1787e5c102fbc0704352d3552821dd8202 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 11:34:23 -0300
Subject: [PATCH 33/63] sagemath: cleanup and one patch

---
 .../zzz-skip_doctest_sage_setup_find.patch    | 12 ++++++++
 srcpkgs/sagemath/template                     | 30 ++++---------------
 2 files changed, 18 insertions(+), 24 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch

diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch
new file mode 100644
index 000000000000..15aed02f9aaa
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch
@@ -0,0 +1,12 @@
+--- a/src/sage_setup/find.py
++++ b/src/sage_setup/find.py
+@@ -301,7 +301,7 @@ def find_extra_files(src_dir, modules, cythonized_dir, special_filenames=[]):
+         sage: extras["sage/libs/mpfr"]
+         [...sage/libs/mpfr/types.pxd...]
+         sage: extras["sage/ext/interpreters"]
+-        ['.../src/sage/ext/interpreters/wrapper_cdf.pxd', ...wrapper_cdf.h...]
++        ['.../src/sage/ext/interpreters/wrapper_cdf.pxd', ...]
+     """
+     from Cython.Utils import is_package_dir
+ 
+--
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 0d8ce1f7a70a..f25cb745c9c4 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -4,7 +4,8 @@ version=9.5.rc0
 revision=1
 wrksrc=sage-$version
 build_style=configure
-configure_args="--enable-build-as-root"
+configure_args="--enable-build-as-root --with-system-python3
+ --enable-system-site-packages"
 make_check_target=ptest
 # for now skip building docs
 make_build_target=build
@@ -22,13 +23,8 @@ distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
 checksum=8012e3ac35290fa9b2cb837eeca149925784c2378b486731226944e4afd8a4e6
 python_version=3
 
-build_options="debug system_python3 system_site_packages"
+build_options="debug"
 desc_option_debug="Build with debug symbols"
-desc_option_system_python="Build using system python 3"
-desc_option_system_python="Build using system python site-packages"
-build_options_default="system_python3 system_site_packages"
-configure_args+=" $(vopt_with system_python3)"
-configure_args+=" $(vopt_enable system_site_packages)"
 
 # path where sage will be installed
 _SAGE_ROOT=/usr/lib/sage-${version}
@@ -112,9 +108,6 @@ for u in ${_upstream}; do
 	skip_extraction+=" ${u##*[/>]}"
 done
 
-# 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
@@ -165,16 +158,6 @@ post_configure() {
 	EOF
 }
 
-# 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() {
 	vlicense COPYING.txt
 	vdoc README.md
@@ -301,7 +284,6 @@ _sage_python3_modules="
  python3-wheel python3-zipp pythran
  "
 
-if [ "$build_option_system_site_packages" ]; then
-	makedepends+=" $_sage_python3_modules"
-	depends+=" $_sage_python3_modules"
-fi
+# python packages are build and runtime dependencies
+makedepends+=" $_sage_python3_modules"
+depends+=" $_sage_python3_modules"

From 27ec15d3f6d3574e7344677e37d681fe92021fdd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 11:34:32 -0300
Subject: [PATCH 34/63] sagemath: update to 9.5.rc1.

---
 srcpkgs/sagemath/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f25cb745c9c4..f5d9d0f0fabd 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -1,6 +1,6 @@
 # Template file for 'sagemath'
 pkgname=sagemath
-version=9.5.rc0
+version=9.5.rc1
 revision=1
 wrksrc=sage-$version
 build_style=configure
@@ -20,7 +20,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
-checksum=8012e3ac35290fa9b2cb837eeca149925784c2378b486731226944e4afd8a4e6
+checksum=b015c54f7411669ef70bac2b2fde260e7f45724bcff170957b1f9fd08131f2c3
 python_version=3
 
 build_options="debug"

From ea41077edf87970f6ae8d9d62231f8d2362c9100 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 14:53:11 -0300
Subject: [PATCH 35/63] sagemath: patch not needed with singular 4.3.0

---
 ...zzz-skip_doctest_singular_4.2.1--see_33134.patch | 13 -------------
 1 file changed, 13 deletions(-)
 delete mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch

diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
deleted file mode 100644
index 438078a92036..000000000000
--- a/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/src/sage/rings/polynomial/hilbert.pyx b/src/sage/rings/polynomial/hilbert.pyx
-index 4cd91d0a46..323b168c4e 100644
---- a/src/sage/rings/polynomial/hilbert.pyx
-+++ b/src/sage/rings/polynomial/hilbert.pyx
-@@ -578,7 +578,7 @@ def hilbert_poincare_series(I, grading=None):
- 
-     This example exceeded the capabilities of Singular before version 4.2.1p2::
- 
--        sage: J.hilbert_numerator(algorithm='singular')
-+        sage: J.hilbert_numerator(algorithm='singular')   # not tested - requires singular 4.2.1p2
-         120*t^33 - 3465*t^32 + 48180*t^31 - 429374*t^30 + 2753520*t^29 - 13522410*t^28 + 52832780*t^27 - 168384150*t^26 + 445188744*t^25 - 987193350*t^24 + 1847488500*t^23 + 1372406746*t^22 - 403422496*t^21 - 8403314*t^20 - 471656596*t^19 + 1806623746*t^18 + 752776200*t^17 + 752776200*t^16 - 1580830020*t^15 + 1673936550*t^14 - 1294246800*t^13 + 786893250*t^12 - 382391100*t^11 + 146679390*t^10 - 42299400*t^9 + 7837830*t^8 - 172260*t^7 - 468930*t^6 + 183744*t^5 - 39270*t^4 + 5060*t^3 - 330*t^2 + 1
- 
-     """

From 8143ee82f5b3ee1140f279b73bc3fd3a2de8d16c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 14:53:25 -0300
Subject: [PATCH 36/63] sagemath: install /usr/bin/sage

---
 srcpkgs/sagemath/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f5d9d0f0fabd..49821fc982e4 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -181,7 +181,8 @@ do_install() {
 	vmkdir 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}
+	ln -sfT $_SAGE_ROOT/sage ${DESTDIR}/usr/bin/sage-${version}
+	ln -sfT sage-${version} ${DESTDIR}/usr/bin/sage
 }
 
 do_check() {

From 7ec27d7d6067abc9d832f456f81f3b53521efc9f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 16:31:25 -0300
Subject: [PATCH 37/63] New package: python3-cvxopt-1.2.7

---
 srcpkgs/python3-cvxopt/template | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 srcpkgs/python3-cvxopt/template

diff --git a/srcpkgs/python3-cvxopt/template b/srcpkgs/python3-cvxopt/template
new file mode 100644
index 000000000000..0fb769b294e0
--- /dev/null
+++ b/srcpkgs/python3-cvxopt/template
@@ -0,0 +1,20 @@
+# Template file for 'python3-cvxopt'
+pkgname=python3-cvxopt
+version=1.2.7
+revision=1
+wrksrc="cvxopt-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools"
+makedepends="python3-devel blas-devel lapack-devel SuiteSparse-devel gsl-devel glpk-devel"
+checkdepends="python3-pytest"
+short_desc="Python software for convex optimization"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-3.0-or-later"
+homepage="http://cvxopt.org/"
+distfiles="${PYPI_SITE}/c/cvxopt/cvxopt-${version}.tar.gz"
+checksum=3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
+
+pre_build() {
+	export CVXOPT_BUILD_GSL=1
+	export CVXOPT_BUILD_GLPK=1
+}

From 49769070effce73cb5c324ab444147fc181b12db Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 23:37:14 -0300
Subject: [PATCH 38/63] sagemath: rearrange upstream packages and indent

This doesn't change anything, it separates _upstream and
checksum in three blocks to make it easier to edit.
---
 srcpkgs/sagemath/template | 140 ++++++++++++++++++++------------------
 1 file changed, 74 insertions(+), 66 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 49821fc982e4..4317f1e80893 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -31,76 +31,84 @@ _SAGE_ROOT=/usr/lib/sage-${version}
 
 _SAGE_UPSTREAM_MIRROR=https://mirrors.mit.edu/sage/spkg/upstream
 
+# packages were sage is the upstream
 _upstream="
-${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
-
-${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
-${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
-${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
-${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
-${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
-${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
-${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
-${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
-${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
-${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
-${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
-${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
-${PYPI_SITE}/P/PyCygwin/PyCygwin-0.1.tar.gz
-${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
-${PYPI_SITE}/s/setuptools/setuptools-59.2.0.tar.gz
-${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
-${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
-${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
-
-https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
-http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
-https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
-https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
+ ${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
+ ${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
+ ${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
+"
+checksum+="
+ c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
+ d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
+ 5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
+ ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
+ 169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
+ cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
+ edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+ b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
+ cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
 "
 
+# packages from pypi (python modules)
+_upstream+="
+ ${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
+ ${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
+ ${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
+ ${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
+ ${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
+ ${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
+ ${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
+ ${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
+ ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
+ ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
+ ${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
+ ${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
+ ${PYPI_SITE}/P/PyCygwin/PyCygwin-0.1.tar.gz
+ ${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
+ ${PYPI_SITE}/s/setuptools/setuptools-59.2.0.tar.gz
+ ${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
+ ${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
+ ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
+"
+checksum+="
+ dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
+ 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
+ 3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
+ 03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
+ 5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
+ cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
+ 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+ a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
+ d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
+ 5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
+ 471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
+ 78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
+ 45a5e295590c469a49b2804bfdb89059e942d768ad3b813f484d7b5bff48d226
+ ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
+ 157d21de9d055ab9e8ea3186d91e7f4f865e11f42deafa952d90842671fc2576
+ 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
+ 545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
+ dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
+"
+
+# other upstream packages
+_upstream+="
+ https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
+ http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
+ https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+ https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
+"
 checksum+="
-c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
-d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
-5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
-ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
-169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
-cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
-edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
-b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
-cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
-
-dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
-4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
-3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
-03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
-5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
-cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
-581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
-a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
-d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
-5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
-471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
-78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
-45a5e295590c469a49b2804bfdb89059e942d768ad3b813f484d7b5bff48d226
-ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
-157d21de9d055ab9e8ea3186d91e7f4f865e11f42deafa952d90842671fc2576
-6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
-545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
-dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
-
-c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
-07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
-3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
-718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
+ c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
+ 07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
+ 3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+ 718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
 "
 
 for u in ${_upstream}; do

From be5f0c86cb081d87d6658b5b7b39030268711088 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 23:37:58 -0300
Subject: [PATCH 39/63] sagemath: use system cvxopt and importlib_resources

---
 srcpkgs/sagemath/template | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 4317f1e80893..5eb70a6267bb 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -59,12 +59,10 @@ checksum+="
 _upstream+="
  ${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
  ${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
- ${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
  ${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
  ${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
  ${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
  ${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
- ${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
  ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
  ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
  ${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
@@ -79,12 +77,10 @@ _upstream+="
 checksum+="
  dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
  4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
- 3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
  03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
  5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
  cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
  581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
- a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
  d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
  5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
  471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
@@ -257,9 +253,6 @@ makedepends+="
 # TODO: optional
 # 4ti2 coxeter3 libsemigroups lrslib pdf2svg perl_mongodb polymake
 
-# TODO: standard
-# cvxopt importlib_resources
-
 # python packages for trac-29665
 _sage_python3_modules="
  python3-Babel python3-Jinja2 python3-MarkupSafe python3-Pillow
@@ -291,6 +284,8 @@ _sage_python3_modules="
  python3-tornado python3-traitlets python3-typing_extensions
  python3-tzlocal python3-urllib3 python3-wcwidth python3-webencodings
  python3-wheel python3-zipp pythran
+
+ python3-cvxopt python3-importlib_resources
  "
 
 # python packages are build and runtime dependencies

From f0af0898ca3a490cfc245f49e928470302c16c27 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 01:48:08 -0300
Subject: [PATCH 40/63] sagemath-test: fix sage binary (now is just 'sage')

---
 srcpkgs/sagemath-test/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/sagemath-test/template b/srcpkgs/sagemath-test/template
index 3e0b1c3233fd..1c0d71683a1b 100644
--- a/srcpkgs/sagemath-test/template
+++ b/srcpkgs/sagemath-test/template
@@ -28,5 +28,5 @@ do_check() {
 	else
 		_test_args="--warn-long 5.0 $_test_args"
 	fi
-	/usr/bin/sage* -tp ${XBPS_MAKEJOBS} ${_test_args}
+	sage -tp ${XBPS_MAKEJOBS} ${_test_args}
 }

From 95eaa2c36333b09eba6dc377ba4a86a2b3ee78a5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 10:49:04 -0300
Subject: [PATCH 41/63] sagemath: disallow fuzz in patches

---
 ...49c415e11d0522bff9013bc1509264b26ebf.patch | 27 -------------------
 srcpkgs/sagemath/template                     |  1 +
 2 files changed, 1 insertion(+), 27 deletions(-)
 delete mode 100644 srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch

diff --git a/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch b/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
deleted file mode 100644
index d32f1e4d5e9f..000000000000
--- a/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 836249c415e11d0522bff9013bc1509264b26ebf Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
-Date: Sun, 9 Jan 2022 16:51:22 -0300
-Subject: trac 33135: add filter to ignore deprecation warnings
-
----
- src/sage/all.py | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/src/sage/all.py b/src/sage/all.py
-index 01ef327..19ca3d4 100644
---- a/src/sage/all.py
-+++ b/src/sage/all.py
-@@ -96,6 +96,10 @@ warnings.filterwarnings('ignore', category=DeprecationWarning,
- warnings.filterwarnings('ignore', category=DeprecationWarning,
-                         module='pythran')
- 
-+warnings.filterwarnings('ignore', category=DeprecationWarning,
-+                        message='The distutils(.sysconfig module| package) is deprecated',
-+                        module='numpy|sage.env|sage.features')
-+
- ################ end setup warnings ###############################
- 
- 
--- 
-cgit v1.0-1-gd88e
-
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 5eb70a6267bb..e5a728b2217d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -22,6 +22,7 @@ homepage="http://sagemath.org/"
 distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
 checksum=b015c54f7411669ef70bac2b2fde260e7f45724bcff170957b1f9fd08131f2c3
 python_version=3
+patch_args="-F0 -Np1"
 
 build_options="debug"
 desc_option_debug="Build with debug symbols"

From 1d307a5b46f8a852536aad4fbec2b77085e56184 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 13:27:53 -0300
Subject: [PATCH 42/63] sagemath: disable packages that are not needed

 - appnope: only needed for macos
 - fonttools: only needed to build matplotlib
 - importlib_resources: only needed for old python
 - pycygwin: only needed for cygwin
 - setuptools_scm_git_archive: only needed to build matplotlib
 - setuptools_wheel: not needed
 - sphinxcontrib_websupport: only needed to build sphinx
 - cppy: force use from system python3-cppy
---
 srcpkgs/sagemath/template | 51 +++++++++++++++++++++++++++------------
 1 file changed, 35 insertions(+), 16 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index e5a728b2217d..f15bfbf76e0a 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -58,39 +58,29 @@ checksum+="
 
 # packages from pypi (python modules)
 _upstream+="
- ${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
- ${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
  ${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
  ${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
  ${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
- ${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
+
  ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
  ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
  ${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
  ${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
- ${PYPI_SITE}/P/PyCygwin/PyCygwin-0.1.tar.gz
+
  ${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
- ${PYPI_SITE}/s/setuptools/setuptools-59.2.0.tar.gz
- ${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
- ${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
  ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
 "
 checksum+="
- dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
- 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
  03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
  5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
  cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
- 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+
  d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
  5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
  471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
  78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
- 45a5e295590c469a49b2804bfdb89059e942d768ad3b813f484d7b5bff48d226
+
  ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
- 157d21de9d055ab9e8ea3186d91e7f4f865e11f42deafa952d90842671fc2576
- 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
- 545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
  dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
 "
 
@@ -108,6 +98,22 @@ checksum+="
  718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
 "
 
+# these packages are not needed, don't install
+_dontinstall="
+ appnope
+ fonttools
+ importlib_resources
+ pycygwin
+ setuptools_scm_git_archive
+ setuptools_wheel
+ sphinxcontrib_websupport
+"
+
+# these packages can be used from system
+_usefromsystem="
+ cppy
+"
+
 for u in ${_upstream}; do
 	distfiles+=" $u"
 	skip_extraction+=" ${u##*[/>]}"
@@ -145,8 +151,20 @@ do_clean() {
 	rm -rf $wrksrc $_SAGE_ROOT
 }
 
-pre_configure() {
+post_patch() {
 	./bootstrap
+}
+
+pre_configure() {
+	for spkg in $_dontinstall; do
+		configure_args+=" sage_spkg_install_$spkg=no"
+		configure_args+=" sage_require_$spkg=no"
+	done
+
+	for spkg in $_usefromsystem; do
+		configure_args+=" sage_spkg_install_$spkg=no"
+		configure_args+=" sage_require_$spkg=yes"
+	done
 
 	if [ "$build_option_debug" ]; then
 		export SAGE_DEBUG=yes
@@ -286,7 +304,8 @@ _sage_python3_modules="
  python3-tzlocal python3-urllib3 python3-wcwidth python3-webencodings
  python3-wheel python3-zipp pythran
 
- python3-cvxopt python3-importlib_resources
+ python3-cvxopt
+ python3-cppy
  "
 
 # python packages are build and runtime dependencies

From fec4d063e2ed623777b2ce3f558b5fcd839dc185 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 17:32:39 -0300
Subject: [PATCH 43/63] New package: python3-cysignals-1.11.2

---
 .../python3-cysignals/patches/fix-write.patch | 46 +++++++++++++++++++
 srcpkgs/python3-cysignals/template            | 19 ++++++++
 2 files changed, 65 insertions(+)
 create mode 100644 srcpkgs/python3-cysignals/patches/fix-write.patch
 create mode 100644 srcpkgs/python3-cysignals/template

diff --git a/srcpkgs/python3-cysignals/patches/fix-write.patch b/srcpkgs/python3-cysignals/patches/fix-write.patch
new file mode 100644
index 000000000000..18206bd808d7
--- /dev/null
+++ b/srcpkgs/python3-cysignals/patches/fix-write.patch
@@ -0,0 +1,46 @@
+Fix a doctest failure which triggers in i686.
+
+The example is in the function `test_bad_str()` in the file `tests.pyx`.
+The test pases a bad string to `sig_str()` and then raises `SIGILL`. The
+signal handler eventually raises a Python exception which in turn raises
+a `SIGSEGV` when accessing the bad string. An error message is expected,
+but that doesn't happen.
+
+Presumably the segfault happens inside some stdio function which leaves
+stdio buffers in an inconsistent state so the latter `fprintf` doesn't
+work properly. From signal-safety(7):
+
+    Suppose that the main program is in the middle of a call to a
+    stdio function such as printf(3) where the buffer and associated
+    variables have been partially updated.  If, at that moment, the
+    program is interrupted by a signal handler that also calls
+    printf(3), then the second call to printf(3) will operate on
+    inconsistent data, with unpredictable results.
+
+We fix this by replacing the `fprintf` by calls to `write`, which is
+async-signal-safe according to POSIX.
+
+--- a/src/cysignals/implementation.c      2022-01-16 22:36:45.143796872 +0000
++++ b/src/cysignals/implementation.c      2022-01-17 02:22:31.196695043 +0000
+@@ -638,12 +622,15 @@
+ #endif
+ 
+     if (s) {
++        /* Using fprintf from inside a signal handler is undefined, see signal-safety(7) */
++        const char * message =
++            "\n"
++            "This probably occurred because a *compiled* module has a bug\n"
++            "in it and is not properly wrapped with sig_on(), sig_off().\n"
++            "Python will now terminate.\n"
++            "------------------------------------------------------------------------\n";
++        write(2, s, strlen(s));
++        write(2, message, strlen(message));
+-        fprintf(stderr,
+-            "%s\n"
+-            "This probably occurred because a *compiled* module has a bug\n"
+-            "in it and is not properly wrapped with sig_on(), sig_off().\n"
+-            "Python will now terminate.\n", s);
+-        print_sep();
+     }
+ 
+ dienow:
diff --git a/srcpkgs/python3-cysignals/template b/srcpkgs/python3-cysignals/template
new file mode 100644
index 000000000000..4655eead2a9c
--- /dev/null
+++ b/srcpkgs/python3-cysignals/template
@@ -0,0 +1,19 @@
+# Template file for 'python3-cysignals'
+pkgname=python3-cysignals
+version=1.11.2
+revision=1
+wrksrc="cysignals-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools python3-Cython autoconf"
+makedepends="python3-devel pari-devel"
+short_desc="Interrupt and signal handling for Cython "
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/sagemath/cysignals"
+distfiles="${PYPI_SITE}/c/cysignals/cysignals-${version}.tar.gz"
+checksum=5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
+nocross=yes # runs binaries built for target
+
+do_check() {
+	make check
+}

From 97f4e3be91bd4f30a89db3bb6887dc0846cd9e91 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 18:28:55 -0300
Subject: [PATCH 44/63] New package: python3-cypari2-2.1.2

---
 srcpkgs/python3-cypari2/template | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 srcpkgs/python3-cypari2/template

diff --git a/srcpkgs/python3-cypari2/template b/srcpkgs/python3-cypari2/template
new file mode 100644
index 000000000000..18755ec020b4
--- /dev/null
+++ b/srcpkgs/python3-cypari2/template
@@ -0,0 +1,19 @@
+# Template file for 'python3-cypari2'
+pkgname=python3-cypari2
+version=2.1.2
+revision=1
+wrksrc=cypari2-${version}
+build_style=python3-module
+hostmakedepends="python3-setuptools python3-Cython pari perl"
+makedepends="python3-devel python3-cysignals pari-devel gmp-devel"
+short_desc="Python interface to the number theory library PARI/GP"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-2.0-or-later"
+homepage="https://github.com/sagemath/cypari2"
+distfiles="${PYPI_SITE}/c/cypari2/cypari2-${version}.tar.gz"
+checksum=03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
+
+do_check() {
+	PYTHONPATH="$(cd build/lib* && pwd)" \
+		make check
+}

From dca176d202e0adbac1c0cca79e8919acfb53bcb8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 18:56:29 -0300
Subject: [PATCH 45/63] New package: python3-pplpy-0.8.7

---
 srcpkgs/python3-pplpy/template | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 srcpkgs/python3-pplpy/template

diff --git a/srcpkgs/python3-pplpy/template b/srcpkgs/python3-pplpy/template
new file mode 100644
index 000000000000..1cb69ffe6a07
--- /dev/null
+++ b/srcpkgs/python3-pplpy/template
@@ -0,0 +1,21 @@
+# Template file for 'python3-pplpy'
+pkgname=python3-pplpy
+version=0.8.7
+revision=1
+wrksrc="pplpy-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools python3-Cython"
+makedepends="python3-cysignals python3-gmpy2 python3-devel gmp-devel
+ gmpxx-devel ppl-devel mpfr-devel libmpc-devel pari-devel"
+short_desc="Python wrapper to the C++ Parma Polyhedra Library (PPL)"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-3.0-or-later"
+homepage="https://gitlab.com/videlec/pplpy"
+changelog="https://gitlab.com/videlec/pplpy/-/raw/master/CHANGES.txt"
+distfiles="${PYPI_SITE}/p/pplpy/pplpy-${version}.tar.gz"
+checksum=500bd0f4ae1a76956fae7fcba77854f5ec3e64fce76803664983763c3f2bd8bd
+
+do_check() {
+	PYTHONPATH=$(cd build/lib* && pwd) \
+		python setup.py test
+}

From 80c9b9342d5a6e496f9ac5419b670926ff84a310 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 01:14:24 -0300
Subject: [PATCH 46/63] New package: python3-fpylll-0.5.6

---
 srcpkgs/python3-fpylll/template | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 srcpkgs/python3-fpylll/template

diff --git a/srcpkgs/python3-fpylll/template b/srcpkgs/python3-fpylll/template
new file mode 100644
index 000000000000..dd2adcee6fce
--- /dev/null
+++ b/srcpkgs/python3-fpylll/template
@@ -0,0 +1,25 @@
+# Template file for 'python3-fpylll'
+pkgname=python3-fpylll
+version=0.5.6
+revision=1
+wrksrc="fpylll-${version}"
+build_style=python3-module
+hostmakedepends="python3-Cython"
+makedepends="python3-cysignals python3-devel gmp-devel mpfr-devel fplll-devel
+ pari-devel"
+checkdepends="python3-pytest python3-numpy"
+short_desc="Python wrapper to fplll (floating point lattice algorithms)"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-2.0-or-later"
+homepage="https://github.com/fplll/fpylll"
+distfiles="${PYPI_SITE}/f/fpylll/fpylll-${version}.tar.gz"
+checksum=6eb8a63fb933c0bf92f290dd66fd884807659214d0ce524afe3687a6a6b13a8b
+
+case $XBPS_TARGET_MACHINE in
+	# skip a test with numerical noise on 32 bit
+	i686*) make_check_args="-k not(averaged_simulate_prob)" ;;
+esac
+
+pre_check() {
+	export PY_IGNORE_IMPORTMISMATCH=1
+}

From 09fd6926bdea64c140a2356f156bf074a8d13f4b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 18:32:13 -0300
Subject: [PATCH 47/63] sagemath: use system Cython, cysignals, cypari2, pplpy,
 fpylll

---
 srcpkgs/sagemath/template | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f15bfbf76e0a..ba22ffbeaf30 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -58,26 +58,18 @@ checksum+="
 
 # packages from pypi (python modules)
 _upstream+="
- ${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
- ${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
- ${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
 
  ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
  ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
- ${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
  ${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
 
  ${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
  ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
 "
 checksum+="
- 03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
- 5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
- cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
 
  d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
  5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
- 471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
  78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
 
  ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
@@ -86,13 +78,11 @@ checksum+="
 
 # other upstream packages
 _upstream+="
- https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
  http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
  https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
  https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
 "
 checksum+="
- c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
  07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
  3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
  718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
@@ -107,11 +97,17 @@ _dontinstall="
  setuptools_scm_git_archive
  setuptools_wheel
  sphinxcontrib_websupport
+ pplpy_doc
 "
 
 # these packages can be used from system
 _usefromsystem="
  cppy
+ cython
+ cysignals
+ cypari
+ pplpy
+ fpylll
 "
 
 for u in ${_upstream}; do
@@ -306,6 +302,11 @@ _sage_python3_modules="
 
  python3-cvxopt
  python3-cppy
+ python3-Cython
+ python3-cysignals
+ python3-cypari2
+ python3-pplpy
+ python3-fpylll
  "
 
 # python packages are build and runtime dependencies

From d27012d85b95ae364f7833ce8adab7c1c80857a2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 01:15:55 -0300
Subject: [PATCH 48/63] sagemath: update to 9.5.rc2.

---
 srcpkgs/sagemath/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index ba22ffbeaf30..b9bd590b61ca 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -1,6 +1,6 @@
 # Template file for 'sagemath'
 pkgname=sagemath
-version=9.5.rc1
+version=9.5.rc2
 revision=1
 wrksrc=sage-$version
 build_style=configure
@@ -20,7 +20,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
-checksum=b015c54f7411669ef70bac2b2fde260e7f45724bcff170957b1f9fd08131f2c3
+checksum=c7eba867c11ab1b6d04535dd8df54640d3de0625ad96cdac17b17af977d96dce
 python_version=3
 patch_args="-F0 -Np1"
 

From 41ec1da54bb68d1ba49a48c0b46b0020611460b6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 09:52:14 -0300
Subject: [PATCH 49/63] sagemath: add timing information for doctests

This makes doctesting faster on many threads
---
 srcpkgs/sagemath-test/files/timings2.json |   1 +
 srcpkgs/sagemath-test/template            |  22 +-
 srcpkgs/sagemath/files/timings2.json      | 255 ++++++++++++++++++++++
 srcpkgs/sagemath/template                 |  21 +-
 4 files changed, 279 insertions(+), 20 deletions(-)
 create mode 120000 srcpkgs/sagemath-test/files/timings2.json
 create mode 100644 srcpkgs/sagemath/files/timings2.json

diff --git a/srcpkgs/sagemath-test/files/timings2.json b/srcpkgs/sagemath-test/files/timings2.json
new file mode 120000
index 000000000000..25d5309fc818
--- /dev/null
+++ b/srcpkgs/sagemath-test/files/timings2.json
@@ -0,0 +1 @@
+../../sagemath/files/timings2.json
\ No newline at end of file
diff --git a/srcpkgs/sagemath-test/template b/srcpkgs/sagemath-test/template
index 1c0d71683a1b..e3b1242bd338 100644
--- a/srcpkgs/sagemath-test/template
+++ b/srcpkgs/sagemath-test/template
@@ -14,19 +14,21 @@ homepage="none"
 
 do_check() {
 	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
-		_test_args=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+		_test_files=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	else
+		_test_files=--all
 	fi
-	if [ -z "$_test_args" ]; then
-		_test_args=--all
+	cp ${FILESDIR}/timings2.json .
+	_test_args="--stats_path=timings2.json"
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args+=" --long --warn-long 20.0"
+	else
+		_test_args+=" --warn-long 10.0"
 	fi
 	if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
 		# for CI use a predictable random seed
-		_test_args="--random-seed=0 $_test_args"
-	fi
-	if [ "$XBPS_CHECK_PKGS" = full ]; then
-		_test_args="--long $_test_args"
-	else
-		_test_args="--warn-long 5.0 $_test_args"
+		_test_args+=" --random-seed=0"
 	fi
-	sage -tp ${XBPS_MAKEJOBS} ${_test_args}
+	# since make check will build the docs, run test like this instead
+	sage -tp ${XBPS_MAKEJOBS} ${_test_args} ${_test_files}
 }
diff --git a/srcpkgs/sagemath/files/timings2.json b/srcpkgs/sagemath/files/timings2.json
new file mode 100644
index 000000000000..958a56d9d6f5
--- /dev/null
+++ b/srcpkgs/sagemath/files/timings2.json
@@ -0,0 +1,255 @@
+{
+  "doc.en.constructions.calculus": {"walltime": 64},
+  "doc.en.constructions.plotting": {"walltime": 28},
+  "doc.en.prep.Advanced-2DPlotting": {"walltime": 13},
+  "doc.en.thematic_tutorials.geometry.polyhedra_tutorial": {"walltime": 12},
+  "doc.en.thematic_tutorials.sandpile": {"walltime": 15},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_advanced": {"walltime": 31},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_cartesian": {"walltime": 36},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_change": {"walltime": 28},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_curvilinear": {"walltime": 35},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_plane": {"walltime": 18},
+  "sage.algebras.commutative_dga": {"walltime": 13},
+  "sage.algebras.lie_algebras.classical_lie_algebra": {"walltime": 121},
+  "sage.algebras.lie_algebras.nilpotent_lie_algebra": {"walltime": 13},
+  "sage.algebras.quantum_clifford": {"walltime": 13},
+  "sage.algebras.quatalg.quaternion_algebra": {"walltime": 10},
+  "sage.algebras.steenrod.steenrod_algebra": {"walltime": 51},
+  "sage.arith.misc": {"walltime": 24},
+  "sage.calculus.calculus": {"walltime": 16},
+  "sage.calculus.functional": {"walltime": 12},
+  "sage.calculus.riemann": {"walltime": 49},
+  "sage.calculus.tests": {"walltime": 15},
+  "sage.calculus.transforms.dwt": {"walltime": 25},
+  "sage.categories.finite_monoids": {"walltime": 13},
+  "sage.categories.super_hopf_algebras_with_basis": {"walltime": 27},
+  "sage.coding.ag_code": {"walltime": 48},
+  "sage.coding.ag_code_decoders": {"walltime": 187},
+  "sage.coding.linear_code": {"walltime": 19},
+  "sage.combinat.backtrack": {"walltime": 30},
+  "sage.combinat.chas.wqsym": {"walltime": 42},
+  "sage.combinat.cluster_algebra_quiver.cluster_seed": {"walltime": 60},
+  "sage.combinat.cluster_algebra_quiver.quiver": {"walltime": 169},
+  "sage.combinat.crystals.affine_factorization": {"walltime": 13},
+  "sage.combinat.crystals.alcove_path": {"walltime": 37},
+  "sage.combinat.crystals.kirillov_reshetikhin": {"walltime": 16},
+  "sage.combinat.crystals.littelmann_path": {"walltime": 13},
+  "sage.combinat.crystals.mv_polytopes": {"walltime": 20},
+  "sage.combinat.crystals.pbw_crystal": {"walltime": 21},
+  "sage.combinat.designs.database": {"walltime": 21},
+  "sage.combinat.designs.gen_quadrangles_with_spread": {"walltime": 114},
+  "sage.combinat.designs.orthogonal_arrays_build_recursive": {"walltime": 12},
+  "sage.combinat.diagram_algebras": {"walltime": 49},
+  "sage.combinat.fqsym": {"walltime": 22},
+  "sage.combinat.k_tableau": {"walltime": 14},
+  "sage.combinat.ncsf_qsym.ncsf": {"walltime": 14},
+  "sage.combinat.ncsf_qsym.qsym": {"walltime": 12},
+  "sage.combinat.partition": {"walltime": 11},
+  "sage.combinat.partition_kleshchev": {"walltime": 19},
+  "sage.combinat.posets.moebius_algebra": {"walltime": 12},
+  "sage.combinat.rigged_configurations.kr_tableaux": {"walltime": 28},
+  "sage.combinat.rigged_configurations.rigged_configurations": {"walltime": 13},
+  "sage.combinat.rigged_configurations.tensor_product_kr_tableaux": {"walltime": 15},
+  "sage.combinat.root_system.integrable_representations": {"walltime": 12},
+  "sage.combinat.root_system.non_symmetric_macdonald_polynomials": {"walltime": 21},
+  "sage.combinat.root_system.plot": {"walltime": 37},
+  "sage.combinat.root_system.root_lattice_realization_algebras": {"walltime": 17},
+  "sage.combinat.root_system.root_lattice_realizations": {"walltime": 24},
+  "sage.combinat.rsk": {"walltime": 36},
+  "sage.combinat.sf.classical": {"walltime": 11},
+  "sage.combinat.sf.k_dual": {"walltime": 13},
+  "sage.combinat.sf.llt": {"walltime": 13},
+  "sage.combinat.sf.macdonald": {"walltime": 58},
+  "sage.combinat.sf.sfa": {"walltime": 25},
+  "sage.combinat.shifted_primed_tableau": {"walltime": 14},
+  "sage.combinat.symmetric_group_algebra": {"walltime": 11},
+  "sage.combinat.tableau": {"walltime": 20},
+  "sage.combinat.tableau_tuple": {"walltime": 29},
+  "sage.combinat.tiling": {"walltime": 305},
+  "sage.combinat.tutorial": {"walltime": 13},
+  "sage.combinat.words.paths": {"walltime": 85},
+  "sage.crypto.block_cipher.des": {"walltime": 21},
+  "sage.crypto.mq.sr": {"walltime": 53},
+  "sage.crypto.sbox": {"walltime": 14},
+  "sage.doctest.forker": {"walltime": 14},
+  "sage.doctest.sources": {"walltime": 93},
+  "sage.doctest.test": {"walltime": 149},
+  "sage.dynamics.arithmetic_dynamics.projective_ds": {"walltime": 48},
+  "sage.dynamics.complex_dynamics.mandel_julia": {"walltime": 16},
+  "sage.functions.bessel": {"walltime": 14},
+  "sage.functions.exp_integral": {"walltime": 12},
+  "sage.functions.other": {"walltime": 15},
+  "sage.geometry.cone": {"walltime": 24},
+  "sage.geometry.hyperplane_arrangement.arrangement": {"walltime": 14},
+  "sage.geometry.lattice_polytope": {"walltime": 12},
+  "sage.geometry.polyhedral_complex": {"walltime": 11},
+  "sage.geometry.polyhedron.base": {"walltime": 33},
+  "sage.geometry.polyhedron.library": {"walltime": 41},
+  "sage.geometry.riemannian_manifolds.parametrized_surface3d": {"walltime": 22},
+  "sage.geometry.triangulation.base": {"walltime": 22},
+  "sage.geometry.triangulation.point_configuration": {"walltime": 14},
+  "sage.graphs.connectivity": {"walltime": 17},
+  "sage.graphs.generators.basic": {"walltime": 10},
+  "sage.graphs.generators.classical_geometries": {"walltime": 30},
+  "sage.graphs.generators.distance_regular": {"walltime": 196},
+  "sage.graphs.generators.families": {"walltime": 21},
+  "sage.graphs.generators.smallgraphs": {"walltime": 22},
+  "sage.graphs.generic_graph": {"walltime": 29},
+  "sage.graphs.genus": {"walltime": 12},
+  "sage.graphs.graph": {"walltime": 20},
+  "sage.graphs.strongly_regular_db": {"walltime": 22},
+  "sage.groups.cubic_braid": {"walltime": 19},
+  "sage.groups.fqf_orthogonal": {"walltime": 19},
+  "sage.groups.lie_gps.nilpotent_lie_group": {"walltime": 10},
+  "sage.groups.matrix_gps.heisenberg": {"walltime": 41},
+  "sage.groups.perm_gps.cubegroup": {"walltime": 11},
+  "sage.homology.homology_vector_space_with_basis": {"walltime": 10},
+  "sage.interacts.test_jupyter": {"walltime": 17},
+  "sage.interfaces.gap": {"walltime": 11},
+  "sage.interfaces.maxima_abstract": {"walltime": 46},
+  "sage.libs.eclib.interface": {"walltime": 22},
+  "sage.libs.eclib.mwrank": {"walltime": 16},
+  "sage.libs.gap.test_long": {"walltime": 43},
+  "sage.libs.giac": {"walltime": 42},
+  "sage.manifolds.chart": {"walltime": 34},
+  "sage.manifolds.differentiable.affine_connection": {"walltime": 138},
+  "sage.manifolds.differentiable.automorphismfield": {"walltime": 33},
+  "sage.manifolds.differentiable.characteristic_cohomology_class": {"walltime": 260},
+  "sage.manifolds.differentiable.curve": {"walltime": 18},
+  "sage.manifolds.differentiable.degenerate": {"walltime": 27},
+  "sage.manifolds.differentiable.degenerate_submanifold": {"walltime": 239},
+  "sage.manifolds.differentiable.diff_form": {"walltime": 48},
+  "sage.manifolds.differentiable.diff_map": {"walltime": 10},
+  "sage.manifolds.differentiable.examples.euclidean": {"walltime": 48},
+  "sage.manifolds.differentiable.examples.sphere": {"walltime": 33},
+  "sage.manifolds.differentiable.integrated_curve": {"walltime": 29},
+  "sage.manifolds.differentiable.levi_civita_connection": {"walltime": 27},
+  "sage.manifolds.differentiable.manifold": {"walltime": 12},
+  "sage.manifolds.differentiable.manifold_homset": {"walltime": 16},
+  "sage.manifolds.differentiable.metric": {"walltime": 95},
+  "sage.manifolds.differentiable.mixed_form": {"walltime": 14},
+  "sage.manifolds.differentiable.mixed_form_algebra": {"walltime": 11},
+  "sage.manifolds.differentiable.multivectorfield": {"walltime": 71},
+  "sage.manifolds.differentiable.pseudo_riemannian": {"walltime": 20},
+  "sage.manifolds.differentiable.pseudo_riemannian_submanifold": {"walltime": 127},
+  "sage.manifolds.differentiable.scalarfield": {"walltime": 19},
+  "sage.manifolds.differentiable.tangent_vector": {"walltime": 17},
+  "sage.manifolds.differentiable.tensorfield": {"walltime": 128},
+  "sage.manifolds.differentiable.tensorfield_paral": {"walltime": 15},
+  "sage.manifolds.differentiable.vector_bundle": {"walltime": 13},
+  "sage.manifolds.differentiable.vectorfield": {"walltime": 53},
+  "sage.manifolds.point": {"walltime": 21},
+  "sage.manifolds.scalarfield": {"walltime": 15},
+  "sage.manifolds.section": {"walltime": 28},
+  "sage.matrix.matrix2": {"walltime": 18},
+  "sage.matrix.matrix_integer_dense": {"walltime": 15},
+  "sage.matrix.matrix_integer_dense_hnf": {"walltime": 35},
+  "sage.matroids.catalog": {"walltime": 59},
+  "sage.misc.cachefunc": {"walltime": 13},
+  "sage.misc.functional": {"walltime": 10},
+  "sage.misc.randstate": {"walltime": 16},
+  "sage.misc.sagedoc": {"walltime": 56},
+  "sage.misc.sageinspect": {"walltime": 38},
+  "sage.modular.abvar.abvar": {"walltime": 12},
+  "sage.modular.abvar.lseries": {"walltime": 10},
+  "sage.modular.btquotients.pautomorphicform": {"walltime": 31},
+  "sage.modular.hypergeometric_motive": {"walltime": 12},
+  "sage.modular.local_comp.local_comp": {"walltime": 27},
+  "sage.modular.local_comp.type_space": {"walltime": 24},
+  "sage.modular.modform.ambient_R": {"walltime": 11},
+  "sage.modular.modform.cuspidal_submodule": {"walltime": 15},
+  "sage.modular.modform.element": {"walltime": 60},
+  "sage.modular.modform.ring": {"walltime": 50},
+  "sage.modular.modform_hecketriangle.abstract_space": {"walltime": 12},
+  "sage.modular.modform_hecketriangle.graded_ring_element": {"walltime": 23},
+  "sage.modular.modform_hecketriangle.hecke_triangle_group_element": {"walltime": 26},
+  "sage.modular.modform_hecketriangle.readme": {"walltime": 19},
+  "sage.modular.modsym.ambient": {"walltime": 15},
+  "sage.modular.pollack_stevens.modsym": {"walltime": 63},
+  "sage.modular.pollack_stevens.padic_lseries": {"walltime": 36},
+  "sage.modules.finite_submodule_iter": {"walltime": 22},
+  "sage.modules.free_module": {"walltime": 22},
+  "sage.modules.free_module_integer": {"walltime": 28},
+  "sage.modules.torsion_quadratic_module": {"walltime": 22},
+  "sage.plot.animate": {"walltime": 129},
+  "sage.plot.contour_plot": {"walltime": 38},
+  "sage.plot.graphics": {"walltime": 43},
+  "sage.plot.line": {"walltime": 12},
+  "sage.plot.matrix_plot": {"walltime": 15},
+  "sage.plot.multigraphics": {"walltime": 26},
+  "sage.plot.plot": {"walltime": 77},
+  "sage.plot.plot3d.base": {"walltime": 12},
+  "sage.plot.plot3d.implicit_plot3d": {"walltime": 20},
+  "sage.plot.plot3d.parametric_plot3d": {"walltime": 11},
+  "sage.plot.plot3d.plot3d": {"walltime": 18},
+  "sage.plot.plot3d.transform": {"walltime": 34},
+  "sage.quadratic_forms.genera.genus": {"walltime": 19},
+  "sage.quadratic_forms.quadratic_form__local_representation_conditions": {"walltime": 48},
+  "sage.rings.asymptotic.asymptotic_expansion_generators": {"walltime": 61},
+  "sage.rings.asymptotic.asymptotics_multivariate_generating_functions": {"walltime": 36},
+  "sage.rings.function_field.function_field": {"walltime": 225},
+  "sage.rings.function_field.function_field_valuation": {"walltime": 47},
+  "sage.rings.function_field.ideal": {"walltime": 10},
+  "sage.rings.integer": {"walltime": 164},
+  "sage.rings.number_field.number_field": {"walltime": 79},
+  "sage.rings.number_field.number_field_element": {"walltime": 13},
+  "sage.rings.number_field.totallyreal": {"walltime": 14},
+  "sage.rings.padics.padic_base_leaves": {"walltime": 76},
+  "sage.rings.padics.padic_extension_leaves": {"walltime": 46},
+  "sage.rings.padics.padic_generic_element": {"walltime": 14},
+  "sage.rings.padics.padic_lattice_element": {"walltime": 25},
+  "sage.rings.padics.relative_extension_leaves": {"walltime": 42},
+  "sage.rings.polynomial.multi_polynomial_ideal": {"walltime": 11},
+  "sage.rings.polynomial.multi_polynomial_sequence": {"walltime": 28},
+  "sage.rings.polynomial.polynomial_element": {"walltime": 16},
+  "sage.rings.polynomial.polynomial_zmod_flint": {"walltime": 336},
+  "sage.rings.qqbar": {"walltime": 21},
+  "sage.rings.tests": {"walltime": 19},
+  "sage.rings.valuation.augmented_valuation": {"walltime": 28},
+  "sage.rings.valuation.mapped_valuation": {"walltime": 56},
+  "sage.schemes.curves.affine_curve": {"walltime": 23},
+  "sage.schemes.curves.projective_curve": {"walltime": 24},
+  "sage.schemes.cyclic_covers.cycliccover_finite_field": {"walltime": 78},
+  "sage.schemes.elliptic_curves.BSD": {"walltime": 10},
+  "sage.schemes.elliptic_curves.constructor": {"walltime": 27},
+  "sage.schemes.elliptic_curves.ell_curve_isogeny": {"walltime": 21},
+  "sage.schemes.elliptic_curves.ell_egros": {"walltime": 28},
+  "sage.schemes.elliptic_curves.ell_modular_symbols": {"walltime": 12},
+  "sage.schemes.elliptic_curves.ell_number_field": {"walltime": 120},
+  "sage.schemes.elliptic_curves.ell_rational_field": {"walltime": 133},
+  "sage.schemes.elliptic_curves.gal_reps_number_field": {"walltime": 35},
+  "sage.schemes.elliptic_curves.gp_simon": {"walltime": 22},
+  "sage.schemes.elliptic_curves.heegner": {"walltime": 39},
+  "sage.schemes.elliptic_curves.height": {"walltime": 56},
+  "sage.schemes.elliptic_curves.isogeny_class": {"walltime": 38},
+  "sage.schemes.elliptic_curves.isogeny_small_degree": {"walltime": 274},
+  "sage.schemes.elliptic_curves.kraus": {"walltime": 12},
+  "sage.schemes.elliptic_curves.mod_sym_num": {"walltime": 12},
+  "sage.schemes.elliptic_curves.padics": {"walltime": 15},
+  "sage.schemes.elliptic_curves.saturation": {"walltime": 19},
+  "sage.schemes.elliptic_curves.sha_tate": {"walltime": 23},
+  "sage.schemes.hyperelliptic_curves.hyperelliptic_finite_field": {"walltime": 65},
+  "sage.schemes.hyperelliptic_curves.hyperelliptic_padic_field": {"walltime": 25},
+  "sage.schemes.projective.projective_rational_point": {"walltime": 11},
+  "sage.schemes.riemann_surfaces.riemann_surface": {"walltime": 53},
+  "sage.stats.distributions.discrete_gaussian_integer": {"walltime": 10},
+  "sage.structure.coerce_dict": {"walltime": 33},
+  "sage.structure.element": {"walltime": 16},
+  "sage.symbolic.expression": {"walltime": 38},
+  "sage.symbolic.integration.integral": {"walltime": 35},
+  "sage.symbolic.random_tests": {"walltime": 31},
+  "sage.symbolic.relation": {"walltime": 11},
+  "sage.tests.book_schilling_zabrocki_kschur_primer": {"walltime": 36},
+  "sage.tests.book_stein_ent": {"walltime": 15},
+  "sage.tests.books.computational-mathematics-with-sagemath.combinat_doctest": {"walltime": 40},
+  "sage.tests.books.computational-mathematics-with-sagemath.float_doctest": {"walltime": 17},
+  "sage.tests.books.computational-mathematics-with-sagemath.graphique_doctest": {"walltime": 29},
+  "sage.tests.books.computational-mathematics-with-sagemath.integration_doctest": {"walltime": 28},
+  "sage.tests.books.computational-mathematics-with-sagemath.nonlinear_doctest": {"walltime": 11},
+  "sage.tests.books.computational-mathematics-with-sagemath.sol.graphique_doctest": {"walltime": 17},
+  "sage.tests.books.computational-mathematics-with-sagemath.sol.numbertheory_doctest": {"walltime": 14},
+  "sage.tests.books.computational-mathematics-with-sagemath.sol.polynomes_doctest": {"walltime": 19},
+  "sage.tests.cmdline": {"walltime": 44},
+  "sage.tests.gosper-sum": {"walltime": 11},
+  "sage.topology.simplicial_complex_examples": {"walltime": 14}
+}
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index b9bd590b61ca..8f27de532058 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -206,22 +206,23 @@ do_install() {
 
 do_check() {
 	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
-		_test_args=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+		_test_files=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	else
+		_test_files=--all
 	fi
-	if [ -z "$_test_args" ]; then
-		_test_args=--all
+	cp ${FILESDIR}/timings2.json .
+	_test_args="--stats_path=timings2.json"
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args+=" --long --warn-long 20.0"
+	else
+		_test_args+=" --warn-long 10.0"
 	fi
 	if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
 		# for CI use a predictable random seed
-		_test_args="--random-seed=0 $_test_args"
-	fi
-	if [ "$XBPS_CHECK_PKGS" = full ]; then
-		_test_args="--long $_test_args"
-	else
-		_test_args="--warn-long 5.0 $_test_args"
+		_test_args+=" --random-seed=0"
 	fi
 	# since make check will build the docs, run test like this instead
-	./sage -tp ${XBPS_MAKEJOBS} ${_test_args}
+	./sage -tp ${XBPS_MAKEJOBS} ${_test_args} ${_test_files}
 }
 
 ### copied from sage-deps, to be kept in sync

From ee15ca43ec30d0e43a975b970ce4a41feaf8e835 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 02:54:00 -0300
Subject: [PATCH 50/63] changed_templates: do not merge with master

---
 common/travis/changed_templates.sh | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/common/travis/changed_templates.sh b/common/travis/changed_templates.sh
index 686436ce4327..5501b968cf1e 100755
--- a/common/travis/changed_templates.sh
+++ b/common/travis/changed_templates.sh
@@ -20,6 +20,9 @@ base="$($GIT_CMD merge-base FETCH_HEAD "$tip")" || {
 	exit 1
 }
 
+# tip = commit of the PR; this avoids merging to master
+$GIT_CMD checkout "$tip"
+
 echo "$base $tip" >/tmp/revisions
 
 /bin/echo -e '\x1b[32mChanged packages:\x1b[0m'

From bccf99adbd2a5da513c452f1ec680fda7fb6253d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 10:26:57 -0300
Subject: [PATCH 51/63] sagemath: round timings to power of 2 for stability

---
 srcpkgs/sagemath/files/timings2.json | 629 ++++++++++++++++-----------
 1 file changed, 386 insertions(+), 243 deletions(-)

diff --git a/srcpkgs/sagemath/files/timings2.json b/srcpkgs/sagemath/files/timings2.json
index 958a56d9d6f5..71a9aa84ce58 100644
--- a/srcpkgs/sagemath/files/timings2.json
+++ b/srcpkgs/sagemath/files/timings2.json
@@ -1,255 +1,398 @@
 {
+  "doc.ca.intro.index": {"walltime": 8},
   "doc.en.constructions.calculus": {"walltime": 64},
-  "doc.en.constructions.plotting": {"walltime": 28},
-  "doc.en.prep.Advanced-2DPlotting": {"walltime": 13},
-  "doc.en.thematic_tutorials.geometry.polyhedra_tutorial": {"walltime": 12},
-  "doc.en.thematic_tutorials.sandpile": {"walltime": 15},
-  "doc.en.thematic_tutorials.vector_calculus.vector_calc_advanced": {"walltime": 31},
-  "doc.en.thematic_tutorials.vector_calculus.vector_calc_cartesian": {"walltime": 36},
-  "doc.en.thematic_tutorials.vector_calculus.vector_calc_change": {"walltime": 28},
-  "doc.en.thematic_tutorials.vector_calculus.vector_calc_curvilinear": {"walltime": 35},
-  "doc.en.thematic_tutorials.vector_calculus.vector_calc_plane": {"walltime": 18},
-  "sage.algebras.commutative_dga": {"walltime": 13},
-  "sage.algebras.lie_algebras.classical_lie_algebra": {"walltime": 121},
-  "sage.algebras.lie_algebras.nilpotent_lie_algebra": {"walltime": 13},
-  "sage.algebras.quantum_clifford": {"walltime": 13},
-  "sage.algebras.quatalg.quaternion_algebra": {"walltime": 10},
-  "sage.algebras.steenrod.steenrod_algebra": {"walltime": 51},
-  "sage.arith.misc": {"walltime": 24},
+  "doc.en.constructions.plotting": {"walltime": 32},
+  "doc.en.prep.Advanced-2DPlotting": {"walltime": 16},
+  "doc.en.prep.Calculus": {"walltime": 8},
+  "doc.en.prep.Symbolics-and-Basic-Plotting": {"walltime": 8},
+  "doc.en.thematic_tutorials.explicit_methods_in_number_theory.birds_other": {"walltime": 8},
+  "doc.en.thematic_tutorials.explicit_methods_in_number_theory.elliptic_curves": {"walltime": 8},
+  "doc.en.thematic_tutorials.geometry.polyhedra_tutorial": {"walltime": 16},
+  "doc.en.thematic_tutorials.sandpile": {"walltime": 16},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_advanced": {"walltime": 32},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_cartesian": {"walltime": 32},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_change": {"walltime": 32},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_curvilinear": {"walltime": 32},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_plane": {"walltime": 16},
+  "doc.ja.tutorial.tour_plotting": {"walltime": 8},
+  "sage.algebras.cluster_algebra": {"walltime": 8},
+  "sage.algebras.commutative_dga": {"walltime": 16},
+  "sage.algebras.hecke_algebras.ariki_koike_algebra": {"walltime": 8},
+  "sage.algebras.iwahori_hecke_algebra": {"walltime": 8},
+  "sage.algebras.lie_algebras.classical_lie_algebra": {"walltime": 128},
+  "sage.algebras.lie_algebras.nilpotent_lie_algebra": {"walltime": 16},
+  "sage.algebras.quantum_clifford": {"walltime": 16},
+  "sage.algebras.quantum_groups.fock_space": {"walltime": 8},
+  "sage.algebras.quatalg.quaternion_algebra": {"walltime": 8},
+  "sage.algebras.steenrod.steenrod_algebra": {"walltime": 64},
+  "sage.algebras.steenrod.steenrod_algebra_bases": {"walltime": 8},
+  "sage.algebras.yangian": {"walltime": 8},
+  "sage.arith.misc": {"walltime": 32},
   "sage.calculus.calculus": {"walltime": 16},
-  "sage.calculus.functional": {"walltime": 12},
-  "sage.calculus.riemann": {"walltime": 49},
-  "sage.calculus.tests": {"walltime": 15},
-  "sage.calculus.transforms.dwt": {"walltime": 25},
-  "sage.categories.finite_monoids": {"walltime": 13},
-  "sage.categories.super_hopf_algebras_with_basis": {"walltime": 27},
-  "sage.coding.ag_code": {"walltime": 48},
-  "sage.coding.ag_code_decoders": {"walltime": 187},
-  "sage.coding.linear_code": {"walltime": 19},
-  "sage.combinat.backtrack": {"walltime": 30},
-  "sage.combinat.chas.wqsym": {"walltime": 42},
-  "sage.combinat.cluster_algebra_quiver.cluster_seed": {"walltime": 60},
-  "sage.combinat.cluster_algebra_quiver.quiver": {"walltime": 169},
-  "sage.combinat.crystals.affine_factorization": {"walltime": 13},
-  "sage.combinat.crystals.alcove_path": {"walltime": 37},
+  "sage.calculus.desolvers": {"walltime": 8},
+  "sage.calculus.functional": {"walltime": 8},
+  "sage.calculus.riemann": {"walltime": 64},
+  "sage.calculus.tests": {"walltime": 16},
+  "sage.calculus.transforms.dwt": {"walltime": 16},
+  "sage.calculus.transforms.fft": {"walltime": 8},
+  "sage.categories.coxeter_groups": {"walltime": 8},
+  "sage.categories.finite_monoids": {"walltime": 16},
+  "sage.categories.lie_conformal_algebras": {"walltime": 8},
+  "sage.categories.loop_crystals": {"walltime": 8},
+  "sage.categories.pushout": {"walltime": 8},
+  "sage.categories.super_hopf_algebras_with_basis": {"walltime": 32},
+  "sage.categories.super_lie_conformal_algebras": {"walltime": 8},
+  "sage.coding.ag_code": {"walltime": 64},
+  "sage.coding.ag_code_decoders": {"walltime": 128},
+  "sage.coding.binary_code": {"walltime": 8},
+  "sage.coding.linear_code": {"walltime": 16},
+  "sage.combinat.backtrack": {"walltime": 32},
+  "sage.combinat.chas.wqsym": {"walltime": 32},
+  "sage.combinat.cluster_algebra_quiver.cluster_seed": {"walltime": 64},
+  "sage.combinat.cluster_algebra_quiver.quiver": {"walltime": 128},
+  "sage.combinat.crystals.affine_factorization": {"walltime": 16},
+  "sage.combinat.crystals.alcove_path": {"walltime": 32},
+  "sage.combinat.crystals.highest_weight_crystals": {"walltime": 8},
   "sage.combinat.crystals.kirillov_reshetikhin": {"walltime": 16},
-  "sage.combinat.crystals.littelmann_path": {"walltime": 13},
-  "sage.combinat.crystals.mv_polytopes": {"walltime": 20},
-  "sage.combinat.crystals.pbw_crystal": {"walltime": 21},
-  "sage.combinat.designs.database": {"walltime": 21},
-  "sage.combinat.designs.gen_quadrangles_with_spread": {"walltime": 114},
-  "sage.combinat.designs.orthogonal_arrays_build_recursive": {"walltime": 12},
-  "sage.combinat.diagram_algebras": {"walltime": 49},
-  "sage.combinat.fqsym": {"walltime": 22},
-  "sage.combinat.k_tableau": {"walltime": 14},
-  "sage.combinat.ncsf_qsym.ncsf": {"walltime": 14},
-  "sage.combinat.ncsf_qsym.qsym": {"walltime": 12},
-  "sage.combinat.partition": {"walltime": 11},
-  "sage.combinat.partition_kleshchev": {"walltime": 19},
-  "sage.combinat.posets.moebius_algebra": {"walltime": 12},
-  "sage.combinat.rigged_configurations.kr_tableaux": {"walltime": 28},
-  "sage.combinat.rigged_configurations.rigged_configurations": {"walltime": 13},
-  "sage.combinat.rigged_configurations.tensor_product_kr_tableaux": {"walltime": 15},
-  "sage.combinat.root_system.integrable_representations": {"walltime": 12},
-  "sage.combinat.root_system.non_symmetric_macdonald_polynomials": {"walltime": 21},
-  "sage.combinat.root_system.plot": {"walltime": 37},
-  "sage.combinat.root_system.root_lattice_realization_algebras": {"walltime": 17},
-  "sage.combinat.root_system.root_lattice_realizations": {"walltime": 24},
-  "sage.combinat.rsk": {"walltime": 36},
-  "sage.combinat.sf.classical": {"walltime": 11},
-  "sage.combinat.sf.k_dual": {"walltime": 13},
-  "sage.combinat.sf.llt": {"walltime": 13},
-  "sage.combinat.sf.macdonald": {"walltime": 58},
-  "sage.combinat.sf.sfa": {"walltime": 25},
-  "sage.combinat.shifted_primed_tableau": {"walltime": 14},
-  "sage.combinat.symmetric_group_algebra": {"walltime": 11},
-  "sage.combinat.tableau": {"walltime": 20},
-  "sage.combinat.tableau_tuple": {"walltime": 29},
-  "sage.combinat.tiling": {"walltime": 305},
-  "sage.combinat.tutorial": {"walltime": 13},
-  "sage.combinat.words.paths": {"walltime": 85},
-  "sage.crypto.block_cipher.des": {"walltime": 21},
-  "sage.crypto.mq.sr": {"walltime": 53},
-  "sage.crypto.sbox": {"walltime": 14},
-  "sage.doctest.forker": {"walltime": 14},
-  "sage.doctest.sources": {"walltime": 93},
-  "sage.doctest.test": {"walltime": 149},
-  "sage.dynamics.arithmetic_dynamics.projective_ds": {"walltime": 48},
+  "sage.combinat.crystals.letters": {"walltime": 8},
+  "sage.combinat.crystals.littelmann_path": {"walltime": 16},
+  "sage.combinat.crystals.mv_polytopes": {"walltime": 16},
+  "sage.combinat.crystals.pbw_crystal": {"walltime": 16},
+  "sage.combinat.crystals.star_crystal": {"walltime": 8},
+  "sage.combinat.designs.bibd": {"walltime": 8},
+  "sage.combinat.designs.database": {"walltime": 16},
+  "sage.combinat.designs.difference_family": {"walltime": 8},
+  "sage.combinat.designs.gen_quadrangles_with_spread": {"walltime": 128},
+  "sage.combinat.designs.orthogonal_arrays_build_recursive": {"walltime": 16},
+  "sage.combinat.designs.orthogonal_arrays_find_recursive": {"walltime": 8},
+  "sage.combinat.diagram_algebras": {"walltime": 64},
+  "sage.combinat.fqsym": {"walltime": 32},
+  "sage.combinat.free_prelie_algebra": {"walltime": 8},
+  "sage.combinat.fully_commutative_elements": {"walltime": 8},
+  "sage.combinat.grossman_larson_algebras": {"walltime": 8},
+  "sage.combinat.interval_posets": {"walltime": 8},
+  "sage.combinat.k_regular_sequence": {"walltime": 8},
+  "sage.combinat.k_tableau": {"walltime": 16},
+  "sage.combinat.matrices.hadamard_matrix": {"walltime": 8},
+  "sage.combinat.multiset_partition_into_sets_ordered": {"walltime": 8},
+  "sage.combinat.ncsf_qsym.ncsf": {"walltime": 16},
+  "sage.combinat.ncsf_qsym.qsym": {"walltime": 16},
+  "sage.combinat.partition": {"walltime": 16},
+  "sage.combinat.partition_kleshchev": {"walltime": 16},
+  "sage.combinat.partition_tuple": {"walltime": 8},
+  "sage.combinat.posets.moebius_algebra": {"walltime": 16},
+  "sage.combinat.posets.posets": {"walltime": 8},
+  "sage.combinat.rigged_configurations.kr_tableaux": {"walltime": 32},
+  "sage.combinat.rigged_configurations.rigged_configurations": {"walltime": 16},
+  "sage.combinat.rigged_configurations.tensor_product_kr_tableaux": {"walltime": 16},
+  "sage.combinat.root_system.associahedron": {"walltime": 8},
+  "sage.combinat.root_system.branching_rules": {"walltime": 8},
+  "sage.combinat.root_system.fusion_ring": {"walltime": 8},
+  "sage.combinat.root_system.integrable_representations": {"walltime": 16},
+  "sage.combinat.root_system.non_symmetric_macdonald_polynomials": {"walltime": 16},
+  "sage.combinat.root_system.pieri_factors": {"walltime": 8},
+  "sage.combinat.root_system.plot": {"walltime": 32},
+  "sage.combinat.root_system.root_lattice_realization_algebras": {"walltime": 16},
+  "sage.combinat.root_system.root_lattice_realizations": {"walltime": 16},
+  "sage.combinat.root_system.root_system": {"walltime": 8},
+  "sage.combinat.root_system.weyl_group": {"walltime": 8},
+  "sage.combinat.rsk": {"walltime": 32},
+  "sage.combinat.sf.classical": {"walltime": 16},
+  "sage.combinat.sf.jack": {"walltime": 16},
+  "sage.combinat.sf.k_dual": {"walltime": 16},
+  "sage.combinat.sf.llt": {"walltime": 16},
+  "sage.combinat.sf.macdonald": {"walltime": 64},
+  "sage.combinat.sf.new_kschur": {"walltime": 8},
+  "sage.combinat.sf.sfa": {"walltime": 32},
+  "sage.combinat.shifted_primed_tableau": {"walltime": 16},
+  "sage.combinat.skew_tableau": {"walltime": 8},
+  "sage.combinat.symmetric_group_algebra": {"walltime": 16},
+  "sage.combinat.tableau": {"walltime": 32},
+  "sage.combinat.tableau_tuple": {"walltime": 32},
+  "sage.combinat.tiling": {"walltime": 256},
+  "sage.combinat.tutorial": {"walltime": 16},
+  "sage.combinat.words.paths": {"walltime": 64},
+  "sage.crypto.block_cipher.des": {"walltime": 16},
+  "sage.crypto.mq.sr": {"walltime": 64},
+  "sage.crypto.sbox": {"walltime": 16},
+  "sage.crypto.sboxes": {"walltime": 8},
+  "sage.doctest.forker": {"walltime": 16},
+  "sage.doctest.sources": {"walltime": 64},
+  "sage.doctest.test": {"walltime": 128},
+  "sage.dynamics.arithmetic_dynamics.projective_ds": {"walltime": 64},
+  "sage.dynamics.arithmetic_dynamics.wehlerK3": {"walltime": 8},
+  "sage.dynamics.cellular_automata.glca": {"walltime": 8},
+  "sage.dynamics.cellular_automata.solitons": {"walltime": 8},
   "sage.dynamics.complex_dynamics.mandel_julia": {"walltime": 16},
-  "sage.functions.bessel": {"walltime": 14},
-  "sage.functions.exp_integral": {"walltime": 12},
-  "sage.functions.other": {"walltime": 15},
-  "sage.geometry.cone": {"walltime": 24},
-  "sage.geometry.hyperplane_arrangement.arrangement": {"walltime": 14},
-  "sage.geometry.lattice_polytope": {"walltime": 12},
-  "sage.geometry.polyhedral_complex": {"walltime": 11},
-  "sage.geometry.polyhedron.base": {"walltime": 33},
-  "sage.geometry.polyhedron.library": {"walltime": 41},
-  "sage.geometry.riemannian_manifolds.parametrized_surface3d": {"walltime": 22},
-  "sage.geometry.triangulation.base": {"walltime": 22},
-  "sage.geometry.triangulation.point_configuration": {"walltime": 14},
-  "sage.graphs.connectivity": {"walltime": 17},
-  "sage.graphs.generators.basic": {"walltime": 10},
-  "sage.graphs.generators.classical_geometries": {"walltime": 30},
-  "sage.graphs.generators.distance_regular": {"walltime": 196},
-  "sage.graphs.generators.families": {"walltime": 21},
-  "sage.graphs.generators.smallgraphs": {"walltime": 22},
-  "sage.graphs.generic_graph": {"walltime": 29},
-  "sage.graphs.genus": {"walltime": 12},
-  "sage.graphs.graph": {"walltime": 20},
-  "sage.graphs.strongly_regular_db": {"walltime": 22},
-  "sage.groups.cubic_braid": {"walltime": 19},
-  "sage.groups.fqf_orthogonal": {"walltime": 19},
-  "sage.groups.lie_gps.nilpotent_lie_group": {"walltime": 10},
-  "sage.groups.matrix_gps.heisenberg": {"walltime": 41},
-  "sage.groups.perm_gps.cubegroup": {"walltime": 11},
-  "sage.homology.homology_vector_space_with_basis": {"walltime": 10},
-  "sage.interacts.test_jupyter": {"walltime": 17},
-  "sage.interfaces.gap": {"walltime": 11},
-  "sage.interfaces.maxima_abstract": {"walltime": 46},
-  "sage.libs.eclib.interface": {"walltime": 22},
+  "sage.functions.bessel": {"walltime": 16},
+  "sage.functions.exp_integral": {"walltime": 8},
+  "sage.functions.hypergeometric": {"walltime": 8},
+  "sage.functions.other": {"walltime": 16},
+  "sage.functions.piecewise": {"walltime": 8},
+  "sage.games.quantumino": {"walltime": 8},
+  "sage.geometry.cone": {"walltime": 32},
+  "sage.geometry.fan": {"walltime": 8},
+  "sage.geometry.hyperbolic_space.hyperbolic_geodesic": {"walltime": 8},
+  "sage.geometry.hyperplane_arrangement.arrangement": {"walltime": 16},
+  "sage.geometry.hyperplane_arrangement.library": {"walltime": 8},
+  "sage.geometry.hyperplane_arrangement.plot": {"walltime": 8},
+  "sage.geometry.lattice_polytope": {"walltime": 16},
+  "sage.geometry.polyhedral_complex": {"walltime": 8},
+  "sage.geometry.polyhedron.base": {"walltime": 32},
+  "sage.geometry.polyhedron.library": {"walltime": 32},
+  "sage.geometry.polyhedron.plot": {"walltime": 8},
+  "sage.geometry.riemannian_manifolds.parametrized_surface3d": {"walltime": 16},
+  "sage.geometry.triangulation.base": {"walltime": 32},
+  "sage.geometry.triangulation.point_configuration": {"walltime": 16},
+  "sage.graphs.chrompoly": {"walltime": 8},
+  "sage.graphs.connectivity": {"walltime": 16},
+  "sage.graphs.generators.basic": {"walltime": 16},
+  "sage.graphs.generators.classical_geometries": {"walltime": 32},
+  "sage.graphs.generators.distance_regular": {"walltime": 256},
+  "sage.graphs.generators.families": {"walltime": 32},
+  "sage.graphs.generators.smallgraphs": {"walltime": 16},
+  "sage.graphs.generic_graph": {"walltime": 32},
+  "sage.graphs.genus": {"walltime": 16},
+  "sage.graphs.graph": {"walltime": 16},
+  "sage.graphs.graph_generators": {"walltime": 8},
+  "sage.graphs.graph_list": {"walltime": 8},
+  "sage.graphs.graph_plot": {"walltime": 8},
+  "sage.graphs.strongly_regular_db": {"walltime": 16},
+  "sage.groups.cubic_braid": {"walltime": 16},
+  "sage.groups.fqf_orthogonal": {"walltime": 16},
+  "sage.groups.libgap_mixin": {"walltime": 8},
+  "sage.groups.libgap_morphism": {"walltime": 8},
+  "sage.groups.lie_gps.nilpotent_lie_group": {"walltime": 16},
+  "sage.groups.matrix_gps.finitely_generated": {"walltime": 8},
+  "sage.groups.matrix_gps.heisenberg": {"walltime": 32},
+  "sage.groups.matrix_gps.linear": {"walltime": 8},
+  "sage.groups.perm_gps.cubegroup": {"walltime": 16},
+  "sage.groups.perm_gps.partn_ref.refinement_graphs": {"walltime": 8},
+  "sage.groups.perm_gps.permgroup": {"walltime": 8},
+  "sage.groups.perm_gps.permgroup_named": {"walltime": 8},
+  "sage.homology.hochschild_complex": {"walltime": 8},
+  "sage.homology.homology_vector_space_with_basis": {"walltime": 8},
+  "sage.interacts.test_jupyter": {"walltime": 16},
+  "sage.interfaces.ecm": {"walltime": 8},
+  "sage.interfaces.expect": {"walltime": 8},
+  "sage.interfaces.gap": {"walltime": 16},
+  "sage.interfaces.maxima": {"walltime": 8},
+  "sage.interfaces.maxima_abstract": {"walltime": 64},
+  "sage.interfaces.psage": {"walltime": 8},
+  "sage.interfaces.sage0": {"walltime": 8},
+  "sage.lfunctions.zero_sums": {"walltime": 8},
+  "sage.libs.eclib.interface": {"walltime": 16},
   "sage.libs.eclib.mwrank": {"walltime": 16},
-  "sage.libs.gap.test_long": {"walltime": 43},
-  "sage.libs.giac": {"walltime": 42},
-  "sage.manifolds.chart": {"walltime": 34},
-  "sage.manifolds.differentiable.affine_connection": {"walltime": 138},
-  "sage.manifolds.differentiable.automorphismfield": {"walltime": 33},
-  "sage.manifolds.differentiable.characteristic_cohomology_class": {"walltime": 260},
-  "sage.manifolds.differentiable.curve": {"walltime": 18},
-  "sage.manifolds.differentiable.degenerate": {"walltime": 27},
-  "sage.manifolds.differentiable.degenerate_submanifold": {"walltime": 239},
-  "sage.manifolds.differentiable.diff_form": {"walltime": 48},
-  "sage.manifolds.differentiable.diff_map": {"walltime": 10},
-  "sage.manifolds.differentiable.examples.euclidean": {"walltime": 48},
-  "sage.manifolds.differentiable.examples.sphere": {"walltime": 33},
-  "sage.manifolds.differentiable.integrated_curve": {"walltime": 29},
-  "sage.manifolds.differentiable.levi_civita_connection": {"walltime": 27},
-  "sage.manifolds.differentiable.manifold": {"walltime": 12},
+  "sage.libs.gap.test_long": {"walltime": 32},
+  "sage.libs.giac": {"walltime": 32},
+  "sage.manifolds.catalog": {"walltime": 8},
+  "sage.manifolds.chart": {"walltime": 32},
+  "sage.manifolds.chart_func": {"walltime": 8},
+  "sage.manifolds.continuous_map": {"walltime": 8},
+  "sage.manifolds.differentiable.affine_connection": {"walltime": 128},
+  "sage.manifolds.differentiable.automorphismfield": {"walltime": 32},
+  "sage.manifolds.differentiable.automorphismfield_group": {"walltime": 8},
+  "sage.manifolds.differentiable.bundle_connection": {"walltime": 8},
+  "sage.manifolds.differentiable.characteristic_cohomology_class": {"walltime": 256},
+  "sage.manifolds.differentiable.curve": {"walltime": 16},
+  "sage.manifolds.differentiable.degenerate": {"walltime": 32},
+  "sage.manifolds.differentiable.degenerate_submanifold": {"walltime": 256},
+  "sage.manifolds.differentiable.diff_form": {"walltime": 64},
+  "sage.manifolds.differentiable.diff_map": {"walltime": 8},
+  "sage.manifolds.differentiable.examples.euclidean": {"walltime": 32},
+  "sage.manifolds.differentiable.examples.sphere": {"walltime": 32},
+  "sage.manifolds.differentiable.integrated_curve": {"walltime": 32},
+  "sage.manifolds.differentiable.levi_civita_connection": {"walltime": 32},
+  "sage.manifolds.differentiable.manifold": {"walltime": 16},
   "sage.manifolds.differentiable.manifold_homset": {"walltime": 16},
-  "sage.manifolds.differentiable.metric": {"walltime": 95},
-  "sage.manifolds.differentiable.mixed_form": {"walltime": 14},
-  "sage.manifolds.differentiable.mixed_form_algebra": {"walltime": 11},
-  "sage.manifolds.differentiable.multivectorfield": {"walltime": 71},
-  "sage.manifolds.differentiable.pseudo_riemannian": {"walltime": 20},
-  "sage.manifolds.differentiable.pseudo_riemannian_submanifold": {"walltime": 127},
-  "sage.manifolds.differentiable.scalarfield": {"walltime": 19},
-  "sage.manifolds.differentiable.tangent_vector": {"walltime": 17},
+  "sage.manifolds.differentiable.metric": {"walltime": 64},
+  "sage.manifolds.differentiable.mixed_form": {"walltime": 16},
+  "sage.manifolds.differentiable.mixed_form_algebra": {"walltime": 8},
+  "sage.manifolds.differentiable.multivectorfield": {"walltime": 64},
+  "sage.manifolds.differentiable.pseudo_riemannian": {"walltime": 16},
+  "sage.manifolds.differentiable.pseudo_riemannian_submanifold": {"walltime": 128},
+  "sage.manifolds.differentiable.scalarfield": {"walltime": 16},
+  "sage.manifolds.differentiable.scalarfield_algebra": {"walltime": 8},
+  "sage.manifolds.differentiable.tangent_vector": {"walltime": 16},
   "sage.manifolds.differentiable.tensorfield": {"walltime": 128},
-  "sage.manifolds.differentiable.tensorfield_paral": {"walltime": 15},
-  "sage.manifolds.differentiable.vector_bundle": {"walltime": 13},
-  "sage.manifolds.differentiable.vectorfield": {"walltime": 53},
-  "sage.manifolds.point": {"walltime": 21},
-  "sage.manifolds.scalarfield": {"walltime": 15},
-  "sage.manifolds.section": {"walltime": 28},
-  "sage.matrix.matrix2": {"walltime": 18},
-  "sage.matrix.matrix_integer_dense": {"walltime": 15},
-  "sage.matrix.matrix_integer_dense_hnf": {"walltime": 35},
-  "sage.matroids.catalog": {"walltime": 59},
-  "sage.misc.cachefunc": {"walltime": 13},
-  "sage.misc.functional": {"walltime": 10},
+  "sage.manifolds.differentiable.tensorfield_paral": {"walltime": 16},
+  "sage.manifolds.differentiable.vector_bundle": {"walltime": 16},
+  "sage.manifolds.differentiable.vectorfield": {"walltime": 64},
+  "sage.manifolds.differentiable.vectorframe": {"walltime": 8},
+  "sage.manifolds.point": {"walltime": 16},
+  "sage.manifolds.scalarfield": {"walltime": 16},
+  "sage.manifolds.scalarfield_algebra": {"walltime": 8},
+  "sage.manifolds.section": {"walltime": 32},
+  "sage.manifolds.trivialization": {"walltime": 8},
+  "sage.manifolds.vector_bundle": {"walltime": 8},
+  "sage.matrix.benchmark": {"walltime": 8},
+  "sage.matrix.matrix2": {"walltime": 16},
+  "sage.matrix.matrix_integer_dense": {"walltime": 16},
+  "sage.matrix.matrix_integer_dense_hnf": {"walltime": 32},
+  "sage.matrix.matrix_mod2_dense": {"walltime": 8},
+  "sage.matrix.matrix_rational_dense": {"walltime": 8},
+  "sage.matrix.special": {"walltime": 8},
+  "sage.matroids.catalog": {"walltime": 64},
+  "sage.misc.cachefunc": {"walltime": 16},
+  "sage.misc.cython": {"walltime": 8},
+  "sage.misc.functional": {"walltime": 8},
   "sage.misc.randstate": {"walltime": 16},
-  "sage.misc.sagedoc": {"walltime": 56},
-  "sage.misc.sageinspect": {"walltime": 38},
-  "sage.modular.abvar.abvar": {"walltime": 12},
-  "sage.modular.abvar.lseries": {"walltime": 10},
-  "sage.modular.btquotients.pautomorphicform": {"walltime": 31},
-  "sage.modular.hypergeometric_motive": {"walltime": 12},
-  "sage.modular.local_comp.local_comp": {"walltime": 27},
-  "sage.modular.local_comp.type_space": {"walltime": 24},
-  "sage.modular.modform.ambient_R": {"walltime": 11},
-  "sage.modular.modform.cuspidal_submodule": {"walltime": 15},
-  "sage.modular.modform.element": {"walltime": 60},
-  "sage.modular.modform.ring": {"walltime": 50},
-  "sage.modular.modform_hecketriangle.abstract_space": {"walltime": 12},
-  "sage.modular.modform_hecketriangle.graded_ring_element": {"walltime": 23},
-  "sage.modular.modform_hecketriangle.hecke_triangle_group_element": {"walltime": 26},
-  "sage.modular.modform_hecketriangle.readme": {"walltime": 19},
-  "sage.modular.modsym.ambient": {"walltime": 15},
-  "sage.modular.pollack_stevens.modsym": {"walltime": 63},
-  "sage.modular.pollack_stevens.padic_lseries": {"walltime": 36},
-  "sage.modules.finite_submodule_iter": {"walltime": 22},
-  "sage.modules.free_module": {"walltime": 22},
-  "sage.modules.free_module_integer": {"walltime": 28},
-  "sage.modules.torsion_quadratic_module": {"walltime": 22},
-  "sage.plot.animate": {"walltime": 129},
-  "sage.plot.contour_plot": {"walltime": 38},
-  "sage.plot.graphics": {"walltime": 43},
-  "sage.plot.line": {"walltime": 12},
-  "sage.plot.matrix_plot": {"walltime": 15},
-  "sage.plot.multigraphics": {"walltime": 26},
-  "sage.plot.plot": {"walltime": 77},
-  "sage.plot.plot3d.base": {"walltime": 12},
-  "sage.plot.plot3d.implicit_plot3d": {"walltime": 20},
-  "sage.plot.plot3d.parametric_plot3d": {"walltime": 11},
-  "sage.plot.plot3d.plot3d": {"walltime": 18},
-  "sage.plot.plot3d.transform": {"walltime": 34},
-  "sage.quadratic_forms.genera.genus": {"walltime": 19},
-  "sage.quadratic_forms.quadratic_form__local_representation_conditions": {"walltime": 48},
-  "sage.rings.asymptotic.asymptotic_expansion_generators": {"walltime": 61},
-  "sage.rings.asymptotic.asymptotics_multivariate_generating_functions": {"walltime": 36},
-  "sage.rings.function_field.function_field": {"walltime": 225},
-  "sage.rings.function_field.function_field_valuation": {"walltime": 47},
-  "sage.rings.function_field.ideal": {"walltime": 10},
-  "sage.rings.integer": {"walltime": 164},
-  "sage.rings.number_field.number_field": {"walltime": 79},
-  "sage.rings.number_field.number_field_element": {"walltime": 13},
-  "sage.rings.number_field.totallyreal": {"walltime": 14},
-  "sage.rings.padics.padic_base_leaves": {"walltime": 76},
-  "sage.rings.padics.padic_extension_leaves": {"walltime": 46},
-  "sage.rings.padics.padic_generic_element": {"walltime": 14},
-  "sage.rings.padics.padic_lattice_element": {"walltime": 25},
-  "sage.rings.padics.relative_extension_leaves": {"walltime": 42},
-  "sage.rings.polynomial.multi_polynomial_ideal": {"walltime": 11},
-  "sage.rings.polynomial.multi_polynomial_sequence": {"walltime": 28},
+  "sage.misc.sagedoc": {"walltime": 64},
+  "sage.misc.sageinspect": {"walltime": 32},
+  "sage.modular.abvar.abvar": {"walltime": 16},
+  "sage.modular.abvar.homspace": {"walltime": 8},
+  "sage.modular.abvar.lseries": {"walltime": 8},
+  "sage.modular.arithgroup.arithgroup_perm": {"walltime": 8},
+  "sage.modular.arithgroup.tests": {"walltime": 8},
+  "sage.modular.btquotients.pautomorphicform": {"walltime": 32},
+  "sage.modular.hypergeometric_motive": {"walltime": 16},
+  "sage.modular.local_comp.local_comp": {"walltime": 32},
+  "sage.modular.local_comp.type_space": {"walltime": 16},
+  "sage.modular.modform.ambient_R": {"walltime": 16},
+  "sage.modular.modform.constructor": {"walltime": 8},
+  "sage.modular.modform.cuspidal_submodule": {"walltime": 16},
+  "sage.modular.modform.element": {"walltime": 64},
+  "sage.modular.modform.ring": {"walltime": 64},
+  "sage.modular.modform.space": {"walltime": 8},
+  "sage.modular.modform_hecketriangle.abstract_space": {"walltime": 16},
+  "sage.modular.modform_hecketriangle.graded_ring_element": {"walltime": 16},
+  "sage.modular.modform_hecketriangle.hecke_triangle_group_element": {"walltime": 32},
+  "sage.modular.modform_hecketriangle.readme": {"walltime": 16},
+  "sage.modular.modform_hecketriangle.space": {"walltime": 8},
+  "sage.modular.modsym.ambient": {"walltime": 16},
+  "sage.modular.modsym.space": {"walltime": 8},
+  "sage.modular.pollack_stevens.modsym": {"walltime": 64},
+  "sage.modular.pollack_stevens.padic_lseries": {"walltime": 32},
+  "sage.modules.finite_submodule_iter": {"walltime": 16},
+  "sage.modules.free_module": {"walltime": 16},
+  "sage.modules.free_module_element": {"walltime": 8},
+  "sage.modules.free_module_integer": {"walltime": 32},
+  "sage.modules.free_quadratic_module_integer_symmetric": {"walltime": 8},
+  "sage.modules.torsion_quadratic_module": {"walltime": 16},
+  "sage.parallel.map_reduce": {"walltime": 8},
+  "sage.plot.animate": {"walltime": 128},
+  "sage.plot.arrow": {"walltime": 8},
+  "sage.plot.circle": {"walltime": 8},
+  "sage.plot.complex_plot": {"walltime": 8},
+  "sage.plot.contour_plot": {"walltime": 32},
+  "sage.plot.density_plot": {"walltime": 8},
+  "sage.plot.graphics": {"walltime": 32},
+  "sage.plot.line": {"walltime": 8},
+  "sage.plot.matrix_plot": {"walltime": 16},
+  "sage.plot.multigraphics": {"walltime": 16},
+  "sage.plot.plot": {"walltime": 64},
+  "sage.plot.plot3d.base": {"walltime": 8},
+  "sage.plot.plot3d.implicit_plot3d": {"walltime": 16},
+  "sage.plot.plot3d.implicit_surface": {"walltime": 8},
+  "sage.plot.plot3d.parametric_plot3d": {"walltime": 8},
+  "sage.plot.plot3d.parametric_surface": {"walltime": 8},
+  "sage.plot.plot3d.plot3d": {"walltime": 16},
+  "sage.plot.plot3d.tachyon": {"walltime": 8},
+  "sage.plot.plot3d.transform": {"walltime": 32},
+  "sage.plot.point": {"walltime": 8},
+  "sage.plot.polygon": {"walltime": 8},
+  "sage.plot.streamline_plot": {"walltime": 8},
+  "sage.quadratic_forms.genera.genus": {"walltime": 16},
+  "sage.quadratic_forms.quadratic_form__automorphisms": {"walltime": 8},
+  "sage.quadratic_forms.quadratic_form__local_representation_conditions": {"walltime": 64},
+  "sage.quadratic_forms.quadratic_form__neighbors": {"walltime": 8},
+  "sage.quadratic_forms.quadratic_form__siegel_product": {"walltime": 8},
+  "sage.repl.ipython_extension": {"walltime": 8},
+  "sage.rings.asymptotic.asymptotic_expansion_generators": {"walltime": 64},
+  "sage.rings.asymptotic.asymptotic_ring": {"walltime": 8},
+  "sage.rings.asymptotic.asymptotics_multivariate_generating_functions": {"walltime": 32},
+  "sage.rings.asymptotic.term_monoid": {"walltime": 8},
+  "sage.rings.continued_fraction": {"walltime": 8},
+  "sage.rings.finite_rings.finite_field_base": {"walltime": 8},
+  "sage.rings.function_field.function_field": {"walltime": 256},
+  "sage.rings.function_field.function_field_valuation": {"walltime": 64},
+  "sage.rings.function_field.ideal": {"walltime": 8},
+  "sage.rings.function_field.place": {"walltime": 8},
+  "sage.rings.integer": {"walltime": 128},
+  "sage.rings.invariants.invariant_theory": {"walltime": 8},
+  "sage.rings.number_field.bdd_height": {"walltime": 8},
+  "sage.rings.number_field.number_field": {"walltime": 64},
+  "sage.rings.number_field.number_field_element": {"walltime": 16},
+  "sage.rings.number_field.splitting_field": {"walltime": 8},
+  "sage.rings.number_field.totallyreal": {"walltime": 16},
+  "sage.rings.number_field.totallyreal_rel": {"walltime": 8},
+  "sage.rings.padics.padic_base_leaves": {"walltime": 64},
+  "sage.rings.padics.padic_extension_leaves": {"walltime": 64},
+  "sage.rings.padics.padic_generic_element": {"walltime": 16},
+  "sage.rings.padics.padic_lattice_element": {"walltime": 32},
+  "sage.rings.padics.relative_extension_leaves": {"walltime": 32},
+  "sage.rings.polynomial.multi_polynomial_ideal": {"walltime": 8},
+  "sage.rings.polynomial.multi_polynomial_sequence": {"walltime": 8},
+  "sage.rings.polynomial.ore_function_element": {"walltime": 8},
   "sage.rings.polynomial.polynomial_element": {"walltime": 16},
-  "sage.rings.polynomial.polynomial_zmod_flint": {"walltime": 336},
-  "sage.rings.qqbar": {"walltime": 21},
-  "sage.rings.tests": {"walltime": 19},
-  "sage.rings.valuation.augmented_valuation": {"walltime": 28},
-  "sage.rings.valuation.mapped_valuation": {"walltime": 56},
-  "sage.schemes.curves.affine_curve": {"walltime": 23},
-  "sage.schemes.curves.projective_curve": {"walltime": 24},
-  "sage.schemes.cyclic_covers.cycliccover_finite_field": {"walltime": 78},
-  "sage.schemes.elliptic_curves.BSD": {"walltime": 10},
-  "sage.schemes.elliptic_curves.constructor": {"walltime": 27},
-  "sage.schemes.elliptic_curves.ell_curve_isogeny": {"walltime": 21},
-  "sage.schemes.elliptic_curves.ell_egros": {"walltime": 28},
-  "sage.schemes.elliptic_curves.ell_modular_symbols": {"walltime": 12},
-  "sage.schemes.elliptic_curves.ell_number_field": {"walltime": 120},
-  "sage.schemes.elliptic_curves.ell_rational_field": {"walltime": 133},
-  "sage.schemes.elliptic_curves.gal_reps_number_field": {"walltime": 35},
-  "sage.schemes.elliptic_curves.gp_simon": {"walltime": 22},
-  "sage.schemes.elliptic_curves.heegner": {"walltime": 39},
-  "sage.schemes.elliptic_curves.height": {"walltime": 56},
-  "sage.schemes.elliptic_curves.isogeny_class": {"walltime": 38},
-  "sage.schemes.elliptic_curves.isogeny_small_degree": {"walltime": 274},
-  "sage.schemes.elliptic_curves.kraus": {"walltime": 12},
-  "sage.schemes.elliptic_curves.mod_sym_num": {"walltime": 12},
-  "sage.schemes.elliptic_curves.padics": {"walltime": 15},
-  "sage.schemes.elliptic_curves.saturation": {"walltime": 19},
-  "sage.schemes.elliptic_curves.sha_tate": {"walltime": 23},
-  "sage.schemes.hyperelliptic_curves.hyperelliptic_finite_field": {"walltime": 65},
-  "sage.schemes.hyperelliptic_curves.hyperelliptic_padic_field": {"walltime": 25},
-  "sage.schemes.projective.projective_rational_point": {"walltime": 11},
-  "sage.schemes.riemann_surfaces.riemann_surface": {"walltime": 53},
-  "sage.stats.distributions.discrete_gaussian_integer": {"walltime": 10},
-  "sage.structure.coerce_dict": {"walltime": 33},
+  "sage.rings.polynomial.polynomial_rational_flint": {"walltime": 8},
+  "sage.rings.polynomial.polynomial_zmod_flint": {"walltime": 512},
+  "sage.rings.qqbar": {"walltime": 16},
+  "sage.rings.tests": {"walltime": 16},
+  "sage.rings.valuation.augmented_valuation": {"walltime": 32},
+  "sage.rings.valuation.mapped_valuation": {"walltime": 64},
+  "sage.rings.valuation.valuation": {"walltime": 8},
+  "sage.sandpiles.sandpile": {"walltime": 16},
+  "sage.schemes.curves.affine_curve": {"walltime": 16},
+  "sage.schemes.curves.closed_point": {"walltime": 8},
+  "sage.schemes.curves.projective_curve": {"walltime": 32},
+  "sage.schemes.cyclic_covers.cycliccover_finite_field": {"walltime": 64},
+  "sage.schemes.elliptic_curves.BSD": {"walltime": 8},
+  "sage.schemes.elliptic_curves.Qcurves": {"walltime": 8},
+  "sage.schemes.elliptic_curves.constructor": {"walltime": 32},
+  "sage.schemes.elliptic_curves.ell_curve_isogeny": {"walltime": 16},
+  "sage.schemes.elliptic_curves.ell_egros": {"walltime": 32},
+  "sage.schemes.elliptic_curves.ell_finite_field": {"walltime": 8},
+  "sage.schemes.elliptic_curves.ell_generic": {"walltime": 8},
+  "sage.schemes.elliptic_curves.ell_modular_symbols": {"walltime": 16},
+  "sage.schemes.elliptic_curves.ell_number_field": {"walltime": 128},
+  "sage.schemes.elliptic_curves.ell_point": {"walltime": 8},
+  "sage.schemes.elliptic_curves.ell_rational_field": {"walltime": 128},
+  "sage.schemes.elliptic_curves.gal_reps_number_field": {"walltime": 32},
+  "sage.schemes.elliptic_curves.gp_simon": {"walltime": 16},
+  "sage.schemes.elliptic_curves.heegner": {"walltime": 32},
+  "sage.schemes.elliptic_curves.height": {"walltime": 64},
+  "sage.schemes.elliptic_curves.isogeny_class": {"walltime": 32},
+  "sage.schemes.elliptic_curves.isogeny_small_degree": {"walltime": 256},
+  "sage.schemes.elliptic_curves.kraus": {"walltime": 16},
+  "sage.schemes.elliptic_curves.mod_sym_num": {"walltime": 8},
+  "sage.schemes.elliptic_curves.padic_lseries": {"walltime": 8},
+  "sage.schemes.elliptic_curves.padics": {"walltime": 16},
+  "sage.schemes.elliptic_curves.saturation": {"walltime": 16},
+  "sage.schemes.elliptic_curves.sha_tate": {"walltime": 32},
+  "sage.schemes.hyperelliptic_curves.hyperelliptic_finite_field": {"walltime": 64},
+  "sage.schemes.hyperelliptic_curves.hyperelliptic_generic": {"walltime": 8},
+  "sage.schemes.hyperelliptic_curves.hyperelliptic_padic_field": {"walltime": 32},
+  "sage.schemes.hyperelliptic_curves.monsky_washnitzer": {"walltime": 8},
+  "sage.schemes.projective.projective_rational_point": {"walltime": 8},
+  "sage.schemes.riemann_surfaces.riemann_surface": {"walltime": 64},
+  "sage.schemes.toric.chow_group": {"walltime": 8},
+  "sage.schemes.toric.sheaf.klyachko": {"walltime": 8},
+  "sage.stats.distributions.discrete_gaussian_integer": {"walltime": 8},
+  "sage.stats.time_series": {"walltime": 8},
+  "sage.structure.coerce_dict": {"walltime": 32},
   "sage.structure.element": {"walltime": 16},
-  "sage.symbolic.expression": {"walltime": 38},
-  "sage.symbolic.integration.integral": {"walltime": 35},
-  "sage.symbolic.random_tests": {"walltime": 31},
-  "sage.symbolic.relation": {"walltime": 11},
-  "sage.tests.book_schilling_zabrocki_kschur_primer": {"walltime": 36},
-  "sage.tests.book_stein_ent": {"walltime": 15},
-  "sage.tests.books.computational-mathematics-with-sagemath.combinat_doctest": {"walltime": 40},
-  "sage.tests.books.computational-mathematics-with-sagemath.float_doctest": {"walltime": 17},
-  "sage.tests.books.computational-mathematics-with-sagemath.graphique_doctest": {"walltime": 29},
-  "sage.tests.books.computational-mathematics-with-sagemath.integration_doctest": {"walltime": 28},
-  "sage.tests.books.computational-mathematics-with-sagemath.nonlinear_doctest": {"walltime": 11},
-  "sage.tests.books.computational-mathematics-with-sagemath.sol.graphique_doctest": {"walltime": 17},
-  "sage.tests.books.computational-mathematics-with-sagemath.sol.numbertheory_doctest": {"walltime": 14},
-  "sage.tests.books.computational-mathematics-with-sagemath.sol.polynomes_doctest": {"walltime": 19},
-  "sage.tests.cmdline": {"walltime": 44},
-  "sage.tests.gosper-sum": {"walltime": 11},
-  "sage.topology.simplicial_complex_examples": {"walltime": 14}
+  "sage.structure.sage_object": {"walltime": 8},
+  "sage.symbolic.expression": {"walltime": 32},
+  "sage.symbolic.integration.integral": {"walltime": 32},
+  "sage.symbolic.random_tests": {"walltime": 32},
+  "sage.symbolic.relation": {"walltime": 8},
+  "sage.tests.book_schilling_zabrocki_kschur_primer": {"walltime": 32},
+  "sage.tests.book_stein_ent": {"walltime": 16},
+  "sage.tests.books.computational-mathematics-with-sagemath.combinat_doctest": {"walltime": 32},
+  "sage.tests.books.computational-mathematics-with-sagemath.float_doctest": {"walltime": 16},
+  "sage.tests.books.computational-mathematics-with-sagemath.graphique_doctest": {"walltime": 32},
+  "sage.tests.books.computational-mathematics-with-sagemath.graphtheory_doctest": {"walltime": 8},
+  "sage.tests.books.computational-mathematics-with-sagemath.integration_doctest": {"walltime": 32},
+  "sage.tests.books.computational-mathematics-with-sagemath.mpoly_doctest": {"walltime": 8},
+  "sage.tests.books.computational-mathematics-with-sagemath.nonlinear_doctest": {"walltime": 8},
+  "sage.tests.books.computational-mathematics-with-sagemath.recequadiff_doctest": {"walltime": 8},
+  "sage.tests.books.computational-mathematics-with-sagemath.sol.graphique_doctest": {"walltime": 16},
+  "sage.tests.books.computational-mathematics-with-sagemath.sol.numbertheory_doctest": {"walltime": 16},
+  "sage.tests.books.computational-mathematics-with-sagemath.sol.polynomes_doctest": {"walltime": 16},
+  "sage.tests.cmdline": {"walltime": 64},
+  "sage.tests.gosper-sum": {"walltime": 16},
+  "sage.tests.parigp": {"walltime": 8},
+  "sage.topology.simplicial_complex": {"walltime": 8},
+  "sage.topology.simplicial_complex_examples": {"walltime": 16}
 }

From 4ae419192d759cafc2cabde5b63e4f59a4ac8769 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 13:05:37 -0300
Subject: [PATCH 52/63] New package: python3-memory_allocator-0.1.2

---
 srcpkgs/python3-memory_allocator/template | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 srcpkgs/python3-memory_allocator/template

diff --git a/srcpkgs/python3-memory_allocator/template b/srcpkgs/python3-memory_allocator/template
new file mode 100644
index 000000000000..e4fbb51478fa
--- /dev/null
+++ b/srcpkgs/python3-memory_allocator/template
@@ -0,0 +1,14 @@
+# Template file for 'python3-memory_allocator'
+pkgname=python3-memory_allocator
+version=0.1.2
+revision=1
+wrksrc=memory_allocator-$version
+build_style=python3-module
+hostmakedepends="python3-setuptools python3-Cython"
+makedepends="python3-devel"
+short_desc="Extension class to allocate memory easily with cython"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-3.0-or-later"
+homepage="https://github.com/kliem/memory_allocator"
+distfiles="${PYPI_SITE}/m/memory_allocator/memory_allocator-${version}.tar.gz"
+checksum=ddf42a2dcc678062f30c63c868335204d46a4ecdf4db0dc43ed4529f1d0ffab9

From 2d8ac143f29ad6c6b8039a3a8a60b8a401ef9e11 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 17:44:04 -0300
Subject: [PATCH 53/63] New package: python3-primecountpy-0.1.0

---
 srcpkgs/python3-primecountpy/template | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 srcpkgs/python3-primecountpy/template

diff --git a/srcpkgs/python3-primecountpy/template b/srcpkgs/python3-primecountpy/template
new file mode 100644
index 000000000000..fecc774b3983
--- /dev/null
+++ b/srcpkgs/python3-primecountpy/template
@@ -0,0 +1,16 @@
+# Template file for 'python3-primecountpy'
+pkgname=python3-primecountpy
+version=0.1.0
+revision=1
+wrksrc=primecountpy-${version}
+build_style=python3-module
+hostmakedepends="python3-setuptools python3-Cython"
+makedepends="python3-cysignals python3-devel primecount-devel pari-devel"
+short_desc="Python interface to the C++ library primecount"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-3.0-or-later"
+homepage="https://github.com/dimpase/primecountpy"
+distfiles="${PYPI_SITE}/p/primecountpy/primecountpy-${version}.tar.gz"
+checksum=78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
+
+make_check=no # no way to check before installing

From 74d4d7faaf0f58cd3298794e7b72b4543fa5136c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 20:02:33 -0300
Subject: [PATCH 54/63] New package: sage-data-combinatorial_designs-20140630

---
 srcpkgs/sage-data-combinatorial_designs/template | 16 ++++++++++++++++
 srcpkgs/sage-data-combinatorial_designs/update   |  1 +
 2 files changed, 17 insertions(+)
 create mode 100644 srcpkgs/sage-data-combinatorial_designs/template
 create mode 100644 srcpkgs/sage-data-combinatorial_designs/update

diff --git a/srcpkgs/sage-data-combinatorial_designs/template b/srcpkgs/sage-data-combinatorial_designs/template
new file mode 100644
index 000000000000..dcec3dbf554b
--- /dev/null
+++ b/srcpkgs/sage-data-combinatorial_designs/template
@@ -0,0 +1,16 @@
+# Template file for 'sage-data-combinatorial_designs'
+pkgname=sage-data-combinatorial_designs
+version=20140630
+revision=1
+wrksrc="combinatorial_designs-$version"
+short_desc="Data for combinatorial designs"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="Public Domain"
+homepage="https://mirrors.mit.edu/sage/spkg/upstream/combinatorial_designs/"
+distfiles="https://mirrors.mit.edu/sage/spkg/upstream/combinatorial_designs/combinatorial_designs-$version.tar.bz2"
+checksum=c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
+
+do_install() {
+	vmkdir usr/share/sagemath/combinatorial_designs
+	vcopy * usr/share/sagemath/combinatorial_designs
+}
diff --git a/srcpkgs/sage-data-combinatorial_designs/update b/srcpkgs/sage-data-combinatorial_designs/update
new file mode 100644
index 000000000000..d66b1a8e41a0
--- /dev/null
+++ b/srcpkgs/sage-data-combinatorial_designs/update
@@ -0,0 +1 @@
+pkgname=combinatorial_designs

From 24dd3b90c06747baf5f1544e248507c85402c7b2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 20:02:34 -0300
Subject: [PATCH 55/63] New package: sage-data-conway_polynomials-0.5

---
 srcpkgs/sage-data-conway_polynomials/template | 21 +++++++++++++++++++
 srcpkgs/sage-data-conway_polynomials/update   |  1 +
 2 files changed, 22 insertions(+)
 create mode 100644 srcpkgs/sage-data-conway_polynomials/template
 create mode 100644 srcpkgs/sage-data-conway_polynomials/update

diff --git a/srcpkgs/sage-data-conway_polynomials/template b/srcpkgs/sage-data-conway_polynomials/template
new file mode 100644
index 000000000000..57264da84c2f
--- /dev/null
+++ b/srcpkgs/sage-data-conway_polynomials/template
@@ -0,0 +1,21 @@
+# Template file for 'sage-data-conway_polynomials'
+pkgname=sage-data-conway_polynomials
+version=0.5
+revision=1
+wrksrc="conway_polynomials-$version"
+hostmakedepends="python3"
+short_desc="Database of Conway polynomials over finite fields"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="Public Domain, GPL-2.0-or-later"
+homepage="https://mirrors.mit.edu/sage/spkg/upstream/conway_polynomials/"
+distfiles="https://mirrors.mit.edu/sage/spkg/upstream/conway_polynomials/conway_polynomials-$version.tar.bz2
+ https://github.com/sagemath/sage/raw/9.4/build/pkgs/conway_polynomials/spkg-install.py"
+checksum="d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
+ da85e913282d059ca36e14cefc92f891da469e8d7127f13a1ce96c6fb5c296af"
+skip_extraction=spkg-install.py
+
+do_install() {
+	ln -s . src
+	SAGE_SHARE=${DESTDIR}/usr/share/sagemath PYTHONPATH=${PWD} \
+		python3 ${XBPS_SRCDISTDIR}/${pkgname}-${version}/spkg-install.py
+}
diff --git a/srcpkgs/sage-data-conway_polynomials/update b/srcpkgs/sage-data-conway_polynomials/update
new file mode 100644
index 000000000000..628e2749f014
--- /dev/null
+++ b/srcpkgs/sage-data-conway_polynomials/update
@@ -0,0 +1 @@
+pkgname=conway_polynomials

From a30dbe07d6f10bf6e41acf7861ff62d9078f6936 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 20:02:34 -0300
Subject: [PATCH 56/63] New package: sage-data-elliptic_curves-0.8.1

---
 srcpkgs/sage-data-elliptic_curves/template | 21 +++++++++++++++++++++
 srcpkgs/sage-data-elliptic_curves/update   |  1 +
 2 files changed, 22 insertions(+)
 create mode 100644 srcpkgs/sage-data-elliptic_curves/template
 create mode 100644 srcpkgs/sage-data-elliptic_curves/update

diff --git a/srcpkgs/sage-data-elliptic_curves/template b/srcpkgs/sage-data-elliptic_curves/template
new file mode 100644
index 000000000000..5103f9b87374
--- /dev/null
+++ b/srcpkgs/sage-data-elliptic_curves/template
@@ -0,0 +1,21 @@
+# Template file for 'sage-data-elliptic_curves'
+pkgname=sage-data-elliptic_curves
+version=0.8.1
+revision=1
+wrksrc="elliptic_curves-$version"
+hostmakedepends="python3"
+short_desc="Database of elliptic curves"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="Public Domain, GPL-2.0-or-later"
+homepage="https://mirrors.mit.edu/sage/spkg/upstream/elliptic_curves/"
+distfiles="https://mirrors.mit.edu/sage/spkg/upstream/elliptic_curves/elliptic_curves-$version.tar.bz2
+ https://github.com/sagemath/sage/raw/9.4/build/pkgs/elliptic_curves/spkg-install.py"
+checksum="5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
+ 856d482872f72db47c7b718761bb1a205947b276df99b55d087a57130932cf84"
+skip_extraction=spkg-install.py
+
+do_install() {
+	ln -s . src
+	SAGE_SHARE=${DESTDIR}/usr/share/sagemath \
+		python3 ${XBPS_SRCDISTDIR}/${pkgname}-${version}/spkg-install.py
+}
diff --git a/srcpkgs/sage-data-elliptic_curves/update b/srcpkgs/sage-data-elliptic_curves/update
new file mode 100644
index 000000000000..8155f52ce93b
--- /dev/null
+++ b/srcpkgs/sage-data-elliptic_curves/update
@@ -0,0 +1 @@
+pkgname=elliptic_curves

From 8341cfe0058686b69b3828740c53c563f7fa2fc1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 20:02:35 -0300
Subject: [PATCH 57/63] New package: sage-data-polytopes_db-20170220

---
 srcpkgs/sage-data-polytopes_db/template | 16 ++++++++++++++++
 srcpkgs/sage-data-polytopes_db/update   |  1 +
 2 files changed, 17 insertions(+)
 create mode 100644 srcpkgs/sage-data-polytopes_db/template
 create mode 100644 srcpkgs/sage-data-polytopes_db/update

diff --git a/srcpkgs/sage-data-polytopes_db/template b/srcpkgs/sage-data-polytopes_db/template
new file mode 100644
index 000000000000..d0f9f297d84b
--- /dev/null
+++ b/srcpkgs/sage-data-polytopes_db/template
@@ -0,0 +1,16 @@
+# Template file for 'sage-data-polytopes_db'
+pkgname=sage-data-polytopes_db
+version=20170220
+revision=1
+wrksrc="polytopes_db-$version"
+short_desc="Database of 2 and 3-dimensional reflexive polytopes"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="Public Domain"
+homepage="https://mirrors.mit.edu/sage/spkg/upstream/polytopes_db/"
+distfiles="https://mirrors.mit.edu/sage/spkg/upstream/polytopes_db/polytopes_db-$version.tar.bz2"
+checksum=cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
+
+do_install() {
+	vmkdir usr/share/sagemath/reflexive_polytopes
+	vcopy * usr/share/sagemath/reflexive_polytopes
+}
diff --git a/srcpkgs/sage-data-polytopes_db/update b/srcpkgs/sage-data-polytopes_db/update
new file mode 100644
index 000000000000..f51653b547fd
--- /dev/null
+++ b/srcpkgs/sage-data-polytopes_db/update
@@ -0,0 +1 @@
+pkgname=polytopes_db

From d7bdadcdfc5fa5bb51b1c5f0ee3a299ec06734b8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 20:02:35 -0300
Subject: [PATCH 58/63] New package: sage-data-graphs-20210214

---
 srcpkgs/sage-data-graphs/template | 16 ++++++++++++++++
 srcpkgs/sage-data-graphs/update   |  1 +
 2 files changed, 17 insertions(+)
 create mode 100644 srcpkgs/sage-data-graphs/template
 create mode 100644 srcpkgs/sage-data-graphs/update

diff --git a/srcpkgs/sage-data-graphs/template b/srcpkgs/sage-data-graphs/template
new file mode 100644
index 000000000000..9ca16b6cf53a
--- /dev/null
+++ b/srcpkgs/sage-data-graphs/template
@@ -0,0 +1,16 @@
+# Template file for 'sage-data-graphs'
+pkgname=sage-data-graphs
+version=20210214
+revision=1
+wrksrc="graphs-$version"
+short_desc="Database of graphs"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="Public Domain"
+homepage="https://mirrors.mit.edu/sage/spkg/upstream/graphs/"
+distfiles="https://mirrors.mit.edu/sage/spkg/upstream/graphs/graphs-$version.tar.bz2"
+checksum=07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
+
+do_install() {
+	vmkdir usr/share/sagemath/graphs
+	vcopy * usr/share/sagemath/graphs
+}
diff --git a/srcpkgs/sage-data-graphs/update b/srcpkgs/sage-data-graphs/update
new file mode 100644
index 000000000000..c5c7c7dd5253
--- /dev/null
+++ b/srcpkgs/sage-data-graphs/update
@@ -0,0 +1 @@
+pkgname=graphs

From 0dd2e7aecd69934145ca6aa0f47c8d2f4b60509f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 22:45:22 -0300
Subject: [PATCH 59/63] sagemath: all but two packages from system

---
 .../patches/zzz-remove_ratpoints.patch        | 887 ++++++++++++++++++
 srcpkgs/sagemath/template                     | 152 +--
 2 files changed, 970 insertions(+), 69 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/zzz-remove_ratpoints.patch

diff --git a/srcpkgs/sagemath/patches/zzz-remove_ratpoints.patch b/srcpkgs/sagemath/patches/zzz-remove_ratpoints.patch
new file mode 100644
index 000000000000..0842d9d7f6d5
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-remove_ratpoints.patch
@@ -0,0 +1,887 @@
+From 3178a5e1e4f7174343fd913494ae255b3e05fb85 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Mon, 17 Jan 2022 21:04:42 -0300
+Subject: [PATCH] ratpoints: remove deprecated package
+
+---
+ .github/workflows/ci-cygwin-minimal.yml       |   2 +-
+ .github/workflows/ci-cygwin-standard.yml      |   2 +-
+ COPYING.txt                                   |   1 -
+ build/pkgs/ratpoints/SPKG.rst                 |  29 --
+ build/pkgs/ratpoints/checksums.ini            |   4 -
+ build/pkgs/ratpoints/dependencies             |   5 -
+ build/pkgs/ratpoints/distros/arch.txt         |   1 -
+ build/pkgs/ratpoints/distros/conda.txt        |   1 -
+ build/pkgs/ratpoints/distros/debian.txt       |   1 -
+ build/pkgs/ratpoints/distros/nix.txt          |   1 -
+ build/pkgs/ratpoints/distros/repology.txt     |   1 -
+ build/pkgs/ratpoints/package-version.txt      |   1 -
+ build/pkgs/ratpoints/patches/Makefile.patch   |  37 ---
+ .../patches/sturm_and_rp_private.patch        | 194 ------------
+ build/pkgs/ratpoints/spkg-install.in          |  46 ---
+ build/pkgs/ratpoints/type                     |   1 -
+ build/pkgs/sagelib/dependencies               |   2 +-
+ src/sage/libs/ratpoints.pxd                   |  74 -----
+ src/sage/libs/ratpoints.pyx                   | 283 ------------------
+ .../elliptic_curves/descent_two_isogeny.pyx   |   2 -
+ src/sage_setup/library_order.py               |   2 +-
+ 21 files changed, 4 insertions(+), 686 deletions(-)
+ delete mode 100644 build/pkgs/ratpoints/SPKG.rst
+ delete mode 100644 build/pkgs/ratpoints/checksums.ini
+ delete mode 100644 build/pkgs/ratpoints/dependencies
+ delete mode 100644 build/pkgs/ratpoints/distros/arch.txt
+ delete mode 100644 build/pkgs/ratpoints/distros/conda.txt
+ delete mode 100644 build/pkgs/ratpoints/distros/debian.txt
+ delete mode 100644 build/pkgs/ratpoints/distros/nix.txt
+ delete mode 100644 build/pkgs/ratpoints/distros/repology.txt
+ delete mode 100644 build/pkgs/ratpoints/package-version.txt
+ delete mode 100644 build/pkgs/ratpoints/patches/Makefile.patch
+ delete mode 100644 build/pkgs/ratpoints/patches/sturm_and_rp_private.patch
+ delete mode 100644 build/pkgs/ratpoints/spkg-install.in
+ delete mode 100644 build/pkgs/ratpoints/type
+ delete mode 100644 src/sage/libs/ratpoints.pxd
+ delete mode 100644 src/sage/libs/ratpoints.pyx
+
+diff --git a/.github/workflows/ci-cygwin-minimal.yml b/.github/workflows/ci-cygwin-minimal.yml
+index 9e847e7474..9df1365657 100644
+--- a/.github/workflows/ci-cygwin-minimal.yml
++++ b/.github/workflows/ci-cygwin-minimal.yml
+@@ -217,7 +217,7 @@ jobs:
+     env:
+       STAGE: ii-b
+       PREVIOUS_STAGES: i-*
+-      TARGETS: singular maxima gap pari gfan palp flintqs ratpoints arb ecm givaro
++      TARGETS: singular maxima gap pari gfan palp flintqs arb ecm givaro
+       LOCAL_ARTIFACT_NAME: sage-local-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
+       LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
+ 
+diff --git a/.github/workflows/ci-cygwin-standard.yml b/.github/workflows/ci-cygwin-standard.yml
+index cbbe0f46a8..8aee1c2c3c 100644
+--- a/.github/workflows/ci-cygwin-standard.yml
++++ b/.github/workflows/ci-cygwin-standard.yml
+@@ -217,7 +217,7 @@ jobs:
+     env:
+       STAGE: ii-b
+       PREVIOUS_STAGES: i-*
+-      TARGETS: singular maxima gap pari gfan palp flintqs ratpoints arb ecm givaro
++      TARGETS: singular maxima gap pari gfan palp flintqs arb ecm givaro
+       LOCAL_ARTIFACT_NAME: sage-local-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
+       LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
+ 
+diff --git a/COPYING.txt b/COPYING.txt
+index 1176a856a0..a3e9cc6645 100644
+--- a/COPYING.txt
++++ b/COPYING.txt
+@@ -107,7 +107,6 @@ pynac                       GPLv2+
+ pyparsing                   MIT License
+ python                      Python License (see below)
+ R                           GPLv2+
+-ratpoints                   GPLv2+
+ readline                    GPLv3+
+ rpy                         GPLv2+
+ rubiks/dietz                GPL, any version
+diff --git a/build/pkgs/ratpoints/SPKG.rst b/build/pkgs/ratpoints/SPKG.rst
+deleted file mode 100644
+index 6607094bec..0000000000
+--- a/build/pkgs/ratpoints/SPKG.rst
++++ /dev/null
+@@ -1,29 +0,0 @@
+-ratpoints: Find rational points on hyperelliptic curves
+-=======================================================
+-
+-Description
+------------
+-
+-Michael Stoll's program which searches for rational points on
+-hyperelliptic curves.
+-
+-NOTE: the ratpoints package has been assimilated by PARI/GP. Therefore,
+-this package (as Sage package) is deprecated. In the future, it will be
+-removed from Sage.
+-
+-
+-Upstream Contact
+-----------------
+-
+--  Author: Michael Stoll
+--  Email: Michael.Stoll@uni-bayreuth.de
+--  Website: http://www.mathe2.uni-bayreuth.de/stoll/programs/
+-
+-
+-Note on SSE2 instructions
+-~~~~~~~~~~~~~~~~~~~~~~~~~
+-
+--  On several architectures, the SSE2 instructions used by ratpoints
+-   cause
+-   compiler errors. In the case that ratpoints fails to build with SSE2
+-   instructions enabled, the build is repeated with SSE2 disabled.
+diff --git a/build/pkgs/ratpoints/checksums.ini b/build/pkgs/ratpoints/checksums.ini
+deleted file mode 100644
+index 46ba1c9ec1..0000000000
+--- a/build/pkgs/ratpoints/checksums.ini
++++ /dev/null
+@@ -1,4 +0,0 @@
+-tarball=ratpoints-VERSION.tar.bz2
+-sha1=14fbc3dd50742794e0b33d2dd1217e5dd8ad2623
+-md5=9bf091d1b90132433f0a1fc6b585d024
+-cksum=670991933
+diff --git a/build/pkgs/ratpoints/dependencies b/build/pkgs/ratpoints/dependencies
+deleted file mode 100644
+index 9a77ea16f7..0000000000
+--- a/build/pkgs/ratpoints/dependencies
++++ /dev/null
+@@ -1,5 +0,0 @@
+-$(MP_LIBRARY)
+-
+-----------
+-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/ratpoints/distros/arch.txt b/build/pkgs/ratpoints/distros/arch.txt
+deleted file mode 100644
+index e137758627..0000000000
+--- a/build/pkgs/ratpoints/distros/arch.txt
++++ /dev/null
+@@ -1 +0,0 @@
+-ratpoints
+diff --git a/build/pkgs/ratpoints/distros/conda.txt b/build/pkgs/ratpoints/distros/conda.txt
+deleted file mode 100644
+index e137758627..0000000000
+--- a/build/pkgs/ratpoints/distros/conda.txt
++++ /dev/null
+@@ -1 +0,0 @@
+-ratpoints
+diff --git a/build/pkgs/ratpoints/distros/debian.txt b/build/pkgs/ratpoints/distros/debian.txt
+deleted file mode 100644
+index dabd28d624..0000000000
+--- a/build/pkgs/ratpoints/distros/debian.txt
++++ /dev/null
+@@ -1 +0,0 @@
+-libratpoints-dev
+diff --git a/build/pkgs/ratpoints/distros/nix.txt b/build/pkgs/ratpoints/distros/nix.txt
+deleted file mode 100644
+index e137758627..0000000000
+--- a/build/pkgs/ratpoints/distros/nix.txt
++++ /dev/null
+@@ -1 +0,0 @@
+-ratpoints
+diff --git a/build/pkgs/ratpoints/distros/repology.txt b/build/pkgs/ratpoints/distros/repology.txt
+deleted file mode 100644
+index e137758627..0000000000
+--- a/build/pkgs/ratpoints/distros/repology.txt
++++ /dev/null
+@@ -1 +0,0 @@
+-ratpoints
+diff --git a/build/pkgs/ratpoints/package-version.txt b/build/pkgs/ratpoints/package-version.txt
+deleted file mode 100644
+index efed46a7bd..0000000000
+--- a/build/pkgs/ratpoints/package-version.txt
++++ /dev/null
+@@ -1 +0,0 @@
+-2.1.3.p5
+diff --git a/build/pkgs/ratpoints/patches/Makefile.patch b/build/pkgs/ratpoints/patches/Makefile.patch
+deleted file mode 100644
+index 093d7c0018..0000000000
+--- a/build/pkgs/ratpoints/patches/Makefile.patch
++++ /dev/null
+@@ -1,37 +0,0 @@
+---- src/Makefile	2009-10-01 01:08:54.000000000 +0200
+-+++ patches/Makefile	2012-03-17 13:57:33.026315142 +0100
+-@@ -21,11 +21,11 @@
+- #
+- #    Michael Stoll, September 21, 2009
+- 
+--CC = gcc
+-+CC ?= gcc
+- RM = rm -f
+- INSTALL = cp
+- 
+--INSTALL_DIR = /usr/local
+-+INSTALL_DIR ?= /usr/local
+- 
+- DISTFILES = Makefile ratpoints.h rp-private.h primes.h \
+-             gen_find_points_h.c gen_init_sieve_h.c \
+-@@ -47,14 +47,14 @@
+- 	diff -q testbase rptest.out
+- 
+- install-bin: ratpoints
+--	${INSTALL} ratpoints ${INSTALL_DIR}/bin/
+--	chmod 755 ${INSTALL_DIR}/bin/ratpoints
+-+	${INSTALL} ratpoints "${INSTALL_DIR}/bin/"
+-+	chmod 755 "${INSTALL_DIR}/bin/ratpoints"
+- 
+- install-lib: ratpoints.h libratpoints.a
+--	${INSTALL} ratpoints.h ${INSTALL_DIR}/include/
+--	chmod 644 ${INSTALL_DIR}/include/ratpoints.h
+--	${INSTALL} libratpoints.a ${INSTALL_DIR}/lib/
+--	chmod 644 ${INSTALL_DIR}/lib/libratpoints.a
+-+	${INSTALL} ratpoints.h "${INSTALL_DIR}/include/"
+-+	chmod 644 "${INSTALL_DIR}/include/ratpoints.h"
+-+	${INSTALL} libratpoints.a "${INSTALL_DIR}/lib/"
+-+	chmod 644 "${INSTALL_DIR}/lib/libratpoints.a"
+- 
+- install: install-bin install-lib
+- 
+diff --git a/build/pkgs/ratpoints/patches/sturm_and_rp_private.patch b/build/pkgs/ratpoints/patches/sturm_and_rp_private.patch
+deleted file mode 100644
+index 664198c4de..0000000000
+--- a/build/pkgs/ratpoints/patches/sturm_and_rp_private.patch
++++ /dev/null
+@@ -1,194 +0,0 @@
+-diff --git a/rp-private.h b/rp-private.h
+-index b4c7dad..0c7193e 100644
+---- a/rp-private.h
+-+++ b/rp-private.h
+-@@ -36,7 +36,7 @@
+- #define LONG_SHIFT ((LONG_LENGTH == 16) ? 4 : \
+-                     (LONG_LENGTH == 32) ? 5 : \
+- 		    (LONG_LENGTH == 64) ? 6 : 0)
+--#define LONG_MASK (~(-1L<<LONG_SHIFT))
+-+#define LONG_MASK (~(-(1L<<LONG_SHIFT)))
+- 
+- /* Check if SSE instructions can be used.
+-    We assume that one SSE word of 128 bit is two long's,
+-diff --git a/sturm.c b/sturm.c
+-index c78d7c6..5fd2cf5 100644
+---- a/sturm.c
+-+++ b/sturm.c
+-@@ -27,7 +27,6 @@
+-  ***********************************************************************/
+- 
+- #include "ratpoints.h"
+--
+- /**************************************************************************
+-  * Arguments of _ratpoints_compute_sturm() : (from the args argument)     *
+-  *                                                                        *
+-@@ -53,7 +52,7 @@
+- /* A helper function: evaluate the polynomial in cofs[] of given degree
+-   at num/2^denexp and return the sign. */
+- 
+--static long eval_sign(ratpoints_args *args, mpz_t *cofs, long degree,
+-+static long eval_sign(const ratpoints_args *args, const mpz_t *cofs, long degree,
+-                       long num, long denexp)
+- {
+-   long n, e, s;
+-@@ -70,11 +69,80 @@ static long eval_sign(ratpoints_args *args, mpz_t *cofs, long degree,
+-   return(s);
+- }
+- 
+-+static const    long max = (long)(((unsigned long)(-1))>>1);
+-+static const    long min = (long)(-(((unsigned long)(-1))>>1));
+-+    /* recursive helper function */
+-+static void iterate(long nl, long nr, long del, long der, long cleft, long cright,
+-+                 long sl, long sr, long depth,
+-+		 ratpoints_interval **iptr, const ratpoints_interval *ivlo,
+-+		 const ratpoints_args *args, const long k, const long sturm_degs[],
+-+                 const mpz_t sturm[][args->degree + 1])
+-+    { /* nl/2^del, nr/2^der : interval left/right endpoints,
+-+         cleft, cright: sign change counts at endpoints,
+-+         sl, sr: signs at endpoints,
+-+         depth: iteration depth */
+-+     long iter = args->sturm;
+-+      if(cleft == cright && sl < 0) { return; }
+-+         /* here we know the polynomial is negative on the interval */
+-+      if((cleft == cright && sl > 0) || depth >= iter)
+-+      /* we have to add/extend an interval if we either know that
+-+         the polynomial is positive on the interval (first condition)
+-+         or the maximal iteration depth has been reached (second condition) */
+-+      { double l = ((double)nl)/((double)(1<<del));
+-+        double u = ((double)nr)/((double)(1<<der));
+-+        if(*iptr == ivlo)
+-+        { (*iptr)->low = l; (*iptr)->up  = u; (*iptr)++; }
+-+        else
+-+        { if(((*iptr)-1)->up == l) /* extend interval */
+-+          { ((*iptr)-1)->up = u; }
+-+          else /* new interval */
+-+          { (*iptr)->low = l; (*iptr)->up  = u; (*iptr)++; }
+-+        }
+-+        return;
+-+      }
+-+      /* now we must split the interval and evaluate the sturm sequence
+-+         at the midpoint */
+-+      { long nm, dem, s0, s1, s2, s, cmid = 0, n;
+-+        if(nl == min)
+-+        { if(nr == max) { nm = 0; dem = 0; }
+-+          else { nm = (nr == 0) ? -1 : 2*nr; dem = 0; }
+-+        }
+-+        else
+-+        { if(nr == max) { nm = (nl == 0) ? 1 : 2*nl; dem = 0; }
+-+          else /* "normal" case */
+-+          { if(del == der) /* then both are zero */
+-+            { if(((nl+nr) & 1) == 0) { nm = (nl+nr)>>1; dem = 0; }
+-+              else { nm = nl+nr; dem = 1; }
+-+            }
+-+            else /* here one de* is greater */
+-+            { if(del > der) { nm = nl + (nr<<(del-der)); dem = del+1; }
+-+              else { nm = (nl<<(der-del)) + nr; dem = der+1; }
+-+            }
+-+          }
+-+        }
+-+        s0 = eval_sign(args, sturm[0], sturm_degs[0], nm, dem);
+-+        s1 = eval_sign(args, sturm[1], sturm_degs[1], nm, dem);
+-+        if(s0*s1 == -1) { cmid++; }
+-+        s = (s1 == 0) ? s0 : s1;
+-+        for(n = 2; n <= k; n++)
+-+        { s2 = eval_sign(args, sturm[n], sturm_degs[n], nm, dem);
+-+          if(s2 == -s) { cmid++; s = s2; }
+-+          else if(s2 != 0) { s = s2; }
+-+        }
+-+        /* now recurse */
+-+        iterate(nl, nm, del, dem, cleft, (s0==0) ? (cmid+1) : cmid,
+-+                sl, (s0==0) ? -s1 : s0, depth+1,
+-+                iptr, ivlo, args, k, sturm_degs, sturm);
+-+        iterate(nm, nr, dem, der, cmid, cright,
+-+                (s0==0) ? s1 : s0, sr, depth+1,
+-+		iptr, ivlo, args, k, sturm_degs, sturm);
+-+      }
+-+    } /* end iterate() */
+-+
+- long _ratpoints_compute_sturm(ratpoints_args *args)
+- { 
+-   mpz_t *cofs = args->cof;
+-   long degree = args->degree;
+--  long iter = args->sturm; 
+-   ratpoints_interval *ivlist = args->domain;
+-   long num_iv = args->num_inter;
+-   long n, m, k, new_num;
+-@@ -165,75 +233,12 @@ long _ratpoints_compute_sturm(ratpoints_args *args)
+-   /* recall: typedef struct {double low; double up;} ratpoints_interval; */
+-   { ratpoints_interval ivlocal[1 + (degree>>1)];
+-     ratpoints_interval *iptr = &ivlocal[0];
+--    long max = (long)(((unsigned long)(-1))>>1);
+--    long min = -max;
+-     long num_intervals;
+-     long slcf = mpz_cmp_si(cofs[degree], 0);
+- 
+--    /* recursive helper function */
+--    void iterate(long nl, long nr, long del, long der, long cleft, long cright,
+--                 long sl, long sr, long depth)
+--    { /* nl/2^del, nr/2^der : interval left/right endpoints,
+--         cleft, cright: sign change counts at endpoints,
+--         sl, sr: signs at endpoints,
+--         depth: iteration depth */
+--      if(cleft == cright && sl < 0) { return; }
+--         /* here we know the polynomial is negative on the interval */
+--      if((cleft == cright && sl > 0) || depth >= iter) 
+--      /* we have to add/extend an interval if we either know that
+--         the polynomial is positive on the interval (first condition)
+--         or the maximal iteration depth has been reached (second condition) */
+--      { double l = ((double)nl)/((double)(1<<del));
+--        double u = ((double)nr)/((double)(1<<der));
+--        if(iptr == &ivlocal[0])
+--        { iptr->low = l; iptr->up  = u; iptr++; }
+--        else
+--        { if((iptr-1)->up == l) /* extend interval */
+--          { (iptr-1)->up = u; }
+--          else /* new interval */
+--          { iptr->low = l; iptr->up  = u; iptr++; }
+--        }
+--        return; 
+--      }
+--      /* now we must split the interval and evaluate the sturm sequence
+--         at the midpoint */
+--      { long nm, dem, s0, s1, s2, s, cmid = 0, n;
+--        if(nl == min)
+--        { if(nr == max) { nm = 0; dem = 0; }
+--          else { nm = (nr == 0) ? -1 : 2*nr; dem = 0; }
+--        }
+--        else
+--        { if(nr == max) { nm = (nl == 0) ? 1 : 2*nl; dem = 0; } 
+--          else /* "normal" case */
+--          { if(del == der) /* then both are zero */
+--            { if(((nl+nr) & 1) == 0) { nm = (nl+nr)>>1; dem = 0; }
+--              else { nm = nl+nr; dem = 1; } 
+--            }
+--            else /* here one de* is greater */
+--            { if(del > der) { nm = nl + (nr<<(del-der)); dem = del+1; }
+--              else { nm = (nl<<(der-del)) + nr; dem = der+1; }
+--            }
+--          }
+--        }
+--        s0 = eval_sign(args, sturm[0], sturm_degs[0], nm, dem);
+--        s1 = eval_sign(args, sturm[1], sturm_degs[1], nm, dem);
+--        if(s0*s1 == -1) { cmid++; }
+--        s = (s1 == 0) ? s0 : s1;
+--        for(n = 2; n <= k; n++)
+--        { s2 = eval_sign(args, sturm[n], sturm_degs[n], nm, dem);
+--          if(s2 == -s) { cmid++; s = s2; }
+--          else if(s2 != 0) { s = s2; }
+--        }
+--        /* now recurse */
+--        iterate(nl, nm, del, dem, cleft, (s0==0) ? (cmid+1) : cmid, 
+--                sl, (s0==0) ? -s1 : s0, depth+1);
+--        iterate(nm, nr, dem, der, cmid, cright, 
+--                (s0==0) ? s1 : s0, sr, depth+1);
+--      }
+--    } /* end iterate() */
+--
+-     iterate(min, max, 0, 0, count2, count1, 
+--            (degree & 1) ? -slcf : slcf, slcf, 0);
+-+            (degree & 1) ? -slcf : slcf, slcf, 0,
+-+	    &iptr, &ivlocal[0], args, k, sturm_degs, sturm);
+-     num_intervals = iptr - &ivlocal[0];
+-     /* intersect with given intervals */
+-     { ratpoints_interval local_copy[num_iv];
+diff --git a/build/pkgs/ratpoints/spkg-install.in b/build/pkgs/ratpoints/spkg-install.in
+deleted file mode 100644
+index b6856c4d4a..0000000000
+--- a/build/pkgs/ratpoints/spkg-install.in
++++ /dev/null
+@@ -1,46 +0,0 @@
+-PRIME_SIZE=7
+-
+-CCFLAGS_NO_SSE="-I$SAGE_LOCAL/include -Wall -O2 -fPIC -DRATPOINTS_MAX_BITS_IN_PRIME=$PRIME_SIZE"
+-CCFLAGS2="-L$SAGE_LOCAL/lib -lgmp -lm $LDFLAGS"
+-CCFLAGS3="-L. -lratpoints"
+-
+-if [[ "$UNAME" = "Darwin" ]]; then
+-    CCFLAGS1="$CCFLAGS_NO_SSE"
+-    echo "Building without SSE2 instructions (MacOS X)."
+-else
+-    CCFLAGS1="$CCFLAGS_NO_SSE -DUSE_SSE"
+-    echo "Attempting to build ratpoints making use of SSE2 instructions."
+-fi
+-
+-# Copy CFLAGS set externally to CCFLAGS.
+-CCFLAGS="$CFLAGS"
+-
+-export CCFLAGS1
+-export CCFLAGS2
+-export CCFLAGS3
+-export CCFLAGS
+-
+-cd src/
+-
+-#############################
+-# Build (just) the library: #
+-#############################
+-
+-# PLEASE, don't break this again by deleting "libratpoints.a".  See trac 8267.
+-if ! $MAKE libratpoints.a; then
+-    [ "$UNAME" = "Darwin" ] && sdh_die "Error building ratpoints."
+-    echo "Build failed. Trying without SSE2 instructions."
+-    CCFLAGS1="$CCFLAGS_NO_SSE"
+-    sdh_make libratpoints.a
+-fi
+-
+-##############################################
+-# Install (just) the library and its header: #
+-##############################################
+-
+-# The following requires that the Makefile got patched;
+-# otherwise one could pass 'INSTALL_DIR=...' on the 'make'
+-# command line:
+-export INSTALL_DIR="$SAGE_DESTDIR_LOCAL"
+-mkdir -p "$INSTALL_DIR"/{lib,include}
+-sdh_make install-lib
+diff --git a/build/pkgs/ratpoints/type b/build/pkgs/ratpoints/type
+deleted file mode 100644
+index a6a7b9cd72..0000000000
+--- a/build/pkgs/ratpoints/type
++++ /dev/null
+@@ -1 +0,0 @@
+-standard
+diff --git a/build/pkgs/sagelib/dependencies b/build/pkgs/sagelib/dependencies
+index 9c7797b1f4..6a7d4b8132 100644
+--- a/build/pkgs/sagelib/dependencies
++++ b/build/pkgs/sagelib/dependencies
+@@ -1,4 +1,4 @@
+-FORCE $(SCRIPTS) arb boost_cropped $(BLAS) brial cliquer cypari cysignals cython ecl eclib ecm flint libgd gap giac givaro glpk gmpy2 gsl iml jinja2 jupyter_core lcalc lrcalc libbraiding libhomfly libpng linbox m4ri m4rie memory_allocator mpc mpfi mpfr $(MP_LIBRARY) ntl numpy pari pip pkgconfig planarity ppl pplpy primesieve primecount primecountpy pycygwin $(PYTHON) ratpoints requests rw sage_conf singular symmetrica zn_poly $(PCFILES) | $(PYTHON_TOOLCHAIN) sage_setup
++FORCE $(SCRIPTS) arb boost_cropped $(BLAS) brial cliquer cypari cysignals cython ecl eclib ecm flint libgd gap giac givaro glpk gmpy2 gsl iml jinja2 jupyter_core lcalc lrcalc libbraiding libhomfly libpng linbox m4ri m4rie memory_allocator mpc mpfi mpfr $(MP_LIBRARY) ntl numpy pari pip pkgconfig planarity ppl pplpy primesieve primecount primecountpy pycygwin $(PYTHON) requests rw sage_conf singular symmetrica zn_poly $(PCFILES) | $(PYTHON_TOOLCHAIN) sage_setup
+ 
+ ----------
+ All lines of this file are ignored except the first.
+diff --git a/src/sage/libs/ratpoints.pxd b/src/sage/libs/ratpoints.pxd
+deleted file mode 100644
+index 67e309b109..0000000000
+--- a/src/sage/libs/ratpoints.pxd
++++ /dev/null
+@@ -1,74 +0,0 @@
+-from sage.rings.integer cimport Integer
+-from sage.libs.gmp.mpz cimport *
+-
+-cdef extern from "ratpoints.h":
+-    long RATPOINTS_MAX_DEGREE
+-    long RATPOINTS_ARRAY_SIZE
+-    long RATPOINTS_DEFAULT_SP1
+-    long RATPOINTS_DEFAULT_SP2
+-    long RATPOINTS_DEFAULT_NUM_PRIMES
+-    long RATPOINTS_DEFAULT_MAX_FORBIDDEN
+-    long RATPOINTS_DEFAULT_STURM
+-    long RATPOINTS_NON_SQUAREFREE
+-    long RATPOINTS_BAD_ARGS
+-
+-    # for args flags:
+-    long RATPOINTS_NO_CHECK # when set, do not check whether the surviving
+-                            # x-coordinates give rise to rational points
+-    long RATPOINTS_NO_Y # when set, only list x coordinates instead of actual points
+-    long RATPOINTS_NO_REVERSE # when set, do not modify the mpz_t array
+-    long RATPOINTS_NO_JACOBI # when set, prevent use of Jacobi symbol test
+-    long RATPOINTS_VERBOSE # when set, print some output on what ratpoints is doing
+-    # define RATPOINTS_FLAGS_INPUT_MASK \
+-    # (RATPOINTS_NO_CHECK | RATPOINTS_NO_Y | RATPOINTS_NO_REVERSE | \
+-    #  RATPOINTS_NO_JACOBI | RATPOINTS_VERBOSE)
+-
+-
+-    ctypedef struct ratpoints_interval:
+-        double low
+-        double up
+-    ctypedef struct ratpoints_args:
+-        mpz_t *cof
+-        long degree
+-        long height
+-        ratpoints_interval *domain
+-        long num_inter
+-        long b_low
+-        long b_high
+-        long sp1
+-        long sp2
+-        long array_size
+-        long sturm
+-        long num_primes
+-        long max_forbidden
+-        unsigned int flags
+-        # from here: private data
+-        # mpz_t *work
+-        # void *se_buffer
+-        # void *se_next
+-        # void *ba_buffer
+-        # void *ba_next
+-        # int *int_buffer
+-        # int *int_next
+-        # void *sieve_list
+-    long find_points(ratpoints_args*, int proc(long, long, mpz_t, void*, int*), void*)
+-    void find_points_init(ratpoints_args*)
+-    long find_points_work(ratpoints_args*, int proc(long, long, mpz_t, void*, int*), void*)
+-    void find_points_clear(ratpoints_args*)
+-
+-ctypedef struct point_list:
+-    long *xes
+-    mpz_t *ys
+-    long *zs
+-    long array_size
+-    long num_points
+-    long max_num_points
+-
+-ctypedef struct info_struct_exists_only:
+-    int verbose
+-
+-cdef int ratpoints_mpz_exists_only(mpz_t *, long, int, bint) except -1
+-
+-
+-
+-
+diff --git a/src/sage/libs/ratpoints.pyx b/src/sage/libs/ratpoints.pyx
+deleted file mode 100644
+index 257dfe3eeb..0000000000
+--- a/src/sage/libs/ratpoints.pyx
++++ /dev/null
+@@ -1,283 +0,0 @@
+-# distutils: libraries = ratpoints
+-r"""
+-Hyperelliptic Curve Point Finding, via ratpoints (deprecated)
+-
+-This module is deprecated, use PARI instead::
+-
+-    sage: pari(EllipticCurve("389a1")).ellratpoints(4)
+-    [[-2, 0], [-2, -1], [-1, 1], [-1, -2], [0, 0], [0, -1], [1, 0], [1, -1], [3, 5], [3, -6], [4, 8], [4, -9], [-3/4, 7/8], [-3/4, -15/8]]
+-    sage: pari("[x^3 + x^2 - 2*x, 1]").hyperellratpoints(4)
+-    [[-2, 0], [-2, -1], [-1, 1], [-1, -2], [0, 0], [0, -1], [1, 0], [1, -1], [3, 5], [3, -6], [4, 8], [4, -9], [-3/4, 7/8], [-3/4, -15/8]]
+-"""
+-
+-from cysignals.memory cimport sig_malloc, sig_realloc, sig_free
+-from cysignals.signals cimport sig_on, sig_off
+-
+-from sage.misc.superseded import deprecation_cython as deprecation
+-deprecation(24531, "the module sage.libs.ratpoints is deprecated; use pari.ellratpoints or pari.hyperellratpoints instead")
+-
+-
+-cdef int process(long x, long z, mpz_t y, void *info0, int *quit):
+-    # ratpoints calls this function when it finds a point [x : y : z]
+-    # info0 is the pointer passed to ratpoints originally
+-    # if quit[0] is set to a nonzero value, ratpoints will abort immediately
+-    cdef point_list *plist = <point_list *> info0
+-    cdef long i
+-    if plist.array_size == plist.num_points:
+-        i = plist.array_size
+-        plist.array_size *= 2
+-        plist.xes = <long *> sig_realloc(plist.xes, plist.array_size * sizeof(long))
+-        plist.ys = <mpz_t *> sig_realloc(plist.ys, plist.array_size * sizeof(mpz_t))
+-        plist.zs = <long *> sig_realloc(plist.zs, plist.array_size * sizeof(long))
+-        while i < plist.array_size:
+-            mpz_init(plist.ys[i])
+-            i += 1
+-    plist.xes[plist.num_points] = x
+-    mpz_set(plist.ys[plist.num_points], y)
+-    plist.zs[plist.num_points] = z
+-    plist.num_points += 1
+-    if plist.max_num_points > 0:
+-        if plist.max_num_points == plist.num_points:
+-            quit[0] = -1
+-    return 1 # weight for counting the points
+-
+-def ratpoints(list coeffs, long H, verbose=False, long max=0,
+-              min_x_denom=None, max_x_denom=None, intervals=[]):
+-    """
+-    Access the ratpoints library to find points on the hyperelliptic curve:
+-
+-    `y^2 = a_n x^n + \cdots + a_1 x + a_0.`
+-
+-    INPUT:
+-
+-    - ``coeffs`` -- list of integer coefficients `a_0` , `a_1`, ..., `a_n`
+-
+-    - ``H`` -- the bound for the denominator and the absolute value of the
+-      numerator of the `x`-coordinate
+-
+-    - ``verbose`` -- if ``True``, ratpoints will print comments about
+-      its progress
+-
+-    - ``max`` -- maximum number of points to find (if 0, find all of them)
+-
+-    OUTPUT:
+-
+-    The points output by this program are points in (1, ceil(n/2), 1)-weighted
+-    projective space. If n is even, then the associated homogeneous equation is
+-    `y^2 = a_n x^n + \cdots + a_1 x z^{n-1} + a_0 z^n` while if n is odd, it is
+-    `y^2 = a_n x^n z + \cdots + a_1 x z^n + a_0 z^{n+1}`.
+-
+-    EXAMPLES::
+-
+-        sage: from sage.libs.ratpoints import ratpoints
+-        doctest:...: DeprecationWarning: the module sage.libs.ratpoints is deprecated; use pari.ellratpoints or pari.hyperellratpoints instead
+-        See http://trac.sagemath.org/24531 for details.
+-        sage: for x,y,z in ratpoints([1..6], 200):
+-        ....:     print(-1*y^2 + 1*z^6 + 2*x*z^5 + 3*x^2*z^4 + 4*x^3*z^3 + 5*x^4*z^2 + 6*x^5*z)
+-        0
+-        0
+-        0
+-        0
+-        0
+-        0
+-        0
+-        sage: for x,y,z in ratpoints([1..5], 200):
+-        ....:    print(-1*y^2 + 1*z^4 + 2*x*z^3 + 3*x^2*z^2 + 4*x^3*z + 5*x^4)
+-        0
+-        0
+-        0
+-        0
+-        0
+-        0
+-        0
+-        0
+-
+-        sage: for x,y,z in ratpoints([1..200], 1000):
+-        ....:    print("{} {} {}".format(x,y,z))
+-        1 0 0
+-        0 1 1
+-        0 -1 1
+-        201 25353012004564588029934064107520000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 200
+-        201 -25353012004564588029934064107520000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 200
+-
+-    The denominator of `x` can be restricted, for example to find
+-    integral points::
+-
+-        sage: from sage.libs.ratpoints import ratpoints
+-        sage: coeffs = [400, -112, 0, 1]
+-        sage: ratpoints(coeffs, 10^6, max_x_denom=1, intervals=[[-10,0],[1000,2000]])
+-        [(1, 0, 0), (-8, 28, 1), (-8, -28, 1), (-7, 29, 1), (-7, -29, 1),
+-         (-4, 28, 1), (-4, -28, 1), (0, 20, 1), (0, -20, 1), (1368, 50596, 1),
+-         (1368, -50596, 1), (1624, 65444, 1), (1624, -65444, 1)]
+-
+-        sage: ratpoints(coeffs, 1000, min_x_denom=100, max_x_denom=200)
+-        [(1, 0, 0),
+-        (-656, 426316, 121),
+-        (-656, -426316, 121),
+-        (452, 85052, 121),
+-        (452, -85052, 121),
+-        (988, 80036, 121),
+-        (988, -80036, 121),
+-        (-556, 773188, 169),
+-        (-556, -773188, 169),
+-        (264, 432068, 169),
+-        (264, -432068, 169)]
+-
+-    Finding the integral points on the compact component of an elliptic curve::
+-
+-        sage: E = EllipticCurve([0,1,0,-35220,-1346400])
+-        sage: e1, e2, e3 = E.division_polynomial(2).roots(multiplicities=False)
+-        sage: coeffs = [E.a6(),E.a4(),E.a2(),1]
+-        sage: ratpoints(coeffs, 1000, max_x_denom=1, intervals=[[e3,e2]])
+-        [(1, 0, 0),
+-        (-165, 0, 1),
+-        (-162, 366, 1),
+-        (-162, -366, 1),
+-        (-120, 1080, 1),
+-        (-120, -1080, 1),
+-        (-90, 1050, 1),
+-        (-90, -1050, 1),
+-        (-85, 1020, 1),
+-        (-85, -1020, 1),
+-        (-42, 246, 1),
+-        (-42, -246, 1),
+-        (-40, 0, 1)]
+-    """
+-    cdef ratpoints_args args
+-    cdef long i, total, verby
+-    cdef Integer sage_int, s_x, s_y, s_z
+-    cdef point_list *plist
+-
+-
+-    verby = ~0 if verbose else 0
+-
+-    # Set the coefficient array:
+-    coeffs = [Integer(a) for a in coeffs]
+-    args.degree = len(coeffs)-1
+-    args.cof = <mpz_t *> sig_malloc((args.degree+1) * sizeof(mpz_t))
+-
+-    # Create an array to hold the points found:
+-    plist = <point_list *> sig_malloc(sizeof(point_list))
+-    if max == 0:
+-        plist.array_size = 64
+-    else:
+-        plist.array_size = max
+-    plist.xes = <long *> sig_malloc(plist.array_size * sizeof(long))
+-    plist.ys = <mpz_t *> sig_malloc(plist.array_size * sizeof(mpz_t))
+-    for i from 0 <= i < plist.array_size:
+-        mpz_init(plist.ys[i])
+-    plist.zs = <long *> sig_malloc(plist.array_size * sizeof(long))
+-    plist.num_points = 0
+-    plist.max_num_points = max
+-
+-    # Set the height bound:
+-    args.height = H
+-
+-    # Set the intervals to be searched, including any specified:
+-    args.num_inter = len(intervals)
+-    args.domain = <ratpoints_interval *> sig_malloc((args.num_inter + args.degree) * sizeof(ratpoints_interval))
+-    for i,I in enumerate(intervals):
+-        args.domain[i].low = I[0]
+-        args.domain[i].up  = I[1]
+-
+-    # Set the minimum and maximum denominators:
+-    if not min_x_denom:  min_x_denom = 1
+-    if not max_x_denom:  max_x_denom = H
+-    args.b_low = min_x_denom
+-    args.b_high = max_x_denom
+-
+-    # Set the remaining arguments, whose non-default use is technical
+-    # (see ratpoints documentation)
+-    args.sp1 = RATPOINTS_DEFAULT_SP1
+-    args.sp2 = RATPOINTS_DEFAULT_SP2
+-    args.array_size = RATPOINTS_ARRAY_SIZE
+-    args.sturm = RATPOINTS_DEFAULT_STURM
+-    args.num_primes = RATPOINTS_DEFAULT_NUM_PRIMES
+-    args.max_forbidden = RATPOINTS_DEFAULT_MAX_FORBIDDEN
+-    args.flags = (RATPOINTS_VERBOSE & verby)
+-
+-    for i from 0 <= i <= args.degree:
+-        mpz_init(args.cof[i])
+-        sage_int = <Integer> coeffs[i]
+-        mpz_set(args.cof[i], sage_int.value)
+-
+-    sig_on()
+-    total = find_points(&args, process, <void *>plist)
+-    sig_off()
+-    if total == RATPOINTS_NON_SQUAREFREE:
+-        raise RuntimeError('Polynomial must be square-free')
+-    if total == RATPOINTS_BAD_ARGS:
+-        raise RuntimeError('Bad arguments to ratpoints')
+-
+-    for i from 0 <= i <= args.degree:
+-        mpz_clear(args.cof[i])
+-
+-    sig_free(args.cof)
+-    sig_free(args.domain)
+-
+-    cdef list L = []
+-    for i from 0 <= i < plist.num_points:
+-        s_x = Integer(0)
+-        s_y = Integer(0)
+-        s_z = Integer(0)
+-        mpz_set_si(s_x.value, plist.xes[i])
+-        mpz_set(s_y.value, plist.ys[i])
+-        mpz_set_si(s_z.value, plist.zs[i])
+-        L.append((s_x,s_y,s_z))
+-
+-    for i from 0 <= i < plist.array_size:
+-        mpz_clear(plist.ys[i])
+-    sig_free(plist.xes)
+-    sig_free(plist.ys)
+-    sig_free(plist.zs)
+-    sig_free(plist)
+-
+-    return L
+-
+-cdef int process_exists_only(long x, long z, mpz_t y, void *info0, int *quit):
+-    cdef info_struct_exists_only *info_s = <info_struct_exists_only *>info0
+-    cdef Integer YY
+-    if info_s.verbose:
+-        YY = Integer(0); mpz_set(YY.value, y)
+-        print('Found point [ %d : %d : %d ], quitting' % (x, YY, z))
+-    quit[0] = -1
+-    return 1
+-
+-cdef int ratpoints_mpz_exists_only(mpz_t *coeffs, long H, int degree, bint verbose) except -1:
+-    """
+-    Direct call to ratpoints to search for existence only.
+-
+-    WARNING - The coefficient array will be modified by ratpoints.
+-    """
+-    cdef ratpoints_args args
+-    cdef info_struct_exists_only info_s
+-    cdef long total, verby = ~0 if verbose else 0
+-    info_s.verbose = verbose
+-    assert degree <= RATPOINTS_MAX_DEGREE
+-    args.degree = degree
+-    args.cof = coeffs
+-    args.domain = <ratpoints_interval *> sig_malloc(2*args.degree * sizeof(ratpoints_interval))
+-    args.height = H
+-    args.num_inter = 0
+-    args.b_low = 1
+-    args.b_high = H
+-    args.sp1 = RATPOINTS_DEFAULT_SP1
+-    args.sp2 = RATPOINTS_DEFAULT_SP2
+-    args.array_size = RATPOINTS_ARRAY_SIZE
+-    args.sturm = RATPOINTS_DEFAULT_STURM
+-    args.num_primes = RATPOINTS_DEFAULT_NUM_PRIMES
+-    args.max_forbidden = RATPOINTS_DEFAULT_MAX_FORBIDDEN
+-    args.flags = (RATPOINTS_VERBOSE & verby)
+-    sig_on()
+-    total = find_points(&args, process_exists_only, <void *>(&info_s))
+-    sig_off()
+-    sig_free(args.domain)
+-    if total == RATPOINTS_NON_SQUAREFREE:
+-        raise RuntimeError('Polynomial must be square-free')
+-    if total == RATPOINTS_BAD_ARGS:
+-        raise RuntimeError('Bad arguments to ratpoints')
+-    return 1 if (total > 0) else 0
+-
+-
+-
+-
+diff --git a/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx b/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx
+index 1cc70925fa..c2f994a650 100644
+--- a/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx
++++ b/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx
+@@ -1,5 +1,3 @@
+-# distutils: libraries = ratpoints
+-
+ r"""
+ Descent on elliptic curves over `\QQ` with a 2-isogeny
+ """
+diff --git a/src/sage_setup/library_order.py b/src/sage_setup/library_order.py
+index 8830d44a95..0b450b3723 100644
+--- a/src/sage_setup/library_order.py
++++ b/src/sage_setup/library_order.py
+@@ -25,7 +25,7 @@ library_order_list = aliases.get("SINGULAR_LIBRARIES", []) + [
+     "giac", "intl", "curl",
+     "ec", "ecm"
+ ] + aliases.get("LINBOX_LIBRARIES", []) + aliases.get("FFLASFFPACK_LIBRARIES", []) + aliases.get("GSL_LIBRARIES", []) + [
+-    "pari", "flint", "ratpoints", "ecl", "glpk", "ppl",
++    "pari", "flint", "ecl", "glpk", "ppl",
+ ] + arb_dylib_names + [
+     "mpfi", "mpfr", "mpc", "ntl", "gmp", "gmpxx",
+     "brial",
+-- 
+2.34.1
+
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 8f27de532058..d3ebd921210d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -32,64 +32,26 @@ _SAGE_ROOT=/usr/lib/sage-${version}
 
 _SAGE_UPSTREAM_MIRROR=https://mirrors.mit.edu/sage/spkg/upstream
 
-# packages were sage is the upstream
-_upstream="
- ${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
- ${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
- ${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
- ${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
- ${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
- ${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
- ${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
- ${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
- ${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
-"
-checksum+="
- c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
- d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
- 5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
- ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
- 169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
- cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
- edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
- b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
- cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
-"
-
-# packages from pypi (python modules)
-_upstream+="
-
- ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
- ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
- ${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
-
- ${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
- ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
-"
-checksum+="
-
- d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
- 5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
- 78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
-
- ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
- dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
-"
-
-# other upstream packages
-_upstream+="
- http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
- https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
- https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
+# these packages can be used from system
+_spkg_system="
+ cppy
+ cython
+ cysignals
+ cypari
+ pplpy
+ fpylll
+ memory_allocator
 "
-checksum+="
- 07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
- 3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
- 718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
+# databases to be used from system
+_databases="
+ combinatorial_designs
+ conway_polynomials
+ elliptic_curves
+ graphs
+ polytopes_db
 "
-
-# these packages are not needed, don't install
-_dontinstall="
+### these packages are not needed, skip
+_spkg_skip="
  appnope
  fonttools
  importlib_resources
@@ -98,18 +60,60 @@ _dontinstall="
  setuptools_wheel
  sphinxcontrib_websupport
  pplpy_doc
+ vcversioner
 "
 
-# these packages can be used from system
-_usefromsystem="
- cppy
- cython
- cysignals
- cypari
- pplpy
- fpylll
+_upstream=""
+
+# threejs
+_upstream+=" https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz"
+checksum+=" 718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8"
+_need_to_pass_doctests="
+ threejs
 "
 
+# primecountpy (use from system?)
+_upstream+=" ${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz"
+checksum+=" 78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676"
+_need_to_build="
+ primecountpy
+"
+
+### these might be necessary to run the notebook... for now skip as doctest pass
+_spkg_skip+="
+ jmol
+ mathjax
+ sagenb_export
+ thebe
+ sagetex
+ jupyter_jsmol
+ rpy2
+"
+#_upstream+="
+# ${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
+# ${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
+# ${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
+# ${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
+# https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+# ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
+# ${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
+#"
+#checksum+="
+# ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
+# 169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
+# b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
+# cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
+# 3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+# d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
+# ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
+#"
+
+for db in $_databases; do
+	_spkg_system+=" $db"
+	depends+=" sage-data-$db"
+	checkdepends+=" sage-data-$db"
+done
+
 for u in ${_upstream}; do
 	distfiles+=" $u"
 	skip_extraction+=" ${u##*[/>]}"
@@ -152,12 +156,12 @@ post_patch() {
 }
 
 pre_configure() {
-	for spkg in $_dontinstall; do
+	for spkg in $_spkg_skip; do
 		configure_args+=" sage_spkg_install_$spkg=no"
 		configure_args+=" sage_require_$spkg=no"
 	done
 
-	for spkg in $_usefromsystem; do
+	for spkg in $_spkg_system; do
 		configure_args+=" sage_spkg_install_$spkg=no"
 		configure_args+=" sage_require_$spkg=yes"
 	done
@@ -174,6 +178,13 @@ post_configure() {
 	cat <<-EOF >> pkgs/sage-conf/sage_conf.py
 	GAP_ROOT_DIR = "/usr/share/gap"
 	GAP_SO = "$(objdump -p /usr/lib/libgap.so | awk '/SONAME/{print $2}')"
+	CONWAY_POLYNOMIALS_DATA_DIR = "/usr/share/sagemath/conway_polynomials"
+	GRAPHS_DATA_DIR = "/usr/share/sagemath/graphs"
+	ELLCURVE_DATA_DIR = "/usr/share/sagemath/ellcurves"
+	POLYTOPE_DATA_DIR = "/usr/share/sagemath/reflexive_polytopes"
+	COMBINATORIAL_DESIGN_DATA_DIR = "/usr/share/sagemath/combinatorial_designs"
+	CREMONA_MINI_DATA_DIR = "/usr/share/sagemath/cremona"
+	CREMONA_LARGE_DATA_DIR = "/usr/share/sagemath/cremona"
 	EOF
 }
 
@@ -213,9 +224,9 @@ do_check() {
 	cp ${FILESDIR}/timings2.json .
 	_test_args="--stats_path=timings2.json"
 	if [ "$XBPS_CHECK_PKGS" = full ]; then
-		_test_args+=" --long --warn-long 20.0"
+		_test_args+=" --long --warn-long 60.0"
 	else
-		_test_args+=" --warn-long 10.0"
+		_test_args+=" --warn-long 30.0"
 	fi
 	if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
 		# for CI use a predictable random seed
@@ -308,7 +319,10 @@ _sage_python3_modules="
  python3-cypari2
  python3-pplpy
  python3-fpylll
- "
+
+ python3-primecountpy
+ python3-memory_allocator
+"
 
 # python packages are build and runtime dependencies
 makedepends+=" $_sage_python3_modules"

From fd6939d5fd4abb4cfe642fbe73b9a859b6ff3b6b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 18 Jan 2022 06:55:53 -0300
Subject: [PATCH 60/63] sagemath: fix do_install()

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

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index d3ebd921210d..4d63eabac13c 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -63,10 +63,8 @@ _spkg_skip="
  vcversioner
 "
 
-_upstream=""
-
 # threejs
-_upstream+=" https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz"
+_upstream="https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz"
 checksum+=" 718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8"
 _need_to_pass_doctests="
  threejs
@@ -198,7 +196,7 @@ do_install() {
 		vcopy local/$f $_SAGE_ROOT/local
 	done
 	vmkdir $_SAGE_ROOT/$(readlink venv)
-	for f in pyvenv.cfg bin etc lib share; do
+	for f in pyvenv.cfg bin lib share; do
 		vcopy venv/$f $_SAGE_ROOT/venv/
 	done
 	vcopy "src" $_SAGE_ROOT # only src/sage ?

From 95866dcd5b9bffd0a56d8d10359d1e1354ae7c9b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 18 Jan 2022 16:11:37 -0300
Subject: [PATCH 61/63] sagemath: minor adjustments in do_check()

---
 srcpkgs/sagemath-test/template | 9 +++++----
 srcpkgs/sagemath/template      | 5 +++--
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/srcpkgs/sagemath-test/template b/srcpkgs/sagemath-test/template
index e3b1242bd338..1e6c76274a4d 100644
--- a/srcpkgs/sagemath-test/template
+++ b/srcpkgs/sagemath-test/template
@@ -15,17 +15,18 @@ homepage="none"
 do_check() {
 	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
 		_test_files=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
-	else
+	fi
+	if [ -z "$_test_files" ]; then
 		_test_files=--all
 	fi
 	cp ${FILESDIR}/timings2.json .
 	_test_args="--stats_path=timings2.json"
 	if [ "$XBPS_CHECK_PKGS" = full ]; then
-		_test_args+=" --long --warn-long 20.0"
+		_test_args+=" --long --warn-long 60.0"
 	else
-		_test_args+=" --warn-long 10.0"
+		_test_args+=" --warn-long 30.0"
 	fi
-	if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
+	if [ "$XBPS_BUILD_ENVIRONMENT" = "void-packages-ci" ]; then
 		# for CI use a predictable random seed
 		_test_args+=" --random-seed=0"
 	fi
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 4d63eabac13c..fff7fe860af3 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -216,7 +216,8 @@ do_install() {
 do_check() {
 	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
 		_test_files=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
-	else
+	fi
+	if [ -z "$_test_files" ]; then
 		_test_files=--all
 	fi
 	cp ${FILESDIR}/timings2.json .
@@ -226,7 +227,7 @@ do_check() {
 	else
 		_test_args+=" --warn-long 30.0"
 	fi
-	if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
+	if [ "$XBPS_BUILD_ENVIRONMENT" = "void-packages-ci" ]; then
 		# for CI use a predictable random seed
 		_test_args+=" --random-seed=0"
 	fi

From 12aae91293ffeada0278dbb8bc0248a434d3f32b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 18 Jan 2022 16:14:10 -0300
Subject: [PATCH 62/63] sagemath: use system primecountpy

---
 srcpkgs/sagemath/patches/zzz-fix_no_SAGE_BIN.patch  | 12 ++++++++++++
 .../sagemath/patches/zzz-fix_no_venv_packages.patch | 13 +++++++++++++
 srcpkgs/sagemath/template                           |  8 +-------
 3 files changed, 26 insertions(+), 7 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/zzz-fix_no_SAGE_BIN.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-fix_no_venv_packages.patch

diff --git a/srcpkgs/sagemath/patches/zzz-fix_no_SAGE_BIN.patch b/srcpkgs/sagemath/patches/zzz-fix_no_SAGE_BIN.patch
new file mode 100644
index 000000000000..ac80085bd6b4
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fix_no_SAGE_BIN.patch
@@ -0,0 +1,12 @@
+--- a/src/sage/misc/dist.py
++++ b/src/sage/misc/dist.py
+@@ -108,7 +108,8 @@ def install_scripts(directory=None, ignore_existing=False):
+     PATH = os.environ['PATH'].split(os.pathsep)
+     PATH = [d for d in PATH if os.path.exists(d)]
+     dir_in_path = any(os.path.samefile(directory, d) for d in PATH)
+-    PATH = os.pathsep.join(d for d in PATH
++    if os.path.exists(SAGE_BIN):
++        PATH = os.pathsep.join(d for d in PATH
+                            if not os.path.samefile(d, SAGE_BIN))
+     for cmd in ['gap', 'gp', 'hg', 'ipython', 'maxima',
+                 'mwrank', 'R', 'singular', 'sqlite3', 'M2', 'kash']:
diff --git a/srcpkgs/sagemath/patches/zzz-fix_no_venv_packages.patch b/srcpkgs/sagemath/patches/zzz-fix_no_venv_packages.patch
new file mode 100644
index 000000000000..7b19169a91d9
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fix_no_venv_packages.patch
@@ -0,0 +1,13 @@
+diff --git a/build/make/Makefile.in b/build/make/Makefile.in
+index 0baddba4ae..be363bea71 100644
+--- a/build/make/Makefile.in
++++ b/build/make/Makefile.in
+@@ -624,7 +624,7 @@ $(1)-$(4)-no-deps:
+ 		SAGE_SPKG_WHEELS=$$($(4))/var/lib/sage/wheels \
+ 		SAGE_INST_LOCAL=$$($(4)) \
+ 		sage-logger -p '$$(SAGE_ROOT)/build/pkgs/$(1)/spkg-install' '$$(SAGE_LOGS)/$(1)-$(2).log' && \
+-	    touch "$$($(4))/$(SPKG_INST_RELDIR)/$(1)-$(2)"; \
++	    mkdir -p "$$($(4))/$(SPKG_INST_RELDIR)" && touch "$$($(4))/$(SPKG_INST_RELDIR)/$(1)-$(2)"; \
+ 	else \
+ 	    echo; \
+ 	    echo "Error: $(1) is a dummy script package that the Sage distribution uses"; \
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index fff7fe860af3..cab3b99fd4f0 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -41,6 +41,7 @@ _spkg_system="
  pplpy
  fpylll
  memory_allocator
+ primecountpy
 "
 # databases to be used from system
 _databases="
@@ -70,13 +71,6 @@ _need_to_pass_doctests="
  threejs
 "
 
-# primecountpy (use from system?)
-_upstream+=" ${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz"
-checksum+=" 78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676"
-_need_to_build="
- primecountpy
-"
-
 ### these might be necessary to run the notebook... for now skip as doctest pass
 _spkg_skip+="
  jmol

From 35f852dd81daf730a2860308de79ec2fd0435f43 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 18 Jan 2022 16:53:37 -0300
Subject: [PATCH 63/63] sagemath: no upstream packages, cleanup

---
 srcpkgs/sagemath/template | 126 +++++++++-----------------------------
 1 file changed, 29 insertions(+), 97 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index cab3b99fd4f0..83e484c31c58 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -30,85 +30,35 @@ desc_option_debug="Build with debug symbols"
 # path where sage will be installed
 _SAGE_ROOT=/usr/lib/sage-${version}
 
-_SAGE_UPSTREAM_MIRROR=https://mirrors.mit.edu/sage/spkg/upstream
-
-# these packages can be used from system
-_spkg_system="
- cppy
- cython
- cysignals
- cypari
- pplpy
- fpylll
- memory_allocator
- primecountpy
-"
-# databases to be used from system
-_databases="
- combinatorial_designs
- conway_polynomials
- elliptic_curves
- graphs
- polytopes_db
-"
-### these packages are not needed, skip
-_spkg_skip="
- appnope
- fonttools
- importlib_resources
- pycygwin
- setuptools_scm_git_archive
- setuptools_wheel
- sphinxcontrib_websupport
- pplpy_doc
- vcversioner
-"
-
-# threejs
-_upstream="https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz"
-checksum+=" 718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8"
-_need_to_pass_doctests="
- threejs
-"
+# Skip these sage packages: they are not needed
+_spkg_skip="appnope fonttools importlib_resources pycygwin
+ setuptools_scm_git_archive setuptools_wheel sphinxcontrib_websupport
+ pplpy_doc vcversioner
+ jmol mathjax sagenb_export thebe sagetex jupyter_jsmol rpy2 threejs"
+
+# Force use these sage packages from system
+_spkg_system="cppy cython cysignals cypari pplpy fpylll memory_allocator
+ primecountpy"
+
+# Databases to be used from system
+_spkg_db="combinatorial_designs conway_polynomials elliptic_curves graphs
+ polytopes_db"
+
+for spkg in $_spkg_skip; do
+	configure_args+=" sage_spkg_install_$spkg=no"
+	configure_args+=" sage_require_$spkg=no"
+done
 
-### these might be necessary to run the notebook... for now skip as doctest pass
-_spkg_skip+="
- jmol
- mathjax
- sagenb_export
- thebe
- sagetex
- jupyter_jsmol
- rpy2
-"
-#_upstream+="
-# ${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
-# ${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
-# ${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
-# ${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
-# https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
-# ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
-# ${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
-#"
-#checksum+="
-# ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
-# 169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
-# b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
-# cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
-# 3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
-# d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
-# ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
-#"
-
-for db in $_databases; do
-	_spkg_system+=" $db"
-	depends+=" sage-data-$db"
-	checkdepends+=" sage-data-$db"
+for spkg in $_spkg_system; do
+	configure_args+=" sage_spkg_install_$spkg=no"
+	configure_args+=" sage_require_$spkg=yes"
 done
 
-for u in ${_upstream}; do
-	distfiles+=" $u"
-	skip_extraction+=" ${u##*[/>]}"
+for spkg in $_spkg_db; do
+	configure_args+=" sage_spkg_install_$spkg=no"
+	configure_args+=" sage_require_$spkg=yes"
+	depends+=" sage-data-$spkg"
+	checkdepends+=" sage-data-$spkg"
 done
 
 # for now, just build native; we'll worry about cross later
@@ -148,16 +98,6 @@ post_patch() {
 }
 
 pre_configure() {
-	for spkg in $_spkg_skip; do
-		configure_args+=" sage_spkg_install_$spkg=no"
-		configure_args+=" sage_require_$spkg=no"
-	done
-
-	for spkg in $_spkg_system; do
-		configure_args+=" sage_spkg_install_$spkg=no"
-		configure_args+=" sage_require_$spkg=yes"
-	done
-
 	if [ "$build_option_debug" ]; then
 		export SAGE_DEBUG=yes
 	fi
@@ -232,7 +172,7 @@ do_check() {
 ### copied from sage-deps, to be kept in sync
 
 # hard dependencies
-makedepends+=" gcc make m4 perl binutils git tar libgomp-devel"
+makedepends="gcc make m4 perl binutils git tar libgomp-devel"
 
 # recommended dependencies
 makedepends+=" gcc-fortran openssl-devel"
@@ -305,16 +245,8 @@ _sage_python3_modules="
  python3-tzlocal python3-urllib3 python3-wcwidth python3-webencodings
  python3-wheel python3-zipp pythran
 
- python3-cvxopt
- python3-cppy
- python3-Cython
- python3-cysignals
- python3-cypari2
- python3-pplpy
- python3-fpylll
-
- python3-primecountpy
- python3-memory_allocator
+ python3-cvxopt python3-cppy python3-Cython python3-cysignals python3-cypari2
+ python3-pplpy python3-fpylll python3-primecountpy python3-memory_allocator
 "
 
 # python packages are build and runtime dependencies

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: sagemath-9.5.rc2
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (223 preceding siblings ...)
  2022-01-18 21:55 ` tornaria
@ 2022-01-19 11:01 ` tornaria
  2022-01-19 11:09 ` tornaria
                   ` (23 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-19 11:01 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1180 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.rc2
This is WIP, so I can get feedback.

Supported architectures: x86_64, x86_64-musl, i686. We also try to make sure it works with musl-1.2.

The testsuite can be run normal (-Q) or long (-K). For CI it runs normal (~ 1/2 time) and it uses a fixed random seed 0 to avoid random failures. When running locally, the random seed is random so one may get occasional test failures that depend on a particular value of the random seed.

The package `sagemath-test` is a dummy package whose purpose is to run the testsuite with sage installed as a package and without the build directory. For this to make sense, the masterdir has to be clean (without traces of the sagemath build, this should be ok after running "pkg" or "pkg -Q").

Pending PR for dependencies:
- [ ] #34789 Needs review/testing
- [ ] #35088
- [ ] #35089
- [ ] #35098
- [ ] #35101

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: 784693 bytes --]

From 4487a69e99004be5e8d82c8ee8097f9c7f47fc12 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/67] 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 b039bbfe6e017829e78d3e8b9095224494be2722 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/67] 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 80f10798445e17ffd610e4cab0be3f96eea73538 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/67] 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 40dcdd9c7990b51e8a33b3d48087295195fffc19 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/67] 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 cfc5cca4cc276af7084e39146ad74da2d3987744 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/67] 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 5a912da01f852dab21cf375df1e6daf8cf76c4e5 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/67] 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 d351f19adfad4460293efe42dcd190056a49cff7 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/67] 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 7b76e03fca0017314ee27a529c5abcbf63fe5f4a 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/67] 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 69b89511844f0e8a50b049bf5a1704429f6dc48e 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/67] 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 6202ebbe6c7c7a510a1caff82aea77c6c1bc562d 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/67] 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 1cb60503a5ae7fc9f9967080290dfaeec2068da6 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/67] 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 815a7f41b327961d0f53728688c158e23056dccc 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/67] 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 cc90407266d2c331000e49e6c55a10a393433567 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/67] 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 d77f9ad82bfd1485d874ac2b55cc18fea2eb832d 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/67] 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 74f389aa6084152d929a74572abf37d91beabcbf 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/67] 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 47d7f63e4b35272407c176653c2c41b5d935a72e 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/67] 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 abd174f9d546e902305a0d7327640c02e0731cb9 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/67] 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 a1d7ad486a6ef7dd1a2141fadc3894057fac3210 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/67] 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 7a8257eb8934c354657a41c096d1a44d509d3e3a 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/67] 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

From 8a6d28a15769976e2d040568703c5018fab4c475 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 27 Dec 2021 20:19:19 -0300
Subject: [PATCH 20/67] sagemath: fix license and tests

Now tests can be run with -Q (normal) or -K (--long)
---
 srcpkgs/sagemath/template | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index c5009269c7fc..33b40acbabeb 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -16,7 +16,7 @@ depends="giac git FlintQS zn_poly sympow
  "
 short_desc="Open source mathematics software"
 maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
-license="GPL-3.0-or-later"
+license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
 checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
@@ -155,15 +155,17 @@ do_install() {
 }
 
 do_check() {
-	TEST=--all
 	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
-		TEST="$(sed -e 's/#.*//' ${XBPS_DISTDIR}/sagemath-check)"
+		_test_args=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	fi
+	if [ -z "$_test_args" ]; then
+		_test_args=--all
+	fi
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args="--long $_test_args"
 	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} ${OPT} ${TEST}
-	#./sage -t ${OPT} ${TEST}
+	./sage -tp ${XBPS_MAKEJOBS} ${_test_args}
 }
 
 ### copied from sage-deps, to be kept in sync

From 2415c35721c13afcc8433c82975b017a70bde776 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 28 Dec 2021 23:08:17 -0300
Subject: [PATCH 21/67] sagemath: fix long time test

---
 .../patches/zzz-fix_long_time_test--see_33091.patch | 13 +++++++++++++
 ...=> zzz-skip_doctest_giac-1.7.0--see_31563.patch} |  0
 2 files changed, 13 insertions(+)
 create mode 100644 srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
 rename srcpkgs/sagemath/patches/{skip-doctest-giac-1.7.0--see-trac-31563.patch => zzz-skip_doctest_giac-1.7.0--see_31563.patch} (100%)

diff --git a/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch b/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
new file mode 100644
index 000000000000..ca360dee9f6e
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage/matrix/matrix2.pyx b/src/sage/matrix/matrix2.pyx
+index 7d319bd54b..c1a2eed6f1 100644
+--- a/src/sage/matrix/matrix2.pyx
++++ b/src/sage/matrix/matrix2.pyx
+@@ -17215,7 +17215,7 @@ cdef class Matrix(Matrix1):
+ 
+             sage: set_random_seed()
+             sage: K = random_cone(max_ambient_dim=5)
+-            sage: all(L.change_ring(SR).is_Z_operator_on(K)
++            sage: all(L.change_ring(SR).is_Z_operator_on(K) # long time
+             ....:     for L in K.Z_operators_gens())  # long time
+             True
+ 
diff --git a/srcpkgs/sagemath/patches/skip-doctest-giac-1.7.0--see-trac-31563.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_31563.patch
similarity index 100%
rename from srcpkgs/sagemath/patches/skip-doctest-giac-1.7.0--see-trac-31563.patch
rename to srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_31563.patch

From 8d2b0b96491bf6ddf656e29ee40c5e2f2adf7605 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 31 Dec 2021 13:52:34 -0300
Subject: [PATCH 22/67] python3-Sphinx: update to 4.3.2.

---
 srcpkgs/python3-Sphinx/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/python3-Sphinx/template b/srcpkgs/python3-Sphinx/template
index 8b0493c1f92c..29f892d16157 100644
--- a/srcpkgs/python3-Sphinx/template
+++ b/srcpkgs/python3-Sphinx/template
@@ -1,6 +1,6 @@
 # Template file for 'python3-Sphinx'
 pkgname=python3-Sphinx
-version=4.2.0
+version=4.3.2
 revision=1
 wrksrc=Sphinx-${version}
 build_style=python3-module
@@ -17,8 +17,9 @@ short_desc="Python 3 documentation generator"
 maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
 license="BSD-3-Clause"
 homepage="http://sphinx-doc.org"
+changelog="https://www.sphinx-doc.org/en/master/changes.html"
 distfiles="${PYPI_SITE}/S/Sphinx/Sphinx-${version}.tar.gz"
-checksum=94078db9184491e15bce0a56d9186e0aec95f16ac20b12d00e06d4e36f1058a6
+checksum=0a8836751a68306b3fe97ecbe44db786f8479c3bf4b80e3a7f5c838657b4698c
 conflicts="python-Sphinx>=0"
 
 post_install() {

From 58d1040c8b68a6b6768c3e9bc6a91a4ee3c8f6db Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 28 Dec 2021 23:08:17 -0300
Subject: [PATCH 23/67] sagemath: use system python site-packages

 - patch from #29665 for that
 - patch on top of that to allow a few more python packages:
   gmpy2, sphinx, typing_extensions, ptyprocess
 - add all available python packages to makedepends and depends
 - add ffmpeg and ImageMagick to makedepends
 - in standard check (-Q) warn if individual test > 5.0s
---
 ...184f7498a2046065e669723e68efe2d65cee.patch | 5629 +++++++++++++++++
 .../zzz-dont_run_pytest--see_31924.patch      |   27 +
 .../zzz-more_site_packages_not_in_29665.patch |   42 +
 srcpkgs/sagemath/template                     |   52 +-
 4 files changed, 5747 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch

diff --git a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
new file mode 100644
index 000000000000..b641113927e7
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
@@ -0,0 +1,5629 @@
+From 05fcaabe95082f42ba134780d579390d7b6153e2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 19:30:58 -0400
+Subject: Trac #29665: add --enable-system-site-packages option to ./configure.
+
+This new option is experimental and disabled by default. When it is
+enabled, the string "--system-site-packages" is appended to a new
+environment variable SAGE_VENV_FLAGS that is then passed to the
+sage-venv command during the build using autoconf substitution.
+Thusly the correct setting finds its way into local/pyvenv.cfg.
+---
+ build/make/Makefile.in |  2 +-
+ configure.ac           | 11 +++++++++++
+ 2 files changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/build/make/Makefile.in b/build/make/Makefile.in
+index f870cc3..68627ab 100644
+--- a/build/make/Makefile.in
++++ b/build/make/Makefile.in
+@@ -211,7 +211,7 @@ endif
+ inst_python3_venv = $(SAGE_VENV)/pyvenv.cfg
+ 
+ $(inst_python3_venv):
+-	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv "$(SAGE_VENV)"
++	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv @SAGE_VENV_FLAGS@ "$(SAGE_VENV)"
+ endif
+ 
+ # Build everything and start Sage.
+diff --git a/configure.ac b/configure.ac
+index 351f487..db30a91 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -435,6 +435,17 @@ AC_ARG_ENABLE([download-from-upstream-url],
+   [AS_HELP_STRING([--enable-download-from-upstream-url],
+     [allow downloading packages from their upstream URL if they cannot be found on the Sage mirrors])])
+ 
++AC_ARG_ENABLE(
++  [system-site-packages], [AS_HELP_STRING(
++    [--enable-system-site-packages],
++    [allow sage to use python packages from the system (experimental; default: no)]
++  )], [
++  AS_IF([test "x$enable_system_site_packages" = "xyes"], [
++    SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
++  ])
++])
++AC_SUBST([SAGE_VENV_FLAGS])
++
+ SAGE_SPKG_OPTIONS=""
+ AS_IF([test "x$enable_experimental_packages" = "xyes"], [
+   AS_VAR_APPEND([SAGE_SPKG_OPTIONS], [" -y"])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9372d1f663edf4e89f9c186336815ca04cff59dc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 19:41:14 -0400
+Subject: Trac #29665: new SAGE_PYTHON_PACKAGE_CHECK() autoconf macro.
+
+This new macro encapsulates the check for system installations of
+python packages. It uses setuptools.version's pkg_resources to
+check if the contents of install-requires.txt are satisfied for
+the given package; and if not, tells the build system to install
+the SPKG instead.
+---
+ m4/sage_python_package_check.m4 | 49 +++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 49 insertions(+)
+ create mode 100644 m4/sage_python_package_check.m4
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+new file mode 100644
+index 00000000..77b0a0c
+--- /dev/null
++++ b/m4/sage_python_package_check.m4
+@@ -0,0 +1,49 @@
++#
++# SYNOPSIS
++#
++#   SAGE_PYTHON_PACKAGE_CHECK(package)
++#
++# DESCRIPTION
++#
++#   Determine if the system copy of a python package can be used by sage.
++#
++#   This macro uses setuptools.version's pkg_resources to check that the
++#   "install-requires.txt" file for the named package is satisfied, and
++#   it can typically fail in four ways:
++#
++#     1. If --enable-system-site-packages was not passed to ./configure,
++#
++#     2. If we are not using the system python (no $PYTHON_FOR_VENV),
++#
++#     3. If setuptools is not available to the system python,
++#
++#     4. If the contents of install-requires.txt are not met (wrong
++#        version, no version, etc.) by the system python.
++#
++#   In any of those cases, we set sage_spkg_install_$package to "yes"
++#   so that the corresponding SPKG is installed. Otherwise, we do
++#   nothing, since the default value of sage_spkg_install_$package
++#   is "no" (to use the system copy).
++#
++#   The SAGE_SPKG_CONFIGURE_PYTHON3() macro is AC_REQUIRE'd to ensure
++#   that $PYTHON_FOR_VENV is available, if it is going to be available.
++#
++
++AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
++  AS_IF([test "${enable_system_site_packages}" = "yes"], [
++    AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
++
++    dnl strip all comments from install-requires.txt; this should leave
++    dnl only a single line containing the version specification for this
++    dnl package.
++    SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
++    AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++    AS_IF(
++      ["${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())"],
++      [AC_MSG_RESULT(yes)],
++      [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
++    )
++  ], [
++    sage_spkg_install_$1=yes
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a0dac8ad81ad6369d479bba30d2388de59e5cecb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:21:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for py.
+
+---
+ build/pkgs/py/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/py/spkg-configure.m4
+
+diff --git a/build/pkgs/py/spkg-configure.m4 b/build/pkgs/py/spkg-configure.m4
+new file mode 100644
+index 00000000..ded7034
+--- /dev/null
++++ b/build/pkgs/py/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([py], [SAGE_PYTHON_PACKAGE_CHECK([py])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 87c463a25ab4432dc1fba4f7a9703284e5b8f620 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:24:15 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for wheel.
+
+---
+ build/pkgs/wheel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wheel/spkg-configure.m4
+
+diff --git a/build/pkgs/wheel/spkg-configure.m4 b/build/pkgs/wheel/spkg-configure.m4
+new file mode 100644
+index 00000000..7897ea9
+--- /dev/null
++++ b/build/pkgs/wheel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([wheel], [SAGE_PYTHON_PACKAGE_CHECK([wheel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 804094b3a980f262f4d53d7be8b1be43ac0c55e0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:25:15 -0400
+Subject: Trac #29665: new spkg-configure.m4 for cvxopt.
+
+This includes a SAGE_SPKG_DEPCHECK([gsl glpk suitesparse],... because
+those C dependencies wind up linked into shared libraries like,
+
+  /usr/.../cvxopt/glpk.cpython-39-x86_64-linux-gnu.so
+
+that could potentially conflict with (for example) the glpk SPKG.
+---
+ build/pkgs/cvxopt/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/cvxopt/spkg-configure.m4
+
+diff --git a/build/pkgs/cvxopt/spkg-configure.m4 b/build/pkgs/cvxopt/spkg-configure.m4
+new file mode 100644
+index 00000000..c4aa619
+--- /dev/null
++++ b/build/pkgs/cvxopt/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([cvxopt], [
++  SAGE_SPKG_DEPCHECK([gsl glpk suitesparse], [
++    SAGE_PYTHON_PACKAGE_CHECK([cvxopt])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3f171955ff8d15da2c98aee0d2e254e95a55a2b5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:28:10 -0400
+Subject: Trac #29665: new spkg-configure.m4 for pyzmq.
+
+This includes a SAGE_SPKG_DEPCHECK([zeromq],... because libzmq winds
+up linked into shared libraries like,
+
+  /usr/.../zmq/backend/cython/message.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the zeromq SPKG.
+---
+ build/pkgs/pyzmq/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/pyzmq/spkg-configure.m4
+
+diff --git a/build/pkgs/pyzmq/spkg-configure.m4 b/build/pkgs/pyzmq/spkg-configure.m4
+new file mode 100644
+index 00000000..ae2b126
+--- /dev/null
++++ b/build/pkgs/pyzmq/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([pyzmq], [
++  SAGE_SPKG_DEPCHECK([zeromq], [
++    SAGE_PYTHON_PACKAGE_CHECK([pyzmq])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20d3aa9da9fc98a6e6a47599cd1b6d1d3785a4c4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:31:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for requests.
+
+---
+ build/pkgs/requests/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/requests/spkg-configure.m4
+
+diff --git a/build/pkgs/requests/spkg-configure.m4 b/build/pkgs/requests/spkg-configure.m4
+new file mode 100644
+index 00000000..f50a66c
+--- /dev/null
++++ b/build/pkgs/requests/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([requests], [SAGE_PYTHON_PACKAGE_CHECK([requests])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4df57ee47f2576b6b7bf9265248e06e90616b689 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:13:34 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for six.
+
+---
+ build/pkgs/six/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/six/spkg-configure.m4
+
+diff --git a/build/pkgs/six/spkg-configure.m4 b/build/pkgs/six/spkg-configure.m4
+new file mode 100644
+index 00000000..a382b81
+--- /dev/null
++++ b/build/pkgs/six/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([six], [SAGE_PYTHON_PACKAGE_CHECK([six])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f4462652d02ca729cc6d7cb36ee4d7d662deafb0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:14:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for packaging.
+
+---
+ build/pkgs/packaging/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/packaging/spkg-configure.m4
+
+diff --git a/build/pkgs/packaging/spkg-configure.m4 b/build/pkgs/packaging/spkg-configure.m4
+new file mode 100644
+index 00000000..398f9e1
+--- /dev/null
++++ b/build/pkgs/packaging/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([packaging], [SAGE_PYTHON_PACKAGE_CHECK([packaging])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4d64677fffce48077e4bc3e20ec833c70e6e9b65 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:18:53 -0400
+Subject: Trac #29665: new spkg-configure.m4 for numpy.
+
+This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack
+wind up linked into shared libraries like,
+
+  /usr/.../numpy/linalg/lapack_lite.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the openblas SPKG.
+---
+ build/pkgs/numpy/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/numpy/spkg-configure.m4
+
+diff --git a/build/pkgs/numpy/spkg-configure.m4 b/build/pkgs/numpy/spkg-configure.m4
+new file mode 100644
+index 00000000..16f9a90
+--- /dev/null
++++ b/build/pkgs/numpy/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([numpy], [
++  SAGE_SPKG_DEPCHECK([openblas], [
++   SAGE_PYTHON_PACKAGE_CHECK([numpy])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 85dfe5bb32f3c470966b477bae68a921e846d11f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:58:48 -0400
+Subject: Trac #29665: new spkg-configure.m4 for scipy.
+
+This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack
+wind up linked into shared libraries like,
+
+  /usr/.../scipy/linalg/_flinalg.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the openblas SPKG.
+---
+ build/pkgs/scipy/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/scipy/spkg-configure.m4
+
+diff --git a/build/pkgs/scipy/spkg-configure.m4 b/build/pkgs/scipy/spkg-configure.m4
+new file mode 100644
+index 00000000..0b7294a
+--- /dev/null
++++ b/build/pkgs/scipy/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([scipy], [
++  SAGE_SPKG_DEPCHECK([openblas], [
++    SAGE_PYTHON_PACKAGE_CHECK([scipy])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5616f1491036fda95f4d3e840c8c8b531c97323b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 07:19:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pluggy.
+
+---
+ build/pkgs/pluggy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pluggy/spkg-configure.m4
+
+diff --git a/build/pkgs/pluggy/spkg-configure.m4 b/build/pkgs/pluggy/spkg-configure.m4
+new file mode 100644
+index 00000000..11b1fce
+--- /dev/null
++++ b/build/pkgs/pluggy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pluggy], [SAGE_PYTHON_PACKAGE_CHECK([pluggy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6bceae3d356878cfe5fce40c9998dead003a3844 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 07:24:12 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pickleshare.
+
+---
+ build/pkgs/pickleshare/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pickleshare/spkg-configure.m4
+
+diff --git a/build/pkgs/pickleshare/spkg-configure.m4 b/build/pkgs/pickleshare/spkg-configure.m4
+new file mode 100644
+index 00000000..80e9b7c
+--- /dev/null
++++ b/build/pkgs/pickleshare/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pickleshare], [SAGE_PYTHON_PACKAGE_CHECK([pickleshare])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From da2ab534f4a256c82ed4f1c5f0f5c320529b5e9f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 08:53:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for html5lib.
+
+---
+ build/pkgs/html5lib/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/html5lib/spkg-configure.m4
+
+diff --git a/build/pkgs/html5lib/spkg-configure.m4 b/build/pkgs/html5lib/spkg-configure.m4
+new file mode 100644
+index 00000000..f421b7e
+--- /dev/null
++++ b/build/pkgs/html5lib/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([html5lib], [SAGE_PYTHON_PACKAGE_CHECK([html5lib])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5e464134afdf6055b7b5804208f759561c5435cd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 18:30:47 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for networkx.
+
+---
+ build/pkgs/networkx/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/networkx/spkg-configure.m4
+
+diff --git a/build/pkgs/networkx/spkg-configure.m4 b/build/pkgs/networkx/spkg-configure.m4
+new file mode 100644
+index 00000000..926671e
+--- /dev/null
++++ b/build/pkgs/networkx/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([networkx], [SAGE_PYTHON_PACKAGE_CHECK([networkx])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c4d40770cd9c7fda811e31759a5f4aedc320f3f9 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:33:24 -0400
+Subject: Trac #29665: new spkg-configure.m4 for matplotlib.
+
+This includes a SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull],...
+because those dependencies wind up linked into shared libraries like,
+
+  /usr/lib/.../matplotlib/ft2font.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with their SPKG counterparts.
+---
+ build/pkgs/matplotlib/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/matplotlib/spkg-configure.m4
+
+diff --git a/build/pkgs/matplotlib/spkg-configure.m4 b/build/pkgs/matplotlib/spkg-configure.m4
+new file mode 100644
+index 00000000..39c2d29
+--- /dev/null
++++ b/build/pkgs/matplotlib/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([matplotlib], [
++  SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull], [
++    SAGE_PYTHON_PACKAGE_CHECK([matplotlib])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7834dc3ac349201af632f89a9de7cd1967931010 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:35:00 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for bleach.
+
+---
+ build/pkgs/bleach/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/bleach/spkg-configure.m4
+
+diff --git a/build/pkgs/bleach/spkg-configure.m4 b/build/pkgs/bleach/spkg-configure.m4
+new file mode 100644
+index 00000000..3c9bb26
+--- /dev/null
++++ b/build/pkgs/bleach/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([bleach], [SAGE_PYTHON_PACKAGE_CHECK([bleach])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 84cad343287a2c69a4a21b9fa3b92301ff88645b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:37:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for decorator.
+
+---
+ build/pkgs/decorator/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/decorator/spkg-configure.m4
+
+diff --git a/build/pkgs/decorator/spkg-configure.m4 b/build/pkgs/decorator/spkg-configure.m4
+new file mode 100644
+index 00000000..e062778
+--- /dev/null
++++ b/build/pkgs/decorator/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([decorator], [SAGE_PYTHON_PACKAGE_CHECK([decorator])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 25693212572e69d452bc95c923ada13744359eb7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:38:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for idna.
+
+---
+ build/pkgs/idna/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/idna/spkg-configure.m4
+
+diff --git a/build/pkgs/idna/spkg-configure.m4 b/build/pkgs/idna/spkg-configure.m4
+new file mode 100644
+index 00000000..9d363f2
+--- /dev/null
++++ b/build/pkgs/idna/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([idna], [SAGE_PYTHON_PACKAGE_CHECK([idna])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6d5616472f6cdc6cf496bba6fe07bd4ef44dfdaf Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:39:23 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for certifi.
+
+---
+ build/pkgs/certifi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/certifi/spkg-configure.m4
+
+diff --git a/build/pkgs/certifi/spkg-configure.m4 b/build/pkgs/certifi/spkg-configure.m4
+new file mode 100644
+index 00000000..ddd4061
+--- /dev/null
++++ b/build/pkgs/certifi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([certifi], [SAGE_PYTHON_PACKAGE_CHECK([certifi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9412a07023b275e29e8d1af9b8ee3e767042e7fd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:40:59 -0400
+Subject: Trac #29665: new spkg-configure.m4 for pillow.
+
+This includes an SAGE_SPKG_DEPCHECK([bzip2 freetype libpng zlib],...
+because those dependencies wind up linked into shared libraries like,
+
+  /usr/.../PIL/_imagingft.cpython-39-x86_64-linux-gnu.so
+
+and potentially conflict with their SPKG counterparts.
+---
+ build/pkgs/pillow/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/pillow/spkg-configure.m4
+
+diff --git a/build/pkgs/pillow/spkg-configure.m4 b/build/pkgs/pillow/spkg-configure.m4
+new file mode 100644
+index 00000000..f2e68e2
+--- /dev/null
++++ b/build/pkgs/pillow/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([pillow], [
++  SAGE_SPKG_DEPCHECK([bzip2 freetype libpng zlib], [
++    SAGE_PYTHON_PACKAGE_CHECK([pillow])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From eede914311481fdb75b363b7a799075e876a2b4f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:44:13 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for mpmath.
+
+---
+ build/pkgs/mpmath/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mpmath/spkg-configure.m4
+
+diff --git a/build/pkgs/mpmath/spkg-configure.m4 b/build/pkgs/mpmath/spkg-configure.m4
+new file mode 100644
+index 00000000..f43c838
+--- /dev/null
++++ b/build/pkgs/mpmath/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([mpmath], [SAGE_PYTHON_PACKAGE_CHECK([mpmath])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 363a825885832c0b580ff53fe61f5c79e70c4728 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:44:56 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for sympy.
+
+---
+ build/pkgs/sympy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sympy/spkg-configure.m4
+
+diff --git a/build/pkgs/sympy/spkg-configure.m4 b/build/pkgs/sympy/spkg-configure.m4
+new file mode 100644
+index 00000000..fa0f1f5
+--- /dev/null
++++ b/build/pkgs/sympy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([sympy], [SAGE_PYTHON_PACKAGE_CHECK([sympy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0667964c914e4a01dda697190a054ff96cea92d6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:47:06 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pygments.
+
+---
+ build/pkgs/pygments/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pygments/spkg-configure.m4
+
+diff --git a/build/pkgs/pygments/spkg-configure.m4 b/build/pkgs/pygments/spkg-configure.m4
+new file mode 100644
+index 00000000..99f29e3
+--- /dev/null
++++ b/build/pkgs/pygments/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pygments], [SAGE_PYTHON_PACKAGE_CHECK([pygments])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f787c233aa05d8e90f7c6ad18f76bd2fa36bfbfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:48:50 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for jinja2.
+
+---
+ build/pkgs/jinja2/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jinja2/spkg-configure.m4
+
+diff --git a/build/pkgs/jinja2/spkg-configure.m4 b/build/pkgs/jinja2/spkg-configure.m4
+new file mode 100644
+index 00000000..0970d1c
+--- /dev/null
++++ b/build/pkgs/jinja2/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jinja2], [SAGE_PYTHON_PACKAGE_CHECK([jinja2])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 309d8f8e2b7078b5efbbe824b69ec1d9b1e639f0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:43:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pandocfilters.
+
+---
+ build/pkgs/pandocfilters/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/pandocfilters/spkg-configure.m4
+
+diff --git a/build/pkgs/pandocfilters/spkg-configure.m4 b/build/pkgs/pandocfilters/spkg-configure.m4
+new file mode 100644
+index 00000000..3e9537f
+--- /dev/null
++++ b/build/pkgs/pandocfilters/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([pandocfilters], [
++  SAGE_PYTHON_PACKAGE_CHECK([pandocfilters])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f57bfda49777a6ba1cd123553acd75dc347c5521 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:44:46 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for webencodings.
+
+---
+ build/pkgs/webencodings/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/webencodings/spkg-configure.m4
+
+diff --git a/build/pkgs/webencodings/spkg-configure.m4 b/build/pkgs/webencodings/spkg-configure.m4
+new file mode 100644
+index 00000000..1b9a5c4
+--- /dev/null
++++ b/build/pkgs/webencodings/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([webencodings], [
++  SAGE_PYTHON_PACKAGE_CHECK([webencodings])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7f193a62d7a2ea0b6a3ca6beb12390d91c25bbfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:48:26 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pytz.
+
+---
+ build/pkgs/pytz/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pytz/spkg-configure.m4
+
+diff --git a/build/pkgs/pytz/spkg-configure.m4 b/build/pkgs/pytz/spkg-configure.m4
+new file mode 100644
+index 00000000..366521b
+--- /dev/null
++++ b/build/pkgs/pytz/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pytz], [SAGE_PYTHON_PACKAGE_CHECK([pytz])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bfd3fdd887c3465c03465248de4997eed4a82915 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:51:16 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for texttable.
+
+---
+ build/pkgs/texttable/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/texttable/spkg-configure.m4
+
+diff --git a/build/pkgs/texttable/spkg-configure.m4 b/build/pkgs/texttable/spkg-configure.m4
+new file mode 100644
+index 00000000..42a3de1
+--- /dev/null
++++ b/build/pkgs/texttable/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([texttable], [SAGE_PYTHON_PACKAGE_CHECK([texttable])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 914bf0cc57abc46129b27c1525782dbe16da31a2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:53:41 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for babel.
+
+---
+ build/pkgs/babel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/babel/spkg-configure.m4
+
+diff --git a/build/pkgs/babel/spkg-configure.m4 b/build/pkgs/babel/spkg-configure.m4
+new file mode 100644
+index 00000000..d7b9a71
+--- /dev/null
++++ b/build/pkgs/babel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([babel], [SAGE_PYTHON_PACKAGE_CHECK([babel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 56977abd1eafbc87c765a2892cfe525382648259 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 14 Oct 2021 08:06:59 -0400
+Subject: Trac #29665: force system python3 with --enable-system-site-packages.
+
+When the python SPKG is used, the --enable-system-site-packages flag
+will essentially do nothing, and that may confuse users who have
+wasted a few hours building sage. (Generally, they will want to fix
+detection of their system python3 first.)
+
+To forestall that, we now set "--with-system-python3=force" whenever
+the "--enable-system-site-packages" flag is passed.
+---
+ configure.ac | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index db30a91..6fafb83 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -438,10 +438,19 @@ AC_ARG_ENABLE([download-from-upstream-url],
+ AC_ARG_ENABLE(
+   [system-site-packages], [AS_HELP_STRING(
+     [--enable-system-site-packages],
+-    [allow sage to use python packages from the system (experimental; default: no)]
++    [allow the use of python packages from the system (experimental; default: no)]
+   )], [
+   AS_IF([test "x$enable_system_site_packages" = "xyes"], [
+     SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
++
++    dnl We want to raise an error if the user asked for "system site
++    dnl packages" but the system python will not be used. Technically
++    dnl that causes no problems (SAGE_PYTHON_PACKAGE_CHECK always fails,
++    dnl so SPKGs are used for all python packages), but it may be confusing
++    dnl to end users who expect the flag to actually give them access to
++    dnl their system python packages and who may not be paying close
++    dnl attention to their ./configure output.
++    with_system_python3="force"
+   ])
+ ])
+ AC_SUBST([SAGE_VENV_FLAGS])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 02b369fd24ef7cf8997082e7850b9cf022cae34b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 01:18:35 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for setuptools.
+
+---
+ build/pkgs/setuptools/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/setuptools/spkg-configure.m4
+
+diff --git a/build/pkgs/setuptools/spkg-configure.m4 b/build/pkgs/setuptools/spkg-configure.m4
+new file mode 100644
+index 00000000..a2ad811
+--- /dev/null
++++ b/build/pkgs/setuptools/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([setuptools], [SAGE_PYTHON_PACKAGE_CHECK([setuptools])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 05117317d38693978efaf36e81d8b02bae44b257 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 01:15:48 -0400
+Subject: Trac #29665: poison PYTHONUSERBASE when testing for "system"
+ packages.
+
+When we're detecting system installations of python packages, we want
+to hide anything that was installed with e.g. "pip install --user". To
+accomplish that, we mimic the PYTHONUSERBASE poisoning from sage-env
+within the SAGE_PYTHON_PACKAGE_CHECK() macro.
+---
+ m4/sage_python_package_check.m4 | 18 +++++++++++++++++-
+ 1 file changed, 17 insertions(+), 1 deletion(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 77b0a0c..b8cdba4 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -38,11 +38,27 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     dnl package.
+     SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
+     AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++
++    dnl To prevent user-site (pip install --user) packages from being
++    dnl detected as "system" packages, we poison PYTHONUSERBASE. The
++    dnl sage-env script also does this at runtime; we mimic that
++    dnl implementation to ensure that the behaviors at ./configure and
++    dnl runtime are identical. Beware that (as in sage-env) the poisoning
++    dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
++    dnl user points PYTHONUSERBASE to any path (even the default), then
++    dnl his local pip packages will be detected.
++    PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
++    AS_IF([test -z "${PYTHONUSERBASE}"], [
++      PYTHONUSERBASE="${HOME}/.sage/local"
++    ])
++
+     AS_IF(
+-      ["${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())"],
++      [PYTHONUSERBASE="${PYTHONUSERBASE}" "${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" 2>/dev/null],
+       [AC_MSG_RESULT(yes)],
+       [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+     )
++
++    PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d75c1492f63a584b5ec5f424ddd7f7c4a6d502d3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:20:04 -0400
+Subject: Trac #29665: run SAGE_PYTHON_PACKAGE_CHECK() inside a venv.
+
+To recreate the runtime environment as closely as possible, we now use
+a venv (with system site packages enabled) when checking for system
+copies of python packages.
+---
+ m4/sage_python_package_check.m4 | 76 +++++++++++++++++++++++++++--------------
+ 1 file changed, 51 insertions(+), 25 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index b8cdba4..7cbd6c0 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -15,9 +15,11 @@
+ #
+ #     2. If we are not using the system python (no $PYTHON_FOR_VENV),
+ #
+-#     3. If setuptools is not available to the system python,
++#     3. If we are unable to create a venv with the system python,
+ #
+-#     4. If the contents of install-requires.txt are not met (wrong
++#     4. If setuptools is not available to the system python,
++#
++#     5. If the contents of install-requires.txt are not met (wrong
+ #        version, no version, etc.) by the system python.
+ #
+ #   In any of those cases, we set sage_spkg_install_$package to "yes"
+@@ -27,38 +29,62 @@
+ #
+ #   The SAGE_SPKG_CONFIGURE_PYTHON3() macro is AC_REQUIRE'd to ensure
+ #   that $PYTHON_FOR_VENV is available, if it is going to be available.
++#   The check is run inside a new venv, and with the PYTHONUSERBASE
++#   variable poisoned in the same manner as sage-env poisons it, to
++#   ensure that the ./configure- and run-time views of the system
++#   are as similar as possible.
+ #
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
+     AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
+ 
+-    dnl strip all comments from install-requires.txt; this should leave
+-    dnl only a single line containing the version specification for this
+-    dnl package.
+-    SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
+-    AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++    dnl We run this check inside a python venv, because that's ultimately
++    dnl how the system $PYTHON_FOR_VENV will be used.
++    AC_MSG_CHECKING([if we can create a python venv in config.venv])
+ 
+-    dnl To prevent user-site (pip install --user) packages from being
+-    dnl detected as "system" packages, we poison PYTHONUSERBASE. The
+-    dnl sage-env script also does this at runtime; we mimic that
+-    dnl implementation to ensure that the behaviors at ./configure and
+-    dnl runtime are identical. Beware that (as in sage-env) the poisoning
+-    dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
+-    dnl user points PYTHONUSERBASE to any path (even the default), then
+-    dnl his local pip packages will be detected.
+-    PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
+-    AS_IF([test -z "${PYTHONUSERBASE}"], [
+-      PYTHONUSERBASE="${HOME}/.sage/local"
+-    ])
++    dnl Use --clear because ./configure typically clobbers its output files.
++    AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
++                                        --clear                dnl
++                                        --without-pip          dnl
++					config.venv], [
++      AC_MSG_RESULT(yes)
++      dnl strip all comments from install-requires.txt; this should leave
++      dnl only a single line containing the version specification for this
++      dnl package.
++      SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
++      AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++
++      dnl To prevent user-site (pip install --user) packages from being
++      dnl detected as "system" packages, we poison PYTHONUSERBASE. The
++      dnl sage-env script also does this at runtime; we mimic that
++      dnl implementation to ensure that the behaviors at ./configure and
++      dnl runtime are identical. Beware that (as in sage-env) the poisoning
++      dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
++      dnl user points PYTHONUSERBASE to any path (even the default), then
++      dnl his local pip packages will be detected.
++      PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
++      AS_IF([test -z "${PYTHONUSERBASE}"], [
++        PYTHONUSERBASE="${HOME}/.sage/local"
++      ])
+ 
+-    AS_IF(
+-      [PYTHONUSERBASE="${PYTHONUSERBASE}" "${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" 2>/dev/null],
+-      [AC_MSG_RESULT(yes)],
+-      [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+-    )
++      AS_IF(
++        [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
++           "from setuptools.version import pkg_resources;              dnl
++            pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" dnl
++	 2>/dev/null],
++        [AC_MSG_RESULT(yes)],
++        [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
++      )
++
++      PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
++    ], [
++      dnl failed to create a venv for some reason
++      AC_MSG_RESULT(no)
++      sage_spkg_install_$1=yes
++    ])
+ 
+-    PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
++    rm -rf config.venv
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 87646c3264a04ffd98a12d67074f93e1943a1e96 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:38:08 -0400
+Subject: Trac #29665: log SAGE_PYTHON_PACKAGE_CHECK() failures to config.log.
+
+---
+ m4/sage_python_package_check.m4 | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 7cbd6c0..e0e0b9f 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -47,7 +47,8 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
+                                         --clear                dnl
+                                         --without-pip          dnl
+-					config.venv], [
++                                        config.venv            dnl
++                                        2>&AS_MESSAGE_LOG_FD], [
+       AC_MSG_RESULT(yes)
+       dnl strip all comments from install-requires.txt; this should leave
+       dnl only a single line containing the version specification for this
+@@ -72,7 +73,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+         [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
+            "from setuptools.version import pkg_resources;              dnl
+             pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" dnl
+-	 2>/dev/null],
++	 2>&AS_MESSAGE_LOG_FD],
+         [AC_MSG_RESULT(yes)],
+         [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+       )
+-- 
+cgit v1.0-1-gd88e
+
+
+From f7dfffd1c64816e2ae4e0f420b22065c5c5bf2cb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:45:37 -0400
+Subject: Trac #29665: don't clobber a plain file named config.venv.
+
+When SAGE_PYTHON_PACKAGE_CHECK() is cleaning up, we no longer remove
+"config.venv" unconditionally. Instead, we remove it only if it is a
+directory. This is also how "pyvenv --clear" works.
+---
+ m4/sage_python_package_check.m4 | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index e0e0b9f..127a078 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -85,7 +85,9 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+       sage_spkg_install_$1=yes
+     ])
+ 
+-    rm -rf config.venv
++    dnl Clean up config.venv, but only if we could have created it.
++    dnl (The --clear flag to pyvenv will not clobber a plain file.)
++    AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9849c77313b895dcfb786d2ea54e36585bd31ce2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 16 Oct 2021 08:14:42 -0400
+Subject: Trac #29665: don't announce system python packages that won't be
+ used.
+
+When --enable-system-site-packages was not given, the python packages
+using SAGE_PYTHON_PACKAGE_CHECK() in spkg-configure.m4 cannot be used.
+Rather than suggest that users install them anyway, that macro now
+hacks the value of sage_use_system_$package to be "no" when the use
+of system site packages is disabled at the python level.
+---
+ m4/sage_python_package_check.m4 | 17 +++++++++++++++++
+ 1 file changed, 17 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 127a078..7ee82a7 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -89,6 +89,23 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     dnl (The --clear flag to pyvenv will not clobber a plain file.)
+     AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
++    dnl System site packages are disabled.
+     sage_spkg_install_$1=yes
++
++    dnl We have to retroactively hack the --with-system-foo={no,yes,force}
++    dnl mechanism here because it wasn't designed with the ability to
++    dnl disable arbitrary chunks of system packages in mind. The easy cases
++    dnl are "no" and "force" which require no action; "no" means we won't
++    dnl suggest the package anyway, and "force" will raise an error when
++    dnl the system-package check fails.
++    dnl
++    dnl The default of "yes" is more troubling because it is the default. To
++    dnl avoid prompting users to install packages that won't be used, we want
++    dnl to ignore "yes" when reporting the "hint: install these packages..."
++    dnl at the end of ./configure. To accomplish that, we change "yes" to
++    dnl "no" here, essentially changing the default for packages using this
++    dnl macro when --enable-system-site-packages is disabled. Packages with
++    dnl "no" are not suggested to the user.
++    AS_IF([test "${sage_use_system_$1}" = "yes"],[sage_use_system_$1=no])
+   ])
+ ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3e6ad737b94aaac234d615ecaf1a2455eb607f1a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 17 Oct 2021 06:16:21 -0400
+Subject: Trac #29665: add Gentoo package information for python packages.
+
+---
+ build/pkgs/babel/distros/gentoo.txt         | 1 +
+ build/pkgs/bleach/distros/gentoo.txt        | 1 +
+ build/pkgs/certifi/distros/gentoo.txt       | 1 +
+ build/pkgs/cvxopt/distros/gentoo.txt        | 1 +
+ build/pkgs/decorator/distros/gentoo.txt     | 1 +
+ build/pkgs/html5lib/distros/gentoo.txt      | 1 +
+ build/pkgs/idna/distros/gentoo.txt          | 1 +
+ build/pkgs/jinja2/distros/gentoo.txt        | 1 +
+ build/pkgs/matplotlib/distros/gentoo.txt    | 1 +
+ build/pkgs/mpmath/distros/gentoo.txt        | 1 +
+ build/pkgs/networkx/distros/gentoo.txt      | 1 +
+ build/pkgs/numpy/distros/gentoo.txt         | 1 +
+ build/pkgs/packaging/distros/gentoo.txt     | 1 +
+ build/pkgs/pandocfilters/distros/gentoo.txt | 1 +
+ build/pkgs/pickleshare/distros/gentoo.txt   | 1 +
+ build/pkgs/pillow/distros/gentoo.txt        | 1 +
+ build/pkgs/pluggy/distros/gentoo.txt        | 1 +
+ build/pkgs/pygments/distros/gentoo.txt      | 1 +
+ build/pkgs/pytz/distros/gentoo.txt          | 1 +
+ build/pkgs/pyzmq/distros/gentoo.txt         | 1 +
+ build/pkgs/requests/distros/gentoo.txt      | 1 +
+ build/pkgs/scipy/distros/gentoo.txt         | 1 +
+ build/pkgs/setuptools/distros/gentoo.txt    | 1 +
+ build/pkgs/six/distros/gentoo.txt           | 1 +
+ build/pkgs/sympy/distros/gentoo.txt         | 1 +
+ build/pkgs/texttable/distros/gentoo.txt     | 1 +
+ build/pkgs/toml/distros/gentoo.txt          | 1 +
+ build/pkgs/webencodings/distros/gentoo.txt  | 1 +
+ 28 files changed, 28 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/gentoo.txt
+ create mode 100644 build/pkgs/bleach/distros/gentoo.txt
+ create mode 100644 build/pkgs/certifi/distros/gentoo.txt
+ create mode 100644 build/pkgs/cvxopt/distros/gentoo.txt
+ create mode 100644 build/pkgs/decorator/distros/gentoo.txt
+ create mode 100644 build/pkgs/html5lib/distros/gentoo.txt
+ create mode 100644 build/pkgs/idna/distros/gentoo.txt
+ create mode 100644 build/pkgs/jinja2/distros/gentoo.txt
+ create mode 100644 build/pkgs/matplotlib/distros/gentoo.txt
+ create mode 100644 build/pkgs/mpmath/distros/gentoo.txt
+ create mode 100644 build/pkgs/networkx/distros/gentoo.txt
+ create mode 100644 build/pkgs/numpy/distros/gentoo.txt
+ create mode 100644 build/pkgs/packaging/distros/gentoo.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/gentoo.txt
+ create mode 100644 build/pkgs/pickleshare/distros/gentoo.txt
+ create mode 100644 build/pkgs/pillow/distros/gentoo.txt
+ create mode 100644 build/pkgs/pluggy/distros/gentoo.txt
+ create mode 100644 build/pkgs/pygments/distros/gentoo.txt
+ create mode 100644 build/pkgs/pytz/distros/gentoo.txt
+ create mode 100644 build/pkgs/pyzmq/distros/gentoo.txt
+ create mode 100644 build/pkgs/requests/distros/gentoo.txt
+ create mode 100644 build/pkgs/scipy/distros/gentoo.txt
+ create mode 100644 build/pkgs/setuptools/distros/gentoo.txt
+ create mode 100644 build/pkgs/six/distros/gentoo.txt
+ create mode 100644 build/pkgs/sympy/distros/gentoo.txt
+ create mode 100644 build/pkgs/texttable/distros/gentoo.txt
+ create mode 100644 build/pkgs/toml/distros/gentoo.txt
+ create mode 100644 build/pkgs/webencodings/distros/gentoo.txt
+
+diff --git a/build/pkgs/babel/distros/gentoo.txt b/build/pkgs/babel/distros/gentoo.txt
+new file mode 100644
+index 00000000..2d2c34f
+--- /dev/null
++++ b/build/pkgs/babel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/Babel
+diff --git a/build/pkgs/bleach/distros/gentoo.txt b/build/pkgs/bleach/distros/gentoo.txt
+new file mode 100644
+index 00000000..b4f9744
+--- /dev/null
++++ b/build/pkgs/bleach/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/bleach
+diff --git a/build/pkgs/certifi/distros/gentoo.txt b/build/pkgs/certifi/distros/gentoo.txt
+new file mode 100644
+index 00000000..72e2e91
+--- /dev/null
++++ b/build/pkgs/certifi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/certifi
+diff --git a/build/pkgs/cvxopt/distros/gentoo.txt b/build/pkgs/cvxopt/distros/gentoo.txt
+new file mode 100644
+index 00000000..b312391
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/cvxopt
+diff --git a/build/pkgs/decorator/distros/gentoo.txt b/build/pkgs/decorator/distros/gentoo.txt
+new file mode 100644
+index 00000000..fea5a67
+--- /dev/null
++++ b/build/pkgs/decorator/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/decorator
+diff --git a/build/pkgs/html5lib/distros/gentoo.txt b/build/pkgs/html5lib/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c2be76
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/html5lib
+diff --git a/build/pkgs/idna/distros/gentoo.txt b/build/pkgs/idna/distros/gentoo.txt
+new file mode 100644
+index 00000000..68ef51c
+--- /dev/null
++++ b/build/pkgs/idna/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/idna
+diff --git a/build/pkgs/jinja2/distros/gentoo.txt b/build/pkgs/jinja2/distros/gentoo.txt
+new file mode 100644
+index 00000000..15a27ae
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jinja
+diff --git a/build/pkgs/matplotlib/distros/gentoo.txt b/build/pkgs/matplotlib/distros/gentoo.txt
+new file mode 100644
+index 00000000..bcfefb5
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/matplotlib
+diff --git a/build/pkgs/mpmath/distros/gentoo.txt b/build/pkgs/mpmath/distros/gentoo.txt
+new file mode 100644
+index 00000000..946c62d
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/mpmath
+diff --git a/build/pkgs/networkx/distros/gentoo.txt b/build/pkgs/networkx/distros/gentoo.txt
+new file mode 100644
+index 00000000..dd97742
+--- /dev/null
++++ b/build/pkgs/networkx/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/networkx
+diff --git a/build/pkgs/numpy/distros/gentoo.txt b/build/pkgs/numpy/distros/gentoo.txt
+new file mode 100644
+index 00000000..d2179d4
+--- /dev/null
++++ b/build/pkgs/numpy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/numpy
+diff --git a/build/pkgs/packaging/distros/gentoo.txt b/build/pkgs/packaging/distros/gentoo.txt
+new file mode 100644
+index 00000000..e5309ed
+--- /dev/null
++++ b/build/pkgs/packaging/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/packaging
+diff --git a/build/pkgs/pandocfilters/distros/gentoo.txt b/build/pkgs/pandocfilters/distros/gentoo.txt
+new file mode 100644
+index 00000000..a726fda
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/gentoo.txt b/build/pkgs/pickleshare/distros/gentoo.txt
+new file mode 100644
+index 00000000..14fad0f
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pickleshare
+diff --git a/build/pkgs/pillow/distros/gentoo.txt b/build/pkgs/pillow/distros/gentoo.txt
+new file mode 100644
+index 00000000..1243649
+--- /dev/null
++++ b/build/pkgs/pillow/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pillow
+diff --git a/build/pkgs/pluggy/distros/gentoo.txt b/build/pkgs/pluggy/distros/gentoo.txt
+new file mode 100644
+index 00000000..7b33876
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pluggy
+diff --git a/build/pkgs/pygments/distros/gentoo.txt b/build/pkgs/pygments/distros/gentoo.txt
+new file mode 100644
+index 00000000..a584f32
+--- /dev/null
++++ b/build/pkgs/pygments/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pygments
+diff --git a/build/pkgs/pytz/distros/gentoo.txt b/build/pkgs/pytz/distros/gentoo.txt
+new file mode 100644
+index 00000000..902a18b
+--- /dev/null
++++ b/build/pkgs/pytz/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pytz
+diff --git a/build/pkgs/pyzmq/distros/gentoo.txt b/build/pkgs/pyzmq/distros/gentoo.txt
+new file mode 100644
+index 00000000..77c2429
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyzmq
+diff --git a/build/pkgs/requests/distros/gentoo.txt b/build/pkgs/requests/distros/gentoo.txt
+new file mode 100644
+index 00000000..d3dc941
+--- /dev/null
++++ b/build/pkgs/requests/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/requests
+diff --git a/build/pkgs/scipy/distros/gentoo.txt b/build/pkgs/scipy/distros/gentoo.txt
+new file mode 100644
+index 00000000..11dabd2
+--- /dev/null
++++ b/build/pkgs/scipy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/scipy
+diff --git a/build/pkgs/setuptools/distros/gentoo.txt b/build/pkgs/setuptools/distros/gentoo.txt
+new file mode 100644
+index 00000000..3a4fa34
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/setuptools
+diff --git a/build/pkgs/six/distros/gentoo.txt b/build/pkgs/six/distros/gentoo.txt
+new file mode 100644
+index 00000000..f73f648
+--- /dev/null
++++ b/build/pkgs/six/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/six
+diff --git a/build/pkgs/sympy/distros/gentoo.txt b/build/pkgs/sympy/distros/gentoo.txt
+new file mode 100644
+index 00000000..b5a5034
+--- /dev/null
++++ b/build/pkgs/sympy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sympy
+diff --git a/build/pkgs/texttable/distros/gentoo.txt b/build/pkgs/texttable/distros/gentoo.txt
+new file mode 100644
+index 00000000..b33a7a7
+--- /dev/null
++++ b/build/pkgs/texttable/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/texttable
+diff --git a/build/pkgs/toml/distros/gentoo.txt b/build/pkgs/toml/distros/gentoo.txt
+new file mode 100644
+index 00000000..64fcea3
+--- /dev/null
++++ b/build/pkgs/toml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/toml
+diff --git a/build/pkgs/webencodings/distros/gentoo.txt b/build/pkgs/webencodings/distros/gentoo.txt
+new file mode 100644
+index 00000000..7539b0f
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/webencodings
+-- 
+cgit v1.0-1-gd88e
+
+
+From 088380f884124c9608160b613ba031c5f023f604 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 18:43:04 -0700
+Subject: build/pkgs: Add distros/fedora.txt for Python packages
+
+---
+ build/pkgs/babel/distros/fedora.txt         | 1 +
+ build/pkgs/bleach/distros/fedora.txt        | 1 +
+ build/pkgs/certifi/distros/fedora.txt       | 1 +
+ build/pkgs/cvxopt/distros/fedora.txt        | 1 +
+ build/pkgs/decorator/distros/fedora.txt     | 1 +
+ build/pkgs/html5lib/distros/fedora.txt      | 1 +
+ build/pkgs/idna/distros/fedora.txt          | 1 +
+ build/pkgs/jinja2/distros/fedora.txt        | 1 +
+ build/pkgs/matplotlib/distros/fedora.txt    | 1 +
+ build/pkgs/mpmath/distros/fedora.txt        | 1 +
+ build/pkgs/networkx/distros/fedora.txt      | 1 +
+ build/pkgs/numpy/distros/fedora.txt         | 1 +
+ build/pkgs/packaging/distros/fedora.txt     | 1 +
+ build/pkgs/pandocfilters/distros/fedora.txt | 1 +
+ build/pkgs/pickleshare/distros/fedora.txt   | 1 +
+ build/pkgs/pillow/distros/fedora.txt        | 1 +
+ build/pkgs/pluggy/distros/fedora.txt        | 1 +
+ build/pkgs/py/distros/fedora.txt            | 1 +
+ build/pkgs/pygments/distros/fedora.txt      | 1 +
+ build/pkgs/pytz/distros/fedora.txt          | 1 +
+ build/pkgs/pyzmq/distros/fedora.txt         | 1 +
+ build/pkgs/requests/distros/fedora.txt      | 1 +
+ build/pkgs/scipy/distros/fedora.txt         | 1 +
+ build/pkgs/setuptools/distros/fedora.txt    | 1 +
+ build/pkgs/six/distros/fedora.txt           | 1 +
+ build/pkgs/sympy/distros/fedora.txt         | 1 +
+ build/pkgs/texttable/distros/fedora.txt     | 1 +
+ build/pkgs/toml/distros/fedora.txt          | 1 +
+ build/pkgs/webencodings/distros/fedora.txt  | 1 +
+ build/pkgs/wheel/distros/fedora.txt         | 1 +
+ 30 files changed, 30 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/fedora.txt
+ create mode 100644 build/pkgs/bleach/distros/fedora.txt
+ create mode 100644 build/pkgs/certifi/distros/fedora.txt
+ create mode 100644 build/pkgs/cvxopt/distros/fedora.txt
+ create mode 100644 build/pkgs/decorator/distros/fedora.txt
+ create mode 100644 build/pkgs/html5lib/distros/fedora.txt
+ create mode 100644 build/pkgs/idna/distros/fedora.txt
+ create mode 100644 build/pkgs/jinja2/distros/fedora.txt
+ create mode 100644 build/pkgs/matplotlib/distros/fedora.txt
+ create mode 100644 build/pkgs/mpmath/distros/fedora.txt
+ create mode 100644 build/pkgs/networkx/distros/fedora.txt
+ create mode 100644 build/pkgs/numpy/distros/fedora.txt
+ create mode 100644 build/pkgs/packaging/distros/fedora.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/fedora.txt
+ create mode 100644 build/pkgs/pickleshare/distros/fedora.txt
+ create mode 100644 build/pkgs/pillow/distros/fedora.txt
+ create mode 100644 build/pkgs/pluggy/distros/fedora.txt
+ create mode 100644 build/pkgs/py/distros/fedora.txt
+ create mode 100644 build/pkgs/pygments/distros/fedora.txt
+ create mode 100644 build/pkgs/pytz/distros/fedora.txt
+ create mode 100644 build/pkgs/pyzmq/distros/fedora.txt
+ create mode 100644 build/pkgs/requests/distros/fedora.txt
+ create mode 100644 build/pkgs/scipy/distros/fedora.txt
+ create mode 100644 build/pkgs/setuptools/distros/fedora.txt
+ create mode 100644 build/pkgs/six/distros/fedora.txt
+ create mode 100644 build/pkgs/sympy/distros/fedora.txt
+ create mode 100644 build/pkgs/texttable/distros/fedora.txt
+ create mode 100644 build/pkgs/toml/distros/fedora.txt
+ create mode 100644 build/pkgs/webencodings/distros/fedora.txt
+ create mode 100644 build/pkgs/wheel/distros/fedora.txt
+
+diff --git a/build/pkgs/babel/distros/fedora.txt b/build/pkgs/babel/distros/fedora.txt
+new file mode 100644
+index 00000000..98f6593
+--- /dev/null
++++ b/build/pkgs/babel/distros/fedora.txt
+@@ -0,0 +1 @@
++babel
+diff --git a/build/pkgs/bleach/distros/fedora.txt b/build/pkgs/bleach/distros/fedora.txt
+new file mode 100644
+index 00000000..c5422cc
+--- /dev/null
++++ b/build/pkgs/bleach/distros/fedora.txt
+@@ -0,0 +1 @@
++python-bleach
+diff --git a/build/pkgs/certifi/distros/fedora.txt b/build/pkgs/certifi/distros/fedora.txt
+new file mode 100644
+index 00000000..be421c8
+--- /dev/null
++++ b/build/pkgs/certifi/distros/fedora.txt
+@@ -0,0 +1 @@
++python-certifi
+diff --git a/build/pkgs/cvxopt/distros/fedora.txt b/build/pkgs/cvxopt/distros/fedora.txt
+new file mode 100644
+index 00000000..f15770f
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/fedora.txt
+@@ -0,0 +1 @@
++python-cvxopt
+diff --git a/build/pkgs/decorator/distros/fedora.txt b/build/pkgs/decorator/distros/fedora.txt
+new file mode 100644
+index 00000000..0795604
+--- /dev/null
++++ b/build/pkgs/decorator/distros/fedora.txt
+@@ -0,0 +1 @@
++python-decorator
+diff --git a/build/pkgs/html5lib/distros/fedora.txt b/build/pkgs/html5lib/distros/fedora.txt
+new file mode 100644
+index 00000000..b821491
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/fedora.txt
+@@ -0,0 +1 @@
++python-html5lib
+diff --git a/build/pkgs/idna/distros/fedora.txt b/build/pkgs/idna/distros/fedora.txt
+new file mode 100644
+index 00000000..a73e70c
+--- /dev/null
++++ b/build/pkgs/idna/distros/fedora.txt
+@@ -0,0 +1 @@
++python-idna
+diff --git a/build/pkgs/jinja2/distros/fedora.txt b/build/pkgs/jinja2/distros/fedora.txt
+new file mode 100644
+index 00000000..f5f3caf
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/fedora.txt
+@@ -0,0 +1 @@
++python-jinja2
+diff --git a/build/pkgs/matplotlib/distros/fedora.txt b/build/pkgs/matplotlib/distros/fedora.txt
+new file mode 100644
+index 00000000..f6d856e
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/fedora.txt
+@@ -0,0 +1 @@
++python-matplotlib
+diff --git a/build/pkgs/mpmath/distros/fedora.txt b/build/pkgs/mpmath/distros/fedora.txt
+new file mode 100644
+index 00000000..a7dc8d5
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/fedora.txt
+@@ -0,0 +1 @@
++python-mpmath
+diff --git a/build/pkgs/networkx/distros/fedora.txt b/build/pkgs/networkx/distros/fedora.txt
+new file mode 100644
+index 00000000..293f943
+--- /dev/null
++++ b/build/pkgs/networkx/distros/fedora.txt
+@@ -0,0 +1 @@
++python-networkx
+diff --git a/build/pkgs/numpy/distros/fedora.txt b/build/pkgs/numpy/distros/fedora.txt
+new file mode 100644
+index 00000000..c8722b9
+--- /dev/null
++++ b/build/pkgs/numpy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-numpy
+diff --git a/build/pkgs/packaging/distros/fedora.txt b/build/pkgs/packaging/distros/fedora.txt
+new file mode 100644
+index 00000000..02ad855
+--- /dev/null
++++ b/build/pkgs/packaging/distros/fedora.txt
+@@ -0,0 +1 @@
++python-packaging
+diff --git a/build/pkgs/pandocfilters/distros/fedora.txt b/build/pkgs/pandocfilters/distros/fedora.txt
+new file mode 100644
+index 00000000..e7a86d0
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/fedora.txt b/build/pkgs/pickleshare/distros/fedora.txt
+new file mode 100644
+index 00000000..6d991a2
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pickleshare
+diff --git a/build/pkgs/pillow/distros/fedora.txt b/build/pkgs/pillow/distros/fedora.txt
+new file mode 100644
+index 00000000..86dbb1d
+--- /dev/null
++++ b/build/pkgs/pillow/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pillow
+diff --git a/build/pkgs/pluggy/distros/fedora.txt b/build/pkgs/pluggy/distros/fedora.txt
+new file mode 100644
+index 00000000..c869e54
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pluggy
+diff --git a/build/pkgs/py/distros/fedora.txt b/build/pkgs/py/distros/fedora.txt
+new file mode 100644
+index 00000000..b348d39
+--- /dev/null
++++ b/build/pkgs/py/distros/fedora.txt
+@@ -0,0 +1 @@
++python-py
+diff --git a/build/pkgs/pygments/distros/fedora.txt b/build/pkgs/pygments/distros/fedora.txt
+new file mode 100644
+index 00000000..f3e72a8
+--- /dev/null
++++ b/build/pkgs/pygments/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pygments
+diff --git a/build/pkgs/pytz/distros/fedora.txt b/build/pkgs/pytz/distros/fedora.txt
+new file mode 100644
+index 00000000..2cccc9e
+--- /dev/null
++++ b/build/pkgs/pytz/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pytz
+diff --git a/build/pkgs/pyzmq/distros/fedora.txt b/build/pkgs/pyzmq/distros/fedora.txt
+new file mode 100644
+index 00000000..23f64d1
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pyzmq
+diff --git a/build/pkgs/requests/distros/fedora.txt b/build/pkgs/requests/distros/fedora.txt
+new file mode 100644
+index 00000000..93a7bc1
+--- /dev/null
++++ b/build/pkgs/requests/distros/fedora.txt
+@@ -0,0 +1 @@
++python-requests
+diff --git a/build/pkgs/scipy/distros/fedora.txt b/build/pkgs/scipy/distros/fedora.txt
+new file mode 100644
+index 00000000..7ff2882
+--- /dev/null
++++ b/build/pkgs/scipy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-scipy
+diff --git a/build/pkgs/setuptools/distros/fedora.txt b/build/pkgs/setuptools/distros/fedora.txt
+new file mode 100644
+index 00000000..e1ad178
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/fedora.txt
+@@ -0,0 +1 @@
++python-setuptools
+diff --git a/build/pkgs/six/distros/fedora.txt b/build/pkgs/six/distros/fedora.txt
+new file mode 100644
+index 00000000..787c530
+--- /dev/null
++++ b/build/pkgs/six/distros/fedora.txt
+@@ -0,0 +1 @@
++python-six
+diff --git a/build/pkgs/sympy/distros/fedora.txt b/build/pkgs/sympy/distros/fedora.txt
+new file mode 100644
+index 00000000..126c88a
+--- /dev/null
++++ b/build/pkgs/sympy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-sympy
+diff --git a/build/pkgs/texttable/distros/fedora.txt b/build/pkgs/texttable/distros/fedora.txt
+new file mode 100644
+index 00000000..8d1ccec
+--- /dev/null
++++ b/build/pkgs/texttable/distros/fedora.txt
+@@ -0,0 +1 @@
++python-texttable
+diff --git a/build/pkgs/toml/distros/fedora.txt b/build/pkgs/toml/distros/fedora.txt
+new file mode 100644
+index 00000000..821ee77
+--- /dev/null
++++ b/build/pkgs/toml/distros/fedora.txt
+@@ -0,0 +1 @@
++python-toml
+diff --git a/build/pkgs/webencodings/distros/fedora.txt b/build/pkgs/webencodings/distros/fedora.txt
+new file mode 100644
+index 00000000..12ddba9
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/fedora.txt
+@@ -0,0 +1 @@
++python-webencodings
+diff --git a/build/pkgs/wheel/distros/fedora.txt b/build/pkgs/wheel/distros/fedora.txt
+new file mode 100644
+index 00000000..ae4cbb9
+--- /dev/null
++++ b/build/pkgs/wheel/distros/fedora.txt
+@@ -0,0 +1 @@
++python-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From ad1d5a20380b147c774903066031442f31094626 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 21:04:04 -0700
+Subject: build/pkgs: Add distros/arch.txt for Python packages
+
+---
+ build/pkgs/babel/distros/arch.txt         | 1 +
+ build/pkgs/bleach/distros/arch.txt        | 1 +
+ build/pkgs/certifi/distros/arch.txt       | 1 +
+ build/pkgs/cvxopt/distros/arch.txt        | 1 +
+ build/pkgs/decorator/distros/arch.txt     | 1 +
+ build/pkgs/html5lib/distros/arch.txt      | 1 +
+ build/pkgs/idna/distros/arch.txt          | 1 +
+ build/pkgs/matplotlib/distros/arch.txt    | 1 +
+ build/pkgs/mpmath/distros/arch.txt        | 1 +
+ build/pkgs/networkx/distros/arch.txt      | 1 +
+ build/pkgs/numpy/distros/arch.txt         | 1 +
+ build/pkgs/packaging/distros/arch.txt     | 1 +
+ build/pkgs/pandocfilters/distros/arch.txt | 1 +
+ build/pkgs/pickleshare/distros/arch.txt   | 1 +
+ build/pkgs/pillow/distros/arch.txt        | 1 +
+ build/pkgs/pluggy/distros/arch.txt        | 1 +
+ build/pkgs/py/distros/arch.txt            | 1 +
+ build/pkgs/pygments/distros/arch.txt      | 1 +
+ build/pkgs/pytz/distros/arch.txt          | 1 +
+ build/pkgs/pyzmq/distros/arch.txt         | 1 +
+ build/pkgs/requests/distros/arch.txt      | 1 +
+ build/pkgs/scipy/distros/arch.txt         | 1 +
+ build/pkgs/setuptools/distros/arch.txt    | 1 +
+ build/pkgs/six/distros/arch.txt           | 1 +
+ build/pkgs/sympy/distros/arch.txt         | 1 +
+ build/pkgs/texttable/distros/arch.txt     | 1 +
+ build/pkgs/toml/distros/arch.txt          | 1 +
+ build/pkgs/webencodings/distros/arch.txt  | 1 +
+ build/pkgs/wheel/distros/arch.txt         | 1 +
+ 29 files changed, 29 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/arch.txt
+ create mode 100644 build/pkgs/bleach/distros/arch.txt
+ create mode 100644 build/pkgs/certifi/distros/arch.txt
+ create mode 100644 build/pkgs/cvxopt/distros/arch.txt
+ create mode 100644 build/pkgs/decorator/distros/arch.txt
+ create mode 100644 build/pkgs/html5lib/distros/arch.txt
+ create mode 100644 build/pkgs/idna/distros/arch.txt
+ create mode 100644 build/pkgs/matplotlib/distros/arch.txt
+ create mode 100644 build/pkgs/mpmath/distros/arch.txt
+ create mode 100644 build/pkgs/networkx/distros/arch.txt
+ create mode 100644 build/pkgs/numpy/distros/arch.txt
+ create mode 100644 build/pkgs/packaging/distros/arch.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/arch.txt
+ create mode 100644 build/pkgs/pickleshare/distros/arch.txt
+ create mode 100644 build/pkgs/pillow/distros/arch.txt
+ create mode 100644 build/pkgs/pluggy/distros/arch.txt
+ create mode 100644 build/pkgs/py/distros/arch.txt
+ create mode 100644 build/pkgs/pygments/distros/arch.txt
+ create mode 100644 build/pkgs/pytz/distros/arch.txt
+ create mode 100644 build/pkgs/pyzmq/distros/arch.txt
+ create mode 100644 build/pkgs/requests/distros/arch.txt
+ create mode 100644 build/pkgs/scipy/distros/arch.txt
+ create mode 100644 build/pkgs/setuptools/distros/arch.txt
+ create mode 100644 build/pkgs/six/distros/arch.txt
+ create mode 100644 build/pkgs/sympy/distros/arch.txt
+ create mode 100644 build/pkgs/texttable/distros/arch.txt
+ create mode 100644 build/pkgs/toml/distros/arch.txt
+ create mode 100644 build/pkgs/webencodings/distros/arch.txt
+ create mode 100644 build/pkgs/wheel/distros/arch.txt
+
+diff --git a/build/pkgs/babel/distros/arch.txt b/build/pkgs/babel/distros/arch.txt
+new file mode 100644
+index 00000000..f2d828c
+--- /dev/null
++++ b/build/pkgs/babel/distros/arch.txt
+@@ -0,0 +1 @@
++python-babel
+diff --git a/build/pkgs/bleach/distros/arch.txt b/build/pkgs/bleach/distros/arch.txt
+new file mode 100644
+index 00000000..c5422cc
+--- /dev/null
++++ b/build/pkgs/bleach/distros/arch.txt
+@@ -0,0 +1 @@
++python-bleach
+diff --git a/build/pkgs/certifi/distros/arch.txt b/build/pkgs/certifi/distros/arch.txt
+new file mode 100644
+index 00000000..be421c8
+--- /dev/null
++++ b/build/pkgs/certifi/distros/arch.txt
+@@ -0,0 +1 @@
++python-certifi
+diff --git a/build/pkgs/cvxopt/distros/arch.txt b/build/pkgs/cvxopt/distros/arch.txt
+new file mode 100644
+index 00000000..f15770f
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/arch.txt
+@@ -0,0 +1 @@
++python-cvxopt
+diff --git a/build/pkgs/decorator/distros/arch.txt b/build/pkgs/decorator/distros/arch.txt
+new file mode 100644
+index 00000000..0795604
+--- /dev/null
++++ b/build/pkgs/decorator/distros/arch.txt
+@@ -0,0 +1 @@
++python-decorator
+diff --git a/build/pkgs/html5lib/distros/arch.txt b/build/pkgs/html5lib/distros/arch.txt
+new file mode 100644
+index 00000000..b821491
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/arch.txt
+@@ -0,0 +1 @@
++python-html5lib
+diff --git a/build/pkgs/idna/distros/arch.txt b/build/pkgs/idna/distros/arch.txt
+new file mode 100644
+index 00000000..a73e70c
+--- /dev/null
++++ b/build/pkgs/idna/distros/arch.txt
+@@ -0,0 +1 @@
++python-idna
+diff --git a/build/pkgs/matplotlib/distros/arch.txt b/build/pkgs/matplotlib/distros/arch.txt
+new file mode 100644
+index 00000000..f6d856e
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/arch.txt
+@@ -0,0 +1 @@
++python-matplotlib
+diff --git a/build/pkgs/mpmath/distros/arch.txt b/build/pkgs/mpmath/distros/arch.txt
+new file mode 100644
+index 00000000..a7dc8d5
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/arch.txt
+@@ -0,0 +1 @@
++python-mpmath
+diff --git a/build/pkgs/networkx/distros/arch.txt b/build/pkgs/networkx/distros/arch.txt
+new file mode 100644
+index 00000000..293f943
+--- /dev/null
++++ b/build/pkgs/networkx/distros/arch.txt
+@@ -0,0 +1 @@
++python-networkx
+diff --git a/build/pkgs/numpy/distros/arch.txt b/build/pkgs/numpy/distros/arch.txt
+new file mode 100644
+index 00000000..c8722b9
+--- /dev/null
++++ b/build/pkgs/numpy/distros/arch.txt
+@@ -0,0 +1 @@
++python-numpy
+diff --git a/build/pkgs/packaging/distros/arch.txt b/build/pkgs/packaging/distros/arch.txt
+new file mode 100644
+index 00000000..02ad855
+--- /dev/null
++++ b/build/pkgs/packaging/distros/arch.txt
+@@ -0,0 +1 @@
++python-packaging
+diff --git a/build/pkgs/pandocfilters/distros/arch.txt b/build/pkgs/pandocfilters/distros/arch.txt
+new file mode 100644
+index 00000000..e7a86d0
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/arch.txt
+@@ -0,0 +1 @@
++python-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/arch.txt b/build/pkgs/pickleshare/distros/arch.txt
+new file mode 100644
+index 00000000..6d991a2
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/arch.txt
+@@ -0,0 +1 @@
++python-pickleshare
+diff --git a/build/pkgs/pillow/distros/arch.txt b/build/pkgs/pillow/distros/arch.txt
+new file mode 100644
+index 00000000..86dbb1d
+--- /dev/null
++++ b/build/pkgs/pillow/distros/arch.txt
+@@ -0,0 +1 @@
++python-pillow
+diff --git a/build/pkgs/pluggy/distros/arch.txt b/build/pkgs/pluggy/distros/arch.txt
+new file mode 100644
+index 00000000..c869e54
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/arch.txt
+@@ -0,0 +1 @@
++python-pluggy
+diff --git a/build/pkgs/py/distros/arch.txt b/build/pkgs/py/distros/arch.txt
+new file mode 100644
+index 00000000..b348d39
+--- /dev/null
++++ b/build/pkgs/py/distros/arch.txt
+@@ -0,0 +1 @@
++python-py
+diff --git a/build/pkgs/pygments/distros/arch.txt b/build/pkgs/pygments/distros/arch.txt
+new file mode 100644
+index 00000000..f3e72a8
+--- /dev/null
++++ b/build/pkgs/pygments/distros/arch.txt
+@@ -0,0 +1 @@
++python-pygments
+diff --git a/build/pkgs/pytz/distros/arch.txt b/build/pkgs/pytz/distros/arch.txt
+new file mode 100644
+index 00000000..2cccc9e
+--- /dev/null
++++ b/build/pkgs/pytz/distros/arch.txt
+@@ -0,0 +1 @@
++python-pytz
+diff --git a/build/pkgs/pyzmq/distros/arch.txt b/build/pkgs/pyzmq/distros/arch.txt
+new file mode 100644
+index 00000000..23f64d1
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/arch.txt
+@@ -0,0 +1 @@
++python-pyzmq
+diff --git a/build/pkgs/requests/distros/arch.txt b/build/pkgs/requests/distros/arch.txt
+new file mode 100644
+index 00000000..93a7bc1
+--- /dev/null
++++ b/build/pkgs/requests/distros/arch.txt
+@@ -0,0 +1 @@
++python-requests
+diff --git a/build/pkgs/scipy/distros/arch.txt b/build/pkgs/scipy/distros/arch.txt
+new file mode 100644
+index 00000000..7ff2882
+--- /dev/null
++++ b/build/pkgs/scipy/distros/arch.txt
+@@ -0,0 +1 @@
++python-scipy
+diff --git a/build/pkgs/setuptools/distros/arch.txt b/build/pkgs/setuptools/distros/arch.txt
+new file mode 100644
+index 00000000..e1ad178
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/arch.txt
+@@ -0,0 +1 @@
++python-setuptools
+diff --git a/build/pkgs/six/distros/arch.txt b/build/pkgs/six/distros/arch.txt
+new file mode 100644
+index 00000000..787c530
+--- /dev/null
++++ b/build/pkgs/six/distros/arch.txt
+@@ -0,0 +1 @@
++python-six
+diff --git a/build/pkgs/sympy/distros/arch.txt b/build/pkgs/sympy/distros/arch.txt
+new file mode 100644
+index 00000000..126c88a
+--- /dev/null
++++ b/build/pkgs/sympy/distros/arch.txt
+@@ -0,0 +1 @@
++python-sympy
+diff --git a/build/pkgs/texttable/distros/arch.txt b/build/pkgs/texttable/distros/arch.txt
+new file mode 100644
+index 00000000..8d1ccec
+--- /dev/null
++++ b/build/pkgs/texttable/distros/arch.txt
+@@ -0,0 +1 @@
++python-texttable
+diff --git a/build/pkgs/toml/distros/arch.txt b/build/pkgs/toml/distros/arch.txt
+new file mode 100644
+index 00000000..821ee77
+--- /dev/null
++++ b/build/pkgs/toml/distros/arch.txt
+@@ -0,0 +1 @@
++python-toml
+diff --git a/build/pkgs/webencodings/distros/arch.txt b/build/pkgs/webencodings/distros/arch.txt
+new file mode 100644
+index 00000000..12ddba9
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/arch.txt
+@@ -0,0 +1 @@
++python-webencodings
+diff --git a/build/pkgs/wheel/distros/arch.txt b/build/pkgs/wheel/distros/arch.txt
+new file mode 100644
+index 00000000..ae4cbb9
+--- /dev/null
++++ b/build/pkgs/wheel/distros/arch.txt
+@@ -0,0 +1 @@
++python-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5087abee08f2a89ddaf422ec72a84575fe724a79 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 21:20:56 -0700
+Subject: build/pkgs: Add distros/opensuse.txt for Python packages
+
+---
+ build/pkgs/bleach/distros/opensuse.txt        | 1 +
+ build/pkgs/cvxopt/distros/opensuse.txt        | 1 +
+ build/pkgs/html5lib/distros/opensuse.txt      | 1 +
+ build/pkgs/idna/distros/opensuse.txt          | 1 +
+ build/pkgs/jinja2/distros/opensuse.txt        | 2 +-
+ build/pkgs/mpmath/distros/opensuse.txt        | 1 +
+ build/pkgs/numpy/distros/opensuse.txt         | 1 +
+ build/pkgs/packaging/distros/opensuse.txt     | 1 +
+ build/pkgs/pandocfilters/distros/opensuse.txt | 1 +
+ build/pkgs/pluggy/distros/opensuse.txt        | 1 +
+ build/pkgs/py/distros/opensuse.txt            | 1 +
+ build/pkgs/pygments/distros/opensuse.txt      | 2 +-
+ build/pkgs/sympy/distros/opensuse.txt         | 1 +
+ build/pkgs/texttable/distros/opensuse.txt     | 1 +
+ build/pkgs/toml/distros/opensuse.txt          | 1 +
+ 15 files changed, 15 insertions(+), 2 deletions(-)
+ create mode 100644 build/pkgs/bleach/distros/opensuse.txt
+ create mode 100644 build/pkgs/cvxopt/distros/opensuse.txt
+ create mode 100644 build/pkgs/html5lib/distros/opensuse.txt
+ create mode 100644 build/pkgs/idna/distros/opensuse.txt
+ create mode 100644 build/pkgs/mpmath/distros/opensuse.txt
+ create mode 100644 build/pkgs/numpy/distros/opensuse.txt
+ create mode 100644 build/pkgs/packaging/distros/opensuse.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/opensuse.txt
+ create mode 100644 build/pkgs/pluggy/distros/opensuse.txt
+ create mode 100644 build/pkgs/py/distros/opensuse.txt
+ create mode 100644 build/pkgs/sympy/distros/opensuse.txt
+ create mode 100644 build/pkgs/texttable/distros/opensuse.txt
+ create mode 100644 build/pkgs/toml/distros/opensuse.txt
+
+diff --git a/build/pkgs/bleach/distros/opensuse.txt b/build/pkgs/bleach/distros/opensuse.txt
+new file mode 100644
+index 00000000..6d37c4c
+--- /dev/null
++++ b/build/pkgs/bleach/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-bleach
+diff --git a/build/pkgs/cvxopt/distros/opensuse.txt b/build/pkgs/cvxopt/distros/opensuse.txt
+new file mode 100644
+index 00000000..2bb6ad1
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-cvxopt
+diff --git a/build/pkgs/html5lib/distros/opensuse.txt b/build/pkgs/html5lib/distros/opensuse.txt
+new file mode 100644
+index 00000000..6d7b8df
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-html5lib
+diff --git a/build/pkgs/idna/distros/opensuse.txt b/build/pkgs/idna/distros/opensuse.txt
+new file mode 100644
+index 00000000..de48e70
+--- /dev/null
++++ b/build/pkgs/idna/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-idna
+diff --git a/build/pkgs/jinja2/distros/opensuse.txt b/build/pkgs/jinja2/distros/opensuse.txt
+index 5d90a22..f2db865 100644
+--- a/build/pkgs/jinja2/distros/opensuse.txt
++++ b/build/pkgs/jinja2/distros/opensuse.txt
+@@ -1 +1 @@
+-python3-Jinja2
++python3-jinja2
+diff --git a/build/pkgs/mpmath/distros/opensuse.txt b/build/pkgs/mpmath/distros/opensuse.txt
+new file mode 100644
+index 00000000..fbc82a9
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-mpmath
+diff --git a/build/pkgs/numpy/distros/opensuse.txt b/build/pkgs/numpy/distros/opensuse.txt
+new file mode 100644
+index 00000000..79d5c5a
+--- /dev/null
++++ b/build/pkgs/numpy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-numpy
+diff --git a/build/pkgs/packaging/distros/opensuse.txt b/build/pkgs/packaging/distros/opensuse.txt
+new file mode 100644
+index 00000000..8f1c0ff
+--- /dev/null
++++ b/build/pkgs/packaging/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-packaging
+diff --git a/build/pkgs/pandocfilters/distros/opensuse.txt b/build/pkgs/pandocfilters/distros/opensuse.txt
+new file mode 100644
+index 00000000..d0d4c24
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-pandocfilters
+diff --git a/build/pkgs/pluggy/distros/opensuse.txt b/build/pkgs/pluggy/distros/opensuse.txt
+new file mode 100644
+index 00000000..43a3acf
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-pluggy
+diff --git a/build/pkgs/py/distros/opensuse.txt b/build/pkgs/py/distros/opensuse.txt
+new file mode 100644
+index 00000000..81fefe6
+--- /dev/null
++++ b/build/pkgs/py/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-py
+diff --git a/build/pkgs/pygments/distros/opensuse.txt b/build/pkgs/pygments/distros/opensuse.txt
+index 9ff5740..3ab3792 100644
+--- a/build/pkgs/pygments/distros/opensuse.txt
++++ b/build/pkgs/pygments/distros/opensuse.txt
+@@ -1 +1 @@
+-python3-Pygments
++python3-pygments
+diff --git a/build/pkgs/sympy/distros/opensuse.txt b/build/pkgs/sympy/distros/opensuse.txt
+new file mode 100644
+index 00000000..db423c8
+--- /dev/null
++++ b/build/pkgs/sympy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-sympy
+diff --git a/build/pkgs/texttable/distros/opensuse.txt b/build/pkgs/texttable/distros/opensuse.txt
+new file mode 100644
+index 00000000..8f8e7e2
+--- /dev/null
++++ b/build/pkgs/texttable/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-texttable
+diff --git a/build/pkgs/toml/distros/opensuse.txt b/build/pkgs/toml/distros/opensuse.txt
+new file mode 100644
+index 00000000..543e89d
+--- /dev/null
++++ b/build/pkgs/toml/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-toml
+-- 
+cgit v1.0-1-gd88e
+
+
+From a480ba7ace1370d106ae831e904ea22b72af1be7 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 22:45:04 -0700
+Subject: build/pkgs: Add distros/debian.txt for Python packages
+
+---
+ build/pkgs/babel/distros/debian.txt         | 1 +
+ build/pkgs/bleach/distros/debian.txt        | 1 +
+ build/pkgs/certifi/distros/debian.txt       | 1 +
+ build/pkgs/cvxopt/distros/debian.txt        | 1 +
+ build/pkgs/decorator/distros/debian.txt     | 1 +
+ build/pkgs/html5lib/distros/debian.txt      | 1 +
+ build/pkgs/idna/distros/debian.txt          | 1 +
+ build/pkgs/jinja2/distros/debian.txt        | 1 +
+ build/pkgs/matplotlib/distros/debian.txt    | 1 +
+ build/pkgs/mpmath/distros/debian.txt        | 1 +
+ build/pkgs/networkx/distros/debian.txt      | 1 +
+ build/pkgs/numpy/distros/debian.txt         | 1 +
+ build/pkgs/packaging/distros/debian.txt     | 1 +
+ build/pkgs/pandocfilters/distros/debian.txt | 1 +
+ build/pkgs/pickleshare/distros/debian.txt   | 1 +
+ build/pkgs/pillow/distros/debian.txt        | 1 +
+ build/pkgs/pluggy/distros/debian.txt        | 1 +
+ build/pkgs/py/distros/debian.txt            | 1 +
+ build/pkgs/pygments/distros/debian.txt      | 1 +
+ build/pkgs/pytz/distros/debian.txt          | 1 +
+ build/pkgs/requests/distros/debian.txt      | 1 +
+ build/pkgs/scipy/distros/debian.txt         | 1 +
+ build/pkgs/setuptools/distros/debian.txt    | 1 +
+ build/pkgs/six/distros/debian.txt           | 1 +
+ build/pkgs/sympy/distros/debian.txt         | 1 +
+ build/pkgs/texttable/distros/debian.txt     | 1 +
+ build/pkgs/toml/distros/debian.txt          | 1 +
+ build/pkgs/webencodings/distros/debian.txt  | 1 +
+ build/pkgs/wheel/distros/debian.txt         | 1 +
+ 29 files changed, 29 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/debian.txt
+ create mode 100644 build/pkgs/bleach/distros/debian.txt
+ create mode 100644 build/pkgs/certifi/distros/debian.txt
+ create mode 100644 build/pkgs/cvxopt/distros/debian.txt
+ create mode 100644 build/pkgs/decorator/distros/debian.txt
+ create mode 100644 build/pkgs/html5lib/distros/debian.txt
+ create mode 100644 build/pkgs/idna/distros/debian.txt
+ create mode 100644 build/pkgs/jinja2/distros/debian.txt
+ create mode 100644 build/pkgs/matplotlib/distros/debian.txt
+ create mode 100644 build/pkgs/mpmath/distros/debian.txt
+ create mode 100644 build/pkgs/networkx/distros/debian.txt
+ create mode 100644 build/pkgs/numpy/distros/debian.txt
+ create mode 100644 build/pkgs/packaging/distros/debian.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/debian.txt
+ create mode 100644 build/pkgs/pickleshare/distros/debian.txt
+ create mode 100644 build/pkgs/pillow/distros/debian.txt
+ create mode 100644 build/pkgs/pluggy/distros/debian.txt
+ create mode 100644 build/pkgs/py/distros/debian.txt
+ create mode 100644 build/pkgs/pygments/distros/debian.txt
+ create mode 100644 build/pkgs/pytz/distros/debian.txt
+ create mode 100644 build/pkgs/requests/distros/debian.txt
+ create mode 100644 build/pkgs/scipy/distros/debian.txt
+ create mode 100644 build/pkgs/setuptools/distros/debian.txt
+ create mode 100644 build/pkgs/six/distros/debian.txt
+ create mode 100644 build/pkgs/sympy/distros/debian.txt
+ create mode 100644 build/pkgs/texttable/distros/debian.txt
+ create mode 100644 build/pkgs/toml/distros/debian.txt
+ create mode 100644 build/pkgs/webencodings/distros/debian.txt
+ create mode 100644 build/pkgs/wheel/distros/debian.txt
+
+diff --git a/build/pkgs/babel/distros/debian.txt b/build/pkgs/babel/distros/debian.txt
+new file mode 100644
+index 00000000..e623eb6
+--- /dev/null
++++ b/build/pkgs/babel/distros/debian.txt
+@@ -0,0 +1 @@
++python3-babel
+diff --git a/build/pkgs/bleach/distros/debian.txt b/build/pkgs/bleach/distros/debian.txt
+new file mode 100644
+index 00000000..6d37c4c
+--- /dev/null
++++ b/build/pkgs/bleach/distros/debian.txt
+@@ -0,0 +1 @@
++python3-bleach
+diff --git a/build/pkgs/certifi/distros/debian.txt b/build/pkgs/certifi/distros/debian.txt
+new file mode 100644
+index 00000000..f585a82
+--- /dev/null
++++ b/build/pkgs/certifi/distros/debian.txt
+@@ -0,0 +1 @@
++python3-certifi
+diff --git a/build/pkgs/cvxopt/distros/debian.txt b/build/pkgs/cvxopt/distros/debian.txt
+new file mode 100644
+index 00000000..2bb6ad1
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/debian.txt
+@@ -0,0 +1 @@
++python3-cvxopt
+diff --git a/build/pkgs/decorator/distros/debian.txt b/build/pkgs/decorator/distros/debian.txt
+new file mode 100644
+index 00000000..46c478e
+--- /dev/null
++++ b/build/pkgs/decorator/distros/debian.txt
+@@ -0,0 +1 @@
++python3-decorator
+diff --git a/build/pkgs/html5lib/distros/debian.txt b/build/pkgs/html5lib/distros/debian.txt
+new file mode 100644
+index 00000000..6d7b8df
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/debian.txt
+@@ -0,0 +1 @@
++python3-html5lib
+diff --git a/build/pkgs/idna/distros/debian.txt b/build/pkgs/idna/distros/debian.txt
+new file mode 100644
+index 00000000..de48e70
+--- /dev/null
++++ b/build/pkgs/idna/distros/debian.txt
+@@ -0,0 +1 @@
++python3-idna
+diff --git a/build/pkgs/jinja2/distros/debian.txt b/build/pkgs/jinja2/distros/debian.txt
+new file mode 100644
+index 00000000..f2db865
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/debian.txt
+@@ -0,0 +1 @@
++python3-jinja2
+diff --git a/build/pkgs/matplotlib/distros/debian.txt b/build/pkgs/matplotlib/distros/debian.txt
+new file mode 100644
+index 00000000..1374329
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/debian.txt
+@@ -0,0 +1 @@
++python3-matplotlib
+diff --git a/build/pkgs/mpmath/distros/debian.txt b/build/pkgs/mpmath/distros/debian.txt
+new file mode 100644
+index 00000000..fbc82a9
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/debian.txt
+@@ -0,0 +1 @@
++python3-mpmath
+diff --git a/build/pkgs/networkx/distros/debian.txt b/build/pkgs/networkx/distros/debian.txt
+new file mode 100644
+index 00000000..6779066
+--- /dev/null
++++ b/build/pkgs/networkx/distros/debian.txt
+@@ -0,0 +1 @@
++python3-networkx
+diff --git a/build/pkgs/numpy/distros/debian.txt b/build/pkgs/numpy/distros/debian.txt
+new file mode 100644
+index 00000000..79d5c5a
+--- /dev/null
++++ b/build/pkgs/numpy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-numpy
+diff --git a/build/pkgs/packaging/distros/debian.txt b/build/pkgs/packaging/distros/debian.txt
+new file mode 100644
+index 00000000..8f1c0ff
+--- /dev/null
++++ b/build/pkgs/packaging/distros/debian.txt
+@@ -0,0 +1 @@
++python3-packaging
+diff --git a/build/pkgs/pandocfilters/distros/debian.txt b/build/pkgs/pandocfilters/distros/debian.txt
+new file mode 100644
+index 00000000..d0d4c24
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/debian.txt b/build/pkgs/pickleshare/distros/debian.txt
+new file mode 100644
+index 00000000..a00907d
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pickleshare
+diff --git a/build/pkgs/pillow/distros/debian.txt b/build/pkgs/pillow/distros/debian.txt
+new file mode 100644
+index 00000000..3319fcd
+--- /dev/null
++++ b/build/pkgs/pillow/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pillow
+diff --git a/build/pkgs/pluggy/distros/debian.txt b/build/pkgs/pluggy/distros/debian.txt
+new file mode 100644
+index 00000000..43a3acf
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pluggy
+diff --git a/build/pkgs/py/distros/debian.txt b/build/pkgs/py/distros/debian.txt
+new file mode 100644
+index 00000000..81fefe6
+--- /dev/null
++++ b/build/pkgs/py/distros/debian.txt
+@@ -0,0 +1 @@
++python3-py
+diff --git a/build/pkgs/pygments/distros/debian.txt b/build/pkgs/pygments/distros/debian.txt
+new file mode 100644
+index 00000000..3ab3792
+--- /dev/null
++++ b/build/pkgs/pygments/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pygments
+diff --git a/build/pkgs/pytz/distros/debian.txt b/build/pkgs/pytz/distros/debian.txt
+new file mode 100644
+index 00000000..db20908
+--- /dev/null
++++ b/build/pkgs/pytz/distros/debian.txt
+@@ -0,0 +1 @@
++python3-tz
+diff --git a/build/pkgs/requests/distros/debian.txt b/build/pkgs/requests/distros/debian.txt
+new file mode 100644
+index 00000000..43147b2
+--- /dev/null
++++ b/build/pkgs/requests/distros/debian.txt
+@@ -0,0 +1 @@
++python3-requests
+diff --git a/build/pkgs/scipy/distros/debian.txt b/build/pkgs/scipy/distros/debian.txt
+new file mode 100644
+index 00000000..12b3666
+--- /dev/null
++++ b/build/pkgs/scipy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-scipy
+diff --git a/build/pkgs/setuptools/distros/debian.txt b/build/pkgs/setuptools/distros/debian.txt
+new file mode 100644
+index 00000000..1c0901c
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/debian.txt
+@@ -0,0 +1 @@
++python3-setuptools
+diff --git a/build/pkgs/six/distros/debian.txt b/build/pkgs/six/distros/debian.txt
+new file mode 100644
+index 00000000..68ff859
+--- /dev/null
++++ b/build/pkgs/six/distros/debian.txt
+@@ -0,0 +1 @@
++python3-six
+diff --git a/build/pkgs/sympy/distros/debian.txt b/build/pkgs/sympy/distros/debian.txt
+new file mode 100644
+index 00000000..db423c8
+--- /dev/null
++++ b/build/pkgs/sympy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-sympy
+diff --git a/build/pkgs/texttable/distros/debian.txt b/build/pkgs/texttable/distros/debian.txt
+new file mode 100644
+index 00000000..8f8e7e2
+--- /dev/null
++++ b/build/pkgs/texttable/distros/debian.txt
+@@ -0,0 +1 @@
++python3-texttable
+diff --git a/build/pkgs/toml/distros/debian.txt b/build/pkgs/toml/distros/debian.txt
+new file mode 100644
+index 00000000..543e89d
+--- /dev/null
++++ b/build/pkgs/toml/distros/debian.txt
+@@ -0,0 +1 @@
++python3-toml
+diff --git a/build/pkgs/webencodings/distros/debian.txt b/build/pkgs/webencodings/distros/debian.txt
+new file mode 100644
+index 00000000..ac30c2f
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/debian.txt
+@@ -0,0 +1 @@
++python3-webencodings
+diff --git a/build/pkgs/wheel/distros/debian.txt b/build/pkgs/wheel/distros/debian.txt
+new file mode 100644
+index 00000000..3c066725
+--- /dev/null
++++ b/build/pkgs/wheel/distros/debian.txt
+@@ -0,0 +1 @@
++python3-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 93bf30d7de292551c3050e2dd74651d69ba4bd46 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 18 Oct 2021 07:50:34 -0400
+Subject: Trac #29665: add more documentation for SAGE_PYTHON_PACKAGE_CHECK().
+
+An earlier commit allows SAGE_PYTHON_PACKAGE_CHECK(package) to tweak the
+value of sage_use_system_$package if --enable-system-site-packages was
+not used. This essentially changes the default --with-system-$package=yes
+to "no" in that case. Here we update the documentation to reflect it.
+---
+ m4/sage_python_package_check.m4 | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 7ee82a7..95eefd0 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -34,6 +34,10 @@
+ #   ensure that the ./configure- and run-time views of the system
+ #   are as similar as possible.
+ #
++#   To avoid suggesting these system packages to users who have not
++#   set --enable-system-site-packages, this macro also changes the
++#   default for --with-system-foo from "yes" to "no" in that case.
++#
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
+-- 
+cgit v1.0-1-gd88e
+
+
+From d771e49d57ecdf3622434bc09cbfb87ad3bb7744 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 18 Oct 2021 07:42:46 -0400
+Subject: Trac #29665: improve SAGE_PYTHON_PACKAGE_CHECK() failure message.
+
+When --enable-system-site-packages is off, SAGE_PYTHON_PACKAGE_CHECK()
+will always install the corresponding SPKG. We improve the ./configure
+output in that case to make it clear that the decision was based on
+the value of --enable-system-site-packages and not the "real" check.
+---
+ m4/sage_python_package_check.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 95eefd0..5f0f084 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -40,7 +40,9 @@
+ #
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
++  AC_MSG_CHECKING([if --enable-system-site-packages was used])
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
++    AC_MSG_RESULT(yes)
+     AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
+ 
+     dnl We run this check inside a python venv, because that's ultimately
+@@ -94,6 +96,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
+     dnl System site packages are disabled.
++    AC_MSG_RESULT(no; skipping check)
+     sage_spkg_install_$1=yes
+ 
+     dnl We have to retroactively hack the --with-system-foo={no,yes,force}
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5bb43c1b78a1deb3364f235305937c2f823e5e18 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 24 Oct 2021 20:29:25 -0400
+Subject: Trac #29665: use sage-venv in SAGE_PYTHON_PACKAGE_CHECK().
+
+For consistency with the rest of the build system, we now use the
+build/bin/sage-venv script to create the venv in this autoconf macro
+rather than invoking $PYTHON_FOR_VENV with "-m venv" directly.
+---
+ m4/sage_python_package_check.m4 | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 5f0f084..5547b35 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -50,11 +50,11 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AC_MSG_CHECKING([if we can create a python venv in config.venv])
+ 
+     dnl Use --clear because ./configure typically clobbers its output files.
+-    AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
+-                                        --clear                dnl
+-                                        --without-pip          dnl
+-                                        config.venv            dnl
+-                                        2>&AS_MESSAGE_LOG_FD], [
++    AS_IF(["${PYTHON_FOR_VENV}" build/bin/sage-venv      dnl
++                                  --system-site-packages dnl
++                                  --clear                dnl
++                                  config.venv            dnl
++                                  2>&AS_MESSAGE_LOG_FD], [
+       AC_MSG_RESULT(yes)
+       dnl strip all comments from install-requires.txt; this should leave
+       dnl only a single line containing the version specification for this
+-- 
+cgit v1.0-1-gd88e
+
+
+From c78363d6326addff16ca5abac897949a6be72bf4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:10:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for urllib3.
+
+---
+ build/pkgs/urllib3/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/urllib3/spkg-configure.m4
+
+diff --git a/build/pkgs/urllib3/spkg-configure.m4 b/build/pkgs/urllib3/spkg-configure.m4
+new file mode 100644
+index 00000000..d7ef3e1
+--- /dev/null
++++ b/build/pkgs/urllib3/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([urllib3], [SAGE_PYTHON_PACKAGE_CHECK([urllib3])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f416d5abcae495ea8301fad024b279ea9e997b29 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:15:18 -0400
+Subject: Trac #29665: add Gentoo package information for urllib3.
+
+---
+ build/pkgs/urllib3/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/urllib3/distros/gentoo.txt
+
+diff --git a/build/pkgs/urllib3/distros/gentoo.txt b/build/pkgs/urllib3/distros/gentoo.txt
+new file mode 100644
+index 00000000..172a535
+--- /dev/null
++++ b/build/pkgs/urllib3/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/urllib3
+-- 
+cgit v1.0-1-gd88e
+
+
+From 852068b992bf7959500c650f54cb92e5b68d7ef8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:15:58 -0400
+Subject: Trac #29665: add Gentoo package information for nbformat.
+
+---
+ build/pkgs/nbformat/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbformat/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbformat/distros/gentoo.txt b/build/pkgs/nbformat/distros/gentoo.txt
+new file mode 100644
+index 00000000..006b1f2
+--- /dev/null
++++ b/build/pkgs/nbformat/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbformat
+-- 
+cgit v1.0-1-gd88e
+
+
+From 66179fd28fcc92ee840dcd87bb4db25cea968d66 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:34:16 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for nbformat.
+
+---
+ build/pkgs/nbformat/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbformat/spkg-configure.m4
+
+diff --git a/build/pkgs/nbformat/spkg-configure.m4 b/build/pkgs/nbformat/spkg-configure.m4
+new file mode 100644
+index 00000000..5a7f8c4
+--- /dev/null
++++ b/build/pkgs/nbformat/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbformat], [SAGE_PYTHON_PACKAGE_CHECK([nbformat])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 874005e81ed20f27a5f895030dcdbdfc5f73ad80 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:47:01 -0400
+Subject: Trac #29665: add Gentoo package information for zipp.
+
+---
+ build/pkgs/zipp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/zipp/distros/gentoo.txt
+
+diff --git a/build/pkgs/zipp/distros/gentoo.txt b/build/pkgs/zipp/distros/gentoo.txt
+new file mode 100644
+index 00000000..7f59450
+--- /dev/null
++++ b/build/pkgs/zipp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/zipp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0cc2a7355b5554c1fb79c742ebf02eff54465b3e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:47:35 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for zipp.
+
+---
+ build/pkgs/zipp/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/zipp/spkg-configure.m4
+
+diff --git a/build/pkgs/zipp/spkg-configure.m4 b/build/pkgs/zipp/spkg-configure.m4
+new file mode 100644
+index 00000000..0fe3a9c
+--- /dev/null
++++ b/build/pkgs/zipp/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([zipp], [SAGE_PYTHON_PACKAGE_CHECK([zipp])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6073ad8e56c21fc862749bbd84a56d543fb9458c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:48:37 -0400
+Subject: Trac #29665: add Gentoo package information for wcwidth.
+
+---
+ build/pkgs/wcwidth/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wcwidth/distros/gentoo.txt
+
+diff --git a/build/pkgs/wcwidth/distros/gentoo.txt b/build/pkgs/wcwidth/distros/gentoo.txt
+new file mode 100644
+index 00000000..edeb80b
+--- /dev/null
++++ b/build/pkgs/wcwidth/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/wcwidth
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9793d6172c64d61a015fbe61bd45863759124fad Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:51:10 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for wcwidth.
+
+---
+ build/pkgs/wcwidth/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wcwidth/spkg-configure.m4
+
+diff --git a/build/pkgs/wcwidth/spkg-configure.m4 b/build/pkgs/wcwidth/spkg-configure.m4
+new file mode 100644
+index 00000000..5bde15a
+--- /dev/null
++++ b/build/pkgs/wcwidth/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([wcwidth], [SAGE_PYTHON_PACKAGE_CHECK([wcwidth])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20232f370a43c146ca4e696c72a2cbcc498db060 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:52:36 -0400
+Subject: Trac #29665: add Gentoo package information for testpath.
+
+---
+ build/pkgs/testpath/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/testpath/distros/gentoo.txt
+
+diff --git a/build/pkgs/testpath/distros/gentoo.txt b/build/pkgs/testpath/distros/gentoo.txt
+new file mode 100644
+index 00000000..efa10a0
+--- /dev/null
++++ b/build/pkgs/testpath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/testpath
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1b0785b2aad8844e74345fe950baf097e2b43d24 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:55:22 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for testpath.
+
+---
+ build/pkgs/testpath/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/testpath/spkg-configure.m4
+
+diff --git a/build/pkgs/testpath/spkg-configure.m4 b/build/pkgs/testpath/spkg-configure.m4
+new file mode 100644
+index 00000000..d8fc2a7
+--- /dev/null
++++ b/build/pkgs/testpath/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([testpath], [SAGE_PYTHON_PACKAGE_CHECK([testpath])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 10fc3829ecd956d732b1b069fdfe81f0d6d5cdc2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:56:06 -0400
+Subject: Trac #29665: add Gentoo package information for jedi.
+
+---
+ build/pkgs/jedi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jedi/distros/gentoo.txt
+
+diff --git a/build/pkgs/jedi/distros/gentoo.txt b/build/pkgs/jedi/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c85a46
+--- /dev/null
++++ b/build/pkgs/jedi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jedi
+-- 
+cgit v1.0-1-gd88e
+
+
+From a75824d74c281c7639028ca01dabeed266f56998 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:06:37 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for jedi.
+
+---
+ build/pkgs/jedi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jedi/spkg-configure.m4
+
+diff --git a/build/pkgs/jedi/spkg-configure.m4 b/build/pkgs/jedi/spkg-configure.m4
+new file mode 100644
+index 00000000..a37dbcc
+--- /dev/null
++++ b/build/pkgs/jedi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jedi], [SAGE_PYTHON_PACKAGE_CHECK([jedi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 17af01373d43f6acbbdbc23e073e372d3fdadf8b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:07:47 -0400
+Subject: Trac #29665: add Gentoo package information for tomli.
+
+---
+ build/pkgs/tomli/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tomli/distros/gentoo.txt
+
+diff --git a/build/pkgs/tomli/distros/gentoo.txt b/build/pkgs/tomli/distros/gentoo.txt
+new file mode 100644
+index 00000000..0458e25
+--- /dev/null
++++ b/build/pkgs/tomli/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/tomli
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0d3b5994ae612be11992467c4a3f1a74b81400fe Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:08:12 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for tomli.
+
+---
+ build/pkgs/tomli/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tomli/spkg-configure.m4
+
+diff --git a/build/pkgs/tomli/spkg-configure.m4 b/build/pkgs/tomli/spkg-configure.m4
+new file mode 100644
+index 00000000..95a8b8b
+--- /dev/null
++++ b/build/pkgs/tomli/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tomli], [SAGE_PYTHON_PACKAGE_CHECK([tomli])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From dce1c515781b0eeb8eb9c2bc7aba581560c1fac1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:09:22 -0400
+Subject: Trac #29665: add Gentoo package information for defusedxml.
+
+---
+ build/pkgs/defusedxml/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/defusedxml/distros/gentoo.txt
+
+diff --git a/build/pkgs/defusedxml/distros/gentoo.txt b/build/pkgs/defusedxml/distros/gentoo.txt
+new file mode 100644
+index 00000000..2804214
+--- /dev/null
++++ b/build/pkgs/defusedxml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/defusedxml
+-- 
+cgit v1.0-1-gd88e
+
+
+From 02e1e1cd7f8bdae3ca5b7d35ce70af28a44e9b7c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:11:14 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for defusedxml.
+
+---
+ build/pkgs/defusedxml/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/defusedxml/spkg-configure.m4
+
+diff --git a/build/pkgs/defusedxml/spkg-configure.m4 b/build/pkgs/defusedxml/spkg-configure.m4
+new file mode 100644
+index 00000000..e02f345
+--- /dev/null
++++ b/build/pkgs/defusedxml/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([defusedxml], [SAGE_PYTHON_PACKAGE_CHECK([defusedxml])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e0ba4ebb5cfc637b5d26b85de9f34e0a160d2b9c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:12:22 -0400
+Subject: Trac #29665: add Gentoo package information for ipywidgets.
+
+---
+ build/pkgs/ipywidgets/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipywidgets/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipywidgets/distros/gentoo.txt b/build/pkgs/ipywidgets/distros/gentoo.txt
+new file mode 100644
+index 00000000..7c76967
+--- /dev/null
++++ b/build/pkgs/ipywidgets/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipywidgets
+-- 
+cgit v1.0-1-gd88e
+
+
+From 49df7e7d93c7a31b7c46d5d224a35fd313a29a32 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:15:53 -0400
+Subject: Trac #29665: add Gentoo package information for simplegeneric.
+
+---
+ build/pkgs/simplegeneric/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/simplegeneric/distros/gentoo.txt
+
+diff --git a/build/pkgs/simplegeneric/distros/gentoo.txt b/build/pkgs/simplegeneric/distros/gentoo.txt
+new file mode 100644
+index 00000000..a86e90d
+--- /dev/null
++++ b/build/pkgs/simplegeneric/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/simplegeneric
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2a893635d5804749e6fec7ed7289c921ecb5300a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:16:33 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for simplegeneric.
+
+---
+ build/pkgs/simplegeneric/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/simplegeneric/spkg-configure.m4
+
+diff --git a/build/pkgs/simplegeneric/spkg-configure.m4 b/build/pkgs/simplegeneric/spkg-configure.m4
+new file mode 100644
+index 00000000..13715ab
+--- /dev/null
++++ b/build/pkgs/simplegeneric/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([simplegeneric], [SAGE_PYTHON_PACKAGE_CHECK([simplegeneric])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a8fe7ecd6e3163e7d01261e5497ac452a8cc95ab Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:17:18 -0400
+Subject: Trac #29665: add Gentoo package information for imagesize.
+
+---
+ build/pkgs/imagesize/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/imagesize/distros/gentoo.txt
+
+diff --git a/build/pkgs/imagesize/distros/gentoo.txt b/build/pkgs/imagesize/distros/gentoo.txt
+new file mode 100644
+index 00000000..54350ba
+--- /dev/null
++++ b/build/pkgs/imagesize/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/imagesize
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2ad837c5dd1fca0f50ce6d5042a9344210a54f84 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:17:48 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for imagesize.
+
+---
+ build/pkgs/imagesize/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/imagesize/spkg-configure.m4
+
+diff --git a/build/pkgs/imagesize/spkg-configure.m4 b/build/pkgs/imagesize/spkg-configure.m4
+new file mode 100644
+index 00000000..20210ef
+--- /dev/null
++++ b/build/pkgs/imagesize/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([imagesize], [SAGE_PYTHON_PACKAGE_CHECK([imagesize])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bf47415b5bfca2d7bf24e20de35662bf331623b9 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:18:49 -0400
+Subject: Trac #29665: add Gentoo package information for mistune.
+
+---
+ build/pkgs/mistune/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mistune/distros/gentoo.txt
+
+diff --git a/build/pkgs/mistune/distros/gentoo.txt b/build/pkgs/mistune/distros/gentoo.txt
+new file mode 100644
+index 00000000..56f0a4e
+--- /dev/null
++++ b/build/pkgs/mistune/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/mistune
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6898a74fd0c65a40c5220ba68b4062ac6fe060c6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:21:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for mistune.
+
+---
+ build/pkgs/mistune/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mistune/spkg-configure.m4
+
+diff --git a/build/pkgs/mistune/spkg-configure.m4 b/build/pkgs/mistune/spkg-configure.m4
+new file mode 100644
+index 00000000..972f33d
+--- /dev/null
++++ b/build/pkgs/mistune/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([mistune], [SAGE_PYTHON_PACKAGE_CHECK([mistune])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 62735e4ccf2031cd39eb5e04b03bdfd97005d808 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:22:48 -0400
+Subject: Trac #29665: add Gentoo package information for backcall.
+
+---
+ build/pkgs/backcall/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/backcall/distros/gentoo.txt
+
+diff --git a/build/pkgs/backcall/distros/gentoo.txt b/build/pkgs/backcall/distros/gentoo.txt
+new file mode 100644
+index 00000000..266a222
+--- /dev/null
++++ b/build/pkgs/backcall/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/backcall
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9ef3ea42d4a33c7cdb623fa5417ae300cf323183 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:25:10 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for backcall.
+
+---
+ build/pkgs/backcall/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/backcall/spkg-configure.m4
+
+diff --git a/build/pkgs/backcall/spkg-configure.m4 b/build/pkgs/backcall/spkg-configure.m4
+new file mode 100644
+index 00000000..d6b11c4
+--- /dev/null
++++ b/build/pkgs/backcall/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([backcall], [SAGE_PYTHON_PACKAGE_CHECK([backcall])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1b3ea2a3c40fea0fb58435f5e5304368ea58dff8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:25:58 -0400
+Subject: Trac #29665: add Gentoo package information for parso.
+
+---
+ build/pkgs/parso/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/parso/distros/gentoo.txt
+
+diff --git a/build/pkgs/parso/distros/gentoo.txt b/build/pkgs/parso/distros/gentoo.txt
+new file mode 100644
+index 00000000..f9ce4c7
+--- /dev/null
++++ b/build/pkgs/parso/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/parso
+-- 
+cgit v1.0-1-gd88e
+
+
+From 963a3a2c563ec71a1f5be2395722d0e824cb0b11 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:26:22 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for parso.
+
+---
+ build/pkgs/parso/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/parso/spkg-configure.m4
+
+diff --git a/build/pkgs/parso/spkg-configure.m4 b/build/pkgs/parso/spkg-configure.m4
+new file mode 100644
+index 00000000..1ca6f1b
+--- /dev/null
++++ b/build/pkgs/parso/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([parso], [SAGE_PYTHON_PACKAGE_CHECK([parso])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 943053dfc474b6549bcc7d6ef2971ea43588b35c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:27:00 -0400
+Subject: Trac #29665: add Gentoo package information for pyparsing.
+
+---
+ build/pkgs/pyparsing/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyparsing/distros/gentoo.txt
+
+diff --git a/build/pkgs/pyparsing/distros/gentoo.txt b/build/pkgs/pyparsing/distros/gentoo.txt
+new file mode 100644
+index 00000000..ef0419f
+--- /dev/null
++++ b/build/pkgs/pyparsing/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyparsing
+-- 
+cgit v1.0-1-gd88e
+
+
+From bd682eaa2ac41dd84e7a52e2b0c5442fc8fd8919 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:27:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pyparsing.
+
+---
+ build/pkgs/pyparsing/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyparsing/spkg-configure.m4
+
+diff --git a/build/pkgs/pyparsing/spkg-configure.m4 b/build/pkgs/pyparsing/spkg-configure.m4
+new file mode 100644
+index 00000000..d2b4c00
+--- /dev/null
++++ b/build/pkgs/pyparsing/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pyparsing], [SAGE_PYTHON_PACKAGE_CHECK([pyparsing])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 74f36a9c0ec7c63b7e6c40066e42f4b15c2f978e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:17:42 -0400
+Subject: Trac #29665: add Gentoo package information for debugpy.
+
+---
+ build/pkgs/debugpy/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/debugpy/distros/gentoo.txt
+
+diff --git a/build/pkgs/debugpy/distros/gentoo.txt b/build/pkgs/debugpy/distros/gentoo.txt
+new file mode 100644
+index 00000000..8b797ce
+--- /dev/null
++++ b/build/pkgs/debugpy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/debugpy
+-- 
+cgit v1.0-1-gd88e
+
+
+From be072fa87ac5c373d9dc9b54c0bd68734d5709bc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:21:17 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for debugpy.
+
+---
+ build/pkgs/debugpy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/debugpy/spkg-configure.m4
+
+diff --git a/build/pkgs/debugpy/spkg-configure.m4 b/build/pkgs/debugpy/spkg-configure.m4
+new file mode 100644
+index 00000000..db605ff
+--- /dev/null
++++ b/build/pkgs/debugpy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([debugpy], [SAGE_PYTHON_PACKAGE_CHECK([debugpy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6f777ce2f2e14b94e91c8b7bbac82f9017460aba Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:23:56 -0400
+Subject: Trac #29665: add Gentoo package information for tzlocal.
+
+---
+ build/pkgs/tzlocal/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tzlocal/distros/gentoo.txt
+
+diff --git a/build/pkgs/tzlocal/distros/gentoo.txt b/build/pkgs/tzlocal/distros/gentoo.txt
+new file mode 100644
+index 00000000..2018442
+--- /dev/null
++++ b/build/pkgs/tzlocal/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/tzlocal
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3bd078fc15ae13982249452711baafae91038191 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:24:51 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for tzlocal.
+
+---
+ build/pkgs/tzlocal/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tzlocal/spkg-configure.m4
+
+diff --git a/build/pkgs/tzlocal/spkg-configure.m4 b/build/pkgs/tzlocal/spkg-configure.m4
+new file mode 100644
+index 00000000..e020b28
+--- /dev/null
++++ b/build/pkgs/tzlocal/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tzlocal], [SAGE_PYTHON_PACKAGE_CHECK([tzlocal])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 91b0882fc62214923da9ee7b6dccb05d8a1d11d1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:26:13 -0400
+Subject: Trac #29665: add Gentoo package information for pycparser.
+
+---
+ build/pkgs/pycparser/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pycparser/distros/gentoo.txt
+
+diff --git a/build/pkgs/pycparser/distros/gentoo.txt b/build/pkgs/pycparser/distros/gentoo.txt
+new file mode 100644
+index 00000000..5e87307
+--- /dev/null
++++ b/build/pkgs/pycparser/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pycparser
+-- 
+cgit v1.0-1-gd88e
+
+
+From beabde92fe6e057faf516fe82d27f1e903e55ce6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:27:27 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pycparser.
+
+---
+ build/pkgs/pycparser/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pycparser/spkg-configure.m4
+
+diff --git a/build/pkgs/pycparser/spkg-configure.m4 b/build/pkgs/pycparser/spkg-configure.m4
+new file mode 100644
+index 00000000..4b9b900
+--- /dev/null
++++ b/build/pkgs/pycparser/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pycparser], [SAGE_PYTHON_PACKAGE_CHECK([pycparser])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 86c2788dc7fd1169314e9598c91fa81045553677 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:29:36 -0400
+Subject: Trac #29665: add Gentoo package information for cycler.
+
+---
+ build/pkgs/cycler/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cycler/distros/gentoo.txt
+
+diff --git a/build/pkgs/cycler/distros/gentoo.txt b/build/pkgs/cycler/distros/gentoo.txt
+new file mode 100644
+index 00000000..4b21543
+--- /dev/null
++++ b/build/pkgs/cycler/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/cycler
+-- 
+cgit v1.0-1-gd88e
+
+
+From 67c5a944101ddf329f0a61c61d4e784f58a5c5b0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:30:27 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for cycler.
+
+---
+ build/pkgs/cycler/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cycler/spkg-configure.m4
+
+diff --git a/build/pkgs/cycler/spkg-configure.m4 b/build/pkgs/cycler/spkg-configure.m4
+new file mode 100644
+index 00000000..239571a
+--- /dev/null
++++ b/build/pkgs/cycler/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([cycler], [SAGE_PYTHON_PACKAGE_CHECK([cycler])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ef6d490251abfa41f7a0910274700a8a6a65f629 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:31:19 -0400
+Subject: Trac #29665: add Gentoo package information for traitlets.
+
+---
+ build/pkgs/traitlets/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/traitlets/distros/gentoo.txt
+
+diff --git a/build/pkgs/traitlets/distros/gentoo.txt b/build/pkgs/traitlets/distros/gentoo.txt
+new file mode 100644
+index 00000000..46bfaab
+--- /dev/null
++++ b/build/pkgs/traitlets/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/traitlets
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1f922b458d34088d9f6773312209e69f19ee45dc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:31:50 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for traitlets.
+
+---
+ build/pkgs/traitlets/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/traitlets/spkg-configure.m4
+
+diff --git a/build/pkgs/traitlets/spkg-configure.m4 b/build/pkgs/traitlets/spkg-configure.m4
+new file mode 100644
+index 00000000..df2382b
+--- /dev/null
++++ b/build/pkgs/traitlets/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([traitlets], [SAGE_PYTHON_PACKAGE_CHECK([traitlets])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 95b89a9ced0acb6d971a27fa63b97ea58a11f4e1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:33:35 -0400
+Subject: Trac #29665: add Gentoo package information for argcomplete.
+
+---
+ build/pkgs/argcomplete/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argcomplete/distros/gentoo.txt
+
+diff --git a/build/pkgs/argcomplete/distros/gentoo.txt b/build/pkgs/argcomplete/distros/gentoo.txt
+new file mode 100644
+index 00000000..b150949
+--- /dev/null
++++ b/build/pkgs/argcomplete/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/argcomplete
+-- 
+cgit v1.0-1-gd88e
+
+
+From b4cd8ef384e6e5bae0de0f3c113fb5f9e6e1a71e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:34:14 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for argcomplete.
+
+---
+ build/pkgs/argcomplete/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argcomplete/spkg-configure.m4
+
+diff --git a/build/pkgs/argcomplete/spkg-configure.m4 b/build/pkgs/argcomplete/spkg-configure.m4
+new file mode 100644
+index 00000000..cbd7ccf
+--- /dev/null
++++ b/build/pkgs/argcomplete/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([argcomplete], [SAGE_PYTHON_PACKAGE_CHECK([argcomplete])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4cc610e8331970cc018d7ea87af928fa73a292c1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:36:21 -0400
+Subject: Trac #29665: add Gentoo package information for ptyprocess.
+
+---
+ build/pkgs/ptyprocess/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ptyprocess/distros/gentoo.txt
+
+diff --git a/build/pkgs/ptyprocess/distros/gentoo.txt b/build/pkgs/ptyprocess/distros/gentoo.txt
+new file mode 100644
+index 00000000..571a851
+--- /dev/null
++++ b/build/pkgs/ptyprocess/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ptyprocess
+-- 
+cgit v1.0-1-gd88e
+
+
+From cd15f97221bf5933b07900e4f77cb55401eede26 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:37:02 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ptyprocess.
+
+---
+ build/pkgs/ptyprocess/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ptyprocess/spkg-configure.m4
+
+diff --git a/build/pkgs/ptyprocess/spkg-configure.m4 b/build/pkgs/ptyprocess/spkg-configure.m4
+new file mode 100644
+index 00000000..bfacbae
+--- /dev/null
++++ b/build/pkgs/ptyprocess/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ptyprocess], [SAGE_PYTHON_PACKAGE_CHECK([ptyprocess])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb5f45b15f99e4ba28e1b1f6042a0e8ea17f1dfc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:38:22 -0400
+Subject: Trac #29665: add Gentoo package information for attrs.
+
+---
+ build/pkgs/attrs/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/attrs/distros/gentoo.txt
+
+diff --git a/build/pkgs/attrs/distros/gentoo.txt b/build/pkgs/attrs/distros/gentoo.txt
+new file mode 100644
+index 00000000..3b906fa
+--- /dev/null
++++ b/build/pkgs/attrs/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/attrs
+-- 
+cgit v1.0-1-gd88e
+
+
+From 321707ebf8e9af1e4ac3a5b5b094b4226bb3a7a5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:38:55 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for attrs.
+
+---
+ build/pkgs/attrs/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/attrs/spkg-configure.m4
+
+diff --git a/build/pkgs/attrs/spkg-configure.m4 b/build/pkgs/attrs/spkg-configure.m4
+new file mode 100644
+index 00000000..ba6a9b7
+--- /dev/null
++++ b/build/pkgs/attrs/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([attrs], [SAGE_PYTHON_PACKAGE_CHECK([attrs])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 69a498a4e8854ecdfc2f1a134104983c0dcb9e32 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:40:09 -0400
+Subject: Trac #29665: add Gentoo package information for send2trash.
+
+---
+ build/pkgs/send2trash/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/send2trash/distros/gentoo.txt
+
+diff --git a/build/pkgs/send2trash/distros/gentoo.txt b/build/pkgs/send2trash/distros/gentoo.txt
+new file mode 100644
+index 00000000..a89b179
+--- /dev/null
++++ b/build/pkgs/send2trash/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/send2trash
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9baed17c84e1bdf5abd17c20766e5cd7dddc5b53 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:41:45 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for send2trash.
+
+---
+ build/pkgs/send2trash/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/send2trash/spkg-configure.m4
+
+diff --git a/build/pkgs/send2trash/spkg-configure.m4 b/build/pkgs/send2trash/spkg-configure.m4
+new file mode 100644
+index 00000000..3bbb727
+--- /dev/null
++++ b/build/pkgs/send2trash/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([send2trash], [SAGE_PYTHON_PACKAGE_CHECK([send2trash])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b9b552b2a2aaccaeb7c5b25be0b681f107522d09 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:43:27 -0400
+Subject: Trac #29665: add Gentoo package information for pyrsistent.
+
+---
+ build/pkgs/pyrsistent/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyrsistent/distros/gentoo.txt
+
+diff --git a/build/pkgs/pyrsistent/distros/gentoo.txt b/build/pkgs/pyrsistent/distros/gentoo.txt
+new file mode 100644
+index 00000000..83439ce
+--- /dev/null
++++ b/build/pkgs/pyrsistent/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyrsistent
+-- 
+cgit v1.0-1-gd88e
+
+
+From a17b31fac6104852762f57daa749443147bdf121 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:44:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pyrsistent.
+
+---
+ build/pkgs/pyrsistent/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyrsistent/spkg-configure.m4
+
+diff --git a/build/pkgs/pyrsistent/spkg-configure.m4 b/build/pkgs/pyrsistent/spkg-configure.m4
+new file mode 100644
+index 00000000..f7ca75d
+--- /dev/null
++++ b/build/pkgs/pyrsistent/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pyrsistent], [SAGE_PYTHON_PACKAGE_CHECK([pyrsistent])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 68520decad6d6937918d7a6af65ca5bd476e5d02 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:45:45 -0400
+Subject: Trac #29665: add Gentoo package information for entrypoints.
+
+---
+ build/pkgs/entrypoints/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/entrypoints/distros/gentoo.txt
+
+diff --git a/build/pkgs/entrypoints/distros/gentoo.txt b/build/pkgs/entrypoints/distros/gentoo.txt
+new file mode 100644
+index 00000000..684ddd0
+--- /dev/null
++++ b/build/pkgs/entrypoints/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/entrypoints
+-- 
+cgit v1.0-1-gd88e
+
+
+From 34213eccb642a6bad64d89acaefa83ee702cb483 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:46:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for entrypoints.
+
+---
+ build/pkgs/entrypoints/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/entrypoints/spkg-configure.m4
+
+diff --git a/build/pkgs/entrypoints/spkg-configure.m4 b/build/pkgs/entrypoints/spkg-configure.m4
+new file mode 100644
+index 00000000..caed658
+--- /dev/null
++++ b/build/pkgs/entrypoints/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([entrypoints], [SAGE_PYTHON_PACKAGE_CHECK([entrypoints])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8e985614345da1a58fcdc127a9c0ddd790f9b5d2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:48:26 -0400
+Subject: Trac #29665: add Gentoo package information for markupsafe.
+
+---
+ build/pkgs/markupsafe/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/markupsafe/distros/gentoo.txt
+
+diff --git a/build/pkgs/markupsafe/distros/gentoo.txt b/build/pkgs/markupsafe/distros/gentoo.txt
+new file mode 100644
+index 00000000..9654e35
+--- /dev/null
++++ b/build/pkgs/markupsafe/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/markupsafe
+-- 
+cgit v1.0-1-gd88e
+
+
+From d370f229ae0988856f2e0d1f6ee2df2c47169106 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:48:55 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for markupsafe.
+
+---
+ build/pkgs/markupsafe/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/markupsafe/spkg-configure.m4
+
+diff --git a/build/pkgs/markupsafe/spkg-configure.m4 b/build/pkgs/markupsafe/spkg-configure.m4
+new file mode 100644
+index 00000000..79eb8db
+--- /dev/null
++++ b/build/pkgs/markupsafe/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([markupsafe], [SAGE_PYTHON_PACKAGE_CHECK([markupsafe])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c49b285ad9e25e6bc81a7e75d461d234fdd3ea68 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:30:49 -0400
+Subject: Trac #29665: add Gentoo package information for flit_core.
+
+---
+ build/pkgs/flit_core/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/flit_core/distros/gentoo.txt
+
+diff --git a/build/pkgs/flit_core/distros/gentoo.txt b/build/pkgs/flit_core/distros/gentoo.txt
+new file mode 100644
+index 00000000..fe6bea9
+--- /dev/null
++++ b/build/pkgs/flit_core/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/flit_core
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b0ce1c4f23cd9fc4316e1eb2b9b4bde394957f3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:32:11 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for flit_core.
+
+---
+ build/pkgs/flit_core/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/flit_core/spkg-configure.m4
+
+diff --git a/build/pkgs/flit_core/spkg-configure.m4 b/build/pkgs/flit_core/spkg-configure.m4
+new file mode 100644
+index 00000000..ee67557
+--- /dev/null
++++ b/build/pkgs/flit_core/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([flit_core], [SAGE_PYTHON_PACKAGE_CHECK([flit_core])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f006c231a81428b1e1e792f889bf974f90e3c831 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:34:06 -0400
+Subject: Trac #29665: add Gentoo package information for nest_asyncio.
+
+---
+ build/pkgs/nest_asyncio/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nest_asyncio/distros/gentoo.txt
+
+diff --git a/build/pkgs/nest_asyncio/distros/gentoo.txt b/build/pkgs/nest_asyncio/distros/gentoo.txt
+new file mode 100644
+index 00000000..ab742d2
+--- /dev/null
++++ b/build/pkgs/nest_asyncio/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nest_asyncio
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4a58d0a96a84475e765a01a64f5f44c48a317e0b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:34:43 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for nest_asyncio.
+
+---
+ build/pkgs/nest_asyncio/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nest_asyncio/spkg-configure.m4
+
+diff --git a/build/pkgs/nest_asyncio/spkg-configure.m4 b/build/pkgs/nest_asyncio/spkg-configure.m4
+new file mode 100644
+index 00000000..4d81527
+--- /dev/null
++++ b/build/pkgs/nest_asyncio/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nest_asyncio], [SAGE_PYTHON_PACKAGE_CHECK([nest_asyncio])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e50af937777ea778908bc09a7a79db3dd80fdf25 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:37:02 -0400
+Subject: Trac #29665: add Gentoo package information for ipython_genutils.
+
+---
+ build/pkgs/ipython_genutils/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython_genutils/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipython_genutils/distros/gentoo.txt b/build/pkgs/ipython_genutils/distros/gentoo.txt
+new file mode 100644
+index 00000000..01bc49d
+--- /dev/null
++++ b/build/pkgs/ipython_genutils/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipython_genutils
+-- 
+cgit v1.0-1-gd88e
+
+
+From ec3c0ce9db2ba13c1a49d1bcfb7a4b249cb7ae83 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:39:20 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipython_genutils.
+
+---
+ build/pkgs/ipython_genutils/spkg-configure.m4 | 4 ++++
+ 1 file changed, 4 insertions(+)
+ create mode 100644 build/pkgs/ipython_genutils/spkg-configure.m4
+
+diff --git a/build/pkgs/ipython_genutils/spkg-configure.m4 b/build/pkgs/ipython_genutils/spkg-configure.m4
+new file mode 100644
+index 00000000..b0ba86a
+--- /dev/null
++++ b/build/pkgs/ipython_genutils/spkg-configure.m4
+@@ -0,0 +1,4 @@
++SAGE_SPKG_CONFIGURE(
++  [ipython_genutils],
++  [SAGE_PYTHON_PACKAGE_CHECK([ipython_genutils])]
++)
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5c9e2e265115e5f10d4b459a475467e30b4bddde Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:40:03 -0400
+Subject: Trac #29665: add Gentoo package information for ipython.
+
+---
+ build/pkgs/ipython/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipython/distros/gentoo.txt b/build/pkgs/ipython/distros/gentoo.txt
+new file mode 100644
+index 00000000..8b76f18
+--- /dev/null
++++ b/build/pkgs/ipython/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipython
+-- 
+cgit v1.0-1-gd88e
+
+
+From 621e707ddd040a902d7dddf0bed1de2b54ab22f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 07:37:56 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipython.
+
+---
+ build/pkgs/ipython/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython/spkg-configure.m4
+
+diff --git a/build/pkgs/ipython/spkg-configure.m4 b/build/pkgs/ipython/spkg-configure.m4
+new file mode 100644
+index 00000000..02ab89f
+--- /dev/null
++++ b/build/pkgs/ipython/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipython], [SAGE_PYTHON_PACKAGE_CHECK([ipython])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20a0613f6d441da436f3e7b8047a72bf490882bd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 07:51:11 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipywidgets.
+
+---
+ build/pkgs/ipywidgets/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipywidgets/spkg-configure.m4
+
+diff --git a/build/pkgs/ipywidgets/spkg-configure.m4 b/build/pkgs/ipywidgets/spkg-configure.m4
+new file mode 100644
+index 00000000..51ca9be
+--- /dev/null
++++ b/build/pkgs/ipywidgets/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipywidgets], [SAGE_PYTHON_PACKAGE_CHECK([ipywidgets])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 76bcd386633acc02a1a3026339d0cbd258ada04e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 10:05:16 -0400
+Subject: Trac #29665: add Gentoo package information for wheel.
+
+---
+ build/pkgs/wheel/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wheel/distros/gentoo.txt
+
+diff --git a/build/pkgs/wheel/distros/gentoo.txt b/build/pkgs/wheel/distros/gentoo.txt
+new file mode 100644
+index 00000000..ec571d5
+--- /dev/null
++++ b/build/pkgs/wheel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 96c2dd2ca7812f5333bb9d45eadb7ac408e364ce Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:51:44 -0500
+Subject: Trac #29665: add Gentoo package information for terminado.
+
+---
+ build/pkgs/terminado/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/terminado/distros/gentoo.txt
+
+diff --git a/build/pkgs/terminado/distros/gentoo.txt b/build/pkgs/terminado/distros/gentoo.txt
+new file mode 100644
+index 00000000..1df16f1
+--- /dev/null
++++ b/build/pkgs/terminado/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/terminado
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0de0f5f3d235a4339b21e37ea13c9f5e59a82e59 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:52:35 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for terminado.
+
+---
+ build/pkgs/terminado/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/terminado/spkg-configure.m4
+
+diff --git a/build/pkgs/terminado/spkg-configure.m4 b/build/pkgs/terminado/spkg-configure.m4
+new file mode 100644
+index 00000000..5defc2f
+--- /dev/null
++++ b/build/pkgs/terminado/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([terminado], [SAGE_PYTHON_PACKAGE_CHECK([terminado])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d14a745c770b02822557e7cee0a98de1cb2f3a12 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:56:15 -0500
+Subject: Trac #29665: add Gentoo package information for cffi.
+
+---
+ build/pkgs/cffi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cffi/distros/gentoo.txt
+
+diff --git a/build/pkgs/cffi/distros/gentoo.txt b/build/pkgs/cffi/distros/gentoo.txt
+new file mode 100644
+index 00000000..81eeb81
+--- /dev/null
++++ b/build/pkgs/cffi/distros/gentoo.txt
+@@ -0,0 +1 @@
++virtual/python-cffi
+-- 
+cgit v1.0-1-gd88e
+
+
+From ce393c04afc69fe050e38f780d4e117164687d80 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:57:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for cffi.
+
+---
+ build/pkgs/cffi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cffi/spkg-configure.m4
+
+diff --git a/build/pkgs/cffi/spkg-configure.m4 b/build/pkgs/cffi/spkg-configure.m4
+new file mode 100644
+index 00000000..dc81875
+--- /dev/null
++++ b/build/pkgs/cffi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([cffi], [SAGE_PYTHON_PACKAGE_CHECK([cffi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 467093315b3fdd57c8caa2f95cf99ad52b0b84fb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:57:57 -0500
+Subject: Trac #29665: add Gentoo package information for pip.
+
+---
+ build/pkgs/pip/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pip/distros/gentoo.txt
+
+diff --git a/build/pkgs/pip/distros/gentoo.txt b/build/pkgs/pip/distros/gentoo.txt
+new file mode 100644
+index 00000000..1845454
+--- /dev/null
++++ b/build/pkgs/pip/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pip[vanilla]
+-- 
+cgit v1.0-1-gd88e
+
+
+From c597fd23f9f68dabbcb7e698d0569c3e6458f6d1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 09:07:26 -0500
+Subject: Trac #29665: new spkg-configure.m4 for pip.
+
+---
+ build/pkgs/pip/spkg-configure.m4 | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+ create mode 100644 build/pkgs/pip/spkg-configure.m4
+
+diff --git a/build/pkgs/pip/spkg-configure.m4 b/build/pkgs/pip/spkg-configure.m4
+new file mode 100644
+index 00000000..c7a5562
+--- /dev/null
++++ b/build/pkgs/pip/spkg-configure.m4
+@@ -0,0 +1,12 @@
++SAGE_SPKG_CONFIGURE([pip], [
++  dnl always run this macro because it changes the default value of
++  dnl the --with-system-<package> option.
++  SAGE_PYTHON_PACKAGE_CHECK([pip])
++
++  dnl if we might not install the spkg, make sure that "pip" is in
++  dnl the user's PATH, too.
++  AS_IF([test "x$sage_spkg_install_pip" != "xyes"], [
++    AC_CHECK_PROG(HAVE_PIP, pip, yes, no)
++    AS_IF([test "x$HAVE_PIP" = "xno"], [sage_spkg_install_pip=yes])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ef8f1e807bc55d7b8321777486fa867a7c135419 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 9 Nov 2021 09:09:04 -0500
+Subject: Trac #29665: set $SAGE_PIP_INSTALL_FLAGS for
+ --enable-system-site-packages.
+
+We need to pass some special flags to "pip install" to make it do the
+right thing in the precence of system-site packages. Here we introduce
+a new autoconf variable, SAGE_PIP_INSTALL_FLAGS, that will be used
+to pass those flags to the build system.
+
+With autoconf aware of the variable, we substitute its value into the
+sage-build-env-config script for use in spkg-install.in.
+---
+ build/bin/sage-build-env-config.in | 1 +
+ configure.ac                       | 9 +++++++++
+ 2 files changed, 10 insertions(+)
+
+diff --git a/build/bin/sage-build-env-config.in b/build/bin/sage-build-env-config.in
+index 92e7dad..ad62e5f 100644
+--- a/build/bin/sage-build-env-config.in
++++ b/build/bin/sage-build-env-config.in
+@@ -53,6 +53,7 @@ export SAGE_PARI_CFG="@SAGE_PARI_CFG@"
+ 
+ export SAGE_GLPK_PREFIX="@SAGE_GLPK_PREFIX@"
+ export SAGE_FREETYPE_PREFIX="@SAGE_FREETYPE_PREFIX@"
++export SAGE_PIP_INSTALL_FLAGS="@SAGE_PIP_INSTALL_FLAGS@"
+ export SAGE_SUITESPARSE_PREFIX="@SAGE_SUITESPARSE_PREFIX@"
+ 
+ export SAGE_CONFIGURE_FFLAS_FFPACK="@SAGE_CONFIGURE_FFLAS_FFPACK@"
+diff --git a/configure.ac b/configure.ac
+index 6fafb83..6ed07ac 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -441,6 +441,14 @@ AC_ARG_ENABLE(
+     [allow the use of python packages from the system (experimental; default: no)]
+   )], [
+   AS_IF([test "x$enable_system_site_packages" = "xyes"], [
++    dnl When installing python SPKGs in the presence of system-site
++    dnl packages, we need to --ignore-installed so that a patched SPKG
++    dnl can be installed in the presence of an unpatched system package
++    dnl that appears (to pip) to be identical. The --no-deps flag is
++    dnl then needed because --ignore-installed will make any installed
++    dnl dependencies invisible to pip, who does not appreciate that.
++    SAGE_PIP_INSTALL_FLAGS="${SAGE_PIP_INSTALL_FLAGS} --no-deps --ignore-installed"
++
+     SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
+ 
+     dnl We want to raise an error if the user asked for "system site
+@@ -453,6 +461,7 @@ AC_ARG_ENABLE(
+     with_system_python3="force"
+   ])
+ ])
++AC_SUBST([SAGE_PIP_INSTALL_FLAGS])
+ AC_SUBST([SAGE_VENV_FLAGS])
+ 
+ SAGE_SPKG_OPTIONS=""
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3cf365fef84e809e74abd2eb388e7a8e9af9d739 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 9 Nov 2021 21:01:58 -0500
+Subject: Trac #29665: pass $SAGE_PIP_INSTALL_FLAGS to sdh_pip_install.
+
+Since sdh_pip_install is usually called from spkg-install.in, the
+variables from sage-build-env-config will be available. Here we pass
+the contents of $SAGE_PIP_INSTALL_FLAGS to sage-pip-install
+unconditionally, and hope that the user ignores this variable unless
+he truly knows what he is doing.
+---
+ build/bin/sage-dist-helpers | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/build/bin/sage-dist-helpers b/build/bin/sage-dist-helpers
+index fe364e5..1032ac3 100644
+--- a/build/bin/sage-dist-helpers
++++ b/build/bin/sage-dist-helpers
+@@ -303,7 +303,11 @@ sdh_store_wheel() {
+ }
+ 
+ sdh_store_and_pip_install_wheel() {
+-    local pip_options=""
++    # The $SAGE_PIP_INSTALL_FLAGS variable is set by sage-build-env-config.
++    # We skip sanity checking its contents since you should either let sage
++    # decide what it contains, or really know what you are doing.
++    local pip_options="${SAGE_PIP_INSTALL_FLAGS}"
++
+     while [ $# -gt 0 ]; do
+         case $1 in
+             -*) pip_options="$pip_options $1"
+-- 
+cgit v1.0-1-gd88e
+
+
+From 50f0438ee857b8f0b7d7ad924e6bba9c5e1bc033 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:10:46 -0500
+Subject: Trac #29665: add Gentoo package information for pexpect.
+
+---
+ build/pkgs/pexpect/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pexpect/distros/gentoo.txt
+
+diff --git a/build/pkgs/pexpect/distros/gentoo.txt b/build/pkgs/pexpect/distros/gentoo.txt
+new file mode 100644
+index 00000000..30c4b60
+--- /dev/null
++++ b/build/pkgs/pexpect/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pexpect
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4d784688d997290b462646fa7f36114a41f3f453 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:11:25 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pexpect.
+
+---
+ build/pkgs/pexpect/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pexpect/spkg-configure.m4
+
+diff --git a/build/pkgs/pexpect/spkg-configure.m4 b/build/pkgs/pexpect/spkg-configure.m4
+new file mode 100644
+index 00000000..6520856
+--- /dev/null
++++ b/build/pkgs/pexpect/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pexpect], [SAGE_PYTHON_PACKAGE_CHECK([pexpect])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6447122dc76a3b7a58340dbed942db66530b5b07 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:12:05 -0500
+Subject: Trac #29665: add Gentoo package information for docutils.
+
+---
+ build/pkgs/docutils/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/docutils/distros/gentoo.txt
+
+diff --git a/build/pkgs/docutils/distros/gentoo.txt b/build/pkgs/docutils/distros/gentoo.txt
+new file mode 100644
+index 00000000..fe4a452
+--- /dev/null
++++ b/build/pkgs/docutils/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/docutils
+-- 
+cgit v1.0-1-gd88e
+
+
+From 709041480a5fc729b0ee7f1a8a3b16d4d65321b5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:12:38 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for docutils.
+
+---
+ build/pkgs/docutils/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/docutils/spkg-configure.m4
+
+diff --git a/build/pkgs/docutils/spkg-configure.m4 b/build/pkgs/docutils/spkg-configure.m4
+new file mode 100644
+index 00000000..3584e45
+--- /dev/null
++++ b/build/pkgs/docutils/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([docutils], [SAGE_PYTHON_PACKAGE_CHECK([docutils])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 782d38b48ab87afccc43fbc071e7b7ed48fb0a20 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:14:37 -0500
+Subject: Trac #29665: add Gentoo package information for nbclient.
+
+---
+ build/pkgs/nbclient/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbclient/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbclient/distros/gentoo.txt b/build/pkgs/nbclient/distros/gentoo.txt
+new file mode 100644
+index 00000000..06ff18d
+--- /dev/null
++++ b/build/pkgs/nbclient/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbclient
+-- 
+cgit v1.0-1-gd88e
+
+
+From 19ce09336532336f69db74381932d51a429dfaca Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:15:11 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for nbclient.
+
+---
+ build/pkgs/nbclient/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbclient/spkg-configure.m4
+
+diff --git a/build/pkgs/nbclient/spkg-configure.m4 b/build/pkgs/nbclient/spkg-configure.m4
+new file mode 100644
+index 00000000..14178b7
+--- /dev/null
++++ b/build/pkgs/nbclient/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbclient], [SAGE_PYTHON_PACKAGE_CHECK([nbclient])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c063b9de42c1780368000a563d0dbe80b6fff169 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:17:36 -0500
+Subject: Trac #29665: add Gentoo package information for argon2_cffi.
+
+---
+ build/pkgs/argon2_cffi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argon2_cffi/distros/gentoo.txt
+
+diff --git a/build/pkgs/argon2_cffi/distros/gentoo.txt b/build/pkgs/argon2_cffi/distros/gentoo.txt
+new file mode 100644
+index 00000000..2f12ca8
+--- /dev/null
++++ b/build/pkgs/argon2_cffi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/argon2-cffi
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0b4d5699dd51ea52550fba7db9e1cbb8bbac1892 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:18:35 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for argon2_cffi.
+
+---
+ build/pkgs/argon2_cffi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argon2_cffi/spkg-configure.m4
+
+diff --git a/build/pkgs/argon2_cffi/spkg-configure.m4 b/build/pkgs/argon2_cffi/spkg-configure.m4
+new file mode 100644
+index 00000000..03ebc63
+--- /dev/null
++++ b/build/pkgs/argon2_cffi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([argon2_cffi], [SAGE_PYTHON_PACKAGE_CHECK([argon2_cffi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2b4119558a6e0b1aa512848539a237676b035c83 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:30:48 -0500
+Subject: Trac #29665: fix package name in dateutil's install-requires.txt.
+
+---
+ build/pkgs/dateutil/install-requires.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/build/pkgs/dateutil/install-requires.txt b/build/pkgs/dateutil/install-requires.txt
+index 0ae93da..face537 100644
+--- a/build/pkgs/dateutil/install-requires.txt
++++ b/build/pkgs/dateutil/install-requires.txt
+@@ -1 +1 @@
+-dateutil >=2.8.1
++python-dateutil >=2.8.1
+-- 
+cgit v1.0-1-gd88e
+
+
+From df371b7c4d20a3353d43940306ad22e11aba29da Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:31:41 -0500
+Subject: Trac #29665: add Gentoo package information for dateutil.
+
+---
+ build/pkgs/dateutil/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/dateutil/distros/gentoo.txt
+
+diff --git a/build/pkgs/dateutil/distros/gentoo.txt b/build/pkgs/dateutil/distros/gentoo.txt
+new file mode 100644
+index 00000000..e129df7
+--- /dev/null
++++ b/build/pkgs/dateutil/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/python-dateutil
+-- 
+cgit v1.0-1-gd88e
+
+
+From 577695dfdf661ee26c0ffd767bdbf479d95f7fb4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:32:21 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for dateutil.
+
+---
+ build/pkgs/dateutil/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/dateutil/spkg-configure.m4
+
+diff --git a/build/pkgs/dateutil/spkg-configure.m4 b/build/pkgs/dateutil/spkg-configure.m4
+new file mode 100644
+index 00000000..fdcd127
+--- /dev/null
++++ b/build/pkgs/dateutil/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([dateutil], [SAGE_PYTHON_PACKAGE_CHECK([dateutil])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1984651caac624ec4bb58814ca1d57fe66f9881a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:33:51 -0500
+Subject: Trac #29665: add Gentoo package information for setuptools_scm.
+
+---
+ build/pkgs/setuptools_scm/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/setuptools_scm/distros/gentoo.txt
+
+diff --git a/build/pkgs/setuptools_scm/distros/gentoo.txt b/build/pkgs/setuptools_scm/distros/gentoo.txt
+new file mode 100644
+index 00000000..8989597
+--- /dev/null
++++ b/build/pkgs/setuptools_scm/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/setuptools_scm
+-- 
+cgit v1.0-1-gd88e
+
+
+From ebf7c854ed966e7353759be485c4f5a57b9a10fa Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:34:49 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for setuptools_scm.
+
+---
+ build/pkgs/setuptools_scm/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/setuptools_scm/spkg-configure.m4
+
+diff --git a/build/pkgs/setuptools_scm/spkg-configure.m4 b/build/pkgs/setuptools_scm/spkg-configure.m4
+new file mode 100644
+index 00000000..437148c
+--- /dev/null
++++ b/build/pkgs/setuptools_scm/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([setuptools_scm], [
++  SAGE_PYTHON_PACKAGE_CHECK([setuptools_scm])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0dee0d0c28f31b1f619e44c710a3c9e22d2b2544 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:36:33 -0500
+Subject: Trac #29665: add Gentoo package information for nbconvert.
+
+---
+ build/pkgs/nbconvert/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbconvert/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbconvert/distros/gentoo.txt b/build/pkgs/nbconvert/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c45a10
+--- /dev/null
++++ b/build/pkgs/nbconvert/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbconvert
+-- 
+cgit v1.0-1-gd88e
+
+
+From 473789eb11b1838bc32dc8a63509ee199afc8912 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:37:37 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for nbconvert.
+
+---
+ build/pkgs/nbconvert/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbconvert/spkg-configure.m4
+
+diff --git a/build/pkgs/nbconvert/spkg-configure.m4 b/build/pkgs/nbconvert/spkg-configure.m4
+new file mode 100644
+index 00000000..9b5dee3
+--- /dev/null
++++ b/build/pkgs/nbconvert/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbconvert], [SAGE_PYTHON_PACKAGE_CHECK([nbconvert])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f0703b594e57c980d605aa9bc8316c45a7858b3b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:41:51 -0500
+Subject: Trac #29665: add Gentoo package information for jupyter_core.
+
+---
+ build/pkgs/jupyter_core/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyter_core/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyter_core/distros/gentoo.txt b/build/pkgs/jupyter_core/distros/gentoo.txt
+new file mode 100644
+index 00000000..f168c5a
+--- /dev/null
++++ b/build/pkgs/jupyter_core/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyter_core
+-- 
+cgit v1.0-1-gd88e
+
+
+From 061a307cc4a6680d8500fde834975064e59540d5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:42:48 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jupyter_core.
+
+---
+ build/pkgs/jupyter_core/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyter_core/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyter_core/spkg-configure.m4 b/build/pkgs/jupyter_core/spkg-configure.m4
+new file mode 100644
+index 00000000..67df9c3
+--- /dev/null
++++ b/build/pkgs/jupyter_core/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyter_core], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyter_core])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b85abe964ce0b98b5842efe9cbad9bdb1c89202f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:47:08 -0500
+Subject: Trac #29665: add Gentoo package information for jupyter_client.
+
+---
+ build/pkgs/jupyter_client/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyter_client/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyter_client/distros/gentoo.txt b/build/pkgs/jupyter_client/distros/gentoo.txt
+new file mode 100644
+index 00000000..4f1de88
+--- /dev/null
++++ b/build/pkgs/jupyter_client/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyter_client
+-- 
+cgit v1.0-1-gd88e
+
+
+From 86323ff1e0b2507933df6bc2a96c9175957640c5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:48:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jupyter_client.
+
+---
+ build/pkgs/jupyter_client/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyter_client/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyter_client/spkg-configure.m4 b/build/pkgs/jupyter_client/spkg-configure.m4
+new file mode 100644
+index 00000000..fbd3498
+--- /dev/null
++++ b/build/pkgs/jupyter_client/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyter_client], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyter_client])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a8475e27dd30d752d05ab6fea6579e8623501d82 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:48:58 -0500
+Subject: Trac #29665: add Gentoo package information for snowballstemmer.
+
+---
+ build/pkgs/snowballstemmer/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/snowballstemmer/distros/gentoo.txt
+
+diff --git a/build/pkgs/snowballstemmer/distros/gentoo.txt b/build/pkgs/snowballstemmer/distros/gentoo.txt
+new file mode 100644
+index 00000000..63fd851
+--- /dev/null
++++ b/build/pkgs/snowballstemmer/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/snowballstemmer
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0833c9b781062b4ed86d619e050a6f5d60e36080 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:49:38 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for snowballstemmer.
+
+---
+ build/pkgs/snowballstemmer/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/snowballstemmer/spkg-configure.m4
+
+diff --git a/build/pkgs/snowballstemmer/spkg-configure.m4 b/build/pkgs/snowballstemmer/spkg-configure.m4
+new file mode 100644
+index 00000000..6aa0882
+--- /dev/null
++++ b/build/pkgs/snowballstemmer/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([snowballstemmer], [
++  SAGE_PYTHON_PACKAGE_CHECK([snowballstemmer])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 50a1cf2a2bcd7eeec64cbc3f70e3e9fbe5d850fe Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:50:47 -0500
+Subject: Trac #29665: add Gentoo package information for tornado.
+
+---
+ build/pkgs/tornado/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tornado/distros/gentoo.txt
+
+diff --git a/build/pkgs/tornado/distros/gentoo.txt b/build/pkgs/tornado/distros/gentoo.txt
+new file mode 100644
+index 00000000..6ae4b9f
+--- /dev/null
++++ b/build/pkgs/tornado/distros/gentoo.txt
+@@ -0,0 +1 @@
++www-servers/tornado
+-- 
+cgit v1.0-1-gd88e
+
+
+From 118f4da6e03476c726363e8e22ecda32f13bfc33 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:51:26 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for tornado.
+
+---
+ build/pkgs/tornado/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tornado/spkg-configure.m4
+
+diff --git a/build/pkgs/tornado/spkg-configure.m4 b/build/pkgs/tornado/spkg-configure.m4
+new file mode 100644
+index 00000000..1ee5bc9
+--- /dev/null
++++ b/build/pkgs/tornado/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tornado], [SAGE_PYTHON_PACKAGE_CHECK([tornado])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3850701747a6c8ef60840bdfdb589b28d4cd2b9a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:52:21 -0500
+Subject: Trac #29665: add Gentoo package information for jsonschema.
+
+---
+ build/pkgs/jsonschema/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jsonschema/distros/gentoo.txt
+
+diff --git a/build/pkgs/jsonschema/distros/gentoo.txt b/build/pkgs/jsonschema/distros/gentoo.txt
+new file mode 100644
+index 00000000..d708e4c
+--- /dev/null
++++ b/build/pkgs/jsonschema/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jsonschema
+-- 
+cgit v1.0-1-gd88e
+
+
+From 76e3917c8af781af00f642cfada7a79594429e30 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:54:03 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jsonschema.
+
+---
+ build/pkgs/jsonschema/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jsonschema/spkg-configure.m4
+
+diff --git a/build/pkgs/jsonschema/spkg-configure.m4 b/build/pkgs/jsonschema/spkg-configure.m4
+new file mode 100644
+index 00000000..b9e5e21
+--- /dev/null
++++ b/build/pkgs/jsonschema/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jsonschema], [SAGE_PYTHON_PACKAGE_CHECK([jsonschema])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From fd4a16c11669b6dd73ac6325bca820e76db00402 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:55:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ widgetsnbextension.
+
+---
+ build/pkgs/widgetsnbextension/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/widgetsnbextension/spkg-configure.m4
+
+diff --git a/build/pkgs/widgetsnbextension/spkg-configure.m4 b/build/pkgs/widgetsnbextension/spkg-configure.m4
+new file mode 100644
+index 00000000..bf82daf
+--- /dev/null
++++ b/build/pkgs/widgetsnbextension/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([widgetsnbextension], [
++  SAGE_PYTHON_PACKAGE_CHECK([widgetsnbextension])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8079a9f384e3c8480e157dd98c3db2f43c987f4e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:57:20 -0500
+Subject: Trac #29665: add Gentoo package information for importlib_resources.
+
+---
+ build/pkgs/importlib_resources/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/importlib_resources/distros/gentoo.txt
+
+diff --git a/build/pkgs/importlib_resources/distros/gentoo.txt b/build/pkgs/importlib_resources/distros/gentoo.txt
+new file mode 100644
+index 00000000..d5e1f2c
+--- /dev/null
++++ b/build/pkgs/importlib_resources/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/importlib_resources
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2c430d7c52f02779a6c41b98ac2f4edd8b6759c3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:58:00 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ importlib_resources.
+
+---
+ build/pkgs/importlib_resources/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/importlib_resources/spkg-configure.m4
+
+diff --git a/build/pkgs/importlib_resources/spkg-configure.m4 b/build/pkgs/importlib_resources/spkg-configure.m4
+new file mode 100644
+index 00000000..50df55b
+--- /dev/null
++++ b/build/pkgs/importlib_resources/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([importlib_resources], [
++  SAGE_PYTHON_PACKAGE_CHECK([importlib_resources])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 00d13d7bf2e50aae2ccef3b2b30293c70a922af2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:58:38 -0500
+Subject: Trac #29665: add Gentoo package information for kiwisolver.
+
+---
+ build/pkgs/kiwisolver/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/kiwisolver/distros/gentoo.txt
+
+diff --git a/build/pkgs/kiwisolver/distros/gentoo.txt b/build/pkgs/kiwisolver/distros/gentoo.txt
+new file mode 100644
+index 00000000..7b30c95
+--- /dev/null
++++ b/build/pkgs/kiwisolver/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/kiwisolver
+-- 
+cgit v1.0-1-gd88e
+
+
+From 72b7907ef7ea9fa4ff6948ea34cfe2f693ee6c31 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:59:09 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for kiwisolver.
+
+---
+ build/pkgs/kiwisolver/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/kiwisolver/spkg-configure.m4
+
+diff --git a/build/pkgs/kiwisolver/spkg-configure.m4 b/build/pkgs/kiwisolver/spkg-configure.m4
+new file mode 100644
+index 00000000..4e7ac97
+--- /dev/null
++++ b/build/pkgs/kiwisolver/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([kiwisolver], [SAGE_PYTHON_PACKAGE_CHECK([kiwisolver])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 479351279e4e0ea7e2d146434f0daba038765cfd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:00:04 -0500
+Subject: Trac #29665: add Gentoo package information for notebook.
+
+---
+ build/pkgs/notebook/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/notebook/distros/gentoo.txt
+
+diff --git a/build/pkgs/notebook/distros/gentoo.txt b/build/pkgs/notebook/distros/gentoo.txt
+new file mode 100644
+index 00000000..6475d72
+--- /dev/null
++++ b/build/pkgs/notebook/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/notebook
+-- 
+cgit v1.0-1-gd88e
+
+
+From f4d9242ea654977f8ad7865c82eec593e11a36bc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:01:42 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for notebook.
+
+---
+ build/pkgs/notebook/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/notebook/spkg-configure.m4
+
+diff --git a/build/pkgs/notebook/spkg-configure.m4 b/build/pkgs/notebook/spkg-configure.m4
+new file mode 100644
+index 00000000..a17ba95
+--- /dev/null
++++ b/build/pkgs/notebook/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([notebook], [SAGE_PYTHON_PACKAGE_CHECK([notebook])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9837070c7f8e9a71283b84d49d4fd2c94b78a464 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:02:38 -0500
+Subject: Trac #29665: add Gentoo package information for matplotlib_inline.
+
+---
+ build/pkgs/matplotlib_inline/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/matplotlib_inline/distros/gentoo.txt
+
+diff --git a/build/pkgs/matplotlib_inline/distros/gentoo.txt b/build/pkgs/matplotlib_inline/distros/gentoo.txt
+new file mode 100644
+index 00000000..6a5859c
+--- /dev/null
++++ b/build/pkgs/matplotlib_inline/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/matplotlib-inline
+-- 
+cgit v1.0-1-gd88e
+
+
+From 750be73b25b92b4875e47d044360ac0e1116ec3e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:03:28 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for matplotlib_inline.
+
+---
+ build/pkgs/matplotlib_inline/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/matplotlib_inline/spkg-configure.m4
+
+diff --git a/build/pkgs/matplotlib_inline/spkg-configure.m4 b/build/pkgs/matplotlib_inline/spkg-configure.m4
+new file mode 100644
+index 00000000..e59658f
+--- /dev/null
++++ b/build/pkgs/matplotlib_inline/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([matplotlib_inline], [
++  SAGE_PYTHON_PACKAGE_CHECK([matplotlib_inline])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 273505f49698dcd2ab30c2756b07113c9b7e7791 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:04:10 -0500
+Subject: Trac #29665: add Gentoo package information for ipykernel.
+
+---
+ build/pkgs/ipykernel/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipykernel/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipykernel/distros/gentoo.txt b/build/pkgs/ipykernel/distros/gentoo.txt
+new file mode 100644
+index 00000000..88aab61
+--- /dev/null
++++ b/build/pkgs/ipykernel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipykernel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 629ad36c9e4ae0cdff4a013289b4f2911442445e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:04:46 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for ipykernel.
+
+---
+ build/pkgs/ipykernel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipykernel/spkg-configure.m4
+
+diff --git a/build/pkgs/ipykernel/spkg-configure.m4 b/build/pkgs/ipykernel/spkg-configure.m4
+new file mode 100644
+index 00000000..94ecc2d
+--- /dev/null
++++ b/build/pkgs/ipykernel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipykernel], [SAGE_PYTHON_PACKAGE_CHECK([ipykernel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b8d709edb6a24fd5868ee2818b56e78257b2eafa Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:05:26 -0500
+Subject: Trac #29665: add Gentoo package information for prompt_toolkit.
+
+---
+ build/pkgs/prompt_toolkit/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/prompt_toolkit/distros/gentoo.txt
+
+diff --git a/build/pkgs/prompt_toolkit/distros/gentoo.txt b/build/pkgs/prompt_toolkit/distros/gentoo.txt
+new file mode 100644
+index 00000000..6902484
+--- /dev/null
++++ b/build/pkgs/prompt_toolkit/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/prompt_toolkit
+-- 
+cgit v1.0-1-gd88e
+
+
+From 16c0b5e767ae4dac4440510b7253e5c8642b7d2c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:10:39 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for prompt_toolkit.
+
+---
+ build/pkgs/prompt_toolkit/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/prompt_toolkit/spkg-configure.m4
+
+diff --git a/build/pkgs/prompt_toolkit/spkg-configure.m4 b/build/pkgs/prompt_toolkit/spkg-configure.m4
+new file mode 100644
+index 00000000..fd8c1a6
+--- /dev/null
++++ b/build/pkgs/prompt_toolkit/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([prompt_toolkit], [
++  SAGE_PYTHON_PACKAGE_CHECK([prompt_toolkit])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0cd9283e8bb6c8ae413fc8f715c021f7ec3ca2c8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:12:10 -0500
+Subject: Trac #29665: add Gentoo package information for charset_normalizer.
+
+---
+ build/pkgs/charset_normalizer/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/charset_normalizer/distros/gentoo.txt
+
+diff --git a/build/pkgs/charset_normalizer/distros/gentoo.txt b/build/pkgs/charset_normalizer/distros/gentoo.txt
+new file mode 100644
+index 00000000..eefeb89
+--- /dev/null
++++ b/build/pkgs/charset_normalizer/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/charset_normalizer
+-- 
+cgit v1.0-1-gd88e
+
+
+From a04b01a9ab59097d189edcc5ddcb461faede83b2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:12:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ charset_normalizer.
+
+---
+ build/pkgs/charset_normalizer/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/charset_normalizer/spkg-configure.m4
+
+diff --git a/build/pkgs/charset_normalizer/spkg-configure.m4 b/build/pkgs/charset_normalizer/spkg-configure.m4
+new file mode 100644
+index 00000000..18b18cf
+--- /dev/null
++++ b/build/pkgs/charset_normalizer/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([charset_normalizer], [
++  SAGE_PYTHON_PACKAGE_CHECK([charset_normalizer])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d2ea08138711c53046f977b586f33b09b176b2e3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:13:37 -0500
+Subject: Trac #29665: add Gentoo package information for prometheus_client.
+
+---
+ build/pkgs/prometheus_client/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/prometheus_client/distros/gentoo.txt
+
+diff --git a/build/pkgs/prometheus_client/distros/gentoo.txt b/build/pkgs/prometheus_client/distros/gentoo.txt
+new file mode 100644
+index 00000000..aa2889c
+--- /dev/null
++++ b/build/pkgs/prometheus_client/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/prometheus_client
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b0393200e9edd3e26b8a55ba67e5710e7403fcb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:15:09 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for prometheus_client.
+
+---
+ build/pkgs/prometheus_client/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/prometheus_client/spkg-configure.m4
+
+diff --git a/build/pkgs/prometheus_client/spkg-configure.m4 b/build/pkgs/prometheus_client/spkg-configure.m4
+new file mode 100644
+index 00000000..b494588
+--- /dev/null
++++ b/build/pkgs/prometheus_client/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([prometheus_client], [
++  SAGE_PYTHON_PACKAGE_CHECK([prometheus_client])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From cdcd85284f43ca4ad18353ec3527b2901e57b788 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:17:23 -0500
+Subject: Trac #29665: add Gentoo package information for pybind11.
+
+---
+ build/pkgs/pybind11/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pybind11/distros/gentoo.txt
+
+diff --git a/build/pkgs/pybind11/distros/gentoo.txt b/build/pkgs/pybind11/distros/gentoo.txt
+new file mode 100644
+index 00000000..0c500b3
+--- /dev/null
++++ b/build/pkgs/pybind11/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pybind11
+-- 
+cgit v1.0-1-gd88e
+
+
+From efdd1eb64c4799fe3cdf2221824182941b3fda2d Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:17:51 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pybind11.
+
+---
+ build/pkgs/pybind11/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pybind11/spkg-configure.m4
+
+diff --git a/build/pkgs/pybind11/spkg-configure.m4 b/build/pkgs/pybind11/spkg-configure.m4
+new file mode 100644
+index 00000000..cce1cf5
+--- /dev/null
++++ b/build/pkgs/pybind11/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pybind11], [SAGE_PYTHON_PACKAGE_CHECK([pybind11])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b2128f33b68ea33927284116ea598dd186902400 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:19:23 -0500
+Subject: Trac #29665: add Gentoo package information for pkgconfig.
+
+---
+ build/pkgs/pkgconfig/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pkgconfig/distros/gentoo.txt
+
+diff --git a/build/pkgs/pkgconfig/distros/gentoo.txt b/build/pkgs/pkgconfig/distros/gentoo.txt
+new file mode 100644
+index 00000000..32e8618
+--- /dev/null
++++ b/build/pkgs/pkgconfig/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pkgconfig
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b373b49e06aadeb36dc57e500da9a322460e658 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:19:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pkgconfig.
+
+---
+ build/pkgs/pkgconfig/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pkgconfig/spkg-configure.m4
+
+diff --git a/build/pkgs/pkgconfig/spkg-configure.m4 b/build/pkgs/pkgconfig/spkg-configure.m4
+new file mode 100644
+index 00000000..6708293
+--- /dev/null
++++ b/build/pkgs/pkgconfig/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pkgconfig], [SAGE_PYTHON_PACKAGE_CHECK([pkgconfig])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ce578729eb0d14baab365351ba9a9ffffb7b79f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:21:10 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_serializinghtml.
+
+---
+ build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt b/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+new file mode 100644
+index 00000000..38bca8f
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-serializinghtml
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb0f42c32bbce0e4488678312f5e2d88c6f42c9b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:21:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_serializinghtml.
+
+---
+ build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4 b/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+new file mode 100644
+index 00000000..be8e625
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_serializinghtml], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_serializinghtml])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e47dcf985e40475de85c9436a85537751318bc3d Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:22:54 -0500
+Subject: Trac #29665: add Gentoo package information for sphinxcontrib_jsmath.
+
+---
+ build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt b/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+new file mode 100644
+index 00000000..041a471
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-jsmath
+-- 
+cgit v1.0-1-gd88e
+
+
+From 72cff6fd35f93de4fa855bc870569dd733ff5c24 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:23:49 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_jsmath.
+
+---
+ build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4 b/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+new file mode 100644
+index 00000000..e46bde2
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_jsmath], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_jsmath])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a36395d70f759449cd63c1b0990fbdcb4cb25ca0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:24:26 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_devhelp.
+
+---
+ build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..9b5c899
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-devhelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9953a5dd1646ed0ad51d2e3935cf609bc9e7fd1c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:25:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_devhelp.
+
+---
+ build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+new file mode 100644
+index 00000000..8728136
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_devhelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_devhelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b199d5363aad93f3cb23f7904c9553a28b06348f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:25:53 -0500
+Subject: Trac #29665: add Gentoo package information for sphinxcontrib_qthelp.
+
+---
+ build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..7210099
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-qthelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 94ac8806739f3938e73f5857328e91e0d42e98d2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:26:28 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_qthelp.
+
+---
+ build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+new file mode 100644
+index 00000000..81ea5e1
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_qthelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_qthelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From beedc154aa405e8a58aee8889f510db07adc89a7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:26:54 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_applehelp.
+
+---
+ build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..66ac8da
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-applehelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 07d47c3673d6b35423b71f621cb400989c0101c2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:27:19 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_applehelp.
+
+---
+ build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+new file mode 100644
+index 00000000..e834aed
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_applehelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_applehelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 333a66546c5d421735c49dbafd7370a827f22781 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:27:46 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_htmlhelp.
+
+---
+ build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..e080bac
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-htmlhelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From bfaeb3962254439b63f1f2e0e883de462c7831be Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:29:18 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_htmlhelp.
+
+---
+ build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+new file mode 100644
+index 00000000..c77b003
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_htmlhelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_htmlhelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 782cde13da06e8b85806cb7cbc8aceee0364e639 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:30:23 -0500
+Subject: Trac #29665: add Gentoo package information for jupyterlab_pygments.
+
+---
+ build/pkgs/jupyterlab_pygments/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyterlab_pygments/distros/gentoo.txt b/build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+new file mode 100644
+index 00000000..c57b4f1
+--- /dev/null
++++ b/build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyterlab_pygments
+-- 
+cgit v1.0-1-gd88e
+
+
+From 39f974cfa4a8c6e5dd897f152f83ec82f40ee9f7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:31:13 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ jupyterlab_pygments.
+
+---
+ build/pkgs/jupyterlab_pygments/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyterlab_pygments/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyterlab_pygments/spkg-configure.m4 b/build/pkgs/jupyterlab_pygments/spkg-configure.m4
+new file mode 100644
+index 00000000..e46e21f
+--- /dev/null
++++ b/build/pkgs/jupyterlab_pygments/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyterlab_pygments], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyterlab_pygments])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From db704620700fd36cec3bf6125938f3ee00a9eb5e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:29:15 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for ply.
+
+---
+ build/pkgs/ply/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ply/spkg-configure.m4
+
+diff --git a/build/pkgs/ply/spkg-configure.m4 b/build/pkgs/ply/spkg-configure.m4
+new file mode 100644
+index 00000000..ffb0030
+--- /dev/null
++++ b/build/pkgs/ply/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ply], [SAGE_PYTHON_PACKAGE_CHECK([ply])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6aac31dabcdfdef228d7780398a3fda1a4cc566f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:29:51 -0500
+Subject: Trac #29665: add Gentoo package information for ply.
+
+---
+ build/pkgs/ply/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ply/distros/gentoo.txt
+
+diff --git a/build/pkgs/ply/distros/gentoo.txt b/build/pkgs/ply/distros/gentoo.txt
+new file mode 100644
+index 00000000..c8b1630
+--- /dev/null
++++ b/build/pkgs/ply/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ply
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb8d3372936ec37470d69687a0f91592129460ae Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:30:33 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for gast.
+
+---
+ build/pkgs/gast/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/gast/spkg-configure.m4
+
+diff --git a/build/pkgs/gast/spkg-configure.m4 b/build/pkgs/gast/spkg-configure.m4
+new file mode 100644
+index 00000000..26ec59f
+--- /dev/null
++++ b/build/pkgs/gast/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([gast], [SAGE_PYTHON_PACKAGE_CHECK([gast])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1cdc4046a88f1c2b4e5c162f66c6db6090b24194 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:31:15 -0500
+Subject: Trac #29665: add Gentoo package information for gast.
+
+---
+ build/pkgs/gast/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/gast/distros/gentoo.txt
+
+diff --git a/build/pkgs/gast/distros/gentoo.txt b/build/pkgs/gast/distros/gentoo.txt
+new file mode 100644
+index 00000000..3be5e7e
+--- /dev/null
++++ b/build/pkgs/gast/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/gast
+-- 
+cgit v1.0-1-gd88e
+
+
+From 96068b8a3742b65d619190e1d9fa5db399e6b4f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:32:20 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pythran.
+
+---
+ build/pkgs/pythran/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pythran/spkg-configure.m4
+
+diff --git a/build/pkgs/pythran/spkg-configure.m4 b/build/pkgs/pythran/spkg-configure.m4
+new file mode 100644
+index 00000000..592e95b
+--- /dev/null
++++ b/build/pkgs/pythran/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pythran], [SAGE_PYTHON_PACKAGE_CHECK([pythran])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1fa0fad3ae8f7e559c6fc315c6773a7d8aac0bfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:32:55 -0500
+Subject: Trac #29665: add Gentoo package information for pythran.
+
+---
+ build/pkgs/pythran/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pythran/distros/gentoo.txt
+
+diff --git a/build/pkgs/pythran/distros/gentoo.txt b/build/pkgs/pythran/distros/gentoo.txt
+new file mode 100644
+index 00000000..1bb7cdc
+--- /dev/null
++++ b/build/pkgs/pythran/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pythran
+-- 
+cgit v1.0-1-gd88e
+
+
+From d26370e5b8c88e76abfb7c27e3defb71c9e9f711 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:33:50 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for beniget.
+
+---
+ build/pkgs/beniget/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/beniget/spkg-configure.m4
+
+diff --git a/build/pkgs/beniget/spkg-configure.m4 b/build/pkgs/beniget/spkg-configure.m4
+new file mode 100644
+index 00000000..8ae6101
+--- /dev/null
++++ b/build/pkgs/beniget/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([beniget], [SAGE_PYTHON_PACKAGE_CHECK([beniget])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From eeeb296ed9b9694a865534103fd58e62a151ef5e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:34:22 -0500
+Subject: Trac #29665: add Gentoo package information for beniget.
+
+---
+ build/pkgs/beniget/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/beniget/distros/gentoo.txt
+
+diff --git a/build/pkgs/beniget/distros/gentoo.txt b/build/pkgs/beniget/distros/gentoo.txt
+new file mode 100644
+index 00000000..1a5972c
+--- /dev/null
++++ b/build/pkgs/beniget/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/beniget
+-- 
+cgit v1.0-1-gd88e
+
+
+From 078b2ff272d0eeff5cce40ad7eb176d9ddd7bdff Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:35:37 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for alabaster.
+
+---
+ build/pkgs/alabaster/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/alabaster/spkg-configure.m4
+
+diff --git a/build/pkgs/alabaster/spkg-configure.m4 b/build/pkgs/alabaster/spkg-configure.m4
+new file mode 100644
+index 00000000..4eca6e0
+--- /dev/null
++++ b/build/pkgs/alabaster/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([alabaster], [SAGE_PYTHON_PACKAGE_CHECK([alabaster])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7dc264353e5f64110431ff28c1b8b7e89699e9bd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:36:06 -0500
+Subject: Trac #29665: add Gentoo package information for alabaster.
+
+---
+ build/pkgs/alabaster/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/alabaster/distros/gentoo.txt
+
+diff --git a/build/pkgs/alabaster/distros/gentoo.txt b/build/pkgs/alabaster/distros/gentoo.txt
+new file mode 100644
+index 00000000..cffece6
+--- /dev/null
++++ b/build/pkgs/alabaster/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/alabaster
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8011a5e675e7e61a77ce34a299ee961a9f44253f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:43:59 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ importlib_metadata.
+
+---
+ build/pkgs/importlib_metadata/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/importlib_metadata/spkg-configure.m4
+
+diff --git a/build/pkgs/importlib_metadata/spkg-configure.m4 b/build/pkgs/importlib_metadata/spkg-configure.m4
+new file mode 100644
+index 00000000..0554e52
+--- /dev/null
++++ b/build/pkgs/importlib_metadata/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([importlib_metadata], [
++  SAGE_PYTHON_PACKAGE_CHECK([importlib_metadata])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 928ca0019e3ec6c4541a16b28bcc6710df6d010b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:44:28 -0500
+Subject: Trac #29665: add Gentoo package information for importlib_metadata.
+
+---
+ build/pkgs/importlib_metadata/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/importlib_metadata/distros/gentoo.txt
+
+diff --git a/build/pkgs/importlib_metadata/distros/gentoo.txt b/build/pkgs/importlib_metadata/distros/gentoo.txt
+new file mode 100644
+index 00000000..4f92786
+--- /dev/null
++++ b/build/pkgs/importlib_metadata/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/importlib_metadata
+-- 
+cgit v1.0-1-gd88e
+
+
+From 135f184f7498a2046065e669723e68efe2d65cee Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 21:16:58 -0500
+Subject: Trac #29665: fix sage.misc.package doctest with system alabaster.
+
+When alabaster from the system is used, these tests won't be able to
+find its SPKG installed. Add some ellipses, and switch one test to
+look for sage_conf instead.
+---
+ src/sage/misc/package.py | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/sage/misc/package.py b/src/sage/misc/package.py
+index 84f3d50..c7ad206 100644
+--- a/src/sage/misc/package.py
++++ b/src/sage/misc/package.py
+@@ -386,9 +386,9 @@ def installed_packages(exclude_pip=True):
+     EXAMPLES::
+ 
+         sage: sorted(installed_packages().keys())  # optional - build
+-        [...'alabaster', ...'sage_conf', ...]
+-        sage: installed_packages()['alabaster']  # optional - build, random
+-        '0.7.12'
++        [...'sage_conf', ...]
++        sage: installed_packages()['sage_conf']  # optional - build, random
++        '9.5'
+ 
+     .. SEEALSO::
+ 
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch b/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
new file mode 100644
index 000000000000..7ef3826aa4d2
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
@@ -0,0 +1,27 @@
+diff --git a/src/bin/sage-runtests b/src/bin/sage-runtests
+index 589dc8cd37..6bb8bf99a4 100755
+--- a/src/bin/sage-runtests
++++ b/src/bin/sage-runtests
+@@ -154,21 +154,4 @@ if __name__ == "__main__":
+     DC = DocTestController(args, args.filenames)
+     err = DC.run()
+ 
+-    try:
+-        exit_code_pytest = 0
+-        import pytest
+-        pytest_options = ["--import-mode", "importlib"]
+-        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.")
+-
+-    if err == 0:
+-        sys.exit(exit_code_pytest)
+-    else:
+-        sys.exit(err)
++    sys.exit(err)
diff --git a/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch b/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
new file mode 100644
index 000000000000..093e3d56eb33
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
@@ -0,0 +1,42 @@
+More site packages not included in trac 29665
+
+diff --git a/build/pkgs/gmpy2/spkg-configure.m4 b/build/pkgs/gmpy2/spkg-configure.m4
+new file mode 100644
+index 0000000000..2d0390f7db
+--- /dev/null
++++ b/build/pkgs/gmpy2/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([gmpy2], [SAGE_PYTHON_PACKAGE_CHECK([gmpy2])])
+diff --git a/build/pkgs/sphinx/spkg-configure.m4 b/build/pkgs/sphinx/spkg-configure.m4
+new file mode 100644
+index 0000000000..e149fbb2cf
+--- /dev/null
++++ b/build/pkgs/sphinx/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([sphinx], [SAGE_PYTHON_PACKAGE_CHECK([sphinx])])
+diff --git a/build/pkgs/typing_extensions/spkg-configure.m4 b/build/pkgs/typing_extensions/spkg-configure.m4
+new file mode 100644
+index 0000000000..d475fd8257
+--- /dev/null
++++ b/build/pkgs/typing_extensions/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([typing_extensions], [SAGE_PYTHON_PACKAGE_CHECK([typing_extensions])])
+-- 
+diff --git a/build/pkgs/gmpy2/install-requires.txt b/build/pkgs/gmpy2/install-requires.txt
+index 51d24518ef..c25feff557 100644
+--- a/build/pkgs/gmpy2/install-requires.txt
++++ b/build/pkgs/gmpy2/install-requires.txt
+@@ -1,3 +1 @@
+-# We would like to write gmpy2 >=2.1.0b5, but pipenv does not accept prereleases in version ranges
+-# https://github.com/pypa/pipenv/issues/1760
+-gmpy2 ==2.1.0rc1
++gmpy2 >=2.1
+diff --git a/build/pkgs/ptyprocess/install-requires.txt b/build/pkgs/ptyprocess/install-requires.txt
+index de89260872..7c336f636c 100644
+--- a/build/pkgs/ptyprocess/install-requires.txt
++++ b/build/pkgs/ptyprocess/install-requires.txt
+@@ -1,3 +1,3 @@
+-ptyprocess ==0.5.1
++ptyprocess
+ # https://trac.sagemath.org/ticket/31280#comment:42 and following
+ # sagelib is not compatible with ptyprocess 0.5.2, 0.6, and 0.7
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 33b40acbabeb..a32c5d18f378 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -22,11 +22,13 @@ distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
 checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
 python_version=3
 
-build_options="debug system_python3"
+build_options="debug system_python3 system_site_packages"
 desc_option_debug="Build with debug symbols"
 desc_option_system_python="Build using system python 3"
-build_options_default="system_python3"
+desc_option_system_python="Build using system python site-packages"
+build_options_default="system_python3 system_site_packages"
 configure_args+=" $(vopt_with system_python3)"
+configure_args+=" $(vopt_enable system_site_packages)"
 
 # path where sage will be installed
 _SAGE_ROOT=/usr/lib/sage-${version}
@@ -163,6 +165,8 @@ do_check() {
 	fi
 	if [ "$XBPS_CHECK_PKGS" = full ]; then
 		_test_args="--long $_test_args"
+	else
+		_test_args="--warn-long 5.0 $_test_args"
 	fi
 	# since make check will build the docs, run test like this instead
 	./sage -tp ${XBPS_MAKEJOBS} ${_test_args}
@@ -182,7 +186,7 @@ makedepends+=" automake gettext gettext-devel"
 # other host dependencies
 makedepends+=" cmake curl git ninja pandoc patch pkg-config python3 tox"
 
-# already in void
+# standard dependencies
 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
@@ -202,7 +206,49 @@ makedepends+="
  brial-devel cliquer-devel gfan libbraiding-devel libhomfly-devel
  lrcalc-devel nauty-devel palp tachyon
  maxima-ecl primesieve-devel primecount-devel
+ ffmpeg ImageMagick
 "
 
 # TODO: optional
 # 4ti2 coxeter3 libsemigroups lrslib pdf2svg perl_mongodb polymake
+
+# TODO: standard
+# cvxopt importlib_resources
+
+# python packages for trac-29665
+_sage_python3_modules="
+ python3-Babel python3-Jinja2 python3-MarkupSafe python3-Pillow
+ python3-Pygments python3-Sphinx python3-alabaster python3-argcomplete
+ python3-argon2 python3-attrs python3-backcall python3-beniget
+ python3-bleach python3-certifi python3-cffi python3-charset-normalizer
+ python3-cycler python3-dateutil python3-decorator python3-defusedxml
+ python3-docutils python3-entrypoints python3-flit_core python3-gast
+ python3-gmpy2 python3-html5lib python3-idna python3-imagesize
+ python3-importlib_metadata python3-ipython python3-ipython_genutils
+ python3-ipython_ipykernel python3-jedi python3-jsonschema
+ python3-jupyter_client python3-jupyter_core python3-jupyter_ipywidgets
+ python3-jupyter_nbconvert python3-jupyter_nbformat
+ python3-jupyter_notebook python3-jupyterlab_pygments python3-kiwisolver
+ python3-matplotlib python3-matplotlib-inline python3-mistune
+ python3-mpmath python3-nbclient python3-nest_asyncio python3-networkx
+ python3-numpy python3-packaging python3-pandocfilters python3-parsing
+ python3-parso python3-pexpect python3-pickleshare python3-pip
+ python3-pkgconfig python3-pluggy python3-ply python3-prometheus_client
+ python3-prompt_toolkit python3-ptyprocess python3-py python3-pybind11
+ python3-pycparser python3-pyrsistent python3-pytz python3-pyzmq
+ python3-requests python3-scipy python3-send2trash python3-setuptools
+ python3-setuptools_scm python3-simplegeneric python3-six
+ python3-snowballstemmer python3-sphinxcontrib-applehelp
+ python3-sphinxcontrib-devhelp python3-sphinxcontrib-htmlhelp
+ python3-sphinxcontrib-jsmath python3-sphinxcontrib-qthelp
+ python3-sphinxcontrib-serializinghtml python3-sympy python3-terminado
+ python3-testpath python3-texttable python3-toml python3-tomli
+ python3-tornado python3-traitlets python3-typing_extensions
+ python3-tzlocal python3-urllib3 python3-wcwidth python3-webencodings
+ python3-wheel python3-zipp pythran
+ "
+
+if [ "$build_option_system_site_packages" ]; then
+	makedepends+=" $_sage_python3_modules"
+	depends+=" $_sage_python3_modules"
+fi

From 9e38b50f5895fef6eba0cb7a744e9811a2da53a1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 3 Jan 2022 20:47:52 -0300
Subject: [PATCH 24/67] sagemath: use small source tarball + upstream packages

---
 srcpkgs/sagemath/template | 97 ++++++++++++++++++++++++++-------------
 1 file changed, 64 insertions(+), 33 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index a32c5d18f378..0de0061b09df 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -18,8 +18,8 @@ short_desc="Open source mathematics software"
 maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
-distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
-checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
+distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
+checksum=aea4c5a8d3b32af2fba644269b9daf4f62471471ba2d7d83da0f8098a5f53225
 python_version=3
 
 build_options="debug system_python3 system_site_packages"
@@ -33,42 +33,72 @@ configure_args+=" $(vopt_enable system_site_packages)"
 # 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} ;;
-esac
+_SAGE_UPSTREAM_MIRROR=https://mirrors.mit.edu/sage/spkg/upstream
 
-# extra upstream packages (trac-32968 / trac-33040)
 _upstream="
- https://pypi.io/packages/source/s/sphinx/Sphinx-4.3.1.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
+${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
+${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
+${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
+${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
+${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
+${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
+${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
+https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
+https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
+http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
+${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
+${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
+${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
+${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
+${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
+https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
+${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
+https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
+${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
 "
 
 checksum+="
- 32a5b3e9a1b176cc25ed048557d4d3d01af635e6b76c5bc7a43b0a34447fbd45
-
- 9c87405839a19696e837b3b818fed3f5f69f16f1eec1a1ad77e043dcea9c772f
- fc4453705b81d03568d5b808ad8f09c77c47534f6ac2e72e733f9ca4714aa75c
- acad2d8b20a1af07d4e4c9d2e9285c5ed9104354062f275f3fcd88dcef4f1326
- 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
- 78884e7c1d4b00ce3cea67b44566851c4343c120abd683433ce934a68ea58872
- 0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86
- b8e2f83c56e141920c39464b852de3719dfbfb6e3c99a2d8da0edf4fb33176ed
- d9bdec0013ef1eb5a84ab39a3b3868911598afa494f5faa038647101504e2b81
- b2e9810e09c3a47b73ce9cab5a72243a1258f61e7900969097a817232246ce1c
- 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
- 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
+c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
+d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
+4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
+3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
+03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
+5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
+cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
+5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
+581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
+6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
+07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
+a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
+ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
+d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
+169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
+5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
+cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
+471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
+78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
+edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
+b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
+3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
+545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
+cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
+718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
+dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
 "
 
 for u in ${_upstream}; do
@@ -101,6 +131,7 @@ post_extract() {
 	mv -T $wrksrc $_SAGE_ROOT
 	ln -srfT $_SAGE_ROOT $wrksrc
 
+	mkdir -p $wrksrc/upstream
 	for u in ${_upstream}; do
 		cp "$XBPS_SRCDISTDIR/${pkgname}-${version}/${u##*[/>]}" $wrksrc/upstream
 	done

From b9ca51ecdaae01676b5bfc9e4a40fd87f48f26a8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 13:38:02 -0300
Subject: [PATCH 25/67] sagemath: for CI use fixed random-seed=0

---
 srcpkgs/sagemath/template | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 0de0061b09df..b5b99d2c122d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -194,6 +194,10 @@ do_check() {
 	if [ -z "$_test_args" ]; then
 		_test_args=--all
 	fi
+	if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
+		# for CI use a predictable random seed
+		_test_args="--random-seed=0 $_test_args"
+	fi
 	if [ "$XBPS_CHECK_PKGS" = full ]; then
 		_test_args="--long $_test_args"
 	else

From 4e0fb24cb0ecb09505715511a862b665a9a43189 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 14:40:27 -0300
Subject: [PATCH 26/67] sagemath: upstream two patches

---
 ...ble-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch} |  6 +++---
 ...rse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch} | 10 +++++-----
 2 files changed, 8 insertions(+), 8 deletions(-)
 rename srcpkgs/sagemath/patches/{0001-sage-site-exec-only-if-it-is-executable.patch => trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch} (94%)
 rename srcpkgs/sagemath/patches/{0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch => trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch} (81%)

diff --git a/srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch b/srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
similarity index 94%
rename from srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch
rename to srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
index ce17c6d6e954..7fdb3d697222 100644
--- a/srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch
+++ b/srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
@@ -1,14 +1,14 @@
 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
+Subject: 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
+index 4c0fa17..153e610 100755
 --- a/src/bin/sage
 +++ b/src/bin/sage
 @@ -129,7 +129,7 @@ usage() {
@@ -39,5 +39,5 @@ index 4c0fa17426..153e610a2e 100755
              # fallthrough if there is no sage-site script
          fi
 -- 
-2.34.1
+cgit v1.0-1-gd88e
 
diff --git a/srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch b/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
similarity index 81%
rename from srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch
rename to srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
index bab6d8441d42..350c41ac3928 100644
--- a/srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch
+++ b/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
@@ -1,16 +1,16 @@
-From 57e3eba28c9b4ee6bd3407d0715b8bd00aaf04a7 Mon Sep 17 00:00:00 2001
+From 53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6 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
+Subject: sagetex: Fix a warning when byte-compiling sagetexparse.py
 
 ---
- .../sagetex/patches/sagetex-fix-warning.patch    | 16 ++++++++++++++++
+ build/pkgs/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
+index 00000000..d82ab67
 --- /dev/null
 +++ b/build/pkgs/sagetex/patches/sagetex-fix-warning.patch
 @@ -0,0 +1,16 @@
@@ -31,5 +31,5 @@ index 0000000000..d82ab675dd
 +     self.result += t.code[1:-1] + '\n\n'
 + 
 -- 
-2.34.1
+cgit v1.0-1-gd88e
 

From 8530d502ee1af3ffe43c0ad19014ca5f21876cf4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 7 Jan 2022 19:57:59 -0300
Subject: [PATCH 27/67] sagemath: reorder upstream sources and add two missing
 ones

---
 srcpkgs/sagemath/template | 60 ++++++++++++++++++++++-----------------
 1 file changed, 34 insertions(+), 26 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index b5b99d2c122d..f53cba947c88 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -36,69 +36,77 @@ _SAGE_ROOT=/usr/lib/sage-${version}
 _SAGE_UPSTREAM_MIRROR=https://mirrors.mit.edu/sage/spkg/upstream
 
 _upstream="
-${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
 ${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
 ${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
+${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
+
+${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
 ${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
 ${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
 ${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
 ${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
 ${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
 ${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
-https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
-https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
-http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
 ${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
 ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
 ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
 ${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
 ${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+${PYPI_SITE}/P/PyCygwin/PyCygwin-0.1.tar.gz
 ${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
-https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+${PYPI_SITE}/s/setuptools/setuptools-59.2.0.tar.gz
 ${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
 ${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
-https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
 ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
+
+https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
+https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
+http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
+https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
 "
 
 checksum+="
-dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
 c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
 d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
+5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
+ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
+169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
+cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
+edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
+cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
+
+dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
 3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
 03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
 5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
 cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
-5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
-c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
-6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
-07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
 a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
-ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
 d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
-169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
 5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
-cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
 471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
 78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
-edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+45a5e295590c469a49b2804bfdb89059e942d768ad3b813f484d7b5bff48d226
 ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
-b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
-3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+157d21de9d055ab9e8ea3186d91e7f4f865e11f42deafa952d90842671fc2576
 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
 545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
-cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
-718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
 dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
+
+c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
+6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
+07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
+3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
 "
 
 for u in ${_upstream}; do

From 825979db6eddfd14cd68c5523a6f0b7e63af13fe Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 9 Jan 2022 12:45:47 -0300
Subject: [PATCH 28/67] sagemath: do not download anything patch

---
 .../patches/00-Do_not_download_anything.patch         | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 srcpkgs/sagemath/patches/00-Do_not_download_anything.patch

diff --git a/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch b/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch
new file mode 100644
index 000000000000..35aef7b8d456
--- /dev/null
+++ b/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch
@@ -0,0 +1,11 @@
+--- a/build/sage_bootstrap/tarball.py	2022-01-07 19:17:06.754747955 -0300
++++ b/build/sage_bootstrap/tarball.py	2022-01-07 19:25:31.844139381 -0300
+@@ -158,6 +158,8 @@
+                             .format(destination=destination))
+         successful_download = False
+         log.info('Attempting to download package {0} from mirrors'.format(self.filename))
++        log.info('ERROR: downloading is disabled, add file to template instead')
++        return
+         for mirror in MirrorList():
+             url = mirror + '/'.join(['spkg', 'upstream', self.package.name, self.filename])
+             log.info(url)

From ef2cc5151558cb0d26214a88bc47cf0a2d686e99 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 9 Jan 2022 13:27:49 -0300
Subject: [PATCH 29/67] sagemath: update to 9.5.rc0.

---
 ...184f7498a2046065e669723e68efe2d65cee.patch |    6 +-
 ...1d4ced4264f65ab704f725f6f5879b012796.patch |  263 ----
 ...a54526829b79d5d236a40f83ddc6ce7b2696.patch | 1196 -----------------
 ...9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch |   27 -
 ...3f4f32246ad9ded6d37f1f2f12a589a81f4.patch} |    4 +-
 ...03138d0403be7c7cb303de2bc0a0e0b6793c.patch |   82 --
 ...f3a1611fed0cc66fb838eb85739646dd34d.patch} |   94 +-
 ...49c415e11d0522bff9013bc1509264b26ebf.patch |   27 +
 ...ip_doctest_singular_4.2.1--see_33134.patch |   13 +
 srcpkgs/sagemath/template                     |    6 +-
 10 files changed, 72 insertions(+), 1646 deletions(-)
 delete mode 100644 srcpkgs/sagemath/patches/trac-30766-system_python_3.10-df9f1d4ced4264f65ab704f725f6f5879b012796.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
 rename srcpkgs/sagemath/patches/{trac-33064-sage_docbuild_ignore_cache_save_permission_error-f767cf1eadfd8ab540a31c5c5ef09d56df09b90e.patch => trac-33064-sage_docbuild_ignore_cache_save_permission_error-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch} (92%)
 delete mode 100644 srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
 rename srcpkgs/sagemath/patches/{trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch => trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch} (63%)
 create mode 100644 srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch

diff --git a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
index b641113927e7..0ecb27c593cd 100644
--- a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
+++ b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
@@ -5615,9 +5615,9 @@ index 84f3d50..c7ad206 100644
      EXAMPLES::
  
          sage: sorted(installed_packages().keys())  # optional - build
--        [...'alabaster', ...'sage_conf', ...]
--        sage: installed_packages()['alabaster']  # optional - build, random
--        '0.7.12'
+-        [...'gmpy2', ...'sage_conf', ...]
+-        sage: installed_packages()['gmpy2']  # optional - build, random
+-        '2.1.0b5'
 +        [...'sage_conf', ...]
 +        sage: installed_packages()['sage_conf']  # optional - build, random
 +        '9.5'
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
deleted file mode 100644
index a1cb4c834482..000000000000
--- a/srcpkgs/sagemath/patches/trac-30766-system_python_3.10-df9f1d4ced4264f65ab704f725f6f5879b012796.patch
+++ /dev/null
@@ -1,263 +0,0 @@
-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-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch b/srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
deleted file mode 100644
index 3ae6fe01822d..000000000000
--- a/srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
+++ /dev/null
@@ -1,1196 +0,0 @@
-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/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch b/srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
deleted file mode 100644
index 485fb0176f45..000000000000
--- a/srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-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: 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 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"
- 
- # 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)
--- 
-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-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
similarity index 92%
rename from srcpkgs/sagemath/patches/trac-33064-sage_docbuild_ignore_cache_save_permission_error-f767cf1eadfd8ab540a31c5c5ef09d56df09b90e.patch
rename to srcpkgs/sagemath/patches/trac-33064-sage_docbuild_ignore_cache_save_permission_error-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
index 20fa12e570eb..04f04cfd6718 100644
--- 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-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
@@ -1,4 +1,4 @@
-From f767cf1eadfd8ab540a31c5c5ef09d56df09b90e Mon Sep 17 00:00:00 2001
+From e89193f4f32246ad9ded6d37f1f2f12a589a81f4 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
@@ -8,7 +8,7 @@ Subject: sage_docbuild: do not fail when cache cannot be saved
  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
+index 466ca82..f8c8ebd 100644
 --- a/src/sage_docbuild/__init__.py
 +++ b/src/sage_docbuild/__init__.py
 @@ -856,9 +856,12 @@ class ReferenceSubBuilder(DocBuilder):
diff --git a/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch b/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
deleted file mode 100644
index 6bc5193b75ee..000000000000
--- a/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-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
-
-
-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/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch b/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
similarity index 63%
rename from srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch
rename to srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
index 3794aa7f019b..04fca4815a00 100644
--- a/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch
+++ b/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
@@ -1,4 +1,4 @@
-From 7d3381b21e4716cfa8a33915621a12f0eba74233 Mon Sep 17 00:00:00 2001
+From 18d0477153af6f453a0e84f78030535f6a36ce87 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
@@ -10,56 +10,56 @@ Subject: doctests: remove dochtml label from some tests that don't need docs
  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
+index c788623..527ed90 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  # optional - sagemath_doc_html
+-        sage: thematic_index = os.path.join(SAGE_DOC, "html", "en", "thematic_tutorials", "index.html")  # optional - sagemath_doc_html
 +        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
+         sage: for line in open(thematic_index).readlines():  # optional - sagemath_doc_html
          ....:     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
+index 4c56aea..583ca06 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  # optional - sagemath_doc_html
+-    sage: docfilename = os.path.join(SAGE_DOC, 'html', 'en', 'reference', 'calculus', 'sage', 'symbolic', 'expression.html')  # optional - sagemath_doc_html
 +    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
+     sage: with open(docfilename) as fobj:  # optional - sagemath_doc_html
      ....:     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='',
+@@ -845,12 +845,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  # optional - sagemath_doc_html
+-        sage: len(_search_src_or_doc('src', r'matrix\(', 'incidence_structures', 'self', 'combinat', interact=False).splitlines()) > 1  # optional - sagemath_doc_html
 +        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)
+         sage: 'abvar/homology' in _search_src_or_doc('doc', 'homology', 'variety', interact=False)  # optional - sagemath_doc_html, 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)  # optional - sagemath_doc_html
 +        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:
+@@ -1369,7 +1369,7 @@ class _sage_doc:
  
-         sage: browse_sage_doc._open("reference", testing=True)[0]  # optional - dochtml, indirect doctest
+         sage: browse_sage_doc._open("reference", testing=True)[0]  # optional - sagemath_doc_html, 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]  # optional - sagemath_doc_html
 +        sage: browse_sage_doc(identity_matrix, 'rst')[-107:-47]
          'Full MatrixSpace of 3 by 3 sparse matrices over Integer Ring'
      """
@@ -68,7 +68,7 @@ index eb70516..b4848ed 100644
 cgit v1.0-1-gd88e
 
 
-From 42a76c3f82edecc9c6c53c661251677e3e907584 Mon Sep 17 00:00:00 2001
+From 88dd9f3a1611fed0cc66fb838eb85739646dd34d 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
@@ -78,7 +78,7 @@ Subject: doctests: add dochtml label to some tests that need docs installed
  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
+index f8c8ebd..d329009 100644
 --- a/src/sage_docbuild/__init__.py
 +++ b/src/sage_docbuild/__init__.py
 @@ -105,7 +105,7 @@ def builder_helper(type):
@@ -86,7 +86,7 @@ index 4a71c91..dd233bd 100644
          sage: from sage_docbuild import _build_many as build_many
          sage: helper = builder_helper("html")
 -        sage: try:
-+        sage: try:  # optional - dochtml
++        sage: try:  # optional - sagemath_doc_html
          ....:     build_many(build_ref_doc, [("docname", "en", "html", {})])
          ....: except Exception as E:
          ....:     "Non-exception during docbuild: abort pool operation" in str(E)
@@ -95,7 +95,7 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import DocBuilder
              sage: b = DocBuilder('tutorial')
 -            sage: b._output_dir('html')
-+            sage: b._output_dir('html')         # optional - dochtml
++            sage: b._output_dir('html')         # optional - sagemath_doc_html
              '.../html/en/tutorial'
          """
          d = os.path.join(SAGE_DOC, type, self.lang, self.name)
@@ -104,7 +104,7 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import DocBuilder
              sage: b = DocBuilder('tutorial')
 -            sage: b._doctrees_dir()
-+            sage: b._doctrees_dir()             # optional - docthml
++            sage: b._doctrees_dir()             # optional - sagemath_doc_html
              '.../doctrees/en/tutorial'
          """
          d = os.path.join(SAGE_DOC, 'doctrees', self.lang, self.name)
@@ -113,7 +113,7 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import ReferenceBuilder
              sage: b = ReferenceBuilder('reference')
 -            sage: b._output_dir('html')
-+            sage: b._output_dir('html')         # optional - dochtml
++            sage: b._output_dir('html')         # optional - sagemath_doc_html
              '.../html/en/reference'
          """
          if lang is None:
@@ -122,56 +122,10 @@ index 4a71c91..dd233bd 100644
              sage: from sage_docbuild import ReferenceTopBuilder
              sage: b = ReferenceTopBuilder('reference')
 -            sage: b._output_dir('html')
-+            sage: b._output_dir('html')         # optional - dochtml
++            sage: b._output_dir('html')         # optional - sagemath_doc_html
              '.../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/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch b/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
new file mode 100644
index 000000000000..d32f1e4d5e9f
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
@@ -0,0 +1,27 @@
+From 836249c415e11d0522bff9013bc1509264b26ebf Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Sun, 9 Jan 2022 16:51:22 -0300
+Subject: trac 33135: add filter to ignore deprecation warnings
+
+---
+ src/sage/all.py | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/sage/all.py b/src/sage/all.py
+index 01ef327..19ca3d4 100644
+--- a/src/sage/all.py
++++ b/src/sage/all.py
+@@ -96,6 +96,10 @@ warnings.filterwarnings('ignore', category=DeprecationWarning,
+ warnings.filterwarnings('ignore', category=DeprecationWarning,
+                         module='pythran')
+ 
++warnings.filterwarnings('ignore', category=DeprecationWarning,
++                        message='The distutils(.sysconfig module| package) is deprecated',
++                        module='numpy|sage.env|sage.features')
++
+ ################ end setup warnings ###############################
+ 
+ 
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
new file mode 100644
index 000000000000..438078a92036
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage/rings/polynomial/hilbert.pyx b/src/sage/rings/polynomial/hilbert.pyx
+index 4cd91d0a46..323b168c4e 100644
+--- a/src/sage/rings/polynomial/hilbert.pyx
++++ b/src/sage/rings/polynomial/hilbert.pyx
+@@ -578,7 +578,7 @@ def hilbert_poincare_series(I, grading=None):
+ 
+     This example exceeded the capabilities of Singular before version 4.2.1p2::
+ 
+-        sage: J.hilbert_numerator(algorithm='singular')
++        sage: J.hilbert_numerator(algorithm='singular')   # not tested - requires singular 4.2.1p2
+         120*t^33 - 3465*t^32 + 48180*t^31 - 429374*t^30 + 2753520*t^29 - 13522410*t^28 + 52832780*t^27 - 168384150*t^26 + 445188744*t^25 - 987193350*t^24 + 1847488500*t^23 + 1372406746*t^22 - 403422496*t^21 - 8403314*t^20 - 471656596*t^19 + 1806623746*t^18 + 752776200*t^17 + 752776200*t^16 - 1580830020*t^15 + 1673936550*t^14 - 1294246800*t^13 + 786893250*t^12 - 382391100*t^11 + 146679390*t^10 - 42299400*t^9 + 7837830*t^8 - 172260*t^7 - 468930*t^6 + 183744*t^5 - 39270*t^4 + 5060*t^3 - 330*t^2 + 1
+ 
+     """
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f53cba947c88..f688629fc26d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -1,6 +1,6 @@
 # Template file for 'sagemath'
 pkgname=sagemath
-version=9.5.beta9
+version=9.5.rc0
 revision=1
 wrksrc=sage-$version
 build_style=configure
@@ -19,7 +19,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
-checksum=aea4c5a8d3b32af2fba644269b9daf4f62471471ba2d7d83da0f8098a5f53225
+checksum=8012e3ac35290fa9b2cb837eeca149925784c2378b486731226944e4afd8a4e6
 python_version=3
 
 build_options="debug system_python3 system_site_packages"
@@ -128,7 +128,7 @@ nostrip=yes
 noshlibprovides=yes
 
 # don't rewrite python shebang as sage uses its own python (for now)
-_no_python_shebang=yes
+#_no_python_shebang=yes
 
 # compile python code in sage venv
 pycompile_dirs="$_SAGE_ROOT/venv/"

From 4caafe287b2c69c49d569c32d1da04de928a8a90 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 10 Jan 2022 16:32:54 -0300
Subject: [PATCH 30/67] sagemath: use system gap

---
 ...f491e5ce599ba185f5e93f02e0fcebd76c9e.patch | 57 +++++++++++++++++++
 .../patches/zzz-skip_doctest_system_gap.patch | 13 +++++
 srcpkgs/sagemath/template                     | 15 ++++-
 3 files changed, 82 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch

diff --git a/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch b/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
new file mode 100644
index 000000000000..da88a369db0d
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
@@ -0,0 +1,57 @@
+From 2c981351bb60089530b0598d3e9a909a23d4d4d8 Mon Sep 17 00:00:00 2001
+From: Thierry Thomas <thierry@FreeBSD.org>
+Date: Mon, 22 Mar 2021 03:04:12 +0100
+Subject: 29644: Add spkg-configure.m4 for gap
+
+---
+ build/pkgs/gap/spkg-configure.m4 | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+ create mode 100644 build/pkgs/gap/spkg-configure.m4
+
+diff --git a/build/pkgs/gap/spkg-configure.m4 b/build/pkgs/gap/spkg-configure.m4
+new file mode 100644
+index 00000000..91cd089
+--- /dev/null
++++ b/build/pkgs/gap/spkg-configure.m4
+@@ -0,0 +1,8 @@
++SAGE_SPKG_CONFIGURE([gap], [
++    SAGE_SPKG_DEPCHECK([gmp], [
++       AC_CHECK_HEADER([gap/system.h], [
++        AC_SEARCH_LIBS([GAP_COMM], [gap], [
++        ], [sage_spkg_install_gap=yes])
++       ], [sage_spkg_install_gap=yes])
++    ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2a41f491e5ce599ba185f5e93f02e0fcebd76c9e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Samuel=20Leli=C3=A8vre?= <samuel.lelievre@gmail.com>
+Date: Mon, 22 Mar 2021 03:05:31 +0100
+Subject: 29644: Add distro information for gap
+
+---
+ build/pkgs/gap/distros/fedora.txt | 1 +
+ build/pkgs/gap/distros/gentoo.txt | 1 +
+ 2 files changed, 2 insertions(+)
+ create mode 100644 build/pkgs/gap/distros/fedora.txt
+ create mode 100644 build/pkgs/gap/distros/gentoo.txt
+
+diff --git a/build/pkgs/gap/distros/fedora.txt b/build/pkgs/gap/distros/fedora.txt
+new file mode 100644
+index 00000000..ea4feae
+--- /dev/null
++++ b/build/pkgs/gap/distros/fedora.txt
+@@ -0,0 +1 @@
++gap
+diff --git a/build/pkgs/gap/distros/gentoo.txt b/build/pkgs/gap/distros/gentoo.txt
+new file mode 100644
+index 00000000..ea64ec9
+--- /dev/null
++++ b/build/pkgs/gap/distros/gentoo.txt
+@@ -0,0 +1 @@
++sci-mathematics/gap
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
new file mode 100644
index 000000000000..f132591d48ac
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage_setup/optional_extension.py b/src/sage_setup/optional_extension.py
+index f252849384..4034e3e196 100644
+--- a/src/sage_setup/optional_extension.py
++++ b/src/sage_setup/optional_extension.py
+@@ -80,7 +80,7 @@ def OptionalExtension(*args, **kwds):
+         sage: print(ext.__class__.__name__)
+         CythonizeExtension
+         sage: ext = OptionalExtension("foo", ["foo.c"], package="gap")
+-        sage: print(ext.__class__.__name__)
++        sage: print(ext.__class__.__name__)     # not tested - fails with system gap
+         Extension
+     """
+     try:
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f688629fc26d..02b0af4ad16d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -66,7 +66,6 @@ ${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
 ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
 
 https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
-https://github.com/gap-system/gap/releases/download/v4.11.1/gap-4.11.1.tar.gz
 http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
 https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
 https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
@@ -103,7 +102,6 @@ ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
 dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
 
 c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
-6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
 07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
 3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
 718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
@@ -159,6 +157,13 @@ pre_configure() {
 	export MAKE="make -j ${XBPS_MAKEJOBS}"
 }
 
+post_configure() {
+	# we set some variables, right after configure has created sage_conf.py
+	cat <<-EOF >> pkgs/sage-conf/sage_conf.py
+	GAP_ROOT_DIR = "/usr/share/gap"
+	EOF
+}
+
 # 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
@@ -248,7 +253,11 @@ makedepends+="
  gengetopt texinfo
  brial-devel cliquer-devel gfan libbraiding-devel libhomfly-devel
  lrcalc-devel nauty-devel palp tachyon
- maxima-ecl primesieve-devel primecount-devel
+ maxima-ecl primesieve-devel primecount-devel gap-devel
+"
+
+# optional dependencies
+makedepends+="
  ffmpeg ImageMagick
 "
 

From 134c2e3002509c63b91e7c93c566cead3c3da39c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Thu, 13 Jan 2022 03:21:19 -0300
Subject: [PATCH 31/67] sagemath: fixes for system gap

---
 .../zzz-fixes_for_system_gap--see_29644.patch | 96 +++++++++++++++++++
 .../patches/zzz-skip_doctest_system_gap.patch | 13 ---
 srcpkgs/sagemath/template                     |  1 +
 3 files changed, 97 insertions(+), 13 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
 delete mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch

diff --git a/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch b/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
new file mode 100644
index 000000000000..741d2b23a7f5
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
@@ -0,0 +1,96 @@
+From 346b4ea4c92f4287d3c097b92817cf2abfcddd8c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Thu, 13 Jan 2022 01:41:31 -0300
+Subject: [PATCH] gap: fixes for using system gap
+
+ - fix _get_shared_lib_path() so we don't need to configure GAP_SO
+ - fix gap_root() so we don't need to configure GAP_ROOT_DIR
+ - skip a useless test that cannot succeed on system gap
+ - use gap_root() in saved_workspace.py instead of GAP_ROOT_DIR
+---
+ src/sage/env.py                      |  2 +-
+ src/sage/libs/gap/saved_workspace.py |  4 ++--
+ src/sage/libs/gap/util.pyx           | 11 +++++++++++
+ src/sage_setup/optional_extension.py |  2 +-
+ 4 files changed, 15 insertions(+), 4 deletions(-)
+
+diff --git a/src/sage/env.py b/src/sage/env.py
+index c4953cfa65..c16696d298 100644
+--- a/src/sage/env.py
++++ b/src/sage/env.py
+@@ -293,7 +293,7 @@ def _get_shared_lib_path(*libnames: str) -> Optional[str]:
+             if sys.platform == 'darwin':
+                 ext = 'dylib'
+             else:
+-                ext = 'so'
++                ext = 'so*'
+ 
+             if SAGE_LOCAL:
+                 search_directories.append(Path(SAGE_LOCAL) / 'lib')
+diff --git a/src/sage/libs/gap/saved_workspace.py b/src/sage/libs/gap/saved_workspace.py
+index ad5adec36d..59c498795f 100644
+--- a/src/sage/libs/gap/saved_workspace.py
++++ b/src/sage/libs/gap/saved_workspace.py
+@@ -8,7 +8,7 @@ workspaces.
+ 
+ import os
+ import glob
+-from sage.env import GAP_ROOT_DIR
++from sage.libs.gap.util import gap_root
+ from sage.interfaces.gap_workspace import gap_workspace_file
+ 
+ 
+@@ -31,7 +31,7 @@ def timestamp():
+     """
+     libgap_dir = os.path.dirname(__file__)
+     libgap_files = glob.glob(os.path.join(libgap_dir, '*'))
+-    gap_packages = glob.glob(os.path.join(GAP_ROOT_DIR, 'pkg', '*'))
++    gap_packages = glob.glob(os.path.join(gap_root(), 'pkg', '*'))
+     files = libgap_files + gap_packages
+     if len(files) == 0:
+         print('Unable to find LibGAP files.')
+diff --git a/src/sage/libs/gap/util.pyx b/src/sage/libs/gap/util.pyx
+index 08c4c40cc0..c7dd557c35 100644
+--- a/src/sage/libs/gap/util.pyx
++++ b/src/sage/libs/gap/util.pyx
+@@ -23,6 +23,7 @@ from cysignals.signals cimport sig_on, sig_off
+ import os
+ import warnings
+ import sage.env
++import subprocess
+ 
+ from .gap_includes cimport *
+ from .element cimport *
+@@ -178,6 +179,16 @@ def gap_root():
+     if os.path.exists(sage.env.GAP_ROOT_DIR):
+         return sage.env.GAP_ROOT_DIR
+ 
++    gap_expr = 'JoinStringsWithSeparator(KERNEL_INFO().GAP_ROOT_PATHS,";")'
++    gap_root_paths = subprocess.getoutput(
++        f"gap -r -q --bare --nointeract -c 'Display({gap_expr});'"
++        ).strip().split(';')
++
++    for gapdir in gap_root_paths:
++        if os.path.exists(os.path.join(gapdir, 'sysinfo.gap')):
++            sage.env.GAP_ROOT_DIR = gapdir
++            return gapdir
++
+     # Attempt to figure out the appropriate GAP_ROOT by reading the
+     # local/bin/gap shell script; this is an ugly hack that exists for
+     # historical reasons; the best approach to setting where Sage looks for
+diff --git a/src/sage_setup/optional_extension.py b/src/sage_setup/optional_extension.py
+index f252849384..4034e3e196 100644
+--- a/src/sage_setup/optional_extension.py
++++ b/src/sage_setup/optional_extension.py
+@@ -80,7 +80,7 @@ def OptionalExtension(*args, **kwds):
+         sage: print(ext.__class__.__name__)
+         CythonizeExtension
+         sage: ext = OptionalExtension("foo", ["foo.c"], package="gap")
+-        sage: print(ext.__class__.__name__)
++        sage: print(ext.__class__.__name__)     # not tested - fails with system gap
+         Extension
+     """
+     try:
+-- 
+2.34.1
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
deleted file mode 100644
index f132591d48ac..000000000000
--- a/srcpkgs/sagemath/patches/zzz-skip_doctest_system_gap.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/src/sage_setup/optional_extension.py b/src/sage_setup/optional_extension.py
-index f252849384..4034e3e196 100644
---- a/src/sage_setup/optional_extension.py
-+++ b/src/sage_setup/optional_extension.py
-@@ -80,7 +80,7 @@ def OptionalExtension(*args, **kwds):
-         sage: print(ext.__class__.__name__)
-         CythonizeExtension
-         sage: ext = OptionalExtension("foo", ["foo.c"], package="gap")
--        sage: print(ext.__class__.__name__)
-+        sage: print(ext.__class__.__name__)     # not tested - fails with system gap
-         Extension
-     """
-     try:
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 02b0af4ad16d..0d8ce1f7a70a 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -161,6 +161,7 @@ post_configure() {
 	# we set some variables, right after configure has created sage_conf.py
 	cat <<-EOF >> pkgs/sage-conf/sage_conf.py
 	GAP_ROOT_DIR = "/usr/share/gap"
+	GAP_SO = "$(objdump -p /usr/lib/libgap.so | awk '/SONAME/{print $2}')"
 	EOF
 }
 

From 90fae7c9e81cea859da8009ce0ca2daab527c35b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Thu, 13 Jan 2022 15:47:33 -0300
Subject: [PATCH 32/67] New package: sagemath-test

---
 srcpkgs/sagemath-test/template                | 32 +++++++++++++++++++
 .../patches/zzz-skip_doctest_shebang.patch    | 11 +++++++
 2 files changed, 43 insertions(+)
 create mode 100644 srcpkgs/sagemath-test/template
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch

diff --git a/srcpkgs/sagemath-test/template b/srcpkgs/sagemath-test/template
new file mode 100644
index 000000000000..3e0b1c3233fd
--- /dev/null
+++ b/srcpkgs/sagemath-test/template
@@ -0,0 +1,32 @@
+# Template file for 'sagemath-test'
+pkgname=sagemath-test
+version=1
+revision=1
+build_style=meta
+checkdepends="sagemath"
+short_desc="Dummy package to test sagemath"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-2.0-or-later"
+homepage="none"
+
+# TODO: install base-voidstrap, uninstall base-chroot, and remove orphans
+# so we can check sagemath depends are enough to run sage on void
+
+do_check() {
+	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
+		_test_args=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	fi
+	if [ -z "$_test_args" ]; then
+		_test_args=--all
+	fi
+	if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
+		# for CI use a predictable random seed
+		_test_args="--random-seed=0 $_test_args"
+	fi
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args="--long $_test_args"
+	else
+		_test_args="--warn-long 5.0 $_test_args"
+	fi
+	/usr/bin/sage* -tp ${XBPS_MAKEJOBS} ${_test_args}
+}
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch
new file mode 100644
index 000000000000..04fa2acbf3ec
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch
@@ -0,0 +1,11 @@
+--- a/src/sage/tests/cmdline.py
++++ b/src/sage/tests/cmdline.py
+@@ -488,7 +488,7 @@ def test_executable(args, input="", timeout=100.0, pydebug_ignore_warnings=False
+         0
+ 
+         sage: (out, err, ret) = test_executable(["sage", "--cython"])
+-        sage: print(err)
++        sage: print(err)  # not tested - broken when shebang is rewritten
+         Cython (http://cython.org) is a compiler for code written in the
+         Cython language.  Cython is based on Pyrex by Greg Ewing.
+         ...

From 7dd1d740278c1d2aac1212031b3e9d56b41188c6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 11:34:23 -0300
Subject: [PATCH 33/67] sagemath: cleanup and one patch

---
 .../zzz-skip_doctest_sage_setup_find.patch    | 12 ++++++++
 srcpkgs/sagemath/template                     | 30 ++++---------------
 2 files changed, 18 insertions(+), 24 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch

diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch
new file mode 100644
index 000000000000..15aed02f9aaa
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch
@@ -0,0 +1,12 @@
+--- a/src/sage_setup/find.py
++++ b/src/sage_setup/find.py
+@@ -301,7 +301,7 @@ def find_extra_files(src_dir, modules, cythonized_dir, special_filenames=[]):
+         sage: extras["sage/libs/mpfr"]
+         [...sage/libs/mpfr/types.pxd...]
+         sage: extras["sage/ext/interpreters"]
+-        ['.../src/sage/ext/interpreters/wrapper_cdf.pxd', ...wrapper_cdf.h...]
++        ['.../src/sage/ext/interpreters/wrapper_cdf.pxd', ...]
+     """
+     from Cython.Utils import is_package_dir
+ 
+--
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 0d8ce1f7a70a..f25cb745c9c4 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -4,7 +4,8 @@ version=9.5.rc0
 revision=1
 wrksrc=sage-$version
 build_style=configure
-configure_args="--enable-build-as-root"
+configure_args="--enable-build-as-root --with-system-python3
+ --enable-system-site-packages"
 make_check_target=ptest
 # for now skip building docs
 make_build_target=build
@@ -22,13 +23,8 @@ distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
 checksum=8012e3ac35290fa9b2cb837eeca149925784c2378b486731226944e4afd8a4e6
 python_version=3
 
-build_options="debug system_python3 system_site_packages"
+build_options="debug"
 desc_option_debug="Build with debug symbols"
-desc_option_system_python="Build using system python 3"
-desc_option_system_python="Build using system python site-packages"
-build_options_default="system_python3 system_site_packages"
-configure_args+=" $(vopt_with system_python3)"
-configure_args+=" $(vopt_enable system_site_packages)"
 
 # path where sage will be installed
 _SAGE_ROOT=/usr/lib/sage-${version}
@@ -112,9 +108,6 @@ for u in ${_upstream}; do
 	skip_extraction+=" ${u##*[/>]}"
 done
 
-# 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
@@ -165,16 +158,6 @@ post_configure() {
 	EOF
 }
 
-# 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() {
 	vlicense COPYING.txt
 	vdoc README.md
@@ -301,7 +284,6 @@ _sage_python3_modules="
  python3-wheel python3-zipp pythran
  "
 
-if [ "$build_option_system_site_packages" ]; then
-	makedepends+=" $_sage_python3_modules"
-	depends+=" $_sage_python3_modules"
-fi
+# python packages are build and runtime dependencies
+makedepends+=" $_sage_python3_modules"
+depends+=" $_sage_python3_modules"

From c4469521288b0c402aee7e585f455f274c8d5a0e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 11:34:32 -0300
Subject: [PATCH 34/67] sagemath: update to 9.5.rc1.

---
 srcpkgs/sagemath/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f25cb745c9c4..f5d9d0f0fabd 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -1,6 +1,6 @@
 # Template file for 'sagemath'
 pkgname=sagemath
-version=9.5.rc0
+version=9.5.rc1
 revision=1
 wrksrc=sage-$version
 build_style=configure
@@ -20,7 +20,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
-checksum=8012e3ac35290fa9b2cb837eeca149925784c2378b486731226944e4afd8a4e6
+checksum=b015c54f7411669ef70bac2b2fde260e7f45724bcff170957b1f9fd08131f2c3
 python_version=3
 
 build_options="debug"

From fbb3ada8e2ea452ebccb5a32c49bf89ef453ed63 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 14:53:11 -0300
Subject: [PATCH 35/67] sagemath: patch not needed with singular 4.3.0

---
 ...zzz-skip_doctest_singular_4.2.1--see_33134.patch | 13 -------------
 1 file changed, 13 deletions(-)
 delete mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch

diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
deleted file mode 100644
index 438078a92036..000000000000
--- a/srcpkgs/sagemath/patches/zzz-skip_doctest_singular_4.2.1--see_33134.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/src/sage/rings/polynomial/hilbert.pyx b/src/sage/rings/polynomial/hilbert.pyx
-index 4cd91d0a46..323b168c4e 100644
---- a/src/sage/rings/polynomial/hilbert.pyx
-+++ b/src/sage/rings/polynomial/hilbert.pyx
-@@ -578,7 +578,7 @@ def hilbert_poincare_series(I, grading=None):
- 
-     This example exceeded the capabilities of Singular before version 4.2.1p2::
- 
--        sage: J.hilbert_numerator(algorithm='singular')
-+        sage: J.hilbert_numerator(algorithm='singular')   # not tested - requires singular 4.2.1p2
-         120*t^33 - 3465*t^32 + 48180*t^31 - 429374*t^30 + 2753520*t^29 - 13522410*t^28 + 52832780*t^27 - 168384150*t^26 + 445188744*t^25 - 987193350*t^24 + 1847488500*t^23 + 1372406746*t^22 - 403422496*t^21 - 8403314*t^20 - 471656596*t^19 + 1806623746*t^18 + 752776200*t^17 + 752776200*t^16 - 1580830020*t^15 + 1673936550*t^14 - 1294246800*t^13 + 786893250*t^12 - 382391100*t^11 + 146679390*t^10 - 42299400*t^9 + 7837830*t^8 - 172260*t^7 - 468930*t^6 + 183744*t^5 - 39270*t^4 + 5060*t^3 - 330*t^2 + 1
- 
-     """

From 85c1e064f87de27f390c49f1cca2008877fd2df9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 14:53:25 -0300
Subject: [PATCH 36/67] sagemath: install /usr/bin/sage

---
 srcpkgs/sagemath/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f5d9d0f0fabd..49821fc982e4 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -181,7 +181,8 @@ do_install() {
 	vmkdir 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}
+	ln -sfT $_SAGE_ROOT/sage ${DESTDIR}/usr/bin/sage-${version}
+	ln -sfT sage-${version} ${DESTDIR}/usr/bin/sage
 }
 
 do_check() {

From 450ca9ea083ef36caa0b4a5260f7d826fccc2ef9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 16:31:25 -0300
Subject: [PATCH 37/67] New package: python3-cvxopt-1.2.7

---
 srcpkgs/python3-cvxopt/template | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 srcpkgs/python3-cvxopt/template

diff --git a/srcpkgs/python3-cvxopt/template b/srcpkgs/python3-cvxopt/template
new file mode 100644
index 000000000000..0fb769b294e0
--- /dev/null
+++ b/srcpkgs/python3-cvxopt/template
@@ -0,0 +1,20 @@
+# Template file for 'python3-cvxopt'
+pkgname=python3-cvxopt
+version=1.2.7
+revision=1
+wrksrc="cvxopt-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools"
+makedepends="python3-devel blas-devel lapack-devel SuiteSparse-devel gsl-devel glpk-devel"
+checkdepends="python3-pytest"
+short_desc="Python software for convex optimization"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-3.0-or-later"
+homepage="http://cvxopt.org/"
+distfiles="${PYPI_SITE}/c/cvxopt/cvxopt-${version}.tar.gz"
+checksum=3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
+
+pre_build() {
+	export CVXOPT_BUILD_GSL=1
+	export CVXOPT_BUILD_GLPK=1
+}

From 64d16f648008152ee4db1d6a0de956b480bfd113 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 23:37:14 -0300
Subject: [PATCH 38/67] sagemath: rearrange upstream packages and indent

This doesn't change anything, it separates _upstream and
checksum in three blocks to make it easier to edit.
---
 srcpkgs/sagemath/template | 140 ++++++++++++++++++++------------------
 1 file changed, 74 insertions(+), 66 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 49821fc982e4..4317f1e80893 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -31,76 +31,84 @@ _SAGE_ROOT=/usr/lib/sage-${version}
 
 _SAGE_UPSTREAM_MIRROR=https://mirrors.mit.edu/sage/spkg/upstream
 
+# packages were sage is the upstream
 _upstream="
-${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
-${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
-${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
-
-${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
-${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
-${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
-${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
-${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
-${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
-${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
-${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
-${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
-${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
-${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
-${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
-${PYPI_SITE}/P/PyCygwin/PyCygwin-0.1.tar.gz
-${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
-${PYPI_SITE}/s/setuptools/setuptools-59.2.0.tar.gz
-${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
-${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
-${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
-
-https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
-http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
-https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
-https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
+ ${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
+ ${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
+ ${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
+ ${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
+"
+checksum+="
+ c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
+ d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
+ 5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
+ ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
+ 169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
+ cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
+ edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
+ b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
+ cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
 "
 
+# packages from pypi (python modules)
+_upstream+="
+ ${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
+ ${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
+ ${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
+ ${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
+ ${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
+ ${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
+ ${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
+ ${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
+ ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
+ ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
+ ${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
+ ${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
+ ${PYPI_SITE}/P/PyCygwin/PyCygwin-0.1.tar.gz
+ ${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
+ ${PYPI_SITE}/s/setuptools/setuptools-59.2.0.tar.gz
+ ${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
+ ${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
+ ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
+"
+checksum+="
+ dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
+ 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
+ 3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
+ 03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
+ 5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
+ cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
+ 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+ a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
+ d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
+ 5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
+ 471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
+ 78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
+ 45a5e295590c469a49b2804bfdb89059e942d768ad3b813f484d7b5bff48d226
+ ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
+ 157d21de9d055ab9e8ea3186d91e7f4f865e11f42deafa952d90842671fc2576
+ 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
+ 545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
+ dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
+"
+
+# other upstream packages
+_upstream+="
+ https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
+ http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
+ https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+ https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
+"
 checksum+="
-c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
-d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
-5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
-ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
-169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
-cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
-edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
-b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
-cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
-
-dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
-4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
-3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
-03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
-5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
-cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
-581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
-a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
-d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
-5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
-471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
-78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
-45a5e295590c469a49b2804bfdb89059e942d768ad3b813f484d7b5bff48d226
-ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
-157d21de9d055ab9e8ea3186d91e7f4f865e11f42deafa952d90842671fc2576
-6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
-545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
-dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
-
-c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
-07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
-3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
-718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
+ c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
+ 07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
+ 3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+ 718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
 "
 
 for u in ${_upstream}; do

From 55e3bc415ee3e3fa9043b06920825968aa6b589d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 14 Jan 2022 23:37:58 -0300
Subject: [PATCH 39/67] sagemath: use system cvxopt and importlib_resources

---
 srcpkgs/sagemath/template | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 4317f1e80893..5eb70a6267bb 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -59,12 +59,10 @@ checksum+="
 _upstream+="
  ${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
  ${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
- ${PYPI_SITE}/c/cvxopt/cvxopt-1.2.7.tar.gz
  ${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
  ${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
  ${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
  ${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
- ${PYPI_SITE}/i/importlib_resources/importlib_resources-5.2.2.tar.gz
  ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
  ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
  ${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
@@ -79,12 +77,10 @@ _upstream+="
 checksum+="
  dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
  4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
- 3f9db1f4d4e820aaea81d6fc21054c89dc6327c84f935dd5a1eda1af11e1d504
  03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
  5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
  cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
  581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
- a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b
  d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
  5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
  471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
@@ -257,9 +253,6 @@ makedepends+="
 # TODO: optional
 # 4ti2 coxeter3 libsemigroups lrslib pdf2svg perl_mongodb polymake
 
-# TODO: standard
-# cvxopt importlib_resources
-
 # python packages for trac-29665
 _sage_python3_modules="
  python3-Babel python3-Jinja2 python3-MarkupSafe python3-Pillow
@@ -291,6 +284,8 @@ _sage_python3_modules="
  python3-tornado python3-traitlets python3-typing_extensions
  python3-tzlocal python3-urllib3 python3-wcwidth python3-webencodings
  python3-wheel python3-zipp pythran
+
+ python3-cvxopt python3-importlib_resources
  "
 
 # python packages are build and runtime dependencies

From 850d387fcd670cfdce72b02984e83c19e706ff05 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 01:48:08 -0300
Subject: [PATCH 40/67] sagemath-test: fix sage binary (now is just 'sage')

---
 srcpkgs/sagemath-test/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/sagemath-test/template b/srcpkgs/sagemath-test/template
index 3e0b1c3233fd..1c0d71683a1b 100644
--- a/srcpkgs/sagemath-test/template
+++ b/srcpkgs/sagemath-test/template
@@ -28,5 +28,5 @@ do_check() {
 	else
 		_test_args="--warn-long 5.0 $_test_args"
 	fi
-	/usr/bin/sage* -tp ${XBPS_MAKEJOBS} ${_test_args}
+	sage -tp ${XBPS_MAKEJOBS} ${_test_args}
 }

From c2520c73fd1ee6c21a4feceb8d9d37ce3cb70029 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 10:49:04 -0300
Subject: [PATCH 41/67] sagemath: disallow fuzz in patches

---
 ...49c415e11d0522bff9013bc1509264b26ebf.patch | 27 -------------------
 srcpkgs/sagemath/template                     |  1 +
 2 files changed, 1 insertion(+), 27 deletions(-)
 delete mode 100644 srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch

diff --git a/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch b/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
deleted file mode 100644
index d32f1e4d5e9f..000000000000
--- a/srcpkgs/sagemath/patches/trac-33135-ignore_deprecation_warnings-836249c415e11d0522bff9013bc1509264b26ebf.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 836249c415e11d0522bff9013bc1509264b26ebf Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
-Date: Sun, 9 Jan 2022 16:51:22 -0300
-Subject: trac 33135: add filter to ignore deprecation warnings
-
----
- src/sage/all.py | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/src/sage/all.py b/src/sage/all.py
-index 01ef327..19ca3d4 100644
---- a/src/sage/all.py
-+++ b/src/sage/all.py
-@@ -96,6 +96,10 @@ warnings.filterwarnings('ignore', category=DeprecationWarning,
- warnings.filterwarnings('ignore', category=DeprecationWarning,
-                         module='pythran')
- 
-+warnings.filterwarnings('ignore', category=DeprecationWarning,
-+                        message='The distutils(.sysconfig module| package) is deprecated',
-+                        module='numpy|sage.env|sage.features')
-+
- ################ end setup warnings ###############################
- 
- 
--- 
-cgit v1.0-1-gd88e
-
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 5eb70a6267bb..e5a728b2217d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -22,6 +22,7 @@ homepage="http://sagemath.org/"
 distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
 checksum=b015c54f7411669ef70bac2b2fde260e7f45724bcff170957b1f9fd08131f2c3
 python_version=3
+patch_args="-F0 -Np1"
 
 build_options="debug"
 desc_option_debug="Build with debug symbols"

From 130cce2a233ffa3b31f2e646a09a1a4dc4103cac Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 13:27:53 -0300
Subject: [PATCH 42/67] sagemath: disable packages that are not needed

 - appnope: only needed for macos
 - fonttools: only needed to build matplotlib
 - importlib_resources: only needed for old python
 - pycygwin: only needed for cygwin
 - setuptools_scm_git_archive: only needed to build matplotlib
 - setuptools_wheel: not needed
 - sphinxcontrib_websupport: only needed to build sphinx
 - cppy: force use from system python3-cppy
---
 srcpkgs/sagemath/template | 51 +++++++++++++++++++++++++++------------
 1 file changed, 35 insertions(+), 16 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index e5a728b2217d..f15bfbf76e0a 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -58,39 +58,29 @@ checksum+="
 
 # packages from pypi (python modules)
 _upstream+="
- ${PYPI_SITE}/a/appnope/appnope-0.1.2.tar.gz
- ${PYPI_SITE}/c/cppy/cppy-1.1.0.tar.gz
  ${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
  ${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
  ${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
- ${PYPI_SITE}/f/fonttools/fonttools-4.28.4.zip
+
  ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
  ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
  ${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
  ${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
- ${PYPI_SITE}/P/PyCygwin/PyCygwin-0.1.tar.gz
+
  ${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
- ${PYPI_SITE}/s/setuptools/setuptools-59.2.0.tar.gz
- ${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
- ${PYPI_SITE}/s/sphinxcontrib-websupport/sphinxcontrib-websupport-1.2.1.tar.gz
  ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
 "
 checksum+="
- dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a
- 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
  03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
  5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
  cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
- 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+
  d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
  5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
  471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
  78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
- 45a5e295590c469a49b2804bfdb89059e942d768ad3b813f484d7b5bff48d226
+
  ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
- 157d21de9d055ab9e8ea3186d91e7f4f865e11f42deafa952d90842671fc2576
- 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
- 545f5da4bd7757e82b8a23ce3af9500c6ffeedbcb13429fca436ad1e80bd10cf
  dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
 "
 
@@ -108,6 +98,22 @@ checksum+="
  718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
 "
 
+# these packages are not needed, don't install
+_dontinstall="
+ appnope
+ fonttools
+ importlib_resources
+ pycygwin
+ setuptools_scm_git_archive
+ setuptools_wheel
+ sphinxcontrib_websupport
+"
+
+# these packages can be used from system
+_usefromsystem="
+ cppy
+"
+
 for u in ${_upstream}; do
 	distfiles+=" $u"
 	skip_extraction+=" ${u##*[/>]}"
@@ -145,8 +151,20 @@ do_clean() {
 	rm -rf $wrksrc $_SAGE_ROOT
 }
 
-pre_configure() {
+post_patch() {
 	./bootstrap
+}
+
+pre_configure() {
+	for spkg in $_dontinstall; do
+		configure_args+=" sage_spkg_install_$spkg=no"
+		configure_args+=" sage_require_$spkg=no"
+	done
+
+	for spkg in $_usefromsystem; do
+		configure_args+=" sage_spkg_install_$spkg=no"
+		configure_args+=" sage_require_$spkg=yes"
+	done
 
 	if [ "$build_option_debug" ]; then
 		export SAGE_DEBUG=yes
@@ -286,7 +304,8 @@ _sage_python3_modules="
  python3-tzlocal python3-urllib3 python3-wcwidth python3-webencodings
  python3-wheel python3-zipp pythran
 
- python3-cvxopt python3-importlib_resources
+ python3-cvxopt
+ python3-cppy
  "
 
 # python packages are build and runtime dependencies

From 4acef273280bb18e27bd24e156ed8e3397f5338c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 17:32:39 -0300
Subject: [PATCH 43/67] New package: python3-cysignals-1.11.2

---
 .../python3-cysignals/patches/fix-write.patch | 46 +++++++++++++++++++
 srcpkgs/python3-cysignals/template            | 19 ++++++++
 2 files changed, 65 insertions(+)
 create mode 100644 srcpkgs/python3-cysignals/patches/fix-write.patch
 create mode 100644 srcpkgs/python3-cysignals/template

diff --git a/srcpkgs/python3-cysignals/patches/fix-write.patch b/srcpkgs/python3-cysignals/patches/fix-write.patch
new file mode 100644
index 000000000000..18206bd808d7
--- /dev/null
+++ b/srcpkgs/python3-cysignals/patches/fix-write.patch
@@ -0,0 +1,46 @@
+Fix a doctest failure which triggers in i686.
+
+The example is in the function `test_bad_str()` in the file `tests.pyx`.
+The test pases a bad string to `sig_str()` and then raises `SIGILL`. The
+signal handler eventually raises a Python exception which in turn raises
+a `SIGSEGV` when accessing the bad string. An error message is expected,
+but that doesn't happen.
+
+Presumably the segfault happens inside some stdio function which leaves
+stdio buffers in an inconsistent state so the latter `fprintf` doesn't
+work properly. From signal-safety(7):
+
+    Suppose that the main program is in the middle of a call to a
+    stdio function such as printf(3) where the buffer and associated
+    variables have been partially updated.  If, at that moment, the
+    program is interrupted by a signal handler that also calls
+    printf(3), then the second call to printf(3) will operate on
+    inconsistent data, with unpredictable results.
+
+We fix this by replacing the `fprintf` by calls to `write`, which is
+async-signal-safe according to POSIX.
+
+--- a/src/cysignals/implementation.c      2022-01-16 22:36:45.143796872 +0000
++++ b/src/cysignals/implementation.c      2022-01-17 02:22:31.196695043 +0000
+@@ -638,12 +622,15 @@
+ #endif
+ 
+     if (s) {
++        /* Using fprintf from inside a signal handler is undefined, see signal-safety(7) */
++        const char * message =
++            "\n"
++            "This probably occurred because a *compiled* module has a bug\n"
++            "in it and is not properly wrapped with sig_on(), sig_off().\n"
++            "Python will now terminate.\n"
++            "------------------------------------------------------------------------\n";
++        write(2, s, strlen(s));
++        write(2, message, strlen(message));
+-        fprintf(stderr,
+-            "%s\n"
+-            "This probably occurred because a *compiled* module has a bug\n"
+-            "in it and is not properly wrapped with sig_on(), sig_off().\n"
+-            "Python will now terminate.\n", s);
+-        print_sep();
+     }
+ 
+ dienow:
diff --git a/srcpkgs/python3-cysignals/template b/srcpkgs/python3-cysignals/template
new file mode 100644
index 000000000000..4655eead2a9c
--- /dev/null
+++ b/srcpkgs/python3-cysignals/template
@@ -0,0 +1,19 @@
+# Template file for 'python3-cysignals'
+pkgname=python3-cysignals
+version=1.11.2
+revision=1
+wrksrc="cysignals-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools python3-Cython autoconf"
+makedepends="python3-devel pari-devel"
+short_desc="Interrupt and signal handling for Cython "
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/sagemath/cysignals"
+distfiles="${PYPI_SITE}/c/cysignals/cysignals-${version}.tar.gz"
+checksum=5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
+nocross=yes # runs binaries built for target
+
+do_check() {
+	make check
+}

From ac09be9dbfabe0e4370455ac9e629505b9fb3f30 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 18:28:55 -0300
Subject: [PATCH 44/67] New package: python3-cypari2-2.1.2

---
 srcpkgs/python3-cypari2/template | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 srcpkgs/python3-cypari2/template

diff --git a/srcpkgs/python3-cypari2/template b/srcpkgs/python3-cypari2/template
new file mode 100644
index 000000000000..18755ec020b4
--- /dev/null
+++ b/srcpkgs/python3-cypari2/template
@@ -0,0 +1,19 @@
+# Template file for 'python3-cypari2'
+pkgname=python3-cypari2
+version=2.1.2
+revision=1
+wrksrc=cypari2-${version}
+build_style=python3-module
+hostmakedepends="python3-setuptools python3-Cython pari perl"
+makedepends="python3-devel python3-cysignals pari-devel gmp-devel"
+short_desc="Python interface to the number theory library PARI/GP"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-2.0-or-later"
+homepage="https://github.com/sagemath/cypari2"
+distfiles="${PYPI_SITE}/c/cypari2/cypari2-${version}.tar.gz"
+checksum=03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
+
+do_check() {
+	PYTHONPATH="$(cd build/lib* && pwd)" \
+		make check
+}

From b432dbb93e388c8c7053096ab5de86d67d61430f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 18:56:29 -0300
Subject: [PATCH 45/67] New package: python3-pplpy-0.8.7

---
 srcpkgs/python3-pplpy/template | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 srcpkgs/python3-pplpy/template

diff --git a/srcpkgs/python3-pplpy/template b/srcpkgs/python3-pplpy/template
new file mode 100644
index 000000000000..1cb69ffe6a07
--- /dev/null
+++ b/srcpkgs/python3-pplpy/template
@@ -0,0 +1,21 @@
+# Template file for 'python3-pplpy'
+pkgname=python3-pplpy
+version=0.8.7
+revision=1
+wrksrc="pplpy-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools python3-Cython"
+makedepends="python3-cysignals python3-gmpy2 python3-devel gmp-devel
+ gmpxx-devel ppl-devel mpfr-devel libmpc-devel pari-devel"
+short_desc="Python wrapper to the C++ Parma Polyhedra Library (PPL)"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-3.0-or-later"
+homepage="https://gitlab.com/videlec/pplpy"
+changelog="https://gitlab.com/videlec/pplpy/-/raw/master/CHANGES.txt"
+distfiles="${PYPI_SITE}/p/pplpy/pplpy-${version}.tar.gz"
+checksum=500bd0f4ae1a76956fae7fcba77854f5ec3e64fce76803664983763c3f2bd8bd
+
+do_check() {
+	PYTHONPATH=$(cd build/lib* && pwd) \
+		python setup.py test
+}

From 46d4bc28ef00f900f363f29bbadaab930f651568 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 01:14:24 -0300
Subject: [PATCH 46/67] New package: python3-fpylll-0.5.6

---
 srcpkgs/python3-fpylll/template | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 srcpkgs/python3-fpylll/template

diff --git a/srcpkgs/python3-fpylll/template b/srcpkgs/python3-fpylll/template
new file mode 100644
index 000000000000..dd2adcee6fce
--- /dev/null
+++ b/srcpkgs/python3-fpylll/template
@@ -0,0 +1,25 @@
+# Template file for 'python3-fpylll'
+pkgname=python3-fpylll
+version=0.5.6
+revision=1
+wrksrc="fpylll-${version}"
+build_style=python3-module
+hostmakedepends="python3-Cython"
+makedepends="python3-cysignals python3-devel gmp-devel mpfr-devel fplll-devel
+ pari-devel"
+checkdepends="python3-pytest python3-numpy"
+short_desc="Python wrapper to fplll (floating point lattice algorithms)"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-2.0-or-later"
+homepage="https://github.com/fplll/fpylll"
+distfiles="${PYPI_SITE}/f/fpylll/fpylll-${version}.tar.gz"
+checksum=6eb8a63fb933c0bf92f290dd66fd884807659214d0ce524afe3687a6a6b13a8b
+
+case $XBPS_TARGET_MACHINE in
+	# skip a test with numerical noise on 32 bit
+	i686*) make_check_args="-k not(averaged_simulate_prob)" ;;
+esac
+
+pre_check() {
+	export PY_IGNORE_IMPORTMISMATCH=1
+}

From 18c2bdcc4adda4e8b3bae64541ecc74801fb87d8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 18:32:13 -0300
Subject: [PATCH 47/67] sagemath: use system Cython, cysignals, cypari2, pplpy,
 fpylll

---
 srcpkgs/sagemath/template | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index f15bfbf76e0a..ba22ffbeaf30 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -58,26 +58,18 @@ checksum+="
 
 # packages from pypi (python modules)
 _upstream+="
- ${PYPI_SITE}/c/cypari2/cypari2-2.1.2.tar.gz
- ${PYPI_SITE}/c/cysignals/cysignals-1.11.2.tar.gz
- ${PYPI_SITE}/C/Cython/Cython-0.29.24.tar.gz
 
  ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
  ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
- ${PYPI_SITE}/p/pplpy/pplpy-0.8.6.tar.gz
  ${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
 
  ${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
  ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
 "
 checksum+="
- 03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
- 5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
- cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443
 
  d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
  5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
- 471b576a4c285758d27cc4a6f1b41afa29bfb9f3754a37f0520b35b6958eb8ce
  78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
 
  ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
@@ -86,13 +78,11 @@ checksum+="
 
 # other upstream packages
 _upstream+="
- https://github.com/fplll/fpylll/releases/download/0.5.6/fpylll-0.5.6.tar.gz
  http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
  https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
  https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
 "
 checksum+="
- c69bf4b3344f60ca40743af9b9246ce51f651c2cf54d2b88a4deff18b1b5f246
  07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
  3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
  718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
@@ -107,11 +97,17 @@ _dontinstall="
  setuptools_scm_git_archive
  setuptools_wheel
  sphinxcontrib_websupport
+ pplpy_doc
 "
 
 # these packages can be used from system
 _usefromsystem="
  cppy
+ cython
+ cysignals
+ cypari
+ pplpy
+ fpylll
 "
 
 for u in ${_upstream}; do
@@ -306,6 +302,11 @@ _sage_python3_modules="
 
  python3-cvxopt
  python3-cppy
+ python3-Cython
+ python3-cysignals
+ python3-cypari2
+ python3-pplpy
+ python3-fpylll
  "
 
 # python packages are build and runtime dependencies

From a849008d82bd76fb440779706a2a24e8cae082b6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 01:15:55 -0300
Subject: [PATCH 48/67] sagemath: update to 9.5.rc2.

---
 srcpkgs/sagemath/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index ba22ffbeaf30..b9bd590b61ca 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -1,6 +1,6 @@
 # Template file for 'sagemath'
 pkgname=sagemath
-version=9.5.rc1
+version=9.5.rc2
 revision=1
 wrksrc=sage-$version
 build_style=configure
@@ -20,7 +20,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
-checksum=b015c54f7411669ef70bac2b2fde260e7f45724bcff170957b1f9fd08131f2c3
+checksum=c7eba867c11ab1b6d04535dd8df54640d3de0625ad96cdac17b17af977d96dce
 python_version=3
 patch_args="-F0 -Np1"
 

From c6cc48c76f930c269b296cb02c4cc2401071d4c5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 09:52:14 -0300
Subject: [PATCH 49/67] sagemath: add timing information for doctests

This makes doctesting faster on many threads
---
 srcpkgs/sagemath-test/files/timings2.json |   1 +
 srcpkgs/sagemath-test/template            |  22 +-
 srcpkgs/sagemath/files/timings2.json      | 255 ++++++++++++++++++++++
 srcpkgs/sagemath/template                 |  21 +-
 4 files changed, 279 insertions(+), 20 deletions(-)
 create mode 120000 srcpkgs/sagemath-test/files/timings2.json
 create mode 100644 srcpkgs/sagemath/files/timings2.json

diff --git a/srcpkgs/sagemath-test/files/timings2.json b/srcpkgs/sagemath-test/files/timings2.json
new file mode 120000
index 000000000000..25d5309fc818
--- /dev/null
+++ b/srcpkgs/sagemath-test/files/timings2.json
@@ -0,0 +1 @@
+../../sagemath/files/timings2.json
\ No newline at end of file
diff --git a/srcpkgs/sagemath-test/template b/srcpkgs/sagemath-test/template
index 1c0d71683a1b..e3b1242bd338 100644
--- a/srcpkgs/sagemath-test/template
+++ b/srcpkgs/sagemath-test/template
@@ -14,19 +14,21 @@ homepage="none"
 
 do_check() {
 	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
-		_test_args=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+		_test_files=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	else
+		_test_files=--all
 	fi
-	if [ -z "$_test_args" ]; then
-		_test_args=--all
+	cp ${FILESDIR}/timings2.json .
+	_test_args="--stats_path=timings2.json"
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args+=" --long --warn-long 20.0"
+	else
+		_test_args+=" --warn-long 10.0"
 	fi
 	if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
 		# for CI use a predictable random seed
-		_test_args="--random-seed=0 $_test_args"
-	fi
-	if [ "$XBPS_CHECK_PKGS" = full ]; then
-		_test_args="--long $_test_args"
-	else
-		_test_args="--warn-long 5.0 $_test_args"
+		_test_args+=" --random-seed=0"
 	fi
-	sage -tp ${XBPS_MAKEJOBS} ${_test_args}
+	# since make check will build the docs, run test like this instead
+	sage -tp ${XBPS_MAKEJOBS} ${_test_args} ${_test_files}
 }
diff --git a/srcpkgs/sagemath/files/timings2.json b/srcpkgs/sagemath/files/timings2.json
new file mode 100644
index 000000000000..958a56d9d6f5
--- /dev/null
+++ b/srcpkgs/sagemath/files/timings2.json
@@ -0,0 +1,255 @@
+{
+  "doc.en.constructions.calculus": {"walltime": 64},
+  "doc.en.constructions.plotting": {"walltime": 28},
+  "doc.en.prep.Advanced-2DPlotting": {"walltime": 13},
+  "doc.en.thematic_tutorials.geometry.polyhedra_tutorial": {"walltime": 12},
+  "doc.en.thematic_tutorials.sandpile": {"walltime": 15},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_advanced": {"walltime": 31},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_cartesian": {"walltime": 36},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_change": {"walltime": 28},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_curvilinear": {"walltime": 35},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_plane": {"walltime": 18},
+  "sage.algebras.commutative_dga": {"walltime": 13},
+  "sage.algebras.lie_algebras.classical_lie_algebra": {"walltime": 121},
+  "sage.algebras.lie_algebras.nilpotent_lie_algebra": {"walltime": 13},
+  "sage.algebras.quantum_clifford": {"walltime": 13},
+  "sage.algebras.quatalg.quaternion_algebra": {"walltime": 10},
+  "sage.algebras.steenrod.steenrod_algebra": {"walltime": 51},
+  "sage.arith.misc": {"walltime": 24},
+  "sage.calculus.calculus": {"walltime": 16},
+  "sage.calculus.functional": {"walltime": 12},
+  "sage.calculus.riemann": {"walltime": 49},
+  "sage.calculus.tests": {"walltime": 15},
+  "sage.calculus.transforms.dwt": {"walltime": 25},
+  "sage.categories.finite_monoids": {"walltime": 13},
+  "sage.categories.super_hopf_algebras_with_basis": {"walltime": 27},
+  "sage.coding.ag_code": {"walltime": 48},
+  "sage.coding.ag_code_decoders": {"walltime": 187},
+  "sage.coding.linear_code": {"walltime": 19},
+  "sage.combinat.backtrack": {"walltime": 30},
+  "sage.combinat.chas.wqsym": {"walltime": 42},
+  "sage.combinat.cluster_algebra_quiver.cluster_seed": {"walltime": 60},
+  "sage.combinat.cluster_algebra_quiver.quiver": {"walltime": 169},
+  "sage.combinat.crystals.affine_factorization": {"walltime": 13},
+  "sage.combinat.crystals.alcove_path": {"walltime": 37},
+  "sage.combinat.crystals.kirillov_reshetikhin": {"walltime": 16},
+  "sage.combinat.crystals.littelmann_path": {"walltime": 13},
+  "sage.combinat.crystals.mv_polytopes": {"walltime": 20},
+  "sage.combinat.crystals.pbw_crystal": {"walltime": 21},
+  "sage.combinat.designs.database": {"walltime": 21},
+  "sage.combinat.designs.gen_quadrangles_with_spread": {"walltime": 114},
+  "sage.combinat.designs.orthogonal_arrays_build_recursive": {"walltime": 12},
+  "sage.combinat.diagram_algebras": {"walltime": 49},
+  "sage.combinat.fqsym": {"walltime": 22},
+  "sage.combinat.k_tableau": {"walltime": 14},
+  "sage.combinat.ncsf_qsym.ncsf": {"walltime": 14},
+  "sage.combinat.ncsf_qsym.qsym": {"walltime": 12},
+  "sage.combinat.partition": {"walltime": 11},
+  "sage.combinat.partition_kleshchev": {"walltime": 19},
+  "sage.combinat.posets.moebius_algebra": {"walltime": 12},
+  "sage.combinat.rigged_configurations.kr_tableaux": {"walltime": 28},
+  "sage.combinat.rigged_configurations.rigged_configurations": {"walltime": 13},
+  "sage.combinat.rigged_configurations.tensor_product_kr_tableaux": {"walltime": 15},
+  "sage.combinat.root_system.integrable_representations": {"walltime": 12},
+  "sage.combinat.root_system.non_symmetric_macdonald_polynomials": {"walltime": 21},
+  "sage.combinat.root_system.plot": {"walltime": 37},
+  "sage.combinat.root_system.root_lattice_realization_algebras": {"walltime": 17},
+  "sage.combinat.root_system.root_lattice_realizations": {"walltime": 24},
+  "sage.combinat.rsk": {"walltime": 36},
+  "sage.combinat.sf.classical": {"walltime": 11},
+  "sage.combinat.sf.k_dual": {"walltime": 13},
+  "sage.combinat.sf.llt": {"walltime": 13},
+  "sage.combinat.sf.macdonald": {"walltime": 58},
+  "sage.combinat.sf.sfa": {"walltime": 25},
+  "sage.combinat.shifted_primed_tableau": {"walltime": 14},
+  "sage.combinat.symmetric_group_algebra": {"walltime": 11},
+  "sage.combinat.tableau": {"walltime": 20},
+  "sage.combinat.tableau_tuple": {"walltime": 29},
+  "sage.combinat.tiling": {"walltime": 305},
+  "sage.combinat.tutorial": {"walltime": 13},
+  "sage.combinat.words.paths": {"walltime": 85},
+  "sage.crypto.block_cipher.des": {"walltime": 21},
+  "sage.crypto.mq.sr": {"walltime": 53},
+  "sage.crypto.sbox": {"walltime": 14},
+  "sage.doctest.forker": {"walltime": 14},
+  "sage.doctest.sources": {"walltime": 93},
+  "sage.doctest.test": {"walltime": 149},
+  "sage.dynamics.arithmetic_dynamics.projective_ds": {"walltime": 48},
+  "sage.dynamics.complex_dynamics.mandel_julia": {"walltime": 16},
+  "sage.functions.bessel": {"walltime": 14},
+  "sage.functions.exp_integral": {"walltime": 12},
+  "sage.functions.other": {"walltime": 15},
+  "sage.geometry.cone": {"walltime": 24},
+  "sage.geometry.hyperplane_arrangement.arrangement": {"walltime": 14},
+  "sage.geometry.lattice_polytope": {"walltime": 12},
+  "sage.geometry.polyhedral_complex": {"walltime": 11},
+  "sage.geometry.polyhedron.base": {"walltime": 33},
+  "sage.geometry.polyhedron.library": {"walltime": 41},
+  "sage.geometry.riemannian_manifolds.parametrized_surface3d": {"walltime": 22},
+  "sage.geometry.triangulation.base": {"walltime": 22},
+  "sage.geometry.triangulation.point_configuration": {"walltime": 14},
+  "sage.graphs.connectivity": {"walltime": 17},
+  "sage.graphs.generators.basic": {"walltime": 10},
+  "sage.graphs.generators.classical_geometries": {"walltime": 30},
+  "sage.graphs.generators.distance_regular": {"walltime": 196},
+  "sage.graphs.generators.families": {"walltime": 21},
+  "sage.graphs.generators.smallgraphs": {"walltime": 22},
+  "sage.graphs.generic_graph": {"walltime": 29},
+  "sage.graphs.genus": {"walltime": 12},
+  "sage.graphs.graph": {"walltime": 20},
+  "sage.graphs.strongly_regular_db": {"walltime": 22},
+  "sage.groups.cubic_braid": {"walltime": 19},
+  "sage.groups.fqf_orthogonal": {"walltime": 19},
+  "sage.groups.lie_gps.nilpotent_lie_group": {"walltime": 10},
+  "sage.groups.matrix_gps.heisenberg": {"walltime": 41},
+  "sage.groups.perm_gps.cubegroup": {"walltime": 11},
+  "sage.homology.homology_vector_space_with_basis": {"walltime": 10},
+  "sage.interacts.test_jupyter": {"walltime": 17},
+  "sage.interfaces.gap": {"walltime": 11},
+  "sage.interfaces.maxima_abstract": {"walltime": 46},
+  "sage.libs.eclib.interface": {"walltime": 22},
+  "sage.libs.eclib.mwrank": {"walltime": 16},
+  "sage.libs.gap.test_long": {"walltime": 43},
+  "sage.libs.giac": {"walltime": 42},
+  "sage.manifolds.chart": {"walltime": 34},
+  "sage.manifolds.differentiable.affine_connection": {"walltime": 138},
+  "sage.manifolds.differentiable.automorphismfield": {"walltime": 33},
+  "sage.manifolds.differentiable.characteristic_cohomology_class": {"walltime": 260},
+  "sage.manifolds.differentiable.curve": {"walltime": 18},
+  "sage.manifolds.differentiable.degenerate": {"walltime": 27},
+  "sage.manifolds.differentiable.degenerate_submanifold": {"walltime": 239},
+  "sage.manifolds.differentiable.diff_form": {"walltime": 48},
+  "sage.manifolds.differentiable.diff_map": {"walltime": 10},
+  "sage.manifolds.differentiable.examples.euclidean": {"walltime": 48},
+  "sage.manifolds.differentiable.examples.sphere": {"walltime": 33},
+  "sage.manifolds.differentiable.integrated_curve": {"walltime": 29},
+  "sage.manifolds.differentiable.levi_civita_connection": {"walltime": 27},
+  "sage.manifolds.differentiable.manifold": {"walltime": 12},
+  "sage.manifolds.differentiable.manifold_homset": {"walltime": 16},
+  "sage.manifolds.differentiable.metric": {"walltime": 95},
+  "sage.manifolds.differentiable.mixed_form": {"walltime": 14},
+  "sage.manifolds.differentiable.mixed_form_algebra": {"walltime": 11},
+  "sage.manifolds.differentiable.multivectorfield": {"walltime": 71},
+  "sage.manifolds.differentiable.pseudo_riemannian": {"walltime": 20},
+  "sage.manifolds.differentiable.pseudo_riemannian_submanifold": {"walltime": 127},
+  "sage.manifolds.differentiable.scalarfield": {"walltime": 19},
+  "sage.manifolds.differentiable.tangent_vector": {"walltime": 17},
+  "sage.manifolds.differentiable.tensorfield": {"walltime": 128},
+  "sage.manifolds.differentiable.tensorfield_paral": {"walltime": 15},
+  "sage.manifolds.differentiable.vector_bundle": {"walltime": 13},
+  "sage.manifolds.differentiable.vectorfield": {"walltime": 53},
+  "sage.manifolds.point": {"walltime": 21},
+  "sage.manifolds.scalarfield": {"walltime": 15},
+  "sage.manifolds.section": {"walltime": 28},
+  "sage.matrix.matrix2": {"walltime": 18},
+  "sage.matrix.matrix_integer_dense": {"walltime": 15},
+  "sage.matrix.matrix_integer_dense_hnf": {"walltime": 35},
+  "sage.matroids.catalog": {"walltime": 59},
+  "sage.misc.cachefunc": {"walltime": 13},
+  "sage.misc.functional": {"walltime": 10},
+  "sage.misc.randstate": {"walltime": 16},
+  "sage.misc.sagedoc": {"walltime": 56},
+  "sage.misc.sageinspect": {"walltime": 38},
+  "sage.modular.abvar.abvar": {"walltime": 12},
+  "sage.modular.abvar.lseries": {"walltime": 10},
+  "sage.modular.btquotients.pautomorphicform": {"walltime": 31},
+  "sage.modular.hypergeometric_motive": {"walltime": 12},
+  "sage.modular.local_comp.local_comp": {"walltime": 27},
+  "sage.modular.local_comp.type_space": {"walltime": 24},
+  "sage.modular.modform.ambient_R": {"walltime": 11},
+  "sage.modular.modform.cuspidal_submodule": {"walltime": 15},
+  "sage.modular.modform.element": {"walltime": 60},
+  "sage.modular.modform.ring": {"walltime": 50},
+  "sage.modular.modform_hecketriangle.abstract_space": {"walltime": 12},
+  "sage.modular.modform_hecketriangle.graded_ring_element": {"walltime": 23},
+  "sage.modular.modform_hecketriangle.hecke_triangle_group_element": {"walltime": 26},
+  "sage.modular.modform_hecketriangle.readme": {"walltime": 19},
+  "sage.modular.modsym.ambient": {"walltime": 15},
+  "sage.modular.pollack_stevens.modsym": {"walltime": 63},
+  "sage.modular.pollack_stevens.padic_lseries": {"walltime": 36},
+  "sage.modules.finite_submodule_iter": {"walltime": 22},
+  "sage.modules.free_module": {"walltime": 22},
+  "sage.modules.free_module_integer": {"walltime": 28},
+  "sage.modules.torsion_quadratic_module": {"walltime": 22},
+  "sage.plot.animate": {"walltime": 129},
+  "sage.plot.contour_plot": {"walltime": 38},
+  "sage.plot.graphics": {"walltime": 43},
+  "sage.plot.line": {"walltime": 12},
+  "sage.plot.matrix_plot": {"walltime": 15},
+  "sage.plot.multigraphics": {"walltime": 26},
+  "sage.plot.plot": {"walltime": 77},
+  "sage.plot.plot3d.base": {"walltime": 12},
+  "sage.plot.plot3d.implicit_plot3d": {"walltime": 20},
+  "sage.plot.plot3d.parametric_plot3d": {"walltime": 11},
+  "sage.plot.plot3d.plot3d": {"walltime": 18},
+  "sage.plot.plot3d.transform": {"walltime": 34},
+  "sage.quadratic_forms.genera.genus": {"walltime": 19},
+  "sage.quadratic_forms.quadratic_form__local_representation_conditions": {"walltime": 48},
+  "sage.rings.asymptotic.asymptotic_expansion_generators": {"walltime": 61},
+  "sage.rings.asymptotic.asymptotics_multivariate_generating_functions": {"walltime": 36},
+  "sage.rings.function_field.function_field": {"walltime": 225},
+  "sage.rings.function_field.function_field_valuation": {"walltime": 47},
+  "sage.rings.function_field.ideal": {"walltime": 10},
+  "sage.rings.integer": {"walltime": 164},
+  "sage.rings.number_field.number_field": {"walltime": 79},
+  "sage.rings.number_field.number_field_element": {"walltime": 13},
+  "sage.rings.number_field.totallyreal": {"walltime": 14},
+  "sage.rings.padics.padic_base_leaves": {"walltime": 76},
+  "sage.rings.padics.padic_extension_leaves": {"walltime": 46},
+  "sage.rings.padics.padic_generic_element": {"walltime": 14},
+  "sage.rings.padics.padic_lattice_element": {"walltime": 25},
+  "sage.rings.padics.relative_extension_leaves": {"walltime": 42},
+  "sage.rings.polynomial.multi_polynomial_ideal": {"walltime": 11},
+  "sage.rings.polynomial.multi_polynomial_sequence": {"walltime": 28},
+  "sage.rings.polynomial.polynomial_element": {"walltime": 16},
+  "sage.rings.polynomial.polynomial_zmod_flint": {"walltime": 336},
+  "sage.rings.qqbar": {"walltime": 21},
+  "sage.rings.tests": {"walltime": 19},
+  "sage.rings.valuation.augmented_valuation": {"walltime": 28},
+  "sage.rings.valuation.mapped_valuation": {"walltime": 56},
+  "sage.schemes.curves.affine_curve": {"walltime": 23},
+  "sage.schemes.curves.projective_curve": {"walltime": 24},
+  "sage.schemes.cyclic_covers.cycliccover_finite_field": {"walltime": 78},
+  "sage.schemes.elliptic_curves.BSD": {"walltime": 10},
+  "sage.schemes.elliptic_curves.constructor": {"walltime": 27},
+  "sage.schemes.elliptic_curves.ell_curve_isogeny": {"walltime": 21},
+  "sage.schemes.elliptic_curves.ell_egros": {"walltime": 28},
+  "sage.schemes.elliptic_curves.ell_modular_symbols": {"walltime": 12},
+  "sage.schemes.elliptic_curves.ell_number_field": {"walltime": 120},
+  "sage.schemes.elliptic_curves.ell_rational_field": {"walltime": 133},
+  "sage.schemes.elliptic_curves.gal_reps_number_field": {"walltime": 35},
+  "sage.schemes.elliptic_curves.gp_simon": {"walltime": 22},
+  "sage.schemes.elliptic_curves.heegner": {"walltime": 39},
+  "sage.schemes.elliptic_curves.height": {"walltime": 56},
+  "sage.schemes.elliptic_curves.isogeny_class": {"walltime": 38},
+  "sage.schemes.elliptic_curves.isogeny_small_degree": {"walltime": 274},
+  "sage.schemes.elliptic_curves.kraus": {"walltime": 12},
+  "sage.schemes.elliptic_curves.mod_sym_num": {"walltime": 12},
+  "sage.schemes.elliptic_curves.padics": {"walltime": 15},
+  "sage.schemes.elliptic_curves.saturation": {"walltime": 19},
+  "sage.schemes.elliptic_curves.sha_tate": {"walltime": 23},
+  "sage.schemes.hyperelliptic_curves.hyperelliptic_finite_field": {"walltime": 65},
+  "sage.schemes.hyperelliptic_curves.hyperelliptic_padic_field": {"walltime": 25},
+  "sage.schemes.projective.projective_rational_point": {"walltime": 11},
+  "sage.schemes.riemann_surfaces.riemann_surface": {"walltime": 53},
+  "sage.stats.distributions.discrete_gaussian_integer": {"walltime": 10},
+  "sage.structure.coerce_dict": {"walltime": 33},
+  "sage.structure.element": {"walltime": 16},
+  "sage.symbolic.expression": {"walltime": 38},
+  "sage.symbolic.integration.integral": {"walltime": 35},
+  "sage.symbolic.random_tests": {"walltime": 31},
+  "sage.symbolic.relation": {"walltime": 11},
+  "sage.tests.book_schilling_zabrocki_kschur_primer": {"walltime": 36},
+  "sage.tests.book_stein_ent": {"walltime": 15},
+  "sage.tests.books.computational-mathematics-with-sagemath.combinat_doctest": {"walltime": 40},
+  "sage.tests.books.computational-mathematics-with-sagemath.float_doctest": {"walltime": 17},
+  "sage.tests.books.computational-mathematics-with-sagemath.graphique_doctest": {"walltime": 29},
+  "sage.tests.books.computational-mathematics-with-sagemath.integration_doctest": {"walltime": 28},
+  "sage.tests.books.computational-mathematics-with-sagemath.nonlinear_doctest": {"walltime": 11},
+  "sage.tests.books.computational-mathematics-with-sagemath.sol.graphique_doctest": {"walltime": 17},
+  "sage.tests.books.computational-mathematics-with-sagemath.sol.numbertheory_doctest": {"walltime": 14},
+  "sage.tests.books.computational-mathematics-with-sagemath.sol.polynomes_doctest": {"walltime": 19},
+  "sage.tests.cmdline": {"walltime": 44},
+  "sage.tests.gosper-sum": {"walltime": 11},
+  "sage.topology.simplicial_complex_examples": {"walltime": 14}
+}
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index b9bd590b61ca..8f27de532058 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -206,22 +206,23 @@ do_install() {
 
 do_check() {
 	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
-		_test_args=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+		_test_files=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	else
+		_test_files=--all
 	fi
-	if [ -z "$_test_args" ]; then
-		_test_args=--all
+	cp ${FILESDIR}/timings2.json .
+	_test_args="--stats_path=timings2.json"
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args+=" --long --warn-long 20.0"
+	else
+		_test_args+=" --warn-long 10.0"
 	fi
 	if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
 		# for CI use a predictable random seed
-		_test_args="--random-seed=0 $_test_args"
-	fi
-	if [ "$XBPS_CHECK_PKGS" = full ]; then
-		_test_args="--long $_test_args"
-	else
-		_test_args="--warn-long 5.0 $_test_args"
+		_test_args+=" --random-seed=0"
 	fi
 	# since make check will build the docs, run test like this instead
-	./sage -tp ${XBPS_MAKEJOBS} ${_test_args}
+	./sage -tp ${XBPS_MAKEJOBS} ${_test_args} ${_test_files}
 }
 
 ### copied from sage-deps, to be kept in sync

From 2803e289b79751cb007be089e1359b2d2a5f1418 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 02:54:00 -0300
Subject: [PATCH 50/67] changed_templates: do not merge with master

---
 common/travis/changed_templates.sh | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/common/travis/changed_templates.sh b/common/travis/changed_templates.sh
index 686436ce4327..5501b968cf1e 100755
--- a/common/travis/changed_templates.sh
+++ b/common/travis/changed_templates.sh
@@ -20,6 +20,9 @@ base="$($GIT_CMD merge-base FETCH_HEAD "$tip")" || {
 	exit 1
 }
 
+# tip = commit of the PR; this avoids merging to master
+$GIT_CMD checkout "$tip"
+
 echo "$base $tip" >/tmp/revisions
 
 /bin/echo -e '\x1b[32mChanged packages:\x1b[0m'

From e5d08e5712fa8141b3886744308a856969612021 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 10:26:57 -0300
Subject: [PATCH 51/67] sagemath: round timings to power of 2 for stability

---
 srcpkgs/sagemath/files/timings2.json | 629 ++++++++++++++++-----------
 1 file changed, 386 insertions(+), 243 deletions(-)

diff --git a/srcpkgs/sagemath/files/timings2.json b/srcpkgs/sagemath/files/timings2.json
index 958a56d9d6f5..71a9aa84ce58 100644
--- a/srcpkgs/sagemath/files/timings2.json
+++ b/srcpkgs/sagemath/files/timings2.json
@@ -1,255 +1,398 @@
 {
+  "doc.ca.intro.index": {"walltime": 8},
   "doc.en.constructions.calculus": {"walltime": 64},
-  "doc.en.constructions.plotting": {"walltime": 28},
-  "doc.en.prep.Advanced-2DPlotting": {"walltime": 13},
-  "doc.en.thematic_tutorials.geometry.polyhedra_tutorial": {"walltime": 12},
-  "doc.en.thematic_tutorials.sandpile": {"walltime": 15},
-  "doc.en.thematic_tutorials.vector_calculus.vector_calc_advanced": {"walltime": 31},
-  "doc.en.thematic_tutorials.vector_calculus.vector_calc_cartesian": {"walltime": 36},
-  "doc.en.thematic_tutorials.vector_calculus.vector_calc_change": {"walltime": 28},
-  "doc.en.thematic_tutorials.vector_calculus.vector_calc_curvilinear": {"walltime": 35},
-  "doc.en.thematic_tutorials.vector_calculus.vector_calc_plane": {"walltime": 18},
-  "sage.algebras.commutative_dga": {"walltime": 13},
-  "sage.algebras.lie_algebras.classical_lie_algebra": {"walltime": 121},
-  "sage.algebras.lie_algebras.nilpotent_lie_algebra": {"walltime": 13},
-  "sage.algebras.quantum_clifford": {"walltime": 13},
-  "sage.algebras.quatalg.quaternion_algebra": {"walltime": 10},
-  "sage.algebras.steenrod.steenrod_algebra": {"walltime": 51},
-  "sage.arith.misc": {"walltime": 24},
+  "doc.en.constructions.plotting": {"walltime": 32},
+  "doc.en.prep.Advanced-2DPlotting": {"walltime": 16},
+  "doc.en.prep.Calculus": {"walltime": 8},
+  "doc.en.prep.Symbolics-and-Basic-Plotting": {"walltime": 8},
+  "doc.en.thematic_tutorials.explicit_methods_in_number_theory.birds_other": {"walltime": 8},
+  "doc.en.thematic_tutorials.explicit_methods_in_number_theory.elliptic_curves": {"walltime": 8},
+  "doc.en.thematic_tutorials.geometry.polyhedra_tutorial": {"walltime": 16},
+  "doc.en.thematic_tutorials.sandpile": {"walltime": 16},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_advanced": {"walltime": 32},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_cartesian": {"walltime": 32},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_change": {"walltime": 32},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_curvilinear": {"walltime": 32},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_plane": {"walltime": 16},
+  "doc.ja.tutorial.tour_plotting": {"walltime": 8},
+  "sage.algebras.cluster_algebra": {"walltime": 8},
+  "sage.algebras.commutative_dga": {"walltime": 16},
+  "sage.algebras.hecke_algebras.ariki_koike_algebra": {"walltime": 8},
+  "sage.algebras.iwahori_hecke_algebra": {"walltime": 8},
+  "sage.algebras.lie_algebras.classical_lie_algebra": {"walltime": 128},
+  "sage.algebras.lie_algebras.nilpotent_lie_algebra": {"walltime": 16},
+  "sage.algebras.quantum_clifford": {"walltime": 16},
+  "sage.algebras.quantum_groups.fock_space": {"walltime": 8},
+  "sage.algebras.quatalg.quaternion_algebra": {"walltime": 8},
+  "sage.algebras.steenrod.steenrod_algebra": {"walltime": 64},
+  "sage.algebras.steenrod.steenrod_algebra_bases": {"walltime": 8},
+  "sage.algebras.yangian": {"walltime": 8},
+  "sage.arith.misc": {"walltime": 32},
   "sage.calculus.calculus": {"walltime": 16},
-  "sage.calculus.functional": {"walltime": 12},
-  "sage.calculus.riemann": {"walltime": 49},
-  "sage.calculus.tests": {"walltime": 15},
-  "sage.calculus.transforms.dwt": {"walltime": 25},
-  "sage.categories.finite_monoids": {"walltime": 13},
-  "sage.categories.super_hopf_algebras_with_basis": {"walltime": 27},
-  "sage.coding.ag_code": {"walltime": 48},
-  "sage.coding.ag_code_decoders": {"walltime": 187},
-  "sage.coding.linear_code": {"walltime": 19},
-  "sage.combinat.backtrack": {"walltime": 30},
-  "sage.combinat.chas.wqsym": {"walltime": 42},
-  "sage.combinat.cluster_algebra_quiver.cluster_seed": {"walltime": 60},
-  "sage.combinat.cluster_algebra_quiver.quiver": {"walltime": 169},
-  "sage.combinat.crystals.affine_factorization": {"walltime": 13},
-  "sage.combinat.crystals.alcove_path": {"walltime": 37},
+  "sage.calculus.desolvers": {"walltime": 8},
+  "sage.calculus.functional": {"walltime": 8},
+  "sage.calculus.riemann": {"walltime": 64},
+  "sage.calculus.tests": {"walltime": 16},
+  "sage.calculus.transforms.dwt": {"walltime": 16},
+  "sage.calculus.transforms.fft": {"walltime": 8},
+  "sage.categories.coxeter_groups": {"walltime": 8},
+  "sage.categories.finite_monoids": {"walltime": 16},
+  "sage.categories.lie_conformal_algebras": {"walltime": 8},
+  "sage.categories.loop_crystals": {"walltime": 8},
+  "sage.categories.pushout": {"walltime": 8},
+  "sage.categories.super_hopf_algebras_with_basis": {"walltime": 32},
+  "sage.categories.super_lie_conformal_algebras": {"walltime": 8},
+  "sage.coding.ag_code": {"walltime": 64},
+  "sage.coding.ag_code_decoders": {"walltime": 128},
+  "sage.coding.binary_code": {"walltime": 8},
+  "sage.coding.linear_code": {"walltime": 16},
+  "sage.combinat.backtrack": {"walltime": 32},
+  "sage.combinat.chas.wqsym": {"walltime": 32},
+  "sage.combinat.cluster_algebra_quiver.cluster_seed": {"walltime": 64},
+  "sage.combinat.cluster_algebra_quiver.quiver": {"walltime": 128},
+  "sage.combinat.crystals.affine_factorization": {"walltime": 16},
+  "sage.combinat.crystals.alcove_path": {"walltime": 32},
+  "sage.combinat.crystals.highest_weight_crystals": {"walltime": 8},
   "sage.combinat.crystals.kirillov_reshetikhin": {"walltime": 16},
-  "sage.combinat.crystals.littelmann_path": {"walltime": 13},
-  "sage.combinat.crystals.mv_polytopes": {"walltime": 20},
-  "sage.combinat.crystals.pbw_crystal": {"walltime": 21},
-  "sage.combinat.designs.database": {"walltime": 21},
-  "sage.combinat.designs.gen_quadrangles_with_spread": {"walltime": 114},
-  "sage.combinat.designs.orthogonal_arrays_build_recursive": {"walltime": 12},
-  "sage.combinat.diagram_algebras": {"walltime": 49},
-  "sage.combinat.fqsym": {"walltime": 22},
-  "sage.combinat.k_tableau": {"walltime": 14},
-  "sage.combinat.ncsf_qsym.ncsf": {"walltime": 14},
-  "sage.combinat.ncsf_qsym.qsym": {"walltime": 12},
-  "sage.combinat.partition": {"walltime": 11},
-  "sage.combinat.partition_kleshchev": {"walltime": 19},
-  "sage.combinat.posets.moebius_algebra": {"walltime": 12},
-  "sage.combinat.rigged_configurations.kr_tableaux": {"walltime": 28},
-  "sage.combinat.rigged_configurations.rigged_configurations": {"walltime": 13},
-  "sage.combinat.rigged_configurations.tensor_product_kr_tableaux": {"walltime": 15},
-  "sage.combinat.root_system.integrable_representations": {"walltime": 12},
-  "sage.combinat.root_system.non_symmetric_macdonald_polynomials": {"walltime": 21},
-  "sage.combinat.root_system.plot": {"walltime": 37},
-  "sage.combinat.root_system.root_lattice_realization_algebras": {"walltime": 17},
-  "sage.combinat.root_system.root_lattice_realizations": {"walltime": 24},
-  "sage.combinat.rsk": {"walltime": 36},
-  "sage.combinat.sf.classical": {"walltime": 11},
-  "sage.combinat.sf.k_dual": {"walltime": 13},
-  "sage.combinat.sf.llt": {"walltime": 13},
-  "sage.combinat.sf.macdonald": {"walltime": 58},
-  "sage.combinat.sf.sfa": {"walltime": 25},
-  "sage.combinat.shifted_primed_tableau": {"walltime": 14},
-  "sage.combinat.symmetric_group_algebra": {"walltime": 11},
-  "sage.combinat.tableau": {"walltime": 20},
-  "sage.combinat.tableau_tuple": {"walltime": 29},
-  "sage.combinat.tiling": {"walltime": 305},
-  "sage.combinat.tutorial": {"walltime": 13},
-  "sage.combinat.words.paths": {"walltime": 85},
-  "sage.crypto.block_cipher.des": {"walltime": 21},
-  "sage.crypto.mq.sr": {"walltime": 53},
-  "sage.crypto.sbox": {"walltime": 14},
-  "sage.doctest.forker": {"walltime": 14},
-  "sage.doctest.sources": {"walltime": 93},
-  "sage.doctest.test": {"walltime": 149},
-  "sage.dynamics.arithmetic_dynamics.projective_ds": {"walltime": 48},
+  "sage.combinat.crystals.letters": {"walltime": 8},
+  "sage.combinat.crystals.littelmann_path": {"walltime": 16},
+  "sage.combinat.crystals.mv_polytopes": {"walltime": 16},
+  "sage.combinat.crystals.pbw_crystal": {"walltime": 16},
+  "sage.combinat.crystals.star_crystal": {"walltime": 8},
+  "sage.combinat.designs.bibd": {"walltime": 8},
+  "sage.combinat.designs.database": {"walltime": 16},
+  "sage.combinat.designs.difference_family": {"walltime": 8},
+  "sage.combinat.designs.gen_quadrangles_with_spread": {"walltime": 128},
+  "sage.combinat.designs.orthogonal_arrays_build_recursive": {"walltime": 16},
+  "sage.combinat.designs.orthogonal_arrays_find_recursive": {"walltime": 8},
+  "sage.combinat.diagram_algebras": {"walltime": 64},
+  "sage.combinat.fqsym": {"walltime": 32},
+  "sage.combinat.free_prelie_algebra": {"walltime": 8},
+  "sage.combinat.fully_commutative_elements": {"walltime": 8},
+  "sage.combinat.grossman_larson_algebras": {"walltime": 8},
+  "sage.combinat.interval_posets": {"walltime": 8},
+  "sage.combinat.k_regular_sequence": {"walltime": 8},
+  "sage.combinat.k_tableau": {"walltime": 16},
+  "sage.combinat.matrices.hadamard_matrix": {"walltime": 8},
+  "sage.combinat.multiset_partition_into_sets_ordered": {"walltime": 8},
+  "sage.combinat.ncsf_qsym.ncsf": {"walltime": 16},
+  "sage.combinat.ncsf_qsym.qsym": {"walltime": 16},
+  "sage.combinat.partition": {"walltime": 16},
+  "sage.combinat.partition_kleshchev": {"walltime": 16},
+  "sage.combinat.partition_tuple": {"walltime": 8},
+  "sage.combinat.posets.moebius_algebra": {"walltime": 16},
+  "sage.combinat.posets.posets": {"walltime": 8},
+  "sage.combinat.rigged_configurations.kr_tableaux": {"walltime": 32},
+  "sage.combinat.rigged_configurations.rigged_configurations": {"walltime": 16},
+  "sage.combinat.rigged_configurations.tensor_product_kr_tableaux": {"walltime": 16},
+  "sage.combinat.root_system.associahedron": {"walltime": 8},
+  "sage.combinat.root_system.branching_rules": {"walltime": 8},
+  "sage.combinat.root_system.fusion_ring": {"walltime": 8},
+  "sage.combinat.root_system.integrable_representations": {"walltime": 16},
+  "sage.combinat.root_system.non_symmetric_macdonald_polynomials": {"walltime": 16},
+  "sage.combinat.root_system.pieri_factors": {"walltime": 8},
+  "sage.combinat.root_system.plot": {"walltime": 32},
+  "sage.combinat.root_system.root_lattice_realization_algebras": {"walltime": 16},
+  "sage.combinat.root_system.root_lattice_realizations": {"walltime": 16},
+  "sage.combinat.root_system.root_system": {"walltime": 8},
+  "sage.combinat.root_system.weyl_group": {"walltime": 8},
+  "sage.combinat.rsk": {"walltime": 32},
+  "sage.combinat.sf.classical": {"walltime": 16},
+  "sage.combinat.sf.jack": {"walltime": 16},
+  "sage.combinat.sf.k_dual": {"walltime": 16},
+  "sage.combinat.sf.llt": {"walltime": 16},
+  "sage.combinat.sf.macdonald": {"walltime": 64},
+  "sage.combinat.sf.new_kschur": {"walltime": 8},
+  "sage.combinat.sf.sfa": {"walltime": 32},
+  "sage.combinat.shifted_primed_tableau": {"walltime": 16},
+  "sage.combinat.skew_tableau": {"walltime": 8},
+  "sage.combinat.symmetric_group_algebra": {"walltime": 16},
+  "sage.combinat.tableau": {"walltime": 32},
+  "sage.combinat.tableau_tuple": {"walltime": 32},
+  "sage.combinat.tiling": {"walltime": 256},
+  "sage.combinat.tutorial": {"walltime": 16},
+  "sage.combinat.words.paths": {"walltime": 64},
+  "sage.crypto.block_cipher.des": {"walltime": 16},
+  "sage.crypto.mq.sr": {"walltime": 64},
+  "sage.crypto.sbox": {"walltime": 16},
+  "sage.crypto.sboxes": {"walltime": 8},
+  "sage.doctest.forker": {"walltime": 16},
+  "sage.doctest.sources": {"walltime": 64},
+  "sage.doctest.test": {"walltime": 128},
+  "sage.dynamics.arithmetic_dynamics.projective_ds": {"walltime": 64},
+  "sage.dynamics.arithmetic_dynamics.wehlerK3": {"walltime": 8},
+  "sage.dynamics.cellular_automata.glca": {"walltime": 8},
+  "sage.dynamics.cellular_automata.solitons": {"walltime": 8},
   "sage.dynamics.complex_dynamics.mandel_julia": {"walltime": 16},
-  "sage.functions.bessel": {"walltime": 14},
-  "sage.functions.exp_integral": {"walltime": 12},
-  "sage.functions.other": {"walltime": 15},
-  "sage.geometry.cone": {"walltime": 24},
-  "sage.geometry.hyperplane_arrangement.arrangement": {"walltime": 14},
-  "sage.geometry.lattice_polytope": {"walltime": 12},
-  "sage.geometry.polyhedral_complex": {"walltime": 11},
-  "sage.geometry.polyhedron.base": {"walltime": 33},
-  "sage.geometry.polyhedron.library": {"walltime": 41},
-  "sage.geometry.riemannian_manifolds.parametrized_surface3d": {"walltime": 22},
-  "sage.geometry.triangulation.base": {"walltime": 22},
-  "sage.geometry.triangulation.point_configuration": {"walltime": 14},
-  "sage.graphs.connectivity": {"walltime": 17},
-  "sage.graphs.generators.basic": {"walltime": 10},
-  "sage.graphs.generators.classical_geometries": {"walltime": 30},
-  "sage.graphs.generators.distance_regular": {"walltime": 196},
-  "sage.graphs.generators.families": {"walltime": 21},
-  "sage.graphs.generators.smallgraphs": {"walltime": 22},
-  "sage.graphs.generic_graph": {"walltime": 29},
-  "sage.graphs.genus": {"walltime": 12},
-  "sage.graphs.graph": {"walltime": 20},
-  "sage.graphs.strongly_regular_db": {"walltime": 22},
-  "sage.groups.cubic_braid": {"walltime": 19},
-  "sage.groups.fqf_orthogonal": {"walltime": 19},
-  "sage.groups.lie_gps.nilpotent_lie_group": {"walltime": 10},
-  "sage.groups.matrix_gps.heisenberg": {"walltime": 41},
-  "sage.groups.perm_gps.cubegroup": {"walltime": 11},
-  "sage.homology.homology_vector_space_with_basis": {"walltime": 10},
-  "sage.interacts.test_jupyter": {"walltime": 17},
-  "sage.interfaces.gap": {"walltime": 11},
-  "sage.interfaces.maxima_abstract": {"walltime": 46},
-  "sage.libs.eclib.interface": {"walltime": 22},
+  "sage.functions.bessel": {"walltime": 16},
+  "sage.functions.exp_integral": {"walltime": 8},
+  "sage.functions.hypergeometric": {"walltime": 8},
+  "sage.functions.other": {"walltime": 16},
+  "sage.functions.piecewise": {"walltime": 8},
+  "sage.games.quantumino": {"walltime": 8},
+  "sage.geometry.cone": {"walltime": 32},
+  "sage.geometry.fan": {"walltime": 8},
+  "sage.geometry.hyperbolic_space.hyperbolic_geodesic": {"walltime": 8},
+  "sage.geometry.hyperplane_arrangement.arrangement": {"walltime": 16},
+  "sage.geometry.hyperplane_arrangement.library": {"walltime": 8},
+  "sage.geometry.hyperplane_arrangement.plot": {"walltime": 8},
+  "sage.geometry.lattice_polytope": {"walltime": 16},
+  "sage.geometry.polyhedral_complex": {"walltime": 8},
+  "sage.geometry.polyhedron.base": {"walltime": 32},
+  "sage.geometry.polyhedron.library": {"walltime": 32},
+  "sage.geometry.polyhedron.plot": {"walltime": 8},
+  "sage.geometry.riemannian_manifolds.parametrized_surface3d": {"walltime": 16},
+  "sage.geometry.triangulation.base": {"walltime": 32},
+  "sage.geometry.triangulation.point_configuration": {"walltime": 16},
+  "sage.graphs.chrompoly": {"walltime": 8},
+  "sage.graphs.connectivity": {"walltime": 16},
+  "sage.graphs.generators.basic": {"walltime": 16},
+  "sage.graphs.generators.classical_geometries": {"walltime": 32},
+  "sage.graphs.generators.distance_regular": {"walltime": 256},
+  "sage.graphs.generators.families": {"walltime": 32},
+  "sage.graphs.generators.smallgraphs": {"walltime": 16},
+  "sage.graphs.generic_graph": {"walltime": 32},
+  "sage.graphs.genus": {"walltime": 16},
+  "sage.graphs.graph": {"walltime": 16},
+  "sage.graphs.graph_generators": {"walltime": 8},
+  "sage.graphs.graph_list": {"walltime": 8},
+  "sage.graphs.graph_plot": {"walltime": 8},
+  "sage.graphs.strongly_regular_db": {"walltime": 16},
+  "sage.groups.cubic_braid": {"walltime": 16},
+  "sage.groups.fqf_orthogonal": {"walltime": 16},
+  "sage.groups.libgap_mixin": {"walltime": 8},
+  "sage.groups.libgap_morphism": {"walltime": 8},
+  "sage.groups.lie_gps.nilpotent_lie_group": {"walltime": 16},
+  "sage.groups.matrix_gps.finitely_generated": {"walltime": 8},
+  "sage.groups.matrix_gps.heisenberg": {"walltime": 32},
+  "sage.groups.matrix_gps.linear": {"walltime": 8},
+  "sage.groups.perm_gps.cubegroup": {"walltime": 16},
+  "sage.groups.perm_gps.partn_ref.refinement_graphs": {"walltime": 8},
+  "sage.groups.perm_gps.permgroup": {"walltime": 8},
+  "sage.groups.perm_gps.permgroup_named": {"walltime": 8},
+  "sage.homology.hochschild_complex": {"walltime": 8},
+  "sage.homology.homology_vector_space_with_basis": {"walltime": 8},
+  "sage.interacts.test_jupyter": {"walltime": 16},
+  "sage.interfaces.ecm": {"walltime": 8},
+  "sage.interfaces.expect": {"walltime": 8},
+  "sage.interfaces.gap": {"walltime": 16},
+  "sage.interfaces.maxima": {"walltime": 8},
+  "sage.interfaces.maxima_abstract": {"walltime": 64},
+  "sage.interfaces.psage": {"walltime": 8},
+  "sage.interfaces.sage0": {"walltime": 8},
+  "sage.lfunctions.zero_sums": {"walltime": 8},
+  "sage.libs.eclib.interface": {"walltime": 16},
   "sage.libs.eclib.mwrank": {"walltime": 16},
-  "sage.libs.gap.test_long": {"walltime": 43},
-  "sage.libs.giac": {"walltime": 42},
-  "sage.manifolds.chart": {"walltime": 34},
-  "sage.manifolds.differentiable.affine_connection": {"walltime": 138},
-  "sage.manifolds.differentiable.automorphismfield": {"walltime": 33},
-  "sage.manifolds.differentiable.characteristic_cohomology_class": {"walltime": 260},
-  "sage.manifolds.differentiable.curve": {"walltime": 18},
-  "sage.manifolds.differentiable.degenerate": {"walltime": 27},
-  "sage.manifolds.differentiable.degenerate_submanifold": {"walltime": 239},
-  "sage.manifolds.differentiable.diff_form": {"walltime": 48},
-  "sage.manifolds.differentiable.diff_map": {"walltime": 10},
-  "sage.manifolds.differentiable.examples.euclidean": {"walltime": 48},
-  "sage.manifolds.differentiable.examples.sphere": {"walltime": 33},
-  "sage.manifolds.differentiable.integrated_curve": {"walltime": 29},
-  "sage.manifolds.differentiable.levi_civita_connection": {"walltime": 27},
-  "sage.manifolds.differentiable.manifold": {"walltime": 12},
+  "sage.libs.gap.test_long": {"walltime": 32},
+  "sage.libs.giac": {"walltime": 32},
+  "sage.manifolds.catalog": {"walltime": 8},
+  "sage.manifolds.chart": {"walltime": 32},
+  "sage.manifolds.chart_func": {"walltime": 8},
+  "sage.manifolds.continuous_map": {"walltime": 8},
+  "sage.manifolds.differentiable.affine_connection": {"walltime": 128},
+  "sage.manifolds.differentiable.automorphismfield": {"walltime": 32},
+  "sage.manifolds.differentiable.automorphismfield_group": {"walltime": 8},
+  "sage.manifolds.differentiable.bundle_connection": {"walltime": 8},
+  "sage.manifolds.differentiable.characteristic_cohomology_class": {"walltime": 256},
+  "sage.manifolds.differentiable.curve": {"walltime": 16},
+  "sage.manifolds.differentiable.degenerate": {"walltime": 32},
+  "sage.manifolds.differentiable.degenerate_submanifold": {"walltime": 256},
+  "sage.manifolds.differentiable.diff_form": {"walltime": 64},
+  "sage.manifolds.differentiable.diff_map": {"walltime": 8},
+  "sage.manifolds.differentiable.examples.euclidean": {"walltime": 32},
+  "sage.manifolds.differentiable.examples.sphere": {"walltime": 32},
+  "sage.manifolds.differentiable.integrated_curve": {"walltime": 32},
+  "sage.manifolds.differentiable.levi_civita_connection": {"walltime": 32},
+  "sage.manifolds.differentiable.manifold": {"walltime": 16},
   "sage.manifolds.differentiable.manifold_homset": {"walltime": 16},
-  "sage.manifolds.differentiable.metric": {"walltime": 95},
-  "sage.manifolds.differentiable.mixed_form": {"walltime": 14},
-  "sage.manifolds.differentiable.mixed_form_algebra": {"walltime": 11},
-  "sage.manifolds.differentiable.multivectorfield": {"walltime": 71},
-  "sage.manifolds.differentiable.pseudo_riemannian": {"walltime": 20},
-  "sage.manifolds.differentiable.pseudo_riemannian_submanifold": {"walltime": 127},
-  "sage.manifolds.differentiable.scalarfield": {"walltime": 19},
-  "sage.manifolds.differentiable.tangent_vector": {"walltime": 17},
+  "sage.manifolds.differentiable.metric": {"walltime": 64},
+  "sage.manifolds.differentiable.mixed_form": {"walltime": 16},
+  "sage.manifolds.differentiable.mixed_form_algebra": {"walltime": 8},
+  "sage.manifolds.differentiable.multivectorfield": {"walltime": 64},
+  "sage.manifolds.differentiable.pseudo_riemannian": {"walltime": 16},
+  "sage.manifolds.differentiable.pseudo_riemannian_submanifold": {"walltime": 128},
+  "sage.manifolds.differentiable.scalarfield": {"walltime": 16},
+  "sage.manifolds.differentiable.scalarfield_algebra": {"walltime": 8},
+  "sage.manifolds.differentiable.tangent_vector": {"walltime": 16},
   "sage.manifolds.differentiable.tensorfield": {"walltime": 128},
-  "sage.manifolds.differentiable.tensorfield_paral": {"walltime": 15},
-  "sage.manifolds.differentiable.vector_bundle": {"walltime": 13},
-  "sage.manifolds.differentiable.vectorfield": {"walltime": 53},
-  "sage.manifolds.point": {"walltime": 21},
-  "sage.manifolds.scalarfield": {"walltime": 15},
-  "sage.manifolds.section": {"walltime": 28},
-  "sage.matrix.matrix2": {"walltime": 18},
-  "sage.matrix.matrix_integer_dense": {"walltime": 15},
-  "sage.matrix.matrix_integer_dense_hnf": {"walltime": 35},
-  "sage.matroids.catalog": {"walltime": 59},
-  "sage.misc.cachefunc": {"walltime": 13},
-  "sage.misc.functional": {"walltime": 10},
+  "sage.manifolds.differentiable.tensorfield_paral": {"walltime": 16},
+  "sage.manifolds.differentiable.vector_bundle": {"walltime": 16},
+  "sage.manifolds.differentiable.vectorfield": {"walltime": 64},
+  "sage.manifolds.differentiable.vectorframe": {"walltime": 8},
+  "sage.manifolds.point": {"walltime": 16},
+  "sage.manifolds.scalarfield": {"walltime": 16},
+  "sage.manifolds.scalarfield_algebra": {"walltime": 8},
+  "sage.manifolds.section": {"walltime": 32},
+  "sage.manifolds.trivialization": {"walltime": 8},
+  "sage.manifolds.vector_bundle": {"walltime": 8},
+  "sage.matrix.benchmark": {"walltime": 8},
+  "sage.matrix.matrix2": {"walltime": 16},
+  "sage.matrix.matrix_integer_dense": {"walltime": 16},
+  "sage.matrix.matrix_integer_dense_hnf": {"walltime": 32},
+  "sage.matrix.matrix_mod2_dense": {"walltime": 8},
+  "sage.matrix.matrix_rational_dense": {"walltime": 8},
+  "sage.matrix.special": {"walltime": 8},
+  "sage.matroids.catalog": {"walltime": 64},
+  "sage.misc.cachefunc": {"walltime": 16},
+  "sage.misc.cython": {"walltime": 8},
+  "sage.misc.functional": {"walltime": 8},
   "sage.misc.randstate": {"walltime": 16},
-  "sage.misc.sagedoc": {"walltime": 56},
-  "sage.misc.sageinspect": {"walltime": 38},
-  "sage.modular.abvar.abvar": {"walltime": 12},
-  "sage.modular.abvar.lseries": {"walltime": 10},
-  "sage.modular.btquotients.pautomorphicform": {"walltime": 31},
-  "sage.modular.hypergeometric_motive": {"walltime": 12},
-  "sage.modular.local_comp.local_comp": {"walltime": 27},
-  "sage.modular.local_comp.type_space": {"walltime": 24},
-  "sage.modular.modform.ambient_R": {"walltime": 11},
-  "sage.modular.modform.cuspidal_submodule": {"walltime": 15},
-  "sage.modular.modform.element": {"walltime": 60},
-  "sage.modular.modform.ring": {"walltime": 50},
-  "sage.modular.modform_hecketriangle.abstract_space": {"walltime": 12},
-  "sage.modular.modform_hecketriangle.graded_ring_element": {"walltime": 23},
-  "sage.modular.modform_hecketriangle.hecke_triangle_group_element": {"walltime": 26},
-  "sage.modular.modform_hecketriangle.readme": {"walltime": 19},
-  "sage.modular.modsym.ambient": {"walltime": 15},
-  "sage.modular.pollack_stevens.modsym": {"walltime": 63},
-  "sage.modular.pollack_stevens.padic_lseries": {"walltime": 36},
-  "sage.modules.finite_submodule_iter": {"walltime": 22},
-  "sage.modules.free_module": {"walltime": 22},
-  "sage.modules.free_module_integer": {"walltime": 28},
-  "sage.modules.torsion_quadratic_module": {"walltime": 22},
-  "sage.plot.animate": {"walltime": 129},
-  "sage.plot.contour_plot": {"walltime": 38},
-  "sage.plot.graphics": {"walltime": 43},
-  "sage.plot.line": {"walltime": 12},
-  "sage.plot.matrix_plot": {"walltime": 15},
-  "sage.plot.multigraphics": {"walltime": 26},
-  "sage.plot.plot": {"walltime": 77},
-  "sage.plot.plot3d.base": {"walltime": 12},
-  "sage.plot.plot3d.implicit_plot3d": {"walltime": 20},
-  "sage.plot.plot3d.parametric_plot3d": {"walltime": 11},
-  "sage.plot.plot3d.plot3d": {"walltime": 18},
-  "sage.plot.plot3d.transform": {"walltime": 34},
-  "sage.quadratic_forms.genera.genus": {"walltime": 19},
-  "sage.quadratic_forms.quadratic_form__local_representation_conditions": {"walltime": 48},
-  "sage.rings.asymptotic.asymptotic_expansion_generators": {"walltime": 61},
-  "sage.rings.asymptotic.asymptotics_multivariate_generating_functions": {"walltime": 36},
-  "sage.rings.function_field.function_field": {"walltime": 225},
-  "sage.rings.function_field.function_field_valuation": {"walltime": 47},
-  "sage.rings.function_field.ideal": {"walltime": 10},
-  "sage.rings.integer": {"walltime": 164},
-  "sage.rings.number_field.number_field": {"walltime": 79},
-  "sage.rings.number_field.number_field_element": {"walltime": 13},
-  "sage.rings.number_field.totallyreal": {"walltime": 14},
-  "sage.rings.padics.padic_base_leaves": {"walltime": 76},
-  "sage.rings.padics.padic_extension_leaves": {"walltime": 46},
-  "sage.rings.padics.padic_generic_element": {"walltime": 14},
-  "sage.rings.padics.padic_lattice_element": {"walltime": 25},
-  "sage.rings.padics.relative_extension_leaves": {"walltime": 42},
-  "sage.rings.polynomial.multi_polynomial_ideal": {"walltime": 11},
-  "sage.rings.polynomial.multi_polynomial_sequence": {"walltime": 28},
+  "sage.misc.sagedoc": {"walltime": 64},
+  "sage.misc.sageinspect": {"walltime": 32},
+  "sage.modular.abvar.abvar": {"walltime": 16},
+  "sage.modular.abvar.homspace": {"walltime": 8},
+  "sage.modular.abvar.lseries": {"walltime": 8},
+  "sage.modular.arithgroup.arithgroup_perm": {"walltime": 8},
+  "sage.modular.arithgroup.tests": {"walltime": 8},
+  "sage.modular.btquotients.pautomorphicform": {"walltime": 32},
+  "sage.modular.hypergeometric_motive": {"walltime": 16},
+  "sage.modular.local_comp.local_comp": {"walltime": 32},
+  "sage.modular.local_comp.type_space": {"walltime": 16},
+  "sage.modular.modform.ambient_R": {"walltime": 16},
+  "sage.modular.modform.constructor": {"walltime": 8},
+  "sage.modular.modform.cuspidal_submodule": {"walltime": 16},
+  "sage.modular.modform.element": {"walltime": 64},
+  "sage.modular.modform.ring": {"walltime": 64},
+  "sage.modular.modform.space": {"walltime": 8},
+  "sage.modular.modform_hecketriangle.abstract_space": {"walltime": 16},
+  "sage.modular.modform_hecketriangle.graded_ring_element": {"walltime": 16},
+  "sage.modular.modform_hecketriangle.hecke_triangle_group_element": {"walltime": 32},
+  "sage.modular.modform_hecketriangle.readme": {"walltime": 16},
+  "sage.modular.modform_hecketriangle.space": {"walltime": 8},
+  "sage.modular.modsym.ambient": {"walltime": 16},
+  "sage.modular.modsym.space": {"walltime": 8},
+  "sage.modular.pollack_stevens.modsym": {"walltime": 64},
+  "sage.modular.pollack_stevens.padic_lseries": {"walltime": 32},
+  "sage.modules.finite_submodule_iter": {"walltime": 16},
+  "sage.modules.free_module": {"walltime": 16},
+  "sage.modules.free_module_element": {"walltime": 8},
+  "sage.modules.free_module_integer": {"walltime": 32},
+  "sage.modules.free_quadratic_module_integer_symmetric": {"walltime": 8},
+  "sage.modules.torsion_quadratic_module": {"walltime": 16},
+  "sage.parallel.map_reduce": {"walltime": 8},
+  "sage.plot.animate": {"walltime": 128},
+  "sage.plot.arrow": {"walltime": 8},
+  "sage.plot.circle": {"walltime": 8},
+  "sage.plot.complex_plot": {"walltime": 8},
+  "sage.plot.contour_plot": {"walltime": 32},
+  "sage.plot.density_plot": {"walltime": 8},
+  "sage.plot.graphics": {"walltime": 32},
+  "sage.plot.line": {"walltime": 8},
+  "sage.plot.matrix_plot": {"walltime": 16},
+  "sage.plot.multigraphics": {"walltime": 16},
+  "sage.plot.plot": {"walltime": 64},
+  "sage.plot.plot3d.base": {"walltime": 8},
+  "sage.plot.plot3d.implicit_plot3d": {"walltime": 16},
+  "sage.plot.plot3d.implicit_surface": {"walltime": 8},
+  "sage.plot.plot3d.parametric_plot3d": {"walltime": 8},
+  "sage.plot.plot3d.parametric_surface": {"walltime": 8},
+  "sage.plot.plot3d.plot3d": {"walltime": 16},
+  "sage.plot.plot3d.tachyon": {"walltime": 8},
+  "sage.plot.plot3d.transform": {"walltime": 32},
+  "sage.plot.point": {"walltime": 8},
+  "sage.plot.polygon": {"walltime": 8},
+  "sage.plot.streamline_plot": {"walltime": 8},
+  "sage.quadratic_forms.genera.genus": {"walltime": 16},
+  "sage.quadratic_forms.quadratic_form__automorphisms": {"walltime": 8},
+  "sage.quadratic_forms.quadratic_form__local_representation_conditions": {"walltime": 64},
+  "sage.quadratic_forms.quadratic_form__neighbors": {"walltime": 8},
+  "sage.quadratic_forms.quadratic_form__siegel_product": {"walltime": 8},
+  "sage.repl.ipython_extension": {"walltime": 8},
+  "sage.rings.asymptotic.asymptotic_expansion_generators": {"walltime": 64},
+  "sage.rings.asymptotic.asymptotic_ring": {"walltime": 8},
+  "sage.rings.asymptotic.asymptotics_multivariate_generating_functions": {"walltime": 32},
+  "sage.rings.asymptotic.term_monoid": {"walltime": 8},
+  "sage.rings.continued_fraction": {"walltime": 8},
+  "sage.rings.finite_rings.finite_field_base": {"walltime": 8},
+  "sage.rings.function_field.function_field": {"walltime": 256},
+  "sage.rings.function_field.function_field_valuation": {"walltime": 64},
+  "sage.rings.function_field.ideal": {"walltime": 8},
+  "sage.rings.function_field.place": {"walltime": 8},
+  "sage.rings.integer": {"walltime": 128},
+  "sage.rings.invariants.invariant_theory": {"walltime": 8},
+  "sage.rings.number_field.bdd_height": {"walltime": 8},
+  "sage.rings.number_field.number_field": {"walltime": 64},
+  "sage.rings.number_field.number_field_element": {"walltime": 16},
+  "sage.rings.number_field.splitting_field": {"walltime": 8},
+  "sage.rings.number_field.totallyreal": {"walltime": 16},
+  "sage.rings.number_field.totallyreal_rel": {"walltime": 8},
+  "sage.rings.padics.padic_base_leaves": {"walltime": 64},
+  "sage.rings.padics.padic_extension_leaves": {"walltime": 64},
+  "sage.rings.padics.padic_generic_element": {"walltime": 16},
+  "sage.rings.padics.padic_lattice_element": {"walltime": 32},
+  "sage.rings.padics.relative_extension_leaves": {"walltime": 32},
+  "sage.rings.polynomial.multi_polynomial_ideal": {"walltime": 8},
+  "sage.rings.polynomial.multi_polynomial_sequence": {"walltime": 8},
+  "sage.rings.polynomial.ore_function_element": {"walltime": 8},
   "sage.rings.polynomial.polynomial_element": {"walltime": 16},
-  "sage.rings.polynomial.polynomial_zmod_flint": {"walltime": 336},
-  "sage.rings.qqbar": {"walltime": 21},
-  "sage.rings.tests": {"walltime": 19},
-  "sage.rings.valuation.augmented_valuation": {"walltime": 28},
-  "sage.rings.valuation.mapped_valuation": {"walltime": 56},
-  "sage.schemes.curves.affine_curve": {"walltime": 23},
-  "sage.schemes.curves.projective_curve": {"walltime": 24},
-  "sage.schemes.cyclic_covers.cycliccover_finite_field": {"walltime": 78},
-  "sage.schemes.elliptic_curves.BSD": {"walltime": 10},
-  "sage.schemes.elliptic_curves.constructor": {"walltime": 27},
-  "sage.schemes.elliptic_curves.ell_curve_isogeny": {"walltime": 21},
-  "sage.schemes.elliptic_curves.ell_egros": {"walltime": 28},
-  "sage.schemes.elliptic_curves.ell_modular_symbols": {"walltime": 12},
-  "sage.schemes.elliptic_curves.ell_number_field": {"walltime": 120},
-  "sage.schemes.elliptic_curves.ell_rational_field": {"walltime": 133},
-  "sage.schemes.elliptic_curves.gal_reps_number_field": {"walltime": 35},
-  "sage.schemes.elliptic_curves.gp_simon": {"walltime": 22},
-  "sage.schemes.elliptic_curves.heegner": {"walltime": 39},
-  "sage.schemes.elliptic_curves.height": {"walltime": 56},
-  "sage.schemes.elliptic_curves.isogeny_class": {"walltime": 38},
-  "sage.schemes.elliptic_curves.isogeny_small_degree": {"walltime": 274},
-  "sage.schemes.elliptic_curves.kraus": {"walltime": 12},
-  "sage.schemes.elliptic_curves.mod_sym_num": {"walltime": 12},
-  "sage.schemes.elliptic_curves.padics": {"walltime": 15},
-  "sage.schemes.elliptic_curves.saturation": {"walltime": 19},
-  "sage.schemes.elliptic_curves.sha_tate": {"walltime": 23},
-  "sage.schemes.hyperelliptic_curves.hyperelliptic_finite_field": {"walltime": 65},
-  "sage.schemes.hyperelliptic_curves.hyperelliptic_padic_field": {"walltime": 25},
-  "sage.schemes.projective.projective_rational_point": {"walltime": 11},
-  "sage.schemes.riemann_surfaces.riemann_surface": {"walltime": 53},
-  "sage.stats.distributions.discrete_gaussian_integer": {"walltime": 10},
-  "sage.structure.coerce_dict": {"walltime": 33},
+  "sage.rings.polynomial.polynomial_rational_flint": {"walltime": 8},
+  "sage.rings.polynomial.polynomial_zmod_flint": {"walltime": 512},
+  "sage.rings.qqbar": {"walltime": 16},
+  "sage.rings.tests": {"walltime": 16},
+  "sage.rings.valuation.augmented_valuation": {"walltime": 32},
+  "sage.rings.valuation.mapped_valuation": {"walltime": 64},
+  "sage.rings.valuation.valuation": {"walltime": 8},
+  "sage.sandpiles.sandpile": {"walltime": 16},
+  "sage.schemes.curves.affine_curve": {"walltime": 16},
+  "sage.schemes.curves.closed_point": {"walltime": 8},
+  "sage.schemes.curves.projective_curve": {"walltime": 32},
+  "sage.schemes.cyclic_covers.cycliccover_finite_field": {"walltime": 64},
+  "sage.schemes.elliptic_curves.BSD": {"walltime": 8},
+  "sage.schemes.elliptic_curves.Qcurves": {"walltime": 8},
+  "sage.schemes.elliptic_curves.constructor": {"walltime": 32},
+  "sage.schemes.elliptic_curves.ell_curve_isogeny": {"walltime": 16},
+  "sage.schemes.elliptic_curves.ell_egros": {"walltime": 32},
+  "sage.schemes.elliptic_curves.ell_finite_field": {"walltime": 8},
+  "sage.schemes.elliptic_curves.ell_generic": {"walltime": 8},
+  "sage.schemes.elliptic_curves.ell_modular_symbols": {"walltime": 16},
+  "sage.schemes.elliptic_curves.ell_number_field": {"walltime": 128},
+  "sage.schemes.elliptic_curves.ell_point": {"walltime": 8},
+  "sage.schemes.elliptic_curves.ell_rational_field": {"walltime": 128},
+  "sage.schemes.elliptic_curves.gal_reps_number_field": {"walltime": 32},
+  "sage.schemes.elliptic_curves.gp_simon": {"walltime": 16},
+  "sage.schemes.elliptic_curves.heegner": {"walltime": 32},
+  "sage.schemes.elliptic_curves.height": {"walltime": 64},
+  "sage.schemes.elliptic_curves.isogeny_class": {"walltime": 32},
+  "sage.schemes.elliptic_curves.isogeny_small_degree": {"walltime": 256},
+  "sage.schemes.elliptic_curves.kraus": {"walltime": 16},
+  "sage.schemes.elliptic_curves.mod_sym_num": {"walltime": 8},
+  "sage.schemes.elliptic_curves.padic_lseries": {"walltime": 8},
+  "sage.schemes.elliptic_curves.padics": {"walltime": 16},
+  "sage.schemes.elliptic_curves.saturation": {"walltime": 16},
+  "sage.schemes.elliptic_curves.sha_tate": {"walltime": 32},
+  "sage.schemes.hyperelliptic_curves.hyperelliptic_finite_field": {"walltime": 64},
+  "sage.schemes.hyperelliptic_curves.hyperelliptic_generic": {"walltime": 8},
+  "sage.schemes.hyperelliptic_curves.hyperelliptic_padic_field": {"walltime": 32},
+  "sage.schemes.hyperelliptic_curves.monsky_washnitzer": {"walltime": 8},
+  "sage.schemes.projective.projective_rational_point": {"walltime": 8},
+  "sage.schemes.riemann_surfaces.riemann_surface": {"walltime": 64},
+  "sage.schemes.toric.chow_group": {"walltime": 8},
+  "sage.schemes.toric.sheaf.klyachko": {"walltime": 8},
+  "sage.stats.distributions.discrete_gaussian_integer": {"walltime": 8},
+  "sage.stats.time_series": {"walltime": 8},
+  "sage.structure.coerce_dict": {"walltime": 32},
   "sage.structure.element": {"walltime": 16},
-  "sage.symbolic.expression": {"walltime": 38},
-  "sage.symbolic.integration.integral": {"walltime": 35},
-  "sage.symbolic.random_tests": {"walltime": 31},
-  "sage.symbolic.relation": {"walltime": 11},
-  "sage.tests.book_schilling_zabrocki_kschur_primer": {"walltime": 36},
-  "sage.tests.book_stein_ent": {"walltime": 15},
-  "sage.tests.books.computational-mathematics-with-sagemath.combinat_doctest": {"walltime": 40},
-  "sage.tests.books.computational-mathematics-with-sagemath.float_doctest": {"walltime": 17},
-  "sage.tests.books.computational-mathematics-with-sagemath.graphique_doctest": {"walltime": 29},
-  "sage.tests.books.computational-mathematics-with-sagemath.integration_doctest": {"walltime": 28},
-  "sage.tests.books.computational-mathematics-with-sagemath.nonlinear_doctest": {"walltime": 11},
-  "sage.tests.books.computational-mathematics-with-sagemath.sol.graphique_doctest": {"walltime": 17},
-  "sage.tests.books.computational-mathematics-with-sagemath.sol.numbertheory_doctest": {"walltime": 14},
-  "sage.tests.books.computational-mathematics-with-sagemath.sol.polynomes_doctest": {"walltime": 19},
-  "sage.tests.cmdline": {"walltime": 44},
-  "sage.tests.gosper-sum": {"walltime": 11},
-  "sage.topology.simplicial_complex_examples": {"walltime": 14}
+  "sage.structure.sage_object": {"walltime": 8},
+  "sage.symbolic.expression": {"walltime": 32},
+  "sage.symbolic.integration.integral": {"walltime": 32},
+  "sage.symbolic.random_tests": {"walltime": 32},
+  "sage.symbolic.relation": {"walltime": 8},
+  "sage.tests.book_schilling_zabrocki_kschur_primer": {"walltime": 32},
+  "sage.tests.book_stein_ent": {"walltime": 16},
+  "sage.tests.books.computational-mathematics-with-sagemath.combinat_doctest": {"walltime": 32},
+  "sage.tests.books.computational-mathematics-with-sagemath.float_doctest": {"walltime": 16},
+  "sage.tests.books.computational-mathematics-with-sagemath.graphique_doctest": {"walltime": 32},
+  "sage.tests.books.computational-mathematics-with-sagemath.graphtheory_doctest": {"walltime": 8},
+  "sage.tests.books.computational-mathematics-with-sagemath.integration_doctest": {"walltime": 32},
+  "sage.tests.books.computational-mathematics-with-sagemath.mpoly_doctest": {"walltime": 8},
+  "sage.tests.books.computational-mathematics-with-sagemath.nonlinear_doctest": {"walltime": 8},
+  "sage.tests.books.computational-mathematics-with-sagemath.recequadiff_doctest": {"walltime": 8},
+  "sage.tests.books.computational-mathematics-with-sagemath.sol.graphique_doctest": {"walltime": 16},
+  "sage.tests.books.computational-mathematics-with-sagemath.sol.numbertheory_doctest": {"walltime": 16},
+  "sage.tests.books.computational-mathematics-with-sagemath.sol.polynomes_doctest": {"walltime": 16},
+  "sage.tests.cmdline": {"walltime": 64},
+  "sage.tests.gosper-sum": {"walltime": 16},
+  "sage.tests.parigp": {"walltime": 8},
+  "sage.topology.simplicial_complex": {"walltime": 8},
+  "sage.topology.simplicial_complex_examples": {"walltime": 16}
 }

From 02cb49b34b4bd8eb267b8dcb30bb5735783fde15 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 13:05:37 -0300
Subject: [PATCH 52/67] New package: python3-memory_allocator-0.1.2

---
 srcpkgs/python3-memory_allocator/template | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 srcpkgs/python3-memory_allocator/template

diff --git a/srcpkgs/python3-memory_allocator/template b/srcpkgs/python3-memory_allocator/template
new file mode 100644
index 000000000000..e4fbb51478fa
--- /dev/null
+++ b/srcpkgs/python3-memory_allocator/template
@@ -0,0 +1,14 @@
+# Template file for 'python3-memory_allocator'
+pkgname=python3-memory_allocator
+version=0.1.2
+revision=1
+wrksrc=memory_allocator-$version
+build_style=python3-module
+hostmakedepends="python3-setuptools python3-Cython"
+makedepends="python3-devel"
+short_desc="Extension class to allocate memory easily with cython"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-3.0-or-later"
+homepage="https://github.com/kliem/memory_allocator"
+distfiles="${PYPI_SITE}/m/memory_allocator/memory_allocator-${version}.tar.gz"
+checksum=ddf42a2dcc678062f30c63c868335204d46a4ecdf4db0dc43ed4529f1d0ffab9

From d6f175c0140f6ba799f580fb71c8d96bc4acfa82 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 17:44:04 -0300
Subject: [PATCH 53/67] New package: python3-primecountpy-0.1.0

---
 srcpkgs/python3-primecountpy/template | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 srcpkgs/python3-primecountpy/template

diff --git a/srcpkgs/python3-primecountpy/template b/srcpkgs/python3-primecountpy/template
new file mode 100644
index 000000000000..fecc774b3983
--- /dev/null
+++ b/srcpkgs/python3-primecountpy/template
@@ -0,0 +1,16 @@
+# Template file for 'python3-primecountpy'
+pkgname=python3-primecountpy
+version=0.1.0
+revision=1
+wrksrc=primecountpy-${version}
+build_style=python3-module
+hostmakedepends="python3-setuptools python3-Cython"
+makedepends="python3-cysignals python3-devel primecount-devel pari-devel"
+short_desc="Python interface to the C++ library primecount"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-3.0-or-later"
+homepage="https://github.com/dimpase/primecountpy"
+distfiles="${PYPI_SITE}/p/primecountpy/primecountpy-${version}.tar.gz"
+checksum=78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
+
+make_check=no # no way to check before installing

From 14d00f5f4572f4bdf3161dac518936621ab60f25 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 20:02:33 -0300
Subject: [PATCH 54/67] New package: sage-data-combinatorial_designs-20140630

---
 srcpkgs/sage-data-combinatorial_designs/template | 16 ++++++++++++++++
 srcpkgs/sage-data-combinatorial_designs/update   |  1 +
 2 files changed, 17 insertions(+)
 create mode 100644 srcpkgs/sage-data-combinatorial_designs/template
 create mode 100644 srcpkgs/sage-data-combinatorial_designs/update

diff --git a/srcpkgs/sage-data-combinatorial_designs/template b/srcpkgs/sage-data-combinatorial_designs/template
new file mode 100644
index 000000000000..dcec3dbf554b
--- /dev/null
+++ b/srcpkgs/sage-data-combinatorial_designs/template
@@ -0,0 +1,16 @@
+# Template file for 'sage-data-combinatorial_designs'
+pkgname=sage-data-combinatorial_designs
+version=20140630
+revision=1
+wrksrc="combinatorial_designs-$version"
+short_desc="Data for combinatorial designs"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="Public Domain"
+homepage="https://mirrors.mit.edu/sage/spkg/upstream/combinatorial_designs/"
+distfiles="https://mirrors.mit.edu/sage/spkg/upstream/combinatorial_designs/combinatorial_designs-$version.tar.bz2"
+checksum=c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
+
+do_install() {
+	vmkdir usr/share/sagemath/combinatorial_designs
+	vcopy * usr/share/sagemath/combinatorial_designs
+}
diff --git a/srcpkgs/sage-data-combinatorial_designs/update b/srcpkgs/sage-data-combinatorial_designs/update
new file mode 100644
index 000000000000..d66b1a8e41a0
--- /dev/null
+++ b/srcpkgs/sage-data-combinatorial_designs/update
@@ -0,0 +1 @@
+pkgname=combinatorial_designs

From f545f3b343cdda2b317ad64193234f74c3f1b10d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 20:02:34 -0300
Subject: [PATCH 55/67] New package: sage-data-conway_polynomials-0.5

---
 srcpkgs/sage-data-conway_polynomials/template | 21 +++++++++++++++++++
 srcpkgs/sage-data-conway_polynomials/update   |  1 +
 2 files changed, 22 insertions(+)
 create mode 100644 srcpkgs/sage-data-conway_polynomials/template
 create mode 100644 srcpkgs/sage-data-conway_polynomials/update

diff --git a/srcpkgs/sage-data-conway_polynomials/template b/srcpkgs/sage-data-conway_polynomials/template
new file mode 100644
index 000000000000..57264da84c2f
--- /dev/null
+++ b/srcpkgs/sage-data-conway_polynomials/template
@@ -0,0 +1,21 @@
+# Template file for 'sage-data-conway_polynomials'
+pkgname=sage-data-conway_polynomials
+version=0.5
+revision=1
+wrksrc="conway_polynomials-$version"
+hostmakedepends="python3"
+short_desc="Database of Conway polynomials over finite fields"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="Public Domain, GPL-2.0-or-later"
+homepage="https://mirrors.mit.edu/sage/spkg/upstream/conway_polynomials/"
+distfiles="https://mirrors.mit.edu/sage/spkg/upstream/conway_polynomials/conway_polynomials-$version.tar.bz2
+ https://github.com/sagemath/sage/raw/9.4/build/pkgs/conway_polynomials/spkg-install.py"
+checksum="d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
+ da85e913282d059ca36e14cefc92f891da469e8d7127f13a1ce96c6fb5c296af"
+skip_extraction=spkg-install.py
+
+do_install() {
+	ln -s . src
+	SAGE_SHARE=${DESTDIR}/usr/share/sagemath PYTHONPATH=${PWD} \
+		python3 ${XBPS_SRCDISTDIR}/${pkgname}-${version}/spkg-install.py
+}
diff --git a/srcpkgs/sage-data-conway_polynomials/update b/srcpkgs/sage-data-conway_polynomials/update
new file mode 100644
index 000000000000..628e2749f014
--- /dev/null
+++ b/srcpkgs/sage-data-conway_polynomials/update
@@ -0,0 +1 @@
+pkgname=conway_polynomials

From 4a02cf555e088ae5226ca8622e8d21e524092d87 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 20:02:34 -0300
Subject: [PATCH 56/67] New package: sage-data-elliptic_curves-0.8.1

---
 srcpkgs/sage-data-elliptic_curves/template | 21 +++++++++++++++++++++
 srcpkgs/sage-data-elliptic_curves/update   |  1 +
 2 files changed, 22 insertions(+)
 create mode 100644 srcpkgs/sage-data-elliptic_curves/template
 create mode 100644 srcpkgs/sage-data-elliptic_curves/update

diff --git a/srcpkgs/sage-data-elliptic_curves/template b/srcpkgs/sage-data-elliptic_curves/template
new file mode 100644
index 000000000000..5103f9b87374
--- /dev/null
+++ b/srcpkgs/sage-data-elliptic_curves/template
@@ -0,0 +1,21 @@
+# Template file for 'sage-data-elliptic_curves'
+pkgname=sage-data-elliptic_curves
+version=0.8.1
+revision=1
+wrksrc="elliptic_curves-$version"
+hostmakedepends="python3"
+short_desc="Database of elliptic curves"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="Public Domain, GPL-2.0-or-later"
+homepage="https://mirrors.mit.edu/sage/spkg/upstream/elliptic_curves/"
+distfiles="https://mirrors.mit.edu/sage/spkg/upstream/elliptic_curves/elliptic_curves-$version.tar.bz2
+ https://github.com/sagemath/sage/raw/9.4/build/pkgs/elliptic_curves/spkg-install.py"
+checksum="5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
+ 856d482872f72db47c7b718761bb1a205947b276df99b55d087a57130932cf84"
+skip_extraction=spkg-install.py
+
+do_install() {
+	ln -s . src
+	SAGE_SHARE=${DESTDIR}/usr/share/sagemath \
+		python3 ${XBPS_SRCDISTDIR}/${pkgname}-${version}/spkg-install.py
+}
diff --git a/srcpkgs/sage-data-elliptic_curves/update b/srcpkgs/sage-data-elliptic_curves/update
new file mode 100644
index 000000000000..8155f52ce93b
--- /dev/null
+++ b/srcpkgs/sage-data-elliptic_curves/update
@@ -0,0 +1 @@
+pkgname=elliptic_curves

From 27b42f3bebd1c3f823b7c50a3a75b76973ed01e5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 20:02:35 -0300
Subject: [PATCH 57/67] New package: sage-data-polytopes_db-20170220

---
 srcpkgs/sage-data-polytopes_db/template | 16 ++++++++++++++++
 srcpkgs/sage-data-polytopes_db/update   |  1 +
 2 files changed, 17 insertions(+)
 create mode 100644 srcpkgs/sage-data-polytopes_db/template
 create mode 100644 srcpkgs/sage-data-polytopes_db/update

diff --git a/srcpkgs/sage-data-polytopes_db/template b/srcpkgs/sage-data-polytopes_db/template
new file mode 100644
index 000000000000..d0f9f297d84b
--- /dev/null
+++ b/srcpkgs/sage-data-polytopes_db/template
@@ -0,0 +1,16 @@
+# Template file for 'sage-data-polytopes_db'
+pkgname=sage-data-polytopes_db
+version=20170220
+revision=1
+wrksrc="polytopes_db-$version"
+short_desc="Database of 2 and 3-dimensional reflexive polytopes"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="Public Domain"
+homepage="https://mirrors.mit.edu/sage/spkg/upstream/polytopes_db/"
+distfiles="https://mirrors.mit.edu/sage/spkg/upstream/polytopes_db/polytopes_db-$version.tar.bz2"
+checksum=cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
+
+do_install() {
+	vmkdir usr/share/sagemath/reflexive_polytopes
+	vcopy * usr/share/sagemath/reflexive_polytopes
+}
diff --git a/srcpkgs/sage-data-polytopes_db/update b/srcpkgs/sage-data-polytopes_db/update
new file mode 100644
index 000000000000..f51653b547fd
--- /dev/null
+++ b/srcpkgs/sage-data-polytopes_db/update
@@ -0,0 +1 @@
+pkgname=polytopes_db

From e78aedf74b90b79c7499333f3e8d985ff25fa2c9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 20:02:35 -0300
Subject: [PATCH 58/67] New package: sage-data-graphs-20210214

---
 srcpkgs/sage-data-graphs/template | 16 ++++++++++++++++
 srcpkgs/sage-data-graphs/update   |  1 +
 2 files changed, 17 insertions(+)
 create mode 100644 srcpkgs/sage-data-graphs/template
 create mode 100644 srcpkgs/sage-data-graphs/update

diff --git a/srcpkgs/sage-data-graphs/template b/srcpkgs/sage-data-graphs/template
new file mode 100644
index 000000000000..9ca16b6cf53a
--- /dev/null
+++ b/srcpkgs/sage-data-graphs/template
@@ -0,0 +1,16 @@
+# Template file for 'sage-data-graphs'
+pkgname=sage-data-graphs
+version=20210214
+revision=1
+wrksrc="graphs-$version"
+short_desc="Database of graphs"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="Public Domain"
+homepage="https://mirrors.mit.edu/sage/spkg/upstream/graphs/"
+distfiles="https://mirrors.mit.edu/sage/spkg/upstream/graphs/graphs-$version.tar.bz2"
+checksum=07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
+
+do_install() {
+	vmkdir usr/share/sagemath/graphs
+	vcopy * usr/share/sagemath/graphs
+}
diff --git a/srcpkgs/sage-data-graphs/update b/srcpkgs/sage-data-graphs/update
new file mode 100644
index 000000000000..c5c7c7dd5253
--- /dev/null
+++ b/srcpkgs/sage-data-graphs/update
@@ -0,0 +1 @@
+pkgname=graphs

From e8b8819a8107c24a5ee257b3d8d8da686a3c4bef Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 22:45:22 -0300
Subject: [PATCH 59/67] sagemath: all but two packages from system

---
 .../patches/zzz-remove_ratpoints.patch        | 887 ++++++++++++++++++
 srcpkgs/sagemath/template                     | 152 +--
 2 files changed, 970 insertions(+), 69 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/zzz-remove_ratpoints.patch

diff --git a/srcpkgs/sagemath/patches/zzz-remove_ratpoints.patch b/srcpkgs/sagemath/patches/zzz-remove_ratpoints.patch
new file mode 100644
index 000000000000..0842d9d7f6d5
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-remove_ratpoints.patch
@@ -0,0 +1,887 @@
+From 3178a5e1e4f7174343fd913494ae255b3e05fb85 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Mon, 17 Jan 2022 21:04:42 -0300
+Subject: [PATCH] ratpoints: remove deprecated package
+
+---
+ .github/workflows/ci-cygwin-minimal.yml       |   2 +-
+ .github/workflows/ci-cygwin-standard.yml      |   2 +-
+ COPYING.txt                                   |   1 -
+ build/pkgs/ratpoints/SPKG.rst                 |  29 --
+ build/pkgs/ratpoints/checksums.ini            |   4 -
+ build/pkgs/ratpoints/dependencies             |   5 -
+ build/pkgs/ratpoints/distros/arch.txt         |   1 -
+ build/pkgs/ratpoints/distros/conda.txt        |   1 -
+ build/pkgs/ratpoints/distros/debian.txt       |   1 -
+ build/pkgs/ratpoints/distros/nix.txt          |   1 -
+ build/pkgs/ratpoints/distros/repology.txt     |   1 -
+ build/pkgs/ratpoints/package-version.txt      |   1 -
+ build/pkgs/ratpoints/patches/Makefile.patch   |  37 ---
+ .../patches/sturm_and_rp_private.patch        | 194 ------------
+ build/pkgs/ratpoints/spkg-install.in          |  46 ---
+ build/pkgs/ratpoints/type                     |   1 -
+ build/pkgs/sagelib/dependencies               |   2 +-
+ src/sage/libs/ratpoints.pxd                   |  74 -----
+ src/sage/libs/ratpoints.pyx                   | 283 ------------------
+ .../elliptic_curves/descent_two_isogeny.pyx   |   2 -
+ src/sage_setup/library_order.py               |   2 +-
+ 21 files changed, 4 insertions(+), 686 deletions(-)
+ delete mode 100644 build/pkgs/ratpoints/SPKG.rst
+ delete mode 100644 build/pkgs/ratpoints/checksums.ini
+ delete mode 100644 build/pkgs/ratpoints/dependencies
+ delete mode 100644 build/pkgs/ratpoints/distros/arch.txt
+ delete mode 100644 build/pkgs/ratpoints/distros/conda.txt
+ delete mode 100644 build/pkgs/ratpoints/distros/debian.txt
+ delete mode 100644 build/pkgs/ratpoints/distros/nix.txt
+ delete mode 100644 build/pkgs/ratpoints/distros/repology.txt
+ delete mode 100644 build/pkgs/ratpoints/package-version.txt
+ delete mode 100644 build/pkgs/ratpoints/patches/Makefile.patch
+ delete mode 100644 build/pkgs/ratpoints/patches/sturm_and_rp_private.patch
+ delete mode 100644 build/pkgs/ratpoints/spkg-install.in
+ delete mode 100644 build/pkgs/ratpoints/type
+ delete mode 100644 src/sage/libs/ratpoints.pxd
+ delete mode 100644 src/sage/libs/ratpoints.pyx
+
+diff --git a/.github/workflows/ci-cygwin-minimal.yml b/.github/workflows/ci-cygwin-minimal.yml
+index 9e847e7474..9df1365657 100644
+--- a/.github/workflows/ci-cygwin-minimal.yml
++++ b/.github/workflows/ci-cygwin-minimal.yml
+@@ -217,7 +217,7 @@ jobs:
+     env:
+       STAGE: ii-b
+       PREVIOUS_STAGES: i-*
+-      TARGETS: singular maxima gap pari gfan palp flintqs ratpoints arb ecm givaro
++      TARGETS: singular maxima gap pari gfan palp flintqs arb ecm givaro
+       LOCAL_ARTIFACT_NAME: sage-local-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
+       LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
+ 
+diff --git a/.github/workflows/ci-cygwin-standard.yml b/.github/workflows/ci-cygwin-standard.yml
+index cbbe0f46a8..8aee1c2c3c 100644
+--- a/.github/workflows/ci-cygwin-standard.yml
++++ b/.github/workflows/ci-cygwin-standard.yml
+@@ -217,7 +217,7 @@ jobs:
+     env:
+       STAGE: ii-b
+       PREVIOUS_STAGES: i-*
+-      TARGETS: singular maxima gap pari gfan palp flintqs ratpoints arb ecm givaro
++      TARGETS: singular maxima gap pari gfan palp flintqs arb ecm givaro
+       LOCAL_ARTIFACT_NAME: sage-local-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
+       LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
+ 
+diff --git a/COPYING.txt b/COPYING.txt
+index 1176a856a0..a3e9cc6645 100644
+--- a/COPYING.txt
++++ b/COPYING.txt
+@@ -107,7 +107,6 @@ pynac                       GPLv2+
+ pyparsing                   MIT License
+ python                      Python License (see below)
+ R                           GPLv2+
+-ratpoints                   GPLv2+
+ readline                    GPLv3+
+ rpy                         GPLv2+
+ rubiks/dietz                GPL, any version
+diff --git a/build/pkgs/ratpoints/SPKG.rst b/build/pkgs/ratpoints/SPKG.rst
+deleted file mode 100644
+index 6607094bec..0000000000
+--- a/build/pkgs/ratpoints/SPKG.rst
++++ /dev/null
+@@ -1,29 +0,0 @@
+-ratpoints: Find rational points on hyperelliptic curves
+-=======================================================
+-
+-Description
+------------
+-
+-Michael Stoll's program which searches for rational points on
+-hyperelliptic curves.
+-
+-NOTE: the ratpoints package has been assimilated by PARI/GP. Therefore,
+-this package (as Sage package) is deprecated. In the future, it will be
+-removed from Sage.
+-
+-
+-Upstream Contact
+-----------------
+-
+--  Author: Michael Stoll
+--  Email: Michael.Stoll@uni-bayreuth.de
+--  Website: http://www.mathe2.uni-bayreuth.de/stoll/programs/
+-
+-
+-Note on SSE2 instructions
+-~~~~~~~~~~~~~~~~~~~~~~~~~
+-
+--  On several architectures, the SSE2 instructions used by ratpoints
+-   cause
+-   compiler errors. In the case that ratpoints fails to build with SSE2
+-   instructions enabled, the build is repeated with SSE2 disabled.
+diff --git a/build/pkgs/ratpoints/checksums.ini b/build/pkgs/ratpoints/checksums.ini
+deleted file mode 100644
+index 46ba1c9ec1..0000000000
+--- a/build/pkgs/ratpoints/checksums.ini
++++ /dev/null
+@@ -1,4 +0,0 @@
+-tarball=ratpoints-VERSION.tar.bz2
+-sha1=14fbc3dd50742794e0b33d2dd1217e5dd8ad2623
+-md5=9bf091d1b90132433f0a1fc6b585d024
+-cksum=670991933
+diff --git a/build/pkgs/ratpoints/dependencies b/build/pkgs/ratpoints/dependencies
+deleted file mode 100644
+index 9a77ea16f7..0000000000
+--- a/build/pkgs/ratpoints/dependencies
++++ /dev/null
+@@ -1,5 +0,0 @@
+-$(MP_LIBRARY)
+-
+-----------
+-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/ratpoints/distros/arch.txt b/build/pkgs/ratpoints/distros/arch.txt
+deleted file mode 100644
+index e137758627..0000000000
+--- a/build/pkgs/ratpoints/distros/arch.txt
++++ /dev/null
+@@ -1 +0,0 @@
+-ratpoints
+diff --git a/build/pkgs/ratpoints/distros/conda.txt b/build/pkgs/ratpoints/distros/conda.txt
+deleted file mode 100644
+index e137758627..0000000000
+--- a/build/pkgs/ratpoints/distros/conda.txt
++++ /dev/null
+@@ -1 +0,0 @@
+-ratpoints
+diff --git a/build/pkgs/ratpoints/distros/debian.txt b/build/pkgs/ratpoints/distros/debian.txt
+deleted file mode 100644
+index dabd28d624..0000000000
+--- a/build/pkgs/ratpoints/distros/debian.txt
++++ /dev/null
+@@ -1 +0,0 @@
+-libratpoints-dev
+diff --git a/build/pkgs/ratpoints/distros/nix.txt b/build/pkgs/ratpoints/distros/nix.txt
+deleted file mode 100644
+index e137758627..0000000000
+--- a/build/pkgs/ratpoints/distros/nix.txt
++++ /dev/null
+@@ -1 +0,0 @@
+-ratpoints
+diff --git a/build/pkgs/ratpoints/distros/repology.txt b/build/pkgs/ratpoints/distros/repology.txt
+deleted file mode 100644
+index e137758627..0000000000
+--- a/build/pkgs/ratpoints/distros/repology.txt
++++ /dev/null
+@@ -1 +0,0 @@
+-ratpoints
+diff --git a/build/pkgs/ratpoints/package-version.txt b/build/pkgs/ratpoints/package-version.txt
+deleted file mode 100644
+index efed46a7bd..0000000000
+--- a/build/pkgs/ratpoints/package-version.txt
++++ /dev/null
+@@ -1 +0,0 @@
+-2.1.3.p5
+diff --git a/build/pkgs/ratpoints/patches/Makefile.patch b/build/pkgs/ratpoints/patches/Makefile.patch
+deleted file mode 100644
+index 093d7c0018..0000000000
+--- a/build/pkgs/ratpoints/patches/Makefile.patch
++++ /dev/null
+@@ -1,37 +0,0 @@
+---- src/Makefile	2009-10-01 01:08:54.000000000 +0200
+-+++ patches/Makefile	2012-03-17 13:57:33.026315142 +0100
+-@@ -21,11 +21,11 @@
+- #
+- #    Michael Stoll, September 21, 2009
+- 
+--CC = gcc
+-+CC ?= gcc
+- RM = rm -f
+- INSTALL = cp
+- 
+--INSTALL_DIR = /usr/local
+-+INSTALL_DIR ?= /usr/local
+- 
+- DISTFILES = Makefile ratpoints.h rp-private.h primes.h \
+-             gen_find_points_h.c gen_init_sieve_h.c \
+-@@ -47,14 +47,14 @@
+- 	diff -q testbase rptest.out
+- 
+- install-bin: ratpoints
+--	${INSTALL} ratpoints ${INSTALL_DIR}/bin/
+--	chmod 755 ${INSTALL_DIR}/bin/ratpoints
+-+	${INSTALL} ratpoints "${INSTALL_DIR}/bin/"
+-+	chmod 755 "${INSTALL_DIR}/bin/ratpoints"
+- 
+- install-lib: ratpoints.h libratpoints.a
+--	${INSTALL} ratpoints.h ${INSTALL_DIR}/include/
+--	chmod 644 ${INSTALL_DIR}/include/ratpoints.h
+--	${INSTALL} libratpoints.a ${INSTALL_DIR}/lib/
+--	chmod 644 ${INSTALL_DIR}/lib/libratpoints.a
+-+	${INSTALL} ratpoints.h "${INSTALL_DIR}/include/"
+-+	chmod 644 "${INSTALL_DIR}/include/ratpoints.h"
+-+	${INSTALL} libratpoints.a "${INSTALL_DIR}/lib/"
+-+	chmod 644 "${INSTALL_DIR}/lib/libratpoints.a"
+- 
+- install: install-bin install-lib
+- 
+diff --git a/build/pkgs/ratpoints/patches/sturm_and_rp_private.patch b/build/pkgs/ratpoints/patches/sturm_and_rp_private.patch
+deleted file mode 100644
+index 664198c4de..0000000000
+--- a/build/pkgs/ratpoints/patches/sturm_and_rp_private.patch
++++ /dev/null
+@@ -1,194 +0,0 @@
+-diff --git a/rp-private.h b/rp-private.h
+-index b4c7dad..0c7193e 100644
+---- a/rp-private.h
+-+++ b/rp-private.h
+-@@ -36,7 +36,7 @@
+- #define LONG_SHIFT ((LONG_LENGTH == 16) ? 4 : \
+-                     (LONG_LENGTH == 32) ? 5 : \
+- 		    (LONG_LENGTH == 64) ? 6 : 0)
+--#define LONG_MASK (~(-1L<<LONG_SHIFT))
+-+#define LONG_MASK (~(-(1L<<LONG_SHIFT)))
+- 
+- /* Check if SSE instructions can be used.
+-    We assume that one SSE word of 128 bit is two long's,
+-diff --git a/sturm.c b/sturm.c
+-index c78d7c6..5fd2cf5 100644
+---- a/sturm.c
+-+++ b/sturm.c
+-@@ -27,7 +27,6 @@
+-  ***********************************************************************/
+- 
+- #include "ratpoints.h"
+--
+- /**************************************************************************
+-  * Arguments of _ratpoints_compute_sturm() : (from the args argument)     *
+-  *                                                                        *
+-@@ -53,7 +52,7 @@
+- /* A helper function: evaluate the polynomial in cofs[] of given degree
+-   at num/2^denexp and return the sign. */
+- 
+--static long eval_sign(ratpoints_args *args, mpz_t *cofs, long degree,
+-+static long eval_sign(const ratpoints_args *args, const mpz_t *cofs, long degree,
+-                       long num, long denexp)
+- {
+-   long n, e, s;
+-@@ -70,11 +69,80 @@ static long eval_sign(ratpoints_args *args, mpz_t *cofs, long degree,
+-   return(s);
+- }
+- 
+-+static const    long max = (long)(((unsigned long)(-1))>>1);
+-+static const    long min = (long)(-(((unsigned long)(-1))>>1));
+-+    /* recursive helper function */
+-+static void iterate(long nl, long nr, long del, long der, long cleft, long cright,
+-+                 long sl, long sr, long depth,
+-+		 ratpoints_interval **iptr, const ratpoints_interval *ivlo,
+-+		 const ratpoints_args *args, const long k, const long sturm_degs[],
+-+                 const mpz_t sturm[][args->degree + 1])
+-+    { /* nl/2^del, nr/2^der : interval left/right endpoints,
+-+         cleft, cright: sign change counts at endpoints,
+-+         sl, sr: signs at endpoints,
+-+         depth: iteration depth */
+-+     long iter = args->sturm;
+-+      if(cleft == cright && sl < 0) { return; }
+-+         /* here we know the polynomial is negative on the interval */
+-+      if((cleft == cright && sl > 0) || depth >= iter)
+-+      /* we have to add/extend an interval if we either know that
+-+         the polynomial is positive on the interval (first condition)
+-+         or the maximal iteration depth has been reached (second condition) */
+-+      { double l = ((double)nl)/((double)(1<<del));
+-+        double u = ((double)nr)/((double)(1<<der));
+-+        if(*iptr == ivlo)
+-+        { (*iptr)->low = l; (*iptr)->up  = u; (*iptr)++; }
+-+        else
+-+        { if(((*iptr)-1)->up == l) /* extend interval */
+-+          { ((*iptr)-1)->up = u; }
+-+          else /* new interval */
+-+          { (*iptr)->low = l; (*iptr)->up  = u; (*iptr)++; }
+-+        }
+-+        return;
+-+      }
+-+      /* now we must split the interval and evaluate the sturm sequence
+-+         at the midpoint */
+-+      { long nm, dem, s0, s1, s2, s, cmid = 0, n;
+-+        if(nl == min)
+-+        { if(nr == max) { nm = 0; dem = 0; }
+-+          else { nm = (nr == 0) ? -1 : 2*nr; dem = 0; }
+-+        }
+-+        else
+-+        { if(nr == max) { nm = (nl == 0) ? 1 : 2*nl; dem = 0; }
+-+          else /* "normal" case */
+-+          { if(del == der) /* then both are zero */
+-+            { if(((nl+nr) & 1) == 0) { nm = (nl+nr)>>1; dem = 0; }
+-+              else { nm = nl+nr; dem = 1; }
+-+            }
+-+            else /* here one de* is greater */
+-+            { if(del > der) { nm = nl + (nr<<(del-der)); dem = del+1; }
+-+              else { nm = (nl<<(der-del)) + nr; dem = der+1; }
+-+            }
+-+          }
+-+        }
+-+        s0 = eval_sign(args, sturm[0], sturm_degs[0], nm, dem);
+-+        s1 = eval_sign(args, sturm[1], sturm_degs[1], nm, dem);
+-+        if(s0*s1 == -1) { cmid++; }
+-+        s = (s1 == 0) ? s0 : s1;
+-+        for(n = 2; n <= k; n++)
+-+        { s2 = eval_sign(args, sturm[n], sturm_degs[n], nm, dem);
+-+          if(s2 == -s) { cmid++; s = s2; }
+-+          else if(s2 != 0) { s = s2; }
+-+        }
+-+        /* now recurse */
+-+        iterate(nl, nm, del, dem, cleft, (s0==0) ? (cmid+1) : cmid,
+-+                sl, (s0==0) ? -s1 : s0, depth+1,
+-+                iptr, ivlo, args, k, sturm_degs, sturm);
+-+        iterate(nm, nr, dem, der, cmid, cright,
+-+                (s0==0) ? s1 : s0, sr, depth+1,
+-+		iptr, ivlo, args, k, sturm_degs, sturm);
+-+      }
+-+    } /* end iterate() */
+-+
+- long _ratpoints_compute_sturm(ratpoints_args *args)
+- { 
+-   mpz_t *cofs = args->cof;
+-   long degree = args->degree;
+--  long iter = args->sturm; 
+-   ratpoints_interval *ivlist = args->domain;
+-   long num_iv = args->num_inter;
+-   long n, m, k, new_num;
+-@@ -165,75 +233,12 @@ long _ratpoints_compute_sturm(ratpoints_args *args)
+-   /* recall: typedef struct {double low; double up;} ratpoints_interval; */
+-   { ratpoints_interval ivlocal[1 + (degree>>1)];
+-     ratpoints_interval *iptr = &ivlocal[0];
+--    long max = (long)(((unsigned long)(-1))>>1);
+--    long min = -max;
+-     long num_intervals;
+-     long slcf = mpz_cmp_si(cofs[degree], 0);
+- 
+--    /* recursive helper function */
+--    void iterate(long nl, long nr, long del, long der, long cleft, long cright,
+--                 long sl, long sr, long depth)
+--    { /* nl/2^del, nr/2^der : interval left/right endpoints,
+--         cleft, cright: sign change counts at endpoints,
+--         sl, sr: signs at endpoints,
+--         depth: iteration depth */
+--      if(cleft == cright && sl < 0) { return; }
+--         /* here we know the polynomial is negative on the interval */
+--      if((cleft == cright && sl > 0) || depth >= iter) 
+--      /* we have to add/extend an interval if we either know that
+--         the polynomial is positive on the interval (first condition)
+--         or the maximal iteration depth has been reached (second condition) */
+--      { double l = ((double)nl)/((double)(1<<del));
+--        double u = ((double)nr)/((double)(1<<der));
+--        if(iptr == &ivlocal[0])
+--        { iptr->low = l; iptr->up  = u; iptr++; }
+--        else
+--        { if((iptr-1)->up == l) /* extend interval */
+--          { (iptr-1)->up = u; }
+--          else /* new interval */
+--          { iptr->low = l; iptr->up  = u; iptr++; }
+--        }
+--        return; 
+--      }
+--      /* now we must split the interval and evaluate the sturm sequence
+--         at the midpoint */
+--      { long nm, dem, s0, s1, s2, s, cmid = 0, n;
+--        if(nl == min)
+--        { if(nr == max) { nm = 0; dem = 0; }
+--          else { nm = (nr == 0) ? -1 : 2*nr; dem = 0; }
+--        }
+--        else
+--        { if(nr == max) { nm = (nl == 0) ? 1 : 2*nl; dem = 0; } 
+--          else /* "normal" case */
+--          { if(del == der) /* then both are zero */
+--            { if(((nl+nr) & 1) == 0) { nm = (nl+nr)>>1; dem = 0; }
+--              else { nm = nl+nr; dem = 1; } 
+--            }
+--            else /* here one de* is greater */
+--            { if(del > der) { nm = nl + (nr<<(del-der)); dem = del+1; }
+--              else { nm = (nl<<(der-del)) + nr; dem = der+1; }
+--            }
+--          }
+--        }
+--        s0 = eval_sign(args, sturm[0], sturm_degs[0], nm, dem);
+--        s1 = eval_sign(args, sturm[1], sturm_degs[1], nm, dem);
+--        if(s0*s1 == -1) { cmid++; }
+--        s = (s1 == 0) ? s0 : s1;
+--        for(n = 2; n <= k; n++)
+--        { s2 = eval_sign(args, sturm[n], sturm_degs[n], nm, dem);
+--          if(s2 == -s) { cmid++; s = s2; }
+--          else if(s2 != 0) { s = s2; }
+--        }
+--        /* now recurse */
+--        iterate(nl, nm, del, dem, cleft, (s0==0) ? (cmid+1) : cmid, 
+--                sl, (s0==0) ? -s1 : s0, depth+1);
+--        iterate(nm, nr, dem, der, cmid, cright, 
+--                (s0==0) ? s1 : s0, sr, depth+1);
+--      }
+--    } /* end iterate() */
+--
+-     iterate(min, max, 0, 0, count2, count1, 
+--            (degree & 1) ? -slcf : slcf, slcf, 0);
+-+            (degree & 1) ? -slcf : slcf, slcf, 0,
+-+	    &iptr, &ivlocal[0], args, k, sturm_degs, sturm);
+-     num_intervals = iptr - &ivlocal[0];
+-     /* intersect with given intervals */
+-     { ratpoints_interval local_copy[num_iv];
+diff --git a/build/pkgs/ratpoints/spkg-install.in b/build/pkgs/ratpoints/spkg-install.in
+deleted file mode 100644
+index b6856c4d4a..0000000000
+--- a/build/pkgs/ratpoints/spkg-install.in
++++ /dev/null
+@@ -1,46 +0,0 @@
+-PRIME_SIZE=7
+-
+-CCFLAGS_NO_SSE="-I$SAGE_LOCAL/include -Wall -O2 -fPIC -DRATPOINTS_MAX_BITS_IN_PRIME=$PRIME_SIZE"
+-CCFLAGS2="-L$SAGE_LOCAL/lib -lgmp -lm $LDFLAGS"
+-CCFLAGS3="-L. -lratpoints"
+-
+-if [[ "$UNAME" = "Darwin" ]]; then
+-    CCFLAGS1="$CCFLAGS_NO_SSE"
+-    echo "Building without SSE2 instructions (MacOS X)."
+-else
+-    CCFLAGS1="$CCFLAGS_NO_SSE -DUSE_SSE"
+-    echo "Attempting to build ratpoints making use of SSE2 instructions."
+-fi
+-
+-# Copy CFLAGS set externally to CCFLAGS.
+-CCFLAGS="$CFLAGS"
+-
+-export CCFLAGS1
+-export CCFLAGS2
+-export CCFLAGS3
+-export CCFLAGS
+-
+-cd src/
+-
+-#############################
+-# Build (just) the library: #
+-#############################
+-
+-# PLEASE, don't break this again by deleting "libratpoints.a".  See trac 8267.
+-if ! $MAKE libratpoints.a; then
+-    [ "$UNAME" = "Darwin" ] && sdh_die "Error building ratpoints."
+-    echo "Build failed. Trying without SSE2 instructions."
+-    CCFLAGS1="$CCFLAGS_NO_SSE"
+-    sdh_make libratpoints.a
+-fi
+-
+-##############################################
+-# Install (just) the library and its header: #
+-##############################################
+-
+-# The following requires that the Makefile got patched;
+-# otherwise one could pass 'INSTALL_DIR=...' on the 'make'
+-# command line:
+-export INSTALL_DIR="$SAGE_DESTDIR_LOCAL"
+-mkdir -p "$INSTALL_DIR"/{lib,include}
+-sdh_make install-lib
+diff --git a/build/pkgs/ratpoints/type b/build/pkgs/ratpoints/type
+deleted file mode 100644
+index a6a7b9cd72..0000000000
+--- a/build/pkgs/ratpoints/type
++++ /dev/null
+@@ -1 +0,0 @@
+-standard
+diff --git a/build/pkgs/sagelib/dependencies b/build/pkgs/sagelib/dependencies
+index 9c7797b1f4..6a7d4b8132 100644
+--- a/build/pkgs/sagelib/dependencies
++++ b/build/pkgs/sagelib/dependencies
+@@ -1,4 +1,4 @@
+-FORCE $(SCRIPTS) arb boost_cropped $(BLAS) brial cliquer cypari cysignals cython ecl eclib ecm flint libgd gap giac givaro glpk gmpy2 gsl iml jinja2 jupyter_core lcalc lrcalc libbraiding libhomfly libpng linbox m4ri m4rie memory_allocator mpc mpfi mpfr $(MP_LIBRARY) ntl numpy pari pip pkgconfig planarity ppl pplpy primesieve primecount primecountpy pycygwin $(PYTHON) ratpoints requests rw sage_conf singular symmetrica zn_poly $(PCFILES) | $(PYTHON_TOOLCHAIN) sage_setup
++FORCE $(SCRIPTS) arb boost_cropped $(BLAS) brial cliquer cypari cysignals cython ecl eclib ecm flint libgd gap giac givaro glpk gmpy2 gsl iml jinja2 jupyter_core lcalc lrcalc libbraiding libhomfly libpng linbox m4ri m4rie memory_allocator mpc mpfi mpfr $(MP_LIBRARY) ntl numpy pari pip pkgconfig planarity ppl pplpy primesieve primecount primecountpy pycygwin $(PYTHON) requests rw sage_conf singular symmetrica zn_poly $(PCFILES) | $(PYTHON_TOOLCHAIN) sage_setup
+ 
+ ----------
+ All lines of this file are ignored except the first.
+diff --git a/src/sage/libs/ratpoints.pxd b/src/sage/libs/ratpoints.pxd
+deleted file mode 100644
+index 67e309b109..0000000000
+--- a/src/sage/libs/ratpoints.pxd
++++ /dev/null
+@@ -1,74 +0,0 @@
+-from sage.rings.integer cimport Integer
+-from sage.libs.gmp.mpz cimport *
+-
+-cdef extern from "ratpoints.h":
+-    long RATPOINTS_MAX_DEGREE
+-    long RATPOINTS_ARRAY_SIZE
+-    long RATPOINTS_DEFAULT_SP1
+-    long RATPOINTS_DEFAULT_SP2
+-    long RATPOINTS_DEFAULT_NUM_PRIMES
+-    long RATPOINTS_DEFAULT_MAX_FORBIDDEN
+-    long RATPOINTS_DEFAULT_STURM
+-    long RATPOINTS_NON_SQUAREFREE
+-    long RATPOINTS_BAD_ARGS
+-
+-    # for args flags:
+-    long RATPOINTS_NO_CHECK # when set, do not check whether the surviving
+-                            # x-coordinates give rise to rational points
+-    long RATPOINTS_NO_Y # when set, only list x coordinates instead of actual points
+-    long RATPOINTS_NO_REVERSE # when set, do not modify the mpz_t array
+-    long RATPOINTS_NO_JACOBI # when set, prevent use of Jacobi symbol test
+-    long RATPOINTS_VERBOSE # when set, print some output on what ratpoints is doing
+-    # define RATPOINTS_FLAGS_INPUT_MASK \
+-    # (RATPOINTS_NO_CHECK | RATPOINTS_NO_Y | RATPOINTS_NO_REVERSE | \
+-    #  RATPOINTS_NO_JACOBI | RATPOINTS_VERBOSE)
+-
+-
+-    ctypedef struct ratpoints_interval:
+-        double low
+-        double up
+-    ctypedef struct ratpoints_args:
+-        mpz_t *cof
+-        long degree
+-        long height
+-        ratpoints_interval *domain
+-        long num_inter
+-        long b_low
+-        long b_high
+-        long sp1
+-        long sp2
+-        long array_size
+-        long sturm
+-        long num_primes
+-        long max_forbidden
+-        unsigned int flags
+-        # from here: private data
+-        # mpz_t *work
+-        # void *se_buffer
+-        # void *se_next
+-        # void *ba_buffer
+-        # void *ba_next
+-        # int *int_buffer
+-        # int *int_next
+-        # void *sieve_list
+-    long find_points(ratpoints_args*, int proc(long, long, mpz_t, void*, int*), void*)
+-    void find_points_init(ratpoints_args*)
+-    long find_points_work(ratpoints_args*, int proc(long, long, mpz_t, void*, int*), void*)
+-    void find_points_clear(ratpoints_args*)
+-
+-ctypedef struct point_list:
+-    long *xes
+-    mpz_t *ys
+-    long *zs
+-    long array_size
+-    long num_points
+-    long max_num_points
+-
+-ctypedef struct info_struct_exists_only:
+-    int verbose
+-
+-cdef int ratpoints_mpz_exists_only(mpz_t *, long, int, bint) except -1
+-
+-
+-
+-
+diff --git a/src/sage/libs/ratpoints.pyx b/src/sage/libs/ratpoints.pyx
+deleted file mode 100644
+index 257dfe3eeb..0000000000
+--- a/src/sage/libs/ratpoints.pyx
++++ /dev/null
+@@ -1,283 +0,0 @@
+-# distutils: libraries = ratpoints
+-r"""
+-Hyperelliptic Curve Point Finding, via ratpoints (deprecated)
+-
+-This module is deprecated, use PARI instead::
+-
+-    sage: pari(EllipticCurve("389a1")).ellratpoints(4)
+-    [[-2, 0], [-2, -1], [-1, 1], [-1, -2], [0, 0], [0, -1], [1, 0], [1, -1], [3, 5], [3, -6], [4, 8], [4, -9], [-3/4, 7/8], [-3/4, -15/8]]
+-    sage: pari("[x^3 + x^2 - 2*x, 1]").hyperellratpoints(4)
+-    [[-2, 0], [-2, -1], [-1, 1], [-1, -2], [0, 0], [0, -1], [1, 0], [1, -1], [3, 5], [3, -6], [4, 8], [4, -9], [-3/4, 7/8], [-3/4, -15/8]]
+-"""
+-
+-from cysignals.memory cimport sig_malloc, sig_realloc, sig_free
+-from cysignals.signals cimport sig_on, sig_off
+-
+-from sage.misc.superseded import deprecation_cython as deprecation
+-deprecation(24531, "the module sage.libs.ratpoints is deprecated; use pari.ellratpoints or pari.hyperellratpoints instead")
+-
+-
+-cdef int process(long x, long z, mpz_t y, void *info0, int *quit):
+-    # ratpoints calls this function when it finds a point [x : y : z]
+-    # info0 is the pointer passed to ratpoints originally
+-    # if quit[0] is set to a nonzero value, ratpoints will abort immediately
+-    cdef point_list *plist = <point_list *> info0
+-    cdef long i
+-    if plist.array_size == plist.num_points:
+-        i = plist.array_size
+-        plist.array_size *= 2
+-        plist.xes = <long *> sig_realloc(plist.xes, plist.array_size * sizeof(long))
+-        plist.ys = <mpz_t *> sig_realloc(plist.ys, plist.array_size * sizeof(mpz_t))
+-        plist.zs = <long *> sig_realloc(plist.zs, plist.array_size * sizeof(long))
+-        while i < plist.array_size:
+-            mpz_init(plist.ys[i])
+-            i += 1
+-    plist.xes[plist.num_points] = x
+-    mpz_set(plist.ys[plist.num_points], y)
+-    plist.zs[plist.num_points] = z
+-    plist.num_points += 1
+-    if plist.max_num_points > 0:
+-        if plist.max_num_points == plist.num_points:
+-            quit[0] = -1
+-    return 1 # weight for counting the points
+-
+-def ratpoints(list coeffs, long H, verbose=False, long max=0,
+-              min_x_denom=None, max_x_denom=None, intervals=[]):
+-    """
+-    Access the ratpoints library to find points on the hyperelliptic curve:
+-
+-    `y^2 = a_n x^n + \cdots + a_1 x + a_0.`
+-
+-    INPUT:
+-
+-    - ``coeffs`` -- list of integer coefficients `a_0` , `a_1`, ..., `a_n`
+-
+-    - ``H`` -- the bound for the denominator and the absolute value of the
+-      numerator of the `x`-coordinate
+-
+-    - ``verbose`` -- if ``True``, ratpoints will print comments about
+-      its progress
+-
+-    - ``max`` -- maximum number of points to find (if 0, find all of them)
+-
+-    OUTPUT:
+-
+-    The points output by this program are points in (1, ceil(n/2), 1)-weighted
+-    projective space. If n is even, then the associated homogeneous equation is
+-    `y^2 = a_n x^n + \cdots + a_1 x z^{n-1} + a_0 z^n` while if n is odd, it is
+-    `y^2 = a_n x^n z + \cdots + a_1 x z^n + a_0 z^{n+1}`.
+-
+-    EXAMPLES::
+-
+-        sage: from sage.libs.ratpoints import ratpoints
+-        doctest:...: DeprecationWarning: the module sage.libs.ratpoints is deprecated; use pari.ellratpoints or pari.hyperellratpoints instead
+-        See http://trac.sagemath.org/24531 for details.
+-        sage: for x,y,z in ratpoints([1..6], 200):
+-        ....:     print(-1*y^2 + 1*z^6 + 2*x*z^5 + 3*x^2*z^4 + 4*x^3*z^3 + 5*x^4*z^2 + 6*x^5*z)
+-        0
+-        0
+-        0
+-        0
+-        0
+-        0
+-        0
+-        sage: for x,y,z in ratpoints([1..5], 200):
+-        ....:    print(-1*y^2 + 1*z^4 + 2*x*z^3 + 3*x^2*z^2 + 4*x^3*z + 5*x^4)
+-        0
+-        0
+-        0
+-        0
+-        0
+-        0
+-        0
+-        0
+-
+-        sage: for x,y,z in ratpoints([1..200], 1000):
+-        ....:    print("{} {} {}".format(x,y,z))
+-        1 0 0
+-        0 1 1
+-        0 -1 1
+-        201 25353012004564588029934064107520000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 200
+-        201 -25353012004564588029934064107520000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 200
+-
+-    The denominator of `x` can be restricted, for example to find
+-    integral points::
+-
+-        sage: from sage.libs.ratpoints import ratpoints
+-        sage: coeffs = [400, -112, 0, 1]
+-        sage: ratpoints(coeffs, 10^6, max_x_denom=1, intervals=[[-10,0],[1000,2000]])
+-        [(1, 0, 0), (-8, 28, 1), (-8, -28, 1), (-7, 29, 1), (-7, -29, 1),
+-         (-4, 28, 1), (-4, -28, 1), (0, 20, 1), (0, -20, 1), (1368, 50596, 1),
+-         (1368, -50596, 1), (1624, 65444, 1), (1624, -65444, 1)]
+-
+-        sage: ratpoints(coeffs, 1000, min_x_denom=100, max_x_denom=200)
+-        [(1, 0, 0),
+-        (-656, 426316, 121),
+-        (-656, -426316, 121),
+-        (452, 85052, 121),
+-        (452, -85052, 121),
+-        (988, 80036, 121),
+-        (988, -80036, 121),
+-        (-556, 773188, 169),
+-        (-556, -773188, 169),
+-        (264, 432068, 169),
+-        (264, -432068, 169)]
+-
+-    Finding the integral points on the compact component of an elliptic curve::
+-
+-        sage: E = EllipticCurve([0,1,0,-35220,-1346400])
+-        sage: e1, e2, e3 = E.division_polynomial(2).roots(multiplicities=False)
+-        sage: coeffs = [E.a6(),E.a4(),E.a2(),1]
+-        sage: ratpoints(coeffs, 1000, max_x_denom=1, intervals=[[e3,e2]])
+-        [(1, 0, 0),
+-        (-165, 0, 1),
+-        (-162, 366, 1),
+-        (-162, -366, 1),
+-        (-120, 1080, 1),
+-        (-120, -1080, 1),
+-        (-90, 1050, 1),
+-        (-90, -1050, 1),
+-        (-85, 1020, 1),
+-        (-85, -1020, 1),
+-        (-42, 246, 1),
+-        (-42, -246, 1),
+-        (-40, 0, 1)]
+-    """
+-    cdef ratpoints_args args
+-    cdef long i, total, verby
+-    cdef Integer sage_int, s_x, s_y, s_z
+-    cdef point_list *plist
+-
+-
+-    verby = ~0 if verbose else 0
+-
+-    # Set the coefficient array:
+-    coeffs = [Integer(a) for a in coeffs]
+-    args.degree = len(coeffs)-1
+-    args.cof = <mpz_t *> sig_malloc((args.degree+1) * sizeof(mpz_t))
+-
+-    # Create an array to hold the points found:
+-    plist = <point_list *> sig_malloc(sizeof(point_list))
+-    if max == 0:
+-        plist.array_size = 64
+-    else:
+-        plist.array_size = max
+-    plist.xes = <long *> sig_malloc(plist.array_size * sizeof(long))
+-    plist.ys = <mpz_t *> sig_malloc(plist.array_size * sizeof(mpz_t))
+-    for i from 0 <= i < plist.array_size:
+-        mpz_init(plist.ys[i])
+-    plist.zs = <long *> sig_malloc(plist.array_size * sizeof(long))
+-    plist.num_points = 0
+-    plist.max_num_points = max
+-
+-    # Set the height bound:
+-    args.height = H
+-
+-    # Set the intervals to be searched, including any specified:
+-    args.num_inter = len(intervals)
+-    args.domain = <ratpoints_interval *> sig_malloc((args.num_inter + args.degree) * sizeof(ratpoints_interval))
+-    for i,I in enumerate(intervals):
+-        args.domain[i].low = I[0]
+-        args.domain[i].up  = I[1]
+-
+-    # Set the minimum and maximum denominators:
+-    if not min_x_denom:  min_x_denom = 1
+-    if not max_x_denom:  max_x_denom = H
+-    args.b_low = min_x_denom
+-    args.b_high = max_x_denom
+-
+-    # Set the remaining arguments, whose non-default use is technical
+-    # (see ratpoints documentation)
+-    args.sp1 = RATPOINTS_DEFAULT_SP1
+-    args.sp2 = RATPOINTS_DEFAULT_SP2
+-    args.array_size = RATPOINTS_ARRAY_SIZE
+-    args.sturm = RATPOINTS_DEFAULT_STURM
+-    args.num_primes = RATPOINTS_DEFAULT_NUM_PRIMES
+-    args.max_forbidden = RATPOINTS_DEFAULT_MAX_FORBIDDEN
+-    args.flags = (RATPOINTS_VERBOSE & verby)
+-
+-    for i from 0 <= i <= args.degree:
+-        mpz_init(args.cof[i])
+-        sage_int = <Integer> coeffs[i]
+-        mpz_set(args.cof[i], sage_int.value)
+-
+-    sig_on()
+-    total = find_points(&args, process, <void *>plist)
+-    sig_off()
+-    if total == RATPOINTS_NON_SQUAREFREE:
+-        raise RuntimeError('Polynomial must be square-free')
+-    if total == RATPOINTS_BAD_ARGS:
+-        raise RuntimeError('Bad arguments to ratpoints')
+-
+-    for i from 0 <= i <= args.degree:
+-        mpz_clear(args.cof[i])
+-
+-    sig_free(args.cof)
+-    sig_free(args.domain)
+-
+-    cdef list L = []
+-    for i from 0 <= i < plist.num_points:
+-        s_x = Integer(0)
+-        s_y = Integer(0)
+-        s_z = Integer(0)
+-        mpz_set_si(s_x.value, plist.xes[i])
+-        mpz_set(s_y.value, plist.ys[i])
+-        mpz_set_si(s_z.value, plist.zs[i])
+-        L.append((s_x,s_y,s_z))
+-
+-    for i from 0 <= i < plist.array_size:
+-        mpz_clear(plist.ys[i])
+-    sig_free(plist.xes)
+-    sig_free(plist.ys)
+-    sig_free(plist.zs)
+-    sig_free(plist)
+-
+-    return L
+-
+-cdef int process_exists_only(long x, long z, mpz_t y, void *info0, int *quit):
+-    cdef info_struct_exists_only *info_s = <info_struct_exists_only *>info0
+-    cdef Integer YY
+-    if info_s.verbose:
+-        YY = Integer(0); mpz_set(YY.value, y)
+-        print('Found point [ %d : %d : %d ], quitting' % (x, YY, z))
+-    quit[0] = -1
+-    return 1
+-
+-cdef int ratpoints_mpz_exists_only(mpz_t *coeffs, long H, int degree, bint verbose) except -1:
+-    """
+-    Direct call to ratpoints to search for existence only.
+-
+-    WARNING - The coefficient array will be modified by ratpoints.
+-    """
+-    cdef ratpoints_args args
+-    cdef info_struct_exists_only info_s
+-    cdef long total, verby = ~0 if verbose else 0
+-    info_s.verbose = verbose
+-    assert degree <= RATPOINTS_MAX_DEGREE
+-    args.degree = degree
+-    args.cof = coeffs
+-    args.domain = <ratpoints_interval *> sig_malloc(2*args.degree * sizeof(ratpoints_interval))
+-    args.height = H
+-    args.num_inter = 0
+-    args.b_low = 1
+-    args.b_high = H
+-    args.sp1 = RATPOINTS_DEFAULT_SP1
+-    args.sp2 = RATPOINTS_DEFAULT_SP2
+-    args.array_size = RATPOINTS_ARRAY_SIZE
+-    args.sturm = RATPOINTS_DEFAULT_STURM
+-    args.num_primes = RATPOINTS_DEFAULT_NUM_PRIMES
+-    args.max_forbidden = RATPOINTS_DEFAULT_MAX_FORBIDDEN
+-    args.flags = (RATPOINTS_VERBOSE & verby)
+-    sig_on()
+-    total = find_points(&args, process_exists_only, <void *>(&info_s))
+-    sig_off()
+-    sig_free(args.domain)
+-    if total == RATPOINTS_NON_SQUAREFREE:
+-        raise RuntimeError('Polynomial must be square-free')
+-    if total == RATPOINTS_BAD_ARGS:
+-        raise RuntimeError('Bad arguments to ratpoints')
+-    return 1 if (total > 0) else 0
+-
+-
+-
+-
+diff --git a/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx b/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx
+index 1cc70925fa..c2f994a650 100644
+--- a/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx
++++ b/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx
+@@ -1,5 +1,3 @@
+-# distutils: libraries = ratpoints
+-
+ r"""
+ Descent on elliptic curves over `\QQ` with a 2-isogeny
+ """
+diff --git a/src/sage_setup/library_order.py b/src/sage_setup/library_order.py
+index 8830d44a95..0b450b3723 100644
+--- a/src/sage_setup/library_order.py
++++ b/src/sage_setup/library_order.py
+@@ -25,7 +25,7 @@ library_order_list = aliases.get("SINGULAR_LIBRARIES", []) + [
+     "giac", "intl", "curl",
+     "ec", "ecm"
+ ] + aliases.get("LINBOX_LIBRARIES", []) + aliases.get("FFLASFFPACK_LIBRARIES", []) + aliases.get("GSL_LIBRARIES", []) + [
+-    "pari", "flint", "ratpoints", "ecl", "glpk", "ppl",
++    "pari", "flint", "ecl", "glpk", "ppl",
+ ] + arb_dylib_names + [
+     "mpfi", "mpfr", "mpc", "ntl", "gmp", "gmpxx",
+     "brial",
+-- 
+2.34.1
+
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 8f27de532058..d3ebd921210d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -32,64 +32,26 @@ _SAGE_ROOT=/usr/lib/sage-${version}
 
 _SAGE_UPSTREAM_MIRROR=https://mirrors.mit.edu/sage/spkg/upstream
 
-# packages were sage is the upstream
-_upstream="
- ${_SAGE_UPSTREAM_MIRROR}/combinatorial_designs/combinatorial_designs-20140630.tar.bz2
- ${_SAGE_UPSTREAM_MIRROR}/conway_polynomials/conway_polynomials-0.5.tar.bz2
- ${_SAGE_UPSTREAM_MIRROR}/elliptic_curves/elliptic_curves-0.8.1.tar.bz2
- ${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
- ${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
- ${_SAGE_UPSTREAM_MIRROR}/polytopes_db/polytopes_db-20170220.tar.bz2
- ${_SAGE_UPSTREAM_MIRROR}/ratpoints/ratpoints-2.1.3.tar.bz2
- ${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
- ${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
-"
-checksum+="
- c9486c6d7ec71da338589a6e301723be4e55e02dcfc41f8dba11a682e3b3482e
- d8f2788a85b1c2482cc4abe1a35d3da777445e21ec49b031d36b899e3c0deb17
- 5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50
- ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
- 169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
- cb788bdfca6e00864ec0bfa67932a68ae68bfeb9c527a91be90ad218026a0ce0
- edd3238422f47661b8a556f0241f36d619584d2f055efa1f96c749d1403abe1e
- b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
- cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
-"
-
-# packages from pypi (python modules)
-_upstream+="
-
- ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
- ${PYPI_SITE}/m/memory_allocator/memory_allocator-0.1.1.tar.gz
- ${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz
-
- ${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
- ${PYPI_SITE}/v/vcversioner/vcversioner-2.16.0.0.tar.gz
-"
-checksum+="
-
- d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
- 5641bea96b9e59a173639c118c2745fe16014c60012117ddf29c18abbb713408
- 78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
-
- ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
- dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b
-"
-
-# other upstream packages
-_upstream+="
- http://users.ox.ac.uk/~coml0531/sage/graphs-20210214.tar.bz2
- https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
- https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz
+# these packages can be used from system
+_spkg_system="
+ cppy
+ cython
+ cysignals
+ cypari
+ pplpy
+ fpylll
+ memory_allocator
 "
-checksum+="
- 07237c0d9853611505c389fd7bb92500c8743f5631babb4d0f45dfd8332f3741
- 3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
- 718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
+# databases to be used from system
+_databases="
+ combinatorial_designs
+ conway_polynomials
+ elliptic_curves
+ graphs
+ polytopes_db
 "
-
-# these packages are not needed, don't install
-_dontinstall="
+### these packages are not needed, skip
+_spkg_skip="
  appnope
  fonttools
  importlib_resources
@@ -98,18 +60,60 @@ _dontinstall="
  setuptools_wheel
  sphinxcontrib_websupport
  pplpy_doc
+ vcversioner
 "
 
-# these packages can be used from system
-_usefromsystem="
- cppy
- cython
- cysignals
- cypari
- pplpy
- fpylll
+_upstream=""
+
+# threejs
+_upstream+=" https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz"
+checksum+=" 718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8"
+_need_to_pass_doctests="
+ threejs
 "
 
+# primecountpy (use from system?)
+_upstream+=" ${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz"
+checksum+=" 78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676"
+_need_to_build="
+ primecountpy
+"
+
+### these might be necessary to run the notebook... for now skip as doctest pass
+_spkg_skip+="
+ jmol
+ mathjax
+ sagenb_export
+ thebe
+ sagetex
+ jupyter_jsmol
+ rpy2
+"
+#_upstream+="
+# ${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
+# ${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
+# ${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
+# ${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
+# https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
+# ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
+# ${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
+#"
+#checksum+="
+# ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
+# 169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
+# b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
+# cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
+# 3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
+# d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
+# ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
+#"
+
+for db in $_databases; do
+	_spkg_system+=" $db"
+	depends+=" sage-data-$db"
+	checkdepends+=" sage-data-$db"
+done
+
 for u in ${_upstream}; do
 	distfiles+=" $u"
 	skip_extraction+=" ${u##*[/>]}"
@@ -152,12 +156,12 @@ post_patch() {
 }
 
 pre_configure() {
-	for spkg in $_dontinstall; do
+	for spkg in $_spkg_skip; do
 		configure_args+=" sage_spkg_install_$spkg=no"
 		configure_args+=" sage_require_$spkg=no"
 	done
 
-	for spkg in $_usefromsystem; do
+	for spkg in $_spkg_system; do
 		configure_args+=" sage_spkg_install_$spkg=no"
 		configure_args+=" sage_require_$spkg=yes"
 	done
@@ -174,6 +178,13 @@ post_configure() {
 	cat <<-EOF >> pkgs/sage-conf/sage_conf.py
 	GAP_ROOT_DIR = "/usr/share/gap"
 	GAP_SO = "$(objdump -p /usr/lib/libgap.so | awk '/SONAME/{print $2}')"
+	CONWAY_POLYNOMIALS_DATA_DIR = "/usr/share/sagemath/conway_polynomials"
+	GRAPHS_DATA_DIR = "/usr/share/sagemath/graphs"
+	ELLCURVE_DATA_DIR = "/usr/share/sagemath/ellcurves"
+	POLYTOPE_DATA_DIR = "/usr/share/sagemath/reflexive_polytopes"
+	COMBINATORIAL_DESIGN_DATA_DIR = "/usr/share/sagemath/combinatorial_designs"
+	CREMONA_MINI_DATA_DIR = "/usr/share/sagemath/cremona"
+	CREMONA_LARGE_DATA_DIR = "/usr/share/sagemath/cremona"
 	EOF
 }
 
@@ -213,9 +224,9 @@ do_check() {
 	cp ${FILESDIR}/timings2.json .
 	_test_args="--stats_path=timings2.json"
 	if [ "$XBPS_CHECK_PKGS" = full ]; then
-		_test_args+=" --long --warn-long 20.0"
+		_test_args+=" --long --warn-long 60.0"
 	else
-		_test_args+=" --warn-long 10.0"
+		_test_args+=" --warn-long 30.0"
 	fi
 	if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
 		# for CI use a predictable random seed
@@ -308,7 +319,10 @@ _sage_python3_modules="
  python3-cypari2
  python3-pplpy
  python3-fpylll
- "
+
+ python3-primecountpy
+ python3-memory_allocator
+"
 
 # python packages are build and runtime dependencies
 makedepends+=" $_sage_python3_modules"

From cded95032de2b936654702c590b84f5713aae053 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 18 Jan 2022 06:55:53 -0300
Subject: [PATCH 60/67] sagemath: fix do_install()

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

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index d3ebd921210d..4d63eabac13c 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -63,10 +63,8 @@ _spkg_skip="
  vcversioner
 "
 
-_upstream=""
-
 # threejs
-_upstream+=" https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz"
+_upstream="https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz"
 checksum+=" 718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8"
 _need_to_pass_doctests="
  threejs
@@ -198,7 +196,7 @@ do_install() {
 		vcopy local/$f $_SAGE_ROOT/local
 	done
 	vmkdir $_SAGE_ROOT/$(readlink venv)
-	for f in pyvenv.cfg bin etc lib share; do
+	for f in pyvenv.cfg bin lib share; do
 		vcopy venv/$f $_SAGE_ROOT/venv/
 	done
 	vcopy "src" $_SAGE_ROOT # only src/sage ?

From a75e3464ad5637f35a98a0fc01d8d588f5253566 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 18 Jan 2022 16:11:37 -0300
Subject: [PATCH 61/67] sagemath: minor adjustments in do_check()

---
 srcpkgs/sagemath-test/template | 9 +++++----
 srcpkgs/sagemath/template      | 5 +++--
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/srcpkgs/sagemath-test/template b/srcpkgs/sagemath-test/template
index e3b1242bd338..1e6c76274a4d 100644
--- a/srcpkgs/sagemath-test/template
+++ b/srcpkgs/sagemath-test/template
@@ -15,17 +15,18 @@ homepage="none"
 do_check() {
 	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
 		_test_files=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
-	else
+	fi
+	if [ -z "$_test_files" ]; then
 		_test_files=--all
 	fi
 	cp ${FILESDIR}/timings2.json .
 	_test_args="--stats_path=timings2.json"
 	if [ "$XBPS_CHECK_PKGS" = full ]; then
-		_test_args+=" --long --warn-long 20.0"
+		_test_args+=" --long --warn-long 60.0"
 	else
-		_test_args+=" --warn-long 10.0"
+		_test_args+=" --warn-long 30.0"
 	fi
-	if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
+	if [ "$XBPS_BUILD_ENVIRONMENT" = "void-packages-ci" ]; then
 		# for CI use a predictable random seed
 		_test_args+=" --random-seed=0"
 	fi
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 4d63eabac13c..fff7fe860af3 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -216,7 +216,8 @@ do_install() {
 do_check() {
 	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
 		_test_files=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
-	else
+	fi
+	if [ -z "$_test_files" ]; then
 		_test_files=--all
 	fi
 	cp ${FILESDIR}/timings2.json .
@@ -226,7 +227,7 @@ do_check() {
 	else
 		_test_args+=" --warn-long 30.0"
 	fi
-	if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
+	if [ "$XBPS_BUILD_ENVIRONMENT" = "void-packages-ci" ]; then
 		# for CI use a predictable random seed
 		_test_args+=" --random-seed=0"
 	fi

From b760c9d856b25fbb1410320a108b45b396f4f17a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 18 Jan 2022 16:14:10 -0300
Subject: [PATCH 62/67] sagemath: use system primecountpy

---
 srcpkgs/sagemath/patches/zzz-fix_no_SAGE_BIN.patch  | 12 ++++++++++++
 .../sagemath/patches/zzz-fix_no_venv_packages.patch | 13 +++++++++++++
 srcpkgs/sagemath/template                           |  8 +-------
 3 files changed, 26 insertions(+), 7 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/zzz-fix_no_SAGE_BIN.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-fix_no_venv_packages.patch

diff --git a/srcpkgs/sagemath/patches/zzz-fix_no_SAGE_BIN.patch b/srcpkgs/sagemath/patches/zzz-fix_no_SAGE_BIN.patch
new file mode 100644
index 000000000000..ac80085bd6b4
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fix_no_SAGE_BIN.patch
@@ -0,0 +1,12 @@
+--- a/src/sage/misc/dist.py
++++ b/src/sage/misc/dist.py
+@@ -108,7 +108,8 @@ def install_scripts(directory=None, ignore_existing=False):
+     PATH = os.environ['PATH'].split(os.pathsep)
+     PATH = [d for d in PATH if os.path.exists(d)]
+     dir_in_path = any(os.path.samefile(directory, d) for d in PATH)
+-    PATH = os.pathsep.join(d for d in PATH
++    if os.path.exists(SAGE_BIN):
++        PATH = os.pathsep.join(d for d in PATH
+                            if not os.path.samefile(d, SAGE_BIN))
+     for cmd in ['gap', 'gp', 'hg', 'ipython', 'maxima',
+                 'mwrank', 'R', 'singular', 'sqlite3', 'M2', 'kash']:
diff --git a/srcpkgs/sagemath/patches/zzz-fix_no_venv_packages.patch b/srcpkgs/sagemath/patches/zzz-fix_no_venv_packages.patch
new file mode 100644
index 000000000000..7b19169a91d9
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fix_no_venv_packages.patch
@@ -0,0 +1,13 @@
+diff --git a/build/make/Makefile.in b/build/make/Makefile.in
+index 0baddba4ae..be363bea71 100644
+--- a/build/make/Makefile.in
++++ b/build/make/Makefile.in
+@@ -624,7 +624,7 @@ $(1)-$(4)-no-deps:
+ 		SAGE_SPKG_WHEELS=$$($(4))/var/lib/sage/wheels \
+ 		SAGE_INST_LOCAL=$$($(4)) \
+ 		sage-logger -p '$$(SAGE_ROOT)/build/pkgs/$(1)/spkg-install' '$$(SAGE_LOGS)/$(1)-$(2).log' && \
+-	    touch "$$($(4))/$(SPKG_INST_RELDIR)/$(1)-$(2)"; \
++	    mkdir -p "$$($(4))/$(SPKG_INST_RELDIR)" && touch "$$($(4))/$(SPKG_INST_RELDIR)/$(1)-$(2)"; \
+ 	else \
+ 	    echo; \
+ 	    echo "Error: $(1) is a dummy script package that the Sage distribution uses"; \
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index fff7fe860af3..cab3b99fd4f0 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -41,6 +41,7 @@ _spkg_system="
  pplpy
  fpylll
  memory_allocator
+ primecountpy
 "
 # databases to be used from system
 _databases="
@@ -70,13 +71,6 @@ _need_to_pass_doctests="
  threejs
 "
 
-# primecountpy (use from system?)
-_upstream+=" ${PYPI_SITE}/p/primecountpy/primecountpy-0.1.0.tar.gz"
-checksum+=" 78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676"
-_need_to_build="
- primecountpy
-"
-
 ### these might be necessary to run the notebook... for now skip as doctest pass
 _spkg_skip+="
  jmol

From e3ff7718d73df30de1076a62b1a55554f4642d38 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 18 Jan 2022 16:53:37 -0300
Subject: [PATCH 63/67] sagemath: no upstream packages, cleanup

---
 srcpkgs/sagemath/template | 126 +++++++++-----------------------------
 1 file changed, 29 insertions(+), 97 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index cab3b99fd4f0..83e484c31c58 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -30,85 +30,35 @@ desc_option_debug="Build with debug symbols"
 # path where sage will be installed
 _SAGE_ROOT=/usr/lib/sage-${version}
 
-_SAGE_UPSTREAM_MIRROR=https://mirrors.mit.edu/sage/spkg/upstream
-
-# these packages can be used from system
-_spkg_system="
- cppy
- cython
- cysignals
- cypari
- pplpy
- fpylll
- memory_allocator
- primecountpy
-"
-# databases to be used from system
-_databases="
- combinatorial_designs
- conway_polynomials
- elliptic_curves
- graphs
- polytopes_db
-"
-### these packages are not needed, skip
-_spkg_skip="
- appnope
- fonttools
- importlib_resources
- pycygwin
- setuptools_scm_git_archive
- setuptools_wheel
- sphinxcontrib_websupport
- pplpy_doc
- vcversioner
-"
-
-# threejs
-_upstream="https://github.com/sagemath/threejs-sage/archive/refs/tags/r122.tar.gz>threejs-sage-r122.tar.gz"
-checksum+=" 718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8"
-_need_to_pass_doctests="
- threejs
-"
+# Skip these sage packages: they are not needed
+_spkg_skip="appnope fonttools importlib_resources pycygwin
+ setuptools_scm_git_archive setuptools_wheel sphinxcontrib_websupport
+ pplpy_doc vcversioner
+ jmol mathjax sagenb_export thebe sagetex jupyter_jsmol rpy2 threejs"
+
+# Force use these sage packages from system
+_spkg_system="cppy cython cysignals cypari pplpy fpylll memory_allocator
+ primecountpy"
+
+# Databases to be used from system
+_spkg_db="combinatorial_designs conway_polynomials elliptic_curves graphs
+ polytopes_db"
+
+for spkg in $_spkg_skip; do
+	configure_args+=" sage_spkg_install_$spkg=no"
+	configure_args+=" sage_require_$spkg=no"
+done
 
-### these might be necessary to run the notebook... for now skip as doctest pass
-_spkg_skip+="
- jmol
- mathjax
- sagenb_export
- thebe
- sagetex
- jupyter_jsmol
- rpy2
-"
-#_upstream+="
-# ${_SAGE_UPSTREAM_MIRROR}/jmol/jmol-14.29.52.tar.bz2
-# ${_SAGE_UPSTREAM_MIRROR}/mathjax/mathjax-2.7.4.tar.gz
-# ${_SAGE_UPSTREAM_MIRROR}/sagenb_export/sagenb_export-3.3.tar.gz
-# ${_SAGE_UPSTREAM_MIRROR}/thebe/thebe-9624e0a0.zip
-# https://github.com/sagemath/sagetex/releases/download/v3.5/sagetex-3.5.tar.gz
-# ${PYPI_SITE}/j/jupyter_jsmol/jupyter_jsmol-0.2.4.tar.gz
-# ${PYPI_SITE}/r/rpy2/rpy2-3.3.6.tar.gz
-#"
-#checksum+="
-# ebf9cd42cd8e3839cf94ec11691b98a9b00917f3485a821291b76d7ecd6ffe9d
-# 169996cc6449c8d615043b07e1f20e9e3cd821de2325b5a250ef42142ea654b3
-# b642321ccd94da4d04afa12f33b6cea7c8db289f3283c6e39b3a50131780bb5a
-# cc1e407cbe0804f9644c207fecc074ed0fa389ba65f49da58e63fffe9bfe6923
-# 3a7454002ddff9bf862d139130c27de0416bbc2378e1f4de4eb50d805ee96779
-# d2ce38e95773345d0eceffed5ecb0e5d49fe61da5e922dea754c85799cc512b3
-# ce063f3286e717b3914728ad23ec7db0a0f117ba3ade5ada8a250700779f6e77
-#"
-
-for db in $_databases; do
-	_spkg_system+=" $db"
-	depends+=" sage-data-$db"
-	checkdepends+=" sage-data-$db"
+for spkg in $_spkg_system; do
+	configure_args+=" sage_spkg_install_$spkg=no"
+	configure_args+=" sage_require_$spkg=yes"
 done
 
-for u in ${_upstream}; do
-	distfiles+=" $u"
-	skip_extraction+=" ${u##*[/>]}"
+for spkg in $_spkg_db; do
+	configure_args+=" sage_spkg_install_$spkg=no"
+	configure_args+=" sage_require_$spkg=yes"
+	depends+=" sage-data-$spkg"
+	checkdepends+=" sage-data-$spkg"
 done
 
 # for now, just build native; we'll worry about cross later
@@ -148,16 +98,6 @@ post_patch() {
 }
 
 pre_configure() {
-	for spkg in $_spkg_skip; do
-		configure_args+=" sage_spkg_install_$spkg=no"
-		configure_args+=" sage_require_$spkg=no"
-	done
-
-	for spkg in $_spkg_system; do
-		configure_args+=" sage_spkg_install_$spkg=no"
-		configure_args+=" sage_require_$spkg=yes"
-	done
-
 	if [ "$build_option_debug" ]; then
 		export SAGE_DEBUG=yes
 	fi
@@ -232,7 +172,7 @@ do_check() {
 ### copied from sage-deps, to be kept in sync
 
 # hard dependencies
-makedepends+=" gcc make m4 perl binutils git tar libgomp-devel"
+makedepends="gcc make m4 perl binutils git tar libgomp-devel"
 
 # recommended dependencies
 makedepends+=" gcc-fortran openssl-devel"
@@ -305,16 +245,8 @@ _sage_python3_modules="
  python3-tzlocal python3-urllib3 python3-wcwidth python3-webencodings
  python3-wheel python3-zipp pythran
 
- python3-cvxopt
- python3-cppy
- python3-Cython
- python3-cysignals
- python3-cypari2
- python3-pplpy
- python3-fpylll
-
- python3-primecountpy
- python3-memory_allocator
+ python3-cvxopt python3-cppy python3-Cython python3-cysignals python3-cypari2
+ python3-pplpy python3-fpylll python3-primecountpy python3-memory_allocator
 "
 
 # python packages are build and runtime dependencies

From 40c159cc8cd917bc764483f2f968216dc14b7fed Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 18 Jan 2022 16:56:23 -0300
Subject: [PATCH 64/67] arb: update to 2.22.0.

---
 srcpkgs/arb/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/arb/template b/srcpkgs/arb/template
index fc99c3cebff6..6bc7c9a84738 100644
--- a/srcpkgs/arb/template
+++ b/srcpkgs/arb/template
@@ -1,6 +1,6 @@
 # Template file for 'arb'
 pkgname=arb
-version=2.21.1
+version=2.22.0
 revision=1
 build_style=configure
 configure_args="--prefix=/usr --with-gmp=/usr --with-mpfr=/usr --with-flint=/usr"
@@ -11,7 +11,7 @@ license="LGPL-2.1-or-later"
 homepage="https://arblib.org"
 changelog="https://raw.githubusercontent.com/fredrik-johansson/arb/master/doc/source/history.rst"
 distfiles="https://github.com/fredrik-johansson/arb/archive/${version}.tar.gz"
-checksum=aecc9f55eb35a00a2490e9a7536a0babf8ac86bb13d32a4a95e1216f9f5cbfa8
+checksum=3e40ab8cf61c0cd63d5901064d73eaa2d04727bbdc6eebb1727997958a14f24d
 
 CFLAGS="-D_GNU_SOURCE" # needed for cpu_set_t
 

From b723f8739ad00dcb49a4a2237d818a407d88f767 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 18 Jan 2022 17:06:51 -0300
Subject: [PATCH 65/67] igraph: update to 0.9.6.

---
 srcpkgs/igraph/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/igraph/template b/srcpkgs/igraph/template
index bc7fbef4447f..f131886aae63 100644
--- a/srcpkgs/igraph/template
+++ b/srcpkgs/igraph/template
@@ -1,6 +1,6 @@
 # Template file for 'igraph'
 pkgname=igraph
-version=0.9.5
+version=0.9.6
 revision=1
 build_style=cmake
 configure_args="-DIGRAPH_ENABLE_TLS=on -DIGRAPH_ENABLE_LTO=on -DBUILD_SHARED_LIBS=ON"
@@ -12,7 +12,7 @@ license="GPL-2.0-or-later"
 homepage="https://igraph.org/c/"
 changelog="https://raw.githubusercontent.com/igraph/igraph/master/CHANGELOG.md"
 distfiles="https://github.com/igraph/igraph/releases/download/${version}/igraph-${version}.tar.gz"
-checksum=c4e3f67892e1e287865d799162406b3f94916ad6f2cc069a9239e36ca495a17a
+checksum=7c299ec54eecfe413758c332a42c4cb71d02d2951b2ac232584d317c5792f387
 
 igraph-devel_package() {
 	depends="${makedepends} ${sourcepkg}>=${version}_${revision}"

From ca7543aa2024fd860ac273e2a1e5a281a9054eb1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 18 Jan 2022 21:54:37 -0300
Subject: [PATCH 66/67] sagemath: patches for arb-2.22.0 and no-threejs

---
 ...2ddd4e2dc92469c1590ebf0c40f8f69bf579.patch | 126 ++++++++++++++++++
 .../patches/zzz-skip_doctest_no_threejs.patch |  13 ++
 2 files changed, 139 insertions(+)
 create mode 100644 srcpkgs/sagemath/patches/trac-33189-fix_doctests_for_arb_2.22-53532ddd4e2dc92469c1590ebf0c40f8f69bf579.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_no_threejs.patch

diff --git a/srcpkgs/sagemath/patches/trac-33189-fix_doctests_for_arb_2.22-53532ddd4e2dc92469c1590ebf0c40f8f69bf579.patch b/srcpkgs/sagemath/patches/trac-33189-fix_doctests_for_arb_2.22-53532ddd4e2dc92469c1590ebf0c40f8f69bf579.patch
new file mode 100644
index 000000000000..b861af7ec982
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33189-fix_doctests_for_arb_2.22-53532ddd4e2dc92469c1590ebf0c40f8f69bf579.patch
@@ -0,0 +1,126 @@
+From 24cc94b1988a90f3bd22a2368ec30c086283af13 Mon Sep 17 00:00:00 2001
+From: Antonio Rojas <arojas@archlinux.org>
+Date: Sun, 16 Jan 2022 11:55:04 +0100
+Subject: Add abs tol to some arb tests
+
+---
+ src/sage/functions/error.py    |  2 +-
+ src/sage/rings/complex_arb.pyx |  6 +++---
+ src/sage/rings/real_arb.pyx    | 10 +++++-----
+ 3 files changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/src/sage/functions/error.py b/src/sage/functions/error.py
+index f48d04f..06f0b24 100644
+--- a/src/sage/functions/error.py
++++ b/src/sage/functions/error.py
+@@ -267,7 +267,7 @@ class Function_erf(BuiltinFunction):
+ 
+         Check that real ball evaluation is fixed :trac:`28061`::
+ 
+-            sage: RealBallField(128)(erf(5))
++            sage: RealBallField(128)(erf(5)) # abs tol 1e-38
+             [0.99999999999846254020557196514981165651 +/- 7.33e-39]
+         """
+         R = parent or s_parent(x)
+diff --git a/src/sage/rings/complex_arb.pyx b/src/sage/rings/complex_arb.pyx
+index f986970..93ff565 100644
+--- a/src/sage/rings/complex_arb.pyx
++++ b/src/sage/rings/complex_arb.pyx
+@@ -3974,8 +3974,8 @@ cdef class ComplexBall(RingElement):
+ 
+         EXAMPLES::
+ 
+-            sage: CBF(20).erfc()
+-            [5.39586561160790e-176 +/- ...e-191]
++            sage: CBF(20).erfc() # abs tol 1e-190
++            [5.39586561160790e-176 +/- 6.73e-191]
+             sage: CBF(100, 100).erfc()
+             [0.00065234366376858 +/- ...e-18] + [-0.00393572636292141 +/- ...e-18]*I
+         """
+@@ -4280,7 +4280,7 @@ cdef class ComplexBall(RingElement):
+ 
+         TESTS:
+ 
+-            sage: CBF(Shi(I))
++            sage: CBF(Shi(I)) # abs tol 1e-15
+             [0.946083070367183 +/- 9.22e-16]*I
+         """
+         cdef ComplexBall result = self._new()
+diff --git a/src/sage/rings/real_arb.pyx b/src/sage/rings/real_arb.pyx
+index 4a81784..292bfea 100644
+--- a/src/sage/rings/real_arb.pyx
++++ b/src/sage/rings/real_arb.pyx
+@@ -3506,7 +3506,7 @@ cdef class RealBall(RingElement):
+ 
+         EXAMPLES::
+ 
+-            sage: RBF(1/2).erf()
++            sage: RBF(1/2).erf() # abs tol 1e-16
+             [0.520499877813047 +/- 6.10e-16]
+         """
+         cdef RealBall res = self._new()
+@@ -3556,12 +3556,12 @@ cdef class RealBall(RingElement):
+ 
+         EXAMPLES::
+ 
+-            sage: RBF(1).Si()
++            sage: RBF(1).Si() # abs tol 1e-15
+             [0.946083070367183 +/- 9.22e-16]
+ 
+         TESTS::
+ 
+-            sage: RBF(Si(1))
++            sage: RBF(Si(1)) # abs tol 1e-15
+             [0.946083070367183 +/- 9.22e-16]
+         """
+         cdef RealBall res = self._new()
+@@ -3578,12 +3578,12 @@ cdef class RealBall(RingElement):
+ 
+         EXAMPLES::
+ 
+-            sage: RBF(1).Ci()  # abs tol 1e-16
++            sage: RBF(1).Ci()  # abs tol 1e-15
+             [0.337403922900968 +/- 3.25e-16]
+ 
+         TESTS::
+ 
+-            sage: RBF(Ci(1))  # abs tol 1e-16
++            sage: RBF(Ci(1))  # abs tol 1e-15
+             [0.337403922900968 +/- 3.25e-16]
+         """
+         cdef RealBall res = self._new()
+-- 
+cgit v1.0-1-gd88e
+
+
+From 53532ddd4e2dc92469c1590ebf0c40f8f69bf579 Mon Sep 17 00:00:00 2001
+From: Antonio Rojas <arojas@archlinux.org>
+Date: Sun, 16 Jan 2022 14:16:53 +0100
+Subject: Decrease abs tol
+
+---
+ src/sage/rings/real_arb.pyx | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/sage/rings/real_arb.pyx b/src/sage/rings/real_arb.pyx
+index 292bfea..eb30f7f 100644
+--- a/src/sage/rings/real_arb.pyx
++++ b/src/sage/rings/real_arb.pyx
+@@ -3578,12 +3578,12 @@ cdef class RealBall(RingElement):
+ 
+         EXAMPLES::
+ 
+-            sage: RBF(1).Ci()  # abs tol 1e-15
++            sage: RBF(1).Ci()  # abs tol 5e-16
+             [0.337403922900968 +/- 3.25e-16]
+ 
+         TESTS::
+ 
+-            sage: RBF(Ci(1))  # abs tol 1e-15
++            sage: RBF(Ci(1))  # abs tol 5e-16
+             [0.337403922900968 +/- 3.25e-16]
+         """
+         cdef RealBall res = self._new()
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_no_threejs.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_no_threejs.patch
new file mode 100644
index 000000000000..9b6d0a775b10
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_no_threejs.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage/repl/ipython_kernel/install.py b/src/sage/repl/ipython_kernel/install.py
+index 2143c221ed..f781037c70 100644
+--- a/src/sage/repl/ipython_kernel/install.py
++++ b/src/sage/repl/ipython_kernel/install.py
+@@ -124,7 +124,7 @@ class SageKernelSpec(object):
+             sage: spec = SageKernelSpec(prefix=tmp_dir())
+             sage: spec.use_local_threejs()
+             sage: threejs = os.path.join(spec.nbextensions_dir, 'threejs-sage')
+-            sage: os.path.isdir(threejs)
++            sage: os.path.isdir(threejs)    # optional - threejs
+             True
+         """
+         src = THREEJS_DIR

From 3a05799bf946fca95ed8509028733e097910d931 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Wed, 19 Jan 2022 07:58:04 -0300
Subject: [PATCH 67/67] sagemath: update to 9.5.rc3.

---
 ...c98f32c0b9e65a0674d13c55b00fbf7b8a1f.patch | 68 -------------------
 srcpkgs/sagemath/template                     |  4 +-
 2 files changed, 2 insertions(+), 70 deletions(-)
 delete mode 100644 srcpkgs/sagemath/patches/trac-33081-fix_segfault_on_musl_1.2-36dc98f32c0b9e65a0674d13c55b00fbf7b8a1f.patch

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
deleted file mode 100644
index 3c7c039bef66..000000000000
--- a/srcpkgs/sagemath/patches/trac-33081-fix_segfault_on_musl_1.2-36dc98f32c0b9e65a0674d13c55b00fbf7b8a1f.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-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/template b/srcpkgs/sagemath/template
index 83e484c31c58..48c44b2769e2 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -1,6 +1,6 @@
 # Template file for 'sagemath'
 pkgname=sagemath
-version=9.5.rc2
+version=9.5.rc3
 revision=1
 wrksrc=sage-$version
 build_style=configure
@@ -20,7 +20,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
-checksum=c7eba867c11ab1b6d04535dd8df54640d3de0625ad96cdac17b17af977d96dce
+checksum=dabc1a98e883c6069b59a755852bb0030395404a95d19d497c56f557c02619c2
 python_version=3
 patch_args="-F0 -Np1"
 

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.rc2
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (224 preceding siblings ...)
  2022-01-19 11:01 ` tornaria
@ 2022-01-19 11:09 ` tornaria
  2022-01-19 13:37 ` tornaria
                   ` (22 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-19 11:09 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1016345126

Comment:
Update to rc3. All the new dependent packages are working ok.

@leahneukirchen can we merge #35088, #35089, #35098, #35101? Thanks!

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.rc2
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (225 preceding siblings ...)
  2022-01-19 11:09 ` tornaria
@ 2022-01-19 13:37 ` tornaria
  2022-01-19 16:51 ` [PR PATCH] [Updated] " tornaria
                   ` (21 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-19 13:37 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1016473760

Comment:
Note: I'm not making the sphinx update in #34789 a priority now, since that's needs more review and testing. Instead I'll try to see if we can build sagemath without it (I think so).

The other four tickets mentioned above will be needed for sure; they should be an easy merge as they are all well tested new packages (so don't affect anyone else). Merging them will save us 30-40 minutes on the CI so it'd be really useful and they are probably the last packages needed before merging `sagemath` itself **without any vendored in dependency**.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: sagemath-9.5.rc2
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (226 preceding siblings ...)
  2022-01-19 13:37 ` tornaria
@ 2022-01-19 16:51 ` tornaria
  2022-01-19 17:08 ` tornaria
                   ` (20 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-19 16:51 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1180 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.rc2
This is WIP, so I can get feedback.

Supported architectures: x86_64, x86_64-musl, i686. We also try to make sure it works with musl-1.2.

The testsuite can be run normal (-Q) or long (-K). For CI it runs normal (~ 1/2 time) and it uses a fixed random seed 0 to avoid random failures. When running locally, the random seed is random so one may get occasional test failures that depend on a particular value of the random seed.

The package `sagemath-test` is a dummy package whose purpose is to run the testsuite with sage installed as a package and without the build directory. For this to make sense, the masterdir has to be clean (without traces of the sagemath build, this should be ok after running "pkg" or "pkg -Q").

Pending PR for dependencies:
- [ ] #34789 Needs review/testing
- [ ] #35088
- [ ] #35089
- [ ] #35098
- [ ] #35101

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: 329486 bytes --]

From 5c5ce4724b1d32a219651801ba5f631548b8b496 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 1/2] New package: sage-9.5.rc3

Squashed version identical to sagemath-v1.

Full commit message history follows:

1. New package: sage-9.5.beta5

2. 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).

3. 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

4. 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.

5. sagemath: update to 9.5.beta7.

6. sagemath: add more dependencies

Also:
 - add patches so more doctests pass
 - add do_check() to skip building docs
 - use https for distfiles

7. 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...

8. 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)

9. sagemath: use system maxima

Also: add patch to use relative symlinks in gap where absolute symlinks
are now used -- otherwise xbps-create gets confused

10. 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

11. sagemath: change patch for cmdline args to disable dochtml testing

12. sagemath: update to 9.5.beta8.

13. 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

14. sagemath: use system python 3.10

15. 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

16. 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

17. sagemath: update to 9.5.beta9.

18. 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.

19. sagemath: fix license and tests

Now tests can be run with -Q (normal) or -K (--long)

20. sagemath: fix long time test

21. sagemath: use system python site-packages

 - patch from #29665 for that
 - patch on top of that to allow a few more python packages:
   gmpy2, sphinx, typing_extensions, ptyprocess
 - add all available python packages to makedepends and depends
 - add ffmpeg and ImageMagick to makedepends
 - in standard check (-Q) warn if individual test > 5.0s

22. sagemath: use small source tarball + upstream packages

23. sagemath: for CI use fixed random-seed=0

24. sagemath: upstream two patches

25. sagemath: reorder upstream sources and add two missing ones

26. sagemath: do not download anything patch

27. sagemath: update to 9.5.rc0.

28. sagemath: use system gap

29. sagemath: fixes for system gap

30. sagemath: skip doctest for rewritten shebang

31. sagemath: cleanup and one patch

32. sagemath: update to 9.5.rc1.

33. sagemath: patch not needed with singular 4.3.0

34. sagemath: install /usr/bin/sage

35. sagemath: rearrange upstream packages and indent

This doesn't change anything, it separates _upstream and
checksum in three blocks to make it easier to edit.

36. sagemath: use system cvxopt and importlib_resources

37. sagemath: disallow fuzz in patches

38. sagemath: disable packages that are not needed

 - appnope: only needed for macos
 - fonttools: only needed to build matplotlib
 - importlib_resources: only needed for old python
 - pycygwin: only needed for cygwin
 - setuptools_scm_git_archive: only needed to build matplotlib
 - setuptools_wheel: not needed
 - sphinxcontrib_websupport: only needed to build sphinx
 - cppy: force use from system python3-cppy

39. sagemath: use system Cython, cysignals, cypari2, pplpy, fpylll

40. sagemath: update to 9.5.rc2.

41. sagemath: add timing information for doctests

This makes doctesting faster on many threads

42. sagemath: round timings to power of 2 for stability

43. sagemath: all but two packages from system

44. sagemath: fix do_install()

45. sagemath: minor adjustments in do_check()

46. sagemath: use system primecountpy

47. sagemath: no upstream packages, cleanup

48. sagemath: patches for arb-2.22.0 and no-threejs

49. sagemath: remove patch for sphinx, unneeded

50. sagemath: update to 9.5.rc3.
---
 srcpkgs/sagemath/files/timings2.json          |  398 ++
 .../patches/00-Do_not_download_anything.patch |   11 +
 ...13e88ee188d516e4956832a23f985a73917a.patch |   31 +
 ...ea979d4bfa1a26ef3b08a29ca626b83b6ff5.patch |   23 +
 ...f491e5ce599ba185f5e93f02e0fcebd76c9e.patch |   57 +
 ...184f7498a2046065e669723e68efe2d65cee.patch | 5629 +++++++++++++++++
 ...aba734cb4ded0b04165fa142b5cf4c38fd23.patch |  247 +
 ...0e8168a9ffb4fbf07dd03c0846b4933a6dbe.patch |   64 +
 ...26e3db5ea06b962fac386fa3c7223f9a14fb.patch |   51 +
 ...93f4f32246ad9ded6d37f1f2f12a589a81f4.patch |   32 +
 ...9f3a1611fed0cc66fb838eb85739646dd34d.patch |  131 +
 ...e0923cb3d44d010e3e2f9bd7bc75d5c30234.patch |   43 +
 ...d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch |   35 +
 ...2ddd4e2dc92469c1590ebf0c40f8f69bf579.patch |  126 +
 .../zzz-dont_run_pytest--see_31924.patch      |   27 +
 .../zzz-fix_long_time_test--see_33091.patch   |   13 +
 .../patches/zzz-fix_no_SAGE_BIN.patch         |   12 +
 .../patches/zzz-fix_no_venv_packages.patch    |   13 +
 .../zzz-fixes_for_system_gap--see_29644.patch |   96 +
 .../zzz-more_site_packages_not_in_29665.patch |   42 +
 .../patches/zzz-remove_ratpoints.patch        |  887 +++
 ...z-skip_doctest_giac-1.7.0--see_31563.patch |   14 +
 .../patches/zzz-skip_doctest_no_threejs.patch |   13 +
 .../zzz-skip_doctest_sage_setup_find.patch    |   12 +
 .../patches/zzz-skip_doctest_shebang.patch    |   11 +
 srcpkgs/sagemath/template                     |  251 +
 srcpkgs/sagemath/update                       |    4 +
 27 files changed, 8273 insertions(+)
 create mode 100644 srcpkgs/sagemath/files/timings2.json
 create mode 100644 srcpkgs/sagemath/patches/00-Do_not_download_anything.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-29631-001-system_linbox-794713e88ee188d516e4956832a23f985a73917a.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-29631-002-system_linbox-7e16ea979d4bfa1a26ef3b08a29ca626b83b6ff5.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-32867-system_maxima-ed39aba734cb4ded0b04165fa142b5cf4c38fd23.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-33047-musl_fix_find_library-dc1a0e8168a9ffb4fbf07dd03c0846b4933a6dbe.patch
 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-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-33189-fix_doctests_for_arb_2.22-53532ddd4e2dc92469c1590ebf0c40f8f69bf579.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-fix_no_SAGE_BIN.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-fix_no_venv_packages.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-remove_ratpoints.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_31563.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_no_threejs.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch
 create mode 100644 srcpkgs/sagemath/template
 create mode 100644 srcpkgs/sagemath/update

diff --git a/srcpkgs/sagemath/files/timings2.json b/srcpkgs/sagemath/files/timings2.json
new file mode 100644
index 000000000000..71a9aa84ce58
--- /dev/null
+++ b/srcpkgs/sagemath/files/timings2.json
@@ -0,0 +1,398 @@
+{
+  "doc.ca.intro.index": {"walltime": 8},
+  "doc.en.constructions.calculus": {"walltime": 64},
+  "doc.en.constructions.plotting": {"walltime": 32},
+  "doc.en.prep.Advanced-2DPlotting": {"walltime": 16},
+  "doc.en.prep.Calculus": {"walltime": 8},
+  "doc.en.prep.Symbolics-and-Basic-Plotting": {"walltime": 8},
+  "doc.en.thematic_tutorials.explicit_methods_in_number_theory.birds_other": {"walltime": 8},
+  "doc.en.thematic_tutorials.explicit_methods_in_number_theory.elliptic_curves": {"walltime": 8},
+  "doc.en.thematic_tutorials.geometry.polyhedra_tutorial": {"walltime": 16},
+  "doc.en.thematic_tutorials.sandpile": {"walltime": 16},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_advanced": {"walltime": 32},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_cartesian": {"walltime": 32},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_change": {"walltime": 32},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_curvilinear": {"walltime": 32},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_plane": {"walltime": 16},
+  "doc.ja.tutorial.tour_plotting": {"walltime": 8},
+  "sage.algebras.cluster_algebra": {"walltime": 8},
+  "sage.algebras.commutative_dga": {"walltime": 16},
+  "sage.algebras.hecke_algebras.ariki_koike_algebra": {"walltime": 8},
+  "sage.algebras.iwahori_hecke_algebra": {"walltime": 8},
+  "sage.algebras.lie_algebras.classical_lie_algebra": {"walltime": 128},
+  "sage.algebras.lie_algebras.nilpotent_lie_algebra": {"walltime": 16},
+  "sage.algebras.quantum_clifford": {"walltime": 16},
+  "sage.algebras.quantum_groups.fock_space": {"walltime": 8},
+  "sage.algebras.quatalg.quaternion_algebra": {"walltime": 8},
+  "sage.algebras.steenrod.steenrod_algebra": {"walltime": 64},
+  "sage.algebras.steenrod.steenrod_algebra_bases": {"walltime": 8},
+  "sage.algebras.yangian": {"walltime": 8},
+  "sage.arith.misc": {"walltime": 32},
+  "sage.calculus.calculus": {"walltime": 16},
+  "sage.calculus.desolvers": {"walltime": 8},
+  "sage.calculus.functional": {"walltime": 8},
+  "sage.calculus.riemann": {"walltime": 64},
+  "sage.calculus.tests": {"walltime": 16},
+  "sage.calculus.transforms.dwt": {"walltime": 16},
+  "sage.calculus.transforms.fft": {"walltime": 8},
+  "sage.categories.coxeter_groups": {"walltime": 8},
+  "sage.categories.finite_monoids": {"walltime": 16},
+  "sage.categories.lie_conformal_algebras": {"walltime": 8},
+  "sage.categories.loop_crystals": {"walltime": 8},
+  "sage.categories.pushout": {"walltime": 8},
+  "sage.categories.super_hopf_algebras_with_basis": {"walltime": 32},
+  "sage.categories.super_lie_conformal_algebras": {"walltime": 8},
+  "sage.coding.ag_code": {"walltime": 64},
+  "sage.coding.ag_code_decoders": {"walltime": 128},
+  "sage.coding.binary_code": {"walltime": 8},
+  "sage.coding.linear_code": {"walltime": 16},
+  "sage.combinat.backtrack": {"walltime": 32},
+  "sage.combinat.chas.wqsym": {"walltime": 32},
+  "sage.combinat.cluster_algebra_quiver.cluster_seed": {"walltime": 64},
+  "sage.combinat.cluster_algebra_quiver.quiver": {"walltime": 128},
+  "sage.combinat.crystals.affine_factorization": {"walltime": 16},
+  "sage.combinat.crystals.alcove_path": {"walltime": 32},
+  "sage.combinat.crystals.highest_weight_crystals": {"walltime": 8},
+  "sage.combinat.crystals.kirillov_reshetikhin": {"walltime": 16},
+  "sage.combinat.crystals.letters": {"walltime": 8},
+  "sage.combinat.crystals.littelmann_path": {"walltime": 16},
+  "sage.combinat.crystals.mv_polytopes": {"walltime": 16},
+  "sage.combinat.crystals.pbw_crystal": {"walltime": 16},
+  "sage.combinat.crystals.star_crystal": {"walltime": 8},
+  "sage.combinat.designs.bibd": {"walltime": 8},
+  "sage.combinat.designs.database": {"walltime": 16},
+  "sage.combinat.designs.difference_family": {"walltime": 8},
+  "sage.combinat.designs.gen_quadrangles_with_spread": {"walltime": 128},
+  "sage.combinat.designs.orthogonal_arrays_build_recursive": {"walltime": 16},
+  "sage.combinat.designs.orthogonal_arrays_find_recursive": {"walltime": 8},
+  "sage.combinat.diagram_algebras": {"walltime": 64},
+  "sage.combinat.fqsym": {"walltime": 32},
+  "sage.combinat.free_prelie_algebra": {"walltime": 8},
+  "sage.combinat.fully_commutative_elements": {"walltime": 8},
+  "sage.combinat.grossman_larson_algebras": {"walltime": 8},
+  "sage.combinat.interval_posets": {"walltime": 8},
+  "sage.combinat.k_regular_sequence": {"walltime": 8},
+  "sage.combinat.k_tableau": {"walltime": 16},
+  "sage.combinat.matrices.hadamard_matrix": {"walltime": 8},
+  "sage.combinat.multiset_partition_into_sets_ordered": {"walltime": 8},
+  "sage.combinat.ncsf_qsym.ncsf": {"walltime": 16},
+  "sage.combinat.ncsf_qsym.qsym": {"walltime": 16},
+  "sage.combinat.partition": {"walltime": 16},
+  "sage.combinat.partition_kleshchev": {"walltime": 16},
+  "sage.combinat.partition_tuple": {"walltime": 8},
+  "sage.combinat.posets.moebius_algebra": {"walltime": 16},
+  "sage.combinat.posets.posets": {"walltime": 8},
+  "sage.combinat.rigged_configurations.kr_tableaux": {"walltime": 32},
+  "sage.combinat.rigged_configurations.rigged_configurations": {"walltime": 16},
+  "sage.combinat.rigged_configurations.tensor_product_kr_tableaux": {"walltime": 16},
+  "sage.combinat.root_system.associahedron": {"walltime": 8},
+  "sage.combinat.root_system.branching_rules": {"walltime": 8},
+  "sage.combinat.root_system.fusion_ring": {"walltime": 8},
+  "sage.combinat.root_system.integrable_representations": {"walltime": 16},
+  "sage.combinat.root_system.non_symmetric_macdonald_polynomials": {"walltime": 16},
+  "sage.combinat.root_system.pieri_factors": {"walltime": 8},
+  "sage.combinat.root_system.plot": {"walltime": 32},
+  "sage.combinat.root_system.root_lattice_realization_algebras": {"walltime": 16},
+  "sage.combinat.root_system.root_lattice_realizations": {"walltime": 16},
+  "sage.combinat.root_system.root_system": {"walltime": 8},
+  "sage.combinat.root_system.weyl_group": {"walltime": 8},
+  "sage.combinat.rsk": {"walltime": 32},
+  "sage.combinat.sf.classical": {"walltime": 16},
+  "sage.combinat.sf.jack": {"walltime": 16},
+  "sage.combinat.sf.k_dual": {"walltime": 16},
+  "sage.combinat.sf.llt": {"walltime": 16},
+  "sage.combinat.sf.macdonald": {"walltime": 64},
+  "sage.combinat.sf.new_kschur": {"walltime": 8},
+  "sage.combinat.sf.sfa": {"walltime": 32},
+  "sage.combinat.shifted_primed_tableau": {"walltime": 16},
+  "sage.combinat.skew_tableau": {"walltime": 8},
+  "sage.combinat.symmetric_group_algebra": {"walltime": 16},
+  "sage.combinat.tableau": {"walltime": 32},
+  "sage.combinat.tableau_tuple": {"walltime": 32},
+  "sage.combinat.tiling": {"walltime": 256},
+  "sage.combinat.tutorial": {"walltime": 16},
+  "sage.combinat.words.paths": {"walltime": 64},
+  "sage.crypto.block_cipher.des": {"walltime": 16},
+  "sage.crypto.mq.sr": {"walltime": 64},
+  "sage.crypto.sbox": {"walltime": 16},
+  "sage.crypto.sboxes": {"walltime": 8},
+  "sage.doctest.forker": {"walltime": 16},
+  "sage.doctest.sources": {"walltime": 64},
+  "sage.doctest.test": {"walltime": 128},
+  "sage.dynamics.arithmetic_dynamics.projective_ds": {"walltime": 64},
+  "sage.dynamics.arithmetic_dynamics.wehlerK3": {"walltime": 8},
+  "sage.dynamics.cellular_automata.glca": {"walltime": 8},
+  "sage.dynamics.cellular_automata.solitons": {"walltime": 8},
+  "sage.dynamics.complex_dynamics.mandel_julia": {"walltime": 16},
+  "sage.functions.bessel": {"walltime": 16},
+  "sage.functions.exp_integral": {"walltime": 8},
+  "sage.functions.hypergeometric": {"walltime": 8},
+  "sage.functions.other": {"walltime": 16},
+  "sage.functions.piecewise": {"walltime": 8},
+  "sage.games.quantumino": {"walltime": 8},
+  "sage.geometry.cone": {"walltime": 32},
+  "sage.geometry.fan": {"walltime": 8},
+  "sage.geometry.hyperbolic_space.hyperbolic_geodesic": {"walltime": 8},
+  "sage.geometry.hyperplane_arrangement.arrangement": {"walltime": 16},
+  "sage.geometry.hyperplane_arrangement.library": {"walltime": 8},
+  "sage.geometry.hyperplane_arrangement.plot": {"walltime": 8},
+  "sage.geometry.lattice_polytope": {"walltime": 16},
+  "sage.geometry.polyhedral_complex": {"walltime": 8},
+  "sage.geometry.polyhedron.base": {"walltime": 32},
+  "sage.geometry.polyhedron.library": {"walltime": 32},
+  "sage.geometry.polyhedron.plot": {"walltime": 8},
+  "sage.geometry.riemannian_manifolds.parametrized_surface3d": {"walltime": 16},
+  "sage.geometry.triangulation.base": {"walltime": 32},
+  "sage.geometry.triangulation.point_configuration": {"walltime": 16},
+  "sage.graphs.chrompoly": {"walltime": 8},
+  "sage.graphs.connectivity": {"walltime": 16},
+  "sage.graphs.generators.basic": {"walltime": 16},
+  "sage.graphs.generators.classical_geometries": {"walltime": 32},
+  "sage.graphs.generators.distance_regular": {"walltime": 256},
+  "sage.graphs.generators.families": {"walltime": 32},
+  "sage.graphs.generators.smallgraphs": {"walltime": 16},
+  "sage.graphs.generic_graph": {"walltime": 32},
+  "sage.graphs.genus": {"walltime": 16},
+  "sage.graphs.graph": {"walltime": 16},
+  "sage.graphs.graph_generators": {"walltime": 8},
+  "sage.graphs.graph_list": {"walltime": 8},
+  "sage.graphs.graph_plot": {"walltime": 8},
+  "sage.graphs.strongly_regular_db": {"walltime": 16},
+  "sage.groups.cubic_braid": {"walltime": 16},
+  "sage.groups.fqf_orthogonal": {"walltime": 16},
+  "sage.groups.libgap_mixin": {"walltime": 8},
+  "sage.groups.libgap_morphism": {"walltime": 8},
+  "sage.groups.lie_gps.nilpotent_lie_group": {"walltime": 16},
+  "sage.groups.matrix_gps.finitely_generated": {"walltime": 8},
+  "sage.groups.matrix_gps.heisenberg": {"walltime": 32},
+  "sage.groups.matrix_gps.linear": {"walltime": 8},
+  "sage.groups.perm_gps.cubegroup": {"walltime": 16},
+  "sage.groups.perm_gps.partn_ref.refinement_graphs": {"walltime": 8},
+  "sage.groups.perm_gps.permgroup": {"walltime": 8},
+  "sage.groups.perm_gps.permgroup_named": {"walltime": 8},
+  "sage.homology.hochschild_complex": {"walltime": 8},
+  "sage.homology.homology_vector_space_with_basis": {"walltime": 8},
+  "sage.interacts.test_jupyter": {"walltime": 16},
+  "sage.interfaces.ecm": {"walltime": 8},
+  "sage.interfaces.expect": {"walltime": 8},
+  "sage.interfaces.gap": {"walltime": 16},
+  "sage.interfaces.maxima": {"walltime": 8},
+  "sage.interfaces.maxima_abstract": {"walltime": 64},
+  "sage.interfaces.psage": {"walltime": 8},
+  "sage.interfaces.sage0": {"walltime": 8},
+  "sage.lfunctions.zero_sums": {"walltime": 8},
+  "sage.libs.eclib.interface": {"walltime": 16},
+  "sage.libs.eclib.mwrank": {"walltime": 16},
+  "sage.libs.gap.test_long": {"walltime": 32},
+  "sage.libs.giac": {"walltime": 32},
+  "sage.manifolds.catalog": {"walltime": 8},
+  "sage.manifolds.chart": {"walltime": 32},
+  "sage.manifolds.chart_func": {"walltime": 8},
+  "sage.manifolds.continuous_map": {"walltime": 8},
+  "sage.manifolds.differentiable.affine_connection": {"walltime": 128},
+  "sage.manifolds.differentiable.automorphismfield": {"walltime": 32},
+  "sage.manifolds.differentiable.automorphismfield_group": {"walltime": 8},
+  "sage.manifolds.differentiable.bundle_connection": {"walltime": 8},
+  "sage.manifolds.differentiable.characteristic_cohomology_class": {"walltime": 256},
+  "sage.manifolds.differentiable.curve": {"walltime": 16},
+  "sage.manifolds.differentiable.degenerate": {"walltime": 32},
+  "sage.manifolds.differentiable.degenerate_submanifold": {"walltime": 256},
+  "sage.manifolds.differentiable.diff_form": {"walltime": 64},
+  "sage.manifolds.differentiable.diff_map": {"walltime": 8},
+  "sage.manifolds.differentiable.examples.euclidean": {"walltime": 32},
+  "sage.manifolds.differentiable.examples.sphere": {"walltime": 32},
+  "sage.manifolds.differentiable.integrated_curve": {"walltime": 32},
+  "sage.manifolds.differentiable.levi_civita_connection": {"walltime": 32},
+  "sage.manifolds.differentiable.manifold": {"walltime": 16},
+  "sage.manifolds.differentiable.manifold_homset": {"walltime": 16},
+  "sage.manifolds.differentiable.metric": {"walltime": 64},
+  "sage.manifolds.differentiable.mixed_form": {"walltime": 16},
+  "sage.manifolds.differentiable.mixed_form_algebra": {"walltime": 8},
+  "sage.manifolds.differentiable.multivectorfield": {"walltime": 64},
+  "sage.manifolds.differentiable.pseudo_riemannian": {"walltime": 16},
+  "sage.manifolds.differentiable.pseudo_riemannian_submanifold": {"walltime": 128},
+  "sage.manifolds.differentiable.scalarfield": {"walltime": 16},
+  "sage.manifolds.differentiable.scalarfield_algebra": {"walltime": 8},
+  "sage.manifolds.differentiable.tangent_vector": {"walltime": 16},
+  "sage.manifolds.differentiable.tensorfield": {"walltime": 128},
+  "sage.manifolds.differentiable.tensorfield_paral": {"walltime": 16},
+  "sage.manifolds.differentiable.vector_bundle": {"walltime": 16},
+  "sage.manifolds.differentiable.vectorfield": {"walltime": 64},
+  "sage.manifolds.differentiable.vectorframe": {"walltime": 8},
+  "sage.manifolds.point": {"walltime": 16},
+  "sage.manifolds.scalarfield": {"walltime": 16},
+  "sage.manifolds.scalarfield_algebra": {"walltime": 8},
+  "sage.manifolds.section": {"walltime": 32},
+  "sage.manifolds.trivialization": {"walltime": 8},
+  "sage.manifolds.vector_bundle": {"walltime": 8},
+  "sage.matrix.benchmark": {"walltime": 8},
+  "sage.matrix.matrix2": {"walltime": 16},
+  "sage.matrix.matrix_integer_dense": {"walltime": 16},
+  "sage.matrix.matrix_integer_dense_hnf": {"walltime": 32},
+  "sage.matrix.matrix_mod2_dense": {"walltime": 8},
+  "sage.matrix.matrix_rational_dense": {"walltime": 8},
+  "sage.matrix.special": {"walltime": 8},
+  "sage.matroids.catalog": {"walltime": 64},
+  "sage.misc.cachefunc": {"walltime": 16},
+  "sage.misc.cython": {"walltime": 8},
+  "sage.misc.functional": {"walltime": 8},
+  "sage.misc.randstate": {"walltime": 16},
+  "sage.misc.sagedoc": {"walltime": 64},
+  "sage.misc.sageinspect": {"walltime": 32},
+  "sage.modular.abvar.abvar": {"walltime": 16},
+  "sage.modular.abvar.homspace": {"walltime": 8},
+  "sage.modular.abvar.lseries": {"walltime": 8},
+  "sage.modular.arithgroup.arithgroup_perm": {"walltime": 8},
+  "sage.modular.arithgroup.tests": {"walltime": 8},
+  "sage.modular.btquotients.pautomorphicform": {"walltime": 32},
+  "sage.modular.hypergeometric_motive": {"walltime": 16},
+  "sage.modular.local_comp.local_comp": {"walltime": 32},
+  "sage.modular.local_comp.type_space": {"walltime": 16},
+  "sage.modular.modform.ambient_R": {"walltime": 16},
+  "sage.modular.modform.constructor": {"walltime": 8},
+  "sage.modular.modform.cuspidal_submodule": {"walltime": 16},
+  "sage.modular.modform.element": {"walltime": 64},
+  "sage.modular.modform.ring": {"walltime": 64},
+  "sage.modular.modform.space": {"walltime": 8},
+  "sage.modular.modform_hecketriangle.abstract_space": {"walltime": 16},
+  "sage.modular.modform_hecketriangle.graded_ring_element": {"walltime": 16},
+  "sage.modular.modform_hecketriangle.hecke_triangle_group_element": {"walltime": 32},
+  "sage.modular.modform_hecketriangle.readme": {"walltime": 16},
+  "sage.modular.modform_hecketriangle.space": {"walltime": 8},
+  "sage.modular.modsym.ambient": {"walltime": 16},
+  "sage.modular.modsym.space": {"walltime": 8},
+  "sage.modular.pollack_stevens.modsym": {"walltime": 64},
+  "sage.modular.pollack_stevens.padic_lseries": {"walltime": 32},
+  "sage.modules.finite_submodule_iter": {"walltime": 16},
+  "sage.modules.free_module": {"walltime": 16},
+  "sage.modules.free_module_element": {"walltime": 8},
+  "sage.modules.free_module_integer": {"walltime": 32},
+  "sage.modules.free_quadratic_module_integer_symmetric": {"walltime": 8},
+  "sage.modules.torsion_quadratic_module": {"walltime": 16},
+  "sage.parallel.map_reduce": {"walltime": 8},
+  "sage.plot.animate": {"walltime": 128},
+  "sage.plot.arrow": {"walltime": 8},
+  "sage.plot.circle": {"walltime": 8},
+  "sage.plot.complex_plot": {"walltime": 8},
+  "sage.plot.contour_plot": {"walltime": 32},
+  "sage.plot.density_plot": {"walltime": 8},
+  "sage.plot.graphics": {"walltime": 32},
+  "sage.plot.line": {"walltime": 8},
+  "sage.plot.matrix_plot": {"walltime": 16},
+  "sage.plot.multigraphics": {"walltime": 16},
+  "sage.plot.plot": {"walltime": 64},
+  "sage.plot.plot3d.base": {"walltime": 8},
+  "sage.plot.plot3d.implicit_plot3d": {"walltime": 16},
+  "sage.plot.plot3d.implicit_surface": {"walltime": 8},
+  "sage.plot.plot3d.parametric_plot3d": {"walltime": 8},
+  "sage.plot.plot3d.parametric_surface": {"walltime": 8},
+  "sage.plot.plot3d.plot3d": {"walltime": 16},
+  "sage.plot.plot3d.tachyon": {"walltime": 8},
+  "sage.plot.plot3d.transform": {"walltime": 32},
+  "sage.plot.point": {"walltime": 8},
+  "sage.plot.polygon": {"walltime": 8},
+  "sage.plot.streamline_plot": {"walltime": 8},
+  "sage.quadratic_forms.genera.genus": {"walltime": 16},
+  "sage.quadratic_forms.quadratic_form__automorphisms": {"walltime": 8},
+  "sage.quadratic_forms.quadratic_form__local_representation_conditions": {"walltime": 64},
+  "sage.quadratic_forms.quadratic_form__neighbors": {"walltime": 8},
+  "sage.quadratic_forms.quadratic_form__siegel_product": {"walltime": 8},
+  "sage.repl.ipython_extension": {"walltime": 8},
+  "sage.rings.asymptotic.asymptotic_expansion_generators": {"walltime": 64},
+  "sage.rings.asymptotic.asymptotic_ring": {"walltime": 8},
+  "sage.rings.asymptotic.asymptotics_multivariate_generating_functions": {"walltime": 32},
+  "sage.rings.asymptotic.term_monoid": {"walltime": 8},
+  "sage.rings.continued_fraction": {"walltime": 8},
+  "sage.rings.finite_rings.finite_field_base": {"walltime": 8},
+  "sage.rings.function_field.function_field": {"walltime": 256},
+  "sage.rings.function_field.function_field_valuation": {"walltime": 64},
+  "sage.rings.function_field.ideal": {"walltime": 8},
+  "sage.rings.function_field.place": {"walltime": 8},
+  "sage.rings.integer": {"walltime": 128},
+  "sage.rings.invariants.invariant_theory": {"walltime": 8},
+  "sage.rings.number_field.bdd_height": {"walltime": 8},
+  "sage.rings.number_field.number_field": {"walltime": 64},
+  "sage.rings.number_field.number_field_element": {"walltime": 16},
+  "sage.rings.number_field.splitting_field": {"walltime": 8},
+  "sage.rings.number_field.totallyreal": {"walltime": 16},
+  "sage.rings.number_field.totallyreal_rel": {"walltime": 8},
+  "sage.rings.padics.padic_base_leaves": {"walltime": 64},
+  "sage.rings.padics.padic_extension_leaves": {"walltime": 64},
+  "sage.rings.padics.padic_generic_element": {"walltime": 16},
+  "sage.rings.padics.padic_lattice_element": {"walltime": 32},
+  "sage.rings.padics.relative_extension_leaves": {"walltime": 32},
+  "sage.rings.polynomial.multi_polynomial_ideal": {"walltime": 8},
+  "sage.rings.polynomial.multi_polynomial_sequence": {"walltime": 8},
+  "sage.rings.polynomial.ore_function_element": {"walltime": 8},
+  "sage.rings.polynomial.polynomial_element": {"walltime": 16},
+  "sage.rings.polynomial.polynomial_rational_flint": {"walltime": 8},
+  "sage.rings.polynomial.polynomial_zmod_flint": {"walltime": 512},
+  "sage.rings.qqbar": {"walltime": 16},
+  "sage.rings.tests": {"walltime": 16},
+  "sage.rings.valuation.augmented_valuation": {"walltime": 32},
+  "sage.rings.valuation.mapped_valuation": {"walltime": 64},
+  "sage.rings.valuation.valuation": {"walltime": 8},
+  "sage.sandpiles.sandpile": {"walltime": 16},
+  "sage.schemes.curves.affine_curve": {"walltime": 16},
+  "sage.schemes.curves.closed_point": {"walltime": 8},
+  "sage.schemes.curves.projective_curve": {"walltime": 32},
+  "sage.schemes.cyclic_covers.cycliccover_finite_field": {"walltime": 64},
+  "sage.schemes.elliptic_curves.BSD": {"walltime": 8},
+  "sage.schemes.elliptic_curves.Qcurves": {"walltime": 8},
+  "sage.schemes.elliptic_curves.constructor": {"walltime": 32},
+  "sage.schemes.elliptic_curves.ell_curve_isogeny": {"walltime": 16},
+  "sage.schemes.elliptic_curves.ell_egros": {"walltime": 32},
+  "sage.schemes.elliptic_curves.ell_finite_field": {"walltime": 8},
+  "sage.schemes.elliptic_curves.ell_generic": {"walltime": 8},
+  "sage.schemes.elliptic_curves.ell_modular_symbols": {"walltime": 16},
+  "sage.schemes.elliptic_curves.ell_number_field": {"walltime": 128},
+  "sage.schemes.elliptic_curves.ell_point": {"walltime": 8},
+  "sage.schemes.elliptic_curves.ell_rational_field": {"walltime": 128},
+  "sage.schemes.elliptic_curves.gal_reps_number_field": {"walltime": 32},
+  "sage.schemes.elliptic_curves.gp_simon": {"walltime": 16},
+  "sage.schemes.elliptic_curves.heegner": {"walltime": 32},
+  "sage.schemes.elliptic_curves.height": {"walltime": 64},
+  "sage.schemes.elliptic_curves.isogeny_class": {"walltime": 32},
+  "sage.schemes.elliptic_curves.isogeny_small_degree": {"walltime": 256},
+  "sage.schemes.elliptic_curves.kraus": {"walltime": 16},
+  "sage.schemes.elliptic_curves.mod_sym_num": {"walltime": 8},
+  "sage.schemes.elliptic_curves.padic_lseries": {"walltime": 8},
+  "sage.schemes.elliptic_curves.padics": {"walltime": 16},
+  "sage.schemes.elliptic_curves.saturation": {"walltime": 16},
+  "sage.schemes.elliptic_curves.sha_tate": {"walltime": 32},
+  "sage.schemes.hyperelliptic_curves.hyperelliptic_finite_field": {"walltime": 64},
+  "sage.schemes.hyperelliptic_curves.hyperelliptic_generic": {"walltime": 8},
+  "sage.schemes.hyperelliptic_curves.hyperelliptic_padic_field": {"walltime": 32},
+  "sage.schemes.hyperelliptic_curves.monsky_washnitzer": {"walltime": 8},
+  "sage.schemes.projective.projective_rational_point": {"walltime": 8},
+  "sage.schemes.riemann_surfaces.riemann_surface": {"walltime": 64},
+  "sage.schemes.toric.chow_group": {"walltime": 8},
+  "sage.schemes.toric.sheaf.klyachko": {"walltime": 8},
+  "sage.stats.distributions.discrete_gaussian_integer": {"walltime": 8},
+  "sage.stats.time_series": {"walltime": 8},
+  "sage.structure.coerce_dict": {"walltime": 32},
+  "sage.structure.element": {"walltime": 16},
+  "sage.structure.sage_object": {"walltime": 8},
+  "sage.symbolic.expression": {"walltime": 32},
+  "sage.symbolic.integration.integral": {"walltime": 32},
+  "sage.symbolic.random_tests": {"walltime": 32},
+  "sage.symbolic.relation": {"walltime": 8},
+  "sage.tests.book_schilling_zabrocki_kschur_primer": {"walltime": 32},
+  "sage.tests.book_stein_ent": {"walltime": 16},
+  "sage.tests.books.computational-mathematics-with-sagemath.combinat_doctest": {"walltime": 32},
+  "sage.tests.books.computational-mathematics-with-sagemath.float_doctest": {"walltime": 16},
+  "sage.tests.books.computational-mathematics-with-sagemath.graphique_doctest": {"walltime": 32},
+  "sage.tests.books.computational-mathematics-with-sagemath.graphtheory_doctest": {"walltime": 8},
+  "sage.tests.books.computational-mathematics-with-sagemath.integration_doctest": {"walltime": 32},
+  "sage.tests.books.computational-mathematics-with-sagemath.mpoly_doctest": {"walltime": 8},
+  "sage.tests.books.computational-mathematics-with-sagemath.nonlinear_doctest": {"walltime": 8},
+  "sage.tests.books.computational-mathematics-with-sagemath.recequadiff_doctest": {"walltime": 8},
+  "sage.tests.books.computational-mathematics-with-sagemath.sol.graphique_doctest": {"walltime": 16},
+  "sage.tests.books.computational-mathematics-with-sagemath.sol.numbertheory_doctest": {"walltime": 16},
+  "sage.tests.books.computational-mathematics-with-sagemath.sol.polynomes_doctest": {"walltime": 16},
+  "sage.tests.cmdline": {"walltime": 64},
+  "sage.tests.gosper-sum": {"walltime": 16},
+  "sage.tests.parigp": {"walltime": 8},
+  "sage.topology.simplicial_complex": {"walltime": 8},
+  "sage.topology.simplicial_complex_examples": {"walltime": 16}
+}
diff --git a/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch b/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch
new file mode 100644
index 000000000000..35aef7b8d456
--- /dev/null
+++ b/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch
@@ -0,0 +1,11 @@
+--- a/build/sage_bootstrap/tarball.py	2022-01-07 19:17:06.754747955 -0300
++++ b/build/sage_bootstrap/tarball.py	2022-01-07 19:25:31.844139381 -0300
+@@ -158,6 +158,8 @@
+                             .format(destination=destination))
+         successful_download = False
+         log.info('Attempting to download package {0} from mirrors'.format(self.filename))
++        log.info('ERROR: downloading is disabled, add file to template instead')
++        return
+         for mirror in MirrorList():
+             url = mirror + '/'.join(['spkg', 'upstream', self.package.name, self.filename])
+             log.info(url)
diff --git a/srcpkgs/sagemath/patches/trac-29631-001-system_linbox-794713e88ee188d516e4956832a23f985a73917a.patch b/srcpkgs/sagemath/patches/trac-29631-001-system_linbox-794713e88ee188d516e4956832a23f985a73917a.patch
new file mode 100644
index 000000000000..483dbe2c2597
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-29631-001-system_linbox-794713e88ee188d516e4956832a23f985a73917a.patch
@@ -0,0 +1,31 @@
+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.
+
+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/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-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch b/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
new file mode 100644
index 000000000000..da88a369db0d
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
@@ -0,0 +1,57 @@
+From 2c981351bb60089530b0598d3e9a909a23d4d4d8 Mon Sep 17 00:00:00 2001
+From: Thierry Thomas <thierry@FreeBSD.org>
+Date: Mon, 22 Mar 2021 03:04:12 +0100
+Subject: 29644: Add spkg-configure.m4 for gap
+
+---
+ build/pkgs/gap/spkg-configure.m4 | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+ create mode 100644 build/pkgs/gap/spkg-configure.m4
+
+diff --git a/build/pkgs/gap/spkg-configure.m4 b/build/pkgs/gap/spkg-configure.m4
+new file mode 100644
+index 00000000..91cd089
+--- /dev/null
++++ b/build/pkgs/gap/spkg-configure.m4
+@@ -0,0 +1,8 @@
++SAGE_SPKG_CONFIGURE([gap], [
++    SAGE_SPKG_DEPCHECK([gmp], [
++       AC_CHECK_HEADER([gap/system.h], [
++        AC_SEARCH_LIBS([GAP_COMM], [gap], [
++        ], [sage_spkg_install_gap=yes])
++       ], [sage_spkg_install_gap=yes])
++    ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2a41f491e5ce599ba185f5e93f02e0fcebd76c9e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Samuel=20Leli=C3=A8vre?= <samuel.lelievre@gmail.com>
+Date: Mon, 22 Mar 2021 03:05:31 +0100
+Subject: 29644: Add distro information for gap
+
+---
+ build/pkgs/gap/distros/fedora.txt | 1 +
+ build/pkgs/gap/distros/gentoo.txt | 1 +
+ 2 files changed, 2 insertions(+)
+ create mode 100644 build/pkgs/gap/distros/fedora.txt
+ create mode 100644 build/pkgs/gap/distros/gentoo.txt
+
+diff --git a/build/pkgs/gap/distros/fedora.txt b/build/pkgs/gap/distros/fedora.txt
+new file mode 100644
+index 00000000..ea4feae
+--- /dev/null
++++ b/build/pkgs/gap/distros/fedora.txt
+@@ -0,0 +1 @@
++gap
+diff --git a/build/pkgs/gap/distros/gentoo.txt b/build/pkgs/gap/distros/gentoo.txt
+new file mode 100644
+index 00000000..ea64ec9
+--- /dev/null
++++ b/build/pkgs/gap/distros/gentoo.txt
+@@ -0,0 +1 @@
++sci-mathematics/gap
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
new file mode 100644
index 000000000000..0ecb27c593cd
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
@@ -0,0 +1,5629 @@
+From 05fcaabe95082f42ba134780d579390d7b6153e2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 19:30:58 -0400
+Subject: Trac #29665: add --enable-system-site-packages option to ./configure.
+
+This new option is experimental and disabled by default. When it is
+enabled, the string "--system-site-packages" is appended to a new
+environment variable SAGE_VENV_FLAGS that is then passed to the
+sage-venv command during the build using autoconf substitution.
+Thusly the correct setting finds its way into local/pyvenv.cfg.
+---
+ build/make/Makefile.in |  2 +-
+ configure.ac           | 11 +++++++++++
+ 2 files changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/build/make/Makefile.in b/build/make/Makefile.in
+index f870cc3..68627ab 100644
+--- a/build/make/Makefile.in
++++ b/build/make/Makefile.in
+@@ -211,7 +211,7 @@ endif
+ inst_python3_venv = $(SAGE_VENV)/pyvenv.cfg
+ 
+ $(inst_python3_venv):
+-	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv "$(SAGE_VENV)"
++	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv @SAGE_VENV_FLAGS@ "$(SAGE_VENV)"
+ endif
+ 
+ # Build everything and start Sage.
+diff --git a/configure.ac b/configure.ac
+index 351f487..db30a91 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -435,6 +435,17 @@ AC_ARG_ENABLE([download-from-upstream-url],
+   [AS_HELP_STRING([--enable-download-from-upstream-url],
+     [allow downloading packages from their upstream URL if they cannot be found on the Sage mirrors])])
+ 
++AC_ARG_ENABLE(
++  [system-site-packages], [AS_HELP_STRING(
++    [--enable-system-site-packages],
++    [allow sage to use python packages from the system (experimental; default: no)]
++  )], [
++  AS_IF([test "x$enable_system_site_packages" = "xyes"], [
++    SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
++  ])
++])
++AC_SUBST([SAGE_VENV_FLAGS])
++
+ SAGE_SPKG_OPTIONS=""
+ AS_IF([test "x$enable_experimental_packages" = "xyes"], [
+   AS_VAR_APPEND([SAGE_SPKG_OPTIONS], [" -y"])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9372d1f663edf4e89f9c186336815ca04cff59dc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 19:41:14 -0400
+Subject: Trac #29665: new SAGE_PYTHON_PACKAGE_CHECK() autoconf macro.
+
+This new macro encapsulates the check for system installations of
+python packages. It uses setuptools.version's pkg_resources to
+check if the contents of install-requires.txt are satisfied for
+the given package; and if not, tells the build system to install
+the SPKG instead.
+---
+ m4/sage_python_package_check.m4 | 49 +++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 49 insertions(+)
+ create mode 100644 m4/sage_python_package_check.m4
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+new file mode 100644
+index 00000000..77b0a0c
+--- /dev/null
++++ b/m4/sage_python_package_check.m4
+@@ -0,0 +1,49 @@
++#
++# SYNOPSIS
++#
++#   SAGE_PYTHON_PACKAGE_CHECK(package)
++#
++# DESCRIPTION
++#
++#   Determine if the system copy of a python package can be used by sage.
++#
++#   This macro uses setuptools.version's pkg_resources to check that the
++#   "install-requires.txt" file for the named package is satisfied, and
++#   it can typically fail in four ways:
++#
++#     1. If --enable-system-site-packages was not passed to ./configure,
++#
++#     2. If we are not using the system python (no $PYTHON_FOR_VENV),
++#
++#     3. If setuptools is not available to the system python,
++#
++#     4. If the contents of install-requires.txt are not met (wrong
++#        version, no version, etc.) by the system python.
++#
++#   In any of those cases, we set sage_spkg_install_$package to "yes"
++#   so that the corresponding SPKG is installed. Otherwise, we do
++#   nothing, since the default value of sage_spkg_install_$package
++#   is "no" (to use the system copy).
++#
++#   The SAGE_SPKG_CONFIGURE_PYTHON3() macro is AC_REQUIRE'd to ensure
++#   that $PYTHON_FOR_VENV is available, if it is going to be available.
++#
++
++AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
++  AS_IF([test "${enable_system_site_packages}" = "yes"], [
++    AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
++
++    dnl strip all comments from install-requires.txt; this should leave
++    dnl only a single line containing the version specification for this
++    dnl package.
++    SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
++    AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++    AS_IF(
++      ["${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())"],
++      [AC_MSG_RESULT(yes)],
++      [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
++    )
++  ], [
++    sage_spkg_install_$1=yes
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a0dac8ad81ad6369d479bba30d2388de59e5cecb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:21:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for py.
+
+---
+ build/pkgs/py/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/py/spkg-configure.m4
+
+diff --git a/build/pkgs/py/spkg-configure.m4 b/build/pkgs/py/spkg-configure.m4
+new file mode 100644
+index 00000000..ded7034
+--- /dev/null
++++ b/build/pkgs/py/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([py], [SAGE_PYTHON_PACKAGE_CHECK([py])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 87c463a25ab4432dc1fba4f7a9703284e5b8f620 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:24:15 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for wheel.
+
+---
+ build/pkgs/wheel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wheel/spkg-configure.m4
+
+diff --git a/build/pkgs/wheel/spkg-configure.m4 b/build/pkgs/wheel/spkg-configure.m4
+new file mode 100644
+index 00000000..7897ea9
+--- /dev/null
++++ b/build/pkgs/wheel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([wheel], [SAGE_PYTHON_PACKAGE_CHECK([wheel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 804094b3a980f262f4d53d7be8b1be43ac0c55e0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:25:15 -0400
+Subject: Trac #29665: new spkg-configure.m4 for cvxopt.
+
+This includes a SAGE_SPKG_DEPCHECK([gsl glpk suitesparse],... because
+those C dependencies wind up linked into shared libraries like,
+
+  /usr/.../cvxopt/glpk.cpython-39-x86_64-linux-gnu.so
+
+that could potentially conflict with (for example) the glpk SPKG.
+---
+ build/pkgs/cvxopt/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/cvxopt/spkg-configure.m4
+
+diff --git a/build/pkgs/cvxopt/spkg-configure.m4 b/build/pkgs/cvxopt/spkg-configure.m4
+new file mode 100644
+index 00000000..c4aa619
+--- /dev/null
++++ b/build/pkgs/cvxopt/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([cvxopt], [
++  SAGE_SPKG_DEPCHECK([gsl glpk suitesparse], [
++    SAGE_PYTHON_PACKAGE_CHECK([cvxopt])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3f171955ff8d15da2c98aee0d2e254e95a55a2b5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:28:10 -0400
+Subject: Trac #29665: new spkg-configure.m4 for pyzmq.
+
+This includes a SAGE_SPKG_DEPCHECK([zeromq],... because libzmq winds
+up linked into shared libraries like,
+
+  /usr/.../zmq/backend/cython/message.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the zeromq SPKG.
+---
+ build/pkgs/pyzmq/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/pyzmq/spkg-configure.m4
+
+diff --git a/build/pkgs/pyzmq/spkg-configure.m4 b/build/pkgs/pyzmq/spkg-configure.m4
+new file mode 100644
+index 00000000..ae2b126
+--- /dev/null
++++ b/build/pkgs/pyzmq/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([pyzmq], [
++  SAGE_SPKG_DEPCHECK([zeromq], [
++    SAGE_PYTHON_PACKAGE_CHECK([pyzmq])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20d3aa9da9fc98a6e6a47599cd1b6d1d3785a4c4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:31:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for requests.
+
+---
+ build/pkgs/requests/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/requests/spkg-configure.m4
+
+diff --git a/build/pkgs/requests/spkg-configure.m4 b/build/pkgs/requests/spkg-configure.m4
+new file mode 100644
+index 00000000..f50a66c
+--- /dev/null
++++ b/build/pkgs/requests/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([requests], [SAGE_PYTHON_PACKAGE_CHECK([requests])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4df57ee47f2576b6b7bf9265248e06e90616b689 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:13:34 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for six.
+
+---
+ build/pkgs/six/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/six/spkg-configure.m4
+
+diff --git a/build/pkgs/six/spkg-configure.m4 b/build/pkgs/six/spkg-configure.m4
+new file mode 100644
+index 00000000..a382b81
+--- /dev/null
++++ b/build/pkgs/six/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([six], [SAGE_PYTHON_PACKAGE_CHECK([six])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f4462652d02ca729cc6d7cb36ee4d7d662deafb0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:14:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for packaging.
+
+---
+ build/pkgs/packaging/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/packaging/spkg-configure.m4
+
+diff --git a/build/pkgs/packaging/spkg-configure.m4 b/build/pkgs/packaging/spkg-configure.m4
+new file mode 100644
+index 00000000..398f9e1
+--- /dev/null
++++ b/build/pkgs/packaging/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([packaging], [SAGE_PYTHON_PACKAGE_CHECK([packaging])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4d64677fffce48077e4bc3e20ec833c70e6e9b65 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:18:53 -0400
+Subject: Trac #29665: new spkg-configure.m4 for numpy.
+
+This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack
+wind up linked into shared libraries like,
+
+  /usr/.../numpy/linalg/lapack_lite.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the openblas SPKG.
+---
+ build/pkgs/numpy/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/numpy/spkg-configure.m4
+
+diff --git a/build/pkgs/numpy/spkg-configure.m4 b/build/pkgs/numpy/spkg-configure.m4
+new file mode 100644
+index 00000000..16f9a90
+--- /dev/null
++++ b/build/pkgs/numpy/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([numpy], [
++  SAGE_SPKG_DEPCHECK([openblas], [
++   SAGE_PYTHON_PACKAGE_CHECK([numpy])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 85dfe5bb32f3c470966b477bae68a921e846d11f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:58:48 -0400
+Subject: Trac #29665: new spkg-configure.m4 for scipy.
+
+This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack
+wind up linked into shared libraries like,
+
+  /usr/.../scipy/linalg/_flinalg.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the openblas SPKG.
+---
+ build/pkgs/scipy/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/scipy/spkg-configure.m4
+
+diff --git a/build/pkgs/scipy/spkg-configure.m4 b/build/pkgs/scipy/spkg-configure.m4
+new file mode 100644
+index 00000000..0b7294a
+--- /dev/null
++++ b/build/pkgs/scipy/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([scipy], [
++  SAGE_SPKG_DEPCHECK([openblas], [
++    SAGE_PYTHON_PACKAGE_CHECK([scipy])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5616f1491036fda95f4d3e840c8c8b531c97323b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 07:19:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pluggy.
+
+---
+ build/pkgs/pluggy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pluggy/spkg-configure.m4
+
+diff --git a/build/pkgs/pluggy/spkg-configure.m4 b/build/pkgs/pluggy/spkg-configure.m4
+new file mode 100644
+index 00000000..11b1fce
+--- /dev/null
++++ b/build/pkgs/pluggy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pluggy], [SAGE_PYTHON_PACKAGE_CHECK([pluggy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6bceae3d356878cfe5fce40c9998dead003a3844 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 07:24:12 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pickleshare.
+
+---
+ build/pkgs/pickleshare/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pickleshare/spkg-configure.m4
+
+diff --git a/build/pkgs/pickleshare/spkg-configure.m4 b/build/pkgs/pickleshare/spkg-configure.m4
+new file mode 100644
+index 00000000..80e9b7c
+--- /dev/null
++++ b/build/pkgs/pickleshare/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pickleshare], [SAGE_PYTHON_PACKAGE_CHECK([pickleshare])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From da2ab534f4a256c82ed4f1c5f0f5c320529b5e9f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 08:53:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for html5lib.
+
+---
+ build/pkgs/html5lib/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/html5lib/spkg-configure.m4
+
+diff --git a/build/pkgs/html5lib/spkg-configure.m4 b/build/pkgs/html5lib/spkg-configure.m4
+new file mode 100644
+index 00000000..f421b7e
+--- /dev/null
++++ b/build/pkgs/html5lib/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([html5lib], [SAGE_PYTHON_PACKAGE_CHECK([html5lib])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5e464134afdf6055b7b5804208f759561c5435cd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 18:30:47 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for networkx.
+
+---
+ build/pkgs/networkx/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/networkx/spkg-configure.m4
+
+diff --git a/build/pkgs/networkx/spkg-configure.m4 b/build/pkgs/networkx/spkg-configure.m4
+new file mode 100644
+index 00000000..926671e
+--- /dev/null
++++ b/build/pkgs/networkx/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([networkx], [SAGE_PYTHON_PACKAGE_CHECK([networkx])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c4d40770cd9c7fda811e31759a5f4aedc320f3f9 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:33:24 -0400
+Subject: Trac #29665: new spkg-configure.m4 for matplotlib.
+
+This includes a SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull],...
+because those dependencies wind up linked into shared libraries like,
+
+  /usr/lib/.../matplotlib/ft2font.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with their SPKG counterparts.
+---
+ build/pkgs/matplotlib/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/matplotlib/spkg-configure.m4
+
+diff --git a/build/pkgs/matplotlib/spkg-configure.m4 b/build/pkgs/matplotlib/spkg-configure.m4
+new file mode 100644
+index 00000000..39c2d29
+--- /dev/null
++++ b/build/pkgs/matplotlib/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([matplotlib], [
++  SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull], [
++    SAGE_PYTHON_PACKAGE_CHECK([matplotlib])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7834dc3ac349201af632f89a9de7cd1967931010 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:35:00 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for bleach.
+
+---
+ build/pkgs/bleach/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/bleach/spkg-configure.m4
+
+diff --git a/build/pkgs/bleach/spkg-configure.m4 b/build/pkgs/bleach/spkg-configure.m4
+new file mode 100644
+index 00000000..3c9bb26
+--- /dev/null
++++ b/build/pkgs/bleach/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([bleach], [SAGE_PYTHON_PACKAGE_CHECK([bleach])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 84cad343287a2c69a4a21b9fa3b92301ff88645b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:37:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for decorator.
+
+---
+ build/pkgs/decorator/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/decorator/spkg-configure.m4
+
+diff --git a/build/pkgs/decorator/spkg-configure.m4 b/build/pkgs/decorator/spkg-configure.m4
+new file mode 100644
+index 00000000..e062778
+--- /dev/null
++++ b/build/pkgs/decorator/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([decorator], [SAGE_PYTHON_PACKAGE_CHECK([decorator])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 25693212572e69d452bc95c923ada13744359eb7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:38:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for idna.
+
+---
+ build/pkgs/idna/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/idna/spkg-configure.m4
+
+diff --git a/build/pkgs/idna/spkg-configure.m4 b/build/pkgs/idna/spkg-configure.m4
+new file mode 100644
+index 00000000..9d363f2
+--- /dev/null
++++ b/build/pkgs/idna/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([idna], [SAGE_PYTHON_PACKAGE_CHECK([idna])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6d5616472f6cdc6cf496bba6fe07bd4ef44dfdaf Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:39:23 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for certifi.
+
+---
+ build/pkgs/certifi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/certifi/spkg-configure.m4
+
+diff --git a/build/pkgs/certifi/spkg-configure.m4 b/build/pkgs/certifi/spkg-configure.m4
+new file mode 100644
+index 00000000..ddd4061
+--- /dev/null
++++ b/build/pkgs/certifi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([certifi], [SAGE_PYTHON_PACKAGE_CHECK([certifi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9412a07023b275e29e8d1af9b8ee3e767042e7fd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:40:59 -0400
+Subject: Trac #29665: new spkg-configure.m4 for pillow.
+
+This includes an SAGE_SPKG_DEPCHECK([bzip2 freetype libpng zlib],...
+because those dependencies wind up linked into shared libraries like,
+
+  /usr/.../PIL/_imagingft.cpython-39-x86_64-linux-gnu.so
+
+and potentially conflict with their SPKG counterparts.
+---
+ build/pkgs/pillow/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/pillow/spkg-configure.m4
+
+diff --git a/build/pkgs/pillow/spkg-configure.m4 b/build/pkgs/pillow/spkg-configure.m4
+new file mode 100644
+index 00000000..f2e68e2
+--- /dev/null
++++ b/build/pkgs/pillow/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([pillow], [
++  SAGE_SPKG_DEPCHECK([bzip2 freetype libpng zlib], [
++    SAGE_PYTHON_PACKAGE_CHECK([pillow])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From eede914311481fdb75b363b7a799075e876a2b4f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:44:13 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for mpmath.
+
+---
+ build/pkgs/mpmath/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mpmath/spkg-configure.m4
+
+diff --git a/build/pkgs/mpmath/spkg-configure.m4 b/build/pkgs/mpmath/spkg-configure.m4
+new file mode 100644
+index 00000000..f43c838
+--- /dev/null
++++ b/build/pkgs/mpmath/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([mpmath], [SAGE_PYTHON_PACKAGE_CHECK([mpmath])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 363a825885832c0b580ff53fe61f5c79e70c4728 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:44:56 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for sympy.
+
+---
+ build/pkgs/sympy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sympy/spkg-configure.m4
+
+diff --git a/build/pkgs/sympy/spkg-configure.m4 b/build/pkgs/sympy/spkg-configure.m4
+new file mode 100644
+index 00000000..fa0f1f5
+--- /dev/null
++++ b/build/pkgs/sympy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([sympy], [SAGE_PYTHON_PACKAGE_CHECK([sympy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0667964c914e4a01dda697190a054ff96cea92d6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:47:06 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pygments.
+
+---
+ build/pkgs/pygments/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pygments/spkg-configure.m4
+
+diff --git a/build/pkgs/pygments/spkg-configure.m4 b/build/pkgs/pygments/spkg-configure.m4
+new file mode 100644
+index 00000000..99f29e3
+--- /dev/null
++++ b/build/pkgs/pygments/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pygments], [SAGE_PYTHON_PACKAGE_CHECK([pygments])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f787c233aa05d8e90f7c6ad18f76bd2fa36bfbfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:48:50 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for jinja2.
+
+---
+ build/pkgs/jinja2/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jinja2/spkg-configure.m4
+
+diff --git a/build/pkgs/jinja2/spkg-configure.m4 b/build/pkgs/jinja2/spkg-configure.m4
+new file mode 100644
+index 00000000..0970d1c
+--- /dev/null
++++ b/build/pkgs/jinja2/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jinja2], [SAGE_PYTHON_PACKAGE_CHECK([jinja2])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 309d8f8e2b7078b5efbbe824b69ec1d9b1e639f0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:43:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pandocfilters.
+
+---
+ build/pkgs/pandocfilters/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/pandocfilters/spkg-configure.m4
+
+diff --git a/build/pkgs/pandocfilters/spkg-configure.m4 b/build/pkgs/pandocfilters/spkg-configure.m4
+new file mode 100644
+index 00000000..3e9537f
+--- /dev/null
++++ b/build/pkgs/pandocfilters/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([pandocfilters], [
++  SAGE_PYTHON_PACKAGE_CHECK([pandocfilters])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f57bfda49777a6ba1cd123553acd75dc347c5521 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:44:46 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for webencodings.
+
+---
+ build/pkgs/webencodings/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/webencodings/spkg-configure.m4
+
+diff --git a/build/pkgs/webencodings/spkg-configure.m4 b/build/pkgs/webencodings/spkg-configure.m4
+new file mode 100644
+index 00000000..1b9a5c4
+--- /dev/null
++++ b/build/pkgs/webencodings/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([webencodings], [
++  SAGE_PYTHON_PACKAGE_CHECK([webencodings])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7f193a62d7a2ea0b6a3ca6beb12390d91c25bbfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:48:26 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pytz.
+
+---
+ build/pkgs/pytz/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pytz/spkg-configure.m4
+
+diff --git a/build/pkgs/pytz/spkg-configure.m4 b/build/pkgs/pytz/spkg-configure.m4
+new file mode 100644
+index 00000000..366521b
+--- /dev/null
++++ b/build/pkgs/pytz/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pytz], [SAGE_PYTHON_PACKAGE_CHECK([pytz])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bfd3fdd887c3465c03465248de4997eed4a82915 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:51:16 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for texttable.
+
+---
+ build/pkgs/texttable/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/texttable/spkg-configure.m4
+
+diff --git a/build/pkgs/texttable/spkg-configure.m4 b/build/pkgs/texttable/spkg-configure.m4
+new file mode 100644
+index 00000000..42a3de1
+--- /dev/null
++++ b/build/pkgs/texttable/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([texttable], [SAGE_PYTHON_PACKAGE_CHECK([texttable])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 914bf0cc57abc46129b27c1525782dbe16da31a2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:53:41 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for babel.
+
+---
+ build/pkgs/babel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/babel/spkg-configure.m4
+
+diff --git a/build/pkgs/babel/spkg-configure.m4 b/build/pkgs/babel/spkg-configure.m4
+new file mode 100644
+index 00000000..d7b9a71
+--- /dev/null
++++ b/build/pkgs/babel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([babel], [SAGE_PYTHON_PACKAGE_CHECK([babel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 56977abd1eafbc87c765a2892cfe525382648259 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 14 Oct 2021 08:06:59 -0400
+Subject: Trac #29665: force system python3 with --enable-system-site-packages.
+
+When the python SPKG is used, the --enable-system-site-packages flag
+will essentially do nothing, and that may confuse users who have
+wasted a few hours building sage. (Generally, they will want to fix
+detection of their system python3 first.)
+
+To forestall that, we now set "--with-system-python3=force" whenever
+the "--enable-system-site-packages" flag is passed.
+---
+ configure.ac | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index db30a91..6fafb83 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -438,10 +438,19 @@ AC_ARG_ENABLE([download-from-upstream-url],
+ AC_ARG_ENABLE(
+   [system-site-packages], [AS_HELP_STRING(
+     [--enable-system-site-packages],
+-    [allow sage to use python packages from the system (experimental; default: no)]
++    [allow the use of python packages from the system (experimental; default: no)]
+   )], [
+   AS_IF([test "x$enable_system_site_packages" = "xyes"], [
+     SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
++
++    dnl We want to raise an error if the user asked for "system site
++    dnl packages" but the system python will not be used. Technically
++    dnl that causes no problems (SAGE_PYTHON_PACKAGE_CHECK always fails,
++    dnl so SPKGs are used for all python packages), but it may be confusing
++    dnl to end users who expect the flag to actually give them access to
++    dnl their system python packages and who may not be paying close
++    dnl attention to their ./configure output.
++    with_system_python3="force"
+   ])
+ ])
+ AC_SUBST([SAGE_VENV_FLAGS])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 02b369fd24ef7cf8997082e7850b9cf022cae34b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 01:18:35 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for setuptools.
+
+---
+ build/pkgs/setuptools/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/setuptools/spkg-configure.m4
+
+diff --git a/build/pkgs/setuptools/spkg-configure.m4 b/build/pkgs/setuptools/spkg-configure.m4
+new file mode 100644
+index 00000000..a2ad811
+--- /dev/null
++++ b/build/pkgs/setuptools/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([setuptools], [SAGE_PYTHON_PACKAGE_CHECK([setuptools])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 05117317d38693978efaf36e81d8b02bae44b257 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 01:15:48 -0400
+Subject: Trac #29665: poison PYTHONUSERBASE when testing for "system"
+ packages.
+
+When we're detecting system installations of python packages, we want
+to hide anything that was installed with e.g. "pip install --user". To
+accomplish that, we mimic the PYTHONUSERBASE poisoning from sage-env
+within the SAGE_PYTHON_PACKAGE_CHECK() macro.
+---
+ m4/sage_python_package_check.m4 | 18 +++++++++++++++++-
+ 1 file changed, 17 insertions(+), 1 deletion(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 77b0a0c..b8cdba4 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -38,11 +38,27 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     dnl package.
+     SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
+     AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++
++    dnl To prevent user-site (pip install --user) packages from being
++    dnl detected as "system" packages, we poison PYTHONUSERBASE. The
++    dnl sage-env script also does this at runtime; we mimic that
++    dnl implementation to ensure that the behaviors at ./configure and
++    dnl runtime are identical. Beware that (as in sage-env) the poisoning
++    dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
++    dnl user points PYTHONUSERBASE to any path (even the default), then
++    dnl his local pip packages will be detected.
++    PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
++    AS_IF([test -z "${PYTHONUSERBASE}"], [
++      PYTHONUSERBASE="${HOME}/.sage/local"
++    ])
++
+     AS_IF(
+-      ["${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())"],
++      [PYTHONUSERBASE="${PYTHONUSERBASE}" "${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" 2>/dev/null],
+       [AC_MSG_RESULT(yes)],
+       [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+     )
++
++    PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d75c1492f63a584b5ec5f424ddd7f7c4a6d502d3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:20:04 -0400
+Subject: Trac #29665: run SAGE_PYTHON_PACKAGE_CHECK() inside a venv.
+
+To recreate the runtime environment as closely as possible, we now use
+a venv (with system site packages enabled) when checking for system
+copies of python packages.
+---
+ m4/sage_python_package_check.m4 | 76 +++++++++++++++++++++++++++--------------
+ 1 file changed, 51 insertions(+), 25 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index b8cdba4..7cbd6c0 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -15,9 +15,11 @@
+ #
+ #     2. If we are not using the system python (no $PYTHON_FOR_VENV),
+ #
+-#     3. If setuptools is not available to the system python,
++#     3. If we are unable to create a venv with the system python,
+ #
+-#     4. If the contents of install-requires.txt are not met (wrong
++#     4. If setuptools is not available to the system python,
++#
++#     5. If the contents of install-requires.txt are not met (wrong
+ #        version, no version, etc.) by the system python.
+ #
+ #   In any of those cases, we set sage_spkg_install_$package to "yes"
+@@ -27,38 +29,62 @@
+ #
+ #   The SAGE_SPKG_CONFIGURE_PYTHON3() macro is AC_REQUIRE'd to ensure
+ #   that $PYTHON_FOR_VENV is available, if it is going to be available.
++#   The check is run inside a new venv, and with the PYTHONUSERBASE
++#   variable poisoned in the same manner as sage-env poisons it, to
++#   ensure that the ./configure- and run-time views of the system
++#   are as similar as possible.
+ #
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
+     AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
+ 
+-    dnl strip all comments from install-requires.txt; this should leave
+-    dnl only a single line containing the version specification for this
+-    dnl package.
+-    SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
+-    AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++    dnl We run this check inside a python venv, because that's ultimately
++    dnl how the system $PYTHON_FOR_VENV will be used.
++    AC_MSG_CHECKING([if we can create a python venv in config.venv])
+ 
+-    dnl To prevent user-site (pip install --user) packages from being
+-    dnl detected as "system" packages, we poison PYTHONUSERBASE. The
+-    dnl sage-env script also does this at runtime; we mimic that
+-    dnl implementation to ensure that the behaviors at ./configure and
+-    dnl runtime are identical. Beware that (as in sage-env) the poisoning
+-    dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
+-    dnl user points PYTHONUSERBASE to any path (even the default), then
+-    dnl his local pip packages will be detected.
+-    PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
+-    AS_IF([test -z "${PYTHONUSERBASE}"], [
+-      PYTHONUSERBASE="${HOME}/.sage/local"
+-    ])
++    dnl Use --clear because ./configure typically clobbers its output files.
++    AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
++                                        --clear                dnl
++                                        --without-pip          dnl
++					config.venv], [
++      AC_MSG_RESULT(yes)
++      dnl strip all comments from install-requires.txt; this should leave
++      dnl only a single line containing the version specification for this
++      dnl package.
++      SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
++      AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++
++      dnl To prevent user-site (pip install --user) packages from being
++      dnl detected as "system" packages, we poison PYTHONUSERBASE. The
++      dnl sage-env script also does this at runtime; we mimic that
++      dnl implementation to ensure that the behaviors at ./configure and
++      dnl runtime are identical. Beware that (as in sage-env) the poisoning
++      dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
++      dnl user points PYTHONUSERBASE to any path (even the default), then
++      dnl his local pip packages will be detected.
++      PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
++      AS_IF([test -z "${PYTHONUSERBASE}"], [
++        PYTHONUSERBASE="${HOME}/.sage/local"
++      ])
+ 
+-    AS_IF(
+-      [PYTHONUSERBASE="${PYTHONUSERBASE}" "${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" 2>/dev/null],
+-      [AC_MSG_RESULT(yes)],
+-      [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+-    )
++      AS_IF(
++        [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
++           "from setuptools.version import pkg_resources;              dnl
++            pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" dnl
++	 2>/dev/null],
++        [AC_MSG_RESULT(yes)],
++        [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
++      )
++
++      PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
++    ], [
++      dnl failed to create a venv for some reason
++      AC_MSG_RESULT(no)
++      sage_spkg_install_$1=yes
++    ])
+ 
+-    PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
++    rm -rf config.venv
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 87646c3264a04ffd98a12d67074f93e1943a1e96 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:38:08 -0400
+Subject: Trac #29665: log SAGE_PYTHON_PACKAGE_CHECK() failures to config.log.
+
+---
+ m4/sage_python_package_check.m4 | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 7cbd6c0..e0e0b9f 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -47,7 +47,8 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
+                                         --clear                dnl
+                                         --without-pip          dnl
+-					config.venv], [
++                                        config.venv            dnl
++                                        2>&AS_MESSAGE_LOG_FD], [
+       AC_MSG_RESULT(yes)
+       dnl strip all comments from install-requires.txt; this should leave
+       dnl only a single line containing the version specification for this
+@@ -72,7 +73,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+         [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
+            "from setuptools.version import pkg_resources;              dnl
+             pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" dnl
+-	 2>/dev/null],
++	 2>&AS_MESSAGE_LOG_FD],
+         [AC_MSG_RESULT(yes)],
+         [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+       )
+-- 
+cgit v1.0-1-gd88e
+
+
+From f7dfffd1c64816e2ae4e0f420b22065c5c5bf2cb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:45:37 -0400
+Subject: Trac #29665: don't clobber a plain file named config.venv.
+
+When SAGE_PYTHON_PACKAGE_CHECK() is cleaning up, we no longer remove
+"config.venv" unconditionally. Instead, we remove it only if it is a
+directory. This is also how "pyvenv --clear" works.
+---
+ m4/sage_python_package_check.m4 | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index e0e0b9f..127a078 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -85,7 +85,9 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+       sage_spkg_install_$1=yes
+     ])
+ 
+-    rm -rf config.venv
++    dnl Clean up config.venv, but only if we could have created it.
++    dnl (The --clear flag to pyvenv will not clobber a plain file.)
++    AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9849c77313b895dcfb786d2ea54e36585bd31ce2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 16 Oct 2021 08:14:42 -0400
+Subject: Trac #29665: don't announce system python packages that won't be
+ used.
+
+When --enable-system-site-packages was not given, the python packages
+using SAGE_PYTHON_PACKAGE_CHECK() in spkg-configure.m4 cannot be used.
+Rather than suggest that users install them anyway, that macro now
+hacks the value of sage_use_system_$package to be "no" when the use
+of system site packages is disabled at the python level.
+---
+ m4/sage_python_package_check.m4 | 17 +++++++++++++++++
+ 1 file changed, 17 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 127a078..7ee82a7 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -89,6 +89,23 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     dnl (The --clear flag to pyvenv will not clobber a plain file.)
+     AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
++    dnl System site packages are disabled.
+     sage_spkg_install_$1=yes
++
++    dnl We have to retroactively hack the --with-system-foo={no,yes,force}
++    dnl mechanism here because it wasn't designed with the ability to
++    dnl disable arbitrary chunks of system packages in mind. The easy cases
++    dnl are "no" and "force" which require no action; "no" means we won't
++    dnl suggest the package anyway, and "force" will raise an error when
++    dnl the system-package check fails.
++    dnl
++    dnl The default of "yes" is more troubling because it is the default. To
++    dnl avoid prompting users to install packages that won't be used, we want
++    dnl to ignore "yes" when reporting the "hint: install these packages..."
++    dnl at the end of ./configure. To accomplish that, we change "yes" to
++    dnl "no" here, essentially changing the default for packages using this
++    dnl macro when --enable-system-site-packages is disabled. Packages with
++    dnl "no" are not suggested to the user.
++    AS_IF([test "${sage_use_system_$1}" = "yes"],[sage_use_system_$1=no])
+   ])
+ ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3e6ad737b94aaac234d615ecaf1a2455eb607f1a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 17 Oct 2021 06:16:21 -0400
+Subject: Trac #29665: add Gentoo package information for python packages.
+
+---
+ build/pkgs/babel/distros/gentoo.txt         | 1 +
+ build/pkgs/bleach/distros/gentoo.txt        | 1 +
+ build/pkgs/certifi/distros/gentoo.txt       | 1 +
+ build/pkgs/cvxopt/distros/gentoo.txt        | 1 +
+ build/pkgs/decorator/distros/gentoo.txt     | 1 +
+ build/pkgs/html5lib/distros/gentoo.txt      | 1 +
+ build/pkgs/idna/distros/gentoo.txt          | 1 +
+ build/pkgs/jinja2/distros/gentoo.txt        | 1 +
+ build/pkgs/matplotlib/distros/gentoo.txt    | 1 +
+ build/pkgs/mpmath/distros/gentoo.txt        | 1 +
+ build/pkgs/networkx/distros/gentoo.txt      | 1 +
+ build/pkgs/numpy/distros/gentoo.txt         | 1 +
+ build/pkgs/packaging/distros/gentoo.txt     | 1 +
+ build/pkgs/pandocfilters/distros/gentoo.txt | 1 +
+ build/pkgs/pickleshare/distros/gentoo.txt   | 1 +
+ build/pkgs/pillow/distros/gentoo.txt        | 1 +
+ build/pkgs/pluggy/distros/gentoo.txt        | 1 +
+ build/pkgs/pygments/distros/gentoo.txt      | 1 +
+ build/pkgs/pytz/distros/gentoo.txt          | 1 +
+ build/pkgs/pyzmq/distros/gentoo.txt         | 1 +
+ build/pkgs/requests/distros/gentoo.txt      | 1 +
+ build/pkgs/scipy/distros/gentoo.txt         | 1 +
+ build/pkgs/setuptools/distros/gentoo.txt    | 1 +
+ build/pkgs/six/distros/gentoo.txt           | 1 +
+ build/pkgs/sympy/distros/gentoo.txt         | 1 +
+ build/pkgs/texttable/distros/gentoo.txt     | 1 +
+ build/pkgs/toml/distros/gentoo.txt          | 1 +
+ build/pkgs/webencodings/distros/gentoo.txt  | 1 +
+ 28 files changed, 28 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/gentoo.txt
+ create mode 100644 build/pkgs/bleach/distros/gentoo.txt
+ create mode 100644 build/pkgs/certifi/distros/gentoo.txt
+ create mode 100644 build/pkgs/cvxopt/distros/gentoo.txt
+ create mode 100644 build/pkgs/decorator/distros/gentoo.txt
+ create mode 100644 build/pkgs/html5lib/distros/gentoo.txt
+ create mode 100644 build/pkgs/idna/distros/gentoo.txt
+ create mode 100644 build/pkgs/jinja2/distros/gentoo.txt
+ create mode 100644 build/pkgs/matplotlib/distros/gentoo.txt
+ create mode 100644 build/pkgs/mpmath/distros/gentoo.txt
+ create mode 100644 build/pkgs/networkx/distros/gentoo.txt
+ create mode 100644 build/pkgs/numpy/distros/gentoo.txt
+ create mode 100644 build/pkgs/packaging/distros/gentoo.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/gentoo.txt
+ create mode 100644 build/pkgs/pickleshare/distros/gentoo.txt
+ create mode 100644 build/pkgs/pillow/distros/gentoo.txt
+ create mode 100644 build/pkgs/pluggy/distros/gentoo.txt
+ create mode 100644 build/pkgs/pygments/distros/gentoo.txt
+ create mode 100644 build/pkgs/pytz/distros/gentoo.txt
+ create mode 100644 build/pkgs/pyzmq/distros/gentoo.txt
+ create mode 100644 build/pkgs/requests/distros/gentoo.txt
+ create mode 100644 build/pkgs/scipy/distros/gentoo.txt
+ create mode 100644 build/pkgs/setuptools/distros/gentoo.txt
+ create mode 100644 build/pkgs/six/distros/gentoo.txt
+ create mode 100644 build/pkgs/sympy/distros/gentoo.txt
+ create mode 100644 build/pkgs/texttable/distros/gentoo.txt
+ create mode 100644 build/pkgs/toml/distros/gentoo.txt
+ create mode 100644 build/pkgs/webencodings/distros/gentoo.txt
+
+diff --git a/build/pkgs/babel/distros/gentoo.txt b/build/pkgs/babel/distros/gentoo.txt
+new file mode 100644
+index 00000000..2d2c34f
+--- /dev/null
++++ b/build/pkgs/babel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/Babel
+diff --git a/build/pkgs/bleach/distros/gentoo.txt b/build/pkgs/bleach/distros/gentoo.txt
+new file mode 100644
+index 00000000..b4f9744
+--- /dev/null
++++ b/build/pkgs/bleach/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/bleach
+diff --git a/build/pkgs/certifi/distros/gentoo.txt b/build/pkgs/certifi/distros/gentoo.txt
+new file mode 100644
+index 00000000..72e2e91
+--- /dev/null
++++ b/build/pkgs/certifi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/certifi
+diff --git a/build/pkgs/cvxopt/distros/gentoo.txt b/build/pkgs/cvxopt/distros/gentoo.txt
+new file mode 100644
+index 00000000..b312391
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/cvxopt
+diff --git a/build/pkgs/decorator/distros/gentoo.txt b/build/pkgs/decorator/distros/gentoo.txt
+new file mode 100644
+index 00000000..fea5a67
+--- /dev/null
++++ b/build/pkgs/decorator/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/decorator
+diff --git a/build/pkgs/html5lib/distros/gentoo.txt b/build/pkgs/html5lib/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c2be76
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/html5lib
+diff --git a/build/pkgs/idna/distros/gentoo.txt b/build/pkgs/idna/distros/gentoo.txt
+new file mode 100644
+index 00000000..68ef51c
+--- /dev/null
++++ b/build/pkgs/idna/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/idna
+diff --git a/build/pkgs/jinja2/distros/gentoo.txt b/build/pkgs/jinja2/distros/gentoo.txt
+new file mode 100644
+index 00000000..15a27ae
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jinja
+diff --git a/build/pkgs/matplotlib/distros/gentoo.txt b/build/pkgs/matplotlib/distros/gentoo.txt
+new file mode 100644
+index 00000000..bcfefb5
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/matplotlib
+diff --git a/build/pkgs/mpmath/distros/gentoo.txt b/build/pkgs/mpmath/distros/gentoo.txt
+new file mode 100644
+index 00000000..946c62d
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/mpmath
+diff --git a/build/pkgs/networkx/distros/gentoo.txt b/build/pkgs/networkx/distros/gentoo.txt
+new file mode 100644
+index 00000000..dd97742
+--- /dev/null
++++ b/build/pkgs/networkx/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/networkx
+diff --git a/build/pkgs/numpy/distros/gentoo.txt b/build/pkgs/numpy/distros/gentoo.txt
+new file mode 100644
+index 00000000..d2179d4
+--- /dev/null
++++ b/build/pkgs/numpy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/numpy
+diff --git a/build/pkgs/packaging/distros/gentoo.txt b/build/pkgs/packaging/distros/gentoo.txt
+new file mode 100644
+index 00000000..e5309ed
+--- /dev/null
++++ b/build/pkgs/packaging/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/packaging
+diff --git a/build/pkgs/pandocfilters/distros/gentoo.txt b/build/pkgs/pandocfilters/distros/gentoo.txt
+new file mode 100644
+index 00000000..a726fda
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/gentoo.txt b/build/pkgs/pickleshare/distros/gentoo.txt
+new file mode 100644
+index 00000000..14fad0f
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pickleshare
+diff --git a/build/pkgs/pillow/distros/gentoo.txt b/build/pkgs/pillow/distros/gentoo.txt
+new file mode 100644
+index 00000000..1243649
+--- /dev/null
++++ b/build/pkgs/pillow/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pillow
+diff --git a/build/pkgs/pluggy/distros/gentoo.txt b/build/pkgs/pluggy/distros/gentoo.txt
+new file mode 100644
+index 00000000..7b33876
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pluggy
+diff --git a/build/pkgs/pygments/distros/gentoo.txt b/build/pkgs/pygments/distros/gentoo.txt
+new file mode 100644
+index 00000000..a584f32
+--- /dev/null
++++ b/build/pkgs/pygments/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pygments
+diff --git a/build/pkgs/pytz/distros/gentoo.txt b/build/pkgs/pytz/distros/gentoo.txt
+new file mode 100644
+index 00000000..902a18b
+--- /dev/null
++++ b/build/pkgs/pytz/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pytz
+diff --git a/build/pkgs/pyzmq/distros/gentoo.txt b/build/pkgs/pyzmq/distros/gentoo.txt
+new file mode 100644
+index 00000000..77c2429
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyzmq
+diff --git a/build/pkgs/requests/distros/gentoo.txt b/build/pkgs/requests/distros/gentoo.txt
+new file mode 100644
+index 00000000..d3dc941
+--- /dev/null
++++ b/build/pkgs/requests/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/requests
+diff --git a/build/pkgs/scipy/distros/gentoo.txt b/build/pkgs/scipy/distros/gentoo.txt
+new file mode 100644
+index 00000000..11dabd2
+--- /dev/null
++++ b/build/pkgs/scipy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/scipy
+diff --git a/build/pkgs/setuptools/distros/gentoo.txt b/build/pkgs/setuptools/distros/gentoo.txt
+new file mode 100644
+index 00000000..3a4fa34
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/setuptools
+diff --git a/build/pkgs/six/distros/gentoo.txt b/build/pkgs/six/distros/gentoo.txt
+new file mode 100644
+index 00000000..f73f648
+--- /dev/null
++++ b/build/pkgs/six/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/six
+diff --git a/build/pkgs/sympy/distros/gentoo.txt b/build/pkgs/sympy/distros/gentoo.txt
+new file mode 100644
+index 00000000..b5a5034
+--- /dev/null
++++ b/build/pkgs/sympy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sympy
+diff --git a/build/pkgs/texttable/distros/gentoo.txt b/build/pkgs/texttable/distros/gentoo.txt
+new file mode 100644
+index 00000000..b33a7a7
+--- /dev/null
++++ b/build/pkgs/texttable/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/texttable
+diff --git a/build/pkgs/toml/distros/gentoo.txt b/build/pkgs/toml/distros/gentoo.txt
+new file mode 100644
+index 00000000..64fcea3
+--- /dev/null
++++ b/build/pkgs/toml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/toml
+diff --git a/build/pkgs/webencodings/distros/gentoo.txt b/build/pkgs/webencodings/distros/gentoo.txt
+new file mode 100644
+index 00000000..7539b0f
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/webencodings
+-- 
+cgit v1.0-1-gd88e
+
+
+From 088380f884124c9608160b613ba031c5f023f604 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 18:43:04 -0700
+Subject: build/pkgs: Add distros/fedora.txt for Python packages
+
+---
+ build/pkgs/babel/distros/fedora.txt         | 1 +
+ build/pkgs/bleach/distros/fedora.txt        | 1 +
+ build/pkgs/certifi/distros/fedora.txt       | 1 +
+ build/pkgs/cvxopt/distros/fedora.txt        | 1 +
+ build/pkgs/decorator/distros/fedora.txt     | 1 +
+ build/pkgs/html5lib/distros/fedora.txt      | 1 +
+ build/pkgs/idna/distros/fedora.txt          | 1 +
+ build/pkgs/jinja2/distros/fedora.txt        | 1 +
+ build/pkgs/matplotlib/distros/fedora.txt    | 1 +
+ build/pkgs/mpmath/distros/fedora.txt        | 1 +
+ build/pkgs/networkx/distros/fedora.txt      | 1 +
+ build/pkgs/numpy/distros/fedora.txt         | 1 +
+ build/pkgs/packaging/distros/fedora.txt     | 1 +
+ build/pkgs/pandocfilters/distros/fedora.txt | 1 +
+ build/pkgs/pickleshare/distros/fedora.txt   | 1 +
+ build/pkgs/pillow/distros/fedora.txt        | 1 +
+ build/pkgs/pluggy/distros/fedora.txt        | 1 +
+ build/pkgs/py/distros/fedora.txt            | 1 +
+ build/pkgs/pygments/distros/fedora.txt      | 1 +
+ build/pkgs/pytz/distros/fedora.txt          | 1 +
+ build/pkgs/pyzmq/distros/fedora.txt         | 1 +
+ build/pkgs/requests/distros/fedora.txt      | 1 +
+ build/pkgs/scipy/distros/fedora.txt         | 1 +
+ build/pkgs/setuptools/distros/fedora.txt    | 1 +
+ build/pkgs/six/distros/fedora.txt           | 1 +
+ build/pkgs/sympy/distros/fedora.txt         | 1 +
+ build/pkgs/texttable/distros/fedora.txt     | 1 +
+ build/pkgs/toml/distros/fedora.txt          | 1 +
+ build/pkgs/webencodings/distros/fedora.txt  | 1 +
+ build/pkgs/wheel/distros/fedora.txt         | 1 +
+ 30 files changed, 30 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/fedora.txt
+ create mode 100644 build/pkgs/bleach/distros/fedora.txt
+ create mode 100644 build/pkgs/certifi/distros/fedora.txt
+ create mode 100644 build/pkgs/cvxopt/distros/fedora.txt
+ create mode 100644 build/pkgs/decorator/distros/fedora.txt
+ create mode 100644 build/pkgs/html5lib/distros/fedora.txt
+ create mode 100644 build/pkgs/idna/distros/fedora.txt
+ create mode 100644 build/pkgs/jinja2/distros/fedora.txt
+ create mode 100644 build/pkgs/matplotlib/distros/fedora.txt
+ create mode 100644 build/pkgs/mpmath/distros/fedora.txt
+ create mode 100644 build/pkgs/networkx/distros/fedora.txt
+ create mode 100644 build/pkgs/numpy/distros/fedora.txt
+ create mode 100644 build/pkgs/packaging/distros/fedora.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/fedora.txt
+ create mode 100644 build/pkgs/pickleshare/distros/fedora.txt
+ create mode 100644 build/pkgs/pillow/distros/fedora.txt
+ create mode 100644 build/pkgs/pluggy/distros/fedora.txt
+ create mode 100644 build/pkgs/py/distros/fedora.txt
+ create mode 100644 build/pkgs/pygments/distros/fedora.txt
+ create mode 100644 build/pkgs/pytz/distros/fedora.txt
+ create mode 100644 build/pkgs/pyzmq/distros/fedora.txt
+ create mode 100644 build/pkgs/requests/distros/fedora.txt
+ create mode 100644 build/pkgs/scipy/distros/fedora.txt
+ create mode 100644 build/pkgs/setuptools/distros/fedora.txt
+ create mode 100644 build/pkgs/six/distros/fedora.txt
+ create mode 100644 build/pkgs/sympy/distros/fedora.txt
+ create mode 100644 build/pkgs/texttable/distros/fedora.txt
+ create mode 100644 build/pkgs/toml/distros/fedora.txt
+ create mode 100644 build/pkgs/webencodings/distros/fedora.txt
+ create mode 100644 build/pkgs/wheel/distros/fedora.txt
+
+diff --git a/build/pkgs/babel/distros/fedora.txt b/build/pkgs/babel/distros/fedora.txt
+new file mode 100644
+index 00000000..98f6593
+--- /dev/null
++++ b/build/pkgs/babel/distros/fedora.txt
+@@ -0,0 +1 @@
++babel
+diff --git a/build/pkgs/bleach/distros/fedora.txt b/build/pkgs/bleach/distros/fedora.txt
+new file mode 100644
+index 00000000..c5422cc
+--- /dev/null
++++ b/build/pkgs/bleach/distros/fedora.txt
+@@ -0,0 +1 @@
++python-bleach
+diff --git a/build/pkgs/certifi/distros/fedora.txt b/build/pkgs/certifi/distros/fedora.txt
+new file mode 100644
+index 00000000..be421c8
+--- /dev/null
++++ b/build/pkgs/certifi/distros/fedora.txt
+@@ -0,0 +1 @@
++python-certifi
+diff --git a/build/pkgs/cvxopt/distros/fedora.txt b/build/pkgs/cvxopt/distros/fedora.txt
+new file mode 100644
+index 00000000..f15770f
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/fedora.txt
+@@ -0,0 +1 @@
++python-cvxopt
+diff --git a/build/pkgs/decorator/distros/fedora.txt b/build/pkgs/decorator/distros/fedora.txt
+new file mode 100644
+index 00000000..0795604
+--- /dev/null
++++ b/build/pkgs/decorator/distros/fedora.txt
+@@ -0,0 +1 @@
++python-decorator
+diff --git a/build/pkgs/html5lib/distros/fedora.txt b/build/pkgs/html5lib/distros/fedora.txt
+new file mode 100644
+index 00000000..b821491
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/fedora.txt
+@@ -0,0 +1 @@
++python-html5lib
+diff --git a/build/pkgs/idna/distros/fedora.txt b/build/pkgs/idna/distros/fedora.txt
+new file mode 100644
+index 00000000..a73e70c
+--- /dev/null
++++ b/build/pkgs/idna/distros/fedora.txt
+@@ -0,0 +1 @@
++python-idna
+diff --git a/build/pkgs/jinja2/distros/fedora.txt b/build/pkgs/jinja2/distros/fedora.txt
+new file mode 100644
+index 00000000..f5f3caf
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/fedora.txt
+@@ -0,0 +1 @@
++python-jinja2
+diff --git a/build/pkgs/matplotlib/distros/fedora.txt b/build/pkgs/matplotlib/distros/fedora.txt
+new file mode 100644
+index 00000000..f6d856e
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/fedora.txt
+@@ -0,0 +1 @@
++python-matplotlib
+diff --git a/build/pkgs/mpmath/distros/fedora.txt b/build/pkgs/mpmath/distros/fedora.txt
+new file mode 100644
+index 00000000..a7dc8d5
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/fedora.txt
+@@ -0,0 +1 @@
++python-mpmath
+diff --git a/build/pkgs/networkx/distros/fedora.txt b/build/pkgs/networkx/distros/fedora.txt
+new file mode 100644
+index 00000000..293f943
+--- /dev/null
++++ b/build/pkgs/networkx/distros/fedora.txt
+@@ -0,0 +1 @@
++python-networkx
+diff --git a/build/pkgs/numpy/distros/fedora.txt b/build/pkgs/numpy/distros/fedora.txt
+new file mode 100644
+index 00000000..c8722b9
+--- /dev/null
++++ b/build/pkgs/numpy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-numpy
+diff --git a/build/pkgs/packaging/distros/fedora.txt b/build/pkgs/packaging/distros/fedora.txt
+new file mode 100644
+index 00000000..02ad855
+--- /dev/null
++++ b/build/pkgs/packaging/distros/fedora.txt
+@@ -0,0 +1 @@
++python-packaging
+diff --git a/build/pkgs/pandocfilters/distros/fedora.txt b/build/pkgs/pandocfilters/distros/fedora.txt
+new file mode 100644
+index 00000000..e7a86d0
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/fedora.txt b/build/pkgs/pickleshare/distros/fedora.txt
+new file mode 100644
+index 00000000..6d991a2
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pickleshare
+diff --git a/build/pkgs/pillow/distros/fedora.txt b/build/pkgs/pillow/distros/fedora.txt
+new file mode 100644
+index 00000000..86dbb1d
+--- /dev/null
++++ b/build/pkgs/pillow/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pillow
+diff --git a/build/pkgs/pluggy/distros/fedora.txt b/build/pkgs/pluggy/distros/fedora.txt
+new file mode 100644
+index 00000000..c869e54
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pluggy
+diff --git a/build/pkgs/py/distros/fedora.txt b/build/pkgs/py/distros/fedora.txt
+new file mode 100644
+index 00000000..b348d39
+--- /dev/null
++++ b/build/pkgs/py/distros/fedora.txt
+@@ -0,0 +1 @@
++python-py
+diff --git a/build/pkgs/pygments/distros/fedora.txt b/build/pkgs/pygments/distros/fedora.txt
+new file mode 100644
+index 00000000..f3e72a8
+--- /dev/null
++++ b/build/pkgs/pygments/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pygments
+diff --git a/build/pkgs/pytz/distros/fedora.txt b/build/pkgs/pytz/distros/fedora.txt
+new file mode 100644
+index 00000000..2cccc9e
+--- /dev/null
++++ b/build/pkgs/pytz/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pytz
+diff --git a/build/pkgs/pyzmq/distros/fedora.txt b/build/pkgs/pyzmq/distros/fedora.txt
+new file mode 100644
+index 00000000..23f64d1
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pyzmq
+diff --git a/build/pkgs/requests/distros/fedora.txt b/build/pkgs/requests/distros/fedora.txt
+new file mode 100644
+index 00000000..93a7bc1
+--- /dev/null
++++ b/build/pkgs/requests/distros/fedora.txt
+@@ -0,0 +1 @@
++python-requests
+diff --git a/build/pkgs/scipy/distros/fedora.txt b/build/pkgs/scipy/distros/fedora.txt
+new file mode 100644
+index 00000000..7ff2882
+--- /dev/null
++++ b/build/pkgs/scipy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-scipy
+diff --git a/build/pkgs/setuptools/distros/fedora.txt b/build/pkgs/setuptools/distros/fedora.txt
+new file mode 100644
+index 00000000..e1ad178
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/fedora.txt
+@@ -0,0 +1 @@
++python-setuptools
+diff --git a/build/pkgs/six/distros/fedora.txt b/build/pkgs/six/distros/fedora.txt
+new file mode 100644
+index 00000000..787c530
+--- /dev/null
++++ b/build/pkgs/six/distros/fedora.txt
+@@ -0,0 +1 @@
++python-six
+diff --git a/build/pkgs/sympy/distros/fedora.txt b/build/pkgs/sympy/distros/fedora.txt
+new file mode 100644
+index 00000000..126c88a
+--- /dev/null
++++ b/build/pkgs/sympy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-sympy
+diff --git a/build/pkgs/texttable/distros/fedora.txt b/build/pkgs/texttable/distros/fedora.txt
+new file mode 100644
+index 00000000..8d1ccec
+--- /dev/null
++++ b/build/pkgs/texttable/distros/fedora.txt
+@@ -0,0 +1 @@
++python-texttable
+diff --git a/build/pkgs/toml/distros/fedora.txt b/build/pkgs/toml/distros/fedora.txt
+new file mode 100644
+index 00000000..821ee77
+--- /dev/null
++++ b/build/pkgs/toml/distros/fedora.txt
+@@ -0,0 +1 @@
++python-toml
+diff --git a/build/pkgs/webencodings/distros/fedora.txt b/build/pkgs/webencodings/distros/fedora.txt
+new file mode 100644
+index 00000000..12ddba9
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/fedora.txt
+@@ -0,0 +1 @@
++python-webencodings
+diff --git a/build/pkgs/wheel/distros/fedora.txt b/build/pkgs/wheel/distros/fedora.txt
+new file mode 100644
+index 00000000..ae4cbb9
+--- /dev/null
++++ b/build/pkgs/wheel/distros/fedora.txt
+@@ -0,0 +1 @@
++python-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From ad1d5a20380b147c774903066031442f31094626 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 21:04:04 -0700
+Subject: build/pkgs: Add distros/arch.txt for Python packages
+
+---
+ build/pkgs/babel/distros/arch.txt         | 1 +
+ build/pkgs/bleach/distros/arch.txt        | 1 +
+ build/pkgs/certifi/distros/arch.txt       | 1 +
+ build/pkgs/cvxopt/distros/arch.txt        | 1 +
+ build/pkgs/decorator/distros/arch.txt     | 1 +
+ build/pkgs/html5lib/distros/arch.txt      | 1 +
+ build/pkgs/idna/distros/arch.txt          | 1 +
+ build/pkgs/matplotlib/distros/arch.txt    | 1 +
+ build/pkgs/mpmath/distros/arch.txt        | 1 +
+ build/pkgs/networkx/distros/arch.txt      | 1 +
+ build/pkgs/numpy/distros/arch.txt         | 1 +
+ build/pkgs/packaging/distros/arch.txt     | 1 +
+ build/pkgs/pandocfilters/distros/arch.txt | 1 +
+ build/pkgs/pickleshare/distros/arch.txt   | 1 +
+ build/pkgs/pillow/distros/arch.txt        | 1 +
+ build/pkgs/pluggy/distros/arch.txt        | 1 +
+ build/pkgs/py/distros/arch.txt            | 1 +
+ build/pkgs/pygments/distros/arch.txt      | 1 +
+ build/pkgs/pytz/distros/arch.txt          | 1 +
+ build/pkgs/pyzmq/distros/arch.txt         | 1 +
+ build/pkgs/requests/distros/arch.txt      | 1 +
+ build/pkgs/scipy/distros/arch.txt         | 1 +
+ build/pkgs/setuptools/distros/arch.txt    | 1 +
+ build/pkgs/six/distros/arch.txt           | 1 +
+ build/pkgs/sympy/distros/arch.txt         | 1 +
+ build/pkgs/texttable/distros/arch.txt     | 1 +
+ build/pkgs/toml/distros/arch.txt          | 1 +
+ build/pkgs/webencodings/distros/arch.txt  | 1 +
+ build/pkgs/wheel/distros/arch.txt         | 1 +
+ 29 files changed, 29 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/arch.txt
+ create mode 100644 build/pkgs/bleach/distros/arch.txt
+ create mode 100644 build/pkgs/certifi/distros/arch.txt
+ create mode 100644 build/pkgs/cvxopt/distros/arch.txt
+ create mode 100644 build/pkgs/decorator/distros/arch.txt
+ create mode 100644 build/pkgs/html5lib/distros/arch.txt
+ create mode 100644 build/pkgs/idna/distros/arch.txt
+ create mode 100644 build/pkgs/matplotlib/distros/arch.txt
+ create mode 100644 build/pkgs/mpmath/distros/arch.txt
+ create mode 100644 build/pkgs/networkx/distros/arch.txt
+ create mode 100644 build/pkgs/numpy/distros/arch.txt
+ create mode 100644 build/pkgs/packaging/distros/arch.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/arch.txt
+ create mode 100644 build/pkgs/pickleshare/distros/arch.txt
+ create mode 100644 build/pkgs/pillow/distros/arch.txt
+ create mode 100644 build/pkgs/pluggy/distros/arch.txt
+ create mode 100644 build/pkgs/py/distros/arch.txt
+ create mode 100644 build/pkgs/pygments/distros/arch.txt
+ create mode 100644 build/pkgs/pytz/distros/arch.txt
+ create mode 100644 build/pkgs/pyzmq/distros/arch.txt
+ create mode 100644 build/pkgs/requests/distros/arch.txt
+ create mode 100644 build/pkgs/scipy/distros/arch.txt
+ create mode 100644 build/pkgs/setuptools/distros/arch.txt
+ create mode 100644 build/pkgs/six/distros/arch.txt
+ create mode 100644 build/pkgs/sympy/distros/arch.txt
+ create mode 100644 build/pkgs/texttable/distros/arch.txt
+ create mode 100644 build/pkgs/toml/distros/arch.txt
+ create mode 100644 build/pkgs/webencodings/distros/arch.txt
+ create mode 100644 build/pkgs/wheel/distros/arch.txt
+
+diff --git a/build/pkgs/babel/distros/arch.txt b/build/pkgs/babel/distros/arch.txt
+new file mode 100644
+index 00000000..f2d828c
+--- /dev/null
++++ b/build/pkgs/babel/distros/arch.txt
+@@ -0,0 +1 @@
++python-babel
+diff --git a/build/pkgs/bleach/distros/arch.txt b/build/pkgs/bleach/distros/arch.txt
+new file mode 100644
+index 00000000..c5422cc
+--- /dev/null
++++ b/build/pkgs/bleach/distros/arch.txt
+@@ -0,0 +1 @@
++python-bleach
+diff --git a/build/pkgs/certifi/distros/arch.txt b/build/pkgs/certifi/distros/arch.txt
+new file mode 100644
+index 00000000..be421c8
+--- /dev/null
++++ b/build/pkgs/certifi/distros/arch.txt
+@@ -0,0 +1 @@
++python-certifi
+diff --git a/build/pkgs/cvxopt/distros/arch.txt b/build/pkgs/cvxopt/distros/arch.txt
+new file mode 100644
+index 00000000..f15770f
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/arch.txt
+@@ -0,0 +1 @@
++python-cvxopt
+diff --git a/build/pkgs/decorator/distros/arch.txt b/build/pkgs/decorator/distros/arch.txt
+new file mode 100644
+index 00000000..0795604
+--- /dev/null
++++ b/build/pkgs/decorator/distros/arch.txt
+@@ -0,0 +1 @@
++python-decorator
+diff --git a/build/pkgs/html5lib/distros/arch.txt b/build/pkgs/html5lib/distros/arch.txt
+new file mode 100644
+index 00000000..b821491
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/arch.txt
+@@ -0,0 +1 @@
++python-html5lib
+diff --git a/build/pkgs/idna/distros/arch.txt b/build/pkgs/idna/distros/arch.txt
+new file mode 100644
+index 00000000..a73e70c
+--- /dev/null
++++ b/build/pkgs/idna/distros/arch.txt
+@@ -0,0 +1 @@
++python-idna
+diff --git a/build/pkgs/matplotlib/distros/arch.txt b/build/pkgs/matplotlib/distros/arch.txt
+new file mode 100644
+index 00000000..f6d856e
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/arch.txt
+@@ -0,0 +1 @@
++python-matplotlib
+diff --git a/build/pkgs/mpmath/distros/arch.txt b/build/pkgs/mpmath/distros/arch.txt
+new file mode 100644
+index 00000000..a7dc8d5
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/arch.txt
+@@ -0,0 +1 @@
++python-mpmath
+diff --git a/build/pkgs/networkx/distros/arch.txt b/build/pkgs/networkx/distros/arch.txt
+new file mode 100644
+index 00000000..293f943
+--- /dev/null
++++ b/build/pkgs/networkx/distros/arch.txt
+@@ -0,0 +1 @@
++python-networkx
+diff --git a/build/pkgs/numpy/distros/arch.txt b/build/pkgs/numpy/distros/arch.txt
+new file mode 100644
+index 00000000..c8722b9
+--- /dev/null
++++ b/build/pkgs/numpy/distros/arch.txt
+@@ -0,0 +1 @@
++python-numpy
+diff --git a/build/pkgs/packaging/distros/arch.txt b/build/pkgs/packaging/distros/arch.txt
+new file mode 100644
+index 00000000..02ad855
+--- /dev/null
++++ b/build/pkgs/packaging/distros/arch.txt
+@@ -0,0 +1 @@
++python-packaging
+diff --git a/build/pkgs/pandocfilters/distros/arch.txt b/build/pkgs/pandocfilters/distros/arch.txt
+new file mode 100644
+index 00000000..e7a86d0
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/arch.txt
+@@ -0,0 +1 @@
++python-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/arch.txt b/build/pkgs/pickleshare/distros/arch.txt
+new file mode 100644
+index 00000000..6d991a2
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/arch.txt
+@@ -0,0 +1 @@
++python-pickleshare
+diff --git a/build/pkgs/pillow/distros/arch.txt b/build/pkgs/pillow/distros/arch.txt
+new file mode 100644
+index 00000000..86dbb1d
+--- /dev/null
++++ b/build/pkgs/pillow/distros/arch.txt
+@@ -0,0 +1 @@
++python-pillow
+diff --git a/build/pkgs/pluggy/distros/arch.txt b/build/pkgs/pluggy/distros/arch.txt
+new file mode 100644
+index 00000000..c869e54
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/arch.txt
+@@ -0,0 +1 @@
++python-pluggy
+diff --git a/build/pkgs/py/distros/arch.txt b/build/pkgs/py/distros/arch.txt
+new file mode 100644
+index 00000000..b348d39
+--- /dev/null
++++ b/build/pkgs/py/distros/arch.txt
+@@ -0,0 +1 @@
++python-py
+diff --git a/build/pkgs/pygments/distros/arch.txt b/build/pkgs/pygments/distros/arch.txt
+new file mode 100644
+index 00000000..f3e72a8
+--- /dev/null
++++ b/build/pkgs/pygments/distros/arch.txt
+@@ -0,0 +1 @@
++python-pygments
+diff --git a/build/pkgs/pytz/distros/arch.txt b/build/pkgs/pytz/distros/arch.txt
+new file mode 100644
+index 00000000..2cccc9e
+--- /dev/null
++++ b/build/pkgs/pytz/distros/arch.txt
+@@ -0,0 +1 @@
++python-pytz
+diff --git a/build/pkgs/pyzmq/distros/arch.txt b/build/pkgs/pyzmq/distros/arch.txt
+new file mode 100644
+index 00000000..23f64d1
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/arch.txt
+@@ -0,0 +1 @@
++python-pyzmq
+diff --git a/build/pkgs/requests/distros/arch.txt b/build/pkgs/requests/distros/arch.txt
+new file mode 100644
+index 00000000..93a7bc1
+--- /dev/null
++++ b/build/pkgs/requests/distros/arch.txt
+@@ -0,0 +1 @@
++python-requests
+diff --git a/build/pkgs/scipy/distros/arch.txt b/build/pkgs/scipy/distros/arch.txt
+new file mode 100644
+index 00000000..7ff2882
+--- /dev/null
++++ b/build/pkgs/scipy/distros/arch.txt
+@@ -0,0 +1 @@
++python-scipy
+diff --git a/build/pkgs/setuptools/distros/arch.txt b/build/pkgs/setuptools/distros/arch.txt
+new file mode 100644
+index 00000000..e1ad178
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/arch.txt
+@@ -0,0 +1 @@
++python-setuptools
+diff --git a/build/pkgs/six/distros/arch.txt b/build/pkgs/six/distros/arch.txt
+new file mode 100644
+index 00000000..787c530
+--- /dev/null
++++ b/build/pkgs/six/distros/arch.txt
+@@ -0,0 +1 @@
++python-six
+diff --git a/build/pkgs/sympy/distros/arch.txt b/build/pkgs/sympy/distros/arch.txt
+new file mode 100644
+index 00000000..126c88a
+--- /dev/null
++++ b/build/pkgs/sympy/distros/arch.txt
+@@ -0,0 +1 @@
++python-sympy
+diff --git a/build/pkgs/texttable/distros/arch.txt b/build/pkgs/texttable/distros/arch.txt
+new file mode 100644
+index 00000000..8d1ccec
+--- /dev/null
++++ b/build/pkgs/texttable/distros/arch.txt
+@@ -0,0 +1 @@
++python-texttable
+diff --git a/build/pkgs/toml/distros/arch.txt b/build/pkgs/toml/distros/arch.txt
+new file mode 100644
+index 00000000..821ee77
+--- /dev/null
++++ b/build/pkgs/toml/distros/arch.txt
+@@ -0,0 +1 @@
++python-toml
+diff --git a/build/pkgs/webencodings/distros/arch.txt b/build/pkgs/webencodings/distros/arch.txt
+new file mode 100644
+index 00000000..12ddba9
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/arch.txt
+@@ -0,0 +1 @@
++python-webencodings
+diff --git a/build/pkgs/wheel/distros/arch.txt b/build/pkgs/wheel/distros/arch.txt
+new file mode 100644
+index 00000000..ae4cbb9
+--- /dev/null
++++ b/build/pkgs/wheel/distros/arch.txt
+@@ -0,0 +1 @@
++python-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5087abee08f2a89ddaf422ec72a84575fe724a79 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 21:20:56 -0700
+Subject: build/pkgs: Add distros/opensuse.txt for Python packages
+
+---
+ build/pkgs/bleach/distros/opensuse.txt        | 1 +
+ build/pkgs/cvxopt/distros/opensuse.txt        | 1 +
+ build/pkgs/html5lib/distros/opensuse.txt      | 1 +
+ build/pkgs/idna/distros/opensuse.txt          | 1 +
+ build/pkgs/jinja2/distros/opensuse.txt        | 2 +-
+ build/pkgs/mpmath/distros/opensuse.txt        | 1 +
+ build/pkgs/numpy/distros/opensuse.txt         | 1 +
+ build/pkgs/packaging/distros/opensuse.txt     | 1 +
+ build/pkgs/pandocfilters/distros/opensuse.txt | 1 +
+ build/pkgs/pluggy/distros/opensuse.txt        | 1 +
+ build/pkgs/py/distros/opensuse.txt            | 1 +
+ build/pkgs/pygments/distros/opensuse.txt      | 2 +-
+ build/pkgs/sympy/distros/opensuse.txt         | 1 +
+ build/pkgs/texttable/distros/opensuse.txt     | 1 +
+ build/pkgs/toml/distros/opensuse.txt          | 1 +
+ 15 files changed, 15 insertions(+), 2 deletions(-)
+ create mode 100644 build/pkgs/bleach/distros/opensuse.txt
+ create mode 100644 build/pkgs/cvxopt/distros/opensuse.txt
+ create mode 100644 build/pkgs/html5lib/distros/opensuse.txt
+ create mode 100644 build/pkgs/idna/distros/opensuse.txt
+ create mode 100644 build/pkgs/mpmath/distros/opensuse.txt
+ create mode 100644 build/pkgs/numpy/distros/opensuse.txt
+ create mode 100644 build/pkgs/packaging/distros/opensuse.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/opensuse.txt
+ create mode 100644 build/pkgs/pluggy/distros/opensuse.txt
+ create mode 100644 build/pkgs/py/distros/opensuse.txt
+ create mode 100644 build/pkgs/sympy/distros/opensuse.txt
+ create mode 100644 build/pkgs/texttable/distros/opensuse.txt
+ create mode 100644 build/pkgs/toml/distros/opensuse.txt
+
+diff --git a/build/pkgs/bleach/distros/opensuse.txt b/build/pkgs/bleach/distros/opensuse.txt
+new file mode 100644
+index 00000000..6d37c4c
+--- /dev/null
++++ b/build/pkgs/bleach/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-bleach
+diff --git a/build/pkgs/cvxopt/distros/opensuse.txt b/build/pkgs/cvxopt/distros/opensuse.txt
+new file mode 100644
+index 00000000..2bb6ad1
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-cvxopt
+diff --git a/build/pkgs/html5lib/distros/opensuse.txt b/build/pkgs/html5lib/distros/opensuse.txt
+new file mode 100644
+index 00000000..6d7b8df
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-html5lib
+diff --git a/build/pkgs/idna/distros/opensuse.txt b/build/pkgs/idna/distros/opensuse.txt
+new file mode 100644
+index 00000000..de48e70
+--- /dev/null
++++ b/build/pkgs/idna/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-idna
+diff --git a/build/pkgs/jinja2/distros/opensuse.txt b/build/pkgs/jinja2/distros/opensuse.txt
+index 5d90a22..f2db865 100644
+--- a/build/pkgs/jinja2/distros/opensuse.txt
++++ b/build/pkgs/jinja2/distros/opensuse.txt
+@@ -1 +1 @@
+-python3-Jinja2
++python3-jinja2
+diff --git a/build/pkgs/mpmath/distros/opensuse.txt b/build/pkgs/mpmath/distros/opensuse.txt
+new file mode 100644
+index 00000000..fbc82a9
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-mpmath
+diff --git a/build/pkgs/numpy/distros/opensuse.txt b/build/pkgs/numpy/distros/opensuse.txt
+new file mode 100644
+index 00000000..79d5c5a
+--- /dev/null
++++ b/build/pkgs/numpy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-numpy
+diff --git a/build/pkgs/packaging/distros/opensuse.txt b/build/pkgs/packaging/distros/opensuse.txt
+new file mode 100644
+index 00000000..8f1c0ff
+--- /dev/null
++++ b/build/pkgs/packaging/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-packaging
+diff --git a/build/pkgs/pandocfilters/distros/opensuse.txt b/build/pkgs/pandocfilters/distros/opensuse.txt
+new file mode 100644
+index 00000000..d0d4c24
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-pandocfilters
+diff --git a/build/pkgs/pluggy/distros/opensuse.txt b/build/pkgs/pluggy/distros/opensuse.txt
+new file mode 100644
+index 00000000..43a3acf
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-pluggy
+diff --git a/build/pkgs/py/distros/opensuse.txt b/build/pkgs/py/distros/opensuse.txt
+new file mode 100644
+index 00000000..81fefe6
+--- /dev/null
++++ b/build/pkgs/py/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-py
+diff --git a/build/pkgs/pygments/distros/opensuse.txt b/build/pkgs/pygments/distros/opensuse.txt
+index 9ff5740..3ab3792 100644
+--- a/build/pkgs/pygments/distros/opensuse.txt
++++ b/build/pkgs/pygments/distros/opensuse.txt
+@@ -1 +1 @@
+-python3-Pygments
++python3-pygments
+diff --git a/build/pkgs/sympy/distros/opensuse.txt b/build/pkgs/sympy/distros/opensuse.txt
+new file mode 100644
+index 00000000..db423c8
+--- /dev/null
++++ b/build/pkgs/sympy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-sympy
+diff --git a/build/pkgs/texttable/distros/opensuse.txt b/build/pkgs/texttable/distros/opensuse.txt
+new file mode 100644
+index 00000000..8f8e7e2
+--- /dev/null
++++ b/build/pkgs/texttable/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-texttable
+diff --git a/build/pkgs/toml/distros/opensuse.txt b/build/pkgs/toml/distros/opensuse.txt
+new file mode 100644
+index 00000000..543e89d
+--- /dev/null
++++ b/build/pkgs/toml/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-toml
+-- 
+cgit v1.0-1-gd88e
+
+
+From a480ba7ace1370d106ae831e904ea22b72af1be7 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 22:45:04 -0700
+Subject: build/pkgs: Add distros/debian.txt for Python packages
+
+---
+ build/pkgs/babel/distros/debian.txt         | 1 +
+ build/pkgs/bleach/distros/debian.txt        | 1 +
+ build/pkgs/certifi/distros/debian.txt       | 1 +
+ build/pkgs/cvxopt/distros/debian.txt        | 1 +
+ build/pkgs/decorator/distros/debian.txt     | 1 +
+ build/pkgs/html5lib/distros/debian.txt      | 1 +
+ build/pkgs/idna/distros/debian.txt          | 1 +
+ build/pkgs/jinja2/distros/debian.txt        | 1 +
+ build/pkgs/matplotlib/distros/debian.txt    | 1 +
+ build/pkgs/mpmath/distros/debian.txt        | 1 +
+ build/pkgs/networkx/distros/debian.txt      | 1 +
+ build/pkgs/numpy/distros/debian.txt         | 1 +
+ build/pkgs/packaging/distros/debian.txt     | 1 +
+ build/pkgs/pandocfilters/distros/debian.txt | 1 +
+ build/pkgs/pickleshare/distros/debian.txt   | 1 +
+ build/pkgs/pillow/distros/debian.txt        | 1 +
+ build/pkgs/pluggy/distros/debian.txt        | 1 +
+ build/pkgs/py/distros/debian.txt            | 1 +
+ build/pkgs/pygments/distros/debian.txt      | 1 +
+ build/pkgs/pytz/distros/debian.txt          | 1 +
+ build/pkgs/requests/distros/debian.txt      | 1 +
+ build/pkgs/scipy/distros/debian.txt         | 1 +
+ build/pkgs/setuptools/distros/debian.txt    | 1 +
+ build/pkgs/six/distros/debian.txt           | 1 +
+ build/pkgs/sympy/distros/debian.txt         | 1 +
+ build/pkgs/texttable/distros/debian.txt     | 1 +
+ build/pkgs/toml/distros/debian.txt          | 1 +
+ build/pkgs/webencodings/distros/debian.txt  | 1 +
+ build/pkgs/wheel/distros/debian.txt         | 1 +
+ 29 files changed, 29 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/debian.txt
+ create mode 100644 build/pkgs/bleach/distros/debian.txt
+ create mode 100644 build/pkgs/certifi/distros/debian.txt
+ create mode 100644 build/pkgs/cvxopt/distros/debian.txt
+ create mode 100644 build/pkgs/decorator/distros/debian.txt
+ create mode 100644 build/pkgs/html5lib/distros/debian.txt
+ create mode 100644 build/pkgs/idna/distros/debian.txt
+ create mode 100644 build/pkgs/jinja2/distros/debian.txt
+ create mode 100644 build/pkgs/matplotlib/distros/debian.txt
+ create mode 100644 build/pkgs/mpmath/distros/debian.txt
+ create mode 100644 build/pkgs/networkx/distros/debian.txt
+ create mode 100644 build/pkgs/numpy/distros/debian.txt
+ create mode 100644 build/pkgs/packaging/distros/debian.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/debian.txt
+ create mode 100644 build/pkgs/pickleshare/distros/debian.txt
+ create mode 100644 build/pkgs/pillow/distros/debian.txt
+ create mode 100644 build/pkgs/pluggy/distros/debian.txt
+ create mode 100644 build/pkgs/py/distros/debian.txt
+ create mode 100644 build/pkgs/pygments/distros/debian.txt
+ create mode 100644 build/pkgs/pytz/distros/debian.txt
+ create mode 100644 build/pkgs/requests/distros/debian.txt
+ create mode 100644 build/pkgs/scipy/distros/debian.txt
+ create mode 100644 build/pkgs/setuptools/distros/debian.txt
+ create mode 100644 build/pkgs/six/distros/debian.txt
+ create mode 100644 build/pkgs/sympy/distros/debian.txt
+ create mode 100644 build/pkgs/texttable/distros/debian.txt
+ create mode 100644 build/pkgs/toml/distros/debian.txt
+ create mode 100644 build/pkgs/webencodings/distros/debian.txt
+ create mode 100644 build/pkgs/wheel/distros/debian.txt
+
+diff --git a/build/pkgs/babel/distros/debian.txt b/build/pkgs/babel/distros/debian.txt
+new file mode 100644
+index 00000000..e623eb6
+--- /dev/null
++++ b/build/pkgs/babel/distros/debian.txt
+@@ -0,0 +1 @@
++python3-babel
+diff --git a/build/pkgs/bleach/distros/debian.txt b/build/pkgs/bleach/distros/debian.txt
+new file mode 100644
+index 00000000..6d37c4c
+--- /dev/null
++++ b/build/pkgs/bleach/distros/debian.txt
+@@ -0,0 +1 @@
++python3-bleach
+diff --git a/build/pkgs/certifi/distros/debian.txt b/build/pkgs/certifi/distros/debian.txt
+new file mode 100644
+index 00000000..f585a82
+--- /dev/null
++++ b/build/pkgs/certifi/distros/debian.txt
+@@ -0,0 +1 @@
++python3-certifi
+diff --git a/build/pkgs/cvxopt/distros/debian.txt b/build/pkgs/cvxopt/distros/debian.txt
+new file mode 100644
+index 00000000..2bb6ad1
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/debian.txt
+@@ -0,0 +1 @@
++python3-cvxopt
+diff --git a/build/pkgs/decorator/distros/debian.txt b/build/pkgs/decorator/distros/debian.txt
+new file mode 100644
+index 00000000..46c478e
+--- /dev/null
++++ b/build/pkgs/decorator/distros/debian.txt
+@@ -0,0 +1 @@
++python3-decorator
+diff --git a/build/pkgs/html5lib/distros/debian.txt b/build/pkgs/html5lib/distros/debian.txt
+new file mode 100644
+index 00000000..6d7b8df
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/debian.txt
+@@ -0,0 +1 @@
++python3-html5lib
+diff --git a/build/pkgs/idna/distros/debian.txt b/build/pkgs/idna/distros/debian.txt
+new file mode 100644
+index 00000000..de48e70
+--- /dev/null
++++ b/build/pkgs/idna/distros/debian.txt
+@@ -0,0 +1 @@
++python3-idna
+diff --git a/build/pkgs/jinja2/distros/debian.txt b/build/pkgs/jinja2/distros/debian.txt
+new file mode 100644
+index 00000000..f2db865
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/debian.txt
+@@ -0,0 +1 @@
++python3-jinja2
+diff --git a/build/pkgs/matplotlib/distros/debian.txt b/build/pkgs/matplotlib/distros/debian.txt
+new file mode 100644
+index 00000000..1374329
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/debian.txt
+@@ -0,0 +1 @@
++python3-matplotlib
+diff --git a/build/pkgs/mpmath/distros/debian.txt b/build/pkgs/mpmath/distros/debian.txt
+new file mode 100644
+index 00000000..fbc82a9
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/debian.txt
+@@ -0,0 +1 @@
++python3-mpmath
+diff --git a/build/pkgs/networkx/distros/debian.txt b/build/pkgs/networkx/distros/debian.txt
+new file mode 100644
+index 00000000..6779066
+--- /dev/null
++++ b/build/pkgs/networkx/distros/debian.txt
+@@ -0,0 +1 @@
++python3-networkx
+diff --git a/build/pkgs/numpy/distros/debian.txt b/build/pkgs/numpy/distros/debian.txt
+new file mode 100644
+index 00000000..79d5c5a
+--- /dev/null
++++ b/build/pkgs/numpy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-numpy
+diff --git a/build/pkgs/packaging/distros/debian.txt b/build/pkgs/packaging/distros/debian.txt
+new file mode 100644
+index 00000000..8f1c0ff
+--- /dev/null
++++ b/build/pkgs/packaging/distros/debian.txt
+@@ -0,0 +1 @@
++python3-packaging
+diff --git a/build/pkgs/pandocfilters/distros/debian.txt b/build/pkgs/pandocfilters/distros/debian.txt
+new file mode 100644
+index 00000000..d0d4c24
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/debian.txt b/build/pkgs/pickleshare/distros/debian.txt
+new file mode 100644
+index 00000000..a00907d
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pickleshare
+diff --git a/build/pkgs/pillow/distros/debian.txt b/build/pkgs/pillow/distros/debian.txt
+new file mode 100644
+index 00000000..3319fcd
+--- /dev/null
++++ b/build/pkgs/pillow/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pillow
+diff --git a/build/pkgs/pluggy/distros/debian.txt b/build/pkgs/pluggy/distros/debian.txt
+new file mode 100644
+index 00000000..43a3acf
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pluggy
+diff --git a/build/pkgs/py/distros/debian.txt b/build/pkgs/py/distros/debian.txt
+new file mode 100644
+index 00000000..81fefe6
+--- /dev/null
++++ b/build/pkgs/py/distros/debian.txt
+@@ -0,0 +1 @@
++python3-py
+diff --git a/build/pkgs/pygments/distros/debian.txt b/build/pkgs/pygments/distros/debian.txt
+new file mode 100644
+index 00000000..3ab3792
+--- /dev/null
++++ b/build/pkgs/pygments/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pygments
+diff --git a/build/pkgs/pytz/distros/debian.txt b/build/pkgs/pytz/distros/debian.txt
+new file mode 100644
+index 00000000..db20908
+--- /dev/null
++++ b/build/pkgs/pytz/distros/debian.txt
+@@ -0,0 +1 @@
++python3-tz
+diff --git a/build/pkgs/requests/distros/debian.txt b/build/pkgs/requests/distros/debian.txt
+new file mode 100644
+index 00000000..43147b2
+--- /dev/null
++++ b/build/pkgs/requests/distros/debian.txt
+@@ -0,0 +1 @@
++python3-requests
+diff --git a/build/pkgs/scipy/distros/debian.txt b/build/pkgs/scipy/distros/debian.txt
+new file mode 100644
+index 00000000..12b3666
+--- /dev/null
++++ b/build/pkgs/scipy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-scipy
+diff --git a/build/pkgs/setuptools/distros/debian.txt b/build/pkgs/setuptools/distros/debian.txt
+new file mode 100644
+index 00000000..1c0901c
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/debian.txt
+@@ -0,0 +1 @@
++python3-setuptools
+diff --git a/build/pkgs/six/distros/debian.txt b/build/pkgs/six/distros/debian.txt
+new file mode 100644
+index 00000000..68ff859
+--- /dev/null
++++ b/build/pkgs/six/distros/debian.txt
+@@ -0,0 +1 @@
++python3-six
+diff --git a/build/pkgs/sympy/distros/debian.txt b/build/pkgs/sympy/distros/debian.txt
+new file mode 100644
+index 00000000..db423c8
+--- /dev/null
++++ b/build/pkgs/sympy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-sympy
+diff --git a/build/pkgs/texttable/distros/debian.txt b/build/pkgs/texttable/distros/debian.txt
+new file mode 100644
+index 00000000..8f8e7e2
+--- /dev/null
++++ b/build/pkgs/texttable/distros/debian.txt
+@@ -0,0 +1 @@
++python3-texttable
+diff --git a/build/pkgs/toml/distros/debian.txt b/build/pkgs/toml/distros/debian.txt
+new file mode 100644
+index 00000000..543e89d
+--- /dev/null
++++ b/build/pkgs/toml/distros/debian.txt
+@@ -0,0 +1 @@
++python3-toml
+diff --git a/build/pkgs/webencodings/distros/debian.txt b/build/pkgs/webencodings/distros/debian.txt
+new file mode 100644
+index 00000000..ac30c2f
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/debian.txt
+@@ -0,0 +1 @@
++python3-webencodings
+diff --git a/build/pkgs/wheel/distros/debian.txt b/build/pkgs/wheel/distros/debian.txt
+new file mode 100644
+index 00000000..3c066725
+--- /dev/null
++++ b/build/pkgs/wheel/distros/debian.txt
+@@ -0,0 +1 @@
++python3-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 93bf30d7de292551c3050e2dd74651d69ba4bd46 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 18 Oct 2021 07:50:34 -0400
+Subject: Trac #29665: add more documentation for SAGE_PYTHON_PACKAGE_CHECK().
+
+An earlier commit allows SAGE_PYTHON_PACKAGE_CHECK(package) to tweak the
+value of sage_use_system_$package if --enable-system-site-packages was
+not used. This essentially changes the default --with-system-$package=yes
+to "no" in that case. Here we update the documentation to reflect it.
+---
+ m4/sage_python_package_check.m4 | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 7ee82a7..95eefd0 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -34,6 +34,10 @@
+ #   ensure that the ./configure- and run-time views of the system
+ #   are as similar as possible.
+ #
++#   To avoid suggesting these system packages to users who have not
++#   set --enable-system-site-packages, this macro also changes the
++#   default for --with-system-foo from "yes" to "no" in that case.
++#
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
+-- 
+cgit v1.0-1-gd88e
+
+
+From d771e49d57ecdf3622434bc09cbfb87ad3bb7744 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 18 Oct 2021 07:42:46 -0400
+Subject: Trac #29665: improve SAGE_PYTHON_PACKAGE_CHECK() failure message.
+
+When --enable-system-site-packages is off, SAGE_PYTHON_PACKAGE_CHECK()
+will always install the corresponding SPKG. We improve the ./configure
+output in that case to make it clear that the decision was based on
+the value of --enable-system-site-packages and not the "real" check.
+---
+ m4/sage_python_package_check.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 95eefd0..5f0f084 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -40,7 +40,9 @@
+ #
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
++  AC_MSG_CHECKING([if --enable-system-site-packages was used])
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
++    AC_MSG_RESULT(yes)
+     AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
+ 
+     dnl We run this check inside a python venv, because that's ultimately
+@@ -94,6 +96,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
+     dnl System site packages are disabled.
++    AC_MSG_RESULT(no; skipping check)
+     sage_spkg_install_$1=yes
+ 
+     dnl We have to retroactively hack the --with-system-foo={no,yes,force}
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5bb43c1b78a1deb3364f235305937c2f823e5e18 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 24 Oct 2021 20:29:25 -0400
+Subject: Trac #29665: use sage-venv in SAGE_PYTHON_PACKAGE_CHECK().
+
+For consistency with the rest of the build system, we now use the
+build/bin/sage-venv script to create the venv in this autoconf macro
+rather than invoking $PYTHON_FOR_VENV with "-m venv" directly.
+---
+ m4/sage_python_package_check.m4 | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 5f0f084..5547b35 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -50,11 +50,11 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AC_MSG_CHECKING([if we can create a python venv in config.venv])
+ 
+     dnl Use --clear because ./configure typically clobbers its output files.
+-    AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
+-                                        --clear                dnl
+-                                        --without-pip          dnl
+-                                        config.venv            dnl
+-                                        2>&AS_MESSAGE_LOG_FD], [
++    AS_IF(["${PYTHON_FOR_VENV}" build/bin/sage-venv      dnl
++                                  --system-site-packages dnl
++                                  --clear                dnl
++                                  config.venv            dnl
++                                  2>&AS_MESSAGE_LOG_FD], [
+       AC_MSG_RESULT(yes)
+       dnl strip all comments from install-requires.txt; this should leave
+       dnl only a single line containing the version specification for this
+-- 
+cgit v1.0-1-gd88e
+
+
+From c78363d6326addff16ca5abac897949a6be72bf4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:10:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for urllib3.
+
+---
+ build/pkgs/urllib3/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/urllib3/spkg-configure.m4
+
+diff --git a/build/pkgs/urllib3/spkg-configure.m4 b/build/pkgs/urllib3/spkg-configure.m4
+new file mode 100644
+index 00000000..d7ef3e1
+--- /dev/null
++++ b/build/pkgs/urllib3/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([urllib3], [SAGE_PYTHON_PACKAGE_CHECK([urllib3])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f416d5abcae495ea8301fad024b279ea9e997b29 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:15:18 -0400
+Subject: Trac #29665: add Gentoo package information for urllib3.
+
+---
+ build/pkgs/urllib3/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/urllib3/distros/gentoo.txt
+
+diff --git a/build/pkgs/urllib3/distros/gentoo.txt b/build/pkgs/urllib3/distros/gentoo.txt
+new file mode 100644
+index 00000000..172a535
+--- /dev/null
++++ b/build/pkgs/urllib3/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/urllib3
+-- 
+cgit v1.0-1-gd88e
+
+
+From 852068b992bf7959500c650f54cb92e5b68d7ef8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:15:58 -0400
+Subject: Trac #29665: add Gentoo package information for nbformat.
+
+---
+ build/pkgs/nbformat/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbformat/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbformat/distros/gentoo.txt b/build/pkgs/nbformat/distros/gentoo.txt
+new file mode 100644
+index 00000000..006b1f2
+--- /dev/null
++++ b/build/pkgs/nbformat/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbformat
+-- 
+cgit v1.0-1-gd88e
+
+
+From 66179fd28fcc92ee840dcd87bb4db25cea968d66 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:34:16 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for nbformat.
+
+---
+ build/pkgs/nbformat/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbformat/spkg-configure.m4
+
+diff --git a/build/pkgs/nbformat/spkg-configure.m4 b/build/pkgs/nbformat/spkg-configure.m4
+new file mode 100644
+index 00000000..5a7f8c4
+--- /dev/null
++++ b/build/pkgs/nbformat/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbformat], [SAGE_PYTHON_PACKAGE_CHECK([nbformat])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 874005e81ed20f27a5f895030dcdbdfc5f73ad80 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:47:01 -0400
+Subject: Trac #29665: add Gentoo package information for zipp.
+
+---
+ build/pkgs/zipp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/zipp/distros/gentoo.txt
+
+diff --git a/build/pkgs/zipp/distros/gentoo.txt b/build/pkgs/zipp/distros/gentoo.txt
+new file mode 100644
+index 00000000..7f59450
+--- /dev/null
++++ b/build/pkgs/zipp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/zipp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0cc2a7355b5554c1fb79c742ebf02eff54465b3e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:47:35 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for zipp.
+
+---
+ build/pkgs/zipp/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/zipp/spkg-configure.m4
+
+diff --git a/build/pkgs/zipp/spkg-configure.m4 b/build/pkgs/zipp/spkg-configure.m4
+new file mode 100644
+index 00000000..0fe3a9c
+--- /dev/null
++++ b/build/pkgs/zipp/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([zipp], [SAGE_PYTHON_PACKAGE_CHECK([zipp])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6073ad8e56c21fc862749bbd84a56d543fb9458c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:48:37 -0400
+Subject: Trac #29665: add Gentoo package information for wcwidth.
+
+---
+ build/pkgs/wcwidth/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wcwidth/distros/gentoo.txt
+
+diff --git a/build/pkgs/wcwidth/distros/gentoo.txt b/build/pkgs/wcwidth/distros/gentoo.txt
+new file mode 100644
+index 00000000..edeb80b
+--- /dev/null
++++ b/build/pkgs/wcwidth/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/wcwidth
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9793d6172c64d61a015fbe61bd45863759124fad Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:51:10 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for wcwidth.
+
+---
+ build/pkgs/wcwidth/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wcwidth/spkg-configure.m4
+
+diff --git a/build/pkgs/wcwidth/spkg-configure.m4 b/build/pkgs/wcwidth/spkg-configure.m4
+new file mode 100644
+index 00000000..5bde15a
+--- /dev/null
++++ b/build/pkgs/wcwidth/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([wcwidth], [SAGE_PYTHON_PACKAGE_CHECK([wcwidth])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20232f370a43c146ca4e696c72a2cbcc498db060 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:52:36 -0400
+Subject: Trac #29665: add Gentoo package information for testpath.
+
+---
+ build/pkgs/testpath/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/testpath/distros/gentoo.txt
+
+diff --git a/build/pkgs/testpath/distros/gentoo.txt b/build/pkgs/testpath/distros/gentoo.txt
+new file mode 100644
+index 00000000..efa10a0
+--- /dev/null
++++ b/build/pkgs/testpath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/testpath
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1b0785b2aad8844e74345fe950baf097e2b43d24 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:55:22 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for testpath.
+
+---
+ build/pkgs/testpath/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/testpath/spkg-configure.m4
+
+diff --git a/build/pkgs/testpath/spkg-configure.m4 b/build/pkgs/testpath/spkg-configure.m4
+new file mode 100644
+index 00000000..d8fc2a7
+--- /dev/null
++++ b/build/pkgs/testpath/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([testpath], [SAGE_PYTHON_PACKAGE_CHECK([testpath])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 10fc3829ecd956d732b1b069fdfe81f0d6d5cdc2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:56:06 -0400
+Subject: Trac #29665: add Gentoo package information for jedi.
+
+---
+ build/pkgs/jedi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jedi/distros/gentoo.txt
+
+diff --git a/build/pkgs/jedi/distros/gentoo.txt b/build/pkgs/jedi/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c85a46
+--- /dev/null
++++ b/build/pkgs/jedi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jedi
+-- 
+cgit v1.0-1-gd88e
+
+
+From a75824d74c281c7639028ca01dabeed266f56998 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:06:37 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for jedi.
+
+---
+ build/pkgs/jedi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jedi/spkg-configure.m4
+
+diff --git a/build/pkgs/jedi/spkg-configure.m4 b/build/pkgs/jedi/spkg-configure.m4
+new file mode 100644
+index 00000000..a37dbcc
+--- /dev/null
++++ b/build/pkgs/jedi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jedi], [SAGE_PYTHON_PACKAGE_CHECK([jedi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 17af01373d43f6acbbdbc23e073e372d3fdadf8b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:07:47 -0400
+Subject: Trac #29665: add Gentoo package information for tomli.
+
+---
+ build/pkgs/tomli/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tomli/distros/gentoo.txt
+
+diff --git a/build/pkgs/tomli/distros/gentoo.txt b/build/pkgs/tomli/distros/gentoo.txt
+new file mode 100644
+index 00000000..0458e25
+--- /dev/null
++++ b/build/pkgs/tomli/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/tomli
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0d3b5994ae612be11992467c4a3f1a74b81400fe Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:08:12 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for tomli.
+
+---
+ build/pkgs/tomli/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tomli/spkg-configure.m4
+
+diff --git a/build/pkgs/tomli/spkg-configure.m4 b/build/pkgs/tomli/spkg-configure.m4
+new file mode 100644
+index 00000000..95a8b8b
+--- /dev/null
++++ b/build/pkgs/tomli/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tomli], [SAGE_PYTHON_PACKAGE_CHECK([tomli])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From dce1c515781b0eeb8eb9c2bc7aba581560c1fac1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:09:22 -0400
+Subject: Trac #29665: add Gentoo package information for defusedxml.
+
+---
+ build/pkgs/defusedxml/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/defusedxml/distros/gentoo.txt
+
+diff --git a/build/pkgs/defusedxml/distros/gentoo.txt b/build/pkgs/defusedxml/distros/gentoo.txt
+new file mode 100644
+index 00000000..2804214
+--- /dev/null
++++ b/build/pkgs/defusedxml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/defusedxml
+-- 
+cgit v1.0-1-gd88e
+
+
+From 02e1e1cd7f8bdae3ca5b7d35ce70af28a44e9b7c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:11:14 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for defusedxml.
+
+---
+ build/pkgs/defusedxml/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/defusedxml/spkg-configure.m4
+
+diff --git a/build/pkgs/defusedxml/spkg-configure.m4 b/build/pkgs/defusedxml/spkg-configure.m4
+new file mode 100644
+index 00000000..e02f345
+--- /dev/null
++++ b/build/pkgs/defusedxml/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([defusedxml], [SAGE_PYTHON_PACKAGE_CHECK([defusedxml])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e0ba4ebb5cfc637b5d26b85de9f34e0a160d2b9c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:12:22 -0400
+Subject: Trac #29665: add Gentoo package information for ipywidgets.
+
+---
+ build/pkgs/ipywidgets/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipywidgets/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipywidgets/distros/gentoo.txt b/build/pkgs/ipywidgets/distros/gentoo.txt
+new file mode 100644
+index 00000000..7c76967
+--- /dev/null
++++ b/build/pkgs/ipywidgets/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipywidgets
+-- 
+cgit v1.0-1-gd88e
+
+
+From 49df7e7d93c7a31b7c46d5d224a35fd313a29a32 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:15:53 -0400
+Subject: Trac #29665: add Gentoo package information for simplegeneric.
+
+---
+ build/pkgs/simplegeneric/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/simplegeneric/distros/gentoo.txt
+
+diff --git a/build/pkgs/simplegeneric/distros/gentoo.txt b/build/pkgs/simplegeneric/distros/gentoo.txt
+new file mode 100644
+index 00000000..a86e90d
+--- /dev/null
++++ b/build/pkgs/simplegeneric/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/simplegeneric
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2a893635d5804749e6fec7ed7289c921ecb5300a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:16:33 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for simplegeneric.
+
+---
+ build/pkgs/simplegeneric/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/simplegeneric/spkg-configure.m4
+
+diff --git a/build/pkgs/simplegeneric/spkg-configure.m4 b/build/pkgs/simplegeneric/spkg-configure.m4
+new file mode 100644
+index 00000000..13715ab
+--- /dev/null
++++ b/build/pkgs/simplegeneric/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([simplegeneric], [SAGE_PYTHON_PACKAGE_CHECK([simplegeneric])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a8fe7ecd6e3163e7d01261e5497ac452a8cc95ab Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:17:18 -0400
+Subject: Trac #29665: add Gentoo package information for imagesize.
+
+---
+ build/pkgs/imagesize/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/imagesize/distros/gentoo.txt
+
+diff --git a/build/pkgs/imagesize/distros/gentoo.txt b/build/pkgs/imagesize/distros/gentoo.txt
+new file mode 100644
+index 00000000..54350ba
+--- /dev/null
++++ b/build/pkgs/imagesize/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/imagesize
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2ad837c5dd1fca0f50ce6d5042a9344210a54f84 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:17:48 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for imagesize.
+
+---
+ build/pkgs/imagesize/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/imagesize/spkg-configure.m4
+
+diff --git a/build/pkgs/imagesize/spkg-configure.m4 b/build/pkgs/imagesize/spkg-configure.m4
+new file mode 100644
+index 00000000..20210ef
+--- /dev/null
++++ b/build/pkgs/imagesize/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([imagesize], [SAGE_PYTHON_PACKAGE_CHECK([imagesize])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bf47415b5bfca2d7bf24e20de35662bf331623b9 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:18:49 -0400
+Subject: Trac #29665: add Gentoo package information for mistune.
+
+---
+ build/pkgs/mistune/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mistune/distros/gentoo.txt
+
+diff --git a/build/pkgs/mistune/distros/gentoo.txt b/build/pkgs/mistune/distros/gentoo.txt
+new file mode 100644
+index 00000000..56f0a4e
+--- /dev/null
++++ b/build/pkgs/mistune/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/mistune
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6898a74fd0c65a40c5220ba68b4062ac6fe060c6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:21:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for mistune.
+
+---
+ build/pkgs/mistune/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mistune/spkg-configure.m4
+
+diff --git a/build/pkgs/mistune/spkg-configure.m4 b/build/pkgs/mistune/spkg-configure.m4
+new file mode 100644
+index 00000000..972f33d
+--- /dev/null
++++ b/build/pkgs/mistune/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([mistune], [SAGE_PYTHON_PACKAGE_CHECK([mistune])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 62735e4ccf2031cd39eb5e04b03bdfd97005d808 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:22:48 -0400
+Subject: Trac #29665: add Gentoo package information for backcall.
+
+---
+ build/pkgs/backcall/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/backcall/distros/gentoo.txt
+
+diff --git a/build/pkgs/backcall/distros/gentoo.txt b/build/pkgs/backcall/distros/gentoo.txt
+new file mode 100644
+index 00000000..266a222
+--- /dev/null
++++ b/build/pkgs/backcall/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/backcall
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9ef3ea42d4a33c7cdb623fa5417ae300cf323183 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:25:10 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for backcall.
+
+---
+ build/pkgs/backcall/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/backcall/spkg-configure.m4
+
+diff --git a/build/pkgs/backcall/spkg-configure.m4 b/build/pkgs/backcall/spkg-configure.m4
+new file mode 100644
+index 00000000..d6b11c4
+--- /dev/null
++++ b/build/pkgs/backcall/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([backcall], [SAGE_PYTHON_PACKAGE_CHECK([backcall])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1b3ea2a3c40fea0fb58435f5e5304368ea58dff8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:25:58 -0400
+Subject: Trac #29665: add Gentoo package information for parso.
+
+---
+ build/pkgs/parso/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/parso/distros/gentoo.txt
+
+diff --git a/build/pkgs/parso/distros/gentoo.txt b/build/pkgs/parso/distros/gentoo.txt
+new file mode 100644
+index 00000000..f9ce4c7
+--- /dev/null
++++ b/build/pkgs/parso/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/parso
+-- 
+cgit v1.0-1-gd88e
+
+
+From 963a3a2c563ec71a1f5be2395722d0e824cb0b11 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:26:22 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for parso.
+
+---
+ build/pkgs/parso/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/parso/spkg-configure.m4
+
+diff --git a/build/pkgs/parso/spkg-configure.m4 b/build/pkgs/parso/spkg-configure.m4
+new file mode 100644
+index 00000000..1ca6f1b
+--- /dev/null
++++ b/build/pkgs/parso/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([parso], [SAGE_PYTHON_PACKAGE_CHECK([parso])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 943053dfc474b6549bcc7d6ef2971ea43588b35c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:27:00 -0400
+Subject: Trac #29665: add Gentoo package information for pyparsing.
+
+---
+ build/pkgs/pyparsing/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyparsing/distros/gentoo.txt
+
+diff --git a/build/pkgs/pyparsing/distros/gentoo.txt b/build/pkgs/pyparsing/distros/gentoo.txt
+new file mode 100644
+index 00000000..ef0419f
+--- /dev/null
++++ b/build/pkgs/pyparsing/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyparsing
+-- 
+cgit v1.0-1-gd88e
+
+
+From bd682eaa2ac41dd84e7a52e2b0c5442fc8fd8919 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:27:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pyparsing.
+
+---
+ build/pkgs/pyparsing/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyparsing/spkg-configure.m4
+
+diff --git a/build/pkgs/pyparsing/spkg-configure.m4 b/build/pkgs/pyparsing/spkg-configure.m4
+new file mode 100644
+index 00000000..d2b4c00
+--- /dev/null
++++ b/build/pkgs/pyparsing/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pyparsing], [SAGE_PYTHON_PACKAGE_CHECK([pyparsing])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 74f36a9c0ec7c63b7e6c40066e42f4b15c2f978e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:17:42 -0400
+Subject: Trac #29665: add Gentoo package information for debugpy.
+
+---
+ build/pkgs/debugpy/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/debugpy/distros/gentoo.txt
+
+diff --git a/build/pkgs/debugpy/distros/gentoo.txt b/build/pkgs/debugpy/distros/gentoo.txt
+new file mode 100644
+index 00000000..8b797ce
+--- /dev/null
++++ b/build/pkgs/debugpy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/debugpy
+-- 
+cgit v1.0-1-gd88e
+
+
+From be072fa87ac5c373d9dc9b54c0bd68734d5709bc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:21:17 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for debugpy.
+
+---
+ build/pkgs/debugpy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/debugpy/spkg-configure.m4
+
+diff --git a/build/pkgs/debugpy/spkg-configure.m4 b/build/pkgs/debugpy/spkg-configure.m4
+new file mode 100644
+index 00000000..db605ff
+--- /dev/null
++++ b/build/pkgs/debugpy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([debugpy], [SAGE_PYTHON_PACKAGE_CHECK([debugpy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6f777ce2f2e14b94e91c8b7bbac82f9017460aba Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:23:56 -0400
+Subject: Trac #29665: add Gentoo package information for tzlocal.
+
+---
+ build/pkgs/tzlocal/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tzlocal/distros/gentoo.txt
+
+diff --git a/build/pkgs/tzlocal/distros/gentoo.txt b/build/pkgs/tzlocal/distros/gentoo.txt
+new file mode 100644
+index 00000000..2018442
+--- /dev/null
++++ b/build/pkgs/tzlocal/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/tzlocal
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3bd078fc15ae13982249452711baafae91038191 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:24:51 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for tzlocal.
+
+---
+ build/pkgs/tzlocal/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tzlocal/spkg-configure.m4
+
+diff --git a/build/pkgs/tzlocal/spkg-configure.m4 b/build/pkgs/tzlocal/spkg-configure.m4
+new file mode 100644
+index 00000000..e020b28
+--- /dev/null
++++ b/build/pkgs/tzlocal/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tzlocal], [SAGE_PYTHON_PACKAGE_CHECK([tzlocal])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 91b0882fc62214923da9ee7b6dccb05d8a1d11d1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:26:13 -0400
+Subject: Trac #29665: add Gentoo package information for pycparser.
+
+---
+ build/pkgs/pycparser/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pycparser/distros/gentoo.txt
+
+diff --git a/build/pkgs/pycparser/distros/gentoo.txt b/build/pkgs/pycparser/distros/gentoo.txt
+new file mode 100644
+index 00000000..5e87307
+--- /dev/null
++++ b/build/pkgs/pycparser/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pycparser
+-- 
+cgit v1.0-1-gd88e
+
+
+From beabde92fe6e057faf516fe82d27f1e903e55ce6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:27:27 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pycparser.
+
+---
+ build/pkgs/pycparser/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pycparser/spkg-configure.m4
+
+diff --git a/build/pkgs/pycparser/spkg-configure.m4 b/build/pkgs/pycparser/spkg-configure.m4
+new file mode 100644
+index 00000000..4b9b900
+--- /dev/null
++++ b/build/pkgs/pycparser/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pycparser], [SAGE_PYTHON_PACKAGE_CHECK([pycparser])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 86c2788dc7fd1169314e9598c91fa81045553677 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:29:36 -0400
+Subject: Trac #29665: add Gentoo package information for cycler.
+
+---
+ build/pkgs/cycler/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cycler/distros/gentoo.txt
+
+diff --git a/build/pkgs/cycler/distros/gentoo.txt b/build/pkgs/cycler/distros/gentoo.txt
+new file mode 100644
+index 00000000..4b21543
+--- /dev/null
++++ b/build/pkgs/cycler/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/cycler
+-- 
+cgit v1.0-1-gd88e
+
+
+From 67c5a944101ddf329f0a61c61d4e784f58a5c5b0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:30:27 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for cycler.
+
+---
+ build/pkgs/cycler/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cycler/spkg-configure.m4
+
+diff --git a/build/pkgs/cycler/spkg-configure.m4 b/build/pkgs/cycler/spkg-configure.m4
+new file mode 100644
+index 00000000..239571a
+--- /dev/null
++++ b/build/pkgs/cycler/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([cycler], [SAGE_PYTHON_PACKAGE_CHECK([cycler])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ef6d490251abfa41f7a0910274700a8a6a65f629 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:31:19 -0400
+Subject: Trac #29665: add Gentoo package information for traitlets.
+
+---
+ build/pkgs/traitlets/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/traitlets/distros/gentoo.txt
+
+diff --git a/build/pkgs/traitlets/distros/gentoo.txt b/build/pkgs/traitlets/distros/gentoo.txt
+new file mode 100644
+index 00000000..46bfaab
+--- /dev/null
++++ b/build/pkgs/traitlets/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/traitlets
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1f922b458d34088d9f6773312209e69f19ee45dc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:31:50 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for traitlets.
+
+---
+ build/pkgs/traitlets/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/traitlets/spkg-configure.m4
+
+diff --git a/build/pkgs/traitlets/spkg-configure.m4 b/build/pkgs/traitlets/spkg-configure.m4
+new file mode 100644
+index 00000000..df2382b
+--- /dev/null
++++ b/build/pkgs/traitlets/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([traitlets], [SAGE_PYTHON_PACKAGE_CHECK([traitlets])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 95b89a9ced0acb6d971a27fa63b97ea58a11f4e1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:33:35 -0400
+Subject: Trac #29665: add Gentoo package information for argcomplete.
+
+---
+ build/pkgs/argcomplete/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argcomplete/distros/gentoo.txt
+
+diff --git a/build/pkgs/argcomplete/distros/gentoo.txt b/build/pkgs/argcomplete/distros/gentoo.txt
+new file mode 100644
+index 00000000..b150949
+--- /dev/null
++++ b/build/pkgs/argcomplete/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/argcomplete
+-- 
+cgit v1.0-1-gd88e
+
+
+From b4cd8ef384e6e5bae0de0f3c113fb5f9e6e1a71e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:34:14 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for argcomplete.
+
+---
+ build/pkgs/argcomplete/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argcomplete/spkg-configure.m4
+
+diff --git a/build/pkgs/argcomplete/spkg-configure.m4 b/build/pkgs/argcomplete/spkg-configure.m4
+new file mode 100644
+index 00000000..cbd7ccf
+--- /dev/null
++++ b/build/pkgs/argcomplete/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([argcomplete], [SAGE_PYTHON_PACKAGE_CHECK([argcomplete])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4cc610e8331970cc018d7ea87af928fa73a292c1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:36:21 -0400
+Subject: Trac #29665: add Gentoo package information for ptyprocess.
+
+---
+ build/pkgs/ptyprocess/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ptyprocess/distros/gentoo.txt
+
+diff --git a/build/pkgs/ptyprocess/distros/gentoo.txt b/build/pkgs/ptyprocess/distros/gentoo.txt
+new file mode 100644
+index 00000000..571a851
+--- /dev/null
++++ b/build/pkgs/ptyprocess/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ptyprocess
+-- 
+cgit v1.0-1-gd88e
+
+
+From cd15f97221bf5933b07900e4f77cb55401eede26 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:37:02 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ptyprocess.
+
+---
+ build/pkgs/ptyprocess/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ptyprocess/spkg-configure.m4
+
+diff --git a/build/pkgs/ptyprocess/spkg-configure.m4 b/build/pkgs/ptyprocess/spkg-configure.m4
+new file mode 100644
+index 00000000..bfacbae
+--- /dev/null
++++ b/build/pkgs/ptyprocess/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ptyprocess], [SAGE_PYTHON_PACKAGE_CHECK([ptyprocess])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb5f45b15f99e4ba28e1b1f6042a0e8ea17f1dfc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:38:22 -0400
+Subject: Trac #29665: add Gentoo package information for attrs.
+
+---
+ build/pkgs/attrs/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/attrs/distros/gentoo.txt
+
+diff --git a/build/pkgs/attrs/distros/gentoo.txt b/build/pkgs/attrs/distros/gentoo.txt
+new file mode 100644
+index 00000000..3b906fa
+--- /dev/null
++++ b/build/pkgs/attrs/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/attrs
+-- 
+cgit v1.0-1-gd88e
+
+
+From 321707ebf8e9af1e4ac3a5b5b094b4226bb3a7a5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:38:55 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for attrs.
+
+---
+ build/pkgs/attrs/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/attrs/spkg-configure.m4
+
+diff --git a/build/pkgs/attrs/spkg-configure.m4 b/build/pkgs/attrs/spkg-configure.m4
+new file mode 100644
+index 00000000..ba6a9b7
+--- /dev/null
++++ b/build/pkgs/attrs/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([attrs], [SAGE_PYTHON_PACKAGE_CHECK([attrs])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 69a498a4e8854ecdfc2f1a134104983c0dcb9e32 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:40:09 -0400
+Subject: Trac #29665: add Gentoo package information for send2trash.
+
+---
+ build/pkgs/send2trash/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/send2trash/distros/gentoo.txt
+
+diff --git a/build/pkgs/send2trash/distros/gentoo.txt b/build/pkgs/send2trash/distros/gentoo.txt
+new file mode 100644
+index 00000000..a89b179
+--- /dev/null
++++ b/build/pkgs/send2trash/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/send2trash
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9baed17c84e1bdf5abd17c20766e5cd7dddc5b53 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:41:45 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for send2trash.
+
+---
+ build/pkgs/send2trash/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/send2trash/spkg-configure.m4
+
+diff --git a/build/pkgs/send2trash/spkg-configure.m4 b/build/pkgs/send2trash/spkg-configure.m4
+new file mode 100644
+index 00000000..3bbb727
+--- /dev/null
++++ b/build/pkgs/send2trash/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([send2trash], [SAGE_PYTHON_PACKAGE_CHECK([send2trash])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b9b552b2a2aaccaeb7c5b25be0b681f107522d09 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:43:27 -0400
+Subject: Trac #29665: add Gentoo package information for pyrsistent.
+
+---
+ build/pkgs/pyrsistent/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyrsistent/distros/gentoo.txt
+
+diff --git a/build/pkgs/pyrsistent/distros/gentoo.txt b/build/pkgs/pyrsistent/distros/gentoo.txt
+new file mode 100644
+index 00000000..83439ce
+--- /dev/null
++++ b/build/pkgs/pyrsistent/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyrsistent
+-- 
+cgit v1.0-1-gd88e
+
+
+From a17b31fac6104852762f57daa749443147bdf121 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:44:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pyrsistent.
+
+---
+ build/pkgs/pyrsistent/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyrsistent/spkg-configure.m4
+
+diff --git a/build/pkgs/pyrsistent/spkg-configure.m4 b/build/pkgs/pyrsistent/spkg-configure.m4
+new file mode 100644
+index 00000000..f7ca75d
+--- /dev/null
++++ b/build/pkgs/pyrsistent/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pyrsistent], [SAGE_PYTHON_PACKAGE_CHECK([pyrsistent])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 68520decad6d6937918d7a6af65ca5bd476e5d02 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:45:45 -0400
+Subject: Trac #29665: add Gentoo package information for entrypoints.
+
+---
+ build/pkgs/entrypoints/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/entrypoints/distros/gentoo.txt
+
+diff --git a/build/pkgs/entrypoints/distros/gentoo.txt b/build/pkgs/entrypoints/distros/gentoo.txt
+new file mode 100644
+index 00000000..684ddd0
+--- /dev/null
++++ b/build/pkgs/entrypoints/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/entrypoints
+-- 
+cgit v1.0-1-gd88e
+
+
+From 34213eccb642a6bad64d89acaefa83ee702cb483 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:46:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for entrypoints.
+
+---
+ build/pkgs/entrypoints/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/entrypoints/spkg-configure.m4
+
+diff --git a/build/pkgs/entrypoints/spkg-configure.m4 b/build/pkgs/entrypoints/spkg-configure.m4
+new file mode 100644
+index 00000000..caed658
+--- /dev/null
++++ b/build/pkgs/entrypoints/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([entrypoints], [SAGE_PYTHON_PACKAGE_CHECK([entrypoints])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8e985614345da1a58fcdc127a9c0ddd790f9b5d2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:48:26 -0400
+Subject: Trac #29665: add Gentoo package information for markupsafe.
+
+---
+ build/pkgs/markupsafe/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/markupsafe/distros/gentoo.txt
+
+diff --git a/build/pkgs/markupsafe/distros/gentoo.txt b/build/pkgs/markupsafe/distros/gentoo.txt
+new file mode 100644
+index 00000000..9654e35
+--- /dev/null
++++ b/build/pkgs/markupsafe/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/markupsafe
+-- 
+cgit v1.0-1-gd88e
+
+
+From d370f229ae0988856f2e0d1f6ee2df2c47169106 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:48:55 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for markupsafe.
+
+---
+ build/pkgs/markupsafe/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/markupsafe/spkg-configure.m4
+
+diff --git a/build/pkgs/markupsafe/spkg-configure.m4 b/build/pkgs/markupsafe/spkg-configure.m4
+new file mode 100644
+index 00000000..79eb8db
+--- /dev/null
++++ b/build/pkgs/markupsafe/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([markupsafe], [SAGE_PYTHON_PACKAGE_CHECK([markupsafe])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c49b285ad9e25e6bc81a7e75d461d234fdd3ea68 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:30:49 -0400
+Subject: Trac #29665: add Gentoo package information for flit_core.
+
+---
+ build/pkgs/flit_core/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/flit_core/distros/gentoo.txt
+
+diff --git a/build/pkgs/flit_core/distros/gentoo.txt b/build/pkgs/flit_core/distros/gentoo.txt
+new file mode 100644
+index 00000000..fe6bea9
+--- /dev/null
++++ b/build/pkgs/flit_core/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/flit_core
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b0ce1c4f23cd9fc4316e1eb2b9b4bde394957f3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:32:11 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for flit_core.
+
+---
+ build/pkgs/flit_core/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/flit_core/spkg-configure.m4
+
+diff --git a/build/pkgs/flit_core/spkg-configure.m4 b/build/pkgs/flit_core/spkg-configure.m4
+new file mode 100644
+index 00000000..ee67557
+--- /dev/null
++++ b/build/pkgs/flit_core/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([flit_core], [SAGE_PYTHON_PACKAGE_CHECK([flit_core])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f006c231a81428b1e1e792f889bf974f90e3c831 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:34:06 -0400
+Subject: Trac #29665: add Gentoo package information for nest_asyncio.
+
+---
+ build/pkgs/nest_asyncio/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nest_asyncio/distros/gentoo.txt
+
+diff --git a/build/pkgs/nest_asyncio/distros/gentoo.txt b/build/pkgs/nest_asyncio/distros/gentoo.txt
+new file mode 100644
+index 00000000..ab742d2
+--- /dev/null
++++ b/build/pkgs/nest_asyncio/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nest_asyncio
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4a58d0a96a84475e765a01a64f5f44c48a317e0b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:34:43 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for nest_asyncio.
+
+---
+ build/pkgs/nest_asyncio/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nest_asyncio/spkg-configure.m4
+
+diff --git a/build/pkgs/nest_asyncio/spkg-configure.m4 b/build/pkgs/nest_asyncio/spkg-configure.m4
+new file mode 100644
+index 00000000..4d81527
+--- /dev/null
++++ b/build/pkgs/nest_asyncio/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nest_asyncio], [SAGE_PYTHON_PACKAGE_CHECK([nest_asyncio])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e50af937777ea778908bc09a7a79db3dd80fdf25 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:37:02 -0400
+Subject: Trac #29665: add Gentoo package information for ipython_genutils.
+
+---
+ build/pkgs/ipython_genutils/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython_genutils/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipython_genutils/distros/gentoo.txt b/build/pkgs/ipython_genutils/distros/gentoo.txt
+new file mode 100644
+index 00000000..01bc49d
+--- /dev/null
++++ b/build/pkgs/ipython_genutils/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipython_genutils
+-- 
+cgit v1.0-1-gd88e
+
+
+From ec3c0ce9db2ba13c1a49d1bcfb7a4b249cb7ae83 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:39:20 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipython_genutils.
+
+---
+ build/pkgs/ipython_genutils/spkg-configure.m4 | 4 ++++
+ 1 file changed, 4 insertions(+)
+ create mode 100644 build/pkgs/ipython_genutils/spkg-configure.m4
+
+diff --git a/build/pkgs/ipython_genutils/spkg-configure.m4 b/build/pkgs/ipython_genutils/spkg-configure.m4
+new file mode 100644
+index 00000000..b0ba86a
+--- /dev/null
++++ b/build/pkgs/ipython_genutils/spkg-configure.m4
+@@ -0,0 +1,4 @@
++SAGE_SPKG_CONFIGURE(
++  [ipython_genutils],
++  [SAGE_PYTHON_PACKAGE_CHECK([ipython_genutils])]
++)
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5c9e2e265115e5f10d4b459a475467e30b4bddde Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:40:03 -0400
+Subject: Trac #29665: add Gentoo package information for ipython.
+
+---
+ build/pkgs/ipython/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipython/distros/gentoo.txt b/build/pkgs/ipython/distros/gentoo.txt
+new file mode 100644
+index 00000000..8b76f18
+--- /dev/null
++++ b/build/pkgs/ipython/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipython
+-- 
+cgit v1.0-1-gd88e
+
+
+From 621e707ddd040a902d7dddf0bed1de2b54ab22f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 07:37:56 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipython.
+
+---
+ build/pkgs/ipython/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython/spkg-configure.m4
+
+diff --git a/build/pkgs/ipython/spkg-configure.m4 b/build/pkgs/ipython/spkg-configure.m4
+new file mode 100644
+index 00000000..02ab89f
+--- /dev/null
++++ b/build/pkgs/ipython/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipython], [SAGE_PYTHON_PACKAGE_CHECK([ipython])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20a0613f6d441da436f3e7b8047a72bf490882bd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 07:51:11 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipywidgets.
+
+---
+ build/pkgs/ipywidgets/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipywidgets/spkg-configure.m4
+
+diff --git a/build/pkgs/ipywidgets/spkg-configure.m4 b/build/pkgs/ipywidgets/spkg-configure.m4
+new file mode 100644
+index 00000000..51ca9be
+--- /dev/null
++++ b/build/pkgs/ipywidgets/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipywidgets], [SAGE_PYTHON_PACKAGE_CHECK([ipywidgets])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 76bcd386633acc02a1a3026339d0cbd258ada04e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 10:05:16 -0400
+Subject: Trac #29665: add Gentoo package information for wheel.
+
+---
+ build/pkgs/wheel/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wheel/distros/gentoo.txt
+
+diff --git a/build/pkgs/wheel/distros/gentoo.txt b/build/pkgs/wheel/distros/gentoo.txt
+new file mode 100644
+index 00000000..ec571d5
+--- /dev/null
++++ b/build/pkgs/wheel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 96c2dd2ca7812f5333bb9d45eadb7ac408e364ce Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:51:44 -0500
+Subject: Trac #29665: add Gentoo package information for terminado.
+
+---
+ build/pkgs/terminado/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/terminado/distros/gentoo.txt
+
+diff --git a/build/pkgs/terminado/distros/gentoo.txt b/build/pkgs/terminado/distros/gentoo.txt
+new file mode 100644
+index 00000000..1df16f1
+--- /dev/null
++++ b/build/pkgs/terminado/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/terminado
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0de0f5f3d235a4339b21e37ea13c9f5e59a82e59 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:52:35 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for terminado.
+
+---
+ build/pkgs/terminado/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/terminado/spkg-configure.m4
+
+diff --git a/build/pkgs/terminado/spkg-configure.m4 b/build/pkgs/terminado/spkg-configure.m4
+new file mode 100644
+index 00000000..5defc2f
+--- /dev/null
++++ b/build/pkgs/terminado/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([terminado], [SAGE_PYTHON_PACKAGE_CHECK([terminado])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d14a745c770b02822557e7cee0a98de1cb2f3a12 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:56:15 -0500
+Subject: Trac #29665: add Gentoo package information for cffi.
+
+---
+ build/pkgs/cffi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cffi/distros/gentoo.txt
+
+diff --git a/build/pkgs/cffi/distros/gentoo.txt b/build/pkgs/cffi/distros/gentoo.txt
+new file mode 100644
+index 00000000..81eeb81
+--- /dev/null
++++ b/build/pkgs/cffi/distros/gentoo.txt
+@@ -0,0 +1 @@
++virtual/python-cffi
+-- 
+cgit v1.0-1-gd88e
+
+
+From ce393c04afc69fe050e38f780d4e117164687d80 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:57:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for cffi.
+
+---
+ build/pkgs/cffi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cffi/spkg-configure.m4
+
+diff --git a/build/pkgs/cffi/spkg-configure.m4 b/build/pkgs/cffi/spkg-configure.m4
+new file mode 100644
+index 00000000..dc81875
+--- /dev/null
++++ b/build/pkgs/cffi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([cffi], [SAGE_PYTHON_PACKAGE_CHECK([cffi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 467093315b3fdd57c8caa2f95cf99ad52b0b84fb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:57:57 -0500
+Subject: Trac #29665: add Gentoo package information for pip.
+
+---
+ build/pkgs/pip/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pip/distros/gentoo.txt
+
+diff --git a/build/pkgs/pip/distros/gentoo.txt b/build/pkgs/pip/distros/gentoo.txt
+new file mode 100644
+index 00000000..1845454
+--- /dev/null
++++ b/build/pkgs/pip/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pip[vanilla]
+-- 
+cgit v1.0-1-gd88e
+
+
+From c597fd23f9f68dabbcb7e698d0569c3e6458f6d1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 09:07:26 -0500
+Subject: Trac #29665: new spkg-configure.m4 for pip.
+
+---
+ build/pkgs/pip/spkg-configure.m4 | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+ create mode 100644 build/pkgs/pip/spkg-configure.m4
+
+diff --git a/build/pkgs/pip/spkg-configure.m4 b/build/pkgs/pip/spkg-configure.m4
+new file mode 100644
+index 00000000..c7a5562
+--- /dev/null
++++ b/build/pkgs/pip/spkg-configure.m4
+@@ -0,0 +1,12 @@
++SAGE_SPKG_CONFIGURE([pip], [
++  dnl always run this macro because it changes the default value of
++  dnl the --with-system-<package> option.
++  SAGE_PYTHON_PACKAGE_CHECK([pip])
++
++  dnl if we might not install the spkg, make sure that "pip" is in
++  dnl the user's PATH, too.
++  AS_IF([test "x$sage_spkg_install_pip" != "xyes"], [
++    AC_CHECK_PROG(HAVE_PIP, pip, yes, no)
++    AS_IF([test "x$HAVE_PIP" = "xno"], [sage_spkg_install_pip=yes])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ef8f1e807bc55d7b8321777486fa867a7c135419 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 9 Nov 2021 09:09:04 -0500
+Subject: Trac #29665: set $SAGE_PIP_INSTALL_FLAGS for
+ --enable-system-site-packages.
+
+We need to pass some special flags to "pip install" to make it do the
+right thing in the precence of system-site packages. Here we introduce
+a new autoconf variable, SAGE_PIP_INSTALL_FLAGS, that will be used
+to pass those flags to the build system.
+
+With autoconf aware of the variable, we substitute its value into the
+sage-build-env-config script for use in spkg-install.in.
+---
+ build/bin/sage-build-env-config.in | 1 +
+ configure.ac                       | 9 +++++++++
+ 2 files changed, 10 insertions(+)
+
+diff --git a/build/bin/sage-build-env-config.in b/build/bin/sage-build-env-config.in
+index 92e7dad..ad62e5f 100644
+--- a/build/bin/sage-build-env-config.in
++++ b/build/bin/sage-build-env-config.in
+@@ -53,6 +53,7 @@ export SAGE_PARI_CFG="@SAGE_PARI_CFG@"
+ 
+ export SAGE_GLPK_PREFIX="@SAGE_GLPK_PREFIX@"
+ export SAGE_FREETYPE_PREFIX="@SAGE_FREETYPE_PREFIX@"
++export SAGE_PIP_INSTALL_FLAGS="@SAGE_PIP_INSTALL_FLAGS@"
+ export SAGE_SUITESPARSE_PREFIX="@SAGE_SUITESPARSE_PREFIX@"
+ 
+ export SAGE_CONFIGURE_FFLAS_FFPACK="@SAGE_CONFIGURE_FFLAS_FFPACK@"
+diff --git a/configure.ac b/configure.ac
+index 6fafb83..6ed07ac 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -441,6 +441,14 @@ AC_ARG_ENABLE(
+     [allow the use of python packages from the system (experimental; default: no)]
+   )], [
+   AS_IF([test "x$enable_system_site_packages" = "xyes"], [
++    dnl When installing python SPKGs in the presence of system-site
++    dnl packages, we need to --ignore-installed so that a patched SPKG
++    dnl can be installed in the presence of an unpatched system package
++    dnl that appears (to pip) to be identical. The --no-deps flag is
++    dnl then needed because --ignore-installed will make any installed
++    dnl dependencies invisible to pip, who does not appreciate that.
++    SAGE_PIP_INSTALL_FLAGS="${SAGE_PIP_INSTALL_FLAGS} --no-deps --ignore-installed"
++
+     SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
+ 
+     dnl We want to raise an error if the user asked for "system site
+@@ -453,6 +461,7 @@ AC_ARG_ENABLE(
+     with_system_python3="force"
+   ])
+ ])
++AC_SUBST([SAGE_PIP_INSTALL_FLAGS])
+ AC_SUBST([SAGE_VENV_FLAGS])
+ 
+ SAGE_SPKG_OPTIONS=""
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3cf365fef84e809e74abd2eb388e7a8e9af9d739 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 9 Nov 2021 21:01:58 -0500
+Subject: Trac #29665: pass $SAGE_PIP_INSTALL_FLAGS to sdh_pip_install.
+
+Since sdh_pip_install is usually called from spkg-install.in, the
+variables from sage-build-env-config will be available. Here we pass
+the contents of $SAGE_PIP_INSTALL_FLAGS to sage-pip-install
+unconditionally, and hope that the user ignores this variable unless
+he truly knows what he is doing.
+---
+ build/bin/sage-dist-helpers | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/build/bin/sage-dist-helpers b/build/bin/sage-dist-helpers
+index fe364e5..1032ac3 100644
+--- a/build/bin/sage-dist-helpers
++++ b/build/bin/sage-dist-helpers
+@@ -303,7 +303,11 @@ sdh_store_wheel() {
+ }
+ 
+ sdh_store_and_pip_install_wheel() {
+-    local pip_options=""
++    # The $SAGE_PIP_INSTALL_FLAGS variable is set by sage-build-env-config.
++    # We skip sanity checking its contents since you should either let sage
++    # decide what it contains, or really know what you are doing.
++    local pip_options="${SAGE_PIP_INSTALL_FLAGS}"
++
+     while [ $# -gt 0 ]; do
+         case $1 in
+             -*) pip_options="$pip_options $1"
+-- 
+cgit v1.0-1-gd88e
+
+
+From 50f0438ee857b8f0b7d7ad924e6bba9c5e1bc033 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:10:46 -0500
+Subject: Trac #29665: add Gentoo package information for pexpect.
+
+---
+ build/pkgs/pexpect/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pexpect/distros/gentoo.txt
+
+diff --git a/build/pkgs/pexpect/distros/gentoo.txt b/build/pkgs/pexpect/distros/gentoo.txt
+new file mode 100644
+index 00000000..30c4b60
+--- /dev/null
++++ b/build/pkgs/pexpect/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pexpect
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4d784688d997290b462646fa7f36114a41f3f453 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:11:25 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pexpect.
+
+---
+ build/pkgs/pexpect/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pexpect/spkg-configure.m4
+
+diff --git a/build/pkgs/pexpect/spkg-configure.m4 b/build/pkgs/pexpect/spkg-configure.m4
+new file mode 100644
+index 00000000..6520856
+--- /dev/null
++++ b/build/pkgs/pexpect/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pexpect], [SAGE_PYTHON_PACKAGE_CHECK([pexpect])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6447122dc76a3b7a58340dbed942db66530b5b07 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:12:05 -0500
+Subject: Trac #29665: add Gentoo package information for docutils.
+
+---
+ build/pkgs/docutils/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/docutils/distros/gentoo.txt
+
+diff --git a/build/pkgs/docutils/distros/gentoo.txt b/build/pkgs/docutils/distros/gentoo.txt
+new file mode 100644
+index 00000000..fe4a452
+--- /dev/null
++++ b/build/pkgs/docutils/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/docutils
+-- 
+cgit v1.0-1-gd88e
+
+
+From 709041480a5fc729b0ee7f1a8a3b16d4d65321b5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:12:38 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for docutils.
+
+---
+ build/pkgs/docutils/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/docutils/spkg-configure.m4
+
+diff --git a/build/pkgs/docutils/spkg-configure.m4 b/build/pkgs/docutils/spkg-configure.m4
+new file mode 100644
+index 00000000..3584e45
+--- /dev/null
++++ b/build/pkgs/docutils/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([docutils], [SAGE_PYTHON_PACKAGE_CHECK([docutils])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 782d38b48ab87afccc43fbc071e7b7ed48fb0a20 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:14:37 -0500
+Subject: Trac #29665: add Gentoo package information for nbclient.
+
+---
+ build/pkgs/nbclient/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbclient/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbclient/distros/gentoo.txt b/build/pkgs/nbclient/distros/gentoo.txt
+new file mode 100644
+index 00000000..06ff18d
+--- /dev/null
++++ b/build/pkgs/nbclient/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbclient
+-- 
+cgit v1.0-1-gd88e
+
+
+From 19ce09336532336f69db74381932d51a429dfaca Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:15:11 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for nbclient.
+
+---
+ build/pkgs/nbclient/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbclient/spkg-configure.m4
+
+diff --git a/build/pkgs/nbclient/spkg-configure.m4 b/build/pkgs/nbclient/spkg-configure.m4
+new file mode 100644
+index 00000000..14178b7
+--- /dev/null
++++ b/build/pkgs/nbclient/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbclient], [SAGE_PYTHON_PACKAGE_CHECK([nbclient])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c063b9de42c1780368000a563d0dbe80b6fff169 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:17:36 -0500
+Subject: Trac #29665: add Gentoo package information for argon2_cffi.
+
+---
+ build/pkgs/argon2_cffi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argon2_cffi/distros/gentoo.txt
+
+diff --git a/build/pkgs/argon2_cffi/distros/gentoo.txt b/build/pkgs/argon2_cffi/distros/gentoo.txt
+new file mode 100644
+index 00000000..2f12ca8
+--- /dev/null
++++ b/build/pkgs/argon2_cffi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/argon2-cffi
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0b4d5699dd51ea52550fba7db9e1cbb8bbac1892 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:18:35 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for argon2_cffi.
+
+---
+ build/pkgs/argon2_cffi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argon2_cffi/spkg-configure.m4
+
+diff --git a/build/pkgs/argon2_cffi/spkg-configure.m4 b/build/pkgs/argon2_cffi/spkg-configure.m4
+new file mode 100644
+index 00000000..03ebc63
+--- /dev/null
++++ b/build/pkgs/argon2_cffi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([argon2_cffi], [SAGE_PYTHON_PACKAGE_CHECK([argon2_cffi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2b4119558a6e0b1aa512848539a237676b035c83 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:30:48 -0500
+Subject: Trac #29665: fix package name in dateutil's install-requires.txt.
+
+---
+ build/pkgs/dateutil/install-requires.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/build/pkgs/dateutil/install-requires.txt b/build/pkgs/dateutil/install-requires.txt
+index 0ae93da..face537 100644
+--- a/build/pkgs/dateutil/install-requires.txt
++++ b/build/pkgs/dateutil/install-requires.txt
+@@ -1 +1 @@
+-dateutil >=2.8.1
++python-dateutil >=2.8.1
+-- 
+cgit v1.0-1-gd88e
+
+
+From df371b7c4d20a3353d43940306ad22e11aba29da Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:31:41 -0500
+Subject: Trac #29665: add Gentoo package information for dateutil.
+
+---
+ build/pkgs/dateutil/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/dateutil/distros/gentoo.txt
+
+diff --git a/build/pkgs/dateutil/distros/gentoo.txt b/build/pkgs/dateutil/distros/gentoo.txt
+new file mode 100644
+index 00000000..e129df7
+--- /dev/null
++++ b/build/pkgs/dateutil/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/python-dateutil
+-- 
+cgit v1.0-1-gd88e
+
+
+From 577695dfdf661ee26c0ffd767bdbf479d95f7fb4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:32:21 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for dateutil.
+
+---
+ build/pkgs/dateutil/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/dateutil/spkg-configure.m4
+
+diff --git a/build/pkgs/dateutil/spkg-configure.m4 b/build/pkgs/dateutil/spkg-configure.m4
+new file mode 100644
+index 00000000..fdcd127
+--- /dev/null
++++ b/build/pkgs/dateutil/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([dateutil], [SAGE_PYTHON_PACKAGE_CHECK([dateutil])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1984651caac624ec4bb58814ca1d57fe66f9881a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:33:51 -0500
+Subject: Trac #29665: add Gentoo package information for setuptools_scm.
+
+---
+ build/pkgs/setuptools_scm/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/setuptools_scm/distros/gentoo.txt
+
+diff --git a/build/pkgs/setuptools_scm/distros/gentoo.txt b/build/pkgs/setuptools_scm/distros/gentoo.txt
+new file mode 100644
+index 00000000..8989597
+--- /dev/null
++++ b/build/pkgs/setuptools_scm/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/setuptools_scm
+-- 
+cgit v1.0-1-gd88e
+
+
+From ebf7c854ed966e7353759be485c4f5a57b9a10fa Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:34:49 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for setuptools_scm.
+
+---
+ build/pkgs/setuptools_scm/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/setuptools_scm/spkg-configure.m4
+
+diff --git a/build/pkgs/setuptools_scm/spkg-configure.m4 b/build/pkgs/setuptools_scm/spkg-configure.m4
+new file mode 100644
+index 00000000..437148c
+--- /dev/null
++++ b/build/pkgs/setuptools_scm/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([setuptools_scm], [
++  SAGE_PYTHON_PACKAGE_CHECK([setuptools_scm])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0dee0d0c28f31b1f619e44c710a3c9e22d2b2544 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:36:33 -0500
+Subject: Trac #29665: add Gentoo package information for nbconvert.
+
+---
+ build/pkgs/nbconvert/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbconvert/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbconvert/distros/gentoo.txt b/build/pkgs/nbconvert/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c45a10
+--- /dev/null
++++ b/build/pkgs/nbconvert/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbconvert
+-- 
+cgit v1.0-1-gd88e
+
+
+From 473789eb11b1838bc32dc8a63509ee199afc8912 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:37:37 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for nbconvert.
+
+---
+ build/pkgs/nbconvert/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbconvert/spkg-configure.m4
+
+diff --git a/build/pkgs/nbconvert/spkg-configure.m4 b/build/pkgs/nbconvert/spkg-configure.m4
+new file mode 100644
+index 00000000..9b5dee3
+--- /dev/null
++++ b/build/pkgs/nbconvert/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbconvert], [SAGE_PYTHON_PACKAGE_CHECK([nbconvert])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f0703b594e57c980d605aa9bc8316c45a7858b3b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:41:51 -0500
+Subject: Trac #29665: add Gentoo package information for jupyter_core.
+
+---
+ build/pkgs/jupyter_core/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyter_core/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyter_core/distros/gentoo.txt b/build/pkgs/jupyter_core/distros/gentoo.txt
+new file mode 100644
+index 00000000..f168c5a
+--- /dev/null
++++ b/build/pkgs/jupyter_core/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyter_core
+-- 
+cgit v1.0-1-gd88e
+
+
+From 061a307cc4a6680d8500fde834975064e59540d5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:42:48 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jupyter_core.
+
+---
+ build/pkgs/jupyter_core/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyter_core/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyter_core/spkg-configure.m4 b/build/pkgs/jupyter_core/spkg-configure.m4
+new file mode 100644
+index 00000000..67df9c3
+--- /dev/null
++++ b/build/pkgs/jupyter_core/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyter_core], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyter_core])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b85abe964ce0b98b5842efe9cbad9bdb1c89202f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:47:08 -0500
+Subject: Trac #29665: add Gentoo package information for jupyter_client.
+
+---
+ build/pkgs/jupyter_client/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyter_client/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyter_client/distros/gentoo.txt b/build/pkgs/jupyter_client/distros/gentoo.txt
+new file mode 100644
+index 00000000..4f1de88
+--- /dev/null
++++ b/build/pkgs/jupyter_client/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyter_client
+-- 
+cgit v1.0-1-gd88e
+
+
+From 86323ff1e0b2507933df6bc2a96c9175957640c5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:48:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jupyter_client.
+
+---
+ build/pkgs/jupyter_client/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyter_client/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyter_client/spkg-configure.m4 b/build/pkgs/jupyter_client/spkg-configure.m4
+new file mode 100644
+index 00000000..fbd3498
+--- /dev/null
++++ b/build/pkgs/jupyter_client/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyter_client], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyter_client])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a8475e27dd30d752d05ab6fea6579e8623501d82 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:48:58 -0500
+Subject: Trac #29665: add Gentoo package information for snowballstemmer.
+
+---
+ build/pkgs/snowballstemmer/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/snowballstemmer/distros/gentoo.txt
+
+diff --git a/build/pkgs/snowballstemmer/distros/gentoo.txt b/build/pkgs/snowballstemmer/distros/gentoo.txt
+new file mode 100644
+index 00000000..63fd851
+--- /dev/null
++++ b/build/pkgs/snowballstemmer/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/snowballstemmer
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0833c9b781062b4ed86d619e050a6f5d60e36080 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:49:38 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for snowballstemmer.
+
+---
+ build/pkgs/snowballstemmer/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/snowballstemmer/spkg-configure.m4
+
+diff --git a/build/pkgs/snowballstemmer/spkg-configure.m4 b/build/pkgs/snowballstemmer/spkg-configure.m4
+new file mode 100644
+index 00000000..6aa0882
+--- /dev/null
++++ b/build/pkgs/snowballstemmer/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([snowballstemmer], [
++  SAGE_PYTHON_PACKAGE_CHECK([snowballstemmer])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 50a1cf2a2bcd7eeec64cbc3f70e3e9fbe5d850fe Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:50:47 -0500
+Subject: Trac #29665: add Gentoo package information for tornado.
+
+---
+ build/pkgs/tornado/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tornado/distros/gentoo.txt
+
+diff --git a/build/pkgs/tornado/distros/gentoo.txt b/build/pkgs/tornado/distros/gentoo.txt
+new file mode 100644
+index 00000000..6ae4b9f
+--- /dev/null
++++ b/build/pkgs/tornado/distros/gentoo.txt
+@@ -0,0 +1 @@
++www-servers/tornado
+-- 
+cgit v1.0-1-gd88e
+
+
+From 118f4da6e03476c726363e8e22ecda32f13bfc33 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:51:26 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for tornado.
+
+---
+ build/pkgs/tornado/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tornado/spkg-configure.m4
+
+diff --git a/build/pkgs/tornado/spkg-configure.m4 b/build/pkgs/tornado/spkg-configure.m4
+new file mode 100644
+index 00000000..1ee5bc9
+--- /dev/null
++++ b/build/pkgs/tornado/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tornado], [SAGE_PYTHON_PACKAGE_CHECK([tornado])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3850701747a6c8ef60840bdfdb589b28d4cd2b9a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:52:21 -0500
+Subject: Trac #29665: add Gentoo package information for jsonschema.
+
+---
+ build/pkgs/jsonschema/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jsonschema/distros/gentoo.txt
+
+diff --git a/build/pkgs/jsonschema/distros/gentoo.txt b/build/pkgs/jsonschema/distros/gentoo.txt
+new file mode 100644
+index 00000000..d708e4c
+--- /dev/null
++++ b/build/pkgs/jsonschema/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jsonschema
+-- 
+cgit v1.0-1-gd88e
+
+
+From 76e3917c8af781af00f642cfada7a79594429e30 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:54:03 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jsonschema.
+
+---
+ build/pkgs/jsonschema/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jsonschema/spkg-configure.m4
+
+diff --git a/build/pkgs/jsonschema/spkg-configure.m4 b/build/pkgs/jsonschema/spkg-configure.m4
+new file mode 100644
+index 00000000..b9e5e21
+--- /dev/null
++++ b/build/pkgs/jsonschema/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jsonschema], [SAGE_PYTHON_PACKAGE_CHECK([jsonschema])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From fd4a16c11669b6dd73ac6325bca820e76db00402 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:55:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ widgetsnbextension.
+
+---
+ build/pkgs/widgetsnbextension/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/widgetsnbextension/spkg-configure.m4
+
+diff --git a/build/pkgs/widgetsnbextension/spkg-configure.m4 b/build/pkgs/widgetsnbextension/spkg-configure.m4
+new file mode 100644
+index 00000000..bf82daf
+--- /dev/null
++++ b/build/pkgs/widgetsnbextension/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([widgetsnbextension], [
++  SAGE_PYTHON_PACKAGE_CHECK([widgetsnbextension])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8079a9f384e3c8480e157dd98c3db2f43c987f4e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:57:20 -0500
+Subject: Trac #29665: add Gentoo package information for importlib_resources.
+
+---
+ build/pkgs/importlib_resources/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/importlib_resources/distros/gentoo.txt
+
+diff --git a/build/pkgs/importlib_resources/distros/gentoo.txt b/build/pkgs/importlib_resources/distros/gentoo.txt
+new file mode 100644
+index 00000000..d5e1f2c
+--- /dev/null
++++ b/build/pkgs/importlib_resources/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/importlib_resources
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2c430d7c52f02779a6c41b98ac2f4edd8b6759c3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:58:00 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ importlib_resources.
+
+---
+ build/pkgs/importlib_resources/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/importlib_resources/spkg-configure.m4
+
+diff --git a/build/pkgs/importlib_resources/spkg-configure.m4 b/build/pkgs/importlib_resources/spkg-configure.m4
+new file mode 100644
+index 00000000..50df55b
+--- /dev/null
++++ b/build/pkgs/importlib_resources/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([importlib_resources], [
++  SAGE_PYTHON_PACKAGE_CHECK([importlib_resources])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 00d13d7bf2e50aae2ccef3b2b30293c70a922af2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:58:38 -0500
+Subject: Trac #29665: add Gentoo package information for kiwisolver.
+
+---
+ build/pkgs/kiwisolver/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/kiwisolver/distros/gentoo.txt
+
+diff --git a/build/pkgs/kiwisolver/distros/gentoo.txt b/build/pkgs/kiwisolver/distros/gentoo.txt
+new file mode 100644
+index 00000000..7b30c95
+--- /dev/null
++++ b/build/pkgs/kiwisolver/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/kiwisolver
+-- 
+cgit v1.0-1-gd88e
+
+
+From 72b7907ef7ea9fa4ff6948ea34cfe2f693ee6c31 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:59:09 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for kiwisolver.
+
+---
+ build/pkgs/kiwisolver/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/kiwisolver/spkg-configure.m4
+
+diff --git a/build/pkgs/kiwisolver/spkg-configure.m4 b/build/pkgs/kiwisolver/spkg-configure.m4
+new file mode 100644
+index 00000000..4e7ac97
+--- /dev/null
++++ b/build/pkgs/kiwisolver/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([kiwisolver], [SAGE_PYTHON_PACKAGE_CHECK([kiwisolver])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 479351279e4e0ea7e2d146434f0daba038765cfd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:00:04 -0500
+Subject: Trac #29665: add Gentoo package information for notebook.
+
+---
+ build/pkgs/notebook/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/notebook/distros/gentoo.txt
+
+diff --git a/build/pkgs/notebook/distros/gentoo.txt b/build/pkgs/notebook/distros/gentoo.txt
+new file mode 100644
+index 00000000..6475d72
+--- /dev/null
++++ b/build/pkgs/notebook/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/notebook
+-- 
+cgit v1.0-1-gd88e
+
+
+From f4d9242ea654977f8ad7865c82eec593e11a36bc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:01:42 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for notebook.
+
+---
+ build/pkgs/notebook/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/notebook/spkg-configure.m4
+
+diff --git a/build/pkgs/notebook/spkg-configure.m4 b/build/pkgs/notebook/spkg-configure.m4
+new file mode 100644
+index 00000000..a17ba95
+--- /dev/null
++++ b/build/pkgs/notebook/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([notebook], [SAGE_PYTHON_PACKAGE_CHECK([notebook])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9837070c7f8e9a71283b84d49d4fd2c94b78a464 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:02:38 -0500
+Subject: Trac #29665: add Gentoo package information for matplotlib_inline.
+
+---
+ build/pkgs/matplotlib_inline/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/matplotlib_inline/distros/gentoo.txt
+
+diff --git a/build/pkgs/matplotlib_inline/distros/gentoo.txt b/build/pkgs/matplotlib_inline/distros/gentoo.txt
+new file mode 100644
+index 00000000..6a5859c
+--- /dev/null
++++ b/build/pkgs/matplotlib_inline/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/matplotlib-inline
+-- 
+cgit v1.0-1-gd88e
+
+
+From 750be73b25b92b4875e47d044360ac0e1116ec3e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:03:28 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for matplotlib_inline.
+
+---
+ build/pkgs/matplotlib_inline/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/matplotlib_inline/spkg-configure.m4
+
+diff --git a/build/pkgs/matplotlib_inline/spkg-configure.m4 b/build/pkgs/matplotlib_inline/spkg-configure.m4
+new file mode 100644
+index 00000000..e59658f
+--- /dev/null
++++ b/build/pkgs/matplotlib_inline/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([matplotlib_inline], [
++  SAGE_PYTHON_PACKAGE_CHECK([matplotlib_inline])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 273505f49698dcd2ab30c2756b07113c9b7e7791 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:04:10 -0500
+Subject: Trac #29665: add Gentoo package information for ipykernel.
+
+---
+ build/pkgs/ipykernel/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipykernel/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipykernel/distros/gentoo.txt b/build/pkgs/ipykernel/distros/gentoo.txt
+new file mode 100644
+index 00000000..88aab61
+--- /dev/null
++++ b/build/pkgs/ipykernel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipykernel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 629ad36c9e4ae0cdff4a013289b4f2911442445e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:04:46 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for ipykernel.
+
+---
+ build/pkgs/ipykernel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipykernel/spkg-configure.m4
+
+diff --git a/build/pkgs/ipykernel/spkg-configure.m4 b/build/pkgs/ipykernel/spkg-configure.m4
+new file mode 100644
+index 00000000..94ecc2d
+--- /dev/null
++++ b/build/pkgs/ipykernel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipykernel], [SAGE_PYTHON_PACKAGE_CHECK([ipykernel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b8d709edb6a24fd5868ee2818b56e78257b2eafa Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:05:26 -0500
+Subject: Trac #29665: add Gentoo package information for prompt_toolkit.
+
+---
+ build/pkgs/prompt_toolkit/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/prompt_toolkit/distros/gentoo.txt
+
+diff --git a/build/pkgs/prompt_toolkit/distros/gentoo.txt b/build/pkgs/prompt_toolkit/distros/gentoo.txt
+new file mode 100644
+index 00000000..6902484
+--- /dev/null
++++ b/build/pkgs/prompt_toolkit/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/prompt_toolkit
+-- 
+cgit v1.0-1-gd88e
+
+
+From 16c0b5e767ae4dac4440510b7253e5c8642b7d2c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:10:39 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for prompt_toolkit.
+
+---
+ build/pkgs/prompt_toolkit/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/prompt_toolkit/spkg-configure.m4
+
+diff --git a/build/pkgs/prompt_toolkit/spkg-configure.m4 b/build/pkgs/prompt_toolkit/spkg-configure.m4
+new file mode 100644
+index 00000000..fd8c1a6
+--- /dev/null
++++ b/build/pkgs/prompt_toolkit/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([prompt_toolkit], [
++  SAGE_PYTHON_PACKAGE_CHECK([prompt_toolkit])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0cd9283e8bb6c8ae413fc8f715c021f7ec3ca2c8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:12:10 -0500
+Subject: Trac #29665: add Gentoo package information for charset_normalizer.
+
+---
+ build/pkgs/charset_normalizer/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/charset_normalizer/distros/gentoo.txt
+
+diff --git a/build/pkgs/charset_normalizer/distros/gentoo.txt b/build/pkgs/charset_normalizer/distros/gentoo.txt
+new file mode 100644
+index 00000000..eefeb89
+--- /dev/null
++++ b/build/pkgs/charset_normalizer/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/charset_normalizer
+-- 
+cgit v1.0-1-gd88e
+
+
+From a04b01a9ab59097d189edcc5ddcb461faede83b2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:12:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ charset_normalizer.
+
+---
+ build/pkgs/charset_normalizer/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/charset_normalizer/spkg-configure.m4
+
+diff --git a/build/pkgs/charset_normalizer/spkg-configure.m4 b/build/pkgs/charset_normalizer/spkg-configure.m4
+new file mode 100644
+index 00000000..18b18cf
+--- /dev/null
++++ b/build/pkgs/charset_normalizer/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([charset_normalizer], [
++  SAGE_PYTHON_PACKAGE_CHECK([charset_normalizer])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d2ea08138711c53046f977b586f33b09b176b2e3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:13:37 -0500
+Subject: Trac #29665: add Gentoo package information for prometheus_client.
+
+---
+ build/pkgs/prometheus_client/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/prometheus_client/distros/gentoo.txt
+
+diff --git a/build/pkgs/prometheus_client/distros/gentoo.txt b/build/pkgs/prometheus_client/distros/gentoo.txt
+new file mode 100644
+index 00000000..aa2889c
+--- /dev/null
++++ b/build/pkgs/prometheus_client/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/prometheus_client
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b0393200e9edd3e26b8a55ba67e5710e7403fcb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:15:09 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for prometheus_client.
+
+---
+ build/pkgs/prometheus_client/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/prometheus_client/spkg-configure.m4
+
+diff --git a/build/pkgs/prometheus_client/spkg-configure.m4 b/build/pkgs/prometheus_client/spkg-configure.m4
+new file mode 100644
+index 00000000..b494588
+--- /dev/null
++++ b/build/pkgs/prometheus_client/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([prometheus_client], [
++  SAGE_PYTHON_PACKAGE_CHECK([prometheus_client])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From cdcd85284f43ca4ad18353ec3527b2901e57b788 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:17:23 -0500
+Subject: Trac #29665: add Gentoo package information for pybind11.
+
+---
+ build/pkgs/pybind11/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pybind11/distros/gentoo.txt
+
+diff --git a/build/pkgs/pybind11/distros/gentoo.txt b/build/pkgs/pybind11/distros/gentoo.txt
+new file mode 100644
+index 00000000..0c500b3
+--- /dev/null
++++ b/build/pkgs/pybind11/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pybind11
+-- 
+cgit v1.0-1-gd88e
+
+
+From efdd1eb64c4799fe3cdf2221824182941b3fda2d Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:17:51 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pybind11.
+
+---
+ build/pkgs/pybind11/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pybind11/spkg-configure.m4
+
+diff --git a/build/pkgs/pybind11/spkg-configure.m4 b/build/pkgs/pybind11/spkg-configure.m4
+new file mode 100644
+index 00000000..cce1cf5
+--- /dev/null
++++ b/build/pkgs/pybind11/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pybind11], [SAGE_PYTHON_PACKAGE_CHECK([pybind11])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b2128f33b68ea33927284116ea598dd186902400 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:19:23 -0500
+Subject: Trac #29665: add Gentoo package information for pkgconfig.
+
+---
+ build/pkgs/pkgconfig/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pkgconfig/distros/gentoo.txt
+
+diff --git a/build/pkgs/pkgconfig/distros/gentoo.txt b/build/pkgs/pkgconfig/distros/gentoo.txt
+new file mode 100644
+index 00000000..32e8618
+--- /dev/null
++++ b/build/pkgs/pkgconfig/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pkgconfig
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b373b49e06aadeb36dc57e500da9a322460e658 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:19:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pkgconfig.
+
+---
+ build/pkgs/pkgconfig/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pkgconfig/spkg-configure.m4
+
+diff --git a/build/pkgs/pkgconfig/spkg-configure.m4 b/build/pkgs/pkgconfig/spkg-configure.m4
+new file mode 100644
+index 00000000..6708293
+--- /dev/null
++++ b/build/pkgs/pkgconfig/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pkgconfig], [SAGE_PYTHON_PACKAGE_CHECK([pkgconfig])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ce578729eb0d14baab365351ba9a9ffffb7b79f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:21:10 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_serializinghtml.
+
+---
+ build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt b/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+new file mode 100644
+index 00000000..38bca8f
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-serializinghtml
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb0f42c32bbce0e4488678312f5e2d88c6f42c9b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:21:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_serializinghtml.
+
+---
+ build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4 b/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+new file mode 100644
+index 00000000..be8e625
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_serializinghtml], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_serializinghtml])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e47dcf985e40475de85c9436a85537751318bc3d Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:22:54 -0500
+Subject: Trac #29665: add Gentoo package information for sphinxcontrib_jsmath.
+
+---
+ build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt b/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+new file mode 100644
+index 00000000..041a471
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-jsmath
+-- 
+cgit v1.0-1-gd88e
+
+
+From 72cff6fd35f93de4fa855bc870569dd733ff5c24 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:23:49 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_jsmath.
+
+---
+ build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4 b/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+new file mode 100644
+index 00000000..e46bde2
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_jsmath], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_jsmath])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a36395d70f759449cd63c1b0990fbdcb4cb25ca0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:24:26 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_devhelp.
+
+---
+ build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..9b5c899
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-devhelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9953a5dd1646ed0ad51d2e3935cf609bc9e7fd1c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:25:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_devhelp.
+
+---
+ build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+new file mode 100644
+index 00000000..8728136
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_devhelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_devhelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b199d5363aad93f3cb23f7904c9553a28b06348f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:25:53 -0500
+Subject: Trac #29665: add Gentoo package information for sphinxcontrib_qthelp.
+
+---
+ build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..7210099
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-qthelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 94ac8806739f3938e73f5857328e91e0d42e98d2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:26:28 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_qthelp.
+
+---
+ build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+new file mode 100644
+index 00000000..81ea5e1
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_qthelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_qthelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From beedc154aa405e8a58aee8889f510db07adc89a7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:26:54 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_applehelp.
+
+---
+ build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..66ac8da
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-applehelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 07d47c3673d6b35423b71f621cb400989c0101c2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:27:19 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_applehelp.
+
+---
+ build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+new file mode 100644
+index 00000000..e834aed
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_applehelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_applehelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 333a66546c5d421735c49dbafd7370a827f22781 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:27:46 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_htmlhelp.
+
+---
+ build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..e080bac
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-htmlhelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From bfaeb3962254439b63f1f2e0e883de462c7831be Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:29:18 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_htmlhelp.
+
+---
+ build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+new file mode 100644
+index 00000000..c77b003
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_htmlhelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_htmlhelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 782cde13da06e8b85806cb7cbc8aceee0364e639 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:30:23 -0500
+Subject: Trac #29665: add Gentoo package information for jupyterlab_pygments.
+
+---
+ build/pkgs/jupyterlab_pygments/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyterlab_pygments/distros/gentoo.txt b/build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+new file mode 100644
+index 00000000..c57b4f1
+--- /dev/null
++++ b/build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyterlab_pygments
+-- 
+cgit v1.0-1-gd88e
+
+
+From 39f974cfa4a8c6e5dd897f152f83ec82f40ee9f7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:31:13 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ jupyterlab_pygments.
+
+---
+ build/pkgs/jupyterlab_pygments/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyterlab_pygments/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyterlab_pygments/spkg-configure.m4 b/build/pkgs/jupyterlab_pygments/spkg-configure.m4
+new file mode 100644
+index 00000000..e46e21f
+--- /dev/null
++++ b/build/pkgs/jupyterlab_pygments/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyterlab_pygments], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyterlab_pygments])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From db704620700fd36cec3bf6125938f3ee00a9eb5e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:29:15 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for ply.
+
+---
+ build/pkgs/ply/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ply/spkg-configure.m4
+
+diff --git a/build/pkgs/ply/spkg-configure.m4 b/build/pkgs/ply/spkg-configure.m4
+new file mode 100644
+index 00000000..ffb0030
+--- /dev/null
++++ b/build/pkgs/ply/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ply], [SAGE_PYTHON_PACKAGE_CHECK([ply])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6aac31dabcdfdef228d7780398a3fda1a4cc566f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:29:51 -0500
+Subject: Trac #29665: add Gentoo package information for ply.
+
+---
+ build/pkgs/ply/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ply/distros/gentoo.txt
+
+diff --git a/build/pkgs/ply/distros/gentoo.txt b/build/pkgs/ply/distros/gentoo.txt
+new file mode 100644
+index 00000000..c8b1630
+--- /dev/null
++++ b/build/pkgs/ply/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ply
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb8d3372936ec37470d69687a0f91592129460ae Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:30:33 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for gast.
+
+---
+ build/pkgs/gast/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/gast/spkg-configure.m4
+
+diff --git a/build/pkgs/gast/spkg-configure.m4 b/build/pkgs/gast/spkg-configure.m4
+new file mode 100644
+index 00000000..26ec59f
+--- /dev/null
++++ b/build/pkgs/gast/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([gast], [SAGE_PYTHON_PACKAGE_CHECK([gast])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1cdc4046a88f1c2b4e5c162f66c6db6090b24194 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:31:15 -0500
+Subject: Trac #29665: add Gentoo package information for gast.
+
+---
+ build/pkgs/gast/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/gast/distros/gentoo.txt
+
+diff --git a/build/pkgs/gast/distros/gentoo.txt b/build/pkgs/gast/distros/gentoo.txt
+new file mode 100644
+index 00000000..3be5e7e
+--- /dev/null
++++ b/build/pkgs/gast/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/gast
+-- 
+cgit v1.0-1-gd88e
+
+
+From 96068b8a3742b65d619190e1d9fa5db399e6b4f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:32:20 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pythran.
+
+---
+ build/pkgs/pythran/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pythran/spkg-configure.m4
+
+diff --git a/build/pkgs/pythran/spkg-configure.m4 b/build/pkgs/pythran/spkg-configure.m4
+new file mode 100644
+index 00000000..592e95b
+--- /dev/null
++++ b/build/pkgs/pythran/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pythran], [SAGE_PYTHON_PACKAGE_CHECK([pythran])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1fa0fad3ae8f7e559c6fc315c6773a7d8aac0bfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:32:55 -0500
+Subject: Trac #29665: add Gentoo package information for pythran.
+
+---
+ build/pkgs/pythran/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pythran/distros/gentoo.txt
+
+diff --git a/build/pkgs/pythran/distros/gentoo.txt b/build/pkgs/pythran/distros/gentoo.txt
+new file mode 100644
+index 00000000..1bb7cdc
+--- /dev/null
++++ b/build/pkgs/pythran/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pythran
+-- 
+cgit v1.0-1-gd88e
+
+
+From d26370e5b8c88e76abfb7c27e3defb71c9e9f711 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:33:50 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for beniget.
+
+---
+ build/pkgs/beniget/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/beniget/spkg-configure.m4
+
+diff --git a/build/pkgs/beniget/spkg-configure.m4 b/build/pkgs/beniget/spkg-configure.m4
+new file mode 100644
+index 00000000..8ae6101
+--- /dev/null
++++ b/build/pkgs/beniget/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([beniget], [SAGE_PYTHON_PACKAGE_CHECK([beniget])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From eeeb296ed9b9694a865534103fd58e62a151ef5e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:34:22 -0500
+Subject: Trac #29665: add Gentoo package information for beniget.
+
+---
+ build/pkgs/beniget/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/beniget/distros/gentoo.txt
+
+diff --git a/build/pkgs/beniget/distros/gentoo.txt b/build/pkgs/beniget/distros/gentoo.txt
+new file mode 100644
+index 00000000..1a5972c
+--- /dev/null
++++ b/build/pkgs/beniget/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/beniget
+-- 
+cgit v1.0-1-gd88e
+
+
+From 078b2ff272d0eeff5cce40ad7eb176d9ddd7bdff Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:35:37 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for alabaster.
+
+---
+ build/pkgs/alabaster/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/alabaster/spkg-configure.m4
+
+diff --git a/build/pkgs/alabaster/spkg-configure.m4 b/build/pkgs/alabaster/spkg-configure.m4
+new file mode 100644
+index 00000000..4eca6e0
+--- /dev/null
++++ b/build/pkgs/alabaster/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([alabaster], [SAGE_PYTHON_PACKAGE_CHECK([alabaster])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7dc264353e5f64110431ff28c1b8b7e89699e9bd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:36:06 -0500
+Subject: Trac #29665: add Gentoo package information for alabaster.
+
+---
+ build/pkgs/alabaster/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/alabaster/distros/gentoo.txt
+
+diff --git a/build/pkgs/alabaster/distros/gentoo.txt b/build/pkgs/alabaster/distros/gentoo.txt
+new file mode 100644
+index 00000000..cffece6
+--- /dev/null
++++ b/build/pkgs/alabaster/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/alabaster
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8011a5e675e7e61a77ce34a299ee961a9f44253f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:43:59 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ importlib_metadata.
+
+---
+ build/pkgs/importlib_metadata/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/importlib_metadata/spkg-configure.m4
+
+diff --git a/build/pkgs/importlib_metadata/spkg-configure.m4 b/build/pkgs/importlib_metadata/spkg-configure.m4
+new file mode 100644
+index 00000000..0554e52
+--- /dev/null
++++ b/build/pkgs/importlib_metadata/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([importlib_metadata], [
++  SAGE_PYTHON_PACKAGE_CHECK([importlib_metadata])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 928ca0019e3ec6c4541a16b28bcc6710df6d010b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:44:28 -0500
+Subject: Trac #29665: add Gentoo package information for importlib_metadata.
+
+---
+ build/pkgs/importlib_metadata/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/importlib_metadata/distros/gentoo.txt
+
+diff --git a/build/pkgs/importlib_metadata/distros/gentoo.txt b/build/pkgs/importlib_metadata/distros/gentoo.txt
+new file mode 100644
+index 00000000..4f92786
+--- /dev/null
++++ b/build/pkgs/importlib_metadata/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/importlib_metadata
+-- 
+cgit v1.0-1-gd88e
+
+
+From 135f184f7498a2046065e669723e68efe2d65cee Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 21:16:58 -0500
+Subject: Trac #29665: fix sage.misc.package doctest with system alabaster.
+
+When alabaster from the system is used, these tests won't be able to
+find its SPKG installed. Add some ellipses, and switch one test to
+look for sage_conf instead.
+---
+ src/sage/misc/package.py | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/sage/misc/package.py b/src/sage/misc/package.py
+index 84f3d50..c7ad206 100644
+--- a/src/sage/misc/package.py
++++ b/src/sage/misc/package.py
+@@ -386,9 +386,9 @@ def installed_packages(exclude_pip=True):
+     EXAMPLES::
+ 
+         sage: sorted(installed_packages().keys())  # optional - build
+-        [...'gmpy2', ...'sage_conf', ...]
+-        sage: installed_packages()['gmpy2']  # optional - build, random
+-        '2.1.0b5'
++        [...'sage_conf', ...]
++        sage: installed_packages()['sage_conf']  # optional - build, random
++        '9.5'
+ 
+     .. SEEALSO::
+ 
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/trac-32867-system_maxima-ed39aba734cb4ded0b04165fa142b5cf4c38fd23.patch b/srcpkgs/sagemath/patches/trac-32867-system_maxima-ed39aba734cb4ded0b04165fa142b5cf4c38fd23.patch
new file mode 100644
index 000000000000..8edbde0ce76f
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-32867-system_maxima-ed39aba734cb4ded0b04165fa142b5cf4c38fd23.patch
@@ -0,0 +1,247 @@
+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
+ 
+-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 fbce694..b40cda6 100644
+--- a/pkgs/sage-conf/sage_conf.py.in
++++ b/pkgs/sage-conf/sage_conf.py.in
+@@ -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.
+ MAXIMA_FAS = "@SAGE_MAXIMA_FAS@".replace('${prefix}', SAGE_LOCAL)
+ 
+diff --git a/src/bin/sage b/src/bin/sage
+index fcd2630..54b69a1 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/sage/env.py b/src/sage/env.py
+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"))
+ 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 fc7f48b..7313c7d 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 917059d..c966a3c 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')
+-- 
+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/patches/trac-33047-musl_fix_find_library-dc1a0e8168a9ffb4fbf07dd03c0846b4933a6dbe.patch b/srcpkgs/sagemath/patches/trac-33047-musl_fix_find_library-dc1a0e8168a9ffb4fbf07dd03c0846b4933a6dbe.patch
new file mode 100644
index 000000000000..3d4f4e14bb7b
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33047-musl_fix_find_library-dc1a0e8168a9ffb4fbf07dd03c0846b4933a6dbe.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: Add a patch that fixes ctypes.util.find_library('c')
+
+The issue causes a failure doctesting src/sage/misc/gperftools.py
+---
+ 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 00000000..82f436b
+--- /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):
+-- 
+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-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch b/srcpkgs/sagemath/patches/trac-33064-sage_docbuild_ignore_cache_save_permission_error-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
new file mode 100644
index 000000000000..04f04cfd6718
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33064-sage_docbuild_ignore_cache_save_permission_error-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
@@ -0,0 +1,32 @@
+From e89193f4f32246ad9ded6d37f1f2f12a589a81f4 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 466ca82..f8c8ebd 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/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch b/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
new file mode 100644
index 000000000000..04fca4815a00
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
@@ -0,0 +1,131 @@
+From 18d0477153af6f453a0e84f78030535f6a36ce87 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 c788623..527ed90 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 - sagemath_doc_html
+-        sage: thematic_index = os.path.join(SAGE_DOC, "html", "en", "thematic_tutorials", "index.html")  # optional - sagemath_doc_html
++        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 - sagemath_doc_html
+         ....:     if "padics" in line:
+         ....:         _ = sys.stdout.write(line)
+diff --git a/src/sage/misc/sagedoc.py b/src/sage/misc/sagedoc.py
+index 4c56aea..583ca06 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 - sagemath_doc_html
+-    sage: docfilename = os.path.join(SAGE_DOC, 'html', 'en', 'reference', 'calculus', 'sage', 'symbolic', 'expression.html')  # optional - sagemath_doc_html
++    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 - sagemath_doc_html
+     ....:     for line in fobj:
+     ....:         if "#sage.symbolic.expression.Expression.numerical_approx" in line:
+@@ -845,12 +845,12 @@ def _search_src_or_doc(what, string, extra1='', extra2='', extra3='',
+ 
+     ::
+ 
+-        sage: from sage.misc.sagedoc import _search_src_or_doc  # optional - sagemath_doc_html
+-        sage: len(_search_src_or_doc('src', r'matrix\(', 'incidence_structures', 'self', 'combinat', interact=False).splitlines()) > 1  # optional - sagemath_doc_html
++        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 - sagemath_doc_html, long time (4s on sage.math, 2012)
+         True
+-        sage: 'divisors' in _search_src_or_doc('src', '^ *def prime', interact=False)  # optional - sagemath_doc_html
++        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
+@@ -1369,7 +1369,7 @@ class _sage_doc:
+ 
+         sage: browse_sage_doc._open("reference", testing=True)[0]  # optional - sagemath_doc_html, indirect doctest
+         'http://localhost:8000/doc/live/reference/index.html'
+-        sage: browse_sage_doc(identity_matrix, 'rst')[-107:-47]  # optional - sagemath_doc_html
++        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 88dd9f3a1611fed0cc66fb838eb85739646dd34d 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 f8c8ebd..d329009 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 - sagemath_doc_html
+         ....:     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 - sagemath_doc_html
+             '.../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 - sagemath_doc_html
+             '.../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 - sagemath_doc_html
+             '.../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 - sagemath_doc_html
+             '.../html/en/reference'
+         """
+         if lang is None:
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch b/srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
new file mode 100644
index 000000000000..7fdb3d697222
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.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: 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 4c0fa17..153e610 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
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch b/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
new file mode 100644
index 000000000000..350c41ac3928
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
@@ -0,0 +1,35 @@
+From 53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6 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: sagetex: Fix a warning when byte-compiling sagetexparse.py
+
+---
+ build/pkgs/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 00000000..d82ab67
+--- /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'
++ 
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/trac-33189-fix_doctests_for_arb_2.22-53532ddd4e2dc92469c1590ebf0c40f8f69bf579.patch b/srcpkgs/sagemath/patches/trac-33189-fix_doctests_for_arb_2.22-53532ddd4e2dc92469c1590ebf0c40f8f69bf579.patch
new file mode 100644
index 000000000000..b861af7ec982
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33189-fix_doctests_for_arb_2.22-53532ddd4e2dc92469c1590ebf0c40f8f69bf579.patch
@@ -0,0 +1,126 @@
+From 24cc94b1988a90f3bd22a2368ec30c086283af13 Mon Sep 17 00:00:00 2001
+From: Antonio Rojas <arojas@archlinux.org>
+Date: Sun, 16 Jan 2022 11:55:04 +0100
+Subject: Add abs tol to some arb tests
+
+---
+ src/sage/functions/error.py    |  2 +-
+ src/sage/rings/complex_arb.pyx |  6 +++---
+ src/sage/rings/real_arb.pyx    | 10 +++++-----
+ 3 files changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/src/sage/functions/error.py b/src/sage/functions/error.py
+index f48d04f..06f0b24 100644
+--- a/src/sage/functions/error.py
++++ b/src/sage/functions/error.py
+@@ -267,7 +267,7 @@ class Function_erf(BuiltinFunction):
+ 
+         Check that real ball evaluation is fixed :trac:`28061`::
+ 
+-            sage: RealBallField(128)(erf(5))
++            sage: RealBallField(128)(erf(5)) # abs tol 1e-38
+             [0.99999999999846254020557196514981165651 +/- 7.33e-39]
+         """
+         R = parent or s_parent(x)
+diff --git a/src/sage/rings/complex_arb.pyx b/src/sage/rings/complex_arb.pyx
+index f986970..93ff565 100644
+--- a/src/sage/rings/complex_arb.pyx
++++ b/src/sage/rings/complex_arb.pyx
+@@ -3974,8 +3974,8 @@ cdef class ComplexBall(RingElement):
+ 
+         EXAMPLES::
+ 
+-            sage: CBF(20).erfc()
+-            [5.39586561160790e-176 +/- ...e-191]
++            sage: CBF(20).erfc() # abs tol 1e-190
++            [5.39586561160790e-176 +/- 6.73e-191]
+             sage: CBF(100, 100).erfc()
+             [0.00065234366376858 +/- ...e-18] + [-0.00393572636292141 +/- ...e-18]*I
+         """
+@@ -4280,7 +4280,7 @@ cdef class ComplexBall(RingElement):
+ 
+         TESTS:
+ 
+-            sage: CBF(Shi(I))
++            sage: CBF(Shi(I)) # abs tol 1e-15
+             [0.946083070367183 +/- 9.22e-16]*I
+         """
+         cdef ComplexBall result = self._new()
+diff --git a/src/sage/rings/real_arb.pyx b/src/sage/rings/real_arb.pyx
+index 4a81784..292bfea 100644
+--- a/src/sage/rings/real_arb.pyx
++++ b/src/sage/rings/real_arb.pyx
+@@ -3506,7 +3506,7 @@ cdef class RealBall(RingElement):
+ 
+         EXAMPLES::
+ 
+-            sage: RBF(1/2).erf()
++            sage: RBF(1/2).erf() # abs tol 1e-16
+             [0.520499877813047 +/- 6.10e-16]
+         """
+         cdef RealBall res = self._new()
+@@ -3556,12 +3556,12 @@ cdef class RealBall(RingElement):
+ 
+         EXAMPLES::
+ 
+-            sage: RBF(1).Si()
++            sage: RBF(1).Si() # abs tol 1e-15
+             [0.946083070367183 +/- 9.22e-16]
+ 
+         TESTS::
+ 
+-            sage: RBF(Si(1))
++            sage: RBF(Si(1)) # abs tol 1e-15
+             [0.946083070367183 +/- 9.22e-16]
+         """
+         cdef RealBall res = self._new()
+@@ -3578,12 +3578,12 @@ cdef class RealBall(RingElement):
+ 
+         EXAMPLES::
+ 
+-            sage: RBF(1).Ci()  # abs tol 1e-16
++            sage: RBF(1).Ci()  # abs tol 1e-15
+             [0.337403922900968 +/- 3.25e-16]
+ 
+         TESTS::
+ 
+-            sage: RBF(Ci(1))  # abs tol 1e-16
++            sage: RBF(Ci(1))  # abs tol 1e-15
+             [0.337403922900968 +/- 3.25e-16]
+         """
+         cdef RealBall res = self._new()
+-- 
+cgit v1.0-1-gd88e
+
+
+From 53532ddd4e2dc92469c1590ebf0c40f8f69bf579 Mon Sep 17 00:00:00 2001
+From: Antonio Rojas <arojas@archlinux.org>
+Date: Sun, 16 Jan 2022 14:16:53 +0100
+Subject: Decrease abs tol
+
+---
+ src/sage/rings/real_arb.pyx | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/sage/rings/real_arb.pyx b/src/sage/rings/real_arb.pyx
+index 292bfea..eb30f7f 100644
+--- a/src/sage/rings/real_arb.pyx
++++ b/src/sage/rings/real_arb.pyx
+@@ -3578,12 +3578,12 @@ cdef class RealBall(RingElement):
+ 
+         EXAMPLES::
+ 
+-            sage: RBF(1).Ci()  # abs tol 1e-15
++            sage: RBF(1).Ci()  # abs tol 5e-16
+             [0.337403922900968 +/- 3.25e-16]
+ 
+         TESTS::
+ 
+-            sage: RBF(Ci(1))  # abs tol 1e-15
++            sage: RBF(Ci(1))  # abs tol 5e-16
+             [0.337403922900968 +/- 3.25e-16]
+         """
+         cdef RealBall res = self._new()
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch b/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
new file mode 100644
index 000000000000..7ef3826aa4d2
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
@@ -0,0 +1,27 @@
+diff --git a/src/bin/sage-runtests b/src/bin/sage-runtests
+index 589dc8cd37..6bb8bf99a4 100755
+--- a/src/bin/sage-runtests
++++ b/src/bin/sage-runtests
+@@ -154,21 +154,4 @@ if __name__ == "__main__":
+     DC = DocTestController(args, args.filenames)
+     err = DC.run()
+ 
+-    try:
+-        exit_code_pytest = 0
+-        import pytest
+-        pytest_options = ["--import-mode", "importlib"]
+-        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.")
+-
+-    if err == 0:
+-        sys.exit(exit_code_pytest)
+-    else:
+-        sys.exit(err)
++    sys.exit(err)
diff --git a/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch b/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
new file mode 100644
index 000000000000..ca360dee9f6e
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage/matrix/matrix2.pyx b/src/sage/matrix/matrix2.pyx
+index 7d319bd54b..c1a2eed6f1 100644
+--- a/src/sage/matrix/matrix2.pyx
++++ b/src/sage/matrix/matrix2.pyx
+@@ -17215,7 +17215,7 @@ cdef class Matrix(Matrix1):
+ 
+             sage: set_random_seed()
+             sage: K = random_cone(max_ambient_dim=5)
+-            sage: all(L.change_ring(SR).is_Z_operator_on(K)
++            sage: all(L.change_ring(SR).is_Z_operator_on(K) # long time
+             ....:     for L in K.Z_operators_gens())  # long time
+             True
+ 
diff --git a/srcpkgs/sagemath/patches/zzz-fix_no_SAGE_BIN.patch b/srcpkgs/sagemath/patches/zzz-fix_no_SAGE_BIN.patch
new file mode 100644
index 000000000000..ac80085bd6b4
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fix_no_SAGE_BIN.patch
@@ -0,0 +1,12 @@
+--- a/src/sage/misc/dist.py
++++ b/src/sage/misc/dist.py
+@@ -108,7 +108,8 @@ def install_scripts(directory=None, ignore_existing=False):
+     PATH = os.environ['PATH'].split(os.pathsep)
+     PATH = [d for d in PATH if os.path.exists(d)]
+     dir_in_path = any(os.path.samefile(directory, d) for d in PATH)
+-    PATH = os.pathsep.join(d for d in PATH
++    if os.path.exists(SAGE_BIN):
++        PATH = os.pathsep.join(d for d in PATH
+                            if not os.path.samefile(d, SAGE_BIN))
+     for cmd in ['gap', 'gp', 'hg', 'ipython', 'maxima',
+                 'mwrank', 'R', 'singular', 'sqlite3', 'M2', 'kash']:
diff --git a/srcpkgs/sagemath/patches/zzz-fix_no_venv_packages.patch b/srcpkgs/sagemath/patches/zzz-fix_no_venv_packages.patch
new file mode 100644
index 000000000000..7b19169a91d9
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fix_no_venv_packages.patch
@@ -0,0 +1,13 @@
+diff --git a/build/make/Makefile.in b/build/make/Makefile.in
+index 0baddba4ae..be363bea71 100644
+--- a/build/make/Makefile.in
++++ b/build/make/Makefile.in
+@@ -624,7 +624,7 @@ $(1)-$(4)-no-deps:
+ 		SAGE_SPKG_WHEELS=$$($(4))/var/lib/sage/wheels \
+ 		SAGE_INST_LOCAL=$$($(4)) \
+ 		sage-logger -p '$$(SAGE_ROOT)/build/pkgs/$(1)/spkg-install' '$$(SAGE_LOGS)/$(1)-$(2).log' && \
+-	    touch "$$($(4))/$(SPKG_INST_RELDIR)/$(1)-$(2)"; \
++	    mkdir -p "$$($(4))/$(SPKG_INST_RELDIR)" && touch "$$($(4))/$(SPKG_INST_RELDIR)/$(1)-$(2)"; \
+ 	else \
+ 	    echo; \
+ 	    echo "Error: $(1) is a dummy script package that the Sage distribution uses"; \
diff --git a/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch b/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
new file mode 100644
index 000000000000..741d2b23a7f5
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
@@ -0,0 +1,96 @@
+From 346b4ea4c92f4287d3c097b92817cf2abfcddd8c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Thu, 13 Jan 2022 01:41:31 -0300
+Subject: [PATCH] gap: fixes for using system gap
+
+ - fix _get_shared_lib_path() so we don't need to configure GAP_SO
+ - fix gap_root() so we don't need to configure GAP_ROOT_DIR
+ - skip a useless test that cannot succeed on system gap
+ - use gap_root() in saved_workspace.py instead of GAP_ROOT_DIR
+---
+ src/sage/env.py                      |  2 +-
+ src/sage/libs/gap/saved_workspace.py |  4 ++--
+ src/sage/libs/gap/util.pyx           | 11 +++++++++++
+ src/sage_setup/optional_extension.py |  2 +-
+ 4 files changed, 15 insertions(+), 4 deletions(-)
+
+diff --git a/src/sage/env.py b/src/sage/env.py
+index c4953cfa65..c16696d298 100644
+--- a/src/sage/env.py
++++ b/src/sage/env.py
+@@ -293,7 +293,7 @@ def _get_shared_lib_path(*libnames: str) -> Optional[str]:
+             if sys.platform == 'darwin':
+                 ext = 'dylib'
+             else:
+-                ext = 'so'
++                ext = 'so*'
+ 
+             if SAGE_LOCAL:
+                 search_directories.append(Path(SAGE_LOCAL) / 'lib')
+diff --git a/src/sage/libs/gap/saved_workspace.py b/src/sage/libs/gap/saved_workspace.py
+index ad5adec36d..59c498795f 100644
+--- a/src/sage/libs/gap/saved_workspace.py
++++ b/src/sage/libs/gap/saved_workspace.py
+@@ -8,7 +8,7 @@ workspaces.
+ 
+ import os
+ import glob
+-from sage.env import GAP_ROOT_DIR
++from sage.libs.gap.util import gap_root
+ from sage.interfaces.gap_workspace import gap_workspace_file
+ 
+ 
+@@ -31,7 +31,7 @@ def timestamp():
+     """
+     libgap_dir = os.path.dirname(__file__)
+     libgap_files = glob.glob(os.path.join(libgap_dir, '*'))
+-    gap_packages = glob.glob(os.path.join(GAP_ROOT_DIR, 'pkg', '*'))
++    gap_packages = glob.glob(os.path.join(gap_root(), 'pkg', '*'))
+     files = libgap_files + gap_packages
+     if len(files) == 0:
+         print('Unable to find LibGAP files.')
+diff --git a/src/sage/libs/gap/util.pyx b/src/sage/libs/gap/util.pyx
+index 08c4c40cc0..c7dd557c35 100644
+--- a/src/sage/libs/gap/util.pyx
++++ b/src/sage/libs/gap/util.pyx
+@@ -23,6 +23,7 @@ from cysignals.signals cimport sig_on, sig_off
+ import os
+ import warnings
+ import sage.env
++import subprocess
+ 
+ from .gap_includes cimport *
+ from .element cimport *
+@@ -178,6 +179,16 @@ def gap_root():
+     if os.path.exists(sage.env.GAP_ROOT_DIR):
+         return sage.env.GAP_ROOT_DIR
+ 
++    gap_expr = 'JoinStringsWithSeparator(KERNEL_INFO().GAP_ROOT_PATHS,";")'
++    gap_root_paths = subprocess.getoutput(
++        f"gap -r -q --bare --nointeract -c 'Display({gap_expr});'"
++        ).strip().split(';')
++
++    for gapdir in gap_root_paths:
++        if os.path.exists(os.path.join(gapdir, 'sysinfo.gap')):
++            sage.env.GAP_ROOT_DIR = gapdir
++            return gapdir
++
+     # Attempt to figure out the appropriate GAP_ROOT by reading the
+     # local/bin/gap shell script; this is an ugly hack that exists for
+     # historical reasons; the best approach to setting where Sage looks for
+diff --git a/src/sage_setup/optional_extension.py b/src/sage_setup/optional_extension.py
+index f252849384..4034e3e196 100644
+--- a/src/sage_setup/optional_extension.py
++++ b/src/sage_setup/optional_extension.py
+@@ -80,7 +80,7 @@ def OptionalExtension(*args, **kwds):
+         sage: print(ext.__class__.__name__)
+         CythonizeExtension
+         sage: ext = OptionalExtension("foo", ["foo.c"], package="gap")
+-        sage: print(ext.__class__.__name__)
++        sage: print(ext.__class__.__name__)     # not tested - fails with system gap
+         Extension
+     """
+     try:
+-- 
+2.34.1
+
diff --git a/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch b/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
new file mode 100644
index 000000000000..093e3d56eb33
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
@@ -0,0 +1,42 @@
+More site packages not included in trac 29665
+
+diff --git a/build/pkgs/gmpy2/spkg-configure.m4 b/build/pkgs/gmpy2/spkg-configure.m4
+new file mode 100644
+index 0000000000..2d0390f7db
+--- /dev/null
++++ b/build/pkgs/gmpy2/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([gmpy2], [SAGE_PYTHON_PACKAGE_CHECK([gmpy2])])
+diff --git a/build/pkgs/sphinx/spkg-configure.m4 b/build/pkgs/sphinx/spkg-configure.m4
+new file mode 100644
+index 0000000000..e149fbb2cf
+--- /dev/null
++++ b/build/pkgs/sphinx/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([sphinx], [SAGE_PYTHON_PACKAGE_CHECK([sphinx])])
+diff --git a/build/pkgs/typing_extensions/spkg-configure.m4 b/build/pkgs/typing_extensions/spkg-configure.m4
+new file mode 100644
+index 0000000000..d475fd8257
+--- /dev/null
++++ b/build/pkgs/typing_extensions/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([typing_extensions], [SAGE_PYTHON_PACKAGE_CHECK([typing_extensions])])
+-- 
+diff --git a/build/pkgs/gmpy2/install-requires.txt b/build/pkgs/gmpy2/install-requires.txt
+index 51d24518ef..c25feff557 100644
+--- a/build/pkgs/gmpy2/install-requires.txt
++++ b/build/pkgs/gmpy2/install-requires.txt
+@@ -1,3 +1 @@
+-# We would like to write gmpy2 >=2.1.0b5, but pipenv does not accept prereleases in version ranges
+-# https://github.com/pypa/pipenv/issues/1760
+-gmpy2 ==2.1.0rc1
++gmpy2 >=2.1
+diff --git a/build/pkgs/ptyprocess/install-requires.txt b/build/pkgs/ptyprocess/install-requires.txt
+index de89260872..7c336f636c 100644
+--- a/build/pkgs/ptyprocess/install-requires.txt
++++ b/build/pkgs/ptyprocess/install-requires.txt
+@@ -1,3 +1,3 @@
+-ptyprocess ==0.5.1
++ptyprocess
+ # https://trac.sagemath.org/ticket/31280#comment:42 and following
+ # sagelib is not compatible with ptyprocess 0.5.2, 0.6, and 0.7
diff --git a/srcpkgs/sagemath/patches/zzz-remove_ratpoints.patch b/srcpkgs/sagemath/patches/zzz-remove_ratpoints.patch
new file mode 100644
index 000000000000..0842d9d7f6d5
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-remove_ratpoints.patch
@@ -0,0 +1,887 @@
+From 3178a5e1e4f7174343fd913494ae255b3e05fb85 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Mon, 17 Jan 2022 21:04:42 -0300
+Subject: [PATCH] ratpoints: remove deprecated package
+
+---
+ .github/workflows/ci-cygwin-minimal.yml       |   2 +-
+ .github/workflows/ci-cygwin-standard.yml      |   2 +-
+ COPYING.txt                                   |   1 -
+ build/pkgs/ratpoints/SPKG.rst                 |  29 --
+ build/pkgs/ratpoints/checksums.ini            |   4 -
+ build/pkgs/ratpoints/dependencies             |   5 -
+ build/pkgs/ratpoints/distros/arch.txt         |   1 -
+ build/pkgs/ratpoints/distros/conda.txt        |   1 -
+ build/pkgs/ratpoints/distros/debian.txt       |   1 -
+ build/pkgs/ratpoints/distros/nix.txt          |   1 -
+ build/pkgs/ratpoints/distros/repology.txt     |   1 -
+ build/pkgs/ratpoints/package-version.txt      |   1 -
+ build/pkgs/ratpoints/patches/Makefile.patch   |  37 ---
+ .../patches/sturm_and_rp_private.patch        | 194 ------------
+ build/pkgs/ratpoints/spkg-install.in          |  46 ---
+ build/pkgs/ratpoints/type                     |   1 -
+ build/pkgs/sagelib/dependencies               |   2 +-
+ src/sage/libs/ratpoints.pxd                   |  74 -----
+ src/sage/libs/ratpoints.pyx                   | 283 ------------------
+ .../elliptic_curves/descent_two_isogeny.pyx   |   2 -
+ src/sage_setup/library_order.py               |   2 +-
+ 21 files changed, 4 insertions(+), 686 deletions(-)
+ delete mode 100644 build/pkgs/ratpoints/SPKG.rst
+ delete mode 100644 build/pkgs/ratpoints/checksums.ini
+ delete mode 100644 build/pkgs/ratpoints/dependencies
+ delete mode 100644 build/pkgs/ratpoints/distros/arch.txt
+ delete mode 100644 build/pkgs/ratpoints/distros/conda.txt
+ delete mode 100644 build/pkgs/ratpoints/distros/debian.txt
+ delete mode 100644 build/pkgs/ratpoints/distros/nix.txt
+ delete mode 100644 build/pkgs/ratpoints/distros/repology.txt
+ delete mode 100644 build/pkgs/ratpoints/package-version.txt
+ delete mode 100644 build/pkgs/ratpoints/patches/Makefile.patch
+ delete mode 100644 build/pkgs/ratpoints/patches/sturm_and_rp_private.patch
+ delete mode 100644 build/pkgs/ratpoints/spkg-install.in
+ delete mode 100644 build/pkgs/ratpoints/type
+ delete mode 100644 src/sage/libs/ratpoints.pxd
+ delete mode 100644 src/sage/libs/ratpoints.pyx
+
+diff --git a/.github/workflows/ci-cygwin-minimal.yml b/.github/workflows/ci-cygwin-minimal.yml
+index 9e847e7474..9df1365657 100644
+--- a/.github/workflows/ci-cygwin-minimal.yml
++++ b/.github/workflows/ci-cygwin-minimal.yml
+@@ -217,7 +217,7 @@ jobs:
+     env:
+       STAGE: ii-b
+       PREVIOUS_STAGES: i-*
+-      TARGETS: singular maxima gap pari gfan palp flintqs ratpoints arb ecm givaro
++      TARGETS: singular maxima gap pari gfan palp flintqs arb ecm givaro
+       LOCAL_ARTIFACT_NAME: sage-local-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
+       LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
+ 
+diff --git a/.github/workflows/ci-cygwin-standard.yml b/.github/workflows/ci-cygwin-standard.yml
+index cbbe0f46a8..8aee1c2c3c 100644
+--- a/.github/workflows/ci-cygwin-standard.yml
++++ b/.github/workflows/ci-cygwin-standard.yml
+@@ -217,7 +217,7 @@ jobs:
+     env:
+       STAGE: ii-b
+       PREVIOUS_STAGES: i-*
+-      TARGETS: singular maxima gap pari gfan palp flintqs ratpoints arb ecm givaro
++      TARGETS: singular maxima gap pari gfan palp flintqs arb ecm givaro
+       LOCAL_ARTIFACT_NAME: sage-local-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
+       LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
+ 
+diff --git a/COPYING.txt b/COPYING.txt
+index 1176a856a0..a3e9cc6645 100644
+--- a/COPYING.txt
++++ b/COPYING.txt
+@@ -107,7 +107,6 @@ pynac                       GPLv2+
+ pyparsing                   MIT License
+ python                      Python License (see below)
+ R                           GPLv2+
+-ratpoints                   GPLv2+
+ readline                    GPLv3+
+ rpy                         GPLv2+
+ rubiks/dietz                GPL, any version
+diff --git a/build/pkgs/ratpoints/SPKG.rst b/build/pkgs/ratpoints/SPKG.rst
+deleted file mode 100644
+index 6607094bec..0000000000
+--- a/build/pkgs/ratpoints/SPKG.rst
++++ /dev/null
+@@ -1,29 +0,0 @@
+-ratpoints: Find rational points on hyperelliptic curves
+-=======================================================
+-
+-Description
+------------
+-
+-Michael Stoll's program which searches for rational points on
+-hyperelliptic curves.
+-
+-NOTE: the ratpoints package has been assimilated by PARI/GP. Therefore,
+-this package (as Sage package) is deprecated. In the future, it will be
+-removed from Sage.
+-
+-
+-Upstream Contact
+-----------------
+-
+--  Author: Michael Stoll
+--  Email: Michael.Stoll@uni-bayreuth.de
+--  Website: http://www.mathe2.uni-bayreuth.de/stoll/programs/
+-
+-
+-Note on SSE2 instructions
+-~~~~~~~~~~~~~~~~~~~~~~~~~
+-
+--  On several architectures, the SSE2 instructions used by ratpoints
+-   cause
+-   compiler errors. In the case that ratpoints fails to build with SSE2
+-   instructions enabled, the build is repeated with SSE2 disabled.
+diff --git a/build/pkgs/ratpoints/checksums.ini b/build/pkgs/ratpoints/checksums.ini
+deleted file mode 100644
+index 46ba1c9ec1..0000000000
+--- a/build/pkgs/ratpoints/checksums.ini
++++ /dev/null
+@@ -1,4 +0,0 @@
+-tarball=ratpoints-VERSION.tar.bz2
+-sha1=14fbc3dd50742794e0b33d2dd1217e5dd8ad2623
+-md5=9bf091d1b90132433f0a1fc6b585d024
+-cksum=670991933
+diff --git a/build/pkgs/ratpoints/dependencies b/build/pkgs/ratpoints/dependencies
+deleted file mode 100644
+index 9a77ea16f7..0000000000
+--- a/build/pkgs/ratpoints/dependencies
++++ /dev/null
+@@ -1,5 +0,0 @@
+-$(MP_LIBRARY)
+-
+-----------
+-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/ratpoints/distros/arch.txt b/build/pkgs/ratpoints/distros/arch.txt
+deleted file mode 100644
+index e137758627..0000000000
+--- a/build/pkgs/ratpoints/distros/arch.txt
++++ /dev/null
+@@ -1 +0,0 @@
+-ratpoints
+diff --git a/build/pkgs/ratpoints/distros/conda.txt b/build/pkgs/ratpoints/distros/conda.txt
+deleted file mode 100644
+index e137758627..0000000000
+--- a/build/pkgs/ratpoints/distros/conda.txt
++++ /dev/null
+@@ -1 +0,0 @@
+-ratpoints
+diff --git a/build/pkgs/ratpoints/distros/debian.txt b/build/pkgs/ratpoints/distros/debian.txt
+deleted file mode 100644
+index dabd28d624..0000000000
+--- a/build/pkgs/ratpoints/distros/debian.txt
++++ /dev/null
+@@ -1 +0,0 @@
+-libratpoints-dev
+diff --git a/build/pkgs/ratpoints/distros/nix.txt b/build/pkgs/ratpoints/distros/nix.txt
+deleted file mode 100644
+index e137758627..0000000000
+--- a/build/pkgs/ratpoints/distros/nix.txt
++++ /dev/null
+@@ -1 +0,0 @@
+-ratpoints
+diff --git a/build/pkgs/ratpoints/distros/repology.txt b/build/pkgs/ratpoints/distros/repology.txt
+deleted file mode 100644
+index e137758627..0000000000
+--- a/build/pkgs/ratpoints/distros/repology.txt
++++ /dev/null
+@@ -1 +0,0 @@
+-ratpoints
+diff --git a/build/pkgs/ratpoints/package-version.txt b/build/pkgs/ratpoints/package-version.txt
+deleted file mode 100644
+index efed46a7bd..0000000000
+--- a/build/pkgs/ratpoints/package-version.txt
++++ /dev/null
+@@ -1 +0,0 @@
+-2.1.3.p5
+diff --git a/build/pkgs/ratpoints/patches/Makefile.patch b/build/pkgs/ratpoints/patches/Makefile.patch
+deleted file mode 100644
+index 093d7c0018..0000000000
+--- a/build/pkgs/ratpoints/patches/Makefile.patch
++++ /dev/null
+@@ -1,37 +0,0 @@
+---- src/Makefile	2009-10-01 01:08:54.000000000 +0200
+-+++ patches/Makefile	2012-03-17 13:57:33.026315142 +0100
+-@@ -21,11 +21,11 @@
+- #
+- #    Michael Stoll, September 21, 2009
+- 
+--CC = gcc
+-+CC ?= gcc
+- RM = rm -f
+- INSTALL = cp
+- 
+--INSTALL_DIR = /usr/local
+-+INSTALL_DIR ?= /usr/local
+- 
+- DISTFILES = Makefile ratpoints.h rp-private.h primes.h \
+-             gen_find_points_h.c gen_init_sieve_h.c \
+-@@ -47,14 +47,14 @@
+- 	diff -q testbase rptest.out
+- 
+- install-bin: ratpoints
+--	${INSTALL} ratpoints ${INSTALL_DIR}/bin/
+--	chmod 755 ${INSTALL_DIR}/bin/ratpoints
+-+	${INSTALL} ratpoints "${INSTALL_DIR}/bin/"
+-+	chmod 755 "${INSTALL_DIR}/bin/ratpoints"
+- 
+- install-lib: ratpoints.h libratpoints.a
+--	${INSTALL} ratpoints.h ${INSTALL_DIR}/include/
+--	chmod 644 ${INSTALL_DIR}/include/ratpoints.h
+--	${INSTALL} libratpoints.a ${INSTALL_DIR}/lib/
+--	chmod 644 ${INSTALL_DIR}/lib/libratpoints.a
+-+	${INSTALL} ratpoints.h "${INSTALL_DIR}/include/"
+-+	chmod 644 "${INSTALL_DIR}/include/ratpoints.h"
+-+	${INSTALL} libratpoints.a "${INSTALL_DIR}/lib/"
+-+	chmod 644 "${INSTALL_DIR}/lib/libratpoints.a"
+- 
+- install: install-bin install-lib
+- 
+diff --git a/build/pkgs/ratpoints/patches/sturm_and_rp_private.patch b/build/pkgs/ratpoints/patches/sturm_and_rp_private.patch
+deleted file mode 100644
+index 664198c4de..0000000000
+--- a/build/pkgs/ratpoints/patches/sturm_and_rp_private.patch
++++ /dev/null
+@@ -1,194 +0,0 @@
+-diff --git a/rp-private.h b/rp-private.h
+-index b4c7dad..0c7193e 100644
+---- a/rp-private.h
+-+++ b/rp-private.h
+-@@ -36,7 +36,7 @@
+- #define LONG_SHIFT ((LONG_LENGTH == 16) ? 4 : \
+-                     (LONG_LENGTH == 32) ? 5 : \
+- 		    (LONG_LENGTH == 64) ? 6 : 0)
+--#define LONG_MASK (~(-1L<<LONG_SHIFT))
+-+#define LONG_MASK (~(-(1L<<LONG_SHIFT)))
+- 
+- /* Check if SSE instructions can be used.
+-    We assume that one SSE word of 128 bit is two long's,
+-diff --git a/sturm.c b/sturm.c
+-index c78d7c6..5fd2cf5 100644
+---- a/sturm.c
+-+++ b/sturm.c
+-@@ -27,7 +27,6 @@
+-  ***********************************************************************/
+- 
+- #include "ratpoints.h"
+--
+- /**************************************************************************
+-  * Arguments of _ratpoints_compute_sturm() : (from the args argument)     *
+-  *                                                                        *
+-@@ -53,7 +52,7 @@
+- /* A helper function: evaluate the polynomial in cofs[] of given degree
+-   at num/2^denexp and return the sign. */
+- 
+--static long eval_sign(ratpoints_args *args, mpz_t *cofs, long degree,
+-+static long eval_sign(const ratpoints_args *args, const mpz_t *cofs, long degree,
+-                       long num, long denexp)
+- {
+-   long n, e, s;
+-@@ -70,11 +69,80 @@ static long eval_sign(ratpoints_args *args, mpz_t *cofs, long degree,
+-   return(s);
+- }
+- 
+-+static const    long max = (long)(((unsigned long)(-1))>>1);
+-+static const    long min = (long)(-(((unsigned long)(-1))>>1));
+-+    /* recursive helper function */
+-+static void iterate(long nl, long nr, long del, long der, long cleft, long cright,
+-+                 long sl, long sr, long depth,
+-+		 ratpoints_interval **iptr, const ratpoints_interval *ivlo,
+-+		 const ratpoints_args *args, const long k, const long sturm_degs[],
+-+                 const mpz_t sturm[][args->degree + 1])
+-+    { /* nl/2^del, nr/2^der : interval left/right endpoints,
+-+         cleft, cright: sign change counts at endpoints,
+-+         sl, sr: signs at endpoints,
+-+         depth: iteration depth */
+-+     long iter = args->sturm;
+-+      if(cleft == cright && sl < 0) { return; }
+-+         /* here we know the polynomial is negative on the interval */
+-+      if((cleft == cright && sl > 0) || depth >= iter)
+-+      /* we have to add/extend an interval if we either know that
+-+         the polynomial is positive on the interval (first condition)
+-+         or the maximal iteration depth has been reached (second condition) */
+-+      { double l = ((double)nl)/((double)(1<<del));
+-+        double u = ((double)nr)/((double)(1<<der));
+-+        if(*iptr == ivlo)
+-+        { (*iptr)->low = l; (*iptr)->up  = u; (*iptr)++; }
+-+        else
+-+        { if(((*iptr)-1)->up == l) /* extend interval */
+-+          { ((*iptr)-1)->up = u; }
+-+          else /* new interval */
+-+          { (*iptr)->low = l; (*iptr)->up  = u; (*iptr)++; }
+-+        }
+-+        return;
+-+      }
+-+      /* now we must split the interval and evaluate the sturm sequence
+-+         at the midpoint */
+-+      { long nm, dem, s0, s1, s2, s, cmid = 0, n;
+-+        if(nl == min)
+-+        { if(nr == max) { nm = 0; dem = 0; }
+-+          else { nm = (nr == 0) ? -1 : 2*nr; dem = 0; }
+-+        }
+-+        else
+-+        { if(nr == max) { nm = (nl == 0) ? 1 : 2*nl; dem = 0; }
+-+          else /* "normal" case */
+-+          { if(del == der) /* then both are zero */
+-+            { if(((nl+nr) & 1) == 0) { nm = (nl+nr)>>1; dem = 0; }
+-+              else { nm = nl+nr; dem = 1; }
+-+            }
+-+            else /* here one de* is greater */
+-+            { if(del > der) { nm = nl + (nr<<(del-der)); dem = del+1; }
+-+              else { nm = (nl<<(der-del)) + nr; dem = der+1; }
+-+            }
+-+          }
+-+        }
+-+        s0 = eval_sign(args, sturm[0], sturm_degs[0], nm, dem);
+-+        s1 = eval_sign(args, sturm[1], sturm_degs[1], nm, dem);
+-+        if(s0*s1 == -1) { cmid++; }
+-+        s = (s1 == 0) ? s0 : s1;
+-+        for(n = 2; n <= k; n++)
+-+        { s2 = eval_sign(args, sturm[n], sturm_degs[n], nm, dem);
+-+          if(s2 == -s) { cmid++; s = s2; }
+-+          else if(s2 != 0) { s = s2; }
+-+        }
+-+        /* now recurse */
+-+        iterate(nl, nm, del, dem, cleft, (s0==0) ? (cmid+1) : cmid,
+-+                sl, (s0==0) ? -s1 : s0, depth+1,
+-+                iptr, ivlo, args, k, sturm_degs, sturm);
+-+        iterate(nm, nr, dem, der, cmid, cright,
+-+                (s0==0) ? s1 : s0, sr, depth+1,
+-+		iptr, ivlo, args, k, sturm_degs, sturm);
+-+      }
+-+    } /* end iterate() */
+-+
+- long _ratpoints_compute_sturm(ratpoints_args *args)
+- { 
+-   mpz_t *cofs = args->cof;
+-   long degree = args->degree;
+--  long iter = args->sturm; 
+-   ratpoints_interval *ivlist = args->domain;
+-   long num_iv = args->num_inter;
+-   long n, m, k, new_num;
+-@@ -165,75 +233,12 @@ long _ratpoints_compute_sturm(ratpoints_args *args)
+-   /* recall: typedef struct {double low; double up;} ratpoints_interval; */
+-   { ratpoints_interval ivlocal[1 + (degree>>1)];
+-     ratpoints_interval *iptr = &ivlocal[0];
+--    long max = (long)(((unsigned long)(-1))>>1);
+--    long min = -max;
+-     long num_intervals;
+-     long slcf = mpz_cmp_si(cofs[degree], 0);
+- 
+--    /* recursive helper function */
+--    void iterate(long nl, long nr, long del, long der, long cleft, long cright,
+--                 long sl, long sr, long depth)
+--    { /* nl/2^del, nr/2^der : interval left/right endpoints,
+--         cleft, cright: sign change counts at endpoints,
+--         sl, sr: signs at endpoints,
+--         depth: iteration depth */
+--      if(cleft == cright && sl < 0) { return; }
+--         /* here we know the polynomial is negative on the interval */
+--      if((cleft == cright && sl > 0) || depth >= iter) 
+--      /* we have to add/extend an interval if we either know that
+--         the polynomial is positive on the interval (first condition)
+--         or the maximal iteration depth has been reached (second condition) */
+--      { double l = ((double)nl)/((double)(1<<del));
+--        double u = ((double)nr)/((double)(1<<der));
+--        if(iptr == &ivlocal[0])
+--        { iptr->low = l; iptr->up  = u; iptr++; }
+--        else
+--        { if((iptr-1)->up == l) /* extend interval */
+--          { (iptr-1)->up = u; }
+--          else /* new interval */
+--          { iptr->low = l; iptr->up  = u; iptr++; }
+--        }
+--        return; 
+--      }
+--      /* now we must split the interval and evaluate the sturm sequence
+--         at the midpoint */
+--      { long nm, dem, s0, s1, s2, s, cmid = 0, n;
+--        if(nl == min)
+--        { if(nr == max) { nm = 0; dem = 0; }
+--          else { nm = (nr == 0) ? -1 : 2*nr; dem = 0; }
+--        }
+--        else
+--        { if(nr == max) { nm = (nl == 0) ? 1 : 2*nl; dem = 0; } 
+--          else /* "normal" case */
+--          { if(del == der) /* then both are zero */
+--            { if(((nl+nr) & 1) == 0) { nm = (nl+nr)>>1; dem = 0; }
+--              else { nm = nl+nr; dem = 1; } 
+--            }
+--            else /* here one de* is greater */
+--            { if(del > der) { nm = nl + (nr<<(del-der)); dem = del+1; }
+--              else { nm = (nl<<(der-del)) + nr; dem = der+1; }
+--            }
+--          }
+--        }
+--        s0 = eval_sign(args, sturm[0], sturm_degs[0], nm, dem);
+--        s1 = eval_sign(args, sturm[1], sturm_degs[1], nm, dem);
+--        if(s0*s1 == -1) { cmid++; }
+--        s = (s1 == 0) ? s0 : s1;
+--        for(n = 2; n <= k; n++)
+--        { s2 = eval_sign(args, sturm[n], sturm_degs[n], nm, dem);
+--          if(s2 == -s) { cmid++; s = s2; }
+--          else if(s2 != 0) { s = s2; }
+--        }
+--        /* now recurse */
+--        iterate(nl, nm, del, dem, cleft, (s0==0) ? (cmid+1) : cmid, 
+--                sl, (s0==0) ? -s1 : s0, depth+1);
+--        iterate(nm, nr, dem, der, cmid, cright, 
+--                (s0==0) ? s1 : s0, sr, depth+1);
+--      }
+--    } /* end iterate() */
+--
+-     iterate(min, max, 0, 0, count2, count1, 
+--            (degree & 1) ? -slcf : slcf, slcf, 0);
+-+            (degree & 1) ? -slcf : slcf, slcf, 0,
+-+	    &iptr, &ivlocal[0], args, k, sturm_degs, sturm);
+-     num_intervals = iptr - &ivlocal[0];
+-     /* intersect with given intervals */
+-     { ratpoints_interval local_copy[num_iv];
+diff --git a/build/pkgs/ratpoints/spkg-install.in b/build/pkgs/ratpoints/spkg-install.in
+deleted file mode 100644
+index b6856c4d4a..0000000000
+--- a/build/pkgs/ratpoints/spkg-install.in
++++ /dev/null
+@@ -1,46 +0,0 @@
+-PRIME_SIZE=7
+-
+-CCFLAGS_NO_SSE="-I$SAGE_LOCAL/include -Wall -O2 -fPIC -DRATPOINTS_MAX_BITS_IN_PRIME=$PRIME_SIZE"
+-CCFLAGS2="-L$SAGE_LOCAL/lib -lgmp -lm $LDFLAGS"
+-CCFLAGS3="-L. -lratpoints"
+-
+-if [[ "$UNAME" = "Darwin" ]]; then
+-    CCFLAGS1="$CCFLAGS_NO_SSE"
+-    echo "Building without SSE2 instructions (MacOS X)."
+-else
+-    CCFLAGS1="$CCFLAGS_NO_SSE -DUSE_SSE"
+-    echo "Attempting to build ratpoints making use of SSE2 instructions."
+-fi
+-
+-# Copy CFLAGS set externally to CCFLAGS.
+-CCFLAGS="$CFLAGS"
+-
+-export CCFLAGS1
+-export CCFLAGS2
+-export CCFLAGS3
+-export CCFLAGS
+-
+-cd src/
+-
+-#############################
+-# Build (just) the library: #
+-#############################
+-
+-# PLEASE, don't break this again by deleting "libratpoints.a".  See trac 8267.
+-if ! $MAKE libratpoints.a; then
+-    [ "$UNAME" = "Darwin" ] && sdh_die "Error building ratpoints."
+-    echo "Build failed. Trying without SSE2 instructions."
+-    CCFLAGS1="$CCFLAGS_NO_SSE"
+-    sdh_make libratpoints.a
+-fi
+-
+-##############################################
+-# Install (just) the library and its header: #
+-##############################################
+-
+-# The following requires that the Makefile got patched;
+-# otherwise one could pass 'INSTALL_DIR=...' on the 'make'
+-# command line:
+-export INSTALL_DIR="$SAGE_DESTDIR_LOCAL"
+-mkdir -p "$INSTALL_DIR"/{lib,include}
+-sdh_make install-lib
+diff --git a/build/pkgs/ratpoints/type b/build/pkgs/ratpoints/type
+deleted file mode 100644
+index a6a7b9cd72..0000000000
+--- a/build/pkgs/ratpoints/type
++++ /dev/null
+@@ -1 +0,0 @@
+-standard
+diff --git a/build/pkgs/sagelib/dependencies b/build/pkgs/sagelib/dependencies
+index 9c7797b1f4..6a7d4b8132 100644
+--- a/build/pkgs/sagelib/dependencies
++++ b/build/pkgs/sagelib/dependencies
+@@ -1,4 +1,4 @@
+-FORCE $(SCRIPTS) arb boost_cropped $(BLAS) brial cliquer cypari cysignals cython ecl eclib ecm flint libgd gap giac givaro glpk gmpy2 gsl iml jinja2 jupyter_core lcalc lrcalc libbraiding libhomfly libpng linbox m4ri m4rie memory_allocator mpc mpfi mpfr $(MP_LIBRARY) ntl numpy pari pip pkgconfig planarity ppl pplpy primesieve primecount primecountpy pycygwin $(PYTHON) ratpoints requests rw sage_conf singular symmetrica zn_poly $(PCFILES) | $(PYTHON_TOOLCHAIN) sage_setup
++FORCE $(SCRIPTS) arb boost_cropped $(BLAS) brial cliquer cypari cysignals cython ecl eclib ecm flint libgd gap giac givaro glpk gmpy2 gsl iml jinja2 jupyter_core lcalc lrcalc libbraiding libhomfly libpng linbox m4ri m4rie memory_allocator mpc mpfi mpfr $(MP_LIBRARY) ntl numpy pari pip pkgconfig planarity ppl pplpy primesieve primecount primecountpy pycygwin $(PYTHON) requests rw sage_conf singular symmetrica zn_poly $(PCFILES) | $(PYTHON_TOOLCHAIN) sage_setup
+ 
+ ----------
+ All lines of this file are ignored except the first.
+diff --git a/src/sage/libs/ratpoints.pxd b/src/sage/libs/ratpoints.pxd
+deleted file mode 100644
+index 67e309b109..0000000000
+--- a/src/sage/libs/ratpoints.pxd
++++ /dev/null
+@@ -1,74 +0,0 @@
+-from sage.rings.integer cimport Integer
+-from sage.libs.gmp.mpz cimport *
+-
+-cdef extern from "ratpoints.h":
+-    long RATPOINTS_MAX_DEGREE
+-    long RATPOINTS_ARRAY_SIZE
+-    long RATPOINTS_DEFAULT_SP1
+-    long RATPOINTS_DEFAULT_SP2
+-    long RATPOINTS_DEFAULT_NUM_PRIMES
+-    long RATPOINTS_DEFAULT_MAX_FORBIDDEN
+-    long RATPOINTS_DEFAULT_STURM
+-    long RATPOINTS_NON_SQUAREFREE
+-    long RATPOINTS_BAD_ARGS
+-
+-    # for args flags:
+-    long RATPOINTS_NO_CHECK # when set, do not check whether the surviving
+-                            # x-coordinates give rise to rational points
+-    long RATPOINTS_NO_Y # when set, only list x coordinates instead of actual points
+-    long RATPOINTS_NO_REVERSE # when set, do not modify the mpz_t array
+-    long RATPOINTS_NO_JACOBI # when set, prevent use of Jacobi symbol test
+-    long RATPOINTS_VERBOSE # when set, print some output on what ratpoints is doing
+-    # define RATPOINTS_FLAGS_INPUT_MASK \
+-    # (RATPOINTS_NO_CHECK | RATPOINTS_NO_Y | RATPOINTS_NO_REVERSE | \
+-    #  RATPOINTS_NO_JACOBI | RATPOINTS_VERBOSE)
+-
+-
+-    ctypedef struct ratpoints_interval:
+-        double low
+-        double up
+-    ctypedef struct ratpoints_args:
+-        mpz_t *cof
+-        long degree
+-        long height
+-        ratpoints_interval *domain
+-        long num_inter
+-        long b_low
+-        long b_high
+-        long sp1
+-        long sp2
+-        long array_size
+-        long sturm
+-        long num_primes
+-        long max_forbidden
+-        unsigned int flags
+-        # from here: private data
+-        # mpz_t *work
+-        # void *se_buffer
+-        # void *se_next
+-        # void *ba_buffer
+-        # void *ba_next
+-        # int *int_buffer
+-        # int *int_next
+-        # void *sieve_list
+-    long find_points(ratpoints_args*, int proc(long, long, mpz_t, void*, int*), void*)
+-    void find_points_init(ratpoints_args*)
+-    long find_points_work(ratpoints_args*, int proc(long, long, mpz_t, void*, int*), void*)
+-    void find_points_clear(ratpoints_args*)
+-
+-ctypedef struct point_list:
+-    long *xes
+-    mpz_t *ys
+-    long *zs
+-    long array_size
+-    long num_points
+-    long max_num_points
+-
+-ctypedef struct info_struct_exists_only:
+-    int verbose
+-
+-cdef int ratpoints_mpz_exists_only(mpz_t *, long, int, bint) except -1
+-
+-
+-
+-
+diff --git a/src/sage/libs/ratpoints.pyx b/src/sage/libs/ratpoints.pyx
+deleted file mode 100644
+index 257dfe3eeb..0000000000
+--- a/src/sage/libs/ratpoints.pyx
++++ /dev/null
+@@ -1,283 +0,0 @@
+-# distutils: libraries = ratpoints
+-r"""
+-Hyperelliptic Curve Point Finding, via ratpoints (deprecated)
+-
+-This module is deprecated, use PARI instead::
+-
+-    sage: pari(EllipticCurve("389a1")).ellratpoints(4)
+-    [[-2, 0], [-2, -1], [-1, 1], [-1, -2], [0, 0], [0, -1], [1, 0], [1, -1], [3, 5], [3, -6], [4, 8], [4, -9], [-3/4, 7/8], [-3/4, -15/8]]
+-    sage: pari("[x^3 + x^2 - 2*x, 1]").hyperellratpoints(4)
+-    [[-2, 0], [-2, -1], [-1, 1], [-1, -2], [0, 0], [0, -1], [1, 0], [1, -1], [3, 5], [3, -6], [4, 8], [4, -9], [-3/4, 7/8], [-3/4, -15/8]]
+-"""
+-
+-from cysignals.memory cimport sig_malloc, sig_realloc, sig_free
+-from cysignals.signals cimport sig_on, sig_off
+-
+-from sage.misc.superseded import deprecation_cython as deprecation
+-deprecation(24531, "the module sage.libs.ratpoints is deprecated; use pari.ellratpoints or pari.hyperellratpoints instead")
+-
+-
+-cdef int process(long x, long z, mpz_t y, void *info0, int *quit):
+-    # ratpoints calls this function when it finds a point [x : y : z]
+-    # info0 is the pointer passed to ratpoints originally
+-    # if quit[0] is set to a nonzero value, ratpoints will abort immediately
+-    cdef point_list *plist = <point_list *> info0
+-    cdef long i
+-    if plist.array_size == plist.num_points:
+-        i = plist.array_size
+-        plist.array_size *= 2
+-        plist.xes = <long *> sig_realloc(plist.xes, plist.array_size * sizeof(long))
+-        plist.ys = <mpz_t *> sig_realloc(plist.ys, plist.array_size * sizeof(mpz_t))
+-        plist.zs = <long *> sig_realloc(plist.zs, plist.array_size * sizeof(long))
+-        while i < plist.array_size:
+-            mpz_init(plist.ys[i])
+-            i += 1
+-    plist.xes[plist.num_points] = x
+-    mpz_set(plist.ys[plist.num_points], y)
+-    plist.zs[plist.num_points] = z
+-    plist.num_points += 1
+-    if plist.max_num_points > 0:
+-        if plist.max_num_points == plist.num_points:
+-            quit[0] = -1
+-    return 1 # weight for counting the points
+-
+-def ratpoints(list coeffs, long H, verbose=False, long max=0,
+-              min_x_denom=None, max_x_denom=None, intervals=[]):
+-    """
+-    Access the ratpoints library to find points on the hyperelliptic curve:
+-
+-    `y^2 = a_n x^n + \cdots + a_1 x + a_0.`
+-
+-    INPUT:
+-
+-    - ``coeffs`` -- list of integer coefficients `a_0` , `a_1`, ..., `a_n`
+-
+-    - ``H`` -- the bound for the denominator and the absolute value of the
+-      numerator of the `x`-coordinate
+-
+-    - ``verbose`` -- if ``True``, ratpoints will print comments about
+-      its progress
+-
+-    - ``max`` -- maximum number of points to find (if 0, find all of them)
+-
+-    OUTPUT:
+-
+-    The points output by this program are points in (1, ceil(n/2), 1)-weighted
+-    projective space. If n is even, then the associated homogeneous equation is
+-    `y^2 = a_n x^n + \cdots + a_1 x z^{n-1} + a_0 z^n` while if n is odd, it is
+-    `y^2 = a_n x^n z + \cdots + a_1 x z^n + a_0 z^{n+1}`.
+-
+-    EXAMPLES::
+-
+-        sage: from sage.libs.ratpoints import ratpoints
+-        doctest:...: DeprecationWarning: the module sage.libs.ratpoints is deprecated; use pari.ellratpoints or pari.hyperellratpoints instead
+-        See http://trac.sagemath.org/24531 for details.
+-        sage: for x,y,z in ratpoints([1..6], 200):
+-        ....:     print(-1*y^2 + 1*z^6 + 2*x*z^5 + 3*x^2*z^4 + 4*x^3*z^3 + 5*x^4*z^2 + 6*x^5*z)
+-        0
+-        0
+-        0
+-        0
+-        0
+-        0
+-        0
+-        sage: for x,y,z in ratpoints([1..5], 200):
+-        ....:    print(-1*y^2 + 1*z^4 + 2*x*z^3 + 3*x^2*z^2 + 4*x^3*z + 5*x^4)
+-        0
+-        0
+-        0
+-        0
+-        0
+-        0
+-        0
+-        0
+-
+-        sage: for x,y,z in ratpoints([1..200], 1000):
+-        ....:    print("{} {} {}".format(x,y,z))
+-        1 0 0
+-        0 1 1
+-        0 -1 1
+-        201 25353012004564588029934064107520000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 200
+-        201 -25353012004564588029934064107520000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 200
+-
+-    The denominator of `x` can be restricted, for example to find
+-    integral points::
+-
+-        sage: from sage.libs.ratpoints import ratpoints
+-        sage: coeffs = [400, -112, 0, 1]
+-        sage: ratpoints(coeffs, 10^6, max_x_denom=1, intervals=[[-10,0],[1000,2000]])
+-        [(1, 0, 0), (-8, 28, 1), (-8, -28, 1), (-7, 29, 1), (-7, -29, 1),
+-         (-4, 28, 1), (-4, -28, 1), (0, 20, 1), (0, -20, 1), (1368, 50596, 1),
+-         (1368, -50596, 1), (1624, 65444, 1), (1624, -65444, 1)]
+-
+-        sage: ratpoints(coeffs, 1000, min_x_denom=100, max_x_denom=200)
+-        [(1, 0, 0),
+-        (-656, 426316, 121),
+-        (-656, -426316, 121),
+-        (452, 85052, 121),
+-        (452, -85052, 121),
+-        (988, 80036, 121),
+-        (988, -80036, 121),
+-        (-556, 773188, 169),
+-        (-556, -773188, 169),
+-        (264, 432068, 169),
+-        (264, -432068, 169)]
+-
+-    Finding the integral points on the compact component of an elliptic curve::
+-
+-        sage: E = EllipticCurve([0,1,0,-35220,-1346400])
+-        sage: e1, e2, e3 = E.division_polynomial(2).roots(multiplicities=False)
+-        sage: coeffs = [E.a6(),E.a4(),E.a2(),1]
+-        sage: ratpoints(coeffs, 1000, max_x_denom=1, intervals=[[e3,e2]])
+-        [(1, 0, 0),
+-        (-165, 0, 1),
+-        (-162, 366, 1),
+-        (-162, -366, 1),
+-        (-120, 1080, 1),
+-        (-120, -1080, 1),
+-        (-90, 1050, 1),
+-        (-90, -1050, 1),
+-        (-85, 1020, 1),
+-        (-85, -1020, 1),
+-        (-42, 246, 1),
+-        (-42, -246, 1),
+-        (-40, 0, 1)]
+-    """
+-    cdef ratpoints_args args
+-    cdef long i, total, verby
+-    cdef Integer sage_int, s_x, s_y, s_z
+-    cdef point_list *plist
+-
+-
+-    verby = ~0 if verbose else 0
+-
+-    # Set the coefficient array:
+-    coeffs = [Integer(a) for a in coeffs]
+-    args.degree = len(coeffs)-1
+-    args.cof = <mpz_t *> sig_malloc((args.degree+1) * sizeof(mpz_t))
+-
+-    # Create an array to hold the points found:
+-    plist = <point_list *> sig_malloc(sizeof(point_list))
+-    if max == 0:
+-        plist.array_size = 64
+-    else:
+-        plist.array_size = max
+-    plist.xes = <long *> sig_malloc(plist.array_size * sizeof(long))
+-    plist.ys = <mpz_t *> sig_malloc(plist.array_size * sizeof(mpz_t))
+-    for i from 0 <= i < plist.array_size:
+-        mpz_init(plist.ys[i])
+-    plist.zs = <long *> sig_malloc(plist.array_size * sizeof(long))
+-    plist.num_points = 0
+-    plist.max_num_points = max
+-
+-    # Set the height bound:
+-    args.height = H
+-
+-    # Set the intervals to be searched, including any specified:
+-    args.num_inter = len(intervals)
+-    args.domain = <ratpoints_interval *> sig_malloc((args.num_inter + args.degree) * sizeof(ratpoints_interval))
+-    for i,I in enumerate(intervals):
+-        args.domain[i].low = I[0]
+-        args.domain[i].up  = I[1]
+-
+-    # Set the minimum and maximum denominators:
+-    if not min_x_denom:  min_x_denom = 1
+-    if not max_x_denom:  max_x_denom = H
+-    args.b_low = min_x_denom
+-    args.b_high = max_x_denom
+-
+-    # Set the remaining arguments, whose non-default use is technical
+-    # (see ratpoints documentation)
+-    args.sp1 = RATPOINTS_DEFAULT_SP1
+-    args.sp2 = RATPOINTS_DEFAULT_SP2
+-    args.array_size = RATPOINTS_ARRAY_SIZE
+-    args.sturm = RATPOINTS_DEFAULT_STURM
+-    args.num_primes = RATPOINTS_DEFAULT_NUM_PRIMES
+-    args.max_forbidden = RATPOINTS_DEFAULT_MAX_FORBIDDEN
+-    args.flags = (RATPOINTS_VERBOSE & verby)
+-
+-    for i from 0 <= i <= args.degree:
+-        mpz_init(args.cof[i])
+-        sage_int = <Integer> coeffs[i]
+-        mpz_set(args.cof[i], sage_int.value)
+-
+-    sig_on()
+-    total = find_points(&args, process, <void *>plist)
+-    sig_off()
+-    if total == RATPOINTS_NON_SQUAREFREE:
+-        raise RuntimeError('Polynomial must be square-free')
+-    if total == RATPOINTS_BAD_ARGS:
+-        raise RuntimeError('Bad arguments to ratpoints')
+-
+-    for i from 0 <= i <= args.degree:
+-        mpz_clear(args.cof[i])
+-
+-    sig_free(args.cof)
+-    sig_free(args.domain)
+-
+-    cdef list L = []
+-    for i from 0 <= i < plist.num_points:
+-        s_x = Integer(0)
+-        s_y = Integer(0)
+-        s_z = Integer(0)
+-        mpz_set_si(s_x.value, plist.xes[i])
+-        mpz_set(s_y.value, plist.ys[i])
+-        mpz_set_si(s_z.value, plist.zs[i])
+-        L.append((s_x,s_y,s_z))
+-
+-    for i from 0 <= i < plist.array_size:
+-        mpz_clear(plist.ys[i])
+-    sig_free(plist.xes)
+-    sig_free(plist.ys)
+-    sig_free(plist.zs)
+-    sig_free(plist)
+-
+-    return L
+-
+-cdef int process_exists_only(long x, long z, mpz_t y, void *info0, int *quit):
+-    cdef info_struct_exists_only *info_s = <info_struct_exists_only *>info0
+-    cdef Integer YY
+-    if info_s.verbose:
+-        YY = Integer(0); mpz_set(YY.value, y)
+-        print('Found point [ %d : %d : %d ], quitting' % (x, YY, z))
+-    quit[0] = -1
+-    return 1
+-
+-cdef int ratpoints_mpz_exists_only(mpz_t *coeffs, long H, int degree, bint verbose) except -1:
+-    """
+-    Direct call to ratpoints to search for existence only.
+-
+-    WARNING - The coefficient array will be modified by ratpoints.
+-    """
+-    cdef ratpoints_args args
+-    cdef info_struct_exists_only info_s
+-    cdef long total, verby = ~0 if verbose else 0
+-    info_s.verbose = verbose
+-    assert degree <= RATPOINTS_MAX_DEGREE
+-    args.degree = degree
+-    args.cof = coeffs
+-    args.domain = <ratpoints_interval *> sig_malloc(2*args.degree * sizeof(ratpoints_interval))
+-    args.height = H
+-    args.num_inter = 0
+-    args.b_low = 1
+-    args.b_high = H
+-    args.sp1 = RATPOINTS_DEFAULT_SP1
+-    args.sp2 = RATPOINTS_DEFAULT_SP2
+-    args.array_size = RATPOINTS_ARRAY_SIZE
+-    args.sturm = RATPOINTS_DEFAULT_STURM
+-    args.num_primes = RATPOINTS_DEFAULT_NUM_PRIMES
+-    args.max_forbidden = RATPOINTS_DEFAULT_MAX_FORBIDDEN
+-    args.flags = (RATPOINTS_VERBOSE & verby)
+-    sig_on()
+-    total = find_points(&args, process_exists_only, <void *>(&info_s))
+-    sig_off()
+-    sig_free(args.domain)
+-    if total == RATPOINTS_NON_SQUAREFREE:
+-        raise RuntimeError('Polynomial must be square-free')
+-    if total == RATPOINTS_BAD_ARGS:
+-        raise RuntimeError('Bad arguments to ratpoints')
+-    return 1 if (total > 0) else 0
+-
+-
+-
+-
+diff --git a/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx b/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx
+index 1cc70925fa..c2f994a650 100644
+--- a/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx
++++ b/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx
+@@ -1,5 +1,3 @@
+-# distutils: libraries = ratpoints
+-
+ r"""
+ Descent on elliptic curves over `\QQ` with a 2-isogeny
+ """
+diff --git a/src/sage_setup/library_order.py b/src/sage_setup/library_order.py
+index 8830d44a95..0b450b3723 100644
+--- a/src/sage_setup/library_order.py
++++ b/src/sage_setup/library_order.py
+@@ -25,7 +25,7 @@ library_order_list = aliases.get("SINGULAR_LIBRARIES", []) + [
+     "giac", "intl", "curl",
+     "ec", "ecm"
+ ] + aliases.get("LINBOX_LIBRARIES", []) + aliases.get("FFLASFFPACK_LIBRARIES", []) + aliases.get("GSL_LIBRARIES", []) + [
+-    "pari", "flint", "ratpoints", "ecl", "glpk", "ppl",
++    "pari", "flint", "ecl", "glpk", "ppl",
+ ] + arb_dylib_names + [
+     "mpfi", "mpfr", "mpc", "ntl", "gmp", "gmpxx",
+     "brial",
+-- 
+2.34.1
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_31563.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_31563.patch
new file mode 100644
index 000000000000..563bb8526788
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_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/zzz-skip_doctest_no_threejs.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_no_threejs.patch
new file mode 100644
index 000000000000..9b6d0a775b10
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_no_threejs.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage/repl/ipython_kernel/install.py b/src/sage/repl/ipython_kernel/install.py
+index 2143c221ed..f781037c70 100644
+--- a/src/sage/repl/ipython_kernel/install.py
++++ b/src/sage/repl/ipython_kernel/install.py
+@@ -124,7 +124,7 @@ class SageKernelSpec(object):
+             sage: spec = SageKernelSpec(prefix=tmp_dir())
+             sage: spec.use_local_threejs()
+             sage: threejs = os.path.join(spec.nbextensions_dir, 'threejs-sage')
+-            sage: os.path.isdir(threejs)
++            sage: os.path.isdir(threejs)    # optional - threejs
+             True
+         """
+         src = THREEJS_DIR
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch
new file mode 100644
index 000000000000..15aed02f9aaa
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch
@@ -0,0 +1,12 @@
+--- a/src/sage_setup/find.py
++++ b/src/sage_setup/find.py
+@@ -301,7 +301,7 @@ def find_extra_files(src_dir, modules, cythonized_dir, special_filenames=[]):
+         sage: extras["sage/libs/mpfr"]
+         [...sage/libs/mpfr/types.pxd...]
+         sage: extras["sage/ext/interpreters"]
+-        ['.../src/sage/ext/interpreters/wrapper_cdf.pxd', ...wrapper_cdf.h...]
++        ['.../src/sage/ext/interpreters/wrapper_cdf.pxd', ...]
+     """
+     from Cython.Utils import is_package_dir
+ 
+--
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch
new file mode 100644
index 000000000000..04fa2acbf3ec
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch
@@ -0,0 +1,11 @@
+--- a/src/sage/tests/cmdline.py
++++ b/src/sage/tests/cmdline.py
+@@ -488,7 +488,7 @@ def test_executable(args, input="", timeout=100.0, pydebug_ignore_warnings=False
+         0
+ 
+         sage: (out, err, ret) = test_executable(["sage", "--cython"])
+-        sage: print(err)
++        sage: print(err)  # not tested - broken when shebang is rewritten
+         Cython (http://cython.org) is a compiler for code written in the
+         Cython language.  Cython is based on Pyrex by Greg Ewing.
+         ...
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
new file mode 100644
index 000000000000..f0003a6c8246
--- /dev/null
+++ b/srcpkgs/sagemath/template
@@ -0,0 +1,251 @@
+# Template file for 'sagemath'
+pkgname=sagemath
+version=9.5.rc3
+revision=1
+wrksrc=sage-$version
+build_style=configure
+configure_args="--enable-build-as-root --with-system-python3
+ --enable-system-site-packages"
+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
+ 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-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
+homepage="http://sagemath.org/"
+distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
+checksum=dabc1a98e883c6069b59a755852bb0030395404a95d19d497c56f557c02619c2
+python_version=3
+patch_args="-F0 -Np1"
+
+build_options="debug"
+desc_option_debug="Build with debug symbols"
+
+# path where sage will be installed
+_SAGE_ROOT=/usr/lib/sage-${version}
+
+# Skip these sage packages: they are not needed
+_spkg_skip="appnope fonttools importlib_resources pycygwin
+ setuptools_scm_git_archive setuptools_wheel sphinxcontrib_websupport
+ pplpy_doc vcversioner
+ jmol mathjax sagenb_export thebe sagetex jupyter_jsmol rpy2 threejs"
+
+# Force use these sage packages from system
+_spkg_system="cppy cython cysignals cypari pplpy fpylll memory_allocator
+ primecountpy"
+
+# Databases to be used from system
+_spkg_db="combinatorial_designs conway_polynomials elliptic_curves graphs
+ polytopes_db"
+
+for spkg in $_spkg_skip; do
+	configure_args+=" sage_spkg_install_$spkg=no"
+	configure_args+=" sage_require_$spkg=no"
+done
+
+for spkg in $_spkg_system; do
+	configure_args+=" sage_spkg_install_$spkg=no"
+	configure_args+=" sage_require_$spkg=yes"
+done
+
+for spkg in $_spkg_db; do
+	configure_args+=" sage_spkg_install_$spkg=no"
+	configure_args+=" sage_require_$spkg=yes"
+	depends+=" sage-data-$spkg"
+	checkdepends+=" sage-data-$spkg"
+done
+
+# 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
+
+# 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
+	mv -T $wrksrc $_SAGE_ROOT
+	ln -srfT $_SAGE_ROOT $wrksrc
+
+	mkdir -p $wrksrc/upstream
+	for u in ${_upstream}; do
+		cp "$XBPS_SRCDISTDIR/${pkgname}-${version}/${u##*[/>]}" $wrksrc/upstream
+	done
+}
+
+do_clean() {
+	rm -rf $wrksrc $_SAGE_ROOT
+}
+
+post_patch() {
+	./bootstrap
+}
+
+pre_configure() {
+	if [ "$build_option_debug" ]; then
+		export SAGE_DEBUG=yes
+	fi
+
+	export MAKE="make -j ${XBPS_MAKEJOBS}"
+}
+
+post_configure() {
+	# we set some variables, right after configure has created sage_conf.py
+	cat <<-EOF >> pkgs/sage-conf/sage_conf.py
+	GAP_ROOT_DIR = "/usr/share/gap"
+	GAP_SO = "$(objdump -p /usr/lib/libgap.so | awk '/SONAME/{print $2}')"
+	CONWAY_POLYNOMIALS_DATA_DIR = "/usr/share/sagemath/conway_polynomials"
+	GRAPHS_DATA_DIR = "/usr/share/sagemath/graphs"
+	ELLCURVE_DATA_DIR = "/usr/share/sagemath/ellcurves"
+	POLYTOPE_DATA_DIR = "/usr/share/sagemath/reflexive_polytopes"
+	COMBINATORIAL_DESIGN_DATA_DIR = "/usr/share/sagemath/combinatorial_designs"
+	CREMONA_MINI_DATA_DIR = "/usr/share/sagemath/cremona"
+	CREMONA_LARGE_DATA_DIR = "/usr/share/sagemath/cremona"
+	EOF
+}
+
+do_install() {
+	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 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
+	# 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}
+	ln -sfT sage-${version} ${DESTDIR}/usr/bin/sage
+}
+
+do_check() {
+	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
+		_test_files=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	fi
+	if [ -z "$_test_files" ]; then
+		_test_files=--all
+	fi
+	cp ${FILESDIR}/timings2.json .
+	_test_args="--stats_path=timings2.json"
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args+=" --long --warn-long 60.0"
+	else
+		_test_args+=" --warn-long 30.0"
+	fi
+	if [ "$XBPS_BUILD_ENVIRONMENT" = "void-packages-ci" ]; then
+		# for CI use a predictable random seed
+		_test_args+=" --random-seed=0"
+	fi
+	# since make check will build the docs, run test like this instead
+	./sage -tp ${XBPS_MAKEJOBS} ${_test_args} ${_test_files}
+}
+
+### copied from sage-deps, to be kept 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"
+
+# standard dependencies
+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 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
+ 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
+ gengetopt texinfo
+ brial-devel cliquer-devel gfan libbraiding-devel libhomfly-devel
+ lrcalc-devel nauty-devel palp tachyon
+ maxima-ecl primesieve-devel primecount-devel gap-devel
+"
+
+# optional dependencies
+makedepends+="
+ ffmpeg ImageMagick
+"
+
+# TODO: optional
+# 4ti2 coxeter3 libsemigroups lrslib pdf2svg perl_mongodb polymake
+
+# python packages for trac-29665
+_sage_python3_modules="
+ python3-Babel python3-Jinja2 python3-MarkupSafe python3-Pillow
+ python3-Pygments python3-Sphinx python3-alabaster python3-argcomplete
+ python3-argon2 python3-attrs python3-backcall python3-beniget
+ python3-bleach python3-certifi python3-cffi python3-charset-normalizer
+ python3-cycler python3-dateutil python3-decorator python3-defusedxml
+ python3-docutils python3-entrypoints python3-flit_core python3-gast
+ python3-gmpy2 python3-html5lib python3-idna python3-imagesize
+ python3-importlib_metadata python3-ipython python3-ipython_genutils
+ python3-ipython_ipykernel python3-jedi python3-jsonschema
+ python3-jupyter_client python3-jupyter_core python3-jupyter_ipywidgets
+ python3-jupyter_nbconvert python3-jupyter_nbformat
+ python3-jupyter_notebook python3-jupyterlab_pygments python3-kiwisolver
+ python3-matplotlib python3-matplotlib-inline python3-mistune
+ python3-mpmath python3-nbclient python3-nest_asyncio python3-networkx
+ python3-numpy python3-packaging python3-pandocfilters python3-parsing
+ python3-parso python3-pexpect python3-pickleshare python3-pip
+ python3-pkgconfig python3-pluggy python3-ply python3-prometheus_client
+ python3-prompt_toolkit python3-ptyprocess python3-py python3-pybind11
+ python3-pycparser python3-pyrsistent python3-pytz python3-pyzmq
+ python3-requests python3-scipy python3-send2trash python3-setuptools
+ python3-setuptools_scm python3-simplegeneric python3-six
+ python3-snowballstemmer python3-sphinxcontrib-applehelp
+ python3-sphinxcontrib-devhelp python3-sphinxcontrib-htmlhelp
+ python3-sphinxcontrib-jsmath python3-sphinxcontrib-qthelp
+ python3-sphinxcontrib-serializinghtml python3-sympy python3-terminado
+ python3-testpath python3-texttable python3-toml python3-tomli
+ python3-tornado python3-traitlets python3-typing_extensions
+ python3-tzlocal python3-urllib3 python3-wcwidth python3-webencodings
+ python3-wheel python3-zipp pythran
+
+ python3-cvxopt python3-cppy python3-Cython python3-cysignals python3-cypari2
+ python3-pplpy python3-fpylll python3-primecountpy python3-memory_allocator
+"
+
+# python packages are build and runtime dependencies
+makedepends+=" $_sage_python3_modules"
+depends+=" $_sage_python3_modules"
diff --git a/srcpkgs/sagemath/update b/srcpkgs/sagemath/update
new file mode 100644
index 000000000000..c33aba4e6df2
--- /dev/null
+++ b/srcpkgs/sagemath/update
@@ -0,0 +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 7f83056c97d34c081014babf32a2c5b764e44547 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Thu, 13 Jan 2022 15:47:33 -0300
Subject: [PATCH 2/2] New package: sagemath-test

---
 srcpkgs/sagemath-test/files/timings2.json |  1 +
 srcpkgs/sagemath-test/template            | 35 +++++++++++++++++++++++
 2 files changed, 36 insertions(+)
 create mode 120000 srcpkgs/sagemath-test/files/timings2.json
 create mode 100644 srcpkgs/sagemath-test/template

diff --git a/srcpkgs/sagemath-test/files/timings2.json b/srcpkgs/sagemath-test/files/timings2.json
new file mode 120000
index 000000000000..25d5309fc818
--- /dev/null
+++ b/srcpkgs/sagemath-test/files/timings2.json
@@ -0,0 +1 @@
+../../sagemath/files/timings2.json
\ No newline at end of file
diff --git a/srcpkgs/sagemath-test/template b/srcpkgs/sagemath-test/template
new file mode 100644
index 000000000000..1e6c76274a4d
--- /dev/null
+++ b/srcpkgs/sagemath-test/template
@@ -0,0 +1,35 @@
+# Template file for 'sagemath-test'
+pkgname=sagemath-test
+version=1
+revision=1
+build_style=meta
+checkdepends="sagemath"
+short_desc="Dummy package to test sagemath"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-2.0-or-later"
+homepage="none"
+
+# TODO: install base-voidstrap, uninstall base-chroot, and remove orphans
+# so we can check sagemath depends are enough to run sage on void
+
+do_check() {
+	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
+		_test_files=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	fi
+	if [ -z "$_test_files" ]; then
+		_test_files=--all
+	fi
+	cp ${FILESDIR}/timings2.json .
+	_test_args="--stats_path=timings2.json"
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args+=" --long --warn-long 60.0"
+	else
+		_test_args+=" --warn-long 30.0"
+	fi
+	if [ "$XBPS_BUILD_ENVIRONMENT" = "void-packages-ci" ]; then
+		# for CI use a predictable random seed
+		_test_args+=" --random-seed=0"
+	fi
+	# since make check will build the docs, run test like this instead
+	sage -tp ${XBPS_MAKEJOBS} ${_test_args} ${_test_files}
+}

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.rc2
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (227 preceding siblings ...)
  2022-01-19 16:51 ` [PR PATCH] [Updated] " tornaria
@ 2022-01-19 17:08 ` tornaria
  2022-01-19 17:22 ` dkwo
                   ` (19 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-19 17:08 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1016679758

Comment:
Rebased to master and squashed.

 - sphinx update is NOT needed now
 - all dependenciees are already available on void repo
 - this version has no vendored packages, only the sagelib + binary scripts is shipped in the xbps, which is 230M.
 - all doctests pass for me locally (including musl 1.2)

I kept the full commit history at https://github.com/tornaria/void-packages/tree/sagemath-v1.

I've only tested the CLI. I'm sure the notebook/jupyter interface will need fixing. 

At this point it's probably convenient to switch the installation method so that the sagelib to the main site-packages. Also the `src` directory is probably not needed other than for doctesting, and in principle everything is already copied into `site-packages` so (a) introspection (display source for a function from inside sage) should work (b) it should be possible to configure something so that it can be doctested from `site-packages`.


^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.rc2
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (228 preceding siblings ...)
  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
                   ` (18 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2022-01-19 17:22 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1016692897

Comment:
Excellent, I will build the new version soon.

> At this point it's probably convenient to switch the installation method

Do you mean we could now switch to `python3 setup.py build`?

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.rc3
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (229 preceding siblings ...)
  2022-01-19 17:22 ` dkwo
@ 2022-01-20 13:17 ` dkwo
  2022-01-20 15:41 ` tornaria
                   ` (17 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2022-01-20 13:17 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1017496252

Comment:
Everything seems to work fine.
Indeed, it only installs as SPKG
```
sage_conf-9.5.rc3:                           standard, will be installed as an SPKG
sage_docbuild-9.5.rc3:                       standard, will be installed as an SPKG
sage_setup-9.5.rc3:                          standard, will be installed as an SPKG
sagelib-9.5.rc3:                             standard, will be installed as an SPKG
sagemath_doc_html-none:                      standard, will be installed as an SPKG
```

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.rc3
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (230 preceding siblings ...)
  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
                   ` (16 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-20 15:41 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1017637400

Comment:
Note that `sage -notebook` is broken atm.

If you need it, it should be possible to run it as
```
$ PYTHONPATH=/usr/lib/sage-9.5.rc3/venv/lib/python3.10/site-packages/ sage -notebook
```
which instructs python to search for packages in the venv.

If you use the notebook and notice anything is missing, please report (I mostly only use the CLI). Some standard packages are just force-disabled (e.g. jmol, mathjax, threejs) and thist may or may not break the notebook or reduce its functionality. 

If setting PYTHONPATH doesn't work properly and you want to try the shebang hack, apply the following commit and rebuild:
```diff
commit 4430467ee2e19479a09961e902e89881efad358a
Author: Gonzalo Tornaría <tornaria@cmat.edu.uy>
Date:   Thu Nov 11 09:39:20 2021 -0300

    sagemath: don't rewrite python shebangs

diff --git a/common/hooks/pre-pkg/03-rewrite-python-shebang.sh b/common/hooks/pre-pkg/03-rewrite-python-shebang.sh
index 07162ad2c6..c0f2198e44 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
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index de9fe51777..f01fff3eea 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -72,6 +72,9 @@ 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
+
 # compile python code in sage venv
 pycompile_dirs="$_SAGE_ROOT/venv/"
 
```
I expect this will fix itself once we start installing sagemath in `/usr` as opposed to a private `venv` (the latter doesn't make sense anymore now that all python modules other than sagelib are from system).

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.rc3
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (231 preceding siblings ...)
  2022-01-20 15:41 ` tornaria
@ 2022-01-20 15:53 ` dkwo
  2022-01-20 16:04 ` dkwo
                   ` (15 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2022-01-20 15:53 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1017650296

Comment:
Thank you. What seems to work for me:
```
alias juplab='jupyter lab --app-dir /usr/lib/python3.10/site-packages/jupyterlab'
PYTHONPATH=/usr/lib/sage-9.5.rc3/venv/lib/python3.10/site-packages/ juplab
```
with no further changes to sage.
(The first is some issue with jupyter lab, the second with sage-venv as you say.)

Note that the `./configure --disable-doc` option can be used to suppress the installation of packages needed for docbuilding (see ticket #32759).

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.rc3
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (232 preceding siblings ...)
  2022-01-20 15:53 ` dkwo
@ 2022-01-20 16:04 ` dkwo
  2022-01-20 16:04 ` dkwo
                   ` (14 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2022-01-20 16:04 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1017650296

Comment:
Thank you. What seems to work for me:
```
ln -s /usr/lib/sage-9.5.rc3/local/var/lib/sage/venv-python3.10/share/jupyter /usr/local/share/
alias juplab='jupyter lab --app-dir /usr/lib/python3.10/site-packages/jupyterlab'
PYTHONPATH=/usr/lib/sage-9.5.rc3/venv/lib/python3.10/site-packages/ juplab
```
with no further changes to sage.
(The 2nd is some issue with jupyter lab, the 3rd with sage-venv as you say.)

Note that the `./configure --disable-doc` option can be used to suppress the installation of packages needed for docbuilding (see ticket #32759).

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.rc3
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (233 preceding siblings ...)
  2022-01-20 16:04 ` dkwo
@ 2022-01-20 16:04 ` dkwo
  2022-01-25 20:37 ` [PR PATCH] [Updated] " tornaria
                   ` (13 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2022-01-20 16:04 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1017650296

Comment:
Thank you. What seems to work for me:
```
ln -s /usr/lib/sage-9.5.rc3/local/var/lib/sage/venv-python3.10/share/jupyter /usr/local/share/
alias juplab='jupyter lab --app-dir /usr/lib/python3.10/site-packages/jupyterlab'
PYTHONPATH=/usr/lib/sage-9.5.rc3/venv/lib/python3.10/site-packages/ juplab
```
with no further changes to sage.
(The 2nd is some issue with jupyter lab, the 3rd with sage-venv as you say.)

Note that the `./configure --disable-doc` option can be used to suppress the installation of packages needed for docbuilding (see trac ticket 32759).

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: sagemath-9.5.rc3
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (234 preceding siblings ...)
  2022-01-20 16:04 ` dkwo
@ 2022-01-25 20:37 ` tornaria
  2022-01-25 21:27 ` [WIP] New package: sagemath-9.5.rc4 leahneukirchen
                   ` (12 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-25 20:37 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1057 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.rc3
This is WIP, so I can get feedback.

Supported architectures: x86_64, x86_64-musl, i686. We also try to make sure it works with musl-1.2.

The testsuite can be run normal (-Q) or long (-K). For CI it runs normal (~ 1/2 time) and it uses a fixed random seed 0 to avoid random failures. When running locally, the random seed is random so one may get occasional test failures that depend on a particular value of the random seed.

The package `sagemath-test` is a dummy package whose purpose is to run the testsuite with sage installed as a package and without the build directory. For this to make sense, the masterdir has to be clean (without traces of the sagemath build, this should be ok after running "pkg" or "pkg -Q").

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: 603752 bytes --]

From 7c669199fe76e1edc3105fdda528f2d5e4226e1e 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 1/9] New package: sage-9.5.rc3

Squashed version identical to sagemath-v1.

Full commit message history follows:

1. New package: sage-9.5.beta5

2. 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).

3. 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

4. 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.

5. sagemath: update to 9.5.beta7.

6. sagemath: add more dependencies

Also:
 - add patches so more doctests pass
 - add do_check() to skip building docs
 - use https for distfiles

7. 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...

8. 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)

9. sagemath: use system maxima

Also: add patch to use relative symlinks in gap where absolute symlinks
are now used -- otherwise xbps-create gets confused

10. 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

11. sagemath: change patch for cmdline args to disable dochtml testing

12. sagemath: update to 9.5.beta8.

13. 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

14. sagemath: use system python 3.10

15. 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

16. 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

17. sagemath: update to 9.5.beta9.

18. 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.

19. sagemath: fix license and tests

Now tests can be run with -Q (normal) or -K (--long)

20. sagemath: fix long time test

21. sagemath: use system python site-packages

 - patch from #29665 for that
 - patch on top of that to allow a few more python packages:
   gmpy2, sphinx, typing_extensions, ptyprocess
 - add all available python packages to makedepends and depends
 - add ffmpeg and ImageMagick to makedepends
 - in standard check (-Q) warn if individual test > 5.0s

22. sagemath: use small source tarball + upstream packages

23. sagemath: for CI use fixed random-seed=0

24. sagemath: upstream two patches

25. sagemath: reorder upstream sources and add two missing ones

26. sagemath: do not download anything patch

27. sagemath: update to 9.5.rc0.

28. sagemath: use system gap

29. sagemath: fixes for system gap

30. sagemath: skip doctest for rewritten shebang

31. sagemath: cleanup and one patch

32. sagemath: update to 9.5.rc1.

33. sagemath: patch not needed with singular 4.3.0

34. sagemath: install /usr/bin/sage

35. sagemath: rearrange upstream packages and indent

This doesn't change anything, it separates _upstream and
checksum in three blocks to make it easier to edit.

36. sagemath: use system cvxopt and importlib_resources

37. sagemath: disallow fuzz in patches

38. sagemath: disable packages that are not needed

 - appnope: only needed for macos
 - fonttools: only needed to build matplotlib
 - importlib_resources: only needed for old python
 - pycygwin: only needed for cygwin
 - setuptools_scm_git_archive: only needed to build matplotlib
 - setuptools_wheel: not needed
 - sphinxcontrib_websupport: only needed to build sphinx
 - cppy: force use from system python3-cppy

39. sagemath: use system Cython, cysignals, cypari2, pplpy, fpylll

40. sagemath: update to 9.5.rc2.

41. sagemath: add timing information for doctests

This makes doctesting faster on many threads

42. sagemath: round timings to power of 2 for stability

43. sagemath: all but two packages from system

44. sagemath: fix do_install()

45. sagemath: minor adjustments in do_check()

46. sagemath: use system primecountpy

47. sagemath: no upstream packages, cleanup

48. sagemath: patches for arb-2.22.0 and no-threejs

49. sagemath: remove patch for sphinx, unneeded

50. sagemath: update to 9.5.rc3.
---
 srcpkgs/sagemath/files/timings2.json          |  398 ++
 .../patches/00-Do_not_download_anything.patch |   11 +
 ...13e88ee188d516e4956832a23f985a73917a.patch |   31 +
 ...ea979d4bfa1a26ef3b08a29ca626b83b6ff5.patch |   23 +
 ...f491e5ce599ba185f5e93f02e0fcebd76c9e.patch |   57 +
 ...184f7498a2046065e669723e68efe2d65cee.patch | 5629 +++++++++++++++++
 ...aba734cb4ded0b04165fa142b5cf4c38fd23.patch |  247 +
 ...0e8168a9ffb4fbf07dd03c0846b4933a6dbe.patch |   64 +
 ...26e3db5ea06b962fac386fa3c7223f9a14fb.patch |   51 +
 ...93f4f32246ad9ded6d37f1f2f12a589a81f4.patch |   32 +
 ...9f3a1611fed0cc66fb838eb85739646dd34d.patch |  131 +
 ...e0923cb3d44d010e3e2f9bd7bc75d5c30234.patch |   43 +
 ...d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch |   35 +
 ...2ddd4e2dc92469c1590ebf0c40f8f69bf579.patch |  126 +
 .../zzz-dont_run_pytest--see_31924.patch      |   27 +
 .../zzz-fix_long_time_test--see_33091.patch   |   13 +
 .../patches/zzz-fix_no_SAGE_BIN.patch         |   12 +
 .../patches/zzz-fix_no_venv_packages.patch    |   13 +
 .../zzz-fixes_for_system_gap--see_29644.patch |   96 +
 .../zzz-more_site_packages_not_in_29665.patch |   42 +
 .../patches/zzz-remove_ratpoints.patch        |  887 +++
 ...z-skip_doctest_giac-1.7.0--see_31563.patch |   14 +
 .../patches/zzz-skip_doctest_no_threejs.patch |   13 +
 .../zzz-skip_doctest_sage_setup_find.patch    |   12 +
 .../patches/zzz-skip_doctest_shebang.patch    |   11 +
 srcpkgs/sagemath/template                     |  251 +
 srcpkgs/sagemath/update                       |    4 +
 27 files changed, 8273 insertions(+)
 create mode 100644 srcpkgs/sagemath/files/timings2.json
 create mode 100644 srcpkgs/sagemath/patches/00-Do_not_download_anything.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-29631-001-system_linbox-794713e88ee188d516e4956832a23f985a73917a.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-29631-002-system_linbox-7e16ea979d4bfa1a26ef3b08a29ca626b83b6ff5.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-32867-system_maxima-ed39aba734cb4ded0b04165fa142b5cf4c38fd23.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-33047-musl_fix_find_library-dc1a0e8168a9ffb4fbf07dd03c0846b4933a6dbe.patch
 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-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-33189-fix_doctests_for_arb_2.22-53532ddd4e2dc92469c1590ebf0c40f8f69bf579.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-fix_no_SAGE_BIN.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-fix_no_venv_packages.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-remove_ratpoints.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_31563.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_no_threejs.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch
 create mode 100644 srcpkgs/sagemath/template
 create mode 100644 srcpkgs/sagemath/update

diff --git a/srcpkgs/sagemath/files/timings2.json b/srcpkgs/sagemath/files/timings2.json
new file mode 100644
index 000000000000..71a9aa84ce58
--- /dev/null
+++ b/srcpkgs/sagemath/files/timings2.json
@@ -0,0 +1,398 @@
+{
+  "doc.ca.intro.index": {"walltime": 8},
+  "doc.en.constructions.calculus": {"walltime": 64},
+  "doc.en.constructions.plotting": {"walltime": 32},
+  "doc.en.prep.Advanced-2DPlotting": {"walltime": 16},
+  "doc.en.prep.Calculus": {"walltime": 8},
+  "doc.en.prep.Symbolics-and-Basic-Plotting": {"walltime": 8},
+  "doc.en.thematic_tutorials.explicit_methods_in_number_theory.birds_other": {"walltime": 8},
+  "doc.en.thematic_tutorials.explicit_methods_in_number_theory.elliptic_curves": {"walltime": 8},
+  "doc.en.thematic_tutorials.geometry.polyhedra_tutorial": {"walltime": 16},
+  "doc.en.thematic_tutorials.sandpile": {"walltime": 16},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_advanced": {"walltime": 32},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_cartesian": {"walltime": 32},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_change": {"walltime": 32},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_curvilinear": {"walltime": 32},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_plane": {"walltime": 16},
+  "doc.ja.tutorial.tour_plotting": {"walltime": 8},
+  "sage.algebras.cluster_algebra": {"walltime": 8},
+  "sage.algebras.commutative_dga": {"walltime": 16},
+  "sage.algebras.hecke_algebras.ariki_koike_algebra": {"walltime": 8},
+  "sage.algebras.iwahori_hecke_algebra": {"walltime": 8},
+  "sage.algebras.lie_algebras.classical_lie_algebra": {"walltime": 128},
+  "sage.algebras.lie_algebras.nilpotent_lie_algebra": {"walltime": 16},
+  "sage.algebras.quantum_clifford": {"walltime": 16},
+  "sage.algebras.quantum_groups.fock_space": {"walltime": 8},
+  "sage.algebras.quatalg.quaternion_algebra": {"walltime": 8},
+  "sage.algebras.steenrod.steenrod_algebra": {"walltime": 64},
+  "sage.algebras.steenrod.steenrod_algebra_bases": {"walltime": 8},
+  "sage.algebras.yangian": {"walltime": 8},
+  "sage.arith.misc": {"walltime": 32},
+  "sage.calculus.calculus": {"walltime": 16},
+  "sage.calculus.desolvers": {"walltime": 8},
+  "sage.calculus.functional": {"walltime": 8},
+  "sage.calculus.riemann": {"walltime": 64},
+  "sage.calculus.tests": {"walltime": 16},
+  "sage.calculus.transforms.dwt": {"walltime": 16},
+  "sage.calculus.transforms.fft": {"walltime": 8},
+  "sage.categories.coxeter_groups": {"walltime": 8},
+  "sage.categories.finite_monoids": {"walltime": 16},
+  "sage.categories.lie_conformal_algebras": {"walltime": 8},
+  "sage.categories.loop_crystals": {"walltime": 8},
+  "sage.categories.pushout": {"walltime": 8},
+  "sage.categories.super_hopf_algebras_with_basis": {"walltime": 32},
+  "sage.categories.super_lie_conformal_algebras": {"walltime": 8},
+  "sage.coding.ag_code": {"walltime": 64},
+  "sage.coding.ag_code_decoders": {"walltime": 128},
+  "sage.coding.binary_code": {"walltime": 8},
+  "sage.coding.linear_code": {"walltime": 16},
+  "sage.combinat.backtrack": {"walltime": 32},
+  "sage.combinat.chas.wqsym": {"walltime": 32},
+  "sage.combinat.cluster_algebra_quiver.cluster_seed": {"walltime": 64},
+  "sage.combinat.cluster_algebra_quiver.quiver": {"walltime": 128},
+  "sage.combinat.crystals.affine_factorization": {"walltime": 16},
+  "sage.combinat.crystals.alcove_path": {"walltime": 32},
+  "sage.combinat.crystals.highest_weight_crystals": {"walltime": 8},
+  "sage.combinat.crystals.kirillov_reshetikhin": {"walltime": 16},
+  "sage.combinat.crystals.letters": {"walltime": 8},
+  "sage.combinat.crystals.littelmann_path": {"walltime": 16},
+  "sage.combinat.crystals.mv_polytopes": {"walltime": 16},
+  "sage.combinat.crystals.pbw_crystal": {"walltime": 16},
+  "sage.combinat.crystals.star_crystal": {"walltime": 8},
+  "sage.combinat.designs.bibd": {"walltime": 8},
+  "sage.combinat.designs.database": {"walltime": 16},
+  "sage.combinat.designs.difference_family": {"walltime": 8},
+  "sage.combinat.designs.gen_quadrangles_with_spread": {"walltime": 128},
+  "sage.combinat.designs.orthogonal_arrays_build_recursive": {"walltime": 16},
+  "sage.combinat.designs.orthogonal_arrays_find_recursive": {"walltime": 8},
+  "sage.combinat.diagram_algebras": {"walltime": 64},
+  "sage.combinat.fqsym": {"walltime": 32},
+  "sage.combinat.free_prelie_algebra": {"walltime": 8},
+  "sage.combinat.fully_commutative_elements": {"walltime": 8},
+  "sage.combinat.grossman_larson_algebras": {"walltime": 8},
+  "sage.combinat.interval_posets": {"walltime": 8},
+  "sage.combinat.k_regular_sequence": {"walltime": 8},
+  "sage.combinat.k_tableau": {"walltime": 16},
+  "sage.combinat.matrices.hadamard_matrix": {"walltime": 8},
+  "sage.combinat.multiset_partition_into_sets_ordered": {"walltime": 8},
+  "sage.combinat.ncsf_qsym.ncsf": {"walltime": 16},
+  "sage.combinat.ncsf_qsym.qsym": {"walltime": 16},
+  "sage.combinat.partition": {"walltime": 16},
+  "sage.combinat.partition_kleshchev": {"walltime": 16},
+  "sage.combinat.partition_tuple": {"walltime": 8},
+  "sage.combinat.posets.moebius_algebra": {"walltime": 16},
+  "sage.combinat.posets.posets": {"walltime": 8},
+  "sage.combinat.rigged_configurations.kr_tableaux": {"walltime": 32},
+  "sage.combinat.rigged_configurations.rigged_configurations": {"walltime": 16},
+  "sage.combinat.rigged_configurations.tensor_product_kr_tableaux": {"walltime": 16},
+  "sage.combinat.root_system.associahedron": {"walltime": 8},
+  "sage.combinat.root_system.branching_rules": {"walltime": 8},
+  "sage.combinat.root_system.fusion_ring": {"walltime": 8},
+  "sage.combinat.root_system.integrable_representations": {"walltime": 16},
+  "sage.combinat.root_system.non_symmetric_macdonald_polynomials": {"walltime": 16},
+  "sage.combinat.root_system.pieri_factors": {"walltime": 8},
+  "sage.combinat.root_system.plot": {"walltime": 32},
+  "sage.combinat.root_system.root_lattice_realization_algebras": {"walltime": 16},
+  "sage.combinat.root_system.root_lattice_realizations": {"walltime": 16},
+  "sage.combinat.root_system.root_system": {"walltime": 8},
+  "sage.combinat.root_system.weyl_group": {"walltime": 8},
+  "sage.combinat.rsk": {"walltime": 32},
+  "sage.combinat.sf.classical": {"walltime": 16},
+  "sage.combinat.sf.jack": {"walltime": 16},
+  "sage.combinat.sf.k_dual": {"walltime": 16},
+  "sage.combinat.sf.llt": {"walltime": 16},
+  "sage.combinat.sf.macdonald": {"walltime": 64},
+  "sage.combinat.sf.new_kschur": {"walltime": 8},
+  "sage.combinat.sf.sfa": {"walltime": 32},
+  "sage.combinat.shifted_primed_tableau": {"walltime": 16},
+  "sage.combinat.skew_tableau": {"walltime": 8},
+  "sage.combinat.symmetric_group_algebra": {"walltime": 16},
+  "sage.combinat.tableau": {"walltime": 32},
+  "sage.combinat.tableau_tuple": {"walltime": 32},
+  "sage.combinat.tiling": {"walltime": 256},
+  "sage.combinat.tutorial": {"walltime": 16},
+  "sage.combinat.words.paths": {"walltime": 64},
+  "sage.crypto.block_cipher.des": {"walltime": 16},
+  "sage.crypto.mq.sr": {"walltime": 64},
+  "sage.crypto.sbox": {"walltime": 16},
+  "sage.crypto.sboxes": {"walltime": 8},
+  "sage.doctest.forker": {"walltime": 16},
+  "sage.doctest.sources": {"walltime": 64},
+  "sage.doctest.test": {"walltime": 128},
+  "sage.dynamics.arithmetic_dynamics.projective_ds": {"walltime": 64},
+  "sage.dynamics.arithmetic_dynamics.wehlerK3": {"walltime": 8},
+  "sage.dynamics.cellular_automata.glca": {"walltime": 8},
+  "sage.dynamics.cellular_automata.solitons": {"walltime": 8},
+  "sage.dynamics.complex_dynamics.mandel_julia": {"walltime": 16},
+  "sage.functions.bessel": {"walltime": 16},
+  "sage.functions.exp_integral": {"walltime": 8},
+  "sage.functions.hypergeometric": {"walltime": 8},
+  "sage.functions.other": {"walltime": 16},
+  "sage.functions.piecewise": {"walltime": 8},
+  "sage.games.quantumino": {"walltime": 8},
+  "sage.geometry.cone": {"walltime": 32},
+  "sage.geometry.fan": {"walltime": 8},
+  "sage.geometry.hyperbolic_space.hyperbolic_geodesic": {"walltime": 8},
+  "sage.geometry.hyperplane_arrangement.arrangement": {"walltime": 16},
+  "sage.geometry.hyperplane_arrangement.library": {"walltime": 8},
+  "sage.geometry.hyperplane_arrangement.plot": {"walltime": 8},
+  "sage.geometry.lattice_polytope": {"walltime": 16},
+  "sage.geometry.polyhedral_complex": {"walltime": 8},
+  "sage.geometry.polyhedron.base": {"walltime": 32},
+  "sage.geometry.polyhedron.library": {"walltime": 32},
+  "sage.geometry.polyhedron.plot": {"walltime": 8},
+  "sage.geometry.riemannian_manifolds.parametrized_surface3d": {"walltime": 16},
+  "sage.geometry.triangulation.base": {"walltime": 32},
+  "sage.geometry.triangulation.point_configuration": {"walltime": 16},
+  "sage.graphs.chrompoly": {"walltime": 8},
+  "sage.graphs.connectivity": {"walltime": 16},
+  "sage.graphs.generators.basic": {"walltime": 16},
+  "sage.graphs.generators.classical_geometries": {"walltime": 32},
+  "sage.graphs.generators.distance_regular": {"walltime": 256},
+  "sage.graphs.generators.families": {"walltime": 32},
+  "sage.graphs.generators.smallgraphs": {"walltime": 16},
+  "sage.graphs.generic_graph": {"walltime": 32},
+  "sage.graphs.genus": {"walltime": 16},
+  "sage.graphs.graph": {"walltime": 16},
+  "sage.graphs.graph_generators": {"walltime": 8},
+  "sage.graphs.graph_list": {"walltime": 8},
+  "sage.graphs.graph_plot": {"walltime": 8},
+  "sage.graphs.strongly_regular_db": {"walltime": 16},
+  "sage.groups.cubic_braid": {"walltime": 16},
+  "sage.groups.fqf_orthogonal": {"walltime": 16},
+  "sage.groups.libgap_mixin": {"walltime": 8},
+  "sage.groups.libgap_morphism": {"walltime": 8},
+  "sage.groups.lie_gps.nilpotent_lie_group": {"walltime": 16},
+  "sage.groups.matrix_gps.finitely_generated": {"walltime": 8},
+  "sage.groups.matrix_gps.heisenberg": {"walltime": 32},
+  "sage.groups.matrix_gps.linear": {"walltime": 8},
+  "sage.groups.perm_gps.cubegroup": {"walltime": 16},
+  "sage.groups.perm_gps.partn_ref.refinement_graphs": {"walltime": 8},
+  "sage.groups.perm_gps.permgroup": {"walltime": 8},
+  "sage.groups.perm_gps.permgroup_named": {"walltime": 8},
+  "sage.homology.hochschild_complex": {"walltime": 8},
+  "sage.homology.homology_vector_space_with_basis": {"walltime": 8},
+  "sage.interacts.test_jupyter": {"walltime": 16},
+  "sage.interfaces.ecm": {"walltime": 8},
+  "sage.interfaces.expect": {"walltime": 8},
+  "sage.interfaces.gap": {"walltime": 16},
+  "sage.interfaces.maxima": {"walltime": 8},
+  "sage.interfaces.maxima_abstract": {"walltime": 64},
+  "sage.interfaces.psage": {"walltime": 8},
+  "sage.interfaces.sage0": {"walltime": 8},
+  "sage.lfunctions.zero_sums": {"walltime": 8},
+  "sage.libs.eclib.interface": {"walltime": 16},
+  "sage.libs.eclib.mwrank": {"walltime": 16},
+  "sage.libs.gap.test_long": {"walltime": 32},
+  "sage.libs.giac": {"walltime": 32},
+  "sage.manifolds.catalog": {"walltime": 8},
+  "sage.manifolds.chart": {"walltime": 32},
+  "sage.manifolds.chart_func": {"walltime": 8},
+  "sage.manifolds.continuous_map": {"walltime": 8},
+  "sage.manifolds.differentiable.affine_connection": {"walltime": 128},
+  "sage.manifolds.differentiable.automorphismfield": {"walltime": 32},
+  "sage.manifolds.differentiable.automorphismfield_group": {"walltime": 8},
+  "sage.manifolds.differentiable.bundle_connection": {"walltime": 8},
+  "sage.manifolds.differentiable.characteristic_cohomology_class": {"walltime": 256},
+  "sage.manifolds.differentiable.curve": {"walltime": 16},
+  "sage.manifolds.differentiable.degenerate": {"walltime": 32},
+  "sage.manifolds.differentiable.degenerate_submanifold": {"walltime": 256},
+  "sage.manifolds.differentiable.diff_form": {"walltime": 64},
+  "sage.manifolds.differentiable.diff_map": {"walltime": 8},
+  "sage.manifolds.differentiable.examples.euclidean": {"walltime": 32},
+  "sage.manifolds.differentiable.examples.sphere": {"walltime": 32},
+  "sage.manifolds.differentiable.integrated_curve": {"walltime": 32},
+  "sage.manifolds.differentiable.levi_civita_connection": {"walltime": 32},
+  "sage.manifolds.differentiable.manifold": {"walltime": 16},
+  "sage.manifolds.differentiable.manifold_homset": {"walltime": 16},
+  "sage.manifolds.differentiable.metric": {"walltime": 64},
+  "sage.manifolds.differentiable.mixed_form": {"walltime": 16},
+  "sage.manifolds.differentiable.mixed_form_algebra": {"walltime": 8},
+  "sage.manifolds.differentiable.multivectorfield": {"walltime": 64},
+  "sage.manifolds.differentiable.pseudo_riemannian": {"walltime": 16},
+  "sage.manifolds.differentiable.pseudo_riemannian_submanifold": {"walltime": 128},
+  "sage.manifolds.differentiable.scalarfield": {"walltime": 16},
+  "sage.manifolds.differentiable.scalarfield_algebra": {"walltime": 8},
+  "sage.manifolds.differentiable.tangent_vector": {"walltime": 16},
+  "sage.manifolds.differentiable.tensorfield": {"walltime": 128},
+  "sage.manifolds.differentiable.tensorfield_paral": {"walltime": 16},
+  "sage.manifolds.differentiable.vector_bundle": {"walltime": 16},
+  "sage.manifolds.differentiable.vectorfield": {"walltime": 64},
+  "sage.manifolds.differentiable.vectorframe": {"walltime": 8},
+  "sage.manifolds.point": {"walltime": 16},
+  "sage.manifolds.scalarfield": {"walltime": 16},
+  "sage.manifolds.scalarfield_algebra": {"walltime": 8},
+  "sage.manifolds.section": {"walltime": 32},
+  "sage.manifolds.trivialization": {"walltime": 8},
+  "sage.manifolds.vector_bundle": {"walltime": 8},
+  "sage.matrix.benchmark": {"walltime": 8},
+  "sage.matrix.matrix2": {"walltime": 16},
+  "sage.matrix.matrix_integer_dense": {"walltime": 16},
+  "sage.matrix.matrix_integer_dense_hnf": {"walltime": 32},
+  "sage.matrix.matrix_mod2_dense": {"walltime": 8},
+  "sage.matrix.matrix_rational_dense": {"walltime": 8},
+  "sage.matrix.special": {"walltime": 8},
+  "sage.matroids.catalog": {"walltime": 64},
+  "sage.misc.cachefunc": {"walltime": 16},
+  "sage.misc.cython": {"walltime": 8},
+  "sage.misc.functional": {"walltime": 8},
+  "sage.misc.randstate": {"walltime": 16},
+  "sage.misc.sagedoc": {"walltime": 64},
+  "sage.misc.sageinspect": {"walltime": 32},
+  "sage.modular.abvar.abvar": {"walltime": 16},
+  "sage.modular.abvar.homspace": {"walltime": 8},
+  "sage.modular.abvar.lseries": {"walltime": 8},
+  "sage.modular.arithgroup.arithgroup_perm": {"walltime": 8},
+  "sage.modular.arithgroup.tests": {"walltime": 8},
+  "sage.modular.btquotients.pautomorphicform": {"walltime": 32},
+  "sage.modular.hypergeometric_motive": {"walltime": 16},
+  "sage.modular.local_comp.local_comp": {"walltime": 32},
+  "sage.modular.local_comp.type_space": {"walltime": 16},
+  "sage.modular.modform.ambient_R": {"walltime": 16},
+  "sage.modular.modform.constructor": {"walltime": 8},
+  "sage.modular.modform.cuspidal_submodule": {"walltime": 16},
+  "sage.modular.modform.element": {"walltime": 64},
+  "sage.modular.modform.ring": {"walltime": 64},
+  "sage.modular.modform.space": {"walltime": 8},
+  "sage.modular.modform_hecketriangle.abstract_space": {"walltime": 16},
+  "sage.modular.modform_hecketriangle.graded_ring_element": {"walltime": 16},
+  "sage.modular.modform_hecketriangle.hecke_triangle_group_element": {"walltime": 32},
+  "sage.modular.modform_hecketriangle.readme": {"walltime": 16},
+  "sage.modular.modform_hecketriangle.space": {"walltime": 8},
+  "sage.modular.modsym.ambient": {"walltime": 16},
+  "sage.modular.modsym.space": {"walltime": 8},
+  "sage.modular.pollack_stevens.modsym": {"walltime": 64},
+  "sage.modular.pollack_stevens.padic_lseries": {"walltime": 32},
+  "sage.modules.finite_submodule_iter": {"walltime": 16},
+  "sage.modules.free_module": {"walltime": 16},
+  "sage.modules.free_module_element": {"walltime": 8},
+  "sage.modules.free_module_integer": {"walltime": 32},
+  "sage.modules.free_quadratic_module_integer_symmetric": {"walltime": 8},
+  "sage.modules.torsion_quadratic_module": {"walltime": 16},
+  "sage.parallel.map_reduce": {"walltime": 8},
+  "sage.plot.animate": {"walltime": 128},
+  "sage.plot.arrow": {"walltime": 8},
+  "sage.plot.circle": {"walltime": 8},
+  "sage.plot.complex_plot": {"walltime": 8},
+  "sage.plot.contour_plot": {"walltime": 32},
+  "sage.plot.density_plot": {"walltime": 8},
+  "sage.plot.graphics": {"walltime": 32},
+  "sage.plot.line": {"walltime": 8},
+  "sage.plot.matrix_plot": {"walltime": 16},
+  "sage.plot.multigraphics": {"walltime": 16},
+  "sage.plot.plot": {"walltime": 64},
+  "sage.plot.plot3d.base": {"walltime": 8},
+  "sage.plot.plot3d.implicit_plot3d": {"walltime": 16},
+  "sage.plot.plot3d.implicit_surface": {"walltime": 8},
+  "sage.plot.plot3d.parametric_plot3d": {"walltime": 8},
+  "sage.plot.plot3d.parametric_surface": {"walltime": 8},
+  "sage.plot.plot3d.plot3d": {"walltime": 16},
+  "sage.plot.plot3d.tachyon": {"walltime": 8},
+  "sage.plot.plot3d.transform": {"walltime": 32},
+  "sage.plot.point": {"walltime": 8},
+  "sage.plot.polygon": {"walltime": 8},
+  "sage.plot.streamline_plot": {"walltime": 8},
+  "sage.quadratic_forms.genera.genus": {"walltime": 16},
+  "sage.quadratic_forms.quadratic_form__automorphisms": {"walltime": 8},
+  "sage.quadratic_forms.quadratic_form__local_representation_conditions": {"walltime": 64},
+  "sage.quadratic_forms.quadratic_form__neighbors": {"walltime": 8},
+  "sage.quadratic_forms.quadratic_form__siegel_product": {"walltime": 8},
+  "sage.repl.ipython_extension": {"walltime": 8},
+  "sage.rings.asymptotic.asymptotic_expansion_generators": {"walltime": 64},
+  "sage.rings.asymptotic.asymptotic_ring": {"walltime": 8},
+  "sage.rings.asymptotic.asymptotics_multivariate_generating_functions": {"walltime": 32},
+  "sage.rings.asymptotic.term_monoid": {"walltime": 8},
+  "sage.rings.continued_fraction": {"walltime": 8},
+  "sage.rings.finite_rings.finite_field_base": {"walltime": 8},
+  "sage.rings.function_field.function_field": {"walltime": 256},
+  "sage.rings.function_field.function_field_valuation": {"walltime": 64},
+  "sage.rings.function_field.ideal": {"walltime": 8},
+  "sage.rings.function_field.place": {"walltime": 8},
+  "sage.rings.integer": {"walltime": 128},
+  "sage.rings.invariants.invariant_theory": {"walltime": 8},
+  "sage.rings.number_field.bdd_height": {"walltime": 8},
+  "sage.rings.number_field.number_field": {"walltime": 64},
+  "sage.rings.number_field.number_field_element": {"walltime": 16},
+  "sage.rings.number_field.splitting_field": {"walltime": 8},
+  "sage.rings.number_field.totallyreal": {"walltime": 16},
+  "sage.rings.number_field.totallyreal_rel": {"walltime": 8},
+  "sage.rings.padics.padic_base_leaves": {"walltime": 64},
+  "sage.rings.padics.padic_extension_leaves": {"walltime": 64},
+  "sage.rings.padics.padic_generic_element": {"walltime": 16},
+  "sage.rings.padics.padic_lattice_element": {"walltime": 32},
+  "sage.rings.padics.relative_extension_leaves": {"walltime": 32},
+  "sage.rings.polynomial.multi_polynomial_ideal": {"walltime": 8},
+  "sage.rings.polynomial.multi_polynomial_sequence": {"walltime": 8},
+  "sage.rings.polynomial.ore_function_element": {"walltime": 8},
+  "sage.rings.polynomial.polynomial_element": {"walltime": 16},
+  "sage.rings.polynomial.polynomial_rational_flint": {"walltime": 8},
+  "sage.rings.polynomial.polynomial_zmod_flint": {"walltime": 512},
+  "sage.rings.qqbar": {"walltime": 16},
+  "sage.rings.tests": {"walltime": 16},
+  "sage.rings.valuation.augmented_valuation": {"walltime": 32},
+  "sage.rings.valuation.mapped_valuation": {"walltime": 64},
+  "sage.rings.valuation.valuation": {"walltime": 8},
+  "sage.sandpiles.sandpile": {"walltime": 16},
+  "sage.schemes.curves.affine_curve": {"walltime": 16},
+  "sage.schemes.curves.closed_point": {"walltime": 8},
+  "sage.schemes.curves.projective_curve": {"walltime": 32},
+  "sage.schemes.cyclic_covers.cycliccover_finite_field": {"walltime": 64},
+  "sage.schemes.elliptic_curves.BSD": {"walltime": 8},
+  "sage.schemes.elliptic_curves.Qcurves": {"walltime": 8},
+  "sage.schemes.elliptic_curves.constructor": {"walltime": 32},
+  "sage.schemes.elliptic_curves.ell_curve_isogeny": {"walltime": 16},
+  "sage.schemes.elliptic_curves.ell_egros": {"walltime": 32},
+  "sage.schemes.elliptic_curves.ell_finite_field": {"walltime": 8},
+  "sage.schemes.elliptic_curves.ell_generic": {"walltime": 8},
+  "sage.schemes.elliptic_curves.ell_modular_symbols": {"walltime": 16},
+  "sage.schemes.elliptic_curves.ell_number_field": {"walltime": 128},
+  "sage.schemes.elliptic_curves.ell_point": {"walltime": 8},
+  "sage.schemes.elliptic_curves.ell_rational_field": {"walltime": 128},
+  "sage.schemes.elliptic_curves.gal_reps_number_field": {"walltime": 32},
+  "sage.schemes.elliptic_curves.gp_simon": {"walltime": 16},
+  "sage.schemes.elliptic_curves.heegner": {"walltime": 32},
+  "sage.schemes.elliptic_curves.height": {"walltime": 64},
+  "sage.schemes.elliptic_curves.isogeny_class": {"walltime": 32},
+  "sage.schemes.elliptic_curves.isogeny_small_degree": {"walltime": 256},
+  "sage.schemes.elliptic_curves.kraus": {"walltime": 16},
+  "sage.schemes.elliptic_curves.mod_sym_num": {"walltime": 8},
+  "sage.schemes.elliptic_curves.padic_lseries": {"walltime": 8},
+  "sage.schemes.elliptic_curves.padics": {"walltime": 16},
+  "sage.schemes.elliptic_curves.saturation": {"walltime": 16},
+  "sage.schemes.elliptic_curves.sha_tate": {"walltime": 32},
+  "sage.schemes.hyperelliptic_curves.hyperelliptic_finite_field": {"walltime": 64},
+  "sage.schemes.hyperelliptic_curves.hyperelliptic_generic": {"walltime": 8},
+  "sage.schemes.hyperelliptic_curves.hyperelliptic_padic_field": {"walltime": 32},
+  "sage.schemes.hyperelliptic_curves.monsky_washnitzer": {"walltime": 8},
+  "sage.schemes.projective.projective_rational_point": {"walltime": 8},
+  "sage.schemes.riemann_surfaces.riemann_surface": {"walltime": 64},
+  "sage.schemes.toric.chow_group": {"walltime": 8},
+  "sage.schemes.toric.sheaf.klyachko": {"walltime": 8},
+  "sage.stats.distributions.discrete_gaussian_integer": {"walltime": 8},
+  "sage.stats.time_series": {"walltime": 8},
+  "sage.structure.coerce_dict": {"walltime": 32},
+  "sage.structure.element": {"walltime": 16},
+  "sage.structure.sage_object": {"walltime": 8},
+  "sage.symbolic.expression": {"walltime": 32},
+  "sage.symbolic.integration.integral": {"walltime": 32},
+  "sage.symbolic.random_tests": {"walltime": 32},
+  "sage.symbolic.relation": {"walltime": 8},
+  "sage.tests.book_schilling_zabrocki_kschur_primer": {"walltime": 32},
+  "sage.tests.book_stein_ent": {"walltime": 16},
+  "sage.tests.books.computational-mathematics-with-sagemath.combinat_doctest": {"walltime": 32},
+  "sage.tests.books.computational-mathematics-with-sagemath.float_doctest": {"walltime": 16},
+  "sage.tests.books.computational-mathematics-with-sagemath.graphique_doctest": {"walltime": 32},
+  "sage.tests.books.computational-mathematics-with-sagemath.graphtheory_doctest": {"walltime": 8},
+  "sage.tests.books.computational-mathematics-with-sagemath.integration_doctest": {"walltime": 32},
+  "sage.tests.books.computational-mathematics-with-sagemath.mpoly_doctest": {"walltime": 8},
+  "sage.tests.books.computational-mathematics-with-sagemath.nonlinear_doctest": {"walltime": 8},
+  "sage.tests.books.computational-mathematics-with-sagemath.recequadiff_doctest": {"walltime": 8},
+  "sage.tests.books.computational-mathematics-with-sagemath.sol.graphique_doctest": {"walltime": 16},
+  "sage.tests.books.computational-mathematics-with-sagemath.sol.numbertheory_doctest": {"walltime": 16},
+  "sage.tests.books.computational-mathematics-with-sagemath.sol.polynomes_doctest": {"walltime": 16},
+  "sage.tests.cmdline": {"walltime": 64},
+  "sage.tests.gosper-sum": {"walltime": 16},
+  "sage.tests.parigp": {"walltime": 8},
+  "sage.topology.simplicial_complex": {"walltime": 8},
+  "sage.topology.simplicial_complex_examples": {"walltime": 16}
+}
diff --git a/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch b/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch
new file mode 100644
index 000000000000..35aef7b8d456
--- /dev/null
+++ b/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch
@@ -0,0 +1,11 @@
+--- a/build/sage_bootstrap/tarball.py	2022-01-07 19:17:06.754747955 -0300
++++ b/build/sage_bootstrap/tarball.py	2022-01-07 19:25:31.844139381 -0300
+@@ -158,6 +158,8 @@
+                             .format(destination=destination))
+         successful_download = False
+         log.info('Attempting to download package {0} from mirrors'.format(self.filename))
++        log.info('ERROR: downloading is disabled, add file to template instead')
++        return
+         for mirror in MirrorList():
+             url = mirror + '/'.join(['spkg', 'upstream', self.package.name, self.filename])
+             log.info(url)
diff --git a/srcpkgs/sagemath/patches/trac-29631-001-system_linbox-794713e88ee188d516e4956832a23f985a73917a.patch b/srcpkgs/sagemath/patches/trac-29631-001-system_linbox-794713e88ee188d516e4956832a23f985a73917a.patch
new file mode 100644
index 000000000000..483dbe2c2597
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-29631-001-system_linbox-794713e88ee188d516e4956832a23f985a73917a.patch
@@ -0,0 +1,31 @@
+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.
+
+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/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-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch b/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
new file mode 100644
index 000000000000..da88a369db0d
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
@@ -0,0 +1,57 @@
+From 2c981351bb60089530b0598d3e9a909a23d4d4d8 Mon Sep 17 00:00:00 2001
+From: Thierry Thomas <thierry@FreeBSD.org>
+Date: Mon, 22 Mar 2021 03:04:12 +0100
+Subject: 29644: Add spkg-configure.m4 for gap
+
+---
+ build/pkgs/gap/spkg-configure.m4 | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+ create mode 100644 build/pkgs/gap/spkg-configure.m4
+
+diff --git a/build/pkgs/gap/spkg-configure.m4 b/build/pkgs/gap/spkg-configure.m4
+new file mode 100644
+index 00000000..91cd089
+--- /dev/null
++++ b/build/pkgs/gap/spkg-configure.m4
+@@ -0,0 +1,8 @@
++SAGE_SPKG_CONFIGURE([gap], [
++    SAGE_SPKG_DEPCHECK([gmp], [
++       AC_CHECK_HEADER([gap/system.h], [
++        AC_SEARCH_LIBS([GAP_COMM], [gap], [
++        ], [sage_spkg_install_gap=yes])
++       ], [sage_spkg_install_gap=yes])
++    ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2a41f491e5ce599ba185f5e93f02e0fcebd76c9e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Samuel=20Leli=C3=A8vre?= <samuel.lelievre@gmail.com>
+Date: Mon, 22 Mar 2021 03:05:31 +0100
+Subject: 29644: Add distro information for gap
+
+---
+ build/pkgs/gap/distros/fedora.txt | 1 +
+ build/pkgs/gap/distros/gentoo.txt | 1 +
+ 2 files changed, 2 insertions(+)
+ create mode 100644 build/pkgs/gap/distros/fedora.txt
+ create mode 100644 build/pkgs/gap/distros/gentoo.txt
+
+diff --git a/build/pkgs/gap/distros/fedora.txt b/build/pkgs/gap/distros/fedora.txt
+new file mode 100644
+index 00000000..ea4feae
+--- /dev/null
++++ b/build/pkgs/gap/distros/fedora.txt
+@@ -0,0 +1 @@
++gap
+diff --git a/build/pkgs/gap/distros/gentoo.txt b/build/pkgs/gap/distros/gentoo.txt
+new file mode 100644
+index 00000000..ea64ec9
+--- /dev/null
++++ b/build/pkgs/gap/distros/gentoo.txt
+@@ -0,0 +1 @@
++sci-mathematics/gap
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
new file mode 100644
index 000000000000..0ecb27c593cd
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
@@ -0,0 +1,5629 @@
+From 05fcaabe95082f42ba134780d579390d7b6153e2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 19:30:58 -0400
+Subject: Trac #29665: add --enable-system-site-packages option to ./configure.
+
+This new option is experimental and disabled by default. When it is
+enabled, the string "--system-site-packages" is appended to a new
+environment variable SAGE_VENV_FLAGS that is then passed to the
+sage-venv command during the build using autoconf substitution.
+Thusly the correct setting finds its way into local/pyvenv.cfg.
+---
+ build/make/Makefile.in |  2 +-
+ configure.ac           | 11 +++++++++++
+ 2 files changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/build/make/Makefile.in b/build/make/Makefile.in
+index f870cc3..68627ab 100644
+--- a/build/make/Makefile.in
++++ b/build/make/Makefile.in
+@@ -211,7 +211,7 @@ endif
+ inst_python3_venv = $(SAGE_VENV)/pyvenv.cfg
+ 
+ $(inst_python3_venv):
+-	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv "$(SAGE_VENV)"
++	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv @SAGE_VENV_FLAGS@ "$(SAGE_VENV)"
+ endif
+ 
+ # Build everything and start Sage.
+diff --git a/configure.ac b/configure.ac
+index 351f487..db30a91 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -435,6 +435,17 @@ AC_ARG_ENABLE([download-from-upstream-url],
+   [AS_HELP_STRING([--enable-download-from-upstream-url],
+     [allow downloading packages from their upstream URL if they cannot be found on the Sage mirrors])])
+ 
++AC_ARG_ENABLE(
++  [system-site-packages], [AS_HELP_STRING(
++    [--enable-system-site-packages],
++    [allow sage to use python packages from the system (experimental; default: no)]
++  )], [
++  AS_IF([test "x$enable_system_site_packages" = "xyes"], [
++    SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
++  ])
++])
++AC_SUBST([SAGE_VENV_FLAGS])
++
+ SAGE_SPKG_OPTIONS=""
+ AS_IF([test "x$enable_experimental_packages" = "xyes"], [
+   AS_VAR_APPEND([SAGE_SPKG_OPTIONS], [" -y"])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9372d1f663edf4e89f9c186336815ca04cff59dc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 19:41:14 -0400
+Subject: Trac #29665: new SAGE_PYTHON_PACKAGE_CHECK() autoconf macro.
+
+This new macro encapsulates the check for system installations of
+python packages. It uses setuptools.version's pkg_resources to
+check if the contents of install-requires.txt are satisfied for
+the given package; and if not, tells the build system to install
+the SPKG instead.
+---
+ m4/sage_python_package_check.m4 | 49 +++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 49 insertions(+)
+ create mode 100644 m4/sage_python_package_check.m4
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+new file mode 100644
+index 00000000..77b0a0c
+--- /dev/null
++++ b/m4/sage_python_package_check.m4
+@@ -0,0 +1,49 @@
++#
++# SYNOPSIS
++#
++#   SAGE_PYTHON_PACKAGE_CHECK(package)
++#
++# DESCRIPTION
++#
++#   Determine if the system copy of a python package can be used by sage.
++#
++#   This macro uses setuptools.version's pkg_resources to check that the
++#   "install-requires.txt" file for the named package is satisfied, and
++#   it can typically fail in four ways:
++#
++#     1. If --enable-system-site-packages was not passed to ./configure,
++#
++#     2. If we are not using the system python (no $PYTHON_FOR_VENV),
++#
++#     3. If setuptools is not available to the system python,
++#
++#     4. If the contents of install-requires.txt are not met (wrong
++#        version, no version, etc.) by the system python.
++#
++#   In any of those cases, we set sage_spkg_install_$package to "yes"
++#   so that the corresponding SPKG is installed. Otherwise, we do
++#   nothing, since the default value of sage_spkg_install_$package
++#   is "no" (to use the system copy).
++#
++#   The SAGE_SPKG_CONFIGURE_PYTHON3() macro is AC_REQUIRE'd to ensure
++#   that $PYTHON_FOR_VENV is available, if it is going to be available.
++#
++
++AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
++  AS_IF([test "${enable_system_site_packages}" = "yes"], [
++    AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
++
++    dnl strip all comments from install-requires.txt; this should leave
++    dnl only a single line containing the version specification for this
++    dnl package.
++    SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
++    AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++    AS_IF(
++      ["${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())"],
++      [AC_MSG_RESULT(yes)],
++      [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
++    )
++  ], [
++    sage_spkg_install_$1=yes
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a0dac8ad81ad6369d479bba30d2388de59e5cecb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:21:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for py.
+
+---
+ build/pkgs/py/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/py/spkg-configure.m4
+
+diff --git a/build/pkgs/py/spkg-configure.m4 b/build/pkgs/py/spkg-configure.m4
+new file mode 100644
+index 00000000..ded7034
+--- /dev/null
++++ b/build/pkgs/py/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([py], [SAGE_PYTHON_PACKAGE_CHECK([py])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 87c463a25ab4432dc1fba4f7a9703284e5b8f620 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:24:15 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for wheel.
+
+---
+ build/pkgs/wheel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wheel/spkg-configure.m4
+
+diff --git a/build/pkgs/wheel/spkg-configure.m4 b/build/pkgs/wheel/spkg-configure.m4
+new file mode 100644
+index 00000000..7897ea9
+--- /dev/null
++++ b/build/pkgs/wheel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([wheel], [SAGE_PYTHON_PACKAGE_CHECK([wheel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 804094b3a980f262f4d53d7be8b1be43ac0c55e0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:25:15 -0400
+Subject: Trac #29665: new spkg-configure.m4 for cvxopt.
+
+This includes a SAGE_SPKG_DEPCHECK([gsl glpk suitesparse],... because
+those C dependencies wind up linked into shared libraries like,
+
+  /usr/.../cvxopt/glpk.cpython-39-x86_64-linux-gnu.so
+
+that could potentially conflict with (for example) the glpk SPKG.
+---
+ build/pkgs/cvxopt/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/cvxopt/spkg-configure.m4
+
+diff --git a/build/pkgs/cvxopt/spkg-configure.m4 b/build/pkgs/cvxopt/spkg-configure.m4
+new file mode 100644
+index 00000000..c4aa619
+--- /dev/null
++++ b/build/pkgs/cvxopt/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([cvxopt], [
++  SAGE_SPKG_DEPCHECK([gsl glpk suitesparse], [
++    SAGE_PYTHON_PACKAGE_CHECK([cvxopt])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3f171955ff8d15da2c98aee0d2e254e95a55a2b5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:28:10 -0400
+Subject: Trac #29665: new spkg-configure.m4 for pyzmq.
+
+This includes a SAGE_SPKG_DEPCHECK([zeromq],... because libzmq winds
+up linked into shared libraries like,
+
+  /usr/.../zmq/backend/cython/message.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the zeromq SPKG.
+---
+ build/pkgs/pyzmq/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/pyzmq/spkg-configure.m4
+
+diff --git a/build/pkgs/pyzmq/spkg-configure.m4 b/build/pkgs/pyzmq/spkg-configure.m4
+new file mode 100644
+index 00000000..ae2b126
+--- /dev/null
++++ b/build/pkgs/pyzmq/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([pyzmq], [
++  SAGE_SPKG_DEPCHECK([zeromq], [
++    SAGE_PYTHON_PACKAGE_CHECK([pyzmq])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20d3aa9da9fc98a6e6a47599cd1b6d1d3785a4c4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:31:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for requests.
+
+---
+ build/pkgs/requests/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/requests/spkg-configure.m4
+
+diff --git a/build/pkgs/requests/spkg-configure.m4 b/build/pkgs/requests/spkg-configure.m4
+new file mode 100644
+index 00000000..f50a66c
+--- /dev/null
++++ b/build/pkgs/requests/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([requests], [SAGE_PYTHON_PACKAGE_CHECK([requests])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4df57ee47f2576b6b7bf9265248e06e90616b689 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:13:34 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for six.
+
+---
+ build/pkgs/six/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/six/spkg-configure.m4
+
+diff --git a/build/pkgs/six/spkg-configure.m4 b/build/pkgs/six/spkg-configure.m4
+new file mode 100644
+index 00000000..a382b81
+--- /dev/null
++++ b/build/pkgs/six/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([six], [SAGE_PYTHON_PACKAGE_CHECK([six])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f4462652d02ca729cc6d7cb36ee4d7d662deafb0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:14:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for packaging.
+
+---
+ build/pkgs/packaging/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/packaging/spkg-configure.m4
+
+diff --git a/build/pkgs/packaging/spkg-configure.m4 b/build/pkgs/packaging/spkg-configure.m4
+new file mode 100644
+index 00000000..398f9e1
+--- /dev/null
++++ b/build/pkgs/packaging/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([packaging], [SAGE_PYTHON_PACKAGE_CHECK([packaging])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4d64677fffce48077e4bc3e20ec833c70e6e9b65 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:18:53 -0400
+Subject: Trac #29665: new spkg-configure.m4 for numpy.
+
+This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack
+wind up linked into shared libraries like,
+
+  /usr/.../numpy/linalg/lapack_lite.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the openblas SPKG.
+---
+ build/pkgs/numpy/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/numpy/spkg-configure.m4
+
+diff --git a/build/pkgs/numpy/spkg-configure.m4 b/build/pkgs/numpy/spkg-configure.m4
+new file mode 100644
+index 00000000..16f9a90
+--- /dev/null
++++ b/build/pkgs/numpy/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([numpy], [
++  SAGE_SPKG_DEPCHECK([openblas], [
++   SAGE_PYTHON_PACKAGE_CHECK([numpy])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 85dfe5bb32f3c470966b477bae68a921e846d11f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:58:48 -0400
+Subject: Trac #29665: new spkg-configure.m4 for scipy.
+
+This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack
+wind up linked into shared libraries like,
+
+  /usr/.../scipy/linalg/_flinalg.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the openblas SPKG.
+---
+ build/pkgs/scipy/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/scipy/spkg-configure.m4
+
+diff --git a/build/pkgs/scipy/spkg-configure.m4 b/build/pkgs/scipy/spkg-configure.m4
+new file mode 100644
+index 00000000..0b7294a
+--- /dev/null
++++ b/build/pkgs/scipy/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([scipy], [
++  SAGE_SPKG_DEPCHECK([openblas], [
++    SAGE_PYTHON_PACKAGE_CHECK([scipy])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5616f1491036fda95f4d3e840c8c8b531c97323b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 07:19:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pluggy.
+
+---
+ build/pkgs/pluggy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pluggy/spkg-configure.m4
+
+diff --git a/build/pkgs/pluggy/spkg-configure.m4 b/build/pkgs/pluggy/spkg-configure.m4
+new file mode 100644
+index 00000000..11b1fce
+--- /dev/null
++++ b/build/pkgs/pluggy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pluggy], [SAGE_PYTHON_PACKAGE_CHECK([pluggy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6bceae3d356878cfe5fce40c9998dead003a3844 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 07:24:12 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pickleshare.
+
+---
+ build/pkgs/pickleshare/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pickleshare/spkg-configure.m4
+
+diff --git a/build/pkgs/pickleshare/spkg-configure.m4 b/build/pkgs/pickleshare/spkg-configure.m4
+new file mode 100644
+index 00000000..80e9b7c
+--- /dev/null
++++ b/build/pkgs/pickleshare/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pickleshare], [SAGE_PYTHON_PACKAGE_CHECK([pickleshare])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From da2ab534f4a256c82ed4f1c5f0f5c320529b5e9f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 08:53:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for html5lib.
+
+---
+ build/pkgs/html5lib/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/html5lib/spkg-configure.m4
+
+diff --git a/build/pkgs/html5lib/spkg-configure.m4 b/build/pkgs/html5lib/spkg-configure.m4
+new file mode 100644
+index 00000000..f421b7e
+--- /dev/null
++++ b/build/pkgs/html5lib/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([html5lib], [SAGE_PYTHON_PACKAGE_CHECK([html5lib])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5e464134afdf6055b7b5804208f759561c5435cd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 18:30:47 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for networkx.
+
+---
+ build/pkgs/networkx/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/networkx/spkg-configure.m4
+
+diff --git a/build/pkgs/networkx/spkg-configure.m4 b/build/pkgs/networkx/spkg-configure.m4
+new file mode 100644
+index 00000000..926671e
+--- /dev/null
++++ b/build/pkgs/networkx/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([networkx], [SAGE_PYTHON_PACKAGE_CHECK([networkx])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c4d40770cd9c7fda811e31759a5f4aedc320f3f9 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:33:24 -0400
+Subject: Trac #29665: new spkg-configure.m4 for matplotlib.
+
+This includes a SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull],...
+because those dependencies wind up linked into shared libraries like,
+
+  /usr/lib/.../matplotlib/ft2font.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with their SPKG counterparts.
+---
+ build/pkgs/matplotlib/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/matplotlib/spkg-configure.m4
+
+diff --git a/build/pkgs/matplotlib/spkg-configure.m4 b/build/pkgs/matplotlib/spkg-configure.m4
+new file mode 100644
+index 00000000..39c2d29
+--- /dev/null
++++ b/build/pkgs/matplotlib/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([matplotlib], [
++  SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull], [
++    SAGE_PYTHON_PACKAGE_CHECK([matplotlib])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7834dc3ac349201af632f89a9de7cd1967931010 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:35:00 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for bleach.
+
+---
+ build/pkgs/bleach/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/bleach/spkg-configure.m4
+
+diff --git a/build/pkgs/bleach/spkg-configure.m4 b/build/pkgs/bleach/spkg-configure.m4
+new file mode 100644
+index 00000000..3c9bb26
+--- /dev/null
++++ b/build/pkgs/bleach/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([bleach], [SAGE_PYTHON_PACKAGE_CHECK([bleach])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 84cad343287a2c69a4a21b9fa3b92301ff88645b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:37:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for decorator.
+
+---
+ build/pkgs/decorator/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/decorator/spkg-configure.m4
+
+diff --git a/build/pkgs/decorator/spkg-configure.m4 b/build/pkgs/decorator/spkg-configure.m4
+new file mode 100644
+index 00000000..e062778
+--- /dev/null
++++ b/build/pkgs/decorator/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([decorator], [SAGE_PYTHON_PACKAGE_CHECK([decorator])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 25693212572e69d452bc95c923ada13744359eb7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:38:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for idna.
+
+---
+ build/pkgs/idna/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/idna/spkg-configure.m4
+
+diff --git a/build/pkgs/idna/spkg-configure.m4 b/build/pkgs/idna/spkg-configure.m4
+new file mode 100644
+index 00000000..9d363f2
+--- /dev/null
++++ b/build/pkgs/idna/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([idna], [SAGE_PYTHON_PACKAGE_CHECK([idna])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6d5616472f6cdc6cf496bba6fe07bd4ef44dfdaf Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:39:23 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for certifi.
+
+---
+ build/pkgs/certifi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/certifi/spkg-configure.m4
+
+diff --git a/build/pkgs/certifi/spkg-configure.m4 b/build/pkgs/certifi/spkg-configure.m4
+new file mode 100644
+index 00000000..ddd4061
+--- /dev/null
++++ b/build/pkgs/certifi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([certifi], [SAGE_PYTHON_PACKAGE_CHECK([certifi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9412a07023b275e29e8d1af9b8ee3e767042e7fd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:40:59 -0400
+Subject: Trac #29665: new spkg-configure.m4 for pillow.
+
+This includes an SAGE_SPKG_DEPCHECK([bzip2 freetype libpng zlib],...
+because those dependencies wind up linked into shared libraries like,
+
+  /usr/.../PIL/_imagingft.cpython-39-x86_64-linux-gnu.so
+
+and potentially conflict with their SPKG counterparts.
+---
+ build/pkgs/pillow/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/pillow/spkg-configure.m4
+
+diff --git a/build/pkgs/pillow/spkg-configure.m4 b/build/pkgs/pillow/spkg-configure.m4
+new file mode 100644
+index 00000000..f2e68e2
+--- /dev/null
++++ b/build/pkgs/pillow/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([pillow], [
++  SAGE_SPKG_DEPCHECK([bzip2 freetype libpng zlib], [
++    SAGE_PYTHON_PACKAGE_CHECK([pillow])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From eede914311481fdb75b363b7a799075e876a2b4f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:44:13 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for mpmath.
+
+---
+ build/pkgs/mpmath/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mpmath/spkg-configure.m4
+
+diff --git a/build/pkgs/mpmath/spkg-configure.m4 b/build/pkgs/mpmath/spkg-configure.m4
+new file mode 100644
+index 00000000..f43c838
+--- /dev/null
++++ b/build/pkgs/mpmath/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([mpmath], [SAGE_PYTHON_PACKAGE_CHECK([mpmath])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 363a825885832c0b580ff53fe61f5c79e70c4728 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:44:56 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for sympy.
+
+---
+ build/pkgs/sympy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sympy/spkg-configure.m4
+
+diff --git a/build/pkgs/sympy/spkg-configure.m4 b/build/pkgs/sympy/spkg-configure.m4
+new file mode 100644
+index 00000000..fa0f1f5
+--- /dev/null
++++ b/build/pkgs/sympy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([sympy], [SAGE_PYTHON_PACKAGE_CHECK([sympy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0667964c914e4a01dda697190a054ff96cea92d6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:47:06 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pygments.
+
+---
+ build/pkgs/pygments/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pygments/spkg-configure.m4
+
+diff --git a/build/pkgs/pygments/spkg-configure.m4 b/build/pkgs/pygments/spkg-configure.m4
+new file mode 100644
+index 00000000..99f29e3
+--- /dev/null
++++ b/build/pkgs/pygments/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pygments], [SAGE_PYTHON_PACKAGE_CHECK([pygments])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f787c233aa05d8e90f7c6ad18f76bd2fa36bfbfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:48:50 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for jinja2.
+
+---
+ build/pkgs/jinja2/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jinja2/spkg-configure.m4
+
+diff --git a/build/pkgs/jinja2/spkg-configure.m4 b/build/pkgs/jinja2/spkg-configure.m4
+new file mode 100644
+index 00000000..0970d1c
+--- /dev/null
++++ b/build/pkgs/jinja2/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jinja2], [SAGE_PYTHON_PACKAGE_CHECK([jinja2])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 309d8f8e2b7078b5efbbe824b69ec1d9b1e639f0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:43:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pandocfilters.
+
+---
+ build/pkgs/pandocfilters/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/pandocfilters/spkg-configure.m4
+
+diff --git a/build/pkgs/pandocfilters/spkg-configure.m4 b/build/pkgs/pandocfilters/spkg-configure.m4
+new file mode 100644
+index 00000000..3e9537f
+--- /dev/null
++++ b/build/pkgs/pandocfilters/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([pandocfilters], [
++  SAGE_PYTHON_PACKAGE_CHECK([pandocfilters])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f57bfda49777a6ba1cd123553acd75dc347c5521 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:44:46 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for webencodings.
+
+---
+ build/pkgs/webencodings/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/webencodings/spkg-configure.m4
+
+diff --git a/build/pkgs/webencodings/spkg-configure.m4 b/build/pkgs/webencodings/spkg-configure.m4
+new file mode 100644
+index 00000000..1b9a5c4
+--- /dev/null
++++ b/build/pkgs/webencodings/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([webencodings], [
++  SAGE_PYTHON_PACKAGE_CHECK([webencodings])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7f193a62d7a2ea0b6a3ca6beb12390d91c25bbfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:48:26 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pytz.
+
+---
+ build/pkgs/pytz/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pytz/spkg-configure.m4
+
+diff --git a/build/pkgs/pytz/spkg-configure.m4 b/build/pkgs/pytz/spkg-configure.m4
+new file mode 100644
+index 00000000..366521b
+--- /dev/null
++++ b/build/pkgs/pytz/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pytz], [SAGE_PYTHON_PACKAGE_CHECK([pytz])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bfd3fdd887c3465c03465248de4997eed4a82915 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:51:16 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for texttable.
+
+---
+ build/pkgs/texttable/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/texttable/spkg-configure.m4
+
+diff --git a/build/pkgs/texttable/spkg-configure.m4 b/build/pkgs/texttable/spkg-configure.m4
+new file mode 100644
+index 00000000..42a3de1
+--- /dev/null
++++ b/build/pkgs/texttable/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([texttable], [SAGE_PYTHON_PACKAGE_CHECK([texttable])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 914bf0cc57abc46129b27c1525782dbe16da31a2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:53:41 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for babel.
+
+---
+ build/pkgs/babel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/babel/spkg-configure.m4
+
+diff --git a/build/pkgs/babel/spkg-configure.m4 b/build/pkgs/babel/spkg-configure.m4
+new file mode 100644
+index 00000000..d7b9a71
+--- /dev/null
++++ b/build/pkgs/babel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([babel], [SAGE_PYTHON_PACKAGE_CHECK([babel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 56977abd1eafbc87c765a2892cfe525382648259 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 14 Oct 2021 08:06:59 -0400
+Subject: Trac #29665: force system python3 with --enable-system-site-packages.
+
+When the python SPKG is used, the --enable-system-site-packages flag
+will essentially do nothing, and that may confuse users who have
+wasted a few hours building sage. (Generally, they will want to fix
+detection of their system python3 first.)
+
+To forestall that, we now set "--with-system-python3=force" whenever
+the "--enable-system-site-packages" flag is passed.
+---
+ configure.ac | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index db30a91..6fafb83 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -438,10 +438,19 @@ AC_ARG_ENABLE([download-from-upstream-url],
+ AC_ARG_ENABLE(
+   [system-site-packages], [AS_HELP_STRING(
+     [--enable-system-site-packages],
+-    [allow sage to use python packages from the system (experimental; default: no)]
++    [allow the use of python packages from the system (experimental; default: no)]
+   )], [
+   AS_IF([test "x$enable_system_site_packages" = "xyes"], [
+     SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
++
++    dnl We want to raise an error if the user asked for "system site
++    dnl packages" but the system python will not be used. Technically
++    dnl that causes no problems (SAGE_PYTHON_PACKAGE_CHECK always fails,
++    dnl so SPKGs are used for all python packages), but it may be confusing
++    dnl to end users who expect the flag to actually give them access to
++    dnl their system python packages and who may not be paying close
++    dnl attention to their ./configure output.
++    with_system_python3="force"
+   ])
+ ])
+ AC_SUBST([SAGE_VENV_FLAGS])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 02b369fd24ef7cf8997082e7850b9cf022cae34b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 01:18:35 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for setuptools.
+
+---
+ build/pkgs/setuptools/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/setuptools/spkg-configure.m4
+
+diff --git a/build/pkgs/setuptools/spkg-configure.m4 b/build/pkgs/setuptools/spkg-configure.m4
+new file mode 100644
+index 00000000..a2ad811
+--- /dev/null
++++ b/build/pkgs/setuptools/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([setuptools], [SAGE_PYTHON_PACKAGE_CHECK([setuptools])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 05117317d38693978efaf36e81d8b02bae44b257 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 01:15:48 -0400
+Subject: Trac #29665: poison PYTHONUSERBASE when testing for "system"
+ packages.
+
+When we're detecting system installations of python packages, we want
+to hide anything that was installed with e.g. "pip install --user". To
+accomplish that, we mimic the PYTHONUSERBASE poisoning from sage-env
+within the SAGE_PYTHON_PACKAGE_CHECK() macro.
+---
+ m4/sage_python_package_check.m4 | 18 +++++++++++++++++-
+ 1 file changed, 17 insertions(+), 1 deletion(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 77b0a0c..b8cdba4 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -38,11 +38,27 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     dnl package.
+     SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
+     AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++
++    dnl To prevent user-site (pip install --user) packages from being
++    dnl detected as "system" packages, we poison PYTHONUSERBASE. The
++    dnl sage-env script also does this at runtime; we mimic that
++    dnl implementation to ensure that the behaviors at ./configure and
++    dnl runtime are identical. Beware that (as in sage-env) the poisoning
++    dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
++    dnl user points PYTHONUSERBASE to any path (even the default), then
++    dnl his local pip packages will be detected.
++    PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
++    AS_IF([test -z "${PYTHONUSERBASE}"], [
++      PYTHONUSERBASE="${HOME}/.sage/local"
++    ])
++
+     AS_IF(
+-      ["${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())"],
++      [PYTHONUSERBASE="${PYTHONUSERBASE}" "${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" 2>/dev/null],
+       [AC_MSG_RESULT(yes)],
+       [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+     )
++
++    PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d75c1492f63a584b5ec5f424ddd7f7c4a6d502d3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:20:04 -0400
+Subject: Trac #29665: run SAGE_PYTHON_PACKAGE_CHECK() inside a venv.
+
+To recreate the runtime environment as closely as possible, we now use
+a venv (with system site packages enabled) when checking for system
+copies of python packages.
+---
+ m4/sage_python_package_check.m4 | 76 +++++++++++++++++++++++++++--------------
+ 1 file changed, 51 insertions(+), 25 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index b8cdba4..7cbd6c0 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -15,9 +15,11 @@
+ #
+ #     2. If we are not using the system python (no $PYTHON_FOR_VENV),
+ #
+-#     3. If setuptools is not available to the system python,
++#     3. If we are unable to create a venv with the system python,
+ #
+-#     4. If the contents of install-requires.txt are not met (wrong
++#     4. If setuptools is not available to the system python,
++#
++#     5. If the contents of install-requires.txt are not met (wrong
+ #        version, no version, etc.) by the system python.
+ #
+ #   In any of those cases, we set sage_spkg_install_$package to "yes"
+@@ -27,38 +29,62 @@
+ #
+ #   The SAGE_SPKG_CONFIGURE_PYTHON3() macro is AC_REQUIRE'd to ensure
+ #   that $PYTHON_FOR_VENV is available, if it is going to be available.
++#   The check is run inside a new venv, and with the PYTHONUSERBASE
++#   variable poisoned in the same manner as sage-env poisons it, to
++#   ensure that the ./configure- and run-time views of the system
++#   are as similar as possible.
+ #
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
+     AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
+ 
+-    dnl strip all comments from install-requires.txt; this should leave
+-    dnl only a single line containing the version specification for this
+-    dnl package.
+-    SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
+-    AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++    dnl We run this check inside a python venv, because that's ultimately
++    dnl how the system $PYTHON_FOR_VENV will be used.
++    AC_MSG_CHECKING([if we can create a python venv in config.venv])
+ 
+-    dnl To prevent user-site (pip install --user) packages from being
+-    dnl detected as "system" packages, we poison PYTHONUSERBASE. The
+-    dnl sage-env script also does this at runtime; we mimic that
+-    dnl implementation to ensure that the behaviors at ./configure and
+-    dnl runtime are identical. Beware that (as in sage-env) the poisoning
+-    dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
+-    dnl user points PYTHONUSERBASE to any path (even the default), then
+-    dnl his local pip packages will be detected.
+-    PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
+-    AS_IF([test -z "${PYTHONUSERBASE}"], [
+-      PYTHONUSERBASE="${HOME}/.sage/local"
+-    ])
++    dnl Use --clear because ./configure typically clobbers its output files.
++    AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
++                                        --clear                dnl
++                                        --without-pip          dnl
++					config.venv], [
++      AC_MSG_RESULT(yes)
++      dnl strip all comments from install-requires.txt; this should leave
++      dnl only a single line containing the version specification for this
++      dnl package.
++      SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
++      AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++
++      dnl To prevent user-site (pip install --user) packages from being
++      dnl detected as "system" packages, we poison PYTHONUSERBASE. The
++      dnl sage-env script also does this at runtime; we mimic that
++      dnl implementation to ensure that the behaviors at ./configure and
++      dnl runtime are identical. Beware that (as in sage-env) the poisoning
++      dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
++      dnl user points PYTHONUSERBASE to any path (even the default), then
++      dnl his local pip packages will be detected.
++      PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
++      AS_IF([test -z "${PYTHONUSERBASE}"], [
++        PYTHONUSERBASE="${HOME}/.sage/local"
++      ])
+ 
+-    AS_IF(
+-      [PYTHONUSERBASE="${PYTHONUSERBASE}" "${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" 2>/dev/null],
+-      [AC_MSG_RESULT(yes)],
+-      [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+-    )
++      AS_IF(
++        [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
++           "from setuptools.version import pkg_resources;              dnl
++            pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" dnl
++	 2>/dev/null],
++        [AC_MSG_RESULT(yes)],
++        [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
++      )
++
++      PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
++    ], [
++      dnl failed to create a venv for some reason
++      AC_MSG_RESULT(no)
++      sage_spkg_install_$1=yes
++    ])
+ 
+-    PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
++    rm -rf config.venv
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 87646c3264a04ffd98a12d67074f93e1943a1e96 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:38:08 -0400
+Subject: Trac #29665: log SAGE_PYTHON_PACKAGE_CHECK() failures to config.log.
+
+---
+ m4/sage_python_package_check.m4 | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 7cbd6c0..e0e0b9f 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -47,7 +47,8 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
+                                         --clear                dnl
+                                         --without-pip          dnl
+-					config.venv], [
++                                        config.venv            dnl
++                                        2>&AS_MESSAGE_LOG_FD], [
+       AC_MSG_RESULT(yes)
+       dnl strip all comments from install-requires.txt; this should leave
+       dnl only a single line containing the version specification for this
+@@ -72,7 +73,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+         [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
+            "from setuptools.version import pkg_resources;              dnl
+             pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" dnl
+-	 2>/dev/null],
++	 2>&AS_MESSAGE_LOG_FD],
+         [AC_MSG_RESULT(yes)],
+         [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+       )
+-- 
+cgit v1.0-1-gd88e
+
+
+From f7dfffd1c64816e2ae4e0f420b22065c5c5bf2cb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:45:37 -0400
+Subject: Trac #29665: don't clobber a plain file named config.venv.
+
+When SAGE_PYTHON_PACKAGE_CHECK() is cleaning up, we no longer remove
+"config.venv" unconditionally. Instead, we remove it only if it is a
+directory. This is also how "pyvenv --clear" works.
+---
+ m4/sage_python_package_check.m4 | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index e0e0b9f..127a078 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -85,7 +85,9 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+       sage_spkg_install_$1=yes
+     ])
+ 
+-    rm -rf config.venv
++    dnl Clean up config.venv, but only if we could have created it.
++    dnl (The --clear flag to pyvenv will not clobber a plain file.)
++    AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9849c77313b895dcfb786d2ea54e36585bd31ce2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 16 Oct 2021 08:14:42 -0400
+Subject: Trac #29665: don't announce system python packages that won't be
+ used.
+
+When --enable-system-site-packages was not given, the python packages
+using SAGE_PYTHON_PACKAGE_CHECK() in spkg-configure.m4 cannot be used.
+Rather than suggest that users install them anyway, that macro now
+hacks the value of sage_use_system_$package to be "no" when the use
+of system site packages is disabled at the python level.
+---
+ m4/sage_python_package_check.m4 | 17 +++++++++++++++++
+ 1 file changed, 17 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 127a078..7ee82a7 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -89,6 +89,23 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     dnl (The --clear flag to pyvenv will not clobber a plain file.)
+     AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
++    dnl System site packages are disabled.
+     sage_spkg_install_$1=yes
++
++    dnl We have to retroactively hack the --with-system-foo={no,yes,force}
++    dnl mechanism here because it wasn't designed with the ability to
++    dnl disable arbitrary chunks of system packages in mind. The easy cases
++    dnl are "no" and "force" which require no action; "no" means we won't
++    dnl suggest the package anyway, and "force" will raise an error when
++    dnl the system-package check fails.
++    dnl
++    dnl The default of "yes" is more troubling because it is the default. To
++    dnl avoid prompting users to install packages that won't be used, we want
++    dnl to ignore "yes" when reporting the "hint: install these packages..."
++    dnl at the end of ./configure. To accomplish that, we change "yes" to
++    dnl "no" here, essentially changing the default for packages using this
++    dnl macro when --enable-system-site-packages is disabled. Packages with
++    dnl "no" are not suggested to the user.
++    AS_IF([test "${sage_use_system_$1}" = "yes"],[sage_use_system_$1=no])
+   ])
+ ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3e6ad737b94aaac234d615ecaf1a2455eb607f1a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 17 Oct 2021 06:16:21 -0400
+Subject: Trac #29665: add Gentoo package information for python packages.
+
+---
+ build/pkgs/babel/distros/gentoo.txt         | 1 +
+ build/pkgs/bleach/distros/gentoo.txt        | 1 +
+ build/pkgs/certifi/distros/gentoo.txt       | 1 +
+ build/pkgs/cvxopt/distros/gentoo.txt        | 1 +
+ build/pkgs/decorator/distros/gentoo.txt     | 1 +
+ build/pkgs/html5lib/distros/gentoo.txt      | 1 +
+ build/pkgs/idna/distros/gentoo.txt          | 1 +
+ build/pkgs/jinja2/distros/gentoo.txt        | 1 +
+ build/pkgs/matplotlib/distros/gentoo.txt    | 1 +
+ build/pkgs/mpmath/distros/gentoo.txt        | 1 +
+ build/pkgs/networkx/distros/gentoo.txt      | 1 +
+ build/pkgs/numpy/distros/gentoo.txt         | 1 +
+ build/pkgs/packaging/distros/gentoo.txt     | 1 +
+ build/pkgs/pandocfilters/distros/gentoo.txt | 1 +
+ build/pkgs/pickleshare/distros/gentoo.txt   | 1 +
+ build/pkgs/pillow/distros/gentoo.txt        | 1 +
+ build/pkgs/pluggy/distros/gentoo.txt        | 1 +
+ build/pkgs/pygments/distros/gentoo.txt      | 1 +
+ build/pkgs/pytz/distros/gentoo.txt          | 1 +
+ build/pkgs/pyzmq/distros/gentoo.txt         | 1 +
+ build/pkgs/requests/distros/gentoo.txt      | 1 +
+ build/pkgs/scipy/distros/gentoo.txt         | 1 +
+ build/pkgs/setuptools/distros/gentoo.txt    | 1 +
+ build/pkgs/six/distros/gentoo.txt           | 1 +
+ build/pkgs/sympy/distros/gentoo.txt         | 1 +
+ build/pkgs/texttable/distros/gentoo.txt     | 1 +
+ build/pkgs/toml/distros/gentoo.txt          | 1 +
+ build/pkgs/webencodings/distros/gentoo.txt  | 1 +
+ 28 files changed, 28 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/gentoo.txt
+ create mode 100644 build/pkgs/bleach/distros/gentoo.txt
+ create mode 100644 build/pkgs/certifi/distros/gentoo.txt
+ create mode 100644 build/pkgs/cvxopt/distros/gentoo.txt
+ create mode 100644 build/pkgs/decorator/distros/gentoo.txt
+ create mode 100644 build/pkgs/html5lib/distros/gentoo.txt
+ create mode 100644 build/pkgs/idna/distros/gentoo.txt
+ create mode 100644 build/pkgs/jinja2/distros/gentoo.txt
+ create mode 100644 build/pkgs/matplotlib/distros/gentoo.txt
+ create mode 100644 build/pkgs/mpmath/distros/gentoo.txt
+ create mode 100644 build/pkgs/networkx/distros/gentoo.txt
+ create mode 100644 build/pkgs/numpy/distros/gentoo.txt
+ create mode 100644 build/pkgs/packaging/distros/gentoo.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/gentoo.txt
+ create mode 100644 build/pkgs/pickleshare/distros/gentoo.txt
+ create mode 100644 build/pkgs/pillow/distros/gentoo.txt
+ create mode 100644 build/pkgs/pluggy/distros/gentoo.txt
+ create mode 100644 build/pkgs/pygments/distros/gentoo.txt
+ create mode 100644 build/pkgs/pytz/distros/gentoo.txt
+ create mode 100644 build/pkgs/pyzmq/distros/gentoo.txt
+ create mode 100644 build/pkgs/requests/distros/gentoo.txt
+ create mode 100644 build/pkgs/scipy/distros/gentoo.txt
+ create mode 100644 build/pkgs/setuptools/distros/gentoo.txt
+ create mode 100644 build/pkgs/six/distros/gentoo.txt
+ create mode 100644 build/pkgs/sympy/distros/gentoo.txt
+ create mode 100644 build/pkgs/texttable/distros/gentoo.txt
+ create mode 100644 build/pkgs/toml/distros/gentoo.txt
+ create mode 100644 build/pkgs/webencodings/distros/gentoo.txt
+
+diff --git a/build/pkgs/babel/distros/gentoo.txt b/build/pkgs/babel/distros/gentoo.txt
+new file mode 100644
+index 00000000..2d2c34f
+--- /dev/null
++++ b/build/pkgs/babel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/Babel
+diff --git a/build/pkgs/bleach/distros/gentoo.txt b/build/pkgs/bleach/distros/gentoo.txt
+new file mode 100644
+index 00000000..b4f9744
+--- /dev/null
++++ b/build/pkgs/bleach/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/bleach
+diff --git a/build/pkgs/certifi/distros/gentoo.txt b/build/pkgs/certifi/distros/gentoo.txt
+new file mode 100644
+index 00000000..72e2e91
+--- /dev/null
++++ b/build/pkgs/certifi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/certifi
+diff --git a/build/pkgs/cvxopt/distros/gentoo.txt b/build/pkgs/cvxopt/distros/gentoo.txt
+new file mode 100644
+index 00000000..b312391
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/cvxopt
+diff --git a/build/pkgs/decorator/distros/gentoo.txt b/build/pkgs/decorator/distros/gentoo.txt
+new file mode 100644
+index 00000000..fea5a67
+--- /dev/null
++++ b/build/pkgs/decorator/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/decorator
+diff --git a/build/pkgs/html5lib/distros/gentoo.txt b/build/pkgs/html5lib/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c2be76
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/html5lib
+diff --git a/build/pkgs/idna/distros/gentoo.txt b/build/pkgs/idna/distros/gentoo.txt
+new file mode 100644
+index 00000000..68ef51c
+--- /dev/null
++++ b/build/pkgs/idna/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/idna
+diff --git a/build/pkgs/jinja2/distros/gentoo.txt b/build/pkgs/jinja2/distros/gentoo.txt
+new file mode 100644
+index 00000000..15a27ae
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jinja
+diff --git a/build/pkgs/matplotlib/distros/gentoo.txt b/build/pkgs/matplotlib/distros/gentoo.txt
+new file mode 100644
+index 00000000..bcfefb5
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/matplotlib
+diff --git a/build/pkgs/mpmath/distros/gentoo.txt b/build/pkgs/mpmath/distros/gentoo.txt
+new file mode 100644
+index 00000000..946c62d
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/mpmath
+diff --git a/build/pkgs/networkx/distros/gentoo.txt b/build/pkgs/networkx/distros/gentoo.txt
+new file mode 100644
+index 00000000..dd97742
+--- /dev/null
++++ b/build/pkgs/networkx/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/networkx
+diff --git a/build/pkgs/numpy/distros/gentoo.txt b/build/pkgs/numpy/distros/gentoo.txt
+new file mode 100644
+index 00000000..d2179d4
+--- /dev/null
++++ b/build/pkgs/numpy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/numpy
+diff --git a/build/pkgs/packaging/distros/gentoo.txt b/build/pkgs/packaging/distros/gentoo.txt
+new file mode 100644
+index 00000000..e5309ed
+--- /dev/null
++++ b/build/pkgs/packaging/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/packaging
+diff --git a/build/pkgs/pandocfilters/distros/gentoo.txt b/build/pkgs/pandocfilters/distros/gentoo.txt
+new file mode 100644
+index 00000000..a726fda
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/gentoo.txt b/build/pkgs/pickleshare/distros/gentoo.txt
+new file mode 100644
+index 00000000..14fad0f
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pickleshare
+diff --git a/build/pkgs/pillow/distros/gentoo.txt b/build/pkgs/pillow/distros/gentoo.txt
+new file mode 100644
+index 00000000..1243649
+--- /dev/null
++++ b/build/pkgs/pillow/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pillow
+diff --git a/build/pkgs/pluggy/distros/gentoo.txt b/build/pkgs/pluggy/distros/gentoo.txt
+new file mode 100644
+index 00000000..7b33876
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pluggy
+diff --git a/build/pkgs/pygments/distros/gentoo.txt b/build/pkgs/pygments/distros/gentoo.txt
+new file mode 100644
+index 00000000..a584f32
+--- /dev/null
++++ b/build/pkgs/pygments/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pygments
+diff --git a/build/pkgs/pytz/distros/gentoo.txt b/build/pkgs/pytz/distros/gentoo.txt
+new file mode 100644
+index 00000000..902a18b
+--- /dev/null
++++ b/build/pkgs/pytz/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pytz
+diff --git a/build/pkgs/pyzmq/distros/gentoo.txt b/build/pkgs/pyzmq/distros/gentoo.txt
+new file mode 100644
+index 00000000..77c2429
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyzmq
+diff --git a/build/pkgs/requests/distros/gentoo.txt b/build/pkgs/requests/distros/gentoo.txt
+new file mode 100644
+index 00000000..d3dc941
+--- /dev/null
++++ b/build/pkgs/requests/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/requests
+diff --git a/build/pkgs/scipy/distros/gentoo.txt b/build/pkgs/scipy/distros/gentoo.txt
+new file mode 100644
+index 00000000..11dabd2
+--- /dev/null
++++ b/build/pkgs/scipy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/scipy
+diff --git a/build/pkgs/setuptools/distros/gentoo.txt b/build/pkgs/setuptools/distros/gentoo.txt
+new file mode 100644
+index 00000000..3a4fa34
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/setuptools
+diff --git a/build/pkgs/six/distros/gentoo.txt b/build/pkgs/six/distros/gentoo.txt
+new file mode 100644
+index 00000000..f73f648
+--- /dev/null
++++ b/build/pkgs/six/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/six
+diff --git a/build/pkgs/sympy/distros/gentoo.txt b/build/pkgs/sympy/distros/gentoo.txt
+new file mode 100644
+index 00000000..b5a5034
+--- /dev/null
++++ b/build/pkgs/sympy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sympy
+diff --git a/build/pkgs/texttable/distros/gentoo.txt b/build/pkgs/texttable/distros/gentoo.txt
+new file mode 100644
+index 00000000..b33a7a7
+--- /dev/null
++++ b/build/pkgs/texttable/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/texttable
+diff --git a/build/pkgs/toml/distros/gentoo.txt b/build/pkgs/toml/distros/gentoo.txt
+new file mode 100644
+index 00000000..64fcea3
+--- /dev/null
++++ b/build/pkgs/toml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/toml
+diff --git a/build/pkgs/webencodings/distros/gentoo.txt b/build/pkgs/webencodings/distros/gentoo.txt
+new file mode 100644
+index 00000000..7539b0f
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/webencodings
+-- 
+cgit v1.0-1-gd88e
+
+
+From 088380f884124c9608160b613ba031c5f023f604 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 18:43:04 -0700
+Subject: build/pkgs: Add distros/fedora.txt for Python packages
+
+---
+ build/pkgs/babel/distros/fedora.txt         | 1 +
+ build/pkgs/bleach/distros/fedora.txt        | 1 +
+ build/pkgs/certifi/distros/fedora.txt       | 1 +
+ build/pkgs/cvxopt/distros/fedora.txt        | 1 +
+ build/pkgs/decorator/distros/fedora.txt     | 1 +
+ build/pkgs/html5lib/distros/fedora.txt      | 1 +
+ build/pkgs/idna/distros/fedora.txt          | 1 +
+ build/pkgs/jinja2/distros/fedora.txt        | 1 +
+ build/pkgs/matplotlib/distros/fedora.txt    | 1 +
+ build/pkgs/mpmath/distros/fedora.txt        | 1 +
+ build/pkgs/networkx/distros/fedora.txt      | 1 +
+ build/pkgs/numpy/distros/fedora.txt         | 1 +
+ build/pkgs/packaging/distros/fedora.txt     | 1 +
+ build/pkgs/pandocfilters/distros/fedora.txt | 1 +
+ build/pkgs/pickleshare/distros/fedora.txt   | 1 +
+ build/pkgs/pillow/distros/fedora.txt        | 1 +
+ build/pkgs/pluggy/distros/fedora.txt        | 1 +
+ build/pkgs/py/distros/fedora.txt            | 1 +
+ build/pkgs/pygments/distros/fedora.txt      | 1 +
+ build/pkgs/pytz/distros/fedora.txt          | 1 +
+ build/pkgs/pyzmq/distros/fedora.txt         | 1 +
+ build/pkgs/requests/distros/fedora.txt      | 1 +
+ build/pkgs/scipy/distros/fedora.txt         | 1 +
+ build/pkgs/setuptools/distros/fedora.txt    | 1 +
+ build/pkgs/six/distros/fedora.txt           | 1 +
+ build/pkgs/sympy/distros/fedora.txt         | 1 +
+ build/pkgs/texttable/distros/fedora.txt     | 1 +
+ build/pkgs/toml/distros/fedora.txt          | 1 +
+ build/pkgs/webencodings/distros/fedora.txt  | 1 +
+ build/pkgs/wheel/distros/fedora.txt         | 1 +
+ 30 files changed, 30 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/fedora.txt
+ create mode 100644 build/pkgs/bleach/distros/fedora.txt
+ create mode 100644 build/pkgs/certifi/distros/fedora.txt
+ create mode 100644 build/pkgs/cvxopt/distros/fedora.txt
+ create mode 100644 build/pkgs/decorator/distros/fedora.txt
+ create mode 100644 build/pkgs/html5lib/distros/fedora.txt
+ create mode 100644 build/pkgs/idna/distros/fedora.txt
+ create mode 100644 build/pkgs/jinja2/distros/fedora.txt
+ create mode 100644 build/pkgs/matplotlib/distros/fedora.txt
+ create mode 100644 build/pkgs/mpmath/distros/fedora.txt
+ create mode 100644 build/pkgs/networkx/distros/fedora.txt
+ create mode 100644 build/pkgs/numpy/distros/fedora.txt
+ create mode 100644 build/pkgs/packaging/distros/fedora.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/fedora.txt
+ create mode 100644 build/pkgs/pickleshare/distros/fedora.txt
+ create mode 100644 build/pkgs/pillow/distros/fedora.txt
+ create mode 100644 build/pkgs/pluggy/distros/fedora.txt
+ create mode 100644 build/pkgs/py/distros/fedora.txt
+ create mode 100644 build/pkgs/pygments/distros/fedora.txt
+ create mode 100644 build/pkgs/pytz/distros/fedora.txt
+ create mode 100644 build/pkgs/pyzmq/distros/fedora.txt
+ create mode 100644 build/pkgs/requests/distros/fedora.txt
+ create mode 100644 build/pkgs/scipy/distros/fedora.txt
+ create mode 100644 build/pkgs/setuptools/distros/fedora.txt
+ create mode 100644 build/pkgs/six/distros/fedora.txt
+ create mode 100644 build/pkgs/sympy/distros/fedora.txt
+ create mode 100644 build/pkgs/texttable/distros/fedora.txt
+ create mode 100644 build/pkgs/toml/distros/fedora.txt
+ create mode 100644 build/pkgs/webencodings/distros/fedora.txt
+ create mode 100644 build/pkgs/wheel/distros/fedora.txt
+
+diff --git a/build/pkgs/babel/distros/fedora.txt b/build/pkgs/babel/distros/fedora.txt
+new file mode 100644
+index 00000000..98f6593
+--- /dev/null
++++ b/build/pkgs/babel/distros/fedora.txt
+@@ -0,0 +1 @@
++babel
+diff --git a/build/pkgs/bleach/distros/fedora.txt b/build/pkgs/bleach/distros/fedora.txt
+new file mode 100644
+index 00000000..c5422cc
+--- /dev/null
++++ b/build/pkgs/bleach/distros/fedora.txt
+@@ -0,0 +1 @@
++python-bleach
+diff --git a/build/pkgs/certifi/distros/fedora.txt b/build/pkgs/certifi/distros/fedora.txt
+new file mode 100644
+index 00000000..be421c8
+--- /dev/null
++++ b/build/pkgs/certifi/distros/fedora.txt
+@@ -0,0 +1 @@
++python-certifi
+diff --git a/build/pkgs/cvxopt/distros/fedora.txt b/build/pkgs/cvxopt/distros/fedora.txt
+new file mode 100644
+index 00000000..f15770f
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/fedora.txt
+@@ -0,0 +1 @@
++python-cvxopt
+diff --git a/build/pkgs/decorator/distros/fedora.txt b/build/pkgs/decorator/distros/fedora.txt
+new file mode 100644
+index 00000000..0795604
+--- /dev/null
++++ b/build/pkgs/decorator/distros/fedora.txt
+@@ -0,0 +1 @@
++python-decorator
+diff --git a/build/pkgs/html5lib/distros/fedora.txt b/build/pkgs/html5lib/distros/fedora.txt
+new file mode 100644
+index 00000000..b821491
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/fedora.txt
+@@ -0,0 +1 @@
++python-html5lib
+diff --git a/build/pkgs/idna/distros/fedora.txt b/build/pkgs/idna/distros/fedora.txt
+new file mode 100644
+index 00000000..a73e70c
+--- /dev/null
++++ b/build/pkgs/idna/distros/fedora.txt
+@@ -0,0 +1 @@
++python-idna
+diff --git a/build/pkgs/jinja2/distros/fedora.txt b/build/pkgs/jinja2/distros/fedora.txt
+new file mode 100644
+index 00000000..f5f3caf
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/fedora.txt
+@@ -0,0 +1 @@
++python-jinja2
+diff --git a/build/pkgs/matplotlib/distros/fedora.txt b/build/pkgs/matplotlib/distros/fedora.txt
+new file mode 100644
+index 00000000..f6d856e
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/fedora.txt
+@@ -0,0 +1 @@
++python-matplotlib
+diff --git a/build/pkgs/mpmath/distros/fedora.txt b/build/pkgs/mpmath/distros/fedora.txt
+new file mode 100644
+index 00000000..a7dc8d5
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/fedora.txt
+@@ -0,0 +1 @@
++python-mpmath
+diff --git a/build/pkgs/networkx/distros/fedora.txt b/build/pkgs/networkx/distros/fedora.txt
+new file mode 100644
+index 00000000..293f943
+--- /dev/null
++++ b/build/pkgs/networkx/distros/fedora.txt
+@@ -0,0 +1 @@
++python-networkx
+diff --git a/build/pkgs/numpy/distros/fedora.txt b/build/pkgs/numpy/distros/fedora.txt
+new file mode 100644
+index 00000000..c8722b9
+--- /dev/null
++++ b/build/pkgs/numpy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-numpy
+diff --git a/build/pkgs/packaging/distros/fedora.txt b/build/pkgs/packaging/distros/fedora.txt
+new file mode 100644
+index 00000000..02ad855
+--- /dev/null
++++ b/build/pkgs/packaging/distros/fedora.txt
+@@ -0,0 +1 @@
++python-packaging
+diff --git a/build/pkgs/pandocfilters/distros/fedora.txt b/build/pkgs/pandocfilters/distros/fedora.txt
+new file mode 100644
+index 00000000..e7a86d0
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/fedora.txt b/build/pkgs/pickleshare/distros/fedora.txt
+new file mode 100644
+index 00000000..6d991a2
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pickleshare
+diff --git a/build/pkgs/pillow/distros/fedora.txt b/build/pkgs/pillow/distros/fedora.txt
+new file mode 100644
+index 00000000..86dbb1d
+--- /dev/null
++++ b/build/pkgs/pillow/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pillow
+diff --git a/build/pkgs/pluggy/distros/fedora.txt b/build/pkgs/pluggy/distros/fedora.txt
+new file mode 100644
+index 00000000..c869e54
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pluggy
+diff --git a/build/pkgs/py/distros/fedora.txt b/build/pkgs/py/distros/fedora.txt
+new file mode 100644
+index 00000000..b348d39
+--- /dev/null
++++ b/build/pkgs/py/distros/fedora.txt
+@@ -0,0 +1 @@
++python-py
+diff --git a/build/pkgs/pygments/distros/fedora.txt b/build/pkgs/pygments/distros/fedora.txt
+new file mode 100644
+index 00000000..f3e72a8
+--- /dev/null
++++ b/build/pkgs/pygments/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pygments
+diff --git a/build/pkgs/pytz/distros/fedora.txt b/build/pkgs/pytz/distros/fedora.txt
+new file mode 100644
+index 00000000..2cccc9e
+--- /dev/null
++++ b/build/pkgs/pytz/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pytz
+diff --git a/build/pkgs/pyzmq/distros/fedora.txt b/build/pkgs/pyzmq/distros/fedora.txt
+new file mode 100644
+index 00000000..23f64d1
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pyzmq
+diff --git a/build/pkgs/requests/distros/fedora.txt b/build/pkgs/requests/distros/fedora.txt
+new file mode 100644
+index 00000000..93a7bc1
+--- /dev/null
++++ b/build/pkgs/requests/distros/fedora.txt
+@@ -0,0 +1 @@
++python-requests
+diff --git a/build/pkgs/scipy/distros/fedora.txt b/build/pkgs/scipy/distros/fedora.txt
+new file mode 100644
+index 00000000..7ff2882
+--- /dev/null
++++ b/build/pkgs/scipy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-scipy
+diff --git a/build/pkgs/setuptools/distros/fedora.txt b/build/pkgs/setuptools/distros/fedora.txt
+new file mode 100644
+index 00000000..e1ad178
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/fedora.txt
+@@ -0,0 +1 @@
++python-setuptools
+diff --git a/build/pkgs/six/distros/fedora.txt b/build/pkgs/six/distros/fedora.txt
+new file mode 100644
+index 00000000..787c530
+--- /dev/null
++++ b/build/pkgs/six/distros/fedora.txt
+@@ -0,0 +1 @@
++python-six
+diff --git a/build/pkgs/sympy/distros/fedora.txt b/build/pkgs/sympy/distros/fedora.txt
+new file mode 100644
+index 00000000..126c88a
+--- /dev/null
++++ b/build/pkgs/sympy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-sympy
+diff --git a/build/pkgs/texttable/distros/fedora.txt b/build/pkgs/texttable/distros/fedora.txt
+new file mode 100644
+index 00000000..8d1ccec
+--- /dev/null
++++ b/build/pkgs/texttable/distros/fedora.txt
+@@ -0,0 +1 @@
++python-texttable
+diff --git a/build/pkgs/toml/distros/fedora.txt b/build/pkgs/toml/distros/fedora.txt
+new file mode 100644
+index 00000000..821ee77
+--- /dev/null
++++ b/build/pkgs/toml/distros/fedora.txt
+@@ -0,0 +1 @@
++python-toml
+diff --git a/build/pkgs/webencodings/distros/fedora.txt b/build/pkgs/webencodings/distros/fedora.txt
+new file mode 100644
+index 00000000..12ddba9
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/fedora.txt
+@@ -0,0 +1 @@
++python-webencodings
+diff --git a/build/pkgs/wheel/distros/fedora.txt b/build/pkgs/wheel/distros/fedora.txt
+new file mode 100644
+index 00000000..ae4cbb9
+--- /dev/null
++++ b/build/pkgs/wheel/distros/fedora.txt
+@@ -0,0 +1 @@
++python-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From ad1d5a20380b147c774903066031442f31094626 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 21:04:04 -0700
+Subject: build/pkgs: Add distros/arch.txt for Python packages
+
+---
+ build/pkgs/babel/distros/arch.txt         | 1 +
+ build/pkgs/bleach/distros/arch.txt        | 1 +
+ build/pkgs/certifi/distros/arch.txt       | 1 +
+ build/pkgs/cvxopt/distros/arch.txt        | 1 +
+ build/pkgs/decorator/distros/arch.txt     | 1 +
+ build/pkgs/html5lib/distros/arch.txt      | 1 +
+ build/pkgs/idna/distros/arch.txt          | 1 +
+ build/pkgs/matplotlib/distros/arch.txt    | 1 +
+ build/pkgs/mpmath/distros/arch.txt        | 1 +
+ build/pkgs/networkx/distros/arch.txt      | 1 +
+ build/pkgs/numpy/distros/arch.txt         | 1 +
+ build/pkgs/packaging/distros/arch.txt     | 1 +
+ build/pkgs/pandocfilters/distros/arch.txt | 1 +
+ build/pkgs/pickleshare/distros/arch.txt   | 1 +
+ build/pkgs/pillow/distros/arch.txt        | 1 +
+ build/pkgs/pluggy/distros/arch.txt        | 1 +
+ build/pkgs/py/distros/arch.txt            | 1 +
+ build/pkgs/pygments/distros/arch.txt      | 1 +
+ build/pkgs/pytz/distros/arch.txt          | 1 +
+ build/pkgs/pyzmq/distros/arch.txt         | 1 +
+ build/pkgs/requests/distros/arch.txt      | 1 +
+ build/pkgs/scipy/distros/arch.txt         | 1 +
+ build/pkgs/setuptools/distros/arch.txt    | 1 +
+ build/pkgs/six/distros/arch.txt           | 1 +
+ build/pkgs/sympy/distros/arch.txt         | 1 +
+ build/pkgs/texttable/distros/arch.txt     | 1 +
+ build/pkgs/toml/distros/arch.txt          | 1 +
+ build/pkgs/webencodings/distros/arch.txt  | 1 +
+ build/pkgs/wheel/distros/arch.txt         | 1 +
+ 29 files changed, 29 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/arch.txt
+ create mode 100644 build/pkgs/bleach/distros/arch.txt
+ create mode 100644 build/pkgs/certifi/distros/arch.txt
+ create mode 100644 build/pkgs/cvxopt/distros/arch.txt
+ create mode 100644 build/pkgs/decorator/distros/arch.txt
+ create mode 100644 build/pkgs/html5lib/distros/arch.txt
+ create mode 100644 build/pkgs/idna/distros/arch.txt
+ create mode 100644 build/pkgs/matplotlib/distros/arch.txt
+ create mode 100644 build/pkgs/mpmath/distros/arch.txt
+ create mode 100644 build/pkgs/networkx/distros/arch.txt
+ create mode 100644 build/pkgs/numpy/distros/arch.txt
+ create mode 100644 build/pkgs/packaging/distros/arch.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/arch.txt
+ create mode 100644 build/pkgs/pickleshare/distros/arch.txt
+ create mode 100644 build/pkgs/pillow/distros/arch.txt
+ create mode 100644 build/pkgs/pluggy/distros/arch.txt
+ create mode 100644 build/pkgs/py/distros/arch.txt
+ create mode 100644 build/pkgs/pygments/distros/arch.txt
+ create mode 100644 build/pkgs/pytz/distros/arch.txt
+ create mode 100644 build/pkgs/pyzmq/distros/arch.txt
+ create mode 100644 build/pkgs/requests/distros/arch.txt
+ create mode 100644 build/pkgs/scipy/distros/arch.txt
+ create mode 100644 build/pkgs/setuptools/distros/arch.txt
+ create mode 100644 build/pkgs/six/distros/arch.txt
+ create mode 100644 build/pkgs/sympy/distros/arch.txt
+ create mode 100644 build/pkgs/texttable/distros/arch.txt
+ create mode 100644 build/pkgs/toml/distros/arch.txt
+ create mode 100644 build/pkgs/webencodings/distros/arch.txt
+ create mode 100644 build/pkgs/wheel/distros/arch.txt
+
+diff --git a/build/pkgs/babel/distros/arch.txt b/build/pkgs/babel/distros/arch.txt
+new file mode 100644
+index 00000000..f2d828c
+--- /dev/null
++++ b/build/pkgs/babel/distros/arch.txt
+@@ -0,0 +1 @@
++python-babel
+diff --git a/build/pkgs/bleach/distros/arch.txt b/build/pkgs/bleach/distros/arch.txt
+new file mode 100644
+index 00000000..c5422cc
+--- /dev/null
++++ b/build/pkgs/bleach/distros/arch.txt
+@@ -0,0 +1 @@
++python-bleach
+diff --git a/build/pkgs/certifi/distros/arch.txt b/build/pkgs/certifi/distros/arch.txt
+new file mode 100644
+index 00000000..be421c8
+--- /dev/null
++++ b/build/pkgs/certifi/distros/arch.txt
+@@ -0,0 +1 @@
++python-certifi
+diff --git a/build/pkgs/cvxopt/distros/arch.txt b/build/pkgs/cvxopt/distros/arch.txt
+new file mode 100644
+index 00000000..f15770f
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/arch.txt
+@@ -0,0 +1 @@
++python-cvxopt
+diff --git a/build/pkgs/decorator/distros/arch.txt b/build/pkgs/decorator/distros/arch.txt
+new file mode 100644
+index 00000000..0795604
+--- /dev/null
++++ b/build/pkgs/decorator/distros/arch.txt
+@@ -0,0 +1 @@
++python-decorator
+diff --git a/build/pkgs/html5lib/distros/arch.txt b/build/pkgs/html5lib/distros/arch.txt
+new file mode 100644
+index 00000000..b821491
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/arch.txt
+@@ -0,0 +1 @@
++python-html5lib
+diff --git a/build/pkgs/idna/distros/arch.txt b/build/pkgs/idna/distros/arch.txt
+new file mode 100644
+index 00000000..a73e70c
+--- /dev/null
++++ b/build/pkgs/idna/distros/arch.txt
+@@ -0,0 +1 @@
++python-idna
+diff --git a/build/pkgs/matplotlib/distros/arch.txt b/build/pkgs/matplotlib/distros/arch.txt
+new file mode 100644
+index 00000000..f6d856e
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/arch.txt
+@@ -0,0 +1 @@
++python-matplotlib
+diff --git a/build/pkgs/mpmath/distros/arch.txt b/build/pkgs/mpmath/distros/arch.txt
+new file mode 100644
+index 00000000..a7dc8d5
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/arch.txt
+@@ -0,0 +1 @@
++python-mpmath
+diff --git a/build/pkgs/networkx/distros/arch.txt b/build/pkgs/networkx/distros/arch.txt
+new file mode 100644
+index 00000000..293f943
+--- /dev/null
++++ b/build/pkgs/networkx/distros/arch.txt
+@@ -0,0 +1 @@
++python-networkx
+diff --git a/build/pkgs/numpy/distros/arch.txt b/build/pkgs/numpy/distros/arch.txt
+new file mode 100644
+index 00000000..c8722b9
+--- /dev/null
++++ b/build/pkgs/numpy/distros/arch.txt
+@@ -0,0 +1 @@
++python-numpy
+diff --git a/build/pkgs/packaging/distros/arch.txt b/build/pkgs/packaging/distros/arch.txt
+new file mode 100644
+index 00000000..02ad855
+--- /dev/null
++++ b/build/pkgs/packaging/distros/arch.txt
+@@ -0,0 +1 @@
++python-packaging
+diff --git a/build/pkgs/pandocfilters/distros/arch.txt b/build/pkgs/pandocfilters/distros/arch.txt
+new file mode 100644
+index 00000000..e7a86d0
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/arch.txt
+@@ -0,0 +1 @@
++python-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/arch.txt b/build/pkgs/pickleshare/distros/arch.txt
+new file mode 100644
+index 00000000..6d991a2
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/arch.txt
+@@ -0,0 +1 @@
++python-pickleshare
+diff --git a/build/pkgs/pillow/distros/arch.txt b/build/pkgs/pillow/distros/arch.txt
+new file mode 100644
+index 00000000..86dbb1d
+--- /dev/null
++++ b/build/pkgs/pillow/distros/arch.txt
+@@ -0,0 +1 @@
++python-pillow
+diff --git a/build/pkgs/pluggy/distros/arch.txt b/build/pkgs/pluggy/distros/arch.txt
+new file mode 100644
+index 00000000..c869e54
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/arch.txt
+@@ -0,0 +1 @@
++python-pluggy
+diff --git a/build/pkgs/py/distros/arch.txt b/build/pkgs/py/distros/arch.txt
+new file mode 100644
+index 00000000..b348d39
+--- /dev/null
++++ b/build/pkgs/py/distros/arch.txt
+@@ -0,0 +1 @@
++python-py
+diff --git a/build/pkgs/pygments/distros/arch.txt b/build/pkgs/pygments/distros/arch.txt
+new file mode 100644
+index 00000000..f3e72a8
+--- /dev/null
++++ b/build/pkgs/pygments/distros/arch.txt
+@@ -0,0 +1 @@
++python-pygments
+diff --git a/build/pkgs/pytz/distros/arch.txt b/build/pkgs/pytz/distros/arch.txt
+new file mode 100644
+index 00000000..2cccc9e
+--- /dev/null
++++ b/build/pkgs/pytz/distros/arch.txt
+@@ -0,0 +1 @@
++python-pytz
+diff --git a/build/pkgs/pyzmq/distros/arch.txt b/build/pkgs/pyzmq/distros/arch.txt
+new file mode 100644
+index 00000000..23f64d1
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/arch.txt
+@@ -0,0 +1 @@
++python-pyzmq
+diff --git a/build/pkgs/requests/distros/arch.txt b/build/pkgs/requests/distros/arch.txt
+new file mode 100644
+index 00000000..93a7bc1
+--- /dev/null
++++ b/build/pkgs/requests/distros/arch.txt
+@@ -0,0 +1 @@
++python-requests
+diff --git a/build/pkgs/scipy/distros/arch.txt b/build/pkgs/scipy/distros/arch.txt
+new file mode 100644
+index 00000000..7ff2882
+--- /dev/null
++++ b/build/pkgs/scipy/distros/arch.txt
+@@ -0,0 +1 @@
++python-scipy
+diff --git a/build/pkgs/setuptools/distros/arch.txt b/build/pkgs/setuptools/distros/arch.txt
+new file mode 100644
+index 00000000..e1ad178
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/arch.txt
+@@ -0,0 +1 @@
++python-setuptools
+diff --git a/build/pkgs/six/distros/arch.txt b/build/pkgs/six/distros/arch.txt
+new file mode 100644
+index 00000000..787c530
+--- /dev/null
++++ b/build/pkgs/six/distros/arch.txt
+@@ -0,0 +1 @@
++python-six
+diff --git a/build/pkgs/sympy/distros/arch.txt b/build/pkgs/sympy/distros/arch.txt
+new file mode 100644
+index 00000000..126c88a
+--- /dev/null
++++ b/build/pkgs/sympy/distros/arch.txt
+@@ -0,0 +1 @@
++python-sympy
+diff --git a/build/pkgs/texttable/distros/arch.txt b/build/pkgs/texttable/distros/arch.txt
+new file mode 100644
+index 00000000..8d1ccec
+--- /dev/null
++++ b/build/pkgs/texttable/distros/arch.txt
+@@ -0,0 +1 @@
++python-texttable
+diff --git a/build/pkgs/toml/distros/arch.txt b/build/pkgs/toml/distros/arch.txt
+new file mode 100644
+index 00000000..821ee77
+--- /dev/null
++++ b/build/pkgs/toml/distros/arch.txt
+@@ -0,0 +1 @@
++python-toml
+diff --git a/build/pkgs/webencodings/distros/arch.txt b/build/pkgs/webencodings/distros/arch.txt
+new file mode 100644
+index 00000000..12ddba9
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/arch.txt
+@@ -0,0 +1 @@
++python-webencodings
+diff --git a/build/pkgs/wheel/distros/arch.txt b/build/pkgs/wheel/distros/arch.txt
+new file mode 100644
+index 00000000..ae4cbb9
+--- /dev/null
++++ b/build/pkgs/wheel/distros/arch.txt
+@@ -0,0 +1 @@
++python-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5087abee08f2a89ddaf422ec72a84575fe724a79 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 21:20:56 -0700
+Subject: build/pkgs: Add distros/opensuse.txt for Python packages
+
+---
+ build/pkgs/bleach/distros/opensuse.txt        | 1 +
+ build/pkgs/cvxopt/distros/opensuse.txt        | 1 +
+ build/pkgs/html5lib/distros/opensuse.txt      | 1 +
+ build/pkgs/idna/distros/opensuse.txt          | 1 +
+ build/pkgs/jinja2/distros/opensuse.txt        | 2 +-
+ build/pkgs/mpmath/distros/opensuse.txt        | 1 +
+ build/pkgs/numpy/distros/opensuse.txt         | 1 +
+ build/pkgs/packaging/distros/opensuse.txt     | 1 +
+ build/pkgs/pandocfilters/distros/opensuse.txt | 1 +
+ build/pkgs/pluggy/distros/opensuse.txt        | 1 +
+ build/pkgs/py/distros/opensuse.txt            | 1 +
+ build/pkgs/pygments/distros/opensuse.txt      | 2 +-
+ build/pkgs/sympy/distros/opensuse.txt         | 1 +
+ build/pkgs/texttable/distros/opensuse.txt     | 1 +
+ build/pkgs/toml/distros/opensuse.txt          | 1 +
+ 15 files changed, 15 insertions(+), 2 deletions(-)
+ create mode 100644 build/pkgs/bleach/distros/opensuse.txt
+ create mode 100644 build/pkgs/cvxopt/distros/opensuse.txt
+ create mode 100644 build/pkgs/html5lib/distros/opensuse.txt
+ create mode 100644 build/pkgs/idna/distros/opensuse.txt
+ create mode 100644 build/pkgs/mpmath/distros/opensuse.txt
+ create mode 100644 build/pkgs/numpy/distros/opensuse.txt
+ create mode 100644 build/pkgs/packaging/distros/opensuse.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/opensuse.txt
+ create mode 100644 build/pkgs/pluggy/distros/opensuse.txt
+ create mode 100644 build/pkgs/py/distros/opensuse.txt
+ create mode 100644 build/pkgs/sympy/distros/opensuse.txt
+ create mode 100644 build/pkgs/texttable/distros/opensuse.txt
+ create mode 100644 build/pkgs/toml/distros/opensuse.txt
+
+diff --git a/build/pkgs/bleach/distros/opensuse.txt b/build/pkgs/bleach/distros/opensuse.txt
+new file mode 100644
+index 00000000..6d37c4c
+--- /dev/null
++++ b/build/pkgs/bleach/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-bleach
+diff --git a/build/pkgs/cvxopt/distros/opensuse.txt b/build/pkgs/cvxopt/distros/opensuse.txt
+new file mode 100644
+index 00000000..2bb6ad1
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-cvxopt
+diff --git a/build/pkgs/html5lib/distros/opensuse.txt b/build/pkgs/html5lib/distros/opensuse.txt
+new file mode 100644
+index 00000000..6d7b8df
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-html5lib
+diff --git a/build/pkgs/idna/distros/opensuse.txt b/build/pkgs/idna/distros/opensuse.txt
+new file mode 100644
+index 00000000..de48e70
+--- /dev/null
++++ b/build/pkgs/idna/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-idna
+diff --git a/build/pkgs/jinja2/distros/opensuse.txt b/build/pkgs/jinja2/distros/opensuse.txt
+index 5d90a22..f2db865 100644
+--- a/build/pkgs/jinja2/distros/opensuse.txt
++++ b/build/pkgs/jinja2/distros/opensuse.txt
+@@ -1 +1 @@
+-python3-Jinja2
++python3-jinja2
+diff --git a/build/pkgs/mpmath/distros/opensuse.txt b/build/pkgs/mpmath/distros/opensuse.txt
+new file mode 100644
+index 00000000..fbc82a9
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-mpmath
+diff --git a/build/pkgs/numpy/distros/opensuse.txt b/build/pkgs/numpy/distros/opensuse.txt
+new file mode 100644
+index 00000000..79d5c5a
+--- /dev/null
++++ b/build/pkgs/numpy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-numpy
+diff --git a/build/pkgs/packaging/distros/opensuse.txt b/build/pkgs/packaging/distros/opensuse.txt
+new file mode 100644
+index 00000000..8f1c0ff
+--- /dev/null
++++ b/build/pkgs/packaging/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-packaging
+diff --git a/build/pkgs/pandocfilters/distros/opensuse.txt b/build/pkgs/pandocfilters/distros/opensuse.txt
+new file mode 100644
+index 00000000..d0d4c24
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-pandocfilters
+diff --git a/build/pkgs/pluggy/distros/opensuse.txt b/build/pkgs/pluggy/distros/opensuse.txt
+new file mode 100644
+index 00000000..43a3acf
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-pluggy
+diff --git a/build/pkgs/py/distros/opensuse.txt b/build/pkgs/py/distros/opensuse.txt
+new file mode 100644
+index 00000000..81fefe6
+--- /dev/null
++++ b/build/pkgs/py/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-py
+diff --git a/build/pkgs/pygments/distros/opensuse.txt b/build/pkgs/pygments/distros/opensuse.txt
+index 9ff5740..3ab3792 100644
+--- a/build/pkgs/pygments/distros/opensuse.txt
++++ b/build/pkgs/pygments/distros/opensuse.txt
+@@ -1 +1 @@
+-python3-Pygments
++python3-pygments
+diff --git a/build/pkgs/sympy/distros/opensuse.txt b/build/pkgs/sympy/distros/opensuse.txt
+new file mode 100644
+index 00000000..db423c8
+--- /dev/null
++++ b/build/pkgs/sympy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-sympy
+diff --git a/build/pkgs/texttable/distros/opensuse.txt b/build/pkgs/texttable/distros/opensuse.txt
+new file mode 100644
+index 00000000..8f8e7e2
+--- /dev/null
++++ b/build/pkgs/texttable/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-texttable
+diff --git a/build/pkgs/toml/distros/opensuse.txt b/build/pkgs/toml/distros/opensuse.txt
+new file mode 100644
+index 00000000..543e89d
+--- /dev/null
++++ b/build/pkgs/toml/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-toml
+-- 
+cgit v1.0-1-gd88e
+
+
+From a480ba7ace1370d106ae831e904ea22b72af1be7 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 22:45:04 -0700
+Subject: build/pkgs: Add distros/debian.txt for Python packages
+
+---
+ build/pkgs/babel/distros/debian.txt         | 1 +
+ build/pkgs/bleach/distros/debian.txt        | 1 +
+ build/pkgs/certifi/distros/debian.txt       | 1 +
+ build/pkgs/cvxopt/distros/debian.txt        | 1 +
+ build/pkgs/decorator/distros/debian.txt     | 1 +
+ build/pkgs/html5lib/distros/debian.txt      | 1 +
+ build/pkgs/idna/distros/debian.txt          | 1 +
+ build/pkgs/jinja2/distros/debian.txt        | 1 +
+ build/pkgs/matplotlib/distros/debian.txt    | 1 +
+ build/pkgs/mpmath/distros/debian.txt        | 1 +
+ build/pkgs/networkx/distros/debian.txt      | 1 +
+ build/pkgs/numpy/distros/debian.txt         | 1 +
+ build/pkgs/packaging/distros/debian.txt     | 1 +
+ build/pkgs/pandocfilters/distros/debian.txt | 1 +
+ build/pkgs/pickleshare/distros/debian.txt   | 1 +
+ build/pkgs/pillow/distros/debian.txt        | 1 +
+ build/pkgs/pluggy/distros/debian.txt        | 1 +
+ build/pkgs/py/distros/debian.txt            | 1 +
+ build/pkgs/pygments/distros/debian.txt      | 1 +
+ build/pkgs/pytz/distros/debian.txt          | 1 +
+ build/pkgs/requests/distros/debian.txt      | 1 +
+ build/pkgs/scipy/distros/debian.txt         | 1 +
+ build/pkgs/setuptools/distros/debian.txt    | 1 +
+ build/pkgs/six/distros/debian.txt           | 1 +
+ build/pkgs/sympy/distros/debian.txt         | 1 +
+ build/pkgs/texttable/distros/debian.txt     | 1 +
+ build/pkgs/toml/distros/debian.txt          | 1 +
+ build/pkgs/webencodings/distros/debian.txt  | 1 +
+ build/pkgs/wheel/distros/debian.txt         | 1 +
+ 29 files changed, 29 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/debian.txt
+ create mode 100644 build/pkgs/bleach/distros/debian.txt
+ create mode 100644 build/pkgs/certifi/distros/debian.txt
+ create mode 100644 build/pkgs/cvxopt/distros/debian.txt
+ create mode 100644 build/pkgs/decorator/distros/debian.txt
+ create mode 100644 build/pkgs/html5lib/distros/debian.txt
+ create mode 100644 build/pkgs/idna/distros/debian.txt
+ create mode 100644 build/pkgs/jinja2/distros/debian.txt
+ create mode 100644 build/pkgs/matplotlib/distros/debian.txt
+ create mode 100644 build/pkgs/mpmath/distros/debian.txt
+ create mode 100644 build/pkgs/networkx/distros/debian.txt
+ create mode 100644 build/pkgs/numpy/distros/debian.txt
+ create mode 100644 build/pkgs/packaging/distros/debian.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/debian.txt
+ create mode 100644 build/pkgs/pickleshare/distros/debian.txt
+ create mode 100644 build/pkgs/pillow/distros/debian.txt
+ create mode 100644 build/pkgs/pluggy/distros/debian.txt
+ create mode 100644 build/pkgs/py/distros/debian.txt
+ create mode 100644 build/pkgs/pygments/distros/debian.txt
+ create mode 100644 build/pkgs/pytz/distros/debian.txt
+ create mode 100644 build/pkgs/requests/distros/debian.txt
+ create mode 100644 build/pkgs/scipy/distros/debian.txt
+ create mode 100644 build/pkgs/setuptools/distros/debian.txt
+ create mode 100644 build/pkgs/six/distros/debian.txt
+ create mode 100644 build/pkgs/sympy/distros/debian.txt
+ create mode 100644 build/pkgs/texttable/distros/debian.txt
+ create mode 100644 build/pkgs/toml/distros/debian.txt
+ create mode 100644 build/pkgs/webencodings/distros/debian.txt
+ create mode 100644 build/pkgs/wheel/distros/debian.txt
+
+diff --git a/build/pkgs/babel/distros/debian.txt b/build/pkgs/babel/distros/debian.txt
+new file mode 100644
+index 00000000..e623eb6
+--- /dev/null
++++ b/build/pkgs/babel/distros/debian.txt
+@@ -0,0 +1 @@
++python3-babel
+diff --git a/build/pkgs/bleach/distros/debian.txt b/build/pkgs/bleach/distros/debian.txt
+new file mode 100644
+index 00000000..6d37c4c
+--- /dev/null
++++ b/build/pkgs/bleach/distros/debian.txt
+@@ -0,0 +1 @@
++python3-bleach
+diff --git a/build/pkgs/certifi/distros/debian.txt b/build/pkgs/certifi/distros/debian.txt
+new file mode 100644
+index 00000000..f585a82
+--- /dev/null
++++ b/build/pkgs/certifi/distros/debian.txt
+@@ -0,0 +1 @@
++python3-certifi
+diff --git a/build/pkgs/cvxopt/distros/debian.txt b/build/pkgs/cvxopt/distros/debian.txt
+new file mode 100644
+index 00000000..2bb6ad1
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/debian.txt
+@@ -0,0 +1 @@
++python3-cvxopt
+diff --git a/build/pkgs/decorator/distros/debian.txt b/build/pkgs/decorator/distros/debian.txt
+new file mode 100644
+index 00000000..46c478e
+--- /dev/null
++++ b/build/pkgs/decorator/distros/debian.txt
+@@ -0,0 +1 @@
++python3-decorator
+diff --git a/build/pkgs/html5lib/distros/debian.txt b/build/pkgs/html5lib/distros/debian.txt
+new file mode 100644
+index 00000000..6d7b8df
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/debian.txt
+@@ -0,0 +1 @@
++python3-html5lib
+diff --git a/build/pkgs/idna/distros/debian.txt b/build/pkgs/idna/distros/debian.txt
+new file mode 100644
+index 00000000..de48e70
+--- /dev/null
++++ b/build/pkgs/idna/distros/debian.txt
+@@ -0,0 +1 @@
++python3-idna
+diff --git a/build/pkgs/jinja2/distros/debian.txt b/build/pkgs/jinja2/distros/debian.txt
+new file mode 100644
+index 00000000..f2db865
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/debian.txt
+@@ -0,0 +1 @@
++python3-jinja2
+diff --git a/build/pkgs/matplotlib/distros/debian.txt b/build/pkgs/matplotlib/distros/debian.txt
+new file mode 100644
+index 00000000..1374329
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/debian.txt
+@@ -0,0 +1 @@
++python3-matplotlib
+diff --git a/build/pkgs/mpmath/distros/debian.txt b/build/pkgs/mpmath/distros/debian.txt
+new file mode 100644
+index 00000000..fbc82a9
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/debian.txt
+@@ -0,0 +1 @@
++python3-mpmath
+diff --git a/build/pkgs/networkx/distros/debian.txt b/build/pkgs/networkx/distros/debian.txt
+new file mode 100644
+index 00000000..6779066
+--- /dev/null
++++ b/build/pkgs/networkx/distros/debian.txt
+@@ -0,0 +1 @@
++python3-networkx
+diff --git a/build/pkgs/numpy/distros/debian.txt b/build/pkgs/numpy/distros/debian.txt
+new file mode 100644
+index 00000000..79d5c5a
+--- /dev/null
++++ b/build/pkgs/numpy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-numpy
+diff --git a/build/pkgs/packaging/distros/debian.txt b/build/pkgs/packaging/distros/debian.txt
+new file mode 100644
+index 00000000..8f1c0ff
+--- /dev/null
++++ b/build/pkgs/packaging/distros/debian.txt
+@@ -0,0 +1 @@
++python3-packaging
+diff --git a/build/pkgs/pandocfilters/distros/debian.txt b/build/pkgs/pandocfilters/distros/debian.txt
+new file mode 100644
+index 00000000..d0d4c24
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/debian.txt b/build/pkgs/pickleshare/distros/debian.txt
+new file mode 100644
+index 00000000..a00907d
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pickleshare
+diff --git a/build/pkgs/pillow/distros/debian.txt b/build/pkgs/pillow/distros/debian.txt
+new file mode 100644
+index 00000000..3319fcd
+--- /dev/null
++++ b/build/pkgs/pillow/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pillow
+diff --git a/build/pkgs/pluggy/distros/debian.txt b/build/pkgs/pluggy/distros/debian.txt
+new file mode 100644
+index 00000000..43a3acf
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pluggy
+diff --git a/build/pkgs/py/distros/debian.txt b/build/pkgs/py/distros/debian.txt
+new file mode 100644
+index 00000000..81fefe6
+--- /dev/null
++++ b/build/pkgs/py/distros/debian.txt
+@@ -0,0 +1 @@
++python3-py
+diff --git a/build/pkgs/pygments/distros/debian.txt b/build/pkgs/pygments/distros/debian.txt
+new file mode 100644
+index 00000000..3ab3792
+--- /dev/null
++++ b/build/pkgs/pygments/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pygments
+diff --git a/build/pkgs/pytz/distros/debian.txt b/build/pkgs/pytz/distros/debian.txt
+new file mode 100644
+index 00000000..db20908
+--- /dev/null
++++ b/build/pkgs/pytz/distros/debian.txt
+@@ -0,0 +1 @@
++python3-tz
+diff --git a/build/pkgs/requests/distros/debian.txt b/build/pkgs/requests/distros/debian.txt
+new file mode 100644
+index 00000000..43147b2
+--- /dev/null
++++ b/build/pkgs/requests/distros/debian.txt
+@@ -0,0 +1 @@
++python3-requests
+diff --git a/build/pkgs/scipy/distros/debian.txt b/build/pkgs/scipy/distros/debian.txt
+new file mode 100644
+index 00000000..12b3666
+--- /dev/null
++++ b/build/pkgs/scipy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-scipy
+diff --git a/build/pkgs/setuptools/distros/debian.txt b/build/pkgs/setuptools/distros/debian.txt
+new file mode 100644
+index 00000000..1c0901c
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/debian.txt
+@@ -0,0 +1 @@
++python3-setuptools
+diff --git a/build/pkgs/six/distros/debian.txt b/build/pkgs/six/distros/debian.txt
+new file mode 100644
+index 00000000..68ff859
+--- /dev/null
++++ b/build/pkgs/six/distros/debian.txt
+@@ -0,0 +1 @@
++python3-six
+diff --git a/build/pkgs/sympy/distros/debian.txt b/build/pkgs/sympy/distros/debian.txt
+new file mode 100644
+index 00000000..db423c8
+--- /dev/null
++++ b/build/pkgs/sympy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-sympy
+diff --git a/build/pkgs/texttable/distros/debian.txt b/build/pkgs/texttable/distros/debian.txt
+new file mode 100644
+index 00000000..8f8e7e2
+--- /dev/null
++++ b/build/pkgs/texttable/distros/debian.txt
+@@ -0,0 +1 @@
++python3-texttable
+diff --git a/build/pkgs/toml/distros/debian.txt b/build/pkgs/toml/distros/debian.txt
+new file mode 100644
+index 00000000..543e89d
+--- /dev/null
++++ b/build/pkgs/toml/distros/debian.txt
+@@ -0,0 +1 @@
++python3-toml
+diff --git a/build/pkgs/webencodings/distros/debian.txt b/build/pkgs/webencodings/distros/debian.txt
+new file mode 100644
+index 00000000..ac30c2f
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/debian.txt
+@@ -0,0 +1 @@
++python3-webencodings
+diff --git a/build/pkgs/wheel/distros/debian.txt b/build/pkgs/wheel/distros/debian.txt
+new file mode 100644
+index 00000000..3c066725
+--- /dev/null
++++ b/build/pkgs/wheel/distros/debian.txt
+@@ -0,0 +1 @@
++python3-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 93bf30d7de292551c3050e2dd74651d69ba4bd46 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 18 Oct 2021 07:50:34 -0400
+Subject: Trac #29665: add more documentation for SAGE_PYTHON_PACKAGE_CHECK().
+
+An earlier commit allows SAGE_PYTHON_PACKAGE_CHECK(package) to tweak the
+value of sage_use_system_$package if --enable-system-site-packages was
+not used. This essentially changes the default --with-system-$package=yes
+to "no" in that case. Here we update the documentation to reflect it.
+---
+ m4/sage_python_package_check.m4 | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 7ee82a7..95eefd0 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -34,6 +34,10 @@
+ #   ensure that the ./configure- and run-time views of the system
+ #   are as similar as possible.
+ #
++#   To avoid suggesting these system packages to users who have not
++#   set --enable-system-site-packages, this macro also changes the
++#   default for --with-system-foo from "yes" to "no" in that case.
++#
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
+-- 
+cgit v1.0-1-gd88e
+
+
+From d771e49d57ecdf3622434bc09cbfb87ad3bb7744 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 18 Oct 2021 07:42:46 -0400
+Subject: Trac #29665: improve SAGE_PYTHON_PACKAGE_CHECK() failure message.
+
+When --enable-system-site-packages is off, SAGE_PYTHON_PACKAGE_CHECK()
+will always install the corresponding SPKG. We improve the ./configure
+output in that case to make it clear that the decision was based on
+the value of --enable-system-site-packages and not the "real" check.
+---
+ m4/sage_python_package_check.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 95eefd0..5f0f084 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -40,7 +40,9 @@
+ #
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
++  AC_MSG_CHECKING([if --enable-system-site-packages was used])
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
++    AC_MSG_RESULT(yes)
+     AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
+ 
+     dnl We run this check inside a python venv, because that's ultimately
+@@ -94,6 +96,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
+     dnl System site packages are disabled.
++    AC_MSG_RESULT(no; skipping check)
+     sage_spkg_install_$1=yes
+ 
+     dnl We have to retroactively hack the --with-system-foo={no,yes,force}
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5bb43c1b78a1deb3364f235305937c2f823e5e18 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 24 Oct 2021 20:29:25 -0400
+Subject: Trac #29665: use sage-venv in SAGE_PYTHON_PACKAGE_CHECK().
+
+For consistency with the rest of the build system, we now use the
+build/bin/sage-venv script to create the venv in this autoconf macro
+rather than invoking $PYTHON_FOR_VENV with "-m venv" directly.
+---
+ m4/sage_python_package_check.m4 | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 5f0f084..5547b35 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -50,11 +50,11 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AC_MSG_CHECKING([if we can create a python venv in config.venv])
+ 
+     dnl Use --clear because ./configure typically clobbers its output files.
+-    AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
+-                                        --clear                dnl
+-                                        --without-pip          dnl
+-                                        config.venv            dnl
+-                                        2>&AS_MESSAGE_LOG_FD], [
++    AS_IF(["${PYTHON_FOR_VENV}" build/bin/sage-venv      dnl
++                                  --system-site-packages dnl
++                                  --clear                dnl
++                                  config.venv            dnl
++                                  2>&AS_MESSAGE_LOG_FD], [
+       AC_MSG_RESULT(yes)
+       dnl strip all comments from install-requires.txt; this should leave
+       dnl only a single line containing the version specification for this
+-- 
+cgit v1.0-1-gd88e
+
+
+From c78363d6326addff16ca5abac897949a6be72bf4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:10:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for urllib3.
+
+---
+ build/pkgs/urllib3/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/urllib3/spkg-configure.m4
+
+diff --git a/build/pkgs/urllib3/spkg-configure.m4 b/build/pkgs/urllib3/spkg-configure.m4
+new file mode 100644
+index 00000000..d7ef3e1
+--- /dev/null
++++ b/build/pkgs/urllib3/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([urllib3], [SAGE_PYTHON_PACKAGE_CHECK([urllib3])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f416d5abcae495ea8301fad024b279ea9e997b29 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:15:18 -0400
+Subject: Trac #29665: add Gentoo package information for urllib3.
+
+---
+ build/pkgs/urllib3/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/urllib3/distros/gentoo.txt
+
+diff --git a/build/pkgs/urllib3/distros/gentoo.txt b/build/pkgs/urllib3/distros/gentoo.txt
+new file mode 100644
+index 00000000..172a535
+--- /dev/null
++++ b/build/pkgs/urllib3/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/urllib3
+-- 
+cgit v1.0-1-gd88e
+
+
+From 852068b992bf7959500c650f54cb92e5b68d7ef8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:15:58 -0400
+Subject: Trac #29665: add Gentoo package information for nbformat.
+
+---
+ build/pkgs/nbformat/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbformat/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbformat/distros/gentoo.txt b/build/pkgs/nbformat/distros/gentoo.txt
+new file mode 100644
+index 00000000..006b1f2
+--- /dev/null
++++ b/build/pkgs/nbformat/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbformat
+-- 
+cgit v1.0-1-gd88e
+
+
+From 66179fd28fcc92ee840dcd87bb4db25cea968d66 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:34:16 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for nbformat.
+
+---
+ build/pkgs/nbformat/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbformat/spkg-configure.m4
+
+diff --git a/build/pkgs/nbformat/spkg-configure.m4 b/build/pkgs/nbformat/spkg-configure.m4
+new file mode 100644
+index 00000000..5a7f8c4
+--- /dev/null
++++ b/build/pkgs/nbformat/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbformat], [SAGE_PYTHON_PACKAGE_CHECK([nbformat])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 874005e81ed20f27a5f895030dcdbdfc5f73ad80 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:47:01 -0400
+Subject: Trac #29665: add Gentoo package information for zipp.
+
+---
+ build/pkgs/zipp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/zipp/distros/gentoo.txt
+
+diff --git a/build/pkgs/zipp/distros/gentoo.txt b/build/pkgs/zipp/distros/gentoo.txt
+new file mode 100644
+index 00000000..7f59450
+--- /dev/null
++++ b/build/pkgs/zipp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/zipp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0cc2a7355b5554c1fb79c742ebf02eff54465b3e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:47:35 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for zipp.
+
+---
+ build/pkgs/zipp/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/zipp/spkg-configure.m4
+
+diff --git a/build/pkgs/zipp/spkg-configure.m4 b/build/pkgs/zipp/spkg-configure.m4
+new file mode 100644
+index 00000000..0fe3a9c
+--- /dev/null
++++ b/build/pkgs/zipp/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([zipp], [SAGE_PYTHON_PACKAGE_CHECK([zipp])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6073ad8e56c21fc862749bbd84a56d543fb9458c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:48:37 -0400
+Subject: Trac #29665: add Gentoo package information for wcwidth.
+
+---
+ build/pkgs/wcwidth/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wcwidth/distros/gentoo.txt
+
+diff --git a/build/pkgs/wcwidth/distros/gentoo.txt b/build/pkgs/wcwidth/distros/gentoo.txt
+new file mode 100644
+index 00000000..edeb80b
+--- /dev/null
++++ b/build/pkgs/wcwidth/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/wcwidth
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9793d6172c64d61a015fbe61bd45863759124fad Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:51:10 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for wcwidth.
+
+---
+ build/pkgs/wcwidth/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wcwidth/spkg-configure.m4
+
+diff --git a/build/pkgs/wcwidth/spkg-configure.m4 b/build/pkgs/wcwidth/spkg-configure.m4
+new file mode 100644
+index 00000000..5bde15a
+--- /dev/null
++++ b/build/pkgs/wcwidth/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([wcwidth], [SAGE_PYTHON_PACKAGE_CHECK([wcwidth])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20232f370a43c146ca4e696c72a2cbcc498db060 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:52:36 -0400
+Subject: Trac #29665: add Gentoo package information for testpath.
+
+---
+ build/pkgs/testpath/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/testpath/distros/gentoo.txt
+
+diff --git a/build/pkgs/testpath/distros/gentoo.txt b/build/pkgs/testpath/distros/gentoo.txt
+new file mode 100644
+index 00000000..efa10a0
+--- /dev/null
++++ b/build/pkgs/testpath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/testpath
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1b0785b2aad8844e74345fe950baf097e2b43d24 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:55:22 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for testpath.
+
+---
+ build/pkgs/testpath/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/testpath/spkg-configure.m4
+
+diff --git a/build/pkgs/testpath/spkg-configure.m4 b/build/pkgs/testpath/spkg-configure.m4
+new file mode 100644
+index 00000000..d8fc2a7
+--- /dev/null
++++ b/build/pkgs/testpath/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([testpath], [SAGE_PYTHON_PACKAGE_CHECK([testpath])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 10fc3829ecd956d732b1b069fdfe81f0d6d5cdc2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:56:06 -0400
+Subject: Trac #29665: add Gentoo package information for jedi.
+
+---
+ build/pkgs/jedi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jedi/distros/gentoo.txt
+
+diff --git a/build/pkgs/jedi/distros/gentoo.txt b/build/pkgs/jedi/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c85a46
+--- /dev/null
++++ b/build/pkgs/jedi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jedi
+-- 
+cgit v1.0-1-gd88e
+
+
+From a75824d74c281c7639028ca01dabeed266f56998 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:06:37 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for jedi.
+
+---
+ build/pkgs/jedi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jedi/spkg-configure.m4
+
+diff --git a/build/pkgs/jedi/spkg-configure.m4 b/build/pkgs/jedi/spkg-configure.m4
+new file mode 100644
+index 00000000..a37dbcc
+--- /dev/null
++++ b/build/pkgs/jedi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jedi], [SAGE_PYTHON_PACKAGE_CHECK([jedi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 17af01373d43f6acbbdbc23e073e372d3fdadf8b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:07:47 -0400
+Subject: Trac #29665: add Gentoo package information for tomli.
+
+---
+ build/pkgs/tomli/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tomli/distros/gentoo.txt
+
+diff --git a/build/pkgs/tomli/distros/gentoo.txt b/build/pkgs/tomli/distros/gentoo.txt
+new file mode 100644
+index 00000000..0458e25
+--- /dev/null
++++ b/build/pkgs/tomli/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/tomli
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0d3b5994ae612be11992467c4a3f1a74b81400fe Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:08:12 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for tomli.
+
+---
+ build/pkgs/tomli/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tomli/spkg-configure.m4
+
+diff --git a/build/pkgs/tomli/spkg-configure.m4 b/build/pkgs/tomli/spkg-configure.m4
+new file mode 100644
+index 00000000..95a8b8b
+--- /dev/null
++++ b/build/pkgs/tomli/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tomli], [SAGE_PYTHON_PACKAGE_CHECK([tomli])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From dce1c515781b0eeb8eb9c2bc7aba581560c1fac1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:09:22 -0400
+Subject: Trac #29665: add Gentoo package information for defusedxml.
+
+---
+ build/pkgs/defusedxml/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/defusedxml/distros/gentoo.txt
+
+diff --git a/build/pkgs/defusedxml/distros/gentoo.txt b/build/pkgs/defusedxml/distros/gentoo.txt
+new file mode 100644
+index 00000000..2804214
+--- /dev/null
++++ b/build/pkgs/defusedxml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/defusedxml
+-- 
+cgit v1.0-1-gd88e
+
+
+From 02e1e1cd7f8bdae3ca5b7d35ce70af28a44e9b7c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:11:14 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for defusedxml.
+
+---
+ build/pkgs/defusedxml/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/defusedxml/spkg-configure.m4
+
+diff --git a/build/pkgs/defusedxml/spkg-configure.m4 b/build/pkgs/defusedxml/spkg-configure.m4
+new file mode 100644
+index 00000000..e02f345
+--- /dev/null
++++ b/build/pkgs/defusedxml/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([defusedxml], [SAGE_PYTHON_PACKAGE_CHECK([defusedxml])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e0ba4ebb5cfc637b5d26b85de9f34e0a160d2b9c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:12:22 -0400
+Subject: Trac #29665: add Gentoo package information for ipywidgets.
+
+---
+ build/pkgs/ipywidgets/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipywidgets/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipywidgets/distros/gentoo.txt b/build/pkgs/ipywidgets/distros/gentoo.txt
+new file mode 100644
+index 00000000..7c76967
+--- /dev/null
++++ b/build/pkgs/ipywidgets/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipywidgets
+-- 
+cgit v1.0-1-gd88e
+
+
+From 49df7e7d93c7a31b7c46d5d224a35fd313a29a32 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:15:53 -0400
+Subject: Trac #29665: add Gentoo package information for simplegeneric.
+
+---
+ build/pkgs/simplegeneric/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/simplegeneric/distros/gentoo.txt
+
+diff --git a/build/pkgs/simplegeneric/distros/gentoo.txt b/build/pkgs/simplegeneric/distros/gentoo.txt
+new file mode 100644
+index 00000000..a86e90d
+--- /dev/null
++++ b/build/pkgs/simplegeneric/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/simplegeneric
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2a893635d5804749e6fec7ed7289c921ecb5300a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:16:33 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for simplegeneric.
+
+---
+ build/pkgs/simplegeneric/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/simplegeneric/spkg-configure.m4
+
+diff --git a/build/pkgs/simplegeneric/spkg-configure.m4 b/build/pkgs/simplegeneric/spkg-configure.m4
+new file mode 100644
+index 00000000..13715ab
+--- /dev/null
++++ b/build/pkgs/simplegeneric/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([simplegeneric], [SAGE_PYTHON_PACKAGE_CHECK([simplegeneric])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a8fe7ecd6e3163e7d01261e5497ac452a8cc95ab Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:17:18 -0400
+Subject: Trac #29665: add Gentoo package information for imagesize.
+
+---
+ build/pkgs/imagesize/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/imagesize/distros/gentoo.txt
+
+diff --git a/build/pkgs/imagesize/distros/gentoo.txt b/build/pkgs/imagesize/distros/gentoo.txt
+new file mode 100644
+index 00000000..54350ba
+--- /dev/null
++++ b/build/pkgs/imagesize/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/imagesize
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2ad837c5dd1fca0f50ce6d5042a9344210a54f84 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:17:48 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for imagesize.
+
+---
+ build/pkgs/imagesize/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/imagesize/spkg-configure.m4
+
+diff --git a/build/pkgs/imagesize/spkg-configure.m4 b/build/pkgs/imagesize/spkg-configure.m4
+new file mode 100644
+index 00000000..20210ef
+--- /dev/null
++++ b/build/pkgs/imagesize/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([imagesize], [SAGE_PYTHON_PACKAGE_CHECK([imagesize])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bf47415b5bfca2d7bf24e20de35662bf331623b9 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:18:49 -0400
+Subject: Trac #29665: add Gentoo package information for mistune.
+
+---
+ build/pkgs/mistune/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mistune/distros/gentoo.txt
+
+diff --git a/build/pkgs/mistune/distros/gentoo.txt b/build/pkgs/mistune/distros/gentoo.txt
+new file mode 100644
+index 00000000..56f0a4e
+--- /dev/null
++++ b/build/pkgs/mistune/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/mistune
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6898a74fd0c65a40c5220ba68b4062ac6fe060c6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:21:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for mistune.
+
+---
+ build/pkgs/mistune/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mistune/spkg-configure.m4
+
+diff --git a/build/pkgs/mistune/spkg-configure.m4 b/build/pkgs/mistune/spkg-configure.m4
+new file mode 100644
+index 00000000..972f33d
+--- /dev/null
++++ b/build/pkgs/mistune/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([mistune], [SAGE_PYTHON_PACKAGE_CHECK([mistune])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 62735e4ccf2031cd39eb5e04b03bdfd97005d808 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:22:48 -0400
+Subject: Trac #29665: add Gentoo package information for backcall.
+
+---
+ build/pkgs/backcall/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/backcall/distros/gentoo.txt
+
+diff --git a/build/pkgs/backcall/distros/gentoo.txt b/build/pkgs/backcall/distros/gentoo.txt
+new file mode 100644
+index 00000000..266a222
+--- /dev/null
++++ b/build/pkgs/backcall/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/backcall
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9ef3ea42d4a33c7cdb623fa5417ae300cf323183 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:25:10 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for backcall.
+
+---
+ build/pkgs/backcall/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/backcall/spkg-configure.m4
+
+diff --git a/build/pkgs/backcall/spkg-configure.m4 b/build/pkgs/backcall/spkg-configure.m4
+new file mode 100644
+index 00000000..d6b11c4
+--- /dev/null
++++ b/build/pkgs/backcall/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([backcall], [SAGE_PYTHON_PACKAGE_CHECK([backcall])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1b3ea2a3c40fea0fb58435f5e5304368ea58dff8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:25:58 -0400
+Subject: Trac #29665: add Gentoo package information for parso.
+
+---
+ build/pkgs/parso/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/parso/distros/gentoo.txt
+
+diff --git a/build/pkgs/parso/distros/gentoo.txt b/build/pkgs/parso/distros/gentoo.txt
+new file mode 100644
+index 00000000..f9ce4c7
+--- /dev/null
++++ b/build/pkgs/parso/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/parso
+-- 
+cgit v1.0-1-gd88e
+
+
+From 963a3a2c563ec71a1f5be2395722d0e824cb0b11 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:26:22 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for parso.
+
+---
+ build/pkgs/parso/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/parso/spkg-configure.m4
+
+diff --git a/build/pkgs/parso/spkg-configure.m4 b/build/pkgs/parso/spkg-configure.m4
+new file mode 100644
+index 00000000..1ca6f1b
+--- /dev/null
++++ b/build/pkgs/parso/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([parso], [SAGE_PYTHON_PACKAGE_CHECK([parso])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 943053dfc474b6549bcc7d6ef2971ea43588b35c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:27:00 -0400
+Subject: Trac #29665: add Gentoo package information for pyparsing.
+
+---
+ build/pkgs/pyparsing/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyparsing/distros/gentoo.txt
+
+diff --git a/build/pkgs/pyparsing/distros/gentoo.txt b/build/pkgs/pyparsing/distros/gentoo.txt
+new file mode 100644
+index 00000000..ef0419f
+--- /dev/null
++++ b/build/pkgs/pyparsing/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyparsing
+-- 
+cgit v1.0-1-gd88e
+
+
+From bd682eaa2ac41dd84e7a52e2b0c5442fc8fd8919 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:27:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pyparsing.
+
+---
+ build/pkgs/pyparsing/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyparsing/spkg-configure.m4
+
+diff --git a/build/pkgs/pyparsing/spkg-configure.m4 b/build/pkgs/pyparsing/spkg-configure.m4
+new file mode 100644
+index 00000000..d2b4c00
+--- /dev/null
++++ b/build/pkgs/pyparsing/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pyparsing], [SAGE_PYTHON_PACKAGE_CHECK([pyparsing])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 74f36a9c0ec7c63b7e6c40066e42f4b15c2f978e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:17:42 -0400
+Subject: Trac #29665: add Gentoo package information for debugpy.
+
+---
+ build/pkgs/debugpy/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/debugpy/distros/gentoo.txt
+
+diff --git a/build/pkgs/debugpy/distros/gentoo.txt b/build/pkgs/debugpy/distros/gentoo.txt
+new file mode 100644
+index 00000000..8b797ce
+--- /dev/null
++++ b/build/pkgs/debugpy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/debugpy
+-- 
+cgit v1.0-1-gd88e
+
+
+From be072fa87ac5c373d9dc9b54c0bd68734d5709bc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:21:17 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for debugpy.
+
+---
+ build/pkgs/debugpy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/debugpy/spkg-configure.m4
+
+diff --git a/build/pkgs/debugpy/spkg-configure.m4 b/build/pkgs/debugpy/spkg-configure.m4
+new file mode 100644
+index 00000000..db605ff
+--- /dev/null
++++ b/build/pkgs/debugpy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([debugpy], [SAGE_PYTHON_PACKAGE_CHECK([debugpy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6f777ce2f2e14b94e91c8b7bbac82f9017460aba Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:23:56 -0400
+Subject: Trac #29665: add Gentoo package information for tzlocal.
+
+---
+ build/pkgs/tzlocal/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tzlocal/distros/gentoo.txt
+
+diff --git a/build/pkgs/tzlocal/distros/gentoo.txt b/build/pkgs/tzlocal/distros/gentoo.txt
+new file mode 100644
+index 00000000..2018442
+--- /dev/null
++++ b/build/pkgs/tzlocal/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/tzlocal
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3bd078fc15ae13982249452711baafae91038191 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:24:51 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for tzlocal.
+
+---
+ build/pkgs/tzlocal/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tzlocal/spkg-configure.m4
+
+diff --git a/build/pkgs/tzlocal/spkg-configure.m4 b/build/pkgs/tzlocal/spkg-configure.m4
+new file mode 100644
+index 00000000..e020b28
+--- /dev/null
++++ b/build/pkgs/tzlocal/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tzlocal], [SAGE_PYTHON_PACKAGE_CHECK([tzlocal])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 91b0882fc62214923da9ee7b6dccb05d8a1d11d1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:26:13 -0400
+Subject: Trac #29665: add Gentoo package information for pycparser.
+
+---
+ build/pkgs/pycparser/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pycparser/distros/gentoo.txt
+
+diff --git a/build/pkgs/pycparser/distros/gentoo.txt b/build/pkgs/pycparser/distros/gentoo.txt
+new file mode 100644
+index 00000000..5e87307
+--- /dev/null
++++ b/build/pkgs/pycparser/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pycparser
+-- 
+cgit v1.0-1-gd88e
+
+
+From beabde92fe6e057faf516fe82d27f1e903e55ce6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:27:27 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pycparser.
+
+---
+ build/pkgs/pycparser/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pycparser/spkg-configure.m4
+
+diff --git a/build/pkgs/pycparser/spkg-configure.m4 b/build/pkgs/pycparser/spkg-configure.m4
+new file mode 100644
+index 00000000..4b9b900
+--- /dev/null
++++ b/build/pkgs/pycparser/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pycparser], [SAGE_PYTHON_PACKAGE_CHECK([pycparser])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 86c2788dc7fd1169314e9598c91fa81045553677 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:29:36 -0400
+Subject: Trac #29665: add Gentoo package information for cycler.
+
+---
+ build/pkgs/cycler/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cycler/distros/gentoo.txt
+
+diff --git a/build/pkgs/cycler/distros/gentoo.txt b/build/pkgs/cycler/distros/gentoo.txt
+new file mode 100644
+index 00000000..4b21543
+--- /dev/null
++++ b/build/pkgs/cycler/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/cycler
+-- 
+cgit v1.0-1-gd88e
+
+
+From 67c5a944101ddf329f0a61c61d4e784f58a5c5b0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:30:27 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for cycler.
+
+---
+ build/pkgs/cycler/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cycler/spkg-configure.m4
+
+diff --git a/build/pkgs/cycler/spkg-configure.m4 b/build/pkgs/cycler/spkg-configure.m4
+new file mode 100644
+index 00000000..239571a
+--- /dev/null
++++ b/build/pkgs/cycler/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([cycler], [SAGE_PYTHON_PACKAGE_CHECK([cycler])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ef6d490251abfa41f7a0910274700a8a6a65f629 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:31:19 -0400
+Subject: Trac #29665: add Gentoo package information for traitlets.
+
+---
+ build/pkgs/traitlets/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/traitlets/distros/gentoo.txt
+
+diff --git a/build/pkgs/traitlets/distros/gentoo.txt b/build/pkgs/traitlets/distros/gentoo.txt
+new file mode 100644
+index 00000000..46bfaab
+--- /dev/null
++++ b/build/pkgs/traitlets/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/traitlets
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1f922b458d34088d9f6773312209e69f19ee45dc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:31:50 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for traitlets.
+
+---
+ build/pkgs/traitlets/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/traitlets/spkg-configure.m4
+
+diff --git a/build/pkgs/traitlets/spkg-configure.m4 b/build/pkgs/traitlets/spkg-configure.m4
+new file mode 100644
+index 00000000..df2382b
+--- /dev/null
++++ b/build/pkgs/traitlets/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([traitlets], [SAGE_PYTHON_PACKAGE_CHECK([traitlets])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 95b89a9ced0acb6d971a27fa63b97ea58a11f4e1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:33:35 -0400
+Subject: Trac #29665: add Gentoo package information for argcomplete.
+
+---
+ build/pkgs/argcomplete/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argcomplete/distros/gentoo.txt
+
+diff --git a/build/pkgs/argcomplete/distros/gentoo.txt b/build/pkgs/argcomplete/distros/gentoo.txt
+new file mode 100644
+index 00000000..b150949
+--- /dev/null
++++ b/build/pkgs/argcomplete/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/argcomplete
+-- 
+cgit v1.0-1-gd88e
+
+
+From b4cd8ef384e6e5bae0de0f3c113fb5f9e6e1a71e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:34:14 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for argcomplete.
+
+---
+ build/pkgs/argcomplete/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argcomplete/spkg-configure.m4
+
+diff --git a/build/pkgs/argcomplete/spkg-configure.m4 b/build/pkgs/argcomplete/spkg-configure.m4
+new file mode 100644
+index 00000000..cbd7ccf
+--- /dev/null
++++ b/build/pkgs/argcomplete/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([argcomplete], [SAGE_PYTHON_PACKAGE_CHECK([argcomplete])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4cc610e8331970cc018d7ea87af928fa73a292c1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:36:21 -0400
+Subject: Trac #29665: add Gentoo package information for ptyprocess.
+
+---
+ build/pkgs/ptyprocess/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ptyprocess/distros/gentoo.txt
+
+diff --git a/build/pkgs/ptyprocess/distros/gentoo.txt b/build/pkgs/ptyprocess/distros/gentoo.txt
+new file mode 100644
+index 00000000..571a851
+--- /dev/null
++++ b/build/pkgs/ptyprocess/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ptyprocess
+-- 
+cgit v1.0-1-gd88e
+
+
+From cd15f97221bf5933b07900e4f77cb55401eede26 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:37:02 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ptyprocess.
+
+---
+ build/pkgs/ptyprocess/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ptyprocess/spkg-configure.m4
+
+diff --git a/build/pkgs/ptyprocess/spkg-configure.m4 b/build/pkgs/ptyprocess/spkg-configure.m4
+new file mode 100644
+index 00000000..bfacbae
+--- /dev/null
++++ b/build/pkgs/ptyprocess/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ptyprocess], [SAGE_PYTHON_PACKAGE_CHECK([ptyprocess])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb5f45b15f99e4ba28e1b1f6042a0e8ea17f1dfc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:38:22 -0400
+Subject: Trac #29665: add Gentoo package information for attrs.
+
+---
+ build/pkgs/attrs/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/attrs/distros/gentoo.txt
+
+diff --git a/build/pkgs/attrs/distros/gentoo.txt b/build/pkgs/attrs/distros/gentoo.txt
+new file mode 100644
+index 00000000..3b906fa
+--- /dev/null
++++ b/build/pkgs/attrs/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/attrs
+-- 
+cgit v1.0-1-gd88e
+
+
+From 321707ebf8e9af1e4ac3a5b5b094b4226bb3a7a5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:38:55 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for attrs.
+
+---
+ build/pkgs/attrs/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/attrs/spkg-configure.m4
+
+diff --git a/build/pkgs/attrs/spkg-configure.m4 b/build/pkgs/attrs/spkg-configure.m4
+new file mode 100644
+index 00000000..ba6a9b7
+--- /dev/null
++++ b/build/pkgs/attrs/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([attrs], [SAGE_PYTHON_PACKAGE_CHECK([attrs])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 69a498a4e8854ecdfc2f1a134104983c0dcb9e32 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:40:09 -0400
+Subject: Trac #29665: add Gentoo package information for send2trash.
+
+---
+ build/pkgs/send2trash/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/send2trash/distros/gentoo.txt
+
+diff --git a/build/pkgs/send2trash/distros/gentoo.txt b/build/pkgs/send2trash/distros/gentoo.txt
+new file mode 100644
+index 00000000..a89b179
+--- /dev/null
++++ b/build/pkgs/send2trash/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/send2trash
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9baed17c84e1bdf5abd17c20766e5cd7dddc5b53 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:41:45 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for send2trash.
+
+---
+ build/pkgs/send2trash/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/send2trash/spkg-configure.m4
+
+diff --git a/build/pkgs/send2trash/spkg-configure.m4 b/build/pkgs/send2trash/spkg-configure.m4
+new file mode 100644
+index 00000000..3bbb727
+--- /dev/null
++++ b/build/pkgs/send2trash/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([send2trash], [SAGE_PYTHON_PACKAGE_CHECK([send2trash])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b9b552b2a2aaccaeb7c5b25be0b681f107522d09 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:43:27 -0400
+Subject: Trac #29665: add Gentoo package information for pyrsistent.
+
+---
+ build/pkgs/pyrsistent/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyrsistent/distros/gentoo.txt
+
+diff --git a/build/pkgs/pyrsistent/distros/gentoo.txt b/build/pkgs/pyrsistent/distros/gentoo.txt
+new file mode 100644
+index 00000000..83439ce
+--- /dev/null
++++ b/build/pkgs/pyrsistent/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyrsistent
+-- 
+cgit v1.0-1-gd88e
+
+
+From a17b31fac6104852762f57daa749443147bdf121 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:44:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pyrsistent.
+
+---
+ build/pkgs/pyrsistent/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyrsistent/spkg-configure.m4
+
+diff --git a/build/pkgs/pyrsistent/spkg-configure.m4 b/build/pkgs/pyrsistent/spkg-configure.m4
+new file mode 100644
+index 00000000..f7ca75d
+--- /dev/null
++++ b/build/pkgs/pyrsistent/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pyrsistent], [SAGE_PYTHON_PACKAGE_CHECK([pyrsistent])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 68520decad6d6937918d7a6af65ca5bd476e5d02 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:45:45 -0400
+Subject: Trac #29665: add Gentoo package information for entrypoints.
+
+---
+ build/pkgs/entrypoints/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/entrypoints/distros/gentoo.txt
+
+diff --git a/build/pkgs/entrypoints/distros/gentoo.txt b/build/pkgs/entrypoints/distros/gentoo.txt
+new file mode 100644
+index 00000000..684ddd0
+--- /dev/null
++++ b/build/pkgs/entrypoints/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/entrypoints
+-- 
+cgit v1.0-1-gd88e
+
+
+From 34213eccb642a6bad64d89acaefa83ee702cb483 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:46:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for entrypoints.
+
+---
+ build/pkgs/entrypoints/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/entrypoints/spkg-configure.m4
+
+diff --git a/build/pkgs/entrypoints/spkg-configure.m4 b/build/pkgs/entrypoints/spkg-configure.m4
+new file mode 100644
+index 00000000..caed658
+--- /dev/null
++++ b/build/pkgs/entrypoints/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([entrypoints], [SAGE_PYTHON_PACKAGE_CHECK([entrypoints])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8e985614345da1a58fcdc127a9c0ddd790f9b5d2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:48:26 -0400
+Subject: Trac #29665: add Gentoo package information for markupsafe.
+
+---
+ build/pkgs/markupsafe/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/markupsafe/distros/gentoo.txt
+
+diff --git a/build/pkgs/markupsafe/distros/gentoo.txt b/build/pkgs/markupsafe/distros/gentoo.txt
+new file mode 100644
+index 00000000..9654e35
+--- /dev/null
++++ b/build/pkgs/markupsafe/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/markupsafe
+-- 
+cgit v1.0-1-gd88e
+
+
+From d370f229ae0988856f2e0d1f6ee2df2c47169106 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:48:55 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for markupsafe.
+
+---
+ build/pkgs/markupsafe/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/markupsafe/spkg-configure.m4
+
+diff --git a/build/pkgs/markupsafe/spkg-configure.m4 b/build/pkgs/markupsafe/spkg-configure.m4
+new file mode 100644
+index 00000000..79eb8db
+--- /dev/null
++++ b/build/pkgs/markupsafe/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([markupsafe], [SAGE_PYTHON_PACKAGE_CHECK([markupsafe])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c49b285ad9e25e6bc81a7e75d461d234fdd3ea68 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:30:49 -0400
+Subject: Trac #29665: add Gentoo package information for flit_core.
+
+---
+ build/pkgs/flit_core/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/flit_core/distros/gentoo.txt
+
+diff --git a/build/pkgs/flit_core/distros/gentoo.txt b/build/pkgs/flit_core/distros/gentoo.txt
+new file mode 100644
+index 00000000..fe6bea9
+--- /dev/null
++++ b/build/pkgs/flit_core/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/flit_core
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b0ce1c4f23cd9fc4316e1eb2b9b4bde394957f3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:32:11 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for flit_core.
+
+---
+ build/pkgs/flit_core/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/flit_core/spkg-configure.m4
+
+diff --git a/build/pkgs/flit_core/spkg-configure.m4 b/build/pkgs/flit_core/spkg-configure.m4
+new file mode 100644
+index 00000000..ee67557
+--- /dev/null
++++ b/build/pkgs/flit_core/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([flit_core], [SAGE_PYTHON_PACKAGE_CHECK([flit_core])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f006c231a81428b1e1e792f889bf974f90e3c831 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:34:06 -0400
+Subject: Trac #29665: add Gentoo package information for nest_asyncio.
+
+---
+ build/pkgs/nest_asyncio/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nest_asyncio/distros/gentoo.txt
+
+diff --git a/build/pkgs/nest_asyncio/distros/gentoo.txt b/build/pkgs/nest_asyncio/distros/gentoo.txt
+new file mode 100644
+index 00000000..ab742d2
+--- /dev/null
++++ b/build/pkgs/nest_asyncio/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nest_asyncio
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4a58d0a96a84475e765a01a64f5f44c48a317e0b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:34:43 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for nest_asyncio.
+
+---
+ build/pkgs/nest_asyncio/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nest_asyncio/spkg-configure.m4
+
+diff --git a/build/pkgs/nest_asyncio/spkg-configure.m4 b/build/pkgs/nest_asyncio/spkg-configure.m4
+new file mode 100644
+index 00000000..4d81527
+--- /dev/null
++++ b/build/pkgs/nest_asyncio/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nest_asyncio], [SAGE_PYTHON_PACKAGE_CHECK([nest_asyncio])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e50af937777ea778908bc09a7a79db3dd80fdf25 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:37:02 -0400
+Subject: Trac #29665: add Gentoo package information for ipython_genutils.
+
+---
+ build/pkgs/ipython_genutils/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython_genutils/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipython_genutils/distros/gentoo.txt b/build/pkgs/ipython_genutils/distros/gentoo.txt
+new file mode 100644
+index 00000000..01bc49d
+--- /dev/null
++++ b/build/pkgs/ipython_genutils/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipython_genutils
+-- 
+cgit v1.0-1-gd88e
+
+
+From ec3c0ce9db2ba13c1a49d1bcfb7a4b249cb7ae83 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:39:20 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipython_genutils.
+
+---
+ build/pkgs/ipython_genutils/spkg-configure.m4 | 4 ++++
+ 1 file changed, 4 insertions(+)
+ create mode 100644 build/pkgs/ipython_genutils/spkg-configure.m4
+
+diff --git a/build/pkgs/ipython_genutils/spkg-configure.m4 b/build/pkgs/ipython_genutils/spkg-configure.m4
+new file mode 100644
+index 00000000..b0ba86a
+--- /dev/null
++++ b/build/pkgs/ipython_genutils/spkg-configure.m4
+@@ -0,0 +1,4 @@
++SAGE_SPKG_CONFIGURE(
++  [ipython_genutils],
++  [SAGE_PYTHON_PACKAGE_CHECK([ipython_genutils])]
++)
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5c9e2e265115e5f10d4b459a475467e30b4bddde Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:40:03 -0400
+Subject: Trac #29665: add Gentoo package information for ipython.
+
+---
+ build/pkgs/ipython/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipython/distros/gentoo.txt b/build/pkgs/ipython/distros/gentoo.txt
+new file mode 100644
+index 00000000..8b76f18
+--- /dev/null
++++ b/build/pkgs/ipython/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipython
+-- 
+cgit v1.0-1-gd88e
+
+
+From 621e707ddd040a902d7dddf0bed1de2b54ab22f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 07:37:56 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipython.
+
+---
+ build/pkgs/ipython/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython/spkg-configure.m4
+
+diff --git a/build/pkgs/ipython/spkg-configure.m4 b/build/pkgs/ipython/spkg-configure.m4
+new file mode 100644
+index 00000000..02ab89f
+--- /dev/null
++++ b/build/pkgs/ipython/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipython], [SAGE_PYTHON_PACKAGE_CHECK([ipython])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20a0613f6d441da436f3e7b8047a72bf490882bd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 07:51:11 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipywidgets.
+
+---
+ build/pkgs/ipywidgets/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipywidgets/spkg-configure.m4
+
+diff --git a/build/pkgs/ipywidgets/spkg-configure.m4 b/build/pkgs/ipywidgets/spkg-configure.m4
+new file mode 100644
+index 00000000..51ca9be
+--- /dev/null
++++ b/build/pkgs/ipywidgets/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipywidgets], [SAGE_PYTHON_PACKAGE_CHECK([ipywidgets])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 76bcd386633acc02a1a3026339d0cbd258ada04e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 10:05:16 -0400
+Subject: Trac #29665: add Gentoo package information for wheel.
+
+---
+ build/pkgs/wheel/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wheel/distros/gentoo.txt
+
+diff --git a/build/pkgs/wheel/distros/gentoo.txt b/build/pkgs/wheel/distros/gentoo.txt
+new file mode 100644
+index 00000000..ec571d5
+--- /dev/null
++++ b/build/pkgs/wheel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 96c2dd2ca7812f5333bb9d45eadb7ac408e364ce Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:51:44 -0500
+Subject: Trac #29665: add Gentoo package information for terminado.
+
+---
+ build/pkgs/terminado/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/terminado/distros/gentoo.txt
+
+diff --git a/build/pkgs/terminado/distros/gentoo.txt b/build/pkgs/terminado/distros/gentoo.txt
+new file mode 100644
+index 00000000..1df16f1
+--- /dev/null
++++ b/build/pkgs/terminado/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/terminado
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0de0f5f3d235a4339b21e37ea13c9f5e59a82e59 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:52:35 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for terminado.
+
+---
+ build/pkgs/terminado/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/terminado/spkg-configure.m4
+
+diff --git a/build/pkgs/terminado/spkg-configure.m4 b/build/pkgs/terminado/spkg-configure.m4
+new file mode 100644
+index 00000000..5defc2f
+--- /dev/null
++++ b/build/pkgs/terminado/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([terminado], [SAGE_PYTHON_PACKAGE_CHECK([terminado])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d14a745c770b02822557e7cee0a98de1cb2f3a12 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:56:15 -0500
+Subject: Trac #29665: add Gentoo package information for cffi.
+
+---
+ build/pkgs/cffi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cffi/distros/gentoo.txt
+
+diff --git a/build/pkgs/cffi/distros/gentoo.txt b/build/pkgs/cffi/distros/gentoo.txt
+new file mode 100644
+index 00000000..81eeb81
+--- /dev/null
++++ b/build/pkgs/cffi/distros/gentoo.txt
+@@ -0,0 +1 @@
++virtual/python-cffi
+-- 
+cgit v1.0-1-gd88e
+
+
+From ce393c04afc69fe050e38f780d4e117164687d80 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:57:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for cffi.
+
+---
+ build/pkgs/cffi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cffi/spkg-configure.m4
+
+diff --git a/build/pkgs/cffi/spkg-configure.m4 b/build/pkgs/cffi/spkg-configure.m4
+new file mode 100644
+index 00000000..dc81875
+--- /dev/null
++++ b/build/pkgs/cffi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([cffi], [SAGE_PYTHON_PACKAGE_CHECK([cffi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 467093315b3fdd57c8caa2f95cf99ad52b0b84fb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:57:57 -0500
+Subject: Trac #29665: add Gentoo package information for pip.
+
+---
+ build/pkgs/pip/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pip/distros/gentoo.txt
+
+diff --git a/build/pkgs/pip/distros/gentoo.txt b/build/pkgs/pip/distros/gentoo.txt
+new file mode 100644
+index 00000000..1845454
+--- /dev/null
++++ b/build/pkgs/pip/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pip[vanilla]
+-- 
+cgit v1.0-1-gd88e
+
+
+From c597fd23f9f68dabbcb7e698d0569c3e6458f6d1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 09:07:26 -0500
+Subject: Trac #29665: new spkg-configure.m4 for pip.
+
+---
+ build/pkgs/pip/spkg-configure.m4 | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+ create mode 100644 build/pkgs/pip/spkg-configure.m4
+
+diff --git a/build/pkgs/pip/spkg-configure.m4 b/build/pkgs/pip/spkg-configure.m4
+new file mode 100644
+index 00000000..c7a5562
+--- /dev/null
++++ b/build/pkgs/pip/spkg-configure.m4
+@@ -0,0 +1,12 @@
++SAGE_SPKG_CONFIGURE([pip], [
++  dnl always run this macro because it changes the default value of
++  dnl the --with-system-<package> option.
++  SAGE_PYTHON_PACKAGE_CHECK([pip])
++
++  dnl if we might not install the spkg, make sure that "pip" is in
++  dnl the user's PATH, too.
++  AS_IF([test "x$sage_spkg_install_pip" != "xyes"], [
++    AC_CHECK_PROG(HAVE_PIP, pip, yes, no)
++    AS_IF([test "x$HAVE_PIP" = "xno"], [sage_spkg_install_pip=yes])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ef8f1e807bc55d7b8321777486fa867a7c135419 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 9 Nov 2021 09:09:04 -0500
+Subject: Trac #29665: set $SAGE_PIP_INSTALL_FLAGS for
+ --enable-system-site-packages.
+
+We need to pass some special flags to "pip install" to make it do the
+right thing in the precence of system-site packages. Here we introduce
+a new autoconf variable, SAGE_PIP_INSTALL_FLAGS, that will be used
+to pass those flags to the build system.
+
+With autoconf aware of the variable, we substitute its value into the
+sage-build-env-config script for use in spkg-install.in.
+---
+ build/bin/sage-build-env-config.in | 1 +
+ configure.ac                       | 9 +++++++++
+ 2 files changed, 10 insertions(+)
+
+diff --git a/build/bin/sage-build-env-config.in b/build/bin/sage-build-env-config.in
+index 92e7dad..ad62e5f 100644
+--- a/build/bin/sage-build-env-config.in
++++ b/build/bin/sage-build-env-config.in
+@@ -53,6 +53,7 @@ export SAGE_PARI_CFG="@SAGE_PARI_CFG@"
+ 
+ export SAGE_GLPK_PREFIX="@SAGE_GLPK_PREFIX@"
+ export SAGE_FREETYPE_PREFIX="@SAGE_FREETYPE_PREFIX@"
++export SAGE_PIP_INSTALL_FLAGS="@SAGE_PIP_INSTALL_FLAGS@"
+ export SAGE_SUITESPARSE_PREFIX="@SAGE_SUITESPARSE_PREFIX@"
+ 
+ export SAGE_CONFIGURE_FFLAS_FFPACK="@SAGE_CONFIGURE_FFLAS_FFPACK@"
+diff --git a/configure.ac b/configure.ac
+index 6fafb83..6ed07ac 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -441,6 +441,14 @@ AC_ARG_ENABLE(
+     [allow the use of python packages from the system (experimental; default: no)]
+   )], [
+   AS_IF([test "x$enable_system_site_packages" = "xyes"], [
++    dnl When installing python SPKGs in the presence of system-site
++    dnl packages, we need to --ignore-installed so that a patched SPKG
++    dnl can be installed in the presence of an unpatched system package
++    dnl that appears (to pip) to be identical. The --no-deps flag is
++    dnl then needed because --ignore-installed will make any installed
++    dnl dependencies invisible to pip, who does not appreciate that.
++    SAGE_PIP_INSTALL_FLAGS="${SAGE_PIP_INSTALL_FLAGS} --no-deps --ignore-installed"
++
+     SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
+ 
+     dnl We want to raise an error if the user asked for "system site
+@@ -453,6 +461,7 @@ AC_ARG_ENABLE(
+     with_system_python3="force"
+   ])
+ ])
++AC_SUBST([SAGE_PIP_INSTALL_FLAGS])
+ AC_SUBST([SAGE_VENV_FLAGS])
+ 
+ SAGE_SPKG_OPTIONS=""
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3cf365fef84e809e74abd2eb388e7a8e9af9d739 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 9 Nov 2021 21:01:58 -0500
+Subject: Trac #29665: pass $SAGE_PIP_INSTALL_FLAGS to sdh_pip_install.
+
+Since sdh_pip_install is usually called from spkg-install.in, the
+variables from sage-build-env-config will be available. Here we pass
+the contents of $SAGE_PIP_INSTALL_FLAGS to sage-pip-install
+unconditionally, and hope that the user ignores this variable unless
+he truly knows what he is doing.
+---
+ build/bin/sage-dist-helpers | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/build/bin/sage-dist-helpers b/build/bin/sage-dist-helpers
+index fe364e5..1032ac3 100644
+--- a/build/bin/sage-dist-helpers
++++ b/build/bin/sage-dist-helpers
+@@ -303,7 +303,11 @@ sdh_store_wheel() {
+ }
+ 
+ sdh_store_and_pip_install_wheel() {
+-    local pip_options=""
++    # The $SAGE_PIP_INSTALL_FLAGS variable is set by sage-build-env-config.
++    # We skip sanity checking its contents since you should either let sage
++    # decide what it contains, or really know what you are doing.
++    local pip_options="${SAGE_PIP_INSTALL_FLAGS}"
++
+     while [ $# -gt 0 ]; do
+         case $1 in
+             -*) pip_options="$pip_options $1"
+-- 
+cgit v1.0-1-gd88e
+
+
+From 50f0438ee857b8f0b7d7ad924e6bba9c5e1bc033 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:10:46 -0500
+Subject: Trac #29665: add Gentoo package information for pexpect.
+
+---
+ build/pkgs/pexpect/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pexpect/distros/gentoo.txt
+
+diff --git a/build/pkgs/pexpect/distros/gentoo.txt b/build/pkgs/pexpect/distros/gentoo.txt
+new file mode 100644
+index 00000000..30c4b60
+--- /dev/null
++++ b/build/pkgs/pexpect/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pexpect
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4d784688d997290b462646fa7f36114a41f3f453 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:11:25 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pexpect.
+
+---
+ build/pkgs/pexpect/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pexpect/spkg-configure.m4
+
+diff --git a/build/pkgs/pexpect/spkg-configure.m4 b/build/pkgs/pexpect/spkg-configure.m4
+new file mode 100644
+index 00000000..6520856
+--- /dev/null
++++ b/build/pkgs/pexpect/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pexpect], [SAGE_PYTHON_PACKAGE_CHECK([pexpect])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6447122dc76a3b7a58340dbed942db66530b5b07 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:12:05 -0500
+Subject: Trac #29665: add Gentoo package information for docutils.
+
+---
+ build/pkgs/docutils/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/docutils/distros/gentoo.txt
+
+diff --git a/build/pkgs/docutils/distros/gentoo.txt b/build/pkgs/docutils/distros/gentoo.txt
+new file mode 100644
+index 00000000..fe4a452
+--- /dev/null
++++ b/build/pkgs/docutils/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/docutils
+-- 
+cgit v1.0-1-gd88e
+
+
+From 709041480a5fc729b0ee7f1a8a3b16d4d65321b5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:12:38 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for docutils.
+
+---
+ build/pkgs/docutils/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/docutils/spkg-configure.m4
+
+diff --git a/build/pkgs/docutils/spkg-configure.m4 b/build/pkgs/docutils/spkg-configure.m4
+new file mode 100644
+index 00000000..3584e45
+--- /dev/null
++++ b/build/pkgs/docutils/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([docutils], [SAGE_PYTHON_PACKAGE_CHECK([docutils])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 782d38b48ab87afccc43fbc071e7b7ed48fb0a20 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:14:37 -0500
+Subject: Trac #29665: add Gentoo package information for nbclient.
+
+---
+ build/pkgs/nbclient/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbclient/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbclient/distros/gentoo.txt b/build/pkgs/nbclient/distros/gentoo.txt
+new file mode 100644
+index 00000000..06ff18d
+--- /dev/null
++++ b/build/pkgs/nbclient/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbclient
+-- 
+cgit v1.0-1-gd88e
+
+
+From 19ce09336532336f69db74381932d51a429dfaca Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:15:11 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for nbclient.
+
+---
+ build/pkgs/nbclient/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbclient/spkg-configure.m4
+
+diff --git a/build/pkgs/nbclient/spkg-configure.m4 b/build/pkgs/nbclient/spkg-configure.m4
+new file mode 100644
+index 00000000..14178b7
+--- /dev/null
++++ b/build/pkgs/nbclient/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbclient], [SAGE_PYTHON_PACKAGE_CHECK([nbclient])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c063b9de42c1780368000a563d0dbe80b6fff169 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:17:36 -0500
+Subject: Trac #29665: add Gentoo package information for argon2_cffi.
+
+---
+ build/pkgs/argon2_cffi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argon2_cffi/distros/gentoo.txt
+
+diff --git a/build/pkgs/argon2_cffi/distros/gentoo.txt b/build/pkgs/argon2_cffi/distros/gentoo.txt
+new file mode 100644
+index 00000000..2f12ca8
+--- /dev/null
++++ b/build/pkgs/argon2_cffi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/argon2-cffi
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0b4d5699dd51ea52550fba7db9e1cbb8bbac1892 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:18:35 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for argon2_cffi.
+
+---
+ build/pkgs/argon2_cffi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argon2_cffi/spkg-configure.m4
+
+diff --git a/build/pkgs/argon2_cffi/spkg-configure.m4 b/build/pkgs/argon2_cffi/spkg-configure.m4
+new file mode 100644
+index 00000000..03ebc63
+--- /dev/null
++++ b/build/pkgs/argon2_cffi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([argon2_cffi], [SAGE_PYTHON_PACKAGE_CHECK([argon2_cffi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2b4119558a6e0b1aa512848539a237676b035c83 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:30:48 -0500
+Subject: Trac #29665: fix package name in dateutil's install-requires.txt.
+
+---
+ build/pkgs/dateutil/install-requires.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/build/pkgs/dateutil/install-requires.txt b/build/pkgs/dateutil/install-requires.txt
+index 0ae93da..face537 100644
+--- a/build/pkgs/dateutil/install-requires.txt
++++ b/build/pkgs/dateutil/install-requires.txt
+@@ -1 +1 @@
+-dateutil >=2.8.1
++python-dateutil >=2.8.1
+-- 
+cgit v1.0-1-gd88e
+
+
+From df371b7c4d20a3353d43940306ad22e11aba29da Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:31:41 -0500
+Subject: Trac #29665: add Gentoo package information for dateutil.
+
+---
+ build/pkgs/dateutil/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/dateutil/distros/gentoo.txt
+
+diff --git a/build/pkgs/dateutil/distros/gentoo.txt b/build/pkgs/dateutil/distros/gentoo.txt
+new file mode 100644
+index 00000000..e129df7
+--- /dev/null
++++ b/build/pkgs/dateutil/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/python-dateutil
+-- 
+cgit v1.0-1-gd88e
+
+
+From 577695dfdf661ee26c0ffd767bdbf479d95f7fb4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:32:21 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for dateutil.
+
+---
+ build/pkgs/dateutil/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/dateutil/spkg-configure.m4
+
+diff --git a/build/pkgs/dateutil/spkg-configure.m4 b/build/pkgs/dateutil/spkg-configure.m4
+new file mode 100644
+index 00000000..fdcd127
+--- /dev/null
++++ b/build/pkgs/dateutil/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([dateutil], [SAGE_PYTHON_PACKAGE_CHECK([dateutil])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1984651caac624ec4bb58814ca1d57fe66f9881a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:33:51 -0500
+Subject: Trac #29665: add Gentoo package information for setuptools_scm.
+
+---
+ build/pkgs/setuptools_scm/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/setuptools_scm/distros/gentoo.txt
+
+diff --git a/build/pkgs/setuptools_scm/distros/gentoo.txt b/build/pkgs/setuptools_scm/distros/gentoo.txt
+new file mode 100644
+index 00000000..8989597
+--- /dev/null
++++ b/build/pkgs/setuptools_scm/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/setuptools_scm
+-- 
+cgit v1.0-1-gd88e
+
+
+From ebf7c854ed966e7353759be485c4f5a57b9a10fa Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:34:49 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for setuptools_scm.
+
+---
+ build/pkgs/setuptools_scm/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/setuptools_scm/spkg-configure.m4
+
+diff --git a/build/pkgs/setuptools_scm/spkg-configure.m4 b/build/pkgs/setuptools_scm/spkg-configure.m4
+new file mode 100644
+index 00000000..437148c
+--- /dev/null
++++ b/build/pkgs/setuptools_scm/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([setuptools_scm], [
++  SAGE_PYTHON_PACKAGE_CHECK([setuptools_scm])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0dee0d0c28f31b1f619e44c710a3c9e22d2b2544 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:36:33 -0500
+Subject: Trac #29665: add Gentoo package information for nbconvert.
+
+---
+ build/pkgs/nbconvert/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbconvert/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbconvert/distros/gentoo.txt b/build/pkgs/nbconvert/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c45a10
+--- /dev/null
++++ b/build/pkgs/nbconvert/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbconvert
+-- 
+cgit v1.0-1-gd88e
+
+
+From 473789eb11b1838bc32dc8a63509ee199afc8912 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:37:37 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for nbconvert.
+
+---
+ build/pkgs/nbconvert/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbconvert/spkg-configure.m4
+
+diff --git a/build/pkgs/nbconvert/spkg-configure.m4 b/build/pkgs/nbconvert/spkg-configure.m4
+new file mode 100644
+index 00000000..9b5dee3
+--- /dev/null
++++ b/build/pkgs/nbconvert/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbconvert], [SAGE_PYTHON_PACKAGE_CHECK([nbconvert])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f0703b594e57c980d605aa9bc8316c45a7858b3b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:41:51 -0500
+Subject: Trac #29665: add Gentoo package information for jupyter_core.
+
+---
+ build/pkgs/jupyter_core/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyter_core/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyter_core/distros/gentoo.txt b/build/pkgs/jupyter_core/distros/gentoo.txt
+new file mode 100644
+index 00000000..f168c5a
+--- /dev/null
++++ b/build/pkgs/jupyter_core/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyter_core
+-- 
+cgit v1.0-1-gd88e
+
+
+From 061a307cc4a6680d8500fde834975064e59540d5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:42:48 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jupyter_core.
+
+---
+ build/pkgs/jupyter_core/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyter_core/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyter_core/spkg-configure.m4 b/build/pkgs/jupyter_core/spkg-configure.m4
+new file mode 100644
+index 00000000..67df9c3
+--- /dev/null
++++ b/build/pkgs/jupyter_core/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyter_core], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyter_core])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b85abe964ce0b98b5842efe9cbad9bdb1c89202f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:47:08 -0500
+Subject: Trac #29665: add Gentoo package information for jupyter_client.
+
+---
+ build/pkgs/jupyter_client/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyter_client/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyter_client/distros/gentoo.txt b/build/pkgs/jupyter_client/distros/gentoo.txt
+new file mode 100644
+index 00000000..4f1de88
+--- /dev/null
++++ b/build/pkgs/jupyter_client/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyter_client
+-- 
+cgit v1.0-1-gd88e
+
+
+From 86323ff1e0b2507933df6bc2a96c9175957640c5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:48:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jupyter_client.
+
+---
+ build/pkgs/jupyter_client/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyter_client/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyter_client/spkg-configure.m4 b/build/pkgs/jupyter_client/spkg-configure.m4
+new file mode 100644
+index 00000000..fbd3498
+--- /dev/null
++++ b/build/pkgs/jupyter_client/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyter_client], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyter_client])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a8475e27dd30d752d05ab6fea6579e8623501d82 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:48:58 -0500
+Subject: Trac #29665: add Gentoo package information for snowballstemmer.
+
+---
+ build/pkgs/snowballstemmer/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/snowballstemmer/distros/gentoo.txt
+
+diff --git a/build/pkgs/snowballstemmer/distros/gentoo.txt b/build/pkgs/snowballstemmer/distros/gentoo.txt
+new file mode 100644
+index 00000000..63fd851
+--- /dev/null
++++ b/build/pkgs/snowballstemmer/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/snowballstemmer
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0833c9b781062b4ed86d619e050a6f5d60e36080 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:49:38 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for snowballstemmer.
+
+---
+ build/pkgs/snowballstemmer/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/snowballstemmer/spkg-configure.m4
+
+diff --git a/build/pkgs/snowballstemmer/spkg-configure.m4 b/build/pkgs/snowballstemmer/spkg-configure.m4
+new file mode 100644
+index 00000000..6aa0882
+--- /dev/null
++++ b/build/pkgs/snowballstemmer/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([snowballstemmer], [
++  SAGE_PYTHON_PACKAGE_CHECK([snowballstemmer])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 50a1cf2a2bcd7eeec64cbc3f70e3e9fbe5d850fe Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:50:47 -0500
+Subject: Trac #29665: add Gentoo package information for tornado.
+
+---
+ build/pkgs/tornado/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tornado/distros/gentoo.txt
+
+diff --git a/build/pkgs/tornado/distros/gentoo.txt b/build/pkgs/tornado/distros/gentoo.txt
+new file mode 100644
+index 00000000..6ae4b9f
+--- /dev/null
++++ b/build/pkgs/tornado/distros/gentoo.txt
+@@ -0,0 +1 @@
++www-servers/tornado
+-- 
+cgit v1.0-1-gd88e
+
+
+From 118f4da6e03476c726363e8e22ecda32f13bfc33 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:51:26 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for tornado.
+
+---
+ build/pkgs/tornado/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tornado/spkg-configure.m4
+
+diff --git a/build/pkgs/tornado/spkg-configure.m4 b/build/pkgs/tornado/spkg-configure.m4
+new file mode 100644
+index 00000000..1ee5bc9
+--- /dev/null
++++ b/build/pkgs/tornado/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tornado], [SAGE_PYTHON_PACKAGE_CHECK([tornado])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3850701747a6c8ef60840bdfdb589b28d4cd2b9a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:52:21 -0500
+Subject: Trac #29665: add Gentoo package information for jsonschema.
+
+---
+ build/pkgs/jsonschema/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jsonschema/distros/gentoo.txt
+
+diff --git a/build/pkgs/jsonschema/distros/gentoo.txt b/build/pkgs/jsonschema/distros/gentoo.txt
+new file mode 100644
+index 00000000..d708e4c
+--- /dev/null
++++ b/build/pkgs/jsonschema/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jsonschema
+-- 
+cgit v1.0-1-gd88e
+
+
+From 76e3917c8af781af00f642cfada7a79594429e30 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:54:03 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jsonschema.
+
+---
+ build/pkgs/jsonschema/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jsonschema/spkg-configure.m4
+
+diff --git a/build/pkgs/jsonschema/spkg-configure.m4 b/build/pkgs/jsonschema/spkg-configure.m4
+new file mode 100644
+index 00000000..b9e5e21
+--- /dev/null
++++ b/build/pkgs/jsonschema/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jsonschema], [SAGE_PYTHON_PACKAGE_CHECK([jsonschema])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From fd4a16c11669b6dd73ac6325bca820e76db00402 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:55:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ widgetsnbextension.
+
+---
+ build/pkgs/widgetsnbextension/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/widgetsnbextension/spkg-configure.m4
+
+diff --git a/build/pkgs/widgetsnbextension/spkg-configure.m4 b/build/pkgs/widgetsnbextension/spkg-configure.m4
+new file mode 100644
+index 00000000..bf82daf
+--- /dev/null
++++ b/build/pkgs/widgetsnbextension/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([widgetsnbextension], [
++  SAGE_PYTHON_PACKAGE_CHECK([widgetsnbextension])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8079a9f384e3c8480e157dd98c3db2f43c987f4e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:57:20 -0500
+Subject: Trac #29665: add Gentoo package information for importlib_resources.
+
+---
+ build/pkgs/importlib_resources/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/importlib_resources/distros/gentoo.txt
+
+diff --git a/build/pkgs/importlib_resources/distros/gentoo.txt b/build/pkgs/importlib_resources/distros/gentoo.txt
+new file mode 100644
+index 00000000..d5e1f2c
+--- /dev/null
++++ b/build/pkgs/importlib_resources/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/importlib_resources
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2c430d7c52f02779a6c41b98ac2f4edd8b6759c3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:58:00 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ importlib_resources.
+
+---
+ build/pkgs/importlib_resources/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/importlib_resources/spkg-configure.m4
+
+diff --git a/build/pkgs/importlib_resources/spkg-configure.m4 b/build/pkgs/importlib_resources/spkg-configure.m4
+new file mode 100644
+index 00000000..50df55b
+--- /dev/null
++++ b/build/pkgs/importlib_resources/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([importlib_resources], [
++  SAGE_PYTHON_PACKAGE_CHECK([importlib_resources])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 00d13d7bf2e50aae2ccef3b2b30293c70a922af2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:58:38 -0500
+Subject: Trac #29665: add Gentoo package information for kiwisolver.
+
+---
+ build/pkgs/kiwisolver/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/kiwisolver/distros/gentoo.txt
+
+diff --git a/build/pkgs/kiwisolver/distros/gentoo.txt b/build/pkgs/kiwisolver/distros/gentoo.txt
+new file mode 100644
+index 00000000..7b30c95
+--- /dev/null
++++ b/build/pkgs/kiwisolver/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/kiwisolver
+-- 
+cgit v1.0-1-gd88e
+
+
+From 72b7907ef7ea9fa4ff6948ea34cfe2f693ee6c31 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:59:09 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for kiwisolver.
+
+---
+ build/pkgs/kiwisolver/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/kiwisolver/spkg-configure.m4
+
+diff --git a/build/pkgs/kiwisolver/spkg-configure.m4 b/build/pkgs/kiwisolver/spkg-configure.m4
+new file mode 100644
+index 00000000..4e7ac97
+--- /dev/null
++++ b/build/pkgs/kiwisolver/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([kiwisolver], [SAGE_PYTHON_PACKAGE_CHECK([kiwisolver])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 479351279e4e0ea7e2d146434f0daba038765cfd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:00:04 -0500
+Subject: Trac #29665: add Gentoo package information for notebook.
+
+---
+ build/pkgs/notebook/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/notebook/distros/gentoo.txt
+
+diff --git a/build/pkgs/notebook/distros/gentoo.txt b/build/pkgs/notebook/distros/gentoo.txt
+new file mode 100644
+index 00000000..6475d72
+--- /dev/null
++++ b/build/pkgs/notebook/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/notebook
+-- 
+cgit v1.0-1-gd88e
+
+
+From f4d9242ea654977f8ad7865c82eec593e11a36bc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:01:42 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for notebook.
+
+---
+ build/pkgs/notebook/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/notebook/spkg-configure.m4
+
+diff --git a/build/pkgs/notebook/spkg-configure.m4 b/build/pkgs/notebook/spkg-configure.m4
+new file mode 100644
+index 00000000..a17ba95
+--- /dev/null
++++ b/build/pkgs/notebook/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([notebook], [SAGE_PYTHON_PACKAGE_CHECK([notebook])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9837070c7f8e9a71283b84d49d4fd2c94b78a464 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:02:38 -0500
+Subject: Trac #29665: add Gentoo package information for matplotlib_inline.
+
+---
+ build/pkgs/matplotlib_inline/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/matplotlib_inline/distros/gentoo.txt
+
+diff --git a/build/pkgs/matplotlib_inline/distros/gentoo.txt b/build/pkgs/matplotlib_inline/distros/gentoo.txt
+new file mode 100644
+index 00000000..6a5859c
+--- /dev/null
++++ b/build/pkgs/matplotlib_inline/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/matplotlib-inline
+-- 
+cgit v1.0-1-gd88e
+
+
+From 750be73b25b92b4875e47d044360ac0e1116ec3e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:03:28 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for matplotlib_inline.
+
+---
+ build/pkgs/matplotlib_inline/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/matplotlib_inline/spkg-configure.m4
+
+diff --git a/build/pkgs/matplotlib_inline/spkg-configure.m4 b/build/pkgs/matplotlib_inline/spkg-configure.m4
+new file mode 100644
+index 00000000..e59658f
+--- /dev/null
++++ b/build/pkgs/matplotlib_inline/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([matplotlib_inline], [
++  SAGE_PYTHON_PACKAGE_CHECK([matplotlib_inline])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 273505f49698dcd2ab30c2756b07113c9b7e7791 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:04:10 -0500
+Subject: Trac #29665: add Gentoo package information for ipykernel.
+
+---
+ build/pkgs/ipykernel/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipykernel/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipykernel/distros/gentoo.txt b/build/pkgs/ipykernel/distros/gentoo.txt
+new file mode 100644
+index 00000000..88aab61
+--- /dev/null
++++ b/build/pkgs/ipykernel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipykernel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 629ad36c9e4ae0cdff4a013289b4f2911442445e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:04:46 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for ipykernel.
+
+---
+ build/pkgs/ipykernel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipykernel/spkg-configure.m4
+
+diff --git a/build/pkgs/ipykernel/spkg-configure.m4 b/build/pkgs/ipykernel/spkg-configure.m4
+new file mode 100644
+index 00000000..94ecc2d
+--- /dev/null
++++ b/build/pkgs/ipykernel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipykernel], [SAGE_PYTHON_PACKAGE_CHECK([ipykernel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b8d709edb6a24fd5868ee2818b56e78257b2eafa Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:05:26 -0500
+Subject: Trac #29665: add Gentoo package information for prompt_toolkit.
+
+---
+ build/pkgs/prompt_toolkit/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/prompt_toolkit/distros/gentoo.txt
+
+diff --git a/build/pkgs/prompt_toolkit/distros/gentoo.txt b/build/pkgs/prompt_toolkit/distros/gentoo.txt
+new file mode 100644
+index 00000000..6902484
+--- /dev/null
++++ b/build/pkgs/prompt_toolkit/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/prompt_toolkit
+-- 
+cgit v1.0-1-gd88e
+
+
+From 16c0b5e767ae4dac4440510b7253e5c8642b7d2c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:10:39 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for prompt_toolkit.
+
+---
+ build/pkgs/prompt_toolkit/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/prompt_toolkit/spkg-configure.m4
+
+diff --git a/build/pkgs/prompt_toolkit/spkg-configure.m4 b/build/pkgs/prompt_toolkit/spkg-configure.m4
+new file mode 100644
+index 00000000..fd8c1a6
+--- /dev/null
++++ b/build/pkgs/prompt_toolkit/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([prompt_toolkit], [
++  SAGE_PYTHON_PACKAGE_CHECK([prompt_toolkit])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0cd9283e8bb6c8ae413fc8f715c021f7ec3ca2c8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:12:10 -0500
+Subject: Trac #29665: add Gentoo package information for charset_normalizer.
+
+---
+ build/pkgs/charset_normalizer/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/charset_normalizer/distros/gentoo.txt
+
+diff --git a/build/pkgs/charset_normalizer/distros/gentoo.txt b/build/pkgs/charset_normalizer/distros/gentoo.txt
+new file mode 100644
+index 00000000..eefeb89
+--- /dev/null
++++ b/build/pkgs/charset_normalizer/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/charset_normalizer
+-- 
+cgit v1.0-1-gd88e
+
+
+From a04b01a9ab59097d189edcc5ddcb461faede83b2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:12:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ charset_normalizer.
+
+---
+ build/pkgs/charset_normalizer/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/charset_normalizer/spkg-configure.m4
+
+diff --git a/build/pkgs/charset_normalizer/spkg-configure.m4 b/build/pkgs/charset_normalizer/spkg-configure.m4
+new file mode 100644
+index 00000000..18b18cf
+--- /dev/null
++++ b/build/pkgs/charset_normalizer/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([charset_normalizer], [
++  SAGE_PYTHON_PACKAGE_CHECK([charset_normalizer])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d2ea08138711c53046f977b586f33b09b176b2e3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:13:37 -0500
+Subject: Trac #29665: add Gentoo package information for prometheus_client.
+
+---
+ build/pkgs/prometheus_client/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/prometheus_client/distros/gentoo.txt
+
+diff --git a/build/pkgs/prometheus_client/distros/gentoo.txt b/build/pkgs/prometheus_client/distros/gentoo.txt
+new file mode 100644
+index 00000000..aa2889c
+--- /dev/null
++++ b/build/pkgs/prometheus_client/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/prometheus_client
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b0393200e9edd3e26b8a55ba67e5710e7403fcb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:15:09 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for prometheus_client.
+
+---
+ build/pkgs/prometheus_client/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/prometheus_client/spkg-configure.m4
+
+diff --git a/build/pkgs/prometheus_client/spkg-configure.m4 b/build/pkgs/prometheus_client/spkg-configure.m4
+new file mode 100644
+index 00000000..b494588
+--- /dev/null
++++ b/build/pkgs/prometheus_client/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([prometheus_client], [
++  SAGE_PYTHON_PACKAGE_CHECK([prometheus_client])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From cdcd85284f43ca4ad18353ec3527b2901e57b788 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:17:23 -0500
+Subject: Trac #29665: add Gentoo package information for pybind11.
+
+---
+ build/pkgs/pybind11/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pybind11/distros/gentoo.txt
+
+diff --git a/build/pkgs/pybind11/distros/gentoo.txt b/build/pkgs/pybind11/distros/gentoo.txt
+new file mode 100644
+index 00000000..0c500b3
+--- /dev/null
++++ b/build/pkgs/pybind11/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pybind11
+-- 
+cgit v1.0-1-gd88e
+
+
+From efdd1eb64c4799fe3cdf2221824182941b3fda2d Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:17:51 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pybind11.
+
+---
+ build/pkgs/pybind11/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pybind11/spkg-configure.m4
+
+diff --git a/build/pkgs/pybind11/spkg-configure.m4 b/build/pkgs/pybind11/spkg-configure.m4
+new file mode 100644
+index 00000000..cce1cf5
+--- /dev/null
++++ b/build/pkgs/pybind11/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pybind11], [SAGE_PYTHON_PACKAGE_CHECK([pybind11])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b2128f33b68ea33927284116ea598dd186902400 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:19:23 -0500
+Subject: Trac #29665: add Gentoo package information for pkgconfig.
+
+---
+ build/pkgs/pkgconfig/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pkgconfig/distros/gentoo.txt
+
+diff --git a/build/pkgs/pkgconfig/distros/gentoo.txt b/build/pkgs/pkgconfig/distros/gentoo.txt
+new file mode 100644
+index 00000000..32e8618
+--- /dev/null
++++ b/build/pkgs/pkgconfig/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pkgconfig
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b373b49e06aadeb36dc57e500da9a322460e658 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:19:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pkgconfig.
+
+---
+ build/pkgs/pkgconfig/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pkgconfig/spkg-configure.m4
+
+diff --git a/build/pkgs/pkgconfig/spkg-configure.m4 b/build/pkgs/pkgconfig/spkg-configure.m4
+new file mode 100644
+index 00000000..6708293
+--- /dev/null
++++ b/build/pkgs/pkgconfig/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pkgconfig], [SAGE_PYTHON_PACKAGE_CHECK([pkgconfig])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ce578729eb0d14baab365351ba9a9ffffb7b79f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:21:10 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_serializinghtml.
+
+---
+ build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt b/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+new file mode 100644
+index 00000000..38bca8f
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-serializinghtml
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb0f42c32bbce0e4488678312f5e2d88c6f42c9b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:21:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_serializinghtml.
+
+---
+ build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4 b/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+new file mode 100644
+index 00000000..be8e625
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_serializinghtml], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_serializinghtml])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e47dcf985e40475de85c9436a85537751318bc3d Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:22:54 -0500
+Subject: Trac #29665: add Gentoo package information for sphinxcontrib_jsmath.
+
+---
+ build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt b/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+new file mode 100644
+index 00000000..041a471
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-jsmath
+-- 
+cgit v1.0-1-gd88e
+
+
+From 72cff6fd35f93de4fa855bc870569dd733ff5c24 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:23:49 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_jsmath.
+
+---
+ build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4 b/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+new file mode 100644
+index 00000000..e46bde2
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_jsmath], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_jsmath])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a36395d70f759449cd63c1b0990fbdcb4cb25ca0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:24:26 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_devhelp.
+
+---
+ build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..9b5c899
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-devhelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9953a5dd1646ed0ad51d2e3935cf609bc9e7fd1c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:25:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_devhelp.
+
+---
+ build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+new file mode 100644
+index 00000000..8728136
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_devhelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_devhelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b199d5363aad93f3cb23f7904c9553a28b06348f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:25:53 -0500
+Subject: Trac #29665: add Gentoo package information for sphinxcontrib_qthelp.
+
+---
+ build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..7210099
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-qthelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 94ac8806739f3938e73f5857328e91e0d42e98d2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:26:28 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_qthelp.
+
+---
+ build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+new file mode 100644
+index 00000000..81ea5e1
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_qthelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_qthelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From beedc154aa405e8a58aee8889f510db07adc89a7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:26:54 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_applehelp.
+
+---
+ build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..66ac8da
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-applehelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 07d47c3673d6b35423b71f621cb400989c0101c2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:27:19 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_applehelp.
+
+---
+ build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+new file mode 100644
+index 00000000..e834aed
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_applehelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_applehelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 333a66546c5d421735c49dbafd7370a827f22781 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:27:46 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_htmlhelp.
+
+---
+ build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..e080bac
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-htmlhelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From bfaeb3962254439b63f1f2e0e883de462c7831be Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:29:18 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_htmlhelp.
+
+---
+ build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+new file mode 100644
+index 00000000..c77b003
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_htmlhelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_htmlhelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 782cde13da06e8b85806cb7cbc8aceee0364e639 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:30:23 -0500
+Subject: Trac #29665: add Gentoo package information for jupyterlab_pygments.
+
+---
+ build/pkgs/jupyterlab_pygments/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyterlab_pygments/distros/gentoo.txt b/build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+new file mode 100644
+index 00000000..c57b4f1
+--- /dev/null
++++ b/build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyterlab_pygments
+-- 
+cgit v1.0-1-gd88e
+
+
+From 39f974cfa4a8c6e5dd897f152f83ec82f40ee9f7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:31:13 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ jupyterlab_pygments.
+
+---
+ build/pkgs/jupyterlab_pygments/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyterlab_pygments/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyterlab_pygments/spkg-configure.m4 b/build/pkgs/jupyterlab_pygments/spkg-configure.m4
+new file mode 100644
+index 00000000..e46e21f
+--- /dev/null
++++ b/build/pkgs/jupyterlab_pygments/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyterlab_pygments], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyterlab_pygments])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From db704620700fd36cec3bf6125938f3ee00a9eb5e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:29:15 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for ply.
+
+---
+ build/pkgs/ply/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ply/spkg-configure.m4
+
+diff --git a/build/pkgs/ply/spkg-configure.m4 b/build/pkgs/ply/spkg-configure.m4
+new file mode 100644
+index 00000000..ffb0030
+--- /dev/null
++++ b/build/pkgs/ply/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ply], [SAGE_PYTHON_PACKAGE_CHECK([ply])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6aac31dabcdfdef228d7780398a3fda1a4cc566f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:29:51 -0500
+Subject: Trac #29665: add Gentoo package information for ply.
+
+---
+ build/pkgs/ply/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ply/distros/gentoo.txt
+
+diff --git a/build/pkgs/ply/distros/gentoo.txt b/build/pkgs/ply/distros/gentoo.txt
+new file mode 100644
+index 00000000..c8b1630
+--- /dev/null
++++ b/build/pkgs/ply/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ply
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb8d3372936ec37470d69687a0f91592129460ae Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:30:33 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for gast.
+
+---
+ build/pkgs/gast/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/gast/spkg-configure.m4
+
+diff --git a/build/pkgs/gast/spkg-configure.m4 b/build/pkgs/gast/spkg-configure.m4
+new file mode 100644
+index 00000000..26ec59f
+--- /dev/null
++++ b/build/pkgs/gast/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([gast], [SAGE_PYTHON_PACKAGE_CHECK([gast])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1cdc4046a88f1c2b4e5c162f66c6db6090b24194 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:31:15 -0500
+Subject: Trac #29665: add Gentoo package information for gast.
+
+---
+ build/pkgs/gast/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/gast/distros/gentoo.txt
+
+diff --git a/build/pkgs/gast/distros/gentoo.txt b/build/pkgs/gast/distros/gentoo.txt
+new file mode 100644
+index 00000000..3be5e7e
+--- /dev/null
++++ b/build/pkgs/gast/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/gast
+-- 
+cgit v1.0-1-gd88e
+
+
+From 96068b8a3742b65d619190e1d9fa5db399e6b4f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:32:20 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pythran.
+
+---
+ build/pkgs/pythran/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pythran/spkg-configure.m4
+
+diff --git a/build/pkgs/pythran/spkg-configure.m4 b/build/pkgs/pythran/spkg-configure.m4
+new file mode 100644
+index 00000000..592e95b
+--- /dev/null
++++ b/build/pkgs/pythran/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pythran], [SAGE_PYTHON_PACKAGE_CHECK([pythran])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1fa0fad3ae8f7e559c6fc315c6773a7d8aac0bfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:32:55 -0500
+Subject: Trac #29665: add Gentoo package information for pythran.
+
+---
+ build/pkgs/pythran/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pythran/distros/gentoo.txt
+
+diff --git a/build/pkgs/pythran/distros/gentoo.txt b/build/pkgs/pythran/distros/gentoo.txt
+new file mode 100644
+index 00000000..1bb7cdc
+--- /dev/null
++++ b/build/pkgs/pythran/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pythran
+-- 
+cgit v1.0-1-gd88e
+
+
+From d26370e5b8c88e76abfb7c27e3defb71c9e9f711 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:33:50 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for beniget.
+
+---
+ build/pkgs/beniget/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/beniget/spkg-configure.m4
+
+diff --git a/build/pkgs/beniget/spkg-configure.m4 b/build/pkgs/beniget/spkg-configure.m4
+new file mode 100644
+index 00000000..8ae6101
+--- /dev/null
++++ b/build/pkgs/beniget/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([beniget], [SAGE_PYTHON_PACKAGE_CHECK([beniget])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From eeeb296ed9b9694a865534103fd58e62a151ef5e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:34:22 -0500
+Subject: Trac #29665: add Gentoo package information for beniget.
+
+---
+ build/pkgs/beniget/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/beniget/distros/gentoo.txt
+
+diff --git a/build/pkgs/beniget/distros/gentoo.txt b/build/pkgs/beniget/distros/gentoo.txt
+new file mode 100644
+index 00000000..1a5972c
+--- /dev/null
++++ b/build/pkgs/beniget/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/beniget
+-- 
+cgit v1.0-1-gd88e
+
+
+From 078b2ff272d0eeff5cce40ad7eb176d9ddd7bdff Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:35:37 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for alabaster.
+
+---
+ build/pkgs/alabaster/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/alabaster/spkg-configure.m4
+
+diff --git a/build/pkgs/alabaster/spkg-configure.m4 b/build/pkgs/alabaster/spkg-configure.m4
+new file mode 100644
+index 00000000..4eca6e0
+--- /dev/null
++++ b/build/pkgs/alabaster/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([alabaster], [SAGE_PYTHON_PACKAGE_CHECK([alabaster])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7dc264353e5f64110431ff28c1b8b7e89699e9bd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:36:06 -0500
+Subject: Trac #29665: add Gentoo package information for alabaster.
+
+---
+ build/pkgs/alabaster/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/alabaster/distros/gentoo.txt
+
+diff --git a/build/pkgs/alabaster/distros/gentoo.txt b/build/pkgs/alabaster/distros/gentoo.txt
+new file mode 100644
+index 00000000..cffece6
+--- /dev/null
++++ b/build/pkgs/alabaster/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/alabaster
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8011a5e675e7e61a77ce34a299ee961a9f44253f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:43:59 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ importlib_metadata.
+
+---
+ build/pkgs/importlib_metadata/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/importlib_metadata/spkg-configure.m4
+
+diff --git a/build/pkgs/importlib_metadata/spkg-configure.m4 b/build/pkgs/importlib_metadata/spkg-configure.m4
+new file mode 100644
+index 00000000..0554e52
+--- /dev/null
++++ b/build/pkgs/importlib_metadata/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([importlib_metadata], [
++  SAGE_PYTHON_PACKAGE_CHECK([importlib_metadata])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 928ca0019e3ec6c4541a16b28bcc6710df6d010b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:44:28 -0500
+Subject: Trac #29665: add Gentoo package information for importlib_metadata.
+
+---
+ build/pkgs/importlib_metadata/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/importlib_metadata/distros/gentoo.txt
+
+diff --git a/build/pkgs/importlib_metadata/distros/gentoo.txt b/build/pkgs/importlib_metadata/distros/gentoo.txt
+new file mode 100644
+index 00000000..4f92786
+--- /dev/null
++++ b/build/pkgs/importlib_metadata/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/importlib_metadata
+-- 
+cgit v1.0-1-gd88e
+
+
+From 135f184f7498a2046065e669723e68efe2d65cee Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 21:16:58 -0500
+Subject: Trac #29665: fix sage.misc.package doctest with system alabaster.
+
+When alabaster from the system is used, these tests won't be able to
+find its SPKG installed. Add some ellipses, and switch one test to
+look for sage_conf instead.
+---
+ src/sage/misc/package.py | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/sage/misc/package.py b/src/sage/misc/package.py
+index 84f3d50..c7ad206 100644
+--- a/src/sage/misc/package.py
++++ b/src/sage/misc/package.py
+@@ -386,9 +386,9 @@ def installed_packages(exclude_pip=True):
+     EXAMPLES::
+ 
+         sage: sorted(installed_packages().keys())  # optional - build
+-        [...'gmpy2', ...'sage_conf', ...]
+-        sage: installed_packages()['gmpy2']  # optional - build, random
+-        '2.1.0b5'
++        [...'sage_conf', ...]
++        sage: installed_packages()['sage_conf']  # optional - build, random
++        '9.5'
+ 
+     .. SEEALSO::
+ 
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/trac-32867-system_maxima-ed39aba734cb4ded0b04165fa142b5cf4c38fd23.patch b/srcpkgs/sagemath/patches/trac-32867-system_maxima-ed39aba734cb4ded0b04165fa142b5cf4c38fd23.patch
new file mode 100644
index 000000000000..8edbde0ce76f
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-32867-system_maxima-ed39aba734cb4ded0b04165fa142b5cf4c38fd23.patch
@@ -0,0 +1,247 @@
+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
+ 
+-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 fbce694..b40cda6 100644
+--- a/pkgs/sage-conf/sage_conf.py.in
++++ b/pkgs/sage-conf/sage_conf.py.in
+@@ -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.
+ MAXIMA_FAS = "@SAGE_MAXIMA_FAS@".replace('${prefix}', SAGE_LOCAL)
+ 
+diff --git a/src/bin/sage b/src/bin/sage
+index fcd2630..54b69a1 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/sage/env.py b/src/sage/env.py
+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"))
+ 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 fc7f48b..7313c7d 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 917059d..c966a3c 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')
+-- 
+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/patches/trac-33047-musl_fix_find_library-dc1a0e8168a9ffb4fbf07dd03c0846b4933a6dbe.patch b/srcpkgs/sagemath/patches/trac-33047-musl_fix_find_library-dc1a0e8168a9ffb4fbf07dd03c0846b4933a6dbe.patch
new file mode 100644
index 000000000000..3d4f4e14bb7b
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33047-musl_fix_find_library-dc1a0e8168a9ffb4fbf07dd03c0846b4933a6dbe.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: Add a patch that fixes ctypes.util.find_library('c')
+
+The issue causes a failure doctesting src/sage/misc/gperftools.py
+---
+ 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 00000000..82f436b
+--- /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):
+-- 
+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-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch b/srcpkgs/sagemath/patches/trac-33064-sage_docbuild_ignore_cache_save_permission_error-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
new file mode 100644
index 000000000000..04f04cfd6718
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33064-sage_docbuild_ignore_cache_save_permission_error-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
@@ -0,0 +1,32 @@
+From e89193f4f32246ad9ded6d37f1f2f12a589a81f4 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 466ca82..f8c8ebd 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/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch b/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
new file mode 100644
index 000000000000..04fca4815a00
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
@@ -0,0 +1,131 @@
+From 18d0477153af6f453a0e84f78030535f6a36ce87 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 c788623..527ed90 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 - sagemath_doc_html
+-        sage: thematic_index = os.path.join(SAGE_DOC, "html", "en", "thematic_tutorials", "index.html")  # optional - sagemath_doc_html
++        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 - sagemath_doc_html
+         ....:     if "padics" in line:
+         ....:         _ = sys.stdout.write(line)
+diff --git a/src/sage/misc/sagedoc.py b/src/sage/misc/sagedoc.py
+index 4c56aea..583ca06 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 - sagemath_doc_html
+-    sage: docfilename = os.path.join(SAGE_DOC, 'html', 'en', 'reference', 'calculus', 'sage', 'symbolic', 'expression.html')  # optional - sagemath_doc_html
++    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 - sagemath_doc_html
+     ....:     for line in fobj:
+     ....:         if "#sage.symbolic.expression.Expression.numerical_approx" in line:
+@@ -845,12 +845,12 @@ def _search_src_or_doc(what, string, extra1='', extra2='', extra3='',
+ 
+     ::
+ 
+-        sage: from sage.misc.sagedoc import _search_src_or_doc  # optional - sagemath_doc_html
+-        sage: len(_search_src_or_doc('src', r'matrix\(', 'incidence_structures', 'self', 'combinat', interact=False).splitlines()) > 1  # optional - sagemath_doc_html
++        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 - sagemath_doc_html, long time (4s on sage.math, 2012)
+         True
+-        sage: 'divisors' in _search_src_or_doc('src', '^ *def prime', interact=False)  # optional - sagemath_doc_html
++        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
+@@ -1369,7 +1369,7 @@ class _sage_doc:
+ 
+         sage: browse_sage_doc._open("reference", testing=True)[0]  # optional - sagemath_doc_html, indirect doctest
+         'http://localhost:8000/doc/live/reference/index.html'
+-        sage: browse_sage_doc(identity_matrix, 'rst')[-107:-47]  # optional - sagemath_doc_html
++        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 88dd9f3a1611fed0cc66fb838eb85739646dd34d 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 f8c8ebd..d329009 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 - sagemath_doc_html
+         ....:     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 - sagemath_doc_html
+             '.../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 - sagemath_doc_html
+             '.../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 - sagemath_doc_html
+             '.../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 - sagemath_doc_html
+             '.../html/en/reference'
+         """
+         if lang is None:
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch b/srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
new file mode 100644
index 000000000000..7fdb3d697222
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.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: 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 4c0fa17..153e610 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
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch b/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
new file mode 100644
index 000000000000..350c41ac3928
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
@@ -0,0 +1,35 @@
+From 53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6 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: sagetex: Fix a warning when byte-compiling sagetexparse.py
+
+---
+ build/pkgs/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 00000000..d82ab67
+--- /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'
++ 
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/trac-33189-fix_doctests_for_arb_2.22-53532ddd4e2dc92469c1590ebf0c40f8f69bf579.patch b/srcpkgs/sagemath/patches/trac-33189-fix_doctests_for_arb_2.22-53532ddd4e2dc92469c1590ebf0c40f8f69bf579.patch
new file mode 100644
index 000000000000..b861af7ec982
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33189-fix_doctests_for_arb_2.22-53532ddd4e2dc92469c1590ebf0c40f8f69bf579.patch
@@ -0,0 +1,126 @@
+From 24cc94b1988a90f3bd22a2368ec30c086283af13 Mon Sep 17 00:00:00 2001
+From: Antonio Rojas <arojas@archlinux.org>
+Date: Sun, 16 Jan 2022 11:55:04 +0100
+Subject: Add abs tol to some arb tests
+
+---
+ src/sage/functions/error.py    |  2 +-
+ src/sage/rings/complex_arb.pyx |  6 +++---
+ src/sage/rings/real_arb.pyx    | 10 +++++-----
+ 3 files changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/src/sage/functions/error.py b/src/sage/functions/error.py
+index f48d04f..06f0b24 100644
+--- a/src/sage/functions/error.py
++++ b/src/sage/functions/error.py
+@@ -267,7 +267,7 @@ class Function_erf(BuiltinFunction):
+ 
+         Check that real ball evaluation is fixed :trac:`28061`::
+ 
+-            sage: RealBallField(128)(erf(5))
++            sage: RealBallField(128)(erf(5)) # abs tol 1e-38
+             [0.99999999999846254020557196514981165651 +/- 7.33e-39]
+         """
+         R = parent or s_parent(x)
+diff --git a/src/sage/rings/complex_arb.pyx b/src/sage/rings/complex_arb.pyx
+index f986970..93ff565 100644
+--- a/src/sage/rings/complex_arb.pyx
++++ b/src/sage/rings/complex_arb.pyx
+@@ -3974,8 +3974,8 @@ cdef class ComplexBall(RingElement):
+ 
+         EXAMPLES::
+ 
+-            sage: CBF(20).erfc()
+-            [5.39586561160790e-176 +/- ...e-191]
++            sage: CBF(20).erfc() # abs tol 1e-190
++            [5.39586561160790e-176 +/- 6.73e-191]
+             sage: CBF(100, 100).erfc()
+             [0.00065234366376858 +/- ...e-18] + [-0.00393572636292141 +/- ...e-18]*I
+         """
+@@ -4280,7 +4280,7 @@ cdef class ComplexBall(RingElement):
+ 
+         TESTS:
+ 
+-            sage: CBF(Shi(I))
++            sage: CBF(Shi(I)) # abs tol 1e-15
+             [0.946083070367183 +/- 9.22e-16]*I
+         """
+         cdef ComplexBall result = self._new()
+diff --git a/src/sage/rings/real_arb.pyx b/src/sage/rings/real_arb.pyx
+index 4a81784..292bfea 100644
+--- a/src/sage/rings/real_arb.pyx
++++ b/src/sage/rings/real_arb.pyx
+@@ -3506,7 +3506,7 @@ cdef class RealBall(RingElement):
+ 
+         EXAMPLES::
+ 
+-            sage: RBF(1/2).erf()
++            sage: RBF(1/2).erf() # abs tol 1e-16
+             [0.520499877813047 +/- 6.10e-16]
+         """
+         cdef RealBall res = self._new()
+@@ -3556,12 +3556,12 @@ cdef class RealBall(RingElement):
+ 
+         EXAMPLES::
+ 
+-            sage: RBF(1).Si()
++            sage: RBF(1).Si() # abs tol 1e-15
+             [0.946083070367183 +/- 9.22e-16]
+ 
+         TESTS::
+ 
+-            sage: RBF(Si(1))
++            sage: RBF(Si(1)) # abs tol 1e-15
+             [0.946083070367183 +/- 9.22e-16]
+         """
+         cdef RealBall res = self._new()
+@@ -3578,12 +3578,12 @@ cdef class RealBall(RingElement):
+ 
+         EXAMPLES::
+ 
+-            sage: RBF(1).Ci()  # abs tol 1e-16
++            sage: RBF(1).Ci()  # abs tol 1e-15
+             [0.337403922900968 +/- 3.25e-16]
+ 
+         TESTS::
+ 
+-            sage: RBF(Ci(1))  # abs tol 1e-16
++            sage: RBF(Ci(1))  # abs tol 1e-15
+             [0.337403922900968 +/- 3.25e-16]
+         """
+         cdef RealBall res = self._new()
+-- 
+cgit v1.0-1-gd88e
+
+
+From 53532ddd4e2dc92469c1590ebf0c40f8f69bf579 Mon Sep 17 00:00:00 2001
+From: Antonio Rojas <arojas@archlinux.org>
+Date: Sun, 16 Jan 2022 14:16:53 +0100
+Subject: Decrease abs tol
+
+---
+ src/sage/rings/real_arb.pyx | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/sage/rings/real_arb.pyx b/src/sage/rings/real_arb.pyx
+index 292bfea..eb30f7f 100644
+--- a/src/sage/rings/real_arb.pyx
++++ b/src/sage/rings/real_arb.pyx
+@@ -3578,12 +3578,12 @@ cdef class RealBall(RingElement):
+ 
+         EXAMPLES::
+ 
+-            sage: RBF(1).Ci()  # abs tol 1e-15
++            sage: RBF(1).Ci()  # abs tol 5e-16
+             [0.337403922900968 +/- 3.25e-16]
+ 
+         TESTS::
+ 
+-            sage: RBF(Ci(1))  # abs tol 1e-15
++            sage: RBF(Ci(1))  # abs tol 5e-16
+             [0.337403922900968 +/- 3.25e-16]
+         """
+         cdef RealBall res = self._new()
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch b/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
new file mode 100644
index 000000000000..7ef3826aa4d2
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
@@ -0,0 +1,27 @@
+diff --git a/src/bin/sage-runtests b/src/bin/sage-runtests
+index 589dc8cd37..6bb8bf99a4 100755
+--- a/src/bin/sage-runtests
++++ b/src/bin/sage-runtests
+@@ -154,21 +154,4 @@ if __name__ == "__main__":
+     DC = DocTestController(args, args.filenames)
+     err = DC.run()
+ 
+-    try:
+-        exit_code_pytest = 0
+-        import pytest
+-        pytest_options = ["--import-mode", "importlib"]
+-        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.")
+-
+-    if err == 0:
+-        sys.exit(exit_code_pytest)
+-    else:
+-        sys.exit(err)
++    sys.exit(err)
diff --git a/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch b/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
new file mode 100644
index 000000000000..ca360dee9f6e
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage/matrix/matrix2.pyx b/src/sage/matrix/matrix2.pyx
+index 7d319bd54b..c1a2eed6f1 100644
+--- a/src/sage/matrix/matrix2.pyx
++++ b/src/sage/matrix/matrix2.pyx
+@@ -17215,7 +17215,7 @@ cdef class Matrix(Matrix1):
+ 
+             sage: set_random_seed()
+             sage: K = random_cone(max_ambient_dim=5)
+-            sage: all(L.change_ring(SR).is_Z_operator_on(K)
++            sage: all(L.change_ring(SR).is_Z_operator_on(K) # long time
+             ....:     for L in K.Z_operators_gens())  # long time
+             True
+ 
diff --git a/srcpkgs/sagemath/patches/zzz-fix_no_SAGE_BIN.patch b/srcpkgs/sagemath/patches/zzz-fix_no_SAGE_BIN.patch
new file mode 100644
index 000000000000..ac80085bd6b4
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fix_no_SAGE_BIN.patch
@@ -0,0 +1,12 @@
+--- a/src/sage/misc/dist.py
++++ b/src/sage/misc/dist.py
+@@ -108,7 +108,8 @@ def install_scripts(directory=None, ignore_existing=False):
+     PATH = os.environ['PATH'].split(os.pathsep)
+     PATH = [d for d in PATH if os.path.exists(d)]
+     dir_in_path = any(os.path.samefile(directory, d) for d in PATH)
+-    PATH = os.pathsep.join(d for d in PATH
++    if os.path.exists(SAGE_BIN):
++        PATH = os.pathsep.join(d for d in PATH
+                            if not os.path.samefile(d, SAGE_BIN))
+     for cmd in ['gap', 'gp', 'hg', 'ipython', 'maxima',
+                 'mwrank', 'R', 'singular', 'sqlite3', 'M2', 'kash']:
diff --git a/srcpkgs/sagemath/patches/zzz-fix_no_venv_packages.patch b/srcpkgs/sagemath/patches/zzz-fix_no_venv_packages.patch
new file mode 100644
index 000000000000..7b19169a91d9
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fix_no_venv_packages.patch
@@ -0,0 +1,13 @@
+diff --git a/build/make/Makefile.in b/build/make/Makefile.in
+index 0baddba4ae..be363bea71 100644
+--- a/build/make/Makefile.in
++++ b/build/make/Makefile.in
+@@ -624,7 +624,7 @@ $(1)-$(4)-no-deps:
+ 		SAGE_SPKG_WHEELS=$$($(4))/var/lib/sage/wheels \
+ 		SAGE_INST_LOCAL=$$($(4)) \
+ 		sage-logger -p '$$(SAGE_ROOT)/build/pkgs/$(1)/spkg-install' '$$(SAGE_LOGS)/$(1)-$(2).log' && \
+-	    touch "$$($(4))/$(SPKG_INST_RELDIR)/$(1)-$(2)"; \
++	    mkdir -p "$$($(4))/$(SPKG_INST_RELDIR)" && touch "$$($(4))/$(SPKG_INST_RELDIR)/$(1)-$(2)"; \
+ 	else \
+ 	    echo; \
+ 	    echo "Error: $(1) is a dummy script package that the Sage distribution uses"; \
diff --git a/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch b/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
new file mode 100644
index 000000000000..741d2b23a7f5
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
@@ -0,0 +1,96 @@
+From 346b4ea4c92f4287d3c097b92817cf2abfcddd8c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Thu, 13 Jan 2022 01:41:31 -0300
+Subject: [PATCH] gap: fixes for using system gap
+
+ - fix _get_shared_lib_path() so we don't need to configure GAP_SO
+ - fix gap_root() so we don't need to configure GAP_ROOT_DIR
+ - skip a useless test that cannot succeed on system gap
+ - use gap_root() in saved_workspace.py instead of GAP_ROOT_DIR
+---
+ src/sage/env.py                      |  2 +-
+ src/sage/libs/gap/saved_workspace.py |  4 ++--
+ src/sage/libs/gap/util.pyx           | 11 +++++++++++
+ src/sage_setup/optional_extension.py |  2 +-
+ 4 files changed, 15 insertions(+), 4 deletions(-)
+
+diff --git a/src/sage/env.py b/src/sage/env.py
+index c4953cfa65..c16696d298 100644
+--- a/src/sage/env.py
++++ b/src/sage/env.py
+@@ -293,7 +293,7 @@ def _get_shared_lib_path(*libnames: str) -> Optional[str]:
+             if sys.platform == 'darwin':
+                 ext = 'dylib'
+             else:
+-                ext = 'so'
++                ext = 'so*'
+ 
+             if SAGE_LOCAL:
+                 search_directories.append(Path(SAGE_LOCAL) / 'lib')
+diff --git a/src/sage/libs/gap/saved_workspace.py b/src/sage/libs/gap/saved_workspace.py
+index ad5adec36d..59c498795f 100644
+--- a/src/sage/libs/gap/saved_workspace.py
++++ b/src/sage/libs/gap/saved_workspace.py
+@@ -8,7 +8,7 @@ workspaces.
+ 
+ import os
+ import glob
+-from sage.env import GAP_ROOT_DIR
++from sage.libs.gap.util import gap_root
+ from sage.interfaces.gap_workspace import gap_workspace_file
+ 
+ 
+@@ -31,7 +31,7 @@ def timestamp():
+     """
+     libgap_dir = os.path.dirname(__file__)
+     libgap_files = glob.glob(os.path.join(libgap_dir, '*'))
+-    gap_packages = glob.glob(os.path.join(GAP_ROOT_DIR, 'pkg', '*'))
++    gap_packages = glob.glob(os.path.join(gap_root(), 'pkg', '*'))
+     files = libgap_files + gap_packages
+     if len(files) == 0:
+         print('Unable to find LibGAP files.')
+diff --git a/src/sage/libs/gap/util.pyx b/src/sage/libs/gap/util.pyx
+index 08c4c40cc0..c7dd557c35 100644
+--- a/src/sage/libs/gap/util.pyx
++++ b/src/sage/libs/gap/util.pyx
+@@ -23,6 +23,7 @@ from cysignals.signals cimport sig_on, sig_off
+ import os
+ import warnings
+ import sage.env
++import subprocess
+ 
+ from .gap_includes cimport *
+ from .element cimport *
+@@ -178,6 +179,16 @@ def gap_root():
+     if os.path.exists(sage.env.GAP_ROOT_DIR):
+         return sage.env.GAP_ROOT_DIR
+ 
++    gap_expr = 'JoinStringsWithSeparator(KERNEL_INFO().GAP_ROOT_PATHS,";")'
++    gap_root_paths = subprocess.getoutput(
++        f"gap -r -q --bare --nointeract -c 'Display({gap_expr});'"
++        ).strip().split(';')
++
++    for gapdir in gap_root_paths:
++        if os.path.exists(os.path.join(gapdir, 'sysinfo.gap')):
++            sage.env.GAP_ROOT_DIR = gapdir
++            return gapdir
++
+     # Attempt to figure out the appropriate GAP_ROOT by reading the
+     # local/bin/gap shell script; this is an ugly hack that exists for
+     # historical reasons; the best approach to setting where Sage looks for
+diff --git a/src/sage_setup/optional_extension.py b/src/sage_setup/optional_extension.py
+index f252849384..4034e3e196 100644
+--- a/src/sage_setup/optional_extension.py
++++ b/src/sage_setup/optional_extension.py
+@@ -80,7 +80,7 @@ def OptionalExtension(*args, **kwds):
+         sage: print(ext.__class__.__name__)
+         CythonizeExtension
+         sage: ext = OptionalExtension("foo", ["foo.c"], package="gap")
+-        sage: print(ext.__class__.__name__)
++        sage: print(ext.__class__.__name__)     # not tested - fails with system gap
+         Extension
+     """
+     try:
+-- 
+2.34.1
+
diff --git a/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch b/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
new file mode 100644
index 000000000000..093e3d56eb33
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
@@ -0,0 +1,42 @@
+More site packages not included in trac 29665
+
+diff --git a/build/pkgs/gmpy2/spkg-configure.m4 b/build/pkgs/gmpy2/spkg-configure.m4
+new file mode 100644
+index 0000000000..2d0390f7db
+--- /dev/null
++++ b/build/pkgs/gmpy2/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([gmpy2], [SAGE_PYTHON_PACKAGE_CHECK([gmpy2])])
+diff --git a/build/pkgs/sphinx/spkg-configure.m4 b/build/pkgs/sphinx/spkg-configure.m4
+new file mode 100644
+index 0000000000..e149fbb2cf
+--- /dev/null
++++ b/build/pkgs/sphinx/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([sphinx], [SAGE_PYTHON_PACKAGE_CHECK([sphinx])])
+diff --git a/build/pkgs/typing_extensions/spkg-configure.m4 b/build/pkgs/typing_extensions/spkg-configure.m4
+new file mode 100644
+index 0000000000..d475fd8257
+--- /dev/null
++++ b/build/pkgs/typing_extensions/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([typing_extensions], [SAGE_PYTHON_PACKAGE_CHECK([typing_extensions])])
+-- 
+diff --git a/build/pkgs/gmpy2/install-requires.txt b/build/pkgs/gmpy2/install-requires.txt
+index 51d24518ef..c25feff557 100644
+--- a/build/pkgs/gmpy2/install-requires.txt
++++ b/build/pkgs/gmpy2/install-requires.txt
+@@ -1,3 +1 @@
+-# We would like to write gmpy2 >=2.1.0b5, but pipenv does not accept prereleases in version ranges
+-# https://github.com/pypa/pipenv/issues/1760
+-gmpy2 ==2.1.0rc1
++gmpy2 >=2.1
+diff --git a/build/pkgs/ptyprocess/install-requires.txt b/build/pkgs/ptyprocess/install-requires.txt
+index de89260872..7c336f636c 100644
+--- a/build/pkgs/ptyprocess/install-requires.txt
++++ b/build/pkgs/ptyprocess/install-requires.txt
+@@ -1,3 +1,3 @@
+-ptyprocess ==0.5.1
++ptyprocess
+ # https://trac.sagemath.org/ticket/31280#comment:42 and following
+ # sagelib is not compatible with ptyprocess 0.5.2, 0.6, and 0.7
diff --git a/srcpkgs/sagemath/patches/zzz-remove_ratpoints.patch b/srcpkgs/sagemath/patches/zzz-remove_ratpoints.patch
new file mode 100644
index 000000000000..0842d9d7f6d5
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-remove_ratpoints.patch
@@ -0,0 +1,887 @@
+From 3178a5e1e4f7174343fd913494ae255b3e05fb85 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Mon, 17 Jan 2022 21:04:42 -0300
+Subject: [PATCH] ratpoints: remove deprecated package
+
+---
+ .github/workflows/ci-cygwin-minimal.yml       |   2 +-
+ .github/workflows/ci-cygwin-standard.yml      |   2 +-
+ COPYING.txt                                   |   1 -
+ build/pkgs/ratpoints/SPKG.rst                 |  29 --
+ build/pkgs/ratpoints/checksums.ini            |   4 -
+ build/pkgs/ratpoints/dependencies             |   5 -
+ build/pkgs/ratpoints/distros/arch.txt         |   1 -
+ build/pkgs/ratpoints/distros/conda.txt        |   1 -
+ build/pkgs/ratpoints/distros/debian.txt       |   1 -
+ build/pkgs/ratpoints/distros/nix.txt          |   1 -
+ build/pkgs/ratpoints/distros/repology.txt     |   1 -
+ build/pkgs/ratpoints/package-version.txt      |   1 -
+ build/pkgs/ratpoints/patches/Makefile.patch   |  37 ---
+ .../patches/sturm_and_rp_private.patch        | 194 ------------
+ build/pkgs/ratpoints/spkg-install.in          |  46 ---
+ build/pkgs/ratpoints/type                     |   1 -
+ build/pkgs/sagelib/dependencies               |   2 +-
+ src/sage/libs/ratpoints.pxd                   |  74 -----
+ src/sage/libs/ratpoints.pyx                   | 283 ------------------
+ .../elliptic_curves/descent_two_isogeny.pyx   |   2 -
+ src/sage_setup/library_order.py               |   2 +-
+ 21 files changed, 4 insertions(+), 686 deletions(-)
+ delete mode 100644 build/pkgs/ratpoints/SPKG.rst
+ delete mode 100644 build/pkgs/ratpoints/checksums.ini
+ delete mode 100644 build/pkgs/ratpoints/dependencies
+ delete mode 100644 build/pkgs/ratpoints/distros/arch.txt
+ delete mode 100644 build/pkgs/ratpoints/distros/conda.txt
+ delete mode 100644 build/pkgs/ratpoints/distros/debian.txt
+ delete mode 100644 build/pkgs/ratpoints/distros/nix.txt
+ delete mode 100644 build/pkgs/ratpoints/distros/repology.txt
+ delete mode 100644 build/pkgs/ratpoints/package-version.txt
+ delete mode 100644 build/pkgs/ratpoints/patches/Makefile.patch
+ delete mode 100644 build/pkgs/ratpoints/patches/sturm_and_rp_private.patch
+ delete mode 100644 build/pkgs/ratpoints/spkg-install.in
+ delete mode 100644 build/pkgs/ratpoints/type
+ delete mode 100644 src/sage/libs/ratpoints.pxd
+ delete mode 100644 src/sage/libs/ratpoints.pyx
+
+diff --git a/.github/workflows/ci-cygwin-minimal.yml b/.github/workflows/ci-cygwin-minimal.yml
+index 9e847e7474..9df1365657 100644
+--- a/.github/workflows/ci-cygwin-minimal.yml
++++ b/.github/workflows/ci-cygwin-minimal.yml
+@@ -217,7 +217,7 @@ jobs:
+     env:
+       STAGE: ii-b
+       PREVIOUS_STAGES: i-*
+-      TARGETS: singular maxima gap pari gfan palp flintqs ratpoints arb ecm givaro
++      TARGETS: singular maxima gap pari gfan palp flintqs arb ecm givaro
+       LOCAL_ARTIFACT_NAME: sage-local-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
+       LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
+ 
+diff --git a/.github/workflows/ci-cygwin-standard.yml b/.github/workflows/ci-cygwin-standard.yml
+index cbbe0f46a8..8aee1c2c3c 100644
+--- a/.github/workflows/ci-cygwin-standard.yml
++++ b/.github/workflows/ci-cygwin-standard.yml
+@@ -217,7 +217,7 @@ jobs:
+     env:
+       STAGE: ii-b
+       PREVIOUS_STAGES: i-*
+-      TARGETS: singular maxima gap pari gfan palp flintqs ratpoints arb ecm givaro
++      TARGETS: singular maxima gap pari gfan palp flintqs arb ecm givaro
+       LOCAL_ARTIFACT_NAME: sage-local-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
+       LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
+ 
+diff --git a/COPYING.txt b/COPYING.txt
+index 1176a856a0..a3e9cc6645 100644
+--- a/COPYING.txt
++++ b/COPYING.txt
+@@ -107,7 +107,6 @@ pynac                       GPLv2+
+ pyparsing                   MIT License
+ python                      Python License (see below)
+ R                           GPLv2+
+-ratpoints                   GPLv2+
+ readline                    GPLv3+
+ rpy                         GPLv2+
+ rubiks/dietz                GPL, any version
+diff --git a/build/pkgs/ratpoints/SPKG.rst b/build/pkgs/ratpoints/SPKG.rst
+deleted file mode 100644
+index 6607094bec..0000000000
+--- a/build/pkgs/ratpoints/SPKG.rst
++++ /dev/null
+@@ -1,29 +0,0 @@
+-ratpoints: Find rational points on hyperelliptic curves
+-=======================================================
+-
+-Description
+------------
+-
+-Michael Stoll's program which searches for rational points on
+-hyperelliptic curves.
+-
+-NOTE: the ratpoints package has been assimilated by PARI/GP. Therefore,
+-this package (as Sage package) is deprecated. In the future, it will be
+-removed from Sage.
+-
+-
+-Upstream Contact
+-----------------
+-
+--  Author: Michael Stoll
+--  Email: Michael.Stoll@uni-bayreuth.de
+--  Website: http://www.mathe2.uni-bayreuth.de/stoll/programs/
+-
+-
+-Note on SSE2 instructions
+-~~~~~~~~~~~~~~~~~~~~~~~~~
+-
+--  On several architectures, the SSE2 instructions used by ratpoints
+-   cause
+-   compiler errors. In the case that ratpoints fails to build with SSE2
+-   instructions enabled, the build is repeated with SSE2 disabled.
+diff --git a/build/pkgs/ratpoints/checksums.ini b/build/pkgs/ratpoints/checksums.ini
+deleted file mode 100644
+index 46ba1c9ec1..0000000000
+--- a/build/pkgs/ratpoints/checksums.ini
++++ /dev/null
+@@ -1,4 +0,0 @@
+-tarball=ratpoints-VERSION.tar.bz2
+-sha1=14fbc3dd50742794e0b33d2dd1217e5dd8ad2623
+-md5=9bf091d1b90132433f0a1fc6b585d024
+-cksum=670991933
+diff --git a/build/pkgs/ratpoints/dependencies b/build/pkgs/ratpoints/dependencies
+deleted file mode 100644
+index 9a77ea16f7..0000000000
+--- a/build/pkgs/ratpoints/dependencies
++++ /dev/null
+@@ -1,5 +0,0 @@
+-$(MP_LIBRARY)
+-
+-----------
+-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/ratpoints/distros/arch.txt b/build/pkgs/ratpoints/distros/arch.txt
+deleted file mode 100644
+index e137758627..0000000000
+--- a/build/pkgs/ratpoints/distros/arch.txt
++++ /dev/null
+@@ -1 +0,0 @@
+-ratpoints
+diff --git a/build/pkgs/ratpoints/distros/conda.txt b/build/pkgs/ratpoints/distros/conda.txt
+deleted file mode 100644
+index e137758627..0000000000
+--- a/build/pkgs/ratpoints/distros/conda.txt
++++ /dev/null
+@@ -1 +0,0 @@
+-ratpoints
+diff --git a/build/pkgs/ratpoints/distros/debian.txt b/build/pkgs/ratpoints/distros/debian.txt
+deleted file mode 100644
+index dabd28d624..0000000000
+--- a/build/pkgs/ratpoints/distros/debian.txt
++++ /dev/null
+@@ -1 +0,0 @@
+-libratpoints-dev
+diff --git a/build/pkgs/ratpoints/distros/nix.txt b/build/pkgs/ratpoints/distros/nix.txt
+deleted file mode 100644
+index e137758627..0000000000
+--- a/build/pkgs/ratpoints/distros/nix.txt
++++ /dev/null
+@@ -1 +0,0 @@
+-ratpoints
+diff --git a/build/pkgs/ratpoints/distros/repology.txt b/build/pkgs/ratpoints/distros/repology.txt
+deleted file mode 100644
+index e137758627..0000000000
+--- a/build/pkgs/ratpoints/distros/repology.txt
++++ /dev/null
+@@ -1 +0,0 @@
+-ratpoints
+diff --git a/build/pkgs/ratpoints/package-version.txt b/build/pkgs/ratpoints/package-version.txt
+deleted file mode 100644
+index efed46a7bd..0000000000
+--- a/build/pkgs/ratpoints/package-version.txt
++++ /dev/null
+@@ -1 +0,0 @@
+-2.1.3.p5
+diff --git a/build/pkgs/ratpoints/patches/Makefile.patch b/build/pkgs/ratpoints/patches/Makefile.patch
+deleted file mode 100644
+index 093d7c0018..0000000000
+--- a/build/pkgs/ratpoints/patches/Makefile.patch
++++ /dev/null
+@@ -1,37 +0,0 @@
+---- src/Makefile	2009-10-01 01:08:54.000000000 +0200
+-+++ patches/Makefile	2012-03-17 13:57:33.026315142 +0100
+-@@ -21,11 +21,11 @@
+- #
+- #    Michael Stoll, September 21, 2009
+- 
+--CC = gcc
+-+CC ?= gcc
+- RM = rm -f
+- INSTALL = cp
+- 
+--INSTALL_DIR = /usr/local
+-+INSTALL_DIR ?= /usr/local
+- 
+- DISTFILES = Makefile ratpoints.h rp-private.h primes.h \
+-             gen_find_points_h.c gen_init_sieve_h.c \
+-@@ -47,14 +47,14 @@
+- 	diff -q testbase rptest.out
+- 
+- install-bin: ratpoints
+--	${INSTALL} ratpoints ${INSTALL_DIR}/bin/
+--	chmod 755 ${INSTALL_DIR}/bin/ratpoints
+-+	${INSTALL} ratpoints "${INSTALL_DIR}/bin/"
+-+	chmod 755 "${INSTALL_DIR}/bin/ratpoints"
+- 
+- install-lib: ratpoints.h libratpoints.a
+--	${INSTALL} ratpoints.h ${INSTALL_DIR}/include/
+--	chmod 644 ${INSTALL_DIR}/include/ratpoints.h
+--	${INSTALL} libratpoints.a ${INSTALL_DIR}/lib/
+--	chmod 644 ${INSTALL_DIR}/lib/libratpoints.a
+-+	${INSTALL} ratpoints.h "${INSTALL_DIR}/include/"
+-+	chmod 644 "${INSTALL_DIR}/include/ratpoints.h"
+-+	${INSTALL} libratpoints.a "${INSTALL_DIR}/lib/"
+-+	chmod 644 "${INSTALL_DIR}/lib/libratpoints.a"
+- 
+- install: install-bin install-lib
+- 
+diff --git a/build/pkgs/ratpoints/patches/sturm_and_rp_private.patch b/build/pkgs/ratpoints/patches/sturm_and_rp_private.patch
+deleted file mode 100644
+index 664198c4de..0000000000
+--- a/build/pkgs/ratpoints/patches/sturm_and_rp_private.patch
++++ /dev/null
+@@ -1,194 +0,0 @@
+-diff --git a/rp-private.h b/rp-private.h
+-index b4c7dad..0c7193e 100644
+---- a/rp-private.h
+-+++ b/rp-private.h
+-@@ -36,7 +36,7 @@
+- #define LONG_SHIFT ((LONG_LENGTH == 16) ? 4 : \
+-                     (LONG_LENGTH == 32) ? 5 : \
+- 		    (LONG_LENGTH == 64) ? 6 : 0)
+--#define LONG_MASK (~(-1L<<LONG_SHIFT))
+-+#define LONG_MASK (~(-(1L<<LONG_SHIFT)))
+- 
+- /* Check if SSE instructions can be used.
+-    We assume that one SSE word of 128 bit is two long's,
+-diff --git a/sturm.c b/sturm.c
+-index c78d7c6..5fd2cf5 100644
+---- a/sturm.c
+-+++ b/sturm.c
+-@@ -27,7 +27,6 @@
+-  ***********************************************************************/
+- 
+- #include "ratpoints.h"
+--
+- /**************************************************************************
+-  * Arguments of _ratpoints_compute_sturm() : (from the args argument)     *
+-  *                                                                        *
+-@@ -53,7 +52,7 @@
+- /* A helper function: evaluate the polynomial in cofs[] of given degree
+-   at num/2^denexp and return the sign. */
+- 
+--static long eval_sign(ratpoints_args *args, mpz_t *cofs, long degree,
+-+static long eval_sign(const ratpoints_args *args, const mpz_t *cofs, long degree,
+-                       long num, long denexp)
+- {
+-   long n, e, s;
+-@@ -70,11 +69,80 @@ static long eval_sign(ratpoints_args *args, mpz_t *cofs, long degree,
+-   return(s);
+- }
+- 
+-+static const    long max = (long)(((unsigned long)(-1))>>1);
+-+static const    long min = (long)(-(((unsigned long)(-1))>>1));
+-+    /* recursive helper function */
+-+static void iterate(long nl, long nr, long del, long der, long cleft, long cright,
+-+                 long sl, long sr, long depth,
+-+		 ratpoints_interval **iptr, const ratpoints_interval *ivlo,
+-+		 const ratpoints_args *args, const long k, const long sturm_degs[],
+-+                 const mpz_t sturm[][args->degree + 1])
+-+    { /* nl/2^del, nr/2^der : interval left/right endpoints,
+-+         cleft, cright: sign change counts at endpoints,
+-+         sl, sr: signs at endpoints,
+-+         depth: iteration depth */
+-+     long iter = args->sturm;
+-+      if(cleft == cright && sl < 0) { return; }
+-+         /* here we know the polynomial is negative on the interval */
+-+      if((cleft == cright && sl > 0) || depth >= iter)
+-+      /* we have to add/extend an interval if we either know that
+-+         the polynomial is positive on the interval (first condition)
+-+         or the maximal iteration depth has been reached (second condition) */
+-+      { double l = ((double)nl)/((double)(1<<del));
+-+        double u = ((double)nr)/((double)(1<<der));
+-+        if(*iptr == ivlo)
+-+        { (*iptr)->low = l; (*iptr)->up  = u; (*iptr)++; }
+-+        else
+-+        { if(((*iptr)-1)->up == l) /* extend interval */
+-+          { ((*iptr)-1)->up = u; }
+-+          else /* new interval */
+-+          { (*iptr)->low = l; (*iptr)->up  = u; (*iptr)++; }
+-+        }
+-+        return;
+-+      }
+-+      /* now we must split the interval and evaluate the sturm sequence
+-+         at the midpoint */
+-+      { long nm, dem, s0, s1, s2, s, cmid = 0, n;
+-+        if(nl == min)
+-+        { if(nr == max) { nm = 0; dem = 0; }
+-+          else { nm = (nr == 0) ? -1 : 2*nr; dem = 0; }
+-+        }
+-+        else
+-+        { if(nr == max) { nm = (nl == 0) ? 1 : 2*nl; dem = 0; }
+-+          else /* "normal" case */
+-+          { if(del == der) /* then both are zero */
+-+            { if(((nl+nr) & 1) == 0) { nm = (nl+nr)>>1; dem = 0; }
+-+              else { nm = nl+nr; dem = 1; }
+-+            }
+-+            else /* here one de* is greater */
+-+            { if(del > der) { nm = nl + (nr<<(del-der)); dem = del+1; }
+-+              else { nm = (nl<<(der-del)) + nr; dem = der+1; }
+-+            }
+-+          }
+-+        }
+-+        s0 = eval_sign(args, sturm[0], sturm_degs[0], nm, dem);
+-+        s1 = eval_sign(args, sturm[1], sturm_degs[1], nm, dem);
+-+        if(s0*s1 == -1) { cmid++; }
+-+        s = (s1 == 0) ? s0 : s1;
+-+        for(n = 2; n <= k; n++)
+-+        { s2 = eval_sign(args, sturm[n], sturm_degs[n], nm, dem);
+-+          if(s2 == -s) { cmid++; s = s2; }
+-+          else if(s2 != 0) { s = s2; }
+-+        }
+-+        /* now recurse */
+-+        iterate(nl, nm, del, dem, cleft, (s0==0) ? (cmid+1) : cmid,
+-+                sl, (s0==0) ? -s1 : s0, depth+1,
+-+                iptr, ivlo, args, k, sturm_degs, sturm);
+-+        iterate(nm, nr, dem, der, cmid, cright,
+-+                (s0==0) ? s1 : s0, sr, depth+1,
+-+		iptr, ivlo, args, k, sturm_degs, sturm);
+-+      }
+-+    } /* end iterate() */
+-+
+- long _ratpoints_compute_sturm(ratpoints_args *args)
+- { 
+-   mpz_t *cofs = args->cof;
+-   long degree = args->degree;
+--  long iter = args->sturm; 
+-   ratpoints_interval *ivlist = args->domain;
+-   long num_iv = args->num_inter;
+-   long n, m, k, new_num;
+-@@ -165,75 +233,12 @@ long _ratpoints_compute_sturm(ratpoints_args *args)
+-   /* recall: typedef struct {double low; double up;} ratpoints_interval; */
+-   { ratpoints_interval ivlocal[1 + (degree>>1)];
+-     ratpoints_interval *iptr = &ivlocal[0];
+--    long max = (long)(((unsigned long)(-1))>>1);
+--    long min = -max;
+-     long num_intervals;
+-     long slcf = mpz_cmp_si(cofs[degree], 0);
+- 
+--    /* recursive helper function */
+--    void iterate(long nl, long nr, long del, long der, long cleft, long cright,
+--                 long sl, long sr, long depth)
+--    { /* nl/2^del, nr/2^der : interval left/right endpoints,
+--         cleft, cright: sign change counts at endpoints,
+--         sl, sr: signs at endpoints,
+--         depth: iteration depth */
+--      if(cleft == cright && sl < 0) { return; }
+--         /* here we know the polynomial is negative on the interval */
+--      if((cleft == cright && sl > 0) || depth >= iter) 
+--      /* we have to add/extend an interval if we either know that
+--         the polynomial is positive on the interval (first condition)
+--         or the maximal iteration depth has been reached (second condition) */
+--      { double l = ((double)nl)/((double)(1<<del));
+--        double u = ((double)nr)/((double)(1<<der));
+--        if(iptr == &ivlocal[0])
+--        { iptr->low = l; iptr->up  = u; iptr++; }
+--        else
+--        { if((iptr-1)->up == l) /* extend interval */
+--          { (iptr-1)->up = u; }
+--          else /* new interval */
+--          { iptr->low = l; iptr->up  = u; iptr++; }
+--        }
+--        return; 
+--      }
+--      /* now we must split the interval and evaluate the sturm sequence
+--         at the midpoint */
+--      { long nm, dem, s0, s1, s2, s, cmid = 0, n;
+--        if(nl == min)
+--        { if(nr == max) { nm = 0; dem = 0; }
+--          else { nm = (nr == 0) ? -1 : 2*nr; dem = 0; }
+--        }
+--        else
+--        { if(nr == max) { nm = (nl == 0) ? 1 : 2*nl; dem = 0; } 
+--          else /* "normal" case */
+--          { if(del == der) /* then both are zero */
+--            { if(((nl+nr) & 1) == 0) { nm = (nl+nr)>>1; dem = 0; }
+--              else { nm = nl+nr; dem = 1; } 
+--            }
+--            else /* here one de* is greater */
+--            { if(del > der) { nm = nl + (nr<<(del-der)); dem = del+1; }
+--              else { nm = (nl<<(der-del)) + nr; dem = der+1; }
+--            }
+--          }
+--        }
+--        s0 = eval_sign(args, sturm[0], sturm_degs[0], nm, dem);
+--        s1 = eval_sign(args, sturm[1], sturm_degs[1], nm, dem);
+--        if(s0*s1 == -1) { cmid++; }
+--        s = (s1 == 0) ? s0 : s1;
+--        for(n = 2; n <= k; n++)
+--        { s2 = eval_sign(args, sturm[n], sturm_degs[n], nm, dem);
+--          if(s2 == -s) { cmid++; s = s2; }
+--          else if(s2 != 0) { s = s2; }
+--        }
+--        /* now recurse */
+--        iterate(nl, nm, del, dem, cleft, (s0==0) ? (cmid+1) : cmid, 
+--                sl, (s0==0) ? -s1 : s0, depth+1);
+--        iterate(nm, nr, dem, der, cmid, cright, 
+--                (s0==0) ? s1 : s0, sr, depth+1);
+--      }
+--    } /* end iterate() */
+--
+-     iterate(min, max, 0, 0, count2, count1, 
+--            (degree & 1) ? -slcf : slcf, slcf, 0);
+-+            (degree & 1) ? -slcf : slcf, slcf, 0,
+-+	    &iptr, &ivlocal[0], args, k, sturm_degs, sturm);
+-     num_intervals = iptr - &ivlocal[0];
+-     /* intersect with given intervals */
+-     { ratpoints_interval local_copy[num_iv];
+diff --git a/build/pkgs/ratpoints/spkg-install.in b/build/pkgs/ratpoints/spkg-install.in
+deleted file mode 100644
+index b6856c4d4a..0000000000
+--- a/build/pkgs/ratpoints/spkg-install.in
++++ /dev/null
+@@ -1,46 +0,0 @@
+-PRIME_SIZE=7
+-
+-CCFLAGS_NO_SSE="-I$SAGE_LOCAL/include -Wall -O2 -fPIC -DRATPOINTS_MAX_BITS_IN_PRIME=$PRIME_SIZE"
+-CCFLAGS2="-L$SAGE_LOCAL/lib -lgmp -lm $LDFLAGS"
+-CCFLAGS3="-L. -lratpoints"
+-
+-if [[ "$UNAME" = "Darwin" ]]; then
+-    CCFLAGS1="$CCFLAGS_NO_SSE"
+-    echo "Building without SSE2 instructions (MacOS X)."
+-else
+-    CCFLAGS1="$CCFLAGS_NO_SSE -DUSE_SSE"
+-    echo "Attempting to build ratpoints making use of SSE2 instructions."
+-fi
+-
+-# Copy CFLAGS set externally to CCFLAGS.
+-CCFLAGS="$CFLAGS"
+-
+-export CCFLAGS1
+-export CCFLAGS2
+-export CCFLAGS3
+-export CCFLAGS
+-
+-cd src/
+-
+-#############################
+-# Build (just) the library: #
+-#############################
+-
+-# PLEASE, don't break this again by deleting "libratpoints.a".  See trac 8267.
+-if ! $MAKE libratpoints.a; then
+-    [ "$UNAME" = "Darwin" ] && sdh_die "Error building ratpoints."
+-    echo "Build failed. Trying without SSE2 instructions."
+-    CCFLAGS1="$CCFLAGS_NO_SSE"
+-    sdh_make libratpoints.a
+-fi
+-
+-##############################################
+-# Install (just) the library and its header: #
+-##############################################
+-
+-# The following requires that the Makefile got patched;
+-# otherwise one could pass 'INSTALL_DIR=...' on the 'make'
+-# command line:
+-export INSTALL_DIR="$SAGE_DESTDIR_LOCAL"
+-mkdir -p "$INSTALL_DIR"/{lib,include}
+-sdh_make install-lib
+diff --git a/build/pkgs/ratpoints/type b/build/pkgs/ratpoints/type
+deleted file mode 100644
+index a6a7b9cd72..0000000000
+--- a/build/pkgs/ratpoints/type
++++ /dev/null
+@@ -1 +0,0 @@
+-standard
+diff --git a/build/pkgs/sagelib/dependencies b/build/pkgs/sagelib/dependencies
+index 9c7797b1f4..6a7d4b8132 100644
+--- a/build/pkgs/sagelib/dependencies
++++ b/build/pkgs/sagelib/dependencies
+@@ -1,4 +1,4 @@
+-FORCE $(SCRIPTS) arb boost_cropped $(BLAS) brial cliquer cypari cysignals cython ecl eclib ecm flint libgd gap giac givaro glpk gmpy2 gsl iml jinja2 jupyter_core lcalc lrcalc libbraiding libhomfly libpng linbox m4ri m4rie memory_allocator mpc mpfi mpfr $(MP_LIBRARY) ntl numpy pari pip pkgconfig planarity ppl pplpy primesieve primecount primecountpy pycygwin $(PYTHON) ratpoints requests rw sage_conf singular symmetrica zn_poly $(PCFILES) | $(PYTHON_TOOLCHAIN) sage_setup
++FORCE $(SCRIPTS) arb boost_cropped $(BLAS) brial cliquer cypari cysignals cython ecl eclib ecm flint libgd gap giac givaro glpk gmpy2 gsl iml jinja2 jupyter_core lcalc lrcalc libbraiding libhomfly libpng linbox m4ri m4rie memory_allocator mpc mpfi mpfr $(MP_LIBRARY) ntl numpy pari pip pkgconfig planarity ppl pplpy primesieve primecount primecountpy pycygwin $(PYTHON) requests rw sage_conf singular symmetrica zn_poly $(PCFILES) | $(PYTHON_TOOLCHAIN) sage_setup
+ 
+ ----------
+ All lines of this file are ignored except the first.
+diff --git a/src/sage/libs/ratpoints.pxd b/src/sage/libs/ratpoints.pxd
+deleted file mode 100644
+index 67e309b109..0000000000
+--- a/src/sage/libs/ratpoints.pxd
++++ /dev/null
+@@ -1,74 +0,0 @@
+-from sage.rings.integer cimport Integer
+-from sage.libs.gmp.mpz cimport *
+-
+-cdef extern from "ratpoints.h":
+-    long RATPOINTS_MAX_DEGREE
+-    long RATPOINTS_ARRAY_SIZE
+-    long RATPOINTS_DEFAULT_SP1
+-    long RATPOINTS_DEFAULT_SP2
+-    long RATPOINTS_DEFAULT_NUM_PRIMES
+-    long RATPOINTS_DEFAULT_MAX_FORBIDDEN
+-    long RATPOINTS_DEFAULT_STURM
+-    long RATPOINTS_NON_SQUAREFREE
+-    long RATPOINTS_BAD_ARGS
+-
+-    # for args flags:
+-    long RATPOINTS_NO_CHECK # when set, do not check whether the surviving
+-                            # x-coordinates give rise to rational points
+-    long RATPOINTS_NO_Y # when set, only list x coordinates instead of actual points
+-    long RATPOINTS_NO_REVERSE # when set, do not modify the mpz_t array
+-    long RATPOINTS_NO_JACOBI # when set, prevent use of Jacobi symbol test
+-    long RATPOINTS_VERBOSE # when set, print some output on what ratpoints is doing
+-    # define RATPOINTS_FLAGS_INPUT_MASK \
+-    # (RATPOINTS_NO_CHECK | RATPOINTS_NO_Y | RATPOINTS_NO_REVERSE | \
+-    #  RATPOINTS_NO_JACOBI | RATPOINTS_VERBOSE)
+-
+-
+-    ctypedef struct ratpoints_interval:
+-        double low
+-        double up
+-    ctypedef struct ratpoints_args:
+-        mpz_t *cof
+-        long degree
+-        long height
+-        ratpoints_interval *domain
+-        long num_inter
+-        long b_low
+-        long b_high
+-        long sp1
+-        long sp2
+-        long array_size
+-        long sturm
+-        long num_primes
+-        long max_forbidden
+-        unsigned int flags
+-        # from here: private data
+-        # mpz_t *work
+-        # void *se_buffer
+-        # void *se_next
+-        # void *ba_buffer
+-        # void *ba_next
+-        # int *int_buffer
+-        # int *int_next
+-        # void *sieve_list
+-    long find_points(ratpoints_args*, int proc(long, long, mpz_t, void*, int*), void*)
+-    void find_points_init(ratpoints_args*)
+-    long find_points_work(ratpoints_args*, int proc(long, long, mpz_t, void*, int*), void*)
+-    void find_points_clear(ratpoints_args*)
+-
+-ctypedef struct point_list:
+-    long *xes
+-    mpz_t *ys
+-    long *zs
+-    long array_size
+-    long num_points
+-    long max_num_points
+-
+-ctypedef struct info_struct_exists_only:
+-    int verbose
+-
+-cdef int ratpoints_mpz_exists_only(mpz_t *, long, int, bint) except -1
+-
+-
+-
+-
+diff --git a/src/sage/libs/ratpoints.pyx b/src/sage/libs/ratpoints.pyx
+deleted file mode 100644
+index 257dfe3eeb..0000000000
+--- a/src/sage/libs/ratpoints.pyx
++++ /dev/null
+@@ -1,283 +0,0 @@
+-# distutils: libraries = ratpoints
+-r"""
+-Hyperelliptic Curve Point Finding, via ratpoints (deprecated)
+-
+-This module is deprecated, use PARI instead::
+-
+-    sage: pari(EllipticCurve("389a1")).ellratpoints(4)
+-    [[-2, 0], [-2, -1], [-1, 1], [-1, -2], [0, 0], [0, -1], [1, 0], [1, -1], [3, 5], [3, -6], [4, 8], [4, -9], [-3/4, 7/8], [-3/4, -15/8]]
+-    sage: pari("[x^3 + x^2 - 2*x, 1]").hyperellratpoints(4)
+-    [[-2, 0], [-2, -1], [-1, 1], [-1, -2], [0, 0], [0, -1], [1, 0], [1, -1], [3, 5], [3, -6], [4, 8], [4, -9], [-3/4, 7/8], [-3/4, -15/8]]
+-"""
+-
+-from cysignals.memory cimport sig_malloc, sig_realloc, sig_free
+-from cysignals.signals cimport sig_on, sig_off
+-
+-from sage.misc.superseded import deprecation_cython as deprecation
+-deprecation(24531, "the module sage.libs.ratpoints is deprecated; use pari.ellratpoints or pari.hyperellratpoints instead")
+-
+-
+-cdef int process(long x, long z, mpz_t y, void *info0, int *quit):
+-    # ratpoints calls this function when it finds a point [x : y : z]
+-    # info0 is the pointer passed to ratpoints originally
+-    # if quit[0] is set to a nonzero value, ratpoints will abort immediately
+-    cdef point_list *plist = <point_list *> info0
+-    cdef long i
+-    if plist.array_size == plist.num_points:
+-        i = plist.array_size
+-        plist.array_size *= 2
+-        plist.xes = <long *> sig_realloc(plist.xes, plist.array_size * sizeof(long))
+-        plist.ys = <mpz_t *> sig_realloc(plist.ys, plist.array_size * sizeof(mpz_t))
+-        plist.zs = <long *> sig_realloc(plist.zs, plist.array_size * sizeof(long))
+-        while i < plist.array_size:
+-            mpz_init(plist.ys[i])
+-            i += 1
+-    plist.xes[plist.num_points] = x
+-    mpz_set(plist.ys[plist.num_points], y)
+-    plist.zs[plist.num_points] = z
+-    plist.num_points += 1
+-    if plist.max_num_points > 0:
+-        if plist.max_num_points == plist.num_points:
+-            quit[0] = -1
+-    return 1 # weight for counting the points
+-
+-def ratpoints(list coeffs, long H, verbose=False, long max=0,
+-              min_x_denom=None, max_x_denom=None, intervals=[]):
+-    """
+-    Access the ratpoints library to find points on the hyperelliptic curve:
+-
+-    `y^2 = a_n x^n + \cdots + a_1 x + a_0.`
+-
+-    INPUT:
+-
+-    - ``coeffs`` -- list of integer coefficients `a_0` , `a_1`, ..., `a_n`
+-
+-    - ``H`` -- the bound for the denominator and the absolute value of the
+-      numerator of the `x`-coordinate
+-
+-    - ``verbose`` -- if ``True``, ratpoints will print comments about
+-      its progress
+-
+-    - ``max`` -- maximum number of points to find (if 0, find all of them)
+-
+-    OUTPUT:
+-
+-    The points output by this program are points in (1, ceil(n/2), 1)-weighted
+-    projective space. If n is even, then the associated homogeneous equation is
+-    `y^2 = a_n x^n + \cdots + a_1 x z^{n-1} + a_0 z^n` while if n is odd, it is
+-    `y^2 = a_n x^n z + \cdots + a_1 x z^n + a_0 z^{n+1}`.
+-
+-    EXAMPLES::
+-
+-        sage: from sage.libs.ratpoints import ratpoints
+-        doctest:...: DeprecationWarning: the module sage.libs.ratpoints is deprecated; use pari.ellratpoints or pari.hyperellratpoints instead
+-        See http://trac.sagemath.org/24531 for details.
+-        sage: for x,y,z in ratpoints([1..6], 200):
+-        ....:     print(-1*y^2 + 1*z^6 + 2*x*z^5 + 3*x^2*z^4 + 4*x^3*z^3 + 5*x^4*z^2 + 6*x^5*z)
+-        0
+-        0
+-        0
+-        0
+-        0
+-        0
+-        0
+-        sage: for x,y,z in ratpoints([1..5], 200):
+-        ....:    print(-1*y^2 + 1*z^4 + 2*x*z^3 + 3*x^2*z^2 + 4*x^3*z + 5*x^4)
+-        0
+-        0
+-        0
+-        0
+-        0
+-        0
+-        0
+-        0
+-
+-        sage: for x,y,z in ratpoints([1..200], 1000):
+-        ....:    print("{} {} {}".format(x,y,z))
+-        1 0 0
+-        0 1 1
+-        0 -1 1
+-        201 25353012004564588029934064107520000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 200
+-        201 -25353012004564588029934064107520000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 200
+-
+-    The denominator of `x` can be restricted, for example to find
+-    integral points::
+-
+-        sage: from sage.libs.ratpoints import ratpoints
+-        sage: coeffs = [400, -112, 0, 1]
+-        sage: ratpoints(coeffs, 10^6, max_x_denom=1, intervals=[[-10,0],[1000,2000]])
+-        [(1, 0, 0), (-8, 28, 1), (-8, -28, 1), (-7, 29, 1), (-7, -29, 1),
+-         (-4, 28, 1), (-4, -28, 1), (0, 20, 1), (0, -20, 1), (1368, 50596, 1),
+-         (1368, -50596, 1), (1624, 65444, 1), (1624, -65444, 1)]
+-
+-        sage: ratpoints(coeffs, 1000, min_x_denom=100, max_x_denom=200)
+-        [(1, 0, 0),
+-        (-656, 426316, 121),
+-        (-656, -426316, 121),
+-        (452, 85052, 121),
+-        (452, -85052, 121),
+-        (988, 80036, 121),
+-        (988, -80036, 121),
+-        (-556, 773188, 169),
+-        (-556, -773188, 169),
+-        (264, 432068, 169),
+-        (264, -432068, 169)]
+-
+-    Finding the integral points on the compact component of an elliptic curve::
+-
+-        sage: E = EllipticCurve([0,1,0,-35220,-1346400])
+-        sage: e1, e2, e3 = E.division_polynomial(2).roots(multiplicities=False)
+-        sage: coeffs = [E.a6(),E.a4(),E.a2(),1]
+-        sage: ratpoints(coeffs, 1000, max_x_denom=1, intervals=[[e3,e2]])
+-        [(1, 0, 0),
+-        (-165, 0, 1),
+-        (-162, 366, 1),
+-        (-162, -366, 1),
+-        (-120, 1080, 1),
+-        (-120, -1080, 1),
+-        (-90, 1050, 1),
+-        (-90, -1050, 1),
+-        (-85, 1020, 1),
+-        (-85, -1020, 1),
+-        (-42, 246, 1),
+-        (-42, -246, 1),
+-        (-40, 0, 1)]
+-    """
+-    cdef ratpoints_args args
+-    cdef long i, total, verby
+-    cdef Integer sage_int, s_x, s_y, s_z
+-    cdef point_list *plist
+-
+-
+-    verby = ~0 if verbose else 0
+-
+-    # Set the coefficient array:
+-    coeffs = [Integer(a) for a in coeffs]
+-    args.degree = len(coeffs)-1
+-    args.cof = <mpz_t *> sig_malloc((args.degree+1) * sizeof(mpz_t))
+-
+-    # Create an array to hold the points found:
+-    plist = <point_list *> sig_malloc(sizeof(point_list))
+-    if max == 0:
+-        plist.array_size = 64
+-    else:
+-        plist.array_size = max
+-    plist.xes = <long *> sig_malloc(plist.array_size * sizeof(long))
+-    plist.ys = <mpz_t *> sig_malloc(plist.array_size * sizeof(mpz_t))
+-    for i from 0 <= i < plist.array_size:
+-        mpz_init(plist.ys[i])
+-    plist.zs = <long *> sig_malloc(plist.array_size * sizeof(long))
+-    plist.num_points = 0
+-    plist.max_num_points = max
+-
+-    # Set the height bound:
+-    args.height = H
+-
+-    # Set the intervals to be searched, including any specified:
+-    args.num_inter = len(intervals)
+-    args.domain = <ratpoints_interval *> sig_malloc((args.num_inter + args.degree) * sizeof(ratpoints_interval))
+-    for i,I in enumerate(intervals):
+-        args.domain[i].low = I[0]
+-        args.domain[i].up  = I[1]
+-
+-    # Set the minimum and maximum denominators:
+-    if not min_x_denom:  min_x_denom = 1
+-    if not max_x_denom:  max_x_denom = H
+-    args.b_low = min_x_denom
+-    args.b_high = max_x_denom
+-
+-    # Set the remaining arguments, whose non-default use is technical
+-    # (see ratpoints documentation)
+-    args.sp1 = RATPOINTS_DEFAULT_SP1
+-    args.sp2 = RATPOINTS_DEFAULT_SP2
+-    args.array_size = RATPOINTS_ARRAY_SIZE
+-    args.sturm = RATPOINTS_DEFAULT_STURM
+-    args.num_primes = RATPOINTS_DEFAULT_NUM_PRIMES
+-    args.max_forbidden = RATPOINTS_DEFAULT_MAX_FORBIDDEN
+-    args.flags = (RATPOINTS_VERBOSE & verby)
+-
+-    for i from 0 <= i <= args.degree:
+-        mpz_init(args.cof[i])
+-        sage_int = <Integer> coeffs[i]
+-        mpz_set(args.cof[i], sage_int.value)
+-
+-    sig_on()
+-    total = find_points(&args, process, <void *>plist)
+-    sig_off()
+-    if total == RATPOINTS_NON_SQUAREFREE:
+-        raise RuntimeError('Polynomial must be square-free')
+-    if total == RATPOINTS_BAD_ARGS:
+-        raise RuntimeError('Bad arguments to ratpoints')
+-
+-    for i from 0 <= i <= args.degree:
+-        mpz_clear(args.cof[i])
+-
+-    sig_free(args.cof)
+-    sig_free(args.domain)
+-
+-    cdef list L = []
+-    for i from 0 <= i < plist.num_points:
+-        s_x = Integer(0)
+-        s_y = Integer(0)
+-        s_z = Integer(0)
+-        mpz_set_si(s_x.value, plist.xes[i])
+-        mpz_set(s_y.value, plist.ys[i])
+-        mpz_set_si(s_z.value, plist.zs[i])
+-        L.append((s_x,s_y,s_z))
+-
+-    for i from 0 <= i < plist.array_size:
+-        mpz_clear(plist.ys[i])
+-    sig_free(plist.xes)
+-    sig_free(plist.ys)
+-    sig_free(plist.zs)
+-    sig_free(plist)
+-
+-    return L
+-
+-cdef int process_exists_only(long x, long z, mpz_t y, void *info0, int *quit):
+-    cdef info_struct_exists_only *info_s = <info_struct_exists_only *>info0
+-    cdef Integer YY
+-    if info_s.verbose:
+-        YY = Integer(0); mpz_set(YY.value, y)
+-        print('Found point [ %d : %d : %d ], quitting' % (x, YY, z))
+-    quit[0] = -1
+-    return 1
+-
+-cdef int ratpoints_mpz_exists_only(mpz_t *coeffs, long H, int degree, bint verbose) except -1:
+-    """
+-    Direct call to ratpoints to search for existence only.
+-
+-    WARNING - The coefficient array will be modified by ratpoints.
+-    """
+-    cdef ratpoints_args args
+-    cdef info_struct_exists_only info_s
+-    cdef long total, verby = ~0 if verbose else 0
+-    info_s.verbose = verbose
+-    assert degree <= RATPOINTS_MAX_DEGREE
+-    args.degree = degree
+-    args.cof = coeffs
+-    args.domain = <ratpoints_interval *> sig_malloc(2*args.degree * sizeof(ratpoints_interval))
+-    args.height = H
+-    args.num_inter = 0
+-    args.b_low = 1
+-    args.b_high = H
+-    args.sp1 = RATPOINTS_DEFAULT_SP1
+-    args.sp2 = RATPOINTS_DEFAULT_SP2
+-    args.array_size = RATPOINTS_ARRAY_SIZE
+-    args.sturm = RATPOINTS_DEFAULT_STURM
+-    args.num_primes = RATPOINTS_DEFAULT_NUM_PRIMES
+-    args.max_forbidden = RATPOINTS_DEFAULT_MAX_FORBIDDEN
+-    args.flags = (RATPOINTS_VERBOSE & verby)
+-    sig_on()
+-    total = find_points(&args, process_exists_only, <void *>(&info_s))
+-    sig_off()
+-    sig_free(args.domain)
+-    if total == RATPOINTS_NON_SQUAREFREE:
+-        raise RuntimeError('Polynomial must be square-free')
+-    if total == RATPOINTS_BAD_ARGS:
+-        raise RuntimeError('Bad arguments to ratpoints')
+-    return 1 if (total > 0) else 0
+-
+-
+-
+-
+diff --git a/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx b/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx
+index 1cc70925fa..c2f994a650 100644
+--- a/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx
++++ b/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx
+@@ -1,5 +1,3 @@
+-# distutils: libraries = ratpoints
+-
+ r"""
+ Descent on elliptic curves over `\QQ` with a 2-isogeny
+ """
+diff --git a/src/sage_setup/library_order.py b/src/sage_setup/library_order.py
+index 8830d44a95..0b450b3723 100644
+--- a/src/sage_setup/library_order.py
++++ b/src/sage_setup/library_order.py
+@@ -25,7 +25,7 @@ library_order_list = aliases.get("SINGULAR_LIBRARIES", []) + [
+     "giac", "intl", "curl",
+     "ec", "ecm"
+ ] + aliases.get("LINBOX_LIBRARIES", []) + aliases.get("FFLASFFPACK_LIBRARIES", []) + aliases.get("GSL_LIBRARIES", []) + [
+-    "pari", "flint", "ratpoints", "ecl", "glpk", "ppl",
++    "pari", "flint", "ecl", "glpk", "ppl",
+ ] + arb_dylib_names + [
+     "mpfi", "mpfr", "mpc", "ntl", "gmp", "gmpxx",
+     "brial",
+-- 
+2.34.1
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_31563.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_31563.patch
new file mode 100644
index 000000000000..563bb8526788
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_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/zzz-skip_doctest_no_threejs.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_no_threejs.patch
new file mode 100644
index 000000000000..9b6d0a775b10
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_no_threejs.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage/repl/ipython_kernel/install.py b/src/sage/repl/ipython_kernel/install.py
+index 2143c221ed..f781037c70 100644
+--- a/src/sage/repl/ipython_kernel/install.py
++++ b/src/sage/repl/ipython_kernel/install.py
+@@ -124,7 +124,7 @@ class SageKernelSpec(object):
+             sage: spec = SageKernelSpec(prefix=tmp_dir())
+             sage: spec.use_local_threejs()
+             sage: threejs = os.path.join(spec.nbextensions_dir, 'threejs-sage')
+-            sage: os.path.isdir(threejs)
++            sage: os.path.isdir(threejs)    # optional - threejs
+             True
+         """
+         src = THREEJS_DIR
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch
new file mode 100644
index 000000000000..15aed02f9aaa
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch
@@ -0,0 +1,12 @@
+--- a/src/sage_setup/find.py
++++ b/src/sage_setup/find.py
+@@ -301,7 +301,7 @@ def find_extra_files(src_dir, modules, cythonized_dir, special_filenames=[]):
+         sage: extras["sage/libs/mpfr"]
+         [...sage/libs/mpfr/types.pxd...]
+         sage: extras["sage/ext/interpreters"]
+-        ['.../src/sage/ext/interpreters/wrapper_cdf.pxd', ...wrapper_cdf.h...]
++        ['.../src/sage/ext/interpreters/wrapper_cdf.pxd', ...]
+     """
+     from Cython.Utils import is_package_dir
+ 
+--
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch
new file mode 100644
index 000000000000..04fa2acbf3ec
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch
@@ -0,0 +1,11 @@
+--- a/src/sage/tests/cmdline.py
++++ b/src/sage/tests/cmdline.py
+@@ -488,7 +488,7 @@ def test_executable(args, input="", timeout=100.0, pydebug_ignore_warnings=False
+         0
+ 
+         sage: (out, err, ret) = test_executable(["sage", "--cython"])
+-        sage: print(err)
++        sage: print(err)  # not tested - broken when shebang is rewritten
+         Cython (http://cython.org) is a compiler for code written in the
+         Cython language.  Cython is based on Pyrex by Greg Ewing.
+         ...
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
new file mode 100644
index 000000000000..f0003a6c8246
--- /dev/null
+++ b/srcpkgs/sagemath/template
@@ -0,0 +1,251 @@
+# Template file for 'sagemath'
+pkgname=sagemath
+version=9.5.rc3
+revision=1
+wrksrc=sage-$version
+build_style=configure
+configure_args="--enable-build-as-root --with-system-python3
+ --enable-system-site-packages"
+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
+ 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-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
+homepage="http://sagemath.org/"
+distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
+checksum=dabc1a98e883c6069b59a755852bb0030395404a95d19d497c56f557c02619c2
+python_version=3
+patch_args="-F0 -Np1"
+
+build_options="debug"
+desc_option_debug="Build with debug symbols"
+
+# path where sage will be installed
+_SAGE_ROOT=/usr/lib/sage-${version}
+
+# Skip these sage packages: they are not needed
+_spkg_skip="appnope fonttools importlib_resources pycygwin
+ setuptools_scm_git_archive setuptools_wheel sphinxcontrib_websupport
+ pplpy_doc vcversioner
+ jmol mathjax sagenb_export thebe sagetex jupyter_jsmol rpy2 threejs"
+
+# Force use these sage packages from system
+_spkg_system="cppy cython cysignals cypari pplpy fpylll memory_allocator
+ primecountpy"
+
+# Databases to be used from system
+_spkg_db="combinatorial_designs conway_polynomials elliptic_curves graphs
+ polytopes_db"
+
+for spkg in $_spkg_skip; do
+	configure_args+=" sage_spkg_install_$spkg=no"
+	configure_args+=" sage_require_$spkg=no"
+done
+
+for spkg in $_spkg_system; do
+	configure_args+=" sage_spkg_install_$spkg=no"
+	configure_args+=" sage_require_$spkg=yes"
+done
+
+for spkg in $_spkg_db; do
+	configure_args+=" sage_spkg_install_$spkg=no"
+	configure_args+=" sage_require_$spkg=yes"
+	depends+=" sage-data-$spkg"
+	checkdepends+=" sage-data-$spkg"
+done
+
+# 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
+
+# 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
+	mv -T $wrksrc $_SAGE_ROOT
+	ln -srfT $_SAGE_ROOT $wrksrc
+
+	mkdir -p $wrksrc/upstream
+	for u in ${_upstream}; do
+		cp "$XBPS_SRCDISTDIR/${pkgname}-${version}/${u##*[/>]}" $wrksrc/upstream
+	done
+}
+
+do_clean() {
+	rm -rf $wrksrc $_SAGE_ROOT
+}
+
+post_patch() {
+	./bootstrap
+}
+
+pre_configure() {
+	if [ "$build_option_debug" ]; then
+		export SAGE_DEBUG=yes
+	fi
+
+	export MAKE="make -j ${XBPS_MAKEJOBS}"
+}
+
+post_configure() {
+	# we set some variables, right after configure has created sage_conf.py
+	cat <<-EOF >> pkgs/sage-conf/sage_conf.py
+	GAP_ROOT_DIR = "/usr/share/gap"
+	GAP_SO = "$(objdump -p /usr/lib/libgap.so | awk '/SONAME/{print $2}')"
+	CONWAY_POLYNOMIALS_DATA_DIR = "/usr/share/sagemath/conway_polynomials"
+	GRAPHS_DATA_DIR = "/usr/share/sagemath/graphs"
+	ELLCURVE_DATA_DIR = "/usr/share/sagemath/ellcurves"
+	POLYTOPE_DATA_DIR = "/usr/share/sagemath/reflexive_polytopes"
+	COMBINATORIAL_DESIGN_DATA_DIR = "/usr/share/sagemath/combinatorial_designs"
+	CREMONA_MINI_DATA_DIR = "/usr/share/sagemath/cremona"
+	CREMONA_LARGE_DATA_DIR = "/usr/share/sagemath/cremona"
+	EOF
+}
+
+do_install() {
+	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 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
+	# 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}
+	ln -sfT sage-${version} ${DESTDIR}/usr/bin/sage
+}
+
+do_check() {
+	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
+		_test_files=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	fi
+	if [ -z "$_test_files" ]; then
+		_test_files=--all
+	fi
+	cp ${FILESDIR}/timings2.json .
+	_test_args="--stats_path=timings2.json"
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args+=" --long --warn-long 60.0"
+	else
+		_test_args+=" --warn-long 30.0"
+	fi
+	if [ "$XBPS_BUILD_ENVIRONMENT" = "void-packages-ci" ]; then
+		# for CI use a predictable random seed
+		_test_args+=" --random-seed=0"
+	fi
+	# since make check will build the docs, run test like this instead
+	./sage -tp ${XBPS_MAKEJOBS} ${_test_args} ${_test_files}
+}
+
+### copied from sage-deps, to be kept 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"
+
+# standard dependencies
+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 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
+ 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
+ gengetopt texinfo
+ brial-devel cliquer-devel gfan libbraiding-devel libhomfly-devel
+ lrcalc-devel nauty-devel palp tachyon
+ maxima-ecl primesieve-devel primecount-devel gap-devel
+"
+
+# optional dependencies
+makedepends+="
+ ffmpeg ImageMagick
+"
+
+# TODO: optional
+# 4ti2 coxeter3 libsemigroups lrslib pdf2svg perl_mongodb polymake
+
+# python packages for trac-29665
+_sage_python3_modules="
+ python3-Babel python3-Jinja2 python3-MarkupSafe python3-Pillow
+ python3-Pygments python3-Sphinx python3-alabaster python3-argcomplete
+ python3-argon2 python3-attrs python3-backcall python3-beniget
+ python3-bleach python3-certifi python3-cffi python3-charset-normalizer
+ python3-cycler python3-dateutil python3-decorator python3-defusedxml
+ python3-docutils python3-entrypoints python3-flit_core python3-gast
+ python3-gmpy2 python3-html5lib python3-idna python3-imagesize
+ python3-importlib_metadata python3-ipython python3-ipython_genutils
+ python3-ipython_ipykernel python3-jedi python3-jsonschema
+ python3-jupyter_client python3-jupyter_core python3-jupyter_ipywidgets
+ python3-jupyter_nbconvert python3-jupyter_nbformat
+ python3-jupyter_notebook python3-jupyterlab_pygments python3-kiwisolver
+ python3-matplotlib python3-matplotlib-inline python3-mistune
+ python3-mpmath python3-nbclient python3-nest_asyncio python3-networkx
+ python3-numpy python3-packaging python3-pandocfilters python3-parsing
+ python3-parso python3-pexpect python3-pickleshare python3-pip
+ python3-pkgconfig python3-pluggy python3-ply python3-prometheus_client
+ python3-prompt_toolkit python3-ptyprocess python3-py python3-pybind11
+ python3-pycparser python3-pyrsistent python3-pytz python3-pyzmq
+ python3-requests python3-scipy python3-send2trash python3-setuptools
+ python3-setuptools_scm python3-simplegeneric python3-six
+ python3-snowballstemmer python3-sphinxcontrib-applehelp
+ python3-sphinxcontrib-devhelp python3-sphinxcontrib-htmlhelp
+ python3-sphinxcontrib-jsmath python3-sphinxcontrib-qthelp
+ python3-sphinxcontrib-serializinghtml python3-sympy python3-terminado
+ python3-testpath python3-texttable python3-toml python3-tomli
+ python3-tornado python3-traitlets python3-typing_extensions
+ python3-tzlocal python3-urllib3 python3-wcwidth python3-webencodings
+ python3-wheel python3-zipp pythran
+
+ python3-cvxopt python3-cppy python3-Cython python3-cysignals python3-cypari2
+ python3-pplpy python3-fpylll python3-primecountpy python3-memory_allocator
+"
+
+# python packages are build and runtime dependencies
+makedepends+=" $_sage_python3_modules"
+depends+=" $_sage_python3_modules"
diff --git a/srcpkgs/sagemath/update b/srcpkgs/sagemath/update
new file mode 100644
index 000000000000..c33aba4e6df2
--- /dev/null
+++ b/srcpkgs/sagemath/update
@@ -0,0 +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 0c66e3398ce8b5843d0be4eb4674f6735f64596f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Thu, 13 Jan 2022 15:47:33 -0300
Subject: [PATCH 2/9] New package: sagemath-test

---
 srcpkgs/sagemath-test/files/timings2.json |  1 +
 srcpkgs/sagemath-test/template            | 35 +++++++++++++++++++++++
 2 files changed, 36 insertions(+)
 create mode 120000 srcpkgs/sagemath-test/files/timings2.json
 create mode 100644 srcpkgs/sagemath-test/template

diff --git a/srcpkgs/sagemath-test/files/timings2.json b/srcpkgs/sagemath-test/files/timings2.json
new file mode 120000
index 000000000000..25d5309fc818
--- /dev/null
+++ b/srcpkgs/sagemath-test/files/timings2.json
@@ -0,0 +1 @@
+../../sagemath/files/timings2.json
\ No newline at end of file
diff --git a/srcpkgs/sagemath-test/template b/srcpkgs/sagemath-test/template
new file mode 100644
index 000000000000..1e6c76274a4d
--- /dev/null
+++ b/srcpkgs/sagemath-test/template
@@ -0,0 +1,35 @@
+# Template file for 'sagemath-test'
+pkgname=sagemath-test
+version=1
+revision=1
+build_style=meta
+checkdepends="sagemath"
+short_desc="Dummy package to test sagemath"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-2.0-or-later"
+homepage="none"
+
+# TODO: install base-voidstrap, uninstall base-chroot, and remove orphans
+# so we can check sagemath depends are enough to run sage on void
+
+do_check() {
+	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
+		_test_files=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	fi
+	if [ -z "$_test_files" ]; then
+		_test_files=--all
+	fi
+	cp ${FILESDIR}/timings2.json .
+	_test_args="--stats_path=timings2.json"
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args+=" --long --warn-long 60.0"
+	else
+		_test_args+=" --warn-long 30.0"
+	fi
+	if [ "$XBPS_BUILD_ENVIRONMENT" = "void-packages-ci" ]; then
+		# for CI use a predictable random seed
+		_test_args+=" --random-seed=0"
+	fi
+	# since make check will build the docs, run test like this instead
+	sage -tp ${XBPS_MAKEJOBS} ${_test_args} ${_test_files}
+}

From 1e61a32128b39a272b621402d82bcb0545d0d882 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Wed, 19 Jan 2022 00:26:58 -0300
Subject: [PATCH 3/9] sagemath: linbox, gap, maxima without patch

---
 ...13e88ee188d516e4956832a23f985a73917a.patch |  31 ---
 ...ea979d4bfa1a26ef3b08a29ca626b83b6ff5.patch |  23 --
 ...f491e5ce599ba185f5e93f02e0fcebd76c9e.patch |  57 ----
 ...aba734cb4ded0b04165fa142b5cf4c38fd23.patch | 247 ------------------
 srcpkgs/sagemath/template                     |   8 +-
 5 files changed, 7 insertions(+), 359 deletions(-)
 delete mode 100644 srcpkgs/sagemath/patches/trac-29631-001-system_linbox-794713e88ee188d516e4956832a23f985a73917a.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-29631-002-system_linbox-7e16ea979d4bfa1a26ef3b08a29ca626b83b6ff5.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-32867-system_maxima-ed39aba734cb4ded0b04165fa142b5cf4c38fd23.patch

diff --git a/srcpkgs/sagemath/patches/trac-29631-001-system_linbox-794713e88ee188d516e4956832a23f985a73917a.patch b/srcpkgs/sagemath/patches/trac-29631-001-system_linbox-794713e88ee188d516e4956832a23f985a73917a.patch
deleted file mode 100644
index 483dbe2c2597..000000000000
--- a/srcpkgs/sagemath/patches/trac-29631-001-system_linbox-794713e88ee188d516e4956832a23f985a73917a.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-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.
-
-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/trac-29631-002-system_linbox-7e16ea979d4bfa1a26ef3b08a29ca626b83b6ff5.patch b/srcpkgs/sagemath/patches/trac-29631-002-system_linbox-7e16ea979d4bfa1a26ef3b08a29ca626b83b6ff5.patch
deleted file mode 100644
index 3b20d13100e7..000000000000
--- a/srcpkgs/sagemath/patches/trac-29631-002-system_linbox-7e16ea979d4bfa1a26ef3b08a29ca626b83b6ff5.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-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-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch b/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
deleted file mode 100644
index da88a369db0d..000000000000
--- a/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 2c981351bb60089530b0598d3e9a909a23d4d4d8 Mon Sep 17 00:00:00 2001
-From: Thierry Thomas <thierry@FreeBSD.org>
-Date: Mon, 22 Mar 2021 03:04:12 +0100
-Subject: 29644: Add spkg-configure.m4 for gap
-
----
- build/pkgs/gap/spkg-configure.m4 | 8 ++++++++
- 1 file changed, 8 insertions(+)
- create mode 100644 build/pkgs/gap/spkg-configure.m4
-
-diff --git a/build/pkgs/gap/spkg-configure.m4 b/build/pkgs/gap/spkg-configure.m4
-new file mode 100644
-index 00000000..91cd089
---- /dev/null
-+++ b/build/pkgs/gap/spkg-configure.m4
-@@ -0,0 +1,8 @@
-+SAGE_SPKG_CONFIGURE([gap], [
-+    SAGE_SPKG_DEPCHECK([gmp], [
-+       AC_CHECK_HEADER([gap/system.h], [
-+        AC_SEARCH_LIBS([GAP_COMM], [gap], [
-+        ], [sage_spkg_install_gap=yes])
-+       ], [sage_spkg_install_gap=yes])
-+    ])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From 2a41f491e5ce599ba185f5e93f02e0fcebd76c9e Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Samuel=20Leli=C3=A8vre?= <samuel.lelievre@gmail.com>
-Date: Mon, 22 Mar 2021 03:05:31 +0100
-Subject: 29644: Add distro information for gap
-
----
- build/pkgs/gap/distros/fedora.txt | 1 +
- build/pkgs/gap/distros/gentoo.txt | 1 +
- 2 files changed, 2 insertions(+)
- create mode 100644 build/pkgs/gap/distros/fedora.txt
- create mode 100644 build/pkgs/gap/distros/gentoo.txt
-
-diff --git a/build/pkgs/gap/distros/fedora.txt b/build/pkgs/gap/distros/fedora.txt
-new file mode 100644
-index 00000000..ea4feae
---- /dev/null
-+++ b/build/pkgs/gap/distros/fedora.txt
-@@ -0,0 +1 @@
-+gap
-diff --git a/build/pkgs/gap/distros/gentoo.txt b/build/pkgs/gap/distros/gentoo.txt
-new file mode 100644
-index 00000000..ea64ec9
---- /dev/null
-+++ b/build/pkgs/gap/distros/gentoo.txt
-@@ -0,0 +1 @@
-+sci-mathematics/gap
--- 
-cgit v1.0-1-gd88e
-
diff --git a/srcpkgs/sagemath/patches/trac-32867-system_maxima-ed39aba734cb4ded0b04165fa142b5cf4c38fd23.patch b/srcpkgs/sagemath/patches/trac-32867-system_maxima-ed39aba734cb4ded0b04165fa142b5cf4c38fd23.patch
deleted file mode 100644
index 8edbde0ce76f..000000000000
--- a/srcpkgs/sagemath/patches/trac-32867-system_maxima-ed39aba734cb4ded0b04165fa142b5cf4c38fd23.patch
+++ /dev/null
@@ -1,247 +0,0 @@
-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
- 
--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 fbce694..b40cda6 100644
---- a/pkgs/sage-conf/sage_conf.py.in
-+++ b/pkgs/sage-conf/sage_conf.py.in
-@@ -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.
- MAXIMA_FAS = "@SAGE_MAXIMA_FAS@".replace('${prefix}', SAGE_LOCAL)
- 
-diff --git a/src/bin/sage b/src/bin/sage
-index fcd2630..54b69a1 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/sage/env.py b/src/sage/env.py
-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"))
- 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 fc7f48b..7313c7d 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 917059d..c966a3c 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')
--- 
-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 f0003a6c8246..de9fe5177766 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -38,7 +38,8 @@ _spkg_skip="appnope fonttools importlib_resources pycygwin
 
 # Force use these sage packages from system
 _spkg_system="cppy cython cysignals cypari pplpy fpylll memory_allocator
- primecountpy"
+ primecountpy
+ linbox gap maxima"
 
 # Databases to be used from system
 _spkg_db="combinatorial_designs conway_polynomials elliptic_curves graphs
@@ -107,6 +108,8 @@ post_configure() {
 	cat <<-EOF >> pkgs/sage-conf/sage_conf.py
 	GAP_ROOT_DIR = "/usr/share/gap"
 	GAP_SO = "$(objdump -p /usr/lib/libgap.so | awk '/SONAME/{print $2}')"
+	MAXIMA = "maxima -l ecl"
+	MAXIMA_FAS = ""
 	CONWAY_POLYNOMIALS_DATA_DIR = "/usr/share/sagemath/conway_polynomials"
 	GRAPHS_DATA_DIR = "/usr/share/sagemath/graphs"
 	ELLCURVE_DATA_DIR = "/usr/share/sagemath/ellcurves"
@@ -115,6 +118,9 @@ post_configure() {
 	CREMONA_MINI_DATA_DIR = "/usr/share/sagemath/cremona"
 	CREMONA_LARGE_DATA_DIR = "/usr/share/sagemath/cremona"
 	EOF
+	cat <<-EOF >> src/bin/sage-env
+	unset MAXIMA_PREFIX
+	EOF
 }
 
 do_install() {

From ca1200caed3ca81149eef6af57b262cd53d8c859 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Wed, 19 Jan 2022 14:56:02 -0300
Subject: [PATCH 4/9] sagemath: remove patches for upstream pkgs

---
 ...0e8168a9ffb4fbf07dd03c0846b4933a6dbe.patch | 64 -------------------
 ...26e3db5ea06b962fac386fa3c7223f9a14fb.patch | 51 ---------------
 ...d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch | 35 ----------
 3 files changed, 150 deletions(-)
 delete mode 100644 srcpkgs/sagemath/patches/trac-33047-musl_fix_find_library-dc1a0e8168a9ffb4fbf07dd03c0846b4933a6dbe.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-33063-notebook_fix_deprecation_warning-966926e3db5ea06b962fac386fa3c7223f9a14fb.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch

diff --git a/srcpkgs/sagemath/patches/trac-33047-musl_fix_find_library-dc1a0e8168a9ffb4fbf07dd03c0846b4933a6dbe.patch b/srcpkgs/sagemath/patches/trac-33047-musl_fix_find_library-dc1a0e8168a9ffb4fbf07dd03c0846b4933a6dbe.patch
deleted file mode 100644
index 3d4f4e14bb7b..000000000000
--- a/srcpkgs/sagemath/patches/trac-33047-musl_fix_find_library-dc1a0e8168a9ffb4fbf07dd03c0846b4933a6dbe.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-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: Add a patch that fixes ctypes.util.find_library('c')
-
-The issue causes a failure doctesting src/sage/misc/gperftools.py
----
- 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 00000000..82f436b
---- /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):
--- 
-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
deleted file mode 100644
index 921a1669fd2a..000000000000
--- a/srcpkgs/sagemath/patches/trac-33063-notebook_fix_deprecation_warning-966926e3db5ea06b962fac386fa3c7223f9a14fb.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-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-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch b/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
deleted file mode 100644
index 350c41ac3928..000000000000
--- a/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6 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: sagetex: Fix a warning when byte-compiling sagetexparse.py
-
----
- build/pkgs/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 00000000..d82ab67
---- /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'
-+ 
--- 
-cgit v1.0-1-gd88e
-

From 808155c514d4012f34f7e77bbe83a6b46fd11492 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Wed, 19 Jan 2022 15:18:27 -0300
Subject: [PATCH 5/9] sagemath: simplify system-site-packages patch

---
 ...aabe95082f42ba134780d579390d7b6153e2.patch |   53 +
 ...184f7498a2046065e669723e68efe2d65cee.patch | 5629 -----------------
 .../zzz-more_site_packages_not_in_29665.patch |   42 -
 srcpkgs/sagemath/template                     |   15 +
 4 files changed, 68 insertions(+), 5671 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-05fcaabe95082f42ba134780d579390d7b6153e2.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
 delete mode 100644 srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch

diff --git a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-05fcaabe95082f42ba134780d579390d7b6153e2.patch b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-05fcaabe95082f42ba134780d579390d7b6153e2.patch
new file mode 100644
index 000000000000..3af8b05135ae
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-05fcaabe95082f42ba134780d579390d7b6153e2.patch
@@ -0,0 +1,53 @@
+From 05fcaabe95082f42ba134780d579390d7b6153e2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 19:30:58 -0400
+Subject: Trac #29665: add --enable-system-site-packages option to ./configure.
+
+This new option is experimental and disabled by default. When it is
+enabled, the string "--system-site-packages" is appended to a new
+environment variable SAGE_VENV_FLAGS that is then passed to the
+sage-venv command during the build using autoconf substitution.
+Thusly the correct setting finds its way into local/pyvenv.cfg.
+---
+ build/make/Makefile.in |  2 +-
+ configure.ac           | 11 +++++++++++
+ 2 files changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/build/make/Makefile.in b/build/make/Makefile.in
+index f870cc3..68627ab 100644
+--- a/build/make/Makefile.in
++++ b/build/make/Makefile.in
+@@ -211,7 +211,7 @@ endif
+ inst_python3_venv = $(SAGE_VENV)/pyvenv.cfg
+ 
+ $(inst_python3_venv):
+-	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv "$(SAGE_VENV)"
++	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv @SAGE_VENV_FLAGS@ "$(SAGE_VENV)"
+ endif
+ 
+ # Build everything and start Sage.
+diff --git a/configure.ac b/configure.ac
+index 351f487..db30a91 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -435,6 +435,17 @@ AC_ARG_ENABLE([download-from-upstream-url],
+   [AS_HELP_STRING([--enable-download-from-upstream-url],
+     [allow downloading packages from their upstream URL if they cannot be found on the Sage mirrors])])
+ 
++AC_ARG_ENABLE(
++  [system-site-packages], [AS_HELP_STRING(
++    [--enable-system-site-packages],
++    [allow sage to use python packages from the system (experimental; default: no)]
++  )], [
++  AS_IF([test "x$enable_system_site_packages" = "xyes"], [
++    SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
++  ])
++])
++AC_SUBST([SAGE_VENV_FLAGS])
++
+ SAGE_SPKG_OPTIONS=""
+ AS_IF([test "x$enable_experimental_packages" = "xyes"], [
+   AS_VAR_APPEND([SAGE_SPKG_OPTIONS], [" -y"])
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
deleted file mode 100644
index 0ecb27c593cd..000000000000
--- a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
+++ /dev/null
@@ -1,5629 +0,0 @@
-From 05fcaabe95082f42ba134780d579390d7b6153e2 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Sat, 9 Oct 2021 19:30:58 -0400
-Subject: Trac #29665: add --enable-system-site-packages option to ./configure.
-
-This new option is experimental and disabled by default. When it is
-enabled, the string "--system-site-packages" is appended to a new
-environment variable SAGE_VENV_FLAGS that is then passed to the
-sage-venv command during the build using autoconf substitution.
-Thusly the correct setting finds its way into local/pyvenv.cfg.
----
- build/make/Makefile.in |  2 +-
- configure.ac           | 11 +++++++++++
- 2 files changed, 12 insertions(+), 1 deletion(-)
-
-diff --git a/build/make/Makefile.in b/build/make/Makefile.in
-index f870cc3..68627ab 100644
---- a/build/make/Makefile.in
-+++ b/build/make/Makefile.in
-@@ -211,7 +211,7 @@ endif
- inst_python3_venv = $(SAGE_VENV)/pyvenv.cfg
- 
- $(inst_python3_venv):
--	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv "$(SAGE_VENV)"
-+	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv @SAGE_VENV_FLAGS@ "$(SAGE_VENV)"
- endif
- 
- # Build everything and start Sage.
-diff --git a/configure.ac b/configure.ac
-index 351f487..db30a91 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -435,6 +435,17 @@ AC_ARG_ENABLE([download-from-upstream-url],
-   [AS_HELP_STRING([--enable-download-from-upstream-url],
-     [allow downloading packages from their upstream URL if they cannot be found on the Sage mirrors])])
- 
-+AC_ARG_ENABLE(
-+  [system-site-packages], [AS_HELP_STRING(
-+    [--enable-system-site-packages],
-+    [allow sage to use python packages from the system (experimental; default: no)]
-+  )], [
-+  AS_IF([test "x$enable_system_site_packages" = "xyes"], [
-+    SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
-+  ])
-+])
-+AC_SUBST([SAGE_VENV_FLAGS])
-+
- SAGE_SPKG_OPTIONS=""
- AS_IF([test "x$enable_experimental_packages" = "xyes"], [
-   AS_VAR_APPEND([SAGE_SPKG_OPTIONS], [" -y"])
--- 
-cgit v1.0-1-gd88e
-
-
-From 9372d1f663edf4e89f9c186336815ca04cff59dc Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 11 Oct 2021 19:41:14 -0400
-Subject: Trac #29665: new SAGE_PYTHON_PACKAGE_CHECK() autoconf macro.
-
-This new macro encapsulates the check for system installations of
-python packages. It uses setuptools.version's pkg_resources to
-check if the contents of install-requires.txt are satisfied for
-the given package; and if not, tells the build system to install
-the SPKG instead.
----
- m4/sage_python_package_check.m4 | 49 +++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 49 insertions(+)
- create mode 100644 m4/sage_python_package_check.m4
-
-diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
-new file mode 100644
-index 00000000..77b0a0c
---- /dev/null
-+++ b/m4/sage_python_package_check.m4
-@@ -0,0 +1,49 @@
-+#
-+# SYNOPSIS
-+#
-+#   SAGE_PYTHON_PACKAGE_CHECK(package)
-+#
-+# DESCRIPTION
-+#
-+#   Determine if the system copy of a python package can be used by sage.
-+#
-+#   This macro uses setuptools.version's pkg_resources to check that the
-+#   "install-requires.txt" file for the named package is satisfied, and
-+#   it can typically fail in four ways:
-+#
-+#     1. If --enable-system-site-packages was not passed to ./configure,
-+#
-+#     2. If we are not using the system python (no $PYTHON_FOR_VENV),
-+#
-+#     3. If setuptools is not available to the system python,
-+#
-+#     4. If the contents of install-requires.txt are not met (wrong
-+#        version, no version, etc.) by the system python.
-+#
-+#   In any of those cases, we set sage_spkg_install_$package to "yes"
-+#   so that the corresponding SPKG is installed. Otherwise, we do
-+#   nothing, since the default value of sage_spkg_install_$package
-+#   is "no" (to use the system copy).
-+#
-+#   The SAGE_SPKG_CONFIGURE_PYTHON3() macro is AC_REQUIRE'd to ensure
-+#   that $PYTHON_FOR_VENV is available, if it is going to be available.
-+#
-+
-+AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
-+  AS_IF([test "${enable_system_site_packages}" = "yes"], [
-+    AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
-+
-+    dnl strip all comments from install-requires.txt; this should leave
-+    dnl only a single line containing the version specification for this
-+    dnl package.
-+    SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
-+    AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
-+    AS_IF(
-+      ["${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())"],
-+      [AC_MSG_RESULT(yes)],
-+      [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
-+    )
-+  ], [
-+    sage_spkg_install_$1=yes
-+  ])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From a0dac8ad81ad6369d479bba30d2388de59e5cecb Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Sat, 9 Oct 2021 20:21:29 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for py.
-
----
- build/pkgs/py/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/py/spkg-configure.m4
-
-diff --git a/build/pkgs/py/spkg-configure.m4 b/build/pkgs/py/spkg-configure.m4
-new file mode 100644
-index 00000000..ded7034
---- /dev/null
-+++ b/build/pkgs/py/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([py], [SAGE_PYTHON_PACKAGE_CHECK([py])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 87c463a25ab4432dc1fba4f7a9703284e5b8f620 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Sat, 9 Oct 2021 20:24:15 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for wheel.
-
----
- build/pkgs/wheel/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/wheel/spkg-configure.m4
-
-diff --git a/build/pkgs/wheel/spkg-configure.m4 b/build/pkgs/wheel/spkg-configure.m4
-new file mode 100644
-index 00000000..7897ea9
---- /dev/null
-+++ b/build/pkgs/wheel/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([wheel], [SAGE_PYTHON_PACKAGE_CHECK([wheel])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 804094b3a980f262f4d53d7be8b1be43ac0c55e0 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Sat, 9 Oct 2021 20:25:15 -0400
-Subject: Trac #29665: new spkg-configure.m4 for cvxopt.
-
-This includes a SAGE_SPKG_DEPCHECK([gsl glpk suitesparse],... because
-those C dependencies wind up linked into shared libraries like,
-
-  /usr/.../cvxopt/glpk.cpython-39-x86_64-linux-gnu.so
-
-that could potentially conflict with (for example) the glpk SPKG.
----
- build/pkgs/cvxopt/spkg-configure.m4 | 5 +++++
- 1 file changed, 5 insertions(+)
- create mode 100644 build/pkgs/cvxopt/spkg-configure.m4
-
-diff --git a/build/pkgs/cvxopt/spkg-configure.m4 b/build/pkgs/cvxopt/spkg-configure.m4
-new file mode 100644
-index 00000000..c4aa619
---- /dev/null
-+++ b/build/pkgs/cvxopt/spkg-configure.m4
-@@ -0,0 +1,5 @@
-+SAGE_SPKG_CONFIGURE([cvxopt], [
-+  SAGE_SPKG_DEPCHECK([gsl glpk suitesparse], [
-+    SAGE_PYTHON_PACKAGE_CHECK([cvxopt])
-+  ])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From 3f171955ff8d15da2c98aee0d2e254e95a55a2b5 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Sat, 9 Oct 2021 20:28:10 -0400
-Subject: Trac #29665: new spkg-configure.m4 for pyzmq.
-
-This includes a SAGE_SPKG_DEPCHECK([zeromq],... because libzmq winds
-up linked into shared libraries like,
-
-  /usr/.../zmq/backend/cython/message.cpython-39-x86_64-linux-gnu.so
-
-that potentially conflict with the zeromq SPKG.
----
- build/pkgs/pyzmq/spkg-configure.m4 | 5 +++++
- 1 file changed, 5 insertions(+)
- create mode 100644 build/pkgs/pyzmq/spkg-configure.m4
-
-diff --git a/build/pkgs/pyzmq/spkg-configure.m4 b/build/pkgs/pyzmq/spkg-configure.m4
-new file mode 100644
-index 00000000..ae2b126
---- /dev/null
-+++ b/build/pkgs/pyzmq/spkg-configure.m4
-@@ -0,0 +1,5 @@
-+SAGE_SPKG_CONFIGURE([pyzmq], [
-+  SAGE_SPKG_DEPCHECK([zeromq], [
-+    SAGE_PYTHON_PACKAGE_CHECK([pyzmq])
-+  ])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From 20d3aa9da9fc98a6e6a47599cd1b6d1d3785a4c4 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Sat, 9 Oct 2021 20:31:24 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for requests.
-
----
- build/pkgs/requests/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/requests/spkg-configure.m4
-
-diff --git a/build/pkgs/requests/spkg-configure.m4 b/build/pkgs/requests/spkg-configure.m4
-new file mode 100644
-index 00000000..f50a66c
---- /dev/null
-+++ b/build/pkgs/requests/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([requests], [SAGE_PYTHON_PACKAGE_CHECK([requests])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 4df57ee47f2576b6b7bf9265248e06e90616b689 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Sun, 10 Oct 2021 18:13:34 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for six.
-
----
- build/pkgs/six/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/six/spkg-configure.m4
-
-diff --git a/build/pkgs/six/spkg-configure.m4 b/build/pkgs/six/spkg-configure.m4
-new file mode 100644
-index 00000000..a382b81
---- /dev/null
-+++ b/build/pkgs/six/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([six], [SAGE_PYTHON_PACKAGE_CHECK([six])])
--- 
-cgit v1.0-1-gd88e
-
-
-From f4462652d02ca729cc6d7cb36ee4d7d662deafb0 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Sun, 10 Oct 2021 18:14:29 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for packaging.
-
----
- build/pkgs/packaging/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/packaging/spkg-configure.m4
-
-diff --git a/build/pkgs/packaging/spkg-configure.m4 b/build/pkgs/packaging/spkg-configure.m4
-new file mode 100644
-index 00000000..398f9e1
---- /dev/null
-+++ b/build/pkgs/packaging/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([packaging], [SAGE_PYTHON_PACKAGE_CHECK([packaging])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 4d64677fffce48077e4bc3e20ec833c70e6e9b65 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Sun, 10 Oct 2021 18:18:53 -0400
-Subject: Trac #29665: new spkg-configure.m4 for numpy.
-
-This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack
-wind up linked into shared libraries like,
-
-  /usr/.../numpy/linalg/lapack_lite.cpython-39-x86_64-linux-gnu.so
-
-that potentially conflict with the openblas SPKG.
----
- build/pkgs/numpy/spkg-configure.m4 | 5 +++++
- 1 file changed, 5 insertions(+)
- create mode 100644 build/pkgs/numpy/spkg-configure.m4
-
-diff --git a/build/pkgs/numpy/spkg-configure.m4 b/build/pkgs/numpy/spkg-configure.m4
-new file mode 100644
-index 00000000..16f9a90
---- /dev/null
-+++ b/build/pkgs/numpy/spkg-configure.m4
-@@ -0,0 +1,5 @@
-+SAGE_SPKG_CONFIGURE([numpy], [
-+  SAGE_SPKG_DEPCHECK([openblas], [
-+   SAGE_PYTHON_PACKAGE_CHECK([numpy])
-+  ])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From 85dfe5bb32f3c470966b477bae68a921e846d11f Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Sun, 10 Oct 2021 18:58:48 -0400
-Subject: Trac #29665: new spkg-configure.m4 for scipy.
-
-This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack
-wind up linked into shared libraries like,
-
-  /usr/.../scipy/linalg/_flinalg.cpython-39-x86_64-linux-gnu.so
-
-that potentially conflict with the openblas SPKG.
----
- build/pkgs/scipy/spkg-configure.m4 | 5 +++++
- 1 file changed, 5 insertions(+)
- create mode 100644 build/pkgs/scipy/spkg-configure.m4
-
-diff --git a/build/pkgs/scipy/spkg-configure.m4 b/build/pkgs/scipy/spkg-configure.m4
-new file mode 100644
-index 00000000..0b7294a
---- /dev/null
-+++ b/build/pkgs/scipy/spkg-configure.m4
-@@ -0,0 +1,5 @@
-+SAGE_SPKG_CONFIGURE([scipy], [
-+  SAGE_SPKG_DEPCHECK([openblas], [
-+    SAGE_PYTHON_PACKAGE_CHECK([scipy])
-+  ])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From 5616f1491036fda95f4d3e840c8c8b531c97323b Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 11 Oct 2021 07:19:24 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for pluggy.
-
----
- build/pkgs/pluggy/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pluggy/spkg-configure.m4
-
-diff --git a/build/pkgs/pluggy/spkg-configure.m4 b/build/pkgs/pluggy/spkg-configure.m4
-new file mode 100644
-index 00000000..11b1fce
---- /dev/null
-+++ b/build/pkgs/pluggy/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([pluggy], [SAGE_PYTHON_PACKAGE_CHECK([pluggy])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 6bceae3d356878cfe5fce40c9998dead003a3844 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 11 Oct 2021 07:24:12 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for pickleshare.
-
----
- build/pkgs/pickleshare/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pickleshare/spkg-configure.m4
-
-diff --git a/build/pkgs/pickleshare/spkg-configure.m4 b/build/pkgs/pickleshare/spkg-configure.m4
-new file mode 100644
-index 00000000..80e9b7c
---- /dev/null
-+++ b/build/pkgs/pickleshare/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([pickleshare], [SAGE_PYTHON_PACKAGE_CHECK([pickleshare])])
--- 
-cgit v1.0-1-gd88e
-
-
-From da2ab534f4a256c82ed4f1c5f0f5c320529b5e9f Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 11 Oct 2021 08:53:29 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for html5lib.
-
----
- build/pkgs/html5lib/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/html5lib/spkg-configure.m4
-
-diff --git a/build/pkgs/html5lib/spkg-configure.m4 b/build/pkgs/html5lib/spkg-configure.m4
-new file mode 100644
-index 00000000..f421b7e
---- /dev/null
-+++ b/build/pkgs/html5lib/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([html5lib], [SAGE_PYTHON_PACKAGE_CHECK([html5lib])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 5e464134afdf6055b7b5804208f759561c5435cd Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 11 Oct 2021 18:30:47 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for networkx.
-
----
- build/pkgs/networkx/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/networkx/spkg-configure.m4
-
-diff --git a/build/pkgs/networkx/spkg-configure.m4 b/build/pkgs/networkx/spkg-configure.m4
-new file mode 100644
-index 00000000..926671e
---- /dev/null
-+++ b/build/pkgs/networkx/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([networkx], [SAGE_PYTHON_PACKAGE_CHECK([networkx])])
--- 
-cgit v1.0-1-gd88e
-
-
-From c4d40770cd9c7fda811e31759a5f4aedc320f3f9 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 11 Oct 2021 20:33:24 -0400
-Subject: Trac #29665: new spkg-configure.m4 for matplotlib.
-
-This includes a SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull],...
-because those dependencies wind up linked into shared libraries like,
-
-  /usr/lib/.../matplotlib/ft2font.cpython-39-x86_64-linux-gnu.so
-
-that potentially conflict with their SPKG counterparts.
----
- build/pkgs/matplotlib/spkg-configure.m4 | 5 +++++
- 1 file changed, 5 insertions(+)
- create mode 100644 build/pkgs/matplotlib/spkg-configure.m4
-
-diff --git a/build/pkgs/matplotlib/spkg-configure.m4 b/build/pkgs/matplotlib/spkg-configure.m4
-new file mode 100644
-index 00000000..39c2d29
---- /dev/null
-+++ b/build/pkgs/matplotlib/spkg-configure.m4
-@@ -0,0 +1,5 @@
-+SAGE_SPKG_CONFIGURE([matplotlib], [
-+  SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull], [
-+    SAGE_PYTHON_PACKAGE_CHECK([matplotlib])
-+  ])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From 7834dc3ac349201af632f89a9de7cd1967931010 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 11 Oct 2021 20:35:00 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for bleach.
-
----
- build/pkgs/bleach/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/bleach/spkg-configure.m4
-
-diff --git a/build/pkgs/bleach/spkg-configure.m4 b/build/pkgs/bleach/spkg-configure.m4
-new file mode 100644
-index 00000000..3c9bb26
---- /dev/null
-+++ b/build/pkgs/bleach/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([bleach], [SAGE_PYTHON_PACKAGE_CHECK([bleach])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 84cad343287a2c69a4a21b9fa3b92301ff88645b Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 11 Oct 2021 20:37:03 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for decorator.
-
----
- build/pkgs/decorator/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/decorator/spkg-configure.m4
-
-diff --git a/build/pkgs/decorator/spkg-configure.m4 b/build/pkgs/decorator/spkg-configure.m4
-new file mode 100644
-index 00000000..e062778
---- /dev/null
-+++ b/build/pkgs/decorator/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([decorator], [SAGE_PYTHON_PACKAGE_CHECK([decorator])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 25693212572e69d452bc95c923ada13744359eb7 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 11 Oct 2021 20:38:03 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for idna.
-
----
- build/pkgs/idna/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/idna/spkg-configure.m4
-
-diff --git a/build/pkgs/idna/spkg-configure.m4 b/build/pkgs/idna/spkg-configure.m4
-new file mode 100644
-index 00000000..9d363f2
---- /dev/null
-+++ b/build/pkgs/idna/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([idna], [SAGE_PYTHON_PACKAGE_CHECK([idna])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 6d5616472f6cdc6cf496bba6fe07bd4ef44dfdaf Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 11 Oct 2021 20:39:23 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for certifi.
-
----
- build/pkgs/certifi/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/certifi/spkg-configure.m4
-
-diff --git a/build/pkgs/certifi/spkg-configure.m4 b/build/pkgs/certifi/spkg-configure.m4
-new file mode 100644
-index 00000000..ddd4061
---- /dev/null
-+++ b/build/pkgs/certifi/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([certifi], [SAGE_PYTHON_PACKAGE_CHECK([certifi])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 9412a07023b275e29e8d1af9b8ee3e767042e7fd Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 11 Oct 2021 20:40:59 -0400
-Subject: Trac #29665: new spkg-configure.m4 for pillow.
-
-This includes an SAGE_SPKG_DEPCHECK([bzip2 freetype libpng zlib],...
-because those dependencies wind up linked into shared libraries like,
-
-  /usr/.../PIL/_imagingft.cpython-39-x86_64-linux-gnu.so
-
-and potentially conflict with their SPKG counterparts.
----
- build/pkgs/pillow/spkg-configure.m4 | 5 +++++
- 1 file changed, 5 insertions(+)
- create mode 100644 build/pkgs/pillow/spkg-configure.m4
-
-diff --git a/build/pkgs/pillow/spkg-configure.m4 b/build/pkgs/pillow/spkg-configure.m4
-new file mode 100644
-index 00000000..f2e68e2
---- /dev/null
-+++ b/build/pkgs/pillow/spkg-configure.m4
-@@ -0,0 +1,5 @@
-+SAGE_SPKG_CONFIGURE([pillow], [
-+  SAGE_SPKG_DEPCHECK([bzip2 freetype libpng zlib], [
-+    SAGE_PYTHON_PACKAGE_CHECK([pillow])
-+  ])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From eede914311481fdb75b363b7a799075e876a2b4f Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 11 Oct 2021 20:44:13 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for mpmath.
-
----
- build/pkgs/mpmath/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/mpmath/spkg-configure.m4
-
-diff --git a/build/pkgs/mpmath/spkg-configure.m4 b/build/pkgs/mpmath/spkg-configure.m4
-new file mode 100644
-index 00000000..f43c838
---- /dev/null
-+++ b/build/pkgs/mpmath/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([mpmath], [SAGE_PYTHON_PACKAGE_CHECK([mpmath])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 363a825885832c0b580ff53fe61f5c79e70c4728 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 11 Oct 2021 20:44:56 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for sympy.
-
----
- build/pkgs/sympy/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/sympy/spkg-configure.m4
-
-diff --git a/build/pkgs/sympy/spkg-configure.m4 b/build/pkgs/sympy/spkg-configure.m4
-new file mode 100644
-index 00000000..fa0f1f5
---- /dev/null
-+++ b/build/pkgs/sympy/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([sympy], [SAGE_PYTHON_PACKAGE_CHECK([sympy])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 0667964c914e4a01dda697190a054ff96cea92d6 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 11 Oct 2021 20:47:06 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for pygments.
-
----
- build/pkgs/pygments/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pygments/spkg-configure.m4
-
-diff --git a/build/pkgs/pygments/spkg-configure.m4 b/build/pkgs/pygments/spkg-configure.m4
-new file mode 100644
-index 00000000..99f29e3
---- /dev/null
-+++ b/build/pkgs/pygments/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([pygments], [SAGE_PYTHON_PACKAGE_CHECK([pygments])])
--- 
-cgit v1.0-1-gd88e
-
-
-From f787c233aa05d8e90f7c6ad18f76bd2fa36bfbfb Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 11 Oct 2021 20:48:50 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for jinja2.
-
----
- build/pkgs/jinja2/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/jinja2/spkg-configure.m4
-
-diff --git a/build/pkgs/jinja2/spkg-configure.m4 b/build/pkgs/jinja2/spkg-configure.m4
-new file mode 100644
-index 00000000..0970d1c
---- /dev/null
-+++ b/build/pkgs/jinja2/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([jinja2], [SAGE_PYTHON_PACKAGE_CHECK([jinja2])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 309d8f8e2b7078b5efbbe824b69ec1d9b1e639f0 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Tue, 12 Oct 2021 08:43:24 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for pandocfilters.
-
----
- build/pkgs/pandocfilters/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/pandocfilters/spkg-configure.m4
-
-diff --git a/build/pkgs/pandocfilters/spkg-configure.m4 b/build/pkgs/pandocfilters/spkg-configure.m4
-new file mode 100644
-index 00000000..3e9537f
---- /dev/null
-+++ b/build/pkgs/pandocfilters/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([pandocfilters], [
-+  SAGE_PYTHON_PACKAGE_CHECK([pandocfilters])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From f57bfda49777a6ba1cd123553acd75dc347c5521 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Tue, 12 Oct 2021 08:44:46 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for webencodings.
-
----
- build/pkgs/webencodings/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/webencodings/spkg-configure.m4
-
-diff --git a/build/pkgs/webencodings/spkg-configure.m4 b/build/pkgs/webencodings/spkg-configure.m4
-new file mode 100644
-index 00000000..1b9a5c4
---- /dev/null
-+++ b/build/pkgs/webencodings/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([webencodings], [
-+  SAGE_PYTHON_PACKAGE_CHECK([webencodings])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From 7f193a62d7a2ea0b6a3ca6beb12390d91c25bbfb Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Tue, 12 Oct 2021 08:48:26 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for pytz.
-
----
- build/pkgs/pytz/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pytz/spkg-configure.m4
-
-diff --git a/build/pkgs/pytz/spkg-configure.m4 b/build/pkgs/pytz/spkg-configure.m4
-new file mode 100644
-index 00000000..366521b
---- /dev/null
-+++ b/build/pkgs/pytz/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([pytz], [SAGE_PYTHON_PACKAGE_CHECK([pytz])])
--- 
-cgit v1.0-1-gd88e
-
-
-From bfd3fdd887c3465c03465248de4997eed4a82915 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Tue, 12 Oct 2021 08:51:16 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for texttable.
-
----
- build/pkgs/texttable/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/texttable/spkg-configure.m4
-
-diff --git a/build/pkgs/texttable/spkg-configure.m4 b/build/pkgs/texttable/spkg-configure.m4
-new file mode 100644
-index 00000000..42a3de1
---- /dev/null
-+++ b/build/pkgs/texttable/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([texttable], [SAGE_PYTHON_PACKAGE_CHECK([texttable])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 914bf0cc57abc46129b27c1525782dbe16da31a2 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Tue, 12 Oct 2021 08:53:41 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for babel.
-
----
- build/pkgs/babel/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/babel/spkg-configure.m4
-
-diff --git a/build/pkgs/babel/spkg-configure.m4 b/build/pkgs/babel/spkg-configure.m4
-new file mode 100644
-index 00000000..d7b9a71
---- /dev/null
-+++ b/build/pkgs/babel/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([babel], [SAGE_PYTHON_PACKAGE_CHECK([babel])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 56977abd1eafbc87c765a2892cfe525382648259 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 14 Oct 2021 08:06:59 -0400
-Subject: Trac #29665: force system python3 with --enable-system-site-packages.
-
-When the python SPKG is used, the --enable-system-site-packages flag
-will essentially do nothing, and that may confuse users who have
-wasted a few hours building sage. (Generally, they will want to fix
-detection of their system python3 first.)
-
-To forestall that, we now set "--with-system-python3=force" whenever
-the "--enable-system-site-packages" flag is passed.
----
- configure.ac | 11 ++++++++++-
- 1 file changed, 10 insertions(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index db30a91..6fafb83 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -438,10 +438,19 @@ AC_ARG_ENABLE([download-from-upstream-url],
- AC_ARG_ENABLE(
-   [system-site-packages], [AS_HELP_STRING(
-     [--enable-system-site-packages],
--    [allow sage to use python packages from the system (experimental; default: no)]
-+    [allow the use of python packages from the system (experimental; default: no)]
-   )], [
-   AS_IF([test "x$enable_system_site_packages" = "xyes"], [
-     SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
-+
-+    dnl We want to raise an error if the user asked for "system site
-+    dnl packages" but the system python will not be used. Technically
-+    dnl that causes no problems (SAGE_PYTHON_PACKAGE_CHECK always fails,
-+    dnl so SPKGs are used for all python packages), but it may be confusing
-+    dnl to end users who expect the flag to actually give them access to
-+    dnl their system python packages and who may not be paying close
-+    dnl attention to their ./configure output.
-+    with_system_python3="force"
-   ])
- ])
- AC_SUBST([SAGE_VENV_FLAGS])
--- 
-cgit v1.0-1-gd88e
-
-
-From 02b369fd24ef7cf8997082e7850b9cf022cae34b Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Fri, 15 Oct 2021 01:18:35 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for setuptools.
-
----
- build/pkgs/setuptools/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/setuptools/spkg-configure.m4
-
-diff --git a/build/pkgs/setuptools/spkg-configure.m4 b/build/pkgs/setuptools/spkg-configure.m4
-new file mode 100644
-index 00000000..a2ad811
---- /dev/null
-+++ b/build/pkgs/setuptools/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([setuptools], [SAGE_PYTHON_PACKAGE_CHECK([setuptools])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 05117317d38693978efaf36e81d8b02bae44b257 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Fri, 15 Oct 2021 01:15:48 -0400
-Subject: Trac #29665: poison PYTHONUSERBASE when testing for "system"
- packages.
-
-When we're detecting system installations of python packages, we want
-to hide anything that was installed with e.g. "pip install --user". To
-accomplish that, we mimic the PYTHONUSERBASE poisoning from sage-env
-within the SAGE_PYTHON_PACKAGE_CHECK() macro.
----
- m4/sage_python_package_check.m4 | 18 +++++++++++++++++-
- 1 file changed, 17 insertions(+), 1 deletion(-)
-
-diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
-index 77b0a0c..b8cdba4 100644
---- a/m4/sage_python_package_check.m4
-+++ b/m4/sage_python_package_check.m4
-@@ -38,11 +38,27 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
-     dnl package.
-     SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
-     AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
-+
-+    dnl To prevent user-site (pip install --user) packages from being
-+    dnl detected as "system" packages, we poison PYTHONUSERBASE. The
-+    dnl sage-env script also does this at runtime; we mimic that
-+    dnl implementation to ensure that the behaviors at ./configure and
-+    dnl runtime are identical. Beware that (as in sage-env) the poisoning
-+    dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
-+    dnl user points PYTHONUSERBASE to any path (even the default), then
-+    dnl his local pip packages will be detected.
-+    PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
-+    AS_IF([test -z "${PYTHONUSERBASE}"], [
-+      PYTHONUSERBASE="${HOME}/.sage/local"
-+    ])
-+
-     AS_IF(
--      ["${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())"],
-+      [PYTHONUSERBASE="${PYTHONUSERBASE}" "${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" 2>/dev/null],
-       [AC_MSG_RESULT(yes)],
-       [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
-     )
-+
-+    PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
-   ], [
-     sage_spkg_install_$1=yes
-   ])
--- 
-cgit v1.0-1-gd88e
-
-
-From d75c1492f63a584b5ec5f424ddd7f7c4a6d502d3 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Fri, 15 Oct 2021 11:20:04 -0400
-Subject: Trac #29665: run SAGE_PYTHON_PACKAGE_CHECK() inside a venv.
-
-To recreate the runtime environment as closely as possible, we now use
-a venv (with system site packages enabled) when checking for system
-copies of python packages.
----
- m4/sage_python_package_check.m4 | 76 +++++++++++++++++++++++++++--------------
- 1 file changed, 51 insertions(+), 25 deletions(-)
-
-diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
-index b8cdba4..7cbd6c0 100644
---- a/m4/sage_python_package_check.m4
-+++ b/m4/sage_python_package_check.m4
-@@ -15,9 +15,11 @@
- #
- #     2. If we are not using the system python (no $PYTHON_FOR_VENV),
- #
--#     3. If setuptools is not available to the system python,
-+#     3. If we are unable to create a venv with the system python,
- #
--#     4. If the contents of install-requires.txt are not met (wrong
-+#     4. If setuptools is not available to the system python,
-+#
-+#     5. If the contents of install-requires.txt are not met (wrong
- #        version, no version, etc.) by the system python.
- #
- #   In any of those cases, we set sage_spkg_install_$package to "yes"
-@@ -27,38 +29,62 @@
- #
- #   The SAGE_SPKG_CONFIGURE_PYTHON3() macro is AC_REQUIRE'd to ensure
- #   that $PYTHON_FOR_VENV is available, if it is going to be available.
-+#   The check is run inside a new venv, and with the PYTHONUSERBASE
-+#   variable poisoned in the same manner as sage-env poisons it, to
-+#   ensure that the ./configure- and run-time views of the system
-+#   are as similar as possible.
- #
- 
- AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
-   AS_IF([test "${enable_system_site_packages}" = "yes"], [
-     AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
- 
--    dnl strip all comments from install-requires.txt; this should leave
--    dnl only a single line containing the version specification for this
--    dnl package.
--    SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
--    AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
-+    dnl We run this check inside a python venv, because that's ultimately
-+    dnl how the system $PYTHON_FOR_VENV will be used.
-+    AC_MSG_CHECKING([if we can create a python venv in config.venv])
- 
--    dnl To prevent user-site (pip install --user) packages from being
--    dnl detected as "system" packages, we poison PYTHONUSERBASE. The
--    dnl sage-env script also does this at runtime; we mimic that
--    dnl implementation to ensure that the behaviors at ./configure and
--    dnl runtime are identical. Beware that (as in sage-env) the poisoning
--    dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
--    dnl user points PYTHONUSERBASE to any path (even the default), then
--    dnl his local pip packages will be detected.
--    PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
--    AS_IF([test -z "${PYTHONUSERBASE}"], [
--      PYTHONUSERBASE="${HOME}/.sage/local"
--    ])
-+    dnl Use --clear because ./configure typically clobbers its output files.
-+    AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
-+                                        --clear                dnl
-+                                        --without-pip          dnl
-+					config.venv], [
-+      AC_MSG_RESULT(yes)
-+      dnl strip all comments from install-requires.txt; this should leave
-+      dnl only a single line containing the version specification for this
-+      dnl package.
-+      SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
-+      AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
-+
-+      dnl To prevent user-site (pip install --user) packages from being
-+      dnl detected as "system" packages, we poison PYTHONUSERBASE. The
-+      dnl sage-env script also does this at runtime; we mimic that
-+      dnl implementation to ensure that the behaviors at ./configure and
-+      dnl runtime are identical. Beware that (as in sage-env) the poisoning
-+      dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
-+      dnl user points PYTHONUSERBASE to any path (even the default), then
-+      dnl his local pip packages will be detected.
-+      PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
-+      AS_IF([test -z "${PYTHONUSERBASE}"], [
-+        PYTHONUSERBASE="${HOME}/.sage/local"
-+      ])
- 
--    AS_IF(
--      [PYTHONUSERBASE="${PYTHONUSERBASE}" "${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" 2>/dev/null],
--      [AC_MSG_RESULT(yes)],
--      [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
--    )
-+      AS_IF(
-+        [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
-+           "from setuptools.version import pkg_resources;              dnl
-+            pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" dnl
-+	 2>/dev/null],
-+        [AC_MSG_RESULT(yes)],
-+        [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
-+      )
-+
-+      PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
-+    ], [
-+      dnl failed to create a venv for some reason
-+      AC_MSG_RESULT(no)
-+      sage_spkg_install_$1=yes
-+    ])
- 
--    PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
-+    rm -rf config.venv
-   ], [
-     sage_spkg_install_$1=yes
-   ])
--- 
-cgit v1.0-1-gd88e
-
-
-From 87646c3264a04ffd98a12d67074f93e1943a1e96 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Fri, 15 Oct 2021 11:38:08 -0400
-Subject: Trac #29665: log SAGE_PYTHON_PACKAGE_CHECK() failures to config.log.
-
----
- m4/sage_python_package_check.m4 | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
-index 7cbd6c0..e0e0b9f 100644
---- a/m4/sage_python_package_check.m4
-+++ b/m4/sage_python_package_check.m4
-@@ -47,7 +47,8 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
-     AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
-                                         --clear                dnl
-                                         --without-pip          dnl
--					config.venv], [
-+                                        config.venv            dnl
-+                                        2>&AS_MESSAGE_LOG_FD], [
-       AC_MSG_RESULT(yes)
-       dnl strip all comments from install-requires.txt; this should leave
-       dnl only a single line containing the version specification for this
-@@ -72,7 +73,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
-         [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
-            "from setuptools.version import pkg_resources;              dnl
-             pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" dnl
--	 2>/dev/null],
-+	 2>&AS_MESSAGE_LOG_FD],
-         [AC_MSG_RESULT(yes)],
-         [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
-       )
--- 
-cgit v1.0-1-gd88e
-
-
-From f7dfffd1c64816e2ae4e0f420b22065c5c5bf2cb Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Fri, 15 Oct 2021 11:45:37 -0400
-Subject: Trac #29665: don't clobber a plain file named config.venv.
-
-When SAGE_PYTHON_PACKAGE_CHECK() is cleaning up, we no longer remove
-"config.venv" unconditionally. Instead, we remove it only if it is a
-directory. This is also how "pyvenv --clear" works.
----
- m4/sage_python_package_check.m4 | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
-index e0e0b9f..127a078 100644
---- a/m4/sage_python_package_check.m4
-+++ b/m4/sage_python_package_check.m4
-@@ -85,7 +85,9 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
-       sage_spkg_install_$1=yes
-     ])
- 
--    rm -rf config.venv
-+    dnl Clean up config.venv, but only if we could have created it.
-+    dnl (The --clear flag to pyvenv will not clobber a plain file.)
-+    AS_IF([test -d config.venv], [rm -rf config.venv])
-   ], [
-     sage_spkg_install_$1=yes
-   ])
--- 
-cgit v1.0-1-gd88e
-
-
-From 9849c77313b895dcfb786d2ea54e36585bd31ce2 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Sat, 16 Oct 2021 08:14:42 -0400
-Subject: Trac #29665: don't announce system python packages that won't be
- used.
-
-When --enable-system-site-packages was not given, the python packages
-using SAGE_PYTHON_PACKAGE_CHECK() in spkg-configure.m4 cannot be used.
-Rather than suggest that users install them anyway, that macro now
-hacks the value of sage_use_system_$package to be "no" when the use
-of system site packages is disabled at the python level.
----
- m4/sage_python_package_check.m4 | 17 +++++++++++++++++
- 1 file changed, 17 insertions(+)
-
-diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
-index 127a078..7ee82a7 100644
---- a/m4/sage_python_package_check.m4
-+++ b/m4/sage_python_package_check.m4
-@@ -89,6 +89,23 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
-     dnl (The --clear flag to pyvenv will not clobber a plain file.)
-     AS_IF([test -d config.venv], [rm -rf config.venv])
-   ], [
-+    dnl System site packages are disabled.
-     sage_spkg_install_$1=yes
-+
-+    dnl We have to retroactively hack the --with-system-foo={no,yes,force}
-+    dnl mechanism here because it wasn't designed with the ability to
-+    dnl disable arbitrary chunks of system packages in mind. The easy cases
-+    dnl are "no" and "force" which require no action; "no" means we won't
-+    dnl suggest the package anyway, and "force" will raise an error when
-+    dnl the system-package check fails.
-+    dnl
-+    dnl The default of "yes" is more troubling because it is the default. To
-+    dnl avoid prompting users to install packages that won't be used, we want
-+    dnl to ignore "yes" when reporting the "hint: install these packages..."
-+    dnl at the end of ./configure. To accomplish that, we change "yes" to
-+    dnl "no" here, essentially changing the default for packages using this
-+    dnl macro when --enable-system-site-packages is disabled. Packages with
-+    dnl "no" are not suggested to the user.
-+    AS_IF([test "${sage_use_system_$1}" = "yes"],[sage_use_system_$1=no])
-   ])
- ])
--- 
-cgit v1.0-1-gd88e
-
-
-From 3e6ad737b94aaac234d615ecaf1a2455eb607f1a Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Sun, 17 Oct 2021 06:16:21 -0400
-Subject: Trac #29665: add Gentoo package information for python packages.
-
----
- build/pkgs/babel/distros/gentoo.txt         | 1 +
- build/pkgs/bleach/distros/gentoo.txt        | 1 +
- build/pkgs/certifi/distros/gentoo.txt       | 1 +
- build/pkgs/cvxopt/distros/gentoo.txt        | 1 +
- build/pkgs/decorator/distros/gentoo.txt     | 1 +
- build/pkgs/html5lib/distros/gentoo.txt      | 1 +
- build/pkgs/idna/distros/gentoo.txt          | 1 +
- build/pkgs/jinja2/distros/gentoo.txt        | 1 +
- build/pkgs/matplotlib/distros/gentoo.txt    | 1 +
- build/pkgs/mpmath/distros/gentoo.txt        | 1 +
- build/pkgs/networkx/distros/gentoo.txt      | 1 +
- build/pkgs/numpy/distros/gentoo.txt         | 1 +
- build/pkgs/packaging/distros/gentoo.txt     | 1 +
- build/pkgs/pandocfilters/distros/gentoo.txt | 1 +
- build/pkgs/pickleshare/distros/gentoo.txt   | 1 +
- build/pkgs/pillow/distros/gentoo.txt        | 1 +
- build/pkgs/pluggy/distros/gentoo.txt        | 1 +
- build/pkgs/pygments/distros/gentoo.txt      | 1 +
- build/pkgs/pytz/distros/gentoo.txt          | 1 +
- build/pkgs/pyzmq/distros/gentoo.txt         | 1 +
- build/pkgs/requests/distros/gentoo.txt      | 1 +
- build/pkgs/scipy/distros/gentoo.txt         | 1 +
- build/pkgs/setuptools/distros/gentoo.txt    | 1 +
- build/pkgs/six/distros/gentoo.txt           | 1 +
- build/pkgs/sympy/distros/gentoo.txt         | 1 +
- build/pkgs/texttable/distros/gentoo.txt     | 1 +
- build/pkgs/toml/distros/gentoo.txt          | 1 +
- build/pkgs/webencodings/distros/gentoo.txt  | 1 +
- 28 files changed, 28 insertions(+)
- create mode 100644 build/pkgs/babel/distros/gentoo.txt
- create mode 100644 build/pkgs/bleach/distros/gentoo.txt
- create mode 100644 build/pkgs/certifi/distros/gentoo.txt
- create mode 100644 build/pkgs/cvxopt/distros/gentoo.txt
- create mode 100644 build/pkgs/decorator/distros/gentoo.txt
- create mode 100644 build/pkgs/html5lib/distros/gentoo.txt
- create mode 100644 build/pkgs/idna/distros/gentoo.txt
- create mode 100644 build/pkgs/jinja2/distros/gentoo.txt
- create mode 100644 build/pkgs/matplotlib/distros/gentoo.txt
- create mode 100644 build/pkgs/mpmath/distros/gentoo.txt
- create mode 100644 build/pkgs/networkx/distros/gentoo.txt
- create mode 100644 build/pkgs/numpy/distros/gentoo.txt
- create mode 100644 build/pkgs/packaging/distros/gentoo.txt
- create mode 100644 build/pkgs/pandocfilters/distros/gentoo.txt
- create mode 100644 build/pkgs/pickleshare/distros/gentoo.txt
- create mode 100644 build/pkgs/pillow/distros/gentoo.txt
- create mode 100644 build/pkgs/pluggy/distros/gentoo.txt
- create mode 100644 build/pkgs/pygments/distros/gentoo.txt
- create mode 100644 build/pkgs/pytz/distros/gentoo.txt
- create mode 100644 build/pkgs/pyzmq/distros/gentoo.txt
- create mode 100644 build/pkgs/requests/distros/gentoo.txt
- create mode 100644 build/pkgs/scipy/distros/gentoo.txt
- create mode 100644 build/pkgs/setuptools/distros/gentoo.txt
- create mode 100644 build/pkgs/six/distros/gentoo.txt
- create mode 100644 build/pkgs/sympy/distros/gentoo.txt
- create mode 100644 build/pkgs/texttable/distros/gentoo.txt
- create mode 100644 build/pkgs/toml/distros/gentoo.txt
- create mode 100644 build/pkgs/webencodings/distros/gentoo.txt
-
-diff --git a/build/pkgs/babel/distros/gentoo.txt b/build/pkgs/babel/distros/gentoo.txt
-new file mode 100644
-index 00000000..2d2c34f
---- /dev/null
-+++ b/build/pkgs/babel/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/Babel
-diff --git a/build/pkgs/bleach/distros/gentoo.txt b/build/pkgs/bleach/distros/gentoo.txt
-new file mode 100644
-index 00000000..b4f9744
---- /dev/null
-+++ b/build/pkgs/bleach/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/bleach
-diff --git a/build/pkgs/certifi/distros/gentoo.txt b/build/pkgs/certifi/distros/gentoo.txt
-new file mode 100644
-index 00000000..72e2e91
---- /dev/null
-+++ b/build/pkgs/certifi/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/certifi
-diff --git a/build/pkgs/cvxopt/distros/gentoo.txt b/build/pkgs/cvxopt/distros/gentoo.txt
-new file mode 100644
-index 00000000..b312391
---- /dev/null
-+++ b/build/pkgs/cvxopt/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/cvxopt
-diff --git a/build/pkgs/decorator/distros/gentoo.txt b/build/pkgs/decorator/distros/gentoo.txt
-new file mode 100644
-index 00000000..fea5a67
---- /dev/null
-+++ b/build/pkgs/decorator/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/decorator
-diff --git a/build/pkgs/html5lib/distros/gentoo.txt b/build/pkgs/html5lib/distros/gentoo.txt
-new file mode 100644
-index 00000000..6c2be76
---- /dev/null
-+++ b/build/pkgs/html5lib/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/html5lib
-diff --git a/build/pkgs/idna/distros/gentoo.txt b/build/pkgs/idna/distros/gentoo.txt
-new file mode 100644
-index 00000000..68ef51c
---- /dev/null
-+++ b/build/pkgs/idna/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/idna
-diff --git a/build/pkgs/jinja2/distros/gentoo.txt b/build/pkgs/jinja2/distros/gentoo.txt
-new file mode 100644
-index 00000000..15a27ae
---- /dev/null
-+++ b/build/pkgs/jinja2/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/jinja
-diff --git a/build/pkgs/matplotlib/distros/gentoo.txt b/build/pkgs/matplotlib/distros/gentoo.txt
-new file mode 100644
-index 00000000..bcfefb5
---- /dev/null
-+++ b/build/pkgs/matplotlib/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/matplotlib
-diff --git a/build/pkgs/mpmath/distros/gentoo.txt b/build/pkgs/mpmath/distros/gentoo.txt
-new file mode 100644
-index 00000000..946c62d
---- /dev/null
-+++ b/build/pkgs/mpmath/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/mpmath
-diff --git a/build/pkgs/networkx/distros/gentoo.txt b/build/pkgs/networkx/distros/gentoo.txt
-new file mode 100644
-index 00000000..dd97742
---- /dev/null
-+++ b/build/pkgs/networkx/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/networkx
-diff --git a/build/pkgs/numpy/distros/gentoo.txt b/build/pkgs/numpy/distros/gentoo.txt
-new file mode 100644
-index 00000000..d2179d4
---- /dev/null
-+++ b/build/pkgs/numpy/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/numpy
-diff --git a/build/pkgs/packaging/distros/gentoo.txt b/build/pkgs/packaging/distros/gentoo.txt
-new file mode 100644
-index 00000000..e5309ed
---- /dev/null
-+++ b/build/pkgs/packaging/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/packaging
-diff --git a/build/pkgs/pandocfilters/distros/gentoo.txt b/build/pkgs/pandocfilters/distros/gentoo.txt
-new file mode 100644
-index 00000000..a726fda
---- /dev/null
-+++ b/build/pkgs/pandocfilters/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/pandocfilters
-diff --git a/build/pkgs/pickleshare/distros/gentoo.txt b/build/pkgs/pickleshare/distros/gentoo.txt
-new file mode 100644
-index 00000000..14fad0f
---- /dev/null
-+++ b/build/pkgs/pickleshare/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/pickleshare
-diff --git a/build/pkgs/pillow/distros/gentoo.txt b/build/pkgs/pillow/distros/gentoo.txt
-new file mode 100644
-index 00000000..1243649
---- /dev/null
-+++ b/build/pkgs/pillow/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/pillow
-diff --git a/build/pkgs/pluggy/distros/gentoo.txt b/build/pkgs/pluggy/distros/gentoo.txt
-new file mode 100644
-index 00000000..7b33876
---- /dev/null
-+++ b/build/pkgs/pluggy/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/pluggy
-diff --git a/build/pkgs/pygments/distros/gentoo.txt b/build/pkgs/pygments/distros/gentoo.txt
-new file mode 100644
-index 00000000..a584f32
---- /dev/null
-+++ b/build/pkgs/pygments/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/pygments
-diff --git a/build/pkgs/pytz/distros/gentoo.txt b/build/pkgs/pytz/distros/gentoo.txt
-new file mode 100644
-index 00000000..902a18b
---- /dev/null
-+++ b/build/pkgs/pytz/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/pytz
-diff --git a/build/pkgs/pyzmq/distros/gentoo.txt b/build/pkgs/pyzmq/distros/gentoo.txt
-new file mode 100644
-index 00000000..77c2429
---- /dev/null
-+++ b/build/pkgs/pyzmq/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/pyzmq
-diff --git a/build/pkgs/requests/distros/gentoo.txt b/build/pkgs/requests/distros/gentoo.txt
-new file mode 100644
-index 00000000..d3dc941
---- /dev/null
-+++ b/build/pkgs/requests/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/requests
-diff --git a/build/pkgs/scipy/distros/gentoo.txt b/build/pkgs/scipy/distros/gentoo.txt
-new file mode 100644
-index 00000000..11dabd2
---- /dev/null
-+++ b/build/pkgs/scipy/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/scipy
-diff --git a/build/pkgs/setuptools/distros/gentoo.txt b/build/pkgs/setuptools/distros/gentoo.txt
-new file mode 100644
-index 00000000..3a4fa34
---- /dev/null
-+++ b/build/pkgs/setuptools/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/setuptools
-diff --git a/build/pkgs/six/distros/gentoo.txt b/build/pkgs/six/distros/gentoo.txt
-new file mode 100644
-index 00000000..f73f648
---- /dev/null
-+++ b/build/pkgs/six/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/six
-diff --git a/build/pkgs/sympy/distros/gentoo.txt b/build/pkgs/sympy/distros/gentoo.txt
-new file mode 100644
-index 00000000..b5a5034
---- /dev/null
-+++ b/build/pkgs/sympy/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/sympy
-diff --git a/build/pkgs/texttable/distros/gentoo.txt b/build/pkgs/texttable/distros/gentoo.txt
-new file mode 100644
-index 00000000..b33a7a7
---- /dev/null
-+++ b/build/pkgs/texttable/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/texttable
-diff --git a/build/pkgs/toml/distros/gentoo.txt b/build/pkgs/toml/distros/gentoo.txt
-new file mode 100644
-index 00000000..64fcea3
---- /dev/null
-+++ b/build/pkgs/toml/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/toml
-diff --git a/build/pkgs/webencodings/distros/gentoo.txt b/build/pkgs/webencodings/distros/gentoo.txt
-new file mode 100644
-index 00000000..7539b0f
---- /dev/null
-+++ b/build/pkgs/webencodings/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/webencodings
--- 
-cgit v1.0-1-gd88e
-
-
-From 088380f884124c9608160b613ba031c5f023f604 Mon Sep 17 00:00:00 2001
-From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
-Date: Sun, 17 Oct 2021 18:43:04 -0700
-Subject: build/pkgs: Add distros/fedora.txt for Python packages
-
----
- build/pkgs/babel/distros/fedora.txt         | 1 +
- build/pkgs/bleach/distros/fedora.txt        | 1 +
- build/pkgs/certifi/distros/fedora.txt       | 1 +
- build/pkgs/cvxopt/distros/fedora.txt        | 1 +
- build/pkgs/decorator/distros/fedora.txt     | 1 +
- build/pkgs/html5lib/distros/fedora.txt      | 1 +
- build/pkgs/idna/distros/fedora.txt          | 1 +
- build/pkgs/jinja2/distros/fedora.txt        | 1 +
- build/pkgs/matplotlib/distros/fedora.txt    | 1 +
- build/pkgs/mpmath/distros/fedora.txt        | 1 +
- build/pkgs/networkx/distros/fedora.txt      | 1 +
- build/pkgs/numpy/distros/fedora.txt         | 1 +
- build/pkgs/packaging/distros/fedora.txt     | 1 +
- build/pkgs/pandocfilters/distros/fedora.txt | 1 +
- build/pkgs/pickleshare/distros/fedora.txt   | 1 +
- build/pkgs/pillow/distros/fedora.txt        | 1 +
- build/pkgs/pluggy/distros/fedora.txt        | 1 +
- build/pkgs/py/distros/fedora.txt            | 1 +
- build/pkgs/pygments/distros/fedora.txt      | 1 +
- build/pkgs/pytz/distros/fedora.txt          | 1 +
- build/pkgs/pyzmq/distros/fedora.txt         | 1 +
- build/pkgs/requests/distros/fedora.txt      | 1 +
- build/pkgs/scipy/distros/fedora.txt         | 1 +
- build/pkgs/setuptools/distros/fedora.txt    | 1 +
- build/pkgs/six/distros/fedora.txt           | 1 +
- build/pkgs/sympy/distros/fedora.txt         | 1 +
- build/pkgs/texttable/distros/fedora.txt     | 1 +
- build/pkgs/toml/distros/fedora.txt          | 1 +
- build/pkgs/webencodings/distros/fedora.txt  | 1 +
- build/pkgs/wheel/distros/fedora.txt         | 1 +
- 30 files changed, 30 insertions(+)
- create mode 100644 build/pkgs/babel/distros/fedora.txt
- create mode 100644 build/pkgs/bleach/distros/fedora.txt
- create mode 100644 build/pkgs/certifi/distros/fedora.txt
- create mode 100644 build/pkgs/cvxopt/distros/fedora.txt
- create mode 100644 build/pkgs/decorator/distros/fedora.txt
- create mode 100644 build/pkgs/html5lib/distros/fedora.txt
- create mode 100644 build/pkgs/idna/distros/fedora.txt
- create mode 100644 build/pkgs/jinja2/distros/fedora.txt
- create mode 100644 build/pkgs/matplotlib/distros/fedora.txt
- create mode 100644 build/pkgs/mpmath/distros/fedora.txt
- create mode 100644 build/pkgs/networkx/distros/fedora.txt
- create mode 100644 build/pkgs/numpy/distros/fedora.txt
- create mode 100644 build/pkgs/packaging/distros/fedora.txt
- create mode 100644 build/pkgs/pandocfilters/distros/fedora.txt
- create mode 100644 build/pkgs/pickleshare/distros/fedora.txt
- create mode 100644 build/pkgs/pillow/distros/fedora.txt
- create mode 100644 build/pkgs/pluggy/distros/fedora.txt
- create mode 100644 build/pkgs/py/distros/fedora.txt
- create mode 100644 build/pkgs/pygments/distros/fedora.txt
- create mode 100644 build/pkgs/pytz/distros/fedora.txt
- create mode 100644 build/pkgs/pyzmq/distros/fedora.txt
- create mode 100644 build/pkgs/requests/distros/fedora.txt
- create mode 100644 build/pkgs/scipy/distros/fedora.txt
- create mode 100644 build/pkgs/setuptools/distros/fedora.txt
- create mode 100644 build/pkgs/six/distros/fedora.txt
- create mode 100644 build/pkgs/sympy/distros/fedora.txt
- create mode 100644 build/pkgs/texttable/distros/fedora.txt
- create mode 100644 build/pkgs/toml/distros/fedora.txt
- create mode 100644 build/pkgs/webencodings/distros/fedora.txt
- create mode 100644 build/pkgs/wheel/distros/fedora.txt
-
-diff --git a/build/pkgs/babel/distros/fedora.txt b/build/pkgs/babel/distros/fedora.txt
-new file mode 100644
-index 00000000..98f6593
---- /dev/null
-+++ b/build/pkgs/babel/distros/fedora.txt
-@@ -0,0 +1 @@
-+babel
-diff --git a/build/pkgs/bleach/distros/fedora.txt b/build/pkgs/bleach/distros/fedora.txt
-new file mode 100644
-index 00000000..c5422cc
---- /dev/null
-+++ b/build/pkgs/bleach/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-bleach
-diff --git a/build/pkgs/certifi/distros/fedora.txt b/build/pkgs/certifi/distros/fedora.txt
-new file mode 100644
-index 00000000..be421c8
---- /dev/null
-+++ b/build/pkgs/certifi/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-certifi
-diff --git a/build/pkgs/cvxopt/distros/fedora.txt b/build/pkgs/cvxopt/distros/fedora.txt
-new file mode 100644
-index 00000000..f15770f
---- /dev/null
-+++ b/build/pkgs/cvxopt/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-cvxopt
-diff --git a/build/pkgs/decorator/distros/fedora.txt b/build/pkgs/decorator/distros/fedora.txt
-new file mode 100644
-index 00000000..0795604
---- /dev/null
-+++ b/build/pkgs/decorator/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-decorator
-diff --git a/build/pkgs/html5lib/distros/fedora.txt b/build/pkgs/html5lib/distros/fedora.txt
-new file mode 100644
-index 00000000..b821491
---- /dev/null
-+++ b/build/pkgs/html5lib/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-html5lib
-diff --git a/build/pkgs/idna/distros/fedora.txt b/build/pkgs/idna/distros/fedora.txt
-new file mode 100644
-index 00000000..a73e70c
---- /dev/null
-+++ b/build/pkgs/idna/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-idna
-diff --git a/build/pkgs/jinja2/distros/fedora.txt b/build/pkgs/jinja2/distros/fedora.txt
-new file mode 100644
-index 00000000..f5f3caf
---- /dev/null
-+++ b/build/pkgs/jinja2/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-jinja2
-diff --git a/build/pkgs/matplotlib/distros/fedora.txt b/build/pkgs/matplotlib/distros/fedora.txt
-new file mode 100644
-index 00000000..f6d856e
---- /dev/null
-+++ b/build/pkgs/matplotlib/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-matplotlib
-diff --git a/build/pkgs/mpmath/distros/fedora.txt b/build/pkgs/mpmath/distros/fedora.txt
-new file mode 100644
-index 00000000..a7dc8d5
---- /dev/null
-+++ b/build/pkgs/mpmath/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-mpmath
-diff --git a/build/pkgs/networkx/distros/fedora.txt b/build/pkgs/networkx/distros/fedora.txt
-new file mode 100644
-index 00000000..293f943
---- /dev/null
-+++ b/build/pkgs/networkx/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-networkx
-diff --git a/build/pkgs/numpy/distros/fedora.txt b/build/pkgs/numpy/distros/fedora.txt
-new file mode 100644
-index 00000000..c8722b9
---- /dev/null
-+++ b/build/pkgs/numpy/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-numpy
-diff --git a/build/pkgs/packaging/distros/fedora.txt b/build/pkgs/packaging/distros/fedora.txt
-new file mode 100644
-index 00000000..02ad855
---- /dev/null
-+++ b/build/pkgs/packaging/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-packaging
-diff --git a/build/pkgs/pandocfilters/distros/fedora.txt b/build/pkgs/pandocfilters/distros/fedora.txt
-new file mode 100644
-index 00000000..e7a86d0
---- /dev/null
-+++ b/build/pkgs/pandocfilters/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-pandocfilters
-diff --git a/build/pkgs/pickleshare/distros/fedora.txt b/build/pkgs/pickleshare/distros/fedora.txt
-new file mode 100644
-index 00000000..6d991a2
---- /dev/null
-+++ b/build/pkgs/pickleshare/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-pickleshare
-diff --git a/build/pkgs/pillow/distros/fedora.txt b/build/pkgs/pillow/distros/fedora.txt
-new file mode 100644
-index 00000000..86dbb1d
---- /dev/null
-+++ b/build/pkgs/pillow/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-pillow
-diff --git a/build/pkgs/pluggy/distros/fedora.txt b/build/pkgs/pluggy/distros/fedora.txt
-new file mode 100644
-index 00000000..c869e54
---- /dev/null
-+++ b/build/pkgs/pluggy/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-pluggy
-diff --git a/build/pkgs/py/distros/fedora.txt b/build/pkgs/py/distros/fedora.txt
-new file mode 100644
-index 00000000..b348d39
---- /dev/null
-+++ b/build/pkgs/py/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-py
-diff --git a/build/pkgs/pygments/distros/fedora.txt b/build/pkgs/pygments/distros/fedora.txt
-new file mode 100644
-index 00000000..f3e72a8
---- /dev/null
-+++ b/build/pkgs/pygments/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-pygments
-diff --git a/build/pkgs/pytz/distros/fedora.txt b/build/pkgs/pytz/distros/fedora.txt
-new file mode 100644
-index 00000000..2cccc9e
---- /dev/null
-+++ b/build/pkgs/pytz/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-pytz
-diff --git a/build/pkgs/pyzmq/distros/fedora.txt b/build/pkgs/pyzmq/distros/fedora.txt
-new file mode 100644
-index 00000000..23f64d1
---- /dev/null
-+++ b/build/pkgs/pyzmq/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-pyzmq
-diff --git a/build/pkgs/requests/distros/fedora.txt b/build/pkgs/requests/distros/fedora.txt
-new file mode 100644
-index 00000000..93a7bc1
---- /dev/null
-+++ b/build/pkgs/requests/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-requests
-diff --git a/build/pkgs/scipy/distros/fedora.txt b/build/pkgs/scipy/distros/fedora.txt
-new file mode 100644
-index 00000000..7ff2882
---- /dev/null
-+++ b/build/pkgs/scipy/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-scipy
-diff --git a/build/pkgs/setuptools/distros/fedora.txt b/build/pkgs/setuptools/distros/fedora.txt
-new file mode 100644
-index 00000000..e1ad178
---- /dev/null
-+++ b/build/pkgs/setuptools/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-setuptools
-diff --git a/build/pkgs/six/distros/fedora.txt b/build/pkgs/six/distros/fedora.txt
-new file mode 100644
-index 00000000..787c530
---- /dev/null
-+++ b/build/pkgs/six/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-six
-diff --git a/build/pkgs/sympy/distros/fedora.txt b/build/pkgs/sympy/distros/fedora.txt
-new file mode 100644
-index 00000000..126c88a
---- /dev/null
-+++ b/build/pkgs/sympy/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-sympy
-diff --git a/build/pkgs/texttable/distros/fedora.txt b/build/pkgs/texttable/distros/fedora.txt
-new file mode 100644
-index 00000000..8d1ccec
---- /dev/null
-+++ b/build/pkgs/texttable/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-texttable
-diff --git a/build/pkgs/toml/distros/fedora.txt b/build/pkgs/toml/distros/fedora.txt
-new file mode 100644
-index 00000000..821ee77
---- /dev/null
-+++ b/build/pkgs/toml/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-toml
-diff --git a/build/pkgs/webencodings/distros/fedora.txt b/build/pkgs/webencodings/distros/fedora.txt
-new file mode 100644
-index 00000000..12ddba9
---- /dev/null
-+++ b/build/pkgs/webencodings/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-webencodings
-diff --git a/build/pkgs/wheel/distros/fedora.txt b/build/pkgs/wheel/distros/fedora.txt
-new file mode 100644
-index 00000000..ae4cbb9
---- /dev/null
-+++ b/build/pkgs/wheel/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-wheel
--- 
-cgit v1.0-1-gd88e
-
-
-From ad1d5a20380b147c774903066031442f31094626 Mon Sep 17 00:00:00 2001
-From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
-Date: Sun, 17 Oct 2021 21:04:04 -0700
-Subject: build/pkgs: Add distros/arch.txt for Python packages
-
----
- build/pkgs/babel/distros/arch.txt         | 1 +
- build/pkgs/bleach/distros/arch.txt        | 1 +
- build/pkgs/certifi/distros/arch.txt       | 1 +
- build/pkgs/cvxopt/distros/arch.txt        | 1 +
- build/pkgs/decorator/distros/arch.txt     | 1 +
- build/pkgs/html5lib/distros/arch.txt      | 1 +
- build/pkgs/idna/distros/arch.txt          | 1 +
- build/pkgs/matplotlib/distros/arch.txt    | 1 +
- build/pkgs/mpmath/distros/arch.txt        | 1 +
- build/pkgs/networkx/distros/arch.txt      | 1 +
- build/pkgs/numpy/distros/arch.txt         | 1 +
- build/pkgs/packaging/distros/arch.txt     | 1 +
- build/pkgs/pandocfilters/distros/arch.txt | 1 +
- build/pkgs/pickleshare/distros/arch.txt   | 1 +
- build/pkgs/pillow/distros/arch.txt        | 1 +
- build/pkgs/pluggy/distros/arch.txt        | 1 +
- build/pkgs/py/distros/arch.txt            | 1 +
- build/pkgs/pygments/distros/arch.txt      | 1 +
- build/pkgs/pytz/distros/arch.txt          | 1 +
- build/pkgs/pyzmq/distros/arch.txt         | 1 +
- build/pkgs/requests/distros/arch.txt      | 1 +
- build/pkgs/scipy/distros/arch.txt         | 1 +
- build/pkgs/setuptools/distros/arch.txt    | 1 +
- build/pkgs/six/distros/arch.txt           | 1 +
- build/pkgs/sympy/distros/arch.txt         | 1 +
- build/pkgs/texttable/distros/arch.txt     | 1 +
- build/pkgs/toml/distros/arch.txt          | 1 +
- build/pkgs/webencodings/distros/arch.txt  | 1 +
- build/pkgs/wheel/distros/arch.txt         | 1 +
- 29 files changed, 29 insertions(+)
- create mode 100644 build/pkgs/babel/distros/arch.txt
- create mode 100644 build/pkgs/bleach/distros/arch.txt
- create mode 100644 build/pkgs/certifi/distros/arch.txt
- create mode 100644 build/pkgs/cvxopt/distros/arch.txt
- create mode 100644 build/pkgs/decorator/distros/arch.txt
- create mode 100644 build/pkgs/html5lib/distros/arch.txt
- create mode 100644 build/pkgs/idna/distros/arch.txt
- create mode 100644 build/pkgs/matplotlib/distros/arch.txt
- create mode 100644 build/pkgs/mpmath/distros/arch.txt
- create mode 100644 build/pkgs/networkx/distros/arch.txt
- create mode 100644 build/pkgs/numpy/distros/arch.txt
- create mode 100644 build/pkgs/packaging/distros/arch.txt
- create mode 100644 build/pkgs/pandocfilters/distros/arch.txt
- create mode 100644 build/pkgs/pickleshare/distros/arch.txt
- create mode 100644 build/pkgs/pillow/distros/arch.txt
- create mode 100644 build/pkgs/pluggy/distros/arch.txt
- create mode 100644 build/pkgs/py/distros/arch.txt
- create mode 100644 build/pkgs/pygments/distros/arch.txt
- create mode 100644 build/pkgs/pytz/distros/arch.txt
- create mode 100644 build/pkgs/pyzmq/distros/arch.txt
- create mode 100644 build/pkgs/requests/distros/arch.txt
- create mode 100644 build/pkgs/scipy/distros/arch.txt
- create mode 100644 build/pkgs/setuptools/distros/arch.txt
- create mode 100644 build/pkgs/six/distros/arch.txt
- create mode 100644 build/pkgs/sympy/distros/arch.txt
- create mode 100644 build/pkgs/texttable/distros/arch.txt
- create mode 100644 build/pkgs/toml/distros/arch.txt
- create mode 100644 build/pkgs/webencodings/distros/arch.txt
- create mode 100644 build/pkgs/wheel/distros/arch.txt
-
-diff --git a/build/pkgs/babel/distros/arch.txt b/build/pkgs/babel/distros/arch.txt
-new file mode 100644
-index 00000000..f2d828c
---- /dev/null
-+++ b/build/pkgs/babel/distros/arch.txt
-@@ -0,0 +1 @@
-+python-babel
-diff --git a/build/pkgs/bleach/distros/arch.txt b/build/pkgs/bleach/distros/arch.txt
-new file mode 100644
-index 00000000..c5422cc
---- /dev/null
-+++ b/build/pkgs/bleach/distros/arch.txt
-@@ -0,0 +1 @@
-+python-bleach
-diff --git a/build/pkgs/certifi/distros/arch.txt b/build/pkgs/certifi/distros/arch.txt
-new file mode 100644
-index 00000000..be421c8
---- /dev/null
-+++ b/build/pkgs/certifi/distros/arch.txt
-@@ -0,0 +1 @@
-+python-certifi
-diff --git a/build/pkgs/cvxopt/distros/arch.txt b/build/pkgs/cvxopt/distros/arch.txt
-new file mode 100644
-index 00000000..f15770f
---- /dev/null
-+++ b/build/pkgs/cvxopt/distros/arch.txt
-@@ -0,0 +1 @@
-+python-cvxopt
-diff --git a/build/pkgs/decorator/distros/arch.txt b/build/pkgs/decorator/distros/arch.txt
-new file mode 100644
-index 00000000..0795604
---- /dev/null
-+++ b/build/pkgs/decorator/distros/arch.txt
-@@ -0,0 +1 @@
-+python-decorator
-diff --git a/build/pkgs/html5lib/distros/arch.txt b/build/pkgs/html5lib/distros/arch.txt
-new file mode 100644
-index 00000000..b821491
---- /dev/null
-+++ b/build/pkgs/html5lib/distros/arch.txt
-@@ -0,0 +1 @@
-+python-html5lib
-diff --git a/build/pkgs/idna/distros/arch.txt b/build/pkgs/idna/distros/arch.txt
-new file mode 100644
-index 00000000..a73e70c
---- /dev/null
-+++ b/build/pkgs/idna/distros/arch.txt
-@@ -0,0 +1 @@
-+python-idna
-diff --git a/build/pkgs/matplotlib/distros/arch.txt b/build/pkgs/matplotlib/distros/arch.txt
-new file mode 100644
-index 00000000..f6d856e
---- /dev/null
-+++ b/build/pkgs/matplotlib/distros/arch.txt
-@@ -0,0 +1 @@
-+python-matplotlib
-diff --git a/build/pkgs/mpmath/distros/arch.txt b/build/pkgs/mpmath/distros/arch.txt
-new file mode 100644
-index 00000000..a7dc8d5
---- /dev/null
-+++ b/build/pkgs/mpmath/distros/arch.txt
-@@ -0,0 +1 @@
-+python-mpmath
-diff --git a/build/pkgs/networkx/distros/arch.txt b/build/pkgs/networkx/distros/arch.txt
-new file mode 100644
-index 00000000..293f943
---- /dev/null
-+++ b/build/pkgs/networkx/distros/arch.txt
-@@ -0,0 +1 @@
-+python-networkx
-diff --git a/build/pkgs/numpy/distros/arch.txt b/build/pkgs/numpy/distros/arch.txt
-new file mode 100644
-index 00000000..c8722b9
---- /dev/null
-+++ b/build/pkgs/numpy/distros/arch.txt
-@@ -0,0 +1 @@
-+python-numpy
-diff --git a/build/pkgs/packaging/distros/arch.txt b/build/pkgs/packaging/distros/arch.txt
-new file mode 100644
-index 00000000..02ad855
---- /dev/null
-+++ b/build/pkgs/packaging/distros/arch.txt
-@@ -0,0 +1 @@
-+python-packaging
-diff --git a/build/pkgs/pandocfilters/distros/arch.txt b/build/pkgs/pandocfilters/distros/arch.txt
-new file mode 100644
-index 00000000..e7a86d0
---- /dev/null
-+++ b/build/pkgs/pandocfilters/distros/arch.txt
-@@ -0,0 +1 @@
-+python-pandocfilters
-diff --git a/build/pkgs/pickleshare/distros/arch.txt b/build/pkgs/pickleshare/distros/arch.txt
-new file mode 100644
-index 00000000..6d991a2
---- /dev/null
-+++ b/build/pkgs/pickleshare/distros/arch.txt
-@@ -0,0 +1 @@
-+python-pickleshare
-diff --git a/build/pkgs/pillow/distros/arch.txt b/build/pkgs/pillow/distros/arch.txt
-new file mode 100644
-index 00000000..86dbb1d
---- /dev/null
-+++ b/build/pkgs/pillow/distros/arch.txt
-@@ -0,0 +1 @@
-+python-pillow
-diff --git a/build/pkgs/pluggy/distros/arch.txt b/build/pkgs/pluggy/distros/arch.txt
-new file mode 100644
-index 00000000..c869e54
---- /dev/null
-+++ b/build/pkgs/pluggy/distros/arch.txt
-@@ -0,0 +1 @@
-+python-pluggy
-diff --git a/build/pkgs/py/distros/arch.txt b/build/pkgs/py/distros/arch.txt
-new file mode 100644
-index 00000000..b348d39
---- /dev/null
-+++ b/build/pkgs/py/distros/arch.txt
-@@ -0,0 +1 @@
-+python-py
-diff --git a/build/pkgs/pygments/distros/arch.txt b/build/pkgs/pygments/distros/arch.txt
-new file mode 100644
-index 00000000..f3e72a8
---- /dev/null
-+++ b/build/pkgs/pygments/distros/arch.txt
-@@ -0,0 +1 @@
-+python-pygments
-diff --git a/build/pkgs/pytz/distros/arch.txt b/build/pkgs/pytz/distros/arch.txt
-new file mode 100644
-index 00000000..2cccc9e
---- /dev/null
-+++ b/build/pkgs/pytz/distros/arch.txt
-@@ -0,0 +1 @@
-+python-pytz
-diff --git a/build/pkgs/pyzmq/distros/arch.txt b/build/pkgs/pyzmq/distros/arch.txt
-new file mode 100644
-index 00000000..23f64d1
---- /dev/null
-+++ b/build/pkgs/pyzmq/distros/arch.txt
-@@ -0,0 +1 @@
-+python-pyzmq
-diff --git a/build/pkgs/requests/distros/arch.txt b/build/pkgs/requests/distros/arch.txt
-new file mode 100644
-index 00000000..93a7bc1
---- /dev/null
-+++ b/build/pkgs/requests/distros/arch.txt
-@@ -0,0 +1 @@
-+python-requests
-diff --git a/build/pkgs/scipy/distros/arch.txt b/build/pkgs/scipy/distros/arch.txt
-new file mode 100644
-index 00000000..7ff2882
---- /dev/null
-+++ b/build/pkgs/scipy/distros/arch.txt
-@@ -0,0 +1 @@
-+python-scipy
-diff --git a/build/pkgs/setuptools/distros/arch.txt b/build/pkgs/setuptools/distros/arch.txt
-new file mode 100644
-index 00000000..e1ad178
---- /dev/null
-+++ b/build/pkgs/setuptools/distros/arch.txt
-@@ -0,0 +1 @@
-+python-setuptools
-diff --git a/build/pkgs/six/distros/arch.txt b/build/pkgs/six/distros/arch.txt
-new file mode 100644
-index 00000000..787c530
---- /dev/null
-+++ b/build/pkgs/six/distros/arch.txt
-@@ -0,0 +1 @@
-+python-six
-diff --git a/build/pkgs/sympy/distros/arch.txt b/build/pkgs/sympy/distros/arch.txt
-new file mode 100644
-index 00000000..126c88a
---- /dev/null
-+++ b/build/pkgs/sympy/distros/arch.txt
-@@ -0,0 +1 @@
-+python-sympy
-diff --git a/build/pkgs/texttable/distros/arch.txt b/build/pkgs/texttable/distros/arch.txt
-new file mode 100644
-index 00000000..8d1ccec
---- /dev/null
-+++ b/build/pkgs/texttable/distros/arch.txt
-@@ -0,0 +1 @@
-+python-texttable
-diff --git a/build/pkgs/toml/distros/arch.txt b/build/pkgs/toml/distros/arch.txt
-new file mode 100644
-index 00000000..821ee77
---- /dev/null
-+++ b/build/pkgs/toml/distros/arch.txt
-@@ -0,0 +1 @@
-+python-toml
-diff --git a/build/pkgs/webencodings/distros/arch.txt b/build/pkgs/webencodings/distros/arch.txt
-new file mode 100644
-index 00000000..12ddba9
---- /dev/null
-+++ b/build/pkgs/webencodings/distros/arch.txt
-@@ -0,0 +1 @@
-+python-webencodings
-diff --git a/build/pkgs/wheel/distros/arch.txt b/build/pkgs/wheel/distros/arch.txt
-new file mode 100644
-index 00000000..ae4cbb9
---- /dev/null
-+++ b/build/pkgs/wheel/distros/arch.txt
-@@ -0,0 +1 @@
-+python-wheel
--- 
-cgit v1.0-1-gd88e
-
-
-From 5087abee08f2a89ddaf422ec72a84575fe724a79 Mon Sep 17 00:00:00 2001
-From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
-Date: Sun, 17 Oct 2021 21:20:56 -0700
-Subject: build/pkgs: Add distros/opensuse.txt for Python packages
-
----
- build/pkgs/bleach/distros/opensuse.txt        | 1 +
- build/pkgs/cvxopt/distros/opensuse.txt        | 1 +
- build/pkgs/html5lib/distros/opensuse.txt      | 1 +
- build/pkgs/idna/distros/opensuse.txt          | 1 +
- build/pkgs/jinja2/distros/opensuse.txt        | 2 +-
- build/pkgs/mpmath/distros/opensuse.txt        | 1 +
- build/pkgs/numpy/distros/opensuse.txt         | 1 +
- build/pkgs/packaging/distros/opensuse.txt     | 1 +
- build/pkgs/pandocfilters/distros/opensuse.txt | 1 +
- build/pkgs/pluggy/distros/opensuse.txt        | 1 +
- build/pkgs/py/distros/opensuse.txt            | 1 +
- build/pkgs/pygments/distros/opensuse.txt      | 2 +-
- build/pkgs/sympy/distros/opensuse.txt         | 1 +
- build/pkgs/texttable/distros/opensuse.txt     | 1 +
- build/pkgs/toml/distros/opensuse.txt          | 1 +
- 15 files changed, 15 insertions(+), 2 deletions(-)
- create mode 100644 build/pkgs/bleach/distros/opensuse.txt
- create mode 100644 build/pkgs/cvxopt/distros/opensuse.txt
- create mode 100644 build/pkgs/html5lib/distros/opensuse.txt
- create mode 100644 build/pkgs/idna/distros/opensuse.txt
- create mode 100644 build/pkgs/mpmath/distros/opensuse.txt
- create mode 100644 build/pkgs/numpy/distros/opensuse.txt
- create mode 100644 build/pkgs/packaging/distros/opensuse.txt
- create mode 100644 build/pkgs/pandocfilters/distros/opensuse.txt
- create mode 100644 build/pkgs/pluggy/distros/opensuse.txt
- create mode 100644 build/pkgs/py/distros/opensuse.txt
- create mode 100644 build/pkgs/sympy/distros/opensuse.txt
- create mode 100644 build/pkgs/texttable/distros/opensuse.txt
- create mode 100644 build/pkgs/toml/distros/opensuse.txt
-
-diff --git a/build/pkgs/bleach/distros/opensuse.txt b/build/pkgs/bleach/distros/opensuse.txt
-new file mode 100644
-index 00000000..6d37c4c
---- /dev/null
-+++ b/build/pkgs/bleach/distros/opensuse.txt
-@@ -0,0 +1 @@
-+python3-bleach
-diff --git a/build/pkgs/cvxopt/distros/opensuse.txt b/build/pkgs/cvxopt/distros/opensuse.txt
-new file mode 100644
-index 00000000..2bb6ad1
---- /dev/null
-+++ b/build/pkgs/cvxopt/distros/opensuse.txt
-@@ -0,0 +1 @@
-+python3-cvxopt
-diff --git a/build/pkgs/html5lib/distros/opensuse.txt b/build/pkgs/html5lib/distros/opensuse.txt
-new file mode 100644
-index 00000000..6d7b8df
---- /dev/null
-+++ b/build/pkgs/html5lib/distros/opensuse.txt
-@@ -0,0 +1 @@
-+python3-html5lib
-diff --git a/build/pkgs/idna/distros/opensuse.txt b/build/pkgs/idna/distros/opensuse.txt
-new file mode 100644
-index 00000000..de48e70
---- /dev/null
-+++ b/build/pkgs/idna/distros/opensuse.txt
-@@ -0,0 +1 @@
-+python3-idna
-diff --git a/build/pkgs/jinja2/distros/opensuse.txt b/build/pkgs/jinja2/distros/opensuse.txt
-index 5d90a22..f2db865 100644
---- a/build/pkgs/jinja2/distros/opensuse.txt
-+++ b/build/pkgs/jinja2/distros/opensuse.txt
-@@ -1 +1 @@
--python3-Jinja2
-+python3-jinja2
-diff --git a/build/pkgs/mpmath/distros/opensuse.txt b/build/pkgs/mpmath/distros/opensuse.txt
-new file mode 100644
-index 00000000..fbc82a9
---- /dev/null
-+++ b/build/pkgs/mpmath/distros/opensuse.txt
-@@ -0,0 +1 @@
-+python3-mpmath
-diff --git a/build/pkgs/numpy/distros/opensuse.txt b/build/pkgs/numpy/distros/opensuse.txt
-new file mode 100644
-index 00000000..79d5c5a
---- /dev/null
-+++ b/build/pkgs/numpy/distros/opensuse.txt
-@@ -0,0 +1 @@
-+python3-numpy
-diff --git a/build/pkgs/packaging/distros/opensuse.txt b/build/pkgs/packaging/distros/opensuse.txt
-new file mode 100644
-index 00000000..8f1c0ff
---- /dev/null
-+++ b/build/pkgs/packaging/distros/opensuse.txt
-@@ -0,0 +1 @@
-+python3-packaging
-diff --git a/build/pkgs/pandocfilters/distros/opensuse.txt b/build/pkgs/pandocfilters/distros/opensuse.txt
-new file mode 100644
-index 00000000..d0d4c24
---- /dev/null
-+++ b/build/pkgs/pandocfilters/distros/opensuse.txt
-@@ -0,0 +1 @@
-+python3-pandocfilters
-diff --git a/build/pkgs/pluggy/distros/opensuse.txt b/build/pkgs/pluggy/distros/opensuse.txt
-new file mode 100644
-index 00000000..43a3acf
---- /dev/null
-+++ b/build/pkgs/pluggy/distros/opensuse.txt
-@@ -0,0 +1 @@
-+python3-pluggy
-diff --git a/build/pkgs/py/distros/opensuse.txt b/build/pkgs/py/distros/opensuse.txt
-new file mode 100644
-index 00000000..81fefe6
---- /dev/null
-+++ b/build/pkgs/py/distros/opensuse.txt
-@@ -0,0 +1 @@
-+python3-py
-diff --git a/build/pkgs/pygments/distros/opensuse.txt b/build/pkgs/pygments/distros/opensuse.txt
-index 9ff5740..3ab3792 100644
---- a/build/pkgs/pygments/distros/opensuse.txt
-+++ b/build/pkgs/pygments/distros/opensuse.txt
-@@ -1 +1 @@
--python3-Pygments
-+python3-pygments
-diff --git a/build/pkgs/sympy/distros/opensuse.txt b/build/pkgs/sympy/distros/opensuse.txt
-new file mode 100644
-index 00000000..db423c8
---- /dev/null
-+++ b/build/pkgs/sympy/distros/opensuse.txt
-@@ -0,0 +1 @@
-+python3-sympy
-diff --git a/build/pkgs/texttable/distros/opensuse.txt b/build/pkgs/texttable/distros/opensuse.txt
-new file mode 100644
-index 00000000..8f8e7e2
---- /dev/null
-+++ b/build/pkgs/texttable/distros/opensuse.txt
-@@ -0,0 +1 @@
-+python3-texttable
-diff --git a/build/pkgs/toml/distros/opensuse.txt b/build/pkgs/toml/distros/opensuse.txt
-new file mode 100644
-index 00000000..543e89d
---- /dev/null
-+++ b/build/pkgs/toml/distros/opensuse.txt
-@@ -0,0 +1 @@
-+python3-toml
--- 
-cgit v1.0-1-gd88e
-
-
-From a480ba7ace1370d106ae831e904ea22b72af1be7 Mon Sep 17 00:00:00 2001
-From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
-Date: Sun, 17 Oct 2021 22:45:04 -0700
-Subject: build/pkgs: Add distros/debian.txt for Python packages
-
----
- build/pkgs/babel/distros/debian.txt         | 1 +
- build/pkgs/bleach/distros/debian.txt        | 1 +
- build/pkgs/certifi/distros/debian.txt       | 1 +
- build/pkgs/cvxopt/distros/debian.txt        | 1 +
- build/pkgs/decorator/distros/debian.txt     | 1 +
- build/pkgs/html5lib/distros/debian.txt      | 1 +
- build/pkgs/idna/distros/debian.txt          | 1 +
- build/pkgs/jinja2/distros/debian.txt        | 1 +
- build/pkgs/matplotlib/distros/debian.txt    | 1 +
- build/pkgs/mpmath/distros/debian.txt        | 1 +
- build/pkgs/networkx/distros/debian.txt      | 1 +
- build/pkgs/numpy/distros/debian.txt         | 1 +
- build/pkgs/packaging/distros/debian.txt     | 1 +
- build/pkgs/pandocfilters/distros/debian.txt | 1 +
- build/pkgs/pickleshare/distros/debian.txt   | 1 +
- build/pkgs/pillow/distros/debian.txt        | 1 +
- build/pkgs/pluggy/distros/debian.txt        | 1 +
- build/pkgs/py/distros/debian.txt            | 1 +
- build/pkgs/pygments/distros/debian.txt      | 1 +
- build/pkgs/pytz/distros/debian.txt          | 1 +
- build/pkgs/requests/distros/debian.txt      | 1 +
- build/pkgs/scipy/distros/debian.txt         | 1 +
- build/pkgs/setuptools/distros/debian.txt    | 1 +
- build/pkgs/six/distros/debian.txt           | 1 +
- build/pkgs/sympy/distros/debian.txt         | 1 +
- build/pkgs/texttable/distros/debian.txt     | 1 +
- build/pkgs/toml/distros/debian.txt          | 1 +
- build/pkgs/webencodings/distros/debian.txt  | 1 +
- build/pkgs/wheel/distros/debian.txt         | 1 +
- 29 files changed, 29 insertions(+)
- create mode 100644 build/pkgs/babel/distros/debian.txt
- create mode 100644 build/pkgs/bleach/distros/debian.txt
- create mode 100644 build/pkgs/certifi/distros/debian.txt
- create mode 100644 build/pkgs/cvxopt/distros/debian.txt
- create mode 100644 build/pkgs/decorator/distros/debian.txt
- create mode 100644 build/pkgs/html5lib/distros/debian.txt
- create mode 100644 build/pkgs/idna/distros/debian.txt
- create mode 100644 build/pkgs/jinja2/distros/debian.txt
- create mode 100644 build/pkgs/matplotlib/distros/debian.txt
- create mode 100644 build/pkgs/mpmath/distros/debian.txt
- create mode 100644 build/pkgs/networkx/distros/debian.txt
- create mode 100644 build/pkgs/numpy/distros/debian.txt
- create mode 100644 build/pkgs/packaging/distros/debian.txt
- create mode 100644 build/pkgs/pandocfilters/distros/debian.txt
- create mode 100644 build/pkgs/pickleshare/distros/debian.txt
- create mode 100644 build/pkgs/pillow/distros/debian.txt
- create mode 100644 build/pkgs/pluggy/distros/debian.txt
- create mode 100644 build/pkgs/py/distros/debian.txt
- create mode 100644 build/pkgs/pygments/distros/debian.txt
- create mode 100644 build/pkgs/pytz/distros/debian.txt
- create mode 100644 build/pkgs/requests/distros/debian.txt
- create mode 100644 build/pkgs/scipy/distros/debian.txt
- create mode 100644 build/pkgs/setuptools/distros/debian.txt
- create mode 100644 build/pkgs/six/distros/debian.txt
- create mode 100644 build/pkgs/sympy/distros/debian.txt
- create mode 100644 build/pkgs/texttable/distros/debian.txt
- create mode 100644 build/pkgs/toml/distros/debian.txt
- create mode 100644 build/pkgs/webencodings/distros/debian.txt
- create mode 100644 build/pkgs/wheel/distros/debian.txt
-
-diff --git a/build/pkgs/babel/distros/debian.txt b/build/pkgs/babel/distros/debian.txt
-new file mode 100644
-index 00000000..e623eb6
---- /dev/null
-+++ b/build/pkgs/babel/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-babel
-diff --git a/build/pkgs/bleach/distros/debian.txt b/build/pkgs/bleach/distros/debian.txt
-new file mode 100644
-index 00000000..6d37c4c
---- /dev/null
-+++ b/build/pkgs/bleach/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-bleach
-diff --git a/build/pkgs/certifi/distros/debian.txt b/build/pkgs/certifi/distros/debian.txt
-new file mode 100644
-index 00000000..f585a82
---- /dev/null
-+++ b/build/pkgs/certifi/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-certifi
-diff --git a/build/pkgs/cvxopt/distros/debian.txt b/build/pkgs/cvxopt/distros/debian.txt
-new file mode 100644
-index 00000000..2bb6ad1
---- /dev/null
-+++ b/build/pkgs/cvxopt/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-cvxopt
-diff --git a/build/pkgs/decorator/distros/debian.txt b/build/pkgs/decorator/distros/debian.txt
-new file mode 100644
-index 00000000..46c478e
---- /dev/null
-+++ b/build/pkgs/decorator/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-decorator
-diff --git a/build/pkgs/html5lib/distros/debian.txt b/build/pkgs/html5lib/distros/debian.txt
-new file mode 100644
-index 00000000..6d7b8df
---- /dev/null
-+++ b/build/pkgs/html5lib/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-html5lib
-diff --git a/build/pkgs/idna/distros/debian.txt b/build/pkgs/idna/distros/debian.txt
-new file mode 100644
-index 00000000..de48e70
---- /dev/null
-+++ b/build/pkgs/idna/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-idna
-diff --git a/build/pkgs/jinja2/distros/debian.txt b/build/pkgs/jinja2/distros/debian.txt
-new file mode 100644
-index 00000000..f2db865
---- /dev/null
-+++ b/build/pkgs/jinja2/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-jinja2
-diff --git a/build/pkgs/matplotlib/distros/debian.txt b/build/pkgs/matplotlib/distros/debian.txt
-new file mode 100644
-index 00000000..1374329
---- /dev/null
-+++ b/build/pkgs/matplotlib/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-matplotlib
-diff --git a/build/pkgs/mpmath/distros/debian.txt b/build/pkgs/mpmath/distros/debian.txt
-new file mode 100644
-index 00000000..fbc82a9
---- /dev/null
-+++ b/build/pkgs/mpmath/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-mpmath
-diff --git a/build/pkgs/networkx/distros/debian.txt b/build/pkgs/networkx/distros/debian.txt
-new file mode 100644
-index 00000000..6779066
---- /dev/null
-+++ b/build/pkgs/networkx/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-networkx
-diff --git a/build/pkgs/numpy/distros/debian.txt b/build/pkgs/numpy/distros/debian.txt
-new file mode 100644
-index 00000000..79d5c5a
---- /dev/null
-+++ b/build/pkgs/numpy/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-numpy
-diff --git a/build/pkgs/packaging/distros/debian.txt b/build/pkgs/packaging/distros/debian.txt
-new file mode 100644
-index 00000000..8f1c0ff
---- /dev/null
-+++ b/build/pkgs/packaging/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-packaging
-diff --git a/build/pkgs/pandocfilters/distros/debian.txt b/build/pkgs/pandocfilters/distros/debian.txt
-new file mode 100644
-index 00000000..d0d4c24
---- /dev/null
-+++ b/build/pkgs/pandocfilters/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-pandocfilters
-diff --git a/build/pkgs/pickleshare/distros/debian.txt b/build/pkgs/pickleshare/distros/debian.txt
-new file mode 100644
-index 00000000..a00907d
---- /dev/null
-+++ b/build/pkgs/pickleshare/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-pickleshare
-diff --git a/build/pkgs/pillow/distros/debian.txt b/build/pkgs/pillow/distros/debian.txt
-new file mode 100644
-index 00000000..3319fcd
---- /dev/null
-+++ b/build/pkgs/pillow/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-pillow
-diff --git a/build/pkgs/pluggy/distros/debian.txt b/build/pkgs/pluggy/distros/debian.txt
-new file mode 100644
-index 00000000..43a3acf
---- /dev/null
-+++ b/build/pkgs/pluggy/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-pluggy
-diff --git a/build/pkgs/py/distros/debian.txt b/build/pkgs/py/distros/debian.txt
-new file mode 100644
-index 00000000..81fefe6
---- /dev/null
-+++ b/build/pkgs/py/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-py
-diff --git a/build/pkgs/pygments/distros/debian.txt b/build/pkgs/pygments/distros/debian.txt
-new file mode 100644
-index 00000000..3ab3792
---- /dev/null
-+++ b/build/pkgs/pygments/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-pygments
-diff --git a/build/pkgs/pytz/distros/debian.txt b/build/pkgs/pytz/distros/debian.txt
-new file mode 100644
-index 00000000..db20908
---- /dev/null
-+++ b/build/pkgs/pytz/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-tz
-diff --git a/build/pkgs/requests/distros/debian.txt b/build/pkgs/requests/distros/debian.txt
-new file mode 100644
-index 00000000..43147b2
---- /dev/null
-+++ b/build/pkgs/requests/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-requests
-diff --git a/build/pkgs/scipy/distros/debian.txt b/build/pkgs/scipy/distros/debian.txt
-new file mode 100644
-index 00000000..12b3666
---- /dev/null
-+++ b/build/pkgs/scipy/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-scipy
-diff --git a/build/pkgs/setuptools/distros/debian.txt b/build/pkgs/setuptools/distros/debian.txt
-new file mode 100644
-index 00000000..1c0901c
---- /dev/null
-+++ b/build/pkgs/setuptools/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-setuptools
-diff --git a/build/pkgs/six/distros/debian.txt b/build/pkgs/six/distros/debian.txt
-new file mode 100644
-index 00000000..68ff859
---- /dev/null
-+++ b/build/pkgs/six/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-six
-diff --git a/build/pkgs/sympy/distros/debian.txt b/build/pkgs/sympy/distros/debian.txt
-new file mode 100644
-index 00000000..db423c8
---- /dev/null
-+++ b/build/pkgs/sympy/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-sympy
-diff --git a/build/pkgs/texttable/distros/debian.txt b/build/pkgs/texttable/distros/debian.txt
-new file mode 100644
-index 00000000..8f8e7e2
---- /dev/null
-+++ b/build/pkgs/texttable/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-texttable
-diff --git a/build/pkgs/toml/distros/debian.txt b/build/pkgs/toml/distros/debian.txt
-new file mode 100644
-index 00000000..543e89d
---- /dev/null
-+++ b/build/pkgs/toml/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-toml
-diff --git a/build/pkgs/webencodings/distros/debian.txt b/build/pkgs/webencodings/distros/debian.txt
-new file mode 100644
-index 00000000..ac30c2f
---- /dev/null
-+++ b/build/pkgs/webencodings/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-webencodings
-diff --git a/build/pkgs/wheel/distros/debian.txt b/build/pkgs/wheel/distros/debian.txt
-new file mode 100644
-index 00000000..3c066725
---- /dev/null
-+++ b/build/pkgs/wheel/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-wheel
--- 
-cgit v1.0-1-gd88e
-
-
-From 93bf30d7de292551c3050e2dd74651d69ba4bd46 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 18 Oct 2021 07:50:34 -0400
-Subject: Trac #29665: add more documentation for SAGE_PYTHON_PACKAGE_CHECK().
-
-An earlier commit allows SAGE_PYTHON_PACKAGE_CHECK(package) to tweak the
-value of sage_use_system_$package if --enable-system-site-packages was
-not used. This essentially changes the default --with-system-$package=yes
-to "no" in that case. Here we update the documentation to reflect it.
----
- m4/sage_python_package_check.m4 | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
-index 7ee82a7..95eefd0 100644
---- a/m4/sage_python_package_check.m4
-+++ b/m4/sage_python_package_check.m4
-@@ -34,6 +34,10 @@
- #   ensure that the ./configure- and run-time views of the system
- #   are as similar as possible.
- #
-+#   To avoid suggesting these system packages to users who have not
-+#   set --enable-system-site-packages, this macro also changes the
-+#   default for --with-system-foo from "yes" to "no" in that case.
-+#
- 
- AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
-   AS_IF([test "${enable_system_site_packages}" = "yes"], [
--- 
-cgit v1.0-1-gd88e
-
-
-From d771e49d57ecdf3622434bc09cbfb87ad3bb7744 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 18 Oct 2021 07:42:46 -0400
-Subject: Trac #29665: improve SAGE_PYTHON_PACKAGE_CHECK() failure message.
-
-When --enable-system-site-packages is off, SAGE_PYTHON_PACKAGE_CHECK()
-will always install the corresponding SPKG. We improve the ./configure
-output in that case to make it clear that the decision was based on
-the value of --enable-system-site-packages and not the "real" check.
----
- m4/sage_python_package_check.m4 | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
-index 95eefd0..5f0f084 100644
---- a/m4/sage_python_package_check.m4
-+++ b/m4/sage_python_package_check.m4
-@@ -40,7 +40,9 @@
- #
- 
- AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
-+  AC_MSG_CHECKING([if --enable-system-site-packages was used])
-   AS_IF([test "${enable_system_site_packages}" = "yes"], [
-+    AC_MSG_RESULT(yes)
-     AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
- 
-     dnl We run this check inside a python venv, because that's ultimately
-@@ -94,6 +96,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
-     AS_IF([test -d config.venv], [rm -rf config.venv])
-   ], [
-     dnl System site packages are disabled.
-+    AC_MSG_RESULT(no; skipping check)
-     sage_spkg_install_$1=yes
- 
-     dnl We have to retroactively hack the --with-system-foo={no,yes,force}
--- 
-cgit v1.0-1-gd88e
-
-
-From 5bb43c1b78a1deb3364f235305937c2f823e5e18 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Sun, 24 Oct 2021 20:29:25 -0400
-Subject: Trac #29665: use sage-venv in SAGE_PYTHON_PACKAGE_CHECK().
-
-For consistency with the rest of the build system, we now use the
-build/bin/sage-venv script to create the venv in this autoconf macro
-rather than invoking $PYTHON_FOR_VENV with "-m venv" directly.
----
- m4/sage_python_package_check.m4 | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
-index 5f0f084..5547b35 100644
---- a/m4/sage_python_package_check.m4
-+++ b/m4/sage_python_package_check.m4
-@@ -50,11 +50,11 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
-     AC_MSG_CHECKING([if we can create a python venv in config.venv])
- 
-     dnl Use --clear because ./configure typically clobbers its output files.
--    AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
--                                        --clear                dnl
--                                        --without-pip          dnl
--                                        config.venv            dnl
--                                        2>&AS_MESSAGE_LOG_FD], [
-+    AS_IF(["${PYTHON_FOR_VENV}" build/bin/sage-venv      dnl
-+                                  --system-site-packages dnl
-+                                  --clear                dnl
-+                                  config.venv            dnl
-+                                  2>&AS_MESSAGE_LOG_FD], [
-       AC_MSG_RESULT(yes)
-       dnl strip all comments from install-requires.txt; this should leave
-       dnl only a single line containing the version specification for this
--- 
-cgit v1.0-1-gd88e
-
-
-From c78363d6326addff16ca5abac897949a6be72bf4 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 18:10:30 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for urllib3.
-
----
- build/pkgs/urllib3/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/urllib3/spkg-configure.m4
-
-diff --git a/build/pkgs/urllib3/spkg-configure.m4 b/build/pkgs/urllib3/spkg-configure.m4
-new file mode 100644
-index 00000000..d7ef3e1
---- /dev/null
-+++ b/build/pkgs/urllib3/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([urllib3], [SAGE_PYTHON_PACKAGE_CHECK([urllib3])])
--- 
-cgit v1.0-1-gd88e
-
-
-From f416d5abcae495ea8301fad024b279ea9e997b29 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 18:15:18 -0400
-Subject: Trac #29665: add Gentoo package information for urllib3.
-
----
- build/pkgs/urllib3/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/urllib3/distros/gentoo.txt
-
-diff --git a/build/pkgs/urllib3/distros/gentoo.txt b/build/pkgs/urllib3/distros/gentoo.txt
-new file mode 100644
-index 00000000..172a535
---- /dev/null
-+++ b/build/pkgs/urllib3/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/urllib3
--- 
-cgit v1.0-1-gd88e
-
-
-From 852068b992bf7959500c650f54cb92e5b68d7ef8 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 18:15:58 -0400
-Subject: Trac #29665: add Gentoo package information for nbformat.
-
----
- build/pkgs/nbformat/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/nbformat/distros/gentoo.txt
-
-diff --git a/build/pkgs/nbformat/distros/gentoo.txt b/build/pkgs/nbformat/distros/gentoo.txt
-new file mode 100644
-index 00000000..006b1f2
---- /dev/null
-+++ b/build/pkgs/nbformat/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/nbformat
--- 
-cgit v1.0-1-gd88e
-
-
-From 66179fd28fcc92ee840dcd87bb4db25cea968d66 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 18:34:16 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for nbformat.
-
----
- build/pkgs/nbformat/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/nbformat/spkg-configure.m4
-
-diff --git a/build/pkgs/nbformat/spkg-configure.m4 b/build/pkgs/nbformat/spkg-configure.m4
-new file mode 100644
-index 00000000..5a7f8c4
---- /dev/null
-+++ b/build/pkgs/nbformat/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([nbformat], [SAGE_PYTHON_PACKAGE_CHECK([nbformat])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 874005e81ed20f27a5f895030dcdbdfc5f73ad80 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 18:47:01 -0400
-Subject: Trac #29665: add Gentoo package information for zipp.
-
----
- build/pkgs/zipp/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/zipp/distros/gentoo.txt
-
-diff --git a/build/pkgs/zipp/distros/gentoo.txt b/build/pkgs/zipp/distros/gentoo.txt
-new file mode 100644
-index 00000000..7f59450
---- /dev/null
-+++ b/build/pkgs/zipp/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/zipp
--- 
-cgit v1.0-1-gd88e
-
-
-From 0cc2a7355b5554c1fb79c742ebf02eff54465b3e Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 18:47:35 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for zipp.
-
----
- build/pkgs/zipp/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/zipp/spkg-configure.m4
-
-diff --git a/build/pkgs/zipp/spkg-configure.m4 b/build/pkgs/zipp/spkg-configure.m4
-new file mode 100644
-index 00000000..0fe3a9c
---- /dev/null
-+++ b/build/pkgs/zipp/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([zipp], [SAGE_PYTHON_PACKAGE_CHECK([zipp])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 6073ad8e56c21fc862749bbd84a56d543fb9458c Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 18:48:37 -0400
-Subject: Trac #29665: add Gentoo package information for wcwidth.
-
----
- build/pkgs/wcwidth/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/wcwidth/distros/gentoo.txt
-
-diff --git a/build/pkgs/wcwidth/distros/gentoo.txt b/build/pkgs/wcwidth/distros/gentoo.txt
-new file mode 100644
-index 00000000..edeb80b
---- /dev/null
-+++ b/build/pkgs/wcwidth/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/wcwidth
--- 
-cgit v1.0-1-gd88e
-
-
-From 9793d6172c64d61a015fbe61bd45863759124fad Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 18:51:10 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for wcwidth.
-
----
- build/pkgs/wcwidth/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/wcwidth/spkg-configure.m4
-
-diff --git a/build/pkgs/wcwidth/spkg-configure.m4 b/build/pkgs/wcwidth/spkg-configure.m4
-new file mode 100644
-index 00000000..5bde15a
---- /dev/null
-+++ b/build/pkgs/wcwidth/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([wcwidth], [SAGE_PYTHON_PACKAGE_CHECK([wcwidth])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 20232f370a43c146ca4e696c72a2cbcc498db060 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 18:52:36 -0400
-Subject: Trac #29665: add Gentoo package information for testpath.
-
----
- build/pkgs/testpath/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/testpath/distros/gentoo.txt
-
-diff --git a/build/pkgs/testpath/distros/gentoo.txt b/build/pkgs/testpath/distros/gentoo.txt
-new file mode 100644
-index 00000000..efa10a0
---- /dev/null
-+++ b/build/pkgs/testpath/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/testpath
--- 
-cgit v1.0-1-gd88e
-
-
-From 1b0785b2aad8844e74345fe950baf097e2b43d24 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 18:55:22 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for testpath.
-
----
- build/pkgs/testpath/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/testpath/spkg-configure.m4
-
-diff --git a/build/pkgs/testpath/spkg-configure.m4 b/build/pkgs/testpath/spkg-configure.m4
-new file mode 100644
-index 00000000..d8fc2a7
---- /dev/null
-+++ b/build/pkgs/testpath/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([testpath], [SAGE_PYTHON_PACKAGE_CHECK([testpath])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 10fc3829ecd956d732b1b069fdfe81f0d6d5cdc2 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 18:56:06 -0400
-Subject: Trac #29665: add Gentoo package information for jedi.
-
----
- build/pkgs/jedi/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/jedi/distros/gentoo.txt
-
-diff --git a/build/pkgs/jedi/distros/gentoo.txt b/build/pkgs/jedi/distros/gentoo.txt
-new file mode 100644
-index 00000000..6c85a46
---- /dev/null
-+++ b/build/pkgs/jedi/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/jedi
--- 
-cgit v1.0-1-gd88e
-
-
-From a75824d74c281c7639028ca01dabeed266f56998 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:06:37 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for jedi.
-
----
- build/pkgs/jedi/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/jedi/spkg-configure.m4
-
-diff --git a/build/pkgs/jedi/spkg-configure.m4 b/build/pkgs/jedi/spkg-configure.m4
-new file mode 100644
-index 00000000..a37dbcc
---- /dev/null
-+++ b/build/pkgs/jedi/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([jedi], [SAGE_PYTHON_PACKAGE_CHECK([jedi])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 17af01373d43f6acbbdbc23e073e372d3fdadf8b Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:07:47 -0400
-Subject: Trac #29665: add Gentoo package information for tomli.
-
----
- build/pkgs/tomli/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/tomli/distros/gentoo.txt
-
-diff --git a/build/pkgs/tomli/distros/gentoo.txt b/build/pkgs/tomli/distros/gentoo.txt
-new file mode 100644
-index 00000000..0458e25
---- /dev/null
-+++ b/build/pkgs/tomli/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/tomli
--- 
-cgit v1.0-1-gd88e
-
-
-From 0d3b5994ae612be11992467c4a3f1a74b81400fe Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:08:12 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for tomli.
-
----
- build/pkgs/tomli/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/tomli/spkg-configure.m4
-
-diff --git a/build/pkgs/tomli/spkg-configure.m4 b/build/pkgs/tomli/spkg-configure.m4
-new file mode 100644
-index 00000000..95a8b8b
---- /dev/null
-+++ b/build/pkgs/tomli/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([tomli], [SAGE_PYTHON_PACKAGE_CHECK([tomli])])
--- 
-cgit v1.0-1-gd88e
-
-
-From dce1c515781b0eeb8eb9c2bc7aba581560c1fac1 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:09:22 -0400
-Subject: Trac #29665: add Gentoo package information for defusedxml.
-
----
- build/pkgs/defusedxml/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/defusedxml/distros/gentoo.txt
-
-diff --git a/build/pkgs/defusedxml/distros/gentoo.txt b/build/pkgs/defusedxml/distros/gentoo.txt
-new file mode 100644
-index 00000000..2804214
---- /dev/null
-+++ b/build/pkgs/defusedxml/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/defusedxml
--- 
-cgit v1.0-1-gd88e
-
-
-From 02e1e1cd7f8bdae3ca5b7d35ce70af28a44e9b7c Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:11:14 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for defusedxml.
-
----
- build/pkgs/defusedxml/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/defusedxml/spkg-configure.m4
-
-diff --git a/build/pkgs/defusedxml/spkg-configure.m4 b/build/pkgs/defusedxml/spkg-configure.m4
-new file mode 100644
-index 00000000..e02f345
---- /dev/null
-+++ b/build/pkgs/defusedxml/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([defusedxml], [SAGE_PYTHON_PACKAGE_CHECK([defusedxml])])
--- 
-cgit v1.0-1-gd88e
-
-
-From e0ba4ebb5cfc637b5d26b85de9f34e0a160d2b9c Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:12:22 -0400
-Subject: Trac #29665: add Gentoo package information for ipywidgets.
-
----
- build/pkgs/ipywidgets/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/ipywidgets/distros/gentoo.txt
-
-diff --git a/build/pkgs/ipywidgets/distros/gentoo.txt b/build/pkgs/ipywidgets/distros/gentoo.txt
-new file mode 100644
-index 00000000..7c76967
---- /dev/null
-+++ b/build/pkgs/ipywidgets/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/ipywidgets
--- 
-cgit v1.0-1-gd88e
-
-
-From 49df7e7d93c7a31b7c46d5d224a35fd313a29a32 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:15:53 -0400
-Subject: Trac #29665: add Gentoo package information for simplegeneric.
-
----
- build/pkgs/simplegeneric/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/simplegeneric/distros/gentoo.txt
-
-diff --git a/build/pkgs/simplegeneric/distros/gentoo.txt b/build/pkgs/simplegeneric/distros/gentoo.txt
-new file mode 100644
-index 00000000..a86e90d
---- /dev/null
-+++ b/build/pkgs/simplegeneric/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/simplegeneric
--- 
-cgit v1.0-1-gd88e
-
-
-From 2a893635d5804749e6fec7ed7289c921ecb5300a Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:16:33 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for simplegeneric.
-
----
- build/pkgs/simplegeneric/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/simplegeneric/spkg-configure.m4
-
-diff --git a/build/pkgs/simplegeneric/spkg-configure.m4 b/build/pkgs/simplegeneric/spkg-configure.m4
-new file mode 100644
-index 00000000..13715ab
---- /dev/null
-+++ b/build/pkgs/simplegeneric/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([simplegeneric], [SAGE_PYTHON_PACKAGE_CHECK([simplegeneric])])
--- 
-cgit v1.0-1-gd88e
-
-
-From a8fe7ecd6e3163e7d01261e5497ac452a8cc95ab Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:17:18 -0400
-Subject: Trac #29665: add Gentoo package information for imagesize.
-
----
- build/pkgs/imagesize/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/imagesize/distros/gentoo.txt
-
-diff --git a/build/pkgs/imagesize/distros/gentoo.txt b/build/pkgs/imagesize/distros/gentoo.txt
-new file mode 100644
-index 00000000..54350ba
---- /dev/null
-+++ b/build/pkgs/imagesize/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/imagesize
--- 
-cgit v1.0-1-gd88e
-
-
-From 2ad837c5dd1fca0f50ce6d5042a9344210a54f84 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:17:48 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for imagesize.
-
----
- build/pkgs/imagesize/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/imagesize/spkg-configure.m4
-
-diff --git a/build/pkgs/imagesize/spkg-configure.m4 b/build/pkgs/imagesize/spkg-configure.m4
-new file mode 100644
-index 00000000..20210ef
---- /dev/null
-+++ b/build/pkgs/imagesize/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([imagesize], [SAGE_PYTHON_PACKAGE_CHECK([imagesize])])
--- 
-cgit v1.0-1-gd88e
-
-
-From bf47415b5bfca2d7bf24e20de35662bf331623b9 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:18:49 -0400
-Subject: Trac #29665: add Gentoo package information for mistune.
-
----
- build/pkgs/mistune/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/mistune/distros/gentoo.txt
-
-diff --git a/build/pkgs/mistune/distros/gentoo.txt b/build/pkgs/mistune/distros/gentoo.txt
-new file mode 100644
-index 00000000..56f0a4e
---- /dev/null
-+++ b/build/pkgs/mistune/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/mistune
--- 
-cgit v1.0-1-gd88e
-
-
-From 6898a74fd0c65a40c5220ba68b4062ac6fe060c6 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:21:30 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for mistune.
-
----
- build/pkgs/mistune/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/mistune/spkg-configure.m4
-
-diff --git a/build/pkgs/mistune/spkg-configure.m4 b/build/pkgs/mistune/spkg-configure.m4
-new file mode 100644
-index 00000000..972f33d
---- /dev/null
-+++ b/build/pkgs/mistune/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([mistune], [SAGE_PYTHON_PACKAGE_CHECK([mistune])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 62735e4ccf2031cd39eb5e04b03bdfd97005d808 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:22:48 -0400
-Subject: Trac #29665: add Gentoo package information for backcall.
-
----
- build/pkgs/backcall/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/backcall/distros/gentoo.txt
-
-diff --git a/build/pkgs/backcall/distros/gentoo.txt b/build/pkgs/backcall/distros/gentoo.txt
-new file mode 100644
-index 00000000..266a222
---- /dev/null
-+++ b/build/pkgs/backcall/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/backcall
--- 
-cgit v1.0-1-gd88e
-
-
-From 9ef3ea42d4a33c7cdb623fa5417ae300cf323183 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:25:10 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for backcall.
-
----
- build/pkgs/backcall/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/backcall/spkg-configure.m4
-
-diff --git a/build/pkgs/backcall/spkg-configure.m4 b/build/pkgs/backcall/spkg-configure.m4
-new file mode 100644
-index 00000000..d6b11c4
---- /dev/null
-+++ b/build/pkgs/backcall/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([backcall], [SAGE_PYTHON_PACKAGE_CHECK([backcall])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 1b3ea2a3c40fea0fb58435f5e5304368ea58dff8 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:25:58 -0400
-Subject: Trac #29665: add Gentoo package information for parso.
-
----
- build/pkgs/parso/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/parso/distros/gentoo.txt
-
-diff --git a/build/pkgs/parso/distros/gentoo.txt b/build/pkgs/parso/distros/gentoo.txt
-new file mode 100644
-index 00000000..f9ce4c7
---- /dev/null
-+++ b/build/pkgs/parso/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/parso
--- 
-cgit v1.0-1-gd88e
-
-
-From 963a3a2c563ec71a1f5be2395722d0e824cb0b11 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:26:22 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for parso.
-
----
- build/pkgs/parso/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/parso/spkg-configure.m4
-
-diff --git a/build/pkgs/parso/spkg-configure.m4 b/build/pkgs/parso/spkg-configure.m4
-new file mode 100644
-index 00000000..1ca6f1b
---- /dev/null
-+++ b/build/pkgs/parso/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([parso], [SAGE_PYTHON_PACKAGE_CHECK([parso])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 943053dfc474b6549bcc7d6ef2971ea43588b35c Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:27:00 -0400
-Subject: Trac #29665: add Gentoo package information for pyparsing.
-
----
- build/pkgs/pyparsing/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pyparsing/distros/gentoo.txt
-
-diff --git a/build/pkgs/pyparsing/distros/gentoo.txt b/build/pkgs/pyparsing/distros/gentoo.txt
-new file mode 100644
-index 00000000..ef0419f
---- /dev/null
-+++ b/build/pkgs/pyparsing/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/pyparsing
--- 
-cgit v1.0-1-gd88e
-
-
-From bd682eaa2ac41dd84e7a52e2b0c5442fc8fd8919 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:27:30 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for pyparsing.
-
----
- build/pkgs/pyparsing/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pyparsing/spkg-configure.m4
-
-diff --git a/build/pkgs/pyparsing/spkg-configure.m4 b/build/pkgs/pyparsing/spkg-configure.m4
-new file mode 100644
-index 00000000..d2b4c00
---- /dev/null
-+++ b/build/pkgs/pyparsing/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([pyparsing], [SAGE_PYTHON_PACKAGE_CHECK([pyparsing])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 74f36a9c0ec7c63b7e6c40066e42f4b15c2f978e Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:17:42 -0400
-Subject: Trac #29665: add Gentoo package information for debugpy.
-
----
- build/pkgs/debugpy/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/debugpy/distros/gentoo.txt
-
-diff --git a/build/pkgs/debugpy/distros/gentoo.txt b/build/pkgs/debugpy/distros/gentoo.txt
-new file mode 100644
-index 00000000..8b797ce
---- /dev/null
-+++ b/build/pkgs/debugpy/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/debugpy
--- 
-cgit v1.0-1-gd88e
-
-
-From be072fa87ac5c373d9dc9b54c0bd68734d5709bc Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:21:17 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for debugpy.
-
----
- build/pkgs/debugpy/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/debugpy/spkg-configure.m4
-
-diff --git a/build/pkgs/debugpy/spkg-configure.m4 b/build/pkgs/debugpy/spkg-configure.m4
-new file mode 100644
-index 00000000..db605ff
---- /dev/null
-+++ b/build/pkgs/debugpy/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([debugpy], [SAGE_PYTHON_PACKAGE_CHECK([debugpy])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 6f777ce2f2e14b94e91c8b7bbac82f9017460aba Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:23:56 -0400
-Subject: Trac #29665: add Gentoo package information for tzlocal.
-
----
- build/pkgs/tzlocal/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/tzlocal/distros/gentoo.txt
-
-diff --git a/build/pkgs/tzlocal/distros/gentoo.txt b/build/pkgs/tzlocal/distros/gentoo.txt
-new file mode 100644
-index 00000000..2018442
---- /dev/null
-+++ b/build/pkgs/tzlocal/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/tzlocal
--- 
-cgit v1.0-1-gd88e
-
-
-From 3bd078fc15ae13982249452711baafae91038191 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:24:51 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for tzlocal.
-
----
- build/pkgs/tzlocal/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/tzlocal/spkg-configure.m4
-
-diff --git a/build/pkgs/tzlocal/spkg-configure.m4 b/build/pkgs/tzlocal/spkg-configure.m4
-new file mode 100644
-index 00000000..e020b28
---- /dev/null
-+++ b/build/pkgs/tzlocal/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([tzlocal], [SAGE_PYTHON_PACKAGE_CHECK([tzlocal])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 91b0882fc62214923da9ee7b6dccb05d8a1d11d1 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:26:13 -0400
-Subject: Trac #29665: add Gentoo package information for pycparser.
-
----
- build/pkgs/pycparser/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pycparser/distros/gentoo.txt
-
-diff --git a/build/pkgs/pycparser/distros/gentoo.txt b/build/pkgs/pycparser/distros/gentoo.txt
-new file mode 100644
-index 00000000..5e87307
---- /dev/null
-+++ b/build/pkgs/pycparser/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/pycparser
--- 
-cgit v1.0-1-gd88e
-
-
-From beabde92fe6e057faf516fe82d27f1e903e55ce6 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:27:27 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for pycparser.
-
----
- build/pkgs/pycparser/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pycparser/spkg-configure.m4
-
-diff --git a/build/pkgs/pycparser/spkg-configure.m4 b/build/pkgs/pycparser/spkg-configure.m4
-new file mode 100644
-index 00000000..4b9b900
---- /dev/null
-+++ b/build/pkgs/pycparser/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([pycparser], [SAGE_PYTHON_PACKAGE_CHECK([pycparser])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 86c2788dc7fd1169314e9598c91fa81045553677 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:29:36 -0400
-Subject: Trac #29665: add Gentoo package information for cycler.
-
----
- build/pkgs/cycler/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/cycler/distros/gentoo.txt
-
-diff --git a/build/pkgs/cycler/distros/gentoo.txt b/build/pkgs/cycler/distros/gentoo.txt
-new file mode 100644
-index 00000000..4b21543
---- /dev/null
-+++ b/build/pkgs/cycler/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/cycler
--- 
-cgit v1.0-1-gd88e
-
-
-From 67c5a944101ddf329f0a61c61d4e784f58a5c5b0 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:30:27 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for cycler.
-
----
- build/pkgs/cycler/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/cycler/spkg-configure.m4
-
-diff --git a/build/pkgs/cycler/spkg-configure.m4 b/build/pkgs/cycler/spkg-configure.m4
-new file mode 100644
-index 00000000..239571a
---- /dev/null
-+++ b/build/pkgs/cycler/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([cycler], [SAGE_PYTHON_PACKAGE_CHECK([cycler])])
--- 
-cgit v1.0-1-gd88e
-
-
-From ef6d490251abfa41f7a0910274700a8a6a65f629 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:31:19 -0400
-Subject: Trac #29665: add Gentoo package information for traitlets.
-
----
- build/pkgs/traitlets/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/traitlets/distros/gentoo.txt
-
-diff --git a/build/pkgs/traitlets/distros/gentoo.txt b/build/pkgs/traitlets/distros/gentoo.txt
-new file mode 100644
-index 00000000..46bfaab
---- /dev/null
-+++ b/build/pkgs/traitlets/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/traitlets
--- 
-cgit v1.0-1-gd88e
-
-
-From 1f922b458d34088d9f6773312209e69f19ee45dc Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:31:50 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for traitlets.
-
----
- build/pkgs/traitlets/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/traitlets/spkg-configure.m4
-
-diff --git a/build/pkgs/traitlets/spkg-configure.m4 b/build/pkgs/traitlets/spkg-configure.m4
-new file mode 100644
-index 00000000..df2382b
---- /dev/null
-+++ b/build/pkgs/traitlets/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([traitlets], [SAGE_PYTHON_PACKAGE_CHECK([traitlets])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 95b89a9ced0acb6d971a27fa63b97ea58a11f4e1 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:33:35 -0400
-Subject: Trac #29665: add Gentoo package information for argcomplete.
-
----
- build/pkgs/argcomplete/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/argcomplete/distros/gentoo.txt
-
-diff --git a/build/pkgs/argcomplete/distros/gentoo.txt b/build/pkgs/argcomplete/distros/gentoo.txt
-new file mode 100644
-index 00000000..b150949
---- /dev/null
-+++ b/build/pkgs/argcomplete/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/argcomplete
--- 
-cgit v1.0-1-gd88e
-
-
-From b4cd8ef384e6e5bae0de0f3c113fb5f9e6e1a71e Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:34:14 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for argcomplete.
-
----
- build/pkgs/argcomplete/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/argcomplete/spkg-configure.m4
-
-diff --git a/build/pkgs/argcomplete/spkg-configure.m4 b/build/pkgs/argcomplete/spkg-configure.m4
-new file mode 100644
-index 00000000..cbd7ccf
---- /dev/null
-+++ b/build/pkgs/argcomplete/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([argcomplete], [SAGE_PYTHON_PACKAGE_CHECK([argcomplete])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 4cc610e8331970cc018d7ea87af928fa73a292c1 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:36:21 -0400
-Subject: Trac #29665: add Gentoo package information for ptyprocess.
-
----
- build/pkgs/ptyprocess/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/ptyprocess/distros/gentoo.txt
-
-diff --git a/build/pkgs/ptyprocess/distros/gentoo.txt b/build/pkgs/ptyprocess/distros/gentoo.txt
-new file mode 100644
-index 00000000..571a851
---- /dev/null
-+++ b/build/pkgs/ptyprocess/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/ptyprocess
--- 
-cgit v1.0-1-gd88e
-
-
-From cd15f97221bf5933b07900e4f77cb55401eede26 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:37:02 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for ptyprocess.
-
----
- build/pkgs/ptyprocess/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/ptyprocess/spkg-configure.m4
-
-diff --git a/build/pkgs/ptyprocess/spkg-configure.m4 b/build/pkgs/ptyprocess/spkg-configure.m4
-new file mode 100644
-index 00000000..bfacbae
---- /dev/null
-+++ b/build/pkgs/ptyprocess/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([ptyprocess], [SAGE_PYTHON_PACKAGE_CHECK([ptyprocess])])
--- 
-cgit v1.0-1-gd88e
-
-
-From bb5f45b15f99e4ba28e1b1f6042a0e8ea17f1dfc Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:38:22 -0400
-Subject: Trac #29665: add Gentoo package information for attrs.
-
----
- build/pkgs/attrs/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/attrs/distros/gentoo.txt
-
-diff --git a/build/pkgs/attrs/distros/gentoo.txt b/build/pkgs/attrs/distros/gentoo.txt
-new file mode 100644
-index 00000000..3b906fa
---- /dev/null
-+++ b/build/pkgs/attrs/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/attrs
--- 
-cgit v1.0-1-gd88e
-
-
-From 321707ebf8e9af1e4ac3a5b5b094b4226bb3a7a5 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:38:55 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for attrs.
-
----
- build/pkgs/attrs/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/attrs/spkg-configure.m4
-
-diff --git a/build/pkgs/attrs/spkg-configure.m4 b/build/pkgs/attrs/spkg-configure.m4
-new file mode 100644
-index 00000000..ba6a9b7
---- /dev/null
-+++ b/build/pkgs/attrs/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([attrs], [SAGE_PYTHON_PACKAGE_CHECK([attrs])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 69a498a4e8854ecdfc2f1a134104983c0dcb9e32 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:40:09 -0400
-Subject: Trac #29665: add Gentoo package information for send2trash.
-
----
- build/pkgs/send2trash/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/send2trash/distros/gentoo.txt
-
-diff --git a/build/pkgs/send2trash/distros/gentoo.txt b/build/pkgs/send2trash/distros/gentoo.txt
-new file mode 100644
-index 00000000..a89b179
---- /dev/null
-+++ b/build/pkgs/send2trash/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/send2trash
--- 
-cgit v1.0-1-gd88e
-
-
-From 9baed17c84e1bdf5abd17c20766e5cd7dddc5b53 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:41:45 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for send2trash.
-
----
- build/pkgs/send2trash/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/send2trash/spkg-configure.m4
-
-diff --git a/build/pkgs/send2trash/spkg-configure.m4 b/build/pkgs/send2trash/spkg-configure.m4
-new file mode 100644
-index 00000000..3bbb727
---- /dev/null
-+++ b/build/pkgs/send2trash/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([send2trash], [SAGE_PYTHON_PACKAGE_CHECK([send2trash])])
--- 
-cgit v1.0-1-gd88e
-
-
-From b9b552b2a2aaccaeb7c5b25be0b681f107522d09 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:43:27 -0400
-Subject: Trac #29665: add Gentoo package information for pyrsistent.
-
----
- build/pkgs/pyrsistent/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pyrsistent/distros/gentoo.txt
-
-diff --git a/build/pkgs/pyrsistent/distros/gentoo.txt b/build/pkgs/pyrsistent/distros/gentoo.txt
-new file mode 100644
-index 00000000..83439ce
---- /dev/null
-+++ b/build/pkgs/pyrsistent/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/pyrsistent
--- 
-cgit v1.0-1-gd88e
-
-
-From a17b31fac6104852762f57daa749443147bdf121 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:44:03 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for pyrsistent.
-
----
- build/pkgs/pyrsistent/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pyrsistent/spkg-configure.m4
-
-diff --git a/build/pkgs/pyrsistent/spkg-configure.m4 b/build/pkgs/pyrsistent/spkg-configure.m4
-new file mode 100644
-index 00000000..f7ca75d
---- /dev/null
-+++ b/build/pkgs/pyrsistent/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([pyrsistent], [SAGE_PYTHON_PACKAGE_CHECK([pyrsistent])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 68520decad6d6937918d7a6af65ca5bd476e5d02 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:45:45 -0400
-Subject: Trac #29665: add Gentoo package information for entrypoints.
-
----
- build/pkgs/entrypoints/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/entrypoints/distros/gentoo.txt
-
-diff --git a/build/pkgs/entrypoints/distros/gentoo.txt b/build/pkgs/entrypoints/distros/gentoo.txt
-new file mode 100644
-index 00000000..684ddd0
---- /dev/null
-+++ b/build/pkgs/entrypoints/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/entrypoints
--- 
-cgit v1.0-1-gd88e
-
-
-From 34213eccb642a6bad64d89acaefa83ee702cb483 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:46:24 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for entrypoints.
-
----
- build/pkgs/entrypoints/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/entrypoints/spkg-configure.m4
-
-diff --git a/build/pkgs/entrypoints/spkg-configure.m4 b/build/pkgs/entrypoints/spkg-configure.m4
-new file mode 100644
-index 00000000..caed658
---- /dev/null
-+++ b/build/pkgs/entrypoints/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([entrypoints], [SAGE_PYTHON_PACKAGE_CHECK([entrypoints])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 8e985614345da1a58fcdc127a9c0ddd790f9b5d2 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:48:26 -0400
-Subject: Trac #29665: add Gentoo package information for markupsafe.
-
----
- build/pkgs/markupsafe/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/markupsafe/distros/gentoo.txt
-
-diff --git a/build/pkgs/markupsafe/distros/gentoo.txt b/build/pkgs/markupsafe/distros/gentoo.txt
-new file mode 100644
-index 00000000..9654e35
---- /dev/null
-+++ b/build/pkgs/markupsafe/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/markupsafe
--- 
-cgit v1.0-1-gd88e
-
-
-From d370f229ae0988856f2e0d1f6ee2df2c47169106 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:48:55 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for markupsafe.
-
----
- build/pkgs/markupsafe/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/markupsafe/spkg-configure.m4
-
-diff --git a/build/pkgs/markupsafe/spkg-configure.m4 b/build/pkgs/markupsafe/spkg-configure.m4
-new file mode 100644
-index 00000000..79eb8db
---- /dev/null
-+++ b/build/pkgs/markupsafe/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([markupsafe], [SAGE_PYTHON_PACKAGE_CHECK([markupsafe])])
--- 
-cgit v1.0-1-gd88e
-
-
-From c49b285ad9e25e6bc81a7e75d461d234fdd3ea68 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Fri, 5 Nov 2021 06:30:49 -0400
-Subject: Trac #29665: add Gentoo package information for flit_core.
-
----
- build/pkgs/flit_core/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/flit_core/distros/gentoo.txt
-
-diff --git a/build/pkgs/flit_core/distros/gentoo.txt b/build/pkgs/flit_core/distros/gentoo.txt
-new file mode 100644
-index 00000000..fe6bea9
---- /dev/null
-+++ b/build/pkgs/flit_core/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/flit_core
--- 
-cgit v1.0-1-gd88e
-
-
-From 5b0ce1c4f23cd9fc4316e1eb2b9b4bde394957f3 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Fri, 5 Nov 2021 06:32:11 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for flit_core.
-
----
- build/pkgs/flit_core/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/flit_core/spkg-configure.m4
-
-diff --git a/build/pkgs/flit_core/spkg-configure.m4 b/build/pkgs/flit_core/spkg-configure.m4
-new file mode 100644
-index 00000000..ee67557
---- /dev/null
-+++ b/build/pkgs/flit_core/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([flit_core], [SAGE_PYTHON_PACKAGE_CHECK([flit_core])])
--- 
-cgit v1.0-1-gd88e
-
-
-From f006c231a81428b1e1e792f889bf974f90e3c831 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Fri, 5 Nov 2021 06:34:06 -0400
-Subject: Trac #29665: add Gentoo package information for nest_asyncio.
-
----
- build/pkgs/nest_asyncio/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/nest_asyncio/distros/gentoo.txt
-
-diff --git a/build/pkgs/nest_asyncio/distros/gentoo.txt b/build/pkgs/nest_asyncio/distros/gentoo.txt
-new file mode 100644
-index 00000000..ab742d2
---- /dev/null
-+++ b/build/pkgs/nest_asyncio/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/nest_asyncio
--- 
-cgit v1.0-1-gd88e
-
-
-From 4a58d0a96a84475e765a01a64f5f44c48a317e0b Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Fri, 5 Nov 2021 06:34:43 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for nest_asyncio.
-
----
- build/pkgs/nest_asyncio/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/nest_asyncio/spkg-configure.m4
-
-diff --git a/build/pkgs/nest_asyncio/spkg-configure.m4 b/build/pkgs/nest_asyncio/spkg-configure.m4
-new file mode 100644
-index 00000000..4d81527
---- /dev/null
-+++ b/build/pkgs/nest_asyncio/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([nest_asyncio], [SAGE_PYTHON_PACKAGE_CHECK([nest_asyncio])])
--- 
-cgit v1.0-1-gd88e
-
-
-From e50af937777ea778908bc09a7a79db3dd80fdf25 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Fri, 5 Nov 2021 06:37:02 -0400
-Subject: Trac #29665: add Gentoo package information for ipython_genutils.
-
----
- build/pkgs/ipython_genutils/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/ipython_genutils/distros/gentoo.txt
-
-diff --git a/build/pkgs/ipython_genutils/distros/gentoo.txt b/build/pkgs/ipython_genutils/distros/gentoo.txt
-new file mode 100644
-index 00000000..01bc49d
---- /dev/null
-+++ b/build/pkgs/ipython_genutils/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/ipython_genutils
--- 
-cgit v1.0-1-gd88e
-
-
-From ec3c0ce9db2ba13c1a49d1bcfb7a4b249cb7ae83 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Fri, 5 Nov 2021 06:39:20 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for ipython_genutils.
-
----
- build/pkgs/ipython_genutils/spkg-configure.m4 | 4 ++++
- 1 file changed, 4 insertions(+)
- create mode 100644 build/pkgs/ipython_genutils/spkg-configure.m4
-
-diff --git a/build/pkgs/ipython_genutils/spkg-configure.m4 b/build/pkgs/ipython_genutils/spkg-configure.m4
-new file mode 100644
-index 00000000..b0ba86a
---- /dev/null
-+++ b/build/pkgs/ipython_genutils/spkg-configure.m4
-@@ -0,0 +1,4 @@
-+SAGE_SPKG_CONFIGURE(
-+  [ipython_genutils],
-+  [SAGE_PYTHON_PACKAGE_CHECK([ipython_genutils])]
-+)
--- 
-cgit v1.0-1-gd88e
-
-
-From 5c9e2e265115e5f10d4b459a475467e30b4bddde Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Fri, 5 Nov 2021 06:40:03 -0400
-Subject: Trac #29665: add Gentoo package information for ipython.
-
----
- build/pkgs/ipython/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/ipython/distros/gentoo.txt
-
-diff --git a/build/pkgs/ipython/distros/gentoo.txt b/build/pkgs/ipython/distros/gentoo.txt
-new file mode 100644
-index 00000000..8b76f18
---- /dev/null
-+++ b/build/pkgs/ipython/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/ipython
--- 
-cgit v1.0-1-gd88e
-
-
-From 621e707ddd040a902d7dddf0bed1de2b54ab22f2 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Fri, 5 Nov 2021 07:37:56 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for ipython.
-
----
- build/pkgs/ipython/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/ipython/spkg-configure.m4
-
-diff --git a/build/pkgs/ipython/spkg-configure.m4 b/build/pkgs/ipython/spkg-configure.m4
-new file mode 100644
-index 00000000..02ab89f
---- /dev/null
-+++ b/build/pkgs/ipython/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([ipython], [SAGE_PYTHON_PACKAGE_CHECK([ipython])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 20a0613f6d441da436f3e7b8047a72bf490882bd Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Fri, 5 Nov 2021 07:51:11 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for ipywidgets.
-
----
- build/pkgs/ipywidgets/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/ipywidgets/spkg-configure.m4
-
-diff --git a/build/pkgs/ipywidgets/spkg-configure.m4 b/build/pkgs/ipywidgets/spkg-configure.m4
-new file mode 100644
-index 00000000..51ca9be
---- /dev/null
-+++ b/build/pkgs/ipywidgets/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([ipywidgets], [SAGE_PYTHON_PACKAGE_CHECK([ipywidgets])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 76bcd386633acc02a1a3026339d0cbd258ada04e Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Fri, 5 Nov 2021 10:05:16 -0400
-Subject: Trac #29665: add Gentoo package information for wheel.
-
----
- build/pkgs/wheel/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/wheel/distros/gentoo.txt
-
-diff --git a/build/pkgs/wheel/distros/gentoo.txt b/build/pkgs/wheel/distros/gentoo.txt
-new file mode 100644
-index 00000000..ec571d5
---- /dev/null
-+++ b/build/pkgs/wheel/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/wheel
--- 
-cgit v1.0-1-gd88e
-
-
-From 96c2dd2ca7812f5333bb9d45eadb7ac408e364ce Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 08:51:44 -0500
-Subject: Trac #29665: add Gentoo package information for terminado.
-
----
- build/pkgs/terminado/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/terminado/distros/gentoo.txt
-
-diff --git a/build/pkgs/terminado/distros/gentoo.txt b/build/pkgs/terminado/distros/gentoo.txt
-new file mode 100644
-index 00000000..1df16f1
---- /dev/null
-+++ b/build/pkgs/terminado/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/terminado
--- 
-cgit v1.0-1-gd88e
-
-
-From 0de0f5f3d235a4339b21e37ea13c9f5e59a82e59 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 08:52:35 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for terminado.
-
----
- build/pkgs/terminado/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/terminado/spkg-configure.m4
-
-diff --git a/build/pkgs/terminado/spkg-configure.m4 b/build/pkgs/terminado/spkg-configure.m4
-new file mode 100644
-index 00000000..5defc2f
---- /dev/null
-+++ b/build/pkgs/terminado/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([terminado], [SAGE_PYTHON_PACKAGE_CHECK([terminado])])
--- 
-cgit v1.0-1-gd88e
-
-
-From d14a745c770b02822557e7cee0a98de1cb2f3a12 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 08:56:15 -0500
-Subject: Trac #29665: add Gentoo package information for cffi.
-
----
- build/pkgs/cffi/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/cffi/distros/gentoo.txt
-
-diff --git a/build/pkgs/cffi/distros/gentoo.txt b/build/pkgs/cffi/distros/gentoo.txt
-new file mode 100644
-index 00000000..81eeb81
---- /dev/null
-+++ b/build/pkgs/cffi/distros/gentoo.txt
-@@ -0,0 +1 @@
-+virtual/python-cffi
--- 
-cgit v1.0-1-gd88e
-
-
-From ce393c04afc69fe050e38f780d4e117164687d80 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 08:57:04 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for cffi.
-
----
- build/pkgs/cffi/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/cffi/spkg-configure.m4
-
-diff --git a/build/pkgs/cffi/spkg-configure.m4 b/build/pkgs/cffi/spkg-configure.m4
-new file mode 100644
-index 00000000..dc81875
---- /dev/null
-+++ b/build/pkgs/cffi/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([cffi], [SAGE_PYTHON_PACKAGE_CHECK([cffi])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 467093315b3fdd57c8caa2f95cf99ad52b0b84fb Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 08:57:57 -0500
-Subject: Trac #29665: add Gentoo package information for pip.
-
----
- build/pkgs/pip/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pip/distros/gentoo.txt
-
-diff --git a/build/pkgs/pip/distros/gentoo.txt b/build/pkgs/pip/distros/gentoo.txt
-new file mode 100644
-index 00000000..1845454
---- /dev/null
-+++ b/build/pkgs/pip/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/pip[vanilla]
--- 
-cgit v1.0-1-gd88e
-
-
-From c597fd23f9f68dabbcb7e698d0569c3e6458f6d1 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 09:07:26 -0500
-Subject: Trac #29665: new spkg-configure.m4 for pip.
-
----
- build/pkgs/pip/spkg-configure.m4 | 12 ++++++++++++
- 1 file changed, 12 insertions(+)
- create mode 100644 build/pkgs/pip/spkg-configure.m4
-
-diff --git a/build/pkgs/pip/spkg-configure.m4 b/build/pkgs/pip/spkg-configure.m4
-new file mode 100644
-index 00000000..c7a5562
---- /dev/null
-+++ b/build/pkgs/pip/spkg-configure.m4
-@@ -0,0 +1,12 @@
-+SAGE_SPKG_CONFIGURE([pip], [
-+  dnl always run this macro because it changes the default value of
-+  dnl the --with-system-<package> option.
-+  SAGE_PYTHON_PACKAGE_CHECK([pip])
-+
-+  dnl if we might not install the spkg, make sure that "pip" is in
-+  dnl the user's PATH, too.
-+  AS_IF([test "x$sage_spkg_install_pip" != "xyes"], [
-+    AC_CHECK_PROG(HAVE_PIP, pip, yes, no)
-+    AS_IF([test "x$HAVE_PIP" = "xno"], [sage_spkg_install_pip=yes])
-+  ])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From ef8f1e807bc55d7b8321777486fa867a7c135419 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Tue, 9 Nov 2021 09:09:04 -0500
-Subject: Trac #29665: set $SAGE_PIP_INSTALL_FLAGS for
- --enable-system-site-packages.
-
-We need to pass some special flags to "pip install" to make it do the
-right thing in the precence of system-site packages. Here we introduce
-a new autoconf variable, SAGE_PIP_INSTALL_FLAGS, that will be used
-to pass those flags to the build system.
-
-With autoconf aware of the variable, we substitute its value into the
-sage-build-env-config script for use in spkg-install.in.
----
- build/bin/sage-build-env-config.in | 1 +
- configure.ac                       | 9 +++++++++
- 2 files changed, 10 insertions(+)
-
-diff --git a/build/bin/sage-build-env-config.in b/build/bin/sage-build-env-config.in
-index 92e7dad..ad62e5f 100644
---- a/build/bin/sage-build-env-config.in
-+++ b/build/bin/sage-build-env-config.in
-@@ -53,6 +53,7 @@ export SAGE_PARI_CFG="@SAGE_PARI_CFG@"
- 
- export SAGE_GLPK_PREFIX="@SAGE_GLPK_PREFIX@"
- export SAGE_FREETYPE_PREFIX="@SAGE_FREETYPE_PREFIX@"
-+export SAGE_PIP_INSTALL_FLAGS="@SAGE_PIP_INSTALL_FLAGS@"
- export SAGE_SUITESPARSE_PREFIX="@SAGE_SUITESPARSE_PREFIX@"
- 
- export SAGE_CONFIGURE_FFLAS_FFPACK="@SAGE_CONFIGURE_FFLAS_FFPACK@"
-diff --git a/configure.ac b/configure.ac
-index 6fafb83..6ed07ac 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -441,6 +441,14 @@ AC_ARG_ENABLE(
-     [allow the use of python packages from the system (experimental; default: no)]
-   )], [
-   AS_IF([test "x$enable_system_site_packages" = "xyes"], [
-+    dnl When installing python SPKGs in the presence of system-site
-+    dnl packages, we need to --ignore-installed so that a patched SPKG
-+    dnl can be installed in the presence of an unpatched system package
-+    dnl that appears (to pip) to be identical. The --no-deps flag is
-+    dnl then needed because --ignore-installed will make any installed
-+    dnl dependencies invisible to pip, who does not appreciate that.
-+    SAGE_PIP_INSTALL_FLAGS="${SAGE_PIP_INSTALL_FLAGS} --no-deps --ignore-installed"
-+
-     SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
- 
-     dnl We want to raise an error if the user asked for "system site
-@@ -453,6 +461,7 @@ AC_ARG_ENABLE(
-     with_system_python3="force"
-   ])
- ])
-+AC_SUBST([SAGE_PIP_INSTALL_FLAGS])
- AC_SUBST([SAGE_VENV_FLAGS])
- 
- SAGE_SPKG_OPTIONS=""
--- 
-cgit v1.0-1-gd88e
-
-
-From 3cf365fef84e809e74abd2eb388e7a8e9af9d739 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Tue, 9 Nov 2021 21:01:58 -0500
-Subject: Trac #29665: pass $SAGE_PIP_INSTALL_FLAGS to sdh_pip_install.
-
-Since sdh_pip_install is usually called from spkg-install.in, the
-variables from sage-build-env-config will be available. Here we pass
-the contents of $SAGE_PIP_INSTALL_FLAGS to sage-pip-install
-unconditionally, and hope that the user ignores this variable unless
-he truly knows what he is doing.
----
- build/bin/sage-dist-helpers | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/build/bin/sage-dist-helpers b/build/bin/sage-dist-helpers
-index fe364e5..1032ac3 100644
---- a/build/bin/sage-dist-helpers
-+++ b/build/bin/sage-dist-helpers
-@@ -303,7 +303,11 @@ sdh_store_wheel() {
- }
- 
- sdh_store_and_pip_install_wheel() {
--    local pip_options=""
-+    # The $SAGE_PIP_INSTALL_FLAGS variable is set by sage-build-env-config.
-+    # We skip sanity checking its contents since you should either let sage
-+    # decide what it contains, or really know what you are doing.
-+    local pip_options="${SAGE_PIP_INSTALL_FLAGS}"
-+
-     while [ $# -gt 0 ]; do
-         case $1 in
-             -*) pip_options="$pip_options $1"
--- 
-cgit v1.0-1-gd88e
-
-
-From 50f0438ee857b8f0b7d7ad924e6bba9c5e1bc033 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 13:10:46 -0500
-Subject: Trac #29665: add Gentoo package information for pexpect.
-
----
- build/pkgs/pexpect/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pexpect/distros/gentoo.txt
-
-diff --git a/build/pkgs/pexpect/distros/gentoo.txt b/build/pkgs/pexpect/distros/gentoo.txt
-new file mode 100644
-index 00000000..30c4b60
---- /dev/null
-+++ b/build/pkgs/pexpect/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/pexpect
--- 
-cgit v1.0-1-gd88e
-
-
-From 4d784688d997290b462646fa7f36114a41f3f453 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 13:11:25 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for pexpect.
-
----
- build/pkgs/pexpect/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pexpect/spkg-configure.m4
-
-diff --git a/build/pkgs/pexpect/spkg-configure.m4 b/build/pkgs/pexpect/spkg-configure.m4
-new file mode 100644
-index 00000000..6520856
---- /dev/null
-+++ b/build/pkgs/pexpect/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([pexpect], [SAGE_PYTHON_PACKAGE_CHECK([pexpect])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 6447122dc76a3b7a58340dbed942db66530b5b07 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 13:12:05 -0500
-Subject: Trac #29665: add Gentoo package information for docutils.
-
----
- build/pkgs/docutils/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/docutils/distros/gentoo.txt
-
-diff --git a/build/pkgs/docutils/distros/gentoo.txt b/build/pkgs/docutils/distros/gentoo.txt
-new file mode 100644
-index 00000000..fe4a452
---- /dev/null
-+++ b/build/pkgs/docutils/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/docutils
--- 
-cgit v1.0-1-gd88e
-
-
-From 709041480a5fc729b0ee7f1a8a3b16d4d65321b5 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 13:12:38 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for docutils.
-
----
- build/pkgs/docutils/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/docutils/spkg-configure.m4
-
-diff --git a/build/pkgs/docutils/spkg-configure.m4 b/build/pkgs/docutils/spkg-configure.m4
-new file mode 100644
-index 00000000..3584e45
---- /dev/null
-+++ b/build/pkgs/docutils/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([docutils], [SAGE_PYTHON_PACKAGE_CHECK([docutils])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 782d38b48ab87afccc43fbc071e7b7ed48fb0a20 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 13:14:37 -0500
-Subject: Trac #29665: add Gentoo package information for nbclient.
-
----
- build/pkgs/nbclient/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/nbclient/distros/gentoo.txt
-
-diff --git a/build/pkgs/nbclient/distros/gentoo.txt b/build/pkgs/nbclient/distros/gentoo.txt
-new file mode 100644
-index 00000000..06ff18d
---- /dev/null
-+++ b/build/pkgs/nbclient/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/nbclient
--- 
-cgit v1.0-1-gd88e
-
-
-From 19ce09336532336f69db74381932d51a429dfaca Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 13:15:11 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for nbclient.
-
----
- build/pkgs/nbclient/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/nbclient/spkg-configure.m4
-
-diff --git a/build/pkgs/nbclient/spkg-configure.m4 b/build/pkgs/nbclient/spkg-configure.m4
-new file mode 100644
-index 00000000..14178b7
---- /dev/null
-+++ b/build/pkgs/nbclient/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([nbclient], [SAGE_PYTHON_PACKAGE_CHECK([nbclient])])
--- 
-cgit v1.0-1-gd88e
-
-
-From c063b9de42c1780368000a563d0dbe80b6fff169 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 13:17:36 -0500
-Subject: Trac #29665: add Gentoo package information for argon2_cffi.
-
----
- build/pkgs/argon2_cffi/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/argon2_cffi/distros/gentoo.txt
-
-diff --git a/build/pkgs/argon2_cffi/distros/gentoo.txt b/build/pkgs/argon2_cffi/distros/gentoo.txt
-new file mode 100644
-index 00000000..2f12ca8
---- /dev/null
-+++ b/build/pkgs/argon2_cffi/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/argon2-cffi
--- 
-cgit v1.0-1-gd88e
-
-
-From 0b4d5699dd51ea52550fba7db9e1cbb8bbac1892 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 13:18:35 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for argon2_cffi.
-
----
- build/pkgs/argon2_cffi/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/argon2_cffi/spkg-configure.m4
-
-diff --git a/build/pkgs/argon2_cffi/spkg-configure.m4 b/build/pkgs/argon2_cffi/spkg-configure.m4
-new file mode 100644
-index 00000000..03ebc63
---- /dev/null
-+++ b/build/pkgs/argon2_cffi/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([argon2_cffi], [SAGE_PYTHON_PACKAGE_CHECK([argon2_cffi])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 2b4119558a6e0b1aa512848539a237676b035c83 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:30:48 -0500
-Subject: Trac #29665: fix package name in dateutil's install-requires.txt.
-
----
- build/pkgs/dateutil/install-requires.txt | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/build/pkgs/dateutil/install-requires.txt b/build/pkgs/dateutil/install-requires.txt
-index 0ae93da..face537 100644
---- a/build/pkgs/dateutil/install-requires.txt
-+++ b/build/pkgs/dateutil/install-requires.txt
-@@ -1 +1 @@
--dateutil >=2.8.1
-+python-dateutil >=2.8.1
--- 
-cgit v1.0-1-gd88e
-
-
-From df371b7c4d20a3353d43940306ad22e11aba29da Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:31:41 -0500
-Subject: Trac #29665: add Gentoo package information for dateutil.
-
----
- build/pkgs/dateutil/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/dateutil/distros/gentoo.txt
-
-diff --git a/build/pkgs/dateutil/distros/gentoo.txt b/build/pkgs/dateutil/distros/gentoo.txt
-new file mode 100644
-index 00000000..e129df7
---- /dev/null
-+++ b/build/pkgs/dateutil/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/python-dateutil
--- 
-cgit v1.0-1-gd88e
-
-
-From 577695dfdf661ee26c0ffd767bdbf479d95f7fb4 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:32:21 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for dateutil.
-
----
- build/pkgs/dateutil/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/dateutil/spkg-configure.m4
-
-diff --git a/build/pkgs/dateutil/spkg-configure.m4 b/build/pkgs/dateutil/spkg-configure.m4
-new file mode 100644
-index 00000000..fdcd127
---- /dev/null
-+++ b/build/pkgs/dateutil/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([dateutil], [SAGE_PYTHON_PACKAGE_CHECK([dateutil])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 1984651caac624ec4bb58814ca1d57fe66f9881a Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:33:51 -0500
-Subject: Trac #29665: add Gentoo package information for setuptools_scm.
-
----
- build/pkgs/setuptools_scm/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/setuptools_scm/distros/gentoo.txt
-
-diff --git a/build/pkgs/setuptools_scm/distros/gentoo.txt b/build/pkgs/setuptools_scm/distros/gentoo.txt
-new file mode 100644
-index 00000000..8989597
---- /dev/null
-+++ b/build/pkgs/setuptools_scm/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/setuptools_scm
--- 
-cgit v1.0-1-gd88e
-
-
-From ebf7c854ed966e7353759be485c4f5a57b9a10fa Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:34:49 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for setuptools_scm.
-
----
- build/pkgs/setuptools_scm/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/setuptools_scm/spkg-configure.m4
-
-diff --git a/build/pkgs/setuptools_scm/spkg-configure.m4 b/build/pkgs/setuptools_scm/spkg-configure.m4
-new file mode 100644
-index 00000000..437148c
---- /dev/null
-+++ b/build/pkgs/setuptools_scm/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([setuptools_scm], [
-+  SAGE_PYTHON_PACKAGE_CHECK([setuptools_scm])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From 0dee0d0c28f31b1f619e44c710a3c9e22d2b2544 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:36:33 -0500
-Subject: Trac #29665: add Gentoo package information for nbconvert.
-
----
- build/pkgs/nbconvert/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/nbconvert/distros/gentoo.txt
-
-diff --git a/build/pkgs/nbconvert/distros/gentoo.txt b/build/pkgs/nbconvert/distros/gentoo.txt
-new file mode 100644
-index 00000000..6c45a10
---- /dev/null
-+++ b/build/pkgs/nbconvert/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/nbconvert
--- 
-cgit v1.0-1-gd88e
-
-
-From 473789eb11b1838bc32dc8a63509ee199afc8912 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:37:37 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for nbconvert.
-
----
- build/pkgs/nbconvert/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/nbconvert/spkg-configure.m4
-
-diff --git a/build/pkgs/nbconvert/spkg-configure.m4 b/build/pkgs/nbconvert/spkg-configure.m4
-new file mode 100644
-index 00000000..9b5dee3
---- /dev/null
-+++ b/build/pkgs/nbconvert/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([nbconvert], [SAGE_PYTHON_PACKAGE_CHECK([nbconvert])])
--- 
-cgit v1.0-1-gd88e
-
-
-From f0703b594e57c980d605aa9bc8316c45a7858b3b Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:41:51 -0500
-Subject: Trac #29665: add Gentoo package information for jupyter_core.
-
----
- build/pkgs/jupyter_core/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/jupyter_core/distros/gentoo.txt
-
-diff --git a/build/pkgs/jupyter_core/distros/gentoo.txt b/build/pkgs/jupyter_core/distros/gentoo.txt
-new file mode 100644
-index 00000000..f168c5a
---- /dev/null
-+++ b/build/pkgs/jupyter_core/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/jupyter_core
--- 
-cgit v1.0-1-gd88e
-
-
-From 061a307cc4a6680d8500fde834975064e59540d5 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:42:48 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for jupyter_core.
-
----
- build/pkgs/jupyter_core/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/jupyter_core/spkg-configure.m4
-
-diff --git a/build/pkgs/jupyter_core/spkg-configure.m4 b/build/pkgs/jupyter_core/spkg-configure.m4
-new file mode 100644
-index 00000000..67df9c3
---- /dev/null
-+++ b/build/pkgs/jupyter_core/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([jupyter_core], [
-+  SAGE_PYTHON_PACKAGE_CHECK([jupyter_core])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From b85abe964ce0b98b5842efe9cbad9bdb1c89202f Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:47:08 -0500
-Subject: Trac #29665: add Gentoo package information for jupyter_client.
-
----
- build/pkgs/jupyter_client/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/jupyter_client/distros/gentoo.txt
-
-diff --git a/build/pkgs/jupyter_client/distros/gentoo.txt b/build/pkgs/jupyter_client/distros/gentoo.txt
-new file mode 100644
-index 00000000..4f1de88
---- /dev/null
-+++ b/build/pkgs/jupyter_client/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/jupyter_client
--- 
-cgit v1.0-1-gd88e
-
-
-From 86323ff1e0b2507933df6bc2a96c9175957640c5 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:48:04 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for jupyter_client.
-
----
- build/pkgs/jupyter_client/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/jupyter_client/spkg-configure.m4
-
-diff --git a/build/pkgs/jupyter_client/spkg-configure.m4 b/build/pkgs/jupyter_client/spkg-configure.m4
-new file mode 100644
-index 00000000..fbd3498
---- /dev/null
-+++ b/build/pkgs/jupyter_client/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([jupyter_client], [
-+  SAGE_PYTHON_PACKAGE_CHECK([jupyter_client])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From a8475e27dd30d752d05ab6fea6579e8623501d82 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:48:58 -0500
-Subject: Trac #29665: add Gentoo package information for snowballstemmer.
-
----
- build/pkgs/snowballstemmer/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/snowballstemmer/distros/gentoo.txt
-
-diff --git a/build/pkgs/snowballstemmer/distros/gentoo.txt b/build/pkgs/snowballstemmer/distros/gentoo.txt
-new file mode 100644
-index 00000000..63fd851
---- /dev/null
-+++ b/build/pkgs/snowballstemmer/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/snowballstemmer
--- 
-cgit v1.0-1-gd88e
-
-
-From 0833c9b781062b4ed86d619e050a6f5d60e36080 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:49:38 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for snowballstemmer.
-
----
- build/pkgs/snowballstemmer/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/snowballstemmer/spkg-configure.m4
-
-diff --git a/build/pkgs/snowballstemmer/spkg-configure.m4 b/build/pkgs/snowballstemmer/spkg-configure.m4
-new file mode 100644
-index 00000000..6aa0882
---- /dev/null
-+++ b/build/pkgs/snowballstemmer/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([snowballstemmer], [
-+  SAGE_PYTHON_PACKAGE_CHECK([snowballstemmer])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From 50a1cf2a2bcd7eeec64cbc3f70e3e9fbe5d850fe Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:50:47 -0500
-Subject: Trac #29665: add Gentoo package information for tornado.
-
----
- build/pkgs/tornado/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/tornado/distros/gentoo.txt
-
-diff --git a/build/pkgs/tornado/distros/gentoo.txt b/build/pkgs/tornado/distros/gentoo.txt
-new file mode 100644
-index 00000000..6ae4b9f
---- /dev/null
-+++ b/build/pkgs/tornado/distros/gentoo.txt
-@@ -0,0 +1 @@
-+www-servers/tornado
--- 
-cgit v1.0-1-gd88e
-
-
-From 118f4da6e03476c726363e8e22ecda32f13bfc33 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:51:26 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for tornado.
-
----
- build/pkgs/tornado/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/tornado/spkg-configure.m4
-
-diff --git a/build/pkgs/tornado/spkg-configure.m4 b/build/pkgs/tornado/spkg-configure.m4
-new file mode 100644
-index 00000000..1ee5bc9
---- /dev/null
-+++ b/build/pkgs/tornado/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([tornado], [SAGE_PYTHON_PACKAGE_CHECK([tornado])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 3850701747a6c8ef60840bdfdb589b28d4cd2b9a Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:52:21 -0500
-Subject: Trac #29665: add Gentoo package information for jsonschema.
-
----
- build/pkgs/jsonschema/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/jsonschema/distros/gentoo.txt
-
-diff --git a/build/pkgs/jsonschema/distros/gentoo.txt b/build/pkgs/jsonschema/distros/gentoo.txt
-new file mode 100644
-index 00000000..d708e4c
---- /dev/null
-+++ b/build/pkgs/jsonschema/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/jsonschema
--- 
-cgit v1.0-1-gd88e
-
-
-From 76e3917c8af781af00f642cfada7a79594429e30 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:54:03 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for jsonschema.
-
----
- build/pkgs/jsonschema/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/jsonschema/spkg-configure.m4
-
-diff --git a/build/pkgs/jsonschema/spkg-configure.m4 b/build/pkgs/jsonschema/spkg-configure.m4
-new file mode 100644
-index 00000000..b9e5e21
---- /dev/null
-+++ b/build/pkgs/jsonschema/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([jsonschema], [SAGE_PYTHON_PACKAGE_CHECK([jsonschema])])
--- 
-cgit v1.0-1-gd88e
-
-
-From fd4a16c11669b6dd73ac6325bca820e76db00402 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:55:54 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for
- widgetsnbextension.
-
----
- build/pkgs/widgetsnbextension/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/widgetsnbextension/spkg-configure.m4
-
-diff --git a/build/pkgs/widgetsnbextension/spkg-configure.m4 b/build/pkgs/widgetsnbextension/spkg-configure.m4
-new file mode 100644
-index 00000000..bf82daf
---- /dev/null
-+++ b/build/pkgs/widgetsnbextension/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([widgetsnbextension], [
-+  SAGE_PYTHON_PACKAGE_CHECK([widgetsnbextension])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From 8079a9f384e3c8480e157dd98c3db2f43c987f4e Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:57:20 -0500
-Subject: Trac #29665: add Gentoo package information for importlib_resources.
-
----
- build/pkgs/importlib_resources/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/importlib_resources/distros/gentoo.txt
-
-diff --git a/build/pkgs/importlib_resources/distros/gentoo.txt b/build/pkgs/importlib_resources/distros/gentoo.txt
-new file mode 100644
-index 00000000..d5e1f2c
---- /dev/null
-+++ b/build/pkgs/importlib_resources/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/importlib_resources
--- 
-cgit v1.0-1-gd88e
-
-
-From 2c430d7c52f02779a6c41b98ac2f4edd8b6759c3 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:58:00 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for
- importlib_resources.
-
----
- build/pkgs/importlib_resources/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/importlib_resources/spkg-configure.m4
-
-diff --git a/build/pkgs/importlib_resources/spkg-configure.m4 b/build/pkgs/importlib_resources/spkg-configure.m4
-new file mode 100644
-index 00000000..50df55b
---- /dev/null
-+++ b/build/pkgs/importlib_resources/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([importlib_resources], [
-+  SAGE_PYTHON_PACKAGE_CHECK([importlib_resources])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From 00d13d7bf2e50aae2ccef3b2b30293c70a922af2 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:58:38 -0500
-Subject: Trac #29665: add Gentoo package information for kiwisolver.
-
----
- build/pkgs/kiwisolver/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/kiwisolver/distros/gentoo.txt
-
-diff --git a/build/pkgs/kiwisolver/distros/gentoo.txt b/build/pkgs/kiwisolver/distros/gentoo.txt
-new file mode 100644
-index 00000000..7b30c95
---- /dev/null
-+++ b/build/pkgs/kiwisolver/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/kiwisolver
--- 
-cgit v1.0-1-gd88e
-
-
-From 72b7907ef7ea9fa4ff6948ea34cfe2f693ee6c31 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:59:09 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for kiwisolver.
-
----
- build/pkgs/kiwisolver/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/kiwisolver/spkg-configure.m4
-
-diff --git a/build/pkgs/kiwisolver/spkg-configure.m4 b/build/pkgs/kiwisolver/spkg-configure.m4
-new file mode 100644
-index 00000000..4e7ac97
---- /dev/null
-+++ b/build/pkgs/kiwisolver/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([kiwisolver], [SAGE_PYTHON_PACKAGE_CHECK([kiwisolver])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 479351279e4e0ea7e2d146434f0daba038765cfd Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:00:04 -0500
-Subject: Trac #29665: add Gentoo package information for notebook.
-
----
- build/pkgs/notebook/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/notebook/distros/gentoo.txt
-
-diff --git a/build/pkgs/notebook/distros/gentoo.txt b/build/pkgs/notebook/distros/gentoo.txt
-new file mode 100644
-index 00000000..6475d72
---- /dev/null
-+++ b/build/pkgs/notebook/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/notebook
--- 
-cgit v1.0-1-gd88e
-
-
-From f4d9242ea654977f8ad7865c82eec593e11a36bc Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:01:42 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for notebook.
-
----
- build/pkgs/notebook/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/notebook/spkg-configure.m4
-
-diff --git a/build/pkgs/notebook/spkg-configure.m4 b/build/pkgs/notebook/spkg-configure.m4
-new file mode 100644
-index 00000000..a17ba95
---- /dev/null
-+++ b/build/pkgs/notebook/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([notebook], [SAGE_PYTHON_PACKAGE_CHECK([notebook])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 9837070c7f8e9a71283b84d49d4fd2c94b78a464 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:02:38 -0500
-Subject: Trac #29665: add Gentoo package information for matplotlib_inline.
-
----
- build/pkgs/matplotlib_inline/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/matplotlib_inline/distros/gentoo.txt
-
-diff --git a/build/pkgs/matplotlib_inline/distros/gentoo.txt b/build/pkgs/matplotlib_inline/distros/gentoo.txt
-new file mode 100644
-index 00000000..6a5859c
---- /dev/null
-+++ b/build/pkgs/matplotlib_inline/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/matplotlib-inline
--- 
-cgit v1.0-1-gd88e
-
-
-From 750be73b25b92b4875e47d044360ac0e1116ec3e Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:03:28 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for matplotlib_inline.
-
----
- build/pkgs/matplotlib_inline/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/matplotlib_inline/spkg-configure.m4
-
-diff --git a/build/pkgs/matplotlib_inline/spkg-configure.m4 b/build/pkgs/matplotlib_inline/spkg-configure.m4
-new file mode 100644
-index 00000000..e59658f
---- /dev/null
-+++ b/build/pkgs/matplotlib_inline/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([matplotlib_inline], [
-+  SAGE_PYTHON_PACKAGE_CHECK([matplotlib_inline])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From 273505f49698dcd2ab30c2756b07113c9b7e7791 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:04:10 -0500
-Subject: Trac #29665: add Gentoo package information for ipykernel.
-
----
- build/pkgs/ipykernel/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/ipykernel/distros/gentoo.txt
-
-diff --git a/build/pkgs/ipykernel/distros/gentoo.txt b/build/pkgs/ipykernel/distros/gentoo.txt
-new file mode 100644
-index 00000000..88aab61
---- /dev/null
-+++ b/build/pkgs/ipykernel/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/ipykernel
--- 
-cgit v1.0-1-gd88e
-
-
-From 629ad36c9e4ae0cdff4a013289b4f2911442445e Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:04:46 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for ipykernel.
-
----
- build/pkgs/ipykernel/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/ipykernel/spkg-configure.m4
-
-diff --git a/build/pkgs/ipykernel/spkg-configure.m4 b/build/pkgs/ipykernel/spkg-configure.m4
-new file mode 100644
-index 00000000..94ecc2d
---- /dev/null
-+++ b/build/pkgs/ipykernel/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([ipykernel], [SAGE_PYTHON_PACKAGE_CHECK([ipykernel])])
--- 
-cgit v1.0-1-gd88e
-
-
-From b8d709edb6a24fd5868ee2818b56e78257b2eafa Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:05:26 -0500
-Subject: Trac #29665: add Gentoo package information for prompt_toolkit.
-
----
- build/pkgs/prompt_toolkit/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/prompt_toolkit/distros/gentoo.txt
-
-diff --git a/build/pkgs/prompt_toolkit/distros/gentoo.txt b/build/pkgs/prompt_toolkit/distros/gentoo.txt
-new file mode 100644
-index 00000000..6902484
---- /dev/null
-+++ b/build/pkgs/prompt_toolkit/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/prompt_toolkit
--- 
-cgit v1.0-1-gd88e
-
-
-From 16c0b5e767ae4dac4440510b7253e5c8642b7d2c Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:10:39 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for prompt_toolkit.
-
----
- build/pkgs/prompt_toolkit/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/prompt_toolkit/spkg-configure.m4
-
-diff --git a/build/pkgs/prompt_toolkit/spkg-configure.m4 b/build/pkgs/prompt_toolkit/spkg-configure.m4
-new file mode 100644
-index 00000000..fd8c1a6
---- /dev/null
-+++ b/build/pkgs/prompt_toolkit/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([prompt_toolkit], [
-+  SAGE_PYTHON_PACKAGE_CHECK([prompt_toolkit])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From 0cd9283e8bb6c8ae413fc8f715c021f7ec3ca2c8 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:12:10 -0500
-Subject: Trac #29665: add Gentoo package information for charset_normalizer.
-
----
- build/pkgs/charset_normalizer/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/charset_normalizer/distros/gentoo.txt
-
-diff --git a/build/pkgs/charset_normalizer/distros/gentoo.txt b/build/pkgs/charset_normalizer/distros/gentoo.txt
-new file mode 100644
-index 00000000..eefeb89
---- /dev/null
-+++ b/build/pkgs/charset_normalizer/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/charset_normalizer
--- 
-cgit v1.0-1-gd88e
-
-
-From a04b01a9ab59097d189edcc5ddcb461faede83b2 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:12:54 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for
- charset_normalizer.
-
----
- build/pkgs/charset_normalizer/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/charset_normalizer/spkg-configure.m4
-
-diff --git a/build/pkgs/charset_normalizer/spkg-configure.m4 b/build/pkgs/charset_normalizer/spkg-configure.m4
-new file mode 100644
-index 00000000..18b18cf
---- /dev/null
-+++ b/build/pkgs/charset_normalizer/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([charset_normalizer], [
-+  SAGE_PYTHON_PACKAGE_CHECK([charset_normalizer])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From d2ea08138711c53046f977b586f33b09b176b2e3 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:13:37 -0500
-Subject: Trac #29665: add Gentoo package information for prometheus_client.
-
----
- build/pkgs/prometheus_client/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/prometheus_client/distros/gentoo.txt
-
-diff --git a/build/pkgs/prometheus_client/distros/gentoo.txt b/build/pkgs/prometheus_client/distros/gentoo.txt
-new file mode 100644
-index 00000000..aa2889c
---- /dev/null
-+++ b/build/pkgs/prometheus_client/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/prometheus_client
--- 
-cgit v1.0-1-gd88e
-
-
-From 5b0393200e9edd3e26b8a55ba67e5710e7403fcb Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:15:09 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for prometheus_client.
-
----
- build/pkgs/prometheus_client/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/prometheus_client/spkg-configure.m4
-
-diff --git a/build/pkgs/prometheus_client/spkg-configure.m4 b/build/pkgs/prometheus_client/spkg-configure.m4
-new file mode 100644
-index 00000000..b494588
---- /dev/null
-+++ b/build/pkgs/prometheus_client/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([prometheus_client], [
-+  SAGE_PYTHON_PACKAGE_CHECK([prometheus_client])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From cdcd85284f43ca4ad18353ec3527b2901e57b788 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:17:23 -0500
-Subject: Trac #29665: add Gentoo package information for pybind11.
-
----
- build/pkgs/pybind11/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pybind11/distros/gentoo.txt
-
-diff --git a/build/pkgs/pybind11/distros/gentoo.txt b/build/pkgs/pybind11/distros/gentoo.txt
-new file mode 100644
-index 00000000..0c500b3
---- /dev/null
-+++ b/build/pkgs/pybind11/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/pybind11
--- 
-cgit v1.0-1-gd88e
-
-
-From efdd1eb64c4799fe3cdf2221824182941b3fda2d Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:17:51 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for pybind11.
-
----
- build/pkgs/pybind11/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pybind11/spkg-configure.m4
-
-diff --git a/build/pkgs/pybind11/spkg-configure.m4 b/build/pkgs/pybind11/spkg-configure.m4
-new file mode 100644
-index 00000000..cce1cf5
---- /dev/null
-+++ b/build/pkgs/pybind11/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([pybind11], [SAGE_PYTHON_PACKAGE_CHECK([pybind11])])
--- 
-cgit v1.0-1-gd88e
-
-
-From b2128f33b68ea33927284116ea598dd186902400 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:19:23 -0500
-Subject: Trac #29665: add Gentoo package information for pkgconfig.
-
----
- build/pkgs/pkgconfig/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pkgconfig/distros/gentoo.txt
-
-diff --git a/build/pkgs/pkgconfig/distros/gentoo.txt b/build/pkgs/pkgconfig/distros/gentoo.txt
-new file mode 100644
-index 00000000..32e8618
---- /dev/null
-+++ b/build/pkgs/pkgconfig/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/pkgconfig
--- 
-cgit v1.0-1-gd88e
-
-
-From 5b373b49e06aadeb36dc57e500da9a322460e658 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:19:54 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for pkgconfig.
-
----
- build/pkgs/pkgconfig/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pkgconfig/spkg-configure.m4
-
-diff --git a/build/pkgs/pkgconfig/spkg-configure.m4 b/build/pkgs/pkgconfig/spkg-configure.m4
-new file mode 100644
-index 00000000..6708293
---- /dev/null
-+++ b/build/pkgs/pkgconfig/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([pkgconfig], [SAGE_PYTHON_PACKAGE_CHECK([pkgconfig])])
--- 
-cgit v1.0-1-gd88e
-
-
-From ce578729eb0d14baab365351ba9a9ffffb7b79f2 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:21:10 -0500
-Subject: Trac #29665: add Gentoo package information for
- sphinxcontrib_serializinghtml.
-
----
- build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
-
-diff --git a/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt b/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
-new file mode 100644
-index 00000000..38bca8f
---- /dev/null
-+++ b/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/sphinxcontrib-serializinghtml
--- 
-cgit v1.0-1-gd88e
-
-
-From bb0f42c32bbce0e4488678312f5e2d88c6f42c9b Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:21:54 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for
- sphinxcontrib_serializinghtml.
-
----
- build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
-
-diff --git a/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4 b/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
-new file mode 100644
-index 00000000..be8e625
---- /dev/null
-+++ b/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([sphinxcontrib_serializinghtml], [
-+  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_serializinghtml])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From e47dcf985e40475de85c9436a85537751318bc3d Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:22:54 -0500
-Subject: Trac #29665: add Gentoo package information for sphinxcontrib_jsmath.
-
----
- build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
-
-diff --git a/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt b/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
-new file mode 100644
-index 00000000..041a471
---- /dev/null
-+++ b/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/sphinxcontrib-jsmath
--- 
-cgit v1.0-1-gd88e
-
-
-From 72cff6fd35f93de4fa855bc870569dd733ff5c24 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:23:49 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for
- sphinxcontrib_jsmath.
-
----
- build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
-
-diff --git a/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4 b/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
-new file mode 100644
-index 00000000..e46bde2
---- /dev/null
-+++ b/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([sphinxcontrib_jsmath], [
-+  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_jsmath])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From a36395d70f759449cd63c1b0990fbdcb4cb25ca0 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:24:26 -0500
-Subject: Trac #29665: add Gentoo package information for
- sphinxcontrib_devhelp.
-
----
- build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
-
-diff --git a/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
-new file mode 100644
-index 00000000..9b5c899
---- /dev/null
-+++ b/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/sphinxcontrib-devhelp
--- 
-cgit v1.0-1-gd88e
-
-
-From 9953a5dd1646ed0ad51d2e3935cf609bc9e7fd1c Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:25:04 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for
- sphinxcontrib_devhelp.
-
----
- build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
-
-diff --git a/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
-new file mode 100644
-index 00000000..8728136
---- /dev/null
-+++ b/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([sphinxcontrib_devhelp], [
-+  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_devhelp])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From b199d5363aad93f3cb23f7904c9553a28b06348f Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:25:53 -0500
-Subject: Trac #29665: add Gentoo package information for sphinxcontrib_qthelp.
-
----
- build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
-
-diff --git a/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
-new file mode 100644
-index 00000000..7210099
---- /dev/null
-+++ b/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/sphinxcontrib-qthelp
--- 
-cgit v1.0-1-gd88e
-
-
-From 94ac8806739f3938e73f5857328e91e0d42e98d2 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:26:28 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for
- sphinxcontrib_qthelp.
-
----
- build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
-
-diff --git a/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
-new file mode 100644
-index 00000000..81ea5e1
---- /dev/null
-+++ b/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([sphinxcontrib_qthelp], [
-+  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_qthelp])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From beedc154aa405e8a58aee8889f510db07adc89a7 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:26:54 -0500
-Subject: Trac #29665: add Gentoo package information for
- sphinxcontrib_applehelp.
-
----
- build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
-
-diff --git a/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
-new file mode 100644
-index 00000000..66ac8da
---- /dev/null
-+++ b/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/sphinxcontrib-applehelp
--- 
-cgit v1.0-1-gd88e
-
-
-From 07d47c3673d6b35423b71f621cb400989c0101c2 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:27:19 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for
- sphinxcontrib_applehelp.
-
----
- build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
-
-diff --git a/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
-new file mode 100644
-index 00000000..e834aed
---- /dev/null
-+++ b/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([sphinxcontrib_applehelp], [
-+  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_applehelp])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From 333a66546c5d421735c49dbafd7370a827f22781 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:27:46 -0500
-Subject: Trac #29665: add Gentoo package information for
- sphinxcontrib_htmlhelp.
-
----
- build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
-
-diff --git a/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
-new file mode 100644
-index 00000000..e080bac
---- /dev/null
-+++ b/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/sphinxcontrib-htmlhelp
--- 
-cgit v1.0-1-gd88e
-
-
-From bfaeb3962254439b63f1f2e0e883de462c7831be Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:29:18 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for
- sphinxcontrib_htmlhelp.
-
----
- build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
-
-diff --git a/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
-new file mode 100644
-index 00000000..c77b003
---- /dev/null
-+++ b/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([sphinxcontrib_htmlhelp], [
-+  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_htmlhelp])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From 782cde13da06e8b85806cb7cbc8aceee0364e639 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:30:23 -0500
-Subject: Trac #29665: add Gentoo package information for jupyterlab_pygments.
-
----
- build/pkgs/jupyterlab_pygments/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/jupyterlab_pygments/distros/gentoo.txt
-
-diff --git a/build/pkgs/jupyterlab_pygments/distros/gentoo.txt b/build/pkgs/jupyterlab_pygments/distros/gentoo.txt
-new file mode 100644
-index 00000000..c57b4f1
---- /dev/null
-+++ b/build/pkgs/jupyterlab_pygments/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/jupyterlab_pygments
--- 
-cgit v1.0-1-gd88e
-
-
-From 39f974cfa4a8c6e5dd897f152f83ec82f40ee9f7 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:31:13 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for
- jupyterlab_pygments.
-
----
- build/pkgs/jupyterlab_pygments/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/jupyterlab_pygments/spkg-configure.m4
-
-diff --git a/build/pkgs/jupyterlab_pygments/spkg-configure.m4 b/build/pkgs/jupyterlab_pygments/spkg-configure.m4
-new file mode 100644
-index 00000000..e46e21f
---- /dev/null
-+++ b/build/pkgs/jupyterlab_pygments/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([jupyterlab_pygments], [
-+  SAGE_PYTHON_PACKAGE_CHECK([jupyterlab_pygments])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From db704620700fd36cec3bf6125938f3ee00a9eb5e Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 30 Dec 2021 20:29:15 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for ply.
-
----
- build/pkgs/ply/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/ply/spkg-configure.m4
-
-diff --git a/build/pkgs/ply/spkg-configure.m4 b/build/pkgs/ply/spkg-configure.m4
-new file mode 100644
-index 00000000..ffb0030
---- /dev/null
-+++ b/build/pkgs/ply/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([ply], [SAGE_PYTHON_PACKAGE_CHECK([ply])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 6aac31dabcdfdef228d7780398a3fda1a4cc566f Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 30 Dec 2021 20:29:51 -0500
-Subject: Trac #29665: add Gentoo package information for ply.
-
----
- build/pkgs/ply/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/ply/distros/gentoo.txt
-
-diff --git a/build/pkgs/ply/distros/gentoo.txt b/build/pkgs/ply/distros/gentoo.txt
-new file mode 100644
-index 00000000..c8b1630
---- /dev/null
-+++ b/build/pkgs/ply/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/ply
--- 
-cgit v1.0-1-gd88e
-
-
-From bb8d3372936ec37470d69687a0f91592129460ae Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 30 Dec 2021 20:30:33 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for gast.
-
----
- build/pkgs/gast/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/gast/spkg-configure.m4
-
-diff --git a/build/pkgs/gast/spkg-configure.m4 b/build/pkgs/gast/spkg-configure.m4
-new file mode 100644
-index 00000000..26ec59f
---- /dev/null
-+++ b/build/pkgs/gast/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([gast], [SAGE_PYTHON_PACKAGE_CHECK([gast])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 1cdc4046a88f1c2b4e5c162f66c6db6090b24194 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 30 Dec 2021 20:31:15 -0500
-Subject: Trac #29665: add Gentoo package information for gast.
-
----
- build/pkgs/gast/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/gast/distros/gentoo.txt
-
-diff --git a/build/pkgs/gast/distros/gentoo.txt b/build/pkgs/gast/distros/gentoo.txt
-new file mode 100644
-index 00000000..3be5e7e
---- /dev/null
-+++ b/build/pkgs/gast/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/gast
--- 
-cgit v1.0-1-gd88e
-
-
-From 96068b8a3742b65d619190e1d9fa5db399e6b4f2 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 30 Dec 2021 20:32:20 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for pythran.
-
----
- build/pkgs/pythran/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pythran/spkg-configure.m4
-
-diff --git a/build/pkgs/pythran/spkg-configure.m4 b/build/pkgs/pythran/spkg-configure.m4
-new file mode 100644
-index 00000000..592e95b
---- /dev/null
-+++ b/build/pkgs/pythran/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([pythran], [SAGE_PYTHON_PACKAGE_CHECK([pythran])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 1fa0fad3ae8f7e559c6fc315c6773a7d8aac0bfb Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 30 Dec 2021 20:32:55 -0500
-Subject: Trac #29665: add Gentoo package information for pythran.
-
----
- build/pkgs/pythran/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pythran/distros/gentoo.txt
-
-diff --git a/build/pkgs/pythran/distros/gentoo.txt b/build/pkgs/pythran/distros/gentoo.txt
-new file mode 100644
-index 00000000..1bb7cdc
---- /dev/null
-+++ b/build/pkgs/pythran/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/pythran
--- 
-cgit v1.0-1-gd88e
-
-
-From d26370e5b8c88e76abfb7c27e3defb71c9e9f711 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 30 Dec 2021 20:33:50 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for beniget.
-
----
- build/pkgs/beniget/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/beniget/spkg-configure.m4
-
-diff --git a/build/pkgs/beniget/spkg-configure.m4 b/build/pkgs/beniget/spkg-configure.m4
-new file mode 100644
-index 00000000..8ae6101
---- /dev/null
-+++ b/build/pkgs/beniget/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([beniget], [SAGE_PYTHON_PACKAGE_CHECK([beniget])])
--- 
-cgit v1.0-1-gd88e
-
-
-From eeeb296ed9b9694a865534103fd58e62a151ef5e Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 30 Dec 2021 20:34:22 -0500
-Subject: Trac #29665: add Gentoo package information for beniget.
-
----
- build/pkgs/beniget/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/beniget/distros/gentoo.txt
-
-diff --git a/build/pkgs/beniget/distros/gentoo.txt b/build/pkgs/beniget/distros/gentoo.txt
-new file mode 100644
-index 00000000..1a5972c
---- /dev/null
-+++ b/build/pkgs/beniget/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/beniget
--- 
-cgit v1.0-1-gd88e
-
-
-From 078b2ff272d0eeff5cce40ad7eb176d9ddd7bdff Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 30 Dec 2021 20:35:37 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for alabaster.
-
----
- build/pkgs/alabaster/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/alabaster/spkg-configure.m4
-
-diff --git a/build/pkgs/alabaster/spkg-configure.m4 b/build/pkgs/alabaster/spkg-configure.m4
-new file mode 100644
-index 00000000..4eca6e0
---- /dev/null
-+++ b/build/pkgs/alabaster/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([alabaster], [SAGE_PYTHON_PACKAGE_CHECK([alabaster])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 7dc264353e5f64110431ff28c1b8b7e89699e9bd Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 30 Dec 2021 20:36:06 -0500
-Subject: Trac #29665: add Gentoo package information for alabaster.
-
----
- build/pkgs/alabaster/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/alabaster/distros/gentoo.txt
-
-diff --git a/build/pkgs/alabaster/distros/gentoo.txt b/build/pkgs/alabaster/distros/gentoo.txt
-new file mode 100644
-index 00000000..cffece6
---- /dev/null
-+++ b/build/pkgs/alabaster/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/alabaster
--- 
-cgit v1.0-1-gd88e
-
-
-From 8011a5e675e7e61a77ce34a299ee961a9f44253f Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 30 Dec 2021 20:43:59 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for
- importlib_metadata.
-
----
- build/pkgs/importlib_metadata/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/importlib_metadata/spkg-configure.m4
-
-diff --git a/build/pkgs/importlib_metadata/spkg-configure.m4 b/build/pkgs/importlib_metadata/spkg-configure.m4
-new file mode 100644
-index 00000000..0554e52
---- /dev/null
-+++ b/build/pkgs/importlib_metadata/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([importlib_metadata], [
-+  SAGE_PYTHON_PACKAGE_CHECK([importlib_metadata])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From 928ca0019e3ec6c4541a16b28bcc6710df6d010b Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 30 Dec 2021 20:44:28 -0500
-Subject: Trac #29665: add Gentoo package information for importlib_metadata.
-
----
- build/pkgs/importlib_metadata/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/importlib_metadata/distros/gentoo.txt
-
-diff --git a/build/pkgs/importlib_metadata/distros/gentoo.txt b/build/pkgs/importlib_metadata/distros/gentoo.txt
-new file mode 100644
-index 00000000..4f92786
---- /dev/null
-+++ b/build/pkgs/importlib_metadata/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/importlib_metadata
--- 
-cgit v1.0-1-gd88e
-
-
-From 135f184f7498a2046065e669723e68efe2d65cee Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 30 Dec 2021 21:16:58 -0500
-Subject: Trac #29665: fix sage.misc.package doctest with system alabaster.
-
-When alabaster from the system is used, these tests won't be able to
-find its SPKG installed. Add some ellipses, and switch one test to
-look for sage_conf instead.
----
- src/sage/misc/package.py | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/src/sage/misc/package.py b/src/sage/misc/package.py
-index 84f3d50..c7ad206 100644
---- a/src/sage/misc/package.py
-+++ b/src/sage/misc/package.py
-@@ -386,9 +386,9 @@ def installed_packages(exclude_pip=True):
-     EXAMPLES::
- 
-         sage: sorted(installed_packages().keys())  # optional - build
--        [...'gmpy2', ...'sage_conf', ...]
--        sage: installed_packages()['gmpy2']  # optional - build, random
--        '2.1.0b5'
-+        [...'sage_conf', ...]
-+        sage: installed_packages()['sage_conf']  # optional - build, random
-+        '9.5'
- 
-     .. SEEALSO::
- 
--- 
-cgit v1.0-1-gd88e
-
diff --git a/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch b/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
deleted file mode 100644
index 093e3d56eb33..000000000000
--- a/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-More site packages not included in trac 29665
-
-diff --git a/build/pkgs/gmpy2/spkg-configure.m4 b/build/pkgs/gmpy2/spkg-configure.m4
-new file mode 100644
-index 0000000000..2d0390f7db
---- /dev/null
-+++ b/build/pkgs/gmpy2/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([gmpy2], [SAGE_PYTHON_PACKAGE_CHECK([gmpy2])])
-diff --git a/build/pkgs/sphinx/spkg-configure.m4 b/build/pkgs/sphinx/spkg-configure.m4
-new file mode 100644
-index 0000000000..e149fbb2cf
---- /dev/null
-+++ b/build/pkgs/sphinx/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([sphinx], [SAGE_PYTHON_PACKAGE_CHECK([sphinx])])
-diff --git a/build/pkgs/typing_extensions/spkg-configure.m4 b/build/pkgs/typing_extensions/spkg-configure.m4
-new file mode 100644
-index 0000000000..d475fd8257
---- /dev/null
-+++ b/build/pkgs/typing_extensions/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([typing_extensions], [SAGE_PYTHON_PACKAGE_CHECK([typing_extensions])])
--- 
-diff --git a/build/pkgs/gmpy2/install-requires.txt b/build/pkgs/gmpy2/install-requires.txt
-index 51d24518ef..c25feff557 100644
---- a/build/pkgs/gmpy2/install-requires.txt
-+++ b/build/pkgs/gmpy2/install-requires.txt
-@@ -1,3 +1 @@
--# We would like to write gmpy2 >=2.1.0b5, but pipenv does not accept prereleases in version ranges
--# https://github.com/pypa/pipenv/issues/1760
--gmpy2 ==2.1.0rc1
-+gmpy2 >=2.1
-diff --git a/build/pkgs/ptyprocess/install-requires.txt b/build/pkgs/ptyprocess/install-requires.txt
-index de89260872..7c336f636c 100644
---- a/build/pkgs/ptyprocess/install-requires.txt
-+++ b/build/pkgs/ptyprocess/install-requires.txt
-@@ -1,3 +1,3 @@
--ptyprocess ==0.5.1
-+ptyprocess
- # https://trac.sagemath.org/ticket/31280#comment:42 and following
- # sagelib is not compatible with ptyprocess 0.5.2, 0.6, and 0.7
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index de9fe5177766..e182267cdb96 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -39,6 +39,21 @@ _spkg_skip="appnope fonttools importlib_resources pycygwin
 # Force use these sage packages from system
 _spkg_system="cppy cython cysignals cypari pplpy fpylll memory_allocator
  primecountpy
+ alabaster argcomplete argon2_cffi attrs babel backcall beniget bleach certifi
+ cffi charset_normalizer cvxopt cycler dateutil debugpy decorator defusedxml
+ docutils entrypoints flit_core gast gmpy2 html5lib idna imagesize
+ importlib_metadata importlib_resources ipykernel ipython ipython_genutils
+ ipywidgets jedi jinja2 jsonschema jupyter_client jupyter_core
+ jupyterlab_pygments kiwisolver markupsafe matplotlib matplotlib_inline mistune
+ mpmath nbclient nbconvert nbformat nest_asyncio networkx notebook numpy
+ packaging pandocfilters parso pexpect pickleshare pillow pip pkgconfig pluggy
+ ply prometheus_client prompt_toolkit ptyprocess py pybind11 pycparser pygments
+ pyparsing pyrsistent pythran pytz pyzmq requests scipy send2trash setuptools
+ setuptools_scm simplegeneric six snowballstemmer sphinx
+ sphinxcontrib_applehelp sphinxcontrib_devhelp sphinxcontrib_htmlhelp
+ sphinxcontrib_jsmath sphinxcontrib_qthelp sphinxcontrib_serializinghtml sympy
+ terminado testpath texttable tomli tornado traitlets typing_extensions tzlocal
+ urllib3 wcwidth webencodings wheel widgetsnbextension zipp
  linbox gap maxima"
 
 # Databases to be used from system

From c4396fa600bb0682f6eeb8d2431493d634269099 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Wed, 19 Jan 2022 19:13:37 -0300
Subject: [PATCH 6/9] sagemath: simplify ratpoints patch

---
 .../patches/zzz-dont_link_ratpoints.patch     |   8 +
 .../patches/zzz-remove_ratpoints.patch        | 887 ------------------
 srcpkgs/sagemath/template                     |   4 +-
 3 files changed, 11 insertions(+), 888 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/zzz-dont_link_ratpoints.patch
 delete mode 100644 srcpkgs/sagemath/patches/zzz-remove_ratpoints.patch

diff --git a/srcpkgs/sagemath/patches/zzz-dont_link_ratpoints.patch b/srcpkgs/sagemath/patches/zzz-dont_link_ratpoints.patch
new file mode 100644
index 000000000000..b3c5c734298a
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-dont_link_ratpoints.patch
@@ -0,0 +1,8 @@
+--- a/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx
++++ b/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx
+@@ -1,5 +1,3 @@
+-# distutils: libraries = ratpoints
+-
+ r"""
+ Descent on elliptic curves over `\QQ` with a 2-isogeny
+ """
diff --git a/srcpkgs/sagemath/patches/zzz-remove_ratpoints.patch b/srcpkgs/sagemath/patches/zzz-remove_ratpoints.patch
deleted file mode 100644
index 0842d9d7f6d5..000000000000
--- a/srcpkgs/sagemath/patches/zzz-remove_ratpoints.patch
+++ /dev/null
@@ -1,887 +0,0 @@
-From 3178a5e1e4f7174343fd913494ae255b3e05fb85 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
-Date: Mon, 17 Jan 2022 21:04:42 -0300
-Subject: [PATCH] ratpoints: remove deprecated package
-
----
- .github/workflows/ci-cygwin-minimal.yml       |   2 +-
- .github/workflows/ci-cygwin-standard.yml      |   2 +-
- COPYING.txt                                   |   1 -
- build/pkgs/ratpoints/SPKG.rst                 |  29 --
- build/pkgs/ratpoints/checksums.ini            |   4 -
- build/pkgs/ratpoints/dependencies             |   5 -
- build/pkgs/ratpoints/distros/arch.txt         |   1 -
- build/pkgs/ratpoints/distros/conda.txt        |   1 -
- build/pkgs/ratpoints/distros/debian.txt       |   1 -
- build/pkgs/ratpoints/distros/nix.txt          |   1 -
- build/pkgs/ratpoints/distros/repology.txt     |   1 -
- build/pkgs/ratpoints/package-version.txt      |   1 -
- build/pkgs/ratpoints/patches/Makefile.patch   |  37 ---
- .../patches/sturm_and_rp_private.patch        | 194 ------------
- build/pkgs/ratpoints/spkg-install.in          |  46 ---
- build/pkgs/ratpoints/type                     |   1 -
- build/pkgs/sagelib/dependencies               |   2 +-
- src/sage/libs/ratpoints.pxd                   |  74 -----
- src/sage/libs/ratpoints.pyx                   | 283 ------------------
- .../elliptic_curves/descent_two_isogeny.pyx   |   2 -
- src/sage_setup/library_order.py               |   2 +-
- 21 files changed, 4 insertions(+), 686 deletions(-)
- delete mode 100644 build/pkgs/ratpoints/SPKG.rst
- delete mode 100644 build/pkgs/ratpoints/checksums.ini
- delete mode 100644 build/pkgs/ratpoints/dependencies
- delete mode 100644 build/pkgs/ratpoints/distros/arch.txt
- delete mode 100644 build/pkgs/ratpoints/distros/conda.txt
- delete mode 100644 build/pkgs/ratpoints/distros/debian.txt
- delete mode 100644 build/pkgs/ratpoints/distros/nix.txt
- delete mode 100644 build/pkgs/ratpoints/distros/repology.txt
- delete mode 100644 build/pkgs/ratpoints/package-version.txt
- delete mode 100644 build/pkgs/ratpoints/patches/Makefile.patch
- delete mode 100644 build/pkgs/ratpoints/patches/sturm_and_rp_private.patch
- delete mode 100644 build/pkgs/ratpoints/spkg-install.in
- delete mode 100644 build/pkgs/ratpoints/type
- delete mode 100644 src/sage/libs/ratpoints.pxd
- delete mode 100644 src/sage/libs/ratpoints.pyx
-
-diff --git a/.github/workflows/ci-cygwin-minimal.yml b/.github/workflows/ci-cygwin-minimal.yml
-index 9e847e7474..9df1365657 100644
---- a/.github/workflows/ci-cygwin-minimal.yml
-+++ b/.github/workflows/ci-cygwin-minimal.yml
-@@ -217,7 +217,7 @@ jobs:
-     env:
-       STAGE: ii-b
-       PREVIOUS_STAGES: i-*
--      TARGETS: singular maxima gap pari gfan palp flintqs ratpoints arb ecm givaro
-+      TARGETS: singular maxima gap pari gfan palp flintqs arb ecm givaro
-       LOCAL_ARTIFACT_NAME: sage-local-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
-       LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
- 
-diff --git a/.github/workflows/ci-cygwin-standard.yml b/.github/workflows/ci-cygwin-standard.yml
-index cbbe0f46a8..8aee1c2c3c 100644
---- a/.github/workflows/ci-cygwin-standard.yml
-+++ b/.github/workflows/ci-cygwin-standard.yml
-@@ -217,7 +217,7 @@ jobs:
-     env:
-       STAGE: ii-b
-       PREVIOUS_STAGES: i-*
--      TARGETS: singular maxima gap pari gfan palp flintqs ratpoints arb ecm givaro
-+      TARGETS: singular maxima gap pari gfan palp flintqs arb ecm givaro
-       LOCAL_ARTIFACT_NAME: sage-local-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
-       LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
- 
-diff --git a/COPYING.txt b/COPYING.txt
-index 1176a856a0..a3e9cc6645 100644
---- a/COPYING.txt
-+++ b/COPYING.txt
-@@ -107,7 +107,6 @@ pynac                       GPLv2+
- pyparsing                   MIT License
- python                      Python License (see below)
- R                           GPLv2+
--ratpoints                   GPLv2+
- readline                    GPLv3+
- rpy                         GPLv2+
- rubiks/dietz                GPL, any version
-diff --git a/build/pkgs/ratpoints/SPKG.rst b/build/pkgs/ratpoints/SPKG.rst
-deleted file mode 100644
-index 6607094bec..0000000000
---- a/build/pkgs/ratpoints/SPKG.rst
-+++ /dev/null
-@@ -1,29 +0,0 @@
--ratpoints: Find rational points on hyperelliptic curves
--=======================================================
--
--Description
-------------
--
--Michael Stoll's program which searches for rational points on
--hyperelliptic curves.
--
--NOTE: the ratpoints package has been assimilated by PARI/GP. Therefore,
--this package (as Sage package) is deprecated. In the future, it will be
--removed from Sage.
--
--
--Upstream Contact
------------------
--
---  Author: Michael Stoll
---  Email: Michael.Stoll@uni-bayreuth.de
---  Website: http://www.mathe2.uni-bayreuth.de/stoll/programs/
--
--
--Note on SSE2 instructions
--~~~~~~~~~~~~~~~~~~~~~~~~~
--
---  On several architectures, the SSE2 instructions used by ratpoints
--   cause
--   compiler errors. In the case that ratpoints fails to build with SSE2
--   instructions enabled, the build is repeated with SSE2 disabled.
-diff --git a/build/pkgs/ratpoints/checksums.ini b/build/pkgs/ratpoints/checksums.ini
-deleted file mode 100644
-index 46ba1c9ec1..0000000000
---- a/build/pkgs/ratpoints/checksums.ini
-+++ /dev/null
-@@ -1,4 +0,0 @@
--tarball=ratpoints-VERSION.tar.bz2
--sha1=14fbc3dd50742794e0b33d2dd1217e5dd8ad2623
--md5=9bf091d1b90132433f0a1fc6b585d024
--cksum=670991933
-diff --git a/build/pkgs/ratpoints/dependencies b/build/pkgs/ratpoints/dependencies
-deleted file mode 100644
-index 9a77ea16f7..0000000000
---- a/build/pkgs/ratpoints/dependencies
-+++ /dev/null
-@@ -1,5 +0,0 @@
--$(MP_LIBRARY)
--
------------
--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/ratpoints/distros/arch.txt b/build/pkgs/ratpoints/distros/arch.txt
-deleted file mode 100644
-index e137758627..0000000000
---- a/build/pkgs/ratpoints/distros/arch.txt
-+++ /dev/null
-@@ -1 +0,0 @@
--ratpoints
-diff --git a/build/pkgs/ratpoints/distros/conda.txt b/build/pkgs/ratpoints/distros/conda.txt
-deleted file mode 100644
-index e137758627..0000000000
---- a/build/pkgs/ratpoints/distros/conda.txt
-+++ /dev/null
-@@ -1 +0,0 @@
--ratpoints
-diff --git a/build/pkgs/ratpoints/distros/debian.txt b/build/pkgs/ratpoints/distros/debian.txt
-deleted file mode 100644
-index dabd28d624..0000000000
---- a/build/pkgs/ratpoints/distros/debian.txt
-+++ /dev/null
-@@ -1 +0,0 @@
--libratpoints-dev
-diff --git a/build/pkgs/ratpoints/distros/nix.txt b/build/pkgs/ratpoints/distros/nix.txt
-deleted file mode 100644
-index e137758627..0000000000
---- a/build/pkgs/ratpoints/distros/nix.txt
-+++ /dev/null
-@@ -1 +0,0 @@
--ratpoints
-diff --git a/build/pkgs/ratpoints/distros/repology.txt b/build/pkgs/ratpoints/distros/repology.txt
-deleted file mode 100644
-index e137758627..0000000000
---- a/build/pkgs/ratpoints/distros/repology.txt
-+++ /dev/null
-@@ -1 +0,0 @@
--ratpoints
-diff --git a/build/pkgs/ratpoints/package-version.txt b/build/pkgs/ratpoints/package-version.txt
-deleted file mode 100644
-index efed46a7bd..0000000000
---- a/build/pkgs/ratpoints/package-version.txt
-+++ /dev/null
-@@ -1 +0,0 @@
--2.1.3.p5
-diff --git a/build/pkgs/ratpoints/patches/Makefile.patch b/build/pkgs/ratpoints/patches/Makefile.patch
-deleted file mode 100644
-index 093d7c0018..0000000000
---- a/build/pkgs/ratpoints/patches/Makefile.patch
-+++ /dev/null
-@@ -1,37 +0,0 @@
----- src/Makefile	2009-10-01 01:08:54.000000000 +0200
--+++ patches/Makefile	2012-03-17 13:57:33.026315142 +0100
--@@ -21,11 +21,11 @@
-- #
-- #    Michael Stoll, September 21, 2009
-- 
---CC = gcc
--+CC ?= gcc
-- RM = rm -f
-- INSTALL = cp
-- 
---INSTALL_DIR = /usr/local
--+INSTALL_DIR ?= /usr/local
-- 
-- DISTFILES = Makefile ratpoints.h rp-private.h primes.h \
--             gen_find_points_h.c gen_init_sieve_h.c \
--@@ -47,14 +47,14 @@
-- 	diff -q testbase rptest.out
-- 
-- install-bin: ratpoints
---	${INSTALL} ratpoints ${INSTALL_DIR}/bin/
---	chmod 755 ${INSTALL_DIR}/bin/ratpoints
--+	${INSTALL} ratpoints "${INSTALL_DIR}/bin/"
--+	chmod 755 "${INSTALL_DIR}/bin/ratpoints"
-- 
-- install-lib: ratpoints.h libratpoints.a
---	${INSTALL} ratpoints.h ${INSTALL_DIR}/include/
---	chmod 644 ${INSTALL_DIR}/include/ratpoints.h
---	${INSTALL} libratpoints.a ${INSTALL_DIR}/lib/
---	chmod 644 ${INSTALL_DIR}/lib/libratpoints.a
--+	${INSTALL} ratpoints.h "${INSTALL_DIR}/include/"
--+	chmod 644 "${INSTALL_DIR}/include/ratpoints.h"
--+	${INSTALL} libratpoints.a "${INSTALL_DIR}/lib/"
--+	chmod 644 "${INSTALL_DIR}/lib/libratpoints.a"
-- 
-- install: install-bin install-lib
-- 
-diff --git a/build/pkgs/ratpoints/patches/sturm_and_rp_private.patch b/build/pkgs/ratpoints/patches/sturm_and_rp_private.patch
-deleted file mode 100644
-index 664198c4de..0000000000
---- a/build/pkgs/ratpoints/patches/sturm_and_rp_private.patch
-+++ /dev/null
-@@ -1,194 +0,0 @@
--diff --git a/rp-private.h b/rp-private.h
--index b4c7dad..0c7193e 100644
----- a/rp-private.h
--+++ b/rp-private.h
--@@ -36,7 +36,7 @@
-- #define LONG_SHIFT ((LONG_LENGTH == 16) ? 4 : \
--                     (LONG_LENGTH == 32) ? 5 : \
-- 		    (LONG_LENGTH == 64) ? 6 : 0)
---#define LONG_MASK (~(-1L<<LONG_SHIFT))
--+#define LONG_MASK (~(-(1L<<LONG_SHIFT)))
-- 
-- /* Check if SSE instructions can be used.
--    We assume that one SSE word of 128 bit is two long's,
--diff --git a/sturm.c b/sturm.c
--index c78d7c6..5fd2cf5 100644
----- a/sturm.c
--+++ b/sturm.c
--@@ -27,7 +27,6 @@
--  ***********************************************************************/
-- 
-- #include "ratpoints.h"
---
-- /**************************************************************************
--  * Arguments of _ratpoints_compute_sturm() : (from the args argument)     *
--  *                                                                        *
--@@ -53,7 +52,7 @@
-- /* A helper function: evaluate the polynomial in cofs[] of given degree
--   at num/2^denexp and return the sign. */
-- 
---static long eval_sign(ratpoints_args *args, mpz_t *cofs, long degree,
--+static long eval_sign(const ratpoints_args *args, const mpz_t *cofs, long degree,
--                       long num, long denexp)
-- {
--   long n, e, s;
--@@ -70,11 +69,80 @@ static long eval_sign(ratpoints_args *args, mpz_t *cofs, long degree,
--   return(s);
-- }
-- 
--+static const    long max = (long)(((unsigned long)(-1))>>1);
--+static const    long min = (long)(-(((unsigned long)(-1))>>1));
--+    /* recursive helper function */
--+static void iterate(long nl, long nr, long del, long der, long cleft, long cright,
--+                 long sl, long sr, long depth,
--+		 ratpoints_interval **iptr, const ratpoints_interval *ivlo,
--+		 const ratpoints_args *args, const long k, const long sturm_degs[],
--+                 const mpz_t sturm[][args->degree + 1])
--+    { /* nl/2^del, nr/2^der : interval left/right endpoints,
--+         cleft, cright: sign change counts at endpoints,
--+         sl, sr: signs at endpoints,
--+         depth: iteration depth */
--+     long iter = args->sturm;
--+      if(cleft == cright && sl < 0) { return; }
--+         /* here we know the polynomial is negative on the interval */
--+      if((cleft == cright && sl > 0) || depth >= iter)
--+      /* we have to add/extend an interval if we either know that
--+         the polynomial is positive on the interval (first condition)
--+         or the maximal iteration depth has been reached (second condition) */
--+      { double l = ((double)nl)/((double)(1<<del));
--+        double u = ((double)nr)/((double)(1<<der));
--+        if(*iptr == ivlo)
--+        { (*iptr)->low = l; (*iptr)->up  = u; (*iptr)++; }
--+        else
--+        { if(((*iptr)-1)->up == l) /* extend interval */
--+          { ((*iptr)-1)->up = u; }
--+          else /* new interval */
--+          { (*iptr)->low = l; (*iptr)->up  = u; (*iptr)++; }
--+        }
--+        return;
--+      }
--+      /* now we must split the interval and evaluate the sturm sequence
--+         at the midpoint */
--+      { long nm, dem, s0, s1, s2, s, cmid = 0, n;
--+        if(nl == min)
--+        { if(nr == max) { nm = 0; dem = 0; }
--+          else { nm = (nr == 0) ? -1 : 2*nr; dem = 0; }
--+        }
--+        else
--+        { if(nr == max) { nm = (nl == 0) ? 1 : 2*nl; dem = 0; }
--+          else /* "normal" case */
--+          { if(del == der) /* then both are zero */
--+            { if(((nl+nr) & 1) == 0) { nm = (nl+nr)>>1; dem = 0; }
--+              else { nm = nl+nr; dem = 1; }
--+            }
--+            else /* here one de* is greater */
--+            { if(del > der) { nm = nl + (nr<<(del-der)); dem = del+1; }
--+              else { nm = (nl<<(der-del)) + nr; dem = der+1; }
--+            }
--+          }
--+        }
--+        s0 = eval_sign(args, sturm[0], sturm_degs[0], nm, dem);
--+        s1 = eval_sign(args, sturm[1], sturm_degs[1], nm, dem);
--+        if(s0*s1 == -1) { cmid++; }
--+        s = (s1 == 0) ? s0 : s1;
--+        for(n = 2; n <= k; n++)
--+        { s2 = eval_sign(args, sturm[n], sturm_degs[n], nm, dem);
--+          if(s2 == -s) { cmid++; s = s2; }
--+          else if(s2 != 0) { s = s2; }
--+        }
--+        /* now recurse */
--+        iterate(nl, nm, del, dem, cleft, (s0==0) ? (cmid+1) : cmid,
--+                sl, (s0==0) ? -s1 : s0, depth+1,
--+                iptr, ivlo, args, k, sturm_degs, sturm);
--+        iterate(nm, nr, dem, der, cmid, cright,
--+                (s0==0) ? s1 : s0, sr, depth+1,
--+		iptr, ivlo, args, k, sturm_degs, sturm);
--+      }
--+    } /* end iterate() */
--+
-- long _ratpoints_compute_sturm(ratpoints_args *args)
-- { 
--   mpz_t *cofs = args->cof;
--   long degree = args->degree;
---  long iter = args->sturm; 
--   ratpoints_interval *ivlist = args->domain;
--   long num_iv = args->num_inter;
--   long n, m, k, new_num;
--@@ -165,75 +233,12 @@ long _ratpoints_compute_sturm(ratpoints_args *args)
--   /* recall: typedef struct {double low; double up;} ratpoints_interval; */
--   { ratpoints_interval ivlocal[1 + (degree>>1)];
--     ratpoints_interval *iptr = &ivlocal[0];
---    long max = (long)(((unsigned long)(-1))>>1);
---    long min = -max;
--     long num_intervals;
--     long slcf = mpz_cmp_si(cofs[degree], 0);
-- 
---    /* recursive helper function */
---    void iterate(long nl, long nr, long del, long der, long cleft, long cright,
---                 long sl, long sr, long depth)
---    { /* nl/2^del, nr/2^der : interval left/right endpoints,
---         cleft, cright: sign change counts at endpoints,
---         sl, sr: signs at endpoints,
---         depth: iteration depth */
---      if(cleft == cright && sl < 0) { return; }
---         /* here we know the polynomial is negative on the interval */
---      if((cleft == cright && sl > 0) || depth >= iter) 
---      /* we have to add/extend an interval if we either know that
---         the polynomial is positive on the interval (first condition)
---         or the maximal iteration depth has been reached (second condition) */
---      { double l = ((double)nl)/((double)(1<<del));
---        double u = ((double)nr)/((double)(1<<der));
---        if(iptr == &ivlocal[0])
---        { iptr->low = l; iptr->up  = u; iptr++; }
---        else
---        { if((iptr-1)->up == l) /* extend interval */
---          { (iptr-1)->up = u; }
---          else /* new interval */
---          { iptr->low = l; iptr->up  = u; iptr++; }
---        }
---        return; 
---      }
---      /* now we must split the interval and evaluate the sturm sequence
---         at the midpoint */
---      { long nm, dem, s0, s1, s2, s, cmid = 0, n;
---        if(nl == min)
---        { if(nr == max) { nm = 0; dem = 0; }
---          else { nm = (nr == 0) ? -1 : 2*nr; dem = 0; }
---        }
---        else
---        { if(nr == max) { nm = (nl == 0) ? 1 : 2*nl; dem = 0; } 
---          else /* "normal" case */
---          { if(del == der) /* then both are zero */
---            { if(((nl+nr) & 1) == 0) { nm = (nl+nr)>>1; dem = 0; }
---              else { nm = nl+nr; dem = 1; } 
---            }
---            else /* here one de* is greater */
---            { if(del > der) { nm = nl + (nr<<(del-der)); dem = del+1; }
---              else { nm = (nl<<(der-del)) + nr; dem = der+1; }
---            }
---          }
---        }
---        s0 = eval_sign(args, sturm[0], sturm_degs[0], nm, dem);
---        s1 = eval_sign(args, sturm[1], sturm_degs[1], nm, dem);
---        if(s0*s1 == -1) { cmid++; }
---        s = (s1 == 0) ? s0 : s1;
---        for(n = 2; n <= k; n++)
---        { s2 = eval_sign(args, sturm[n], sturm_degs[n], nm, dem);
---          if(s2 == -s) { cmid++; s = s2; }
---          else if(s2 != 0) { s = s2; }
---        }
---        /* now recurse */
---        iterate(nl, nm, del, dem, cleft, (s0==0) ? (cmid+1) : cmid, 
---                sl, (s0==0) ? -s1 : s0, depth+1);
---        iterate(nm, nr, dem, der, cmid, cright, 
---                (s0==0) ? s1 : s0, sr, depth+1);
---      }
---    } /* end iterate() */
---
--     iterate(min, max, 0, 0, count2, count1, 
---            (degree & 1) ? -slcf : slcf, slcf, 0);
--+            (degree & 1) ? -slcf : slcf, slcf, 0,
--+	    &iptr, &ivlocal[0], args, k, sturm_degs, sturm);
--     num_intervals = iptr - &ivlocal[0];
--     /* intersect with given intervals */
--     { ratpoints_interval local_copy[num_iv];
-diff --git a/build/pkgs/ratpoints/spkg-install.in b/build/pkgs/ratpoints/spkg-install.in
-deleted file mode 100644
-index b6856c4d4a..0000000000
---- a/build/pkgs/ratpoints/spkg-install.in
-+++ /dev/null
-@@ -1,46 +0,0 @@
--PRIME_SIZE=7
--
--CCFLAGS_NO_SSE="-I$SAGE_LOCAL/include -Wall -O2 -fPIC -DRATPOINTS_MAX_BITS_IN_PRIME=$PRIME_SIZE"
--CCFLAGS2="-L$SAGE_LOCAL/lib -lgmp -lm $LDFLAGS"
--CCFLAGS3="-L. -lratpoints"
--
--if [[ "$UNAME" = "Darwin" ]]; then
--    CCFLAGS1="$CCFLAGS_NO_SSE"
--    echo "Building without SSE2 instructions (MacOS X)."
--else
--    CCFLAGS1="$CCFLAGS_NO_SSE -DUSE_SSE"
--    echo "Attempting to build ratpoints making use of SSE2 instructions."
--fi
--
--# Copy CFLAGS set externally to CCFLAGS.
--CCFLAGS="$CFLAGS"
--
--export CCFLAGS1
--export CCFLAGS2
--export CCFLAGS3
--export CCFLAGS
--
--cd src/
--
--#############################
--# Build (just) the library: #
--#############################
--
--# PLEASE, don't break this again by deleting "libratpoints.a".  See trac 8267.
--if ! $MAKE libratpoints.a; then
--    [ "$UNAME" = "Darwin" ] && sdh_die "Error building ratpoints."
--    echo "Build failed. Trying without SSE2 instructions."
--    CCFLAGS1="$CCFLAGS_NO_SSE"
--    sdh_make libratpoints.a
--fi
--
--##############################################
--# Install (just) the library and its header: #
--##############################################
--
--# The following requires that the Makefile got patched;
--# otherwise one could pass 'INSTALL_DIR=...' on the 'make'
--# command line:
--export INSTALL_DIR="$SAGE_DESTDIR_LOCAL"
--mkdir -p "$INSTALL_DIR"/{lib,include}
--sdh_make install-lib
-diff --git a/build/pkgs/ratpoints/type b/build/pkgs/ratpoints/type
-deleted file mode 100644
-index a6a7b9cd72..0000000000
---- a/build/pkgs/ratpoints/type
-+++ /dev/null
-@@ -1 +0,0 @@
--standard
-diff --git a/build/pkgs/sagelib/dependencies b/build/pkgs/sagelib/dependencies
-index 9c7797b1f4..6a7d4b8132 100644
---- a/build/pkgs/sagelib/dependencies
-+++ b/build/pkgs/sagelib/dependencies
-@@ -1,4 +1,4 @@
--FORCE $(SCRIPTS) arb boost_cropped $(BLAS) brial cliquer cypari cysignals cython ecl eclib ecm flint libgd gap giac givaro glpk gmpy2 gsl iml jinja2 jupyter_core lcalc lrcalc libbraiding libhomfly libpng linbox m4ri m4rie memory_allocator mpc mpfi mpfr $(MP_LIBRARY) ntl numpy pari pip pkgconfig planarity ppl pplpy primesieve primecount primecountpy pycygwin $(PYTHON) ratpoints requests rw sage_conf singular symmetrica zn_poly $(PCFILES) | $(PYTHON_TOOLCHAIN) sage_setup
-+FORCE $(SCRIPTS) arb boost_cropped $(BLAS) brial cliquer cypari cysignals cython ecl eclib ecm flint libgd gap giac givaro glpk gmpy2 gsl iml jinja2 jupyter_core lcalc lrcalc libbraiding libhomfly libpng linbox m4ri m4rie memory_allocator mpc mpfi mpfr $(MP_LIBRARY) ntl numpy pari pip pkgconfig planarity ppl pplpy primesieve primecount primecountpy pycygwin $(PYTHON) requests rw sage_conf singular symmetrica zn_poly $(PCFILES) | $(PYTHON_TOOLCHAIN) sage_setup
- 
- ----------
- All lines of this file are ignored except the first.
-diff --git a/src/sage/libs/ratpoints.pxd b/src/sage/libs/ratpoints.pxd
-deleted file mode 100644
-index 67e309b109..0000000000
---- a/src/sage/libs/ratpoints.pxd
-+++ /dev/null
-@@ -1,74 +0,0 @@
--from sage.rings.integer cimport Integer
--from sage.libs.gmp.mpz cimport *
--
--cdef extern from "ratpoints.h":
--    long RATPOINTS_MAX_DEGREE
--    long RATPOINTS_ARRAY_SIZE
--    long RATPOINTS_DEFAULT_SP1
--    long RATPOINTS_DEFAULT_SP2
--    long RATPOINTS_DEFAULT_NUM_PRIMES
--    long RATPOINTS_DEFAULT_MAX_FORBIDDEN
--    long RATPOINTS_DEFAULT_STURM
--    long RATPOINTS_NON_SQUAREFREE
--    long RATPOINTS_BAD_ARGS
--
--    # for args flags:
--    long RATPOINTS_NO_CHECK # when set, do not check whether the surviving
--                            # x-coordinates give rise to rational points
--    long RATPOINTS_NO_Y # when set, only list x coordinates instead of actual points
--    long RATPOINTS_NO_REVERSE # when set, do not modify the mpz_t array
--    long RATPOINTS_NO_JACOBI # when set, prevent use of Jacobi symbol test
--    long RATPOINTS_VERBOSE # when set, print some output on what ratpoints is doing
--    # define RATPOINTS_FLAGS_INPUT_MASK \
--    # (RATPOINTS_NO_CHECK | RATPOINTS_NO_Y | RATPOINTS_NO_REVERSE | \
--    #  RATPOINTS_NO_JACOBI | RATPOINTS_VERBOSE)
--
--
--    ctypedef struct ratpoints_interval:
--        double low
--        double up
--    ctypedef struct ratpoints_args:
--        mpz_t *cof
--        long degree
--        long height
--        ratpoints_interval *domain
--        long num_inter
--        long b_low
--        long b_high
--        long sp1
--        long sp2
--        long array_size
--        long sturm
--        long num_primes
--        long max_forbidden
--        unsigned int flags
--        # from here: private data
--        # mpz_t *work
--        # void *se_buffer
--        # void *se_next
--        # void *ba_buffer
--        # void *ba_next
--        # int *int_buffer
--        # int *int_next
--        # void *sieve_list
--    long find_points(ratpoints_args*, int proc(long, long, mpz_t, void*, int*), void*)
--    void find_points_init(ratpoints_args*)
--    long find_points_work(ratpoints_args*, int proc(long, long, mpz_t, void*, int*), void*)
--    void find_points_clear(ratpoints_args*)
--
--ctypedef struct point_list:
--    long *xes
--    mpz_t *ys
--    long *zs
--    long array_size
--    long num_points
--    long max_num_points
--
--ctypedef struct info_struct_exists_only:
--    int verbose
--
--cdef int ratpoints_mpz_exists_only(mpz_t *, long, int, bint) except -1
--
--
--
--
-diff --git a/src/sage/libs/ratpoints.pyx b/src/sage/libs/ratpoints.pyx
-deleted file mode 100644
-index 257dfe3eeb..0000000000
---- a/src/sage/libs/ratpoints.pyx
-+++ /dev/null
-@@ -1,283 +0,0 @@
--# distutils: libraries = ratpoints
--r"""
--Hyperelliptic Curve Point Finding, via ratpoints (deprecated)
--
--This module is deprecated, use PARI instead::
--
--    sage: pari(EllipticCurve("389a1")).ellratpoints(4)
--    [[-2, 0], [-2, -1], [-1, 1], [-1, -2], [0, 0], [0, -1], [1, 0], [1, -1], [3, 5], [3, -6], [4, 8], [4, -9], [-3/4, 7/8], [-3/4, -15/8]]
--    sage: pari("[x^3 + x^2 - 2*x, 1]").hyperellratpoints(4)
--    [[-2, 0], [-2, -1], [-1, 1], [-1, -2], [0, 0], [0, -1], [1, 0], [1, -1], [3, 5], [3, -6], [4, 8], [4, -9], [-3/4, 7/8], [-3/4, -15/8]]
--"""
--
--from cysignals.memory cimport sig_malloc, sig_realloc, sig_free
--from cysignals.signals cimport sig_on, sig_off
--
--from sage.misc.superseded import deprecation_cython as deprecation
--deprecation(24531, "the module sage.libs.ratpoints is deprecated; use pari.ellratpoints or pari.hyperellratpoints instead")
--
--
--cdef int process(long x, long z, mpz_t y, void *info0, int *quit):
--    # ratpoints calls this function when it finds a point [x : y : z]
--    # info0 is the pointer passed to ratpoints originally
--    # if quit[0] is set to a nonzero value, ratpoints will abort immediately
--    cdef point_list *plist = <point_list *> info0
--    cdef long i
--    if plist.array_size == plist.num_points:
--        i = plist.array_size
--        plist.array_size *= 2
--        plist.xes = <long *> sig_realloc(plist.xes, plist.array_size * sizeof(long))
--        plist.ys = <mpz_t *> sig_realloc(plist.ys, plist.array_size * sizeof(mpz_t))
--        plist.zs = <long *> sig_realloc(plist.zs, plist.array_size * sizeof(long))
--        while i < plist.array_size:
--            mpz_init(plist.ys[i])
--            i += 1
--    plist.xes[plist.num_points] = x
--    mpz_set(plist.ys[plist.num_points], y)
--    plist.zs[plist.num_points] = z
--    plist.num_points += 1
--    if plist.max_num_points > 0:
--        if plist.max_num_points == plist.num_points:
--            quit[0] = -1
--    return 1 # weight for counting the points
--
--def ratpoints(list coeffs, long H, verbose=False, long max=0,
--              min_x_denom=None, max_x_denom=None, intervals=[]):
--    """
--    Access the ratpoints library to find points on the hyperelliptic curve:
--
--    `y^2 = a_n x^n + \cdots + a_1 x + a_0.`
--
--    INPUT:
--
--    - ``coeffs`` -- list of integer coefficients `a_0` , `a_1`, ..., `a_n`
--
--    - ``H`` -- the bound for the denominator and the absolute value of the
--      numerator of the `x`-coordinate
--
--    - ``verbose`` -- if ``True``, ratpoints will print comments about
--      its progress
--
--    - ``max`` -- maximum number of points to find (if 0, find all of them)
--
--    OUTPUT:
--
--    The points output by this program are points in (1, ceil(n/2), 1)-weighted
--    projective space. If n is even, then the associated homogeneous equation is
--    `y^2 = a_n x^n + \cdots + a_1 x z^{n-1} + a_0 z^n` while if n is odd, it is
--    `y^2 = a_n x^n z + \cdots + a_1 x z^n + a_0 z^{n+1}`.
--
--    EXAMPLES::
--
--        sage: from sage.libs.ratpoints import ratpoints
--        doctest:...: DeprecationWarning: the module sage.libs.ratpoints is deprecated; use pari.ellratpoints or pari.hyperellratpoints instead
--        See http://trac.sagemath.org/24531 for details.
--        sage: for x,y,z in ratpoints([1..6], 200):
--        ....:     print(-1*y^2 + 1*z^6 + 2*x*z^5 + 3*x^2*z^4 + 4*x^3*z^3 + 5*x^4*z^2 + 6*x^5*z)
--        0
--        0
--        0
--        0
--        0
--        0
--        0
--        sage: for x,y,z in ratpoints([1..5], 200):
--        ....:    print(-1*y^2 + 1*z^4 + 2*x*z^3 + 3*x^2*z^2 + 4*x^3*z + 5*x^4)
--        0
--        0
--        0
--        0
--        0
--        0
--        0
--        0
--
--        sage: for x,y,z in ratpoints([1..200], 1000):
--        ....:    print("{} {} {}".format(x,y,z))
--        1 0 0
--        0 1 1
--        0 -1 1
--        201 25353012004564588029934064107520000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 200
--        201 -25353012004564588029934064107520000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 200
--
--    The denominator of `x` can be restricted, for example to find
--    integral points::
--
--        sage: from sage.libs.ratpoints import ratpoints
--        sage: coeffs = [400, -112, 0, 1]
--        sage: ratpoints(coeffs, 10^6, max_x_denom=1, intervals=[[-10,0],[1000,2000]])
--        [(1, 0, 0), (-8, 28, 1), (-8, -28, 1), (-7, 29, 1), (-7, -29, 1),
--         (-4, 28, 1), (-4, -28, 1), (0, 20, 1), (0, -20, 1), (1368, 50596, 1),
--         (1368, -50596, 1), (1624, 65444, 1), (1624, -65444, 1)]
--
--        sage: ratpoints(coeffs, 1000, min_x_denom=100, max_x_denom=200)
--        [(1, 0, 0),
--        (-656, 426316, 121),
--        (-656, -426316, 121),
--        (452, 85052, 121),
--        (452, -85052, 121),
--        (988, 80036, 121),
--        (988, -80036, 121),
--        (-556, 773188, 169),
--        (-556, -773188, 169),
--        (264, 432068, 169),
--        (264, -432068, 169)]
--
--    Finding the integral points on the compact component of an elliptic curve::
--
--        sage: E = EllipticCurve([0,1,0,-35220,-1346400])
--        sage: e1, e2, e3 = E.division_polynomial(2).roots(multiplicities=False)
--        sage: coeffs = [E.a6(),E.a4(),E.a2(),1]
--        sage: ratpoints(coeffs, 1000, max_x_denom=1, intervals=[[e3,e2]])
--        [(1, 0, 0),
--        (-165, 0, 1),
--        (-162, 366, 1),
--        (-162, -366, 1),
--        (-120, 1080, 1),
--        (-120, -1080, 1),
--        (-90, 1050, 1),
--        (-90, -1050, 1),
--        (-85, 1020, 1),
--        (-85, -1020, 1),
--        (-42, 246, 1),
--        (-42, -246, 1),
--        (-40, 0, 1)]
--    """
--    cdef ratpoints_args args
--    cdef long i, total, verby
--    cdef Integer sage_int, s_x, s_y, s_z
--    cdef point_list *plist
--
--
--    verby = ~0 if verbose else 0
--
--    # Set the coefficient array:
--    coeffs = [Integer(a) for a in coeffs]
--    args.degree = len(coeffs)-1
--    args.cof = <mpz_t *> sig_malloc((args.degree+1) * sizeof(mpz_t))
--
--    # Create an array to hold the points found:
--    plist = <point_list *> sig_malloc(sizeof(point_list))
--    if max == 0:
--        plist.array_size = 64
--    else:
--        plist.array_size = max
--    plist.xes = <long *> sig_malloc(plist.array_size * sizeof(long))
--    plist.ys = <mpz_t *> sig_malloc(plist.array_size * sizeof(mpz_t))
--    for i from 0 <= i < plist.array_size:
--        mpz_init(plist.ys[i])
--    plist.zs = <long *> sig_malloc(plist.array_size * sizeof(long))
--    plist.num_points = 0
--    plist.max_num_points = max
--
--    # Set the height bound:
--    args.height = H
--
--    # Set the intervals to be searched, including any specified:
--    args.num_inter = len(intervals)
--    args.domain = <ratpoints_interval *> sig_malloc((args.num_inter + args.degree) * sizeof(ratpoints_interval))
--    for i,I in enumerate(intervals):
--        args.domain[i].low = I[0]
--        args.domain[i].up  = I[1]
--
--    # Set the minimum and maximum denominators:
--    if not min_x_denom:  min_x_denom = 1
--    if not max_x_denom:  max_x_denom = H
--    args.b_low = min_x_denom
--    args.b_high = max_x_denom
--
--    # Set the remaining arguments, whose non-default use is technical
--    # (see ratpoints documentation)
--    args.sp1 = RATPOINTS_DEFAULT_SP1
--    args.sp2 = RATPOINTS_DEFAULT_SP2
--    args.array_size = RATPOINTS_ARRAY_SIZE
--    args.sturm = RATPOINTS_DEFAULT_STURM
--    args.num_primes = RATPOINTS_DEFAULT_NUM_PRIMES
--    args.max_forbidden = RATPOINTS_DEFAULT_MAX_FORBIDDEN
--    args.flags = (RATPOINTS_VERBOSE & verby)
--
--    for i from 0 <= i <= args.degree:
--        mpz_init(args.cof[i])
--        sage_int = <Integer> coeffs[i]
--        mpz_set(args.cof[i], sage_int.value)
--
--    sig_on()
--    total = find_points(&args, process, <void *>plist)
--    sig_off()
--    if total == RATPOINTS_NON_SQUAREFREE:
--        raise RuntimeError('Polynomial must be square-free')
--    if total == RATPOINTS_BAD_ARGS:
--        raise RuntimeError('Bad arguments to ratpoints')
--
--    for i from 0 <= i <= args.degree:
--        mpz_clear(args.cof[i])
--
--    sig_free(args.cof)
--    sig_free(args.domain)
--
--    cdef list L = []
--    for i from 0 <= i < plist.num_points:
--        s_x = Integer(0)
--        s_y = Integer(0)
--        s_z = Integer(0)
--        mpz_set_si(s_x.value, plist.xes[i])
--        mpz_set(s_y.value, plist.ys[i])
--        mpz_set_si(s_z.value, plist.zs[i])
--        L.append((s_x,s_y,s_z))
--
--    for i from 0 <= i < plist.array_size:
--        mpz_clear(plist.ys[i])
--    sig_free(plist.xes)
--    sig_free(plist.ys)
--    sig_free(plist.zs)
--    sig_free(plist)
--
--    return L
--
--cdef int process_exists_only(long x, long z, mpz_t y, void *info0, int *quit):
--    cdef info_struct_exists_only *info_s = <info_struct_exists_only *>info0
--    cdef Integer YY
--    if info_s.verbose:
--        YY = Integer(0); mpz_set(YY.value, y)
--        print('Found point [ %d : %d : %d ], quitting' % (x, YY, z))
--    quit[0] = -1
--    return 1
--
--cdef int ratpoints_mpz_exists_only(mpz_t *coeffs, long H, int degree, bint verbose) except -1:
--    """
--    Direct call to ratpoints to search for existence only.
--
--    WARNING - The coefficient array will be modified by ratpoints.
--    """
--    cdef ratpoints_args args
--    cdef info_struct_exists_only info_s
--    cdef long total, verby = ~0 if verbose else 0
--    info_s.verbose = verbose
--    assert degree <= RATPOINTS_MAX_DEGREE
--    args.degree = degree
--    args.cof = coeffs
--    args.domain = <ratpoints_interval *> sig_malloc(2*args.degree * sizeof(ratpoints_interval))
--    args.height = H
--    args.num_inter = 0
--    args.b_low = 1
--    args.b_high = H
--    args.sp1 = RATPOINTS_DEFAULT_SP1
--    args.sp2 = RATPOINTS_DEFAULT_SP2
--    args.array_size = RATPOINTS_ARRAY_SIZE
--    args.sturm = RATPOINTS_DEFAULT_STURM
--    args.num_primes = RATPOINTS_DEFAULT_NUM_PRIMES
--    args.max_forbidden = RATPOINTS_DEFAULT_MAX_FORBIDDEN
--    args.flags = (RATPOINTS_VERBOSE & verby)
--    sig_on()
--    total = find_points(&args, process_exists_only, <void *>(&info_s))
--    sig_off()
--    sig_free(args.domain)
--    if total == RATPOINTS_NON_SQUAREFREE:
--        raise RuntimeError('Polynomial must be square-free')
--    if total == RATPOINTS_BAD_ARGS:
--        raise RuntimeError('Bad arguments to ratpoints')
--    return 1 if (total > 0) else 0
--
--
--
--
-diff --git a/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx b/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx
-index 1cc70925fa..c2f994a650 100644
---- a/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx
-+++ b/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx
-@@ -1,5 +1,3 @@
--# distutils: libraries = ratpoints
--
- r"""
- Descent on elliptic curves over `\QQ` with a 2-isogeny
- """
-diff --git a/src/sage_setup/library_order.py b/src/sage_setup/library_order.py
-index 8830d44a95..0b450b3723 100644
---- a/src/sage_setup/library_order.py
-+++ b/src/sage_setup/library_order.py
-@@ -25,7 +25,7 @@ library_order_list = aliases.get("SINGULAR_LIBRARIES", []) + [
-     "giac", "intl", "curl",
-     "ec", "ecm"
- ] + aliases.get("LINBOX_LIBRARIES", []) + aliases.get("FFLASFFPACK_LIBRARIES", []) + aliases.get("GSL_LIBRARIES", []) + [
--    "pari", "flint", "ratpoints", "ecl", "glpk", "ppl",
-+    "pari", "flint", "ecl", "glpk", "ppl",
- ] + arb_dylib_names + [
-     "mpfi", "mpfr", "mpc", "ntl", "gmp", "gmpxx",
-     "brial",
--- 
-2.34.1
-
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index e182267cdb96..97ce9a93f10d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -33,7 +33,7 @@ _SAGE_ROOT=/usr/lib/sage-${version}
 # Skip these sage packages: they are not needed
 _spkg_skip="appnope fonttools importlib_resources pycygwin
  setuptools_scm_git_archive setuptools_wheel sphinxcontrib_websupport
- pplpy_doc vcversioner
+ pplpy_doc vcversioner ratpoints
  jmol mathjax sagenb_export thebe sagetex jupyter_jsmol rpy2 threejs"
 
 # Force use these sage packages from system
@@ -107,6 +107,8 @@ do_clean() {
 }
 
 post_patch() {
+	# these are unused and nothing else uses ratpoints spkg
+	rm src/sage/libs/ratpoints.{pyx,pxd}
 	./bootstrap
 }
 

From c2cd5110499d1e26c2164d26d56a819e4ffbeabc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 24 Jan 2022 15:44:40 -0300
Subject: [PATCH 7/9] sagemath: use --disable-doc, cleanup

---
 srcpkgs/sagemath/template | 21 +--------------------
 1 file changed, 1 insertion(+), 20 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 97ce9a93f10d..58a64211e73e 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -5,10 +5,7 @@ revision=1
 wrksrc=sage-$version
 build_style=configure
 configure_args="--enable-build-as-root --with-system-python3
- --enable-system-site-packages"
-make_check_target=ptest
-# for now skip building docs
-make_build_target=build
+ --enable-system-site-packages --disable-doc"
 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
@@ -24,9 +21,6 @@ checksum=dabc1a98e883c6069b59a755852bb0030395404a95d19d497c56f557c02619c2
 python_version=3
 patch_args="-F0 -Np1"
 
-build_options="debug"
-desc_option_debug="Build with debug symbols"
-
 # path where sage will be installed
 _SAGE_ROOT=/usr/lib/sage-${version}
 
@@ -95,11 +89,6 @@ post_extract() {
 	rm -rf $_SAGE_ROOT
 	mv -T $wrksrc $_SAGE_ROOT
 	ln -srfT $_SAGE_ROOT $wrksrc
-
-	mkdir -p $wrksrc/upstream
-	for u in ${_upstream}; do
-		cp "$XBPS_SRCDISTDIR/${pkgname}-${version}/${u##*[/>]}" $wrksrc/upstream
-	done
 }
 
 do_clean() {
@@ -112,14 +101,6 @@ post_patch() {
 	./bootstrap
 }
 
-pre_configure() {
-	if [ "$build_option_debug" ]; then
-		export SAGE_DEBUG=yes
-	fi
-
-	export MAKE="make -j ${XBPS_MAKEJOBS}"
-}
-
 post_configure() {
 	# we set some variables, right after configure has created sage_conf.py
 	cat <<-EOF >> pkgs/sage-conf/sage_conf.py

From 6e18d73a3b8272b370a7de82f6021de66cce5181 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 25 Jan 2022 17:34:12 -0300
Subject: [PATCH 8/9] sagemath: dependencies not needed with --disable-doc

---
 srcpkgs/sagemath/template | 23 +++++++++++------------
 1 file changed, 11 insertions(+), 12 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 58a64211e73e..df96e5dfa542 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -33,9 +33,9 @@ _spkg_skip="appnope fonttools importlib_resources pycygwin
 # Force use these sage packages from system
 _spkg_system="cppy cython cysignals cypari pplpy fpylll memory_allocator
  primecountpy
- alabaster argcomplete argon2_cffi attrs babel backcall beniget bleach certifi
+ argcomplete argon2_cffi attrs backcall beniget bleach certifi
  cffi charset_normalizer cvxopt cycler dateutil debugpy decorator defusedxml
- docutils entrypoints flit_core gast gmpy2 html5lib idna imagesize
+ docutils entrypoints flit_core gast gmpy2 html5lib idna
  importlib_metadata importlib_resources ipykernel ipython ipython_genutils
  ipywidgets jedi jinja2 jsonschema jupyter_client jupyter_core
  jupyterlab_pygments kiwisolver markupsafe matplotlib matplotlib_inline mistune
@@ -43,12 +43,14 @@ _spkg_system="cppy cython cysignals cypari pplpy fpylll memory_allocator
  packaging pandocfilters parso pexpect pickleshare pillow pip pkgconfig pluggy
  ply prometheus_client prompt_toolkit ptyprocess py pybind11 pycparser pygments
  pyparsing pyrsistent pythran pytz pyzmq requests scipy send2trash setuptools
- setuptools_scm simplegeneric six snowballstemmer sphinx
- sphinxcontrib_applehelp sphinxcontrib_devhelp sphinxcontrib_htmlhelp
- sphinxcontrib_jsmath sphinxcontrib_qthelp sphinxcontrib_serializinghtml sympy
+ setuptools_scm simplegeneric six sympy
  terminado testpath texttable tomli tornado traitlets typing_extensions tzlocal
  urllib3 wcwidth webencodings wheel widgetsnbextension zipp
  linbox gap maxima"
+### Not required with --disable-doc
+#alabaster babel imagesize snowballstemmer sphinx
+#sphinxcontrib_applehelp sphinxcontrib_devhelp sphinxcontrib_htmlhelp
+#sphinxcontrib_jsmath sphinxcontrib_qthelp sphinxcontrib_serializinghtml
 
 # Databases to be used from system
 _spkg_db="combinatorial_designs conway_polynomials elliptic_curves graphs
@@ -216,13 +218,13 @@ makedepends+="
 
 # python packages for trac-29665
 _sage_python3_modules="
- python3-Babel python3-Jinja2 python3-MarkupSafe python3-Pillow
- python3-Pygments python3-Sphinx python3-alabaster python3-argcomplete
+ python3-Jinja2 python3-MarkupSafe python3-Pillow
+ python3-Pygments python3-argcomplete
  python3-argon2 python3-attrs python3-backcall python3-beniget
  python3-bleach python3-certifi python3-cffi python3-charset-normalizer
  python3-cycler python3-dateutil python3-decorator python3-defusedxml
  python3-docutils python3-entrypoints python3-flit_core python3-gast
- python3-gmpy2 python3-html5lib python3-idna python3-imagesize
+ python3-gmpy2 python3-html5lib python3-idna
  python3-importlib_metadata python3-ipython python3-ipython_genutils
  python3-ipython_ipykernel python3-jedi python3-jsonschema
  python3-jupyter_client python3-jupyter_core python3-jupyter_ipywidgets
@@ -237,10 +239,7 @@ _sage_python3_modules="
  python3-pycparser python3-pyrsistent python3-pytz python3-pyzmq
  python3-requests python3-scipy python3-send2trash python3-setuptools
  python3-setuptools_scm python3-simplegeneric python3-six
- python3-snowballstemmer python3-sphinxcontrib-applehelp
- python3-sphinxcontrib-devhelp python3-sphinxcontrib-htmlhelp
- python3-sphinxcontrib-jsmath python3-sphinxcontrib-qthelp
- python3-sphinxcontrib-serializinghtml python3-sympy python3-terminado
+ python3-sympy python3-terminado
  python3-testpath python3-texttable python3-toml python3-tomli
  python3-tornado python3-traitlets python3-typing_extensions
  python3-tzlocal python3-urllib3 python3-wcwidth python3-webencodings

From fdeaf09bf6591de4e6cdcabc689cc5058ccf143c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 25 Jan 2022 17:35:24 -0300
Subject: [PATCH 9/9] sagemath: update to 9.5.rc4.

---
 .../sagemath/patches/zzz-disable_rpath.patch  | 35 +++++++++++++++++++
 srcpkgs/sagemath/patches/zzz-shebang.patch    | 12 +++++++
 srcpkgs/sagemath/template                     |  4 +--
 3 files changed, 49 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/zzz-disable_rpath.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-shebang.patch

diff --git a/srcpkgs/sagemath/patches/zzz-disable_rpath.patch b/srcpkgs/sagemath/patches/zzz-disable_rpath.patch
new file mode 100644
index 000000000000..107fd3dce23a
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-disable_rpath.patch
@@ -0,0 +1,35 @@
+diff --git a/src/bin/sage-env b/src/bin/sage-env
+index 27edbf4cfb..0ead5789cb 100644
+--- a/src/bin/sage-env
++++ b/src/bin/sage-env
+@@ -411,14 +411,6 @@ if [ -n "$PYTHONHOME" ]; then
+     unset PYTHONHOME
+ fi
+ 
+-if [ -n "$SAGE_LOCAL" ]; then
+-    LDFLAGS="-L$SAGE_LOCAL/lib -Wl,-rpath,$SAGE_LOCAL/lib $LDFLAGS"
+-    if [ "$UNAME" = "Linux" ]; then
+-        LDFLAGS="-Wl,-rpath-link,$SAGE_LOCAL/lib $LDFLAGS"
+-    fi
+-    export LDFLAGS
+-fi
+-
+ if [ -z "$IPYTHONDIR" ]; then
+     # We hardcode a version number in the directory name. The idea is
+     # that we keep using the same version number as long as that is
+diff --git a/src/sage_setup/setenv.py b/src/sage_setup/setenv.py
+index b059a6e709..b6a9e3646c 100644
+--- a/src/sage_setup/setenv.py
++++ b/src/sage_setup/setenv.py
+@@ -30,11 +30,6 @@ def setenv():
+         _environ_prepend('PATH',         f'{SAGE_LOCAL}/bin')
+         _environ_prepend('LIBRARY_PATH', f'{SAGE_LOCAL}/lib')
+         _environ_prepend('CPATH',        f'{SAGE_LOCAL}/include')
+-        _environ_prepend('LDFLAGS',      f'-L{SAGE_LOCAL}/lib -Wl,-rpath,{SAGE_LOCAL}/lib',
+-                         separator=' ')
+-        if UNAME == 'Linux':
+-            _environ_prepend('LDFLAGS',      f'-Wl,-rpath-link,{SAGE_LOCAL}/lib',
+-                             separator=' ')
+         if Path(SAGE_VENV).resolve() != Path(SAGE_LOCAL).resolve():
+             # This condition is always true, but we are keeping it for clarity.
+             _environ_prepend('PATH',         f'{SAGE_VENV}/bin')
diff --git a/srcpkgs/sagemath/patches/zzz-shebang.patch b/srcpkgs/sagemath/patches/zzz-shebang.patch
new file mode 100644
index 000000000000..82b0c610ef66
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-shebang.patch
@@ -0,0 +1,12 @@
+--- a/src/setup.cfg.m4
++++ b/src/setup.cfg.m4
+@@ -25,6 +25,9 @@ classifiers =
+     Programming Language :: Python :: Implementation :: CPython
+     Topic :: Scientific/Engineering :: Mathematics
+ 
++[build]
++executable = /usr/bin/python3
++
+ [options]
+ python_requires = >=3.7, <3.11
+ install_requires =
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index df96e5dfa542..e5169576b95d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -1,6 +1,6 @@
 # Template file for 'sagemath'
 pkgname=sagemath
-version=9.5.rc3
+version=9.5.rc4
 revision=1
 wrksrc=sage-$version
 build_style=configure
@@ -17,7 +17,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
-checksum=dabc1a98e883c6069b59a755852bb0030395404a95d19d497c56f557c02619c2
+checksum=9d5053b83648e9fac5590516a39871ac57524ab9d37102206977e0010e61bb6e
 python_version=3
 patch_args="-F0 -Np1"
 

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.rc4
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (235 preceding siblings ...)
  2022-01-25 20:37 ` [PR PATCH] [Updated] " tornaria
@ 2022-01-25 21:27 ` leahneukirchen
  2022-01-25 23:19 ` tornaria
                   ` (11 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: leahneukirchen @ 2022-01-25 21:27 UTC (permalink / raw)
  To: ml

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

New comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1021624847

Comment:
Are you sure you wanna remove documentation? Will it break `?command`?

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5.rc4
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (236 preceding siblings ...)
  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
                   ` (10 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-25 23:19 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1021700068

Comment:
> Are you sure you wanna remove documentation? Will it break `?command`?

That's introspection and it still works. It should be using either the function docstring or the actual source as-installed in `site-packages`, so in fact we don't even need `src/sage`. There are two reasons I'm still shipping `src`: (a) the scripts in `src/bin` are needed because our installation is imperfect (b) for `--t --all` it needs the source in `src/sage`, however there must be a way to make test to work on the installed files.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: sagemath-9.5.rc4
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (237 preceding siblings ...)
  2022-01-25 23:19 ` tornaria
@ 2022-01-26 13:07 ` tornaria
  2022-01-30 22:13 ` tornaria
                   ` (9 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-26 13:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1057 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.rc4
This is WIP, so I can get feedback.

Supported architectures: x86_64, x86_64-musl, i686. We also try to make sure it works with musl-1.2.

The testsuite can be run normal (-Q) or long (-K). For CI it runs normal (~ 1/2 time) and it uses a fixed random seed 0 to avoid random failures. When running locally, the random seed is random so one may get occasional test failures that depend on a particular value of the random seed.

The package `sagemath-test` is a dummy package whose purpose is to run the testsuite with sage installed as a package and without the build directory. For this to make sense, the masterdir has to be clean (without traces of the sagemath build, this should be ok after running "pkg" or "pkg -Q").

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: 607511 bytes --]

From 02e71ed572815b631b6fb789f6d404d058dc757b 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/11] New package: sage-9.5.rc3

Squashed version identical to sagemath-v1.

Full commit message history follows:

1. New package: sage-9.5.beta5

2. 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).

3. 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

4. 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.

5. sagemath: update to 9.5.beta7.

6. sagemath: add more dependencies

Also:
 - add patches so more doctests pass
 - add do_check() to skip building docs
 - use https for distfiles

7. 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...

8. 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)

9. sagemath: use system maxima

Also: add patch to use relative symlinks in gap where absolute symlinks
are now used -- otherwise xbps-create gets confused

10. 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

11. sagemath: change patch for cmdline args to disable dochtml testing

12. sagemath: update to 9.5.beta8.

13. 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

14. sagemath: use system python 3.10

15. 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

16. 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

17. sagemath: update to 9.5.beta9.

18. 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.

19. sagemath: fix license and tests

Now tests can be run with -Q (normal) or -K (--long)

20. sagemath: fix long time test

21. sagemath: use system python site-packages

 - patch from #29665 for that
 - patch on top of that to allow a few more python packages:
   gmpy2, sphinx, typing_extensions, ptyprocess
 - add all available python packages to makedepends and depends
 - add ffmpeg and ImageMagick to makedepends
 - in standard check (-Q) warn if individual test > 5.0s

22. sagemath: use small source tarball + upstream packages

23. sagemath: for CI use fixed random-seed=0

24. sagemath: upstream two patches

25. sagemath: reorder upstream sources and add two missing ones

26. sagemath: do not download anything patch

27. sagemath: update to 9.5.rc0.

28. sagemath: use system gap

29. sagemath: fixes for system gap

30. sagemath: skip doctest for rewritten shebang

31. sagemath: cleanup and one patch

32. sagemath: update to 9.5.rc1.

33. sagemath: patch not needed with singular 4.3.0

34. sagemath: install /usr/bin/sage

35. sagemath: rearrange upstream packages and indent

This doesn't change anything, it separates _upstream and
checksum in three blocks to make it easier to edit.

36. sagemath: use system cvxopt and importlib_resources

37. sagemath: disallow fuzz in patches

38. sagemath: disable packages that are not needed

 - appnope: only needed for macos
 - fonttools: only needed to build matplotlib
 - importlib_resources: only needed for old python
 - pycygwin: only needed for cygwin
 - setuptools_scm_git_archive: only needed to build matplotlib
 - setuptools_wheel: not needed
 - sphinxcontrib_websupport: only needed to build sphinx
 - cppy: force use from system python3-cppy

39. sagemath: use system Cython, cysignals, cypari2, pplpy, fpylll

40. sagemath: update to 9.5.rc2.

41. sagemath: add timing information for doctests

This makes doctesting faster on many threads

42. sagemath: round timings to power of 2 for stability

43. sagemath: all but two packages from system

44. sagemath: fix do_install()

45. sagemath: minor adjustments in do_check()

46. sagemath: use system primecountpy

47. sagemath: no upstream packages, cleanup

48. sagemath: patches for arb-2.22.0 and no-threejs

49. sagemath: remove patch for sphinx, unneeded

50. sagemath: update to 9.5.rc3.
---
 srcpkgs/sagemath/files/timings2.json          |  398 ++
 .../patches/00-Do_not_download_anything.patch |   11 +
 ...13e88ee188d516e4956832a23f985a73917a.patch |   31 +
 ...ea979d4bfa1a26ef3b08a29ca626b83b6ff5.patch |   23 +
 ...f491e5ce599ba185f5e93f02e0fcebd76c9e.patch |   57 +
 ...184f7498a2046065e669723e68efe2d65cee.patch | 5629 +++++++++++++++++
 ...aba734cb4ded0b04165fa142b5cf4c38fd23.patch |  247 +
 ...0e8168a9ffb4fbf07dd03c0846b4933a6dbe.patch |   64 +
 ...26e3db5ea06b962fac386fa3c7223f9a14fb.patch |   51 +
 ...93f4f32246ad9ded6d37f1f2f12a589a81f4.patch |   32 +
 ...9f3a1611fed0cc66fb838eb85739646dd34d.patch |  131 +
 ...e0923cb3d44d010e3e2f9bd7bc75d5c30234.patch |   43 +
 ...d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch |   35 +
 ...2ddd4e2dc92469c1590ebf0c40f8f69bf579.patch |  126 +
 .../zzz-dont_run_pytest--see_31924.patch      |   27 +
 .../zzz-fix_long_time_test--see_33091.patch   |   13 +
 .../patches/zzz-fix_no_SAGE_BIN.patch         |   12 +
 .../patches/zzz-fix_no_venv_packages.patch    |   13 +
 .../zzz-fixes_for_system_gap--see_29644.patch |   96 +
 .../zzz-more_site_packages_not_in_29665.patch |   42 +
 .../patches/zzz-remove_ratpoints.patch        |  887 +++
 ...z-skip_doctest_giac-1.7.0--see_31563.patch |   14 +
 .../patches/zzz-skip_doctest_no_threejs.patch |   13 +
 .../zzz-skip_doctest_sage_setup_find.patch    |   12 +
 .../patches/zzz-skip_doctest_shebang.patch    |   11 +
 srcpkgs/sagemath/template                     |  251 +
 srcpkgs/sagemath/update                       |    4 +
 27 files changed, 8273 insertions(+)
 create mode 100644 srcpkgs/sagemath/files/timings2.json
 create mode 100644 srcpkgs/sagemath/patches/00-Do_not_download_anything.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-29631-001-system_linbox-794713e88ee188d516e4956832a23f985a73917a.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-29631-002-system_linbox-7e16ea979d4bfa1a26ef3b08a29ca626b83b6ff5.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-32867-system_maxima-ed39aba734cb4ded0b04165fa142b5cf4c38fd23.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-33047-musl_fix_find_library-dc1a0e8168a9ffb4fbf07dd03c0846b4933a6dbe.patch
 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-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-33189-fix_doctests_for_arb_2.22-53532ddd4e2dc92469c1590ebf0c40f8f69bf579.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-fix_no_SAGE_BIN.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-fix_no_venv_packages.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-remove_ratpoints.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_31563.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_no_threejs.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch
 create mode 100644 srcpkgs/sagemath/template
 create mode 100644 srcpkgs/sagemath/update

diff --git a/srcpkgs/sagemath/files/timings2.json b/srcpkgs/sagemath/files/timings2.json
new file mode 100644
index 000000000000..71a9aa84ce58
--- /dev/null
+++ b/srcpkgs/sagemath/files/timings2.json
@@ -0,0 +1,398 @@
+{
+  "doc.ca.intro.index": {"walltime": 8},
+  "doc.en.constructions.calculus": {"walltime": 64},
+  "doc.en.constructions.plotting": {"walltime": 32},
+  "doc.en.prep.Advanced-2DPlotting": {"walltime": 16},
+  "doc.en.prep.Calculus": {"walltime": 8},
+  "doc.en.prep.Symbolics-and-Basic-Plotting": {"walltime": 8},
+  "doc.en.thematic_tutorials.explicit_methods_in_number_theory.birds_other": {"walltime": 8},
+  "doc.en.thematic_tutorials.explicit_methods_in_number_theory.elliptic_curves": {"walltime": 8},
+  "doc.en.thematic_tutorials.geometry.polyhedra_tutorial": {"walltime": 16},
+  "doc.en.thematic_tutorials.sandpile": {"walltime": 16},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_advanced": {"walltime": 32},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_cartesian": {"walltime": 32},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_change": {"walltime": 32},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_curvilinear": {"walltime": 32},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_plane": {"walltime": 16},
+  "doc.ja.tutorial.tour_plotting": {"walltime": 8},
+  "sage.algebras.cluster_algebra": {"walltime": 8},
+  "sage.algebras.commutative_dga": {"walltime": 16},
+  "sage.algebras.hecke_algebras.ariki_koike_algebra": {"walltime": 8},
+  "sage.algebras.iwahori_hecke_algebra": {"walltime": 8},
+  "sage.algebras.lie_algebras.classical_lie_algebra": {"walltime": 128},
+  "sage.algebras.lie_algebras.nilpotent_lie_algebra": {"walltime": 16},
+  "sage.algebras.quantum_clifford": {"walltime": 16},
+  "sage.algebras.quantum_groups.fock_space": {"walltime": 8},
+  "sage.algebras.quatalg.quaternion_algebra": {"walltime": 8},
+  "sage.algebras.steenrod.steenrod_algebra": {"walltime": 64},
+  "sage.algebras.steenrod.steenrod_algebra_bases": {"walltime": 8},
+  "sage.algebras.yangian": {"walltime": 8},
+  "sage.arith.misc": {"walltime": 32},
+  "sage.calculus.calculus": {"walltime": 16},
+  "sage.calculus.desolvers": {"walltime": 8},
+  "sage.calculus.functional": {"walltime": 8},
+  "sage.calculus.riemann": {"walltime": 64},
+  "sage.calculus.tests": {"walltime": 16},
+  "sage.calculus.transforms.dwt": {"walltime": 16},
+  "sage.calculus.transforms.fft": {"walltime": 8},
+  "sage.categories.coxeter_groups": {"walltime": 8},
+  "sage.categories.finite_monoids": {"walltime": 16},
+  "sage.categories.lie_conformal_algebras": {"walltime": 8},
+  "sage.categories.loop_crystals": {"walltime": 8},
+  "sage.categories.pushout": {"walltime": 8},
+  "sage.categories.super_hopf_algebras_with_basis": {"walltime": 32},
+  "sage.categories.super_lie_conformal_algebras": {"walltime": 8},
+  "sage.coding.ag_code": {"walltime": 64},
+  "sage.coding.ag_code_decoders": {"walltime": 128},
+  "sage.coding.binary_code": {"walltime": 8},
+  "sage.coding.linear_code": {"walltime": 16},
+  "sage.combinat.backtrack": {"walltime": 32},
+  "sage.combinat.chas.wqsym": {"walltime": 32},
+  "sage.combinat.cluster_algebra_quiver.cluster_seed": {"walltime": 64},
+  "sage.combinat.cluster_algebra_quiver.quiver": {"walltime": 128},
+  "sage.combinat.crystals.affine_factorization": {"walltime": 16},
+  "sage.combinat.crystals.alcove_path": {"walltime": 32},
+  "sage.combinat.crystals.highest_weight_crystals": {"walltime": 8},
+  "sage.combinat.crystals.kirillov_reshetikhin": {"walltime": 16},
+  "sage.combinat.crystals.letters": {"walltime": 8},
+  "sage.combinat.crystals.littelmann_path": {"walltime": 16},
+  "sage.combinat.crystals.mv_polytopes": {"walltime": 16},
+  "sage.combinat.crystals.pbw_crystal": {"walltime": 16},
+  "sage.combinat.crystals.star_crystal": {"walltime": 8},
+  "sage.combinat.designs.bibd": {"walltime": 8},
+  "sage.combinat.designs.database": {"walltime": 16},
+  "sage.combinat.designs.difference_family": {"walltime": 8},
+  "sage.combinat.designs.gen_quadrangles_with_spread": {"walltime": 128},
+  "sage.combinat.designs.orthogonal_arrays_build_recursive": {"walltime": 16},
+  "sage.combinat.designs.orthogonal_arrays_find_recursive": {"walltime": 8},
+  "sage.combinat.diagram_algebras": {"walltime": 64},
+  "sage.combinat.fqsym": {"walltime": 32},
+  "sage.combinat.free_prelie_algebra": {"walltime": 8},
+  "sage.combinat.fully_commutative_elements": {"walltime": 8},
+  "sage.combinat.grossman_larson_algebras": {"walltime": 8},
+  "sage.combinat.interval_posets": {"walltime": 8},
+  "sage.combinat.k_regular_sequence": {"walltime": 8},
+  "sage.combinat.k_tableau": {"walltime": 16},
+  "sage.combinat.matrices.hadamard_matrix": {"walltime": 8},
+  "sage.combinat.multiset_partition_into_sets_ordered": {"walltime": 8},
+  "sage.combinat.ncsf_qsym.ncsf": {"walltime": 16},
+  "sage.combinat.ncsf_qsym.qsym": {"walltime": 16},
+  "sage.combinat.partition": {"walltime": 16},
+  "sage.combinat.partition_kleshchev": {"walltime": 16},
+  "sage.combinat.partition_tuple": {"walltime": 8},
+  "sage.combinat.posets.moebius_algebra": {"walltime": 16},
+  "sage.combinat.posets.posets": {"walltime": 8},
+  "sage.combinat.rigged_configurations.kr_tableaux": {"walltime": 32},
+  "sage.combinat.rigged_configurations.rigged_configurations": {"walltime": 16},
+  "sage.combinat.rigged_configurations.tensor_product_kr_tableaux": {"walltime": 16},
+  "sage.combinat.root_system.associahedron": {"walltime": 8},
+  "sage.combinat.root_system.branching_rules": {"walltime": 8},
+  "sage.combinat.root_system.fusion_ring": {"walltime": 8},
+  "sage.combinat.root_system.integrable_representations": {"walltime": 16},
+  "sage.combinat.root_system.non_symmetric_macdonald_polynomials": {"walltime": 16},
+  "sage.combinat.root_system.pieri_factors": {"walltime": 8},
+  "sage.combinat.root_system.plot": {"walltime": 32},
+  "sage.combinat.root_system.root_lattice_realization_algebras": {"walltime": 16},
+  "sage.combinat.root_system.root_lattice_realizations": {"walltime": 16},
+  "sage.combinat.root_system.root_system": {"walltime": 8},
+  "sage.combinat.root_system.weyl_group": {"walltime": 8},
+  "sage.combinat.rsk": {"walltime": 32},
+  "sage.combinat.sf.classical": {"walltime": 16},
+  "sage.combinat.sf.jack": {"walltime": 16},
+  "sage.combinat.sf.k_dual": {"walltime": 16},
+  "sage.combinat.sf.llt": {"walltime": 16},
+  "sage.combinat.sf.macdonald": {"walltime": 64},
+  "sage.combinat.sf.new_kschur": {"walltime": 8},
+  "sage.combinat.sf.sfa": {"walltime": 32},
+  "sage.combinat.shifted_primed_tableau": {"walltime": 16},
+  "sage.combinat.skew_tableau": {"walltime": 8},
+  "sage.combinat.symmetric_group_algebra": {"walltime": 16},
+  "sage.combinat.tableau": {"walltime": 32},
+  "sage.combinat.tableau_tuple": {"walltime": 32},
+  "sage.combinat.tiling": {"walltime": 256},
+  "sage.combinat.tutorial": {"walltime": 16},
+  "sage.combinat.words.paths": {"walltime": 64},
+  "sage.crypto.block_cipher.des": {"walltime": 16},
+  "sage.crypto.mq.sr": {"walltime": 64},
+  "sage.crypto.sbox": {"walltime": 16},
+  "sage.crypto.sboxes": {"walltime": 8},
+  "sage.doctest.forker": {"walltime": 16},
+  "sage.doctest.sources": {"walltime": 64},
+  "sage.doctest.test": {"walltime": 128},
+  "sage.dynamics.arithmetic_dynamics.projective_ds": {"walltime": 64},
+  "sage.dynamics.arithmetic_dynamics.wehlerK3": {"walltime": 8},
+  "sage.dynamics.cellular_automata.glca": {"walltime": 8},
+  "sage.dynamics.cellular_automata.solitons": {"walltime": 8},
+  "sage.dynamics.complex_dynamics.mandel_julia": {"walltime": 16},
+  "sage.functions.bessel": {"walltime": 16},
+  "sage.functions.exp_integral": {"walltime": 8},
+  "sage.functions.hypergeometric": {"walltime": 8},
+  "sage.functions.other": {"walltime": 16},
+  "sage.functions.piecewise": {"walltime": 8},
+  "sage.games.quantumino": {"walltime": 8},
+  "sage.geometry.cone": {"walltime": 32},
+  "sage.geometry.fan": {"walltime": 8},
+  "sage.geometry.hyperbolic_space.hyperbolic_geodesic": {"walltime": 8},
+  "sage.geometry.hyperplane_arrangement.arrangement": {"walltime": 16},
+  "sage.geometry.hyperplane_arrangement.library": {"walltime": 8},
+  "sage.geometry.hyperplane_arrangement.plot": {"walltime": 8},
+  "sage.geometry.lattice_polytope": {"walltime": 16},
+  "sage.geometry.polyhedral_complex": {"walltime": 8},
+  "sage.geometry.polyhedron.base": {"walltime": 32},
+  "sage.geometry.polyhedron.library": {"walltime": 32},
+  "sage.geometry.polyhedron.plot": {"walltime": 8},
+  "sage.geometry.riemannian_manifolds.parametrized_surface3d": {"walltime": 16},
+  "sage.geometry.triangulation.base": {"walltime": 32},
+  "sage.geometry.triangulation.point_configuration": {"walltime": 16},
+  "sage.graphs.chrompoly": {"walltime": 8},
+  "sage.graphs.connectivity": {"walltime": 16},
+  "sage.graphs.generators.basic": {"walltime": 16},
+  "sage.graphs.generators.classical_geometries": {"walltime": 32},
+  "sage.graphs.generators.distance_regular": {"walltime": 256},
+  "sage.graphs.generators.families": {"walltime": 32},
+  "sage.graphs.generators.smallgraphs": {"walltime": 16},
+  "sage.graphs.generic_graph": {"walltime": 32},
+  "sage.graphs.genus": {"walltime": 16},
+  "sage.graphs.graph": {"walltime": 16},
+  "sage.graphs.graph_generators": {"walltime": 8},
+  "sage.graphs.graph_list": {"walltime": 8},
+  "sage.graphs.graph_plot": {"walltime": 8},
+  "sage.graphs.strongly_regular_db": {"walltime": 16},
+  "sage.groups.cubic_braid": {"walltime": 16},
+  "sage.groups.fqf_orthogonal": {"walltime": 16},
+  "sage.groups.libgap_mixin": {"walltime": 8},
+  "sage.groups.libgap_morphism": {"walltime": 8},
+  "sage.groups.lie_gps.nilpotent_lie_group": {"walltime": 16},
+  "sage.groups.matrix_gps.finitely_generated": {"walltime": 8},
+  "sage.groups.matrix_gps.heisenberg": {"walltime": 32},
+  "sage.groups.matrix_gps.linear": {"walltime": 8},
+  "sage.groups.perm_gps.cubegroup": {"walltime": 16},
+  "sage.groups.perm_gps.partn_ref.refinement_graphs": {"walltime": 8},
+  "sage.groups.perm_gps.permgroup": {"walltime": 8},
+  "sage.groups.perm_gps.permgroup_named": {"walltime": 8},
+  "sage.homology.hochschild_complex": {"walltime": 8},
+  "sage.homology.homology_vector_space_with_basis": {"walltime": 8},
+  "sage.interacts.test_jupyter": {"walltime": 16},
+  "sage.interfaces.ecm": {"walltime": 8},
+  "sage.interfaces.expect": {"walltime": 8},
+  "sage.interfaces.gap": {"walltime": 16},
+  "sage.interfaces.maxima": {"walltime": 8},
+  "sage.interfaces.maxima_abstract": {"walltime": 64},
+  "sage.interfaces.psage": {"walltime": 8},
+  "sage.interfaces.sage0": {"walltime": 8},
+  "sage.lfunctions.zero_sums": {"walltime": 8},
+  "sage.libs.eclib.interface": {"walltime": 16},
+  "sage.libs.eclib.mwrank": {"walltime": 16},
+  "sage.libs.gap.test_long": {"walltime": 32},
+  "sage.libs.giac": {"walltime": 32},
+  "sage.manifolds.catalog": {"walltime": 8},
+  "sage.manifolds.chart": {"walltime": 32},
+  "sage.manifolds.chart_func": {"walltime": 8},
+  "sage.manifolds.continuous_map": {"walltime": 8},
+  "sage.manifolds.differentiable.affine_connection": {"walltime": 128},
+  "sage.manifolds.differentiable.automorphismfield": {"walltime": 32},
+  "sage.manifolds.differentiable.automorphismfield_group": {"walltime": 8},
+  "sage.manifolds.differentiable.bundle_connection": {"walltime": 8},
+  "sage.manifolds.differentiable.characteristic_cohomology_class": {"walltime": 256},
+  "sage.manifolds.differentiable.curve": {"walltime": 16},
+  "sage.manifolds.differentiable.degenerate": {"walltime": 32},
+  "sage.manifolds.differentiable.degenerate_submanifold": {"walltime": 256},
+  "sage.manifolds.differentiable.diff_form": {"walltime": 64},
+  "sage.manifolds.differentiable.diff_map": {"walltime": 8},
+  "sage.manifolds.differentiable.examples.euclidean": {"walltime": 32},
+  "sage.manifolds.differentiable.examples.sphere": {"walltime": 32},
+  "sage.manifolds.differentiable.integrated_curve": {"walltime": 32},
+  "sage.manifolds.differentiable.levi_civita_connection": {"walltime": 32},
+  "sage.manifolds.differentiable.manifold": {"walltime": 16},
+  "sage.manifolds.differentiable.manifold_homset": {"walltime": 16},
+  "sage.manifolds.differentiable.metric": {"walltime": 64},
+  "sage.manifolds.differentiable.mixed_form": {"walltime": 16},
+  "sage.manifolds.differentiable.mixed_form_algebra": {"walltime": 8},
+  "sage.manifolds.differentiable.multivectorfield": {"walltime": 64},
+  "sage.manifolds.differentiable.pseudo_riemannian": {"walltime": 16},
+  "sage.manifolds.differentiable.pseudo_riemannian_submanifold": {"walltime": 128},
+  "sage.manifolds.differentiable.scalarfield": {"walltime": 16},
+  "sage.manifolds.differentiable.scalarfield_algebra": {"walltime": 8},
+  "sage.manifolds.differentiable.tangent_vector": {"walltime": 16},
+  "sage.manifolds.differentiable.tensorfield": {"walltime": 128},
+  "sage.manifolds.differentiable.tensorfield_paral": {"walltime": 16},
+  "sage.manifolds.differentiable.vector_bundle": {"walltime": 16},
+  "sage.manifolds.differentiable.vectorfield": {"walltime": 64},
+  "sage.manifolds.differentiable.vectorframe": {"walltime": 8},
+  "sage.manifolds.point": {"walltime": 16},
+  "sage.manifolds.scalarfield": {"walltime": 16},
+  "sage.manifolds.scalarfield_algebra": {"walltime": 8},
+  "sage.manifolds.section": {"walltime": 32},
+  "sage.manifolds.trivialization": {"walltime": 8},
+  "sage.manifolds.vector_bundle": {"walltime": 8},
+  "sage.matrix.benchmark": {"walltime": 8},
+  "sage.matrix.matrix2": {"walltime": 16},
+  "sage.matrix.matrix_integer_dense": {"walltime": 16},
+  "sage.matrix.matrix_integer_dense_hnf": {"walltime": 32},
+  "sage.matrix.matrix_mod2_dense": {"walltime": 8},
+  "sage.matrix.matrix_rational_dense": {"walltime": 8},
+  "sage.matrix.special": {"walltime": 8},
+  "sage.matroids.catalog": {"walltime": 64},
+  "sage.misc.cachefunc": {"walltime": 16},
+  "sage.misc.cython": {"walltime": 8},
+  "sage.misc.functional": {"walltime": 8},
+  "sage.misc.randstate": {"walltime": 16},
+  "sage.misc.sagedoc": {"walltime": 64},
+  "sage.misc.sageinspect": {"walltime": 32},
+  "sage.modular.abvar.abvar": {"walltime": 16},
+  "sage.modular.abvar.homspace": {"walltime": 8},
+  "sage.modular.abvar.lseries": {"walltime": 8},
+  "sage.modular.arithgroup.arithgroup_perm": {"walltime": 8},
+  "sage.modular.arithgroup.tests": {"walltime": 8},
+  "sage.modular.btquotients.pautomorphicform": {"walltime": 32},
+  "sage.modular.hypergeometric_motive": {"walltime": 16},
+  "sage.modular.local_comp.local_comp": {"walltime": 32},
+  "sage.modular.local_comp.type_space": {"walltime": 16},
+  "sage.modular.modform.ambient_R": {"walltime": 16},
+  "sage.modular.modform.constructor": {"walltime": 8},
+  "sage.modular.modform.cuspidal_submodule": {"walltime": 16},
+  "sage.modular.modform.element": {"walltime": 64},
+  "sage.modular.modform.ring": {"walltime": 64},
+  "sage.modular.modform.space": {"walltime": 8},
+  "sage.modular.modform_hecketriangle.abstract_space": {"walltime": 16},
+  "sage.modular.modform_hecketriangle.graded_ring_element": {"walltime": 16},
+  "sage.modular.modform_hecketriangle.hecke_triangle_group_element": {"walltime": 32},
+  "sage.modular.modform_hecketriangle.readme": {"walltime": 16},
+  "sage.modular.modform_hecketriangle.space": {"walltime": 8},
+  "sage.modular.modsym.ambient": {"walltime": 16},
+  "sage.modular.modsym.space": {"walltime": 8},
+  "sage.modular.pollack_stevens.modsym": {"walltime": 64},
+  "sage.modular.pollack_stevens.padic_lseries": {"walltime": 32},
+  "sage.modules.finite_submodule_iter": {"walltime": 16},
+  "sage.modules.free_module": {"walltime": 16},
+  "sage.modules.free_module_element": {"walltime": 8},
+  "sage.modules.free_module_integer": {"walltime": 32},
+  "sage.modules.free_quadratic_module_integer_symmetric": {"walltime": 8},
+  "sage.modules.torsion_quadratic_module": {"walltime": 16},
+  "sage.parallel.map_reduce": {"walltime": 8},
+  "sage.plot.animate": {"walltime": 128},
+  "sage.plot.arrow": {"walltime": 8},
+  "sage.plot.circle": {"walltime": 8},
+  "sage.plot.complex_plot": {"walltime": 8},
+  "sage.plot.contour_plot": {"walltime": 32},
+  "sage.plot.density_plot": {"walltime": 8},
+  "sage.plot.graphics": {"walltime": 32},
+  "sage.plot.line": {"walltime": 8},
+  "sage.plot.matrix_plot": {"walltime": 16},
+  "sage.plot.multigraphics": {"walltime": 16},
+  "sage.plot.plot": {"walltime": 64},
+  "sage.plot.plot3d.base": {"walltime": 8},
+  "sage.plot.plot3d.implicit_plot3d": {"walltime": 16},
+  "sage.plot.plot3d.implicit_surface": {"walltime": 8},
+  "sage.plot.plot3d.parametric_plot3d": {"walltime": 8},
+  "sage.plot.plot3d.parametric_surface": {"walltime": 8},
+  "sage.plot.plot3d.plot3d": {"walltime": 16},
+  "sage.plot.plot3d.tachyon": {"walltime": 8},
+  "sage.plot.plot3d.transform": {"walltime": 32},
+  "sage.plot.point": {"walltime": 8},
+  "sage.plot.polygon": {"walltime": 8},
+  "sage.plot.streamline_plot": {"walltime": 8},
+  "sage.quadratic_forms.genera.genus": {"walltime": 16},
+  "sage.quadratic_forms.quadratic_form__automorphisms": {"walltime": 8},
+  "sage.quadratic_forms.quadratic_form__local_representation_conditions": {"walltime": 64},
+  "sage.quadratic_forms.quadratic_form__neighbors": {"walltime": 8},
+  "sage.quadratic_forms.quadratic_form__siegel_product": {"walltime": 8},
+  "sage.repl.ipython_extension": {"walltime": 8},
+  "sage.rings.asymptotic.asymptotic_expansion_generators": {"walltime": 64},
+  "sage.rings.asymptotic.asymptotic_ring": {"walltime": 8},
+  "sage.rings.asymptotic.asymptotics_multivariate_generating_functions": {"walltime": 32},
+  "sage.rings.asymptotic.term_monoid": {"walltime": 8},
+  "sage.rings.continued_fraction": {"walltime": 8},
+  "sage.rings.finite_rings.finite_field_base": {"walltime": 8},
+  "sage.rings.function_field.function_field": {"walltime": 256},
+  "sage.rings.function_field.function_field_valuation": {"walltime": 64},
+  "sage.rings.function_field.ideal": {"walltime": 8},
+  "sage.rings.function_field.place": {"walltime": 8},
+  "sage.rings.integer": {"walltime": 128},
+  "sage.rings.invariants.invariant_theory": {"walltime": 8},
+  "sage.rings.number_field.bdd_height": {"walltime": 8},
+  "sage.rings.number_field.number_field": {"walltime": 64},
+  "sage.rings.number_field.number_field_element": {"walltime": 16},
+  "sage.rings.number_field.splitting_field": {"walltime": 8},
+  "sage.rings.number_field.totallyreal": {"walltime": 16},
+  "sage.rings.number_field.totallyreal_rel": {"walltime": 8},
+  "sage.rings.padics.padic_base_leaves": {"walltime": 64},
+  "sage.rings.padics.padic_extension_leaves": {"walltime": 64},
+  "sage.rings.padics.padic_generic_element": {"walltime": 16},
+  "sage.rings.padics.padic_lattice_element": {"walltime": 32},
+  "sage.rings.padics.relative_extension_leaves": {"walltime": 32},
+  "sage.rings.polynomial.multi_polynomial_ideal": {"walltime": 8},
+  "sage.rings.polynomial.multi_polynomial_sequence": {"walltime": 8},
+  "sage.rings.polynomial.ore_function_element": {"walltime": 8},
+  "sage.rings.polynomial.polynomial_element": {"walltime": 16},
+  "sage.rings.polynomial.polynomial_rational_flint": {"walltime": 8},
+  "sage.rings.polynomial.polynomial_zmod_flint": {"walltime": 512},
+  "sage.rings.qqbar": {"walltime": 16},
+  "sage.rings.tests": {"walltime": 16},
+  "sage.rings.valuation.augmented_valuation": {"walltime": 32},
+  "sage.rings.valuation.mapped_valuation": {"walltime": 64},
+  "sage.rings.valuation.valuation": {"walltime": 8},
+  "sage.sandpiles.sandpile": {"walltime": 16},
+  "sage.schemes.curves.affine_curve": {"walltime": 16},
+  "sage.schemes.curves.closed_point": {"walltime": 8},
+  "sage.schemes.curves.projective_curve": {"walltime": 32},
+  "sage.schemes.cyclic_covers.cycliccover_finite_field": {"walltime": 64},
+  "sage.schemes.elliptic_curves.BSD": {"walltime": 8},
+  "sage.schemes.elliptic_curves.Qcurves": {"walltime": 8},
+  "sage.schemes.elliptic_curves.constructor": {"walltime": 32},
+  "sage.schemes.elliptic_curves.ell_curve_isogeny": {"walltime": 16},
+  "sage.schemes.elliptic_curves.ell_egros": {"walltime": 32},
+  "sage.schemes.elliptic_curves.ell_finite_field": {"walltime": 8},
+  "sage.schemes.elliptic_curves.ell_generic": {"walltime": 8},
+  "sage.schemes.elliptic_curves.ell_modular_symbols": {"walltime": 16},
+  "sage.schemes.elliptic_curves.ell_number_field": {"walltime": 128},
+  "sage.schemes.elliptic_curves.ell_point": {"walltime": 8},
+  "sage.schemes.elliptic_curves.ell_rational_field": {"walltime": 128},
+  "sage.schemes.elliptic_curves.gal_reps_number_field": {"walltime": 32},
+  "sage.schemes.elliptic_curves.gp_simon": {"walltime": 16},
+  "sage.schemes.elliptic_curves.heegner": {"walltime": 32},
+  "sage.schemes.elliptic_curves.height": {"walltime": 64},
+  "sage.schemes.elliptic_curves.isogeny_class": {"walltime": 32},
+  "sage.schemes.elliptic_curves.isogeny_small_degree": {"walltime": 256},
+  "sage.schemes.elliptic_curves.kraus": {"walltime": 16},
+  "sage.schemes.elliptic_curves.mod_sym_num": {"walltime": 8},
+  "sage.schemes.elliptic_curves.padic_lseries": {"walltime": 8},
+  "sage.schemes.elliptic_curves.padics": {"walltime": 16},
+  "sage.schemes.elliptic_curves.saturation": {"walltime": 16},
+  "sage.schemes.elliptic_curves.sha_tate": {"walltime": 32},
+  "sage.schemes.hyperelliptic_curves.hyperelliptic_finite_field": {"walltime": 64},
+  "sage.schemes.hyperelliptic_curves.hyperelliptic_generic": {"walltime": 8},
+  "sage.schemes.hyperelliptic_curves.hyperelliptic_padic_field": {"walltime": 32},
+  "sage.schemes.hyperelliptic_curves.monsky_washnitzer": {"walltime": 8},
+  "sage.schemes.projective.projective_rational_point": {"walltime": 8},
+  "sage.schemes.riemann_surfaces.riemann_surface": {"walltime": 64},
+  "sage.schemes.toric.chow_group": {"walltime": 8},
+  "sage.schemes.toric.sheaf.klyachko": {"walltime": 8},
+  "sage.stats.distributions.discrete_gaussian_integer": {"walltime": 8},
+  "sage.stats.time_series": {"walltime": 8},
+  "sage.structure.coerce_dict": {"walltime": 32},
+  "sage.structure.element": {"walltime": 16},
+  "sage.structure.sage_object": {"walltime": 8},
+  "sage.symbolic.expression": {"walltime": 32},
+  "sage.symbolic.integration.integral": {"walltime": 32},
+  "sage.symbolic.random_tests": {"walltime": 32},
+  "sage.symbolic.relation": {"walltime": 8},
+  "sage.tests.book_schilling_zabrocki_kschur_primer": {"walltime": 32},
+  "sage.tests.book_stein_ent": {"walltime": 16},
+  "sage.tests.books.computational-mathematics-with-sagemath.combinat_doctest": {"walltime": 32},
+  "sage.tests.books.computational-mathematics-with-sagemath.float_doctest": {"walltime": 16},
+  "sage.tests.books.computational-mathematics-with-sagemath.graphique_doctest": {"walltime": 32},
+  "sage.tests.books.computational-mathematics-with-sagemath.graphtheory_doctest": {"walltime": 8},
+  "sage.tests.books.computational-mathematics-with-sagemath.integration_doctest": {"walltime": 32},
+  "sage.tests.books.computational-mathematics-with-sagemath.mpoly_doctest": {"walltime": 8},
+  "sage.tests.books.computational-mathematics-with-sagemath.nonlinear_doctest": {"walltime": 8},
+  "sage.tests.books.computational-mathematics-with-sagemath.recequadiff_doctest": {"walltime": 8},
+  "sage.tests.books.computational-mathematics-with-sagemath.sol.graphique_doctest": {"walltime": 16},
+  "sage.tests.books.computational-mathematics-with-sagemath.sol.numbertheory_doctest": {"walltime": 16},
+  "sage.tests.books.computational-mathematics-with-sagemath.sol.polynomes_doctest": {"walltime": 16},
+  "sage.tests.cmdline": {"walltime": 64},
+  "sage.tests.gosper-sum": {"walltime": 16},
+  "sage.tests.parigp": {"walltime": 8},
+  "sage.topology.simplicial_complex": {"walltime": 8},
+  "sage.topology.simplicial_complex_examples": {"walltime": 16}
+}
diff --git a/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch b/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch
new file mode 100644
index 000000000000..35aef7b8d456
--- /dev/null
+++ b/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch
@@ -0,0 +1,11 @@
+--- a/build/sage_bootstrap/tarball.py	2022-01-07 19:17:06.754747955 -0300
++++ b/build/sage_bootstrap/tarball.py	2022-01-07 19:25:31.844139381 -0300
+@@ -158,6 +158,8 @@
+                             .format(destination=destination))
+         successful_download = False
+         log.info('Attempting to download package {0} from mirrors'.format(self.filename))
++        log.info('ERROR: downloading is disabled, add file to template instead')
++        return
+         for mirror in MirrorList():
+             url = mirror + '/'.join(['spkg', 'upstream', self.package.name, self.filename])
+             log.info(url)
diff --git a/srcpkgs/sagemath/patches/trac-29631-001-system_linbox-794713e88ee188d516e4956832a23f985a73917a.patch b/srcpkgs/sagemath/patches/trac-29631-001-system_linbox-794713e88ee188d516e4956832a23f985a73917a.patch
new file mode 100644
index 000000000000..483dbe2c2597
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-29631-001-system_linbox-794713e88ee188d516e4956832a23f985a73917a.patch
@@ -0,0 +1,31 @@
+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.
+
+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/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-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch b/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
new file mode 100644
index 000000000000..da88a369db0d
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
@@ -0,0 +1,57 @@
+From 2c981351bb60089530b0598d3e9a909a23d4d4d8 Mon Sep 17 00:00:00 2001
+From: Thierry Thomas <thierry@FreeBSD.org>
+Date: Mon, 22 Mar 2021 03:04:12 +0100
+Subject: 29644: Add spkg-configure.m4 for gap
+
+---
+ build/pkgs/gap/spkg-configure.m4 | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+ create mode 100644 build/pkgs/gap/spkg-configure.m4
+
+diff --git a/build/pkgs/gap/spkg-configure.m4 b/build/pkgs/gap/spkg-configure.m4
+new file mode 100644
+index 00000000..91cd089
+--- /dev/null
++++ b/build/pkgs/gap/spkg-configure.m4
+@@ -0,0 +1,8 @@
++SAGE_SPKG_CONFIGURE([gap], [
++    SAGE_SPKG_DEPCHECK([gmp], [
++       AC_CHECK_HEADER([gap/system.h], [
++        AC_SEARCH_LIBS([GAP_COMM], [gap], [
++        ], [sage_spkg_install_gap=yes])
++       ], [sage_spkg_install_gap=yes])
++    ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2a41f491e5ce599ba185f5e93f02e0fcebd76c9e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Samuel=20Leli=C3=A8vre?= <samuel.lelievre@gmail.com>
+Date: Mon, 22 Mar 2021 03:05:31 +0100
+Subject: 29644: Add distro information for gap
+
+---
+ build/pkgs/gap/distros/fedora.txt | 1 +
+ build/pkgs/gap/distros/gentoo.txt | 1 +
+ 2 files changed, 2 insertions(+)
+ create mode 100644 build/pkgs/gap/distros/fedora.txt
+ create mode 100644 build/pkgs/gap/distros/gentoo.txt
+
+diff --git a/build/pkgs/gap/distros/fedora.txt b/build/pkgs/gap/distros/fedora.txt
+new file mode 100644
+index 00000000..ea4feae
+--- /dev/null
++++ b/build/pkgs/gap/distros/fedora.txt
+@@ -0,0 +1 @@
++gap
+diff --git a/build/pkgs/gap/distros/gentoo.txt b/build/pkgs/gap/distros/gentoo.txt
+new file mode 100644
+index 00000000..ea64ec9
+--- /dev/null
++++ b/build/pkgs/gap/distros/gentoo.txt
+@@ -0,0 +1 @@
++sci-mathematics/gap
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
new file mode 100644
index 000000000000..0ecb27c593cd
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
@@ -0,0 +1,5629 @@
+From 05fcaabe95082f42ba134780d579390d7b6153e2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 19:30:58 -0400
+Subject: Trac #29665: add --enable-system-site-packages option to ./configure.
+
+This new option is experimental and disabled by default. When it is
+enabled, the string "--system-site-packages" is appended to a new
+environment variable SAGE_VENV_FLAGS that is then passed to the
+sage-venv command during the build using autoconf substitution.
+Thusly the correct setting finds its way into local/pyvenv.cfg.
+---
+ build/make/Makefile.in |  2 +-
+ configure.ac           | 11 +++++++++++
+ 2 files changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/build/make/Makefile.in b/build/make/Makefile.in
+index f870cc3..68627ab 100644
+--- a/build/make/Makefile.in
++++ b/build/make/Makefile.in
+@@ -211,7 +211,7 @@ endif
+ inst_python3_venv = $(SAGE_VENV)/pyvenv.cfg
+ 
+ $(inst_python3_venv):
+-	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv "$(SAGE_VENV)"
++	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv @SAGE_VENV_FLAGS@ "$(SAGE_VENV)"
+ endif
+ 
+ # Build everything and start Sage.
+diff --git a/configure.ac b/configure.ac
+index 351f487..db30a91 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -435,6 +435,17 @@ AC_ARG_ENABLE([download-from-upstream-url],
+   [AS_HELP_STRING([--enable-download-from-upstream-url],
+     [allow downloading packages from their upstream URL if they cannot be found on the Sage mirrors])])
+ 
++AC_ARG_ENABLE(
++  [system-site-packages], [AS_HELP_STRING(
++    [--enable-system-site-packages],
++    [allow sage to use python packages from the system (experimental; default: no)]
++  )], [
++  AS_IF([test "x$enable_system_site_packages" = "xyes"], [
++    SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
++  ])
++])
++AC_SUBST([SAGE_VENV_FLAGS])
++
+ SAGE_SPKG_OPTIONS=""
+ AS_IF([test "x$enable_experimental_packages" = "xyes"], [
+   AS_VAR_APPEND([SAGE_SPKG_OPTIONS], [" -y"])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9372d1f663edf4e89f9c186336815ca04cff59dc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 19:41:14 -0400
+Subject: Trac #29665: new SAGE_PYTHON_PACKAGE_CHECK() autoconf macro.
+
+This new macro encapsulates the check for system installations of
+python packages. It uses setuptools.version's pkg_resources to
+check if the contents of install-requires.txt are satisfied for
+the given package; and if not, tells the build system to install
+the SPKG instead.
+---
+ m4/sage_python_package_check.m4 | 49 +++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 49 insertions(+)
+ create mode 100644 m4/sage_python_package_check.m4
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+new file mode 100644
+index 00000000..77b0a0c
+--- /dev/null
++++ b/m4/sage_python_package_check.m4
+@@ -0,0 +1,49 @@
++#
++# SYNOPSIS
++#
++#   SAGE_PYTHON_PACKAGE_CHECK(package)
++#
++# DESCRIPTION
++#
++#   Determine if the system copy of a python package can be used by sage.
++#
++#   This macro uses setuptools.version's pkg_resources to check that the
++#   "install-requires.txt" file for the named package is satisfied, and
++#   it can typically fail in four ways:
++#
++#     1. If --enable-system-site-packages was not passed to ./configure,
++#
++#     2. If we are not using the system python (no $PYTHON_FOR_VENV),
++#
++#     3. If setuptools is not available to the system python,
++#
++#     4. If the contents of install-requires.txt are not met (wrong
++#        version, no version, etc.) by the system python.
++#
++#   In any of those cases, we set sage_spkg_install_$package to "yes"
++#   so that the corresponding SPKG is installed. Otherwise, we do
++#   nothing, since the default value of sage_spkg_install_$package
++#   is "no" (to use the system copy).
++#
++#   The SAGE_SPKG_CONFIGURE_PYTHON3() macro is AC_REQUIRE'd to ensure
++#   that $PYTHON_FOR_VENV is available, if it is going to be available.
++#
++
++AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
++  AS_IF([test "${enable_system_site_packages}" = "yes"], [
++    AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
++
++    dnl strip all comments from install-requires.txt; this should leave
++    dnl only a single line containing the version specification for this
++    dnl package.
++    SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
++    AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++    AS_IF(
++      ["${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())"],
++      [AC_MSG_RESULT(yes)],
++      [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
++    )
++  ], [
++    sage_spkg_install_$1=yes
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a0dac8ad81ad6369d479bba30d2388de59e5cecb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:21:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for py.
+
+---
+ build/pkgs/py/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/py/spkg-configure.m4
+
+diff --git a/build/pkgs/py/spkg-configure.m4 b/build/pkgs/py/spkg-configure.m4
+new file mode 100644
+index 00000000..ded7034
+--- /dev/null
++++ b/build/pkgs/py/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([py], [SAGE_PYTHON_PACKAGE_CHECK([py])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 87c463a25ab4432dc1fba4f7a9703284e5b8f620 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:24:15 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for wheel.
+
+---
+ build/pkgs/wheel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wheel/spkg-configure.m4
+
+diff --git a/build/pkgs/wheel/spkg-configure.m4 b/build/pkgs/wheel/spkg-configure.m4
+new file mode 100644
+index 00000000..7897ea9
+--- /dev/null
++++ b/build/pkgs/wheel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([wheel], [SAGE_PYTHON_PACKAGE_CHECK([wheel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 804094b3a980f262f4d53d7be8b1be43ac0c55e0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:25:15 -0400
+Subject: Trac #29665: new spkg-configure.m4 for cvxopt.
+
+This includes a SAGE_SPKG_DEPCHECK([gsl glpk suitesparse],... because
+those C dependencies wind up linked into shared libraries like,
+
+  /usr/.../cvxopt/glpk.cpython-39-x86_64-linux-gnu.so
+
+that could potentially conflict with (for example) the glpk SPKG.
+---
+ build/pkgs/cvxopt/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/cvxopt/spkg-configure.m4
+
+diff --git a/build/pkgs/cvxopt/spkg-configure.m4 b/build/pkgs/cvxopt/spkg-configure.m4
+new file mode 100644
+index 00000000..c4aa619
+--- /dev/null
++++ b/build/pkgs/cvxopt/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([cvxopt], [
++  SAGE_SPKG_DEPCHECK([gsl glpk suitesparse], [
++    SAGE_PYTHON_PACKAGE_CHECK([cvxopt])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3f171955ff8d15da2c98aee0d2e254e95a55a2b5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:28:10 -0400
+Subject: Trac #29665: new spkg-configure.m4 for pyzmq.
+
+This includes a SAGE_SPKG_DEPCHECK([zeromq],... because libzmq winds
+up linked into shared libraries like,
+
+  /usr/.../zmq/backend/cython/message.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the zeromq SPKG.
+---
+ build/pkgs/pyzmq/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/pyzmq/spkg-configure.m4
+
+diff --git a/build/pkgs/pyzmq/spkg-configure.m4 b/build/pkgs/pyzmq/spkg-configure.m4
+new file mode 100644
+index 00000000..ae2b126
+--- /dev/null
++++ b/build/pkgs/pyzmq/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([pyzmq], [
++  SAGE_SPKG_DEPCHECK([zeromq], [
++    SAGE_PYTHON_PACKAGE_CHECK([pyzmq])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20d3aa9da9fc98a6e6a47599cd1b6d1d3785a4c4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:31:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for requests.
+
+---
+ build/pkgs/requests/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/requests/spkg-configure.m4
+
+diff --git a/build/pkgs/requests/spkg-configure.m4 b/build/pkgs/requests/spkg-configure.m4
+new file mode 100644
+index 00000000..f50a66c
+--- /dev/null
++++ b/build/pkgs/requests/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([requests], [SAGE_PYTHON_PACKAGE_CHECK([requests])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4df57ee47f2576b6b7bf9265248e06e90616b689 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:13:34 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for six.
+
+---
+ build/pkgs/six/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/six/spkg-configure.m4
+
+diff --git a/build/pkgs/six/spkg-configure.m4 b/build/pkgs/six/spkg-configure.m4
+new file mode 100644
+index 00000000..a382b81
+--- /dev/null
++++ b/build/pkgs/six/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([six], [SAGE_PYTHON_PACKAGE_CHECK([six])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f4462652d02ca729cc6d7cb36ee4d7d662deafb0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:14:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for packaging.
+
+---
+ build/pkgs/packaging/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/packaging/spkg-configure.m4
+
+diff --git a/build/pkgs/packaging/spkg-configure.m4 b/build/pkgs/packaging/spkg-configure.m4
+new file mode 100644
+index 00000000..398f9e1
+--- /dev/null
++++ b/build/pkgs/packaging/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([packaging], [SAGE_PYTHON_PACKAGE_CHECK([packaging])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4d64677fffce48077e4bc3e20ec833c70e6e9b65 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:18:53 -0400
+Subject: Trac #29665: new spkg-configure.m4 for numpy.
+
+This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack
+wind up linked into shared libraries like,
+
+  /usr/.../numpy/linalg/lapack_lite.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the openblas SPKG.
+---
+ build/pkgs/numpy/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/numpy/spkg-configure.m4
+
+diff --git a/build/pkgs/numpy/spkg-configure.m4 b/build/pkgs/numpy/spkg-configure.m4
+new file mode 100644
+index 00000000..16f9a90
+--- /dev/null
++++ b/build/pkgs/numpy/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([numpy], [
++  SAGE_SPKG_DEPCHECK([openblas], [
++   SAGE_PYTHON_PACKAGE_CHECK([numpy])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 85dfe5bb32f3c470966b477bae68a921e846d11f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:58:48 -0400
+Subject: Trac #29665: new spkg-configure.m4 for scipy.
+
+This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack
+wind up linked into shared libraries like,
+
+  /usr/.../scipy/linalg/_flinalg.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the openblas SPKG.
+---
+ build/pkgs/scipy/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/scipy/spkg-configure.m4
+
+diff --git a/build/pkgs/scipy/spkg-configure.m4 b/build/pkgs/scipy/spkg-configure.m4
+new file mode 100644
+index 00000000..0b7294a
+--- /dev/null
++++ b/build/pkgs/scipy/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([scipy], [
++  SAGE_SPKG_DEPCHECK([openblas], [
++    SAGE_PYTHON_PACKAGE_CHECK([scipy])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5616f1491036fda95f4d3e840c8c8b531c97323b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 07:19:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pluggy.
+
+---
+ build/pkgs/pluggy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pluggy/spkg-configure.m4
+
+diff --git a/build/pkgs/pluggy/spkg-configure.m4 b/build/pkgs/pluggy/spkg-configure.m4
+new file mode 100644
+index 00000000..11b1fce
+--- /dev/null
++++ b/build/pkgs/pluggy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pluggy], [SAGE_PYTHON_PACKAGE_CHECK([pluggy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6bceae3d356878cfe5fce40c9998dead003a3844 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 07:24:12 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pickleshare.
+
+---
+ build/pkgs/pickleshare/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pickleshare/spkg-configure.m4
+
+diff --git a/build/pkgs/pickleshare/spkg-configure.m4 b/build/pkgs/pickleshare/spkg-configure.m4
+new file mode 100644
+index 00000000..80e9b7c
+--- /dev/null
++++ b/build/pkgs/pickleshare/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pickleshare], [SAGE_PYTHON_PACKAGE_CHECK([pickleshare])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From da2ab534f4a256c82ed4f1c5f0f5c320529b5e9f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 08:53:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for html5lib.
+
+---
+ build/pkgs/html5lib/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/html5lib/spkg-configure.m4
+
+diff --git a/build/pkgs/html5lib/spkg-configure.m4 b/build/pkgs/html5lib/spkg-configure.m4
+new file mode 100644
+index 00000000..f421b7e
+--- /dev/null
++++ b/build/pkgs/html5lib/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([html5lib], [SAGE_PYTHON_PACKAGE_CHECK([html5lib])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5e464134afdf6055b7b5804208f759561c5435cd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 18:30:47 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for networkx.
+
+---
+ build/pkgs/networkx/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/networkx/spkg-configure.m4
+
+diff --git a/build/pkgs/networkx/spkg-configure.m4 b/build/pkgs/networkx/spkg-configure.m4
+new file mode 100644
+index 00000000..926671e
+--- /dev/null
++++ b/build/pkgs/networkx/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([networkx], [SAGE_PYTHON_PACKAGE_CHECK([networkx])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c4d40770cd9c7fda811e31759a5f4aedc320f3f9 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:33:24 -0400
+Subject: Trac #29665: new spkg-configure.m4 for matplotlib.
+
+This includes a SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull],...
+because those dependencies wind up linked into shared libraries like,
+
+  /usr/lib/.../matplotlib/ft2font.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with their SPKG counterparts.
+---
+ build/pkgs/matplotlib/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/matplotlib/spkg-configure.m4
+
+diff --git a/build/pkgs/matplotlib/spkg-configure.m4 b/build/pkgs/matplotlib/spkg-configure.m4
+new file mode 100644
+index 00000000..39c2d29
+--- /dev/null
++++ b/build/pkgs/matplotlib/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([matplotlib], [
++  SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull], [
++    SAGE_PYTHON_PACKAGE_CHECK([matplotlib])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7834dc3ac349201af632f89a9de7cd1967931010 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:35:00 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for bleach.
+
+---
+ build/pkgs/bleach/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/bleach/spkg-configure.m4
+
+diff --git a/build/pkgs/bleach/spkg-configure.m4 b/build/pkgs/bleach/spkg-configure.m4
+new file mode 100644
+index 00000000..3c9bb26
+--- /dev/null
++++ b/build/pkgs/bleach/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([bleach], [SAGE_PYTHON_PACKAGE_CHECK([bleach])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 84cad343287a2c69a4a21b9fa3b92301ff88645b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:37:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for decorator.
+
+---
+ build/pkgs/decorator/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/decorator/spkg-configure.m4
+
+diff --git a/build/pkgs/decorator/spkg-configure.m4 b/build/pkgs/decorator/spkg-configure.m4
+new file mode 100644
+index 00000000..e062778
+--- /dev/null
++++ b/build/pkgs/decorator/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([decorator], [SAGE_PYTHON_PACKAGE_CHECK([decorator])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 25693212572e69d452bc95c923ada13744359eb7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:38:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for idna.
+
+---
+ build/pkgs/idna/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/idna/spkg-configure.m4
+
+diff --git a/build/pkgs/idna/spkg-configure.m4 b/build/pkgs/idna/spkg-configure.m4
+new file mode 100644
+index 00000000..9d363f2
+--- /dev/null
++++ b/build/pkgs/idna/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([idna], [SAGE_PYTHON_PACKAGE_CHECK([idna])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6d5616472f6cdc6cf496bba6fe07bd4ef44dfdaf Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:39:23 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for certifi.
+
+---
+ build/pkgs/certifi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/certifi/spkg-configure.m4
+
+diff --git a/build/pkgs/certifi/spkg-configure.m4 b/build/pkgs/certifi/spkg-configure.m4
+new file mode 100644
+index 00000000..ddd4061
+--- /dev/null
++++ b/build/pkgs/certifi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([certifi], [SAGE_PYTHON_PACKAGE_CHECK([certifi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9412a07023b275e29e8d1af9b8ee3e767042e7fd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:40:59 -0400
+Subject: Trac #29665: new spkg-configure.m4 for pillow.
+
+This includes an SAGE_SPKG_DEPCHECK([bzip2 freetype libpng zlib],...
+because those dependencies wind up linked into shared libraries like,
+
+  /usr/.../PIL/_imagingft.cpython-39-x86_64-linux-gnu.so
+
+and potentially conflict with their SPKG counterparts.
+---
+ build/pkgs/pillow/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/pillow/spkg-configure.m4
+
+diff --git a/build/pkgs/pillow/spkg-configure.m4 b/build/pkgs/pillow/spkg-configure.m4
+new file mode 100644
+index 00000000..f2e68e2
+--- /dev/null
++++ b/build/pkgs/pillow/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([pillow], [
++  SAGE_SPKG_DEPCHECK([bzip2 freetype libpng zlib], [
++    SAGE_PYTHON_PACKAGE_CHECK([pillow])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From eede914311481fdb75b363b7a799075e876a2b4f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:44:13 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for mpmath.
+
+---
+ build/pkgs/mpmath/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mpmath/spkg-configure.m4
+
+diff --git a/build/pkgs/mpmath/spkg-configure.m4 b/build/pkgs/mpmath/spkg-configure.m4
+new file mode 100644
+index 00000000..f43c838
+--- /dev/null
++++ b/build/pkgs/mpmath/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([mpmath], [SAGE_PYTHON_PACKAGE_CHECK([mpmath])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 363a825885832c0b580ff53fe61f5c79e70c4728 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:44:56 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for sympy.
+
+---
+ build/pkgs/sympy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sympy/spkg-configure.m4
+
+diff --git a/build/pkgs/sympy/spkg-configure.m4 b/build/pkgs/sympy/spkg-configure.m4
+new file mode 100644
+index 00000000..fa0f1f5
+--- /dev/null
++++ b/build/pkgs/sympy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([sympy], [SAGE_PYTHON_PACKAGE_CHECK([sympy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0667964c914e4a01dda697190a054ff96cea92d6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:47:06 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pygments.
+
+---
+ build/pkgs/pygments/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pygments/spkg-configure.m4
+
+diff --git a/build/pkgs/pygments/spkg-configure.m4 b/build/pkgs/pygments/spkg-configure.m4
+new file mode 100644
+index 00000000..99f29e3
+--- /dev/null
++++ b/build/pkgs/pygments/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pygments], [SAGE_PYTHON_PACKAGE_CHECK([pygments])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f787c233aa05d8e90f7c6ad18f76bd2fa36bfbfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:48:50 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for jinja2.
+
+---
+ build/pkgs/jinja2/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jinja2/spkg-configure.m4
+
+diff --git a/build/pkgs/jinja2/spkg-configure.m4 b/build/pkgs/jinja2/spkg-configure.m4
+new file mode 100644
+index 00000000..0970d1c
+--- /dev/null
++++ b/build/pkgs/jinja2/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jinja2], [SAGE_PYTHON_PACKAGE_CHECK([jinja2])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 309d8f8e2b7078b5efbbe824b69ec1d9b1e639f0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:43:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pandocfilters.
+
+---
+ build/pkgs/pandocfilters/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/pandocfilters/spkg-configure.m4
+
+diff --git a/build/pkgs/pandocfilters/spkg-configure.m4 b/build/pkgs/pandocfilters/spkg-configure.m4
+new file mode 100644
+index 00000000..3e9537f
+--- /dev/null
++++ b/build/pkgs/pandocfilters/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([pandocfilters], [
++  SAGE_PYTHON_PACKAGE_CHECK([pandocfilters])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f57bfda49777a6ba1cd123553acd75dc347c5521 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:44:46 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for webencodings.
+
+---
+ build/pkgs/webencodings/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/webencodings/spkg-configure.m4
+
+diff --git a/build/pkgs/webencodings/spkg-configure.m4 b/build/pkgs/webencodings/spkg-configure.m4
+new file mode 100644
+index 00000000..1b9a5c4
+--- /dev/null
++++ b/build/pkgs/webencodings/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([webencodings], [
++  SAGE_PYTHON_PACKAGE_CHECK([webencodings])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7f193a62d7a2ea0b6a3ca6beb12390d91c25bbfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:48:26 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pytz.
+
+---
+ build/pkgs/pytz/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pytz/spkg-configure.m4
+
+diff --git a/build/pkgs/pytz/spkg-configure.m4 b/build/pkgs/pytz/spkg-configure.m4
+new file mode 100644
+index 00000000..366521b
+--- /dev/null
++++ b/build/pkgs/pytz/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pytz], [SAGE_PYTHON_PACKAGE_CHECK([pytz])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bfd3fdd887c3465c03465248de4997eed4a82915 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:51:16 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for texttable.
+
+---
+ build/pkgs/texttable/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/texttable/spkg-configure.m4
+
+diff --git a/build/pkgs/texttable/spkg-configure.m4 b/build/pkgs/texttable/spkg-configure.m4
+new file mode 100644
+index 00000000..42a3de1
+--- /dev/null
++++ b/build/pkgs/texttable/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([texttable], [SAGE_PYTHON_PACKAGE_CHECK([texttable])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 914bf0cc57abc46129b27c1525782dbe16da31a2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:53:41 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for babel.
+
+---
+ build/pkgs/babel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/babel/spkg-configure.m4
+
+diff --git a/build/pkgs/babel/spkg-configure.m4 b/build/pkgs/babel/spkg-configure.m4
+new file mode 100644
+index 00000000..d7b9a71
+--- /dev/null
++++ b/build/pkgs/babel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([babel], [SAGE_PYTHON_PACKAGE_CHECK([babel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 56977abd1eafbc87c765a2892cfe525382648259 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 14 Oct 2021 08:06:59 -0400
+Subject: Trac #29665: force system python3 with --enable-system-site-packages.
+
+When the python SPKG is used, the --enable-system-site-packages flag
+will essentially do nothing, and that may confuse users who have
+wasted a few hours building sage. (Generally, they will want to fix
+detection of their system python3 first.)
+
+To forestall that, we now set "--with-system-python3=force" whenever
+the "--enable-system-site-packages" flag is passed.
+---
+ configure.ac | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index db30a91..6fafb83 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -438,10 +438,19 @@ AC_ARG_ENABLE([download-from-upstream-url],
+ AC_ARG_ENABLE(
+   [system-site-packages], [AS_HELP_STRING(
+     [--enable-system-site-packages],
+-    [allow sage to use python packages from the system (experimental; default: no)]
++    [allow the use of python packages from the system (experimental; default: no)]
+   )], [
+   AS_IF([test "x$enable_system_site_packages" = "xyes"], [
+     SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
++
++    dnl We want to raise an error if the user asked for "system site
++    dnl packages" but the system python will not be used. Technically
++    dnl that causes no problems (SAGE_PYTHON_PACKAGE_CHECK always fails,
++    dnl so SPKGs are used for all python packages), but it may be confusing
++    dnl to end users who expect the flag to actually give them access to
++    dnl their system python packages and who may not be paying close
++    dnl attention to their ./configure output.
++    with_system_python3="force"
+   ])
+ ])
+ AC_SUBST([SAGE_VENV_FLAGS])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 02b369fd24ef7cf8997082e7850b9cf022cae34b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 01:18:35 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for setuptools.
+
+---
+ build/pkgs/setuptools/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/setuptools/spkg-configure.m4
+
+diff --git a/build/pkgs/setuptools/spkg-configure.m4 b/build/pkgs/setuptools/spkg-configure.m4
+new file mode 100644
+index 00000000..a2ad811
+--- /dev/null
++++ b/build/pkgs/setuptools/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([setuptools], [SAGE_PYTHON_PACKAGE_CHECK([setuptools])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 05117317d38693978efaf36e81d8b02bae44b257 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 01:15:48 -0400
+Subject: Trac #29665: poison PYTHONUSERBASE when testing for "system"
+ packages.
+
+When we're detecting system installations of python packages, we want
+to hide anything that was installed with e.g. "pip install --user". To
+accomplish that, we mimic the PYTHONUSERBASE poisoning from sage-env
+within the SAGE_PYTHON_PACKAGE_CHECK() macro.
+---
+ m4/sage_python_package_check.m4 | 18 +++++++++++++++++-
+ 1 file changed, 17 insertions(+), 1 deletion(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 77b0a0c..b8cdba4 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -38,11 +38,27 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     dnl package.
+     SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
+     AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++
++    dnl To prevent user-site (pip install --user) packages from being
++    dnl detected as "system" packages, we poison PYTHONUSERBASE. The
++    dnl sage-env script also does this at runtime; we mimic that
++    dnl implementation to ensure that the behaviors at ./configure and
++    dnl runtime are identical. Beware that (as in sage-env) the poisoning
++    dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
++    dnl user points PYTHONUSERBASE to any path (even the default), then
++    dnl his local pip packages will be detected.
++    PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
++    AS_IF([test -z "${PYTHONUSERBASE}"], [
++      PYTHONUSERBASE="${HOME}/.sage/local"
++    ])
++
+     AS_IF(
+-      ["${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())"],
++      [PYTHONUSERBASE="${PYTHONUSERBASE}" "${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" 2>/dev/null],
+       [AC_MSG_RESULT(yes)],
+       [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+     )
++
++    PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d75c1492f63a584b5ec5f424ddd7f7c4a6d502d3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:20:04 -0400
+Subject: Trac #29665: run SAGE_PYTHON_PACKAGE_CHECK() inside a venv.
+
+To recreate the runtime environment as closely as possible, we now use
+a venv (with system site packages enabled) when checking for system
+copies of python packages.
+---
+ m4/sage_python_package_check.m4 | 76 +++++++++++++++++++++++++++--------------
+ 1 file changed, 51 insertions(+), 25 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index b8cdba4..7cbd6c0 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -15,9 +15,11 @@
+ #
+ #     2. If we are not using the system python (no $PYTHON_FOR_VENV),
+ #
+-#     3. If setuptools is not available to the system python,
++#     3. If we are unable to create a venv with the system python,
+ #
+-#     4. If the contents of install-requires.txt are not met (wrong
++#     4. If setuptools is not available to the system python,
++#
++#     5. If the contents of install-requires.txt are not met (wrong
+ #        version, no version, etc.) by the system python.
+ #
+ #   In any of those cases, we set sage_spkg_install_$package to "yes"
+@@ -27,38 +29,62 @@
+ #
+ #   The SAGE_SPKG_CONFIGURE_PYTHON3() macro is AC_REQUIRE'd to ensure
+ #   that $PYTHON_FOR_VENV is available, if it is going to be available.
++#   The check is run inside a new venv, and with the PYTHONUSERBASE
++#   variable poisoned in the same manner as sage-env poisons it, to
++#   ensure that the ./configure- and run-time views of the system
++#   are as similar as possible.
+ #
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
+     AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
+ 
+-    dnl strip all comments from install-requires.txt; this should leave
+-    dnl only a single line containing the version specification for this
+-    dnl package.
+-    SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
+-    AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++    dnl We run this check inside a python venv, because that's ultimately
++    dnl how the system $PYTHON_FOR_VENV will be used.
++    AC_MSG_CHECKING([if we can create a python venv in config.venv])
+ 
+-    dnl To prevent user-site (pip install --user) packages from being
+-    dnl detected as "system" packages, we poison PYTHONUSERBASE. The
+-    dnl sage-env script also does this at runtime; we mimic that
+-    dnl implementation to ensure that the behaviors at ./configure and
+-    dnl runtime are identical. Beware that (as in sage-env) the poisoning
+-    dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
+-    dnl user points PYTHONUSERBASE to any path (even the default), then
+-    dnl his local pip packages will be detected.
+-    PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
+-    AS_IF([test -z "${PYTHONUSERBASE}"], [
+-      PYTHONUSERBASE="${HOME}/.sage/local"
+-    ])
++    dnl Use --clear because ./configure typically clobbers its output files.
++    AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
++                                        --clear                dnl
++                                        --without-pip          dnl
++					config.venv], [
++      AC_MSG_RESULT(yes)
++      dnl strip all comments from install-requires.txt; this should leave
++      dnl only a single line containing the version specification for this
++      dnl package.
++      SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
++      AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++
++      dnl To prevent user-site (pip install --user) packages from being
++      dnl detected as "system" packages, we poison PYTHONUSERBASE. The
++      dnl sage-env script also does this at runtime; we mimic that
++      dnl implementation to ensure that the behaviors at ./configure and
++      dnl runtime are identical. Beware that (as in sage-env) the poisoning
++      dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
++      dnl user points PYTHONUSERBASE to any path (even the default), then
++      dnl his local pip packages will be detected.
++      PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
++      AS_IF([test -z "${PYTHONUSERBASE}"], [
++        PYTHONUSERBASE="${HOME}/.sage/local"
++      ])
+ 
+-    AS_IF(
+-      [PYTHONUSERBASE="${PYTHONUSERBASE}" "${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" 2>/dev/null],
+-      [AC_MSG_RESULT(yes)],
+-      [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+-    )
++      AS_IF(
++        [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
++           "from setuptools.version import pkg_resources;              dnl
++            pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" dnl
++	 2>/dev/null],
++        [AC_MSG_RESULT(yes)],
++        [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
++      )
++
++      PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
++    ], [
++      dnl failed to create a venv for some reason
++      AC_MSG_RESULT(no)
++      sage_spkg_install_$1=yes
++    ])
+ 
+-    PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
++    rm -rf config.venv
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 87646c3264a04ffd98a12d67074f93e1943a1e96 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:38:08 -0400
+Subject: Trac #29665: log SAGE_PYTHON_PACKAGE_CHECK() failures to config.log.
+
+---
+ m4/sage_python_package_check.m4 | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 7cbd6c0..e0e0b9f 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -47,7 +47,8 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
+                                         --clear                dnl
+                                         --without-pip          dnl
+-					config.venv], [
++                                        config.venv            dnl
++                                        2>&AS_MESSAGE_LOG_FD], [
+       AC_MSG_RESULT(yes)
+       dnl strip all comments from install-requires.txt; this should leave
+       dnl only a single line containing the version specification for this
+@@ -72,7 +73,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+         [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
+            "from setuptools.version import pkg_resources;              dnl
+             pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" dnl
+-	 2>/dev/null],
++	 2>&AS_MESSAGE_LOG_FD],
+         [AC_MSG_RESULT(yes)],
+         [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+       )
+-- 
+cgit v1.0-1-gd88e
+
+
+From f7dfffd1c64816e2ae4e0f420b22065c5c5bf2cb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:45:37 -0400
+Subject: Trac #29665: don't clobber a plain file named config.venv.
+
+When SAGE_PYTHON_PACKAGE_CHECK() is cleaning up, we no longer remove
+"config.venv" unconditionally. Instead, we remove it only if it is a
+directory. This is also how "pyvenv --clear" works.
+---
+ m4/sage_python_package_check.m4 | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index e0e0b9f..127a078 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -85,7 +85,9 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+       sage_spkg_install_$1=yes
+     ])
+ 
+-    rm -rf config.venv
++    dnl Clean up config.venv, but only if we could have created it.
++    dnl (The --clear flag to pyvenv will not clobber a plain file.)
++    AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9849c77313b895dcfb786d2ea54e36585bd31ce2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 16 Oct 2021 08:14:42 -0400
+Subject: Trac #29665: don't announce system python packages that won't be
+ used.
+
+When --enable-system-site-packages was not given, the python packages
+using SAGE_PYTHON_PACKAGE_CHECK() in spkg-configure.m4 cannot be used.
+Rather than suggest that users install them anyway, that macro now
+hacks the value of sage_use_system_$package to be "no" when the use
+of system site packages is disabled at the python level.
+---
+ m4/sage_python_package_check.m4 | 17 +++++++++++++++++
+ 1 file changed, 17 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 127a078..7ee82a7 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -89,6 +89,23 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     dnl (The --clear flag to pyvenv will not clobber a plain file.)
+     AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
++    dnl System site packages are disabled.
+     sage_spkg_install_$1=yes
++
++    dnl We have to retroactively hack the --with-system-foo={no,yes,force}
++    dnl mechanism here because it wasn't designed with the ability to
++    dnl disable arbitrary chunks of system packages in mind. The easy cases
++    dnl are "no" and "force" which require no action; "no" means we won't
++    dnl suggest the package anyway, and "force" will raise an error when
++    dnl the system-package check fails.
++    dnl
++    dnl The default of "yes" is more troubling because it is the default. To
++    dnl avoid prompting users to install packages that won't be used, we want
++    dnl to ignore "yes" when reporting the "hint: install these packages..."
++    dnl at the end of ./configure. To accomplish that, we change "yes" to
++    dnl "no" here, essentially changing the default for packages using this
++    dnl macro when --enable-system-site-packages is disabled. Packages with
++    dnl "no" are not suggested to the user.
++    AS_IF([test "${sage_use_system_$1}" = "yes"],[sage_use_system_$1=no])
+   ])
+ ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3e6ad737b94aaac234d615ecaf1a2455eb607f1a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 17 Oct 2021 06:16:21 -0400
+Subject: Trac #29665: add Gentoo package information for python packages.
+
+---
+ build/pkgs/babel/distros/gentoo.txt         | 1 +
+ build/pkgs/bleach/distros/gentoo.txt        | 1 +
+ build/pkgs/certifi/distros/gentoo.txt       | 1 +
+ build/pkgs/cvxopt/distros/gentoo.txt        | 1 +
+ build/pkgs/decorator/distros/gentoo.txt     | 1 +
+ build/pkgs/html5lib/distros/gentoo.txt      | 1 +
+ build/pkgs/idna/distros/gentoo.txt          | 1 +
+ build/pkgs/jinja2/distros/gentoo.txt        | 1 +
+ build/pkgs/matplotlib/distros/gentoo.txt    | 1 +
+ build/pkgs/mpmath/distros/gentoo.txt        | 1 +
+ build/pkgs/networkx/distros/gentoo.txt      | 1 +
+ build/pkgs/numpy/distros/gentoo.txt         | 1 +
+ build/pkgs/packaging/distros/gentoo.txt     | 1 +
+ build/pkgs/pandocfilters/distros/gentoo.txt | 1 +
+ build/pkgs/pickleshare/distros/gentoo.txt   | 1 +
+ build/pkgs/pillow/distros/gentoo.txt        | 1 +
+ build/pkgs/pluggy/distros/gentoo.txt        | 1 +
+ build/pkgs/pygments/distros/gentoo.txt      | 1 +
+ build/pkgs/pytz/distros/gentoo.txt          | 1 +
+ build/pkgs/pyzmq/distros/gentoo.txt         | 1 +
+ build/pkgs/requests/distros/gentoo.txt      | 1 +
+ build/pkgs/scipy/distros/gentoo.txt         | 1 +
+ build/pkgs/setuptools/distros/gentoo.txt    | 1 +
+ build/pkgs/six/distros/gentoo.txt           | 1 +
+ build/pkgs/sympy/distros/gentoo.txt         | 1 +
+ build/pkgs/texttable/distros/gentoo.txt     | 1 +
+ build/pkgs/toml/distros/gentoo.txt          | 1 +
+ build/pkgs/webencodings/distros/gentoo.txt  | 1 +
+ 28 files changed, 28 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/gentoo.txt
+ create mode 100644 build/pkgs/bleach/distros/gentoo.txt
+ create mode 100644 build/pkgs/certifi/distros/gentoo.txt
+ create mode 100644 build/pkgs/cvxopt/distros/gentoo.txt
+ create mode 100644 build/pkgs/decorator/distros/gentoo.txt
+ create mode 100644 build/pkgs/html5lib/distros/gentoo.txt
+ create mode 100644 build/pkgs/idna/distros/gentoo.txt
+ create mode 100644 build/pkgs/jinja2/distros/gentoo.txt
+ create mode 100644 build/pkgs/matplotlib/distros/gentoo.txt
+ create mode 100644 build/pkgs/mpmath/distros/gentoo.txt
+ create mode 100644 build/pkgs/networkx/distros/gentoo.txt
+ create mode 100644 build/pkgs/numpy/distros/gentoo.txt
+ create mode 100644 build/pkgs/packaging/distros/gentoo.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/gentoo.txt
+ create mode 100644 build/pkgs/pickleshare/distros/gentoo.txt
+ create mode 100644 build/pkgs/pillow/distros/gentoo.txt
+ create mode 100644 build/pkgs/pluggy/distros/gentoo.txt
+ create mode 100644 build/pkgs/pygments/distros/gentoo.txt
+ create mode 100644 build/pkgs/pytz/distros/gentoo.txt
+ create mode 100644 build/pkgs/pyzmq/distros/gentoo.txt
+ create mode 100644 build/pkgs/requests/distros/gentoo.txt
+ create mode 100644 build/pkgs/scipy/distros/gentoo.txt
+ create mode 100644 build/pkgs/setuptools/distros/gentoo.txt
+ create mode 100644 build/pkgs/six/distros/gentoo.txt
+ create mode 100644 build/pkgs/sympy/distros/gentoo.txt
+ create mode 100644 build/pkgs/texttable/distros/gentoo.txt
+ create mode 100644 build/pkgs/toml/distros/gentoo.txt
+ create mode 100644 build/pkgs/webencodings/distros/gentoo.txt
+
+diff --git a/build/pkgs/babel/distros/gentoo.txt b/build/pkgs/babel/distros/gentoo.txt
+new file mode 100644
+index 00000000..2d2c34f
+--- /dev/null
++++ b/build/pkgs/babel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/Babel
+diff --git a/build/pkgs/bleach/distros/gentoo.txt b/build/pkgs/bleach/distros/gentoo.txt
+new file mode 100644
+index 00000000..b4f9744
+--- /dev/null
++++ b/build/pkgs/bleach/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/bleach
+diff --git a/build/pkgs/certifi/distros/gentoo.txt b/build/pkgs/certifi/distros/gentoo.txt
+new file mode 100644
+index 00000000..72e2e91
+--- /dev/null
++++ b/build/pkgs/certifi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/certifi
+diff --git a/build/pkgs/cvxopt/distros/gentoo.txt b/build/pkgs/cvxopt/distros/gentoo.txt
+new file mode 100644
+index 00000000..b312391
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/cvxopt
+diff --git a/build/pkgs/decorator/distros/gentoo.txt b/build/pkgs/decorator/distros/gentoo.txt
+new file mode 100644
+index 00000000..fea5a67
+--- /dev/null
++++ b/build/pkgs/decorator/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/decorator
+diff --git a/build/pkgs/html5lib/distros/gentoo.txt b/build/pkgs/html5lib/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c2be76
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/html5lib
+diff --git a/build/pkgs/idna/distros/gentoo.txt b/build/pkgs/idna/distros/gentoo.txt
+new file mode 100644
+index 00000000..68ef51c
+--- /dev/null
++++ b/build/pkgs/idna/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/idna
+diff --git a/build/pkgs/jinja2/distros/gentoo.txt b/build/pkgs/jinja2/distros/gentoo.txt
+new file mode 100644
+index 00000000..15a27ae
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jinja
+diff --git a/build/pkgs/matplotlib/distros/gentoo.txt b/build/pkgs/matplotlib/distros/gentoo.txt
+new file mode 100644
+index 00000000..bcfefb5
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/matplotlib
+diff --git a/build/pkgs/mpmath/distros/gentoo.txt b/build/pkgs/mpmath/distros/gentoo.txt
+new file mode 100644
+index 00000000..946c62d
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/mpmath
+diff --git a/build/pkgs/networkx/distros/gentoo.txt b/build/pkgs/networkx/distros/gentoo.txt
+new file mode 100644
+index 00000000..dd97742
+--- /dev/null
++++ b/build/pkgs/networkx/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/networkx
+diff --git a/build/pkgs/numpy/distros/gentoo.txt b/build/pkgs/numpy/distros/gentoo.txt
+new file mode 100644
+index 00000000..d2179d4
+--- /dev/null
++++ b/build/pkgs/numpy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/numpy
+diff --git a/build/pkgs/packaging/distros/gentoo.txt b/build/pkgs/packaging/distros/gentoo.txt
+new file mode 100644
+index 00000000..e5309ed
+--- /dev/null
++++ b/build/pkgs/packaging/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/packaging
+diff --git a/build/pkgs/pandocfilters/distros/gentoo.txt b/build/pkgs/pandocfilters/distros/gentoo.txt
+new file mode 100644
+index 00000000..a726fda
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/gentoo.txt b/build/pkgs/pickleshare/distros/gentoo.txt
+new file mode 100644
+index 00000000..14fad0f
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pickleshare
+diff --git a/build/pkgs/pillow/distros/gentoo.txt b/build/pkgs/pillow/distros/gentoo.txt
+new file mode 100644
+index 00000000..1243649
+--- /dev/null
++++ b/build/pkgs/pillow/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pillow
+diff --git a/build/pkgs/pluggy/distros/gentoo.txt b/build/pkgs/pluggy/distros/gentoo.txt
+new file mode 100644
+index 00000000..7b33876
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pluggy
+diff --git a/build/pkgs/pygments/distros/gentoo.txt b/build/pkgs/pygments/distros/gentoo.txt
+new file mode 100644
+index 00000000..a584f32
+--- /dev/null
++++ b/build/pkgs/pygments/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pygments
+diff --git a/build/pkgs/pytz/distros/gentoo.txt b/build/pkgs/pytz/distros/gentoo.txt
+new file mode 100644
+index 00000000..902a18b
+--- /dev/null
++++ b/build/pkgs/pytz/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pytz
+diff --git a/build/pkgs/pyzmq/distros/gentoo.txt b/build/pkgs/pyzmq/distros/gentoo.txt
+new file mode 100644
+index 00000000..77c2429
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyzmq
+diff --git a/build/pkgs/requests/distros/gentoo.txt b/build/pkgs/requests/distros/gentoo.txt
+new file mode 100644
+index 00000000..d3dc941
+--- /dev/null
++++ b/build/pkgs/requests/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/requests
+diff --git a/build/pkgs/scipy/distros/gentoo.txt b/build/pkgs/scipy/distros/gentoo.txt
+new file mode 100644
+index 00000000..11dabd2
+--- /dev/null
++++ b/build/pkgs/scipy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/scipy
+diff --git a/build/pkgs/setuptools/distros/gentoo.txt b/build/pkgs/setuptools/distros/gentoo.txt
+new file mode 100644
+index 00000000..3a4fa34
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/setuptools
+diff --git a/build/pkgs/six/distros/gentoo.txt b/build/pkgs/six/distros/gentoo.txt
+new file mode 100644
+index 00000000..f73f648
+--- /dev/null
++++ b/build/pkgs/six/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/six
+diff --git a/build/pkgs/sympy/distros/gentoo.txt b/build/pkgs/sympy/distros/gentoo.txt
+new file mode 100644
+index 00000000..b5a5034
+--- /dev/null
++++ b/build/pkgs/sympy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sympy
+diff --git a/build/pkgs/texttable/distros/gentoo.txt b/build/pkgs/texttable/distros/gentoo.txt
+new file mode 100644
+index 00000000..b33a7a7
+--- /dev/null
++++ b/build/pkgs/texttable/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/texttable
+diff --git a/build/pkgs/toml/distros/gentoo.txt b/build/pkgs/toml/distros/gentoo.txt
+new file mode 100644
+index 00000000..64fcea3
+--- /dev/null
++++ b/build/pkgs/toml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/toml
+diff --git a/build/pkgs/webencodings/distros/gentoo.txt b/build/pkgs/webencodings/distros/gentoo.txt
+new file mode 100644
+index 00000000..7539b0f
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/webencodings
+-- 
+cgit v1.0-1-gd88e
+
+
+From 088380f884124c9608160b613ba031c5f023f604 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 18:43:04 -0700
+Subject: build/pkgs: Add distros/fedora.txt for Python packages
+
+---
+ build/pkgs/babel/distros/fedora.txt         | 1 +
+ build/pkgs/bleach/distros/fedora.txt        | 1 +
+ build/pkgs/certifi/distros/fedora.txt       | 1 +
+ build/pkgs/cvxopt/distros/fedora.txt        | 1 +
+ build/pkgs/decorator/distros/fedora.txt     | 1 +
+ build/pkgs/html5lib/distros/fedora.txt      | 1 +
+ build/pkgs/idna/distros/fedora.txt          | 1 +
+ build/pkgs/jinja2/distros/fedora.txt        | 1 +
+ build/pkgs/matplotlib/distros/fedora.txt    | 1 +
+ build/pkgs/mpmath/distros/fedora.txt        | 1 +
+ build/pkgs/networkx/distros/fedora.txt      | 1 +
+ build/pkgs/numpy/distros/fedora.txt         | 1 +
+ build/pkgs/packaging/distros/fedora.txt     | 1 +
+ build/pkgs/pandocfilters/distros/fedora.txt | 1 +
+ build/pkgs/pickleshare/distros/fedora.txt   | 1 +
+ build/pkgs/pillow/distros/fedora.txt        | 1 +
+ build/pkgs/pluggy/distros/fedora.txt        | 1 +
+ build/pkgs/py/distros/fedora.txt            | 1 +
+ build/pkgs/pygments/distros/fedora.txt      | 1 +
+ build/pkgs/pytz/distros/fedora.txt          | 1 +
+ build/pkgs/pyzmq/distros/fedora.txt         | 1 +
+ build/pkgs/requests/distros/fedora.txt      | 1 +
+ build/pkgs/scipy/distros/fedora.txt         | 1 +
+ build/pkgs/setuptools/distros/fedora.txt    | 1 +
+ build/pkgs/six/distros/fedora.txt           | 1 +
+ build/pkgs/sympy/distros/fedora.txt         | 1 +
+ build/pkgs/texttable/distros/fedora.txt     | 1 +
+ build/pkgs/toml/distros/fedora.txt          | 1 +
+ build/pkgs/webencodings/distros/fedora.txt  | 1 +
+ build/pkgs/wheel/distros/fedora.txt         | 1 +
+ 30 files changed, 30 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/fedora.txt
+ create mode 100644 build/pkgs/bleach/distros/fedora.txt
+ create mode 100644 build/pkgs/certifi/distros/fedora.txt
+ create mode 100644 build/pkgs/cvxopt/distros/fedora.txt
+ create mode 100644 build/pkgs/decorator/distros/fedora.txt
+ create mode 100644 build/pkgs/html5lib/distros/fedora.txt
+ create mode 100644 build/pkgs/idna/distros/fedora.txt
+ create mode 100644 build/pkgs/jinja2/distros/fedora.txt
+ create mode 100644 build/pkgs/matplotlib/distros/fedora.txt
+ create mode 100644 build/pkgs/mpmath/distros/fedora.txt
+ create mode 100644 build/pkgs/networkx/distros/fedora.txt
+ create mode 100644 build/pkgs/numpy/distros/fedora.txt
+ create mode 100644 build/pkgs/packaging/distros/fedora.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/fedora.txt
+ create mode 100644 build/pkgs/pickleshare/distros/fedora.txt
+ create mode 100644 build/pkgs/pillow/distros/fedora.txt
+ create mode 100644 build/pkgs/pluggy/distros/fedora.txt
+ create mode 100644 build/pkgs/py/distros/fedora.txt
+ create mode 100644 build/pkgs/pygments/distros/fedora.txt
+ create mode 100644 build/pkgs/pytz/distros/fedora.txt
+ create mode 100644 build/pkgs/pyzmq/distros/fedora.txt
+ create mode 100644 build/pkgs/requests/distros/fedora.txt
+ create mode 100644 build/pkgs/scipy/distros/fedora.txt
+ create mode 100644 build/pkgs/setuptools/distros/fedora.txt
+ create mode 100644 build/pkgs/six/distros/fedora.txt
+ create mode 100644 build/pkgs/sympy/distros/fedora.txt
+ create mode 100644 build/pkgs/texttable/distros/fedora.txt
+ create mode 100644 build/pkgs/toml/distros/fedora.txt
+ create mode 100644 build/pkgs/webencodings/distros/fedora.txt
+ create mode 100644 build/pkgs/wheel/distros/fedora.txt
+
+diff --git a/build/pkgs/babel/distros/fedora.txt b/build/pkgs/babel/distros/fedora.txt
+new file mode 100644
+index 00000000..98f6593
+--- /dev/null
++++ b/build/pkgs/babel/distros/fedora.txt
+@@ -0,0 +1 @@
++babel
+diff --git a/build/pkgs/bleach/distros/fedora.txt b/build/pkgs/bleach/distros/fedora.txt
+new file mode 100644
+index 00000000..c5422cc
+--- /dev/null
++++ b/build/pkgs/bleach/distros/fedora.txt
+@@ -0,0 +1 @@
++python-bleach
+diff --git a/build/pkgs/certifi/distros/fedora.txt b/build/pkgs/certifi/distros/fedora.txt
+new file mode 100644
+index 00000000..be421c8
+--- /dev/null
++++ b/build/pkgs/certifi/distros/fedora.txt
+@@ -0,0 +1 @@
++python-certifi
+diff --git a/build/pkgs/cvxopt/distros/fedora.txt b/build/pkgs/cvxopt/distros/fedora.txt
+new file mode 100644
+index 00000000..f15770f
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/fedora.txt
+@@ -0,0 +1 @@
++python-cvxopt
+diff --git a/build/pkgs/decorator/distros/fedora.txt b/build/pkgs/decorator/distros/fedora.txt
+new file mode 100644
+index 00000000..0795604
+--- /dev/null
++++ b/build/pkgs/decorator/distros/fedora.txt
+@@ -0,0 +1 @@
++python-decorator
+diff --git a/build/pkgs/html5lib/distros/fedora.txt b/build/pkgs/html5lib/distros/fedora.txt
+new file mode 100644
+index 00000000..b821491
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/fedora.txt
+@@ -0,0 +1 @@
++python-html5lib
+diff --git a/build/pkgs/idna/distros/fedora.txt b/build/pkgs/idna/distros/fedora.txt
+new file mode 100644
+index 00000000..a73e70c
+--- /dev/null
++++ b/build/pkgs/idna/distros/fedora.txt
+@@ -0,0 +1 @@
++python-idna
+diff --git a/build/pkgs/jinja2/distros/fedora.txt b/build/pkgs/jinja2/distros/fedora.txt
+new file mode 100644
+index 00000000..f5f3caf
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/fedora.txt
+@@ -0,0 +1 @@
++python-jinja2
+diff --git a/build/pkgs/matplotlib/distros/fedora.txt b/build/pkgs/matplotlib/distros/fedora.txt
+new file mode 100644
+index 00000000..f6d856e
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/fedora.txt
+@@ -0,0 +1 @@
++python-matplotlib
+diff --git a/build/pkgs/mpmath/distros/fedora.txt b/build/pkgs/mpmath/distros/fedora.txt
+new file mode 100644
+index 00000000..a7dc8d5
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/fedora.txt
+@@ -0,0 +1 @@
++python-mpmath
+diff --git a/build/pkgs/networkx/distros/fedora.txt b/build/pkgs/networkx/distros/fedora.txt
+new file mode 100644
+index 00000000..293f943
+--- /dev/null
++++ b/build/pkgs/networkx/distros/fedora.txt
+@@ -0,0 +1 @@
++python-networkx
+diff --git a/build/pkgs/numpy/distros/fedora.txt b/build/pkgs/numpy/distros/fedora.txt
+new file mode 100644
+index 00000000..c8722b9
+--- /dev/null
++++ b/build/pkgs/numpy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-numpy
+diff --git a/build/pkgs/packaging/distros/fedora.txt b/build/pkgs/packaging/distros/fedora.txt
+new file mode 100644
+index 00000000..02ad855
+--- /dev/null
++++ b/build/pkgs/packaging/distros/fedora.txt
+@@ -0,0 +1 @@
++python-packaging
+diff --git a/build/pkgs/pandocfilters/distros/fedora.txt b/build/pkgs/pandocfilters/distros/fedora.txt
+new file mode 100644
+index 00000000..e7a86d0
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/fedora.txt b/build/pkgs/pickleshare/distros/fedora.txt
+new file mode 100644
+index 00000000..6d991a2
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pickleshare
+diff --git a/build/pkgs/pillow/distros/fedora.txt b/build/pkgs/pillow/distros/fedora.txt
+new file mode 100644
+index 00000000..86dbb1d
+--- /dev/null
++++ b/build/pkgs/pillow/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pillow
+diff --git a/build/pkgs/pluggy/distros/fedora.txt b/build/pkgs/pluggy/distros/fedora.txt
+new file mode 100644
+index 00000000..c869e54
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pluggy
+diff --git a/build/pkgs/py/distros/fedora.txt b/build/pkgs/py/distros/fedora.txt
+new file mode 100644
+index 00000000..b348d39
+--- /dev/null
++++ b/build/pkgs/py/distros/fedora.txt
+@@ -0,0 +1 @@
++python-py
+diff --git a/build/pkgs/pygments/distros/fedora.txt b/build/pkgs/pygments/distros/fedora.txt
+new file mode 100644
+index 00000000..f3e72a8
+--- /dev/null
++++ b/build/pkgs/pygments/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pygments
+diff --git a/build/pkgs/pytz/distros/fedora.txt b/build/pkgs/pytz/distros/fedora.txt
+new file mode 100644
+index 00000000..2cccc9e
+--- /dev/null
++++ b/build/pkgs/pytz/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pytz
+diff --git a/build/pkgs/pyzmq/distros/fedora.txt b/build/pkgs/pyzmq/distros/fedora.txt
+new file mode 100644
+index 00000000..23f64d1
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pyzmq
+diff --git a/build/pkgs/requests/distros/fedora.txt b/build/pkgs/requests/distros/fedora.txt
+new file mode 100644
+index 00000000..93a7bc1
+--- /dev/null
++++ b/build/pkgs/requests/distros/fedora.txt
+@@ -0,0 +1 @@
++python-requests
+diff --git a/build/pkgs/scipy/distros/fedora.txt b/build/pkgs/scipy/distros/fedora.txt
+new file mode 100644
+index 00000000..7ff2882
+--- /dev/null
++++ b/build/pkgs/scipy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-scipy
+diff --git a/build/pkgs/setuptools/distros/fedora.txt b/build/pkgs/setuptools/distros/fedora.txt
+new file mode 100644
+index 00000000..e1ad178
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/fedora.txt
+@@ -0,0 +1 @@
++python-setuptools
+diff --git a/build/pkgs/six/distros/fedora.txt b/build/pkgs/six/distros/fedora.txt
+new file mode 100644
+index 00000000..787c530
+--- /dev/null
++++ b/build/pkgs/six/distros/fedora.txt
+@@ -0,0 +1 @@
++python-six
+diff --git a/build/pkgs/sympy/distros/fedora.txt b/build/pkgs/sympy/distros/fedora.txt
+new file mode 100644
+index 00000000..126c88a
+--- /dev/null
++++ b/build/pkgs/sympy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-sympy
+diff --git a/build/pkgs/texttable/distros/fedora.txt b/build/pkgs/texttable/distros/fedora.txt
+new file mode 100644
+index 00000000..8d1ccec
+--- /dev/null
++++ b/build/pkgs/texttable/distros/fedora.txt
+@@ -0,0 +1 @@
++python-texttable
+diff --git a/build/pkgs/toml/distros/fedora.txt b/build/pkgs/toml/distros/fedora.txt
+new file mode 100644
+index 00000000..821ee77
+--- /dev/null
++++ b/build/pkgs/toml/distros/fedora.txt
+@@ -0,0 +1 @@
++python-toml
+diff --git a/build/pkgs/webencodings/distros/fedora.txt b/build/pkgs/webencodings/distros/fedora.txt
+new file mode 100644
+index 00000000..12ddba9
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/fedora.txt
+@@ -0,0 +1 @@
++python-webencodings
+diff --git a/build/pkgs/wheel/distros/fedora.txt b/build/pkgs/wheel/distros/fedora.txt
+new file mode 100644
+index 00000000..ae4cbb9
+--- /dev/null
++++ b/build/pkgs/wheel/distros/fedora.txt
+@@ -0,0 +1 @@
++python-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From ad1d5a20380b147c774903066031442f31094626 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 21:04:04 -0700
+Subject: build/pkgs: Add distros/arch.txt for Python packages
+
+---
+ build/pkgs/babel/distros/arch.txt         | 1 +
+ build/pkgs/bleach/distros/arch.txt        | 1 +
+ build/pkgs/certifi/distros/arch.txt       | 1 +
+ build/pkgs/cvxopt/distros/arch.txt        | 1 +
+ build/pkgs/decorator/distros/arch.txt     | 1 +
+ build/pkgs/html5lib/distros/arch.txt      | 1 +
+ build/pkgs/idna/distros/arch.txt          | 1 +
+ build/pkgs/matplotlib/distros/arch.txt    | 1 +
+ build/pkgs/mpmath/distros/arch.txt        | 1 +
+ build/pkgs/networkx/distros/arch.txt      | 1 +
+ build/pkgs/numpy/distros/arch.txt         | 1 +
+ build/pkgs/packaging/distros/arch.txt     | 1 +
+ build/pkgs/pandocfilters/distros/arch.txt | 1 +
+ build/pkgs/pickleshare/distros/arch.txt   | 1 +
+ build/pkgs/pillow/distros/arch.txt        | 1 +
+ build/pkgs/pluggy/distros/arch.txt        | 1 +
+ build/pkgs/py/distros/arch.txt            | 1 +
+ build/pkgs/pygments/distros/arch.txt      | 1 +
+ build/pkgs/pytz/distros/arch.txt          | 1 +
+ build/pkgs/pyzmq/distros/arch.txt         | 1 +
+ build/pkgs/requests/distros/arch.txt      | 1 +
+ build/pkgs/scipy/distros/arch.txt         | 1 +
+ build/pkgs/setuptools/distros/arch.txt    | 1 +
+ build/pkgs/six/distros/arch.txt           | 1 +
+ build/pkgs/sympy/distros/arch.txt         | 1 +
+ build/pkgs/texttable/distros/arch.txt     | 1 +
+ build/pkgs/toml/distros/arch.txt          | 1 +
+ build/pkgs/webencodings/distros/arch.txt  | 1 +
+ build/pkgs/wheel/distros/arch.txt         | 1 +
+ 29 files changed, 29 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/arch.txt
+ create mode 100644 build/pkgs/bleach/distros/arch.txt
+ create mode 100644 build/pkgs/certifi/distros/arch.txt
+ create mode 100644 build/pkgs/cvxopt/distros/arch.txt
+ create mode 100644 build/pkgs/decorator/distros/arch.txt
+ create mode 100644 build/pkgs/html5lib/distros/arch.txt
+ create mode 100644 build/pkgs/idna/distros/arch.txt
+ create mode 100644 build/pkgs/matplotlib/distros/arch.txt
+ create mode 100644 build/pkgs/mpmath/distros/arch.txt
+ create mode 100644 build/pkgs/networkx/distros/arch.txt
+ create mode 100644 build/pkgs/numpy/distros/arch.txt
+ create mode 100644 build/pkgs/packaging/distros/arch.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/arch.txt
+ create mode 100644 build/pkgs/pickleshare/distros/arch.txt
+ create mode 100644 build/pkgs/pillow/distros/arch.txt
+ create mode 100644 build/pkgs/pluggy/distros/arch.txt
+ create mode 100644 build/pkgs/py/distros/arch.txt
+ create mode 100644 build/pkgs/pygments/distros/arch.txt
+ create mode 100644 build/pkgs/pytz/distros/arch.txt
+ create mode 100644 build/pkgs/pyzmq/distros/arch.txt
+ create mode 100644 build/pkgs/requests/distros/arch.txt
+ create mode 100644 build/pkgs/scipy/distros/arch.txt
+ create mode 100644 build/pkgs/setuptools/distros/arch.txt
+ create mode 100644 build/pkgs/six/distros/arch.txt
+ create mode 100644 build/pkgs/sympy/distros/arch.txt
+ create mode 100644 build/pkgs/texttable/distros/arch.txt
+ create mode 100644 build/pkgs/toml/distros/arch.txt
+ create mode 100644 build/pkgs/webencodings/distros/arch.txt
+ create mode 100644 build/pkgs/wheel/distros/arch.txt
+
+diff --git a/build/pkgs/babel/distros/arch.txt b/build/pkgs/babel/distros/arch.txt
+new file mode 100644
+index 00000000..f2d828c
+--- /dev/null
++++ b/build/pkgs/babel/distros/arch.txt
+@@ -0,0 +1 @@
++python-babel
+diff --git a/build/pkgs/bleach/distros/arch.txt b/build/pkgs/bleach/distros/arch.txt
+new file mode 100644
+index 00000000..c5422cc
+--- /dev/null
++++ b/build/pkgs/bleach/distros/arch.txt
+@@ -0,0 +1 @@
++python-bleach
+diff --git a/build/pkgs/certifi/distros/arch.txt b/build/pkgs/certifi/distros/arch.txt
+new file mode 100644
+index 00000000..be421c8
+--- /dev/null
++++ b/build/pkgs/certifi/distros/arch.txt
+@@ -0,0 +1 @@
++python-certifi
+diff --git a/build/pkgs/cvxopt/distros/arch.txt b/build/pkgs/cvxopt/distros/arch.txt
+new file mode 100644
+index 00000000..f15770f
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/arch.txt
+@@ -0,0 +1 @@
++python-cvxopt
+diff --git a/build/pkgs/decorator/distros/arch.txt b/build/pkgs/decorator/distros/arch.txt
+new file mode 100644
+index 00000000..0795604
+--- /dev/null
++++ b/build/pkgs/decorator/distros/arch.txt
+@@ -0,0 +1 @@
++python-decorator
+diff --git a/build/pkgs/html5lib/distros/arch.txt b/build/pkgs/html5lib/distros/arch.txt
+new file mode 100644
+index 00000000..b821491
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/arch.txt
+@@ -0,0 +1 @@
++python-html5lib
+diff --git a/build/pkgs/idna/distros/arch.txt b/build/pkgs/idna/distros/arch.txt
+new file mode 100644
+index 00000000..a73e70c
+--- /dev/null
++++ b/build/pkgs/idna/distros/arch.txt
+@@ -0,0 +1 @@
++python-idna
+diff --git a/build/pkgs/matplotlib/distros/arch.txt b/build/pkgs/matplotlib/distros/arch.txt
+new file mode 100644
+index 00000000..f6d856e
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/arch.txt
+@@ -0,0 +1 @@
++python-matplotlib
+diff --git a/build/pkgs/mpmath/distros/arch.txt b/build/pkgs/mpmath/distros/arch.txt
+new file mode 100644
+index 00000000..a7dc8d5
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/arch.txt
+@@ -0,0 +1 @@
++python-mpmath
+diff --git a/build/pkgs/networkx/distros/arch.txt b/build/pkgs/networkx/distros/arch.txt
+new file mode 100644
+index 00000000..293f943
+--- /dev/null
++++ b/build/pkgs/networkx/distros/arch.txt
+@@ -0,0 +1 @@
++python-networkx
+diff --git a/build/pkgs/numpy/distros/arch.txt b/build/pkgs/numpy/distros/arch.txt
+new file mode 100644
+index 00000000..c8722b9
+--- /dev/null
++++ b/build/pkgs/numpy/distros/arch.txt
+@@ -0,0 +1 @@
++python-numpy
+diff --git a/build/pkgs/packaging/distros/arch.txt b/build/pkgs/packaging/distros/arch.txt
+new file mode 100644
+index 00000000..02ad855
+--- /dev/null
++++ b/build/pkgs/packaging/distros/arch.txt
+@@ -0,0 +1 @@
++python-packaging
+diff --git a/build/pkgs/pandocfilters/distros/arch.txt b/build/pkgs/pandocfilters/distros/arch.txt
+new file mode 100644
+index 00000000..e7a86d0
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/arch.txt
+@@ -0,0 +1 @@
++python-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/arch.txt b/build/pkgs/pickleshare/distros/arch.txt
+new file mode 100644
+index 00000000..6d991a2
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/arch.txt
+@@ -0,0 +1 @@
++python-pickleshare
+diff --git a/build/pkgs/pillow/distros/arch.txt b/build/pkgs/pillow/distros/arch.txt
+new file mode 100644
+index 00000000..86dbb1d
+--- /dev/null
++++ b/build/pkgs/pillow/distros/arch.txt
+@@ -0,0 +1 @@
++python-pillow
+diff --git a/build/pkgs/pluggy/distros/arch.txt b/build/pkgs/pluggy/distros/arch.txt
+new file mode 100644
+index 00000000..c869e54
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/arch.txt
+@@ -0,0 +1 @@
++python-pluggy
+diff --git a/build/pkgs/py/distros/arch.txt b/build/pkgs/py/distros/arch.txt
+new file mode 100644
+index 00000000..b348d39
+--- /dev/null
++++ b/build/pkgs/py/distros/arch.txt
+@@ -0,0 +1 @@
++python-py
+diff --git a/build/pkgs/pygments/distros/arch.txt b/build/pkgs/pygments/distros/arch.txt
+new file mode 100644
+index 00000000..f3e72a8
+--- /dev/null
++++ b/build/pkgs/pygments/distros/arch.txt
+@@ -0,0 +1 @@
++python-pygments
+diff --git a/build/pkgs/pytz/distros/arch.txt b/build/pkgs/pytz/distros/arch.txt
+new file mode 100644
+index 00000000..2cccc9e
+--- /dev/null
++++ b/build/pkgs/pytz/distros/arch.txt
+@@ -0,0 +1 @@
++python-pytz
+diff --git a/build/pkgs/pyzmq/distros/arch.txt b/build/pkgs/pyzmq/distros/arch.txt
+new file mode 100644
+index 00000000..23f64d1
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/arch.txt
+@@ -0,0 +1 @@
++python-pyzmq
+diff --git a/build/pkgs/requests/distros/arch.txt b/build/pkgs/requests/distros/arch.txt
+new file mode 100644
+index 00000000..93a7bc1
+--- /dev/null
++++ b/build/pkgs/requests/distros/arch.txt
+@@ -0,0 +1 @@
++python-requests
+diff --git a/build/pkgs/scipy/distros/arch.txt b/build/pkgs/scipy/distros/arch.txt
+new file mode 100644
+index 00000000..7ff2882
+--- /dev/null
++++ b/build/pkgs/scipy/distros/arch.txt
+@@ -0,0 +1 @@
++python-scipy
+diff --git a/build/pkgs/setuptools/distros/arch.txt b/build/pkgs/setuptools/distros/arch.txt
+new file mode 100644
+index 00000000..e1ad178
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/arch.txt
+@@ -0,0 +1 @@
++python-setuptools
+diff --git a/build/pkgs/six/distros/arch.txt b/build/pkgs/six/distros/arch.txt
+new file mode 100644
+index 00000000..787c530
+--- /dev/null
++++ b/build/pkgs/six/distros/arch.txt
+@@ -0,0 +1 @@
++python-six
+diff --git a/build/pkgs/sympy/distros/arch.txt b/build/pkgs/sympy/distros/arch.txt
+new file mode 100644
+index 00000000..126c88a
+--- /dev/null
++++ b/build/pkgs/sympy/distros/arch.txt
+@@ -0,0 +1 @@
++python-sympy
+diff --git a/build/pkgs/texttable/distros/arch.txt b/build/pkgs/texttable/distros/arch.txt
+new file mode 100644
+index 00000000..8d1ccec
+--- /dev/null
++++ b/build/pkgs/texttable/distros/arch.txt
+@@ -0,0 +1 @@
++python-texttable
+diff --git a/build/pkgs/toml/distros/arch.txt b/build/pkgs/toml/distros/arch.txt
+new file mode 100644
+index 00000000..821ee77
+--- /dev/null
++++ b/build/pkgs/toml/distros/arch.txt
+@@ -0,0 +1 @@
++python-toml
+diff --git a/build/pkgs/webencodings/distros/arch.txt b/build/pkgs/webencodings/distros/arch.txt
+new file mode 100644
+index 00000000..12ddba9
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/arch.txt
+@@ -0,0 +1 @@
++python-webencodings
+diff --git a/build/pkgs/wheel/distros/arch.txt b/build/pkgs/wheel/distros/arch.txt
+new file mode 100644
+index 00000000..ae4cbb9
+--- /dev/null
++++ b/build/pkgs/wheel/distros/arch.txt
+@@ -0,0 +1 @@
++python-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5087abee08f2a89ddaf422ec72a84575fe724a79 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 21:20:56 -0700
+Subject: build/pkgs: Add distros/opensuse.txt for Python packages
+
+---
+ build/pkgs/bleach/distros/opensuse.txt        | 1 +
+ build/pkgs/cvxopt/distros/opensuse.txt        | 1 +
+ build/pkgs/html5lib/distros/opensuse.txt      | 1 +
+ build/pkgs/idna/distros/opensuse.txt          | 1 +
+ build/pkgs/jinja2/distros/opensuse.txt        | 2 +-
+ build/pkgs/mpmath/distros/opensuse.txt        | 1 +
+ build/pkgs/numpy/distros/opensuse.txt         | 1 +
+ build/pkgs/packaging/distros/opensuse.txt     | 1 +
+ build/pkgs/pandocfilters/distros/opensuse.txt | 1 +
+ build/pkgs/pluggy/distros/opensuse.txt        | 1 +
+ build/pkgs/py/distros/opensuse.txt            | 1 +
+ build/pkgs/pygments/distros/opensuse.txt      | 2 +-
+ build/pkgs/sympy/distros/opensuse.txt         | 1 +
+ build/pkgs/texttable/distros/opensuse.txt     | 1 +
+ build/pkgs/toml/distros/opensuse.txt          | 1 +
+ 15 files changed, 15 insertions(+), 2 deletions(-)
+ create mode 100644 build/pkgs/bleach/distros/opensuse.txt
+ create mode 100644 build/pkgs/cvxopt/distros/opensuse.txt
+ create mode 100644 build/pkgs/html5lib/distros/opensuse.txt
+ create mode 100644 build/pkgs/idna/distros/opensuse.txt
+ create mode 100644 build/pkgs/mpmath/distros/opensuse.txt
+ create mode 100644 build/pkgs/numpy/distros/opensuse.txt
+ create mode 100644 build/pkgs/packaging/distros/opensuse.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/opensuse.txt
+ create mode 100644 build/pkgs/pluggy/distros/opensuse.txt
+ create mode 100644 build/pkgs/py/distros/opensuse.txt
+ create mode 100644 build/pkgs/sympy/distros/opensuse.txt
+ create mode 100644 build/pkgs/texttable/distros/opensuse.txt
+ create mode 100644 build/pkgs/toml/distros/opensuse.txt
+
+diff --git a/build/pkgs/bleach/distros/opensuse.txt b/build/pkgs/bleach/distros/opensuse.txt
+new file mode 100644
+index 00000000..6d37c4c
+--- /dev/null
++++ b/build/pkgs/bleach/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-bleach
+diff --git a/build/pkgs/cvxopt/distros/opensuse.txt b/build/pkgs/cvxopt/distros/opensuse.txt
+new file mode 100644
+index 00000000..2bb6ad1
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-cvxopt
+diff --git a/build/pkgs/html5lib/distros/opensuse.txt b/build/pkgs/html5lib/distros/opensuse.txt
+new file mode 100644
+index 00000000..6d7b8df
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-html5lib
+diff --git a/build/pkgs/idna/distros/opensuse.txt b/build/pkgs/idna/distros/opensuse.txt
+new file mode 100644
+index 00000000..de48e70
+--- /dev/null
++++ b/build/pkgs/idna/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-idna
+diff --git a/build/pkgs/jinja2/distros/opensuse.txt b/build/pkgs/jinja2/distros/opensuse.txt
+index 5d90a22..f2db865 100644
+--- a/build/pkgs/jinja2/distros/opensuse.txt
++++ b/build/pkgs/jinja2/distros/opensuse.txt
+@@ -1 +1 @@
+-python3-Jinja2
++python3-jinja2
+diff --git a/build/pkgs/mpmath/distros/opensuse.txt b/build/pkgs/mpmath/distros/opensuse.txt
+new file mode 100644
+index 00000000..fbc82a9
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-mpmath
+diff --git a/build/pkgs/numpy/distros/opensuse.txt b/build/pkgs/numpy/distros/opensuse.txt
+new file mode 100644
+index 00000000..79d5c5a
+--- /dev/null
++++ b/build/pkgs/numpy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-numpy
+diff --git a/build/pkgs/packaging/distros/opensuse.txt b/build/pkgs/packaging/distros/opensuse.txt
+new file mode 100644
+index 00000000..8f1c0ff
+--- /dev/null
++++ b/build/pkgs/packaging/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-packaging
+diff --git a/build/pkgs/pandocfilters/distros/opensuse.txt b/build/pkgs/pandocfilters/distros/opensuse.txt
+new file mode 100644
+index 00000000..d0d4c24
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-pandocfilters
+diff --git a/build/pkgs/pluggy/distros/opensuse.txt b/build/pkgs/pluggy/distros/opensuse.txt
+new file mode 100644
+index 00000000..43a3acf
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-pluggy
+diff --git a/build/pkgs/py/distros/opensuse.txt b/build/pkgs/py/distros/opensuse.txt
+new file mode 100644
+index 00000000..81fefe6
+--- /dev/null
++++ b/build/pkgs/py/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-py
+diff --git a/build/pkgs/pygments/distros/opensuse.txt b/build/pkgs/pygments/distros/opensuse.txt
+index 9ff5740..3ab3792 100644
+--- a/build/pkgs/pygments/distros/opensuse.txt
++++ b/build/pkgs/pygments/distros/opensuse.txt
+@@ -1 +1 @@
+-python3-Pygments
++python3-pygments
+diff --git a/build/pkgs/sympy/distros/opensuse.txt b/build/pkgs/sympy/distros/opensuse.txt
+new file mode 100644
+index 00000000..db423c8
+--- /dev/null
++++ b/build/pkgs/sympy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-sympy
+diff --git a/build/pkgs/texttable/distros/opensuse.txt b/build/pkgs/texttable/distros/opensuse.txt
+new file mode 100644
+index 00000000..8f8e7e2
+--- /dev/null
++++ b/build/pkgs/texttable/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-texttable
+diff --git a/build/pkgs/toml/distros/opensuse.txt b/build/pkgs/toml/distros/opensuse.txt
+new file mode 100644
+index 00000000..543e89d
+--- /dev/null
++++ b/build/pkgs/toml/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-toml
+-- 
+cgit v1.0-1-gd88e
+
+
+From a480ba7ace1370d106ae831e904ea22b72af1be7 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 22:45:04 -0700
+Subject: build/pkgs: Add distros/debian.txt for Python packages
+
+---
+ build/pkgs/babel/distros/debian.txt         | 1 +
+ build/pkgs/bleach/distros/debian.txt        | 1 +
+ build/pkgs/certifi/distros/debian.txt       | 1 +
+ build/pkgs/cvxopt/distros/debian.txt        | 1 +
+ build/pkgs/decorator/distros/debian.txt     | 1 +
+ build/pkgs/html5lib/distros/debian.txt      | 1 +
+ build/pkgs/idna/distros/debian.txt          | 1 +
+ build/pkgs/jinja2/distros/debian.txt        | 1 +
+ build/pkgs/matplotlib/distros/debian.txt    | 1 +
+ build/pkgs/mpmath/distros/debian.txt        | 1 +
+ build/pkgs/networkx/distros/debian.txt      | 1 +
+ build/pkgs/numpy/distros/debian.txt         | 1 +
+ build/pkgs/packaging/distros/debian.txt     | 1 +
+ build/pkgs/pandocfilters/distros/debian.txt | 1 +
+ build/pkgs/pickleshare/distros/debian.txt   | 1 +
+ build/pkgs/pillow/distros/debian.txt        | 1 +
+ build/pkgs/pluggy/distros/debian.txt        | 1 +
+ build/pkgs/py/distros/debian.txt            | 1 +
+ build/pkgs/pygments/distros/debian.txt      | 1 +
+ build/pkgs/pytz/distros/debian.txt          | 1 +
+ build/pkgs/requests/distros/debian.txt      | 1 +
+ build/pkgs/scipy/distros/debian.txt         | 1 +
+ build/pkgs/setuptools/distros/debian.txt    | 1 +
+ build/pkgs/six/distros/debian.txt           | 1 +
+ build/pkgs/sympy/distros/debian.txt         | 1 +
+ build/pkgs/texttable/distros/debian.txt     | 1 +
+ build/pkgs/toml/distros/debian.txt          | 1 +
+ build/pkgs/webencodings/distros/debian.txt  | 1 +
+ build/pkgs/wheel/distros/debian.txt         | 1 +
+ 29 files changed, 29 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/debian.txt
+ create mode 100644 build/pkgs/bleach/distros/debian.txt
+ create mode 100644 build/pkgs/certifi/distros/debian.txt
+ create mode 100644 build/pkgs/cvxopt/distros/debian.txt
+ create mode 100644 build/pkgs/decorator/distros/debian.txt
+ create mode 100644 build/pkgs/html5lib/distros/debian.txt
+ create mode 100644 build/pkgs/idna/distros/debian.txt
+ create mode 100644 build/pkgs/jinja2/distros/debian.txt
+ create mode 100644 build/pkgs/matplotlib/distros/debian.txt
+ create mode 100644 build/pkgs/mpmath/distros/debian.txt
+ create mode 100644 build/pkgs/networkx/distros/debian.txt
+ create mode 100644 build/pkgs/numpy/distros/debian.txt
+ create mode 100644 build/pkgs/packaging/distros/debian.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/debian.txt
+ create mode 100644 build/pkgs/pickleshare/distros/debian.txt
+ create mode 100644 build/pkgs/pillow/distros/debian.txt
+ create mode 100644 build/pkgs/pluggy/distros/debian.txt
+ create mode 100644 build/pkgs/py/distros/debian.txt
+ create mode 100644 build/pkgs/pygments/distros/debian.txt
+ create mode 100644 build/pkgs/pytz/distros/debian.txt
+ create mode 100644 build/pkgs/requests/distros/debian.txt
+ create mode 100644 build/pkgs/scipy/distros/debian.txt
+ create mode 100644 build/pkgs/setuptools/distros/debian.txt
+ create mode 100644 build/pkgs/six/distros/debian.txt
+ create mode 100644 build/pkgs/sympy/distros/debian.txt
+ create mode 100644 build/pkgs/texttable/distros/debian.txt
+ create mode 100644 build/pkgs/toml/distros/debian.txt
+ create mode 100644 build/pkgs/webencodings/distros/debian.txt
+ create mode 100644 build/pkgs/wheel/distros/debian.txt
+
+diff --git a/build/pkgs/babel/distros/debian.txt b/build/pkgs/babel/distros/debian.txt
+new file mode 100644
+index 00000000..e623eb6
+--- /dev/null
++++ b/build/pkgs/babel/distros/debian.txt
+@@ -0,0 +1 @@
++python3-babel
+diff --git a/build/pkgs/bleach/distros/debian.txt b/build/pkgs/bleach/distros/debian.txt
+new file mode 100644
+index 00000000..6d37c4c
+--- /dev/null
++++ b/build/pkgs/bleach/distros/debian.txt
+@@ -0,0 +1 @@
++python3-bleach
+diff --git a/build/pkgs/certifi/distros/debian.txt b/build/pkgs/certifi/distros/debian.txt
+new file mode 100644
+index 00000000..f585a82
+--- /dev/null
++++ b/build/pkgs/certifi/distros/debian.txt
+@@ -0,0 +1 @@
++python3-certifi
+diff --git a/build/pkgs/cvxopt/distros/debian.txt b/build/pkgs/cvxopt/distros/debian.txt
+new file mode 100644
+index 00000000..2bb6ad1
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/debian.txt
+@@ -0,0 +1 @@
++python3-cvxopt
+diff --git a/build/pkgs/decorator/distros/debian.txt b/build/pkgs/decorator/distros/debian.txt
+new file mode 100644
+index 00000000..46c478e
+--- /dev/null
++++ b/build/pkgs/decorator/distros/debian.txt
+@@ -0,0 +1 @@
++python3-decorator
+diff --git a/build/pkgs/html5lib/distros/debian.txt b/build/pkgs/html5lib/distros/debian.txt
+new file mode 100644
+index 00000000..6d7b8df
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/debian.txt
+@@ -0,0 +1 @@
++python3-html5lib
+diff --git a/build/pkgs/idna/distros/debian.txt b/build/pkgs/idna/distros/debian.txt
+new file mode 100644
+index 00000000..de48e70
+--- /dev/null
++++ b/build/pkgs/idna/distros/debian.txt
+@@ -0,0 +1 @@
++python3-idna
+diff --git a/build/pkgs/jinja2/distros/debian.txt b/build/pkgs/jinja2/distros/debian.txt
+new file mode 100644
+index 00000000..f2db865
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/debian.txt
+@@ -0,0 +1 @@
++python3-jinja2
+diff --git a/build/pkgs/matplotlib/distros/debian.txt b/build/pkgs/matplotlib/distros/debian.txt
+new file mode 100644
+index 00000000..1374329
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/debian.txt
+@@ -0,0 +1 @@
++python3-matplotlib
+diff --git a/build/pkgs/mpmath/distros/debian.txt b/build/pkgs/mpmath/distros/debian.txt
+new file mode 100644
+index 00000000..fbc82a9
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/debian.txt
+@@ -0,0 +1 @@
++python3-mpmath
+diff --git a/build/pkgs/networkx/distros/debian.txt b/build/pkgs/networkx/distros/debian.txt
+new file mode 100644
+index 00000000..6779066
+--- /dev/null
++++ b/build/pkgs/networkx/distros/debian.txt
+@@ -0,0 +1 @@
++python3-networkx
+diff --git a/build/pkgs/numpy/distros/debian.txt b/build/pkgs/numpy/distros/debian.txt
+new file mode 100644
+index 00000000..79d5c5a
+--- /dev/null
++++ b/build/pkgs/numpy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-numpy
+diff --git a/build/pkgs/packaging/distros/debian.txt b/build/pkgs/packaging/distros/debian.txt
+new file mode 100644
+index 00000000..8f1c0ff
+--- /dev/null
++++ b/build/pkgs/packaging/distros/debian.txt
+@@ -0,0 +1 @@
++python3-packaging
+diff --git a/build/pkgs/pandocfilters/distros/debian.txt b/build/pkgs/pandocfilters/distros/debian.txt
+new file mode 100644
+index 00000000..d0d4c24
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/debian.txt b/build/pkgs/pickleshare/distros/debian.txt
+new file mode 100644
+index 00000000..a00907d
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pickleshare
+diff --git a/build/pkgs/pillow/distros/debian.txt b/build/pkgs/pillow/distros/debian.txt
+new file mode 100644
+index 00000000..3319fcd
+--- /dev/null
++++ b/build/pkgs/pillow/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pillow
+diff --git a/build/pkgs/pluggy/distros/debian.txt b/build/pkgs/pluggy/distros/debian.txt
+new file mode 100644
+index 00000000..43a3acf
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pluggy
+diff --git a/build/pkgs/py/distros/debian.txt b/build/pkgs/py/distros/debian.txt
+new file mode 100644
+index 00000000..81fefe6
+--- /dev/null
++++ b/build/pkgs/py/distros/debian.txt
+@@ -0,0 +1 @@
++python3-py
+diff --git a/build/pkgs/pygments/distros/debian.txt b/build/pkgs/pygments/distros/debian.txt
+new file mode 100644
+index 00000000..3ab3792
+--- /dev/null
++++ b/build/pkgs/pygments/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pygments
+diff --git a/build/pkgs/pytz/distros/debian.txt b/build/pkgs/pytz/distros/debian.txt
+new file mode 100644
+index 00000000..db20908
+--- /dev/null
++++ b/build/pkgs/pytz/distros/debian.txt
+@@ -0,0 +1 @@
++python3-tz
+diff --git a/build/pkgs/requests/distros/debian.txt b/build/pkgs/requests/distros/debian.txt
+new file mode 100644
+index 00000000..43147b2
+--- /dev/null
++++ b/build/pkgs/requests/distros/debian.txt
+@@ -0,0 +1 @@
++python3-requests
+diff --git a/build/pkgs/scipy/distros/debian.txt b/build/pkgs/scipy/distros/debian.txt
+new file mode 100644
+index 00000000..12b3666
+--- /dev/null
++++ b/build/pkgs/scipy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-scipy
+diff --git a/build/pkgs/setuptools/distros/debian.txt b/build/pkgs/setuptools/distros/debian.txt
+new file mode 100644
+index 00000000..1c0901c
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/debian.txt
+@@ -0,0 +1 @@
++python3-setuptools
+diff --git a/build/pkgs/six/distros/debian.txt b/build/pkgs/six/distros/debian.txt
+new file mode 100644
+index 00000000..68ff859
+--- /dev/null
++++ b/build/pkgs/six/distros/debian.txt
+@@ -0,0 +1 @@
++python3-six
+diff --git a/build/pkgs/sympy/distros/debian.txt b/build/pkgs/sympy/distros/debian.txt
+new file mode 100644
+index 00000000..db423c8
+--- /dev/null
++++ b/build/pkgs/sympy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-sympy
+diff --git a/build/pkgs/texttable/distros/debian.txt b/build/pkgs/texttable/distros/debian.txt
+new file mode 100644
+index 00000000..8f8e7e2
+--- /dev/null
++++ b/build/pkgs/texttable/distros/debian.txt
+@@ -0,0 +1 @@
++python3-texttable
+diff --git a/build/pkgs/toml/distros/debian.txt b/build/pkgs/toml/distros/debian.txt
+new file mode 100644
+index 00000000..543e89d
+--- /dev/null
++++ b/build/pkgs/toml/distros/debian.txt
+@@ -0,0 +1 @@
++python3-toml
+diff --git a/build/pkgs/webencodings/distros/debian.txt b/build/pkgs/webencodings/distros/debian.txt
+new file mode 100644
+index 00000000..ac30c2f
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/debian.txt
+@@ -0,0 +1 @@
++python3-webencodings
+diff --git a/build/pkgs/wheel/distros/debian.txt b/build/pkgs/wheel/distros/debian.txt
+new file mode 100644
+index 00000000..3c066725
+--- /dev/null
++++ b/build/pkgs/wheel/distros/debian.txt
+@@ -0,0 +1 @@
++python3-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 93bf30d7de292551c3050e2dd74651d69ba4bd46 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 18 Oct 2021 07:50:34 -0400
+Subject: Trac #29665: add more documentation for SAGE_PYTHON_PACKAGE_CHECK().
+
+An earlier commit allows SAGE_PYTHON_PACKAGE_CHECK(package) to tweak the
+value of sage_use_system_$package if --enable-system-site-packages was
+not used. This essentially changes the default --with-system-$package=yes
+to "no" in that case. Here we update the documentation to reflect it.
+---
+ m4/sage_python_package_check.m4 | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 7ee82a7..95eefd0 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -34,6 +34,10 @@
+ #   ensure that the ./configure- and run-time views of the system
+ #   are as similar as possible.
+ #
++#   To avoid suggesting these system packages to users who have not
++#   set --enable-system-site-packages, this macro also changes the
++#   default for --with-system-foo from "yes" to "no" in that case.
++#
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
+-- 
+cgit v1.0-1-gd88e
+
+
+From d771e49d57ecdf3622434bc09cbfb87ad3bb7744 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 18 Oct 2021 07:42:46 -0400
+Subject: Trac #29665: improve SAGE_PYTHON_PACKAGE_CHECK() failure message.
+
+When --enable-system-site-packages is off, SAGE_PYTHON_PACKAGE_CHECK()
+will always install the corresponding SPKG. We improve the ./configure
+output in that case to make it clear that the decision was based on
+the value of --enable-system-site-packages and not the "real" check.
+---
+ m4/sage_python_package_check.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 95eefd0..5f0f084 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -40,7 +40,9 @@
+ #
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
++  AC_MSG_CHECKING([if --enable-system-site-packages was used])
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
++    AC_MSG_RESULT(yes)
+     AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
+ 
+     dnl We run this check inside a python venv, because that's ultimately
+@@ -94,6 +96,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
+     dnl System site packages are disabled.
++    AC_MSG_RESULT(no; skipping check)
+     sage_spkg_install_$1=yes
+ 
+     dnl We have to retroactively hack the --with-system-foo={no,yes,force}
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5bb43c1b78a1deb3364f235305937c2f823e5e18 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 24 Oct 2021 20:29:25 -0400
+Subject: Trac #29665: use sage-venv in SAGE_PYTHON_PACKAGE_CHECK().
+
+For consistency with the rest of the build system, we now use the
+build/bin/sage-venv script to create the venv in this autoconf macro
+rather than invoking $PYTHON_FOR_VENV with "-m venv" directly.
+---
+ m4/sage_python_package_check.m4 | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 5f0f084..5547b35 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -50,11 +50,11 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AC_MSG_CHECKING([if we can create a python venv in config.venv])
+ 
+     dnl Use --clear because ./configure typically clobbers its output files.
+-    AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
+-                                        --clear                dnl
+-                                        --without-pip          dnl
+-                                        config.venv            dnl
+-                                        2>&AS_MESSAGE_LOG_FD], [
++    AS_IF(["${PYTHON_FOR_VENV}" build/bin/sage-venv      dnl
++                                  --system-site-packages dnl
++                                  --clear                dnl
++                                  config.venv            dnl
++                                  2>&AS_MESSAGE_LOG_FD], [
+       AC_MSG_RESULT(yes)
+       dnl strip all comments from install-requires.txt; this should leave
+       dnl only a single line containing the version specification for this
+-- 
+cgit v1.0-1-gd88e
+
+
+From c78363d6326addff16ca5abac897949a6be72bf4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:10:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for urllib3.
+
+---
+ build/pkgs/urllib3/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/urllib3/spkg-configure.m4
+
+diff --git a/build/pkgs/urllib3/spkg-configure.m4 b/build/pkgs/urllib3/spkg-configure.m4
+new file mode 100644
+index 00000000..d7ef3e1
+--- /dev/null
++++ b/build/pkgs/urllib3/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([urllib3], [SAGE_PYTHON_PACKAGE_CHECK([urllib3])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f416d5abcae495ea8301fad024b279ea9e997b29 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:15:18 -0400
+Subject: Trac #29665: add Gentoo package information for urllib3.
+
+---
+ build/pkgs/urllib3/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/urllib3/distros/gentoo.txt
+
+diff --git a/build/pkgs/urllib3/distros/gentoo.txt b/build/pkgs/urllib3/distros/gentoo.txt
+new file mode 100644
+index 00000000..172a535
+--- /dev/null
++++ b/build/pkgs/urllib3/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/urllib3
+-- 
+cgit v1.0-1-gd88e
+
+
+From 852068b992bf7959500c650f54cb92e5b68d7ef8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:15:58 -0400
+Subject: Trac #29665: add Gentoo package information for nbformat.
+
+---
+ build/pkgs/nbformat/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbformat/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbformat/distros/gentoo.txt b/build/pkgs/nbformat/distros/gentoo.txt
+new file mode 100644
+index 00000000..006b1f2
+--- /dev/null
++++ b/build/pkgs/nbformat/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbformat
+-- 
+cgit v1.0-1-gd88e
+
+
+From 66179fd28fcc92ee840dcd87bb4db25cea968d66 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:34:16 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for nbformat.
+
+---
+ build/pkgs/nbformat/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbformat/spkg-configure.m4
+
+diff --git a/build/pkgs/nbformat/spkg-configure.m4 b/build/pkgs/nbformat/spkg-configure.m4
+new file mode 100644
+index 00000000..5a7f8c4
+--- /dev/null
++++ b/build/pkgs/nbformat/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbformat], [SAGE_PYTHON_PACKAGE_CHECK([nbformat])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 874005e81ed20f27a5f895030dcdbdfc5f73ad80 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:47:01 -0400
+Subject: Trac #29665: add Gentoo package information for zipp.
+
+---
+ build/pkgs/zipp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/zipp/distros/gentoo.txt
+
+diff --git a/build/pkgs/zipp/distros/gentoo.txt b/build/pkgs/zipp/distros/gentoo.txt
+new file mode 100644
+index 00000000..7f59450
+--- /dev/null
++++ b/build/pkgs/zipp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/zipp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0cc2a7355b5554c1fb79c742ebf02eff54465b3e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:47:35 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for zipp.
+
+---
+ build/pkgs/zipp/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/zipp/spkg-configure.m4
+
+diff --git a/build/pkgs/zipp/spkg-configure.m4 b/build/pkgs/zipp/spkg-configure.m4
+new file mode 100644
+index 00000000..0fe3a9c
+--- /dev/null
++++ b/build/pkgs/zipp/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([zipp], [SAGE_PYTHON_PACKAGE_CHECK([zipp])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6073ad8e56c21fc862749bbd84a56d543fb9458c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:48:37 -0400
+Subject: Trac #29665: add Gentoo package information for wcwidth.
+
+---
+ build/pkgs/wcwidth/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wcwidth/distros/gentoo.txt
+
+diff --git a/build/pkgs/wcwidth/distros/gentoo.txt b/build/pkgs/wcwidth/distros/gentoo.txt
+new file mode 100644
+index 00000000..edeb80b
+--- /dev/null
++++ b/build/pkgs/wcwidth/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/wcwidth
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9793d6172c64d61a015fbe61bd45863759124fad Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:51:10 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for wcwidth.
+
+---
+ build/pkgs/wcwidth/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wcwidth/spkg-configure.m4
+
+diff --git a/build/pkgs/wcwidth/spkg-configure.m4 b/build/pkgs/wcwidth/spkg-configure.m4
+new file mode 100644
+index 00000000..5bde15a
+--- /dev/null
++++ b/build/pkgs/wcwidth/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([wcwidth], [SAGE_PYTHON_PACKAGE_CHECK([wcwidth])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20232f370a43c146ca4e696c72a2cbcc498db060 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:52:36 -0400
+Subject: Trac #29665: add Gentoo package information for testpath.
+
+---
+ build/pkgs/testpath/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/testpath/distros/gentoo.txt
+
+diff --git a/build/pkgs/testpath/distros/gentoo.txt b/build/pkgs/testpath/distros/gentoo.txt
+new file mode 100644
+index 00000000..efa10a0
+--- /dev/null
++++ b/build/pkgs/testpath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/testpath
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1b0785b2aad8844e74345fe950baf097e2b43d24 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:55:22 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for testpath.
+
+---
+ build/pkgs/testpath/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/testpath/spkg-configure.m4
+
+diff --git a/build/pkgs/testpath/spkg-configure.m4 b/build/pkgs/testpath/spkg-configure.m4
+new file mode 100644
+index 00000000..d8fc2a7
+--- /dev/null
++++ b/build/pkgs/testpath/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([testpath], [SAGE_PYTHON_PACKAGE_CHECK([testpath])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 10fc3829ecd956d732b1b069fdfe81f0d6d5cdc2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:56:06 -0400
+Subject: Trac #29665: add Gentoo package information for jedi.
+
+---
+ build/pkgs/jedi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jedi/distros/gentoo.txt
+
+diff --git a/build/pkgs/jedi/distros/gentoo.txt b/build/pkgs/jedi/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c85a46
+--- /dev/null
++++ b/build/pkgs/jedi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jedi
+-- 
+cgit v1.0-1-gd88e
+
+
+From a75824d74c281c7639028ca01dabeed266f56998 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:06:37 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for jedi.
+
+---
+ build/pkgs/jedi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jedi/spkg-configure.m4
+
+diff --git a/build/pkgs/jedi/spkg-configure.m4 b/build/pkgs/jedi/spkg-configure.m4
+new file mode 100644
+index 00000000..a37dbcc
+--- /dev/null
++++ b/build/pkgs/jedi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jedi], [SAGE_PYTHON_PACKAGE_CHECK([jedi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 17af01373d43f6acbbdbc23e073e372d3fdadf8b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:07:47 -0400
+Subject: Trac #29665: add Gentoo package information for tomli.
+
+---
+ build/pkgs/tomli/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tomli/distros/gentoo.txt
+
+diff --git a/build/pkgs/tomli/distros/gentoo.txt b/build/pkgs/tomli/distros/gentoo.txt
+new file mode 100644
+index 00000000..0458e25
+--- /dev/null
++++ b/build/pkgs/tomli/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/tomli
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0d3b5994ae612be11992467c4a3f1a74b81400fe Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:08:12 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for tomli.
+
+---
+ build/pkgs/tomli/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tomli/spkg-configure.m4
+
+diff --git a/build/pkgs/tomli/spkg-configure.m4 b/build/pkgs/tomli/spkg-configure.m4
+new file mode 100644
+index 00000000..95a8b8b
+--- /dev/null
++++ b/build/pkgs/tomli/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tomli], [SAGE_PYTHON_PACKAGE_CHECK([tomli])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From dce1c515781b0eeb8eb9c2bc7aba581560c1fac1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:09:22 -0400
+Subject: Trac #29665: add Gentoo package information for defusedxml.
+
+---
+ build/pkgs/defusedxml/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/defusedxml/distros/gentoo.txt
+
+diff --git a/build/pkgs/defusedxml/distros/gentoo.txt b/build/pkgs/defusedxml/distros/gentoo.txt
+new file mode 100644
+index 00000000..2804214
+--- /dev/null
++++ b/build/pkgs/defusedxml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/defusedxml
+-- 
+cgit v1.0-1-gd88e
+
+
+From 02e1e1cd7f8bdae3ca5b7d35ce70af28a44e9b7c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:11:14 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for defusedxml.
+
+---
+ build/pkgs/defusedxml/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/defusedxml/spkg-configure.m4
+
+diff --git a/build/pkgs/defusedxml/spkg-configure.m4 b/build/pkgs/defusedxml/spkg-configure.m4
+new file mode 100644
+index 00000000..e02f345
+--- /dev/null
++++ b/build/pkgs/defusedxml/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([defusedxml], [SAGE_PYTHON_PACKAGE_CHECK([defusedxml])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e0ba4ebb5cfc637b5d26b85de9f34e0a160d2b9c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:12:22 -0400
+Subject: Trac #29665: add Gentoo package information for ipywidgets.
+
+---
+ build/pkgs/ipywidgets/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipywidgets/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipywidgets/distros/gentoo.txt b/build/pkgs/ipywidgets/distros/gentoo.txt
+new file mode 100644
+index 00000000..7c76967
+--- /dev/null
++++ b/build/pkgs/ipywidgets/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipywidgets
+-- 
+cgit v1.0-1-gd88e
+
+
+From 49df7e7d93c7a31b7c46d5d224a35fd313a29a32 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:15:53 -0400
+Subject: Trac #29665: add Gentoo package information for simplegeneric.
+
+---
+ build/pkgs/simplegeneric/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/simplegeneric/distros/gentoo.txt
+
+diff --git a/build/pkgs/simplegeneric/distros/gentoo.txt b/build/pkgs/simplegeneric/distros/gentoo.txt
+new file mode 100644
+index 00000000..a86e90d
+--- /dev/null
++++ b/build/pkgs/simplegeneric/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/simplegeneric
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2a893635d5804749e6fec7ed7289c921ecb5300a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:16:33 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for simplegeneric.
+
+---
+ build/pkgs/simplegeneric/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/simplegeneric/spkg-configure.m4
+
+diff --git a/build/pkgs/simplegeneric/spkg-configure.m4 b/build/pkgs/simplegeneric/spkg-configure.m4
+new file mode 100644
+index 00000000..13715ab
+--- /dev/null
++++ b/build/pkgs/simplegeneric/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([simplegeneric], [SAGE_PYTHON_PACKAGE_CHECK([simplegeneric])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a8fe7ecd6e3163e7d01261e5497ac452a8cc95ab Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:17:18 -0400
+Subject: Trac #29665: add Gentoo package information for imagesize.
+
+---
+ build/pkgs/imagesize/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/imagesize/distros/gentoo.txt
+
+diff --git a/build/pkgs/imagesize/distros/gentoo.txt b/build/pkgs/imagesize/distros/gentoo.txt
+new file mode 100644
+index 00000000..54350ba
+--- /dev/null
++++ b/build/pkgs/imagesize/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/imagesize
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2ad837c5dd1fca0f50ce6d5042a9344210a54f84 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:17:48 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for imagesize.
+
+---
+ build/pkgs/imagesize/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/imagesize/spkg-configure.m4
+
+diff --git a/build/pkgs/imagesize/spkg-configure.m4 b/build/pkgs/imagesize/spkg-configure.m4
+new file mode 100644
+index 00000000..20210ef
+--- /dev/null
++++ b/build/pkgs/imagesize/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([imagesize], [SAGE_PYTHON_PACKAGE_CHECK([imagesize])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bf47415b5bfca2d7bf24e20de35662bf331623b9 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:18:49 -0400
+Subject: Trac #29665: add Gentoo package information for mistune.
+
+---
+ build/pkgs/mistune/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mistune/distros/gentoo.txt
+
+diff --git a/build/pkgs/mistune/distros/gentoo.txt b/build/pkgs/mistune/distros/gentoo.txt
+new file mode 100644
+index 00000000..56f0a4e
+--- /dev/null
++++ b/build/pkgs/mistune/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/mistune
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6898a74fd0c65a40c5220ba68b4062ac6fe060c6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:21:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for mistune.
+
+---
+ build/pkgs/mistune/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mistune/spkg-configure.m4
+
+diff --git a/build/pkgs/mistune/spkg-configure.m4 b/build/pkgs/mistune/spkg-configure.m4
+new file mode 100644
+index 00000000..972f33d
+--- /dev/null
++++ b/build/pkgs/mistune/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([mistune], [SAGE_PYTHON_PACKAGE_CHECK([mistune])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 62735e4ccf2031cd39eb5e04b03bdfd97005d808 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:22:48 -0400
+Subject: Trac #29665: add Gentoo package information for backcall.
+
+---
+ build/pkgs/backcall/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/backcall/distros/gentoo.txt
+
+diff --git a/build/pkgs/backcall/distros/gentoo.txt b/build/pkgs/backcall/distros/gentoo.txt
+new file mode 100644
+index 00000000..266a222
+--- /dev/null
++++ b/build/pkgs/backcall/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/backcall
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9ef3ea42d4a33c7cdb623fa5417ae300cf323183 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:25:10 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for backcall.
+
+---
+ build/pkgs/backcall/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/backcall/spkg-configure.m4
+
+diff --git a/build/pkgs/backcall/spkg-configure.m4 b/build/pkgs/backcall/spkg-configure.m4
+new file mode 100644
+index 00000000..d6b11c4
+--- /dev/null
++++ b/build/pkgs/backcall/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([backcall], [SAGE_PYTHON_PACKAGE_CHECK([backcall])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1b3ea2a3c40fea0fb58435f5e5304368ea58dff8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:25:58 -0400
+Subject: Trac #29665: add Gentoo package information for parso.
+
+---
+ build/pkgs/parso/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/parso/distros/gentoo.txt
+
+diff --git a/build/pkgs/parso/distros/gentoo.txt b/build/pkgs/parso/distros/gentoo.txt
+new file mode 100644
+index 00000000..f9ce4c7
+--- /dev/null
++++ b/build/pkgs/parso/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/parso
+-- 
+cgit v1.0-1-gd88e
+
+
+From 963a3a2c563ec71a1f5be2395722d0e824cb0b11 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:26:22 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for parso.
+
+---
+ build/pkgs/parso/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/parso/spkg-configure.m4
+
+diff --git a/build/pkgs/parso/spkg-configure.m4 b/build/pkgs/parso/spkg-configure.m4
+new file mode 100644
+index 00000000..1ca6f1b
+--- /dev/null
++++ b/build/pkgs/parso/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([parso], [SAGE_PYTHON_PACKAGE_CHECK([parso])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 943053dfc474b6549bcc7d6ef2971ea43588b35c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:27:00 -0400
+Subject: Trac #29665: add Gentoo package information for pyparsing.
+
+---
+ build/pkgs/pyparsing/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyparsing/distros/gentoo.txt
+
+diff --git a/build/pkgs/pyparsing/distros/gentoo.txt b/build/pkgs/pyparsing/distros/gentoo.txt
+new file mode 100644
+index 00000000..ef0419f
+--- /dev/null
++++ b/build/pkgs/pyparsing/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyparsing
+-- 
+cgit v1.0-1-gd88e
+
+
+From bd682eaa2ac41dd84e7a52e2b0c5442fc8fd8919 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:27:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pyparsing.
+
+---
+ build/pkgs/pyparsing/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyparsing/spkg-configure.m4
+
+diff --git a/build/pkgs/pyparsing/spkg-configure.m4 b/build/pkgs/pyparsing/spkg-configure.m4
+new file mode 100644
+index 00000000..d2b4c00
+--- /dev/null
++++ b/build/pkgs/pyparsing/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pyparsing], [SAGE_PYTHON_PACKAGE_CHECK([pyparsing])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 74f36a9c0ec7c63b7e6c40066e42f4b15c2f978e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:17:42 -0400
+Subject: Trac #29665: add Gentoo package information for debugpy.
+
+---
+ build/pkgs/debugpy/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/debugpy/distros/gentoo.txt
+
+diff --git a/build/pkgs/debugpy/distros/gentoo.txt b/build/pkgs/debugpy/distros/gentoo.txt
+new file mode 100644
+index 00000000..8b797ce
+--- /dev/null
++++ b/build/pkgs/debugpy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/debugpy
+-- 
+cgit v1.0-1-gd88e
+
+
+From be072fa87ac5c373d9dc9b54c0bd68734d5709bc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:21:17 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for debugpy.
+
+---
+ build/pkgs/debugpy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/debugpy/spkg-configure.m4
+
+diff --git a/build/pkgs/debugpy/spkg-configure.m4 b/build/pkgs/debugpy/spkg-configure.m4
+new file mode 100644
+index 00000000..db605ff
+--- /dev/null
++++ b/build/pkgs/debugpy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([debugpy], [SAGE_PYTHON_PACKAGE_CHECK([debugpy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6f777ce2f2e14b94e91c8b7bbac82f9017460aba Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:23:56 -0400
+Subject: Trac #29665: add Gentoo package information for tzlocal.
+
+---
+ build/pkgs/tzlocal/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tzlocal/distros/gentoo.txt
+
+diff --git a/build/pkgs/tzlocal/distros/gentoo.txt b/build/pkgs/tzlocal/distros/gentoo.txt
+new file mode 100644
+index 00000000..2018442
+--- /dev/null
++++ b/build/pkgs/tzlocal/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/tzlocal
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3bd078fc15ae13982249452711baafae91038191 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:24:51 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for tzlocal.
+
+---
+ build/pkgs/tzlocal/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tzlocal/spkg-configure.m4
+
+diff --git a/build/pkgs/tzlocal/spkg-configure.m4 b/build/pkgs/tzlocal/spkg-configure.m4
+new file mode 100644
+index 00000000..e020b28
+--- /dev/null
++++ b/build/pkgs/tzlocal/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tzlocal], [SAGE_PYTHON_PACKAGE_CHECK([tzlocal])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 91b0882fc62214923da9ee7b6dccb05d8a1d11d1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:26:13 -0400
+Subject: Trac #29665: add Gentoo package information for pycparser.
+
+---
+ build/pkgs/pycparser/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pycparser/distros/gentoo.txt
+
+diff --git a/build/pkgs/pycparser/distros/gentoo.txt b/build/pkgs/pycparser/distros/gentoo.txt
+new file mode 100644
+index 00000000..5e87307
+--- /dev/null
++++ b/build/pkgs/pycparser/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pycparser
+-- 
+cgit v1.0-1-gd88e
+
+
+From beabde92fe6e057faf516fe82d27f1e903e55ce6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:27:27 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pycparser.
+
+---
+ build/pkgs/pycparser/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pycparser/spkg-configure.m4
+
+diff --git a/build/pkgs/pycparser/spkg-configure.m4 b/build/pkgs/pycparser/spkg-configure.m4
+new file mode 100644
+index 00000000..4b9b900
+--- /dev/null
++++ b/build/pkgs/pycparser/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pycparser], [SAGE_PYTHON_PACKAGE_CHECK([pycparser])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 86c2788dc7fd1169314e9598c91fa81045553677 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:29:36 -0400
+Subject: Trac #29665: add Gentoo package information for cycler.
+
+---
+ build/pkgs/cycler/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cycler/distros/gentoo.txt
+
+diff --git a/build/pkgs/cycler/distros/gentoo.txt b/build/pkgs/cycler/distros/gentoo.txt
+new file mode 100644
+index 00000000..4b21543
+--- /dev/null
++++ b/build/pkgs/cycler/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/cycler
+-- 
+cgit v1.0-1-gd88e
+
+
+From 67c5a944101ddf329f0a61c61d4e784f58a5c5b0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:30:27 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for cycler.
+
+---
+ build/pkgs/cycler/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cycler/spkg-configure.m4
+
+diff --git a/build/pkgs/cycler/spkg-configure.m4 b/build/pkgs/cycler/spkg-configure.m4
+new file mode 100644
+index 00000000..239571a
+--- /dev/null
++++ b/build/pkgs/cycler/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([cycler], [SAGE_PYTHON_PACKAGE_CHECK([cycler])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ef6d490251abfa41f7a0910274700a8a6a65f629 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:31:19 -0400
+Subject: Trac #29665: add Gentoo package information for traitlets.
+
+---
+ build/pkgs/traitlets/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/traitlets/distros/gentoo.txt
+
+diff --git a/build/pkgs/traitlets/distros/gentoo.txt b/build/pkgs/traitlets/distros/gentoo.txt
+new file mode 100644
+index 00000000..46bfaab
+--- /dev/null
++++ b/build/pkgs/traitlets/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/traitlets
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1f922b458d34088d9f6773312209e69f19ee45dc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:31:50 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for traitlets.
+
+---
+ build/pkgs/traitlets/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/traitlets/spkg-configure.m4
+
+diff --git a/build/pkgs/traitlets/spkg-configure.m4 b/build/pkgs/traitlets/spkg-configure.m4
+new file mode 100644
+index 00000000..df2382b
+--- /dev/null
++++ b/build/pkgs/traitlets/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([traitlets], [SAGE_PYTHON_PACKAGE_CHECK([traitlets])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 95b89a9ced0acb6d971a27fa63b97ea58a11f4e1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:33:35 -0400
+Subject: Trac #29665: add Gentoo package information for argcomplete.
+
+---
+ build/pkgs/argcomplete/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argcomplete/distros/gentoo.txt
+
+diff --git a/build/pkgs/argcomplete/distros/gentoo.txt b/build/pkgs/argcomplete/distros/gentoo.txt
+new file mode 100644
+index 00000000..b150949
+--- /dev/null
++++ b/build/pkgs/argcomplete/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/argcomplete
+-- 
+cgit v1.0-1-gd88e
+
+
+From b4cd8ef384e6e5bae0de0f3c113fb5f9e6e1a71e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:34:14 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for argcomplete.
+
+---
+ build/pkgs/argcomplete/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argcomplete/spkg-configure.m4
+
+diff --git a/build/pkgs/argcomplete/spkg-configure.m4 b/build/pkgs/argcomplete/spkg-configure.m4
+new file mode 100644
+index 00000000..cbd7ccf
+--- /dev/null
++++ b/build/pkgs/argcomplete/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([argcomplete], [SAGE_PYTHON_PACKAGE_CHECK([argcomplete])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4cc610e8331970cc018d7ea87af928fa73a292c1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:36:21 -0400
+Subject: Trac #29665: add Gentoo package information for ptyprocess.
+
+---
+ build/pkgs/ptyprocess/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ptyprocess/distros/gentoo.txt
+
+diff --git a/build/pkgs/ptyprocess/distros/gentoo.txt b/build/pkgs/ptyprocess/distros/gentoo.txt
+new file mode 100644
+index 00000000..571a851
+--- /dev/null
++++ b/build/pkgs/ptyprocess/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ptyprocess
+-- 
+cgit v1.0-1-gd88e
+
+
+From cd15f97221bf5933b07900e4f77cb55401eede26 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:37:02 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ptyprocess.
+
+---
+ build/pkgs/ptyprocess/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ptyprocess/spkg-configure.m4
+
+diff --git a/build/pkgs/ptyprocess/spkg-configure.m4 b/build/pkgs/ptyprocess/spkg-configure.m4
+new file mode 100644
+index 00000000..bfacbae
+--- /dev/null
++++ b/build/pkgs/ptyprocess/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ptyprocess], [SAGE_PYTHON_PACKAGE_CHECK([ptyprocess])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb5f45b15f99e4ba28e1b1f6042a0e8ea17f1dfc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:38:22 -0400
+Subject: Trac #29665: add Gentoo package information for attrs.
+
+---
+ build/pkgs/attrs/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/attrs/distros/gentoo.txt
+
+diff --git a/build/pkgs/attrs/distros/gentoo.txt b/build/pkgs/attrs/distros/gentoo.txt
+new file mode 100644
+index 00000000..3b906fa
+--- /dev/null
++++ b/build/pkgs/attrs/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/attrs
+-- 
+cgit v1.0-1-gd88e
+
+
+From 321707ebf8e9af1e4ac3a5b5b094b4226bb3a7a5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:38:55 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for attrs.
+
+---
+ build/pkgs/attrs/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/attrs/spkg-configure.m4
+
+diff --git a/build/pkgs/attrs/spkg-configure.m4 b/build/pkgs/attrs/spkg-configure.m4
+new file mode 100644
+index 00000000..ba6a9b7
+--- /dev/null
++++ b/build/pkgs/attrs/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([attrs], [SAGE_PYTHON_PACKAGE_CHECK([attrs])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 69a498a4e8854ecdfc2f1a134104983c0dcb9e32 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:40:09 -0400
+Subject: Trac #29665: add Gentoo package information for send2trash.
+
+---
+ build/pkgs/send2trash/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/send2trash/distros/gentoo.txt
+
+diff --git a/build/pkgs/send2trash/distros/gentoo.txt b/build/pkgs/send2trash/distros/gentoo.txt
+new file mode 100644
+index 00000000..a89b179
+--- /dev/null
++++ b/build/pkgs/send2trash/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/send2trash
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9baed17c84e1bdf5abd17c20766e5cd7dddc5b53 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:41:45 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for send2trash.
+
+---
+ build/pkgs/send2trash/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/send2trash/spkg-configure.m4
+
+diff --git a/build/pkgs/send2trash/spkg-configure.m4 b/build/pkgs/send2trash/spkg-configure.m4
+new file mode 100644
+index 00000000..3bbb727
+--- /dev/null
++++ b/build/pkgs/send2trash/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([send2trash], [SAGE_PYTHON_PACKAGE_CHECK([send2trash])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b9b552b2a2aaccaeb7c5b25be0b681f107522d09 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:43:27 -0400
+Subject: Trac #29665: add Gentoo package information for pyrsistent.
+
+---
+ build/pkgs/pyrsistent/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyrsistent/distros/gentoo.txt
+
+diff --git a/build/pkgs/pyrsistent/distros/gentoo.txt b/build/pkgs/pyrsistent/distros/gentoo.txt
+new file mode 100644
+index 00000000..83439ce
+--- /dev/null
++++ b/build/pkgs/pyrsistent/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyrsistent
+-- 
+cgit v1.0-1-gd88e
+
+
+From a17b31fac6104852762f57daa749443147bdf121 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:44:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pyrsistent.
+
+---
+ build/pkgs/pyrsistent/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyrsistent/spkg-configure.m4
+
+diff --git a/build/pkgs/pyrsistent/spkg-configure.m4 b/build/pkgs/pyrsistent/spkg-configure.m4
+new file mode 100644
+index 00000000..f7ca75d
+--- /dev/null
++++ b/build/pkgs/pyrsistent/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pyrsistent], [SAGE_PYTHON_PACKAGE_CHECK([pyrsistent])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 68520decad6d6937918d7a6af65ca5bd476e5d02 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:45:45 -0400
+Subject: Trac #29665: add Gentoo package information for entrypoints.
+
+---
+ build/pkgs/entrypoints/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/entrypoints/distros/gentoo.txt
+
+diff --git a/build/pkgs/entrypoints/distros/gentoo.txt b/build/pkgs/entrypoints/distros/gentoo.txt
+new file mode 100644
+index 00000000..684ddd0
+--- /dev/null
++++ b/build/pkgs/entrypoints/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/entrypoints
+-- 
+cgit v1.0-1-gd88e
+
+
+From 34213eccb642a6bad64d89acaefa83ee702cb483 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:46:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for entrypoints.
+
+---
+ build/pkgs/entrypoints/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/entrypoints/spkg-configure.m4
+
+diff --git a/build/pkgs/entrypoints/spkg-configure.m4 b/build/pkgs/entrypoints/spkg-configure.m4
+new file mode 100644
+index 00000000..caed658
+--- /dev/null
++++ b/build/pkgs/entrypoints/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([entrypoints], [SAGE_PYTHON_PACKAGE_CHECK([entrypoints])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8e985614345da1a58fcdc127a9c0ddd790f9b5d2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:48:26 -0400
+Subject: Trac #29665: add Gentoo package information for markupsafe.
+
+---
+ build/pkgs/markupsafe/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/markupsafe/distros/gentoo.txt
+
+diff --git a/build/pkgs/markupsafe/distros/gentoo.txt b/build/pkgs/markupsafe/distros/gentoo.txt
+new file mode 100644
+index 00000000..9654e35
+--- /dev/null
++++ b/build/pkgs/markupsafe/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/markupsafe
+-- 
+cgit v1.0-1-gd88e
+
+
+From d370f229ae0988856f2e0d1f6ee2df2c47169106 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:48:55 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for markupsafe.
+
+---
+ build/pkgs/markupsafe/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/markupsafe/spkg-configure.m4
+
+diff --git a/build/pkgs/markupsafe/spkg-configure.m4 b/build/pkgs/markupsafe/spkg-configure.m4
+new file mode 100644
+index 00000000..79eb8db
+--- /dev/null
++++ b/build/pkgs/markupsafe/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([markupsafe], [SAGE_PYTHON_PACKAGE_CHECK([markupsafe])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c49b285ad9e25e6bc81a7e75d461d234fdd3ea68 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:30:49 -0400
+Subject: Trac #29665: add Gentoo package information for flit_core.
+
+---
+ build/pkgs/flit_core/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/flit_core/distros/gentoo.txt
+
+diff --git a/build/pkgs/flit_core/distros/gentoo.txt b/build/pkgs/flit_core/distros/gentoo.txt
+new file mode 100644
+index 00000000..fe6bea9
+--- /dev/null
++++ b/build/pkgs/flit_core/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/flit_core
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b0ce1c4f23cd9fc4316e1eb2b9b4bde394957f3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:32:11 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for flit_core.
+
+---
+ build/pkgs/flit_core/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/flit_core/spkg-configure.m4
+
+diff --git a/build/pkgs/flit_core/spkg-configure.m4 b/build/pkgs/flit_core/spkg-configure.m4
+new file mode 100644
+index 00000000..ee67557
+--- /dev/null
++++ b/build/pkgs/flit_core/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([flit_core], [SAGE_PYTHON_PACKAGE_CHECK([flit_core])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f006c231a81428b1e1e792f889bf974f90e3c831 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:34:06 -0400
+Subject: Trac #29665: add Gentoo package information for nest_asyncio.
+
+---
+ build/pkgs/nest_asyncio/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nest_asyncio/distros/gentoo.txt
+
+diff --git a/build/pkgs/nest_asyncio/distros/gentoo.txt b/build/pkgs/nest_asyncio/distros/gentoo.txt
+new file mode 100644
+index 00000000..ab742d2
+--- /dev/null
++++ b/build/pkgs/nest_asyncio/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nest_asyncio
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4a58d0a96a84475e765a01a64f5f44c48a317e0b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:34:43 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for nest_asyncio.
+
+---
+ build/pkgs/nest_asyncio/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nest_asyncio/spkg-configure.m4
+
+diff --git a/build/pkgs/nest_asyncio/spkg-configure.m4 b/build/pkgs/nest_asyncio/spkg-configure.m4
+new file mode 100644
+index 00000000..4d81527
+--- /dev/null
++++ b/build/pkgs/nest_asyncio/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nest_asyncio], [SAGE_PYTHON_PACKAGE_CHECK([nest_asyncio])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e50af937777ea778908bc09a7a79db3dd80fdf25 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:37:02 -0400
+Subject: Trac #29665: add Gentoo package information for ipython_genutils.
+
+---
+ build/pkgs/ipython_genutils/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython_genutils/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipython_genutils/distros/gentoo.txt b/build/pkgs/ipython_genutils/distros/gentoo.txt
+new file mode 100644
+index 00000000..01bc49d
+--- /dev/null
++++ b/build/pkgs/ipython_genutils/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipython_genutils
+-- 
+cgit v1.0-1-gd88e
+
+
+From ec3c0ce9db2ba13c1a49d1bcfb7a4b249cb7ae83 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:39:20 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipython_genutils.
+
+---
+ build/pkgs/ipython_genutils/spkg-configure.m4 | 4 ++++
+ 1 file changed, 4 insertions(+)
+ create mode 100644 build/pkgs/ipython_genutils/spkg-configure.m4
+
+diff --git a/build/pkgs/ipython_genutils/spkg-configure.m4 b/build/pkgs/ipython_genutils/spkg-configure.m4
+new file mode 100644
+index 00000000..b0ba86a
+--- /dev/null
++++ b/build/pkgs/ipython_genutils/spkg-configure.m4
+@@ -0,0 +1,4 @@
++SAGE_SPKG_CONFIGURE(
++  [ipython_genutils],
++  [SAGE_PYTHON_PACKAGE_CHECK([ipython_genutils])]
++)
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5c9e2e265115e5f10d4b459a475467e30b4bddde Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:40:03 -0400
+Subject: Trac #29665: add Gentoo package information for ipython.
+
+---
+ build/pkgs/ipython/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipython/distros/gentoo.txt b/build/pkgs/ipython/distros/gentoo.txt
+new file mode 100644
+index 00000000..8b76f18
+--- /dev/null
++++ b/build/pkgs/ipython/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipython
+-- 
+cgit v1.0-1-gd88e
+
+
+From 621e707ddd040a902d7dddf0bed1de2b54ab22f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 07:37:56 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipython.
+
+---
+ build/pkgs/ipython/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython/spkg-configure.m4
+
+diff --git a/build/pkgs/ipython/spkg-configure.m4 b/build/pkgs/ipython/spkg-configure.m4
+new file mode 100644
+index 00000000..02ab89f
+--- /dev/null
++++ b/build/pkgs/ipython/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipython], [SAGE_PYTHON_PACKAGE_CHECK([ipython])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20a0613f6d441da436f3e7b8047a72bf490882bd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 07:51:11 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipywidgets.
+
+---
+ build/pkgs/ipywidgets/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipywidgets/spkg-configure.m4
+
+diff --git a/build/pkgs/ipywidgets/spkg-configure.m4 b/build/pkgs/ipywidgets/spkg-configure.m4
+new file mode 100644
+index 00000000..51ca9be
+--- /dev/null
++++ b/build/pkgs/ipywidgets/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipywidgets], [SAGE_PYTHON_PACKAGE_CHECK([ipywidgets])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 76bcd386633acc02a1a3026339d0cbd258ada04e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 10:05:16 -0400
+Subject: Trac #29665: add Gentoo package information for wheel.
+
+---
+ build/pkgs/wheel/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wheel/distros/gentoo.txt
+
+diff --git a/build/pkgs/wheel/distros/gentoo.txt b/build/pkgs/wheel/distros/gentoo.txt
+new file mode 100644
+index 00000000..ec571d5
+--- /dev/null
++++ b/build/pkgs/wheel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 96c2dd2ca7812f5333bb9d45eadb7ac408e364ce Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:51:44 -0500
+Subject: Trac #29665: add Gentoo package information for terminado.
+
+---
+ build/pkgs/terminado/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/terminado/distros/gentoo.txt
+
+diff --git a/build/pkgs/terminado/distros/gentoo.txt b/build/pkgs/terminado/distros/gentoo.txt
+new file mode 100644
+index 00000000..1df16f1
+--- /dev/null
++++ b/build/pkgs/terminado/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/terminado
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0de0f5f3d235a4339b21e37ea13c9f5e59a82e59 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:52:35 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for terminado.
+
+---
+ build/pkgs/terminado/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/terminado/spkg-configure.m4
+
+diff --git a/build/pkgs/terminado/spkg-configure.m4 b/build/pkgs/terminado/spkg-configure.m4
+new file mode 100644
+index 00000000..5defc2f
+--- /dev/null
++++ b/build/pkgs/terminado/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([terminado], [SAGE_PYTHON_PACKAGE_CHECK([terminado])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d14a745c770b02822557e7cee0a98de1cb2f3a12 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:56:15 -0500
+Subject: Trac #29665: add Gentoo package information for cffi.
+
+---
+ build/pkgs/cffi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cffi/distros/gentoo.txt
+
+diff --git a/build/pkgs/cffi/distros/gentoo.txt b/build/pkgs/cffi/distros/gentoo.txt
+new file mode 100644
+index 00000000..81eeb81
+--- /dev/null
++++ b/build/pkgs/cffi/distros/gentoo.txt
+@@ -0,0 +1 @@
++virtual/python-cffi
+-- 
+cgit v1.0-1-gd88e
+
+
+From ce393c04afc69fe050e38f780d4e117164687d80 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:57:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for cffi.
+
+---
+ build/pkgs/cffi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cffi/spkg-configure.m4
+
+diff --git a/build/pkgs/cffi/spkg-configure.m4 b/build/pkgs/cffi/spkg-configure.m4
+new file mode 100644
+index 00000000..dc81875
+--- /dev/null
++++ b/build/pkgs/cffi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([cffi], [SAGE_PYTHON_PACKAGE_CHECK([cffi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 467093315b3fdd57c8caa2f95cf99ad52b0b84fb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:57:57 -0500
+Subject: Trac #29665: add Gentoo package information for pip.
+
+---
+ build/pkgs/pip/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pip/distros/gentoo.txt
+
+diff --git a/build/pkgs/pip/distros/gentoo.txt b/build/pkgs/pip/distros/gentoo.txt
+new file mode 100644
+index 00000000..1845454
+--- /dev/null
++++ b/build/pkgs/pip/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pip[vanilla]
+-- 
+cgit v1.0-1-gd88e
+
+
+From c597fd23f9f68dabbcb7e698d0569c3e6458f6d1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 09:07:26 -0500
+Subject: Trac #29665: new spkg-configure.m4 for pip.
+
+---
+ build/pkgs/pip/spkg-configure.m4 | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+ create mode 100644 build/pkgs/pip/spkg-configure.m4
+
+diff --git a/build/pkgs/pip/spkg-configure.m4 b/build/pkgs/pip/spkg-configure.m4
+new file mode 100644
+index 00000000..c7a5562
+--- /dev/null
++++ b/build/pkgs/pip/spkg-configure.m4
+@@ -0,0 +1,12 @@
++SAGE_SPKG_CONFIGURE([pip], [
++  dnl always run this macro because it changes the default value of
++  dnl the --with-system-<package> option.
++  SAGE_PYTHON_PACKAGE_CHECK([pip])
++
++  dnl if we might not install the spkg, make sure that "pip" is in
++  dnl the user's PATH, too.
++  AS_IF([test "x$sage_spkg_install_pip" != "xyes"], [
++    AC_CHECK_PROG(HAVE_PIP, pip, yes, no)
++    AS_IF([test "x$HAVE_PIP" = "xno"], [sage_spkg_install_pip=yes])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ef8f1e807bc55d7b8321777486fa867a7c135419 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 9 Nov 2021 09:09:04 -0500
+Subject: Trac #29665: set $SAGE_PIP_INSTALL_FLAGS for
+ --enable-system-site-packages.
+
+We need to pass some special flags to "pip install" to make it do the
+right thing in the precence of system-site packages. Here we introduce
+a new autoconf variable, SAGE_PIP_INSTALL_FLAGS, that will be used
+to pass those flags to the build system.
+
+With autoconf aware of the variable, we substitute its value into the
+sage-build-env-config script for use in spkg-install.in.
+---
+ build/bin/sage-build-env-config.in | 1 +
+ configure.ac                       | 9 +++++++++
+ 2 files changed, 10 insertions(+)
+
+diff --git a/build/bin/sage-build-env-config.in b/build/bin/sage-build-env-config.in
+index 92e7dad..ad62e5f 100644
+--- a/build/bin/sage-build-env-config.in
++++ b/build/bin/sage-build-env-config.in
+@@ -53,6 +53,7 @@ export SAGE_PARI_CFG="@SAGE_PARI_CFG@"
+ 
+ export SAGE_GLPK_PREFIX="@SAGE_GLPK_PREFIX@"
+ export SAGE_FREETYPE_PREFIX="@SAGE_FREETYPE_PREFIX@"
++export SAGE_PIP_INSTALL_FLAGS="@SAGE_PIP_INSTALL_FLAGS@"
+ export SAGE_SUITESPARSE_PREFIX="@SAGE_SUITESPARSE_PREFIX@"
+ 
+ export SAGE_CONFIGURE_FFLAS_FFPACK="@SAGE_CONFIGURE_FFLAS_FFPACK@"
+diff --git a/configure.ac b/configure.ac
+index 6fafb83..6ed07ac 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -441,6 +441,14 @@ AC_ARG_ENABLE(
+     [allow the use of python packages from the system (experimental; default: no)]
+   )], [
+   AS_IF([test "x$enable_system_site_packages" = "xyes"], [
++    dnl When installing python SPKGs in the presence of system-site
++    dnl packages, we need to --ignore-installed so that a patched SPKG
++    dnl can be installed in the presence of an unpatched system package
++    dnl that appears (to pip) to be identical. The --no-deps flag is
++    dnl then needed because --ignore-installed will make any installed
++    dnl dependencies invisible to pip, who does not appreciate that.
++    SAGE_PIP_INSTALL_FLAGS="${SAGE_PIP_INSTALL_FLAGS} --no-deps --ignore-installed"
++
+     SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
+ 
+     dnl We want to raise an error if the user asked for "system site
+@@ -453,6 +461,7 @@ AC_ARG_ENABLE(
+     with_system_python3="force"
+   ])
+ ])
++AC_SUBST([SAGE_PIP_INSTALL_FLAGS])
+ AC_SUBST([SAGE_VENV_FLAGS])
+ 
+ SAGE_SPKG_OPTIONS=""
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3cf365fef84e809e74abd2eb388e7a8e9af9d739 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 9 Nov 2021 21:01:58 -0500
+Subject: Trac #29665: pass $SAGE_PIP_INSTALL_FLAGS to sdh_pip_install.
+
+Since sdh_pip_install is usually called from spkg-install.in, the
+variables from sage-build-env-config will be available. Here we pass
+the contents of $SAGE_PIP_INSTALL_FLAGS to sage-pip-install
+unconditionally, and hope that the user ignores this variable unless
+he truly knows what he is doing.
+---
+ build/bin/sage-dist-helpers | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/build/bin/sage-dist-helpers b/build/bin/sage-dist-helpers
+index fe364e5..1032ac3 100644
+--- a/build/bin/sage-dist-helpers
++++ b/build/bin/sage-dist-helpers
+@@ -303,7 +303,11 @@ sdh_store_wheel() {
+ }
+ 
+ sdh_store_and_pip_install_wheel() {
+-    local pip_options=""
++    # The $SAGE_PIP_INSTALL_FLAGS variable is set by sage-build-env-config.
++    # We skip sanity checking its contents since you should either let sage
++    # decide what it contains, or really know what you are doing.
++    local pip_options="${SAGE_PIP_INSTALL_FLAGS}"
++
+     while [ $# -gt 0 ]; do
+         case $1 in
+             -*) pip_options="$pip_options $1"
+-- 
+cgit v1.0-1-gd88e
+
+
+From 50f0438ee857b8f0b7d7ad924e6bba9c5e1bc033 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:10:46 -0500
+Subject: Trac #29665: add Gentoo package information for pexpect.
+
+---
+ build/pkgs/pexpect/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pexpect/distros/gentoo.txt
+
+diff --git a/build/pkgs/pexpect/distros/gentoo.txt b/build/pkgs/pexpect/distros/gentoo.txt
+new file mode 100644
+index 00000000..30c4b60
+--- /dev/null
++++ b/build/pkgs/pexpect/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pexpect
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4d784688d997290b462646fa7f36114a41f3f453 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:11:25 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pexpect.
+
+---
+ build/pkgs/pexpect/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pexpect/spkg-configure.m4
+
+diff --git a/build/pkgs/pexpect/spkg-configure.m4 b/build/pkgs/pexpect/spkg-configure.m4
+new file mode 100644
+index 00000000..6520856
+--- /dev/null
++++ b/build/pkgs/pexpect/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pexpect], [SAGE_PYTHON_PACKAGE_CHECK([pexpect])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6447122dc76a3b7a58340dbed942db66530b5b07 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:12:05 -0500
+Subject: Trac #29665: add Gentoo package information for docutils.
+
+---
+ build/pkgs/docutils/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/docutils/distros/gentoo.txt
+
+diff --git a/build/pkgs/docutils/distros/gentoo.txt b/build/pkgs/docutils/distros/gentoo.txt
+new file mode 100644
+index 00000000..fe4a452
+--- /dev/null
++++ b/build/pkgs/docutils/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/docutils
+-- 
+cgit v1.0-1-gd88e
+
+
+From 709041480a5fc729b0ee7f1a8a3b16d4d65321b5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:12:38 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for docutils.
+
+---
+ build/pkgs/docutils/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/docutils/spkg-configure.m4
+
+diff --git a/build/pkgs/docutils/spkg-configure.m4 b/build/pkgs/docutils/spkg-configure.m4
+new file mode 100644
+index 00000000..3584e45
+--- /dev/null
++++ b/build/pkgs/docutils/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([docutils], [SAGE_PYTHON_PACKAGE_CHECK([docutils])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 782d38b48ab87afccc43fbc071e7b7ed48fb0a20 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:14:37 -0500
+Subject: Trac #29665: add Gentoo package information for nbclient.
+
+---
+ build/pkgs/nbclient/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbclient/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbclient/distros/gentoo.txt b/build/pkgs/nbclient/distros/gentoo.txt
+new file mode 100644
+index 00000000..06ff18d
+--- /dev/null
++++ b/build/pkgs/nbclient/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbclient
+-- 
+cgit v1.0-1-gd88e
+
+
+From 19ce09336532336f69db74381932d51a429dfaca Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:15:11 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for nbclient.
+
+---
+ build/pkgs/nbclient/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbclient/spkg-configure.m4
+
+diff --git a/build/pkgs/nbclient/spkg-configure.m4 b/build/pkgs/nbclient/spkg-configure.m4
+new file mode 100644
+index 00000000..14178b7
+--- /dev/null
++++ b/build/pkgs/nbclient/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbclient], [SAGE_PYTHON_PACKAGE_CHECK([nbclient])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c063b9de42c1780368000a563d0dbe80b6fff169 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:17:36 -0500
+Subject: Trac #29665: add Gentoo package information for argon2_cffi.
+
+---
+ build/pkgs/argon2_cffi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argon2_cffi/distros/gentoo.txt
+
+diff --git a/build/pkgs/argon2_cffi/distros/gentoo.txt b/build/pkgs/argon2_cffi/distros/gentoo.txt
+new file mode 100644
+index 00000000..2f12ca8
+--- /dev/null
++++ b/build/pkgs/argon2_cffi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/argon2-cffi
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0b4d5699dd51ea52550fba7db9e1cbb8bbac1892 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:18:35 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for argon2_cffi.
+
+---
+ build/pkgs/argon2_cffi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argon2_cffi/spkg-configure.m4
+
+diff --git a/build/pkgs/argon2_cffi/spkg-configure.m4 b/build/pkgs/argon2_cffi/spkg-configure.m4
+new file mode 100644
+index 00000000..03ebc63
+--- /dev/null
++++ b/build/pkgs/argon2_cffi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([argon2_cffi], [SAGE_PYTHON_PACKAGE_CHECK([argon2_cffi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2b4119558a6e0b1aa512848539a237676b035c83 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:30:48 -0500
+Subject: Trac #29665: fix package name in dateutil's install-requires.txt.
+
+---
+ build/pkgs/dateutil/install-requires.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/build/pkgs/dateutil/install-requires.txt b/build/pkgs/dateutil/install-requires.txt
+index 0ae93da..face537 100644
+--- a/build/pkgs/dateutil/install-requires.txt
++++ b/build/pkgs/dateutil/install-requires.txt
+@@ -1 +1 @@
+-dateutil >=2.8.1
++python-dateutil >=2.8.1
+-- 
+cgit v1.0-1-gd88e
+
+
+From df371b7c4d20a3353d43940306ad22e11aba29da Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:31:41 -0500
+Subject: Trac #29665: add Gentoo package information for dateutil.
+
+---
+ build/pkgs/dateutil/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/dateutil/distros/gentoo.txt
+
+diff --git a/build/pkgs/dateutil/distros/gentoo.txt b/build/pkgs/dateutil/distros/gentoo.txt
+new file mode 100644
+index 00000000..e129df7
+--- /dev/null
++++ b/build/pkgs/dateutil/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/python-dateutil
+-- 
+cgit v1.0-1-gd88e
+
+
+From 577695dfdf661ee26c0ffd767bdbf479d95f7fb4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:32:21 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for dateutil.
+
+---
+ build/pkgs/dateutil/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/dateutil/spkg-configure.m4
+
+diff --git a/build/pkgs/dateutil/spkg-configure.m4 b/build/pkgs/dateutil/spkg-configure.m4
+new file mode 100644
+index 00000000..fdcd127
+--- /dev/null
++++ b/build/pkgs/dateutil/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([dateutil], [SAGE_PYTHON_PACKAGE_CHECK([dateutil])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1984651caac624ec4bb58814ca1d57fe66f9881a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:33:51 -0500
+Subject: Trac #29665: add Gentoo package information for setuptools_scm.
+
+---
+ build/pkgs/setuptools_scm/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/setuptools_scm/distros/gentoo.txt
+
+diff --git a/build/pkgs/setuptools_scm/distros/gentoo.txt b/build/pkgs/setuptools_scm/distros/gentoo.txt
+new file mode 100644
+index 00000000..8989597
+--- /dev/null
++++ b/build/pkgs/setuptools_scm/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/setuptools_scm
+-- 
+cgit v1.0-1-gd88e
+
+
+From ebf7c854ed966e7353759be485c4f5a57b9a10fa Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:34:49 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for setuptools_scm.
+
+---
+ build/pkgs/setuptools_scm/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/setuptools_scm/spkg-configure.m4
+
+diff --git a/build/pkgs/setuptools_scm/spkg-configure.m4 b/build/pkgs/setuptools_scm/spkg-configure.m4
+new file mode 100644
+index 00000000..437148c
+--- /dev/null
++++ b/build/pkgs/setuptools_scm/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([setuptools_scm], [
++  SAGE_PYTHON_PACKAGE_CHECK([setuptools_scm])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0dee0d0c28f31b1f619e44c710a3c9e22d2b2544 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:36:33 -0500
+Subject: Trac #29665: add Gentoo package information for nbconvert.
+
+---
+ build/pkgs/nbconvert/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbconvert/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbconvert/distros/gentoo.txt b/build/pkgs/nbconvert/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c45a10
+--- /dev/null
++++ b/build/pkgs/nbconvert/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbconvert
+-- 
+cgit v1.0-1-gd88e
+
+
+From 473789eb11b1838bc32dc8a63509ee199afc8912 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:37:37 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for nbconvert.
+
+---
+ build/pkgs/nbconvert/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbconvert/spkg-configure.m4
+
+diff --git a/build/pkgs/nbconvert/spkg-configure.m4 b/build/pkgs/nbconvert/spkg-configure.m4
+new file mode 100644
+index 00000000..9b5dee3
+--- /dev/null
++++ b/build/pkgs/nbconvert/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbconvert], [SAGE_PYTHON_PACKAGE_CHECK([nbconvert])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f0703b594e57c980d605aa9bc8316c45a7858b3b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:41:51 -0500
+Subject: Trac #29665: add Gentoo package information for jupyter_core.
+
+---
+ build/pkgs/jupyter_core/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyter_core/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyter_core/distros/gentoo.txt b/build/pkgs/jupyter_core/distros/gentoo.txt
+new file mode 100644
+index 00000000..f168c5a
+--- /dev/null
++++ b/build/pkgs/jupyter_core/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyter_core
+-- 
+cgit v1.0-1-gd88e
+
+
+From 061a307cc4a6680d8500fde834975064e59540d5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:42:48 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jupyter_core.
+
+---
+ build/pkgs/jupyter_core/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyter_core/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyter_core/spkg-configure.m4 b/build/pkgs/jupyter_core/spkg-configure.m4
+new file mode 100644
+index 00000000..67df9c3
+--- /dev/null
++++ b/build/pkgs/jupyter_core/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyter_core], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyter_core])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b85abe964ce0b98b5842efe9cbad9bdb1c89202f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:47:08 -0500
+Subject: Trac #29665: add Gentoo package information for jupyter_client.
+
+---
+ build/pkgs/jupyter_client/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyter_client/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyter_client/distros/gentoo.txt b/build/pkgs/jupyter_client/distros/gentoo.txt
+new file mode 100644
+index 00000000..4f1de88
+--- /dev/null
++++ b/build/pkgs/jupyter_client/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyter_client
+-- 
+cgit v1.0-1-gd88e
+
+
+From 86323ff1e0b2507933df6bc2a96c9175957640c5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:48:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jupyter_client.
+
+---
+ build/pkgs/jupyter_client/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyter_client/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyter_client/spkg-configure.m4 b/build/pkgs/jupyter_client/spkg-configure.m4
+new file mode 100644
+index 00000000..fbd3498
+--- /dev/null
++++ b/build/pkgs/jupyter_client/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyter_client], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyter_client])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a8475e27dd30d752d05ab6fea6579e8623501d82 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:48:58 -0500
+Subject: Trac #29665: add Gentoo package information for snowballstemmer.
+
+---
+ build/pkgs/snowballstemmer/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/snowballstemmer/distros/gentoo.txt
+
+diff --git a/build/pkgs/snowballstemmer/distros/gentoo.txt b/build/pkgs/snowballstemmer/distros/gentoo.txt
+new file mode 100644
+index 00000000..63fd851
+--- /dev/null
++++ b/build/pkgs/snowballstemmer/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/snowballstemmer
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0833c9b781062b4ed86d619e050a6f5d60e36080 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:49:38 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for snowballstemmer.
+
+---
+ build/pkgs/snowballstemmer/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/snowballstemmer/spkg-configure.m4
+
+diff --git a/build/pkgs/snowballstemmer/spkg-configure.m4 b/build/pkgs/snowballstemmer/spkg-configure.m4
+new file mode 100644
+index 00000000..6aa0882
+--- /dev/null
++++ b/build/pkgs/snowballstemmer/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([snowballstemmer], [
++  SAGE_PYTHON_PACKAGE_CHECK([snowballstemmer])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 50a1cf2a2bcd7eeec64cbc3f70e3e9fbe5d850fe Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:50:47 -0500
+Subject: Trac #29665: add Gentoo package information for tornado.
+
+---
+ build/pkgs/tornado/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tornado/distros/gentoo.txt
+
+diff --git a/build/pkgs/tornado/distros/gentoo.txt b/build/pkgs/tornado/distros/gentoo.txt
+new file mode 100644
+index 00000000..6ae4b9f
+--- /dev/null
++++ b/build/pkgs/tornado/distros/gentoo.txt
+@@ -0,0 +1 @@
++www-servers/tornado
+-- 
+cgit v1.0-1-gd88e
+
+
+From 118f4da6e03476c726363e8e22ecda32f13bfc33 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:51:26 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for tornado.
+
+---
+ build/pkgs/tornado/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tornado/spkg-configure.m4
+
+diff --git a/build/pkgs/tornado/spkg-configure.m4 b/build/pkgs/tornado/spkg-configure.m4
+new file mode 100644
+index 00000000..1ee5bc9
+--- /dev/null
++++ b/build/pkgs/tornado/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tornado], [SAGE_PYTHON_PACKAGE_CHECK([tornado])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3850701747a6c8ef60840bdfdb589b28d4cd2b9a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:52:21 -0500
+Subject: Trac #29665: add Gentoo package information for jsonschema.
+
+---
+ build/pkgs/jsonschema/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jsonschema/distros/gentoo.txt
+
+diff --git a/build/pkgs/jsonschema/distros/gentoo.txt b/build/pkgs/jsonschema/distros/gentoo.txt
+new file mode 100644
+index 00000000..d708e4c
+--- /dev/null
++++ b/build/pkgs/jsonschema/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jsonschema
+-- 
+cgit v1.0-1-gd88e
+
+
+From 76e3917c8af781af00f642cfada7a79594429e30 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:54:03 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jsonschema.
+
+---
+ build/pkgs/jsonschema/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jsonschema/spkg-configure.m4
+
+diff --git a/build/pkgs/jsonschema/spkg-configure.m4 b/build/pkgs/jsonschema/spkg-configure.m4
+new file mode 100644
+index 00000000..b9e5e21
+--- /dev/null
++++ b/build/pkgs/jsonschema/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jsonschema], [SAGE_PYTHON_PACKAGE_CHECK([jsonschema])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From fd4a16c11669b6dd73ac6325bca820e76db00402 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:55:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ widgetsnbextension.
+
+---
+ build/pkgs/widgetsnbextension/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/widgetsnbextension/spkg-configure.m4
+
+diff --git a/build/pkgs/widgetsnbextension/spkg-configure.m4 b/build/pkgs/widgetsnbextension/spkg-configure.m4
+new file mode 100644
+index 00000000..bf82daf
+--- /dev/null
++++ b/build/pkgs/widgetsnbextension/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([widgetsnbextension], [
++  SAGE_PYTHON_PACKAGE_CHECK([widgetsnbextension])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8079a9f384e3c8480e157dd98c3db2f43c987f4e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:57:20 -0500
+Subject: Trac #29665: add Gentoo package information for importlib_resources.
+
+---
+ build/pkgs/importlib_resources/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/importlib_resources/distros/gentoo.txt
+
+diff --git a/build/pkgs/importlib_resources/distros/gentoo.txt b/build/pkgs/importlib_resources/distros/gentoo.txt
+new file mode 100644
+index 00000000..d5e1f2c
+--- /dev/null
++++ b/build/pkgs/importlib_resources/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/importlib_resources
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2c430d7c52f02779a6c41b98ac2f4edd8b6759c3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:58:00 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ importlib_resources.
+
+---
+ build/pkgs/importlib_resources/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/importlib_resources/spkg-configure.m4
+
+diff --git a/build/pkgs/importlib_resources/spkg-configure.m4 b/build/pkgs/importlib_resources/spkg-configure.m4
+new file mode 100644
+index 00000000..50df55b
+--- /dev/null
++++ b/build/pkgs/importlib_resources/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([importlib_resources], [
++  SAGE_PYTHON_PACKAGE_CHECK([importlib_resources])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 00d13d7bf2e50aae2ccef3b2b30293c70a922af2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:58:38 -0500
+Subject: Trac #29665: add Gentoo package information for kiwisolver.
+
+---
+ build/pkgs/kiwisolver/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/kiwisolver/distros/gentoo.txt
+
+diff --git a/build/pkgs/kiwisolver/distros/gentoo.txt b/build/pkgs/kiwisolver/distros/gentoo.txt
+new file mode 100644
+index 00000000..7b30c95
+--- /dev/null
++++ b/build/pkgs/kiwisolver/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/kiwisolver
+-- 
+cgit v1.0-1-gd88e
+
+
+From 72b7907ef7ea9fa4ff6948ea34cfe2f693ee6c31 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:59:09 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for kiwisolver.
+
+---
+ build/pkgs/kiwisolver/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/kiwisolver/spkg-configure.m4
+
+diff --git a/build/pkgs/kiwisolver/spkg-configure.m4 b/build/pkgs/kiwisolver/spkg-configure.m4
+new file mode 100644
+index 00000000..4e7ac97
+--- /dev/null
++++ b/build/pkgs/kiwisolver/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([kiwisolver], [SAGE_PYTHON_PACKAGE_CHECK([kiwisolver])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 479351279e4e0ea7e2d146434f0daba038765cfd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:00:04 -0500
+Subject: Trac #29665: add Gentoo package information for notebook.
+
+---
+ build/pkgs/notebook/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/notebook/distros/gentoo.txt
+
+diff --git a/build/pkgs/notebook/distros/gentoo.txt b/build/pkgs/notebook/distros/gentoo.txt
+new file mode 100644
+index 00000000..6475d72
+--- /dev/null
++++ b/build/pkgs/notebook/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/notebook
+-- 
+cgit v1.0-1-gd88e
+
+
+From f4d9242ea654977f8ad7865c82eec593e11a36bc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:01:42 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for notebook.
+
+---
+ build/pkgs/notebook/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/notebook/spkg-configure.m4
+
+diff --git a/build/pkgs/notebook/spkg-configure.m4 b/build/pkgs/notebook/spkg-configure.m4
+new file mode 100644
+index 00000000..a17ba95
+--- /dev/null
++++ b/build/pkgs/notebook/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([notebook], [SAGE_PYTHON_PACKAGE_CHECK([notebook])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9837070c7f8e9a71283b84d49d4fd2c94b78a464 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:02:38 -0500
+Subject: Trac #29665: add Gentoo package information for matplotlib_inline.
+
+---
+ build/pkgs/matplotlib_inline/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/matplotlib_inline/distros/gentoo.txt
+
+diff --git a/build/pkgs/matplotlib_inline/distros/gentoo.txt b/build/pkgs/matplotlib_inline/distros/gentoo.txt
+new file mode 100644
+index 00000000..6a5859c
+--- /dev/null
++++ b/build/pkgs/matplotlib_inline/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/matplotlib-inline
+-- 
+cgit v1.0-1-gd88e
+
+
+From 750be73b25b92b4875e47d044360ac0e1116ec3e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:03:28 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for matplotlib_inline.
+
+---
+ build/pkgs/matplotlib_inline/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/matplotlib_inline/spkg-configure.m4
+
+diff --git a/build/pkgs/matplotlib_inline/spkg-configure.m4 b/build/pkgs/matplotlib_inline/spkg-configure.m4
+new file mode 100644
+index 00000000..e59658f
+--- /dev/null
++++ b/build/pkgs/matplotlib_inline/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([matplotlib_inline], [
++  SAGE_PYTHON_PACKAGE_CHECK([matplotlib_inline])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 273505f49698dcd2ab30c2756b07113c9b7e7791 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:04:10 -0500
+Subject: Trac #29665: add Gentoo package information for ipykernel.
+
+---
+ build/pkgs/ipykernel/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipykernel/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipykernel/distros/gentoo.txt b/build/pkgs/ipykernel/distros/gentoo.txt
+new file mode 100644
+index 00000000..88aab61
+--- /dev/null
++++ b/build/pkgs/ipykernel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipykernel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 629ad36c9e4ae0cdff4a013289b4f2911442445e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:04:46 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for ipykernel.
+
+---
+ build/pkgs/ipykernel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipykernel/spkg-configure.m4
+
+diff --git a/build/pkgs/ipykernel/spkg-configure.m4 b/build/pkgs/ipykernel/spkg-configure.m4
+new file mode 100644
+index 00000000..94ecc2d
+--- /dev/null
++++ b/build/pkgs/ipykernel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipykernel], [SAGE_PYTHON_PACKAGE_CHECK([ipykernel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b8d709edb6a24fd5868ee2818b56e78257b2eafa Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:05:26 -0500
+Subject: Trac #29665: add Gentoo package information for prompt_toolkit.
+
+---
+ build/pkgs/prompt_toolkit/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/prompt_toolkit/distros/gentoo.txt
+
+diff --git a/build/pkgs/prompt_toolkit/distros/gentoo.txt b/build/pkgs/prompt_toolkit/distros/gentoo.txt
+new file mode 100644
+index 00000000..6902484
+--- /dev/null
++++ b/build/pkgs/prompt_toolkit/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/prompt_toolkit
+-- 
+cgit v1.0-1-gd88e
+
+
+From 16c0b5e767ae4dac4440510b7253e5c8642b7d2c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:10:39 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for prompt_toolkit.
+
+---
+ build/pkgs/prompt_toolkit/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/prompt_toolkit/spkg-configure.m4
+
+diff --git a/build/pkgs/prompt_toolkit/spkg-configure.m4 b/build/pkgs/prompt_toolkit/spkg-configure.m4
+new file mode 100644
+index 00000000..fd8c1a6
+--- /dev/null
++++ b/build/pkgs/prompt_toolkit/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([prompt_toolkit], [
++  SAGE_PYTHON_PACKAGE_CHECK([prompt_toolkit])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0cd9283e8bb6c8ae413fc8f715c021f7ec3ca2c8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:12:10 -0500
+Subject: Trac #29665: add Gentoo package information for charset_normalizer.
+
+---
+ build/pkgs/charset_normalizer/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/charset_normalizer/distros/gentoo.txt
+
+diff --git a/build/pkgs/charset_normalizer/distros/gentoo.txt b/build/pkgs/charset_normalizer/distros/gentoo.txt
+new file mode 100644
+index 00000000..eefeb89
+--- /dev/null
++++ b/build/pkgs/charset_normalizer/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/charset_normalizer
+-- 
+cgit v1.0-1-gd88e
+
+
+From a04b01a9ab59097d189edcc5ddcb461faede83b2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:12:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ charset_normalizer.
+
+---
+ build/pkgs/charset_normalizer/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/charset_normalizer/spkg-configure.m4
+
+diff --git a/build/pkgs/charset_normalizer/spkg-configure.m4 b/build/pkgs/charset_normalizer/spkg-configure.m4
+new file mode 100644
+index 00000000..18b18cf
+--- /dev/null
++++ b/build/pkgs/charset_normalizer/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([charset_normalizer], [
++  SAGE_PYTHON_PACKAGE_CHECK([charset_normalizer])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d2ea08138711c53046f977b586f33b09b176b2e3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:13:37 -0500
+Subject: Trac #29665: add Gentoo package information for prometheus_client.
+
+---
+ build/pkgs/prometheus_client/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/prometheus_client/distros/gentoo.txt
+
+diff --git a/build/pkgs/prometheus_client/distros/gentoo.txt b/build/pkgs/prometheus_client/distros/gentoo.txt
+new file mode 100644
+index 00000000..aa2889c
+--- /dev/null
++++ b/build/pkgs/prometheus_client/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/prometheus_client
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b0393200e9edd3e26b8a55ba67e5710e7403fcb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:15:09 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for prometheus_client.
+
+---
+ build/pkgs/prometheus_client/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/prometheus_client/spkg-configure.m4
+
+diff --git a/build/pkgs/prometheus_client/spkg-configure.m4 b/build/pkgs/prometheus_client/spkg-configure.m4
+new file mode 100644
+index 00000000..b494588
+--- /dev/null
++++ b/build/pkgs/prometheus_client/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([prometheus_client], [
++  SAGE_PYTHON_PACKAGE_CHECK([prometheus_client])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From cdcd85284f43ca4ad18353ec3527b2901e57b788 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:17:23 -0500
+Subject: Trac #29665: add Gentoo package information for pybind11.
+
+---
+ build/pkgs/pybind11/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pybind11/distros/gentoo.txt
+
+diff --git a/build/pkgs/pybind11/distros/gentoo.txt b/build/pkgs/pybind11/distros/gentoo.txt
+new file mode 100644
+index 00000000..0c500b3
+--- /dev/null
++++ b/build/pkgs/pybind11/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pybind11
+-- 
+cgit v1.0-1-gd88e
+
+
+From efdd1eb64c4799fe3cdf2221824182941b3fda2d Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:17:51 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pybind11.
+
+---
+ build/pkgs/pybind11/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pybind11/spkg-configure.m4
+
+diff --git a/build/pkgs/pybind11/spkg-configure.m4 b/build/pkgs/pybind11/spkg-configure.m4
+new file mode 100644
+index 00000000..cce1cf5
+--- /dev/null
++++ b/build/pkgs/pybind11/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pybind11], [SAGE_PYTHON_PACKAGE_CHECK([pybind11])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b2128f33b68ea33927284116ea598dd186902400 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:19:23 -0500
+Subject: Trac #29665: add Gentoo package information for pkgconfig.
+
+---
+ build/pkgs/pkgconfig/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pkgconfig/distros/gentoo.txt
+
+diff --git a/build/pkgs/pkgconfig/distros/gentoo.txt b/build/pkgs/pkgconfig/distros/gentoo.txt
+new file mode 100644
+index 00000000..32e8618
+--- /dev/null
++++ b/build/pkgs/pkgconfig/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pkgconfig
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b373b49e06aadeb36dc57e500da9a322460e658 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:19:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pkgconfig.
+
+---
+ build/pkgs/pkgconfig/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pkgconfig/spkg-configure.m4
+
+diff --git a/build/pkgs/pkgconfig/spkg-configure.m4 b/build/pkgs/pkgconfig/spkg-configure.m4
+new file mode 100644
+index 00000000..6708293
+--- /dev/null
++++ b/build/pkgs/pkgconfig/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pkgconfig], [SAGE_PYTHON_PACKAGE_CHECK([pkgconfig])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ce578729eb0d14baab365351ba9a9ffffb7b79f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:21:10 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_serializinghtml.
+
+---
+ build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt b/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+new file mode 100644
+index 00000000..38bca8f
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-serializinghtml
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb0f42c32bbce0e4488678312f5e2d88c6f42c9b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:21:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_serializinghtml.
+
+---
+ build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4 b/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+new file mode 100644
+index 00000000..be8e625
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_serializinghtml], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_serializinghtml])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e47dcf985e40475de85c9436a85537751318bc3d Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:22:54 -0500
+Subject: Trac #29665: add Gentoo package information for sphinxcontrib_jsmath.
+
+---
+ build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt b/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+new file mode 100644
+index 00000000..041a471
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-jsmath
+-- 
+cgit v1.0-1-gd88e
+
+
+From 72cff6fd35f93de4fa855bc870569dd733ff5c24 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:23:49 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_jsmath.
+
+---
+ build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4 b/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+new file mode 100644
+index 00000000..e46bde2
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_jsmath], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_jsmath])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a36395d70f759449cd63c1b0990fbdcb4cb25ca0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:24:26 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_devhelp.
+
+---
+ build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..9b5c899
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-devhelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9953a5dd1646ed0ad51d2e3935cf609bc9e7fd1c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:25:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_devhelp.
+
+---
+ build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+new file mode 100644
+index 00000000..8728136
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_devhelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_devhelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b199d5363aad93f3cb23f7904c9553a28b06348f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:25:53 -0500
+Subject: Trac #29665: add Gentoo package information for sphinxcontrib_qthelp.
+
+---
+ build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..7210099
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-qthelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 94ac8806739f3938e73f5857328e91e0d42e98d2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:26:28 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_qthelp.
+
+---
+ build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+new file mode 100644
+index 00000000..81ea5e1
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_qthelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_qthelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From beedc154aa405e8a58aee8889f510db07adc89a7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:26:54 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_applehelp.
+
+---
+ build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..66ac8da
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-applehelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 07d47c3673d6b35423b71f621cb400989c0101c2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:27:19 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_applehelp.
+
+---
+ build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+new file mode 100644
+index 00000000..e834aed
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_applehelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_applehelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 333a66546c5d421735c49dbafd7370a827f22781 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:27:46 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_htmlhelp.
+
+---
+ build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..e080bac
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-htmlhelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From bfaeb3962254439b63f1f2e0e883de462c7831be Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:29:18 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_htmlhelp.
+
+---
+ build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+new file mode 100644
+index 00000000..c77b003
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_htmlhelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_htmlhelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 782cde13da06e8b85806cb7cbc8aceee0364e639 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:30:23 -0500
+Subject: Trac #29665: add Gentoo package information for jupyterlab_pygments.
+
+---
+ build/pkgs/jupyterlab_pygments/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyterlab_pygments/distros/gentoo.txt b/build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+new file mode 100644
+index 00000000..c57b4f1
+--- /dev/null
++++ b/build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyterlab_pygments
+-- 
+cgit v1.0-1-gd88e
+
+
+From 39f974cfa4a8c6e5dd897f152f83ec82f40ee9f7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:31:13 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ jupyterlab_pygments.
+
+---
+ build/pkgs/jupyterlab_pygments/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyterlab_pygments/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyterlab_pygments/spkg-configure.m4 b/build/pkgs/jupyterlab_pygments/spkg-configure.m4
+new file mode 100644
+index 00000000..e46e21f
+--- /dev/null
++++ b/build/pkgs/jupyterlab_pygments/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyterlab_pygments], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyterlab_pygments])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From db704620700fd36cec3bf6125938f3ee00a9eb5e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:29:15 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for ply.
+
+---
+ build/pkgs/ply/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ply/spkg-configure.m4
+
+diff --git a/build/pkgs/ply/spkg-configure.m4 b/build/pkgs/ply/spkg-configure.m4
+new file mode 100644
+index 00000000..ffb0030
+--- /dev/null
++++ b/build/pkgs/ply/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ply], [SAGE_PYTHON_PACKAGE_CHECK([ply])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6aac31dabcdfdef228d7780398a3fda1a4cc566f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:29:51 -0500
+Subject: Trac #29665: add Gentoo package information for ply.
+
+---
+ build/pkgs/ply/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ply/distros/gentoo.txt
+
+diff --git a/build/pkgs/ply/distros/gentoo.txt b/build/pkgs/ply/distros/gentoo.txt
+new file mode 100644
+index 00000000..c8b1630
+--- /dev/null
++++ b/build/pkgs/ply/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ply
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb8d3372936ec37470d69687a0f91592129460ae Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:30:33 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for gast.
+
+---
+ build/pkgs/gast/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/gast/spkg-configure.m4
+
+diff --git a/build/pkgs/gast/spkg-configure.m4 b/build/pkgs/gast/spkg-configure.m4
+new file mode 100644
+index 00000000..26ec59f
+--- /dev/null
++++ b/build/pkgs/gast/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([gast], [SAGE_PYTHON_PACKAGE_CHECK([gast])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1cdc4046a88f1c2b4e5c162f66c6db6090b24194 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:31:15 -0500
+Subject: Trac #29665: add Gentoo package information for gast.
+
+---
+ build/pkgs/gast/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/gast/distros/gentoo.txt
+
+diff --git a/build/pkgs/gast/distros/gentoo.txt b/build/pkgs/gast/distros/gentoo.txt
+new file mode 100644
+index 00000000..3be5e7e
+--- /dev/null
++++ b/build/pkgs/gast/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/gast
+-- 
+cgit v1.0-1-gd88e
+
+
+From 96068b8a3742b65d619190e1d9fa5db399e6b4f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:32:20 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pythran.
+
+---
+ build/pkgs/pythran/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pythran/spkg-configure.m4
+
+diff --git a/build/pkgs/pythran/spkg-configure.m4 b/build/pkgs/pythran/spkg-configure.m4
+new file mode 100644
+index 00000000..592e95b
+--- /dev/null
++++ b/build/pkgs/pythran/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pythran], [SAGE_PYTHON_PACKAGE_CHECK([pythran])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1fa0fad3ae8f7e559c6fc315c6773a7d8aac0bfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:32:55 -0500
+Subject: Trac #29665: add Gentoo package information for pythran.
+
+---
+ build/pkgs/pythran/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pythran/distros/gentoo.txt
+
+diff --git a/build/pkgs/pythran/distros/gentoo.txt b/build/pkgs/pythran/distros/gentoo.txt
+new file mode 100644
+index 00000000..1bb7cdc
+--- /dev/null
++++ b/build/pkgs/pythran/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pythran
+-- 
+cgit v1.0-1-gd88e
+
+
+From d26370e5b8c88e76abfb7c27e3defb71c9e9f711 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:33:50 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for beniget.
+
+---
+ build/pkgs/beniget/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/beniget/spkg-configure.m4
+
+diff --git a/build/pkgs/beniget/spkg-configure.m4 b/build/pkgs/beniget/spkg-configure.m4
+new file mode 100644
+index 00000000..8ae6101
+--- /dev/null
++++ b/build/pkgs/beniget/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([beniget], [SAGE_PYTHON_PACKAGE_CHECK([beniget])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From eeeb296ed9b9694a865534103fd58e62a151ef5e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:34:22 -0500
+Subject: Trac #29665: add Gentoo package information for beniget.
+
+---
+ build/pkgs/beniget/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/beniget/distros/gentoo.txt
+
+diff --git a/build/pkgs/beniget/distros/gentoo.txt b/build/pkgs/beniget/distros/gentoo.txt
+new file mode 100644
+index 00000000..1a5972c
+--- /dev/null
++++ b/build/pkgs/beniget/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/beniget
+-- 
+cgit v1.0-1-gd88e
+
+
+From 078b2ff272d0eeff5cce40ad7eb176d9ddd7bdff Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:35:37 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for alabaster.
+
+---
+ build/pkgs/alabaster/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/alabaster/spkg-configure.m4
+
+diff --git a/build/pkgs/alabaster/spkg-configure.m4 b/build/pkgs/alabaster/spkg-configure.m4
+new file mode 100644
+index 00000000..4eca6e0
+--- /dev/null
++++ b/build/pkgs/alabaster/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([alabaster], [SAGE_PYTHON_PACKAGE_CHECK([alabaster])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7dc264353e5f64110431ff28c1b8b7e89699e9bd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:36:06 -0500
+Subject: Trac #29665: add Gentoo package information for alabaster.
+
+---
+ build/pkgs/alabaster/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/alabaster/distros/gentoo.txt
+
+diff --git a/build/pkgs/alabaster/distros/gentoo.txt b/build/pkgs/alabaster/distros/gentoo.txt
+new file mode 100644
+index 00000000..cffece6
+--- /dev/null
++++ b/build/pkgs/alabaster/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/alabaster
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8011a5e675e7e61a77ce34a299ee961a9f44253f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:43:59 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ importlib_metadata.
+
+---
+ build/pkgs/importlib_metadata/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/importlib_metadata/spkg-configure.m4
+
+diff --git a/build/pkgs/importlib_metadata/spkg-configure.m4 b/build/pkgs/importlib_metadata/spkg-configure.m4
+new file mode 100644
+index 00000000..0554e52
+--- /dev/null
++++ b/build/pkgs/importlib_metadata/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([importlib_metadata], [
++  SAGE_PYTHON_PACKAGE_CHECK([importlib_metadata])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 928ca0019e3ec6c4541a16b28bcc6710df6d010b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:44:28 -0500
+Subject: Trac #29665: add Gentoo package information for importlib_metadata.
+
+---
+ build/pkgs/importlib_metadata/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/importlib_metadata/distros/gentoo.txt
+
+diff --git a/build/pkgs/importlib_metadata/distros/gentoo.txt b/build/pkgs/importlib_metadata/distros/gentoo.txt
+new file mode 100644
+index 00000000..4f92786
+--- /dev/null
++++ b/build/pkgs/importlib_metadata/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/importlib_metadata
+-- 
+cgit v1.0-1-gd88e
+
+
+From 135f184f7498a2046065e669723e68efe2d65cee Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 21:16:58 -0500
+Subject: Trac #29665: fix sage.misc.package doctest with system alabaster.
+
+When alabaster from the system is used, these tests won't be able to
+find its SPKG installed. Add some ellipses, and switch one test to
+look for sage_conf instead.
+---
+ src/sage/misc/package.py | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/sage/misc/package.py b/src/sage/misc/package.py
+index 84f3d50..c7ad206 100644
+--- a/src/sage/misc/package.py
++++ b/src/sage/misc/package.py
+@@ -386,9 +386,9 @@ def installed_packages(exclude_pip=True):
+     EXAMPLES::
+ 
+         sage: sorted(installed_packages().keys())  # optional - build
+-        [...'gmpy2', ...'sage_conf', ...]
+-        sage: installed_packages()['gmpy2']  # optional - build, random
+-        '2.1.0b5'
++        [...'sage_conf', ...]
++        sage: installed_packages()['sage_conf']  # optional - build, random
++        '9.5'
+ 
+     .. SEEALSO::
+ 
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/trac-32867-system_maxima-ed39aba734cb4ded0b04165fa142b5cf4c38fd23.patch b/srcpkgs/sagemath/patches/trac-32867-system_maxima-ed39aba734cb4ded0b04165fa142b5cf4c38fd23.patch
new file mode 100644
index 000000000000..8edbde0ce76f
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-32867-system_maxima-ed39aba734cb4ded0b04165fa142b5cf4c38fd23.patch
@@ -0,0 +1,247 @@
+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
+ 
+-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 fbce694..b40cda6 100644
+--- a/pkgs/sage-conf/sage_conf.py.in
++++ b/pkgs/sage-conf/sage_conf.py.in
+@@ -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.
+ MAXIMA_FAS = "@SAGE_MAXIMA_FAS@".replace('${prefix}', SAGE_LOCAL)
+ 
+diff --git a/src/bin/sage b/src/bin/sage
+index fcd2630..54b69a1 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/sage/env.py b/src/sage/env.py
+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"))
+ 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 fc7f48b..7313c7d 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 917059d..c966a3c 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')
+-- 
+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/patches/trac-33047-musl_fix_find_library-dc1a0e8168a9ffb4fbf07dd03c0846b4933a6dbe.patch b/srcpkgs/sagemath/patches/trac-33047-musl_fix_find_library-dc1a0e8168a9ffb4fbf07dd03c0846b4933a6dbe.patch
new file mode 100644
index 000000000000..3d4f4e14bb7b
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33047-musl_fix_find_library-dc1a0e8168a9ffb4fbf07dd03c0846b4933a6dbe.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: Add a patch that fixes ctypes.util.find_library('c')
+
+The issue causes a failure doctesting src/sage/misc/gperftools.py
+---
+ 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 00000000..82f436b
+--- /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):
+-- 
+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-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch b/srcpkgs/sagemath/patches/trac-33064-sage_docbuild_ignore_cache_save_permission_error-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
new file mode 100644
index 000000000000..04f04cfd6718
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33064-sage_docbuild_ignore_cache_save_permission_error-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
@@ -0,0 +1,32 @@
+From e89193f4f32246ad9ded6d37f1f2f12a589a81f4 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 466ca82..f8c8ebd 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/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch b/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
new file mode 100644
index 000000000000..04fca4815a00
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
@@ -0,0 +1,131 @@
+From 18d0477153af6f453a0e84f78030535f6a36ce87 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 c788623..527ed90 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 - sagemath_doc_html
+-        sage: thematic_index = os.path.join(SAGE_DOC, "html", "en", "thematic_tutorials", "index.html")  # optional - sagemath_doc_html
++        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 - sagemath_doc_html
+         ....:     if "padics" in line:
+         ....:         _ = sys.stdout.write(line)
+diff --git a/src/sage/misc/sagedoc.py b/src/sage/misc/sagedoc.py
+index 4c56aea..583ca06 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 - sagemath_doc_html
+-    sage: docfilename = os.path.join(SAGE_DOC, 'html', 'en', 'reference', 'calculus', 'sage', 'symbolic', 'expression.html')  # optional - sagemath_doc_html
++    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 - sagemath_doc_html
+     ....:     for line in fobj:
+     ....:         if "#sage.symbolic.expression.Expression.numerical_approx" in line:
+@@ -845,12 +845,12 @@ def _search_src_or_doc(what, string, extra1='', extra2='', extra3='',
+ 
+     ::
+ 
+-        sage: from sage.misc.sagedoc import _search_src_or_doc  # optional - sagemath_doc_html
+-        sage: len(_search_src_or_doc('src', r'matrix\(', 'incidence_structures', 'self', 'combinat', interact=False).splitlines()) > 1  # optional - sagemath_doc_html
++        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 - sagemath_doc_html, long time (4s on sage.math, 2012)
+         True
+-        sage: 'divisors' in _search_src_or_doc('src', '^ *def prime', interact=False)  # optional - sagemath_doc_html
++        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
+@@ -1369,7 +1369,7 @@ class _sage_doc:
+ 
+         sage: browse_sage_doc._open("reference", testing=True)[0]  # optional - sagemath_doc_html, indirect doctest
+         'http://localhost:8000/doc/live/reference/index.html'
+-        sage: browse_sage_doc(identity_matrix, 'rst')[-107:-47]  # optional - sagemath_doc_html
++        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 88dd9f3a1611fed0cc66fb838eb85739646dd34d 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 f8c8ebd..d329009 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 - sagemath_doc_html
+         ....:     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 - sagemath_doc_html
+             '.../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 - sagemath_doc_html
+             '.../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 - sagemath_doc_html
+             '.../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 - sagemath_doc_html
+             '.../html/en/reference'
+         """
+         if lang is None:
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch b/srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
new file mode 100644
index 000000000000..7fdb3d697222
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.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: 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 4c0fa17..153e610 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
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch b/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
new file mode 100644
index 000000000000..350c41ac3928
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
@@ -0,0 +1,35 @@
+From 53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6 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: sagetex: Fix a warning when byte-compiling sagetexparse.py
+
+---
+ build/pkgs/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 00000000..d82ab67
+--- /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'
++ 
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/trac-33189-fix_doctests_for_arb_2.22-53532ddd4e2dc92469c1590ebf0c40f8f69bf579.patch b/srcpkgs/sagemath/patches/trac-33189-fix_doctests_for_arb_2.22-53532ddd4e2dc92469c1590ebf0c40f8f69bf579.patch
new file mode 100644
index 000000000000..b861af7ec982
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33189-fix_doctests_for_arb_2.22-53532ddd4e2dc92469c1590ebf0c40f8f69bf579.patch
@@ -0,0 +1,126 @@
+From 24cc94b1988a90f3bd22a2368ec30c086283af13 Mon Sep 17 00:00:00 2001
+From: Antonio Rojas <arojas@archlinux.org>
+Date: Sun, 16 Jan 2022 11:55:04 +0100
+Subject: Add abs tol to some arb tests
+
+---
+ src/sage/functions/error.py    |  2 +-
+ src/sage/rings/complex_arb.pyx |  6 +++---
+ src/sage/rings/real_arb.pyx    | 10 +++++-----
+ 3 files changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/src/sage/functions/error.py b/src/sage/functions/error.py
+index f48d04f..06f0b24 100644
+--- a/src/sage/functions/error.py
++++ b/src/sage/functions/error.py
+@@ -267,7 +267,7 @@ class Function_erf(BuiltinFunction):
+ 
+         Check that real ball evaluation is fixed :trac:`28061`::
+ 
+-            sage: RealBallField(128)(erf(5))
++            sage: RealBallField(128)(erf(5)) # abs tol 1e-38
+             [0.99999999999846254020557196514981165651 +/- 7.33e-39]
+         """
+         R = parent or s_parent(x)
+diff --git a/src/sage/rings/complex_arb.pyx b/src/sage/rings/complex_arb.pyx
+index f986970..93ff565 100644
+--- a/src/sage/rings/complex_arb.pyx
++++ b/src/sage/rings/complex_arb.pyx
+@@ -3974,8 +3974,8 @@ cdef class ComplexBall(RingElement):
+ 
+         EXAMPLES::
+ 
+-            sage: CBF(20).erfc()
+-            [5.39586561160790e-176 +/- ...e-191]
++            sage: CBF(20).erfc() # abs tol 1e-190
++            [5.39586561160790e-176 +/- 6.73e-191]
+             sage: CBF(100, 100).erfc()
+             [0.00065234366376858 +/- ...e-18] + [-0.00393572636292141 +/- ...e-18]*I
+         """
+@@ -4280,7 +4280,7 @@ cdef class ComplexBall(RingElement):
+ 
+         TESTS:
+ 
+-            sage: CBF(Shi(I))
++            sage: CBF(Shi(I)) # abs tol 1e-15
+             [0.946083070367183 +/- 9.22e-16]*I
+         """
+         cdef ComplexBall result = self._new()
+diff --git a/src/sage/rings/real_arb.pyx b/src/sage/rings/real_arb.pyx
+index 4a81784..292bfea 100644
+--- a/src/sage/rings/real_arb.pyx
++++ b/src/sage/rings/real_arb.pyx
+@@ -3506,7 +3506,7 @@ cdef class RealBall(RingElement):
+ 
+         EXAMPLES::
+ 
+-            sage: RBF(1/2).erf()
++            sage: RBF(1/2).erf() # abs tol 1e-16
+             [0.520499877813047 +/- 6.10e-16]
+         """
+         cdef RealBall res = self._new()
+@@ -3556,12 +3556,12 @@ cdef class RealBall(RingElement):
+ 
+         EXAMPLES::
+ 
+-            sage: RBF(1).Si()
++            sage: RBF(1).Si() # abs tol 1e-15
+             [0.946083070367183 +/- 9.22e-16]
+ 
+         TESTS::
+ 
+-            sage: RBF(Si(1))
++            sage: RBF(Si(1)) # abs tol 1e-15
+             [0.946083070367183 +/- 9.22e-16]
+         """
+         cdef RealBall res = self._new()
+@@ -3578,12 +3578,12 @@ cdef class RealBall(RingElement):
+ 
+         EXAMPLES::
+ 
+-            sage: RBF(1).Ci()  # abs tol 1e-16
++            sage: RBF(1).Ci()  # abs tol 1e-15
+             [0.337403922900968 +/- 3.25e-16]
+ 
+         TESTS::
+ 
+-            sage: RBF(Ci(1))  # abs tol 1e-16
++            sage: RBF(Ci(1))  # abs tol 1e-15
+             [0.337403922900968 +/- 3.25e-16]
+         """
+         cdef RealBall res = self._new()
+-- 
+cgit v1.0-1-gd88e
+
+
+From 53532ddd4e2dc92469c1590ebf0c40f8f69bf579 Mon Sep 17 00:00:00 2001
+From: Antonio Rojas <arojas@archlinux.org>
+Date: Sun, 16 Jan 2022 14:16:53 +0100
+Subject: Decrease abs tol
+
+---
+ src/sage/rings/real_arb.pyx | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/sage/rings/real_arb.pyx b/src/sage/rings/real_arb.pyx
+index 292bfea..eb30f7f 100644
+--- a/src/sage/rings/real_arb.pyx
++++ b/src/sage/rings/real_arb.pyx
+@@ -3578,12 +3578,12 @@ cdef class RealBall(RingElement):
+ 
+         EXAMPLES::
+ 
+-            sage: RBF(1).Ci()  # abs tol 1e-15
++            sage: RBF(1).Ci()  # abs tol 5e-16
+             [0.337403922900968 +/- 3.25e-16]
+ 
+         TESTS::
+ 
+-            sage: RBF(Ci(1))  # abs tol 1e-15
++            sage: RBF(Ci(1))  # abs tol 5e-16
+             [0.337403922900968 +/- 3.25e-16]
+         """
+         cdef RealBall res = self._new()
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch b/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
new file mode 100644
index 000000000000..7ef3826aa4d2
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
@@ -0,0 +1,27 @@
+diff --git a/src/bin/sage-runtests b/src/bin/sage-runtests
+index 589dc8cd37..6bb8bf99a4 100755
+--- a/src/bin/sage-runtests
++++ b/src/bin/sage-runtests
+@@ -154,21 +154,4 @@ if __name__ == "__main__":
+     DC = DocTestController(args, args.filenames)
+     err = DC.run()
+ 
+-    try:
+-        exit_code_pytest = 0
+-        import pytest
+-        pytest_options = ["--import-mode", "importlib"]
+-        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.")
+-
+-    if err == 0:
+-        sys.exit(exit_code_pytest)
+-    else:
+-        sys.exit(err)
++    sys.exit(err)
diff --git a/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch b/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
new file mode 100644
index 000000000000..ca360dee9f6e
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage/matrix/matrix2.pyx b/src/sage/matrix/matrix2.pyx
+index 7d319bd54b..c1a2eed6f1 100644
+--- a/src/sage/matrix/matrix2.pyx
++++ b/src/sage/matrix/matrix2.pyx
+@@ -17215,7 +17215,7 @@ cdef class Matrix(Matrix1):
+ 
+             sage: set_random_seed()
+             sage: K = random_cone(max_ambient_dim=5)
+-            sage: all(L.change_ring(SR).is_Z_operator_on(K)
++            sage: all(L.change_ring(SR).is_Z_operator_on(K) # long time
+             ....:     for L in K.Z_operators_gens())  # long time
+             True
+ 
diff --git a/srcpkgs/sagemath/patches/zzz-fix_no_SAGE_BIN.patch b/srcpkgs/sagemath/patches/zzz-fix_no_SAGE_BIN.patch
new file mode 100644
index 000000000000..ac80085bd6b4
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fix_no_SAGE_BIN.patch
@@ -0,0 +1,12 @@
+--- a/src/sage/misc/dist.py
++++ b/src/sage/misc/dist.py
+@@ -108,7 +108,8 @@ def install_scripts(directory=None, ignore_existing=False):
+     PATH = os.environ['PATH'].split(os.pathsep)
+     PATH = [d for d in PATH if os.path.exists(d)]
+     dir_in_path = any(os.path.samefile(directory, d) for d in PATH)
+-    PATH = os.pathsep.join(d for d in PATH
++    if os.path.exists(SAGE_BIN):
++        PATH = os.pathsep.join(d for d in PATH
+                            if not os.path.samefile(d, SAGE_BIN))
+     for cmd in ['gap', 'gp', 'hg', 'ipython', 'maxima',
+                 'mwrank', 'R', 'singular', 'sqlite3', 'M2', 'kash']:
diff --git a/srcpkgs/sagemath/patches/zzz-fix_no_venv_packages.patch b/srcpkgs/sagemath/patches/zzz-fix_no_venv_packages.patch
new file mode 100644
index 000000000000..7b19169a91d9
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fix_no_venv_packages.patch
@@ -0,0 +1,13 @@
+diff --git a/build/make/Makefile.in b/build/make/Makefile.in
+index 0baddba4ae..be363bea71 100644
+--- a/build/make/Makefile.in
++++ b/build/make/Makefile.in
+@@ -624,7 +624,7 @@ $(1)-$(4)-no-deps:
+ 		SAGE_SPKG_WHEELS=$$($(4))/var/lib/sage/wheels \
+ 		SAGE_INST_LOCAL=$$($(4)) \
+ 		sage-logger -p '$$(SAGE_ROOT)/build/pkgs/$(1)/spkg-install' '$$(SAGE_LOGS)/$(1)-$(2).log' && \
+-	    touch "$$($(4))/$(SPKG_INST_RELDIR)/$(1)-$(2)"; \
++	    mkdir -p "$$($(4))/$(SPKG_INST_RELDIR)" && touch "$$($(4))/$(SPKG_INST_RELDIR)/$(1)-$(2)"; \
+ 	else \
+ 	    echo; \
+ 	    echo "Error: $(1) is a dummy script package that the Sage distribution uses"; \
diff --git a/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch b/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
new file mode 100644
index 000000000000..741d2b23a7f5
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
@@ -0,0 +1,96 @@
+From 346b4ea4c92f4287d3c097b92817cf2abfcddd8c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Thu, 13 Jan 2022 01:41:31 -0300
+Subject: [PATCH] gap: fixes for using system gap
+
+ - fix _get_shared_lib_path() so we don't need to configure GAP_SO
+ - fix gap_root() so we don't need to configure GAP_ROOT_DIR
+ - skip a useless test that cannot succeed on system gap
+ - use gap_root() in saved_workspace.py instead of GAP_ROOT_DIR
+---
+ src/sage/env.py                      |  2 +-
+ src/sage/libs/gap/saved_workspace.py |  4 ++--
+ src/sage/libs/gap/util.pyx           | 11 +++++++++++
+ src/sage_setup/optional_extension.py |  2 +-
+ 4 files changed, 15 insertions(+), 4 deletions(-)
+
+diff --git a/src/sage/env.py b/src/sage/env.py
+index c4953cfa65..c16696d298 100644
+--- a/src/sage/env.py
++++ b/src/sage/env.py
+@@ -293,7 +293,7 @@ def _get_shared_lib_path(*libnames: str) -> Optional[str]:
+             if sys.platform == 'darwin':
+                 ext = 'dylib'
+             else:
+-                ext = 'so'
++                ext = 'so*'
+ 
+             if SAGE_LOCAL:
+                 search_directories.append(Path(SAGE_LOCAL) / 'lib')
+diff --git a/src/sage/libs/gap/saved_workspace.py b/src/sage/libs/gap/saved_workspace.py
+index ad5adec36d..59c498795f 100644
+--- a/src/sage/libs/gap/saved_workspace.py
++++ b/src/sage/libs/gap/saved_workspace.py
+@@ -8,7 +8,7 @@ workspaces.
+ 
+ import os
+ import glob
+-from sage.env import GAP_ROOT_DIR
++from sage.libs.gap.util import gap_root
+ from sage.interfaces.gap_workspace import gap_workspace_file
+ 
+ 
+@@ -31,7 +31,7 @@ def timestamp():
+     """
+     libgap_dir = os.path.dirname(__file__)
+     libgap_files = glob.glob(os.path.join(libgap_dir, '*'))
+-    gap_packages = glob.glob(os.path.join(GAP_ROOT_DIR, 'pkg', '*'))
++    gap_packages = glob.glob(os.path.join(gap_root(), 'pkg', '*'))
+     files = libgap_files + gap_packages
+     if len(files) == 0:
+         print('Unable to find LibGAP files.')
+diff --git a/src/sage/libs/gap/util.pyx b/src/sage/libs/gap/util.pyx
+index 08c4c40cc0..c7dd557c35 100644
+--- a/src/sage/libs/gap/util.pyx
++++ b/src/sage/libs/gap/util.pyx
+@@ -23,6 +23,7 @@ from cysignals.signals cimport sig_on, sig_off
+ import os
+ import warnings
+ import sage.env
++import subprocess
+ 
+ from .gap_includes cimport *
+ from .element cimport *
+@@ -178,6 +179,16 @@ def gap_root():
+     if os.path.exists(sage.env.GAP_ROOT_DIR):
+         return sage.env.GAP_ROOT_DIR
+ 
++    gap_expr = 'JoinStringsWithSeparator(KERNEL_INFO().GAP_ROOT_PATHS,";")'
++    gap_root_paths = subprocess.getoutput(
++        f"gap -r -q --bare --nointeract -c 'Display({gap_expr});'"
++        ).strip().split(';')
++
++    for gapdir in gap_root_paths:
++        if os.path.exists(os.path.join(gapdir, 'sysinfo.gap')):
++            sage.env.GAP_ROOT_DIR = gapdir
++            return gapdir
++
+     # Attempt to figure out the appropriate GAP_ROOT by reading the
+     # local/bin/gap shell script; this is an ugly hack that exists for
+     # historical reasons; the best approach to setting where Sage looks for
+diff --git a/src/sage_setup/optional_extension.py b/src/sage_setup/optional_extension.py
+index f252849384..4034e3e196 100644
+--- a/src/sage_setup/optional_extension.py
++++ b/src/sage_setup/optional_extension.py
+@@ -80,7 +80,7 @@ def OptionalExtension(*args, **kwds):
+         sage: print(ext.__class__.__name__)
+         CythonizeExtension
+         sage: ext = OptionalExtension("foo", ["foo.c"], package="gap")
+-        sage: print(ext.__class__.__name__)
++        sage: print(ext.__class__.__name__)     # not tested - fails with system gap
+         Extension
+     """
+     try:
+-- 
+2.34.1
+
diff --git a/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch b/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
new file mode 100644
index 000000000000..093e3d56eb33
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
@@ -0,0 +1,42 @@
+More site packages not included in trac 29665
+
+diff --git a/build/pkgs/gmpy2/spkg-configure.m4 b/build/pkgs/gmpy2/spkg-configure.m4
+new file mode 100644
+index 0000000000..2d0390f7db
+--- /dev/null
++++ b/build/pkgs/gmpy2/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([gmpy2], [SAGE_PYTHON_PACKAGE_CHECK([gmpy2])])
+diff --git a/build/pkgs/sphinx/spkg-configure.m4 b/build/pkgs/sphinx/spkg-configure.m4
+new file mode 100644
+index 0000000000..e149fbb2cf
+--- /dev/null
++++ b/build/pkgs/sphinx/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([sphinx], [SAGE_PYTHON_PACKAGE_CHECK([sphinx])])
+diff --git a/build/pkgs/typing_extensions/spkg-configure.m4 b/build/pkgs/typing_extensions/spkg-configure.m4
+new file mode 100644
+index 0000000000..d475fd8257
+--- /dev/null
++++ b/build/pkgs/typing_extensions/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([typing_extensions], [SAGE_PYTHON_PACKAGE_CHECK([typing_extensions])])
+-- 
+diff --git a/build/pkgs/gmpy2/install-requires.txt b/build/pkgs/gmpy2/install-requires.txt
+index 51d24518ef..c25feff557 100644
+--- a/build/pkgs/gmpy2/install-requires.txt
++++ b/build/pkgs/gmpy2/install-requires.txt
+@@ -1,3 +1 @@
+-# We would like to write gmpy2 >=2.1.0b5, but pipenv does not accept prereleases in version ranges
+-# https://github.com/pypa/pipenv/issues/1760
+-gmpy2 ==2.1.0rc1
++gmpy2 >=2.1
+diff --git a/build/pkgs/ptyprocess/install-requires.txt b/build/pkgs/ptyprocess/install-requires.txt
+index de89260872..7c336f636c 100644
+--- a/build/pkgs/ptyprocess/install-requires.txt
++++ b/build/pkgs/ptyprocess/install-requires.txt
+@@ -1,3 +1,3 @@
+-ptyprocess ==0.5.1
++ptyprocess
+ # https://trac.sagemath.org/ticket/31280#comment:42 and following
+ # sagelib is not compatible with ptyprocess 0.5.2, 0.6, and 0.7
diff --git a/srcpkgs/sagemath/patches/zzz-remove_ratpoints.patch b/srcpkgs/sagemath/patches/zzz-remove_ratpoints.patch
new file mode 100644
index 000000000000..0842d9d7f6d5
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-remove_ratpoints.patch
@@ -0,0 +1,887 @@
+From 3178a5e1e4f7174343fd913494ae255b3e05fb85 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Mon, 17 Jan 2022 21:04:42 -0300
+Subject: [PATCH] ratpoints: remove deprecated package
+
+---
+ .github/workflows/ci-cygwin-minimal.yml       |   2 +-
+ .github/workflows/ci-cygwin-standard.yml      |   2 +-
+ COPYING.txt                                   |   1 -
+ build/pkgs/ratpoints/SPKG.rst                 |  29 --
+ build/pkgs/ratpoints/checksums.ini            |   4 -
+ build/pkgs/ratpoints/dependencies             |   5 -
+ build/pkgs/ratpoints/distros/arch.txt         |   1 -
+ build/pkgs/ratpoints/distros/conda.txt        |   1 -
+ build/pkgs/ratpoints/distros/debian.txt       |   1 -
+ build/pkgs/ratpoints/distros/nix.txt          |   1 -
+ build/pkgs/ratpoints/distros/repology.txt     |   1 -
+ build/pkgs/ratpoints/package-version.txt      |   1 -
+ build/pkgs/ratpoints/patches/Makefile.patch   |  37 ---
+ .../patches/sturm_and_rp_private.patch        | 194 ------------
+ build/pkgs/ratpoints/spkg-install.in          |  46 ---
+ build/pkgs/ratpoints/type                     |   1 -
+ build/pkgs/sagelib/dependencies               |   2 +-
+ src/sage/libs/ratpoints.pxd                   |  74 -----
+ src/sage/libs/ratpoints.pyx                   | 283 ------------------
+ .../elliptic_curves/descent_two_isogeny.pyx   |   2 -
+ src/sage_setup/library_order.py               |   2 +-
+ 21 files changed, 4 insertions(+), 686 deletions(-)
+ delete mode 100644 build/pkgs/ratpoints/SPKG.rst
+ delete mode 100644 build/pkgs/ratpoints/checksums.ini
+ delete mode 100644 build/pkgs/ratpoints/dependencies
+ delete mode 100644 build/pkgs/ratpoints/distros/arch.txt
+ delete mode 100644 build/pkgs/ratpoints/distros/conda.txt
+ delete mode 100644 build/pkgs/ratpoints/distros/debian.txt
+ delete mode 100644 build/pkgs/ratpoints/distros/nix.txt
+ delete mode 100644 build/pkgs/ratpoints/distros/repology.txt
+ delete mode 100644 build/pkgs/ratpoints/package-version.txt
+ delete mode 100644 build/pkgs/ratpoints/patches/Makefile.patch
+ delete mode 100644 build/pkgs/ratpoints/patches/sturm_and_rp_private.patch
+ delete mode 100644 build/pkgs/ratpoints/spkg-install.in
+ delete mode 100644 build/pkgs/ratpoints/type
+ delete mode 100644 src/sage/libs/ratpoints.pxd
+ delete mode 100644 src/sage/libs/ratpoints.pyx
+
+diff --git a/.github/workflows/ci-cygwin-minimal.yml b/.github/workflows/ci-cygwin-minimal.yml
+index 9e847e7474..9df1365657 100644
+--- a/.github/workflows/ci-cygwin-minimal.yml
++++ b/.github/workflows/ci-cygwin-minimal.yml
+@@ -217,7 +217,7 @@ jobs:
+     env:
+       STAGE: ii-b
+       PREVIOUS_STAGES: i-*
+-      TARGETS: singular maxima gap pari gfan palp flintqs ratpoints arb ecm givaro
++      TARGETS: singular maxima gap pari gfan palp flintqs arb ecm givaro
+       LOCAL_ARTIFACT_NAME: sage-local-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
+       LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
+ 
+diff --git a/.github/workflows/ci-cygwin-standard.yml b/.github/workflows/ci-cygwin-standard.yml
+index cbbe0f46a8..8aee1c2c3c 100644
+--- a/.github/workflows/ci-cygwin-standard.yml
++++ b/.github/workflows/ci-cygwin-standard.yml
+@@ -217,7 +217,7 @@ jobs:
+     env:
+       STAGE: ii-b
+       PREVIOUS_STAGES: i-*
+-      TARGETS: singular maxima gap pari gfan palp flintqs ratpoints arb ecm givaro
++      TARGETS: singular maxima gap pari gfan palp flintqs arb ecm givaro
+       LOCAL_ARTIFACT_NAME: sage-local-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
+       LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
+ 
+diff --git a/COPYING.txt b/COPYING.txt
+index 1176a856a0..a3e9cc6645 100644
+--- a/COPYING.txt
++++ b/COPYING.txt
+@@ -107,7 +107,6 @@ pynac                       GPLv2+
+ pyparsing                   MIT License
+ python                      Python License (see below)
+ R                           GPLv2+
+-ratpoints                   GPLv2+
+ readline                    GPLv3+
+ rpy                         GPLv2+
+ rubiks/dietz                GPL, any version
+diff --git a/build/pkgs/ratpoints/SPKG.rst b/build/pkgs/ratpoints/SPKG.rst
+deleted file mode 100644
+index 6607094bec..0000000000
+--- a/build/pkgs/ratpoints/SPKG.rst
++++ /dev/null
+@@ -1,29 +0,0 @@
+-ratpoints: Find rational points on hyperelliptic curves
+-=======================================================
+-
+-Description
+------------
+-
+-Michael Stoll's program which searches for rational points on
+-hyperelliptic curves.
+-
+-NOTE: the ratpoints package has been assimilated by PARI/GP. Therefore,
+-this package (as Sage package) is deprecated. In the future, it will be
+-removed from Sage.
+-
+-
+-Upstream Contact
+-----------------
+-
+--  Author: Michael Stoll
+--  Email: Michael.Stoll@uni-bayreuth.de
+--  Website: http://www.mathe2.uni-bayreuth.de/stoll/programs/
+-
+-
+-Note on SSE2 instructions
+-~~~~~~~~~~~~~~~~~~~~~~~~~
+-
+--  On several architectures, the SSE2 instructions used by ratpoints
+-   cause
+-   compiler errors. In the case that ratpoints fails to build with SSE2
+-   instructions enabled, the build is repeated with SSE2 disabled.
+diff --git a/build/pkgs/ratpoints/checksums.ini b/build/pkgs/ratpoints/checksums.ini
+deleted file mode 100644
+index 46ba1c9ec1..0000000000
+--- a/build/pkgs/ratpoints/checksums.ini
++++ /dev/null
+@@ -1,4 +0,0 @@
+-tarball=ratpoints-VERSION.tar.bz2
+-sha1=14fbc3dd50742794e0b33d2dd1217e5dd8ad2623
+-md5=9bf091d1b90132433f0a1fc6b585d024
+-cksum=670991933
+diff --git a/build/pkgs/ratpoints/dependencies b/build/pkgs/ratpoints/dependencies
+deleted file mode 100644
+index 9a77ea16f7..0000000000
+--- a/build/pkgs/ratpoints/dependencies
++++ /dev/null
+@@ -1,5 +0,0 @@
+-$(MP_LIBRARY)
+-
+-----------
+-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/ratpoints/distros/arch.txt b/build/pkgs/ratpoints/distros/arch.txt
+deleted file mode 100644
+index e137758627..0000000000
+--- a/build/pkgs/ratpoints/distros/arch.txt
++++ /dev/null
+@@ -1 +0,0 @@
+-ratpoints
+diff --git a/build/pkgs/ratpoints/distros/conda.txt b/build/pkgs/ratpoints/distros/conda.txt
+deleted file mode 100644
+index e137758627..0000000000
+--- a/build/pkgs/ratpoints/distros/conda.txt
++++ /dev/null
+@@ -1 +0,0 @@
+-ratpoints
+diff --git a/build/pkgs/ratpoints/distros/debian.txt b/build/pkgs/ratpoints/distros/debian.txt
+deleted file mode 100644
+index dabd28d624..0000000000
+--- a/build/pkgs/ratpoints/distros/debian.txt
++++ /dev/null
+@@ -1 +0,0 @@
+-libratpoints-dev
+diff --git a/build/pkgs/ratpoints/distros/nix.txt b/build/pkgs/ratpoints/distros/nix.txt
+deleted file mode 100644
+index e137758627..0000000000
+--- a/build/pkgs/ratpoints/distros/nix.txt
++++ /dev/null
+@@ -1 +0,0 @@
+-ratpoints
+diff --git a/build/pkgs/ratpoints/distros/repology.txt b/build/pkgs/ratpoints/distros/repology.txt
+deleted file mode 100644
+index e137758627..0000000000
+--- a/build/pkgs/ratpoints/distros/repology.txt
++++ /dev/null
+@@ -1 +0,0 @@
+-ratpoints
+diff --git a/build/pkgs/ratpoints/package-version.txt b/build/pkgs/ratpoints/package-version.txt
+deleted file mode 100644
+index efed46a7bd..0000000000
+--- a/build/pkgs/ratpoints/package-version.txt
++++ /dev/null
+@@ -1 +0,0 @@
+-2.1.3.p5
+diff --git a/build/pkgs/ratpoints/patches/Makefile.patch b/build/pkgs/ratpoints/patches/Makefile.patch
+deleted file mode 100644
+index 093d7c0018..0000000000
+--- a/build/pkgs/ratpoints/patches/Makefile.patch
++++ /dev/null
+@@ -1,37 +0,0 @@
+---- src/Makefile	2009-10-01 01:08:54.000000000 +0200
+-+++ patches/Makefile	2012-03-17 13:57:33.026315142 +0100
+-@@ -21,11 +21,11 @@
+- #
+- #    Michael Stoll, September 21, 2009
+- 
+--CC = gcc
+-+CC ?= gcc
+- RM = rm -f
+- INSTALL = cp
+- 
+--INSTALL_DIR = /usr/local
+-+INSTALL_DIR ?= /usr/local
+- 
+- DISTFILES = Makefile ratpoints.h rp-private.h primes.h \
+-             gen_find_points_h.c gen_init_sieve_h.c \
+-@@ -47,14 +47,14 @@
+- 	diff -q testbase rptest.out
+- 
+- install-bin: ratpoints
+--	${INSTALL} ratpoints ${INSTALL_DIR}/bin/
+--	chmod 755 ${INSTALL_DIR}/bin/ratpoints
+-+	${INSTALL} ratpoints "${INSTALL_DIR}/bin/"
+-+	chmod 755 "${INSTALL_DIR}/bin/ratpoints"
+- 
+- install-lib: ratpoints.h libratpoints.a
+--	${INSTALL} ratpoints.h ${INSTALL_DIR}/include/
+--	chmod 644 ${INSTALL_DIR}/include/ratpoints.h
+--	${INSTALL} libratpoints.a ${INSTALL_DIR}/lib/
+--	chmod 644 ${INSTALL_DIR}/lib/libratpoints.a
+-+	${INSTALL} ratpoints.h "${INSTALL_DIR}/include/"
+-+	chmod 644 "${INSTALL_DIR}/include/ratpoints.h"
+-+	${INSTALL} libratpoints.a "${INSTALL_DIR}/lib/"
+-+	chmod 644 "${INSTALL_DIR}/lib/libratpoints.a"
+- 
+- install: install-bin install-lib
+- 
+diff --git a/build/pkgs/ratpoints/patches/sturm_and_rp_private.patch b/build/pkgs/ratpoints/patches/sturm_and_rp_private.patch
+deleted file mode 100644
+index 664198c4de..0000000000
+--- a/build/pkgs/ratpoints/patches/sturm_and_rp_private.patch
++++ /dev/null
+@@ -1,194 +0,0 @@
+-diff --git a/rp-private.h b/rp-private.h
+-index b4c7dad..0c7193e 100644
+---- a/rp-private.h
+-+++ b/rp-private.h
+-@@ -36,7 +36,7 @@
+- #define LONG_SHIFT ((LONG_LENGTH == 16) ? 4 : \
+-                     (LONG_LENGTH == 32) ? 5 : \
+- 		    (LONG_LENGTH == 64) ? 6 : 0)
+--#define LONG_MASK (~(-1L<<LONG_SHIFT))
+-+#define LONG_MASK (~(-(1L<<LONG_SHIFT)))
+- 
+- /* Check if SSE instructions can be used.
+-    We assume that one SSE word of 128 bit is two long's,
+-diff --git a/sturm.c b/sturm.c
+-index c78d7c6..5fd2cf5 100644
+---- a/sturm.c
+-+++ b/sturm.c
+-@@ -27,7 +27,6 @@
+-  ***********************************************************************/
+- 
+- #include "ratpoints.h"
+--
+- /**************************************************************************
+-  * Arguments of _ratpoints_compute_sturm() : (from the args argument)     *
+-  *                                                                        *
+-@@ -53,7 +52,7 @@
+- /* A helper function: evaluate the polynomial in cofs[] of given degree
+-   at num/2^denexp and return the sign. */
+- 
+--static long eval_sign(ratpoints_args *args, mpz_t *cofs, long degree,
+-+static long eval_sign(const ratpoints_args *args, const mpz_t *cofs, long degree,
+-                       long num, long denexp)
+- {
+-   long n, e, s;
+-@@ -70,11 +69,80 @@ static long eval_sign(ratpoints_args *args, mpz_t *cofs, long degree,
+-   return(s);
+- }
+- 
+-+static const    long max = (long)(((unsigned long)(-1))>>1);
+-+static const    long min = (long)(-(((unsigned long)(-1))>>1));
+-+    /* recursive helper function */
+-+static void iterate(long nl, long nr, long del, long der, long cleft, long cright,
+-+                 long sl, long sr, long depth,
+-+		 ratpoints_interval **iptr, const ratpoints_interval *ivlo,
+-+		 const ratpoints_args *args, const long k, const long sturm_degs[],
+-+                 const mpz_t sturm[][args->degree + 1])
+-+    { /* nl/2^del, nr/2^der : interval left/right endpoints,
+-+         cleft, cright: sign change counts at endpoints,
+-+         sl, sr: signs at endpoints,
+-+         depth: iteration depth */
+-+     long iter = args->sturm;
+-+      if(cleft == cright && sl < 0) { return; }
+-+         /* here we know the polynomial is negative on the interval */
+-+      if((cleft == cright && sl > 0) || depth >= iter)
+-+      /* we have to add/extend an interval if we either know that
+-+         the polynomial is positive on the interval (first condition)
+-+         or the maximal iteration depth has been reached (second condition) */
+-+      { double l = ((double)nl)/((double)(1<<del));
+-+        double u = ((double)nr)/((double)(1<<der));
+-+        if(*iptr == ivlo)
+-+        { (*iptr)->low = l; (*iptr)->up  = u; (*iptr)++; }
+-+        else
+-+        { if(((*iptr)-1)->up == l) /* extend interval */
+-+          { ((*iptr)-1)->up = u; }
+-+          else /* new interval */
+-+          { (*iptr)->low = l; (*iptr)->up  = u; (*iptr)++; }
+-+        }
+-+        return;
+-+      }
+-+      /* now we must split the interval and evaluate the sturm sequence
+-+         at the midpoint */
+-+      { long nm, dem, s0, s1, s2, s, cmid = 0, n;
+-+        if(nl == min)
+-+        { if(nr == max) { nm = 0; dem = 0; }
+-+          else { nm = (nr == 0) ? -1 : 2*nr; dem = 0; }
+-+        }
+-+        else
+-+        { if(nr == max) { nm = (nl == 0) ? 1 : 2*nl; dem = 0; }
+-+          else /* "normal" case */
+-+          { if(del == der) /* then both are zero */
+-+            { if(((nl+nr) & 1) == 0) { nm = (nl+nr)>>1; dem = 0; }
+-+              else { nm = nl+nr; dem = 1; }
+-+            }
+-+            else /* here one de* is greater */
+-+            { if(del > der) { nm = nl + (nr<<(del-der)); dem = del+1; }
+-+              else { nm = (nl<<(der-del)) + nr; dem = der+1; }
+-+            }
+-+          }
+-+        }
+-+        s0 = eval_sign(args, sturm[0], sturm_degs[0], nm, dem);
+-+        s1 = eval_sign(args, sturm[1], sturm_degs[1], nm, dem);
+-+        if(s0*s1 == -1) { cmid++; }
+-+        s = (s1 == 0) ? s0 : s1;
+-+        for(n = 2; n <= k; n++)
+-+        { s2 = eval_sign(args, sturm[n], sturm_degs[n], nm, dem);
+-+          if(s2 == -s) { cmid++; s = s2; }
+-+          else if(s2 != 0) { s = s2; }
+-+        }
+-+        /* now recurse */
+-+        iterate(nl, nm, del, dem, cleft, (s0==0) ? (cmid+1) : cmid,
+-+                sl, (s0==0) ? -s1 : s0, depth+1,
+-+                iptr, ivlo, args, k, sturm_degs, sturm);
+-+        iterate(nm, nr, dem, der, cmid, cright,
+-+                (s0==0) ? s1 : s0, sr, depth+1,
+-+		iptr, ivlo, args, k, sturm_degs, sturm);
+-+      }
+-+    } /* end iterate() */
+-+
+- long _ratpoints_compute_sturm(ratpoints_args *args)
+- { 
+-   mpz_t *cofs = args->cof;
+-   long degree = args->degree;
+--  long iter = args->sturm; 
+-   ratpoints_interval *ivlist = args->domain;
+-   long num_iv = args->num_inter;
+-   long n, m, k, new_num;
+-@@ -165,75 +233,12 @@ long _ratpoints_compute_sturm(ratpoints_args *args)
+-   /* recall: typedef struct {double low; double up;} ratpoints_interval; */
+-   { ratpoints_interval ivlocal[1 + (degree>>1)];
+-     ratpoints_interval *iptr = &ivlocal[0];
+--    long max = (long)(((unsigned long)(-1))>>1);
+--    long min = -max;
+-     long num_intervals;
+-     long slcf = mpz_cmp_si(cofs[degree], 0);
+- 
+--    /* recursive helper function */
+--    void iterate(long nl, long nr, long del, long der, long cleft, long cright,
+--                 long sl, long sr, long depth)
+--    { /* nl/2^del, nr/2^der : interval left/right endpoints,
+--         cleft, cright: sign change counts at endpoints,
+--         sl, sr: signs at endpoints,
+--         depth: iteration depth */
+--      if(cleft == cright && sl < 0) { return; }
+--         /* here we know the polynomial is negative on the interval */
+--      if((cleft == cright && sl > 0) || depth >= iter) 
+--      /* we have to add/extend an interval if we either know that
+--         the polynomial is positive on the interval (first condition)
+--         or the maximal iteration depth has been reached (second condition) */
+--      { double l = ((double)nl)/((double)(1<<del));
+--        double u = ((double)nr)/((double)(1<<der));
+--        if(iptr == &ivlocal[0])
+--        { iptr->low = l; iptr->up  = u; iptr++; }
+--        else
+--        { if((iptr-1)->up == l) /* extend interval */
+--          { (iptr-1)->up = u; }
+--          else /* new interval */
+--          { iptr->low = l; iptr->up  = u; iptr++; }
+--        }
+--        return; 
+--      }
+--      /* now we must split the interval and evaluate the sturm sequence
+--         at the midpoint */
+--      { long nm, dem, s0, s1, s2, s, cmid = 0, n;
+--        if(nl == min)
+--        { if(nr == max) { nm = 0; dem = 0; }
+--          else { nm = (nr == 0) ? -1 : 2*nr; dem = 0; }
+--        }
+--        else
+--        { if(nr == max) { nm = (nl == 0) ? 1 : 2*nl; dem = 0; } 
+--          else /* "normal" case */
+--          { if(del == der) /* then both are zero */
+--            { if(((nl+nr) & 1) == 0) { nm = (nl+nr)>>1; dem = 0; }
+--              else { nm = nl+nr; dem = 1; } 
+--            }
+--            else /* here one de* is greater */
+--            { if(del > der) { nm = nl + (nr<<(del-der)); dem = del+1; }
+--              else { nm = (nl<<(der-del)) + nr; dem = der+1; }
+--            }
+--          }
+--        }
+--        s0 = eval_sign(args, sturm[0], sturm_degs[0], nm, dem);
+--        s1 = eval_sign(args, sturm[1], sturm_degs[1], nm, dem);
+--        if(s0*s1 == -1) { cmid++; }
+--        s = (s1 == 0) ? s0 : s1;
+--        for(n = 2; n <= k; n++)
+--        { s2 = eval_sign(args, sturm[n], sturm_degs[n], nm, dem);
+--          if(s2 == -s) { cmid++; s = s2; }
+--          else if(s2 != 0) { s = s2; }
+--        }
+--        /* now recurse */
+--        iterate(nl, nm, del, dem, cleft, (s0==0) ? (cmid+1) : cmid, 
+--                sl, (s0==0) ? -s1 : s0, depth+1);
+--        iterate(nm, nr, dem, der, cmid, cright, 
+--                (s0==0) ? s1 : s0, sr, depth+1);
+--      }
+--    } /* end iterate() */
+--
+-     iterate(min, max, 0, 0, count2, count1, 
+--            (degree & 1) ? -slcf : slcf, slcf, 0);
+-+            (degree & 1) ? -slcf : slcf, slcf, 0,
+-+	    &iptr, &ivlocal[0], args, k, sturm_degs, sturm);
+-     num_intervals = iptr - &ivlocal[0];
+-     /* intersect with given intervals */
+-     { ratpoints_interval local_copy[num_iv];
+diff --git a/build/pkgs/ratpoints/spkg-install.in b/build/pkgs/ratpoints/spkg-install.in
+deleted file mode 100644
+index b6856c4d4a..0000000000
+--- a/build/pkgs/ratpoints/spkg-install.in
++++ /dev/null
+@@ -1,46 +0,0 @@
+-PRIME_SIZE=7
+-
+-CCFLAGS_NO_SSE="-I$SAGE_LOCAL/include -Wall -O2 -fPIC -DRATPOINTS_MAX_BITS_IN_PRIME=$PRIME_SIZE"
+-CCFLAGS2="-L$SAGE_LOCAL/lib -lgmp -lm $LDFLAGS"
+-CCFLAGS3="-L. -lratpoints"
+-
+-if [[ "$UNAME" = "Darwin" ]]; then
+-    CCFLAGS1="$CCFLAGS_NO_SSE"
+-    echo "Building without SSE2 instructions (MacOS X)."
+-else
+-    CCFLAGS1="$CCFLAGS_NO_SSE -DUSE_SSE"
+-    echo "Attempting to build ratpoints making use of SSE2 instructions."
+-fi
+-
+-# Copy CFLAGS set externally to CCFLAGS.
+-CCFLAGS="$CFLAGS"
+-
+-export CCFLAGS1
+-export CCFLAGS2
+-export CCFLAGS3
+-export CCFLAGS
+-
+-cd src/
+-
+-#############################
+-# Build (just) the library: #
+-#############################
+-
+-# PLEASE, don't break this again by deleting "libratpoints.a".  See trac 8267.
+-if ! $MAKE libratpoints.a; then
+-    [ "$UNAME" = "Darwin" ] && sdh_die "Error building ratpoints."
+-    echo "Build failed. Trying without SSE2 instructions."
+-    CCFLAGS1="$CCFLAGS_NO_SSE"
+-    sdh_make libratpoints.a
+-fi
+-
+-##############################################
+-# Install (just) the library and its header: #
+-##############################################
+-
+-# The following requires that the Makefile got patched;
+-# otherwise one could pass 'INSTALL_DIR=...' on the 'make'
+-# command line:
+-export INSTALL_DIR="$SAGE_DESTDIR_LOCAL"
+-mkdir -p "$INSTALL_DIR"/{lib,include}
+-sdh_make install-lib
+diff --git a/build/pkgs/ratpoints/type b/build/pkgs/ratpoints/type
+deleted file mode 100644
+index a6a7b9cd72..0000000000
+--- a/build/pkgs/ratpoints/type
++++ /dev/null
+@@ -1 +0,0 @@
+-standard
+diff --git a/build/pkgs/sagelib/dependencies b/build/pkgs/sagelib/dependencies
+index 9c7797b1f4..6a7d4b8132 100644
+--- a/build/pkgs/sagelib/dependencies
++++ b/build/pkgs/sagelib/dependencies
+@@ -1,4 +1,4 @@
+-FORCE $(SCRIPTS) arb boost_cropped $(BLAS) brial cliquer cypari cysignals cython ecl eclib ecm flint libgd gap giac givaro glpk gmpy2 gsl iml jinja2 jupyter_core lcalc lrcalc libbraiding libhomfly libpng linbox m4ri m4rie memory_allocator mpc mpfi mpfr $(MP_LIBRARY) ntl numpy pari pip pkgconfig planarity ppl pplpy primesieve primecount primecountpy pycygwin $(PYTHON) ratpoints requests rw sage_conf singular symmetrica zn_poly $(PCFILES) | $(PYTHON_TOOLCHAIN) sage_setup
++FORCE $(SCRIPTS) arb boost_cropped $(BLAS) brial cliquer cypari cysignals cython ecl eclib ecm flint libgd gap giac givaro glpk gmpy2 gsl iml jinja2 jupyter_core lcalc lrcalc libbraiding libhomfly libpng linbox m4ri m4rie memory_allocator mpc mpfi mpfr $(MP_LIBRARY) ntl numpy pari pip pkgconfig planarity ppl pplpy primesieve primecount primecountpy pycygwin $(PYTHON) requests rw sage_conf singular symmetrica zn_poly $(PCFILES) | $(PYTHON_TOOLCHAIN) sage_setup
+ 
+ ----------
+ All lines of this file are ignored except the first.
+diff --git a/src/sage/libs/ratpoints.pxd b/src/sage/libs/ratpoints.pxd
+deleted file mode 100644
+index 67e309b109..0000000000
+--- a/src/sage/libs/ratpoints.pxd
++++ /dev/null
+@@ -1,74 +0,0 @@
+-from sage.rings.integer cimport Integer
+-from sage.libs.gmp.mpz cimport *
+-
+-cdef extern from "ratpoints.h":
+-    long RATPOINTS_MAX_DEGREE
+-    long RATPOINTS_ARRAY_SIZE
+-    long RATPOINTS_DEFAULT_SP1
+-    long RATPOINTS_DEFAULT_SP2
+-    long RATPOINTS_DEFAULT_NUM_PRIMES
+-    long RATPOINTS_DEFAULT_MAX_FORBIDDEN
+-    long RATPOINTS_DEFAULT_STURM
+-    long RATPOINTS_NON_SQUAREFREE
+-    long RATPOINTS_BAD_ARGS
+-
+-    # for args flags:
+-    long RATPOINTS_NO_CHECK # when set, do not check whether the surviving
+-                            # x-coordinates give rise to rational points
+-    long RATPOINTS_NO_Y # when set, only list x coordinates instead of actual points
+-    long RATPOINTS_NO_REVERSE # when set, do not modify the mpz_t array
+-    long RATPOINTS_NO_JACOBI # when set, prevent use of Jacobi symbol test
+-    long RATPOINTS_VERBOSE # when set, print some output on what ratpoints is doing
+-    # define RATPOINTS_FLAGS_INPUT_MASK \
+-    # (RATPOINTS_NO_CHECK | RATPOINTS_NO_Y | RATPOINTS_NO_REVERSE | \
+-    #  RATPOINTS_NO_JACOBI | RATPOINTS_VERBOSE)
+-
+-
+-    ctypedef struct ratpoints_interval:
+-        double low
+-        double up
+-    ctypedef struct ratpoints_args:
+-        mpz_t *cof
+-        long degree
+-        long height
+-        ratpoints_interval *domain
+-        long num_inter
+-        long b_low
+-        long b_high
+-        long sp1
+-        long sp2
+-        long array_size
+-        long sturm
+-        long num_primes
+-        long max_forbidden
+-        unsigned int flags
+-        # from here: private data
+-        # mpz_t *work
+-        # void *se_buffer
+-        # void *se_next
+-        # void *ba_buffer
+-        # void *ba_next
+-        # int *int_buffer
+-        # int *int_next
+-        # void *sieve_list
+-    long find_points(ratpoints_args*, int proc(long, long, mpz_t, void*, int*), void*)
+-    void find_points_init(ratpoints_args*)
+-    long find_points_work(ratpoints_args*, int proc(long, long, mpz_t, void*, int*), void*)
+-    void find_points_clear(ratpoints_args*)
+-
+-ctypedef struct point_list:
+-    long *xes
+-    mpz_t *ys
+-    long *zs
+-    long array_size
+-    long num_points
+-    long max_num_points
+-
+-ctypedef struct info_struct_exists_only:
+-    int verbose
+-
+-cdef int ratpoints_mpz_exists_only(mpz_t *, long, int, bint) except -1
+-
+-
+-
+-
+diff --git a/src/sage/libs/ratpoints.pyx b/src/sage/libs/ratpoints.pyx
+deleted file mode 100644
+index 257dfe3eeb..0000000000
+--- a/src/sage/libs/ratpoints.pyx
++++ /dev/null
+@@ -1,283 +0,0 @@
+-# distutils: libraries = ratpoints
+-r"""
+-Hyperelliptic Curve Point Finding, via ratpoints (deprecated)
+-
+-This module is deprecated, use PARI instead::
+-
+-    sage: pari(EllipticCurve("389a1")).ellratpoints(4)
+-    [[-2, 0], [-2, -1], [-1, 1], [-1, -2], [0, 0], [0, -1], [1, 0], [1, -1], [3, 5], [3, -6], [4, 8], [4, -9], [-3/4, 7/8], [-3/4, -15/8]]
+-    sage: pari("[x^3 + x^2 - 2*x, 1]").hyperellratpoints(4)
+-    [[-2, 0], [-2, -1], [-1, 1], [-1, -2], [0, 0], [0, -1], [1, 0], [1, -1], [3, 5], [3, -6], [4, 8], [4, -9], [-3/4, 7/8], [-3/4, -15/8]]
+-"""
+-
+-from cysignals.memory cimport sig_malloc, sig_realloc, sig_free
+-from cysignals.signals cimport sig_on, sig_off
+-
+-from sage.misc.superseded import deprecation_cython as deprecation
+-deprecation(24531, "the module sage.libs.ratpoints is deprecated; use pari.ellratpoints or pari.hyperellratpoints instead")
+-
+-
+-cdef int process(long x, long z, mpz_t y, void *info0, int *quit):
+-    # ratpoints calls this function when it finds a point [x : y : z]
+-    # info0 is the pointer passed to ratpoints originally
+-    # if quit[0] is set to a nonzero value, ratpoints will abort immediately
+-    cdef point_list *plist = <point_list *> info0
+-    cdef long i
+-    if plist.array_size == plist.num_points:
+-        i = plist.array_size
+-        plist.array_size *= 2
+-        plist.xes = <long *> sig_realloc(plist.xes, plist.array_size * sizeof(long))
+-        plist.ys = <mpz_t *> sig_realloc(plist.ys, plist.array_size * sizeof(mpz_t))
+-        plist.zs = <long *> sig_realloc(plist.zs, plist.array_size * sizeof(long))
+-        while i < plist.array_size:
+-            mpz_init(plist.ys[i])
+-            i += 1
+-    plist.xes[plist.num_points] = x
+-    mpz_set(plist.ys[plist.num_points], y)
+-    plist.zs[plist.num_points] = z
+-    plist.num_points += 1
+-    if plist.max_num_points > 0:
+-        if plist.max_num_points == plist.num_points:
+-            quit[0] = -1
+-    return 1 # weight for counting the points
+-
+-def ratpoints(list coeffs, long H, verbose=False, long max=0,
+-              min_x_denom=None, max_x_denom=None, intervals=[]):
+-    """
+-    Access the ratpoints library to find points on the hyperelliptic curve:
+-
+-    `y^2 = a_n x^n + \cdots + a_1 x + a_0.`
+-
+-    INPUT:
+-
+-    - ``coeffs`` -- list of integer coefficients `a_0` , `a_1`, ..., `a_n`
+-
+-    - ``H`` -- the bound for the denominator and the absolute value of the
+-      numerator of the `x`-coordinate
+-
+-    - ``verbose`` -- if ``True``, ratpoints will print comments about
+-      its progress
+-
+-    - ``max`` -- maximum number of points to find (if 0, find all of them)
+-
+-    OUTPUT:
+-
+-    The points output by this program are points in (1, ceil(n/2), 1)-weighted
+-    projective space. If n is even, then the associated homogeneous equation is
+-    `y^2 = a_n x^n + \cdots + a_1 x z^{n-1} + a_0 z^n` while if n is odd, it is
+-    `y^2 = a_n x^n z + \cdots + a_1 x z^n + a_0 z^{n+1}`.
+-
+-    EXAMPLES::
+-
+-        sage: from sage.libs.ratpoints import ratpoints
+-        doctest:...: DeprecationWarning: the module sage.libs.ratpoints is deprecated; use pari.ellratpoints or pari.hyperellratpoints instead
+-        See http://trac.sagemath.org/24531 for details.
+-        sage: for x,y,z in ratpoints([1..6], 200):
+-        ....:     print(-1*y^2 + 1*z^6 + 2*x*z^5 + 3*x^2*z^4 + 4*x^3*z^3 + 5*x^4*z^2 + 6*x^5*z)
+-        0
+-        0
+-        0
+-        0
+-        0
+-        0
+-        0
+-        sage: for x,y,z in ratpoints([1..5], 200):
+-        ....:    print(-1*y^2 + 1*z^4 + 2*x*z^3 + 3*x^2*z^2 + 4*x^3*z + 5*x^4)
+-        0
+-        0
+-        0
+-        0
+-        0
+-        0
+-        0
+-        0
+-
+-        sage: for x,y,z in ratpoints([1..200], 1000):
+-        ....:    print("{} {} {}".format(x,y,z))
+-        1 0 0
+-        0 1 1
+-        0 -1 1
+-        201 25353012004564588029934064107520000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 200
+-        201 -25353012004564588029934064107520000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 200
+-
+-    The denominator of `x` can be restricted, for example to find
+-    integral points::
+-
+-        sage: from sage.libs.ratpoints import ratpoints
+-        sage: coeffs = [400, -112, 0, 1]
+-        sage: ratpoints(coeffs, 10^6, max_x_denom=1, intervals=[[-10,0],[1000,2000]])
+-        [(1, 0, 0), (-8, 28, 1), (-8, -28, 1), (-7, 29, 1), (-7, -29, 1),
+-         (-4, 28, 1), (-4, -28, 1), (0, 20, 1), (0, -20, 1), (1368, 50596, 1),
+-         (1368, -50596, 1), (1624, 65444, 1), (1624, -65444, 1)]
+-
+-        sage: ratpoints(coeffs, 1000, min_x_denom=100, max_x_denom=200)
+-        [(1, 0, 0),
+-        (-656, 426316, 121),
+-        (-656, -426316, 121),
+-        (452, 85052, 121),
+-        (452, -85052, 121),
+-        (988, 80036, 121),
+-        (988, -80036, 121),
+-        (-556, 773188, 169),
+-        (-556, -773188, 169),
+-        (264, 432068, 169),
+-        (264, -432068, 169)]
+-
+-    Finding the integral points on the compact component of an elliptic curve::
+-
+-        sage: E = EllipticCurve([0,1,0,-35220,-1346400])
+-        sage: e1, e2, e3 = E.division_polynomial(2).roots(multiplicities=False)
+-        sage: coeffs = [E.a6(),E.a4(),E.a2(),1]
+-        sage: ratpoints(coeffs, 1000, max_x_denom=1, intervals=[[e3,e2]])
+-        [(1, 0, 0),
+-        (-165, 0, 1),
+-        (-162, 366, 1),
+-        (-162, -366, 1),
+-        (-120, 1080, 1),
+-        (-120, -1080, 1),
+-        (-90, 1050, 1),
+-        (-90, -1050, 1),
+-        (-85, 1020, 1),
+-        (-85, -1020, 1),
+-        (-42, 246, 1),
+-        (-42, -246, 1),
+-        (-40, 0, 1)]
+-    """
+-    cdef ratpoints_args args
+-    cdef long i, total, verby
+-    cdef Integer sage_int, s_x, s_y, s_z
+-    cdef point_list *plist
+-
+-
+-    verby = ~0 if verbose else 0
+-
+-    # Set the coefficient array:
+-    coeffs = [Integer(a) for a in coeffs]
+-    args.degree = len(coeffs)-1
+-    args.cof = <mpz_t *> sig_malloc((args.degree+1) * sizeof(mpz_t))
+-
+-    # Create an array to hold the points found:
+-    plist = <point_list *> sig_malloc(sizeof(point_list))
+-    if max == 0:
+-        plist.array_size = 64
+-    else:
+-        plist.array_size = max
+-    plist.xes = <long *> sig_malloc(plist.array_size * sizeof(long))
+-    plist.ys = <mpz_t *> sig_malloc(plist.array_size * sizeof(mpz_t))
+-    for i from 0 <= i < plist.array_size:
+-        mpz_init(plist.ys[i])
+-    plist.zs = <long *> sig_malloc(plist.array_size * sizeof(long))
+-    plist.num_points = 0
+-    plist.max_num_points = max
+-
+-    # Set the height bound:
+-    args.height = H
+-
+-    # Set the intervals to be searched, including any specified:
+-    args.num_inter = len(intervals)
+-    args.domain = <ratpoints_interval *> sig_malloc((args.num_inter + args.degree) * sizeof(ratpoints_interval))
+-    for i,I in enumerate(intervals):
+-        args.domain[i].low = I[0]
+-        args.domain[i].up  = I[1]
+-
+-    # Set the minimum and maximum denominators:
+-    if not min_x_denom:  min_x_denom = 1
+-    if not max_x_denom:  max_x_denom = H
+-    args.b_low = min_x_denom
+-    args.b_high = max_x_denom
+-
+-    # Set the remaining arguments, whose non-default use is technical
+-    # (see ratpoints documentation)
+-    args.sp1 = RATPOINTS_DEFAULT_SP1
+-    args.sp2 = RATPOINTS_DEFAULT_SP2
+-    args.array_size = RATPOINTS_ARRAY_SIZE
+-    args.sturm = RATPOINTS_DEFAULT_STURM
+-    args.num_primes = RATPOINTS_DEFAULT_NUM_PRIMES
+-    args.max_forbidden = RATPOINTS_DEFAULT_MAX_FORBIDDEN
+-    args.flags = (RATPOINTS_VERBOSE & verby)
+-
+-    for i from 0 <= i <= args.degree:
+-        mpz_init(args.cof[i])
+-        sage_int = <Integer> coeffs[i]
+-        mpz_set(args.cof[i], sage_int.value)
+-
+-    sig_on()
+-    total = find_points(&args, process, <void *>plist)
+-    sig_off()
+-    if total == RATPOINTS_NON_SQUAREFREE:
+-        raise RuntimeError('Polynomial must be square-free')
+-    if total == RATPOINTS_BAD_ARGS:
+-        raise RuntimeError('Bad arguments to ratpoints')
+-
+-    for i from 0 <= i <= args.degree:
+-        mpz_clear(args.cof[i])
+-
+-    sig_free(args.cof)
+-    sig_free(args.domain)
+-
+-    cdef list L = []
+-    for i from 0 <= i < plist.num_points:
+-        s_x = Integer(0)
+-        s_y = Integer(0)
+-        s_z = Integer(0)
+-        mpz_set_si(s_x.value, plist.xes[i])
+-        mpz_set(s_y.value, plist.ys[i])
+-        mpz_set_si(s_z.value, plist.zs[i])
+-        L.append((s_x,s_y,s_z))
+-
+-    for i from 0 <= i < plist.array_size:
+-        mpz_clear(plist.ys[i])
+-    sig_free(plist.xes)
+-    sig_free(plist.ys)
+-    sig_free(plist.zs)
+-    sig_free(plist)
+-
+-    return L
+-
+-cdef int process_exists_only(long x, long z, mpz_t y, void *info0, int *quit):
+-    cdef info_struct_exists_only *info_s = <info_struct_exists_only *>info0
+-    cdef Integer YY
+-    if info_s.verbose:
+-        YY = Integer(0); mpz_set(YY.value, y)
+-        print('Found point [ %d : %d : %d ], quitting' % (x, YY, z))
+-    quit[0] = -1
+-    return 1
+-
+-cdef int ratpoints_mpz_exists_only(mpz_t *coeffs, long H, int degree, bint verbose) except -1:
+-    """
+-    Direct call to ratpoints to search for existence only.
+-
+-    WARNING - The coefficient array will be modified by ratpoints.
+-    """
+-    cdef ratpoints_args args
+-    cdef info_struct_exists_only info_s
+-    cdef long total, verby = ~0 if verbose else 0
+-    info_s.verbose = verbose
+-    assert degree <= RATPOINTS_MAX_DEGREE
+-    args.degree = degree
+-    args.cof = coeffs
+-    args.domain = <ratpoints_interval *> sig_malloc(2*args.degree * sizeof(ratpoints_interval))
+-    args.height = H
+-    args.num_inter = 0
+-    args.b_low = 1
+-    args.b_high = H
+-    args.sp1 = RATPOINTS_DEFAULT_SP1
+-    args.sp2 = RATPOINTS_DEFAULT_SP2
+-    args.array_size = RATPOINTS_ARRAY_SIZE
+-    args.sturm = RATPOINTS_DEFAULT_STURM
+-    args.num_primes = RATPOINTS_DEFAULT_NUM_PRIMES
+-    args.max_forbidden = RATPOINTS_DEFAULT_MAX_FORBIDDEN
+-    args.flags = (RATPOINTS_VERBOSE & verby)
+-    sig_on()
+-    total = find_points(&args, process_exists_only, <void *>(&info_s))
+-    sig_off()
+-    sig_free(args.domain)
+-    if total == RATPOINTS_NON_SQUAREFREE:
+-        raise RuntimeError('Polynomial must be square-free')
+-    if total == RATPOINTS_BAD_ARGS:
+-        raise RuntimeError('Bad arguments to ratpoints')
+-    return 1 if (total > 0) else 0
+-
+-
+-
+-
+diff --git a/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx b/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx
+index 1cc70925fa..c2f994a650 100644
+--- a/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx
++++ b/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx
+@@ -1,5 +1,3 @@
+-# distutils: libraries = ratpoints
+-
+ r"""
+ Descent on elliptic curves over `\QQ` with a 2-isogeny
+ """
+diff --git a/src/sage_setup/library_order.py b/src/sage_setup/library_order.py
+index 8830d44a95..0b450b3723 100644
+--- a/src/sage_setup/library_order.py
++++ b/src/sage_setup/library_order.py
+@@ -25,7 +25,7 @@ library_order_list = aliases.get("SINGULAR_LIBRARIES", []) + [
+     "giac", "intl", "curl",
+     "ec", "ecm"
+ ] + aliases.get("LINBOX_LIBRARIES", []) + aliases.get("FFLASFFPACK_LIBRARIES", []) + aliases.get("GSL_LIBRARIES", []) + [
+-    "pari", "flint", "ratpoints", "ecl", "glpk", "ppl",
++    "pari", "flint", "ecl", "glpk", "ppl",
+ ] + arb_dylib_names + [
+     "mpfi", "mpfr", "mpc", "ntl", "gmp", "gmpxx",
+     "brial",
+-- 
+2.34.1
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_31563.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_31563.patch
new file mode 100644
index 000000000000..563bb8526788
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_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/zzz-skip_doctest_no_threejs.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_no_threejs.patch
new file mode 100644
index 000000000000..9b6d0a775b10
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_no_threejs.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage/repl/ipython_kernel/install.py b/src/sage/repl/ipython_kernel/install.py
+index 2143c221ed..f781037c70 100644
+--- a/src/sage/repl/ipython_kernel/install.py
++++ b/src/sage/repl/ipython_kernel/install.py
+@@ -124,7 +124,7 @@ class SageKernelSpec(object):
+             sage: spec = SageKernelSpec(prefix=tmp_dir())
+             sage: spec.use_local_threejs()
+             sage: threejs = os.path.join(spec.nbextensions_dir, 'threejs-sage')
+-            sage: os.path.isdir(threejs)
++            sage: os.path.isdir(threejs)    # optional - threejs
+             True
+         """
+         src = THREEJS_DIR
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch
new file mode 100644
index 000000000000..15aed02f9aaa
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch
@@ -0,0 +1,12 @@
+--- a/src/sage_setup/find.py
++++ b/src/sage_setup/find.py
+@@ -301,7 +301,7 @@ def find_extra_files(src_dir, modules, cythonized_dir, special_filenames=[]):
+         sage: extras["sage/libs/mpfr"]
+         [...sage/libs/mpfr/types.pxd...]
+         sage: extras["sage/ext/interpreters"]
+-        ['.../src/sage/ext/interpreters/wrapper_cdf.pxd', ...wrapper_cdf.h...]
++        ['.../src/sage/ext/interpreters/wrapper_cdf.pxd', ...]
+     """
+     from Cython.Utils import is_package_dir
+ 
+--
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch
new file mode 100644
index 000000000000..04fa2acbf3ec
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch
@@ -0,0 +1,11 @@
+--- a/src/sage/tests/cmdline.py
++++ b/src/sage/tests/cmdline.py
+@@ -488,7 +488,7 @@ def test_executable(args, input="", timeout=100.0, pydebug_ignore_warnings=False
+         0
+ 
+         sage: (out, err, ret) = test_executable(["sage", "--cython"])
+-        sage: print(err)
++        sage: print(err)  # not tested - broken when shebang is rewritten
+         Cython (http://cython.org) is a compiler for code written in the
+         Cython language.  Cython is based on Pyrex by Greg Ewing.
+         ...
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
new file mode 100644
index 000000000000..f0003a6c8246
--- /dev/null
+++ b/srcpkgs/sagemath/template
@@ -0,0 +1,251 @@
+# Template file for 'sagemath'
+pkgname=sagemath
+version=9.5.rc3
+revision=1
+wrksrc=sage-$version
+build_style=configure
+configure_args="--enable-build-as-root --with-system-python3
+ --enable-system-site-packages"
+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
+ 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-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
+homepage="http://sagemath.org/"
+distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
+checksum=dabc1a98e883c6069b59a755852bb0030395404a95d19d497c56f557c02619c2
+python_version=3
+patch_args="-F0 -Np1"
+
+build_options="debug"
+desc_option_debug="Build with debug symbols"
+
+# path where sage will be installed
+_SAGE_ROOT=/usr/lib/sage-${version}
+
+# Skip these sage packages: they are not needed
+_spkg_skip="appnope fonttools importlib_resources pycygwin
+ setuptools_scm_git_archive setuptools_wheel sphinxcontrib_websupport
+ pplpy_doc vcversioner
+ jmol mathjax sagenb_export thebe sagetex jupyter_jsmol rpy2 threejs"
+
+# Force use these sage packages from system
+_spkg_system="cppy cython cysignals cypari pplpy fpylll memory_allocator
+ primecountpy"
+
+# Databases to be used from system
+_spkg_db="combinatorial_designs conway_polynomials elliptic_curves graphs
+ polytopes_db"
+
+for spkg in $_spkg_skip; do
+	configure_args+=" sage_spkg_install_$spkg=no"
+	configure_args+=" sage_require_$spkg=no"
+done
+
+for spkg in $_spkg_system; do
+	configure_args+=" sage_spkg_install_$spkg=no"
+	configure_args+=" sage_require_$spkg=yes"
+done
+
+for spkg in $_spkg_db; do
+	configure_args+=" sage_spkg_install_$spkg=no"
+	configure_args+=" sage_require_$spkg=yes"
+	depends+=" sage-data-$spkg"
+	checkdepends+=" sage-data-$spkg"
+done
+
+# 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
+
+# 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
+	mv -T $wrksrc $_SAGE_ROOT
+	ln -srfT $_SAGE_ROOT $wrksrc
+
+	mkdir -p $wrksrc/upstream
+	for u in ${_upstream}; do
+		cp "$XBPS_SRCDISTDIR/${pkgname}-${version}/${u##*[/>]}" $wrksrc/upstream
+	done
+}
+
+do_clean() {
+	rm -rf $wrksrc $_SAGE_ROOT
+}
+
+post_patch() {
+	./bootstrap
+}
+
+pre_configure() {
+	if [ "$build_option_debug" ]; then
+		export SAGE_DEBUG=yes
+	fi
+
+	export MAKE="make -j ${XBPS_MAKEJOBS}"
+}
+
+post_configure() {
+	# we set some variables, right after configure has created sage_conf.py
+	cat <<-EOF >> pkgs/sage-conf/sage_conf.py
+	GAP_ROOT_DIR = "/usr/share/gap"
+	GAP_SO = "$(objdump -p /usr/lib/libgap.so | awk '/SONAME/{print $2}')"
+	CONWAY_POLYNOMIALS_DATA_DIR = "/usr/share/sagemath/conway_polynomials"
+	GRAPHS_DATA_DIR = "/usr/share/sagemath/graphs"
+	ELLCURVE_DATA_DIR = "/usr/share/sagemath/ellcurves"
+	POLYTOPE_DATA_DIR = "/usr/share/sagemath/reflexive_polytopes"
+	COMBINATORIAL_DESIGN_DATA_DIR = "/usr/share/sagemath/combinatorial_designs"
+	CREMONA_MINI_DATA_DIR = "/usr/share/sagemath/cremona"
+	CREMONA_LARGE_DATA_DIR = "/usr/share/sagemath/cremona"
+	EOF
+}
+
+do_install() {
+	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 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
+	# 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}
+	ln -sfT sage-${version} ${DESTDIR}/usr/bin/sage
+}
+
+do_check() {
+	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
+		_test_files=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	fi
+	if [ -z "$_test_files" ]; then
+		_test_files=--all
+	fi
+	cp ${FILESDIR}/timings2.json .
+	_test_args="--stats_path=timings2.json"
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args+=" --long --warn-long 60.0"
+	else
+		_test_args+=" --warn-long 30.0"
+	fi
+	if [ "$XBPS_BUILD_ENVIRONMENT" = "void-packages-ci" ]; then
+		# for CI use a predictable random seed
+		_test_args+=" --random-seed=0"
+	fi
+	# since make check will build the docs, run test like this instead
+	./sage -tp ${XBPS_MAKEJOBS} ${_test_args} ${_test_files}
+}
+
+### copied from sage-deps, to be kept 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"
+
+# standard dependencies
+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 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
+ 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
+ gengetopt texinfo
+ brial-devel cliquer-devel gfan libbraiding-devel libhomfly-devel
+ lrcalc-devel nauty-devel palp tachyon
+ maxima-ecl primesieve-devel primecount-devel gap-devel
+"
+
+# optional dependencies
+makedepends+="
+ ffmpeg ImageMagick
+"
+
+# TODO: optional
+# 4ti2 coxeter3 libsemigroups lrslib pdf2svg perl_mongodb polymake
+
+# python packages for trac-29665
+_sage_python3_modules="
+ python3-Babel python3-Jinja2 python3-MarkupSafe python3-Pillow
+ python3-Pygments python3-Sphinx python3-alabaster python3-argcomplete
+ python3-argon2 python3-attrs python3-backcall python3-beniget
+ python3-bleach python3-certifi python3-cffi python3-charset-normalizer
+ python3-cycler python3-dateutil python3-decorator python3-defusedxml
+ python3-docutils python3-entrypoints python3-flit_core python3-gast
+ python3-gmpy2 python3-html5lib python3-idna python3-imagesize
+ python3-importlib_metadata python3-ipython python3-ipython_genutils
+ python3-ipython_ipykernel python3-jedi python3-jsonschema
+ python3-jupyter_client python3-jupyter_core python3-jupyter_ipywidgets
+ python3-jupyter_nbconvert python3-jupyter_nbformat
+ python3-jupyter_notebook python3-jupyterlab_pygments python3-kiwisolver
+ python3-matplotlib python3-matplotlib-inline python3-mistune
+ python3-mpmath python3-nbclient python3-nest_asyncio python3-networkx
+ python3-numpy python3-packaging python3-pandocfilters python3-parsing
+ python3-parso python3-pexpect python3-pickleshare python3-pip
+ python3-pkgconfig python3-pluggy python3-ply python3-prometheus_client
+ python3-prompt_toolkit python3-ptyprocess python3-py python3-pybind11
+ python3-pycparser python3-pyrsistent python3-pytz python3-pyzmq
+ python3-requests python3-scipy python3-send2trash python3-setuptools
+ python3-setuptools_scm python3-simplegeneric python3-six
+ python3-snowballstemmer python3-sphinxcontrib-applehelp
+ python3-sphinxcontrib-devhelp python3-sphinxcontrib-htmlhelp
+ python3-sphinxcontrib-jsmath python3-sphinxcontrib-qthelp
+ python3-sphinxcontrib-serializinghtml python3-sympy python3-terminado
+ python3-testpath python3-texttable python3-toml python3-tomli
+ python3-tornado python3-traitlets python3-typing_extensions
+ python3-tzlocal python3-urllib3 python3-wcwidth python3-webencodings
+ python3-wheel python3-zipp pythran
+
+ python3-cvxopt python3-cppy python3-Cython python3-cysignals python3-cypari2
+ python3-pplpy python3-fpylll python3-primecountpy python3-memory_allocator
+"
+
+# python packages are build and runtime dependencies
+makedepends+=" $_sage_python3_modules"
+depends+=" $_sage_python3_modules"
diff --git a/srcpkgs/sagemath/update b/srcpkgs/sagemath/update
new file mode 100644
index 000000000000..c33aba4e6df2
--- /dev/null
+++ b/srcpkgs/sagemath/update
@@ -0,0 +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 a939d05a1e14599a6e9f710a6844aa45cd8df77c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Thu, 13 Jan 2022 15:47:33 -0300
Subject: [PATCH 02/11] New package: sagemath-test

---
 srcpkgs/sagemath-test/files/timings2.json |  1 +
 srcpkgs/sagemath-test/template            | 35 +++++++++++++++++++++++
 2 files changed, 36 insertions(+)
 create mode 120000 srcpkgs/sagemath-test/files/timings2.json
 create mode 100644 srcpkgs/sagemath-test/template

diff --git a/srcpkgs/sagemath-test/files/timings2.json b/srcpkgs/sagemath-test/files/timings2.json
new file mode 120000
index 000000000000..25d5309fc818
--- /dev/null
+++ b/srcpkgs/sagemath-test/files/timings2.json
@@ -0,0 +1 @@
+../../sagemath/files/timings2.json
\ No newline at end of file
diff --git a/srcpkgs/sagemath-test/template b/srcpkgs/sagemath-test/template
new file mode 100644
index 000000000000..1e6c76274a4d
--- /dev/null
+++ b/srcpkgs/sagemath-test/template
@@ -0,0 +1,35 @@
+# Template file for 'sagemath-test'
+pkgname=sagemath-test
+version=1
+revision=1
+build_style=meta
+checkdepends="sagemath"
+short_desc="Dummy package to test sagemath"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-2.0-or-later"
+homepage="none"
+
+# TODO: install base-voidstrap, uninstall base-chroot, and remove orphans
+# so we can check sagemath depends are enough to run sage on void
+
+do_check() {
+	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
+		_test_files=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	fi
+	if [ -z "$_test_files" ]; then
+		_test_files=--all
+	fi
+	cp ${FILESDIR}/timings2.json .
+	_test_args="--stats_path=timings2.json"
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args+=" --long --warn-long 60.0"
+	else
+		_test_args+=" --warn-long 30.0"
+	fi
+	if [ "$XBPS_BUILD_ENVIRONMENT" = "void-packages-ci" ]; then
+		# for CI use a predictable random seed
+		_test_args+=" --random-seed=0"
+	fi
+	# since make check will build the docs, run test like this instead
+	sage -tp ${XBPS_MAKEJOBS} ${_test_args} ${_test_files}
+}

From d8d98427ada62325b0aebcfd2c0498e595a246fa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Wed, 19 Jan 2022 00:26:58 -0300
Subject: [PATCH 03/11] sagemath: linbox, gap, maxima without patch

---
 ...13e88ee188d516e4956832a23f985a73917a.patch |  31 ---
 ...ea979d4bfa1a26ef3b08a29ca626b83b6ff5.patch |  23 --
 ...f491e5ce599ba185f5e93f02e0fcebd76c9e.patch |  57 ----
 ...aba734cb4ded0b04165fa142b5cf4c38fd23.patch | 247 ------------------
 srcpkgs/sagemath/template                     |   8 +-
 5 files changed, 7 insertions(+), 359 deletions(-)
 delete mode 100644 srcpkgs/sagemath/patches/trac-29631-001-system_linbox-794713e88ee188d516e4956832a23f985a73917a.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-29631-002-system_linbox-7e16ea979d4bfa1a26ef3b08a29ca626b83b6ff5.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-32867-system_maxima-ed39aba734cb4ded0b04165fa142b5cf4c38fd23.patch

diff --git a/srcpkgs/sagemath/patches/trac-29631-001-system_linbox-794713e88ee188d516e4956832a23f985a73917a.patch b/srcpkgs/sagemath/patches/trac-29631-001-system_linbox-794713e88ee188d516e4956832a23f985a73917a.patch
deleted file mode 100644
index 483dbe2c2597..000000000000
--- a/srcpkgs/sagemath/patches/trac-29631-001-system_linbox-794713e88ee188d516e4956832a23f985a73917a.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-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.
-
-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/trac-29631-002-system_linbox-7e16ea979d4bfa1a26ef3b08a29ca626b83b6ff5.patch b/srcpkgs/sagemath/patches/trac-29631-002-system_linbox-7e16ea979d4bfa1a26ef3b08a29ca626b83b6ff5.patch
deleted file mode 100644
index 3b20d13100e7..000000000000
--- a/srcpkgs/sagemath/patches/trac-29631-002-system_linbox-7e16ea979d4bfa1a26ef3b08a29ca626b83b6ff5.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-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-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch b/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
deleted file mode 100644
index da88a369db0d..000000000000
--- a/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 2c981351bb60089530b0598d3e9a909a23d4d4d8 Mon Sep 17 00:00:00 2001
-From: Thierry Thomas <thierry@FreeBSD.org>
-Date: Mon, 22 Mar 2021 03:04:12 +0100
-Subject: 29644: Add spkg-configure.m4 for gap
-
----
- build/pkgs/gap/spkg-configure.m4 | 8 ++++++++
- 1 file changed, 8 insertions(+)
- create mode 100644 build/pkgs/gap/spkg-configure.m4
-
-diff --git a/build/pkgs/gap/spkg-configure.m4 b/build/pkgs/gap/spkg-configure.m4
-new file mode 100644
-index 00000000..91cd089
---- /dev/null
-+++ b/build/pkgs/gap/spkg-configure.m4
-@@ -0,0 +1,8 @@
-+SAGE_SPKG_CONFIGURE([gap], [
-+    SAGE_SPKG_DEPCHECK([gmp], [
-+       AC_CHECK_HEADER([gap/system.h], [
-+        AC_SEARCH_LIBS([GAP_COMM], [gap], [
-+        ], [sage_spkg_install_gap=yes])
-+       ], [sage_spkg_install_gap=yes])
-+    ])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From 2a41f491e5ce599ba185f5e93f02e0fcebd76c9e Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Samuel=20Leli=C3=A8vre?= <samuel.lelievre@gmail.com>
-Date: Mon, 22 Mar 2021 03:05:31 +0100
-Subject: 29644: Add distro information for gap
-
----
- build/pkgs/gap/distros/fedora.txt | 1 +
- build/pkgs/gap/distros/gentoo.txt | 1 +
- 2 files changed, 2 insertions(+)
- create mode 100644 build/pkgs/gap/distros/fedora.txt
- create mode 100644 build/pkgs/gap/distros/gentoo.txt
-
-diff --git a/build/pkgs/gap/distros/fedora.txt b/build/pkgs/gap/distros/fedora.txt
-new file mode 100644
-index 00000000..ea4feae
---- /dev/null
-+++ b/build/pkgs/gap/distros/fedora.txt
-@@ -0,0 +1 @@
-+gap
-diff --git a/build/pkgs/gap/distros/gentoo.txt b/build/pkgs/gap/distros/gentoo.txt
-new file mode 100644
-index 00000000..ea64ec9
---- /dev/null
-+++ b/build/pkgs/gap/distros/gentoo.txt
-@@ -0,0 +1 @@
-+sci-mathematics/gap
--- 
-cgit v1.0-1-gd88e
-
diff --git a/srcpkgs/sagemath/patches/trac-32867-system_maxima-ed39aba734cb4ded0b04165fa142b5cf4c38fd23.patch b/srcpkgs/sagemath/patches/trac-32867-system_maxima-ed39aba734cb4ded0b04165fa142b5cf4c38fd23.patch
deleted file mode 100644
index 8edbde0ce76f..000000000000
--- a/srcpkgs/sagemath/patches/trac-32867-system_maxima-ed39aba734cb4ded0b04165fa142b5cf4c38fd23.patch
+++ /dev/null
@@ -1,247 +0,0 @@
-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
- 
--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 fbce694..b40cda6 100644
---- a/pkgs/sage-conf/sage_conf.py.in
-+++ b/pkgs/sage-conf/sage_conf.py.in
-@@ -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.
- MAXIMA_FAS = "@SAGE_MAXIMA_FAS@".replace('${prefix}', SAGE_LOCAL)
- 
-diff --git a/src/bin/sage b/src/bin/sage
-index fcd2630..54b69a1 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/sage/env.py b/src/sage/env.py
-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"))
- 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 fc7f48b..7313c7d 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 917059d..c966a3c 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')
--- 
-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 f0003a6c8246..de9fe5177766 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -38,7 +38,8 @@ _spkg_skip="appnope fonttools importlib_resources pycygwin
 
 # Force use these sage packages from system
 _spkg_system="cppy cython cysignals cypari pplpy fpylll memory_allocator
- primecountpy"
+ primecountpy
+ linbox gap maxima"
 
 # Databases to be used from system
 _spkg_db="combinatorial_designs conway_polynomials elliptic_curves graphs
@@ -107,6 +108,8 @@ post_configure() {
 	cat <<-EOF >> pkgs/sage-conf/sage_conf.py
 	GAP_ROOT_DIR = "/usr/share/gap"
 	GAP_SO = "$(objdump -p /usr/lib/libgap.so | awk '/SONAME/{print $2}')"
+	MAXIMA = "maxima -l ecl"
+	MAXIMA_FAS = ""
 	CONWAY_POLYNOMIALS_DATA_DIR = "/usr/share/sagemath/conway_polynomials"
 	GRAPHS_DATA_DIR = "/usr/share/sagemath/graphs"
 	ELLCURVE_DATA_DIR = "/usr/share/sagemath/ellcurves"
@@ -115,6 +118,9 @@ post_configure() {
 	CREMONA_MINI_DATA_DIR = "/usr/share/sagemath/cremona"
 	CREMONA_LARGE_DATA_DIR = "/usr/share/sagemath/cremona"
 	EOF
+	cat <<-EOF >> src/bin/sage-env
+	unset MAXIMA_PREFIX
+	EOF
 }
 
 do_install() {

From 0ce285f4d3e1195a05411cdbc6e3651735a0c5c5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Wed, 19 Jan 2022 14:56:02 -0300
Subject: [PATCH 04/11] sagemath: remove patches for upstream pkgs

---
 ...0e8168a9ffb4fbf07dd03c0846b4933a6dbe.patch | 64 -------------------
 ...26e3db5ea06b962fac386fa3c7223f9a14fb.patch | 51 ---------------
 ...d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch | 35 ----------
 3 files changed, 150 deletions(-)
 delete mode 100644 srcpkgs/sagemath/patches/trac-33047-musl_fix_find_library-dc1a0e8168a9ffb4fbf07dd03c0846b4933a6dbe.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-33063-notebook_fix_deprecation_warning-966926e3db5ea06b962fac386fa3c7223f9a14fb.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch

diff --git a/srcpkgs/sagemath/patches/trac-33047-musl_fix_find_library-dc1a0e8168a9ffb4fbf07dd03c0846b4933a6dbe.patch b/srcpkgs/sagemath/patches/trac-33047-musl_fix_find_library-dc1a0e8168a9ffb4fbf07dd03c0846b4933a6dbe.patch
deleted file mode 100644
index 3d4f4e14bb7b..000000000000
--- a/srcpkgs/sagemath/patches/trac-33047-musl_fix_find_library-dc1a0e8168a9ffb4fbf07dd03c0846b4933a6dbe.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-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: Add a patch that fixes ctypes.util.find_library('c')
-
-The issue causes a failure doctesting src/sage/misc/gperftools.py
----
- 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 00000000..82f436b
---- /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):
--- 
-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
deleted file mode 100644
index 921a1669fd2a..000000000000
--- a/srcpkgs/sagemath/patches/trac-33063-notebook_fix_deprecation_warning-966926e3db5ea06b962fac386fa3c7223f9a14fb.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-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-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch b/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
deleted file mode 100644
index 350c41ac3928..000000000000
--- a/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6 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: sagetex: Fix a warning when byte-compiling sagetexparse.py
-
----
- build/pkgs/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 00000000..d82ab67
---- /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'
-+ 
--- 
-cgit v1.0-1-gd88e
-

From ea77d8eb3150c6305eee2dddfbee13c95c1a08b1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Wed, 19 Jan 2022 15:18:27 -0300
Subject: [PATCH 05/11] sagemath: simplify system-site-packages patch

---
 ...aabe95082f42ba134780d579390d7b6153e2.patch |   53 +
 ...184f7498a2046065e669723e68efe2d65cee.patch | 5629 -----------------
 .../zzz-more_site_packages_not_in_29665.patch |   42 -
 srcpkgs/sagemath/template                     |   15 +
 4 files changed, 68 insertions(+), 5671 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-05fcaabe95082f42ba134780d579390d7b6153e2.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
 delete mode 100644 srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch

diff --git a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-05fcaabe95082f42ba134780d579390d7b6153e2.patch b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-05fcaabe95082f42ba134780d579390d7b6153e2.patch
new file mode 100644
index 000000000000..3af8b05135ae
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-05fcaabe95082f42ba134780d579390d7b6153e2.patch
@@ -0,0 +1,53 @@
+From 05fcaabe95082f42ba134780d579390d7b6153e2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 19:30:58 -0400
+Subject: Trac #29665: add --enable-system-site-packages option to ./configure.
+
+This new option is experimental and disabled by default. When it is
+enabled, the string "--system-site-packages" is appended to a new
+environment variable SAGE_VENV_FLAGS that is then passed to the
+sage-venv command during the build using autoconf substitution.
+Thusly the correct setting finds its way into local/pyvenv.cfg.
+---
+ build/make/Makefile.in |  2 +-
+ configure.ac           | 11 +++++++++++
+ 2 files changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/build/make/Makefile.in b/build/make/Makefile.in
+index f870cc3..68627ab 100644
+--- a/build/make/Makefile.in
++++ b/build/make/Makefile.in
+@@ -211,7 +211,7 @@ endif
+ inst_python3_venv = $(SAGE_VENV)/pyvenv.cfg
+ 
+ $(inst_python3_venv):
+-	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv "$(SAGE_VENV)"
++	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv @SAGE_VENV_FLAGS@ "$(SAGE_VENV)"
+ endif
+ 
+ # Build everything and start Sage.
+diff --git a/configure.ac b/configure.ac
+index 351f487..db30a91 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -435,6 +435,17 @@ AC_ARG_ENABLE([download-from-upstream-url],
+   [AS_HELP_STRING([--enable-download-from-upstream-url],
+     [allow downloading packages from their upstream URL if they cannot be found on the Sage mirrors])])
+ 
++AC_ARG_ENABLE(
++  [system-site-packages], [AS_HELP_STRING(
++    [--enable-system-site-packages],
++    [allow sage to use python packages from the system (experimental; default: no)]
++  )], [
++  AS_IF([test "x$enable_system_site_packages" = "xyes"], [
++    SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
++  ])
++])
++AC_SUBST([SAGE_VENV_FLAGS])
++
+ SAGE_SPKG_OPTIONS=""
+ AS_IF([test "x$enable_experimental_packages" = "xyes"], [
+   AS_VAR_APPEND([SAGE_SPKG_OPTIONS], [" -y"])
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
deleted file mode 100644
index 0ecb27c593cd..000000000000
--- a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
+++ /dev/null
@@ -1,5629 +0,0 @@
-From 05fcaabe95082f42ba134780d579390d7b6153e2 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Sat, 9 Oct 2021 19:30:58 -0400
-Subject: Trac #29665: add --enable-system-site-packages option to ./configure.
-
-This new option is experimental and disabled by default. When it is
-enabled, the string "--system-site-packages" is appended to a new
-environment variable SAGE_VENV_FLAGS that is then passed to the
-sage-venv command during the build using autoconf substitution.
-Thusly the correct setting finds its way into local/pyvenv.cfg.
----
- build/make/Makefile.in |  2 +-
- configure.ac           | 11 +++++++++++
- 2 files changed, 12 insertions(+), 1 deletion(-)
-
-diff --git a/build/make/Makefile.in b/build/make/Makefile.in
-index f870cc3..68627ab 100644
---- a/build/make/Makefile.in
-+++ b/build/make/Makefile.in
-@@ -211,7 +211,7 @@ endif
- inst_python3_venv = $(SAGE_VENV)/pyvenv.cfg
- 
- $(inst_python3_venv):
--	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv "$(SAGE_VENV)"
-+	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv @SAGE_VENV_FLAGS@ "$(SAGE_VENV)"
- endif
- 
- # Build everything and start Sage.
-diff --git a/configure.ac b/configure.ac
-index 351f487..db30a91 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -435,6 +435,17 @@ AC_ARG_ENABLE([download-from-upstream-url],
-   [AS_HELP_STRING([--enable-download-from-upstream-url],
-     [allow downloading packages from their upstream URL if they cannot be found on the Sage mirrors])])
- 
-+AC_ARG_ENABLE(
-+  [system-site-packages], [AS_HELP_STRING(
-+    [--enable-system-site-packages],
-+    [allow sage to use python packages from the system (experimental; default: no)]
-+  )], [
-+  AS_IF([test "x$enable_system_site_packages" = "xyes"], [
-+    SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
-+  ])
-+])
-+AC_SUBST([SAGE_VENV_FLAGS])
-+
- SAGE_SPKG_OPTIONS=""
- AS_IF([test "x$enable_experimental_packages" = "xyes"], [
-   AS_VAR_APPEND([SAGE_SPKG_OPTIONS], [" -y"])
--- 
-cgit v1.0-1-gd88e
-
-
-From 9372d1f663edf4e89f9c186336815ca04cff59dc Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 11 Oct 2021 19:41:14 -0400
-Subject: Trac #29665: new SAGE_PYTHON_PACKAGE_CHECK() autoconf macro.
-
-This new macro encapsulates the check for system installations of
-python packages. It uses setuptools.version's pkg_resources to
-check if the contents of install-requires.txt are satisfied for
-the given package; and if not, tells the build system to install
-the SPKG instead.
----
- m4/sage_python_package_check.m4 | 49 +++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 49 insertions(+)
- create mode 100644 m4/sage_python_package_check.m4
-
-diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
-new file mode 100644
-index 00000000..77b0a0c
---- /dev/null
-+++ b/m4/sage_python_package_check.m4
-@@ -0,0 +1,49 @@
-+#
-+# SYNOPSIS
-+#
-+#   SAGE_PYTHON_PACKAGE_CHECK(package)
-+#
-+# DESCRIPTION
-+#
-+#   Determine if the system copy of a python package can be used by sage.
-+#
-+#   This macro uses setuptools.version's pkg_resources to check that the
-+#   "install-requires.txt" file for the named package is satisfied, and
-+#   it can typically fail in four ways:
-+#
-+#     1. If --enable-system-site-packages was not passed to ./configure,
-+#
-+#     2. If we are not using the system python (no $PYTHON_FOR_VENV),
-+#
-+#     3. If setuptools is not available to the system python,
-+#
-+#     4. If the contents of install-requires.txt are not met (wrong
-+#        version, no version, etc.) by the system python.
-+#
-+#   In any of those cases, we set sage_spkg_install_$package to "yes"
-+#   so that the corresponding SPKG is installed. Otherwise, we do
-+#   nothing, since the default value of sage_spkg_install_$package
-+#   is "no" (to use the system copy).
-+#
-+#   The SAGE_SPKG_CONFIGURE_PYTHON3() macro is AC_REQUIRE'd to ensure
-+#   that $PYTHON_FOR_VENV is available, if it is going to be available.
-+#
-+
-+AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
-+  AS_IF([test "${enable_system_site_packages}" = "yes"], [
-+    AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
-+
-+    dnl strip all comments from install-requires.txt; this should leave
-+    dnl only a single line containing the version specification for this
-+    dnl package.
-+    SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
-+    AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
-+    AS_IF(
-+      ["${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())"],
-+      [AC_MSG_RESULT(yes)],
-+      [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
-+    )
-+  ], [
-+    sage_spkg_install_$1=yes
-+  ])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From a0dac8ad81ad6369d479bba30d2388de59e5cecb Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Sat, 9 Oct 2021 20:21:29 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for py.
-
----
- build/pkgs/py/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/py/spkg-configure.m4
-
-diff --git a/build/pkgs/py/spkg-configure.m4 b/build/pkgs/py/spkg-configure.m4
-new file mode 100644
-index 00000000..ded7034
---- /dev/null
-+++ b/build/pkgs/py/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([py], [SAGE_PYTHON_PACKAGE_CHECK([py])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 87c463a25ab4432dc1fba4f7a9703284e5b8f620 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Sat, 9 Oct 2021 20:24:15 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for wheel.
-
----
- build/pkgs/wheel/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/wheel/spkg-configure.m4
-
-diff --git a/build/pkgs/wheel/spkg-configure.m4 b/build/pkgs/wheel/spkg-configure.m4
-new file mode 100644
-index 00000000..7897ea9
---- /dev/null
-+++ b/build/pkgs/wheel/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([wheel], [SAGE_PYTHON_PACKAGE_CHECK([wheel])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 804094b3a980f262f4d53d7be8b1be43ac0c55e0 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Sat, 9 Oct 2021 20:25:15 -0400
-Subject: Trac #29665: new spkg-configure.m4 for cvxopt.
-
-This includes a SAGE_SPKG_DEPCHECK([gsl glpk suitesparse],... because
-those C dependencies wind up linked into shared libraries like,
-
-  /usr/.../cvxopt/glpk.cpython-39-x86_64-linux-gnu.so
-
-that could potentially conflict with (for example) the glpk SPKG.
----
- build/pkgs/cvxopt/spkg-configure.m4 | 5 +++++
- 1 file changed, 5 insertions(+)
- create mode 100644 build/pkgs/cvxopt/spkg-configure.m4
-
-diff --git a/build/pkgs/cvxopt/spkg-configure.m4 b/build/pkgs/cvxopt/spkg-configure.m4
-new file mode 100644
-index 00000000..c4aa619
---- /dev/null
-+++ b/build/pkgs/cvxopt/spkg-configure.m4
-@@ -0,0 +1,5 @@
-+SAGE_SPKG_CONFIGURE([cvxopt], [
-+  SAGE_SPKG_DEPCHECK([gsl glpk suitesparse], [
-+    SAGE_PYTHON_PACKAGE_CHECK([cvxopt])
-+  ])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From 3f171955ff8d15da2c98aee0d2e254e95a55a2b5 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Sat, 9 Oct 2021 20:28:10 -0400
-Subject: Trac #29665: new spkg-configure.m4 for pyzmq.
-
-This includes a SAGE_SPKG_DEPCHECK([zeromq],... because libzmq winds
-up linked into shared libraries like,
-
-  /usr/.../zmq/backend/cython/message.cpython-39-x86_64-linux-gnu.so
-
-that potentially conflict with the zeromq SPKG.
----
- build/pkgs/pyzmq/spkg-configure.m4 | 5 +++++
- 1 file changed, 5 insertions(+)
- create mode 100644 build/pkgs/pyzmq/spkg-configure.m4
-
-diff --git a/build/pkgs/pyzmq/spkg-configure.m4 b/build/pkgs/pyzmq/spkg-configure.m4
-new file mode 100644
-index 00000000..ae2b126
---- /dev/null
-+++ b/build/pkgs/pyzmq/spkg-configure.m4
-@@ -0,0 +1,5 @@
-+SAGE_SPKG_CONFIGURE([pyzmq], [
-+  SAGE_SPKG_DEPCHECK([zeromq], [
-+    SAGE_PYTHON_PACKAGE_CHECK([pyzmq])
-+  ])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From 20d3aa9da9fc98a6e6a47599cd1b6d1d3785a4c4 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Sat, 9 Oct 2021 20:31:24 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for requests.
-
----
- build/pkgs/requests/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/requests/spkg-configure.m4
-
-diff --git a/build/pkgs/requests/spkg-configure.m4 b/build/pkgs/requests/spkg-configure.m4
-new file mode 100644
-index 00000000..f50a66c
---- /dev/null
-+++ b/build/pkgs/requests/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([requests], [SAGE_PYTHON_PACKAGE_CHECK([requests])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 4df57ee47f2576b6b7bf9265248e06e90616b689 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Sun, 10 Oct 2021 18:13:34 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for six.
-
----
- build/pkgs/six/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/six/spkg-configure.m4
-
-diff --git a/build/pkgs/six/spkg-configure.m4 b/build/pkgs/six/spkg-configure.m4
-new file mode 100644
-index 00000000..a382b81
---- /dev/null
-+++ b/build/pkgs/six/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([six], [SAGE_PYTHON_PACKAGE_CHECK([six])])
--- 
-cgit v1.0-1-gd88e
-
-
-From f4462652d02ca729cc6d7cb36ee4d7d662deafb0 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Sun, 10 Oct 2021 18:14:29 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for packaging.
-
----
- build/pkgs/packaging/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/packaging/spkg-configure.m4
-
-diff --git a/build/pkgs/packaging/spkg-configure.m4 b/build/pkgs/packaging/spkg-configure.m4
-new file mode 100644
-index 00000000..398f9e1
---- /dev/null
-+++ b/build/pkgs/packaging/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([packaging], [SAGE_PYTHON_PACKAGE_CHECK([packaging])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 4d64677fffce48077e4bc3e20ec833c70e6e9b65 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Sun, 10 Oct 2021 18:18:53 -0400
-Subject: Trac #29665: new spkg-configure.m4 for numpy.
-
-This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack
-wind up linked into shared libraries like,
-
-  /usr/.../numpy/linalg/lapack_lite.cpython-39-x86_64-linux-gnu.so
-
-that potentially conflict with the openblas SPKG.
----
- build/pkgs/numpy/spkg-configure.m4 | 5 +++++
- 1 file changed, 5 insertions(+)
- create mode 100644 build/pkgs/numpy/spkg-configure.m4
-
-diff --git a/build/pkgs/numpy/spkg-configure.m4 b/build/pkgs/numpy/spkg-configure.m4
-new file mode 100644
-index 00000000..16f9a90
---- /dev/null
-+++ b/build/pkgs/numpy/spkg-configure.m4
-@@ -0,0 +1,5 @@
-+SAGE_SPKG_CONFIGURE([numpy], [
-+  SAGE_SPKG_DEPCHECK([openblas], [
-+   SAGE_PYTHON_PACKAGE_CHECK([numpy])
-+  ])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From 85dfe5bb32f3c470966b477bae68a921e846d11f Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Sun, 10 Oct 2021 18:58:48 -0400
-Subject: Trac #29665: new spkg-configure.m4 for scipy.
-
-This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack
-wind up linked into shared libraries like,
-
-  /usr/.../scipy/linalg/_flinalg.cpython-39-x86_64-linux-gnu.so
-
-that potentially conflict with the openblas SPKG.
----
- build/pkgs/scipy/spkg-configure.m4 | 5 +++++
- 1 file changed, 5 insertions(+)
- create mode 100644 build/pkgs/scipy/spkg-configure.m4
-
-diff --git a/build/pkgs/scipy/spkg-configure.m4 b/build/pkgs/scipy/spkg-configure.m4
-new file mode 100644
-index 00000000..0b7294a
---- /dev/null
-+++ b/build/pkgs/scipy/spkg-configure.m4
-@@ -0,0 +1,5 @@
-+SAGE_SPKG_CONFIGURE([scipy], [
-+  SAGE_SPKG_DEPCHECK([openblas], [
-+    SAGE_PYTHON_PACKAGE_CHECK([scipy])
-+  ])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From 5616f1491036fda95f4d3e840c8c8b531c97323b Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 11 Oct 2021 07:19:24 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for pluggy.
-
----
- build/pkgs/pluggy/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pluggy/spkg-configure.m4
-
-diff --git a/build/pkgs/pluggy/spkg-configure.m4 b/build/pkgs/pluggy/spkg-configure.m4
-new file mode 100644
-index 00000000..11b1fce
---- /dev/null
-+++ b/build/pkgs/pluggy/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([pluggy], [SAGE_PYTHON_PACKAGE_CHECK([pluggy])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 6bceae3d356878cfe5fce40c9998dead003a3844 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 11 Oct 2021 07:24:12 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for pickleshare.
-
----
- build/pkgs/pickleshare/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pickleshare/spkg-configure.m4
-
-diff --git a/build/pkgs/pickleshare/spkg-configure.m4 b/build/pkgs/pickleshare/spkg-configure.m4
-new file mode 100644
-index 00000000..80e9b7c
---- /dev/null
-+++ b/build/pkgs/pickleshare/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([pickleshare], [SAGE_PYTHON_PACKAGE_CHECK([pickleshare])])
--- 
-cgit v1.0-1-gd88e
-
-
-From da2ab534f4a256c82ed4f1c5f0f5c320529b5e9f Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 11 Oct 2021 08:53:29 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for html5lib.
-
----
- build/pkgs/html5lib/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/html5lib/spkg-configure.m4
-
-diff --git a/build/pkgs/html5lib/spkg-configure.m4 b/build/pkgs/html5lib/spkg-configure.m4
-new file mode 100644
-index 00000000..f421b7e
---- /dev/null
-+++ b/build/pkgs/html5lib/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([html5lib], [SAGE_PYTHON_PACKAGE_CHECK([html5lib])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 5e464134afdf6055b7b5804208f759561c5435cd Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 11 Oct 2021 18:30:47 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for networkx.
-
----
- build/pkgs/networkx/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/networkx/spkg-configure.m4
-
-diff --git a/build/pkgs/networkx/spkg-configure.m4 b/build/pkgs/networkx/spkg-configure.m4
-new file mode 100644
-index 00000000..926671e
---- /dev/null
-+++ b/build/pkgs/networkx/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([networkx], [SAGE_PYTHON_PACKAGE_CHECK([networkx])])
--- 
-cgit v1.0-1-gd88e
-
-
-From c4d40770cd9c7fda811e31759a5f4aedc320f3f9 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 11 Oct 2021 20:33:24 -0400
-Subject: Trac #29665: new spkg-configure.m4 for matplotlib.
-
-This includes a SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull],...
-because those dependencies wind up linked into shared libraries like,
-
-  /usr/lib/.../matplotlib/ft2font.cpython-39-x86_64-linux-gnu.so
-
-that potentially conflict with their SPKG counterparts.
----
- build/pkgs/matplotlib/spkg-configure.m4 | 5 +++++
- 1 file changed, 5 insertions(+)
- create mode 100644 build/pkgs/matplotlib/spkg-configure.m4
-
-diff --git a/build/pkgs/matplotlib/spkg-configure.m4 b/build/pkgs/matplotlib/spkg-configure.m4
-new file mode 100644
-index 00000000..39c2d29
---- /dev/null
-+++ b/build/pkgs/matplotlib/spkg-configure.m4
-@@ -0,0 +1,5 @@
-+SAGE_SPKG_CONFIGURE([matplotlib], [
-+  SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull], [
-+    SAGE_PYTHON_PACKAGE_CHECK([matplotlib])
-+  ])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From 7834dc3ac349201af632f89a9de7cd1967931010 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 11 Oct 2021 20:35:00 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for bleach.
-
----
- build/pkgs/bleach/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/bleach/spkg-configure.m4
-
-diff --git a/build/pkgs/bleach/spkg-configure.m4 b/build/pkgs/bleach/spkg-configure.m4
-new file mode 100644
-index 00000000..3c9bb26
---- /dev/null
-+++ b/build/pkgs/bleach/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([bleach], [SAGE_PYTHON_PACKAGE_CHECK([bleach])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 84cad343287a2c69a4a21b9fa3b92301ff88645b Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 11 Oct 2021 20:37:03 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for decorator.
-
----
- build/pkgs/decorator/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/decorator/spkg-configure.m4
-
-diff --git a/build/pkgs/decorator/spkg-configure.m4 b/build/pkgs/decorator/spkg-configure.m4
-new file mode 100644
-index 00000000..e062778
---- /dev/null
-+++ b/build/pkgs/decorator/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([decorator], [SAGE_PYTHON_PACKAGE_CHECK([decorator])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 25693212572e69d452bc95c923ada13744359eb7 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 11 Oct 2021 20:38:03 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for idna.
-
----
- build/pkgs/idna/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/idna/spkg-configure.m4
-
-diff --git a/build/pkgs/idna/spkg-configure.m4 b/build/pkgs/idna/spkg-configure.m4
-new file mode 100644
-index 00000000..9d363f2
---- /dev/null
-+++ b/build/pkgs/idna/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([idna], [SAGE_PYTHON_PACKAGE_CHECK([idna])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 6d5616472f6cdc6cf496bba6fe07bd4ef44dfdaf Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 11 Oct 2021 20:39:23 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for certifi.
-
----
- build/pkgs/certifi/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/certifi/spkg-configure.m4
-
-diff --git a/build/pkgs/certifi/spkg-configure.m4 b/build/pkgs/certifi/spkg-configure.m4
-new file mode 100644
-index 00000000..ddd4061
---- /dev/null
-+++ b/build/pkgs/certifi/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([certifi], [SAGE_PYTHON_PACKAGE_CHECK([certifi])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 9412a07023b275e29e8d1af9b8ee3e767042e7fd Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 11 Oct 2021 20:40:59 -0400
-Subject: Trac #29665: new spkg-configure.m4 for pillow.
-
-This includes an SAGE_SPKG_DEPCHECK([bzip2 freetype libpng zlib],...
-because those dependencies wind up linked into shared libraries like,
-
-  /usr/.../PIL/_imagingft.cpython-39-x86_64-linux-gnu.so
-
-and potentially conflict with their SPKG counterparts.
----
- build/pkgs/pillow/spkg-configure.m4 | 5 +++++
- 1 file changed, 5 insertions(+)
- create mode 100644 build/pkgs/pillow/spkg-configure.m4
-
-diff --git a/build/pkgs/pillow/spkg-configure.m4 b/build/pkgs/pillow/spkg-configure.m4
-new file mode 100644
-index 00000000..f2e68e2
---- /dev/null
-+++ b/build/pkgs/pillow/spkg-configure.m4
-@@ -0,0 +1,5 @@
-+SAGE_SPKG_CONFIGURE([pillow], [
-+  SAGE_SPKG_DEPCHECK([bzip2 freetype libpng zlib], [
-+    SAGE_PYTHON_PACKAGE_CHECK([pillow])
-+  ])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From eede914311481fdb75b363b7a799075e876a2b4f Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 11 Oct 2021 20:44:13 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for mpmath.
-
----
- build/pkgs/mpmath/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/mpmath/spkg-configure.m4
-
-diff --git a/build/pkgs/mpmath/spkg-configure.m4 b/build/pkgs/mpmath/spkg-configure.m4
-new file mode 100644
-index 00000000..f43c838
---- /dev/null
-+++ b/build/pkgs/mpmath/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([mpmath], [SAGE_PYTHON_PACKAGE_CHECK([mpmath])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 363a825885832c0b580ff53fe61f5c79e70c4728 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 11 Oct 2021 20:44:56 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for sympy.
-
----
- build/pkgs/sympy/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/sympy/spkg-configure.m4
-
-diff --git a/build/pkgs/sympy/spkg-configure.m4 b/build/pkgs/sympy/spkg-configure.m4
-new file mode 100644
-index 00000000..fa0f1f5
---- /dev/null
-+++ b/build/pkgs/sympy/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([sympy], [SAGE_PYTHON_PACKAGE_CHECK([sympy])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 0667964c914e4a01dda697190a054ff96cea92d6 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 11 Oct 2021 20:47:06 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for pygments.
-
----
- build/pkgs/pygments/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pygments/spkg-configure.m4
-
-diff --git a/build/pkgs/pygments/spkg-configure.m4 b/build/pkgs/pygments/spkg-configure.m4
-new file mode 100644
-index 00000000..99f29e3
---- /dev/null
-+++ b/build/pkgs/pygments/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([pygments], [SAGE_PYTHON_PACKAGE_CHECK([pygments])])
--- 
-cgit v1.0-1-gd88e
-
-
-From f787c233aa05d8e90f7c6ad18f76bd2fa36bfbfb Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 11 Oct 2021 20:48:50 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for jinja2.
-
----
- build/pkgs/jinja2/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/jinja2/spkg-configure.m4
-
-diff --git a/build/pkgs/jinja2/spkg-configure.m4 b/build/pkgs/jinja2/spkg-configure.m4
-new file mode 100644
-index 00000000..0970d1c
---- /dev/null
-+++ b/build/pkgs/jinja2/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([jinja2], [SAGE_PYTHON_PACKAGE_CHECK([jinja2])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 309d8f8e2b7078b5efbbe824b69ec1d9b1e639f0 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Tue, 12 Oct 2021 08:43:24 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for pandocfilters.
-
----
- build/pkgs/pandocfilters/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/pandocfilters/spkg-configure.m4
-
-diff --git a/build/pkgs/pandocfilters/spkg-configure.m4 b/build/pkgs/pandocfilters/spkg-configure.m4
-new file mode 100644
-index 00000000..3e9537f
---- /dev/null
-+++ b/build/pkgs/pandocfilters/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([pandocfilters], [
-+  SAGE_PYTHON_PACKAGE_CHECK([pandocfilters])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From f57bfda49777a6ba1cd123553acd75dc347c5521 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Tue, 12 Oct 2021 08:44:46 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for webencodings.
-
----
- build/pkgs/webencodings/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/webencodings/spkg-configure.m4
-
-diff --git a/build/pkgs/webencodings/spkg-configure.m4 b/build/pkgs/webencodings/spkg-configure.m4
-new file mode 100644
-index 00000000..1b9a5c4
---- /dev/null
-+++ b/build/pkgs/webencodings/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([webencodings], [
-+  SAGE_PYTHON_PACKAGE_CHECK([webencodings])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From 7f193a62d7a2ea0b6a3ca6beb12390d91c25bbfb Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Tue, 12 Oct 2021 08:48:26 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for pytz.
-
----
- build/pkgs/pytz/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pytz/spkg-configure.m4
-
-diff --git a/build/pkgs/pytz/spkg-configure.m4 b/build/pkgs/pytz/spkg-configure.m4
-new file mode 100644
-index 00000000..366521b
---- /dev/null
-+++ b/build/pkgs/pytz/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([pytz], [SAGE_PYTHON_PACKAGE_CHECK([pytz])])
--- 
-cgit v1.0-1-gd88e
-
-
-From bfd3fdd887c3465c03465248de4997eed4a82915 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Tue, 12 Oct 2021 08:51:16 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for texttable.
-
----
- build/pkgs/texttable/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/texttable/spkg-configure.m4
-
-diff --git a/build/pkgs/texttable/spkg-configure.m4 b/build/pkgs/texttable/spkg-configure.m4
-new file mode 100644
-index 00000000..42a3de1
---- /dev/null
-+++ b/build/pkgs/texttable/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([texttable], [SAGE_PYTHON_PACKAGE_CHECK([texttable])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 914bf0cc57abc46129b27c1525782dbe16da31a2 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Tue, 12 Oct 2021 08:53:41 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for babel.
-
----
- build/pkgs/babel/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/babel/spkg-configure.m4
-
-diff --git a/build/pkgs/babel/spkg-configure.m4 b/build/pkgs/babel/spkg-configure.m4
-new file mode 100644
-index 00000000..d7b9a71
---- /dev/null
-+++ b/build/pkgs/babel/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([babel], [SAGE_PYTHON_PACKAGE_CHECK([babel])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 56977abd1eafbc87c765a2892cfe525382648259 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 14 Oct 2021 08:06:59 -0400
-Subject: Trac #29665: force system python3 with --enable-system-site-packages.
-
-When the python SPKG is used, the --enable-system-site-packages flag
-will essentially do nothing, and that may confuse users who have
-wasted a few hours building sage. (Generally, they will want to fix
-detection of their system python3 first.)
-
-To forestall that, we now set "--with-system-python3=force" whenever
-the "--enable-system-site-packages" flag is passed.
----
- configure.ac | 11 ++++++++++-
- 1 file changed, 10 insertions(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index db30a91..6fafb83 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -438,10 +438,19 @@ AC_ARG_ENABLE([download-from-upstream-url],
- AC_ARG_ENABLE(
-   [system-site-packages], [AS_HELP_STRING(
-     [--enable-system-site-packages],
--    [allow sage to use python packages from the system (experimental; default: no)]
-+    [allow the use of python packages from the system (experimental; default: no)]
-   )], [
-   AS_IF([test "x$enable_system_site_packages" = "xyes"], [
-     SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
-+
-+    dnl We want to raise an error if the user asked for "system site
-+    dnl packages" but the system python will not be used. Technically
-+    dnl that causes no problems (SAGE_PYTHON_PACKAGE_CHECK always fails,
-+    dnl so SPKGs are used for all python packages), but it may be confusing
-+    dnl to end users who expect the flag to actually give them access to
-+    dnl their system python packages and who may not be paying close
-+    dnl attention to their ./configure output.
-+    with_system_python3="force"
-   ])
- ])
- AC_SUBST([SAGE_VENV_FLAGS])
--- 
-cgit v1.0-1-gd88e
-
-
-From 02b369fd24ef7cf8997082e7850b9cf022cae34b Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Fri, 15 Oct 2021 01:18:35 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for setuptools.
-
----
- build/pkgs/setuptools/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/setuptools/spkg-configure.m4
-
-diff --git a/build/pkgs/setuptools/spkg-configure.m4 b/build/pkgs/setuptools/spkg-configure.m4
-new file mode 100644
-index 00000000..a2ad811
---- /dev/null
-+++ b/build/pkgs/setuptools/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([setuptools], [SAGE_PYTHON_PACKAGE_CHECK([setuptools])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 05117317d38693978efaf36e81d8b02bae44b257 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Fri, 15 Oct 2021 01:15:48 -0400
-Subject: Trac #29665: poison PYTHONUSERBASE when testing for "system"
- packages.
-
-When we're detecting system installations of python packages, we want
-to hide anything that was installed with e.g. "pip install --user". To
-accomplish that, we mimic the PYTHONUSERBASE poisoning from sage-env
-within the SAGE_PYTHON_PACKAGE_CHECK() macro.
----
- m4/sage_python_package_check.m4 | 18 +++++++++++++++++-
- 1 file changed, 17 insertions(+), 1 deletion(-)
-
-diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
-index 77b0a0c..b8cdba4 100644
---- a/m4/sage_python_package_check.m4
-+++ b/m4/sage_python_package_check.m4
-@@ -38,11 +38,27 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
-     dnl package.
-     SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
-     AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
-+
-+    dnl To prevent user-site (pip install --user) packages from being
-+    dnl detected as "system" packages, we poison PYTHONUSERBASE. The
-+    dnl sage-env script also does this at runtime; we mimic that
-+    dnl implementation to ensure that the behaviors at ./configure and
-+    dnl runtime are identical. Beware that (as in sage-env) the poisoning
-+    dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
-+    dnl user points PYTHONUSERBASE to any path (even the default), then
-+    dnl his local pip packages will be detected.
-+    PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
-+    AS_IF([test -z "${PYTHONUSERBASE}"], [
-+      PYTHONUSERBASE="${HOME}/.sage/local"
-+    ])
-+
-     AS_IF(
--      ["${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())"],
-+      [PYTHONUSERBASE="${PYTHONUSERBASE}" "${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" 2>/dev/null],
-       [AC_MSG_RESULT(yes)],
-       [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
-     )
-+
-+    PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
-   ], [
-     sage_spkg_install_$1=yes
-   ])
--- 
-cgit v1.0-1-gd88e
-
-
-From d75c1492f63a584b5ec5f424ddd7f7c4a6d502d3 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Fri, 15 Oct 2021 11:20:04 -0400
-Subject: Trac #29665: run SAGE_PYTHON_PACKAGE_CHECK() inside a venv.
-
-To recreate the runtime environment as closely as possible, we now use
-a venv (with system site packages enabled) when checking for system
-copies of python packages.
----
- m4/sage_python_package_check.m4 | 76 +++++++++++++++++++++++++++--------------
- 1 file changed, 51 insertions(+), 25 deletions(-)
-
-diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
-index b8cdba4..7cbd6c0 100644
---- a/m4/sage_python_package_check.m4
-+++ b/m4/sage_python_package_check.m4
-@@ -15,9 +15,11 @@
- #
- #     2. If we are not using the system python (no $PYTHON_FOR_VENV),
- #
--#     3. If setuptools is not available to the system python,
-+#     3. If we are unable to create a venv with the system python,
- #
--#     4. If the contents of install-requires.txt are not met (wrong
-+#     4. If setuptools is not available to the system python,
-+#
-+#     5. If the contents of install-requires.txt are not met (wrong
- #        version, no version, etc.) by the system python.
- #
- #   In any of those cases, we set sage_spkg_install_$package to "yes"
-@@ -27,38 +29,62 @@
- #
- #   The SAGE_SPKG_CONFIGURE_PYTHON3() macro is AC_REQUIRE'd to ensure
- #   that $PYTHON_FOR_VENV is available, if it is going to be available.
-+#   The check is run inside a new venv, and with the PYTHONUSERBASE
-+#   variable poisoned in the same manner as sage-env poisons it, to
-+#   ensure that the ./configure- and run-time views of the system
-+#   are as similar as possible.
- #
- 
- AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
-   AS_IF([test "${enable_system_site_packages}" = "yes"], [
-     AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
- 
--    dnl strip all comments from install-requires.txt; this should leave
--    dnl only a single line containing the version specification for this
--    dnl package.
--    SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
--    AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
-+    dnl We run this check inside a python venv, because that's ultimately
-+    dnl how the system $PYTHON_FOR_VENV will be used.
-+    AC_MSG_CHECKING([if we can create a python venv in config.venv])
- 
--    dnl To prevent user-site (pip install --user) packages from being
--    dnl detected as "system" packages, we poison PYTHONUSERBASE. The
--    dnl sage-env script also does this at runtime; we mimic that
--    dnl implementation to ensure that the behaviors at ./configure and
--    dnl runtime are identical. Beware that (as in sage-env) the poisoning
--    dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
--    dnl user points PYTHONUSERBASE to any path (even the default), then
--    dnl his local pip packages will be detected.
--    PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
--    AS_IF([test -z "${PYTHONUSERBASE}"], [
--      PYTHONUSERBASE="${HOME}/.sage/local"
--    ])
-+    dnl Use --clear because ./configure typically clobbers its output files.
-+    AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
-+                                        --clear                dnl
-+                                        --without-pip          dnl
-+					config.venv], [
-+      AC_MSG_RESULT(yes)
-+      dnl strip all comments from install-requires.txt; this should leave
-+      dnl only a single line containing the version specification for this
-+      dnl package.
-+      SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
-+      AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
-+
-+      dnl To prevent user-site (pip install --user) packages from being
-+      dnl detected as "system" packages, we poison PYTHONUSERBASE. The
-+      dnl sage-env script also does this at runtime; we mimic that
-+      dnl implementation to ensure that the behaviors at ./configure and
-+      dnl runtime are identical. Beware that (as in sage-env) the poisoning
-+      dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
-+      dnl user points PYTHONUSERBASE to any path (even the default), then
-+      dnl his local pip packages will be detected.
-+      PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
-+      AS_IF([test -z "${PYTHONUSERBASE}"], [
-+        PYTHONUSERBASE="${HOME}/.sage/local"
-+      ])
- 
--    AS_IF(
--      [PYTHONUSERBASE="${PYTHONUSERBASE}" "${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" 2>/dev/null],
--      [AC_MSG_RESULT(yes)],
--      [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
--    )
-+      AS_IF(
-+        [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
-+           "from setuptools.version import pkg_resources;              dnl
-+            pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" dnl
-+	 2>/dev/null],
-+        [AC_MSG_RESULT(yes)],
-+        [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
-+      )
-+
-+      PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
-+    ], [
-+      dnl failed to create a venv for some reason
-+      AC_MSG_RESULT(no)
-+      sage_spkg_install_$1=yes
-+    ])
- 
--    PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
-+    rm -rf config.venv
-   ], [
-     sage_spkg_install_$1=yes
-   ])
--- 
-cgit v1.0-1-gd88e
-
-
-From 87646c3264a04ffd98a12d67074f93e1943a1e96 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Fri, 15 Oct 2021 11:38:08 -0400
-Subject: Trac #29665: log SAGE_PYTHON_PACKAGE_CHECK() failures to config.log.
-
----
- m4/sage_python_package_check.m4 | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
-index 7cbd6c0..e0e0b9f 100644
---- a/m4/sage_python_package_check.m4
-+++ b/m4/sage_python_package_check.m4
-@@ -47,7 +47,8 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
-     AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
-                                         --clear                dnl
-                                         --without-pip          dnl
--					config.venv], [
-+                                        config.venv            dnl
-+                                        2>&AS_MESSAGE_LOG_FD], [
-       AC_MSG_RESULT(yes)
-       dnl strip all comments from install-requires.txt; this should leave
-       dnl only a single line containing the version specification for this
-@@ -72,7 +73,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
-         [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
-            "from setuptools.version import pkg_resources;              dnl
-             pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" dnl
--	 2>/dev/null],
-+	 2>&AS_MESSAGE_LOG_FD],
-         [AC_MSG_RESULT(yes)],
-         [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
-       )
--- 
-cgit v1.0-1-gd88e
-
-
-From f7dfffd1c64816e2ae4e0f420b22065c5c5bf2cb Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Fri, 15 Oct 2021 11:45:37 -0400
-Subject: Trac #29665: don't clobber a plain file named config.venv.
-
-When SAGE_PYTHON_PACKAGE_CHECK() is cleaning up, we no longer remove
-"config.venv" unconditionally. Instead, we remove it only if it is a
-directory. This is also how "pyvenv --clear" works.
----
- m4/sage_python_package_check.m4 | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
-index e0e0b9f..127a078 100644
---- a/m4/sage_python_package_check.m4
-+++ b/m4/sage_python_package_check.m4
-@@ -85,7 +85,9 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
-       sage_spkg_install_$1=yes
-     ])
- 
--    rm -rf config.venv
-+    dnl Clean up config.venv, but only if we could have created it.
-+    dnl (The --clear flag to pyvenv will not clobber a plain file.)
-+    AS_IF([test -d config.venv], [rm -rf config.venv])
-   ], [
-     sage_spkg_install_$1=yes
-   ])
--- 
-cgit v1.0-1-gd88e
-
-
-From 9849c77313b895dcfb786d2ea54e36585bd31ce2 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Sat, 16 Oct 2021 08:14:42 -0400
-Subject: Trac #29665: don't announce system python packages that won't be
- used.
-
-When --enable-system-site-packages was not given, the python packages
-using SAGE_PYTHON_PACKAGE_CHECK() in spkg-configure.m4 cannot be used.
-Rather than suggest that users install them anyway, that macro now
-hacks the value of sage_use_system_$package to be "no" when the use
-of system site packages is disabled at the python level.
----
- m4/sage_python_package_check.m4 | 17 +++++++++++++++++
- 1 file changed, 17 insertions(+)
-
-diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
-index 127a078..7ee82a7 100644
---- a/m4/sage_python_package_check.m4
-+++ b/m4/sage_python_package_check.m4
-@@ -89,6 +89,23 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
-     dnl (The --clear flag to pyvenv will not clobber a plain file.)
-     AS_IF([test -d config.venv], [rm -rf config.venv])
-   ], [
-+    dnl System site packages are disabled.
-     sage_spkg_install_$1=yes
-+
-+    dnl We have to retroactively hack the --with-system-foo={no,yes,force}
-+    dnl mechanism here because it wasn't designed with the ability to
-+    dnl disable arbitrary chunks of system packages in mind. The easy cases
-+    dnl are "no" and "force" which require no action; "no" means we won't
-+    dnl suggest the package anyway, and "force" will raise an error when
-+    dnl the system-package check fails.
-+    dnl
-+    dnl The default of "yes" is more troubling because it is the default. To
-+    dnl avoid prompting users to install packages that won't be used, we want
-+    dnl to ignore "yes" when reporting the "hint: install these packages..."
-+    dnl at the end of ./configure. To accomplish that, we change "yes" to
-+    dnl "no" here, essentially changing the default for packages using this
-+    dnl macro when --enable-system-site-packages is disabled. Packages with
-+    dnl "no" are not suggested to the user.
-+    AS_IF([test "${sage_use_system_$1}" = "yes"],[sage_use_system_$1=no])
-   ])
- ])
--- 
-cgit v1.0-1-gd88e
-
-
-From 3e6ad737b94aaac234d615ecaf1a2455eb607f1a Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Sun, 17 Oct 2021 06:16:21 -0400
-Subject: Trac #29665: add Gentoo package information for python packages.
-
----
- build/pkgs/babel/distros/gentoo.txt         | 1 +
- build/pkgs/bleach/distros/gentoo.txt        | 1 +
- build/pkgs/certifi/distros/gentoo.txt       | 1 +
- build/pkgs/cvxopt/distros/gentoo.txt        | 1 +
- build/pkgs/decorator/distros/gentoo.txt     | 1 +
- build/pkgs/html5lib/distros/gentoo.txt      | 1 +
- build/pkgs/idna/distros/gentoo.txt          | 1 +
- build/pkgs/jinja2/distros/gentoo.txt        | 1 +
- build/pkgs/matplotlib/distros/gentoo.txt    | 1 +
- build/pkgs/mpmath/distros/gentoo.txt        | 1 +
- build/pkgs/networkx/distros/gentoo.txt      | 1 +
- build/pkgs/numpy/distros/gentoo.txt         | 1 +
- build/pkgs/packaging/distros/gentoo.txt     | 1 +
- build/pkgs/pandocfilters/distros/gentoo.txt | 1 +
- build/pkgs/pickleshare/distros/gentoo.txt   | 1 +
- build/pkgs/pillow/distros/gentoo.txt        | 1 +
- build/pkgs/pluggy/distros/gentoo.txt        | 1 +
- build/pkgs/pygments/distros/gentoo.txt      | 1 +
- build/pkgs/pytz/distros/gentoo.txt          | 1 +
- build/pkgs/pyzmq/distros/gentoo.txt         | 1 +
- build/pkgs/requests/distros/gentoo.txt      | 1 +
- build/pkgs/scipy/distros/gentoo.txt         | 1 +
- build/pkgs/setuptools/distros/gentoo.txt    | 1 +
- build/pkgs/six/distros/gentoo.txt           | 1 +
- build/pkgs/sympy/distros/gentoo.txt         | 1 +
- build/pkgs/texttable/distros/gentoo.txt     | 1 +
- build/pkgs/toml/distros/gentoo.txt          | 1 +
- build/pkgs/webencodings/distros/gentoo.txt  | 1 +
- 28 files changed, 28 insertions(+)
- create mode 100644 build/pkgs/babel/distros/gentoo.txt
- create mode 100644 build/pkgs/bleach/distros/gentoo.txt
- create mode 100644 build/pkgs/certifi/distros/gentoo.txt
- create mode 100644 build/pkgs/cvxopt/distros/gentoo.txt
- create mode 100644 build/pkgs/decorator/distros/gentoo.txt
- create mode 100644 build/pkgs/html5lib/distros/gentoo.txt
- create mode 100644 build/pkgs/idna/distros/gentoo.txt
- create mode 100644 build/pkgs/jinja2/distros/gentoo.txt
- create mode 100644 build/pkgs/matplotlib/distros/gentoo.txt
- create mode 100644 build/pkgs/mpmath/distros/gentoo.txt
- create mode 100644 build/pkgs/networkx/distros/gentoo.txt
- create mode 100644 build/pkgs/numpy/distros/gentoo.txt
- create mode 100644 build/pkgs/packaging/distros/gentoo.txt
- create mode 100644 build/pkgs/pandocfilters/distros/gentoo.txt
- create mode 100644 build/pkgs/pickleshare/distros/gentoo.txt
- create mode 100644 build/pkgs/pillow/distros/gentoo.txt
- create mode 100644 build/pkgs/pluggy/distros/gentoo.txt
- create mode 100644 build/pkgs/pygments/distros/gentoo.txt
- create mode 100644 build/pkgs/pytz/distros/gentoo.txt
- create mode 100644 build/pkgs/pyzmq/distros/gentoo.txt
- create mode 100644 build/pkgs/requests/distros/gentoo.txt
- create mode 100644 build/pkgs/scipy/distros/gentoo.txt
- create mode 100644 build/pkgs/setuptools/distros/gentoo.txt
- create mode 100644 build/pkgs/six/distros/gentoo.txt
- create mode 100644 build/pkgs/sympy/distros/gentoo.txt
- create mode 100644 build/pkgs/texttable/distros/gentoo.txt
- create mode 100644 build/pkgs/toml/distros/gentoo.txt
- create mode 100644 build/pkgs/webencodings/distros/gentoo.txt
-
-diff --git a/build/pkgs/babel/distros/gentoo.txt b/build/pkgs/babel/distros/gentoo.txt
-new file mode 100644
-index 00000000..2d2c34f
---- /dev/null
-+++ b/build/pkgs/babel/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/Babel
-diff --git a/build/pkgs/bleach/distros/gentoo.txt b/build/pkgs/bleach/distros/gentoo.txt
-new file mode 100644
-index 00000000..b4f9744
---- /dev/null
-+++ b/build/pkgs/bleach/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/bleach
-diff --git a/build/pkgs/certifi/distros/gentoo.txt b/build/pkgs/certifi/distros/gentoo.txt
-new file mode 100644
-index 00000000..72e2e91
---- /dev/null
-+++ b/build/pkgs/certifi/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/certifi
-diff --git a/build/pkgs/cvxopt/distros/gentoo.txt b/build/pkgs/cvxopt/distros/gentoo.txt
-new file mode 100644
-index 00000000..b312391
---- /dev/null
-+++ b/build/pkgs/cvxopt/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/cvxopt
-diff --git a/build/pkgs/decorator/distros/gentoo.txt b/build/pkgs/decorator/distros/gentoo.txt
-new file mode 100644
-index 00000000..fea5a67
---- /dev/null
-+++ b/build/pkgs/decorator/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/decorator
-diff --git a/build/pkgs/html5lib/distros/gentoo.txt b/build/pkgs/html5lib/distros/gentoo.txt
-new file mode 100644
-index 00000000..6c2be76
---- /dev/null
-+++ b/build/pkgs/html5lib/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/html5lib
-diff --git a/build/pkgs/idna/distros/gentoo.txt b/build/pkgs/idna/distros/gentoo.txt
-new file mode 100644
-index 00000000..68ef51c
---- /dev/null
-+++ b/build/pkgs/idna/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/idna
-diff --git a/build/pkgs/jinja2/distros/gentoo.txt b/build/pkgs/jinja2/distros/gentoo.txt
-new file mode 100644
-index 00000000..15a27ae
---- /dev/null
-+++ b/build/pkgs/jinja2/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/jinja
-diff --git a/build/pkgs/matplotlib/distros/gentoo.txt b/build/pkgs/matplotlib/distros/gentoo.txt
-new file mode 100644
-index 00000000..bcfefb5
---- /dev/null
-+++ b/build/pkgs/matplotlib/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/matplotlib
-diff --git a/build/pkgs/mpmath/distros/gentoo.txt b/build/pkgs/mpmath/distros/gentoo.txt
-new file mode 100644
-index 00000000..946c62d
---- /dev/null
-+++ b/build/pkgs/mpmath/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/mpmath
-diff --git a/build/pkgs/networkx/distros/gentoo.txt b/build/pkgs/networkx/distros/gentoo.txt
-new file mode 100644
-index 00000000..dd97742
---- /dev/null
-+++ b/build/pkgs/networkx/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/networkx
-diff --git a/build/pkgs/numpy/distros/gentoo.txt b/build/pkgs/numpy/distros/gentoo.txt
-new file mode 100644
-index 00000000..d2179d4
---- /dev/null
-+++ b/build/pkgs/numpy/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/numpy
-diff --git a/build/pkgs/packaging/distros/gentoo.txt b/build/pkgs/packaging/distros/gentoo.txt
-new file mode 100644
-index 00000000..e5309ed
---- /dev/null
-+++ b/build/pkgs/packaging/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/packaging
-diff --git a/build/pkgs/pandocfilters/distros/gentoo.txt b/build/pkgs/pandocfilters/distros/gentoo.txt
-new file mode 100644
-index 00000000..a726fda
---- /dev/null
-+++ b/build/pkgs/pandocfilters/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/pandocfilters
-diff --git a/build/pkgs/pickleshare/distros/gentoo.txt b/build/pkgs/pickleshare/distros/gentoo.txt
-new file mode 100644
-index 00000000..14fad0f
---- /dev/null
-+++ b/build/pkgs/pickleshare/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/pickleshare
-diff --git a/build/pkgs/pillow/distros/gentoo.txt b/build/pkgs/pillow/distros/gentoo.txt
-new file mode 100644
-index 00000000..1243649
---- /dev/null
-+++ b/build/pkgs/pillow/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/pillow
-diff --git a/build/pkgs/pluggy/distros/gentoo.txt b/build/pkgs/pluggy/distros/gentoo.txt
-new file mode 100644
-index 00000000..7b33876
---- /dev/null
-+++ b/build/pkgs/pluggy/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/pluggy
-diff --git a/build/pkgs/pygments/distros/gentoo.txt b/build/pkgs/pygments/distros/gentoo.txt
-new file mode 100644
-index 00000000..a584f32
---- /dev/null
-+++ b/build/pkgs/pygments/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/pygments
-diff --git a/build/pkgs/pytz/distros/gentoo.txt b/build/pkgs/pytz/distros/gentoo.txt
-new file mode 100644
-index 00000000..902a18b
---- /dev/null
-+++ b/build/pkgs/pytz/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/pytz
-diff --git a/build/pkgs/pyzmq/distros/gentoo.txt b/build/pkgs/pyzmq/distros/gentoo.txt
-new file mode 100644
-index 00000000..77c2429
---- /dev/null
-+++ b/build/pkgs/pyzmq/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/pyzmq
-diff --git a/build/pkgs/requests/distros/gentoo.txt b/build/pkgs/requests/distros/gentoo.txt
-new file mode 100644
-index 00000000..d3dc941
---- /dev/null
-+++ b/build/pkgs/requests/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/requests
-diff --git a/build/pkgs/scipy/distros/gentoo.txt b/build/pkgs/scipy/distros/gentoo.txt
-new file mode 100644
-index 00000000..11dabd2
---- /dev/null
-+++ b/build/pkgs/scipy/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/scipy
-diff --git a/build/pkgs/setuptools/distros/gentoo.txt b/build/pkgs/setuptools/distros/gentoo.txt
-new file mode 100644
-index 00000000..3a4fa34
---- /dev/null
-+++ b/build/pkgs/setuptools/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/setuptools
-diff --git a/build/pkgs/six/distros/gentoo.txt b/build/pkgs/six/distros/gentoo.txt
-new file mode 100644
-index 00000000..f73f648
---- /dev/null
-+++ b/build/pkgs/six/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/six
-diff --git a/build/pkgs/sympy/distros/gentoo.txt b/build/pkgs/sympy/distros/gentoo.txt
-new file mode 100644
-index 00000000..b5a5034
---- /dev/null
-+++ b/build/pkgs/sympy/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/sympy
-diff --git a/build/pkgs/texttable/distros/gentoo.txt b/build/pkgs/texttable/distros/gentoo.txt
-new file mode 100644
-index 00000000..b33a7a7
---- /dev/null
-+++ b/build/pkgs/texttable/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/texttable
-diff --git a/build/pkgs/toml/distros/gentoo.txt b/build/pkgs/toml/distros/gentoo.txt
-new file mode 100644
-index 00000000..64fcea3
---- /dev/null
-+++ b/build/pkgs/toml/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/toml
-diff --git a/build/pkgs/webencodings/distros/gentoo.txt b/build/pkgs/webencodings/distros/gentoo.txt
-new file mode 100644
-index 00000000..7539b0f
---- /dev/null
-+++ b/build/pkgs/webencodings/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/webencodings
--- 
-cgit v1.0-1-gd88e
-
-
-From 088380f884124c9608160b613ba031c5f023f604 Mon Sep 17 00:00:00 2001
-From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
-Date: Sun, 17 Oct 2021 18:43:04 -0700
-Subject: build/pkgs: Add distros/fedora.txt for Python packages
-
----
- build/pkgs/babel/distros/fedora.txt         | 1 +
- build/pkgs/bleach/distros/fedora.txt        | 1 +
- build/pkgs/certifi/distros/fedora.txt       | 1 +
- build/pkgs/cvxopt/distros/fedora.txt        | 1 +
- build/pkgs/decorator/distros/fedora.txt     | 1 +
- build/pkgs/html5lib/distros/fedora.txt      | 1 +
- build/pkgs/idna/distros/fedora.txt          | 1 +
- build/pkgs/jinja2/distros/fedora.txt        | 1 +
- build/pkgs/matplotlib/distros/fedora.txt    | 1 +
- build/pkgs/mpmath/distros/fedora.txt        | 1 +
- build/pkgs/networkx/distros/fedora.txt      | 1 +
- build/pkgs/numpy/distros/fedora.txt         | 1 +
- build/pkgs/packaging/distros/fedora.txt     | 1 +
- build/pkgs/pandocfilters/distros/fedora.txt | 1 +
- build/pkgs/pickleshare/distros/fedora.txt   | 1 +
- build/pkgs/pillow/distros/fedora.txt        | 1 +
- build/pkgs/pluggy/distros/fedora.txt        | 1 +
- build/pkgs/py/distros/fedora.txt            | 1 +
- build/pkgs/pygments/distros/fedora.txt      | 1 +
- build/pkgs/pytz/distros/fedora.txt          | 1 +
- build/pkgs/pyzmq/distros/fedora.txt         | 1 +
- build/pkgs/requests/distros/fedora.txt      | 1 +
- build/pkgs/scipy/distros/fedora.txt         | 1 +
- build/pkgs/setuptools/distros/fedora.txt    | 1 +
- build/pkgs/six/distros/fedora.txt           | 1 +
- build/pkgs/sympy/distros/fedora.txt         | 1 +
- build/pkgs/texttable/distros/fedora.txt     | 1 +
- build/pkgs/toml/distros/fedora.txt          | 1 +
- build/pkgs/webencodings/distros/fedora.txt  | 1 +
- build/pkgs/wheel/distros/fedora.txt         | 1 +
- 30 files changed, 30 insertions(+)
- create mode 100644 build/pkgs/babel/distros/fedora.txt
- create mode 100644 build/pkgs/bleach/distros/fedora.txt
- create mode 100644 build/pkgs/certifi/distros/fedora.txt
- create mode 100644 build/pkgs/cvxopt/distros/fedora.txt
- create mode 100644 build/pkgs/decorator/distros/fedora.txt
- create mode 100644 build/pkgs/html5lib/distros/fedora.txt
- create mode 100644 build/pkgs/idna/distros/fedora.txt
- create mode 100644 build/pkgs/jinja2/distros/fedora.txt
- create mode 100644 build/pkgs/matplotlib/distros/fedora.txt
- create mode 100644 build/pkgs/mpmath/distros/fedora.txt
- create mode 100644 build/pkgs/networkx/distros/fedora.txt
- create mode 100644 build/pkgs/numpy/distros/fedora.txt
- create mode 100644 build/pkgs/packaging/distros/fedora.txt
- create mode 100644 build/pkgs/pandocfilters/distros/fedora.txt
- create mode 100644 build/pkgs/pickleshare/distros/fedora.txt
- create mode 100644 build/pkgs/pillow/distros/fedora.txt
- create mode 100644 build/pkgs/pluggy/distros/fedora.txt
- create mode 100644 build/pkgs/py/distros/fedora.txt
- create mode 100644 build/pkgs/pygments/distros/fedora.txt
- create mode 100644 build/pkgs/pytz/distros/fedora.txt
- create mode 100644 build/pkgs/pyzmq/distros/fedora.txt
- create mode 100644 build/pkgs/requests/distros/fedora.txt
- create mode 100644 build/pkgs/scipy/distros/fedora.txt
- create mode 100644 build/pkgs/setuptools/distros/fedora.txt
- create mode 100644 build/pkgs/six/distros/fedora.txt
- create mode 100644 build/pkgs/sympy/distros/fedora.txt
- create mode 100644 build/pkgs/texttable/distros/fedora.txt
- create mode 100644 build/pkgs/toml/distros/fedora.txt
- create mode 100644 build/pkgs/webencodings/distros/fedora.txt
- create mode 100644 build/pkgs/wheel/distros/fedora.txt
-
-diff --git a/build/pkgs/babel/distros/fedora.txt b/build/pkgs/babel/distros/fedora.txt
-new file mode 100644
-index 00000000..98f6593
---- /dev/null
-+++ b/build/pkgs/babel/distros/fedora.txt
-@@ -0,0 +1 @@
-+babel
-diff --git a/build/pkgs/bleach/distros/fedora.txt b/build/pkgs/bleach/distros/fedora.txt
-new file mode 100644
-index 00000000..c5422cc
---- /dev/null
-+++ b/build/pkgs/bleach/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-bleach
-diff --git a/build/pkgs/certifi/distros/fedora.txt b/build/pkgs/certifi/distros/fedora.txt
-new file mode 100644
-index 00000000..be421c8
---- /dev/null
-+++ b/build/pkgs/certifi/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-certifi
-diff --git a/build/pkgs/cvxopt/distros/fedora.txt b/build/pkgs/cvxopt/distros/fedora.txt
-new file mode 100644
-index 00000000..f15770f
---- /dev/null
-+++ b/build/pkgs/cvxopt/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-cvxopt
-diff --git a/build/pkgs/decorator/distros/fedora.txt b/build/pkgs/decorator/distros/fedora.txt
-new file mode 100644
-index 00000000..0795604
---- /dev/null
-+++ b/build/pkgs/decorator/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-decorator
-diff --git a/build/pkgs/html5lib/distros/fedora.txt b/build/pkgs/html5lib/distros/fedora.txt
-new file mode 100644
-index 00000000..b821491
---- /dev/null
-+++ b/build/pkgs/html5lib/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-html5lib
-diff --git a/build/pkgs/idna/distros/fedora.txt b/build/pkgs/idna/distros/fedora.txt
-new file mode 100644
-index 00000000..a73e70c
---- /dev/null
-+++ b/build/pkgs/idna/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-idna
-diff --git a/build/pkgs/jinja2/distros/fedora.txt b/build/pkgs/jinja2/distros/fedora.txt
-new file mode 100644
-index 00000000..f5f3caf
---- /dev/null
-+++ b/build/pkgs/jinja2/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-jinja2
-diff --git a/build/pkgs/matplotlib/distros/fedora.txt b/build/pkgs/matplotlib/distros/fedora.txt
-new file mode 100644
-index 00000000..f6d856e
---- /dev/null
-+++ b/build/pkgs/matplotlib/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-matplotlib
-diff --git a/build/pkgs/mpmath/distros/fedora.txt b/build/pkgs/mpmath/distros/fedora.txt
-new file mode 100644
-index 00000000..a7dc8d5
---- /dev/null
-+++ b/build/pkgs/mpmath/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-mpmath
-diff --git a/build/pkgs/networkx/distros/fedora.txt b/build/pkgs/networkx/distros/fedora.txt
-new file mode 100644
-index 00000000..293f943
---- /dev/null
-+++ b/build/pkgs/networkx/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-networkx
-diff --git a/build/pkgs/numpy/distros/fedora.txt b/build/pkgs/numpy/distros/fedora.txt
-new file mode 100644
-index 00000000..c8722b9
---- /dev/null
-+++ b/build/pkgs/numpy/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-numpy
-diff --git a/build/pkgs/packaging/distros/fedora.txt b/build/pkgs/packaging/distros/fedora.txt
-new file mode 100644
-index 00000000..02ad855
---- /dev/null
-+++ b/build/pkgs/packaging/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-packaging
-diff --git a/build/pkgs/pandocfilters/distros/fedora.txt b/build/pkgs/pandocfilters/distros/fedora.txt
-new file mode 100644
-index 00000000..e7a86d0
---- /dev/null
-+++ b/build/pkgs/pandocfilters/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-pandocfilters
-diff --git a/build/pkgs/pickleshare/distros/fedora.txt b/build/pkgs/pickleshare/distros/fedora.txt
-new file mode 100644
-index 00000000..6d991a2
---- /dev/null
-+++ b/build/pkgs/pickleshare/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-pickleshare
-diff --git a/build/pkgs/pillow/distros/fedora.txt b/build/pkgs/pillow/distros/fedora.txt
-new file mode 100644
-index 00000000..86dbb1d
---- /dev/null
-+++ b/build/pkgs/pillow/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-pillow
-diff --git a/build/pkgs/pluggy/distros/fedora.txt b/build/pkgs/pluggy/distros/fedora.txt
-new file mode 100644
-index 00000000..c869e54
---- /dev/null
-+++ b/build/pkgs/pluggy/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-pluggy
-diff --git a/build/pkgs/py/distros/fedora.txt b/build/pkgs/py/distros/fedora.txt
-new file mode 100644
-index 00000000..b348d39
---- /dev/null
-+++ b/build/pkgs/py/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-py
-diff --git a/build/pkgs/pygments/distros/fedora.txt b/build/pkgs/pygments/distros/fedora.txt
-new file mode 100644
-index 00000000..f3e72a8
---- /dev/null
-+++ b/build/pkgs/pygments/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-pygments
-diff --git a/build/pkgs/pytz/distros/fedora.txt b/build/pkgs/pytz/distros/fedora.txt
-new file mode 100644
-index 00000000..2cccc9e
---- /dev/null
-+++ b/build/pkgs/pytz/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-pytz
-diff --git a/build/pkgs/pyzmq/distros/fedora.txt b/build/pkgs/pyzmq/distros/fedora.txt
-new file mode 100644
-index 00000000..23f64d1
---- /dev/null
-+++ b/build/pkgs/pyzmq/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-pyzmq
-diff --git a/build/pkgs/requests/distros/fedora.txt b/build/pkgs/requests/distros/fedora.txt
-new file mode 100644
-index 00000000..93a7bc1
---- /dev/null
-+++ b/build/pkgs/requests/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-requests
-diff --git a/build/pkgs/scipy/distros/fedora.txt b/build/pkgs/scipy/distros/fedora.txt
-new file mode 100644
-index 00000000..7ff2882
---- /dev/null
-+++ b/build/pkgs/scipy/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-scipy
-diff --git a/build/pkgs/setuptools/distros/fedora.txt b/build/pkgs/setuptools/distros/fedora.txt
-new file mode 100644
-index 00000000..e1ad178
---- /dev/null
-+++ b/build/pkgs/setuptools/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-setuptools
-diff --git a/build/pkgs/six/distros/fedora.txt b/build/pkgs/six/distros/fedora.txt
-new file mode 100644
-index 00000000..787c530
---- /dev/null
-+++ b/build/pkgs/six/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-six
-diff --git a/build/pkgs/sympy/distros/fedora.txt b/build/pkgs/sympy/distros/fedora.txt
-new file mode 100644
-index 00000000..126c88a
---- /dev/null
-+++ b/build/pkgs/sympy/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-sympy
-diff --git a/build/pkgs/texttable/distros/fedora.txt b/build/pkgs/texttable/distros/fedora.txt
-new file mode 100644
-index 00000000..8d1ccec
---- /dev/null
-+++ b/build/pkgs/texttable/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-texttable
-diff --git a/build/pkgs/toml/distros/fedora.txt b/build/pkgs/toml/distros/fedora.txt
-new file mode 100644
-index 00000000..821ee77
---- /dev/null
-+++ b/build/pkgs/toml/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-toml
-diff --git a/build/pkgs/webencodings/distros/fedora.txt b/build/pkgs/webencodings/distros/fedora.txt
-new file mode 100644
-index 00000000..12ddba9
---- /dev/null
-+++ b/build/pkgs/webencodings/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-webencodings
-diff --git a/build/pkgs/wheel/distros/fedora.txt b/build/pkgs/wheel/distros/fedora.txt
-new file mode 100644
-index 00000000..ae4cbb9
---- /dev/null
-+++ b/build/pkgs/wheel/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-wheel
--- 
-cgit v1.0-1-gd88e
-
-
-From ad1d5a20380b147c774903066031442f31094626 Mon Sep 17 00:00:00 2001
-From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
-Date: Sun, 17 Oct 2021 21:04:04 -0700
-Subject: build/pkgs: Add distros/arch.txt for Python packages
-
----
- build/pkgs/babel/distros/arch.txt         | 1 +
- build/pkgs/bleach/distros/arch.txt        | 1 +
- build/pkgs/certifi/distros/arch.txt       | 1 +
- build/pkgs/cvxopt/distros/arch.txt        | 1 +
- build/pkgs/decorator/distros/arch.txt     | 1 +
- build/pkgs/html5lib/distros/arch.txt      | 1 +
- build/pkgs/idna/distros/arch.txt          | 1 +
- build/pkgs/matplotlib/distros/arch.txt    | 1 +
- build/pkgs/mpmath/distros/arch.txt        | 1 +
- build/pkgs/networkx/distros/arch.txt      | 1 +
- build/pkgs/numpy/distros/arch.txt         | 1 +
- build/pkgs/packaging/distros/arch.txt     | 1 +
- build/pkgs/pandocfilters/distros/arch.txt | 1 +
- build/pkgs/pickleshare/distros/arch.txt   | 1 +
- build/pkgs/pillow/distros/arch.txt        | 1 +
- build/pkgs/pluggy/distros/arch.txt        | 1 +
- build/pkgs/py/distros/arch.txt            | 1 +
- build/pkgs/pygments/distros/arch.txt      | 1 +
- build/pkgs/pytz/distros/arch.txt          | 1 +
- build/pkgs/pyzmq/distros/arch.txt         | 1 +
- build/pkgs/requests/distros/arch.txt      | 1 +
- build/pkgs/scipy/distros/arch.txt         | 1 +
- build/pkgs/setuptools/distros/arch.txt    | 1 +
- build/pkgs/six/distros/arch.txt           | 1 +
- build/pkgs/sympy/distros/arch.txt         | 1 +
- build/pkgs/texttable/distros/arch.txt     | 1 +
- build/pkgs/toml/distros/arch.txt          | 1 +
- build/pkgs/webencodings/distros/arch.txt  | 1 +
- build/pkgs/wheel/distros/arch.txt         | 1 +
- 29 files changed, 29 insertions(+)
- create mode 100644 build/pkgs/babel/distros/arch.txt
- create mode 100644 build/pkgs/bleach/distros/arch.txt
- create mode 100644 build/pkgs/certifi/distros/arch.txt
- create mode 100644 build/pkgs/cvxopt/distros/arch.txt
- create mode 100644 build/pkgs/decorator/distros/arch.txt
- create mode 100644 build/pkgs/html5lib/distros/arch.txt
- create mode 100644 build/pkgs/idna/distros/arch.txt
- create mode 100644 build/pkgs/matplotlib/distros/arch.txt
- create mode 100644 build/pkgs/mpmath/distros/arch.txt
- create mode 100644 build/pkgs/networkx/distros/arch.txt
- create mode 100644 build/pkgs/numpy/distros/arch.txt
- create mode 100644 build/pkgs/packaging/distros/arch.txt
- create mode 100644 build/pkgs/pandocfilters/distros/arch.txt
- create mode 100644 build/pkgs/pickleshare/distros/arch.txt
- create mode 100644 build/pkgs/pillow/distros/arch.txt
- create mode 100644 build/pkgs/pluggy/distros/arch.txt
- create mode 100644 build/pkgs/py/distros/arch.txt
- create mode 100644 build/pkgs/pygments/distros/arch.txt
- create mode 100644 build/pkgs/pytz/distros/arch.txt
- create mode 100644 build/pkgs/pyzmq/distros/arch.txt
- create mode 100644 build/pkgs/requests/distros/arch.txt
- create mode 100644 build/pkgs/scipy/distros/arch.txt
- create mode 100644 build/pkgs/setuptools/distros/arch.txt
- create mode 100644 build/pkgs/six/distros/arch.txt
- create mode 100644 build/pkgs/sympy/distros/arch.txt
- create mode 100644 build/pkgs/texttable/distros/arch.txt
- create mode 100644 build/pkgs/toml/distros/arch.txt
- create mode 100644 build/pkgs/webencodings/distros/arch.txt
- create mode 100644 build/pkgs/wheel/distros/arch.txt
-
-diff --git a/build/pkgs/babel/distros/arch.txt b/build/pkgs/babel/distros/arch.txt
-new file mode 100644
-index 00000000..f2d828c
---- /dev/null
-+++ b/build/pkgs/babel/distros/arch.txt
-@@ -0,0 +1 @@
-+python-babel
-diff --git a/build/pkgs/bleach/distros/arch.txt b/build/pkgs/bleach/distros/arch.txt
-new file mode 100644
-index 00000000..c5422cc
---- /dev/null
-+++ b/build/pkgs/bleach/distros/arch.txt
-@@ -0,0 +1 @@
-+python-bleach
-diff --git a/build/pkgs/certifi/distros/arch.txt b/build/pkgs/certifi/distros/arch.txt
-new file mode 100644
-index 00000000..be421c8
---- /dev/null
-+++ b/build/pkgs/certifi/distros/arch.txt
-@@ -0,0 +1 @@
-+python-certifi
-diff --git a/build/pkgs/cvxopt/distros/arch.txt b/build/pkgs/cvxopt/distros/arch.txt
-new file mode 100644
-index 00000000..f15770f
---- /dev/null
-+++ b/build/pkgs/cvxopt/distros/arch.txt
-@@ -0,0 +1 @@
-+python-cvxopt
-diff --git a/build/pkgs/decorator/distros/arch.txt b/build/pkgs/decorator/distros/arch.txt
-new file mode 100644
-index 00000000..0795604
---- /dev/null
-+++ b/build/pkgs/decorator/distros/arch.txt
-@@ -0,0 +1 @@
-+python-decorator
-diff --git a/build/pkgs/html5lib/distros/arch.txt b/build/pkgs/html5lib/distros/arch.txt
-new file mode 100644
-index 00000000..b821491
---- /dev/null
-+++ b/build/pkgs/html5lib/distros/arch.txt
-@@ -0,0 +1 @@
-+python-html5lib
-diff --git a/build/pkgs/idna/distros/arch.txt b/build/pkgs/idna/distros/arch.txt
-new file mode 100644
-index 00000000..a73e70c
---- /dev/null
-+++ b/build/pkgs/idna/distros/arch.txt
-@@ -0,0 +1 @@
-+python-idna
-diff --git a/build/pkgs/matplotlib/distros/arch.txt b/build/pkgs/matplotlib/distros/arch.txt
-new file mode 100644
-index 00000000..f6d856e
---- /dev/null
-+++ b/build/pkgs/matplotlib/distros/arch.txt
-@@ -0,0 +1 @@
-+python-matplotlib
-diff --git a/build/pkgs/mpmath/distros/arch.txt b/build/pkgs/mpmath/distros/arch.txt
-new file mode 100644
-index 00000000..a7dc8d5
---- /dev/null
-+++ b/build/pkgs/mpmath/distros/arch.txt
-@@ -0,0 +1 @@
-+python-mpmath
-diff --git a/build/pkgs/networkx/distros/arch.txt b/build/pkgs/networkx/distros/arch.txt
-new file mode 100644
-index 00000000..293f943
---- /dev/null
-+++ b/build/pkgs/networkx/distros/arch.txt
-@@ -0,0 +1 @@
-+python-networkx
-diff --git a/build/pkgs/numpy/distros/arch.txt b/build/pkgs/numpy/distros/arch.txt
-new file mode 100644
-index 00000000..c8722b9
---- /dev/null
-+++ b/build/pkgs/numpy/distros/arch.txt
-@@ -0,0 +1 @@
-+python-numpy
-diff --git a/build/pkgs/packaging/distros/arch.txt b/build/pkgs/packaging/distros/arch.txt
-new file mode 100644
-index 00000000..02ad855
---- /dev/null
-+++ b/build/pkgs/packaging/distros/arch.txt
-@@ -0,0 +1 @@
-+python-packaging
-diff --git a/build/pkgs/pandocfilters/distros/arch.txt b/build/pkgs/pandocfilters/distros/arch.txt
-new file mode 100644
-index 00000000..e7a86d0
---- /dev/null
-+++ b/build/pkgs/pandocfilters/distros/arch.txt
-@@ -0,0 +1 @@
-+python-pandocfilters
-diff --git a/build/pkgs/pickleshare/distros/arch.txt b/build/pkgs/pickleshare/distros/arch.txt
-new file mode 100644
-index 00000000..6d991a2
---- /dev/null
-+++ b/build/pkgs/pickleshare/distros/arch.txt
-@@ -0,0 +1 @@
-+python-pickleshare
-diff --git a/build/pkgs/pillow/distros/arch.txt b/build/pkgs/pillow/distros/arch.txt
-new file mode 100644
-index 00000000..86dbb1d
---- /dev/null
-+++ b/build/pkgs/pillow/distros/arch.txt
-@@ -0,0 +1 @@
-+python-pillow
-diff --git a/build/pkgs/pluggy/distros/arch.txt b/build/pkgs/pluggy/distros/arch.txt
-new file mode 100644
-index 00000000..c869e54
---- /dev/null
-+++ b/build/pkgs/pluggy/distros/arch.txt
-@@ -0,0 +1 @@
-+python-pluggy
-diff --git a/build/pkgs/py/distros/arch.txt b/build/pkgs/py/distros/arch.txt
-new file mode 100644
-index 00000000..b348d39
---- /dev/null
-+++ b/build/pkgs/py/distros/arch.txt
-@@ -0,0 +1 @@
-+python-py
-diff --git a/build/pkgs/pygments/distros/arch.txt b/build/pkgs/pygments/distros/arch.txt
-new file mode 100644
-index 00000000..f3e72a8
---- /dev/null
-+++ b/build/pkgs/pygments/distros/arch.txt
-@@ -0,0 +1 @@
-+python-pygments
-diff --git a/build/pkgs/pytz/distros/arch.txt b/build/pkgs/pytz/distros/arch.txt
-new file mode 100644
-index 00000000..2cccc9e
---- /dev/null
-+++ b/build/pkgs/pytz/distros/arch.txt
-@@ -0,0 +1 @@
-+python-pytz
-diff --git a/build/pkgs/pyzmq/distros/arch.txt b/build/pkgs/pyzmq/distros/arch.txt
-new file mode 100644
-index 00000000..23f64d1
---- /dev/null
-+++ b/build/pkgs/pyzmq/distros/arch.txt
-@@ -0,0 +1 @@
-+python-pyzmq
-diff --git a/build/pkgs/requests/distros/arch.txt b/build/pkgs/requests/distros/arch.txt
-new file mode 100644
-index 00000000..93a7bc1
---- /dev/null
-+++ b/build/pkgs/requests/distros/arch.txt
-@@ -0,0 +1 @@
-+python-requests
-diff --git a/build/pkgs/scipy/distros/arch.txt b/build/pkgs/scipy/distros/arch.txt
-new file mode 100644
-index 00000000..7ff2882
---- /dev/null
-+++ b/build/pkgs/scipy/distros/arch.txt
-@@ -0,0 +1 @@
-+python-scipy
-diff --git a/build/pkgs/setuptools/distros/arch.txt b/build/pkgs/setuptools/distros/arch.txt
-new file mode 100644
-index 00000000..e1ad178
---- /dev/null
-+++ b/build/pkgs/setuptools/distros/arch.txt
-@@ -0,0 +1 @@
-+python-setuptools
-diff --git a/build/pkgs/six/distros/arch.txt b/build/pkgs/six/distros/arch.txt
-new file mode 100644
-index 00000000..787c530
---- /dev/null
-+++ b/build/pkgs/six/distros/arch.txt
-@@ -0,0 +1 @@
-+python-six
-diff --git a/build/pkgs/sympy/distros/arch.txt b/build/pkgs/sympy/distros/arch.txt
-new file mode 100644
-index 00000000..126c88a
---- /dev/null
-+++ b/build/pkgs/sympy/distros/arch.txt
-@@ -0,0 +1 @@
-+python-sympy
-diff --git a/build/pkgs/texttable/distros/arch.txt b/build/pkgs/texttable/distros/arch.txt
-new file mode 100644
-index 00000000..8d1ccec
---- /dev/null
-+++ b/build/pkgs/texttable/distros/arch.txt
-@@ -0,0 +1 @@
-+python-texttable
-diff --git a/build/pkgs/toml/distros/arch.txt b/build/pkgs/toml/distros/arch.txt
-new file mode 100644
-index 00000000..821ee77
---- /dev/null
-+++ b/build/pkgs/toml/distros/arch.txt
-@@ -0,0 +1 @@
-+python-toml
-diff --git a/build/pkgs/webencodings/distros/arch.txt b/build/pkgs/webencodings/distros/arch.txt
-new file mode 100644
-index 00000000..12ddba9
---- /dev/null
-+++ b/build/pkgs/webencodings/distros/arch.txt
-@@ -0,0 +1 @@
-+python-webencodings
-diff --git a/build/pkgs/wheel/distros/arch.txt b/build/pkgs/wheel/distros/arch.txt
-new file mode 100644
-index 00000000..ae4cbb9
---- /dev/null
-+++ b/build/pkgs/wheel/distros/arch.txt
-@@ -0,0 +1 @@
-+python-wheel
--- 
-cgit v1.0-1-gd88e
-
-
-From 5087abee08f2a89ddaf422ec72a84575fe724a79 Mon Sep 17 00:00:00 2001
-From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
-Date: Sun, 17 Oct 2021 21:20:56 -0700
-Subject: build/pkgs: Add distros/opensuse.txt for Python packages
-
----
- build/pkgs/bleach/distros/opensuse.txt        | 1 +
- build/pkgs/cvxopt/distros/opensuse.txt        | 1 +
- build/pkgs/html5lib/distros/opensuse.txt      | 1 +
- build/pkgs/idna/distros/opensuse.txt          | 1 +
- build/pkgs/jinja2/distros/opensuse.txt        | 2 +-
- build/pkgs/mpmath/distros/opensuse.txt        | 1 +
- build/pkgs/numpy/distros/opensuse.txt         | 1 +
- build/pkgs/packaging/distros/opensuse.txt     | 1 +
- build/pkgs/pandocfilters/distros/opensuse.txt | 1 +
- build/pkgs/pluggy/distros/opensuse.txt        | 1 +
- build/pkgs/py/distros/opensuse.txt            | 1 +
- build/pkgs/pygments/distros/opensuse.txt      | 2 +-
- build/pkgs/sympy/distros/opensuse.txt         | 1 +
- build/pkgs/texttable/distros/opensuse.txt     | 1 +
- build/pkgs/toml/distros/opensuse.txt          | 1 +
- 15 files changed, 15 insertions(+), 2 deletions(-)
- create mode 100644 build/pkgs/bleach/distros/opensuse.txt
- create mode 100644 build/pkgs/cvxopt/distros/opensuse.txt
- create mode 100644 build/pkgs/html5lib/distros/opensuse.txt
- create mode 100644 build/pkgs/idna/distros/opensuse.txt
- create mode 100644 build/pkgs/mpmath/distros/opensuse.txt
- create mode 100644 build/pkgs/numpy/distros/opensuse.txt
- create mode 100644 build/pkgs/packaging/distros/opensuse.txt
- create mode 100644 build/pkgs/pandocfilters/distros/opensuse.txt
- create mode 100644 build/pkgs/pluggy/distros/opensuse.txt
- create mode 100644 build/pkgs/py/distros/opensuse.txt
- create mode 100644 build/pkgs/sympy/distros/opensuse.txt
- create mode 100644 build/pkgs/texttable/distros/opensuse.txt
- create mode 100644 build/pkgs/toml/distros/opensuse.txt
-
-diff --git a/build/pkgs/bleach/distros/opensuse.txt b/build/pkgs/bleach/distros/opensuse.txt
-new file mode 100644
-index 00000000..6d37c4c
---- /dev/null
-+++ b/build/pkgs/bleach/distros/opensuse.txt
-@@ -0,0 +1 @@
-+python3-bleach
-diff --git a/build/pkgs/cvxopt/distros/opensuse.txt b/build/pkgs/cvxopt/distros/opensuse.txt
-new file mode 100644
-index 00000000..2bb6ad1
---- /dev/null
-+++ b/build/pkgs/cvxopt/distros/opensuse.txt
-@@ -0,0 +1 @@
-+python3-cvxopt
-diff --git a/build/pkgs/html5lib/distros/opensuse.txt b/build/pkgs/html5lib/distros/opensuse.txt
-new file mode 100644
-index 00000000..6d7b8df
---- /dev/null
-+++ b/build/pkgs/html5lib/distros/opensuse.txt
-@@ -0,0 +1 @@
-+python3-html5lib
-diff --git a/build/pkgs/idna/distros/opensuse.txt b/build/pkgs/idna/distros/opensuse.txt
-new file mode 100644
-index 00000000..de48e70
---- /dev/null
-+++ b/build/pkgs/idna/distros/opensuse.txt
-@@ -0,0 +1 @@
-+python3-idna
-diff --git a/build/pkgs/jinja2/distros/opensuse.txt b/build/pkgs/jinja2/distros/opensuse.txt
-index 5d90a22..f2db865 100644
---- a/build/pkgs/jinja2/distros/opensuse.txt
-+++ b/build/pkgs/jinja2/distros/opensuse.txt
-@@ -1 +1 @@
--python3-Jinja2
-+python3-jinja2
-diff --git a/build/pkgs/mpmath/distros/opensuse.txt b/build/pkgs/mpmath/distros/opensuse.txt
-new file mode 100644
-index 00000000..fbc82a9
---- /dev/null
-+++ b/build/pkgs/mpmath/distros/opensuse.txt
-@@ -0,0 +1 @@
-+python3-mpmath
-diff --git a/build/pkgs/numpy/distros/opensuse.txt b/build/pkgs/numpy/distros/opensuse.txt
-new file mode 100644
-index 00000000..79d5c5a
---- /dev/null
-+++ b/build/pkgs/numpy/distros/opensuse.txt
-@@ -0,0 +1 @@
-+python3-numpy
-diff --git a/build/pkgs/packaging/distros/opensuse.txt b/build/pkgs/packaging/distros/opensuse.txt
-new file mode 100644
-index 00000000..8f1c0ff
---- /dev/null
-+++ b/build/pkgs/packaging/distros/opensuse.txt
-@@ -0,0 +1 @@
-+python3-packaging
-diff --git a/build/pkgs/pandocfilters/distros/opensuse.txt b/build/pkgs/pandocfilters/distros/opensuse.txt
-new file mode 100644
-index 00000000..d0d4c24
---- /dev/null
-+++ b/build/pkgs/pandocfilters/distros/opensuse.txt
-@@ -0,0 +1 @@
-+python3-pandocfilters
-diff --git a/build/pkgs/pluggy/distros/opensuse.txt b/build/pkgs/pluggy/distros/opensuse.txt
-new file mode 100644
-index 00000000..43a3acf
---- /dev/null
-+++ b/build/pkgs/pluggy/distros/opensuse.txt
-@@ -0,0 +1 @@
-+python3-pluggy
-diff --git a/build/pkgs/py/distros/opensuse.txt b/build/pkgs/py/distros/opensuse.txt
-new file mode 100644
-index 00000000..81fefe6
---- /dev/null
-+++ b/build/pkgs/py/distros/opensuse.txt
-@@ -0,0 +1 @@
-+python3-py
-diff --git a/build/pkgs/pygments/distros/opensuse.txt b/build/pkgs/pygments/distros/opensuse.txt
-index 9ff5740..3ab3792 100644
---- a/build/pkgs/pygments/distros/opensuse.txt
-+++ b/build/pkgs/pygments/distros/opensuse.txt
-@@ -1 +1 @@
--python3-Pygments
-+python3-pygments
-diff --git a/build/pkgs/sympy/distros/opensuse.txt b/build/pkgs/sympy/distros/opensuse.txt
-new file mode 100644
-index 00000000..db423c8
---- /dev/null
-+++ b/build/pkgs/sympy/distros/opensuse.txt
-@@ -0,0 +1 @@
-+python3-sympy
-diff --git a/build/pkgs/texttable/distros/opensuse.txt b/build/pkgs/texttable/distros/opensuse.txt
-new file mode 100644
-index 00000000..8f8e7e2
---- /dev/null
-+++ b/build/pkgs/texttable/distros/opensuse.txt
-@@ -0,0 +1 @@
-+python3-texttable
-diff --git a/build/pkgs/toml/distros/opensuse.txt b/build/pkgs/toml/distros/opensuse.txt
-new file mode 100644
-index 00000000..543e89d
---- /dev/null
-+++ b/build/pkgs/toml/distros/opensuse.txt
-@@ -0,0 +1 @@
-+python3-toml
--- 
-cgit v1.0-1-gd88e
-
-
-From a480ba7ace1370d106ae831e904ea22b72af1be7 Mon Sep 17 00:00:00 2001
-From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
-Date: Sun, 17 Oct 2021 22:45:04 -0700
-Subject: build/pkgs: Add distros/debian.txt for Python packages
-
----
- build/pkgs/babel/distros/debian.txt         | 1 +
- build/pkgs/bleach/distros/debian.txt        | 1 +
- build/pkgs/certifi/distros/debian.txt       | 1 +
- build/pkgs/cvxopt/distros/debian.txt        | 1 +
- build/pkgs/decorator/distros/debian.txt     | 1 +
- build/pkgs/html5lib/distros/debian.txt      | 1 +
- build/pkgs/idna/distros/debian.txt          | 1 +
- build/pkgs/jinja2/distros/debian.txt        | 1 +
- build/pkgs/matplotlib/distros/debian.txt    | 1 +
- build/pkgs/mpmath/distros/debian.txt        | 1 +
- build/pkgs/networkx/distros/debian.txt      | 1 +
- build/pkgs/numpy/distros/debian.txt         | 1 +
- build/pkgs/packaging/distros/debian.txt     | 1 +
- build/pkgs/pandocfilters/distros/debian.txt | 1 +
- build/pkgs/pickleshare/distros/debian.txt   | 1 +
- build/pkgs/pillow/distros/debian.txt        | 1 +
- build/pkgs/pluggy/distros/debian.txt        | 1 +
- build/pkgs/py/distros/debian.txt            | 1 +
- build/pkgs/pygments/distros/debian.txt      | 1 +
- build/pkgs/pytz/distros/debian.txt          | 1 +
- build/pkgs/requests/distros/debian.txt      | 1 +
- build/pkgs/scipy/distros/debian.txt         | 1 +
- build/pkgs/setuptools/distros/debian.txt    | 1 +
- build/pkgs/six/distros/debian.txt           | 1 +
- build/pkgs/sympy/distros/debian.txt         | 1 +
- build/pkgs/texttable/distros/debian.txt     | 1 +
- build/pkgs/toml/distros/debian.txt          | 1 +
- build/pkgs/webencodings/distros/debian.txt  | 1 +
- build/pkgs/wheel/distros/debian.txt         | 1 +
- 29 files changed, 29 insertions(+)
- create mode 100644 build/pkgs/babel/distros/debian.txt
- create mode 100644 build/pkgs/bleach/distros/debian.txt
- create mode 100644 build/pkgs/certifi/distros/debian.txt
- create mode 100644 build/pkgs/cvxopt/distros/debian.txt
- create mode 100644 build/pkgs/decorator/distros/debian.txt
- create mode 100644 build/pkgs/html5lib/distros/debian.txt
- create mode 100644 build/pkgs/idna/distros/debian.txt
- create mode 100644 build/pkgs/jinja2/distros/debian.txt
- create mode 100644 build/pkgs/matplotlib/distros/debian.txt
- create mode 100644 build/pkgs/mpmath/distros/debian.txt
- create mode 100644 build/pkgs/networkx/distros/debian.txt
- create mode 100644 build/pkgs/numpy/distros/debian.txt
- create mode 100644 build/pkgs/packaging/distros/debian.txt
- create mode 100644 build/pkgs/pandocfilters/distros/debian.txt
- create mode 100644 build/pkgs/pickleshare/distros/debian.txt
- create mode 100644 build/pkgs/pillow/distros/debian.txt
- create mode 100644 build/pkgs/pluggy/distros/debian.txt
- create mode 100644 build/pkgs/py/distros/debian.txt
- create mode 100644 build/pkgs/pygments/distros/debian.txt
- create mode 100644 build/pkgs/pytz/distros/debian.txt
- create mode 100644 build/pkgs/requests/distros/debian.txt
- create mode 100644 build/pkgs/scipy/distros/debian.txt
- create mode 100644 build/pkgs/setuptools/distros/debian.txt
- create mode 100644 build/pkgs/six/distros/debian.txt
- create mode 100644 build/pkgs/sympy/distros/debian.txt
- create mode 100644 build/pkgs/texttable/distros/debian.txt
- create mode 100644 build/pkgs/toml/distros/debian.txt
- create mode 100644 build/pkgs/webencodings/distros/debian.txt
- create mode 100644 build/pkgs/wheel/distros/debian.txt
-
-diff --git a/build/pkgs/babel/distros/debian.txt b/build/pkgs/babel/distros/debian.txt
-new file mode 100644
-index 00000000..e623eb6
---- /dev/null
-+++ b/build/pkgs/babel/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-babel
-diff --git a/build/pkgs/bleach/distros/debian.txt b/build/pkgs/bleach/distros/debian.txt
-new file mode 100644
-index 00000000..6d37c4c
---- /dev/null
-+++ b/build/pkgs/bleach/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-bleach
-diff --git a/build/pkgs/certifi/distros/debian.txt b/build/pkgs/certifi/distros/debian.txt
-new file mode 100644
-index 00000000..f585a82
---- /dev/null
-+++ b/build/pkgs/certifi/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-certifi
-diff --git a/build/pkgs/cvxopt/distros/debian.txt b/build/pkgs/cvxopt/distros/debian.txt
-new file mode 100644
-index 00000000..2bb6ad1
---- /dev/null
-+++ b/build/pkgs/cvxopt/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-cvxopt
-diff --git a/build/pkgs/decorator/distros/debian.txt b/build/pkgs/decorator/distros/debian.txt
-new file mode 100644
-index 00000000..46c478e
---- /dev/null
-+++ b/build/pkgs/decorator/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-decorator
-diff --git a/build/pkgs/html5lib/distros/debian.txt b/build/pkgs/html5lib/distros/debian.txt
-new file mode 100644
-index 00000000..6d7b8df
---- /dev/null
-+++ b/build/pkgs/html5lib/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-html5lib
-diff --git a/build/pkgs/idna/distros/debian.txt b/build/pkgs/idna/distros/debian.txt
-new file mode 100644
-index 00000000..de48e70
---- /dev/null
-+++ b/build/pkgs/idna/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-idna
-diff --git a/build/pkgs/jinja2/distros/debian.txt b/build/pkgs/jinja2/distros/debian.txt
-new file mode 100644
-index 00000000..f2db865
---- /dev/null
-+++ b/build/pkgs/jinja2/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-jinja2
-diff --git a/build/pkgs/matplotlib/distros/debian.txt b/build/pkgs/matplotlib/distros/debian.txt
-new file mode 100644
-index 00000000..1374329
---- /dev/null
-+++ b/build/pkgs/matplotlib/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-matplotlib
-diff --git a/build/pkgs/mpmath/distros/debian.txt b/build/pkgs/mpmath/distros/debian.txt
-new file mode 100644
-index 00000000..fbc82a9
---- /dev/null
-+++ b/build/pkgs/mpmath/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-mpmath
-diff --git a/build/pkgs/networkx/distros/debian.txt b/build/pkgs/networkx/distros/debian.txt
-new file mode 100644
-index 00000000..6779066
---- /dev/null
-+++ b/build/pkgs/networkx/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-networkx
-diff --git a/build/pkgs/numpy/distros/debian.txt b/build/pkgs/numpy/distros/debian.txt
-new file mode 100644
-index 00000000..79d5c5a
---- /dev/null
-+++ b/build/pkgs/numpy/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-numpy
-diff --git a/build/pkgs/packaging/distros/debian.txt b/build/pkgs/packaging/distros/debian.txt
-new file mode 100644
-index 00000000..8f1c0ff
---- /dev/null
-+++ b/build/pkgs/packaging/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-packaging
-diff --git a/build/pkgs/pandocfilters/distros/debian.txt b/build/pkgs/pandocfilters/distros/debian.txt
-new file mode 100644
-index 00000000..d0d4c24
---- /dev/null
-+++ b/build/pkgs/pandocfilters/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-pandocfilters
-diff --git a/build/pkgs/pickleshare/distros/debian.txt b/build/pkgs/pickleshare/distros/debian.txt
-new file mode 100644
-index 00000000..a00907d
---- /dev/null
-+++ b/build/pkgs/pickleshare/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-pickleshare
-diff --git a/build/pkgs/pillow/distros/debian.txt b/build/pkgs/pillow/distros/debian.txt
-new file mode 100644
-index 00000000..3319fcd
---- /dev/null
-+++ b/build/pkgs/pillow/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-pillow
-diff --git a/build/pkgs/pluggy/distros/debian.txt b/build/pkgs/pluggy/distros/debian.txt
-new file mode 100644
-index 00000000..43a3acf
---- /dev/null
-+++ b/build/pkgs/pluggy/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-pluggy
-diff --git a/build/pkgs/py/distros/debian.txt b/build/pkgs/py/distros/debian.txt
-new file mode 100644
-index 00000000..81fefe6
---- /dev/null
-+++ b/build/pkgs/py/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-py
-diff --git a/build/pkgs/pygments/distros/debian.txt b/build/pkgs/pygments/distros/debian.txt
-new file mode 100644
-index 00000000..3ab3792
---- /dev/null
-+++ b/build/pkgs/pygments/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-pygments
-diff --git a/build/pkgs/pytz/distros/debian.txt b/build/pkgs/pytz/distros/debian.txt
-new file mode 100644
-index 00000000..db20908
---- /dev/null
-+++ b/build/pkgs/pytz/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-tz
-diff --git a/build/pkgs/requests/distros/debian.txt b/build/pkgs/requests/distros/debian.txt
-new file mode 100644
-index 00000000..43147b2
---- /dev/null
-+++ b/build/pkgs/requests/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-requests
-diff --git a/build/pkgs/scipy/distros/debian.txt b/build/pkgs/scipy/distros/debian.txt
-new file mode 100644
-index 00000000..12b3666
---- /dev/null
-+++ b/build/pkgs/scipy/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-scipy
-diff --git a/build/pkgs/setuptools/distros/debian.txt b/build/pkgs/setuptools/distros/debian.txt
-new file mode 100644
-index 00000000..1c0901c
---- /dev/null
-+++ b/build/pkgs/setuptools/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-setuptools
-diff --git a/build/pkgs/six/distros/debian.txt b/build/pkgs/six/distros/debian.txt
-new file mode 100644
-index 00000000..68ff859
---- /dev/null
-+++ b/build/pkgs/six/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-six
-diff --git a/build/pkgs/sympy/distros/debian.txt b/build/pkgs/sympy/distros/debian.txt
-new file mode 100644
-index 00000000..db423c8
---- /dev/null
-+++ b/build/pkgs/sympy/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-sympy
-diff --git a/build/pkgs/texttable/distros/debian.txt b/build/pkgs/texttable/distros/debian.txt
-new file mode 100644
-index 00000000..8f8e7e2
---- /dev/null
-+++ b/build/pkgs/texttable/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-texttable
-diff --git a/build/pkgs/toml/distros/debian.txt b/build/pkgs/toml/distros/debian.txt
-new file mode 100644
-index 00000000..543e89d
---- /dev/null
-+++ b/build/pkgs/toml/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-toml
-diff --git a/build/pkgs/webencodings/distros/debian.txt b/build/pkgs/webencodings/distros/debian.txt
-new file mode 100644
-index 00000000..ac30c2f
---- /dev/null
-+++ b/build/pkgs/webencodings/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-webencodings
-diff --git a/build/pkgs/wheel/distros/debian.txt b/build/pkgs/wheel/distros/debian.txt
-new file mode 100644
-index 00000000..3c066725
---- /dev/null
-+++ b/build/pkgs/wheel/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-wheel
--- 
-cgit v1.0-1-gd88e
-
-
-From 93bf30d7de292551c3050e2dd74651d69ba4bd46 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 18 Oct 2021 07:50:34 -0400
-Subject: Trac #29665: add more documentation for SAGE_PYTHON_PACKAGE_CHECK().
-
-An earlier commit allows SAGE_PYTHON_PACKAGE_CHECK(package) to tweak the
-value of sage_use_system_$package if --enable-system-site-packages was
-not used. This essentially changes the default --with-system-$package=yes
-to "no" in that case. Here we update the documentation to reflect it.
----
- m4/sage_python_package_check.m4 | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
-index 7ee82a7..95eefd0 100644
---- a/m4/sage_python_package_check.m4
-+++ b/m4/sage_python_package_check.m4
-@@ -34,6 +34,10 @@
- #   ensure that the ./configure- and run-time views of the system
- #   are as similar as possible.
- #
-+#   To avoid suggesting these system packages to users who have not
-+#   set --enable-system-site-packages, this macro also changes the
-+#   default for --with-system-foo from "yes" to "no" in that case.
-+#
- 
- AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
-   AS_IF([test "${enable_system_site_packages}" = "yes"], [
--- 
-cgit v1.0-1-gd88e
-
-
-From d771e49d57ecdf3622434bc09cbfb87ad3bb7744 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 18 Oct 2021 07:42:46 -0400
-Subject: Trac #29665: improve SAGE_PYTHON_PACKAGE_CHECK() failure message.
-
-When --enable-system-site-packages is off, SAGE_PYTHON_PACKAGE_CHECK()
-will always install the corresponding SPKG. We improve the ./configure
-output in that case to make it clear that the decision was based on
-the value of --enable-system-site-packages and not the "real" check.
----
- m4/sage_python_package_check.m4 | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
-index 95eefd0..5f0f084 100644
---- a/m4/sage_python_package_check.m4
-+++ b/m4/sage_python_package_check.m4
-@@ -40,7 +40,9 @@
- #
- 
- AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
-+  AC_MSG_CHECKING([if --enable-system-site-packages was used])
-   AS_IF([test "${enable_system_site_packages}" = "yes"], [
-+    AC_MSG_RESULT(yes)
-     AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
- 
-     dnl We run this check inside a python venv, because that's ultimately
-@@ -94,6 +96,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
-     AS_IF([test -d config.venv], [rm -rf config.venv])
-   ], [
-     dnl System site packages are disabled.
-+    AC_MSG_RESULT(no; skipping check)
-     sage_spkg_install_$1=yes
- 
-     dnl We have to retroactively hack the --with-system-foo={no,yes,force}
--- 
-cgit v1.0-1-gd88e
-
-
-From 5bb43c1b78a1deb3364f235305937c2f823e5e18 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Sun, 24 Oct 2021 20:29:25 -0400
-Subject: Trac #29665: use sage-venv in SAGE_PYTHON_PACKAGE_CHECK().
-
-For consistency with the rest of the build system, we now use the
-build/bin/sage-venv script to create the venv in this autoconf macro
-rather than invoking $PYTHON_FOR_VENV with "-m venv" directly.
----
- m4/sage_python_package_check.m4 | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
-index 5f0f084..5547b35 100644
---- a/m4/sage_python_package_check.m4
-+++ b/m4/sage_python_package_check.m4
-@@ -50,11 +50,11 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
-     AC_MSG_CHECKING([if we can create a python venv in config.venv])
- 
-     dnl Use --clear because ./configure typically clobbers its output files.
--    AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
--                                        --clear                dnl
--                                        --without-pip          dnl
--                                        config.venv            dnl
--                                        2>&AS_MESSAGE_LOG_FD], [
-+    AS_IF(["${PYTHON_FOR_VENV}" build/bin/sage-venv      dnl
-+                                  --system-site-packages dnl
-+                                  --clear                dnl
-+                                  config.venv            dnl
-+                                  2>&AS_MESSAGE_LOG_FD], [
-       AC_MSG_RESULT(yes)
-       dnl strip all comments from install-requires.txt; this should leave
-       dnl only a single line containing the version specification for this
--- 
-cgit v1.0-1-gd88e
-
-
-From c78363d6326addff16ca5abac897949a6be72bf4 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 18:10:30 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for urllib3.
-
----
- build/pkgs/urllib3/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/urllib3/spkg-configure.m4
-
-diff --git a/build/pkgs/urllib3/spkg-configure.m4 b/build/pkgs/urllib3/spkg-configure.m4
-new file mode 100644
-index 00000000..d7ef3e1
---- /dev/null
-+++ b/build/pkgs/urllib3/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([urllib3], [SAGE_PYTHON_PACKAGE_CHECK([urllib3])])
--- 
-cgit v1.0-1-gd88e
-
-
-From f416d5abcae495ea8301fad024b279ea9e997b29 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 18:15:18 -0400
-Subject: Trac #29665: add Gentoo package information for urllib3.
-
----
- build/pkgs/urllib3/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/urllib3/distros/gentoo.txt
-
-diff --git a/build/pkgs/urllib3/distros/gentoo.txt b/build/pkgs/urllib3/distros/gentoo.txt
-new file mode 100644
-index 00000000..172a535
---- /dev/null
-+++ b/build/pkgs/urllib3/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/urllib3
--- 
-cgit v1.0-1-gd88e
-
-
-From 852068b992bf7959500c650f54cb92e5b68d7ef8 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 18:15:58 -0400
-Subject: Trac #29665: add Gentoo package information for nbformat.
-
----
- build/pkgs/nbformat/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/nbformat/distros/gentoo.txt
-
-diff --git a/build/pkgs/nbformat/distros/gentoo.txt b/build/pkgs/nbformat/distros/gentoo.txt
-new file mode 100644
-index 00000000..006b1f2
---- /dev/null
-+++ b/build/pkgs/nbformat/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/nbformat
--- 
-cgit v1.0-1-gd88e
-
-
-From 66179fd28fcc92ee840dcd87bb4db25cea968d66 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 18:34:16 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for nbformat.
-
----
- build/pkgs/nbformat/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/nbformat/spkg-configure.m4
-
-diff --git a/build/pkgs/nbformat/spkg-configure.m4 b/build/pkgs/nbformat/spkg-configure.m4
-new file mode 100644
-index 00000000..5a7f8c4
---- /dev/null
-+++ b/build/pkgs/nbformat/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([nbformat], [SAGE_PYTHON_PACKAGE_CHECK([nbformat])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 874005e81ed20f27a5f895030dcdbdfc5f73ad80 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 18:47:01 -0400
-Subject: Trac #29665: add Gentoo package information for zipp.
-
----
- build/pkgs/zipp/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/zipp/distros/gentoo.txt
-
-diff --git a/build/pkgs/zipp/distros/gentoo.txt b/build/pkgs/zipp/distros/gentoo.txt
-new file mode 100644
-index 00000000..7f59450
---- /dev/null
-+++ b/build/pkgs/zipp/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/zipp
--- 
-cgit v1.0-1-gd88e
-
-
-From 0cc2a7355b5554c1fb79c742ebf02eff54465b3e Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 18:47:35 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for zipp.
-
----
- build/pkgs/zipp/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/zipp/spkg-configure.m4
-
-diff --git a/build/pkgs/zipp/spkg-configure.m4 b/build/pkgs/zipp/spkg-configure.m4
-new file mode 100644
-index 00000000..0fe3a9c
---- /dev/null
-+++ b/build/pkgs/zipp/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([zipp], [SAGE_PYTHON_PACKAGE_CHECK([zipp])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 6073ad8e56c21fc862749bbd84a56d543fb9458c Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 18:48:37 -0400
-Subject: Trac #29665: add Gentoo package information for wcwidth.
-
----
- build/pkgs/wcwidth/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/wcwidth/distros/gentoo.txt
-
-diff --git a/build/pkgs/wcwidth/distros/gentoo.txt b/build/pkgs/wcwidth/distros/gentoo.txt
-new file mode 100644
-index 00000000..edeb80b
---- /dev/null
-+++ b/build/pkgs/wcwidth/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/wcwidth
--- 
-cgit v1.0-1-gd88e
-
-
-From 9793d6172c64d61a015fbe61bd45863759124fad Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 18:51:10 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for wcwidth.
-
----
- build/pkgs/wcwidth/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/wcwidth/spkg-configure.m4
-
-diff --git a/build/pkgs/wcwidth/spkg-configure.m4 b/build/pkgs/wcwidth/spkg-configure.m4
-new file mode 100644
-index 00000000..5bde15a
---- /dev/null
-+++ b/build/pkgs/wcwidth/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([wcwidth], [SAGE_PYTHON_PACKAGE_CHECK([wcwidth])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 20232f370a43c146ca4e696c72a2cbcc498db060 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 18:52:36 -0400
-Subject: Trac #29665: add Gentoo package information for testpath.
-
----
- build/pkgs/testpath/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/testpath/distros/gentoo.txt
-
-diff --git a/build/pkgs/testpath/distros/gentoo.txt b/build/pkgs/testpath/distros/gentoo.txt
-new file mode 100644
-index 00000000..efa10a0
---- /dev/null
-+++ b/build/pkgs/testpath/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/testpath
--- 
-cgit v1.0-1-gd88e
-
-
-From 1b0785b2aad8844e74345fe950baf097e2b43d24 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 18:55:22 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for testpath.
-
----
- build/pkgs/testpath/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/testpath/spkg-configure.m4
-
-diff --git a/build/pkgs/testpath/spkg-configure.m4 b/build/pkgs/testpath/spkg-configure.m4
-new file mode 100644
-index 00000000..d8fc2a7
---- /dev/null
-+++ b/build/pkgs/testpath/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([testpath], [SAGE_PYTHON_PACKAGE_CHECK([testpath])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 10fc3829ecd956d732b1b069fdfe81f0d6d5cdc2 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 18:56:06 -0400
-Subject: Trac #29665: add Gentoo package information for jedi.
-
----
- build/pkgs/jedi/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/jedi/distros/gentoo.txt
-
-diff --git a/build/pkgs/jedi/distros/gentoo.txt b/build/pkgs/jedi/distros/gentoo.txt
-new file mode 100644
-index 00000000..6c85a46
---- /dev/null
-+++ b/build/pkgs/jedi/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/jedi
--- 
-cgit v1.0-1-gd88e
-
-
-From a75824d74c281c7639028ca01dabeed266f56998 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:06:37 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for jedi.
-
----
- build/pkgs/jedi/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/jedi/spkg-configure.m4
-
-diff --git a/build/pkgs/jedi/spkg-configure.m4 b/build/pkgs/jedi/spkg-configure.m4
-new file mode 100644
-index 00000000..a37dbcc
---- /dev/null
-+++ b/build/pkgs/jedi/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([jedi], [SAGE_PYTHON_PACKAGE_CHECK([jedi])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 17af01373d43f6acbbdbc23e073e372d3fdadf8b Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:07:47 -0400
-Subject: Trac #29665: add Gentoo package information for tomli.
-
----
- build/pkgs/tomli/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/tomli/distros/gentoo.txt
-
-diff --git a/build/pkgs/tomli/distros/gentoo.txt b/build/pkgs/tomli/distros/gentoo.txt
-new file mode 100644
-index 00000000..0458e25
---- /dev/null
-+++ b/build/pkgs/tomli/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/tomli
--- 
-cgit v1.0-1-gd88e
-
-
-From 0d3b5994ae612be11992467c4a3f1a74b81400fe Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:08:12 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for tomli.
-
----
- build/pkgs/tomli/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/tomli/spkg-configure.m4
-
-diff --git a/build/pkgs/tomli/spkg-configure.m4 b/build/pkgs/tomli/spkg-configure.m4
-new file mode 100644
-index 00000000..95a8b8b
---- /dev/null
-+++ b/build/pkgs/tomli/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([tomli], [SAGE_PYTHON_PACKAGE_CHECK([tomli])])
--- 
-cgit v1.0-1-gd88e
-
-
-From dce1c515781b0eeb8eb9c2bc7aba581560c1fac1 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:09:22 -0400
-Subject: Trac #29665: add Gentoo package information for defusedxml.
-
----
- build/pkgs/defusedxml/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/defusedxml/distros/gentoo.txt
-
-diff --git a/build/pkgs/defusedxml/distros/gentoo.txt b/build/pkgs/defusedxml/distros/gentoo.txt
-new file mode 100644
-index 00000000..2804214
---- /dev/null
-+++ b/build/pkgs/defusedxml/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/defusedxml
--- 
-cgit v1.0-1-gd88e
-
-
-From 02e1e1cd7f8bdae3ca5b7d35ce70af28a44e9b7c Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:11:14 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for defusedxml.
-
----
- build/pkgs/defusedxml/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/defusedxml/spkg-configure.m4
-
-diff --git a/build/pkgs/defusedxml/spkg-configure.m4 b/build/pkgs/defusedxml/spkg-configure.m4
-new file mode 100644
-index 00000000..e02f345
---- /dev/null
-+++ b/build/pkgs/defusedxml/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([defusedxml], [SAGE_PYTHON_PACKAGE_CHECK([defusedxml])])
--- 
-cgit v1.0-1-gd88e
-
-
-From e0ba4ebb5cfc637b5d26b85de9f34e0a160d2b9c Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:12:22 -0400
-Subject: Trac #29665: add Gentoo package information for ipywidgets.
-
----
- build/pkgs/ipywidgets/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/ipywidgets/distros/gentoo.txt
-
-diff --git a/build/pkgs/ipywidgets/distros/gentoo.txt b/build/pkgs/ipywidgets/distros/gentoo.txt
-new file mode 100644
-index 00000000..7c76967
---- /dev/null
-+++ b/build/pkgs/ipywidgets/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/ipywidgets
--- 
-cgit v1.0-1-gd88e
-
-
-From 49df7e7d93c7a31b7c46d5d224a35fd313a29a32 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:15:53 -0400
-Subject: Trac #29665: add Gentoo package information for simplegeneric.
-
----
- build/pkgs/simplegeneric/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/simplegeneric/distros/gentoo.txt
-
-diff --git a/build/pkgs/simplegeneric/distros/gentoo.txt b/build/pkgs/simplegeneric/distros/gentoo.txt
-new file mode 100644
-index 00000000..a86e90d
---- /dev/null
-+++ b/build/pkgs/simplegeneric/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/simplegeneric
--- 
-cgit v1.0-1-gd88e
-
-
-From 2a893635d5804749e6fec7ed7289c921ecb5300a Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:16:33 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for simplegeneric.
-
----
- build/pkgs/simplegeneric/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/simplegeneric/spkg-configure.m4
-
-diff --git a/build/pkgs/simplegeneric/spkg-configure.m4 b/build/pkgs/simplegeneric/spkg-configure.m4
-new file mode 100644
-index 00000000..13715ab
---- /dev/null
-+++ b/build/pkgs/simplegeneric/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([simplegeneric], [SAGE_PYTHON_PACKAGE_CHECK([simplegeneric])])
--- 
-cgit v1.0-1-gd88e
-
-
-From a8fe7ecd6e3163e7d01261e5497ac452a8cc95ab Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:17:18 -0400
-Subject: Trac #29665: add Gentoo package information for imagesize.
-
----
- build/pkgs/imagesize/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/imagesize/distros/gentoo.txt
-
-diff --git a/build/pkgs/imagesize/distros/gentoo.txt b/build/pkgs/imagesize/distros/gentoo.txt
-new file mode 100644
-index 00000000..54350ba
---- /dev/null
-+++ b/build/pkgs/imagesize/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/imagesize
--- 
-cgit v1.0-1-gd88e
-
-
-From 2ad837c5dd1fca0f50ce6d5042a9344210a54f84 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:17:48 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for imagesize.
-
----
- build/pkgs/imagesize/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/imagesize/spkg-configure.m4
-
-diff --git a/build/pkgs/imagesize/spkg-configure.m4 b/build/pkgs/imagesize/spkg-configure.m4
-new file mode 100644
-index 00000000..20210ef
---- /dev/null
-+++ b/build/pkgs/imagesize/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([imagesize], [SAGE_PYTHON_PACKAGE_CHECK([imagesize])])
--- 
-cgit v1.0-1-gd88e
-
-
-From bf47415b5bfca2d7bf24e20de35662bf331623b9 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:18:49 -0400
-Subject: Trac #29665: add Gentoo package information for mistune.
-
----
- build/pkgs/mistune/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/mistune/distros/gentoo.txt
-
-diff --git a/build/pkgs/mistune/distros/gentoo.txt b/build/pkgs/mistune/distros/gentoo.txt
-new file mode 100644
-index 00000000..56f0a4e
---- /dev/null
-+++ b/build/pkgs/mistune/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/mistune
--- 
-cgit v1.0-1-gd88e
-
-
-From 6898a74fd0c65a40c5220ba68b4062ac6fe060c6 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:21:30 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for mistune.
-
----
- build/pkgs/mistune/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/mistune/spkg-configure.m4
-
-diff --git a/build/pkgs/mistune/spkg-configure.m4 b/build/pkgs/mistune/spkg-configure.m4
-new file mode 100644
-index 00000000..972f33d
---- /dev/null
-+++ b/build/pkgs/mistune/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([mistune], [SAGE_PYTHON_PACKAGE_CHECK([mistune])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 62735e4ccf2031cd39eb5e04b03bdfd97005d808 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:22:48 -0400
-Subject: Trac #29665: add Gentoo package information for backcall.
-
----
- build/pkgs/backcall/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/backcall/distros/gentoo.txt
-
-diff --git a/build/pkgs/backcall/distros/gentoo.txt b/build/pkgs/backcall/distros/gentoo.txt
-new file mode 100644
-index 00000000..266a222
---- /dev/null
-+++ b/build/pkgs/backcall/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/backcall
--- 
-cgit v1.0-1-gd88e
-
-
-From 9ef3ea42d4a33c7cdb623fa5417ae300cf323183 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:25:10 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for backcall.
-
----
- build/pkgs/backcall/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/backcall/spkg-configure.m4
-
-diff --git a/build/pkgs/backcall/spkg-configure.m4 b/build/pkgs/backcall/spkg-configure.m4
-new file mode 100644
-index 00000000..d6b11c4
---- /dev/null
-+++ b/build/pkgs/backcall/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([backcall], [SAGE_PYTHON_PACKAGE_CHECK([backcall])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 1b3ea2a3c40fea0fb58435f5e5304368ea58dff8 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:25:58 -0400
-Subject: Trac #29665: add Gentoo package information for parso.
-
----
- build/pkgs/parso/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/parso/distros/gentoo.txt
-
-diff --git a/build/pkgs/parso/distros/gentoo.txt b/build/pkgs/parso/distros/gentoo.txt
-new file mode 100644
-index 00000000..f9ce4c7
---- /dev/null
-+++ b/build/pkgs/parso/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/parso
--- 
-cgit v1.0-1-gd88e
-
-
-From 963a3a2c563ec71a1f5be2395722d0e824cb0b11 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:26:22 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for parso.
-
----
- build/pkgs/parso/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/parso/spkg-configure.m4
-
-diff --git a/build/pkgs/parso/spkg-configure.m4 b/build/pkgs/parso/spkg-configure.m4
-new file mode 100644
-index 00000000..1ca6f1b
---- /dev/null
-+++ b/build/pkgs/parso/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([parso], [SAGE_PYTHON_PACKAGE_CHECK([parso])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 943053dfc474b6549bcc7d6ef2971ea43588b35c Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:27:00 -0400
-Subject: Trac #29665: add Gentoo package information for pyparsing.
-
----
- build/pkgs/pyparsing/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pyparsing/distros/gentoo.txt
-
-diff --git a/build/pkgs/pyparsing/distros/gentoo.txt b/build/pkgs/pyparsing/distros/gentoo.txt
-new file mode 100644
-index 00000000..ef0419f
---- /dev/null
-+++ b/build/pkgs/pyparsing/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/pyparsing
--- 
-cgit v1.0-1-gd88e
-
-
-From bd682eaa2ac41dd84e7a52e2b0c5442fc8fd8919 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:27:30 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for pyparsing.
-
----
- build/pkgs/pyparsing/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pyparsing/spkg-configure.m4
-
-diff --git a/build/pkgs/pyparsing/spkg-configure.m4 b/build/pkgs/pyparsing/spkg-configure.m4
-new file mode 100644
-index 00000000..d2b4c00
---- /dev/null
-+++ b/build/pkgs/pyparsing/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([pyparsing], [SAGE_PYTHON_PACKAGE_CHECK([pyparsing])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 74f36a9c0ec7c63b7e6c40066e42f4b15c2f978e Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:17:42 -0400
-Subject: Trac #29665: add Gentoo package information for debugpy.
-
----
- build/pkgs/debugpy/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/debugpy/distros/gentoo.txt
-
-diff --git a/build/pkgs/debugpy/distros/gentoo.txt b/build/pkgs/debugpy/distros/gentoo.txt
-new file mode 100644
-index 00000000..8b797ce
---- /dev/null
-+++ b/build/pkgs/debugpy/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/debugpy
--- 
-cgit v1.0-1-gd88e
-
-
-From be072fa87ac5c373d9dc9b54c0bd68734d5709bc Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:21:17 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for debugpy.
-
----
- build/pkgs/debugpy/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/debugpy/spkg-configure.m4
-
-diff --git a/build/pkgs/debugpy/spkg-configure.m4 b/build/pkgs/debugpy/spkg-configure.m4
-new file mode 100644
-index 00000000..db605ff
---- /dev/null
-+++ b/build/pkgs/debugpy/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([debugpy], [SAGE_PYTHON_PACKAGE_CHECK([debugpy])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 6f777ce2f2e14b94e91c8b7bbac82f9017460aba Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:23:56 -0400
-Subject: Trac #29665: add Gentoo package information for tzlocal.
-
----
- build/pkgs/tzlocal/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/tzlocal/distros/gentoo.txt
-
-diff --git a/build/pkgs/tzlocal/distros/gentoo.txt b/build/pkgs/tzlocal/distros/gentoo.txt
-new file mode 100644
-index 00000000..2018442
---- /dev/null
-+++ b/build/pkgs/tzlocal/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/tzlocal
--- 
-cgit v1.0-1-gd88e
-
-
-From 3bd078fc15ae13982249452711baafae91038191 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:24:51 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for tzlocal.
-
----
- build/pkgs/tzlocal/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/tzlocal/spkg-configure.m4
-
-diff --git a/build/pkgs/tzlocal/spkg-configure.m4 b/build/pkgs/tzlocal/spkg-configure.m4
-new file mode 100644
-index 00000000..e020b28
---- /dev/null
-+++ b/build/pkgs/tzlocal/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([tzlocal], [SAGE_PYTHON_PACKAGE_CHECK([tzlocal])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 91b0882fc62214923da9ee7b6dccb05d8a1d11d1 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:26:13 -0400
-Subject: Trac #29665: add Gentoo package information for pycparser.
-
----
- build/pkgs/pycparser/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pycparser/distros/gentoo.txt
-
-diff --git a/build/pkgs/pycparser/distros/gentoo.txt b/build/pkgs/pycparser/distros/gentoo.txt
-new file mode 100644
-index 00000000..5e87307
---- /dev/null
-+++ b/build/pkgs/pycparser/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/pycparser
--- 
-cgit v1.0-1-gd88e
-
-
-From beabde92fe6e057faf516fe82d27f1e903e55ce6 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:27:27 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for pycparser.
-
----
- build/pkgs/pycparser/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pycparser/spkg-configure.m4
-
-diff --git a/build/pkgs/pycparser/spkg-configure.m4 b/build/pkgs/pycparser/spkg-configure.m4
-new file mode 100644
-index 00000000..4b9b900
---- /dev/null
-+++ b/build/pkgs/pycparser/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([pycparser], [SAGE_PYTHON_PACKAGE_CHECK([pycparser])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 86c2788dc7fd1169314e9598c91fa81045553677 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:29:36 -0400
-Subject: Trac #29665: add Gentoo package information for cycler.
-
----
- build/pkgs/cycler/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/cycler/distros/gentoo.txt
-
-diff --git a/build/pkgs/cycler/distros/gentoo.txt b/build/pkgs/cycler/distros/gentoo.txt
-new file mode 100644
-index 00000000..4b21543
---- /dev/null
-+++ b/build/pkgs/cycler/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/cycler
--- 
-cgit v1.0-1-gd88e
-
-
-From 67c5a944101ddf329f0a61c61d4e784f58a5c5b0 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:30:27 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for cycler.
-
----
- build/pkgs/cycler/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/cycler/spkg-configure.m4
-
-diff --git a/build/pkgs/cycler/spkg-configure.m4 b/build/pkgs/cycler/spkg-configure.m4
-new file mode 100644
-index 00000000..239571a
---- /dev/null
-+++ b/build/pkgs/cycler/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([cycler], [SAGE_PYTHON_PACKAGE_CHECK([cycler])])
--- 
-cgit v1.0-1-gd88e
-
-
-From ef6d490251abfa41f7a0910274700a8a6a65f629 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:31:19 -0400
-Subject: Trac #29665: add Gentoo package information for traitlets.
-
----
- build/pkgs/traitlets/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/traitlets/distros/gentoo.txt
-
-diff --git a/build/pkgs/traitlets/distros/gentoo.txt b/build/pkgs/traitlets/distros/gentoo.txt
-new file mode 100644
-index 00000000..46bfaab
---- /dev/null
-+++ b/build/pkgs/traitlets/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/traitlets
--- 
-cgit v1.0-1-gd88e
-
-
-From 1f922b458d34088d9f6773312209e69f19ee45dc Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:31:50 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for traitlets.
-
----
- build/pkgs/traitlets/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/traitlets/spkg-configure.m4
-
-diff --git a/build/pkgs/traitlets/spkg-configure.m4 b/build/pkgs/traitlets/spkg-configure.m4
-new file mode 100644
-index 00000000..df2382b
---- /dev/null
-+++ b/build/pkgs/traitlets/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([traitlets], [SAGE_PYTHON_PACKAGE_CHECK([traitlets])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 95b89a9ced0acb6d971a27fa63b97ea58a11f4e1 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:33:35 -0400
-Subject: Trac #29665: add Gentoo package information for argcomplete.
-
----
- build/pkgs/argcomplete/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/argcomplete/distros/gentoo.txt
-
-diff --git a/build/pkgs/argcomplete/distros/gentoo.txt b/build/pkgs/argcomplete/distros/gentoo.txt
-new file mode 100644
-index 00000000..b150949
---- /dev/null
-+++ b/build/pkgs/argcomplete/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/argcomplete
--- 
-cgit v1.0-1-gd88e
-
-
-From b4cd8ef384e6e5bae0de0f3c113fb5f9e6e1a71e Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:34:14 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for argcomplete.
-
----
- build/pkgs/argcomplete/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/argcomplete/spkg-configure.m4
-
-diff --git a/build/pkgs/argcomplete/spkg-configure.m4 b/build/pkgs/argcomplete/spkg-configure.m4
-new file mode 100644
-index 00000000..cbd7ccf
---- /dev/null
-+++ b/build/pkgs/argcomplete/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([argcomplete], [SAGE_PYTHON_PACKAGE_CHECK([argcomplete])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 4cc610e8331970cc018d7ea87af928fa73a292c1 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:36:21 -0400
-Subject: Trac #29665: add Gentoo package information for ptyprocess.
-
----
- build/pkgs/ptyprocess/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/ptyprocess/distros/gentoo.txt
-
-diff --git a/build/pkgs/ptyprocess/distros/gentoo.txt b/build/pkgs/ptyprocess/distros/gentoo.txt
-new file mode 100644
-index 00000000..571a851
---- /dev/null
-+++ b/build/pkgs/ptyprocess/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/ptyprocess
--- 
-cgit v1.0-1-gd88e
-
-
-From cd15f97221bf5933b07900e4f77cb55401eede26 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:37:02 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for ptyprocess.
-
----
- build/pkgs/ptyprocess/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/ptyprocess/spkg-configure.m4
-
-diff --git a/build/pkgs/ptyprocess/spkg-configure.m4 b/build/pkgs/ptyprocess/spkg-configure.m4
-new file mode 100644
-index 00000000..bfacbae
---- /dev/null
-+++ b/build/pkgs/ptyprocess/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([ptyprocess], [SAGE_PYTHON_PACKAGE_CHECK([ptyprocess])])
--- 
-cgit v1.0-1-gd88e
-
-
-From bb5f45b15f99e4ba28e1b1f6042a0e8ea17f1dfc Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:38:22 -0400
-Subject: Trac #29665: add Gentoo package information for attrs.
-
----
- build/pkgs/attrs/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/attrs/distros/gentoo.txt
-
-diff --git a/build/pkgs/attrs/distros/gentoo.txt b/build/pkgs/attrs/distros/gentoo.txt
-new file mode 100644
-index 00000000..3b906fa
---- /dev/null
-+++ b/build/pkgs/attrs/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/attrs
--- 
-cgit v1.0-1-gd88e
-
-
-From 321707ebf8e9af1e4ac3a5b5b094b4226bb3a7a5 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:38:55 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for attrs.
-
----
- build/pkgs/attrs/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/attrs/spkg-configure.m4
-
-diff --git a/build/pkgs/attrs/spkg-configure.m4 b/build/pkgs/attrs/spkg-configure.m4
-new file mode 100644
-index 00000000..ba6a9b7
---- /dev/null
-+++ b/build/pkgs/attrs/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([attrs], [SAGE_PYTHON_PACKAGE_CHECK([attrs])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 69a498a4e8854ecdfc2f1a134104983c0dcb9e32 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:40:09 -0400
-Subject: Trac #29665: add Gentoo package information for send2trash.
-
----
- build/pkgs/send2trash/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/send2trash/distros/gentoo.txt
-
-diff --git a/build/pkgs/send2trash/distros/gentoo.txt b/build/pkgs/send2trash/distros/gentoo.txt
-new file mode 100644
-index 00000000..a89b179
---- /dev/null
-+++ b/build/pkgs/send2trash/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/send2trash
--- 
-cgit v1.0-1-gd88e
-
-
-From 9baed17c84e1bdf5abd17c20766e5cd7dddc5b53 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:41:45 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for send2trash.
-
----
- build/pkgs/send2trash/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/send2trash/spkg-configure.m4
-
-diff --git a/build/pkgs/send2trash/spkg-configure.m4 b/build/pkgs/send2trash/spkg-configure.m4
-new file mode 100644
-index 00000000..3bbb727
---- /dev/null
-+++ b/build/pkgs/send2trash/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([send2trash], [SAGE_PYTHON_PACKAGE_CHECK([send2trash])])
--- 
-cgit v1.0-1-gd88e
-
-
-From b9b552b2a2aaccaeb7c5b25be0b681f107522d09 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:43:27 -0400
-Subject: Trac #29665: add Gentoo package information for pyrsistent.
-
----
- build/pkgs/pyrsistent/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pyrsistent/distros/gentoo.txt
-
-diff --git a/build/pkgs/pyrsistent/distros/gentoo.txt b/build/pkgs/pyrsistent/distros/gentoo.txt
-new file mode 100644
-index 00000000..83439ce
---- /dev/null
-+++ b/build/pkgs/pyrsistent/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/pyrsistent
--- 
-cgit v1.0-1-gd88e
-
-
-From a17b31fac6104852762f57daa749443147bdf121 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:44:03 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for pyrsistent.
-
----
- build/pkgs/pyrsistent/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pyrsistent/spkg-configure.m4
-
-diff --git a/build/pkgs/pyrsistent/spkg-configure.m4 b/build/pkgs/pyrsistent/spkg-configure.m4
-new file mode 100644
-index 00000000..f7ca75d
---- /dev/null
-+++ b/build/pkgs/pyrsistent/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([pyrsistent], [SAGE_PYTHON_PACKAGE_CHECK([pyrsistent])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 68520decad6d6937918d7a6af65ca5bd476e5d02 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:45:45 -0400
-Subject: Trac #29665: add Gentoo package information for entrypoints.
-
----
- build/pkgs/entrypoints/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/entrypoints/distros/gentoo.txt
-
-diff --git a/build/pkgs/entrypoints/distros/gentoo.txt b/build/pkgs/entrypoints/distros/gentoo.txt
-new file mode 100644
-index 00000000..684ddd0
---- /dev/null
-+++ b/build/pkgs/entrypoints/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/entrypoints
--- 
-cgit v1.0-1-gd88e
-
-
-From 34213eccb642a6bad64d89acaefa83ee702cb483 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:46:24 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for entrypoints.
-
----
- build/pkgs/entrypoints/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/entrypoints/spkg-configure.m4
-
-diff --git a/build/pkgs/entrypoints/spkg-configure.m4 b/build/pkgs/entrypoints/spkg-configure.m4
-new file mode 100644
-index 00000000..caed658
---- /dev/null
-+++ b/build/pkgs/entrypoints/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([entrypoints], [SAGE_PYTHON_PACKAGE_CHECK([entrypoints])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 8e985614345da1a58fcdc127a9c0ddd790f9b5d2 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:48:26 -0400
-Subject: Trac #29665: add Gentoo package information for markupsafe.
-
----
- build/pkgs/markupsafe/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/markupsafe/distros/gentoo.txt
-
-diff --git a/build/pkgs/markupsafe/distros/gentoo.txt b/build/pkgs/markupsafe/distros/gentoo.txt
-new file mode 100644
-index 00000000..9654e35
---- /dev/null
-+++ b/build/pkgs/markupsafe/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/markupsafe
--- 
-cgit v1.0-1-gd88e
-
-
-From d370f229ae0988856f2e0d1f6ee2df2c47169106 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:48:55 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for markupsafe.
-
----
- build/pkgs/markupsafe/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/markupsafe/spkg-configure.m4
-
-diff --git a/build/pkgs/markupsafe/spkg-configure.m4 b/build/pkgs/markupsafe/spkg-configure.m4
-new file mode 100644
-index 00000000..79eb8db
---- /dev/null
-+++ b/build/pkgs/markupsafe/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([markupsafe], [SAGE_PYTHON_PACKAGE_CHECK([markupsafe])])
--- 
-cgit v1.0-1-gd88e
-
-
-From c49b285ad9e25e6bc81a7e75d461d234fdd3ea68 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Fri, 5 Nov 2021 06:30:49 -0400
-Subject: Trac #29665: add Gentoo package information for flit_core.
-
----
- build/pkgs/flit_core/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/flit_core/distros/gentoo.txt
-
-diff --git a/build/pkgs/flit_core/distros/gentoo.txt b/build/pkgs/flit_core/distros/gentoo.txt
-new file mode 100644
-index 00000000..fe6bea9
---- /dev/null
-+++ b/build/pkgs/flit_core/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/flit_core
--- 
-cgit v1.0-1-gd88e
-
-
-From 5b0ce1c4f23cd9fc4316e1eb2b9b4bde394957f3 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Fri, 5 Nov 2021 06:32:11 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for flit_core.
-
----
- build/pkgs/flit_core/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/flit_core/spkg-configure.m4
-
-diff --git a/build/pkgs/flit_core/spkg-configure.m4 b/build/pkgs/flit_core/spkg-configure.m4
-new file mode 100644
-index 00000000..ee67557
---- /dev/null
-+++ b/build/pkgs/flit_core/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([flit_core], [SAGE_PYTHON_PACKAGE_CHECK([flit_core])])
--- 
-cgit v1.0-1-gd88e
-
-
-From f006c231a81428b1e1e792f889bf974f90e3c831 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Fri, 5 Nov 2021 06:34:06 -0400
-Subject: Trac #29665: add Gentoo package information for nest_asyncio.
-
----
- build/pkgs/nest_asyncio/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/nest_asyncio/distros/gentoo.txt
-
-diff --git a/build/pkgs/nest_asyncio/distros/gentoo.txt b/build/pkgs/nest_asyncio/distros/gentoo.txt
-new file mode 100644
-index 00000000..ab742d2
---- /dev/null
-+++ b/build/pkgs/nest_asyncio/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/nest_asyncio
--- 
-cgit v1.0-1-gd88e
-
-
-From 4a58d0a96a84475e765a01a64f5f44c48a317e0b Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Fri, 5 Nov 2021 06:34:43 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for nest_asyncio.
-
----
- build/pkgs/nest_asyncio/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/nest_asyncio/spkg-configure.m4
-
-diff --git a/build/pkgs/nest_asyncio/spkg-configure.m4 b/build/pkgs/nest_asyncio/spkg-configure.m4
-new file mode 100644
-index 00000000..4d81527
---- /dev/null
-+++ b/build/pkgs/nest_asyncio/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([nest_asyncio], [SAGE_PYTHON_PACKAGE_CHECK([nest_asyncio])])
--- 
-cgit v1.0-1-gd88e
-
-
-From e50af937777ea778908bc09a7a79db3dd80fdf25 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Fri, 5 Nov 2021 06:37:02 -0400
-Subject: Trac #29665: add Gentoo package information for ipython_genutils.
-
----
- build/pkgs/ipython_genutils/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/ipython_genutils/distros/gentoo.txt
-
-diff --git a/build/pkgs/ipython_genutils/distros/gentoo.txt b/build/pkgs/ipython_genutils/distros/gentoo.txt
-new file mode 100644
-index 00000000..01bc49d
---- /dev/null
-+++ b/build/pkgs/ipython_genutils/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/ipython_genutils
--- 
-cgit v1.0-1-gd88e
-
-
-From ec3c0ce9db2ba13c1a49d1bcfb7a4b249cb7ae83 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Fri, 5 Nov 2021 06:39:20 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for ipython_genutils.
-
----
- build/pkgs/ipython_genutils/spkg-configure.m4 | 4 ++++
- 1 file changed, 4 insertions(+)
- create mode 100644 build/pkgs/ipython_genutils/spkg-configure.m4
-
-diff --git a/build/pkgs/ipython_genutils/spkg-configure.m4 b/build/pkgs/ipython_genutils/spkg-configure.m4
-new file mode 100644
-index 00000000..b0ba86a
---- /dev/null
-+++ b/build/pkgs/ipython_genutils/spkg-configure.m4
-@@ -0,0 +1,4 @@
-+SAGE_SPKG_CONFIGURE(
-+  [ipython_genutils],
-+  [SAGE_PYTHON_PACKAGE_CHECK([ipython_genutils])]
-+)
--- 
-cgit v1.0-1-gd88e
-
-
-From 5c9e2e265115e5f10d4b459a475467e30b4bddde Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Fri, 5 Nov 2021 06:40:03 -0400
-Subject: Trac #29665: add Gentoo package information for ipython.
-
----
- build/pkgs/ipython/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/ipython/distros/gentoo.txt
-
-diff --git a/build/pkgs/ipython/distros/gentoo.txt b/build/pkgs/ipython/distros/gentoo.txt
-new file mode 100644
-index 00000000..8b76f18
---- /dev/null
-+++ b/build/pkgs/ipython/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/ipython
--- 
-cgit v1.0-1-gd88e
-
-
-From 621e707ddd040a902d7dddf0bed1de2b54ab22f2 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Fri, 5 Nov 2021 07:37:56 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for ipython.
-
----
- build/pkgs/ipython/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/ipython/spkg-configure.m4
-
-diff --git a/build/pkgs/ipython/spkg-configure.m4 b/build/pkgs/ipython/spkg-configure.m4
-new file mode 100644
-index 00000000..02ab89f
---- /dev/null
-+++ b/build/pkgs/ipython/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([ipython], [SAGE_PYTHON_PACKAGE_CHECK([ipython])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 20a0613f6d441da436f3e7b8047a72bf490882bd Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Fri, 5 Nov 2021 07:51:11 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for ipywidgets.
-
----
- build/pkgs/ipywidgets/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/ipywidgets/spkg-configure.m4
-
-diff --git a/build/pkgs/ipywidgets/spkg-configure.m4 b/build/pkgs/ipywidgets/spkg-configure.m4
-new file mode 100644
-index 00000000..51ca9be
---- /dev/null
-+++ b/build/pkgs/ipywidgets/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([ipywidgets], [SAGE_PYTHON_PACKAGE_CHECK([ipywidgets])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 76bcd386633acc02a1a3026339d0cbd258ada04e Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Fri, 5 Nov 2021 10:05:16 -0400
-Subject: Trac #29665: add Gentoo package information for wheel.
-
----
- build/pkgs/wheel/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/wheel/distros/gentoo.txt
-
-diff --git a/build/pkgs/wheel/distros/gentoo.txt b/build/pkgs/wheel/distros/gentoo.txt
-new file mode 100644
-index 00000000..ec571d5
---- /dev/null
-+++ b/build/pkgs/wheel/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/wheel
--- 
-cgit v1.0-1-gd88e
-
-
-From 96c2dd2ca7812f5333bb9d45eadb7ac408e364ce Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 08:51:44 -0500
-Subject: Trac #29665: add Gentoo package information for terminado.
-
----
- build/pkgs/terminado/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/terminado/distros/gentoo.txt
-
-diff --git a/build/pkgs/terminado/distros/gentoo.txt b/build/pkgs/terminado/distros/gentoo.txt
-new file mode 100644
-index 00000000..1df16f1
---- /dev/null
-+++ b/build/pkgs/terminado/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/terminado
--- 
-cgit v1.0-1-gd88e
-
-
-From 0de0f5f3d235a4339b21e37ea13c9f5e59a82e59 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 08:52:35 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for terminado.
-
----
- build/pkgs/terminado/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/terminado/spkg-configure.m4
-
-diff --git a/build/pkgs/terminado/spkg-configure.m4 b/build/pkgs/terminado/spkg-configure.m4
-new file mode 100644
-index 00000000..5defc2f
---- /dev/null
-+++ b/build/pkgs/terminado/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([terminado], [SAGE_PYTHON_PACKAGE_CHECK([terminado])])
--- 
-cgit v1.0-1-gd88e
-
-
-From d14a745c770b02822557e7cee0a98de1cb2f3a12 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 08:56:15 -0500
-Subject: Trac #29665: add Gentoo package information for cffi.
-
----
- build/pkgs/cffi/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/cffi/distros/gentoo.txt
-
-diff --git a/build/pkgs/cffi/distros/gentoo.txt b/build/pkgs/cffi/distros/gentoo.txt
-new file mode 100644
-index 00000000..81eeb81
---- /dev/null
-+++ b/build/pkgs/cffi/distros/gentoo.txt
-@@ -0,0 +1 @@
-+virtual/python-cffi
--- 
-cgit v1.0-1-gd88e
-
-
-From ce393c04afc69fe050e38f780d4e117164687d80 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 08:57:04 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for cffi.
-
----
- build/pkgs/cffi/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/cffi/spkg-configure.m4
-
-diff --git a/build/pkgs/cffi/spkg-configure.m4 b/build/pkgs/cffi/spkg-configure.m4
-new file mode 100644
-index 00000000..dc81875
---- /dev/null
-+++ b/build/pkgs/cffi/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([cffi], [SAGE_PYTHON_PACKAGE_CHECK([cffi])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 467093315b3fdd57c8caa2f95cf99ad52b0b84fb Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 08:57:57 -0500
-Subject: Trac #29665: add Gentoo package information for pip.
-
----
- build/pkgs/pip/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pip/distros/gentoo.txt
-
-diff --git a/build/pkgs/pip/distros/gentoo.txt b/build/pkgs/pip/distros/gentoo.txt
-new file mode 100644
-index 00000000..1845454
---- /dev/null
-+++ b/build/pkgs/pip/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/pip[vanilla]
--- 
-cgit v1.0-1-gd88e
-
-
-From c597fd23f9f68dabbcb7e698d0569c3e6458f6d1 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 09:07:26 -0500
-Subject: Trac #29665: new spkg-configure.m4 for pip.
-
----
- build/pkgs/pip/spkg-configure.m4 | 12 ++++++++++++
- 1 file changed, 12 insertions(+)
- create mode 100644 build/pkgs/pip/spkg-configure.m4
-
-diff --git a/build/pkgs/pip/spkg-configure.m4 b/build/pkgs/pip/spkg-configure.m4
-new file mode 100644
-index 00000000..c7a5562
---- /dev/null
-+++ b/build/pkgs/pip/spkg-configure.m4
-@@ -0,0 +1,12 @@
-+SAGE_SPKG_CONFIGURE([pip], [
-+  dnl always run this macro because it changes the default value of
-+  dnl the --with-system-<package> option.
-+  SAGE_PYTHON_PACKAGE_CHECK([pip])
-+
-+  dnl if we might not install the spkg, make sure that "pip" is in
-+  dnl the user's PATH, too.
-+  AS_IF([test "x$sage_spkg_install_pip" != "xyes"], [
-+    AC_CHECK_PROG(HAVE_PIP, pip, yes, no)
-+    AS_IF([test "x$HAVE_PIP" = "xno"], [sage_spkg_install_pip=yes])
-+  ])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From ef8f1e807bc55d7b8321777486fa867a7c135419 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Tue, 9 Nov 2021 09:09:04 -0500
-Subject: Trac #29665: set $SAGE_PIP_INSTALL_FLAGS for
- --enable-system-site-packages.
-
-We need to pass some special flags to "pip install" to make it do the
-right thing in the precence of system-site packages. Here we introduce
-a new autoconf variable, SAGE_PIP_INSTALL_FLAGS, that will be used
-to pass those flags to the build system.
-
-With autoconf aware of the variable, we substitute its value into the
-sage-build-env-config script for use in spkg-install.in.
----
- build/bin/sage-build-env-config.in | 1 +
- configure.ac                       | 9 +++++++++
- 2 files changed, 10 insertions(+)
-
-diff --git a/build/bin/sage-build-env-config.in b/build/bin/sage-build-env-config.in
-index 92e7dad..ad62e5f 100644
---- a/build/bin/sage-build-env-config.in
-+++ b/build/bin/sage-build-env-config.in
-@@ -53,6 +53,7 @@ export SAGE_PARI_CFG="@SAGE_PARI_CFG@"
- 
- export SAGE_GLPK_PREFIX="@SAGE_GLPK_PREFIX@"
- export SAGE_FREETYPE_PREFIX="@SAGE_FREETYPE_PREFIX@"
-+export SAGE_PIP_INSTALL_FLAGS="@SAGE_PIP_INSTALL_FLAGS@"
- export SAGE_SUITESPARSE_PREFIX="@SAGE_SUITESPARSE_PREFIX@"
- 
- export SAGE_CONFIGURE_FFLAS_FFPACK="@SAGE_CONFIGURE_FFLAS_FFPACK@"
-diff --git a/configure.ac b/configure.ac
-index 6fafb83..6ed07ac 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -441,6 +441,14 @@ AC_ARG_ENABLE(
-     [allow the use of python packages from the system (experimental; default: no)]
-   )], [
-   AS_IF([test "x$enable_system_site_packages" = "xyes"], [
-+    dnl When installing python SPKGs in the presence of system-site
-+    dnl packages, we need to --ignore-installed so that a patched SPKG
-+    dnl can be installed in the presence of an unpatched system package
-+    dnl that appears (to pip) to be identical. The --no-deps flag is
-+    dnl then needed because --ignore-installed will make any installed
-+    dnl dependencies invisible to pip, who does not appreciate that.
-+    SAGE_PIP_INSTALL_FLAGS="${SAGE_PIP_INSTALL_FLAGS} --no-deps --ignore-installed"
-+
-     SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
- 
-     dnl We want to raise an error if the user asked for "system site
-@@ -453,6 +461,7 @@ AC_ARG_ENABLE(
-     with_system_python3="force"
-   ])
- ])
-+AC_SUBST([SAGE_PIP_INSTALL_FLAGS])
- AC_SUBST([SAGE_VENV_FLAGS])
- 
- SAGE_SPKG_OPTIONS=""
--- 
-cgit v1.0-1-gd88e
-
-
-From 3cf365fef84e809e74abd2eb388e7a8e9af9d739 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Tue, 9 Nov 2021 21:01:58 -0500
-Subject: Trac #29665: pass $SAGE_PIP_INSTALL_FLAGS to sdh_pip_install.
-
-Since sdh_pip_install is usually called from spkg-install.in, the
-variables from sage-build-env-config will be available. Here we pass
-the contents of $SAGE_PIP_INSTALL_FLAGS to sage-pip-install
-unconditionally, and hope that the user ignores this variable unless
-he truly knows what he is doing.
----
- build/bin/sage-dist-helpers | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/build/bin/sage-dist-helpers b/build/bin/sage-dist-helpers
-index fe364e5..1032ac3 100644
---- a/build/bin/sage-dist-helpers
-+++ b/build/bin/sage-dist-helpers
-@@ -303,7 +303,11 @@ sdh_store_wheel() {
- }
- 
- sdh_store_and_pip_install_wheel() {
--    local pip_options=""
-+    # The $SAGE_PIP_INSTALL_FLAGS variable is set by sage-build-env-config.
-+    # We skip sanity checking its contents since you should either let sage
-+    # decide what it contains, or really know what you are doing.
-+    local pip_options="${SAGE_PIP_INSTALL_FLAGS}"
-+
-     while [ $# -gt 0 ]; do
-         case $1 in
-             -*) pip_options="$pip_options $1"
--- 
-cgit v1.0-1-gd88e
-
-
-From 50f0438ee857b8f0b7d7ad924e6bba9c5e1bc033 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 13:10:46 -0500
-Subject: Trac #29665: add Gentoo package information for pexpect.
-
----
- build/pkgs/pexpect/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pexpect/distros/gentoo.txt
-
-diff --git a/build/pkgs/pexpect/distros/gentoo.txt b/build/pkgs/pexpect/distros/gentoo.txt
-new file mode 100644
-index 00000000..30c4b60
---- /dev/null
-+++ b/build/pkgs/pexpect/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/pexpect
--- 
-cgit v1.0-1-gd88e
-
-
-From 4d784688d997290b462646fa7f36114a41f3f453 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 13:11:25 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for pexpect.
-
----
- build/pkgs/pexpect/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pexpect/spkg-configure.m4
-
-diff --git a/build/pkgs/pexpect/spkg-configure.m4 b/build/pkgs/pexpect/spkg-configure.m4
-new file mode 100644
-index 00000000..6520856
---- /dev/null
-+++ b/build/pkgs/pexpect/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([pexpect], [SAGE_PYTHON_PACKAGE_CHECK([pexpect])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 6447122dc76a3b7a58340dbed942db66530b5b07 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 13:12:05 -0500
-Subject: Trac #29665: add Gentoo package information for docutils.
-
----
- build/pkgs/docutils/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/docutils/distros/gentoo.txt
-
-diff --git a/build/pkgs/docutils/distros/gentoo.txt b/build/pkgs/docutils/distros/gentoo.txt
-new file mode 100644
-index 00000000..fe4a452
---- /dev/null
-+++ b/build/pkgs/docutils/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/docutils
--- 
-cgit v1.0-1-gd88e
-
-
-From 709041480a5fc729b0ee7f1a8a3b16d4d65321b5 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 13:12:38 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for docutils.
-
----
- build/pkgs/docutils/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/docutils/spkg-configure.m4
-
-diff --git a/build/pkgs/docutils/spkg-configure.m4 b/build/pkgs/docutils/spkg-configure.m4
-new file mode 100644
-index 00000000..3584e45
---- /dev/null
-+++ b/build/pkgs/docutils/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([docutils], [SAGE_PYTHON_PACKAGE_CHECK([docutils])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 782d38b48ab87afccc43fbc071e7b7ed48fb0a20 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 13:14:37 -0500
-Subject: Trac #29665: add Gentoo package information for nbclient.
-
----
- build/pkgs/nbclient/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/nbclient/distros/gentoo.txt
-
-diff --git a/build/pkgs/nbclient/distros/gentoo.txt b/build/pkgs/nbclient/distros/gentoo.txt
-new file mode 100644
-index 00000000..06ff18d
---- /dev/null
-+++ b/build/pkgs/nbclient/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/nbclient
--- 
-cgit v1.0-1-gd88e
-
-
-From 19ce09336532336f69db74381932d51a429dfaca Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 13:15:11 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for nbclient.
-
----
- build/pkgs/nbclient/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/nbclient/spkg-configure.m4
-
-diff --git a/build/pkgs/nbclient/spkg-configure.m4 b/build/pkgs/nbclient/spkg-configure.m4
-new file mode 100644
-index 00000000..14178b7
---- /dev/null
-+++ b/build/pkgs/nbclient/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([nbclient], [SAGE_PYTHON_PACKAGE_CHECK([nbclient])])
--- 
-cgit v1.0-1-gd88e
-
-
-From c063b9de42c1780368000a563d0dbe80b6fff169 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 13:17:36 -0500
-Subject: Trac #29665: add Gentoo package information for argon2_cffi.
-
----
- build/pkgs/argon2_cffi/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/argon2_cffi/distros/gentoo.txt
-
-diff --git a/build/pkgs/argon2_cffi/distros/gentoo.txt b/build/pkgs/argon2_cffi/distros/gentoo.txt
-new file mode 100644
-index 00000000..2f12ca8
---- /dev/null
-+++ b/build/pkgs/argon2_cffi/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/argon2-cffi
--- 
-cgit v1.0-1-gd88e
-
-
-From 0b4d5699dd51ea52550fba7db9e1cbb8bbac1892 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 13:18:35 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for argon2_cffi.
-
----
- build/pkgs/argon2_cffi/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/argon2_cffi/spkg-configure.m4
-
-diff --git a/build/pkgs/argon2_cffi/spkg-configure.m4 b/build/pkgs/argon2_cffi/spkg-configure.m4
-new file mode 100644
-index 00000000..03ebc63
---- /dev/null
-+++ b/build/pkgs/argon2_cffi/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([argon2_cffi], [SAGE_PYTHON_PACKAGE_CHECK([argon2_cffi])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 2b4119558a6e0b1aa512848539a237676b035c83 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:30:48 -0500
-Subject: Trac #29665: fix package name in dateutil's install-requires.txt.
-
----
- build/pkgs/dateutil/install-requires.txt | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/build/pkgs/dateutil/install-requires.txt b/build/pkgs/dateutil/install-requires.txt
-index 0ae93da..face537 100644
---- a/build/pkgs/dateutil/install-requires.txt
-+++ b/build/pkgs/dateutil/install-requires.txt
-@@ -1 +1 @@
--dateutil >=2.8.1
-+python-dateutil >=2.8.1
--- 
-cgit v1.0-1-gd88e
-
-
-From df371b7c4d20a3353d43940306ad22e11aba29da Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:31:41 -0500
-Subject: Trac #29665: add Gentoo package information for dateutil.
-
----
- build/pkgs/dateutil/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/dateutil/distros/gentoo.txt
-
-diff --git a/build/pkgs/dateutil/distros/gentoo.txt b/build/pkgs/dateutil/distros/gentoo.txt
-new file mode 100644
-index 00000000..e129df7
---- /dev/null
-+++ b/build/pkgs/dateutil/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/python-dateutil
--- 
-cgit v1.0-1-gd88e
-
-
-From 577695dfdf661ee26c0ffd767bdbf479d95f7fb4 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:32:21 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for dateutil.
-
----
- build/pkgs/dateutil/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/dateutil/spkg-configure.m4
-
-diff --git a/build/pkgs/dateutil/spkg-configure.m4 b/build/pkgs/dateutil/spkg-configure.m4
-new file mode 100644
-index 00000000..fdcd127
---- /dev/null
-+++ b/build/pkgs/dateutil/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([dateutil], [SAGE_PYTHON_PACKAGE_CHECK([dateutil])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 1984651caac624ec4bb58814ca1d57fe66f9881a Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:33:51 -0500
-Subject: Trac #29665: add Gentoo package information for setuptools_scm.
-
----
- build/pkgs/setuptools_scm/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/setuptools_scm/distros/gentoo.txt
-
-diff --git a/build/pkgs/setuptools_scm/distros/gentoo.txt b/build/pkgs/setuptools_scm/distros/gentoo.txt
-new file mode 100644
-index 00000000..8989597
---- /dev/null
-+++ b/build/pkgs/setuptools_scm/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/setuptools_scm
--- 
-cgit v1.0-1-gd88e
-
-
-From ebf7c854ed966e7353759be485c4f5a57b9a10fa Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:34:49 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for setuptools_scm.
-
----
- build/pkgs/setuptools_scm/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/setuptools_scm/spkg-configure.m4
-
-diff --git a/build/pkgs/setuptools_scm/spkg-configure.m4 b/build/pkgs/setuptools_scm/spkg-configure.m4
-new file mode 100644
-index 00000000..437148c
---- /dev/null
-+++ b/build/pkgs/setuptools_scm/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([setuptools_scm], [
-+  SAGE_PYTHON_PACKAGE_CHECK([setuptools_scm])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From 0dee0d0c28f31b1f619e44c710a3c9e22d2b2544 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:36:33 -0500
-Subject: Trac #29665: add Gentoo package information for nbconvert.
-
----
- build/pkgs/nbconvert/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/nbconvert/distros/gentoo.txt
-
-diff --git a/build/pkgs/nbconvert/distros/gentoo.txt b/build/pkgs/nbconvert/distros/gentoo.txt
-new file mode 100644
-index 00000000..6c45a10
---- /dev/null
-+++ b/build/pkgs/nbconvert/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/nbconvert
--- 
-cgit v1.0-1-gd88e
-
-
-From 473789eb11b1838bc32dc8a63509ee199afc8912 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:37:37 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for nbconvert.
-
----
- build/pkgs/nbconvert/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/nbconvert/spkg-configure.m4
-
-diff --git a/build/pkgs/nbconvert/spkg-configure.m4 b/build/pkgs/nbconvert/spkg-configure.m4
-new file mode 100644
-index 00000000..9b5dee3
---- /dev/null
-+++ b/build/pkgs/nbconvert/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([nbconvert], [SAGE_PYTHON_PACKAGE_CHECK([nbconvert])])
--- 
-cgit v1.0-1-gd88e
-
-
-From f0703b594e57c980d605aa9bc8316c45a7858b3b Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:41:51 -0500
-Subject: Trac #29665: add Gentoo package information for jupyter_core.
-
----
- build/pkgs/jupyter_core/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/jupyter_core/distros/gentoo.txt
-
-diff --git a/build/pkgs/jupyter_core/distros/gentoo.txt b/build/pkgs/jupyter_core/distros/gentoo.txt
-new file mode 100644
-index 00000000..f168c5a
---- /dev/null
-+++ b/build/pkgs/jupyter_core/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/jupyter_core
--- 
-cgit v1.0-1-gd88e
-
-
-From 061a307cc4a6680d8500fde834975064e59540d5 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:42:48 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for jupyter_core.
-
----
- build/pkgs/jupyter_core/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/jupyter_core/spkg-configure.m4
-
-diff --git a/build/pkgs/jupyter_core/spkg-configure.m4 b/build/pkgs/jupyter_core/spkg-configure.m4
-new file mode 100644
-index 00000000..67df9c3
---- /dev/null
-+++ b/build/pkgs/jupyter_core/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([jupyter_core], [
-+  SAGE_PYTHON_PACKAGE_CHECK([jupyter_core])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From b85abe964ce0b98b5842efe9cbad9bdb1c89202f Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:47:08 -0500
-Subject: Trac #29665: add Gentoo package information for jupyter_client.
-
----
- build/pkgs/jupyter_client/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/jupyter_client/distros/gentoo.txt
-
-diff --git a/build/pkgs/jupyter_client/distros/gentoo.txt b/build/pkgs/jupyter_client/distros/gentoo.txt
-new file mode 100644
-index 00000000..4f1de88
---- /dev/null
-+++ b/build/pkgs/jupyter_client/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/jupyter_client
--- 
-cgit v1.0-1-gd88e
-
-
-From 86323ff1e0b2507933df6bc2a96c9175957640c5 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:48:04 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for jupyter_client.
-
----
- build/pkgs/jupyter_client/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/jupyter_client/spkg-configure.m4
-
-diff --git a/build/pkgs/jupyter_client/spkg-configure.m4 b/build/pkgs/jupyter_client/spkg-configure.m4
-new file mode 100644
-index 00000000..fbd3498
---- /dev/null
-+++ b/build/pkgs/jupyter_client/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([jupyter_client], [
-+  SAGE_PYTHON_PACKAGE_CHECK([jupyter_client])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From a8475e27dd30d752d05ab6fea6579e8623501d82 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:48:58 -0500
-Subject: Trac #29665: add Gentoo package information for snowballstemmer.
-
----
- build/pkgs/snowballstemmer/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/snowballstemmer/distros/gentoo.txt
-
-diff --git a/build/pkgs/snowballstemmer/distros/gentoo.txt b/build/pkgs/snowballstemmer/distros/gentoo.txt
-new file mode 100644
-index 00000000..63fd851
---- /dev/null
-+++ b/build/pkgs/snowballstemmer/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/snowballstemmer
--- 
-cgit v1.0-1-gd88e
-
-
-From 0833c9b781062b4ed86d619e050a6f5d60e36080 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:49:38 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for snowballstemmer.
-
----
- build/pkgs/snowballstemmer/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/snowballstemmer/spkg-configure.m4
-
-diff --git a/build/pkgs/snowballstemmer/spkg-configure.m4 b/build/pkgs/snowballstemmer/spkg-configure.m4
-new file mode 100644
-index 00000000..6aa0882
---- /dev/null
-+++ b/build/pkgs/snowballstemmer/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([snowballstemmer], [
-+  SAGE_PYTHON_PACKAGE_CHECK([snowballstemmer])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From 50a1cf2a2bcd7eeec64cbc3f70e3e9fbe5d850fe Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:50:47 -0500
-Subject: Trac #29665: add Gentoo package information for tornado.
-
----
- build/pkgs/tornado/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/tornado/distros/gentoo.txt
-
-diff --git a/build/pkgs/tornado/distros/gentoo.txt b/build/pkgs/tornado/distros/gentoo.txt
-new file mode 100644
-index 00000000..6ae4b9f
---- /dev/null
-+++ b/build/pkgs/tornado/distros/gentoo.txt
-@@ -0,0 +1 @@
-+www-servers/tornado
--- 
-cgit v1.0-1-gd88e
-
-
-From 118f4da6e03476c726363e8e22ecda32f13bfc33 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:51:26 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for tornado.
-
----
- build/pkgs/tornado/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/tornado/spkg-configure.m4
-
-diff --git a/build/pkgs/tornado/spkg-configure.m4 b/build/pkgs/tornado/spkg-configure.m4
-new file mode 100644
-index 00000000..1ee5bc9
---- /dev/null
-+++ b/build/pkgs/tornado/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([tornado], [SAGE_PYTHON_PACKAGE_CHECK([tornado])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 3850701747a6c8ef60840bdfdb589b28d4cd2b9a Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:52:21 -0500
-Subject: Trac #29665: add Gentoo package information for jsonschema.
-
----
- build/pkgs/jsonschema/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/jsonschema/distros/gentoo.txt
-
-diff --git a/build/pkgs/jsonschema/distros/gentoo.txt b/build/pkgs/jsonschema/distros/gentoo.txt
-new file mode 100644
-index 00000000..d708e4c
---- /dev/null
-+++ b/build/pkgs/jsonschema/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/jsonschema
--- 
-cgit v1.0-1-gd88e
-
-
-From 76e3917c8af781af00f642cfada7a79594429e30 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:54:03 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for jsonschema.
-
----
- build/pkgs/jsonschema/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/jsonschema/spkg-configure.m4
-
-diff --git a/build/pkgs/jsonschema/spkg-configure.m4 b/build/pkgs/jsonschema/spkg-configure.m4
-new file mode 100644
-index 00000000..b9e5e21
---- /dev/null
-+++ b/build/pkgs/jsonschema/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([jsonschema], [SAGE_PYTHON_PACKAGE_CHECK([jsonschema])])
--- 
-cgit v1.0-1-gd88e
-
-
-From fd4a16c11669b6dd73ac6325bca820e76db00402 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:55:54 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for
- widgetsnbextension.
-
----
- build/pkgs/widgetsnbextension/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/widgetsnbextension/spkg-configure.m4
-
-diff --git a/build/pkgs/widgetsnbextension/spkg-configure.m4 b/build/pkgs/widgetsnbextension/spkg-configure.m4
-new file mode 100644
-index 00000000..bf82daf
---- /dev/null
-+++ b/build/pkgs/widgetsnbextension/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([widgetsnbextension], [
-+  SAGE_PYTHON_PACKAGE_CHECK([widgetsnbextension])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From 8079a9f384e3c8480e157dd98c3db2f43c987f4e Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:57:20 -0500
-Subject: Trac #29665: add Gentoo package information for importlib_resources.
-
----
- build/pkgs/importlib_resources/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/importlib_resources/distros/gentoo.txt
-
-diff --git a/build/pkgs/importlib_resources/distros/gentoo.txt b/build/pkgs/importlib_resources/distros/gentoo.txt
-new file mode 100644
-index 00000000..d5e1f2c
---- /dev/null
-+++ b/build/pkgs/importlib_resources/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/importlib_resources
--- 
-cgit v1.0-1-gd88e
-
-
-From 2c430d7c52f02779a6c41b98ac2f4edd8b6759c3 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:58:00 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for
- importlib_resources.
-
----
- build/pkgs/importlib_resources/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/importlib_resources/spkg-configure.m4
-
-diff --git a/build/pkgs/importlib_resources/spkg-configure.m4 b/build/pkgs/importlib_resources/spkg-configure.m4
-new file mode 100644
-index 00000000..50df55b
---- /dev/null
-+++ b/build/pkgs/importlib_resources/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([importlib_resources], [
-+  SAGE_PYTHON_PACKAGE_CHECK([importlib_resources])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From 00d13d7bf2e50aae2ccef3b2b30293c70a922af2 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:58:38 -0500
-Subject: Trac #29665: add Gentoo package information for kiwisolver.
-
----
- build/pkgs/kiwisolver/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/kiwisolver/distros/gentoo.txt
-
-diff --git a/build/pkgs/kiwisolver/distros/gentoo.txt b/build/pkgs/kiwisolver/distros/gentoo.txt
-new file mode 100644
-index 00000000..7b30c95
---- /dev/null
-+++ b/build/pkgs/kiwisolver/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/kiwisolver
--- 
-cgit v1.0-1-gd88e
-
-
-From 72b7907ef7ea9fa4ff6948ea34cfe2f693ee6c31 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:59:09 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for kiwisolver.
-
----
- build/pkgs/kiwisolver/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/kiwisolver/spkg-configure.m4
-
-diff --git a/build/pkgs/kiwisolver/spkg-configure.m4 b/build/pkgs/kiwisolver/spkg-configure.m4
-new file mode 100644
-index 00000000..4e7ac97
---- /dev/null
-+++ b/build/pkgs/kiwisolver/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([kiwisolver], [SAGE_PYTHON_PACKAGE_CHECK([kiwisolver])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 479351279e4e0ea7e2d146434f0daba038765cfd Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:00:04 -0500
-Subject: Trac #29665: add Gentoo package information for notebook.
-
----
- build/pkgs/notebook/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/notebook/distros/gentoo.txt
-
-diff --git a/build/pkgs/notebook/distros/gentoo.txt b/build/pkgs/notebook/distros/gentoo.txt
-new file mode 100644
-index 00000000..6475d72
---- /dev/null
-+++ b/build/pkgs/notebook/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/notebook
--- 
-cgit v1.0-1-gd88e
-
-
-From f4d9242ea654977f8ad7865c82eec593e11a36bc Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:01:42 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for notebook.
-
----
- build/pkgs/notebook/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/notebook/spkg-configure.m4
-
-diff --git a/build/pkgs/notebook/spkg-configure.m4 b/build/pkgs/notebook/spkg-configure.m4
-new file mode 100644
-index 00000000..a17ba95
---- /dev/null
-+++ b/build/pkgs/notebook/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([notebook], [SAGE_PYTHON_PACKAGE_CHECK([notebook])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 9837070c7f8e9a71283b84d49d4fd2c94b78a464 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:02:38 -0500
-Subject: Trac #29665: add Gentoo package information for matplotlib_inline.
-
----
- build/pkgs/matplotlib_inline/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/matplotlib_inline/distros/gentoo.txt
-
-diff --git a/build/pkgs/matplotlib_inline/distros/gentoo.txt b/build/pkgs/matplotlib_inline/distros/gentoo.txt
-new file mode 100644
-index 00000000..6a5859c
---- /dev/null
-+++ b/build/pkgs/matplotlib_inline/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/matplotlib-inline
--- 
-cgit v1.0-1-gd88e
-
-
-From 750be73b25b92b4875e47d044360ac0e1116ec3e Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:03:28 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for matplotlib_inline.
-
----
- build/pkgs/matplotlib_inline/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/matplotlib_inline/spkg-configure.m4
-
-diff --git a/build/pkgs/matplotlib_inline/spkg-configure.m4 b/build/pkgs/matplotlib_inline/spkg-configure.m4
-new file mode 100644
-index 00000000..e59658f
---- /dev/null
-+++ b/build/pkgs/matplotlib_inline/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([matplotlib_inline], [
-+  SAGE_PYTHON_PACKAGE_CHECK([matplotlib_inline])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From 273505f49698dcd2ab30c2756b07113c9b7e7791 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:04:10 -0500
-Subject: Trac #29665: add Gentoo package information for ipykernel.
-
----
- build/pkgs/ipykernel/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/ipykernel/distros/gentoo.txt
-
-diff --git a/build/pkgs/ipykernel/distros/gentoo.txt b/build/pkgs/ipykernel/distros/gentoo.txt
-new file mode 100644
-index 00000000..88aab61
---- /dev/null
-+++ b/build/pkgs/ipykernel/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/ipykernel
--- 
-cgit v1.0-1-gd88e
-
-
-From 629ad36c9e4ae0cdff4a013289b4f2911442445e Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:04:46 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for ipykernel.
-
----
- build/pkgs/ipykernel/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/ipykernel/spkg-configure.m4
-
-diff --git a/build/pkgs/ipykernel/spkg-configure.m4 b/build/pkgs/ipykernel/spkg-configure.m4
-new file mode 100644
-index 00000000..94ecc2d
---- /dev/null
-+++ b/build/pkgs/ipykernel/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([ipykernel], [SAGE_PYTHON_PACKAGE_CHECK([ipykernel])])
--- 
-cgit v1.0-1-gd88e
-
-
-From b8d709edb6a24fd5868ee2818b56e78257b2eafa Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:05:26 -0500
-Subject: Trac #29665: add Gentoo package information for prompt_toolkit.
-
----
- build/pkgs/prompt_toolkit/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/prompt_toolkit/distros/gentoo.txt
-
-diff --git a/build/pkgs/prompt_toolkit/distros/gentoo.txt b/build/pkgs/prompt_toolkit/distros/gentoo.txt
-new file mode 100644
-index 00000000..6902484
---- /dev/null
-+++ b/build/pkgs/prompt_toolkit/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/prompt_toolkit
--- 
-cgit v1.0-1-gd88e
-
-
-From 16c0b5e767ae4dac4440510b7253e5c8642b7d2c Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:10:39 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for prompt_toolkit.
-
----
- build/pkgs/prompt_toolkit/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/prompt_toolkit/spkg-configure.m4
-
-diff --git a/build/pkgs/prompt_toolkit/spkg-configure.m4 b/build/pkgs/prompt_toolkit/spkg-configure.m4
-new file mode 100644
-index 00000000..fd8c1a6
---- /dev/null
-+++ b/build/pkgs/prompt_toolkit/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([prompt_toolkit], [
-+  SAGE_PYTHON_PACKAGE_CHECK([prompt_toolkit])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From 0cd9283e8bb6c8ae413fc8f715c021f7ec3ca2c8 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:12:10 -0500
-Subject: Trac #29665: add Gentoo package information for charset_normalizer.
-
----
- build/pkgs/charset_normalizer/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/charset_normalizer/distros/gentoo.txt
-
-diff --git a/build/pkgs/charset_normalizer/distros/gentoo.txt b/build/pkgs/charset_normalizer/distros/gentoo.txt
-new file mode 100644
-index 00000000..eefeb89
---- /dev/null
-+++ b/build/pkgs/charset_normalizer/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/charset_normalizer
--- 
-cgit v1.0-1-gd88e
-
-
-From a04b01a9ab59097d189edcc5ddcb461faede83b2 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:12:54 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for
- charset_normalizer.
-
----
- build/pkgs/charset_normalizer/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/charset_normalizer/spkg-configure.m4
-
-diff --git a/build/pkgs/charset_normalizer/spkg-configure.m4 b/build/pkgs/charset_normalizer/spkg-configure.m4
-new file mode 100644
-index 00000000..18b18cf
---- /dev/null
-+++ b/build/pkgs/charset_normalizer/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([charset_normalizer], [
-+  SAGE_PYTHON_PACKAGE_CHECK([charset_normalizer])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From d2ea08138711c53046f977b586f33b09b176b2e3 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:13:37 -0500
-Subject: Trac #29665: add Gentoo package information for prometheus_client.
-
----
- build/pkgs/prometheus_client/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/prometheus_client/distros/gentoo.txt
-
-diff --git a/build/pkgs/prometheus_client/distros/gentoo.txt b/build/pkgs/prometheus_client/distros/gentoo.txt
-new file mode 100644
-index 00000000..aa2889c
---- /dev/null
-+++ b/build/pkgs/prometheus_client/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/prometheus_client
--- 
-cgit v1.0-1-gd88e
-
-
-From 5b0393200e9edd3e26b8a55ba67e5710e7403fcb Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:15:09 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for prometheus_client.
-
----
- build/pkgs/prometheus_client/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/prometheus_client/spkg-configure.m4
-
-diff --git a/build/pkgs/prometheus_client/spkg-configure.m4 b/build/pkgs/prometheus_client/spkg-configure.m4
-new file mode 100644
-index 00000000..b494588
---- /dev/null
-+++ b/build/pkgs/prometheus_client/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([prometheus_client], [
-+  SAGE_PYTHON_PACKAGE_CHECK([prometheus_client])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From cdcd85284f43ca4ad18353ec3527b2901e57b788 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:17:23 -0500
-Subject: Trac #29665: add Gentoo package information for pybind11.
-
----
- build/pkgs/pybind11/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pybind11/distros/gentoo.txt
-
-diff --git a/build/pkgs/pybind11/distros/gentoo.txt b/build/pkgs/pybind11/distros/gentoo.txt
-new file mode 100644
-index 00000000..0c500b3
---- /dev/null
-+++ b/build/pkgs/pybind11/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/pybind11
--- 
-cgit v1.0-1-gd88e
-
-
-From efdd1eb64c4799fe3cdf2221824182941b3fda2d Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:17:51 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for pybind11.
-
----
- build/pkgs/pybind11/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pybind11/spkg-configure.m4
-
-diff --git a/build/pkgs/pybind11/spkg-configure.m4 b/build/pkgs/pybind11/spkg-configure.m4
-new file mode 100644
-index 00000000..cce1cf5
---- /dev/null
-+++ b/build/pkgs/pybind11/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([pybind11], [SAGE_PYTHON_PACKAGE_CHECK([pybind11])])
--- 
-cgit v1.0-1-gd88e
-
-
-From b2128f33b68ea33927284116ea598dd186902400 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:19:23 -0500
-Subject: Trac #29665: add Gentoo package information for pkgconfig.
-
----
- build/pkgs/pkgconfig/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pkgconfig/distros/gentoo.txt
-
-diff --git a/build/pkgs/pkgconfig/distros/gentoo.txt b/build/pkgs/pkgconfig/distros/gentoo.txt
-new file mode 100644
-index 00000000..32e8618
---- /dev/null
-+++ b/build/pkgs/pkgconfig/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/pkgconfig
--- 
-cgit v1.0-1-gd88e
-
-
-From 5b373b49e06aadeb36dc57e500da9a322460e658 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:19:54 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for pkgconfig.
-
----
- build/pkgs/pkgconfig/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pkgconfig/spkg-configure.m4
-
-diff --git a/build/pkgs/pkgconfig/spkg-configure.m4 b/build/pkgs/pkgconfig/spkg-configure.m4
-new file mode 100644
-index 00000000..6708293
---- /dev/null
-+++ b/build/pkgs/pkgconfig/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([pkgconfig], [SAGE_PYTHON_PACKAGE_CHECK([pkgconfig])])
--- 
-cgit v1.0-1-gd88e
-
-
-From ce578729eb0d14baab365351ba9a9ffffb7b79f2 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:21:10 -0500
-Subject: Trac #29665: add Gentoo package information for
- sphinxcontrib_serializinghtml.
-
----
- build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
-
-diff --git a/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt b/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
-new file mode 100644
-index 00000000..38bca8f
---- /dev/null
-+++ b/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/sphinxcontrib-serializinghtml
--- 
-cgit v1.0-1-gd88e
-
-
-From bb0f42c32bbce0e4488678312f5e2d88c6f42c9b Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:21:54 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for
- sphinxcontrib_serializinghtml.
-
----
- build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
-
-diff --git a/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4 b/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
-new file mode 100644
-index 00000000..be8e625
---- /dev/null
-+++ b/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([sphinxcontrib_serializinghtml], [
-+  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_serializinghtml])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From e47dcf985e40475de85c9436a85537751318bc3d Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:22:54 -0500
-Subject: Trac #29665: add Gentoo package information for sphinxcontrib_jsmath.
-
----
- build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
-
-diff --git a/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt b/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
-new file mode 100644
-index 00000000..041a471
---- /dev/null
-+++ b/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/sphinxcontrib-jsmath
--- 
-cgit v1.0-1-gd88e
-
-
-From 72cff6fd35f93de4fa855bc870569dd733ff5c24 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:23:49 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for
- sphinxcontrib_jsmath.
-
----
- build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
-
-diff --git a/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4 b/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
-new file mode 100644
-index 00000000..e46bde2
---- /dev/null
-+++ b/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([sphinxcontrib_jsmath], [
-+  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_jsmath])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From a36395d70f759449cd63c1b0990fbdcb4cb25ca0 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:24:26 -0500
-Subject: Trac #29665: add Gentoo package information for
- sphinxcontrib_devhelp.
-
----
- build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
-
-diff --git a/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
-new file mode 100644
-index 00000000..9b5c899
---- /dev/null
-+++ b/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/sphinxcontrib-devhelp
--- 
-cgit v1.0-1-gd88e
-
-
-From 9953a5dd1646ed0ad51d2e3935cf609bc9e7fd1c Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:25:04 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for
- sphinxcontrib_devhelp.
-
----
- build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
-
-diff --git a/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
-new file mode 100644
-index 00000000..8728136
---- /dev/null
-+++ b/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([sphinxcontrib_devhelp], [
-+  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_devhelp])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From b199d5363aad93f3cb23f7904c9553a28b06348f Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:25:53 -0500
-Subject: Trac #29665: add Gentoo package information for sphinxcontrib_qthelp.
-
----
- build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
-
-diff --git a/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
-new file mode 100644
-index 00000000..7210099
---- /dev/null
-+++ b/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/sphinxcontrib-qthelp
--- 
-cgit v1.0-1-gd88e
-
-
-From 94ac8806739f3938e73f5857328e91e0d42e98d2 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:26:28 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for
- sphinxcontrib_qthelp.
-
----
- build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
-
-diff --git a/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
-new file mode 100644
-index 00000000..81ea5e1
---- /dev/null
-+++ b/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([sphinxcontrib_qthelp], [
-+  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_qthelp])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From beedc154aa405e8a58aee8889f510db07adc89a7 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:26:54 -0500
-Subject: Trac #29665: add Gentoo package information for
- sphinxcontrib_applehelp.
-
----
- build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
-
-diff --git a/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
-new file mode 100644
-index 00000000..66ac8da
---- /dev/null
-+++ b/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/sphinxcontrib-applehelp
--- 
-cgit v1.0-1-gd88e
-
-
-From 07d47c3673d6b35423b71f621cb400989c0101c2 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:27:19 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for
- sphinxcontrib_applehelp.
-
----
- build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
-
-diff --git a/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
-new file mode 100644
-index 00000000..e834aed
---- /dev/null
-+++ b/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([sphinxcontrib_applehelp], [
-+  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_applehelp])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From 333a66546c5d421735c49dbafd7370a827f22781 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:27:46 -0500
-Subject: Trac #29665: add Gentoo package information for
- sphinxcontrib_htmlhelp.
-
----
- build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
-
-diff --git a/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
-new file mode 100644
-index 00000000..e080bac
---- /dev/null
-+++ b/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/sphinxcontrib-htmlhelp
--- 
-cgit v1.0-1-gd88e
-
-
-From bfaeb3962254439b63f1f2e0e883de462c7831be Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:29:18 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for
- sphinxcontrib_htmlhelp.
-
----
- build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
-
-diff --git a/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
-new file mode 100644
-index 00000000..c77b003
---- /dev/null
-+++ b/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([sphinxcontrib_htmlhelp], [
-+  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_htmlhelp])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From 782cde13da06e8b85806cb7cbc8aceee0364e639 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:30:23 -0500
-Subject: Trac #29665: add Gentoo package information for jupyterlab_pygments.
-
----
- build/pkgs/jupyterlab_pygments/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/jupyterlab_pygments/distros/gentoo.txt
-
-diff --git a/build/pkgs/jupyterlab_pygments/distros/gentoo.txt b/build/pkgs/jupyterlab_pygments/distros/gentoo.txt
-new file mode 100644
-index 00000000..c57b4f1
---- /dev/null
-+++ b/build/pkgs/jupyterlab_pygments/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/jupyterlab_pygments
--- 
-cgit v1.0-1-gd88e
-
-
-From 39f974cfa4a8c6e5dd897f152f83ec82f40ee9f7 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:31:13 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for
- jupyterlab_pygments.
-
----
- build/pkgs/jupyterlab_pygments/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/jupyterlab_pygments/spkg-configure.m4
-
-diff --git a/build/pkgs/jupyterlab_pygments/spkg-configure.m4 b/build/pkgs/jupyterlab_pygments/spkg-configure.m4
-new file mode 100644
-index 00000000..e46e21f
---- /dev/null
-+++ b/build/pkgs/jupyterlab_pygments/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([jupyterlab_pygments], [
-+  SAGE_PYTHON_PACKAGE_CHECK([jupyterlab_pygments])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From db704620700fd36cec3bf6125938f3ee00a9eb5e Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 30 Dec 2021 20:29:15 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for ply.
-
----
- build/pkgs/ply/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/ply/spkg-configure.m4
-
-diff --git a/build/pkgs/ply/spkg-configure.m4 b/build/pkgs/ply/spkg-configure.m4
-new file mode 100644
-index 00000000..ffb0030
---- /dev/null
-+++ b/build/pkgs/ply/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([ply], [SAGE_PYTHON_PACKAGE_CHECK([ply])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 6aac31dabcdfdef228d7780398a3fda1a4cc566f Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 30 Dec 2021 20:29:51 -0500
-Subject: Trac #29665: add Gentoo package information for ply.
-
----
- build/pkgs/ply/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/ply/distros/gentoo.txt
-
-diff --git a/build/pkgs/ply/distros/gentoo.txt b/build/pkgs/ply/distros/gentoo.txt
-new file mode 100644
-index 00000000..c8b1630
---- /dev/null
-+++ b/build/pkgs/ply/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/ply
--- 
-cgit v1.0-1-gd88e
-
-
-From bb8d3372936ec37470d69687a0f91592129460ae Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 30 Dec 2021 20:30:33 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for gast.
-
----
- build/pkgs/gast/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/gast/spkg-configure.m4
-
-diff --git a/build/pkgs/gast/spkg-configure.m4 b/build/pkgs/gast/spkg-configure.m4
-new file mode 100644
-index 00000000..26ec59f
---- /dev/null
-+++ b/build/pkgs/gast/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([gast], [SAGE_PYTHON_PACKAGE_CHECK([gast])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 1cdc4046a88f1c2b4e5c162f66c6db6090b24194 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 30 Dec 2021 20:31:15 -0500
-Subject: Trac #29665: add Gentoo package information for gast.
-
----
- build/pkgs/gast/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/gast/distros/gentoo.txt
-
-diff --git a/build/pkgs/gast/distros/gentoo.txt b/build/pkgs/gast/distros/gentoo.txt
-new file mode 100644
-index 00000000..3be5e7e
---- /dev/null
-+++ b/build/pkgs/gast/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/gast
--- 
-cgit v1.0-1-gd88e
-
-
-From 96068b8a3742b65d619190e1d9fa5db399e6b4f2 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 30 Dec 2021 20:32:20 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for pythran.
-
----
- build/pkgs/pythran/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pythran/spkg-configure.m4
-
-diff --git a/build/pkgs/pythran/spkg-configure.m4 b/build/pkgs/pythran/spkg-configure.m4
-new file mode 100644
-index 00000000..592e95b
---- /dev/null
-+++ b/build/pkgs/pythran/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([pythran], [SAGE_PYTHON_PACKAGE_CHECK([pythran])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 1fa0fad3ae8f7e559c6fc315c6773a7d8aac0bfb Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 30 Dec 2021 20:32:55 -0500
-Subject: Trac #29665: add Gentoo package information for pythran.
-
----
- build/pkgs/pythran/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pythran/distros/gentoo.txt
-
-diff --git a/build/pkgs/pythran/distros/gentoo.txt b/build/pkgs/pythran/distros/gentoo.txt
-new file mode 100644
-index 00000000..1bb7cdc
---- /dev/null
-+++ b/build/pkgs/pythran/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/pythran
--- 
-cgit v1.0-1-gd88e
-
-
-From d26370e5b8c88e76abfb7c27e3defb71c9e9f711 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 30 Dec 2021 20:33:50 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for beniget.
-
----
- build/pkgs/beniget/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/beniget/spkg-configure.m4
-
-diff --git a/build/pkgs/beniget/spkg-configure.m4 b/build/pkgs/beniget/spkg-configure.m4
-new file mode 100644
-index 00000000..8ae6101
---- /dev/null
-+++ b/build/pkgs/beniget/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([beniget], [SAGE_PYTHON_PACKAGE_CHECK([beniget])])
--- 
-cgit v1.0-1-gd88e
-
-
-From eeeb296ed9b9694a865534103fd58e62a151ef5e Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 30 Dec 2021 20:34:22 -0500
-Subject: Trac #29665: add Gentoo package information for beniget.
-
----
- build/pkgs/beniget/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/beniget/distros/gentoo.txt
-
-diff --git a/build/pkgs/beniget/distros/gentoo.txt b/build/pkgs/beniget/distros/gentoo.txt
-new file mode 100644
-index 00000000..1a5972c
---- /dev/null
-+++ b/build/pkgs/beniget/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/beniget
--- 
-cgit v1.0-1-gd88e
-
-
-From 078b2ff272d0eeff5cce40ad7eb176d9ddd7bdff Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 30 Dec 2021 20:35:37 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for alabaster.
-
----
- build/pkgs/alabaster/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/alabaster/spkg-configure.m4
-
-diff --git a/build/pkgs/alabaster/spkg-configure.m4 b/build/pkgs/alabaster/spkg-configure.m4
-new file mode 100644
-index 00000000..4eca6e0
---- /dev/null
-+++ b/build/pkgs/alabaster/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([alabaster], [SAGE_PYTHON_PACKAGE_CHECK([alabaster])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 7dc264353e5f64110431ff28c1b8b7e89699e9bd Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 30 Dec 2021 20:36:06 -0500
-Subject: Trac #29665: add Gentoo package information for alabaster.
-
----
- build/pkgs/alabaster/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/alabaster/distros/gentoo.txt
-
-diff --git a/build/pkgs/alabaster/distros/gentoo.txt b/build/pkgs/alabaster/distros/gentoo.txt
-new file mode 100644
-index 00000000..cffece6
---- /dev/null
-+++ b/build/pkgs/alabaster/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/alabaster
--- 
-cgit v1.0-1-gd88e
-
-
-From 8011a5e675e7e61a77ce34a299ee961a9f44253f Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 30 Dec 2021 20:43:59 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for
- importlib_metadata.
-
----
- build/pkgs/importlib_metadata/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/importlib_metadata/spkg-configure.m4
-
-diff --git a/build/pkgs/importlib_metadata/spkg-configure.m4 b/build/pkgs/importlib_metadata/spkg-configure.m4
-new file mode 100644
-index 00000000..0554e52
---- /dev/null
-+++ b/build/pkgs/importlib_metadata/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([importlib_metadata], [
-+  SAGE_PYTHON_PACKAGE_CHECK([importlib_metadata])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From 928ca0019e3ec6c4541a16b28bcc6710df6d010b Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 30 Dec 2021 20:44:28 -0500
-Subject: Trac #29665: add Gentoo package information for importlib_metadata.
-
----
- build/pkgs/importlib_metadata/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/importlib_metadata/distros/gentoo.txt
-
-diff --git a/build/pkgs/importlib_metadata/distros/gentoo.txt b/build/pkgs/importlib_metadata/distros/gentoo.txt
-new file mode 100644
-index 00000000..4f92786
---- /dev/null
-+++ b/build/pkgs/importlib_metadata/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/importlib_metadata
--- 
-cgit v1.0-1-gd88e
-
-
-From 135f184f7498a2046065e669723e68efe2d65cee Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 30 Dec 2021 21:16:58 -0500
-Subject: Trac #29665: fix sage.misc.package doctest with system alabaster.
-
-When alabaster from the system is used, these tests won't be able to
-find its SPKG installed. Add some ellipses, and switch one test to
-look for sage_conf instead.
----
- src/sage/misc/package.py | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/src/sage/misc/package.py b/src/sage/misc/package.py
-index 84f3d50..c7ad206 100644
---- a/src/sage/misc/package.py
-+++ b/src/sage/misc/package.py
-@@ -386,9 +386,9 @@ def installed_packages(exclude_pip=True):
-     EXAMPLES::
- 
-         sage: sorted(installed_packages().keys())  # optional - build
--        [...'gmpy2', ...'sage_conf', ...]
--        sage: installed_packages()['gmpy2']  # optional - build, random
--        '2.1.0b5'
-+        [...'sage_conf', ...]
-+        sage: installed_packages()['sage_conf']  # optional - build, random
-+        '9.5'
- 
-     .. SEEALSO::
- 
--- 
-cgit v1.0-1-gd88e
-
diff --git a/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch b/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
deleted file mode 100644
index 093e3d56eb33..000000000000
--- a/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-More site packages not included in trac 29665
-
-diff --git a/build/pkgs/gmpy2/spkg-configure.m4 b/build/pkgs/gmpy2/spkg-configure.m4
-new file mode 100644
-index 0000000000..2d0390f7db
---- /dev/null
-+++ b/build/pkgs/gmpy2/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([gmpy2], [SAGE_PYTHON_PACKAGE_CHECK([gmpy2])])
-diff --git a/build/pkgs/sphinx/spkg-configure.m4 b/build/pkgs/sphinx/spkg-configure.m4
-new file mode 100644
-index 0000000000..e149fbb2cf
---- /dev/null
-+++ b/build/pkgs/sphinx/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([sphinx], [SAGE_PYTHON_PACKAGE_CHECK([sphinx])])
-diff --git a/build/pkgs/typing_extensions/spkg-configure.m4 b/build/pkgs/typing_extensions/spkg-configure.m4
-new file mode 100644
-index 0000000000..d475fd8257
---- /dev/null
-+++ b/build/pkgs/typing_extensions/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([typing_extensions], [SAGE_PYTHON_PACKAGE_CHECK([typing_extensions])])
--- 
-diff --git a/build/pkgs/gmpy2/install-requires.txt b/build/pkgs/gmpy2/install-requires.txt
-index 51d24518ef..c25feff557 100644
---- a/build/pkgs/gmpy2/install-requires.txt
-+++ b/build/pkgs/gmpy2/install-requires.txt
-@@ -1,3 +1 @@
--# We would like to write gmpy2 >=2.1.0b5, but pipenv does not accept prereleases in version ranges
--# https://github.com/pypa/pipenv/issues/1760
--gmpy2 ==2.1.0rc1
-+gmpy2 >=2.1
-diff --git a/build/pkgs/ptyprocess/install-requires.txt b/build/pkgs/ptyprocess/install-requires.txt
-index de89260872..7c336f636c 100644
---- a/build/pkgs/ptyprocess/install-requires.txt
-+++ b/build/pkgs/ptyprocess/install-requires.txt
-@@ -1,3 +1,3 @@
--ptyprocess ==0.5.1
-+ptyprocess
- # https://trac.sagemath.org/ticket/31280#comment:42 and following
- # sagelib is not compatible with ptyprocess 0.5.2, 0.6, and 0.7
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index de9fe5177766..e182267cdb96 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -39,6 +39,21 @@ _spkg_skip="appnope fonttools importlib_resources pycygwin
 # Force use these sage packages from system
 _spkg_system="cppy cython cysignals cypari pplpy fpylll memory_allocator
  primecountpy
+ alabaster argcomplete argon2_cffi attrs babel backcall beniget bleach certifi
+ cffi charset_normalizer cvxopt cycler dateutil debugpy decorator defusedxml
+ docutils entrypoints flit_core gast gmpy2 html5lib idna imagesize
+ importlib_metadata importlib_resources ipykernel ipython ipython_genutils
+ ipywidgets jedi jinja2 jsonschema jupyter_client jupyter_core
+ jupyterlab_pygments kiwisolver markupsafe matplotlib matplotlib_inline mistune
+ mpmath nbclient nbconvert nbformat nest_asyncio networkx notebook numpy
+ packaging pandocfilters parso pexpect pickleshare pillow pip pkgconfig pluggy
+ ply prometheus_client prompt_toolkit ptyprocess py pybind11 pycparser pygments
+ pyparsing pyrsistent pythran pytz pyzmq requests scipy send2trash setuptools
+ setuptools_scm simplegeneric six snowballstemmer sphinx
+ sphinxcontrib_applehelp sphinxcontrib_devhelp sphinxcontrib_htmlhelp
+ sphinxcontrib_jsmath sphinxcontrib_qthelp sphinxcontrib_serializinghtml sympy
+ terminado testpath texttable tomli tornado traitlets typing_extensions tzlocal
+ urllib3 wcwidth webencodings wheel widgetsnbextension zipp
  linbox gap maxima"
 
 # Databases to be used from system

From 516532c83ec9a130e52a2b67828e815d29767be9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Wed, 19 Jan 2022 19:13:37 -0300
Subject: [PATCH 06/11] sagemath: simplify ratpoints patch

---
 .../patches/zzz-dont_link_ratpoints.patch     |   8 +
 .../patches/zzz-remove_ratpoints.patch        | 887 ------------------
 srcpkgs/sagemath/template                     |   4 +-
 3 files changed, 11 insertions(+), 888 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/zzz-dont_link_ratpoints.patch
 delete mode 100644 srcpkgs/sagemath/patches/zzz-remove_ratpoints.patch

diff --git a/srcpkgs/sagemath/patches/zzz-dont_link_ratpoints.patch b/srcpkgs/sagemath/patches/zzz-dont_link_ratpoints.patch
new file mode 100644
index 000000000000..b3c5c734298a
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-dont_link_ratpoints.patch
@@ -0,0 +1,8 @@
+--- a/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx
++++ b/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx
+@@ -1,5 +1,3 @@
+-# distutils: libraries = ratpoints
+-
+ r"""
+ Descent on elliptic curves over `\QQ` with a 2-isogeny
+ """
diff --git a/srcpkgs/sagemath/patches/zzz-remove_ratpoints.patch b/srcpkgs/sagemath/patches/zzz-remove_ratpoints.patch
deleted file mode 100644
index 0842d9d7f6d5..000000000000
--- a/srcpkgs/sagemath/patches/zzz-remove_ratpoints.patch
+++ /dev/null
@@ -1,887 +0,0 @@
-From 3178a5e1e4f7174343fd913494ae255b3e05fb85 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
-Date: Mon, 17 Jan 2022 21:04:42 -0300
-Subject: [PATCH] ratpoints: remove deprecated package
-
----
- .github/workflows/ci-cygwin-minimal.yml       |   2 +-
- .github/workflows/ci-cygwin-standard.yml      |   2 +-
- COPYING.txt                                   |   1 -
- build/pkgs/ratpoints/SPKG.rst                 |  29 --
- build/pkgs/ratpoints/checksums.ini            |   4 -
- build/pkgs/ratpoints/dependencies             |   5 -
- build/pkgs/ratpoints/distros/arch.txt         |   1 -
- build/pkgs/ratpoints/distros/conda.txt        |   1 -
- build/pkgs/ratpoints/distros/debian.txt       |   1 -
- build/pkgs/ratpoints/distros/nix.txt          |   1 -
- build/pkgs/ratpoints/distros/repology.txt     |   1 -
- build/pkgs/ratpoints/package-version.txt      |   1 -
- build/pkgs/ratpoints/patches/Makefile.patch   |  37 ---
- .../patches/sturm_and_rp_private.patch        | 194 ------------
- build/pkgs/ratpoints/spkg-install.in          |  46 ---
- build/pkgs/ratpoints/type                     |   1 -
- build/pkgs/sagelib/dependencies               |   2 +-
- src/sage/libs/ratpoints.pxd                   |  74 -----
- src/sage/libs/ratpoints.pyx                   | 283 ------------------
- .../elliptic_curves/descent_two_isogeny.pyx   |   2 -
- src/sage_setup/library_order.py               |   2 +-
- 21 files changed, 4 insertions(+), 686 deletions(-)
- delete mode 100644 build/pkgs/ratpoints/SPKG.rst
- delete mode 100644 build/pkgs/ratpoints/checksums.ini
- delete mode 100644 build/pkgs/ratpoints/dependencies
- delete mode 100644 build/pkgs/ratpoints/distros/arch.txt
- delete mode 100644 build/pkgs/ratpoints/distros/conda.txt
- delete mode 100644 build/pkgs/ratpoints/distros/debian.txt
- delete mode 100644 build/pkgs/ratpoints/distros/nix.txt
- delete mode 100644 build/pkgs/ratpoints/distros/repology.txt
- delete mode 100644 build/pkgs/ratpoints/package-version.txt
- delete mode 100644 build/pkgs/ratpoints/patches/Makefile.patch
- delete mode 100644 build/pkgs/ratpoints/patches/sturm_and_rp_private.patch
- delete mode 100644 build/pkgs/ratpoints/spkg-install.in
- delete mode 100644 build/pkgs/ratpoints/type
- delete mode 100644 src/sage/libs/ratpoints.pxd
- delete mode 100644 src/sage/libs/ratpoints.pyx
-
-diff --git a/.github/workflows/ci-cygwin-minimal.yml b/.github/workflows/ci-cygwin-minimal.yml
-index 9e847e7474..9df1365657 100644
---- a/.github/workflows/ci-cygwin-minimal.yml
-+++ b/.github/workflows/ci-cygwin-minimal.yml
-@@ -217,7 +217,7 @@ jobs:
-     env:
-       STAGE: ii-b
-       PREVIOUS_STAGES: i-*
--      TARGETS: singular maxima gap pari gfan palp flintqs ratpoints arb ecm givaro
-+      TARGETS: singular maxima gap pari gfan palp flintqs arb ecm givaro
-       LOCAL_ARTIFACT_NAME: sage-local-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
-       LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
- 
-diff --git a/.github/workflows/ci-cygwin-standard.yml b/.github/workflows/ci-cygwin-standard.yml
-index cbbe0f46a8..8aee1c2c3c 100644
---- a/.github/workflows/ci-cygwin-standard.yml
-+++ b/.github/workflows/ci-cygwin-standard.yml
-@@ -217,7 +217,7 @@ jobs:
-     env:
-       STAGE: ii-b
-       PREVIOUS_STAGES: i-*
--      TARGETS: singular maxima gap pari gfan palp flintqs ratpoints arb ecm givaro
-+      TARGETS: singular maxima gap pari gfan palp flintqs arb ecm givaro
-       LOCAL_ARTIFACT_NAME: sage-local-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
-       LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
- 
-diff --git a/COPYING.txt b/COPYING.txt
-index 1176a856a0..a3e9cc6645 100644
---- a/COPYING.txt
-+++ b/COPYING.txt
-@@ -107,7 +107,6 @@ pynac                       GPLv2+
- pyparsing                   MIT License
- python                      Python License (see below)
- R                           GPLv2+
--ratpoints                   GPLv2+
- readline                    GPLv3+
- rpy                         GPLv2+
- rubiks/dietz                GPL, any version
-diff --git a/build/pkgs/ratpoints/SPKG.rst b/build/pkgs/ratpoints/SPKG.rst
-deleted file mode 100644
-index 6607094bec..0000000000
---- a/build/pkgs/ratpoints/SPKG.rst
-+++ /dev/null
-@@ -1,29 +0,0 @@
--ratpoints: Find rational points on hyperelliptic curves
--=======================================================
--
--Description
-------------
--
--Michael Stoll's program which searches for rational points on
--hyperelliptic curves.
--
--NOTE: the ratpoints package has been assimilated by PARI/GP. Therefore,
--this package (as Sage package) is deprecated. In the future, it will be
--removed from Sage.
--
--
--Upstream Contact
------------------
--
---  Author: Michael Stoll
---  Email: Michael.Stoll@uni-bayreuth.de
---  Website: http://www.mathe2.uni-bayreuth.de/stoll/programs/
--
--
--Note on SSE2 instructions
--~~~~~~~~~~~~~~~~~~~~~~~~~
--
---  On several architectures, the SSE2 instructions used by ratpoints
--   cause
--   compiler errors. In the case that ratpoints fails to build with SSE2
--   instructions enabled, the build is repeated with SSE2 disabled.
-diff --git a/build/pkgs/ratpoints/checksums.ini b/build/pkgs/ratpoints/checksums.ini
-deleted file mode 100644
-index 46ba1c9ec1..0000000000
---- a/build/pkgs/ratpoints/checksums.ini
-+++ /dev/null
-@@ -1,4 +0,0 @@
--tarball=ratpoints-VERSION.tar.bz2
--sha1=14fbc3dd50742794e0b33d2dd1217e5dd8ad2623
--md5=9bf091d1b90132433f0a1fc6b585d024
--cksum=670991933
-diff --git a/build/pkgs/ratpoints/dependencies b/build/pkgs/ratpoints/dependencies
-deleted file mode 100644
-index 9a77ea16f7..0000000000
---- a/build/pkgs/ratpoints/dependencies
-+++ /dev/null
-@@ -1,5 +0,0 @@
--$(MP_LIBRARY)
--
------------
--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/ratpoints/distros/arch.txt b/build/pkgs/ratpoints/distros/arch.txt
-deleted file mode 100644
-index e137758627..0000000000
---- a/build/pkgs/ratpoints/distros/arch.txt
-+++ /dev/null
-@@ -1 +0,0 @@
--ratpoints
-diff --git a/build/pkgs/ratpoints/distros/conda.txt b/build/pkgs/ratpoints/distros/conda.txt
-deleted file mode 100644
-index e137758627..0000000000
---- a/build/pkgs/ratpoints/distros/conda.txt
-+++ /dev/null
-@@ -1 +0,0 @@
--ratpoints
-diff --git a/build/pkgs/ratpoints/distros/debian.txt b/build/pkgs/ratpoints/distros/debian.txt
-deleted file mode 100644
-index dabd28d624..0000000000
---- a/build/pkgs/ratpoints/distros/debian.txt
-+++ /dev/null
-@@ -1 +0,0 @@
--libratpoints-dev
-diff --git a/build/pkgs/ratpoints/distros/nix.txt b/build/pkgs/ratpoints/distros/nix.txt
-deleted file mode 100644
-index e137758627..0000000000
---- a/build/pkgs/ratpoints/distros/nix.txt
-+++ /dev/null
-@@ -1 +0,0 @@
--ratpoints
-diff --git a/build/pkgs/ratpoints/distros/repology.txt b/build/pkgs/ratpoints/distros/repology.txt
-deleted file mode 100644
-index e137758627..0000000000
---- a/build/pkgs/ratpoints/distros/repology.txt
-+++ /dev/null
-@@ -1 +0,0 @@
--ratpoints
-diff --git a/build/pkgs/ratpoints/package-version.txt b/build/pkgs/ratpoints/package-version.txt
-deleted file mode 100644
-index efed46a7bd..0000000000
---- a/build/pkgs/ratpoints/package-version.txt
-+++ /dev/null
-@@ -1 +0,0 @@
--2.1.3.p5
-diff --git a/build/pkgs/ratpoints/patches/Makefile.patch b/build/pkgs/ratpoints/patches/Makefile.patch
-deleted file mode 100644
-index 093d7c0018..0000000000
---- a/build/pkgs/ratpoints/patches/Makefile.patch
-+++ /dev/null
-@@ -1,37 +0,0 @@
----- src/Makefile	2009-10-01 01:08:54.000000000 +0200
--+++ patches/Makefile	2012-03-17 13:57:33.026315142 +0100
--@@ -21,11 +21,11 @@
-- #
-- #    Michael Stoll, September 21, 2009
-- 
---CC = gcc
--+CC ?= gcc
-- RM = rm -f
-- INSTALL = cp
-- 
---INSTALL_DIR = /usr/local
--+INSTALL_DIR ?= /usr/local
-- 
-- DISTFILES = Makefile ratpoints.h rp-private.h primes.h \
--             gen_find_points_h.c gen_init_sieve_h.c \
--@@ -47,14 +47,14 @@
-- 	diff -q testbase rptest.out
-- 
-- install-bin: ratpoints
---	${INSTALL} ratpoints ${INSTALL_DIR}/bin/
---	chmod 755 ${INSTALL_DIR}/bin/ratpoints
--+	${INSTALL} ratpoints "${INSTALL_DIR}/bin/"
--+	chmod 755 "${INSTALL_DIR}/bin/ratpoints"
-- 
-- install-lib: ratpoints.h libratpoints.a
---	${INSTALL} ratpoints.h ${INSTALL_DIR}/include/
---	chmod 644 ${INSTALL_DIR}/include/ratpoints.h
---	${INSTALL} libratpoints.a ${INSTALL_DIR}/lib/
---	chmod 644 ${INSTALL_DIR}/lib/libratpoints.a
--+	${INSTALL} ratpoints.h "${INSTALL_DIR}/include/"
--+	chmod 644 "${INSTALL_DIR}/include/ratpoints.h"
--+	${INSTALL} libratpoints.a "${INSTALL_DIR}/lib/"
--+	chmod 644 "${INSTALL_DIR}/lib/libratpoints.a"
-- 
-- install: install-bin install-lib
-- 
-diff --git a/build/pkgs/ratpoints/patches/sturm_and_rp_private.patch b/build/pkgs/ratpoints/patches/sturm_and_rp_private.patch
-deleted file mode 100644
-index 664198c4de..0000000000
---- a/build/pkgs/ratpoints/patches/sturm_and_rp_private.patch
-+++ /dev/null
-@@ -1,194 +0,0 @@
--diff --git a/rp-private.h b/rp-private.h
--index b4c7dad..0c7193e 100644
----- a/rp-private.h
--+++ b/rp-private.h
--@@ -36,7 +36,7 @@
-- #define LONG_SHIFT ((LONG_LENGTH == 16) ? 4 : \
--                     (LONG_LENGTH == 32) ? 5 : \
-- 		    (LONG_LENGTH == 64) ? 6 : 0)
---#define LONG_MASK (~(-1L<<LONG_SHIFT))
--+#define LONG_MASK (~(-(1L<<LONG_SHIFT)))
-- 
-- /* Check if SSE instructions can be used.
--    We assume that one SSE word of 128 bit is two long's,
--diff --git a/sturm.c b/sturm.c
--index c78d7c6..5fd2cf5 100644
----- a/sturm.c
--+++ b/sturm.c
--@@ -27,7 +27,6 @@
--  ***********************************************************************/
-- 
-- #include "ratpoints.h"
---
-- /**************************************************************************
--  * Arguments of _ratpoints_compute_sturm() : (from the args argument)     *
--  *                                                                        *
--@@ -53,7 +52,7 @@
-- /* A helper function: evaluate the polynomial in cofs[] of given degree
--   at num/2^denexp and return the sign. */
-- 
---static long eval_sign(ratpoints_args *args, mpz_t *cofs, long degree,
--+static long eval_sign(const ratpoints_args *args, const mpz_t *cofs, long degree,
--                       long num, long denexp)
-- {
--   long n, e, s;
--@@ -70,11 +69,80 @@ static long eval_sign(ratpoints_args *args, mpz_t *cofs, long degree,
--   return(s);
-- }
-- 
--+static const    long max = (long)(((unsigned long)(-1))>>1);
--+static const    long min = (long)(-(((unsigned long)(-1))>>1));
--+    /* recursive helper function */
--+static void iterate(long nl, long nr, long del, long der, long cleft, long cright,
--+                 long sl, long sr, long depth,
--+		 ratpoints_interval **iptr, const ratpoints_interval *ivlo,
--+		 const ratpoints_args *args, const long k, const long sturm_degs[],
--+                 const mpz_t sturm[][args->degree + 1])
--+    { /* nl/2^del, nr/2^der : interval left/right endpoints,
--+         cleft, cright: sign change counts at endpoints,
--+         sl, sr: signs at endpoints,
--+         depth: iteration depth */
--+     long iter = args->sturm;
--+      if(cleft == cright && sl < 0) { return; }
--+         /* here we know the polynomial is negative on the interval */
--+      if((cleft == cright && sl > 0) || depth >= iter)
--+      /* we have to add/extend an interval if we either know that
--+         the polynomial is positive on the interval (first condition)
--+         or the maximal iteration depth has been reached (second condition) */
--+      { double l = ((double)nl)/((double)(1<<del));
--+        double u = ((double)nr)/((double)(1<<der));
--+        if(*iptr == ivlo)
--+        { (*iptr)->low = l; (*iptr)->up  = u; (*iptr)++; }
--+        else
--+        { if(((*iptr)-1)->up == l) /* extend interval */
--+          { ((*iptr)-1)->up = u; }
--+          else /* new interval */
--+          { (*iptr)->low = l; (*iptr)->up  = u; (*iptr)++; }
--+        }
--+        return;
--+      }
--+      /* now we must split the interval and evaluate the sturm sequence
--+         at the midpoint */
--+      { long nm, dem, s0, s1, s2, s, cmid = 0, n;
--+        if(nl == min)
--+        { if(nr == max) { nm = 0; dem = 0; }
--+          else { nm = (nr == 0) ? -1 : 2*nr; dem = 0; }
--+        }
--+        else
--+        { if(nr == max) { nm = (nl == 0) ? 1 : 2*nl; dem = 0; }
--+          else /* "normal" case */
--+          { if(del == der) /* then both are zero */
--+            { if(((nl+nr) & 1) == 0) { nm = (nl+nr)>>1; dem = 0; }
--+              else { nm = nl+nr; dem = 1; }
--+            }
--+            else /* here one de* is greater */
--+            { if(del > der) { nm = nl + (nr<<(del-der)); dem = del+1; }
--+              else { nm = (nl<<(der-del)) + nr; dem = der+1; }
--+            }
--+          }
--+        }
--+        s0 = eval_sign(args, sturm[0], sturm_degs[0], nm, dem);
--+        s1 = eval_sign(args, sturm[1], sturm_degs[1], nm, dem);
--+        if(s0*s1 == -1) { cmid++; }
--+        s = (s1 == 0) ? s0 : s1;
--+        for(n = 2; n <= k; n++)
--+        { s2 = eval_sign(args, sturm[n], sturm_degs[n], nm, dem);
--+          if(s2 == -s) { cmid++; s = s2; }
--+          else if(s2 != 0) { s = s2; }
--+        }
--+        /* now recurse */
--+        iterate(nl, nm, del, dem, cleft, (s0==0) ? (cmid+1) : cmid,
--+                sl, (s0==0) ? -s1 : s0, depth+1,
--+                iptr, ivlo, args, k, sturm_degs, sturm);
--+        iterate(nm, nr, dem, der, cmid, cright,
--+                (s0==0) ? s1 : s0, sr, depth+1,
--+		iptr, ivlo, args, k, sturm_degs, sturm);
--+      }
--+    } /* end iterate() */
--+
-- long _ratpoints_compute_sturm(ratpoints_args *args)
-- { 
--   mpz_t *cofs = args->cof;
--   long degree = args->degree;
---  long iter = args->sturm; 
--   ratpoints_interval *ivlist = args->domain;
--   long num_iv = args->num_inter;
--   long n, m, k, new_num;
--@@ -165,75 +233,12 @@ long _ratpoints_compute_sturm(ratpoints_args *args)
--   /* recall: typedef struct {double low; double up;} ratpoints_interval; */
--   { ratpoints_interval ivlocal[1 + (degree>>1)];
--     ratpoints_interval *iptr = &ivlocal[0];
---    long max = (long)(((unsigned long)(-1))>>1);
---    long min = -max;
--     long num_intervals;
--     long slcf = mpz_cmp_si(cofs[degree], 0);
-- 
---    /* recursive helper function */
---    void iterate(long nl, long nr, long del, long der, long cleft, long cright,
---                 long sl, long sr, long depth)
---    { /* nl/2^del, nr/2^der : interval left/right endpoints,
---         cleft, cright: sign change counts at endpoints,
---         sl, sr: signs at endpoints,
---         depth: iteration depth */
---      if(cleft == cright && sl < 0) { return; }
---         /* here we know the polynomial is negative on the interval */
---      if((cleft == cright && sl > 0) || depth >= iter) 
---      /* we have to add/extend an interval if we either know that
---         the polynomial is positive on the interval (first condition)
---         or the maximal iteration depth has been reached (second condition) */
---      { double l = ((double)nl)/((double)(1<<del));
---        double u = ((double)nr)/((double)(1<<der));
---        if(iptr == &ivlocal[0])
---        { iptr->low = l; iptr->up  = u; iptr++; }
---        else
---        { if((iptr-1)->up == l) /* extend interval */
---          { (iptr-1)->up = u; }
---          else /* new interval */
---          { iptr->low = l; iptr->up  = u; iptr++; }
---        }
---        return; 
---      }
---      /* now we must split the interval and evaluate the sturm sequence
---         at the midpoint */
---      { long nm, dem, s0, s1, s2, s, cmid = 0, n;
---        if(nl == min)
---        { if(nr == max) { nm = 0; dem = 0; }
---          else { nm = (nr == 0) ? -1 : 2*nr; dem = 0; }
---        }
---        else
---        { if(nr == max) { nm = (nl == 0) ? 1 : 2*nl; dem = 0; } 
---          else /* "normal" case */
---          { if(del == der) /* then both are zero */
---            { if(((nl+nr) & 1) == 0) { nm = (nl+nr)>>1; dem = 0; }
---              else { nm = nl+nr; dem = 1; } 
---            }
---            else /* here one de* is greater */
---            { if(del > der) { nm = nl + (nr<<(del-der)); dem = del+1; }
---              else { nm = (nl<<(der-del)) + nr; dem = der+1; }
---            }
---          }
---        }
---        s0 = eval_sign(args, sturm[0], sturm_degs[0], nm, dem);
---        s1 = eval_sign(args, sturm[1], sturm_degs[1], nm, dem);
---        if(s0*s1 == -1) { cmid++; }
---        s = (s1 == 0) ? s0 : s1;
---        for(n = 2; n <= k; n++)
---        { s2 = eval_sign(args, sturm[n], sturm_degs[n], nm, dem);
---          if(s2 == -s) { cmid++; s = s2; }
---          else if(s2 != 0) { s = s2; }
---        }
---        /* now recurse */
---        iterate(nl, nm, del, dem, cleft, (s0==0) ? (cmid+1) : cmid, 
---                sl, (s0==0) ? -s1 : s0, depth+1);
---        iterate(nm, nr, dem, der, cmid, cright, 
---                (s0==0) ? s1 : s0, sr, depth+1);
---      }
---    } /* end iterate() */
---
--     iterate(min, max, 0, 0, count2, count1, 
---            (degree & 1) ? -slcf : slcf, slcf, 0);
--+            (degree & 1) ? -slcf : slcf, slcf, 0,
--+	    &iptr, &ivlocal[0], args, k, sturm_degs, sturm);
--     num_intervals = iptr - &ivlocal[0];
--     /* intersect with given intervals */
--     { ratpoints_interval local_copy[num_iv];
-diff --git a/build/pkgs/ratpoints/spkg-install.in b/build/pkgs/ratpoints/spkg-install.in
-deleted file mode 100644
-index b6856c4d4a..0000000000
---- a/build/pkgs/ratpoints/spkg-install.in
-+++ /dev/null
-@@ -1,46 +0,0 @@
--PRIME_SIZE=7
--
--CCFLAGS_NO_SSE="-I$SAGE_LOCAL/include -Wall -O2 -fPIC -DRATPOINTS_MAX_BITS_IN_PRIME=$PRIME_SIZE"
--CCFLAGS2="-L$SAGE_LOCAL/lib -lgmp -lm $LDFLAGS"
--CCFLAGS3="-L. -lratpoints"
--
--if [[ "$UNAME" = "Darwin" ]]; then
--    CCFLAGS1="$CCFLAGS_NO_SSE"
--    echo "Building without SSE2 instructions (MacOS X)."
--else
--    CCFLAGS1="$CCFLAGS_NO_SSE -DUSE_SSE"
--    echo "Attempting to build ratpoints making use of SSE2 instructions."
--fi
--
--# Copy CFLAGS set externally to CCFLAGS.
--CCFLAGS="$CFLAGS"
--
--export CCFLAGS1
--export CCFLAGS2
--export CCFLAGS3
--export CCFLAGS
--
--cd src/
--
--#############################
--# Build (just) the library: #
--#############################
--
--# PLEASE, don't break this again by deleting "libratpoints.a".  See trac 8267.
--if ! $MAKE libratpoints.a; then
--    [ "$UNAME" = "Darwin" ] && sdh_die "Error building ratpoints."
--    echo "Build failed. Trying without SSE2 instructions."
--    CCFLAGS1="$CCFLAGS_NO_SSE"
--    sdh_make libratpoints.a
--fi
--
--##############################################
--# Install (just) the library and its header: #
--##############################################
--
--# The following requires that the Makefile got patched;
--# otherwise one could pass 'INSTALL_DIR=...' on the 'make'
--# command line:
--export INSTALL_DIR="$SAGE_DESTDIR_LOCAL"
--mkdir -p "$INSTALL_DIR"/{lib,include}
--sdh_make install-lib
-diff --git a/build/pkgs/ratpoints/type b/build/pkgs/ratpoints/type
-deleted file mode 100644
-index a6a7b9cd72..0000000000
---- a/build/pkgs/ratpoints/type
-+++ /dev/null
-@@ -1 +0,0 @@
--standard
-diff --git a/build/pkgs/sagelib/dependencies b/build/pkgs/sagelib/dependencies
-index 9c7797b1f4..6a7d4b8132 100644
---- a/build/pkgs/sagelib/dependencies
-+++ b/build/pkgs/sagelib/dependencies
-@@ -1,4 +1,4 @@
--FORCE $(SCRIPTS) arb boost_cropped $(BLAS) brial cliquer cypari cysignals cython ecl eclib ecm flint libgd gap giac givaro glpk gmpy2 gsl iml jinja2 jupyter_core lcalc lrcalc libbraiding libhomfly libpng linbox m4ri m4rie memory_allocator mpc mpfi mpfr $(MP_LIBRARY) ntl numpy pari pip pkgconfig planarity ppl pplpy primesieve primecount primecountpy pycygwin $(PYTHON) ratpoints requests rw sage_conf singular symmetrica zn_poly $(PCFILES) | $(PYTHON_TOOLCHAIN) sage_setup
-+FORCE $(SCRIPTS) arb boost_cropped $(BLAS) brial cliquer cypari cysignals cython ecl eclib ecm flint libgd gap giac givaro glpk gmpy2 gsl iml jinja2 jupyter_core lcalc lrcalc libbraiding libhomfly libpng linbox m4ri m4rie memory_allocator mpc mpfi mpfr $(MP_LIBRARY) ntl numpy pari pip pkgconfig planarity ppl pplpy primesieve primecount primecountpy pycygwin $(PYTHON) requests rw sage_conf singular symmetrica zn_poly $(PCFILES) | $(PYTHON_TOOLCHAIN) sage_setup
- 
- ----------
- All lines of this file are ignored except the first.
-diff --git a/src/sage/libs/ratpoints.pxd b/src/sage/libs/ratpoints.pxd
-deleted file mode 100644
-index 67e309b109..0000000000
---- a/src/sage/libs/ratpoints.pxd
-+++ /dev/null
-@@ -1,74 +0,0 @@
--from sage.rings.integer cimport Integer
--from sage.libs.gmp.mpz cimport *
--
--cdef extern from "ratpoints.h":
--    long RATPOINTS_MAX_DEGREE
--    long RATPOINTS_ARRAY_SIZE
--    long RATPOINTS_DEFAULT_SP1
--    long RATPOINTS_DEFAULT_SP2
--    long RATPOINTS_DEFAULT_NUM_PRIMES
--    long RATPOINTS_DEFAULT_MAX_FORBIDDEN
--    long RATPOINTS_DEFAULT_STURM
--    long RATPOINTS_NON_SQUAREFREE
--    long RATPOINTS_BAD_ARGS
--
--    # for args flags:
--    long RATPOINTS_NO_CHECK # when set, do not check whether the surviving
--                            # x-coordinates give rise to rational points
--    long RATPOINTS_NO_Y # when set, only list x coordinates instead of actual points
--    long RATPOINTS_NO_REVERSE # when set, do not modify the mpz_t array
--    long RATPOINTS_NO_JACOBI # when set, prevent use of Jacobi symbol test
--    long RATPOINTS_VERBOSE # when set, print some output on what ratpoints is doing
--    # define RATPOINTS_FLAGS_INPUT_MASK \
--    # (RATPOINTS_NO_CHECK | RATPOINTS_NO_Y | RATPOINTS_NO_REVERSE | \
--    #  RATPOINTS_NO_JACOBI | RATPOINTS_VERBOSE)
--
--
--    ctypedef struct ratpoints_interval:
--        double low
--        double up
--    ctypedef struct ratpoints_args:
--        mpz_t *cof
--        long degree
--        long height
--        ratpoints_interval *domain
--        long num_inter
--        long b_low
--        long b_high
--        long sp1
--        long sp2
--        long array_size
--        long sturm
--        long num_primes
--        long max_forbidden
--        unsigned int flags
--        # from here: private data
--        # mpz_t *work
--        # void *se_buffer
--        # void *se_next
--        # void *ba_buffer
--        # void *ba_next
--        # int *int_buffer
--        # int *int_next
--        # void *sieve_list
--    long find_points(ratpoints_args*, int proc(long, long, mpz_t, void*, int*), void*)
--    void find_points_init(ratpoints_args*)
--    long find_points_work(ratpoints_args*, int proc(long, long, mpz_t, void*, int*), void*)
--    void find_points_clear(ratpoints_args*)
--
--ctypedef struct point_list:
--    long *xes
--    mpz_t *ys
--    long *zs
--    long array_size
--    long num_points
--    long max_num_points
--
--ctypedef struct info_struct_exists_only:
--    int verbose
--
--cdef int ratpoints_mpz_exists_only(mpz_t *, long, int, bint) except -1
--
--
--
--
-diff --git a/src/sage/libs/ratpoints.pyx b/src/sage/libs/ratpoints.pyx
-deleted file mode 100644
-index 257dfe3eeb..0000000000
---- a/src/sage/libs/ratpoints.pyx
-+++ /dev/null
-@@ -1,283 +0,0 @@
--# distutils: libraries = ratpoints
--r"""
--Hyperelliptic Curve Point Finding, via ratpoints (deprecated)
--
--This module is deprecated, use PARI instead::
--
--    sage: pari(EllipticCurve("389a1")).ellratpoints(4)
--    [[-2, 0], [-2, -1], [-1, 1], [-1, -2], [0, 0], [0, -1], [1, 0], [1, -1], [3, 5], [3, -6], [4, 8], [4, -9], [-3/4, 7/8], [-3/4, -15/8]]
--    sage: pari("[x^3 + x^2 - 2*x, 1]").hyperellratpoints(4)
--    [[-2, 0], [-2, -1], [-1, 1], [-1, -2], [0, 0], [0, -1], [1, 0], [1, -1], [3, 5], [3, -6], [4, 8], [4, -9], [-3/4, 7/8], [-3/4, -15/8]]
--"""
--
--from cysignals.memory cimport sig_malloc, sig_realloc, sig_free
--from cysignals.signals cimport sig_on, sig_off
--
--from sage.misc.superseded import deprecation_cython as deprecation
--deprecation(24531, "the module sage.libs.ratpoints is deprecated; use pari.ellratpoints or pari.hyperellratpoints instead")
--
--
--cdef int process(long x, long z, mpz_t y, void *info0, int *quit):
--    # ratpoints calls this function when it finds a point [x : y : z]
--    # info0 is the pointer passed to ratpoints originally
--    # if quit[0] is set to a nonzero value, ratpoints will abort immediately
--    cdef point_list *plist = <point_list *> info0
--    cdef long i
--    if plist.array_size == plist.num_points:
--        i = plist.array_size
--        plist.array_size *= 2
--        plist.xes = <long *> sig_realloc(plist.xes, plist.array_size * sizeof(long))
--        plist.ys = <mpz_t *> sig_realloc(plist.ys, plist.array_size * sizeof(mpz_t))
--        plist.zs = <long *> sig_realloc(plist.zs, plist.array_size * sizeof(long))
--        while i < plist.array_size:
--            mpz_init(plist.ys[i])
--            i += 1
--    plist.xes[plist.num_points] = x
--    mpz_set(plist.ys[plist.num_points], y)
--    plist.zs[plist.num_points] = z
--    plist.num_points += 1
--    if plist.max_num_points > 0:
--        if plist.max_num_points == plist.num_points:
--            quit[0] = -1
--    return 1 # weight for counting the points
--
--def ratpoints(list coeffs, long H, verbose=False, long max=0,
--              min_x_denom=None, max_x_denom=None, intervals=[]):
--    """
--    Access the ratpoints library to find points on the hyperelliptic curve:
--
--    `y^2 = a_n x^n + \cdots + a_1 x + a_0.`
--
--    INPUT:
--
--    - ``coeffs`` -- list of integer coefficients `a_0` , `a_1`, ..., `a_n`
--
--    - ``H`` -- the bound for the denominator and the absolute value of the
--      numerator of the `x`-coordinate
--
--    - ``verbose`` -- if ``True``, ratpoints will print comments about
--      its progress
--
--    - ``max`` -- maximum number of points to find (if 0, find all of them)
--
--    OUTPUT:
--
--    The points output by this program are points in (1, ceil(n/2), 1)-weighted
--    projective space. If n is even, then the associated homogeneous equation is
--    `y^2 = a_n x^n + \cdots + a_1 x z^{n-1} + a_0 z^n` while if n is odd, it is
--    `y^2 = a_n x^n z + \cdots + a_1 x z^n + a_0 z^{n+1}`.
--
--    EXAMPLES::
--
--        sage: from sage.libs.ratpoints import ratpoints
--        doctest:...: DeprecationWarning: the module sage.libs.ratpoints is deprecated; use pari.ellratpoints or pari.hyperellratpoints instead
--        See http://trac.sagemath.org/24531 for details.
--        sage: for x,y,z in ratpoints([1..6], 200):
--        ....:     print(-1*y^2 + 1*z^6 + 2*x*z^5 + 3*x^2*z^4 + 4*x^3*z^3 + 5*x^4*z^2 + 6*x^5*z)
--        0
--        0
--        0
--        0
--        0
--        0
--        0
--        sage: for x,y,z in ratpoints([1..5], 200):
--        ....:    print(-1*y^2 + 1*z^4 + 2*x*z^3 + 3*x^2*z^2 + 4*x^3*z + 5*x^4)
--        0
--        0
--        0
--        0
--        0
--        0
--        0
--        0
--
--        sage: for x,y,z in ratpoints([1..200], 1000):
--        ....:    print("{} {} {}".format(x,y,z))
--        1 0 0
--        0 1 1
--        0 -1 1
--        201 25353012004564588029934064107520000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 200
--        201 -25353012004564588029934064107520000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 200
--
--    The denominator of `x` can be restricted, for example to find
--    integral points::
--
--        sage: from sage.libs.ratpoints import ratpoints
--        sage: coeffs = [400, -112, 0, 1]
--        sage: ratpoints(coeffs, 10^6, max_x_denom=1, intervals=[[-10,0],[1000,2000]])
--        [(1, 0, 0), (-8, 28, 1), (-8, -28, 1), (-7, 29, 1), (-7, -29, 1),
--         (-4, 28, 1), (-4, -28, 1), (0, 20, 1), (0, -20, 1), (1368, 50596, 1),
--         (1368, -50596, 1), (1624, 65444, 1), (1624, -65444, 1)]
--
--        sage: ratpoints(coeffs, 1000, min_x_denom=100, max_x_denom=200)
--        [(1, 0, 0),
--        (-656, 426316, 121),
--        (-656, -426316, 121),
--        (452, 85052, 121),
--        (452, -85052, 121),
--        (988, 80036, 121),
--        (988, -80036, 121),
--        (-556, 773188, 169),
--        (-556, -773188, 169),
--        (264, 432068, 169),
--        (264, -432068, 169)]
--
--    Finding the integral points on the compact component of an elliptic curve::
--
--        sage: E = EllipticCurve([0,1,0,-35220,-1346400])
--        sage: e1, e2, e3 = E.division_polynomial(2).roots(multiplicities=False)
--        sage: coeffs = [E.a6(),E.a4(),E.a2(),1]
--        sage: ratpoints(coeffs, 1000, max_x_denom=1, intervals=[[e3,e2]])
--        [(1, 0, 0),
--        (-165, 0, 1),
--        (-162, 366, 1),
--        (-162, -366, 1),
--        (-120, 1080, 1),
--        (-120, -1080, 1),
--        (-90, 1050, 1),
--        (-90, -1050, 1),
--        (-85, 1020, 1),
--        (-85, -1020, 1),
--        (-42, 246, 1),
--        (-42, -246, 1),
--        (-40, 0, 1)]
--    """
--    cdef ratpoints_args args
--    cdef long i, total, verby
--    cdef Integer sage_int, s_x, s_y, s_z
--    cdef point_list *plist
--
--
--    verby = ~0 if verbose else 0
--
--    # Set the coefficient array:
--    coeffs = [Integer(a) for a in coeffs]
--    args.degree = len(coeffs)-1
--    args.cof = <mpz_t *> sig_malloc((args.degree+1) * sizeof(mpz_t))
--
--    # Create an array to hold the points found:
--    plist = <point_list *> sig_malloc(sizeof(point_list))
--    if max == 0:
--        plist.array_size = 64
--    else:
--        plist.array_size = max
--    plist.xes = <long *> sig_malloc(plist.array_size * sizeof(long))
--    plist.ys = <mpz_t *> sig_malloc(plist.array_size * sizeof(mpz_t))
--    for i from 0 <= i < plist.array_size:
--        mpz_init(plist.ys[i])
--    plist.zs = <long *> sig_malloc(plist.array_size * sizeof(long))
--    plist.num_points = 0
--    plist.max_num_points = max
--
--    # Set the height bound:
--    args.height = H
--
--    # Set the intervals to be searched, including any specified:
--    args.num_inter = len(intervals)
--    args.domain = <ratpoints_interval *> sig_malloc((args.num_inter + args.degree) * sizeof(ratpoints_interval))
--    for i,I in enumerate(intervals):
--        args.domain[i].low = I[0]
--        args.domain[i].up  = I[1]
--
--    # Set the minimum and maximum denominators:
--    if not min_x_denom:  min_x_denom = 1
--    if not max_x_denom:  max_x_denom = H
--    args.b_low = min_x_denom
--    args.b_high = max_x_denom
--
--    # Set the remaining arguments, whose non-default use is technical
--    # (see ratpoints documentation)
--    args.sp1 = RATPOINTS_DEFAULT_SP1
--    args.sp2 = RATPOINTS_DEFAULT_SP2
--    args.array_size = RATPOINTS_ARRAY_SIZE
--    args.sturm = RATPOINTS_DEFAULT_STURM
--    args.num_primes = RATPOINTS_DEFAULT_NUM_PRIMES
--    args.max_forbidden = RATPOINTS_DEFAULT_MAX_FORBIDDEN
--    args.flags = (RATPOINTS_VERBOSE & verby)
--
--    for i from 0 <= i <= args.degree:
--        mpz_init(args.cof[i])
--        sage_int = <Integer> coeffs[i]
--        mpz_set(args.cof[i], sage_int.value)
--
--    sig_on()
--    total = find_points(&args, process, <void *>plist)
--    sig_off()
--    if total == RATPOINTS_NON_SQUAREFREE:
--        raise RuntimeError('Polynomial must be square-free')
--    if total == RATPOINTS_BAD_ARGS:
--        raise RuntimeError('Bad arguments to ratpoints')
--
--    for i from 0 <= i <= args.degree:
--        mpz_clear(args.cof[i])
--
--    sig_free(args.cof)
--    sig_free(args.domain)
--
--    cdef list L = []
--    for i from 0 <= i < plist.num_points:
--        s_x = Integer(0)
--        s_y = Integer(0)
--        s_z = Integer(0)
--        mpz_set_si(s_x.value, plist.xes[i])
--        mpz_set(s_y.value, plist.ys[i])
--        mpz_set_si(s_z.value, plist.zs[i])
--        L.append((s_x,s_y,s_z))
--
--    for i from 0 <= i < plist.array_size:
--        mpz_clear(plist.ys[i])
--    sig_free(plist.xes)
--    sig_free(plist.ys)
--    sig_free(plist.zs)
--    sig_free(plist)
--
--    return L
--
--cdef int process_exists_only(long x, long z, mpz_t y, void *info0, int *quit):
--    cdef info_struct_exists_only *info_s = <info_struct_exists_only *>info0
--    cdef Integer YY
--    if info_s.verbose:
--        YY = Integer(0); mpz_set(YY.value, y)
--        print('Found point [ %d : %d : %d ], quitting' % (x, YY, z))
--    quit[0] = -1
--    return 1
--
--cdef int ratpoints_mpz_exists_only(mpz_t *coeffs, long H, int degree, bint verbose) except -1:
--    """
--    Direct call to ratpoints to search for existence only.
--
--    WARNING - The coefficient array will be modified by ratpoints.
--    """
--    cdef ratpoints_args args
--    cdef info_struct_exists_only info_s
--    cdef long total, verby = ~0 if verbose else 0
--    info_s.verbose = verbose
--    assert degree <= RATPOINTS_MAX_DEGREE
--    args.degree = degree
--    args.cof = coeffs
--    args.domain = <ratpoints_interval *> sig_malloc(2*args.degree * sizeof(ratpoints_interval))
--    args.height = H
--    args.num_inter = 0
--    args.b_low = 1
--    args.b_high = H
--    args.sp1 = RATPOINTS_DEFAULT_SP1
--    args.sp2 = RATPOINTS_DEFAULT_SP2
--    args.array_size = RATPOINTS_ARRAY_SIZE
--    args.sturm = RATPOINTS_DEFAULT_STURM
--    args.num_primes = RATPOINTS_DEFAULT_NUM_PRIMES
--    args.max_forbidden = RATPOINTS_DEFAULT_MAX_FORBIDDEN
--    args.flags = (RATPOINTS_VERBOSE & verby)
--    sig_on()
--    total = find_points(&args, process_exists_only, <void *>(&info_s))
--    sig_off()
--    sig_free(args.domain)
--    if total == RATPOINTS_NON_SQUAREFREE:
--        raise RuntimeError('Polynomial must be square-free')
--    if total == RATPOINTS_BAD_ARGS:
--        raise RuntimeError('Bad arguments to ratpoints')
--    return 1 if (total > 0) else 0
--
--
--
--
-diff --git a/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx b/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx
-index 1cc70925fa..c2f994a650 100644
---- a/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx
-+++ b/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx
-@@ -1,5 +1,3 @@
--# distutils: libraries = ratpoints
--
- r"""
- Descent on elliptic curves over `\QQ` with a 2-isogeny
- """
-diff --git a/src/sage_setup/library_order.py b/src/sage_setup/library_order.py
-index 8830d44a95..0b450b3723 100644
---- a/src/sage_setup/library_order.py
-+++ b/src/sage_setup/library_order.py
-@@ -25,7 +25,7 @@ library_order_list = aliases.get("SINGULAR_LIBRARIES", []) + [
-     "giac", "intl", "curl",
-     "ec", "ecm"
- ] + aliases.get("LINBOX_LIBRARIES", []) + aliases.get("FFLASFFPACK_LIBRARIES", []) + aliases.get("GSL_LIBRARIES", []) + [
--    "pari", "flint", "ratpoints", "ecl", "glpk", "ppl",
-+    "pari", "flint", "ecl", "glpk", "ppl",
- ] + arb_dylib_names + [
-     "mpfi", "mpfr", "mpc", "ntl", "gmp", "gmpxx",
-     "brial",
--- 
-2.34.1
-
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index e182267cdb96..97ce9a93f10d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -33,7 +33,7 @@ _SAGE_ROOT=/usr/lib/sage-${version}
 # Skip these sage packages: they are not needed
 _spkg_skip="appnope fonttools importlib_resources pycygwin
  setuptools_scm_git_archive setuptools_wheel sphinxcontrib_websupport
- pplpy_doc vcversioner
+ pplpy_doc vcversioner ratpoints
  jmol mathjax sagenb_export thebe sagetex jupyter_jsmol rpy2 threejs"
 
 # Force use these sage packages from system
@@ -107,6 +107,8 @@ do_clean() {
 }
 
 post_patch() {
+	# these are unused and nothing else uses ratpoints spkg
+	rm src/sage/libs/ratpoints.{pyx,pxd}
 	./bootstrap
 }
 

From 57bb1f764da0dbc0a4821e7a55b6a6da2c1a828a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 24 Jan 2022 15:44:40 -0300
Subject: [PATCH 07/11] sagemath: use --disable-doc, cleanup

---
 srcpkgs/sagemath/template | 21 +--------------------
 1 file changed, 1 insertion(+), 20 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 97ce9a93f10d..58a64211e73e 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -5,10 +5,7 @@ revision=1
 wrksrc=sage-$version
 build_style=configure
 configure_args="--enable-build-as-root --with-system-python3
- --enable-system-site-packages"
-make_check_target=ptest
-# for now skip building docs
-make_build_target=build
+ --enable-system-site-packages --disable-doc"
 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
@@ -24,9 +21,6 @@ checksum=dabc1a98e883c6069b59a755852bb0030395404a95d19d497c56f557c02619c2
 python_version=3
 patch_args="-F0 -Np1"
 
-build_options="debug"
-desc_option_debug="Build with debug symbols"
-
 # path where sage will be installed
 _SAGE_ROOT=/usr/lib/sage-${version}
 
@@ -95,11 +89,6 @@ post_extract() {
 	rm -rf $_SAGE_ROOT
 	mv -T $wrksrc $_SAGE_ROOT
 	ln -srfT $_SAGE_ROOT $wrksrc
-
-	mkdir -p $wrksrc/upstream
-	for u in ${_upstream}; do
-		cp "$XBPS_SRCDISTDIR/${pkgname}-${version}/${u##*[/>]}" $wrksrc/upstream
-	done
 }
 
 do_clean() {
@@ -112,14 +101,6 @@ post_patch() {
 	./bootstrap
 }
 
-pre_configure() {
-	if [ "$build_option_debug" ]; then
-		export SAGE_DEBUG=yes
-	fi
-
-	export MAKE="make -j ${XBPS_MAKEJOBS}"
-}
-
 post_configure() {
 	# we set some variables, right after configure has created sage_conf.py
 	cat <<-EOF >> pkgs/sage-conf/sage_conf.py

From 5e8213324ce7ce64fa0175caf908fe501d995b05 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 25 Jan 2022 17:34:12 -0300
Subject: [PATCH 08/11] sagemath: dependencies not needed with --disable-doc

---
 srcpkgs/sagemath/template | 23 +++++++++++------------
 1 file changed, 11 insertions(+), 12 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 58a64211e73e..df96e5dfa542 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -33,9 +33,9 @@ _spkg_skip="appnope fonttools importlib_resources pycygwin
 # Force use these sage packages from system
 _spkg_system="cppy cython cysignals cypari pplpy fpylll memory_allocator
  primecountpy
- alabaster argcomplete argon2_cffi attrs babel backcall beniget bleach certifi
+ argcomplete argon2_cffi attrs backcall beniget bleach certifi
  cffi charset_normalizer cvxopt cycler dateutil debugpy decorator defusedxml
- docutils entrypoints flit_core gast gmpy2 html5lib idna imagesize
+ docutils entrypoints flit_core gast gmpy2 html5lib idna
  importlib_metadata importlib_resources ipykernel ipython ipython_genutils
  ipywidgets jedi jinja2 jsonschema jupyter_client jupyter_core
  jupyterlab_pygments kiwisolver markupsafe matplotlib matplotlib_inline mistune
@@ -43,12 +43,14 @@ _spkg_system="cppy cython cysignals cypari pplpy fpylll memory_allocator
  packaging pandocfilters parso pexpect pickleshare pillow pip pkgconfig pluggy
  ply prometheus_client prompt_toolkit ptyprocess py pybind11 pycparser pygments
  pyparsing pyrsistent pythran pytz pyzmq requests scipy send2trash setuptools
- setuptools_scm simplegeneric six snowballstemmer sphinx
- sphinxcontrib_applehelp sphinxcontrib_devhelp sphinxcontrib_htmlhelp
- sphinxcontrib_jsmath sphinxcontrib_qthelp sphinxcontrib_serializinghtml sympy
+ setuptools_scm simplegeneric six sympy
  terminado testpath texttable tomli tornado traitlets typing_extensions tzlocal
  urllib3 wcwidth webencodings wheel widgetsnbextension zipp
  linbox gap maxima"
+### Not required with --disable-doc
+#alabaster babel imagesize snowballstemmer sphinx
+#sphinxcontrib_applehelp sphinxcontrib_devhelp sphinxcontrib_htmlhelp
+#sphinxcontrib_jsmath sphinxcontrib_qthelp sphinxcontrib_serializinghtml
 
 # Databases to be used from system
 _spkg_db="combinatorial_designs conway_polynomials elliptic_curves graphs
@@ -216,13 +218,13 @@ makedepends+="
 
 # python packages for trac-29665
 _sage_python3_modules="
- python3-Babel python3-Jinja2 python3-MarkupSafe python3-Pillow
- python3-Pygments python3-Sphinx python3-alabaster python3-argcomplete
+ python3-Jinja2 python3-MarkupSafe python3-Pillow
+ python3-Pygments python3-argcomplete
  python3-argon2 python3-attrs python3-backcall python3-beniget
  python3-bleach python3-certifi python3-cffi python3-charset-normalizer
  python3-cycler python3-dateutil python3-decorator python3-defusedxml
  python3-docutils python3-entrypoints python3-flit_core python3-gast
- python3-gmpy2 python3-html5lib python3-idna python3-imagesize
+ python3-gmpy2 python3-html5lib python3-idna
  python3-importlib_metadata python3-ipython python3-ipython_genutils
  python3-ipython_ipykernel python3-jedi python3-jsonschema
  python3-jupyter_client python3-jupyter_core python3-jupyter_ipywidgets
@@ -237,10 +239,7 @@ _sage_python3_modules="
  python3-pycparser python3-pyrsistent python3-pytz python3-pyzmq
  python3-requests python3-scipy python3-send2trash python3-setuptools
  python3-setuptools_scm python3-simplegeneric python3-six
- python3-snowballstemmer python3-sphinxcontrib-applehelp
- python3-sphinxcontrib-devhelp python3-sphinxcontrib-htmlhelp
- python3-sphinxcontrib-jsmath python3-sphinxcontrib-qthelp
- python3-sphinxcontrib-serializinghtml python3-sympy python3-terminado
+ python3-sympy python3-terminado
  python3-testpath python3-texttable python3-toml python3-tomli
  python3-tornado python3-traitlets python3-typing_extensions
  python3-tzlocal python3-urllib3 python3-wcwidth python3-webencodings

From 199a8a8750778d649614e4cdbdc9b3802a86ae6f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 25 Jan 2022 17:35:24 -0300
Subject: [PATCH 09/11] sagemath: update to 9.5.rc4.

---
 .../sagemath/patches/zzz-disable_rpath.patch  | 35 +++++++++++++++++++
 srcpkgs/sagemath/patches/zzz-shebang.patch    | 12 +++++++
 srcpkgs/sagemath/template                     |  4 +--
 3 files changed, 49 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/zzz-disable_rpath.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-shebang.patch

diff --git a/srcpkgs/sagemath/patches/zzz-disable_rpath.patch b/srcpkgs/sagemath/patches/zzz-disable_rpath.patch
new file mode 100644
index 000000000000..107fd3dce23a
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-disable_rpath.patch
@@ -0,0 +1,35 @@
+diff --git a/src/bin/sage-env b/src/bin/sage-env
+index 27edbf4cfb..0ead5789cb 100644
+--- a/src/bin/sage-env
++++ b/src/bin/sage-env
+@@ -411,14 +411,6 @@ if [ -n "$PYTHONHOME" ]; then
+     unset PYTHONHOME
+ fi
+ 
+-if [ -n "$SAGE_LOCAL" ]; then
+-    LDFLAGS="-L$SAGE_LOCAL/lib -Wl,-rpath,$SAGE_LOCAL/lib $LDFLAGS"
+-    if [ "$UNAME" = "Linux" ]; then
+-        LDFLAGS="-Wl,-rpath-link,$SAGE_LOCAL/lib $LDFLAGS"
+-    fi
+-    export LDFLAGS
+-fi
+-
+ if [ -z "$IPYTHONDIR" ]; then
+     # We hardcode a version number in the directory name. The idea is
+     # that we keep using the same version number as long as that is
+diff --git a/src/sage_setup/setenv.py b/src/sage_setup/setenv.py
+index b059a6e709..b6a9e3646c 100644
+--- a/src/sage_setup/setenv.py
++++ b/src/sage_setup/setenv.py
+@@ -30,11 +30,6 @@ def setenv():
+         _environ_prepend('PATH',         f'{SAGE_LOCAL}/bin')
+         _environ_prepend('LIBRARY_PATH', f'{SAGE_LOCAL}/lib')
+         _environ_prepend('CPATH',        f'{SAGE_LOCAL}/include')
+-        _environ_prepend('LDFLAGS',      f'-L{SAGE_LOCAL}/lib -Wl,-rpath,{SAGE_LOCAL}/lib',
+-                         separator=' ')
+-        if UNAME == 'Linux':
+-            _environ_prepend('LDFLAGS',      f'-Wl,-rpath-link,{SAGE_LOCAL}/lib',
+-                             separator=' ')
+         if Path(SAGE_VENV).resolve() != Path(SAGE_LOCAL).resolve():
+             # This condition is always true, but we are keeping it for clarity.
+             _environ_prepend('PATH',         f'{SAGE_VENV}/bin')
diff --git a/srcpkgs/sagemath/patches/zzz-shebang.patch b/srcpkgs/sagemath/patches/zzz-shebang.patch
new file mode 100644
index 000000000000..82b0c610ef66
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-shebang.patch
@@ -0,0 +1,12 @@
+--- a/src/setup.cfg.m4
++++ b/src/setup.cfg.m4
+@@ -25,6 +25,9 @@ classifiers =
+     Programming Language :: Python :: Implementation :: CPython
+     Topic :: Scientific/Engineering :: Mathematics
+ 
++[build]
++executable = /usr/bin/python3
++
+ [options]
+ python_requires = >=3.7, <3.11
+ install_requires =
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index df96e5dfa542..e5169576b95d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -1,6 +1,6 @@
 # Template file for 'sagemath'
 pkgname=sagemath
-version=9.5.rc3
+version=9.5.rc4
 revision=1
 wrksrc=sage-$version
 build_style=configure
@@ -17,7 +17,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
-checksum=dabc1a98e883c6069b59a755852bb0030395404a95d19d497c56f557c02619c2
+checksum=9d5053b83648e9fac5590516a39871ac57524ab9d37102206977e0010e61bb6e
 python_version=3
 patch_args="-F0 -Np1"
 

From 3c95e88f068ece6b15bd02dfbec68742d699bad5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Wed, 26 Jan 2022 00:55:43 -0300
Subject: [PATCH 10/11] sagemath: don't separate venv, don't ship src twice

---
 .../patches/zzz-fix_sage_setup_find.patch     | 13 ++++++++++++
 srcpkgs/sagemath/template                     | 21 +++++++------------
 2 files changed, 21 insertions(+), 13 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/zzz-fix_sage_setup_find.patch

diff --git a/srcpkgs/sagemath/patches/zzz-fix_sage_setup_find.patch b/srcpkgs/sagemath/patches/zzz-fix_sage_setup_find.patch
new file mode 100644
index 000000000000..06a6bda1b82e
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fix_sage_setup_find.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage_setup/find.py b/src/sage_setup/find.py
+index 18f0ddf1ae..084256e3e7 100644
+--- a/src/sage_setup/find.py
++++ b/src/sage_setup/find.py
+@@ -213,7 +213,7 @@ def filter_cython_sources(src_dir, distributions):
+     """
+     files: list[str] = []
+ 
+-    for dirpath, dirnames, filenames in os.walk(src_dir):
++    for dirpath, dirnames, filenames in os.walk(src_dir, followlinks=True):
+         for filename in filenames:
+             filepath = os.path.join(dirpath, filename)
+             base, ext = os.path.splitext(filename)
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index e5169576b95d..cbd205366d4e 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -5,7 +5,7 @@ revision=1
 wrksrc=sage-$version
 build_style=configure
 configure_args="--enable-build-as-root --with-system-python3
- --enable-system-site-packages --disable-doc"
+ --enable-system-site-packages --disable-doc --with-sage-venv=no"
 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
@@ -84,7 +84,7 @@ nostrip=yes
 noshlibprovides=yes
 
 # compile python code in sage venv
-pycompile_dirs="$_SAGE_ROOT/venv/"
+pycompile_dirs="$_SAGE_ROOT"
 
 post_extract() {
 	# sage wants to be built in place so let $wrksrc be a symlink
@@ -127,20 +127,15 @@ do_install() {
 	vlicense COPYING.txt
 	vdoc README.md
 	vmkdir $_SAGE_ROOT
-	vcopy "VERSION.txt prefix sage venv" $_SAGE_ROOT
+	vcopy "VERSION.txt sage" $_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 lib share; do
-		vcopy venv/$f $_SAGE_ROOT/venv/
+		vcopy local/$f $_SAGE_ROOT/local
 	done
-	vcopy "src" $_SAGE_ROOT # only src/sage ?
-
-	# not needed ?
-	# Maybe pkgs/sagemath-standard/build/cythonized for debug
-	#vcopy "build pkgs" $_SAGE_ROOT
+	vmkdir $_SAGE_ROOT/src
+	vcopy src/bin $_SAGE_ROOT/src
+	ln -sf ../local/lib/python3.10/site-packages/{sage,sage_setup} \
+		${DESTDIR}/$_SAGE_ROOT/src
 
 	# symlink main binary
 	vmkdir usr/bin

From d45a20c14aa288fa3ceb93cd7a2a0a922b2f5d6d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Wed, 26 Jan 2022 10:01:49 -0300
Subject: [PATCH 11/11] sagemath: dont depend on ffmpeg and imagemagick

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

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index cbd205366d4e..24baca924e21 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -204,9 +204,9 @@ makedepends+="
 "
 
 # optional dependencies
-makedepends+="
- ffmpeg ImageMagick
-"
+#makedepends+="
+# ffmpeg ImageMagick
+#"
 
 # TODO: optional
 # 4ti2 coxeter3 libsemigroups lrslib pdf2svg perl_mongodb polymake

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: sagemath-9.5.rc4
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (238 preceding siblings ...)
  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
                   ` (8 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-30 22:13 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1057 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.rc4
This is WIP, so I can get feedback.

Supported architectures: x86_64, x86_64-musl, i686. We also try to make sure it works with musl-1.2.

The testsuite can be run normal (-Q) or long (-K). For CI it runs normal (~ 1/2 time) and it uses a fixed random seed 0 to avoid random failures. When running locally, the random seed is random so one may get occasional test failures that depend on a particular value of the random seed.

The package `sagemath-test` is a dummy package whose purpose is to run the testsuite with sage installed as a package and without the build directory. For this to make sense, the masterdir has to be clean (without traces of the sagemath build, this should be ok after running "pkg" or "pkg -Q").

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: 608604 bytes --]

From 13df9dfb7b8db24884952b39a778a821e49d4dfa 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/12] New package: sage-9.5.rc3

Squashed version identical to sagemath-v1.

Full commit message history follows:

1. New package: sage-9.5.beta5

2. 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).

3. 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

4. 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.

5. sagemath: update to 9.5.beta7.

6. sagemath: add more dependencies

Also:
 - add patches so more doctests pass
 - add do_check() to skip building docs
 - use https for distfiles

7. 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...

8. 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)

9. sagemath: use system maxima

Also: add patch to use relative symlinks in gap where absolute symlinks
are now used -- otherwise xbps-create gets confused

10. 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

11. sagemath: change patch for cmdline args to disable dochtml testing

12. sagemath: update to 9.5.beta8.

13. 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

14. sagemath: use system python 3.10

15. 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

16. 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

17. sagemath: update to 9.5.beta9.

18. 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.

19. sagemath: fix license and tests

Now tests can be run with -Q (normal) or -K (--long)

20. sagemath: fix long time test

21. sagemath: use system python site-packages

 - patch from #29665 for that
 - patch on top of that to allow a few more python packages:
   gmpy2, sphinx, typing_extensions, ptyprocess
 - add all available python packages to makedepends and depends
 - add ffmpeg and ImageMagick to makedepends
 - in standard check (-Q) warn if individual test > 5.0s

22. sagemath: use small source tarball + upstream packages

23. sagemath: for CI use fixed random-seed=0

24. sagemath: upstream two patches

25. sagemath: reorder upstream sources and add two missing ones

26. sagemath: do not download anything patch

27. sagemath: update to 9.5.rc0.

28. sagemath: use system gap

29. sagemath: fixes for system gap

30. sagemath: skip doctest for rewritten shebang

31. sagemath: cleanup and one patch

32. sagemath: update to 9.5.rc1.

33. sagemath: patch not needed with singular 4.3.0

34. sagemath: install /usr/bin/sage

35. sagemath: rearrange upstream packages and indent

This doesn't change anything, it separates _upstream and
checksum in three blocks to make it easier to edit.

36. sagemath: use system cvxopt and importlib_resources

37. sagemath: disallow fuzz in patches

38. sagemath: disable packages that are not needed

 - appnope: only needed for macos
 - fonttools: only needed to build matplotlib
 - importlib_resources: only needed for old python
 - pycygwin: only needed for cygwin
 - setuptools_scm_git_archive: only needed to build matplotlib
 - setuptools_wheel: not needed
 - sphinxcontrib_websupport: only needed to build sphinx
 - cppy: force use from system python3-cppy

39. sagemath: use system Cython, cysignals, cypari2, pplpy, fpylll

40. sagemath: update to 9.5.rc2.

41. sagemath: add timing information for doctests

This makes doctesting faster on many threads

42. sagemath: round timings to power of 2 for stability

43. sagemath: all but two packages from system

44. sagemath: fix do_install()

45. sagemath: minor adjustments in do_check()

46. sagemath: use system primecountpy

47. sagemath: no upstream packages, cleanup

48. sagemath: patches for arb-2.22.0 and no-threejs

49. sagemath: remove patch for sphinx, unneeded

50. sagemath: update to 9.5.rc3.
---
 srcpkgs/sagemath/files/timings2.json          |  398 ++
 .../patches/00-Do_not_download_anything.patch |   11 +
 ...13e88ee188d516e4956832a23f985a73917a.patch |   31 +
 ...ea979d4bfa1a26ef3b08a29ca626b83b6ff5.patch |   23 +
 ...f491e5ce599ba185f5e93f02e0fcebd76c9e.patch |   57 +
 ...184f7498a2046065e669723e68efe2d65cee.patch | 5629 +++++++++++++++++
 ...aba734cb4ded0b04165fa142b5cf4c38fd23.patch |  247 +
 ...0e8168a9ffb4fbf07dd03c0846b4933a6dbe.patch |   64 +
 ...26e3db5ea06b962fac386fa3c7223f9a14fb.patch |   51 +
 ...93f4f32246ad9ded6d37f1f2f12a589a81f4.patch |   32 +
 ...9f3a1611fed0cc66fb838eb85739646dd34d.patch |  131 +
 ...e0923cb3d44d010e3e2f9bd7bc75d5c30234.patch |   43 +
 ...d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch |   35 +
 ...2ddd4e2dc92469c1590ebf0c40f8f69bf579.patch |  126 +
 .../zzz-dont_run_pytest--see_31924.patch      |   27 +
 .../zzz-fix_long_time_test--see_33091.patch   |   13 +
 .../patches/zzz-fix_no_SAGE_BIN.patch         |   12 +
 .../patches/zzz-fix_no_venv_packages.patch    |   13 +
 .../zzz-fixes_for_system_gap--see_29644.patch |   96 +
 .../zzz-more_site_packages_not_in_29665.patch |   42 +
 .../patches/zzz-remove_ratpoints.patch        |  887 +++
 ...z-skip_doctest_giac-1.7.0--see_31563.patch |   14 +
 .../patches/zzz-skip_doctest_no_threejs.patch |   13 +
 .../zzz-skip_doctest_sage_setup_find.patch    |   12 +
 .../patches/zzz-skip_doctest_shebang.patch    |   11 +
 srcpkgs/sagemath/template                     |  251 +
 srcpkgs/sagemath/update                       |    4 +
 27 files changed, 8273 insertions(+)
 create mode 100644 srcpkgs/sagemath/files/timings2.json
 create mode 100644 srcpkgs/sagemath/patches/00-Do_not_download_anything.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-29631-001-system_linbox-794713e88ee188d516e4956832a23f985a73917a.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-29631-002-system_linbox-7e16ea979d4bfa1a26ef3b08a29ca626b83b6ff5.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-32867-system_maxima-ed39aba734cb4ded0b04165fa142b5cf4c38fd23.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-33047-musl_fix_find_library-dc1a0e8168a9ffb4fbf07dd03c0846b4933a6dbe.patch
 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-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-33189-fix_doctests_for_arb_2.22-53532ddd4e2dc92469c1590ebf0c40f8f69bf579.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-fix_no_SAGE_BIN.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-fix_no_venv_packages.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-remove_ratpoints.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_31563.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_no_threejs.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch
 create mode 100644 srcpkgs/sagemath/template
 create mode 100644 srcpkgs/sagemath/update

diff --git a/srcpkgs/sagemath/files/timings2.json b/srcpkgs/sagemath/files/timings2.json
new file mode 100644
index 000000000000..71a9aa84ce58
--- /dev/null
+++ b/srcpkgs/sagemath/files/timings2.json
@@ -0,0 +1,398 @@
+{
+  "doc.ca.intro.index": {"walltime": 8},
+  "doc.en.constructions.calculus": {"walltime": 64},
+  "doc.en.constructions.plotting": {"walltime": 32},
+  "doc.en.prep.Advanced-2DPlotting": {"walltime": 16},
+  "doc.en.prep.Calculus": {"walltime": 8},
+  "doc.en.prep.Symbolics-and-Basic-Plotting": {"walltime": 8},
+  "doc.en.thematic_tutorials.explicit_methods_in_number_theory.birds_other": {"walltime": 8},
+  "doc.en.thematic_tutorials.explicit_methods_in_number_theory.elliptic_curves": {"walltime": 8},
+  "doc.en.thematic_tutorials.geometry.polyhedra_tutorial": {"walltime": 16},
+  "doc.en.thematic_tutorials.sandpile": {"walltime": 16},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_advanced": {"walltime": 32},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_cartesian": {"walltime": 32},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_change": {"walltime": 32},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_curvilinear": {"walltime": 32},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_plane": {"walltime": 16},
+  "doc.ja.tutorial.tour_plotting": {"walltime": 8},
+  "sage.algebras.cluster_algebra": {"walltime": 8},
+  "sage.algebras.commutative_dga": {"walltime": 16},
+  "sage.algebras.hecke_algebras.ariki_koike_algebra": {"walltime": 8},
+  "sage.algebras.iwahori_hecke_algebra": {"walltime": 8},
+  "sage.algebras.lie_algebras.classical_lie_algebra": {"walltime": 128},
+  "sage.algebras.lie_algebras.nilpotent_lie_algebra": {"walltime": 16},
+  "sage.algebras.quantum_clifford": {"walltime": 16},
+  "sage.algebras.quantum_groups.fock_space": {"walltime": 8},
+  "sage.algebras.quatalg.quaternion_algebra": {"walltime": 8},
+  "sage.algebras.steenrod.steenrod_algebra": {"walltime": 64},
+  "sage.algebras.steenrod.steenrod_algebra_bases": {"walltime": 8},
+  "sage.algebras.yangian": {"walltime": 8},
+  "sage.arith.misc": {"walltime": 32},
+  "sage.calculus.calculus": {"walltime": 16},
+  "sage.calculus.desolvers": {"walltime": 8},
+  "sage.calculus.functional": {"walltime": 8},
+  "sage.calculus.riemann": {"walltime": 64},
+  "sage.calculus.tests": {"walltime": 16},
+  "sage.calculus.transforms.dwt": {"walltime": 16},
+  "sage.calculus.transforms.fft": {"walltime": 8},
+  "sage.categories.coxeter_groups": {"walltime": 8},
+  "sage.categories.finite_monoids": {"walltime": 16},
+  "sage.categories.lie_conformal_algebras": {"walltime": 8},
+  "sage.categories.loop_crystals": {"walltime": 8},
+  "sage.categories.pushout": {"walltime": 8},
+  "sage.categories.super_hopf_algebras_with_basis": {"walltime": 32},
+  "sage.categories.super_lie_conformal_algebras": {"walltime": 8},
+  "sage.coding.ag_code": {"walltime": 64},
+  "sage.coding.ag_code_decoders": {"walltime": 128},
+  "sage.coding.binary_code": {"walltime": 8},
+  "sage.coding.linear_code": {"walltime": 16},
+  "sage.combinat.backtrack": {"walltime": 32},
+  "sage.combinat.chas.wqsym": {"walltime": 32},
+  "sage.combinat.cluster_algebra_quiver.cluster_seed": {"walltime": 64},
+  "sage.combinat.cluster_algebra_quiver.quiver": {"walltime": 128},
+  "sage.combinat.crystals.affine_factorization": {"walltime": 16},
+  "sage.combinat.crystals.alcove_path": {"walltime": 32},
+  "sage.combinat.crystals.highest_weight_crystals": {"walltime": 8},
+  "sage.combinat.crystals.kirillov_reshetikhin": {"walltime": 16},
+  "sage.combinat.crystals.letters": {"walltime": 8},
+  "sage.combinat.crystals.littelmann_path": {"walltime": 16},
+  "sage.combinat.crystals.mv_polytopes": {"walltime": 16},
+  "sage.combinat.crystals.pbw_crystal": {"walltime": 16},
+  "sage.combinat.crystals.star_crystal": {"walltime": 8},
+  "sage.combinat.designs.bibd": {"walltime": 8},
+  "sage.combinat.designs.database": {"walltime": 16},
+  "sage.combinat.designs.difference_family": {"walltime": 8},
+  "sage.combinat.designs.gen_quadrangles_with_spread": {"walltime": 128},
+  "sage.combinat.designs.orthogonal_arrays_build_recursive": {"walltime": 16},
+  "sage.combinat.designs.orthogonal_arrays_find_recursive": {"walltime": 8},
+  "sage.combinat.diagram_algebras": {"walltime": 64},
+  "sage.combinat.fqsym": {"walltime": 32},
+  "sage.combinat.free_prelie_algebra": {"walltime": 8},
+  "sage.combinat.fully_commutative_elements": {"walltime": 8},
+  "sage.combinat.grossman_larson_algebras": {"walltime": 8},
+  "sage.combinat.interval_posets": {"walltime": 8},
+  "sage.combinat.k_regular_sequence": {"walltime": 8},
+  "sage.combinat.k_tableau": {"walltime": 16},
+  "sage.combinat.matrices.hadamard_matrix": {"walltime": 8},
+  "sage.combinat.multiset_partition_into_sets_ordered": {"walltime": 8},
+  "sage.combinat.ncsf_qsym.ncsf": {"walltime": 16},
+  "sage.combinat.ncsf_qsym.qsym": {"walltime": 16},
+  "sage.combinat.partition": {"walltime": 16},
+  "sage.combinat.partition_kleshchev": {"walltime": 16},
+  "sage.combinat.partition_tuple": {"walltime": 8},
+  "sage.combinat.posets.moebius_algebra": {"walltime": 16},
+  "sage.combinat.posets.posets": {"walltime": 8},
+  "sage.combinat.rigged_configurations.kr_tableaux": {"walltime": 32},
+  "sage.combinat.rigged_configurations.rigged_configurations": {"walltime": 16},
+  "sage.combinat.rigged_configurations.tensor_product_kr_tableaux": {"walltime": 16},
+  "sage.combinat.root_system.associahedron": {"walltime": 8},
+  "sage.combinat.root_system.branching_rules": {"walltime": 8},
+  "sage.combinat.root_system.fusion_ring": {"walltime": 8},
+  "sage.combinat.root_system.integrable_representations": {"walltime": 16},
+  "sage.combinat.root_system.non_symmetric_macdonald_polynomials": {"walltime": 16},
+  "sage.combinat.root_system.pieri_factors": {"walltime": 8},
+  "sage.combinat.root_system.plot": {"walltime": 32},
+  "sage.combinat.root_system.root_lattice_realization_algebras": {"walltime": 16},
+  "sage.combinat.root_system.root_lattice_realizations": {"walltime": 16},
+  "sage.combinat.root_system.root_system": {"walltime": 8},
+  "sage.combinat.root_system.weyl_group": {"walltime": 8},
+  "sage.combinat.rsk": {"walltime": 32},
+  "sage.combinat.sf.classical": {"walltime": 16},
+  "sage.combinat.sf.jack": {"walltime": 16},
+  "sage.combinat.sf.k_dual": {"walltime": 16},
+  "sage.combinat.sf.llt": {"walltime": 16},
+  "sage.combinat.sf.macdonald": {"walltime": 64},
+  "sage.combinat.sf.new_kschur": {"walltime": 8},
+  "sage.combinat.sf.sfa": {"walltime": 32},
+  "sage.combinat.shifted_primed_tableau": {"walltime": 16},
+  "sage.combinat.skew_tableau": {"walltime": 8},
+  "sage.combinat.symmetric_group_algebra": {"walltime": 16},
+  "sage.combinat.tableau": {"walltime": 32},
+  "sage.combinat.tableau_tuple": {"walltime": 32},
+  "sage.combinat.tiling": {"walltime": 256},
+  "sage.combinat.tutorial": {"walltime": 16},
+  "sage.combinat.words.paths": {"walltime": 64},
+  "sage.crypto.block_cipher.des": {"walltime": 16},
+  "sage.crypto.mq.sr": {"walltime": 64},
+  "sage.crypto.sbox": {"walltime": 16},
+  "sage.crypto.sboxes": {"walltime": 8},
+  "sage.doctest.forker": {"walltime": 16},
+  "sage.doctest.sources": {"walltime": 64},
+  "sage.doctest.test": {"walltime": 128},
+  "sage.dynamics.arithmetic_dynamics.projective_ds": {"walltime": 64},
+  "sage.dynamics.arithmetic_dynamics.wehlerK3": {"walltime": 8},
+  "sage.dynamics.cellular_automata.glca": {"walltime": 8},
+  "sage.dynamics.cellular_automata.solitons": {"walltime": 8},
+  "sage.dynamics.complex_dynamics.mandel_julia": {"walltime": 16},
+  "sage.functions.bessel": {"walltime": 16},
+  "sage.functions.exp_integral": {"walltime": 8},
+  "sage.functions.hypergeometric": {"walltime": 8},
+  "sage.functions.other": {"walltime": 16},
+  "sage.functions.piecewise": {"walltime": 8},
+  "sage.games.quantumino": {"walltime": 8},
+  "sage.geometry.cone": {"walltime": 32},
+  "sage.geometry.fan": {"walltime": 8},
+  "sage.geometry.hyperbolic_space.hyperbolic_geodesic": {"walltime": 8},
+  "sage.geometry.hyperplane_arrangement.arrangement": {"walltime": 16},
+  "sage.geometry.hyperplane_arrangement.library": {"walltime": 8},
+  "sage.geometry.hyperplane_arrangement.plot": {"walltime": 8},
+  "sage.geometry.lattice_polytope": {"walltime": 16},
+  "sage.geometry.polyhedral_complex": {"walltime": 8},
+  "sage.geometry.polyhedron.base": {"walltime": 32},
+  "sage.geometry.polyhedron.library": {"walltime": 32},
+  "sage.geometry.polyhedron.plot": {"walltime": 8},
+  "sage.geometry.riemannian_manifolds.parametrized_surface3d": {"walltime": 16},
+  "sage.geometry.triangulation.base": {"walltime": 32},
+  "sage.geometry.triangulation.point_configuration": {"walltime": 16},
+  "sage.graphs.chrompoly": {"walltime": 8},
+  "sage.graphs.connectivity": {"walltime": 16},
+  "sage.graphs.generators.basic": {"walltime": 16},
+  "sage.graphs.generators.classical_geometries": {"walltime": 32},
+  "sage.graphs.generators.distance_regular": {"walltime": 256},
+  "sage.graphs.generators.families": {"walltime": 32},
+  "sage.graphs.generators.smallgraphs": {"walltime": 16},
+  "sage.graphs.generic_graph": {"walltime": 32},
+  "sage.graphs.genus": {"walltime": 16},
+  "sage.graphs.graph": {"walltime": 16},
+  "sage.graphs.graph_generators": {"walltime": 8},
+  "sage.graphs.graph_list": {"walltime": 8},
+  "sage.graphs.graph_plot": {"walltime": 8},
+  "sage.graphs.strongly_regular_db": {"walltime": 16},
+  "sage.groups.cubic_braid": {"walltime": 16},
+  "sage.groups.fqf_orthogonal": {"walltime": 16},
+  "sage.groups.libgap_mixin": {"walltime": 8},
+  "sage.groups.libgap_morphism": {"walltime": 8},
+  "sage.groups.lie_gps.nilpotent_lie_group": {"walltime": 16},
+  "sage.groups.matrix_gps.finitely_generated": {"walltime": 8},
+  "sage.groups.matrix_gps.heisenberg": {"walltime": 32},
+  "sage.groups.matrix_gps.linear": {"walltime": 8},
+  "sage.groups.perm_gps.cubegroup": {"walltime": 16},
+  "sage.groups.perm_gps.partn_ref.refinement_graphs": {"walltime": 8},
+  "sage.groups.perm_gps.permgroup": {"walltime": 8},
+  "sage.groups.perm_gps.permgroup_named": {"walltime": 8},
+  "sage.homology.hochschild_complex": {"walltime": 8},
+  "sage.homology.homology_vector_space_with_basis": {"walltime": 8},
+  "sage.interacts.test_jupyter": {"walltime": 16},
+  "sage.interfaces.ecm": {"walltime": 8},
+  "sage.interfaces.expect": {"walltime": 8},
+  "sage.interfaces.gap": {"walltime": 16},
+  "sage.interfaces.maxima": {"walltime": 8},
+  "sage.interfaces.maxima_abstract": {"walltime": 64},
+  "sage.interfaces.psage": {"walltime": 8},
+  "sage.interfaces.sage0": {"walltime": 8},
+  "sage.lfunctions.zero_sums": {"walltime": 8},
+  "sage.libs.eclib.interface": {"walltime": 16},
+  "sage.libs.eclib.mwrank": {"walltime": 16},
+  "sage.libs.gap.test_long": {"walltime": 32},
+  "sage.libs.giac": {"walltime": 32},
+  "sage.manifolds.catalog": {"walltime": 8},
+  "sage.manifolds.chart": {"walltime": 32},
+  "sage.manifolds.chart_func": {"walltime": 8},
+  "sage.manifolds.continuous_map": {"walltime": 8},
+  "sage.manifolds.differentiable.affine_connection": {"walltime": 128},
+  "sage.manifolds.differentiable.automorphismfield": {"walltime": 32},
+  "sage.manifolds.differentiable.automorphismfield_group": {"walltime": 8},
+  "sage.manifolds.differentiable.bundle_connection": {"walltime": 8},
+  "sage.manifolds.differentiable.characteristic_cohomology_class": {"walltime": 256},
+  "sage.manifolds.differentiable.curve": {"walltime": 16},
+  "sage.manifolds.differentiable.degenerate": {"walltime": 32},
+  "sage.manifolds.differentiable.degenerate_submanifold": {"walltime": 256},
+  "sage.manifolds.differentiable.diff_form": {"walltime": 64},
+  "sage.manifolds.differentiable.diff_map": {"walltime": 8},
+  "sage.manifolds.differentiable.examples.euclidean": {"walltime": 32},
+  "sage.manifolds.differentiable.examples.sphere": {"walltime": 32},
+  "sage.manifolds.differentiable.integrated_curve": {"walltime": 32},
+  "sage.manifolds.differentiable.levi_civita_connection": {"walltime": 32},
+  "sage.manifolds.differentiable.manifold": {"walltime": 16},
+  "sage.manifolds.differentiable.manifold_homset": {"walltime": 16},
+  "sage.manifolds.differentiable.metric": {"walltime": 64},
+  "sage.manifolds.differentiable.mixed_form": {"walltime": 16},
+  "sage.manifolds.differentiable.mixed_form_algebra": {"walltime": 8},
+  "sage.manifolds.differentiable.multivectorfield": {"walltime": 64},
+  "sage.manifolds.differentiable.pseudo_riemannian": {"walltime": 16},
+  "sage.manifolds.differentiable.pseudo_riemannian_submanifold": {"walltime": 128},
+  "sage.manifolds.differentiable.scalarfield": {"walltime": 16},
+  "sage.manifolds.differentiable.scalarfield_algebra": {"walltime": 8},
+  "sage.manifolds.differentiable.tangent_vector": {"walltime": 16},
+  "sage.manifolds.differentiable.tensorfield": {"walltime": 128},
+  "sage.manifolds.differentiable.tensorfield_paral": {"walltime": 16},
+  "sage.manifolds.differentiable.vector_bundle": {"walltime": 16},
+  "sage.manifolds.differentiable.vectorfield": {"walltime": 64},
+  "sage.manifolds.differentiable.vectorframe": {"walltime": 8},
+  "sage.manifolds.point": {"walltime": 16},
+  "sage.manifolds.scalarfield": {"walltime": 16},
+  "sage.manifolds.scalarfield_algebra": {"walltime": 8},
+  "sage.manifolds.section": {"walltime": 32},
+  "sage.manifolds.trivialization": {"walltime": 8},
+  "sage.manifolds.vector_bundle": {"walltime": 8},
+  "sage.matrix.benchmark": {"walltime": 8},
+  "sage.matrix.matrix2": {"walltime": 16},
+  "sage.matrix.matrix_integer_dense": {"walltime": 16},
+  "sage.matrix.matrix_integer_dense_hnf": {"walltime": 32},
+  "sage.matrix.matrix_mod2_dense": {"walltime": 8},
+  "sage.matrix.matrix_rational_dense": {"walltime": 8},
+  "sage.matrix.special": {"walltime": 8},
+  "sage.matroids.catalog": {"walltime": 64},
+  "sage.misc.cachefunc": {"walltime": 16},
+  "sage.misc.cython": {"walltime": 8},
+  "sage.misc.functional": {"walltime": 8},
+  "sage.misc.randstate": {"walltime": 16},
+  "sage.misc.sagedoc": {"walltime": 64},
+  "sage.misc.sageinspect": {"walltime": 32},
+  "sage.modular.abvar.abvar": {"walltime": 16},
+  "sage.modular.abvar.homspace": {"walltime": 8},
+  "sage.modular.abvar.lseries": {"walltime": 8},
+  "sage.modular.arithgroup.arithgroup_perm": {"walltime": 8},
+  "sage.modular.arithgroup.tests": {"walltime": 8},
+  "sage.modular.btquotients.pautomorphicform": {"walltime": 32},
+  "sage.modular.hypergeometric_motive": {"walltime": 16},
+  "sage.modular.local_comp.local_comp": {"walltime": 32},
+  "sage.modular.local_comp.type_space": {"walltime": 16},
+  "sage.modular.modform.ambient_R": {"walltime": 16},
+  "sage.modular.modform.constructor": {"walltime": 8},
+  "sage.modular.modform.cuspidal_submodule": {"walltime": 16},
+  "sage.modular.modform.element": {"walltime": 64},
+  "sage.modular.modform.ring": {"walltime": 64},
+  "sage.modular.modform.space": {"walltime": 8},
+  "sage.modular.modform_hecketriangle.abstract_space": {"walltime": 16},
+  "sage.modular.modform_hecketriangle.graded_ring_element": {"walltime": 16},
+  "sage.modular.modform_hecketriangle.hecke_triangle_group_element": {"walltime": 32},
+  "sage.modular.modform_hecketriangle.readme": {"walltime": 16},
+  "sage.modular.modform_hecketriangle.space": {"walltime": 8},
+  "sage.modular.modsym.ambient": {"walltime": 16},
+  "sage.modular.modsym.space": {"walltime": 8},
+  "sage.modular.pollack_stevens.modsym": {"walltime": 64},
+  "sage.modular.pollack_stevens.padic_lseries": {"walltime": 32},
+  "sage.modules.finite_submodule_iter": {"walltime": 16},
+  "sage.modules.free_module": {"walltime": 16},
+  "sage.modules.free_module_element": {"walltime": 8},
+  "sage.modules.free_module_integer": {"walltime": 32},
+  "sage.modules.free_quadratic_module_integer_symmetric": {"walltime": 8},
+  "sage.modules.torsion_quadratic_module": {"walltime": 16},
+  "sage.parallel.map_reduce": {"walltime": 8},
+  "sage.plot.animate": {"walltime": 128},
+  "sage.plot.arrow": {"walltime": 8},
+  "sage.plot.circle": {"walltime": 8},
+  "sage.plot.complex_plot": {"walltime": 8},
+  "sage.plot.contour_plot": {"walltime": 32},
+  "sage.plot.density_plot": {"walltime": 8},
+  "sage.plot.graphics": {"walltime": 32},
+  "sage.plot.line": {"walltime": 8},
+  "sage.plot.matrix_plot": {"walltime": 16},
+  "sage.plot.multigraphics": {"walltime": 16},
+  "sage.plot.plot": {"walltime": 64},
+  "sage.plot.plot3d.base": {"walltime": 8},
+  "sage.plot.plot3d.implicit_plot3d": {"walltime": 16},
+  "sage.plot.plot3d.implicit_surface": {"walltime": 8},
+  "sage.plot.plot3d.parametric_plot3d": {"walltime": 8},
+  "sage.plot.plot3d.parametric_surface": {"walltime": 8},
+  "sage.plot.plot3d.plot3d": {"walltime": 16},
+  "sage.plot.plot3d.tachyon": {"walltime": 8},
+  "sage.plot.plot3d.transform": {"walltime": 32},
+  "sage.plot.point": {"walltime": 8},
+  "sage.plot.polygon": {"walltime": 8},
+  "sage.plot.streamline_plot": {"walltime": 8},
+  "sage.quadratic_forms.genera.genus": {"walltime": 16},
+  "sage.quadratic_forms.quadratic_form__automorphisms": {"walltime": 8},
+  "sage.quadratic_forms.quadratic_form__local_representation_conditions": {"walltime": 64},
+  "sage.quadratic_forms.quadratic_form__neighbors": {"walltime": 8},
+  "sage.quadratic_forms.quadratic_form__siegel_product": {"walltime": 8},
+  "sage.repl.ipython_extension": {"walltime": 8},
+  "sage.rings.asymptotic.asymptotic_expansion_generators": {"walltime": 64},
+  "sage.rings.asymptotic.asymptotic_ring": {"walltime": 8},
+  "sage.rings.asymptotic.asymptotics_multivariate_generating_functions": {"walltime": 32},
+  "sage.rings.asymptotic.term_monoid": {"walltime": 8},
+  "sage.rings.continued_fraction": {"walltime": 8},
+  "sage.rings.finite_rings.finite_field_base": {"walltime": 8},
+  "sage.rings.function_field.function_field": {"walltime": 256},
+  "sage.rings.function_field.function_field_valuation": {"walltime": 64},
+  "sage.rings.function_field.ideal": {"walltime": 8},
+  "sage.rings.function_field.place": {"walltime": 8},
+  "sage.rings.integer": {"walltime": 128},
+  "sage.rings.invariants.invariant_theory": {"walltime": 8},
+  "sage.rings.number_field.bdd_height": {"walltime": 8},
+  "sage.rings.number_field.number_field": {"walltime": 64},
+  "sage.rings.number_field.number_field_element": {"walltime": 16},
+  "sage.rings.number_field.splitting_field": {"walltime": 8},
+  "sage.rings.number_field.totallyreal": {"walltime": 16},
+  "sage.rings.number_field.totallyreal_rel": {"walltime": 8},
+  "sage.rings.padics.padic_base_leaves": {"walltime": 64},
+  "sage.rings.padics.padic_extension_leaves": {"walltime": 64},
+  "sage.rings.padics.padic_generic_element": {"walltime": 16},
+  "sage.rings.padics.padic_lattice_element": {"walltime": 32},
+  "sage.rings.padics.relative_extension_leaves": {"walltime": 32},
+  "sage.rings.polynomial.multi_polynomial_ideal": {"walltime": 8},
+  "sage.rings.polynomial.multi_polynomial_sequence": {"walltime": 8},
+  "sage.rings.polynomial.ore_function_element": {"walltime": 8},
+  "sage.rings.polynomial.polynomial_element": {"walltime": 16},
+  "sage.rings.polynomial.polynomial_rational_flint": {"walltime": 8},
+  "sage.rings.polynomial.polynomial_zmod_flint": {"walltime": 512},
+  "sage.rings.qqbar": {"walltime": 16},
+  "sage.rings.tests": {"walltime": 16},
+  "sage.rings.valuation.augmented_valuation": {"walltime": 32},
+  "sage.rings.valuation.mapped_valuation": {"walltime": 64},
+  "sage.rings.valuation.valuation": {"walltime": 8},
+  "sage.sandpiles.sandpile": {"walltime": 16},
+  "sage.schemes.curves.affine_curve": {"walltime": 16},
+  "sage.schemes.curves.closed_point": {"walltime": 8},
+  "sage.schemes.curves.projective_curve": {"walltime": 32},
+  "sage.schemes.cyclic_covers.cycliccover_finite_field": {"walltime": 64},
+  "sage.schemes.elliptic_curves.BSD": {"walltime": 8},
+  "sage.schemes.elliptic_curves.Qcurves": {"walltime": 8},
+  "sage.schemes.elliptic_curves.constructor": {"walltime": 32},
+  "sage.schemes.elliptic_curves.ell_curve_isogeny": {"walltime": 16},
+  "sage.schemes.elliptic_curves.ell_egros": {"walltime": 32},
+  "sage.schemes.elliptic_curves.ell_finite_field": {"walltime": 8},
+  "sage.schemes.elliptic_curves.ell_generic": {"walltime": 8},
+  "sage.schemes.elliptic_curves.ell_modular_symbols": {"walltime": 16},
+  "sage.schemes.elliptic_curves.ell_number_field": {"walltime": 128},
+  "sage.schemes.elliptic_curves.ell_point": {"walltime": 8},
+  "sage.schemes.elliptic_curves.ell_rational_field": {"walltime": 128},
+  "sage.schemes.elliptic_curves.gal_reps_number_field": {"walltime": 32},
+  "sage.schemes.elliptic_curves.gp_simon": {"walltime": 16},
+  "sage.schemes.elliptic_curves.heegner": {"walltime": 32},
+  "sage.schemes.elliptic_curves.height": {"walltime": 64},
+  "sage.schemes.elliptic_curves.isogeny_class": {"walltime": 32},
+  "sage.schemes.elliptic_curves.isogeny_small_degree": {"walltime": 256},
+  "sage.schemes.elliptic_curves.kraus": {"walltime": 16},
+  "sage.schemes.elliptic_curves.mod_sym_num": {"walltime": 8},
+  "sage.schemes.elliptic_curves.padic_lseries": {"walltime": 8},
+  "sage.schemes.elliptic_curves.padics": {"walltime": 16},
+  "sage.schemes.elliptic_curves.saturation": {"walltime": 16},
+  "sage.schemes.elliptic_curves.sha_tate": {"walltime": 32},
+  "sage.schemes.hyperelliptic_curves.hyperelliptic_finite_field": {"walltime": 64},
+  "sage.schemes.hyperelliptic_curves.hyperelliptic_generic": {"walltime": 8},
+  "sage.schemes.hyperelliptic_curves.hyperelliptic_padic_field": {"walltime": 32},
+  "sage.schemes.hyperelliptic_curves.monsky_washnitzer": {"walltime": 8},
+  "sage.schemes.projective.projective_rational_point": {"walltime": 8},
+  "sage.schemes.riemann_surfaces.riemann_surface": {"walltime": 64},
+  "sage.schemes.toric.chow_group": {"walltime": 8},
+  "sage.schemes.toric.sheaf.klyachko": {"walltime": 8},
+  "sage.stats.distributions.discrete_gaussian_integer": {"walltime": 8},
+  "sage.stats.time_series": {"walltime": 8},
+  "sage.structure.coerce_dict": {"walltime": 32},
+  "sage.structure.element": {"walltime": 16},
+  "sage.structure.sage_object": {"walltime": 8},
+  "sage.symbolic.expression": {"walltime": 32},
+  "sage.symbolic.integration.integral": {"walltime": 32},
+  "sage.symbolic.random_tests": {"walltime": 32},
+  "sage.symbolic.relation": {"walltime": 8},
+  "sage.tests.book_schilling_zabrocki_kschur_primer": {"walltime": 32},
+  "sage.tests.book_stein_ent": {"walltime": 16},
+  "sage.tests.books.computational-mathematics-with-sagemath.combinat_doctest": {"walltime": 32},
+  "sage.tests.books.computational-mathematics-with-sagemath.float_doctest": {"walltime": 16},
+  "sage.tests.books.computational-mathematics-with-sagemath.graphique_doctest": {"walltime": 32},
+  "sage.tests.books.computational-mathematics-with-sagemath.graphtheory_doctest": {"walltime": 8},
+  "sage.tests.books.computational-mathematics-with-sagemath.integration_doctest": {"walltime": 32},
+  "sage.tests.books.computational-mathematics-with-sagemath.mpoly_doctest": {"walltime": 8},
+  "sage.tests.books.computational-mathematics-with-sagemath.nonlinear_doctest": {"walltime": 8},
+  "sage.tests.books.computational-mathematics-with-sagemath.recequadiff_doctest": {"walltime": 8},
+  "sage.tests.books.computational-mathematics-with-sagemath.sol.graphique_doctest": {"walltime": 16},
+  "sage.tests.books.computational-mathematics-with-sagemath.sol.numbertheory_doctest": {"walltime": 16},
+  "sage.tests.books.computational-mathematics-with-sagemath.sol.polynomes_doctest": {"walltime": 16},
+  "sage.tests.cmdline": {"walltime": 64},
+  "sage.tests.gosper-sum": {"walltime": 16},
+  "sage.tests.parigp": {"walltime": 8},
+  "sage.topology.simplicial_complex": {"walltime": 8},
+  "sage.topology.simplicial_complex_examples": {"walltime": 16}
+}
diff --git a/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch b/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch
new file mode 100644
index 000000000000..35aef7b8d456
--- /dev/null
+++ b/srcpkgs/sagemath/patches/00-Do_not_download_anything.patch
@@ -0,0 +1,11 @@
+--- a/build/sage_bootstrap/tarball.py	2022-01-07 19:17:06.754747955 -0300
++++ b/build/sage_bootstrap/tarball.py	2022-01-07 19:25:31.844139381 -0300
+@@ -158,6 +158,8 @@
+                             .format(destination=destination))
+         successful_download = False
+         log.info('Attempting to download package {0} from mirrors'.format(self.filename))
++        log.info('ERROR: downloading is disabled, add file to template instead')
++        return
+         for mirror in MirrorList():
+             url = mirror + '/'.join(['spkg', 'upstream', self.package.name, self.filename])
+             log.info(url)
diff --git a/srcpkgs/sagemath/patches/trac-29631-001-system_linbox-794713e88ee188d516e4956832a23f985a73917a.patch b/srcpkgs/sagemath/patches/trac-29631-001-system_linbox-794713e88ee188d516e4956832a23f985a73917a.patch
new file mode 100644
index 000000000000..483dbe2c2597
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-29631-001-system_linbox-794713e88ee188d516e4956832a23f985a73917a.patch
@@ -0,0 +1,31 @@
+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.
+
+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/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-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch b/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
new file mode 100644
index 000000000000..da88a369db0d
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
@@ -0,0 +1,57 @@
+From 2c981351bb60089530b0598d3e9a909a23d4d4d8 Mon Sep 17 00:00:00 2001
+From: Thierry Thomas <thierry@FreeBSD.org>
+Date: Mon, 22 Mar 2021 03:04:12 +0100
+Subject: 29644: Add spkg-configure.m4 for gap
+
+---
+ build/pkgs/gap/spkg-configure.m4 | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+ create mode 100644 build/pkgs/gap/spkg-configure.m4
+
+diff --git a/build/pkgs/gap/spkg-configure.m4 b/build/pkgs/gap/spkg-configure.m4
+new file mode 100644
+index 00000000..91cd089
+--- /dev/null
++++ b/build/pkgs/gap/spkg-configure.m4
+@@ -0,0 +1,8 @@
++SAGE_SPKG_CONFIGURE([gap], [
++    SAGE_SPKG_DEPCHECK([gmp], [
++       AC_CHECK_HEADER([gap/system.h], [
++        AC_SEARCH_LIBS([GAP_COMM], [gap], [
++        ], [sage_spkg_install_gap=yes])
++       ], [sage_spkg_install_gap=yes])
++    ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2a41f491e5ce599ba185f5e93f02e0fcebd76c9e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Samuel=20Leli=C3=A8vre?= <samuel.lelievre@gmail.com>
+Date: Mon, 22 Mar 2021 03:05:31 +0100
+Subject: 29644: Add distro information for gap
+
+---
+ build/pkgs/gap/distros/fedora.txt | 1 +
+ build/pkgs/gap/distros/gentoo.txt | 1 +
+ 2 files changed, 2 insertions(+)
+ create mode 100644 build/pkgs/gap/distros/fedora.txt
+ create mode 100644 build/pkgs/gap/distros/gentoo.txt
+
+diff --git a/build/pkgs/gap/distros/fedora.txt b/build/pkgs/gap/distros/fedora.txt
+new file mode 100644
+index 00000000..ea4feae
+--- /dev/null
++++ b/build/pkgs/gap/distros/fedora.txt
+@@ -0,0 +1 @@
++gap
+diff --git a/build/pkgs/gap/distros/gentoo.txt b/build/pkgs/gap/distros/gentoo.txt
+new file mode 100644
+index 00000000..ea64ec9
+--- /dev/null
++++ b/build/pkgs/gap/distros/gentoo.txt
+@@ -0,0 +1 @@
++sci-mathematics/gap
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
new file mode 100644
index 000000000000..0ecb27c593cd
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
@@ -0,0 +1,5629 @@
+From 05fcaabe95082f42ba134780d579390d7b6153e2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 19:30:58 -0400
+Subject: Trac #29665: add --enable-system-site-packages option to ./configure.
+
+This new option is experimental and disabled by default. When it is
+enabled, the string "--system-site-packages" is appended to a new
+environment variable SAGE_VENV_FLAGS that is then passed to the
+sage-venv command during the build using autoconf substitution.
+Thusly the correct setting finds its way into local/pyvenv.cfg.
+---
+ build/make/Makefile.in |  2 +-
+ configure.ac           | 11 +++++++++++
+ 2 files changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/build/make/Makefile.in b/build/make/Makefile.in
+index f870cc3..68627ab 100644
+--- a/build/make/Makefile.in
++++ b/build/make/Makefile.in
+@@ -211,7 +211,7 @@ endif
+ inst_python3_venv = $(SAGE_VENV)/pyvenv.cfg
+ 
+ $(inst_python3_venv):
+-	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv "$(SAGE_VENV)"
++	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv @SAGE_VENV_FLAGS@ "$(SAGE_VENV)"
+ endif
+ 
+ # Build everything and start Sage.
+diff --git a/configure.ac b/configure.ac
+index 351f487..db30a91 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -435,6 +435,17 @@ AC_ARG_ENABLE([download-from-upstream-url],
+   [AS_HELP_STRING([--enable-download-from-upstream-url],
+     [allow downloading packages from their upstream URL if they cannot be found on the Sage mirrors])])
+ 
++AC_ARG_ENABLE(
++  [system-site-packages], [AS_HELP_STRING(
++    [--enable-system-site-packages],
++    [allow sage to use python packages from the system (experimental; default: no)]
++  )], [
++  AS_IF([test "x$enable_system_site_packages" = "xyes"], [
++    SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
++  ])
++])
++AC_SUBST([SAGE_VENV_FLAGS])
++
+ SAGE_SPKG_OPTIONS=""
+ AS_IF([test "x$enable_experimental_packages" = "xyes"], [
+   AS_VAR_APPEND([SAGE_SPKG_OPTIONS], [" -y"])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9372d1f663edf4e89f9c186336815ca04cff59dc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 19:41:14 -0400
+Subject: Trac #29665: new SAGE_PYTHON_PACKAGE_CHECK() autoconf macro.
+
+This new macro encapsulates the check for system installations of
+python packages. It uses setuptools.version's pkg_resources to
+check if the contents of install-requires.txt are satisfied for
+the given package; and if not, tells the build system to install
+the SPKG instead.
+---
+ m4/sage_python_package_check.m4 | 49 +++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 49 insertions(+)
+ create mode 100644 m4/sage_python_package_check.m4
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+new file mode 100644
+index 00000000..77b0a0c
+--- /dev/null
++++ b/m4/sage_python_package_check.m4
+@@ -0,0 +1,49 @@
++#
++# SYNOPSIS
++#
++#   SAGE_PYTHON_PACKAGE_CHECK(package)
++#
++# DESCRIPTION
++#
++#   Determine if the system copy of a python package can be used by sage.
++#
++#   This macro uses setuptools.version's pkg_resources to check that the
++#   "install-requires.txt" file for the named package is satisfied, and
++#   it can typically fail in four ways:
++#
++#     1. If --enable-system-site-packages was not passed to ./configure,
++#
++#     2. If we are not using the system python (no $PYTHON_FOR_VENV),
++#
++#     3. If setuptools is not available to the system python,
++#
++#     4. If the contents of install-requires.txt are not met (wrong
++#        version, no version, etc.) by the system python.
++#
++#   In any of those cases, we set sage_spkg_install_$package to "yes"
++#   so that the corresponding SPKG is installed. Otherwise, we do
++#   nothing, since the default value of sage_spkg_install_$package
++#   is "no" (to use the system copy).
++#
++#   The SAGE_SPKG_CONFIGURE_PYTHON3() macro is AC_REQUIRE'd to ensure
++#   that $PYTHON_FOR_VENV is available, if it is going to be available.
++#
++
++AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
++  AS_IF([test "${enable_system_site_packages}" = "yes"], [
++    AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
++
++    dnl strip all comments from install-requires.txt; this should leave
++    dnl only a single line containing the version specification for this
++    dnl package.
++    SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
++    AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++    AS_IF(
++      ["${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())"],
++      [AC_MSG_RESULT(yes)],
++      [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
++    )
++  ], [
++    sage_spkg_install_$1=yes
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a0dac8ad81ad6369d479bba30d2388de59e5cecb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:21:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for py.
+
+---
+ build/pkgs/py/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/py/spkg-configure.m4
+
+diff --git a/build/pkgs/py/spkg-configure.m4 b/build/pkgs/py/spkg-configure.m4
+new file mode 100644
+index 00000000..ded7034
+--- /dev/null
++++ b/build/pkgs/py/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([py], [SAGE_PYTHON_PACKAGE_CHECK([py])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 87c463a25ab4432dc1fba4f7a9703284e5b8f620 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:24:15 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for wheel.
+
+---
+ build/pkgs/wheel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wheel/spkg-configure.m4
+
+diff --git a/build/pkgs/wheel/spkg-configure.m4 b/build/pkgs/wheel/spkg-configure.m4
+new file mode 100644
+index 00000000..7897ea9
+--- /dev/null
++++ b/build/pkgs/wheel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([wheel], [SAGE_PYTHON_PACKAGE_CHECK([wheel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 804094b3a980f262f4d53d7be8b1be43ac0c55e0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:25:15 -0400
+Subject: Trac #29665: new spkg-configure.m4 for cvxopt.
+
+This includes a SAGE_SPKG_DEPCHECK([gsl glpk suitesparse],... because
+those C dependencies wind up linked into shared libraries like,
+
+  /usr/.../cvxopt/glpk.cpython-39-x86_64-linux-gnu.so
+
+that could potentially conflict with (for example) the glpk SPKG.
+---
+ build/pkgs/cvxopt/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/cvxopt/spkg-configure.m4
+
+diff --git a/build/pkgs/cvxopt/spkg-configure.m4 b/build/pkgs/cvxopt/spkg-configure.m4
+new file mode 100644
+index 00000000..c4aa619
+--- /dev/null
++++ b/build/pkgs/cvxopt/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([cvxopt], [
++  SAGE_SPKG_DEPCHECK([gsl glpk suitesparse], [
++    SAGE_PYTHON_PACKAGE_CHECK([cvxopt])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3f171955ff8d15da2c98aee0d2e254e95a55a2b5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:28:10 -0400
+Subject: Trac #29665: new spkg-configure.m4 for pyzmq.
+
+This includes a SAGE_SPKG_DEPCHECK([zeromq],... because libzmq winds
+up linked into shared libraries like,
+
+  /usr/.../zmq/backend/cython/message.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the zeromq SPKG.
+---
+ build/pkgs/pyzmq/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/pyzmq/spkg-configure.m4
+
+diff --git a/build/pkgs/pyzmq/spkg-configure.m4 b/build/pkgs/pyzmq/spkg-configure.m4
+new file mode 100644
+index 00000000..ae2b126
+--- /dev/null
++++ b/build/pkgs/pyzmq/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([pyzmq], [
++  SAGE_SPKG_DEPCHECK([zeromq], [
++    SAGE_PYTHON_PACKAGE_CHECK([pyzmq])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20d3aa9da9fc98a6e6a47599cd1b6d1d3785a4c4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 20:31:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for requests.
+
+---
+ build/pkgs/requests/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/requests/spkg-configure.m4
+
+diff --git a/build/pkgs/requests/spkg-configure.m4 b/build/pkgs/requests/spkg-configure.m4
+new file mode 100644
+index 00000000..f50a66c
+--- /dev/null
++++ b/build/pkgs/requests/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([requests], [SAGE_PYTHON_PACKAGE_CHECK([requests])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4df57ee47f2576b6b7bf9265248e06e90616b689 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:13:34 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for six.
+
+---
+ build/pkgs/six/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/six/spkg-configure.m4
+
+diff --git a/build/pkgs/six/spkg-configure.m4 b/build/pkgs/six/spkg-configure.m4
+new file mode 100644
+index 00000000..a382b81
+--- /dev/null
++++ b/build/pkgs/six/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([six], [SAGE_PYTHON_PACKAGE_CHECK([six])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f4462652d02ca729cc6d7cb36ee4d7d662deafb0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:14:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for packaging.
+
+---
+ build/pkgs/packaging/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/packaging/spkg-configure.m4
+
+diff --git a/build/pkgs/packaging/spkg-configure.m4 b/build/pkgs/packaging/spkg-configure.m4
+new file mode 100644
+index 00000000..398f9e1
+--- /dev/null
++++ b/build/pkgs/packaging/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([packaging], [SAGE_PYTHON_PACKAGE_CHECK([packaging])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4d64677fffce48077e4bc3e20ec833c70e6e9b65 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:18:53 -0400
+Subject: Trac #29665: new spkg-configure.m4 for numpy.
+
+This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack
+wind up linked into shared libraries like,
+
+  /usr/.../numpy/linalg/lapack_lite.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the openblas SPKG.
+---
+ build/pkgs/numpy/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/numpy/spkg-configure.m4
+
+diff --git a/build/pkgs/numpy/spkg-configure.m4 b/build/pkgs/numpy/spkg-configure.m4
+new file mode 100644
+index 00000000..16f9a90
+--- /dev/null
++++ b/build/pkgs/numpy/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([numpy], [
++  SAGE_SPKG_DEPCHECK([openblas], [
++   SAGE_PYTHON_PACKAGE_CHECK([numpy])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 85dfe5bb32f3c470966b477bae68a921e846d11f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 10 Oct 2021 18:58:48 -0400
+Subject: Trac #29665: new spkg-configure.m4 for scipy.
+
+This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack
+wind up linked into shared libraries like,
+
+  /usr/.../scipy/linalg/_flinalg.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with the openblas SPKG.
+---
+ build/pkgs/scipy/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/scipy/spkg-configure.m4
+
+diff --git a/build/pkgs/scipy/spkg-configure.m4 b/build/pkgs/scipy/spkg-configure.m4
+new file mode 100644
+index 00000000..0b7294a
+--- /dev/null
++++ b/build/pkgs/scipy/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([scipy], [
++  SAGE_SPKG_DEPCHECK([openblas], [
++    SAGE_PYTHON_PACKAGE_CHECK([scipy])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5616f1491036fda95f4d3e840c8c8b531c97323b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 07:19:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pluggy.
+
+---
+ build/pkgs/pluggy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pluggy/spkg-configure.m4
+
+diff --git a/build/pkgs/pluggy/spkg-configure.m4 b/build/pkgs/pluggy/spkg-configure.m4
+new file mode 100644
+index 00000000..11b1fce
+--- /dev/null
++++ b/build/pkgs/pluggy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pluggy], [SAGE_PYTHON_PACKAGE_CHECK([pluggy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6bceae3d356878cfe5fce40c9998dead003a3844 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 07:24:12 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pickleshare.
+
+---
+ build/pkgs/pickleshare/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pickleshare/spkg-configure.m4
+
+diff --git a/build/pkgs/pickleshare/spkg-configure.m4 b/build/pkgs/pickleshare/spkg-configure.m4
+new file mode 100644
+index 00000000..80e9b7c
+--- /dev/null
++++ b/build/pkgs/pickleshare/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pickleshare], [SAGE_PYTHON_PACKAGE_CHECK([pickleshare])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From da2ab534f4a256c82ed4f1c5f0f5c320529b5e9f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 08:53:29 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for html5lib.
+
+---
+ build/pkgs/html5lib/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/html5lib/spkg-configure.m4
+
+diff --git a/build/pkgs/html5lib/spkg-configure.m4 b/build/pkgs/html5lib/spkg-configure.m4
+new file mode 100644
+index 00000000..f421b7e
+--- /dev/null
++++ b/build/pkgs/html5lib/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([html5lib], [SAGE_PYTHON_PACKAGE_CHECK([html5lib])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5e464134afdf6055b7b5804208f759561c5435cd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 18:30:47 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for networkx.
+
+---
+ build/pkgs/networkx/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/networkx/spkg-configure.m4
+
+diff --git a/build/pkgs/networkx/spkg-configure.m4 b/build/pkgs/networkx/spkg-configure.m4
+new file mode 100644
+index 00000000..926671e
+--- /dev/null
++++ b/build/pkgs/networkx/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([networkx], [SAGE_PYTHON_PACKAGE_CHECK([networkx])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c4d40770cd9c7fda811e31759a5f4aedc320f3f9 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:33:24 -0400
+Subject: Trac #29665: new spkg-configure.m4 for matplotlib.
+
+This includes a SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull],...
+because those dependencies wind up linked into shared libraries like,
+
+  /usr/lib/.../matplotlib/ft2font.cpython-39-x86_64-linux-gnu.so
+
+that potentially conflict with their SPKG counterparts.
+---
+ build/pkgs/matplotlib/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/matplotlib/spkg-configure.m4
+
+diff --git a/build/pkgs/matplotlib/spkg-configure.m4 b/build/pkgs/matplotlib/spkg-configure.m4
+new file mode 100644
+index 00000000..39c2d29
+--- /dev/null
++++ b/build/pkgs/matplotlib/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([matplotlib], [
++  SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull], [
++    SAGE_PYTHON_PACKAGE_CHECK([matplotlib])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7834dc3ac349201af632f89a9de7cd1967931010 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:35:00 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for bleach.
+
+---
+ build/pkgs/bleach/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/bleach/spkg-configure.m4
+
+diff --git a/build/pkgs/bleach/spkg-configure.m4 b/build/pkgs/bleach/spkg-configure.m4
+new file mode 100644
+index 00000000..3c9bb26
+--- /dev/null
++++ b/build/pkgs/bleach/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([bleach], [SAGE_PYTHON_PACKAGE_CHECK([bleach])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 84cad343287a2c69a4a21b9fa3b92301ff88645b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:37:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for decorator.
+
+---
+ build/pkgs/decorator/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/decorator/spkg-configure.m4
+
+diff --git a/build/pkgs/decorator/spkg-configure.m4 b/build/pkgs/decorator/spkg-configure.m4
+new file mode 100644
+index 00000000..e062778
+--- /dev/null
++++ b/build/pkgs/decorator/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([decorator], [SAGE_PYTHON_PACKAGE_CHECK([decorator])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 25693212572e69d452bc95c923ada13744359eb7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:38:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for idna.
+
+---
+ build/pkgs/idna/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/idna/spkg-configure.m4
+
+diff --git a/build/pkgs/idna/spkg-configure.m4 b/build/pkgs/idna/spkg-configure.m4
+new file mode 100644
+index 00000000..9d363f2
+--- /dev/null
++++ b/build/pkgs/idna/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([idna], [SAGE_PYTHON_PACKAGE_CHECK([idna])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6d5616472f6cdc6cf496bba6fe07bd4ef44dfdaf Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:39:23 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for certifi.
+
+---
+ build/pkgs/certifi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/certifi/spkg-configure.m4
+
+diff --git a/build/pkgs/certifi/spkg-configure.m4 b/build/pkgs/certifi/spkg-configure.m4
+new file mode 100644
+index 00000000..ddd4061
+--- /dev/null
++++ b/build/pkgs/certifi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([certifi], [SAGE_PYTHON_PACKAGE_CHECK([certifi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9412a07023b275e29e8d1af9b8ee3e767042e7fd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:40:59 -0400
+Subject: Trac #29665: new spkg-configure.m4 for pillow.
+
+This includes an SAGE_SPKG_DEPCHECK([bzip2 freetype libpng zlib],...
+because those dependencies wind up linked into shared libraries like,
+
+  /usr/.../PIL/_imagingft.cpython-39-x86_64-linux-gnu.so
+
+and potentially conflict with their SPKG counterparts.
+---
+ build/pkgs/pillow/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 build/pkgs/pillow/spkg-configure.m4
+
+diff --git a/build/pkgs/pillow/spkg-configure.m4 b/build/pkgs/pillow/spkg-configure.m4
+new file mode 100644
+index 00000000..f2e68e2
+--- /dev/null
++++ b/build/pkgs/pillow/spkg-configure.m4
+@@ -0,0 +1,5 @@
++SAGE_SPKG_CONFIGURE([pillow], [
++  SAGE_SPKG_DEPCHECK([bzip2 freetype libpng zlib], [
++    SAGE_PYTHON_PACKAGE_CHECK([pillow])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From eede914311481fdb75b363b7a799075e876a2b4f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:44:13 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for mpmath.
+
+---
+ build/pkgs/mpmath/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mpmath/spkg-configure.m4
+
+diff --git a/build/pkgs/mpmath/spkg-configure.m4 b/build/pkgs/mpmath/spkg-configure.m4
+new file mode 100644
+index 00000000..f43c838
+--- /dev/null
++++ b/build/pkgs/mpmath/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([mpmath], [SAGE_PYTHON_PACKAGE_CHECK([mpmath])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 363a825885832c0b580ff53fe61f5c79e70c4728 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:44:56 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for sympy.
+
+---
+ build/pkgs/sympy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sympy/spkg-configure.m4
+
+diff --git a/build/pkgs/sympy/spkg-configure.m4 b/build/pkgs/sympy/spkg-configure.m4
+new file mode 100644
+index 00000000..fa0f1f5
+--- /dev/null
++++ b/build/pkgs/sympy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([sympy], [SAGE_PYTHON_PACKAGE_CHECK([sympy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0667964c914e4a01dda697190a054ff96cea92d6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:47:06 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pygments.
+
+---
+ build/pkgs/pygments/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pygments/spkg-configure.m4
+
+diff --git a/build/pkgs/pygments/spkg-configure.m4 b/build/pkgs/pygments/spkg-configure.m4
+new file mode 100644
+index 00000000..99f29e3
+--- /dev/null
++++ b/build/pkgs/pygments/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pygments], [SAGE_PYTHON_PACKAGE_CHECK([pygments])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f787c233aa05d8e90f7c6ad18f76bd2fa36bfbfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 11 Oct 2021 20:48:50 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for jinja2.
+
+---
+ build/pkgs/jinja2/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jinja2/spkg-configure.m4
+
+diff --git a/build/pkgs/jinja2/spkg-configure.m4 b/build/pkgs/jinja2/spkg-configure.m4
+new file mode 100644
+index 00000000..0970d1c
+--- /dev/null
++++ b/build/pkgs/jinja2/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jinja2], [SAGE_PYTHON_PACKAGE_CHECK([jinja2])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 309d8f8e2b7078b5efbbe824b69ec1d9b1e639f0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:43:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pandocfilters.
+
+---
+ build/pkgs/pandocfilters/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/pandocfilters/spkg-configure.m4
+
+diff --git a/build/pkgs/pandocfilters/spkg-configure.m4 b/build/pkgs/pandocfilters/spkg-configure.m4
+new file mode 100644
+index 00000000..3e9537f
+--- /dev/null
++++ b/build/pkgs/pandocfilters/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([pandocfilters], [
++  SAGE_PYTHON_PACKAGE_CHECK([pandocfilters])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f57bfda49777a6ba1cd123553acd75dc347c5521 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:44:46 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for webencodings.
+
+---
+ build/pkgs/webencodings/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/webencodings/spkg-configure.m4
+
+diff --git a/build/pkgs/webencodings/spkg-configure.m4 b/build/pkgs/webencodings/spkg-configure.m4
+new file mode 100644
+index 00000000..1b9a5c4
+--- /dev/null
++++ b/build/pkgs/webencodings/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([webencodings], [
++  SAGE_PYTHON_PACKAGE_CHECK([webencodings])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7f193a62d7a2ea0b6a3ca6beb12390d91c25bbfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:48:26 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pytz.
+
+---
+ build/pkgs/pytz/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pytz/spkg-configure.m4
+
+diff --git a/build/pkgs/pytz/spkg-configure.m4 b/build/pkgs/pytz/spkg-configure.m4
+new file mode 100644
+index 00000000..366521b
+--- /dev/null
++++ b/build/pkgs/pytz/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pytz], [SAGE_PYTHON_PACKAGE_CHECK([pytz])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bfd3fdd887c3465c03465248de4997eed4a82915 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:51:16 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for texttable.
+
+---
+ build/pkgs/texttable/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/texttable/spkg-configure.m4
+
+diff --git a/build/pkgs/texttable/spkg-configure.m4 b/build/pkgs/texttable/spkg-configure.m4
+new file mode 100644
+index 00000000..42a3de1
+--- /dev/null
++++ b/build/pkgs/texttable/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([texttable], [SAGE_PYTHON_PACKAGE_CHECK([texttable])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 914bf0cc57abc46129b27c1525782dbe16da31a2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 12 Oct 2021 08:53:41 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for babel.
+
+---
+ build/pkgs/babel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/babel/spkg-configure.m4
+
+diff --git a/build/pkgs/babel/spkg-configure.m4 b/build/pkgs/babel/spkg-configure.m4
+new file mode 100644
+index 00000000..d7b9a71
+--- /dev/null
++++ b/build/pkgs/babel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([babel], [SAGE_PYTHON_PACKAGE_CHECK([babel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 56977abd1eafbc87c765a2892cfe525382648259 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 14 Oct 2021 08:06:59 -0400
+Subject: Trac #29665: force system python3 with --enable-system-site-packages.
+
+When the python SPKG is used, the --enable-system-site-packages flag
+will essentially do nothing, and that may confuse users who have
+wasted a few hours building sage. (Generally, they will want to fix
+detection of their system python3 first.)
+
+To forestall that, we now set "--with-system-python3=force" whenever
+the "--enable-system-site-packages" flag is passed.
+---
+ configure.ac | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index db30a91..6fafb83 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -438,10 +438,19 @@ AC_ARG_ENABLE([download-from-upstream-url],
+ AC_ARG_ENABLE(
+   [system-site-packages], [AS_HELP_STRING(
+     [--enable-system-site-packages],
+-    [allow sage to use python packages from the system (experimental; default: no)]
++    [allow the use of python packages from the system (experimental; default: no)]
+   )], [
+   AS_IF([test "x$enable_system_site_packages" = "xyes"], [
+     SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
++
++    dnl We want to raise an error if the user asked for "system site
++    dnl packages" but the system python will not be used. Technically
++    dnl that causes no problems (SAGE_PYTHON_PACKAGE_CHECK always fails,
++    dnl so SPKGs are used for all python packages), but it may be confusing
++    dnl to end users who expect the flag to actually give them access to
++    dnl their system python packages and who may not be paying close
++    dnl attention to their ./configure output.
++    with_system_python3="force"
+   ])
+ ])
+ AC_SUBST([SAGE_VENV_FLAGS])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 02b369fd24ef7cf8997082e7850b9cf022cae34b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 01:18:35 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for setuptools.
+
+---
+ build/pkgs/setuptools/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/setuptools/spkg-configure.m4
+
+diff --git a/build/pkgs/setuptools/spkg-configure.m4 b/build/pkgs/setuptools/spkg-configure.m4
+new file mode 100644
+index 00000000..a2ad811
+--- /dev/null
++++ b/build/pkgs/setuptools/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([setuptools], [SAGE_PYTHON_PACKAGE_CHECK([setuptools])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 05117317d38693978efaf36e81d8b02bae44b257 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 01:15:48 -0400
+Subject: Trac #29665: poison PYTHONUSERBASE when testing for "system"
+ packages.
+
+When we're detecting system installations of python packages, we want
+to hide anything that was installed with e.g. "pip install --user". To
+accomplish that, we mimic the PYTHONUSERBASE poisoning from sage-env
+within the SAGE_PYTHON_PACKAGE_CHECK() macro.
+---
+ m4/sage_python_package_check.m4 | 18 +++++++++++++++++-
+ 1 file changed, 17 insertions(+), 1 deletion(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 77b0a0c..b8cdba4 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -38,11 +38,27 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     dnl package.
+     SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
+     AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++
++    dnl To prevent user-site (pip install --user) packages from being
++    dnl detected as "system" packages, we poison PYTHONUSERBASE. The
++    dnl sage-env script also does this at runtime; we mimic that
++    dnl implementation to ensure that the behaviors at ./configure and
++    dnl runtime are identical. Beware that (as in sage-env) the poisoning
++    dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
++    dnl user points PYTHONUSERBASE to any path (even the default), then
++    dnl his local pip packages will be detected.
++    PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
++    AS_IF([test -z "${PYTHONUSERBASE}"], [
++      PYTHONUSERBASE="${HOME}/.sage/local"
++    ])
++
+     AS_IF(
+-      ["${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())"],
++      [PYTHONUSERBASE="${PYTHONUSERBASE}" "${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" 2>/dev/null],
+       [AC_MSG_RESULT(yes)],
+       [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+     )
++
++    PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d75c1492f63a584b5ec5f424ddd7f7c4a6d502d3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:20:04 -0400
+Subject: Trac #29665: run SAGE_PYTHON_PACKAGE_CHECK() inside a venv.
+
+To recreate the runtime environment as closely as possible, we now use
+a venv (with system site packages enabled) when checking for system
+copies of python packages.
+---
+ m4/sage_python_package_check.m4 | 76 +++++++++++++++++++++++++++--------------
+ 1 file changed, 51 insertions(+), 25 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index b8cdba4..7cbd6c0 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -15,9 +15,11 @@
+ #
+ #     2. If we are not using the system python (no $PYTHON_FOR_VENV),
+ #
+-#     3. If setuptools is not available to the system python,
++#     3. If we are unable to create a venv with the system python,
+ #
+-#     4. If the contents of install-requires.txt are not met (wrong
++#     4. If setuptools is not available to the system python,
++#
++#     5. If the contents of install-requires.txt are not met (wrong
+ #        version, no version, etc.) by the system python.
+ #
+ #   In any of those cases, we set sage_spkg_install_$package to "yes"
+@@ -27,38 +29,62 @@
+ #
+ #   The SAGE_SPKG_CONFIGURE_PYTHON3() macro is AC_REQUIRE'd to ensure
+ #   that $PYTHON_FOR_VENV is available, if it is going to be available.
++#   The check is run inside a new venv, and with the PYTHONUSERBASE
++#   variable poisoned in the same manner as sage-env poisons it, to
++#   ensure that the ./configure- and run-time views of the system
++#   are as similar as possible.
+ #
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
+     AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
+ 
+-    dnl strip all comments from install-requires.txt; this should leave
+-    dnl only a single line containing the version specification for this
+-    dnl package.
+-    SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
+-    AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++    dnl We run this check inside a python venv, because that's ultimately
++    dnl how the system $PYTHON_FOR_VENV will be used.
++    AC_MSG_CHECKING([if we can create a python venv in config.venv])
+ 
+-    dnl To prevent user-site (pip install --user) packages from being
+-    dnl detected as "system" packages, we poison PYTHONUSERBASE. The
+-    dnl sage-env script also does this at runtime; we mimic that
+-    dnl implementation to ensure that the behaviors at ./configure and
+-    dnl runtime are identical. Beware that (as in sage-env) the poisoning
+-    dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
+-    dnl user points PYTHONUSERBASE to any path (even the default), then
+-    dnl his local pip packages will be detected.
+-    PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
+-    AS_IF([test -z "${PYTHONUSERBASE}"], [
+-      PYTHONUSERBASE="${HOME}/.sage/local"
+-    ])
++    dnl Use --clear because ./configure typically clobbers its output files.
++    AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
++                                        --clear                dnl
++                                        --without-pip          dnl
++					config.venv], [
++      AC_MSG_RESULT(yes)
++      dnl strip all comments from install-requires.txt; this should leave
++      dnl only a single line containing the version specification for this
++      dnl package.
++      SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
++      AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
++
++      dnl To prevent user-site (pip install --user) packages from being
++      dnl detected as "system" packages, we poison PYTHONUSERBASE. The
++      dnl sage-env script also does this at runtime; we mimic that
++      dnl implementation to ensure that the behaviors at ./configure and
++      dnl runtime are identical. Beware that (as in sage-env) the poisoning
++      dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
++      dnl user points PYTHONUSERBASE to any path (even the default), then
++      dnl his local pip packages will be detected.
++      PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
++      AS_IF([test -z "${PYTHONUSERBASE}"], [
++        PYTHONUSERBASE="${HOME}/.sage/local"
++      ])
+ 
+-    AS_IF(
+-      [PYTHONUSERBASE="${PYTHONUSERBASE}" "${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" 2>/dev/null],
+-      [AC_MSG_RESULT(yes)],
+-      [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+-    )
++      AS_IF(
++        [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
++           "from setuptools.version import pkg_resources;              dnl
++            pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" dnl
++	 2>/dev/null],
++        [AC_MSG_RESULT(yes)],
++        [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
++      )
++
++      PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
++    ], [
++      dnl failed to create a venv for some reason
++      AC_MSG_RESULT(no)
++      sage_spkg_install_$1=yes
++    ])
+ 
+-    PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
++    rm -rf config.venv
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 87646c3264a04ffd98a12d67074f93e1943a1e96 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:38:08 -0400
+Subject: Trac #29665: log SAGE_PYTHON_PACKAGE_CHECK() failures to config.log.
+
+---
+ m4/sage_python_package_check.m4 | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 7cbd6c0..e0e0b9f 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -47,7 +47,8 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
+                                         --clear                dnl
+                                         --without-pip          dnl
+-					config.venv], [
++                                        config.venv            dnl
++                                        2>&AS_MESSAGE_LOG_FD], [
+       AC_MSG_RESULT(yes)
+       dnl strip all comments from install-requires.txt; this should leave
+       dnl only a single line containing the version specification for this
+@@ -72,7 +73,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+         [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
+            "from setuptools.version import pkg_resources;              dnl
+             pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" dnl
+-	 2>/dev/null],
++	 2>&AS_MESSAGE_LOG_FD],
+         [AC_MSG_RESULT(yes)],
+         [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
+       )
+-- 
+cgit v1.0-1-gd88e
+
+
+From f7dfffd1c64816e2ae4e0f420b22065c5c5bf2cb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 Oct 2021 11:45:37 -0400
+Subject: Trac #29665: don't clobber a plain file named config.venv.
+
+When SAGE_PYTHON_PACKAGE_CHECK() is cleaning up, we no longer remove
+"config.venv" unconditionally. Instead, we remove it only if it is a
+directory. This is also how "pyvenv --clear" works.
+---
+ m4/sage_python_package_check.m4 | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index e0e0b9f..127a078 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -85,7 +85,9 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+       sage_spkg_install_$1=yes
+     ])
+ 
+-    rm -rf config.venv
++    dnl Clean up config.venv, but only if we could have created it.
++    dnl (The --clear flag to pyvenv will not clobber a plain file.)
++    AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
+     sage_spkg_install_$1=yes
+   ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9849c77313b895dcfb786d2ea54e36585bd31ce2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 16 Oct 2021 08:14:42 -0400
+Subject: Trac #29665: don't announce system python packages that won't be
+ used.
+
+When --enable-system-site-packages was not given, the python packages
+using SAGE_PYTHON_PACKAGE_CHECK() in spkg-configure.m4 cannot be used.
+Rather than suggest that users install them anyway, that macro now
+hacks the value of sage_use_system_$package to be "no" when the use
+of system site packages is disabled at the python level.
+---
+ m4/sage_python_package_check.m4 | 17 +++++++++++++++++
+ 1 file changed, 17 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 127a078..7ee82a7 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -89,6 +89,23 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     dnl (The --clear flag to pyvenv will not clobber a plain file.)
+     AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
++    dnl System site packages are disabled.
+     sage_spkg_install_$1=yes
++
++    dnl We have to retroactively hack the --with-system-foo={no,yes,force}
++    dnl mechanism here because it wasn't designed with the ability to
++    dnl disable arbitrary chunks of system packages in mind. The easy cases
++    dnl are "no" and "force" which require no action; "no" means we won't
++    dnl suggest the package anyway, and "force" will raise an error when
++    dnl the system-package check fails.
++    dnl
++    dnl The default of "yes" is more troubling because it is the default. To
++    dnl avoid prompting users to install packages that won't be used, we want
++    dnl to ignore "yes" when reporting the "hint: install these packages..."
++    dnl at the end of ./configure. To accomplish that, we change "yes" to
++    dnl "no" here, essentially changing the default for packages using this
++    dnl macro when --enable-system-site-packages is disabled. Packages with
++    dnl "no" are not suggested to the user.
++    AS_IF([test "${sage_use_system_$1}" = "yes"],[sage_use_system_$1=no])
+   ])
+ ])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3e6ad737b94aaac234d615ecaf1a2455eb607f1a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 17 Oct 2021 06:16:21 -0400
+Subject: Trac #29665: add Gentoo package information for python packages.
+
+---
+ build/pkgs/babel/distros/gentoo.txt         | 1 +
+ build/pkgs/bleach/distros/gentoo.txt        | 1 +
+ build/pkgs/certifi/distros/gentoo.txt       | 1 +
+ build/pkgs/cvxopt/distros/gentoo.txt        | 1 +
+ build/pkgs/decorator/distros/gentoo.txt     | 1 +
+ build/pkgs/html5lib/distros/gentoo.txt      | 1 +
+ build/pkgs/idna/distros/gentoo.txt          | 1 +
+ build/pkgs/jinja2/distros/gentoo.txt        | 1 +
+ build/pkgs/matplotlib/distros/gentoo.txt    | 1 +
+ build/pkgs/mpmath/distros/gentoo.txt        | 1 +
+ build/pkgs/networkx/distros/gentoo.txt      | 1 +
+ build/pkgs/numpy/distros/gentoo.txt         | 1 +
+ build/pkgs/packaging/distros/gentoo.txt     | 1 +
+ build/pkgs/pandocfilters/distros/gentoo.txt | 1 +
+ build/pkgs/pickleshare/distros/gentoo.txt   | 1 +
+ build/pkgs/pillow/distros/gentoo.txt        | 1 +
+ build/pkgs/pluggy/distros/gentoo.txt        | 1 +
+ build/pkgs/pygments/distros/gentoo.txt      | 1 +
+ build/pkgs/pytz/distros/gentoo.txt          | 1 +
+ build/pkgs/pyzmq/distros/gentoo.txt         | 1 +
+ build/pkgs/requests/distros/gentoo.txt      | 1 +
+ build/pkgs/scipy/distros/gentoo.txt         | 1 +
+ build/pkgs/setuptools/distros/gentoo.txt    | 1 +
+ build/pkgs/six/distros/gentoo.txt           | 1 +
+ build/pkgs/sympy/distros/gentoo.txt         | 1 +
+ build/pkgs/texttable/distros/gentoo.txt     | 1 +
+ build/pkgs/toml/distros/gentoo.txt          | 1 +
+ build/pkgs/webencodings/distros/gentoo.txt  | 1 +
+ 28 files changed, 28 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/gentoo.txt
+ create mode 100644 build/pkgs/bleach/distros/gentoo.txt
+ create mode 100644 build/pkgs/certifi/distros/gentoo.txt
+ create mode 100644 build/pkgs/cvxopt/distros/gentoo.txt
+ create mode 100644 build/pkgs/decorator/distros/gentoo.txt
+ create mode 100644 build/pkgs/html5lib/distros/gentoo.txt
+ create mode 100644 build/pkgs/idna/distros/gentoo.txt
+ create mode 100644 build/pkgs/jinja2/distros/gentoo.txt
+ create mode 100644 build/pkgs/matplotlib/distros/gentoo.txt
+ create mode 100644 build/pkgs/mpmath/distros/gentoo.txt
+ create mode 100644 build/pkgs/networkx/distros/gentoo.txt
+ create mode 100644 build/pkgs/numpy/distros/gentoo.txt
+ create mode 100644 build/pkgs/packaging/distros/gentoo.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/gentoo.txt
+ create mode 100644 build/pkgs/pickleshare/distros/gentoo.txt
+ create mode 100644 build/pkgs/pillow/distros/gentoo.txt
+ create mode 100644 build/pkgs/pluggy/distros/gentoo.txt
+ create mode 100644 build/pkgs/pygments/distros/gentoo.txt
+ create mode 100644 build/pkgs/pytz/distros/gentoo.txt
+ create mode 100644 build/pkgs/pyzmq/distros/gentoo.txt
+ create mode 100644 build/pkgs/requests/distros/gentoo.txt
+ create mode 100644 build/pkgs/scipy/distros/gentoo.txt
+ create mode 100644 build/pkgs/setuptools/distros/gentoo.txt
+ create mode 100644 build/pkgs/six/distros/gentoo.txt
+ create mode 100644 build/pkgs/sympy/distros/gentoo.txt
+ create mode 100644 build/pkgs/texttable/distros/gentoo.txt
+ create mode 100644 build/pkgs/toml/distros/gentoo.txt
+ create mode 100644 build/pkgs/webencodings/distros/gentoo.txt
+
+diff --git a/build/pkgs/babel/distros/gentoo.txt b/build/pkgs/babel/distros/gentoo.txt
+new file mode 100644
+index 00000000..2d2c34f
+--- /dev/null
++++ b/build/pkgs/babel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/Babel
+diff --git a/build/pkgs/bleach/distros/gentoo.txt b/build/pkgs/bleach/distros/gentoo.txt
+new file mode 100644
+index 00000000..b4f9744
+--- /dev/null
++++ b/build/pkgs/bleach/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/bleach
+diff --git a/build/pkgs/certifi/distros/gentoo.txt b/build/pkgs/certifi/distros/gentoo.txt
+new file mode 100644
+index 00000000..72e2e91
+--- /dev/null
++++ b/build/pkgs/certifi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/certifi
+diff --git a/build/pkgs/cvxopt/distros/gentoo.txt b/build/pkgs/cvxopt/distros/gentoo.txt
+new file mode 100644
+index 00000000..b312391
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/cvxopt
+diff --git a/build/pkgs/decorator/distros/gentoo.txt b/build/pkgs/decorator/distros/gentoo.txt
+new file mode 100644
+index 00000000..fea5a67
+--- /dev/null
++++ b/build/pkgs/decorator/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/decorator
+diff --git a/build/pkgs/html5lib/distros/gentoo.txt b/build/pkgs/html5lib/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c2be76
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/html5lib
+diff --git a/build/pkgs/idna/distros/gentoo.txt b/build/pkgs/idna/distros/gentoo.txt
+new file mode 100644
+index 00000000..68ef51c
+--- /dev/null
++++ b/build/pkgs/idna/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/idna
+diff --git a/build/pkgs/jinja2/distros/gentoo.txt b/build/pkgs/jinja2/distros/gentoo.txt
+new file mode 100644
+index 00000000..15a27ae
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jinja
+diff --git a/build/pkgs/matplotlib/distros/gentoo.txt b/build/pkgs/matplotlib/distros/gentoo.txt
+new file mode 100644
+index 00000000..bcfefb5
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/matplotlib
+diff --git a/build/pkgs/mpmath/distros/gentoo.txt b/build/pkgs/mpmath/distros/gentoo.txt
+new file mode 100644
+index 00000000..946c62d
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/mpmath
+diff --git a/build/pkgs/networkx/distros/gentoo.txt b/build/pkgs/networkx/distros/gentoo.txt
+new file mode 100644
+index 00000000..dd97742
+--- /dev/null
++++ b/build/pkgs/networkx/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/networkx
+diff --git a/build/pkgs/numpy/distros/gentoo.txt b/build/pkgs/numpy/distros/gentoo.txt
+new file mode 100644
+index 00000000..d2179d4
+--- /dev/null
++++ b/build/pkgs/numpy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/numpy
+diff --git a/build/pkgs/packaging/distros/gentoo.txt b/build/pkgs/packaging/distros/gentoo.txt
+new file mode 100644
+index 00000000..e5309ed
+--- /dev/null
++++ b/build/pkgs/packaging/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/packaging
+diff --git a/build/pkgs/pandocfilters/distros/gentoo.txt b/build/pkgs/pandocfilters/distros/gentoo.txt
+new file mode 100644
+index 00000000..a726fda
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/gentoo.txt b/build/pkgs/pickleshare/distros/gentoo.txt
+new file mode 100644
+index 00000000..14fad0f
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pickleshare
+diff --git a/build/pkgs/pillow/distros/gentoo.txt b/build/pkgs/pillow/distros/gentoo.txt
+new file mode 100644
+index 00000000..1243649
+--- /dev/null
++++ b/build/pkgs/pillow/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pillow
+diff --git a/build/pkgs/pluggy/distros/gentoo.txt b/build/pkgs/pluggy/distros/gentoo.txt
+new file mode 100644
+index 00000000..7b33876
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pluggy
+diff --git a/build/pkgs/pygments/distros/gentoo.txt b/build/pkgs/pygments/distros/gentoo.txt
+new file mode 100644
+index 00000000..a584f32
+--- /dev/null
++++ b/build/pkgs/pygments/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pygments
+diff --git a/build/pkgs/pytz/distros/gentoo.txt b/build/pkgs/pytz/distros/gentoo.txt
+new file mode 100644
+index 00000000..902a18b
+--- /dev/null
++++ b/build/pkgs/pytz/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pytz
+diff --git a/build/pkgs/pyzmq/distros/gentoo.txt b/build/pkgs/pyzmq/distros/gentoo.txt
+new file mode 100644
+index 00000000..77c2429
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyzmq
+diff --git a/build/pkgs/requests/distros/gentoo.txt b/build/pkgs/requests/distros/gentoo.txt
+new file mode 100644
+index 00000000..d3dc941
+--- /dev/null
++++ b/build/pkgs/requests/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/requests
+diff --git a/build/pkgs/scipy/distros/gentoo.txt b/build/pkgs/scipy/distros/gentoo.txt
+new file mode 100644
+index 00000000..11dabd2
+--- /dev/null
++++ b/build/pkgs/scipy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/scipy
+diff --git a/build/pkgs/setuptools/distros/gentoo.txt b/build/pkgs/setuptools/distros/gentoo.txt
+new file mode 100644
+index 00000000..3a4fa34
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/setuptools
+diff --git a/build/pkgs/six/distros/gentoo.txt b/build/pkgs/six/distros/gentoo.txt
+new file mode 100644
+index 00000000..f73f648
+--- /dev/null
++++ b/build/pkgs/six/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/six
+diff --git a/build/pkgs/sympy/distros/gentoo.txt b/build/pkgs/sympy/distros/gentoo.txt
+new file mode 100644
+index 00000000..b5a5034
+--- /dev/null
++++ b/build/pkgs/sympy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sympy
+diff --git a/build/pkgs/texttable/distros/gentoo.txt b/build/pkgs/texttable/distros/gentoo.txt
+new file mode 100644
+index 00000000..b33a7a7
+--- /dev/null
++++ b/build/pkgs/texttable/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/texttable
+diff --git a/build/pkgs/toml/distros/gentoo.txt b/build/pkgs/toml/distros/gentoo.txt
+new file mode 100644
+index 00000000..64fcea3
+--- /dev/null
++++ b/build/pkgs/toml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/toml
+diff --git a/build/pkgs/webencodings/distros/gentoo.txt b/build/pkgs/webencodings/distros/gentoo.txt
+new file mode 100644
+index 00000000..7539b0f
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/webencodings
+-- 
+cgit v1.0-1-gd88e
+
+
+From 088380f884124c9608160b613ba031c5f023f604 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 18:43:04 -0700
+Subject: build/pkgs: Add distros/fedora.txt for Python packages
+
+---
+ build/pkgs/babel/distros/fedora.txt         | 1 +
+ build/pkgs/bleach/distros/fedora.txt        | 1 +
+ build/pkgs/certifi/distros/fedora.txt       | 1 +
+ build/pkgs/cvxopt/distros/fedora.txt        | 1 +
+ build/pkgs/decorator/distros/fedora.txt     | 1 +
+ build/pkgs/html5lib/distros/fedora.txt      | 1 +
+ build/pkgs/idna/distros/fedora.txt          | 1 +
+ build/pkgs/jinja2/distros/fedora.txt        | 1 +
+ build/pkgs/matplotlib/distros/fedora.txt    | 1 +
+ build/pkgs/mpmath/distros/fedora.txt        | 1 +
+ build/pkgs/networkx/distros/fedora.txt      | 1 +
+ build/pkgs/numpy/distros/fedora.txt         | 1 +
+ build/pkgs/packaging/distros/fedora.txt     | 1 +
+ build/pkgs/pandocfilters/distros/fedora.txt | 1 +
+ build/pkgs/pickleshare/distros/fedora.txt   | 1 +
+ build/pkgs/pillow/distros/fedora.txt        | 1 +
+ build/pkgs/pluggy/distros/fedora.txt        | 1 +
+ build/pkgs/py/distros/fedora.txt            | 1 +
+ build/pkgs/pygments/distros/fedora.txt      | 1 +
+ build/pkgs/pytz/distros/fedora.txt          | 1 +
+ build/pkgs/pyzmq/distros/fedora.txt         | 1 +
+ build/pkgs/requests/distros/fedora.txt      | 1 +
+ build/pkgs/scipy/distros/fedora.txt         | 1 +
+ build/pkgs/setuptools/distros/fedora.txt    | 1 +
+ build/pkgs/six/distros/fedora.txt           | 1 +
+ build/pkgs/sympy/distros/fedora.txt         | 1 +
+ build/pkgs/texttable/distros/fedora.txt     | 1 +
+ build/pkgs/toml/distros/fedora.txt          | 1 +
+ build/pkgs/webencodings/distros/fedora.txt  | 1 +
+ build/pkgs/wheel/distros/fedora.txt         | 1 +
+ 30 files changed, 30 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/fedora.txt
+ create mode 100644 build/pkgs/bleach/distros/fedora.txt
+ create mode 100644 build/pkgs/certifi/distros/fedora.txt
+ create mode 100644 build/pkgs/cvxopt/distros/fedora.txt
+ create mode 100644 build/pkgs/decorator/distros/fedora.txt
+ create mode 100644 build/pkgs/html5lib/distros/fedora.txt
+ create mode 100644 build/pkgs/idna/distros/fedora.txt
+ create mode 100644 build/pkgs/jinja2/distros/fedora.txt
+ create mode 100644 build/pkgs/matplotlib/distros/fedora.txt
+ create mode 100644 build/pkgs/mpmath/distros/fedora.txt
+ create mode 100644 build/pkgs/networkx/distros/fedora.txt
+ create mode 100644 build/pkgs/numpy/distros/fedora.txt
+ create mode 100644 build/pkgs/packaging/distros/fedora.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/fedora.txt
+ create mode 100644 build/pkgs/pickleshare/distros/fedora.txt
+ create mode 100644 build/pkgs/pillow/distros/fedora.txt
+ create mode 100644 build/pkgs/pluggy/distros/fedora.txt
+ create mode 100644 build/pkgs/py/distros/fedora.txt
+ create mode 100644 build/pkgs/pygments/distros/fedora.txt
+ create mode 100644 build/pkgs/pytz/distros/fedora.txt
+ create mode 100644 build/pkgs/pyzmq/distros/fedora.txt
+ create mode 100644 build/pkgs/requests/distros/fedora.txt
+ create mode 100644 build/pkgs/scipy/distros/fedora.txt
+ create mode 100644 build/pkgs/setuptools/distros/fedora.txt
+ create mode 100644 build/pkgs/six/distros/fedora.txt
+ create mode 100644 build/pkgs/sympy/distros/fedora.txt
+ create mode 100644 build/pkgs/texttable/distros/fedora.txt
+ create mode 100644 build/pkgs/toml/distros/fedora.txt
+ create mode 100644 build/pkgs/webencodings/distros/fedora.txt
+ create mode 100644 build/pkgs/wheel/distros/fedora.txt
+
+diff --git a/build/pkgs/babel/distros/fedora.txt b/build/pkgs/babel/distros/fedora.txt
+new file mode 100644
+index 00000000..98f6593
+--- /dev/null
++++ b/build/pkgs/babel/distros/fedora.txt
+@@ -0,0 +1 @@
++babel
+diff --git a/build/pkgs/bleach/distros/fedora.txt b/build/pkgs/bleach/distros/fedora.txt
+new file mode 100644
+index 00000000..c5422cc
+--- /dev/null
++++ b/build/pkgs/bleach/distros/fedora.txt
+@@ -0,0 +1 @@
++python-bleach
+diff --git a/build/pkgs/certifi/distros/fedora.txt b/build/pkgs/certifi/distros/fedora.txt
+new file mode 100644
+index 00000000..be421c8
+--- /dev/null
++++ b/build/pkgs/certifi/distros/fedora.txt
+@@ -0,0 +1 @@
++python-certifi
+diff --git a/build/pkgs/cvxopt/distros/fedora.txt b/build/pkgs/cvxopt/distros/fedora.txt
+new file mode 100644
+index 00000000..f15770f
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/fedora.txt
+@@ -0,0 +1 @@
++python-cvxopt
+diff --git a/build/pkgs/decorator/distros/fedora.txt b/build/pkgs/decorator/distros/fedora.txt
+new file mode 100644
+index 00000000..0795604
+--- /dev/null
++++ b/build/pkgs/decorator/distros/fedora.txt
+@@ -0,0 +1 @@
++python-decorator
+diff --git a/build/pkgs/html5lib/distros/fedora.txt b/build/pkgs/html5lib/distros/fedora.txt
+new file mode 100644
+index 00000000..b821491
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/fedora.txt
+@@ -0,0 +1 @@
++python-html5lib
+diff --git a/build/pkgs/idna/distros/fedora.txt b/build/pkgs/idna/distros/fedora.txt
+new file mode 100644
+index 00000000..a73e70c
+--- /dev/null
++++ b/build/pkgs/idna/distros/fedora.txt
+@@ -0,0 +1 @@
++python-idna
+diff --git a/build/pkgs/jinja2/distros/fedora.txt b/build/pkgs/jinja2/distros/fedora.txt
+new file mode 100644
+index 00000000..f5f3caf
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/fedora.txt
+@@ -0,0 +1 @@
++python-jinja2
+diff --git a/build/pkgs/matplotlib/distros/fedora.txt b/build/pkgs/matplotlib/distros/fedora.txt
+new file mode 100644
+index 00000000..f6d856e
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/fedora.txt
+@@ -0,0 +1 @@
++python-matplotlib
+diff --git a/build/pkgs/mpmath/distros/fedora.txt b/build/pkgs/mpmath/distros/fedora.txt
+new file mode 100644
+index 00000000..a7dc8d5
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/fedora.txt
+@@ -0,0 +1 @@
++python-mpmath
+diff --git a/build/pkgs/networkx/distros/fedora.txt b/build/pkgs/networkx/distros/fedora.txt
+new file mode 100644
+index 00000000..293f943
+--- /dev/null
++++ b/build/pkgs/networkx/distros/fedora.txt
+@@ -0,0 +1 @@
++python-networkx
+diff --git a/build/pkgs/numpy/distros/fedora.txt b/build/pkgs/numpy/distros/fedora.txt
+new file mode 100644
+index 00000000..c8722b9
+--- /dev/null
++++ b/build/pkgs/numpy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-numpy
+diff --git a/build/pkgs/packaging/distros/fedora.txt b/build/pkgs/packaging/distros/fedora.txt
+new file mode 100644
+index 00000000..02ad855
+--- /dev/null
++++ b/build/pkgs/packaging/distros/fedora.txt
+@@ -0,0 +1 @@
++python-packaging
+diff --git a/build/pkgs/pandocfilters/distros/fedora.txt b/build/pkgs/pandocfilters/distros/fedora.txt
+new file mode 100644
+index 00000000..e7a86d0
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/fedora.txt b/build/pkgs/pickleshare/distros/fedora.txt
+new file mode 100644
+index 00000000..6d991a2
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pickleshare
+diff --git a/build/pkgs/pillow/distros/fedora.txt b/build/pkgs/pillow/distros/fedora.txt
+new file mode 100644
+index 00000000..86dbb1d
+--- /dev/null
++++ b/build/pkgs/pillow/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pillow
+diff --git a/build/pkgs/pluggy/distros/fedora.txt b/build/pkgs/pluggy/distros/fedora.txt
+new file mode 100644
+index 00000000..c869e54
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pluggy
+diff --git a/build/pkgs/py/distros/fedora.txt b/build/pkgs/py/distros/fedora.txt
+new file mode 100644
+index 00000000..b348d39
+--- /dev/null
++++ b/build/pkgs/py/distros/fedora.txt
+@@ -0,0 +1 @@
++python-py
+diff --git a/build/pkgs/pygments/distros/fedora.txt b/build/pkgs/pygments/distros/fedora.txt
+new file mode 100644
+index 00000000..f3e72a8
+--- /dev/null
++++ b/build/pkgs/pygments/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pygments
+diff --git a/build/pkgs/pytz/distros/fedora.txt b/build/pkgs/pytz/distros/fedora.txt
+new file mode 100644
+index 00000000..2cccc9e
+--- /dev/null
++++ b/build/pkgs/pytz/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pytz
+diff --git a/build/pkgs/pyzmq/distros/fedora.txt b/build/pkgs/pyzmq/distros/fedora.txt
+new file mode 100644
+index 00000000..23f64d1
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/fedora.txt
+@@ -0,0 +1 @@
++python-pyzmq
+diff --git a/build/pkgs/requests/distros/fedora.txt b/build/pkgs/requests/distros/fedora.txt
+new file mode 100644
+index 00000000..93a7bc1
+--- /dev/null
++++ b/build/pkgs/requests/distros/fedora.txt
+@@ -0,0 +1 @@
++python-requests
+diff --git a/build/pkgs/scipy/distros/fedora.txt b/build/pkgs/scipy/distros/fedora.txt
+new file mode 100644
+index 00000000..7ff2882
+--- /dev/null
++++ b/build/pkgs/scipy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-scipy
+diff --git a/build/pkgs/setuptools/distros/fedora.txt b/build/pkgs/setuptools/distros/fedora.txt
+new file mode 100644
+index 00000000..e1ad178
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/fedora.txt
+@@ -0,0 +1 @@
++python-setuptools
+diff --git a/build/pkgs/six/distros/fedora.txt b/build/pkgs/six/distros/fedora.txt
+new file mode 100644
+index 00000000..787c530
+--- /dev/null
++++ b/build/pkgs/six/distros/fedora.txt
+@@ -0,0 +1 @@
++python-six
+diff --git a/build/pkgs/sympy/distros/fedora.txt b/build/pkgs/sympy/distros/fedora.txt
+new file mode 100644
+index 00000000..126c88a
+--- /dev/null
++++ b/build/pkgs/sympy/distros/fedora.txt
+@@ -0,0 +1 @@
++python-sympy
+diff --git a/build/pkgs/texttable/distros/fedora.txt b/build/pkgs/texttable/distros/fedora.txt
+new file mode 100644
+index 00000000..8d1ccec
+--- /dev/null
++++ b/build/pkgs/texttable/distros/fedora.txt
+@@ -0,0 +1 @@
++python-texttable
+diff --git a/build/pkgs/toml/distros/fedora.txt b/build/pkgs/toml/distros/fedora.txt
+new file mode 100644
+index 00000000..821ee77
+--- /dev/null
++++ b/build/pkgs/toml/distros/fedora.txt
+@@ -0,0 +1 @@
++python-toml
+diff --git a/build/pkgs/webencodings/distros/fedora.txt b/build/pkgs/webencodings/distros/fedora.txt
+new file mode 100644
+index 00000000..12ddba9
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/fedora.txt
+@@ -0,0 +1 @@
++python-webencodings
+diff --git a/build/pkgs/wheel/distros/fedora.txt b/build/pkgs/wheel/distros/fedora.txt
+new file mode 100644
+index 00000000..ae4cbb9
+--- /dev/null
++++ b/build/pkgs/wheel/distros/fedora.txt
+@@ -0,0 +1 @@
++python-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From ad1d5a20380b147c774903066031442f31094626 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 21:04:04 -0700
+Subject: build/pkgs: Add distros/arch.txt for Python packages
+
+---
+ build/pkgs/babel/distros/arch.txt         | 1 +
+ build/pkgs/bleach/distros/arch.txt        | 1 +
+ build/pkgs/certifi/distros/arch.txt       | 1 +
+ build/pkgs/cvxopt/distros/arch.txt        | 1 +
+ build/pkgs/decorator/distros/arch.txt     | 1 +
+ build/pkgs/html5lib/distros/arch.txt      | 1 +
+ build/pkgs/idna/distros/arch.txt          | 1 +
+ build/pkgs/matplotlib/distros/arch.txt    | 1 +
+ build/pkgs/mpmath/distros/arch.txt        | 1 +
+ build/pkgs/networkx/distros/arch.txt      | 1 +
+ build/pkgs/numpy/distros/arch.txt         | 1 +
+ build/pkgs/packaging/distros/arch.txt     | 1 +
+ build/pkgs/pandocfilters/distros/arch.txt | 1 +
+ build/pkgs/pickleshare/distros/arch.txt   | 1 +
+ build/pkgs/pillow/distros/arch.txt        | 1 +
+ build/pkgs/pluggy/distros/arch.txt        | 1 +
+ build/pkgs/py/distros/arch.txt            | 1 +
+ build/pkgs/pygments/distros/arch.txt      | 1 +
+ build/pkgs/pytz/distros/arch.txt          | 1 +
+ build/pkgs/pyzmq/distros/arch.txt         | 1 +
+ build/pkgs/requests/distros/arch.txt      | 1 +
+ build/pkgs/scipy/distros/arch.txt         | 1 +
+ build/pkgs/setuptools/distros/arch.txt    | 1 +
+ build/pkgs/six/distros/arch.txt           | 1 +
+ build/pkgs/sympy/distros/arch.txt         | 1 +
+ build/pkgs/texttable/distros/arch.txt     | 1 +
+ build/pkgs/toml/distros/arch.txt          | 1 +
+ build/pkgs/webencodings/distros/arch.txt  | 1 +
+ build/pkgs/wheel/distros/arch.txt         | 1 +
+ 29 files changed, 29 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/arch.txt
+ create mode 100644 build/pkgs/bleach/distros/arch.txt
+ create mode 100644 build/pkgs/certifi/distros/arch.txt
+ create mode 100644 build/pkgs/cvxopt/distros/arch.txt
+ create mode 100644 build/pkgs/decorator/distros/arch.txt
+ create mode 100644 build/pkgs/html5lib/distros/arch.txt
+ create mode 100644 build/pkgs/idna/distros/arch.txt
+ create mode 100644 build/pkgs/matplotlib/distros/arch.txt
+ create mode 100644 build/pkgs/mpmath/distros/arch.txt
+ create mode 100644 build/pkgs/networkx/distros/arch.txt
+ create mode 100644 build/pkgs/numpy/distros/arch.txt
+ create mode 100644 build/pkgs/packaging/distros/arch.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/arch.txt
+ create mode 100644 build/pkgs/pickleshare/distros/arch.txt
+ create mode 100644 build/pkgs/pillow/distros/arch.txt
+ create mode 100644 build/pkgs/pluggy/distros/arch.txt
+ create mode 100644 build/pkgs/py/distros/arch.txt
+ create mode 100644 build/pkgs/pygments/distros/arch.txt
+ create mode 100644 build/pkgs/pytz/distros/arch.txt
+ create mode 100644 build/pkgs/pyzmq/distros/arch.txt
+ create mode 100644 build/pkgs/requests/distros/arch.txt
+ create mode 100644 build/pkgs/scipy/distros/arch.txt
+ create mode 100644 build/pkgs/setuptools/distros/arch.txt
+ create mode 100644 build/pkgs/six/distros/arch.txt
+ create mode 100644 build/pkgs/sympy/distros/arch.txt
+ create mode 100644 build/pkgs/texttable/distros/arch.txt
+ create mode 100644 build/pkgs/toml/distros/arch.txt
+ create mode 100644 build/pkgs/webencodings/distros/arch.txt
+ create mode 100644 build/pkgs/wheel/distros/arch.txt
+
+diff --git a/build/pkgs/babel/distros/arch.txt b/build/pkgs/babel/distros/arch.txt
+new file mode 100644
+index 00000000..f2d828c
+--- /dev/null
++++ b/build/pkgs/babel/distros/arch.txt
+@@ -0,0 +1 @@
++python-babel
+diff --git a/build/pkgs/bleach/distros/arch.txt b/build/pkgs/bleach/distros/arch.txt
+new file mode 100644
+index 00000000..c5422cc
+--- /dev/null
++++ b/build/pkgs/bleach/distros/arch.txt
+@@ -0,0 +1 @@
++python-bleach
+diff --git a/build/pkgs/certifi/distros/arch.txt b/build/pkgs/certifi/distros/arch.txt
+new file mode 100644
+index 00000000..be421c8
+--- /dev/null
++++ b/build/pkgs/certifi/distros/arch.txt
+@@ -0,0 +1 @@
++python-certifi
+diff --git a/build/pkgs/cvxopt/distros/arch.txt b/build/pkgs/cvxopt/distros/arch.txt
+new file mode 100644
+index 00000000..f15770f
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/arch.txt
+@@ -0,0 +1 @@
++python-cvxopt
+diff --git a/build/pkgs/decorator/distros/arch.txt b/build/pkgs/decorator/distros/arch.txt
+new file mode 100644
+index 00000000..0795604
+--- /dev/null
++++ b/build/pkgs/decorator/distros/arch.txt
+@@ -0,0 +1 @@
++python-decorator
+diff --git a/build/pkgs/html5lib/distros/arch.txt b/build/pkgs/html5lib/distros/arch.txt
+new file mode 100644
+index 00000000..b821491
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/arch.txt
+@@ -0,0 +1 @@
++python-html5lib
+diff --git a/build/pkgs/idna/distros/arch.txt b/build/pkgs/idna/distros/arch.txt
+new file mode 100644
+index 00000000..a73e70c
+--- /dev/null
++++ b/build/pkgs/idna/distros/arch.txt
+@@ -0,0 +1 @@
++python-idna
+diff --git a/build/pkgs/matplotlib/distros/arch.txt b/build/pkgs/matplotlib/distros/arch.txt
+new file mode 100644
+index 00000000..f6d856e
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/arch.txt
+@@ -0,0 +1 @@
++python-matplotlib
+diff --git a/build/pkgs/mpmath/distros/arch.txt b/build/pkgs/mpmath/distros/arch.txt
+new file mode 100644
+index 00000000..a7dc8d5
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/arch.txt
+@@ -0,0 +1 @@
++python-mpmath
+diff --git a/build/pkgs/networkx/distros/arch.txt b/build/pkgs/networkx/distros/arch.txt
+new file mode 100644
+index 00000000..293f943
+--- /dev/null
++++ b/build/pkgs/networkx/distros/arch.txt
+@@ -0,0 +1 @@
++python-networkx
+diff --git a/build/pkgs/numpy/distros/arch.txt b/build/pkgs/numpy/distros/arch.txt
+new file mode 100644
+index 00000000..c8722b9
+--- /dev/null
++++ b/build/pkgs/numpy/distros/arch.txt
+@@ -0,0 +1 @@
++python-numpy
+diff --git a/build/pkgs/packaging/distros/arch.txt b/build/pkgs/packaging/distros/arch.txt
+new file mode 100644
+index 00000000..02ad855
+--- /dev/null
++++ b/build/pkgs/packaging/distros/arch.txt
+@@ -0,0 +1 @@
++python-packaging
+diff --git a/build/pkgs/pandocfilters/distros/arch.txt b/build/pkgs/pandocfilters/distros/arch.txt
+new file mode 100644
+index 00000000..e7a86d0
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/arch.txt
+@@ -0,0 +1 @@
++python-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/arch.txt b/build/pkgs/pickleshare/distros/arch.txt
+new file mode 100644
+index 00000000..6d991a2
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/arch.txt
+@@ -0,0 +1 @@
++python-pickleshare
+diff --git a/build/pkgs/pillow/distros/arch.txt b/build/pkgs/pillow/distros/arch.txt
+new file mode 100644
+index 00000000..86dbb1d
+--- /dev/null
++++ b/build/pkgs/pillow/distros/arch.txt
+@@ -0,0 +1 @@
++python-pillow
+diff --git a/build/pkgs/pluggy/distros/arch.txt b/build/pkgs/pluggy/distros/arch.txt
+new file mode 100644
+index 00000000..c869e54
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/arch.txt
+@@ -0,0 +1 @@
++python-pluggy
+diff --git a/build/pkgs/py/distros/arch.txt b/build/pkgs/py/distros/arch.txt
+new file mode 100644
+index 00000000..b348d39
+--- /dev/null
++++ b/build/pkgs/py/distros/arch.txt
+@@ -0,0 +1 @@
++python-py
+diff --git a/build/pkgs/pygments/distros/arch.txt b/build/pkgs/pygments/distros/arch.txt
+new file mode 100644
+index 00000000..f3e72a8
+--- /dev/null
++++ b/build/pkgs/pygments/distros/arch.txt
+@@ -0,0 +1 @@
++python-pygments
+diff --git a/build/pkgs/pytz/distros/arch.txt b/build/pkgs/pytz/distros/arch.txt
+new file mode 100644
+index 00000000..2cccc9e
+--- /dev/null
++++ b/build/pkgs/pytz/distros/arch.txt
+@@ -0,0 +1 @@
++python-pytz
+diff --git a/build/pkgs/pyzmq/distros/arch.txt b/build/pkgs/pyzmq/distros/arch.txt
+new file mode 100644
+index 00000000..23f64d1
+--- /dev/null
++++ b/build/pkgs/pyzmq/distros/arch.txt
+@@ -0,0 +1 @@
++python-pyzmq
+diff --git a/build/pkgs/requests/distros/arch.txt b/build/pkgs/requests/distros/arch.txt
+new file mode 100644
+index 00000000..93a7bc1
+--- /dev/null
++++ b/build/pkgs/requests/distros/arch.txt
+@@ -0,0 +1 @@
++python-requests
+diff --git a/build/pkgs/scipy/distros/arch.txt b/build/pkgs/scipy/distros/arch.txt
+new file mode 100644
+index 00000000..7ff2882
+--- /dev/null
++++ b/build/pkgs/scipy/distros/arch.txt
+@@ -0,0 +1 @@
++python-scipy
+diff --git a/build/pkgs/setuptools/distros/arch.txt b/build/pkgs/setuptools/distros/arch.txt
+new file mode 100644
+index 00000000..e1ad178
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/arch.txt
+@@ -0,0 +1 @@
++python-setuptools
+diff --git a/build/pkgs/six/distros/arch.txt b/build/pkgs/six/distros/arch.txt
+new file mode 100644
+index 00000000..787c530
+--- /dev/null
++++ b/build/pkgs/six/distros/arch.txt
+@@ -0,0 +1 @@
++python-six
+diff --git a/build/pkgs/sympy/distros/arch.txt b/build/pkgs/sympy/distros/arch.txt
+new file mode 100644
+index 00000000..126c88a
+--- /dev/null
++++ b/build/pkgs/sympy/distros/arch.txt
+@@ -0,0 +1 @@
++python-sympy
+diff --git a/build/pkgs/texttable/distros/arch.txt b/build/pkgs/texttable/distros/arch.txt
+new file mode 100644
+index 00000000..8d1ccec
+--- /dev/null
++++ b/build/pkgs/texttable/distros/arch.txt
+@@ -0,0 +1 @@
++python-texttable
+diff --git a/build/pkgs/toml/distros/arch.txt b/build/pkgs/toml/distros/arch.txt
+new file mode 100644
+index 00000000..821ee77
+--- /dev/null
++++ b/build/pkgs/toml/distros/arch.txt
+@@ -0,0 +1 @@
++python-toml
+diff --git a/build/pkgs/webencodings/distros/arch.txt b/build/pkgs/webencodings/distros/arch.txt
+new file mode 100644
+index 00000000..12ddba9
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/arch.txt
+@@ -0,0 +1 @@
++python-webencodings
+diff --git a/build/pkgs/wheel/distros/arch.txt b/build/pkgs/wheel/distros/arch.txt
+new file mode 100644
+index 00000000..ae4cbb9
+--- /dev/null
++++ b/build/pkgs/wheel/distros/arch.txt
+@@ -0,0 +1 @@
++python-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5087abee08f2a89ddaf422ec72a84575fe724a79 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 21:20:56 -0700
+Subject: build/pkgs: Add distros/opensuse.txt for Python packages
+
+---
+ build/pkgs/bleach/distros/opensuse.txt        | 1 +
+ build/pkgs/cvxopt/distros/opensuse.txt        | 1 +
+ build/pkgs/html5lib/distros/opensuse.txt      | 1 +
+ build/pkgs/idna/distros/opensuse.txt          | 1 +
+ build/pkgs/jinja2/distros/opensuse.txt        | 2 +-
+ build/pkgs/mpmath/distros/opensuse.txt        | 1 +
+ build/pkgs/numpy/distros/opensuse.txt         | 1 +
+ build/pkgs/packaging/distros/opensuse.txt     | 1 +
+ build/pkgs/pandocfilters/distros/opensuse.txt | 1 +
+ build/pkgs/pluggy/distros/opensuse.txt        | 1 +
+ build/pkgs/py/distros/opensuse.txt            | 1 +
+ build/pkgs/pygments/distros/opensuse.txt      | 2 +-
+ build/pkgs/sympy/distros/opensuse.txt         | 1 +
+ build/pkgs/texttable/distros/opensuse.txt     | 1 +
+ build/pkgs/toml/distros/opensuse.txt          | 1 +
+ 15 files changed, 15 insertions(+), 2 deletions(-)
+ create mode 100644 build/pkgs/bleach/distros/opensuse.txt
+ create mode 100644 build/pkgs/cvxopt/distros/opensuse.txt
+ create mode 100644 build/pkgs/html5lib/distros/opensuse.txt
+ create mode 100644 build/pkgs/idna/distros/opensuse.txt
+ create mode 100644 build/pkgs/mpmath/distros/opensuse.txt
+ create mode 100644 build/pkgs/numpy/distros/opensuse.txt
+ create mode 100644 build/pkgs/packaging/distros/opensuse.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/opensuse.txt
+ create mode 100644 build/pkgs/pluggy/distros/opensuse.txt
+ create mode 100644 build/pkgs/py/distros/opensuse.txt
+ create mode 100644 build/pkgs/sympy/distros/opensuse.txt
+ create mode 100644 build/pkgs/texttable/distros/opensuse.txt
+ create mode 100644 build/pkgs/toml/distros/opensuse.txt
+
+diff --git a/build/pkgs/bleach/distros/opensuse.txt b/build/pkgs/bleach/distros/opensuse.txt
+new file mode 100644
+index 00000000..6d37c4c
+--- /dev/null
++++ b/build/pkgs/bleach/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-bleach
+diff --git a/build/pkgs/cvxopt/distros/opensuse.txt b/build/pkgs/cvxopt/distros/opensuse.txt
+new file mode 100644
+index 00000000..2bb6ad1
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-cvxopt
+diff --git a/build/pkgs/html5lib/distros/opensuse.txt b/build/pkgs/html5lib/distros/opensuse.txt
+new file mode 100644
+index 00000000..6d7b8df
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-html5lib
+diff --git a/build/pkgs/idna/distros/opensuse.txt b/build/pkgs/idna/distros/opensuse.txt
+new file mode 100644
+index 00000000..de48e70
+--- /dev/null
++++ b/build/pkgs/idna/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-idna
+diff --git a/build/pkgs/jinja2/distros/opensuse.txt b/build/pkgs/jinja2/distros/opensuse.txt
+index 5d90a22..f2db865 100644
+--- a/build/pkgs/jinja2/distros/opensuse.txt
++++ b/build/pkgs/jinja2/distros/opensuse.txt
+@@ -1 +1 @@
+-python3-Jinja2
++python3-jinja2
+diff --git a/build/pkgs/mpmath/distros/opensuse.txt b/build/pkgs/mpmath/distros/opensuse.txt
+new file mode 100644
+index 00000000..fbc82a9
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-mpmath
+diff --git a/build/pkgs/numpy/distros/opensuse.txt b/build/pkgs/numpy/distros/opensuse.txt
+new file mode 100644
+index 00000000..79d5c5a
+--- /dev/null
++++ b/build/pkgs/numpy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-numpy
+diff --git a/build/pkgs/packaging/distros/opensuse.txt b/build/pkgs/packaging/distros/opensuse.txt
+new file mode 100644
+index 00000000..8f1c0ff
+--- /dev/null
++++ b/build/pkgs/packaging/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-packaging
+diff --git a/build/pkgs/pandocfilters/distros/opensuse.txt b/build/pkgs/pandocfilters/distros/opensuse.txt
+new file mode 100644
+index 00000000..d0d4c24
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-pandocfilters
+diff --git a/build/pkgs/pluggy/distros/opensuse.txt b/build/pkgs/pluggy/distros/opensuse.txt
+new file mode 100644
+index 00000000..43a3acf
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-pluggy
+diff --git a/build/pkgs/py/distros/opensuse.txt b/build/pkgs/py/distros/opensuse.txt
+new file mode 100644
+index 00000000..81fefe6
+--- /dev/null
++++ b/build/pkgs/py/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-py
+diff --git a/build/pkgs/pygments/distros/opensuse.txt b/build/pkgs/pygments/distros/opensuse.txt
+index 9ff5740..3ab3792 100644
+--- a/build/pkgs/pygments/distros/opensuse.txt
++++ b/build/pkgs/pygments/distros/opensuse.txt
+@@ -1 +1 @@
+-python3-Pygments
++python3-pygments
+diff --git a/build/pkgs/sympy/distros/opensuse.txt b/build/pkgs/sympy/distros/opensuse.txt
+new file mode 100644
+index 00000000..db423c8
+--- /dev/null
++++ b/build/pkgs/sympy/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-sympy
+diff --git a/build/pkgs/texttable/distros/opensuse.txt b/build/pkgs/texttable/distros/opensuse.txt
+new file mode 100644
+index 00000000..8f8e7e2
+--- /dev/null
++++ b/build/pkgs/texttable/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-texttable
+diff --git a/build/pkgs/toml/distros/opensuse.txt b/build/pkgs/toml/distros/opensuse.txt
+new file mode 100644
+index 00000000..543e89d
+--- /dev/null
++++ b/build/pkgs/toml/distros/opensuse.txt
+@@ -0,0 +1 @@
++python3-toml
+-- 
+cgit v1.0-1-gd88e
+
+
+From a480ba7ace1370d106ae831e904ea22b72af1be7 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sun, 17 Oct 2021 22:45:04 -0700
+Subject: build/pkgs: Add distros/debian.txt for Python packages
+
+---
+ build/pkgs/babel/distros/debian.txt         | 1 +
+ build/pkgs/bleach/distros/debian.txt        | 1 +
+ build/pkgs/certifi/distros/debian.txt       | 1 +
+ build/pkgs/cvxopt/distros/debian.txt        | 1 +
+ build/pkgs/decorator/distros/debian.txt     | 1 +
+ build/pkgs/html5lib/distros/debian.txt      | 1 +
+ build/pkgs/idna/distros/debian.txt          | 1 +
+ build/pkgs/jinja2/distros/debian.txt        | 1 +
+ build/pkgs/matplotlib/distros/debian.txt    | 1 +
+ build/pkgs/mpmath/distros/debian.txt        | 1 +
+ build/pkgs/networkx/distros/debian.txt      | 1 +
+ build/pkgs/numpy/distros/debian.txt         | 1 +
+ build/pkgs/packaging/distros/debian.txt     | 1 +
+ build/pkgs/pandocfilters/distros/debian.txt | 1 +
+ build/pkgs/pickleshare/distros/debian.txt   | 1 +
+ build/pkgs/pillow/distros/debian.txt        | 1 +
+ build/pkgs/pluggy/distros/debian.txt        | 1 +
+ build/pkgs/py/distros/debian.txt            | 1 +
+ build/pkgs/pygments/distros/debian.txt      | 1 +
+ build/pkgs/pytz/distros/debian.txt          | 1 +
+ build/pkgs/requests/distros/debian.txt      | 1 +
+ build/pkgs/scipy/distros/debian.txt         | 1 +
+ build/pkgs/setuptools/distros/debian.txt    | 1 +
+ build/pkgs/six/distros/debian.txt           | 1 +
+ build/pkgs/sympy/distros/debian.txt         | 1 +
+ build/pkgs/texttable/distros/debian.txt     | 1 +
+ build/pkgs/toml/distros/debian.txt          | 1 +
+ build/pkgs/webencodings/distros/debian.txt  | 1 +
+ build/pkgs/wheel/distros/debian.txt         | 1 +
+ 29 files changed, 29 insertions(+)
+ create mode 100644 build/pkgs/babel/distros/debian.txt
+ create mode 100644 build/pkgs/bleach/distros/debian.txt
+ create mode 100644 build/pkgs/certifi/distros/debian.txt
+ create mode 100644 build/pkgs/cvxopt/distros/debian.txt
+ create mode 100644 build/pkgs/decorator/distros/debian.txt
+ create mode 100644 build/pkgs/html5lib/distros/debian.txt
+ create mode 100644 build/pkgs/idna/distros/debian.txt
+ create mode 100644 build/pkgs/jinja2/distros/debian.txt
+ create mode 100644 build/pkgs/matplotlib/distros/debian.txt
+ create mode 100644 build/pkgs/mpmath/distros/debian.txt
+ create mode 100644 build/pkgs/networkx/distros/debian.txt
+ create mode 100644 build/pkgs/numpy/distros/debian.txt
+ create mode 100644 build/pkgs/packaging/distros/debian.txt
+ create mode 100644 build/pkgs/pandocfilters/distros/debian.txt
+ create mode 100644 build/pkgs/pickleshare/distros/debian.txt
+ create mode 100644 build/pkgs/pillow/distros/debian.txt
+ create mode 100644 build/pkgs/pluggy/distros/debian.txt
+ create mode 100644 build/pkgs/py/distros/debian.txt
+ create mode 100644 build/pkgs/pygments/distros/debian.txt
+ create mode 100644 build/pkgs/pytz/distros/debian.txt
+ create mode 100644 build/pkgs/requests/distros/debian.txt
+ create mode 100644 build/pkgs/scipy/distros/debian.txt
+ create mode 100644 build/pkgs/setuptools/distros/debian.txt
+ create mode 100644 build/pkgs/six/distros/debian.txt
+ create mode 100644 build/pkgs/sympy/distros/debian.txt
+ create mode 100644 build/pkgs/texttable/distros/debian.txt
+ create mode 100644 build/pkgs/toml/distros/debian.txt
+ create mode 100644 build/pkgs/webencodings/distros/debian.txt
+ create mode 100644 build/pkgs/wheel/distros/debian.txt
+
+diff --git a/build/pkgs/babel/distros/debian.txt b/build/pkgs/babel/distros/debian.txt
+new file mode 100644
+index 00000000..e623eb6
+--- /dev/null
++++ b/build/pkgs/babel/distros/debian.txt
+@@ -0,0 +1 @@
++python3-babel
+diff --git a/build/pkgs/bleach/distros/debian.txt b/build/pkgs/bleach/distros/debian.txt
+new file mode 100644
+index 00000000..6d37c4c
+--- /dev/null
++++ b/build/pkgs/bleach/distros/debian.txt
+@@ -0,0 +1 @@
++python3-bleach
+diff --git a/build/pkgs/certifi/distros/debian.txt b/build/pkgs/certifi/distros/debian.txt
+new file mode 100644
+index 00000000..f585a82
+--- /dev/null
++++ b/build/pkgs/certifi/distros/debian.txt
+@@ -0,0 +1 @@
++python3-certifi
+diff --git a/build/pkgs/cvxopt/distros/debian.txt b/build/pkgs/cvxopt/distros/debian.txt
+new file mode 100644
+index 00000000..2bb6ad1
+--- /dev/null
++++ b/build/pkgs/cvxopt/distros/debian.txt
+@@ -0,0 +1 @@
++python3-cvxopt
+diff --git a/build/pkgs/decorator/distros/debian.txt b/build/pkgs/decorator/distros/debian.txt
+new file mode 100644
+index 00000000..46c478e
+--- /dev/null
++++ b/build/pkgs/decorator/distros/debian.txt
+@@ -0,0 +1 @@
++python3-decorator
+diff --git a/build/pkgs/html5lib/distros/debian.txt b/build/pkgs/html5lib/distros/debian.txt
+new file mode 100644
+index 00000000..6d7b8df
+--- /dev/null
++++ b/build/pkgs/html5lib/distros/debian.txt
+@@ -0,0 +1 @@
++python3-html5lib
+diff --git a/build/pkgs/idna/distros/debian.txt b/build/pkgs/idna/distros/debian.txt
+new file mode 100644
+index 00000000..de48e70
+--- /dev/null
++++ b/build/pkgs/idna/distros/debian.txt
+@@ -0,0 +1 @@
++python3-idna
+diff --git a/build/pkgs/jinja2/distros/debian.txt b/build/pkgs/jinja2/distros/debian.txt
+new file mode 100644
+index 00000000..f2db865
+--- /dev/null
++++ b/build/pkgs/jinja2/distros/debian.txt
+@@ -0,0 +1 @@
++python3-jinja2
+diff --git a/build/pkgs/matplotlib/distros/debian.txt b/build/pkgs/matplotlib/distros/debian.txt
+new file mode 100644
+index 00000000..1374329
+--- /dev/null
++++ b/build/pkgs/matplotlib/distros/debian.txt
+@@ -0,0 +1 @@
++python3-matplotlib
+diff --git a/build/pkgs/mpmath/distros/debian.txt b/build/pkgs/mpmath/distros/debian.txt
+new file mode 100644
+index 00000000..fbc82a9
+--- /dev/null
++++ b/build/pkgs/mpmath/distros/debian.txt
+@@ -0,0 +1 @@
++python3-mpmath
+diff --git a/build/pkgs/networkx/distros/debian.txt b/build/pkgs/networkx/distros/debian.txt
+new file mode 100644
+index 00000000..6779066
+--- /dev/null
++++ b/build/pkgs/networkx/distros/debian.txt
+@@ -0,0 +1 @@
++python3-networkx
+diff --git a/build/pkgs/numpy/distros/debian.txt b/build/pkgs/numpy/distros/debian.txt
+new file mode 100644
+index 00000000..79d5c5a
+--- /dev/null
++++ b/build/pkgs/numpy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-numpy
+diff --git a/build/pkgs/packaging/distros/debian.txt b/build/pkgs/packaging/distros/debian.txt
+new file mode 100644
+index 00000000..8f1c0ff
+--- /dev/null
++++ b/build/pkgs/packaging/distros/debian.txt
+@@ -0,0 +1 @@
++python3-packaging
+diff --git a/build/pkgs/pandocfilters/distros/debian.txt b/build/pkgs/pandocfilters/distros/debian.txt
+new file mode 100644
+index 00000000..d0d4c24
+--- /dev/null
++++ b/build/pkgs/pandocfilters/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pandocfilters
+diff --git a/build/pkgs/pickleshare/distros/debian.txt b/build/pkgs/pickleshare/distros/debian.txt
+new file mode 100644
+index 00000000..a00907d
+--- /dev/null
++++ b/build/pkgs/pickleshare/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pickleshare
+diff --git a/build/pkgs/pillow/distros/debian.txt b/build/pkgs/pillow/distros/debian.txt
+new file mode 100644
+index 00000000..3319fcd
+--- /dev/null
++++ b/build/pkgs/pillow/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pillow
+diff --git a/build/pkgs/pluggy/distros/debian.txt b/build/pkgs/pluggy/distros/debian.txt
+new file mode 100644
+index 00000000..43a3acf
+--- /dev/null
++++ b/build/pkgs/pluggy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pluggy
+diff --git a/build/pkgs/py/distros/debian.txt b/build/pkgs/py/distros/debian.txt
+new file mode 100644
+index 00000000..81fefe6
+--- /dev/null
++++ b/build/pkgs/py/distros/debian.txt
+@@ -0,0 +1 @@
++python3-py
+diff --git a/build/pkgs/pygments/distros/debian.txt b/build/pkgs/pygments/distros/debian.txt
+new file mode 100644
+index 00000000..3ab3792
+--- /dev/null
++++ b/build/pkgs/pygments/distros/debian.txt
+@@ -0,0 +1 @@
++python3-pygments
+diff --git a/build/pkgs/pytz/distros/debian.txt b/build/pkgs/pytz/distros/debian.txt
+new file mode 100644
+index 00000000..db20908
+--- /dev/null
++++ b/build/pkgs/pytz/distros/debian.txt
+@@ -0,0 +1 @@
++python3-tz
+diff --git a/build/pkgs/requests/distros/debian.txt b/build/pkgs/requests/distros/debian.txt
+new file mode 100644
+index 00000000..43147b2
+--- /dev/null
++++ b/build/pkgs/requests/distros/debian.txt
+@@ -0,0 +1 @@
++python3-requests
+diff --git a/build/pkgs/scipy/distros/debian.txt b/build/pkgs/scipy/distros/debian.txt
+new file mode 100644
+index 00000000..12b3666
+--- /dev/null
++++ b/build/pkgs/scipy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-scipy
+diff --git a/build/pkgs/setuptools/distros/debian.txt b/build/pkgs/setuptools/distros/debian.txt
+new file mode 100644
+index 00000000..1c0901c
+--- /dev/null
++++ b/build/pkgs/setuptools/distros/debian.txt
+@@ -0,0 +1 @@
++python3-setuptools
+diff --git a/build/pkgs/six/distros/debian.txt b/build/pkgs/six/distros/debian.txt
+new file mode 100644
+index 00000000..68ff859
+--- /dev/null
++++ b/build/pkgs/six/distros/debian.txt
+@@ -0,0 +1 @@
++python3-six
+diff --git a/build/pkgs/sympy/distros/debian.txt b/build/pkgs/sympy/distros/debian.txt
+new file mode 100644
+index 00000000..db423c8
+--- /dev/null
++++ b/build/pkgs/sympy/distros/debian.txt
+@@ -0,0 +1 @@
++python3-sympy
+diff --git a/build/pkgs/texttable/distros/debian.txt b/build/pkgs/texttable/distros/debian.txt
+new file mode 100644
+index 00000000..8f8e7e2
+--- /dev/null
++++ b/build/pkgs/texttable/distros/debian.txt
+@@ -0,0 +1 @@
++python3-texttable
+diff --git a/build/pkgs/toml/distros/debian.txt b/build/pkgs/toml/distros/debian.txt
+new file mode 100644
+index 00000000..543e89d
+--- /dev/null
++++ b/build/pkgs/toml/distros/debian.txt
+@@ -0,0 +1 @@
++python3-toml
+diff --git a/build/pkgs/webencodings/distros/debian.txt b/build/pkgs/webencodings/distros/debian.txt
+new file mode 100644
+index 00000000..ac30c2f
+--- /dev/null
++++ b/build/pkgs/webencodings/distros/debian.txt
+@@ -0,0 +1 @@
++python3-webencodings
+diff --git a/build/pkgs/wheel/distros/debian.txt b/build/pkgs/wheel/distros/debian.txt
+new file mode 100644
+index 00000000..3c066725
+--- /dev/null
++++ b/build/pkgs/wheel/distros/debian.txt
+@@ -0,0 +1 @@
++python3-wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 93bf30d7de292551c3050e2dd74651d69ba4bd46 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 18 Oct 2021 07:50:34 -0400
+Subject: Trac #29665: add more documentation for SAGE_PYTHON_PACKAGE_CHECK().
+
+An earlier commit allows SAGE_PYTHON_PACKAGE_CHECK(package) to tweak the
+value of sage_use_system_$package if --enable-system-site-packages was
+not used. This essentially changes the default --with-system-$package=yes
+to "no" in that case. Here we update the documentation to reflect it.
+---
+ m4/sage_python_package_check.m4 | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 7ee82a7..95eefd0 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -34,6 +34,10 @@
+ #   ensure that the ./configure- and run-time views of the system
+ #   are as similar as possible.
+ #
++#   To avoid suggesting these system packages to users who have not
++#   set --enable-system-site-packages, this macro also changes the
++#   default for --with-system-foo from "yes" to "no" in that case.
++#
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
+-- 
+cgit v1.0-1-gd88e
+
+
+From d771e49d57ecdf3622434bc09cbfb87ad3bb7744 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 18 Oct 2021 07:42:46 -0400
+Subject: Trac #29665: improve SAGE_PYTHON_PACKAGE_CHECK() failure message.
+
+When --enable-system-site-packages is off, SAGE_PYTHON_PACKAGE_CHECK()
+will always install the corresponding SPKG. We improve the ./configure
+output in that case to make it clear that the decision was based on
+the value of --enable-system-site-packages and not the "real" check.
+---
+ m4/sage_python_package_check.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 95eefd0..5f0f084 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -40,7 +40,9 @@
+ #
+ 
+ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
++  AC_MSG_CHECKING([if --enable-system-site-packages was used])
+   AS_IF([test "${enable_system_site_packages}" = "yes"], [
++    AC_MSG_RESULT(yes)
+     AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
+ 
+     dnl We run this check inside a python venv, because that's ultimately
+@@ -94,6 +96,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AS_IF([test -d config.venv], [rm -rf config.venv])
+   ], [
+     dnl System site packages are disabled.
++    AC_MSG_RESULT(no; skipping check)
+     sage_spkg_install_$1=yes
+ 
+     dnl We have to retroactively hack the --with-system-foo={no,yes,force}
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5bb43c1b78a1deb3364f235305937c2f823e5e18 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 24 Oct 2021 20:29:25 -0400
+Subject: Trac #29665: use sage-venv in SAGE_PYTHON_PACKAGE_CHECK().
+
+For consistency with the rest of the build system, we now use the
+build/bin/sage-venv script to create the venv in this autoconf macro
+rather than invoking $PYTHON_FOR_VENV with "-m venv" directly.
+---
+ m4/sage_python_package_check.m4 | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
+index 5f0f084..5547b35 100644
+--- a/m4/sage_python_package_check.m4
++++ b/m4/sage_python_package_check.m4
+@@ -50,11 +50,11 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
+     AC_MSG_CHECKING([if we can create a python venv in config.venv])
+ 
+     dnl Use --clear because ./configure typically clobbers its output files.
+-    AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
+-                                        --clear                dnl
+-                                        --without-pip          dnl
+-                                        config.venv            dnl
+-                                        2>&AS_MESSAGE_LOG_FD], [
++    AS_IF(["${PYTHON_FOR_VENV}" build/bin/sage-venv      dnl
++                                  --system-site-packages dnl
++                                  --clear                dnl
++                                  config.venv            dnl
++                                  2>&AS_MESSAGE_LOG_FD], [
+       AC_MSG_RESULT(yes)
+       dnl strip all comments from install-requires.txt; this should leave
+       dnl only a single line containing the version specification for this
+-- 
+cgit v1.0-1-gd88e
+
+
+From c78363d6326addff16ca5abac897949a6be72bf4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:10:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for urllib3.
+
+---
+ build/pkgs/urllib3/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/urllib3/spkg-configure.m4
+
+diff --git a/build/pkgs/urllib3/spkg-configure.m4 b/build/pkgs/urllib3/spkg-configure.m4
+new file mode 100644
+index 00000000..d7ef3e1
+--- /dev/null
++++ b/build/pkgs/urllib3/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([urllib3], [SAGE_PYTHON_PACKAGE_CHECK([urllib3])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f416d5abcae495ea8301fad024b279ea9e997b29 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:15:18 -0400
+Subject: Trac #29665: add Gentoo package information for urllib3.
+
+---
+ build/pkgs/urllib3/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/urllib3/distros/gentoo.txt
+
+diff --git a/build/pkgs/urllib3/distros/gentoo.txt b/build/pkgs/urllib3/distros/gentoo.txt
+new file mode 100644
+index 00000000..172a535
+--- /dev/null
++++ b/build/pkgs/urllib3/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/urllib3
+-- 
+cgit v1.0-1-gd88e
+
+
+From 852068b992bf7959500c650f54cb92e5b68d7ef8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:15:58 -0400
+Subject: Trac #29665: add Gentoo package information for nbformat.
+
+---
+ build/pkgs/nbformat/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbformat/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbformat/distros/gentoo.txt b/build/pkgs/nbformat/distros/gentoo.txt
+new file mode 100644
+index 00000000..006b1f2
+--- /dev/null
++++ b/build/pkgs/nbformat/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbformat
+-- 
+cgit v1.0-1-gd88e
+
+
+From 66179fd28fcc92ee840dcd87bb4db25cea968d66 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:34:16 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for nbformat.
+
+---
+ build/pkgs/nbformat/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbformat/spkg-configure.m4
+
+diff --git a/build/pkgs/nbformat/spkg-configure.m4 b/build/pkgs/nbformat/spkg-configure.m4
+new file mode 100644
+index 00000000..5a7f8c4
+--- /dev/null
++++ b/build/pkgs/nbformat/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbformat], [SAGE_PYTHON_PACKAGE_CHECK([nbformat])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 874005e81ed20f27a5f895030dcdbdfc5f73ad80 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:47:01 -0400
+Subject: Trac #29665: add Gentoo package information for zipp.
+
+---
+ build/pkgs/zipp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/zipp/distros/gentoo.txt
+
+diff --git a/build/pkgs/zipp/distros/gentoo.txt b/build/pkgs/zipp/distros/gentoo.txt
+new file mode 100644
+index 00000000..7f59450
+--- /dev/null
++++ b/build/pkgs/zipp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/zipp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0cc2a7355b5554c1fb79c742ebf02eff54465b3e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:47:35 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for zipp.
+
+---
+ build/pkgs/zipp/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/zipp/spkg-configure.m4
+
+diff --git a/build/pkgs/zipp/spkg-configure.m4 b/build/pkgs/zipp/spkg-configure.m4
+new file mode 100644
+index 00000000..0fe3a9c
+--- /dev/null
++++ b/build/pkgs/zipp/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([zipp], [SAGE_PYTHON_PACKAGE_CHECK([zipp])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6073ad8e56c21fc862749bbd84a56d543fb9458c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:48:37 -0400
+Subject: Trac #29665: add Gentoo package information for wcwidth.
+
+---
+ build/pkgs/wcwidth/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wcwidth/distros/gentoo.txt
+
+diff --git a/build/pkgs/wcwidth/distros/gentoo.txt b/build/pkgs/wcwidth/distros/gentoo.txt
+new file mode 100644
+index 00000000..edeb80b
+--- /dev/null
++++ b/build/pkgs/wcwidth/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/wcwidth
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9793d6172c64d61a015fbe61bd45863759124fad Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:51:10 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for wcwidth.
+
+---
+ build/pkgs/wcwidth/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wcwidth/spkg-configure.m4
+
+diff --git a/build/pkgs/wcwidth/spkg-configure.m4 b/build/pkgs/wcwidth/spkg-configure.m4
+new file mode 100644
+index 00000000..5bde15a
+--- /dev/null
++++ b/build/pkgs/wcwidth/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([wcwidth], [SAGE_PYTHON_PACKAGE_CHECK([wcwidth])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20232f370a43c146ca4e696c72a2cbcc498db060 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:52:36 -0400
+Subject: Trac #29665: add Gentoo package information for testpath.
+
+---
+ build/pkgs/testpath/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/testpath/distros/gentoo.txt
+
+diff --git a/build/pkgs/testpath/distros/gentoo.txt b/build/pkgs/testpath/distros/gentoo.txt
+new file mode 100644
+index 00000000..efa10a0
+--- /dev/null
++++ b/build/pkgs/testpath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/testpath
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1b0785b2aad8844e74345fe950baf097e2b43d24 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:55:22 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for testpath.
+
+---
+ build/pkgs/testpath/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/testpath/spkg-configure.m4
+
+diff --git a/build/pkgs/testpath/spkg-configure.m4 b/build/pkgs/testpath/spkg-configure.m4
+new file mode 100644
+index 00000000..d8fc2a7
+--- /dev/null
++++ b/build/pkgs/testpath/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([testpath], [SAGE_PYTHON_PACKAGE_CHECK([testpath])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 10fc3829ecd956d732b1b069fdfe81f0d6d5cdc2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 18:56:06 -0400
+Subject: Trac #29665: add Gentoo package information for jedi.
+
+---
+ build/pkgs/jedi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jedi/distros/gentoo.txt
+
+diff --git a/build/pkgs/jedi/distros/gentoo.txt b/build/pkgs/jedi/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c85a46
+--- /dev/null
++++ b/build/pkgs/jedi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jedi
+-- 
+cgit v1.0-1-gd88e
+
+
+From a75824d74c281c7639028ca01dabeed266f56998 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:06:37 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for jedi.
+
+---
+ build/pkgs/jedi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jedi/spkg-configure.m4
+
+diff --git a/build/pkgs/jedi/spkg-configure.m4 b/build/pkgs/jedi/spkg-configure.m4
+new file mode 100644
+index 00000000..a37dbcc
+--- /dev/null
++++ b/build/pkgs/jedi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jedi], [SAGE_PYTHON_PACKAGE_CHECK([jedi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 17af01373d43f6acbbdbc23e073e372d3fdadf8b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:07:47 -0400
+Subject: Trac #29665: add Gentoo package information for tomli.
+
+---
+ build/pkgs/tomli/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tomli/distros/gentoo.txt
+
+diff --git a/build/pkgs/tomli/distros/gentoo.txt b/build/pkgs/tomli/distros/gentoo.txt
+new file mode 100644
+index 00000000..0458e25
+--- /dev/null
++++ b/build/pkgs/tomli/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/tomli
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0d3b5994ae612be11992467c4a3f1a74b81400fe Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:08:12 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for tomli.
+
+---
+ build/pkgs/tomli/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tomli/spkg-configure.m4
+
+diff --git a/build/pkgs/tomli/spkg-configure.m4 b/build/pkgs/tomli/spkg-configure.m4
+new file mode 100644
+index 00000000..95a8b8b
+--- /dev/null
++++ b/build/pkgs/tomli/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tomli], [SAGE_PYTHON_PACKAGE_CHECK([tomli])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From dce1c515781b0eeb8eb9c2bc7aba581560c1fac1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:09:22 -0400
+Subject: Trac #29665: add Gentoo package information for defusedxml.
+
+---
+ build/pkgs/defusedxml/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/defusedxml/distros/gentoo.txt
+
+diff --git a/build/pkgs/defusedxml/distros/gentoo.txt b/build/pkgs/defusedxml/distros/gentoo.txt
+new file mode 100644
+index 00000000..2804214
+--- /dev/null
++++ b/build/pkgs/defusedxml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/defusedxml
+-- 
+cgit v1.0-1-gd88e
+
+
+From 02e1e1cd7f8bdae3ca5b7d35ce70af28a44e9b7c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:11:14 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for defusedxml.
+
+---
+ build/pkgs/defusedxml/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/defusedxml/spkg-configure.m4
+
+diff --git a/build/pkgs/defusedxml/spkg-configure.m4 b/build/pkgs/defusedxml/spkg-configure.m4
+new file mode 100644
+index 00000000..e02f345
+--- /dev/null
++++ b/build/pkgs/defusedxml/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([defusedxml], [SAGE_PYTHON_PACKAGE_CHECK([defusedxml])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e0ba4ebb5cfc637b5d26b85de9f34e0a160d2b9c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:12:22 -0400
+Subject: Trac #29665: add Gentoo package information for ipywidgets.
+
+---
+ build/pkgs/ipywidgets/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipywidgets/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipywidgets/distros/gentoo.txt b/build/pkgs/ipywidgets/distros/gentoo.txt
+new file mode 100644
+index 00000000..7c76967
+--- /dev/null
++++ b/build/pkgs/ipywidgets/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipywidgets
+-- 
+cgit v1.0-1-gd88e
+
+
+From 49df7e7d93c7a31b7c46d5d224a35fd313a29a32 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:15:53 -0400
+Subject: Trac #29665: add Gentoo package information for simplegeneric.
+
+---
+ build/pkgs/simplegeneric/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/simplegeneric/distros/gentoo.txt
+
+diff --git a/build/pkgs/simplegeneric/distros/gentoo.txt b/build/pkgs/simplegeneric/distros/gentoo.txt
+new file mode 100644
+index 00000000..a86e90d
+--- /dev/null
++++ b/build/pkgs/simplegeneric/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/simplegeneric
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2a893635d5804749e6fec7ed7289c921ecb5300a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:16:33 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for simplegeneric.
+
+---
+ build/pkgs/simplegeneric/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/simplegeneric/spkg-configure.m4
+
+diff --git a/build/pkgs/simplegeneric/spkg-configure.m4 b/build/pkgs/simplegeneric/spkg-configure.m4
+new file mode 100644
+index 00000000..13715ab
+--- /dev/null
++++ b/build/pkgs/simplegeneric/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([simplegeneric], [SAGE_PYTHON_PACKAGE_CHECK([simplegeneric])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a8fe7ecd6e3163e7d01261e5497ac452a8cc95ab Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:17:18 -0400
+Subject: Trac #29665: add Gentoo package information for imagesize.
+
+---
+ build/pkgs/imagesize/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/imagesize/distros/gentoo.txt
+
+diff --git a/build/pkgs/imagesize/distros/gentoo.txt b/build/pkgs/imagesize/distros/gentoo.txt
+new file mode 100644
+index 00000000..54350ba
+--- /dev/null
++++ b/build/pkgs/imagesize/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/imagesize
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2ad837c5dd1fca0f50ce6d5042a9344210a54f84 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:17:48 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for imagesize.
+
+---
+ build/pkgs/imagesize/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/imagesize/spkg-configure.m4
+
+diff --git a/build/pkgs/imagesize/spkg-configure.m4 b/build/pkgs/imagesize/spkg-configure.m4
+new file mode 100644
+index 00000000..20210ef
+--- /dev/null
++++ b/build/pkgs/imagesize/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([imagesize], [SAGE_PYTHON_PACKAGE_CHECK([imagesize])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bf47415b5bfca2d7bf24e20de35662bf331623b9 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:18:49 -0400
+Subject: Trac #29665: add Gentoo package information for mistune.
+
+---
+ build/pkgs/mistune/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mistune/distros/gentoo.txt
+
+diff --git a/build/pkgs/mistune/distros/gentoo.txt b/build/pkgs/mistune/distros/gentoo.txt
+new file mode 100644
+index 00000000..56f0a4e
+--- /dev/null
++++ b/build/pkgs/mistune/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/mistune
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6898a74fd0c65a40c5220ba68b4062ac6fe060c6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:21:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for mistune.
+
+---
+ build/pkgs/mistune/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/mistune/spkg-configure.m4
+
+diff --git a/build/pkgs/mistune/spkg-configure.m4 b/build/pkgs/mistune/spkg-configure.m4
+new file mode 100644
+index 00000000..972f33d
+--- /dev/null
++++ b/build/pkgs/mistune/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([mistune], [SAGE_PYTHON_PACKAGE_CHECK([mistune])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 62735e4ccf2031cd39eb5e04b03bdfd97005d808 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:22:48 -0400
+Subject: Trac #29665: add Gentoo package information for backcall.
+
+---
+ build/pkgs/backcall/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/backcall/distros/gentoo.txt
+
+diff --git a/build/pkgs/backcall/distros/gentoo.txt b/build/pkgs/backcall/distros/gentoo.txt
+new file mode 100644
+index 00000000..266a222
+--- /dev/null
++++ b/build/pkgs/backcall/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/backcall
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9ef3ea42d4a33c7cdb623fa5417ae300cf323183 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:25:10 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for backcall.
+
+---
+ build/pkgs/backcall/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/backcall/spkg-configure.m4
+
+diff --git a/build/pkgs/backcall/spkg-configure.m4 b/build/pkgs/backcall/spkg-configure.m4
+new file mode 100644
+index 00000000..d6b11c4
+--- /dev/null
++++ b/build/pkgs/backcall/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([backcall], [SAGE_PYTHON_PACKAGE_CHECK([backcall])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1b3ea2a3c40fea0fb58435f5e5304368ea58dff8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:25:58 -0400
+Subject: Trac #29665: add Gentoo package information for parso.
+
+---
+ build/pkgs/parso/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/parso/distros/gentoo.txt
+
+diff --git a/build/pkgs/parso/distros/gentoo.txt b/build/pkgs/parso/distros/gentoo.txt
+new file mode 100644
+index 00000000..f9ce4c7
+--- /dev/null
++++ b/build/pkgs/parso/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/parso
+-- 
+cgit v1.0-1-gd88e
+
+
+From 963a3a2c563ec71a1f5be2395722d0e824cb0b11 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:26:22 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for parso.
+
+---
+ build/pkgs/parso/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/parso/spkg-configure.m4
+
+diff --git a/build/pkgs/parso/spkg-configure.m4 b/build/pkgs/parso/spkg-configure.m4
+new file mode 100644
+index 00000000..1ca6f1b
+--- /dev/null
++++ b/build/pkgs/parso/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([parso], [SAGE_PYTHON_PACKAGE_CHECK([parso])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 943053dfc474b6549bcc7d6ef2971ea43588b35c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:27:00 -0400
+Subject: Trac #29665: add Gentoo package information for pyparsing.
+
+---
+ build/pkgs/pyparsing/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyparsing/distros/gentoo.txt
+
+diff --git a/build/pkgs/pyparsing/distros/gentoo.txt b/build/pkgs/pyparsing/distros/gentoo.txt
+new file mode 100644
+index 00000000..ef0419f
+--- /dev/null
++++ b/build/pkgs/pyparsing/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyparsing
+-- 
+cgit v1.0-1-gd88e
+
+
+From bd682eaa2ac41dd84e7a52e2b0c5442fc8fd8919 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 3 Nov 2021 19:27:30 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pyparsing.
+
+---
+ build/pkgs/pyparsing/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyparsing/spkg-configure.m4
+
+diff --git a/build/pkgs/pyparsing/spkg-configure.m4 b/build/pkgs/pyparsing/spkg-configure.m4
+new file mode 100644
+index 00000000..d2b4c00
+--- /dev/null
++++ b/build/pkgs/pyparsing/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pyparsing], [SAGE_PYTHON_PACKAGE_CHECK([pyparsing])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 74f36a9c0ec7c63b7e6c40066e42f4b15c2f978e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:17:42 -0400
+Subject: Trac #29665: add Gentoo package information for debugpy.
+
+---
+ build/pkgs/debugpy/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/debugpy/distros/gentoo.txt
+
+diff --git a/build/pkgs/debugpy/distros/gentoo.txt b/build/pkgs/debugpy/distros/gentoo.txt
+new file mode 100644
+index 00000000..8b797ce
+--- /dev/null
++++ b/build/pkgs/debugpy/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/debugpy
+-- 
+cgit v1.0-1-gd88e
+
+
+From be072fa87ac5c373d9dc9b54c0bd68734d5709bc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:21:17 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for debugpy.
+
+---
+ build/pkgs/debugpy/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/debugpy/spkg-configure.m4
+
+diff --git a/build/pkgs/debugpy/spkg-configure.m4 b/build/pkgs/debugpy/spkg-configure.m4
+new file mode 100644
+index 00000000..db605ff
+--- /dev/null
++++ b/build/pkgs/debugpy/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([debugpy], [SAGE_PYTHON_PACKAGE_CHECK([debugpy])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6f777ce2f2e14b94e91c8b7bbac82f9017460aba Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:23:56 -0400
+Subject: Trac #29665: add Gentoo package information for tzlocal.
+
+---
+ build/pkgs/tzlocal/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tzlocal/distros/gentoo.txt
+
+diff --git a/build/pkgs/tzlocal/distros/gentoo.txt b/build/pkgs/tzlocal/distros/gentoo.txt
+new file mode 100644
+index 00000000..2018442
+--- /dev/null
++++ b/build/pkgs/tzlocal/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/tzlocal
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3bd078fc15ae13982249452711baafae91038191 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:24:51 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for tzlocal.
+
+---
+ build/pkgs/tzlocal/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tzlocal/spkg-configure.m4
+
+diff --git a/build/pkgs/tzlocal/spkg-configure.m4 b/build/pkgs/tzlocal/spkg-configure.m4
+new file mode 100644
+index 00000000..e020b28
+--- /dev/null
++++ b/build/pkgs/tzlocal/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tzlocal], [SAGE_PYTHON_PACKAGE_CHECK([tzlocal])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 91b0882fc62214923da9ee7b6dccb05d8a1d11d1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:26:13 -0400
+Subject: Trac #29665: add Gentoo package information for pycparser.
+
+---
+ build/pkgs/pycparser/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pycparser/distros/gentoo.txt
+
+diff --git a/build/pkgs/pycparser/distros/gentoo.txt b/build/pkgs/pycparser/distros/gentoo.txt
+new file mode 100644
+index 00000000..5e87307
+--- /dev/null
++++ b/build/pkgs/pycparser/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pycparser
+-- 
+cgit v1.0-1-gd88e
+
+
+From beabde92fe6e057faf516fe82d27f1e903e55ce6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:27:27 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pycparser.
+
+---
+ build/pkgs/pycparser/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pycparser/spkg-configure.m4
+
+diff --git a/build/pkgs/pycparser/spkg-configure.m4 b/build/pkgs/pycparser/spkg-configure.m4
+new file mode 100644
+index 00000000..4b9b900
+--- /dev/null
++++ b/build/pkgs/pycparser/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pycparser], [SAGE_PYTHON_PACKAGE_CHECK([pycparser])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 86c2788dc7fd1169314e9598c91fa81045553677 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:29:36 -0400
+Subject: Trac #29665: add Gentoo package information for cycler.
+
+---
+ build/pkgs/cycler/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cycler/distros/gentoo.txt
+
+diff --git a/build/pkgs/cycler/distros/gentoo.txt b/build/pkgs/cycler/distros/gentoo.txt
+new file mode 100644
+index 00000000..4b21543
+--- /dev/null
++++ b/build/pkgs/cycler/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/cycler
+-- 
+cgit v1.0-1-gd88e
+
+
+From 67c5a944101ddf329f0a61c61d4e784f58a5c5b0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:30:27 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for cycler.
+
+---
+ build/pkgs/cycler/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cycler/spkg-configure.m4
+
+diff --git a/build/pkgs/cycler/spkg-configure.m4 b/build/pkgs/cycler/spkg-configure.m4
+new file mode 100644
+index 00000000..239571a
+--- /dev/null
++++ b/build/pkgs/cycler/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([cycler], [SAGE_PYTHON_PACKAGE_CHECK([cycler])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ef6d490251abfa41f7a0910274700a8a6a65f629 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:31:19 -0400
+Subject: Trac #29665: add Gentoo package information for traitlets.
+
+---
+ build/pkgs/traitlets/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/traitlets/distros/gentoo.txt
+
+diff --git a/build/pkgs/traitlets/distros/gentoo.txt b/build/pkgs/traitlets/distros/gentoo.txt
+new file mode 100644
+index 00000000..46bfaab
+--- /dev/null
++++ b/build/pkgs/traitlets/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/traitlets
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1f922b458d34088d9f6773312209e69f19ee45dc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:31:50 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for traitlets.
+
+---
+ build/pkgs/traitlets/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/traitlets/spkg-configure.m4
+
+diff --git a/build/pkgs/traitlets/spkg-configure.m4 b/build/pkgs/traitlets/spkg-configure.m4
+new file mode 100644
+index 00000000..df2382b
+--- /dev/null
++++ b/build/pkgs/traitlets/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([traitlets], [SAGE_PYTHON_PACKAGE_CHECK([traitlets])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 95b89a9ced0acb6d971a27fa63b97ea58a11f4e1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:33:35 -0400
+Subject: Trac #29665: add Gentoo package information for argcomplete.
+
+---
+ build/pkgs/argcomplete/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argcomplete/distros/gentoo.txt
+
+diff --git a/build/pkgs/argcomplete/distros/gentoo.txt b/build/pkgs/argcomplete/distros/gentoo.txt
+new file mode 100644
+index 00000000..b150949
+--- /dev/null
++++ b/build/pkgs/argcomplete/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/argcomplete
+-- 
+cgit v1.0-1-gd88e
+
+
+From b4cd8ef384e6e5bae0de0f3c113fb5f9e6e1a71e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:34:14 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for argcomplete.
+
+---
+ build/pkgs/argcomplete/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argcomplete/spkg-configure.m4
+
+diff --git a/build/pkgs/argcomplete/spkg-configure.m4 b/build/pkgs/argcomplete/spkg-configure.m4
+new file mode 100644
+index 00000000..cbd7ccf
+--- /dev/null
++++ b/build/pkgs/argcomplete/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([argcomplete], [SAGE_PYTHON_PACKAGE_CHECK([argcomplete])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4cc610e8331970cc018d7ea87af928fa73a292c1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:36:21 -0400
+Subject: Trac #29665: add Gentoo package information for ptyprocess.
+
+---
+ build/pkgs/ptyprocess/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ptyprocess/distros/gentoo.txt
+
+diff --git a/build/pkgs/ptyprocess/distros/gentoo.txt b/build/pkgs/ptyprocess/distros/gentoo.txt
+new file mode 100644
+index 00000000..571a851
+--- /dev/null
++++ b/build/pkgs/ptyprocess/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ptyprocess
+-- 
+cgit v1.0-1-gd88e
+
+
+From cd15f97221bf5933b07900e4f77cb55401eede26 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:37:02 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ptyprocess.
+
+---
+ build/pkgs/ptyprocess/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ptyprocess/spkg-configure.m4
+
+diff --git a/build/pkgs/ptyprocess/spkg-configure.m4 b/build/pkgs/ptyprocess/spkg-configure.m4
+new file mode 100644
+index 00000000..bfacbae
+--- /dev/null
++++ b/build/pkgs/ptyprocess/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ptyprocess], [SAGE_PYTHON_PACKAGE_CHECK([ptyprocess])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb5f45b15f99e4ba28e1b1f6042a0e8ea17f1dfc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:38:22 -0400
+Subject: Trac #29665: add Gentoo package information for attrs.
+
+---
+ build/pkgs/attrs/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/attrs/distros/gentoo.txt
+
+diff --git a/build/pkgs/attrs/distros/gentoo.txt b/build/pkgs/attrs/distros/gentoo.txt
+new file mode 100644
+index 00000000..3b906fa
+--- /dev/null
++++ b/build/pkgs/attrs/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/attrs
+-- 
+cgit v1.0-1-gd88e
+
+
+From 321707ebf8e9af1e4ac3a5b5b094b4226bb3a7a5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:38:55 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for attrs.
+
+---
+ build/pkgs/attrs/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/attrs/spkg-configure.m4
+
+diff --git a/build/pkgs/attrs/spkg-configure.m4 b/build/pkgs/attrs/spkg-configure.m4
+new file mode 100644
+index 00000000..ba6a9b7
+--- /dev/null
++++ b/build/pkgs/attrs/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([attrs], [SAGE_PYTHON_PACKAGE_CHECK([attrs])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 69a498a4e8854ecdfc2f1a134104983c0dcb9e32 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:40:09 -0400
+Subject: Trac #29665: add Gentoo package information for send2trash.
+
+---
+ build/pkgs/send2trash/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/send2trash/distros/gentoo.txt
+
+diff --git a/build/pkgs/send2trash/distros/gentoo.txt b/build/pkgs/send2trash/distros/gentoo.txt
+new file mode 100644
+index 00000000..a89b179
+--- /dev/null
++++ b/build/pkgs/send2trash/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/send2trash
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9baed17c84e1bdf5abd17c20766e5cd7dddc5b53 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:41:45 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for send2trash.
+
+---
+ build/pkgs/send2trash/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/send2trash/spkg-configure.m4
+
+diff --git a/build/pkgs/send2trash/spkg-configure.m4 b/build/pkgs/send2trash/spkg-configure.m4
+new file mode 100644
+index 00000000..3bbb727
+--- /dev/null
++++ b/build/pkgs/send2trash/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([send2trash], [SAGE_PYTHON_PACKAGE_CHECK([send2trash])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b9b552b2a2aaccaeb7c5b25be0b681f107522d09 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:43:27 -0400
+Subject: Trac #29665: add Gentoo package information for pyrsistent.
+
+---
+ build/pkgs/pyrsistent/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyrsistent/distros/gentoo.txt
+
+diff --git a/build/pkgs/pyrsistent/distros/gentoo.txt b/build/pkgs/pyrsistent/distros/gentoo.txt
+new file mode 100644
+index 00000000..83439ce
+--- /dev/null
++++ b/build/pkgs/pyrsistent/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pyrsistent
+-- 
+cgit v1.0-1-gd88e
+
+
+From a17b31fac6104852762f57daa749443147bdf121 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:44:03 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for pyrsistent.
+
+---
+ build/pkgs/pyrsistent/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pyrsistent/spkg-configure.m4
+
+diff --git a/build/pkgs/pyrsistent/spkg-configure.m4 b/build/pkgs/pyrsistent/spkg-configure.m4
+new file mode 100644
+index 00000000..f7ca75d
+--- /dev/null
++++ b/build/pkgs/pyrsistent/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pyrsistent], [SAGE_PYTHON_PACKAGE_CHECK([pyrsistent])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 68520decad6d6937918d7a6af65ca5bd476e5d02 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:45:45 -0400
+Subject: Trac #29665: add Gentoo package information for entrypoints.
+
+---
+ build/pkgs/entrypoints/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/entrypoints/distros/gentoo.txt
+
+diff --git a/build/pkgs/entrypoints/distros/gentoo.txt b/build/pkgs/entrypoints/distros/gentoo.txt
+new file mode 100644
+index 00000000..684ddd0
+--- /dev/null
++++ b/build/pkgs/entrypoints/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/entrypoints
+-- 
+cgit v1.0-1-gd88e
+
+
+From 34213eccb642a6bad64d89acaefa83ee702cb483 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:46:24 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for entrypoints.
+
+---
+ build/pkgs/entrypoints/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/entrypoints/spkg-configure.m4
+
+diff --git a/build/pkgs/entrypoints/spkg-configure.m4 b/build/pkgs/entrypoints/spkg-configure.m4
+new file mode 100644
+index 00000000..caed658
+--- /dev/null
++++ b/build/pkgs/entrypoints/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([entrypoints], [SAGE_PYTHON_PACKAGE_CHECK([entrypoints])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8e985614345da1a58fcdc127a9c0ddd790f9b5d2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:48:26 -0400
+Subject: Trac #29665: add Gentoo package information for markupsafe.
+
+---
+ build/pkgs/markupsafe/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/markupsafe/distros/gentoo.txt
+
+diff --git a/build/pkgs/markupsafe/distros/gentoo.txt b/build/pkgs/markupsafe/distros/gentoo.txt
+new file mode 100644
+index 00000000..9654e35
+--- /dev/null
++++ b/build/pkgs/markupsafe/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/markupsafe
+-- 
+cgit v1.0-1-gd88e
+
+
+From d370f229ae0988856f2e0d1f6ee2df2c47169106 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 4 Nov 2021 18:48:55 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for markupsafe.
+
+---
+ build/pkgs/markupsafe/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/markupsafe/spkg-configure.m4
+
+diff --git a/build/pkgs/markupsafe/spkg-configure.m4 b/build/pkgs/markupsafe/spkg-configure.m4
+new file mode 100644
+index 00000000..79eb8db
+--- /dev/null
++++ b/build/pkgs/markupsafe/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([markupsafe], [SAGE_PYTHON_PACKAGE_CHECK([markupsafe])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c49b285ad9e25e6bc81a7e75d461d234fdd3ea68 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:30:49 -0400
+Subject: Trac #29665: add Gentoo package information for flit_core.
+
+---
+ build/pkgs/flit_core/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/flit_core/distros/gentoo.txt
+
+diff --git a/build/pkgs/flit_core/distros/gentoo.txt b/build/pkgs/flit_core/distros/gentoo.txt
+new file mode 100644
+index 00000000..fe6bea9
+--- /dev/null
++++ b/build/pkgs/flit_core/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/flit_core
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b0ce1c4f23cd9fc4316e1eb2b9b4bde394957f3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:32:11 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for flit_core.
+
+---
+ build/pkgs/flit_core/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/flit_core/spkg-configure.m4
+
+diff --git a/build/pkgs/flit_core/spkg-configure.m4 b/build/pkgs/flit_core/spkg-configure.m4
+new file mode 100644
+index 00000000..ee67557
+--- /dev/null
++++ b/build/pkgs/flit_core/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([flit_core], [SAGE_PYTHON_PACKAGE_CHECK([flit_core])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f006c231a81428b1e1e792f889bf974f90e3c831 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:34:06 -0400
+Subject: Trac #29665: add Gentoo package information for nest_asyncio.
+
+---
+ build/pkgs/nest_asyncio/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nest_asyncio/distros/gentoo.txt
+
+diff --git a/build/pkgs/nest_asyncio/distros/gentoo.txt b/build/pkgs/nest_asyncio/distros/gentoo.txt
+new file mode 100644
+index 00000000..ab742d2
+--- /dev/null
++++ b/build/pkgs/nest_asyncio/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nest_asyncio
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4a58d0a96a84475e765a01a64f5f44c48a317e0b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:34:43 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for nest_asyncio.
+
+---
+ build/pkgs/nest_asyncio/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nest_asyncio/spkg-configure.m4
+
+diff --git a/build/pkgs/nest_asyncio/spkg-configure.m4 b/build/pkgs/nest_asyncio/spkg-configure.m4
+new file mode 100644
+index 00000000..4d81527
+--- /dev/null
++++ b/build/pkgs/nest_asyncio/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nest_asyncio], [SAGE_PYTHON_PACKAGE_CHECK([nest_asyncio])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e50af937777ea778908bc09a7a79db3dd80fdf25 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:37:02 -0400
+Subject: Trac #29665: add Gentoo package information for ipython_genutils.
+
+---
+ build/pkgs/ipython_genutils/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython_genutils/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipython_genutils/distros/gentoo.txt b/build/pkgs/ipython_genutils/distros/gentoo.txt
+new file mode 100644
+index 00000000..01bc49d
+--- /dev/null
++++ b/build/pkgs/ipython_genutils/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipython_genutils
+-- 
+cgit v1.0-1-gd88e
+
+
+From ec3c0ce9db2ba13c1a49d1bcfb7a4b249cb7ae83 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:39:20 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipython_genutils.
+
+---
+ build/pkgs/ipython_genutils/spkg-configure.m4 | 4 ++++
+ 1 file changed, 4 insertions(+)
+ create mode 100644 build/pkgs/ipython_genutils/spkg-configure.m4
+
+diff --git a/build/pkgs/ipython_genutils/spkg-configure.m4 b/build/pkgs/ipython_genutils/spkg-configure.m4
+new file mode 100644
+index 00000000..b0ba86a
+--- /dev/null
++++ b/build/pkgs/ipython_genutils/spkg-configure.m4
+@@ -0,0 +1,4 @@
++SAGE_SPKG_CONFIGURE(
++  [ipython_genutils],
++  [SAGE_PYTHON_PACKAGE_CHECK([ipython_genutils])]
++)
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5c9e2e265115e5f10d4b459a475467e30b4bddde Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 06:40:03 -0400
+Subject: Trac #29665: add Gentoo package information for ipython.
+
+---
+ build/pkgs/ipython/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipython/distros/gentoo.txt b/build/pkgs/ipython/distros/gentoo.txt
+new file mode 100644
+index 00000000..8b76f18
+--- /dev/null
++++ b/build/pkgs/ipython/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipython
+-- 
+cgit v1.0-1-gd88e
+
+
+From 621e707ddd040a902d7dddf0bed1de2b54ab22f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 07:37:56 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipython.
+
+---
+ build/pkgs/ipython/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipython/spkg-configure.m4
+
+diff --git a/build/pkgs/ipython/spkg-configure.m4 b/build/pkgs/ipython/spkg-configure.m4
+new file mode 100644
+index 00000000..02ab89f
+--- /dev/null
++++ b/build/pkgs/ipython/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipython], [SAGE_PYTHON_PACKAGE_CHECK([ipython])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 20a0613f6d441da436f3e7b8047a72bf490882bd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 07:51:11 -0400
+Subject: Trac #29665: standard python spkg-configure.m4 for ipywidgets.
+
+---
+ build/pkgs/ipywidgets/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipywidgets/spkg-configure.m4
+
+diff --git a/build/pkgs/ipywidgets/spkg-configure.m4 b/build/pkgs/ipywidgets/spkg-configure.m4
+new file mode 100644
+index 00000000..51ca9be
+--- /dev/null
++++ b/build/pkgs/ipywidgets/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipywidgets], [SAGE_PYTHON_PACKAGE_CHECK([ipywidgets])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 76bcd386633acc02a1a3026339d0cbd258ada04e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Nov 2021 10:05:16 -0400
+Subject: Trac #29665: add Gentoo package information for wheel.
+
+---
+ build/pkgs/wheel/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/wheel/distros/gentoo.txt
+
+diff --git a/build/pkgs/wheel/distros/gentoo.txt b/build/pkgs/wheel/distros/gentoo.txt
+new file mode 100644
+index 00000000..ec571d5
+--- /dev/null
++++ b/build/pkgs/wheel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/wheel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 96c2dd2ca7812f5333bb9d45eadb7ac408e364ce Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:51:44 -0500
+Subject: Trac #29665: add Gentoo package information for terminado.
+
+---
+ build/pkgs/terminado/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/terminado/distros/gentoo.txt
+
+diff --git a/build/pkgs/terminado/distros/gentoo.txt b/build/pkgs/terminado/distros/gentoo.txt
+new file mode 100644
+index 00000000..1df16f1
+--- /dev/null
++++ b/build/pkgs/terminado/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/terminado
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0de0f5f3d235a4339b21e37ea13c9f5e59a82e59 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:52:35 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for terminado.
+
+---
+ build/pkgs/terminado/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/terminado/spkg-configure.m4
+
+diff --git a/build/pkgs/terminado/spkg-configure.m4 b/build/pkgs/terminado/spkg-configure.m4
+new file mode 100644
+index 00000000..5defc2f
+--- /dev/null
++++ b/build/pkgs/terminado/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([terminado], [SAGE_PYTHON_PACKAGE_CHECK([terminado])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d14a745c770b02822557e7cee0a98de1cb2f3a12 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:56:15 -0500
+Subject: Trac #29665: add Gentoo package information for cffi.
+
+---
+ build/pkgs/cffi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cffi/distros/gentoo.txt
+
+diff --git a/build/pkgs/cffi/distros/gentoo.txt b/build/pkgs/cffi/distros/gentoo.txt
+new file mode 100644
+index 00000000..81eeb81
+--- /dev/null
++++ b/build/pkgs/cffi/distros/gentoo.txt
+@@ -0,0 +1 @@
++virtual/python-cffi
+-- 
+cgit v1.0-1-gd88e
+
+
+From ce393c04afc69fe050e38f780d4e117164687d80 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:57:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for cffi.
+
+---
+ build/pkgs/cffi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/cffi/spkg-configure.m4
+
+diff --git a/build/pkgs/cffi/spkg-configure.m4 b/build/pkgs/cffi/spkg-configure.m4
+new file mode 100644
+index 00000000..dc81875
+--- /dev/null
++++ b/build/pkgs/cffi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([cffi], [SAGE_PYTHON_PACKAGE_CHECK([cffi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 467093315b3fdd57c8caa2f95cf99ad52b0b84fb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 08:57:57 -0500
+Subject: Trac #29665: add Gentoo package information for pip.
+
+---
+ build/pkgs/pip/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pip/distros/gentoo.txt
+
+diff --git a/build/pkgs/pip/distros/gentoo.txt b/build/pkgs/pip/distros/gentoo.txt
+new file mode 100644
+index 00000000..1845454
+--- /dev/null
++++ b/build/pkgs/pip/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pip[vanilla]
+-- 
+cgit v1.0-1-gd88e
+
+
+From c597fd23f9f68dabbcb7e698d0569c3e6458f6d1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 09:07:26 -0500
+Subject: Trac #29665: new spkg-configure.m4 for pip.
+
+---
+ build/pkgs/pip/spkg-configure.m4 | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+ create mode 100644 build/pkgs/pip/spkg-configure.m4
+
+diff --git a/build/pkgs/pip/spkg-configure.m4 b/build/pkgs/pip/spkg-configure.m4
+new file mode 100644
+index 00000000..c7a5562
+--- /dev/null
++++ b/build/pkgs/pip/spkg-configure.m4
+@@ -0,0 +1,12 @@
++SAGE_SPKG_CONFIGURE([pip], [
++  dnl always run this macro because it changes the default value of
++  dnl the --with-system-<package> option.
++  SAGE_PYTHON_PACKAGE_CHECK([pip])
++
++  dnl if we might not install the spkg, make sure that "pip" is in
++  dnl the user's PATH, too.
++  AS_IF([test "x$sage_spkg_install_pip" != "xyes"], [
++    AC_CHECK_PROG(HAVE_PIP, pip, yes, no)
++    AS_IF([test "x$HAVE_PIP" = "xno"], [sage_spkg_install_pip=yes])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ef8f1e807bc55d7b8321777486fa867a7c135419 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 9 Nov 2021 09:09:04 -0500
+Subject: Trac #29665: set $SAGE_PIP_INSTALL_FLAGS for
+ --enable-system-site-packages.
+
+We need to pass some special flags to "pip install" to make it do the
+right thing in the precence of system-site packages. Here we introduce
+a new autoconf variable, SAGE_PIP_INSTALL_FLAGS, that will be used
+to pass those flags to the build system.
+
+With autoconf aware of the variable, we substitute its value into the
+sage-build-env-config script for use in spkg-install.in.
+---
+ build/bin/sage-build-env-config.in | 1 +
+ configure.ac                       | 9 +++++++++
+ 2 files changed, 10 insertions(+)
+
+diff --git a/build/bin/sage-build-env-config.in b/build/bin/sage-build-env-config.in
+index 92e7dad..ad62e5f 100644
+--- a/build/bin/sage-build-env-config.in
++++ b/build/bin/sage-build-env-config.in
+@@ -53,6 +53,7 @@ export SAGE_PARI_CFG="@SAGE_PARI_CFG@"
+ 
+ export SAGE_GLPK_PREFIX="@SAGE_GLPK_PREFIX@"
+ export SAGE_FREETYPE_PREFIX="@SAGE_FREETYPE_PREFIX@"
++export SAGE_PIP_INSTALL_FLAGS="@SAGE_PIP_INSTALL_FLAGS@"
+ export SAGE_SUITESPARSE_PREFIX="@SAGE_SUITESPARSE_PREFIX@"
+ 
+ export SAGE_CONFIGURE_FFLAS_FFPACK="@SAGE_CONFIGURE_FFLAS_FFPACK@"
+diff --git a/configure.ac b/configure.ac
+index 6fafb83..6ed07ac 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -441,6 +441,14 @@ AC_ARG_ENABLE(
+     [allow the use of python packages from the system (experimental; default: no)]
+   )], [
+   AS_IF([test "x$enable_system_site_packages" = "xyes"], [
++    dnl When installing python SPKGs in the presence of system-site
++    dnl packages, we need to --ignore-installed so that a patched SPKG
++    dnl can be installed in the presence of an unpatched system package
++    dnl that appears (to pip) to be identical. The --no-deps flag is
++    dnl then needed because --ignore-installed will make any installed
++    dnl dependencies invisible to pip, who does not appreciate that.
++    SAGE_PIP_INSTALL_FLAGS="${SAGE_PIP_INSTALL_FLAGS} --no-deps --ignore-installed"
++
+     SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
+ 
+     dnl We want to raise an error if the user asked for "system site
+@@ -453,6 +461,7 @@ AC_ARG_ENABLE(
+     with_system_python3="force"
+   ])
+ ])
++AC_SUBST([SAGE_PIP_INSTALL_FLAGS])
+ AC_SUBST([SAGE_VENV_FLAGS])
+ 
+ SAGE_SPKG_OPTIONS=""
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3cf365fef84e809e74abd2eb388e7a8e9af9d739 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 9 Nov 2021 21:01:58 -0500
+Subject: Trac #29665: pass $SAGE_PIP_INSTALL_FLAGS to sdh_pip_install.
+
+Since sdh_pip_install is usually called from spkg-install.in, the
+variables from sage-build-env-config will be available. Here we pass
+the contents of $SAGE_PIP_INSTALL_FLAGS to sage-pip-install
+unconditionally, and hope that the user ignores this variable unless
+he truly knows what he is doing.
+---
+ build/bin/sage-dist-helpers | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/build/bin/sage-dist-helpers b/build/bin/sage-dist-helpers
+index fe364e5..1032ac3 100644
+--- a/build/bin/sage-dist-helpers
++++ b/build/bin/sage-dist-helpers
+@@ -303,7 +303,11 @@ sdh_store_wheel() {
+ }
+ 
+ sdh_store_and_pip_install_wheel() {
+-    local pip_options=""
++    # The $SAGE_PIP_INSTALL_FLAGS variable is set by sage-build-env-config.
++    # We skip sanity checking its contents since you should either let sage
++    # decide what it contains, or really know what you are doing.
++    local pip_options="${SAGE_PIP_INSTALL_FLAGS}"
++
+     while [ $# -gt 0 ]; do
+         case $1 in
+             -*) pip_options="$pip_options $1"
+-- 
+cgit v1.0-1-gd88e
+
+
+From 50f0438ee857b8f0b7d7ad924e6bba9c5e1bc033 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:10:46 -0500
+Subject: Trac #29665: add Gentoo package information for pexpect.
+
+---
+ build/pkgs/pexpect/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pexpect/distros/gentoo.txt
+
+diff --git a/build/pkgs/pexpect/distros/gentoo.txt b/build/pkgs/pexpect/distros/gentoo.txt
+new file mode 100644
+index 00000000..30c4b60
+--- /dev/null
++++ b/build/pkgs/pexpect/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pexpect
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4d784688d997290b462646fa7f36114a41f3f453 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:11:25 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pexpect.
+
+---
+ build/pkgs/pexpect/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pexpect/spkg-configure.m4
+
+diff --git a/build/pkgs/pexpect/spkg-configure.m4 b/build/pkgs/pexpect/spkg-configure.m4
+new file mode 100644
+index 00000000..6520856
+--- /dev/null
++++ b/build/pkgs/pexpect/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pexpect], [SAGE_PYTHON_PACKAGE_CHECK([pexpect])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6447122dc76a3b7a58340dbed942db66530b5b07 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:12:05 -0500
+Subject: Trac #29665: add Gentoo package information for docutils.
+
+---
+ build/pkgs/docutils/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/docutils/distros/gentoo.txt
+
+diff --git a/build/pkgs/docutils/distros/gentoo.txt b/build/pkgs/docutils/distros/gentoo.txt
+new file mode 100644
+index 00000000..fe4a452
+--- /dev/null
++++ b/build/pkgs/docutils/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/docutils
+-- 
+cgit v1.0-1-gd88e
+
+
+From 709041480a5fc729b0ee7f1a8a3b16d4d65321b5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:12:38 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for docutils.
+
+---
+ build/pkgs/docutils/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/docutils/spkg-configure.m4
+
+diff --git a/build/pkgs/docutils/spkg-configure.m4 b/build/pkgs/docutils/spkg-configure.m4
+new file mode 100644
+index 00000000..3584e45
+--- /dev/null
++++ b/build/pkgs/docutils/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([docutils], [SAGE_PYTHON_PACKAGE_CHECK([docutils])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 782d38b48ab87afccc43fbc071e7b7ed48fb0a20 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:14:37 -0500
+Subject: Trac #29665: add Gentoo package information for nbclient.
+
+---
+ build/pkgs/nbclient/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbclient/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbclient/distros/gentoo.txt b/build/pkgs/nbclient/distros/gentoo.txt
+new file mode 100644
+index 00000000..06ff18d
+--- /dev/null
++++ b/build/pkgs/nbclient/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbclient
+-- 
+cgit v1.0-1-gd88e
+
+
+From 19ce09336532336f69db74381932d51a429dfaca Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:15:11 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for nbclient.
+
+---
+ build/pkgs/nbclient/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbclient/spkg-configure.m4
+
+diff --git a/build/pkgs/nbclient/spkg-configure.m4 b/build/pkgs/nbclient/spkg-configure.m4
+new file mode 100644
+index 00000000..14178b7
+--- /dev/null
++++ b/build/pkgs/nbclient/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbclient], [SAGE_PYTHON_PACKAGE_CHECK([nbclient])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From c063b9de42c1780368000a563d0dbe80b6fff169 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:17:36 -0500
+Subject: Trac #29665: add Gentoo package information for argon2_cffi.
+
+---
+ build/pkgs/argon2_cffi/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argon2_cffi/distros/gentoo.txt
+
+diff --git a/build/pkgs/argon2_cffi/distros/gentoo.txt b/build/pkgs/argon2_cffi/distros/gentoo.txt
+new file mode 100644
+index 00000000..2f12ca8
+--- /dev/null
++++ b/build/pkgs/argon2_cffi/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/argon2-cffi
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0b4d5699dd51ea52550fba7db9e1cbb8bbac1892 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 13:18:35 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for argon2_cffi.
+
+---
+ build/pkgs/argon2_cffi/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/argon2_cffi/spkg-configure.m4
+
+diff --git a/build/pkgs/argon2_cffi/spkg-configure.m4 b/build/pkgs/argon2_cffi/spkg-configure.m4
+new file mode 100644
+index 00000000..03ebc63
+--- /dev/null
++++ b/build/pkgs/argon2_cffi/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([argon2_cffi], [SAGE_PYTHON_PACKAGE_CHECK([argon2_cffi])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2b4119558a6e0b1aa512848539a237676b035c83 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:30:48 -0500
+Subject: Trac #29665: fix package name in dateutil's install-requires.txt.
+
+---
+ build/pkgs/dateutil/install-requires.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/build/pkgs/dateutil/install-requires.txt b/build/pkgs/dateutil/install-requires.txt
+index 0ae93da..face537 100644
+--- a/build/pkgs/dateutil/install-requires.txt
++++ b/build/pkgs/dateutil/install-requires.txt
+@@ -1 +1 @@
+-dateutil >=2.8.1
++python-dateutil >=2.8.1
+-- 
+cgit v1.0-1-gd88e
+
+
+From df371b7c4d20a3353d43940306ad22e11aba29da Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:31:41 -0500
+Subject: Trac #29665: add Gentoo package information for dateutil.
+
+---
+ build/pkgs/dateutil/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/dateutil/distros/gentoo.txt
+
+diff --git a/build/pkgs/dateutil/distros/gentoo.txt b/build/pkgs/dateutil/distros/gentoo.txt
+new file mode 100644
+index 00000000..e129df7
+--- /dev/null
++++ b/build/pkgs/dateutil/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/python-dateutil
+-- 
+cgit v1.0-1-gd88e
+
+
+From 577695dfdf661ee26c0ffd767bdbf479d95f7fb4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:32:21 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for dateutil.
+
+---
+ build/pkgs/dateutil/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/dateutil/spkg-configure.m4
+
+diff --git a/build/pkgs/dateutil/spkg-configure.m4 b/build/pkgs/dateutil/spkg-configure.m4
+new file mode 100644
+index 00000000..fdcd127
+--- /dev/null
++++ b/build/pkgs/dateutil/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([dateutil], [SAGE_PYTHON_PACKAGE_CHECK([dateutil])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1984651caac624ec4bb58814ca1d57fe66f9881a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:33:51 -0500
+Subject: Trac #29665: add Gentoo package information for setuptools_scm.
+
+---
+ build/pkgs/setuptools_scm/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/setuptools_scm/distros/gentoo.txt
+
+diff --git a/build/pkgs/setuptools_scm/distros/gentoo.txt b/build/pkgs/setuptools_scm/distros/gentoo.txt
+new file mode 100644
+index 00000000..8989597
+--- /dev/null
++++ b/build/pkgs/setuptools_scm/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/setuptools_scm
+-- 
+cgit v1.0-1-gd88e
+
+
+From ebf7c854ed966e7353759be485c4f5a57b9a10fa Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:34:49 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for setuptools_scm.
+
+---
+ build/pkgs/setuptools_scm/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/setuptools_scm/spkg-configure.m4
+
+diff --git a/build/pkgs/setuptools_scm/spkg-configure.m4 b/build/pkgs/setuptools_scm/spkg-configure.m4
+new file mode 100644
+index 00000000..437148c
+--- /dev/null
++++ b/build/pkgs/setuptools_scm/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([setuptools_scm], [
++  SAGE_PYTHON_PACKAGE_CHECK([setuptools_scm])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0dee0d0c28f31b1f619e44c710a3c9e22d2b2544 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:36:33 -0500
+Subject: Trac #29665: add Gentoo package information for nbconvert.
+
+---
+ build/pkgs/nbconvert/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbconvert/distros/gentoo.txt
+
+diff --git a/build/pkgs/nbconvert/distros/gentoo.txt b/build/pkgs/nbconvert/distros/gentoo.txt
+new file mode 100644
+index 00000000..6c45a10
+--- /dev/null
++++ b/build/pkgs/nbconvert/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/nbconvert
+-- 
+cgit v1.0-1-gd88e
+
+
+From 473789eb11b1838bc32dc8a63509ee199afc8912 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:37:37 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for nbconvert.
+
+---
+ build/pkgs/nbconvert/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/nbconvert/spkg-configure.m4
+
+diff --git a/build/pkgs/nbconvert/spkg-configure.m4 b/build/pkgs/nbconvert/spkg-configure.m4
+new file mode 100644
+index 00000000..9b5dee3
+--- /dev/null
++++ b/build/pkgs/nbconvert/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([nbconvert], [SAGE_PYTHON_PACKAGE_CHECK([nbconvert])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From f0703b594e57c980d605aa9bc8316c45a7858b3b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:41:51 -0500
+Subject: Trac #29665: add Gentoo package information for jupyter_core.
+
+---
+ build/pkgs/jupyter_core/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyter_core/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyter_core/distros/gentoo.txt b/build/pkgs/jupyter_core/distros/gentoo.txt
+new file mode 100644
+index 00000000..f168c5a
+--- /dev/null
++++ b/build/pkgs/jupyter_core/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyter_core
+-- 
+cgit v1.0-1-gd88e
+
+
+From 061a307cc4a6680d8500fde834975064e59540d5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:42:48 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jupyter_core.
+
+---
+ build/pkgs/jupyter_core/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyter_core/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyter_core/spkg-configure.m4 b/build/pkgs/jupyter_core/spkg-configure.m4
+new file mode 100644
+index 00000000..67df9c3
+--- /dev/null
++++ b/build/pkgs/jupyter_core/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyter_core], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyter_core])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b85abe964ce0b98b5842efe9cbad9bdb1c89202f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:47:08 -0500
+Subject: Trac #29665: add Gentoo package information for jupyter_client.
+
+---
+ build/pkgs/jupyter_client/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyter_client/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyter_client/distros/gentoo.txt b/build/pkgs/jupyter_client/distros/gentoo.txt
+new file mode 100644
+index 00000000..4f1de88
+--- /dev/null
++++ b/build/pkgs/jupyter_client/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyter_client
+-- 
+cgit v1.0-1-gd88e
+
+
+From 86323ff1e0b2507933df6bc2a96c9175957640c5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:48:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jupyter_client.
+
+---
+ build/pkgs/jupyter_client/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyter_client/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyter_client/spkg-configure.m4 b/build/pkgs/jupyter_client/spkg-configure.m4
+new file mode 100644
+index 00000000..fbd3498
+--- /dev/null
++++ b/build/pkgs/jupyter_client/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyter_client], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyter_client])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a8475e27dd30d752d05ab6fea6579e8623501d82 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:48:58 -0500
+Subject: Trac #29665: add Gentoo package information for snowballstemmer.
+
+---
+ build/pkgs/snowballstemmer/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/snowballstemmer/distros/gentoo.txt
+
+diff --git a/build/pkgs/snowballstemmer/distros/gentoo.txt b/build/pkgs/snowballstemmer/distros/gentoo.txt
+new file mode 100644
+index 00000000..63fd851
+--- /dev/null
++++ b/build/pkgs/snowballstemmer/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/snowballstemmer
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0833c9b781062b4ed86d619e050a6f5d60e36080 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:49:38 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for snowballstemmer.
+
+---
+ build/pkgs/snowballstemmer/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/snowballstemmer/spkg-configure.m4
+
+diff --git a/build/pkgs/snowballstemmer/spkg-configure.m4 b/build/pkgs/snowballstemmer/spkg-configure.m4
+new file mode 100644
+index 00000000..6aa0882
+--- /dev/null
++++ b/build/pkgs/snowballstemmer/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([snowballstemmer], [
++  SAGE_PYTHON_PACKAGE_CHECK([snowballstemmer])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 50a1cf2a2bcd7eeec64cbc3f70e3e9fbe5d850fe Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:50:47 -0500
+Subject: Trac #29665: add Gentoo package information for tornado.
+
+---
+ build/pkgs/tornado/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tornado/distros/gentoo.txt
+
+diff --git a/build/pkgs/tornado/distros/gentoo.txt b/build/pkgs/tornado/distros/gentoo.txt
+new file mode 100644
+index 00000000..6ae4b9f
+--- /dev/null
++++ b/build/pkgs/tornado/distros/gentoo.txt
+@@ -0,0 +1 @@
++www-servers/tornado
+-- 
+cgit v1.0-1-gd88e
+
+
+From 118f4da6e03476c726363e8e22ecda32f13bfc33 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:51:26 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for tornado.
+
+---
+ build/pkgs/tornado/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/tornado/spkg-configure.m4
+
+diff --git a/build/pkgs/tornado/spkg-configure.m4 b/build/pkgs/tornado/spkg-configure.m4
+new file mode 100644
+index 00000000..1ee5bc9
+--- /dev/null
++++ b/build/pkgs/tornado/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([tornado], [SAGE_PYTHON_PACKAGE_CHECK([tornado])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 3850701747a6c8ef60840bdfdb589b28d4cd2b9a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:52:21 -0500
+Subject: Trac #29665: add Gentoo package information for jsonschema.
+
+---
+ build/pkgs/jsonschema/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jsonschema/distros/gentoo.txt
+
+diff --git a/build/pkgs/jsonschema/distros/gentoo.txt b/build/pkgs/jsonschema/distros/gentoo.txt
+new file mode 100644
+index 00000000..d708e4c
+--- /dev/null
++++ b/build/pkgs/jsonschema/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jsonschema
+-- 
+cgit v1.0-1-gd88e
+
+
+From 76e3917c8af781af00f642cfada7a79594429e30 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:54:03 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for jsonschema.
+
+---
+ build/pkgs/jsonschema/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jsonschema/spkg-configure.m4
+
+diff --git a/build/pkgs/jsonschema/spkg-configure.m4 b/build/pkgs/jsonschema/spkg-configure.m4
+new file mode 100644
+index 00000000..b9e5e21
+--- /dev/null
++++ b/build/pkgs/jsonschema/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([jsonschema], [SAGE_PYTHON_PACKAGE_CHECK([jsonschema])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From fd4a16c11669b6dd73ac6325bca820e76db00402 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:55:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ widgetsnbextension.
+
+---
+ build/pkgs/widgetsnbextension/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/widgetsnbextension/spkg-configure.m4
+
+diff --git a/build/pkgs/widgetsnbextension/spkg-configure.m4 b/build/pkgs/widgetsnbextension/spkg-configure.m4
+new file mode 100644
+index 00000000..bf82daf
+--- /dev/null
++++ b/build/pkgs/widgetsnbextension/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([widgetsnbextension], [
++  SAGE_PYTHON_PACKAGE_CHECK([widgetsnbextension])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8079a9f384e3c8480e157dd98c3db2f43c987f4e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:57:20 -0500
+Subject: Trac #29665: add Gentoo package information for importlib_resources.
+
+---
+ build/pkgs/importlib_resources/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/importlib_resources/distros/gentoo.txt
+
+diff --git a/build/pkgs/importlib_resources/distros/gentoo.txt b/build/pkgs/importlib_resources/distros/gentoo.txt
+new file mode 100644
+index 00000000..d5e1f2c
+--- /dev/null
++++ b/build/pkgs/importlib_resources/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/importlib_resources
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2c430d7c52f02779a6c41b98ac2f4edd8b6759c3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:58:00 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ importlib_resources.
+
+---
+ build/pkgs/importlib_resources/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/importlib_resources/spkg-configure.m4
+
+diff --git a/build/pkgs/importlib_resources/spkg-configure.m4 b/build/pkgs/importlib_resources/spkg-configure.m4
+new file mode 100644
+index 00000000..50df55b
+--- /dev/null
++++ b/build/pkgs/importlib_resources/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([importlib_resources], [
++  SAGE_PYTHON_PACKAGE_CHECK([importlib_resources])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 00d13d7bf2e50aae2ccef3b2b30293c70a922af2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:58:38 -0500
+Subject: Trac #29665: add Gentoo package information for kiwisolver.
+
+---
+ build/pkgs/kiwisolver/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/kiwisolver/distros/gentoo.txt
+
+diff --git a/build/pkgs/kiwisolver/distros/gentoo.txt b/build/pkgs/kiwisolver/distros/gentoo.txt
+new file mode 100644
+index 00000000..7b30c95
+--- /dev/null
++++ b/build/pkgs/kiwisolver/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/kiwisolver
+-- 
+cgit v1.0-1-gd88e
+
+
+From 72b7907ef7ea9fa4ff6948ea34cfe2f693ee6c31 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 19:59:09 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for kiwisolver.
+
+---
+ build/pkgs/kiwisolver/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/kiwisolver/spkg-configure.m4
+
+diff --git a/build/pkgs/kiwisolver/spkg-configure.m4 b/build/pkgs/kiwisolver/spkg-configure.m4
+new file mode 100644
+index 00000000..4e7ac97
+--- /dev/null
++++ b/build/pkgs/kiwisolver/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([kiwisolver], [SAGE_PYTHON_PACKAGE_CHECK([kiwisolver])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 479351279e4e0ea7e2d146434f0daba038765cfd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:00:04 -0500
+Subject: Trac #29665: add Gentoo package information for notebook.
+
+---
+ build/pkgs/notebook/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/notebook/distros/gentoo.txt
+
+diff --git a/build/pkgs/notebook/distros/gentoo.txt b/build/pkgs/notebook/distros/gentoo.txt
+new file mode 100644
+index 00000000..6475d72
+--- /dev/null
++++ b/build/pkgs/notebook/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/notebook
+-- 
+cgit v1.0-1-gd88e
+
+
+From f4d9242ea654977f8ad7865c82eec593e11a36bc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:01:42 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for notebook.
+
+---
+ build/pkgs/notebook/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/notebook/spkg-configure.m4
+
+diff --git a/build/pkgs/notebook/spkg-configure.m4 b/build/pkgs/notebook/spkg-configure.m4
+new file mode 100644
+index 00000000..a17ba95
+--- /dev/null
++++ b/build/pkgs/notebook/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([notebook], [SAGE_PYTHON_PACKAGE_CHECK([notebook])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9837070c7f8e9a71283b84d49d4fd2c94b78a464 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:02:38 -0500
+Subject: Trac #29665: add Gentoo package information for matplotlib_inline.
+
+---
+ build/pkgs/matplotlib_inline/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/matplotlib_inline/distros/gentoo.txt
+
+diff --git a/build/pkgs/matplotlib_inline/distros/gentoo.txt b/build/pkgs/matplotlib_inline/distros/gentoo.txt
+new file mode 100644
+index 00000000..6a5859c
+--- /dev/null
++++ b/build/pkgs/matplotlib_inline/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/matplotlib-inline
+-- 
+cgit v1.0-1-gd88e
+
+
+From 750be73b25b92b4875e47d044360ac0e1116ec3e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:03:28 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for matplotlib_inline.
+
+---
+ build/pkgs/matplotlib_inline/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/matplotlib_inline/spkg-configure.m4
+
+diff --git a/build/pkgs/matplotlib_inline/spkg-configure.m4 b/build/pkgs/matplotlib_inline/spkg-configure.m4
+new file mode 100644
+index 00000000..e59658f
+--- /dev/null
++++ b/build/pkgs/matplotlib_inline/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([matplotlib_inline], [
++  SAGE_PYTHON_PACKAGE_CHECK([matplotlib_inline])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 273505f49698dcd2ab30c2756b07113c9b7e7791 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:04:10 -0500
+Subject: Trac #29665: add Gentoo package information for ipykernel.
+
+---
+ build/pkgs/ipykernel/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipykernel/distros/gentoo.txt
+
+diff --git a/build/pkgs/ipykernel/distros/gentoo.txt b/build/pkgs/ipykernel/distros/gentoo.txt
+new file mode 100644
+index 00000000..88aab61
+--- /dev/null
++++ b/build/pkgs/ipykernel/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ipykernel
+-- 
+cgit v1.0-1-gd88e
+
+
+From 629ad36c9e4ae0cdff4a013289b4f2911442445e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:04:46 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for ipykernel.
+
+---
+ build/pkgs/ipykernel/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ipykernel/spkg-configure.m4
+
+diff --git a/build/pkgs/ipykernel/spkg-configure.m4 b/build/pkgs/ipykernel/spkg-configure.m4
+new file mode 100644
+index 00000000..94ecc2d
+--- /dev/null
++++ b/build/pkgs/ipykernel/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ipykernel], [SAGE_PYTHON_PACKAGE_CHECK([ipykernel])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b8d709edb6a24fd5868ee2818b56e78257b2eafa Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:05:26 -0500
+Subject: Trac #29665: add Gentoo package information for prompt_toolkit.
+
+---
+ build/pkgs/prompt_toolkit/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/prompt_toolkit/distros/gentoo.txt
+
+diff --git a/build/pkgs/prompt_toolkit/distros/gentoo.txt b/build/pkgs/prompt_toolkit/distros/gentoo.txt
+new file mode 100644
+index 00000000..6902484
+--- /dev/null
++++ b/build/pkgs/prompt_toolkit/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/prompt_toolkit
+-- 
+cgit v1.0-1-gd88e
+
+
+From 16c0b5e767ae4dac4440510b7253e5c8642b7d2c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:10:39 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for prompt_toolkit.
+
+---
+ build/pkgs/prompt_toolkit/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/prompt_toolkit/spkg-configure.m4
+
+diff --git a/build/pkgs/prompt_toolkit/spkg-configure.m4 b/build/pkgs/prompt_toolkit/spkg-configure.m4
+new file mode 100644
+index 00000000..fd8c1a6
+--- /dev/null
++++ b/build/pkgs/prompt_toolkit/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([prompt_toolkit], [
++  SAGE_PYTHON_PACKAGE_CHECK([prompt_toolkit])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0cd9283e8bb6c8ae413fc8f715c021f7ec3ca2c8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:12:10 -0500
+Subject: Trac #29665: add Gentoo package information for charset_normalizer.
+
+---
+ build/pkgs/charset_normalizer/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/charset_normalizer/distros/gentoo.txt
+
+diff --git a/build/pkgs/charset_normalizer/distros/gentoo.txt b/build/pkgs/charset_normalizer/distros/gentoo.txt
+new file mode 100644
+index 00000000..eefeb89
+--- /dev/null
++++ b/build/pkgs/charset_normalizer/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/charset_normalizer
+-- 
+cgit v1.0-1-gd88e
+
+
+From a04b01a9ab59097d189edcc5ddcb461faede83b2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:12:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ charset_normalizer.
+
+---
+ build/pkgs/charset_normalizer/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/charset_normalizer/spkg-configure.m4
+
+diff --git a/build/pkgs/charset_normalizer/spkg-configure.m4 b/build/pkgs/charset_normalizer/spkg-configure.m4
+new file mode 100644
+index 00000000..18b18cf
+--- /dev/null
++++ b/build/pkgs/charset_normalizer/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([charset_normalizer], [
++  SAGE_PYTHON_PACKAGE_CHECK([charset_normalizer])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From d2ea08138711c53046f977b586f33b09b176b2e3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:13:37 -0500
+Subject: Trac #29665: add Gentoo package information for prometheus_client.
+
+---
+ build/pkgs/prometheus_client/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/prometheus_client/distros/gentoo.txt
+
+diff --git a/build/pkgs/prometheus_client/distros/gentoo.txt b/build/pkgs/prometheus_client/distros/gentoo.txt
+new file mode 100644
+index 00000000..aa2889c
+--- /dev/null
++++ b/build/pkgs/prometheus_client/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/prometheus_client
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b0393200e9edd3e26b8a55ba67e5710e7403fcb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:15:09 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for prometheus_client.
+
+---
+ build/pkgs/prometheus_client/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/prometheus_client/spkg-configure.m4
+
+diff --git a/build/pkgs/prometheus_client/spkg-configure.m4 b/build/pkgs/prometheus_client/spkg-configure.m4
+new file mode 100644
+index 00000000..b494588
+--- /dev/null
++++ b/build/pkgs/prometheus_client/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([prometheus_client], [
++  SAGE_PYTHON_PACKAGE_CHECK([prometheus_client])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From cdcd85284f43ca4ad18353ec3527b2901e57b788 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:17:23 -0500
+Subject: Trac #29665: add Gentoo package information for pybind11.
+
+---
+ build/pkgs/pybind11/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pybind11/distros/gentoo.txt
+
+diff --git a/build/pkgs/pybind11/distros/gentoo.txt b/build/pkgs/pybind11/distros/gentoo.txt
+new file mode 100644
+index 00000000..0c500b3
+--- /dev/null
++++ b/build/pkgs/pybind11/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pybind11
+-- 
+cgit v1.0-1-gd88e
+
+
+From efdd1eb64c4799fe3cdf2221824182941b3fda2d Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:17:51 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pybind11.
+
+---
+ build/pkgs/pybind11/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pybind11/spkg-configure.m4
+
+diff --git a/build/pkgs/pybind11/spkg-configure.m4 b/build/pkgs/pybind11/spkg-configure.m4
+new file mode 100644
+index 00000000..cce1cf5
+--- /dev/null
++++ b/build/pkgs/pybind11/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pybind11], [SAGE_PYTHON_PACKAGE_CHECK([pybind11])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b2128f33b68ea33927284116ea598dd186902400 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:19:23 -0500
+Subject: Trac #29665: add Gentoo package information for pkgconfig.
+
+---
+ build/pkgs/pkgconfig/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pkgconfig/distros/gentoo.txt
+
+diff --git a/build/pkgs/pkgconfig/distros/gentoo.txt b/build/pkgs/pkgconfig/distros/gentoo.txt
+new file mode 100644
+index 00000000..32e8618
+--- /dev/null
++++ b/build/pkgs/pkgconfig/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pkgconfig
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5b373b49e06aadeb36dc57e500da9a322460e658 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:19:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pkgconfig.
+
+---
+ build/pkgs/pkgconfig/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pkgconfig/spkg-configure.m4
+
+diff --git a/build/pkgs/pkgconfig/spkg-configure.m4 b/build/pkgs/pkgconfig/spkg-configure.m4
+new file mode 100644
+index 00000000..6708293
+--- /dev/null
++++ b/build/pkgs/pkgconfig/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pkgconfig], [SAGE_PYTHON_PACKAGE_CHECK([pkgconfig])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From ce578729eb0d14baab365351ba9a9ffffb7b79f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:21:10 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_serializinghtml.
+
+---
+ build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt b/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+new file mode 100644
+index 00000000..38bca8f
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-serializinghtml
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb0f42c32bbce0e4488678312f5e2d88c6f42c9b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:21:54 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_serializinghtml.
+
+---
+ build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4 b/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+new file mode 100644
+index 00000000..be8e625
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_serializinghtml], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_serializinghtml])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From e47dcf985e40475de85c9436a85537751318bc3d Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:22:54 -0500
+Subject: Trac #29665: add Gentoo package information for sphinxcontrib_jsmath.
+
+---
+ build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt b/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+new file mode 100644
+index 00000000..041a471
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-jsmath
+-- 
+cgit v1.0-1-gd88e
+
+
+From 72cff6fd35f93de4fa855bc870569dd733ff5c24 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:23:49 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_jsmath.
+
+---
+ build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4 b/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+new file mode 100644
+index 00000000..e46bde2
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_jsmath], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_jsmath])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From a36395d70f759449cd63c1b0990fbdcb4cb25ca0 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:24:26 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_devhelp.
+
+---
+ build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..9b5c899
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-devhelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9953a5dd1646ed0ad51d2e3935cf609bc9e7fd1c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:25:04 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_devhelp.
+
+---
+ build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+new file mode 100644
+index 00000000..8728136
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_devhelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_devhelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From b199d5363aad93f3cb23f7904c9553a28b06348f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:25:53 -0500
+Subject: Trac #29665: add Gentoo package information for sphinxcontrib_qthelp.
+
+---
+ build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..7210099
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-qthelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 94ac8806739f3938e73f5857328e91e0d42e98d2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:26:28 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_qthelp.
+
+---
+ build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+new file mode 100644
+index 00000000..81ea5e1
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_qthelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_qthelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From beedc154aa405e8a58aee8889f510db07adc89a7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:26:54 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_applehelp.
+
+---
+ build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..66ac8da
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-applehelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From 07d47c3673d6b35423b71f621cb400989c0101c2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:27:19 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_applehelp.
+
+---
+ build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+new file mode 100644
+index 00000000..e834aed
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_applehelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_applehelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 333a66546c5d421735c49dbafd7370a827f22781 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:27:46 -0500
+Subject: Trac #29665: add Gentoo package information for
+ sphinxcontrib_htmlhelp.
+
+---
+ build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+new file mode 100644
+index 00000000..e080bac
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinxcontrib-htmlhelp
+-- 
+cgit v1.0-1-gd88e
+
+
+From bfaeb3962254439b63f1f2e0e883de462c7831be Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:29:18 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ sphinxcontrib_htmlhelp.
+
+---
+ build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+
+diff --git a/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+new file mode 100644
+index 00000000..c77b003
+--- /dev/null
++++ b/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([sphinxcontrib_htmlhelp], [
++  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_htmlhelp])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 782cde13da06e8b85806cb7cbc8aceee0364e639 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:30:23 -0500
+Subject: Trac #29665: add Gentoo package information for jupyterlab_pygments.
+
+---
+ build/pkgs/jupyterlab_pygments/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+
+diff --git a/build/pkgs/jupyterlab_pygments/distros/gentoo.txt b/build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+new file mode 100644
+index 00000000..c57b4f1
+--- /dev/null
++++ b/build/pkgs/jupyterlab_pygments/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/jupyterlab_pygments
+-- 
+cgit v1.0-1-gd88e
+
+
+From 39f974cfa4a8c6e5dd897f152f83ec82f40ee9f7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 10 Nov 2021 20:31:13 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ jupyterlab_pygments.
+
+---
+ build/pkgs/jupyterlab_pygments/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/jupyterlab_pygments/spkg-configure.m4
+
+diff --git a/build/pkgs/jupyterlab_pygments/spkg-configure.m4 b/build/pkgs/jupyterlab_pygments/spkg-configure.m4
+new file mode 100644
+index 00000000..e46e21f
+--- /dev/null
++++ b/build/pkgs/jupyterlab_pygments/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([jupyterlab_pygments], [
++  SAGE_PYTHON_PACKAGE_CHECK([jupyterlab_pygments])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From db704620700fd36cec3bf6125938f3ee00a9eb5e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:29:15 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for ply.
+
+---
+ build/pkgs/ply/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ply/spkg-configure.m4
+
+diff --git a/build/pkgs/ply/spkg-configure.m4 b/build/pkgs/ply/spkg-configure.m4
+new file mode 100644
+index 00000000..ffb0030
+--- /dev/null
++++ b/build/pkgs/ply/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([ply], [SAGE_PYTHON_PACKAGE_CHECK([ply])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6aac31dabcdfdef228d7780398a3fda1a4cc566f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:29:51 -0500
+Subject: Trac #29665: add Gentoo package information for ply.
+
+---
+ build/pkgs/ply/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/ply/distros/gentoo.txt
+
+diff --git a/build/pkgs/ply/distros/gentoo.txt b/build/pkgs/ply/distros/gentoo.txt
+new file mode 100644
+index 00000000..c8b1630
+--- /dev/null
++++ b/build/pkgs/ply/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/ply
+-- 
+cgit v1.0-1-gd88e
+
+
+From bb8d3372936ec37470d69687a0f91592129460ae Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:30:33 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for gast.
+
+---
+ build/pkgs/gast/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/gast/spkg-configure.m4
+
+diff --git a/build/pkgs/gast/spkg-configure.m4 b/build/pkgs/gast/spkg-configure.m4
+new file mode 100644
+index 00000000..26ec59f
+--- /dev/null
++++ b/build/pkgs/gast/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([gast], [SAGE_PYTHON_PACKAGE_CHECK([gast])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1cdc4046a88f1c2b4e5c162f66c6db6090b24194 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:31:15 -0500
+Subject: Trac #29665: add Gentoo package information for gast.
+
+---
+ build/pkgs/gast/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/gast/distros/gentoo.txt
+
+diff --git a/build/pkgs/gast/distros/gentoo.txt b/build/pkgs/gast/distros/gentoo.txt
+new file mode 100644
+index 00000000..3be5e7e
+--- /dev/null
++++ b/build/pkgs/gast/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/gast
+-- 
+cgit v1.0-1-gd88e
+
+
+From 96068b8a3742b65d619190e1d9fa5db399e6b4f2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:32:20 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for pythran.
+
+---
+ build/pkgs/pythran/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pythran/spkg-configure.m4
+
+diff --git a/build/pkgs/pythran/spkg-configure.m4 b/build/pkgs/pythran/spkg-configure.m4
+new file mode 100644
+index 00000000..592e95b
+--- /dev/null
++++ b/build/pkgs/pythran/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([pythran], [SAGE_PYTHON_PACKAGE_CHECK([pythran])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 1fa0fad3ae8f7e559c6fc315c6773a7d8aac0bfb Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:32:55 -0500
+Subject: Trac #29665: add Gentoo package information for pythran.
+
+---
+ build/pkgs/pythran/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/pythran/distros/gentoo.txt
+
+diff --git a/build/pkgs/pythran/distros/gentoo.txt b/build/pkgs/pythran/distros/gentoo.txt
+new file mode 100644
+index 00000000..1bb7cdc
+--- /dev/null
++++ b/build/pkgs/pythran/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/pythran
+-- 
+cgit v1.0-1-gd88e
+
+
+From d26370e5b8c88e76abfb7c27e3defb71c9e9f711 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:33:50 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for beniget.
+
+---
+ build/pkgs/beniget/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/beniget/spkg-configure.m4
+
+diff --git a/build/pkgs/beniget/spkg-configure.m4 b/build/pkgs/beniget/spkg-configure.m4
+new file mode 100644
+index 00000000..8ae6101
+--- /dev/null
++++ b/build/pkgs/beniget/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([beniget], [SAGE_PYTHON_PACKAGE_CHECK([beniget])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From eeeb296ed9b9694a865534103fd58e62a151ef5e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:34:22 -0500
+Subject: Trac #29665: add Gentoo package information for beniget.
+
+---
+ build/pkgs/beniget/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/beniget/distros/gentoo.txt
+
+diff --git a/build/pkgs/beniget/distros/gentoo.txt b/build/pkgs/beniget/distros/gentoo.txt
+new file mode 100644
+index 00000000..1a5972c
+--- /dev/null
++++ b/build/pkgs/beniget/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/beniget
+-- 
+cgit v1.0-1-gd88e
+
+
+From 078b2ff272d0eeff5cce40ad7eb176d9ddd7bdff Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:35:37 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for alabaster.
+
+---
+ build/pkgs/alabaster/spkg-configure.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/alabaster/spkg-configure.m4
+
+diff --git a/build/pkgs/alabaster/spkg-configure.m4 b/build/pkgs/alabaster/spkg-configure.m4
+new file mode 100644
+index 00000000..4eca6e0
+--- /dev/null
++++ b/build/pkgs/alabaster/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([alabaster], [SAGE_PYTHON_PACKAGE_CHECK([alabaster])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7dc264353e5f64110431ff28c1b8b7e89699e9bd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:36:06 -0500
+Subject: Trac #29665: add Gentoo package information for alabaster.
+
+---
+ build/pkgs/alabaster/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/alabaster/distros/gentoo.txt
+
+diff --git a/build/pkgs/alabaster/distros/gentoo.txt b/build/pkgs/alabaster/distros/gentoo.txt
+new file mode 100644
+index 00000000..cffece6
+--- /dev/null
++++ b/build/pkgs/alabaster/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/alabaster
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8011a5e675e7e61a77ce34a299ee961a9f44253f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:43:59 -0500
+Subject: Trac #29665: standard python spkg-configure.m4 for
+ importlib_metadata.
+
+---
+ build/pkgs/importlib_metadata/spkg-configure.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 build/pkgs/importlib_metadata/spkg-configure.m4
+
+diff --git a/build/pkgs/importlib_metadata/spkg-configure.m4 b/build/pkgs/importlib_metadata/spkg-configure.m4
+new file mode 100644
+index 00000000..0554e52
+--- /dev/null
++++ b/build/pkgs/importlib_metadata/spkg-configure.m4
+@@ -0,0 +1,3 @@
++SAGE_SPKG_CONFIGURE([importlib_metadata], [
++  SAGE_PYTHON_PACKAGE_CHECK([importlib_metadata])
++])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 928ca0019e3ec6c4541a16b28bcc6710df6d010b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 20:44:28 -0500
+Subject: Trac #29665: add Gentoo package information for importlib_metadata.
+
+---
+ build/pkgs/importlib_metadata/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/importlib_metadata/distros/gentoo.txt
+
+diff --git a/build/pkgs/importlib_metadata/distros/gentoo.txt b/build/pkgs/importlib_metadata/distros/gentoo.txt
+new file mode 100644
+index 00000000..4f92786
+--- /dev/null
++++ b/build/pkgs/importlib_metadata/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/importlib_metadata
+-- 
+cgit v1.0-1-gd88e
+
+
+From 135f184f7498a2046065e669723e68efe2d65cee Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 30 Dec 2021 21:16:58 -0500
+Subject: Trac #29665: fix sage.misc.package doctest with system alabaster.
+
+When alabaster from the system is used, these tests won't be able to
+find its SPKG installed. Add some ellipses, and switch one test to
+look for sage_conf instead.
+---
+ src/sage/misc/package.py | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/sage/misc/package.py b/src/sage/misc/package.py
+index 84f3d50..c7ad206 100644
+--- a/src/sage/misc/package.py
++++ b/src/sage/misc/package.py
+@@ -386,9 +386,9 @@ def installed_packages(exclude_pip=True):
+     EXAMPLES::
+ 
+         sage: sorted(installed_packages().keys())  # optional - build
+-        [...'gmpy2', ...'sage_conf', ...]
+-        sage: installed_packages()['gmpy2']  # optional - build, random
+-        '2.1.0b5'
++        [...'sage_conf', ...]
++        sage: installed_packages()['sage_conf']  # optional - build, random
++        '9.5'
+ 
+     .. SEEALSO::
+ 
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/trac-32867-system_maxima-ed39aba734cb4ded0b04165fa142b5cf4c38fd23.patch b/srcpkgs/sagemath/patches/trac-32867-system_maxima-ed39aba734cb4ded0b04165fa142b5cf4c38fd23.patch
new file mode 100644
index 000000000000..8edbde0ce76f
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-32867-system_maxima-ed39aba734cb4ded0b04165fa142b5cf4c38fd23.patch
@@ -0,0 +1,247 @@
+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
+ 
+-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 fbce694..b40cda6 100644
+--- a/pkgs/sage-conf/sage_conf.py.in
++++ b/pkgs/sage-conf/sage_conf.py.in
+@@ -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.
+ MAXIMA_FAS = "@SAGE_MAXIMA_FAS@".replace('${prefix}', SAGE_LOCAL)
+ 
+diff --git a/src/bin/sage b/src/bin/sage
+index fcd2630..54b69a1 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/sage/env.py b/src/sage/env.py
+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"))
+ 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 fc7f48b..7313c7d 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 917059d..c966a3c 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')
+-- 
+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/patches/trac-33047-musl_fix_find_library-dc1a0e8168a9ffb4fbf07dd03c0846b4933a6dbe.patch b/srcpkgs/sagemath/patches/trac-33047-musl_fix_find_library-dc1a0e8168a9ffb4fbf07dd03c0846b4933a6dbe.patch
new file mode 100644
index 000000000000..3d4f4e14bb7b
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33047-musl_fix_find_library-dc1a0e8168a9ffb4fbf07dd03c0846b4933a6dbe.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: Add a patch that fixes ctypes.util.find_library('c')
+
+The issue causes a failure doctesting src/sage/misc/gperftools.py
+---
+ 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 00000000..82f436b
+--- /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):
+-- 
+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-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch b/srcpkgs/sagemath/patches/trac-33064-sage_docbuild_ignore_cache_save_permission_error-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
new file mode 100644
index 000000000000..04f04cfd6718
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33064-sage_docbuild_ignore_cache_save_permission_error-e89193f4f32246ad9ded6d37f1f2f12a589a81f4.patch
@@ -0,0 +1,32 @@
+From e89193f4f32246ad9ded6d37f1f2f12a589a81f4 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 466ca82..f8c8ebd 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/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch b/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
new file mode 100644
index 000000000000..04fca4815a00
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-88dd9f3a1611fed0cc66fb838eb85739646dd34d.patch
@@ -0,0 +1,131 @@
+From 18d0477153af6f453a0e84f78030535f6a36ce87 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 c788623..527ed90 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 - sagemath_doc_html
+-        sage: thematic_index = os.path.join(SAGE_DOC, "html", "en", "thematic_tutorials", "index.html")  # optional - sagemath_doc_html
++        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 - sagemath_doc_html
+         ....:     if "padics" in line:
+         ....:         _ = sys.stdout.write(line)
+diff --git a/src/sage/misc/sagedoc.py b/src/sage/misc/sagedoc.py
+index 4c56aea..583ca06 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 - sagemath_doc_html
+-    sage: docfilename = os.path.join(SAGE_DOC, 'html', 'en', 'reference', 'calculus', 'sage', 'symbolic', 'expression.html')  # optional - sagemath_doc_html
++    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 - sagemath_doc_html
+     ....:     for line in fobj:
+     ....:         if "#sage.symbolic.expression.Expression.numerical_approx" in line:
+@@ -845,12 +845,12 @@ def _search_src_or_doc(what, string, extra1='', extra2='', extra3='',
+ 
+     ::
+ 
+-        sage: from sage.misc.sagedoc import _search_src_or_doc  # optional - sagemath_doc_html
+-        sage: len(_search_src_or_doc('src', r'matrix\(', 'incidence_structures', 'self', 'combinat', interact=False).splitlines()) > 1  # optional - sagemath_doc_html
++        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 - sagemath_doc_html, long time (4s on sage.math, 2012)
+         True
+-        sage: 'divisors' in _search_src_or_doc('src', '^ *def prime', interact=False)  # optional - sagemath_doc_html
++        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
+@@ -1369,7 +1369,7 @@ class _sage_doc:
+ 
+         sage: browse_sage_doc._open("reference", testing=True)[0]  # optional - sagemath_doc_html, indirect doctest
+         'http://localhost:8000/doc/live/reference/index.html'
+-        sage: browse_sage_doc(identity_matrix, 'rst')[-107:-47]  # optional - sagemath_doc_html
++        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 88dd9f3a1611fed0cc66fb838eb85739646dd34d 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 f8c8ebd..d329009 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 - sagemath_doc_html
+         ....:     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 - sagemath_doc_html
+             '.../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 - sagemath_doc_html
+             '.../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 - sagemath_doc_html
+             '.../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 - sagemath_doc_html
+             '.../html/en/reference'
+         """
+         if lang is None:
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch b/srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.patch
new file mode 100644
index 000000000000..7fdb3d697222
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33127-test_sage_site_executable-424de0923cb3d44d010e3e2f9bd7bc75d5c30234.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: 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 4c0fa17..153e610 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
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch b/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
new file mode 100644
index 000000000000..350c41ac3928
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
@@ -0,0 +1,35 @@
+From 53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6 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: sagetex: Fix a warning when byte-compiling sagetexparse.py
+
+---
+ build/pkgs/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 00000000..d82ab67
+--- /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'
++ 
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/trac-33189-fix_doctests_for_arb_2.22-53532ddd4e2dc92469c1590ebf0c40f8f69bf579.patch b/srcpkgs/sagemath/patches/trac-33189-fix_doctests_for_arb_2.22-53532ddd4e2dc92469c1590ebf0c40f8f69bf579.patch
new file mode 100644
index 000000000000..b861af7ec982
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33189-fix_doctests_for_arb_2.22-53532ddd4e2dc92469c1590ebf0c40f8f69bf579.patch
@@ -0,0 +1,126 @@
+From 24cc94b1988a90f3bd22a2368ec30c086283af13 Mon Sep 17 00:00:00 2001
+From: Antonio Rojas <arojas@archlinux.org>
+Date: Sun, 16 Jan 2022 11:55:04 +0100
+Subject: Add abs tol to some arb tests
+
+---
+ src/sage/functions/error.py    |  2 +-
+ src/sage/rings/complex_arb.pyx |  6 +++---
+ src/sage/rings/real_arb.pyx    | 10 +++++-----
+ 3 files changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/src/sage/functions/error.py b/src/sage/functions/error.py
+index f48d04f..06f0b24 100644
+--- a/src/sage/functions/error.py
++++ b/src/sage/functions/error.py
+@@ -267,7 +267,7 @@ class Function_erf(BuiltinFunction):
+ 
+         Check that real ball evaluation is fixed :trac:`28061`::
+ 
+-            sage: RealBallField(128)(erf(5))
++            sage: RealBallField(128)(erf(5)) # abs tol 1e-38
+             [0.99999999999846254020557196514981165651 +/- 7.33e-39]
+         """
+         R = parent or s_parent(x)
+diff --git a/src/sage/rings/complex_arb.pyx b/src/sage/rings/complex_arb.pyx
+index f986970..93ff565 100644
+--- a/src/sage/rings/complex_arb.pyx
++++ b/src/sage/rings/complex_arb.pyx
+@@ -3974,8 +3974,8 @@ cdef class ComplexBall(RingElement):
+ 
+         EXAMPLES::
+ 
+-            sage: CBF(20).erfc()
+-            [5.39586561160790e-176 +/- ...e-191]
++            sage: CBF(20).erfc() # abs tol 1e-190
++            [5.39586561160790e-176 +/- 6.73e-191]
+             sage: CBF(100, 100).erfc()
+             [0.00065234366376858 +/- ...e-18] + [-0.00393572636292141 +/- ...e-18]*I
+         """
+@@ -4280,7 +4280,7 @@ cdef class ComplexBall(RingElement):
+ 
+         TESTS:
+ 
+-            sage: CBF(Shi(I))
++            sage: CBF(Shi(I)) # abs tol 1e-15
+             [0.946083070367183 +/- 9.22e-16]*I
+         """
+         cdef ComplexBall result = self._new()
+diff --git a/src/sage/rings/real_arb.pyx b/src/sage/rings/real_arb.pyx
+index 4a81784..292bfea 100644
+--- a/src/sage/rings/real_arb.pyx
++++ b/src/sage/rings/real_arb.pyx
+@@ -3506,7 +3506,7 @@ cdef class RealBall(RingElement):
+ 
+         EXAMPLES::
+ 
+-            sage: RBF(1/2).erf()
++            sage: RBF(1/2).erf() # abs tol 1e-16
+             [0.520499877813047 +/- 6.10e-16]
+         """
+         cdef RealBall res = self._new()
+@@ -3556,12 +3556,12 @@ cdef class RealBall(RingElement):
+ 
+         EXAMPLES::
+ 
+-            sage: RBF(1).Si()
++            sage: RBF(1).Si() # abs tol 1e-15
+             [0.946083070367183 +/- 9.22e-16]
+ 
+         TESTS::
+ 
+-            sage: RBF(Si(1))
++            sage: RBF(Si(1)) # abs tol 1e-15
+             [0.946083070367183 +/- 9.22e-16]
+         """
+         cdef RealBall res = self._new()
+@@ -3578,12 +3578,12 @@ cdef class RealBall(RingElement):
+ 
+         EXAMPLES::
+ 
+-            sage: RBF(1).Ci()  # abs tol 1e-16
++            sage: RBF(1).Ci()  # abs tol 1e-15
+             [0.337403922900968 +/- 3.25e-16]
+ 
+         TESTS::
+ 
+-            sage: RBF(Ci(1))  # abs tol 1e-16
++            sage: RBF(Ci(1))  # abs tol 1e-15
+             [0.337403922900968 +/- 3.25e-16]
+         """
+         cdef RealBall res = self._new()
+-- 
+cgit v1.0-1-gd88e
+
+
+From 53532ddd4e2dc92469c1590ebf0c40f8f69bf579 Mon Sep 17 00:00:00 2001
+From: Antonio Rojas <arojas@archlinux.org>
+Date: Sun, 16 Jan 2022 14:16:53 +0100
+Subject: Decrease abs tol
+
+---
+ src/sage/rings/real_arb.pyx | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/sage/rings/real_arb.pyx b/src/sage/rings/real_arb.pyx
+index 292bfea..eb30f7f 100644
+--- a/src/sage/rings/real_arb.pyx
++++ b/src/sage/rings/real_arb.pyx
+@@ -3578,12 +3578,12 @@ cdef class RealBall(RingElement):
+ 
+         EXAMPLES::
+ 
+-            sage: RBF(1).Ci()  # abs tol 1e-15
++            sage: RBF(1).Ci()  # abs tol 5e-16
+             [0.337403922900968 +/- 3.25e-16]
+ 
+         TESTS::
+ 
+-            sage: RBF(Ci(1))  # abs tol 1e-15
++            sage: RBF(Ci(1))  # abs tol 5e-16
+             [0.337403922900968 +/- 3.25e-16]
+         """
+         cdef RealBall res = self._new()
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch b/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
new file mode 100644
index 000000000000..7ef3826aa4d2
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-dont_run_pytest--see_31924.patch
@@ -0,0 +1,27 @@
+diff --git a/src/bin/sage-runtests b/src/bin/sage-runtests
+index 589dc8cd37..6bb8bf99a4 100755
+--- a/src/bin/sage-runtests
++++ b/src/bin/sage-runtests
+@@ -154,21 +154,4 @@ if __name__ == "__main__":
+     DC = DocTestController(args, args.filenames)
+     err = DC.run()
+ 
+-    try:
+-        exit_code_pytest = 0
+-        import pytest
+-        pytest_options = ["--import-mode", "importlib"]
+-        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.")
+-
+-    if err == 0:
+-        sys.exit(exit_code_pytest)
+-    else:
+-        sys.exit(err)
++    sys.exit(err)
diff --git a/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch b/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
new file mode 100644
index 000000000000..ca360dee9f6e
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fix_long_time_test--see_33091.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage/matrix/matrix2.pyx b/src/sage/matrix/matrix2.pyx
+index 7d319bd54b..c1a2eed6f1 100644
+--- a/src/sage/matrix/matrix2.pyx
++++ b/src/sage/matrix/matrix2.pyx
+@@ -17215,7 +17215,7 @@ cdef class Matrix(Matrix1):
+ 
+             sage: set_random_seed()
+             sage: K = random_cone(max_ambient_dim=5)
+-            sage: all(L.change_ring(SR).is_Z_operator_on(K)
++            sage: all(L.change_ring(SR).is_Z_operator_on(K) # long time
+             ....:     for L in K.Z_operators_gens())  # long time
+             True
+ 
diff --git a/srcpkgs/sagemath/patches/zzz-fix_no_SAGE_BIN.patch b/srcpkgs/sagemath/patches/zzz-fix_no_SAGE_BIN.patch
new file mode 100644
index 000000000000..ac80085bd6b4
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fix_no_SAGE_BIN.patch
@@ -0,0 +1,12 @@
+--- a/src/sage/misc/dist.py
++++ b/src/sage/misc/dist.py
+@@ -108,7 +108,8 @@ def install_scripts(directory=None, ignore_existing=False):
+     PATH = os.environ['PATH'].split(os.pathsep)
+     PATH = [d for d in PATH if os.path.exists(d)]
+     dir_in_path = any(os.path.samefile(directory, d) for d in PATH)
+-    PATH = os.pathsep.join(d for d in PATH
++    if os.path.exists(SAGE_BIN):
++        PATH = os.pathsep.join(d for d in PATH
+                            if not os.path.samefile(d, SAGE_BIN))
+     for cmd in ['gap', 'gp', 'hg', 'ipython', 'maxima',
+                 'mwrank', 'R', 'singular', 'sqlite3', 'M2', 'kash']:
diff --git a/srcpkgs/sagemath/patches/zzz-fix_no_venv_packages.patch b/srcpkgs/sagemath/patches/zzz-fix_no_venv_packages.patch
new file mode 100644
index 000000000000..7b19169a91d9
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fix_no_venv_packages.patch
@@ -0,0 +1,13 @@
+diff --git a/build/make/Makefile.in b/build/make/Makefile.in
+index 0baddba4ae..be363bea71 100644
+--- a/build/make/Makefile.in
++++ b/build/make/Makefile.in
+@@ -624,7 +624,7 @@ $(1)-$(4)-no-deps:
+ 		SAGE_SPKG_WHEELS=$$($(4))/var/lib/sage/wheels \
+ 		SAGE_INST_LOCAL=$$($(4)) \
+ 		sage-logger -p '$$(SAGE_ROOT)/build/pkgs/$(1)/spkg-install' '$$(SAGE_LOGS)/$(1)-$(2).log' && \
+-	    touch "$$($(4))/$(SPKG_INST_RELDIR)/$(1)-$(2)"; \
++	    mkdir -p "$$($(4))/$(SPKG_INST_RELDIR)" && touch "$$($(4))/$(SPKG_INST_RELDIR)/$(1)-$(2)"; \
+ 	else \
+ 	    echo; \
+ 	    echo "Error: $(1) is a dummy script package that the Sage distribution uses"; \
diff --git a/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch b/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
new file mode 100644
index 000000000000..741d2b23a7f5
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fixes_for_system_gap--see_29644.patch
@@ -0,0 +1,96 @@
+From 346b4ea4c92f4287d3c097b92817cf2abfcddd8c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Thu, 13 Jan 2022 01:41:31 -0300
+Subject: [PATCH] gap: fixes for using system gap
+
+ - fix _get_shared_lib_path() so we don't need to configure GAP_SO
+ - fix gap_root() so we don't need to configure GAP_ROOT_DIR
+ - skip a useless test that cannot succeed on system gap
+ - use gap_root() in saved_workspace.py instead of GAP_ROOT_DIR
+---
+ src/sage/env.py                      |  2 +-
+ src/sage/libs/gap/saved_workspace.py |  4 ++--
+ src/sage/libs/gap/util.pyx           | 11 +++++++++++
+ src/sage_setup/optional_extension.py |  2 +-
+ 4 files changed, 15 insertions(+), 4 deletions(-)
+
+diff --git a/src/sage/env.py b/src/sage/env.py
+index c4953cfa65..c16696d298 100644
+--- a/src/sage/env.py
++++ b/src/sage/env.py
+@@ -293,7 +293,7 @@ def _get_shared_lib_path(*libnames: str) -> Optional[str]:
+             if sys.platform == 'darwin':
+                 ext = 'dylib'
+             else:
+-                ext = 'so'
++                ext = 'so*'
+ 
+             if SAGE_LOCAL:
+                 search_directories.append(Path(SAGE_LOCAL) / 'lib')
+diff --git a/src/sage/libs/gap/saved_workspace.py b/src/sage/libs/gap/saved_workspace.py
+index ad5adec36d..59c498795f 100644
+--- a/src/sage/libs/gap/saved_workspace.py
++++ b/src/sage/libs/gap/saved_workspace.py
+@@ -8,7 +8,7 @@ workspaces.
+ 
+ import os
+ import glob
+-from sage.env import GAP_ROOT_DIR
++from sage.libs.gap.util import gap_root
+ from sage.interfaces.gap_workspace import gap_workspace_file
+ 
+ 
+@@ -31,7 +31,7 @@ def timestamp():
+     """
+     libgap_dir = os.path.dirname(__file__)
+     libgap_files = glob.glob(os.path.join(libgap_dir, '*'))
+-    gap_packages = glob.glob(os.path.join(GAP_ROOT_DIR, 'pkg', '*'))
++    gap_packages = glob.glob(os.path.join(gap_root(), 'pkg', '*'))
+     files = libgap_files + gap_packages
+     if len(files) == 0:
+         print('Unable to find LibGAP files.')
+diff --git a/src/sage/libs/gap/util.pyx b/src/sage/libs/gap/util.pyx
+index 08c4c40cc0..c7dd557c35 100644
+--- a/src/sage/libs/gap/util.pyx
++++ b/src/sage/libs/gap/util.pyx
+@@ -23,6 +23,7 @@ from cysignals.signals cimport sig_on, sig_off
+ import os
+ import warnings
+ import sage.env
++import subprocess
+ 
+ from .gap_includes cimport *
+ from .element cimport *
+@@ -178,6 +179,16 @@ def gap_root():
+     if os.path.exists(sage.env.GAP_ROOT_DIR):
+         return sage.env.GAP_ROOT_DIR
+ 
++    gap_expr = 'JoinStringsWithSeparator(KERNEL_INFO().GAP_ROOT_PATHS,";")'
++    gap_root_paths = subprocess.getoutput(
++        f"gap -r -q --bare --nointeract -c 'Display({gap_expr});'"
++        ).strip().split(';')
++
++    for gapdir in gap_root_paths:
++        if os.path.exists(os.path.join(gapdir, 'sysinfo.gap')):
++            sage.env.GAP_ROOT_DIR = gapdir
++            return gapdir
++
+     # Attempt to figure out the appropriate GAP_ROOT by reading the
+     # local/bin/gap shell script; this is an ugly hack that exists for
+     # historical reasons; the best approach to setting where Sage looks for
+diff --git a/src/sage_setup/optional_extension.py b/src/sage_setup/optional_extension.py
+index f252849384..4034e3e196 100644
+--- a/src/sage_setup/optional_extension.py
++++ b/src/sage_setup/optional_extension.py
+@@ -80,7 +80,7 @@ def OptionalExtension(*args, **kwds):
+         sage: print(ext.__class__.__name__)
+         CythonizeExtension
+         sage: ext = OptionalExtension("foo", ["foo.c"], package="gap")
+-        sage: print(ext.__class__.__name__)
++        sage: print(ext.__class__.__name__)     # not tested - fails with system gap
+         Extension
+     """
+     try:
+-- 
+2.34.1
+
diff --git a/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch b/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
new file mode 100644
index 000000000000..093e3d56eb33
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
@@ -0,0 +1,42 @@
+More site packages not included in trac 29665
+
+diff --git a/build/pkgs/gmpy2/spkg-configure.m4 b/build/pkgs/gmpy2/spkg-configure.m4
+new file mode 100644
+index 0000000000..2d0390f7db
+--- /dev/null
++++ b/build/pkgs/gmpy2/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([gmpy2], [SAGE_PYTHON_PACKAGE_CHECK([gmpy2])])
+diff --git a/build/pkgs/sphinx/spkg-configure.m4 b/build/pkgs/sphinx/spkg-configure.m4
+new file mode 100644
+index 0000000000..e149fbb2cf
+--- /dev/null
++++ b/build/pkgs/sphinx/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([sphinx], [SAGE_PYTHON_PACKAGE_CHECK([sphinx])])
+diff --git a/build/pkgs/typing_extensions/spkg-configure.m4 b/build/pkgs/typing_extensions/spkg-configure.m4
+new file mode 100644
+index 0000000000..d475fd8257
+--- /dev/null
++++ b/build/pkgs/typing_extensions/spkg-configure.m4
+@@ -0,0 +1 @@
++SAGE_SPKG_CONFIGURE([typing_extensions], [SAGE_PYTHON_PACKAGE_CHECK([typing_extensions])])
+-- 
+diff --git a/build/pkgs/gmpy2/install-requires.txt b/build/pkgs/gmpy2/install-requires.txt
+index 51d24518ef..c25feff557 100644
+--- a/build/pkgs/gmpy2/install-requires.txt
++++ b/build/pkgs/gmpy2/install-requires.txt
+@@ -1,3 +1 @@
+-# We would like to write gmpy2 >=2.1.0b5, but pipenv does not accept prereleases in version ranges
+-# https://github.com/pypa/pipenv/issues/1760
+-gmpy2 ==2.1.0rc1
++gmpy2 >=2.1
+diff --git a/build/pkgs/ptyprocess/install-requires.txt b/build/pkgs/ptyprocess/install-requires.txt
+index de89260872..7c336f636c 100644
+--- a/build/pkgs/ptyprocess/install-requires.txt
++++ b/build/pkgs/ptyprocess/install-requires.txt
+@@ -1,3 +1,3 @@
+-ptyprocess ==0.5.1
++ptyprocess
+ # https://trac.sagemath.org/ticket/31280#comment:42 and following
+ # sagelib is not compatible with ptyprocess 0.5.2, 0.6, and 0.7
diff --git a/srcpkgs/sagemath/patches/zzz-remove_ratpoints.patch b/srcpkgs/sagemath/patches/zzz-remove_ratpoints.patch
new file mode 100644
index 000000000000..0842d9d7f6d5
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-remove_ratpoints.patch
@@ -0,0 +1,887 @@
+From 3178a5e1e4f7174343fd913494ae255b3e05fb85 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Mon, 17 Jan 2022 21:04:42 -0300
+Subject: [PATCH] ratpoints: remove deprecated package
+
+---
+ .github/workflows/ci-cygwin-minimal.yml       |   2 +-
+ .github/workflows/ci-cygwin-standard.yml      |   2 +-
+ COPYING.txt                                   |   1 -
+ build/pkgs/ratpoints/SPKG.rst                 |  29 --
+ build/pkgs/ratpoints/checksums.ini            |   4 -
+ build/pkgs/ratpoints/dependencies             |   5 -
+ build/pkgs/ratpoints/distros/arch.txt         |   1 -
+ build/pkgs/ratpoints/distros/conda.txt        |   1 -
+ build/pkgs/ratpoints/distros/debian.txt       |   1 -
+ build/pkgs/ratpoints/distros/nix.txt          |   1 -
+ build/pkgs/ratpoints/distros/repology.txt     |   1 -
+ build/pkgs/ratpoints/package-version.txt      |   1 -
+ build/pkgs/ratpoints/patches/Makefile.patch   |  37 ---
+ .../patches/sturm_and_rp_private.patch        | 194 ------------
+ build/pkgs/ratpoints/spkg-install.in          |  46 ---
+ build/pkgs/ratpoints/type                     |   1 -
+ build/pkgs/sagelib/dependencies               |   2 +-
+ src/sage/libs/ratpoints.pxd                   |  74 -----
+ src/sage/libs/ratpoints.pyx                   | 283 ------------------
+ .../elliptic_curves/descent_two_isogeny.pyx   |   2 -
+ src/sage_setup/library_order.py               |   2 +-
+ 21 files changed, 4 insertions(+), 686 deletions(-)
+ delete mode 100644 build/pkgs/ratpoints/SPKG.rst
+ delete mode 100644 build/pkgs/ratpoints/checksums.ini
+ delete mode 100644 build/pkgs/ratpoints/dependencies
+ delete mode 100644 build/pkgs/ratpoints/distros/arch.txt
+ delete mode 100644 build/pkgs/ratpoints/distros/conda.txt
+ delete mode 100644 build/pkgs/ratpoints/distros/debian.txt
+ delete mode 100644 build/pkgs/ratpoints/distros/nix.txt
+ delete mode 100644 build/pkgs/ratpoints/distros/repology.txt
+ delete mode 100644 build/pkgs/ratpoints/package-version.txt
+ delete mode 100644 build/pkgs/ratpoints/patches/Makefile.patch
+ delete mode 100644 build/pkgs/ratpoints/patches/sturm_and_rp_private.patch
+ delete mode 100644 build/pkgs/ratpoints/spkg-install.in
+ delete mode 100644 build/pkgs/ratpoints/type
+ delete mode 100644 src/sage/libs/ratpoints.pxd
+ delete mode 100644 src/sage/libs/ratpoints.pyx
+
+diff --git a/.github/workflows/ci-cygwin-minimal.yml b/.github/workflows/ci-cygwin-minimal.yml
+index 9e847e7474..9df1365657 100644
+--- a/.github/workflows/ci-cygwin-minimal.yml
++++ b/.github/workflows/ci-cygwin-minimal.yml
+@@ -217,7 +217,7 @@ jobs:
+     env:
+       STAGE: ii-b
+       PREVIOUS_STAGES: i-*
+-      TARGETS: singular maxima gap pari gfan palp flintqs ratpoints arb ecm givaro
++      TARGETS: singular maxima gap pari gfan palp flintqs arb ecm givaro
+       LOCAL_ARTIFACT_NAME: sage-local-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
+       LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
+ 
+diff --git a/.github/workflows/ci-cygwin-standard.yml b/.github/workflows/ci-cygwin-standard.yml
+index cbbe0f46a8..8aee1c2c3c 100644
+--- a/.github/workflows/ci-cygwin-standard.yml
++++ b/.github/workflows/ci-cygwin-standard.yml
+@@ -217,7 +217,7 @@ jobs:
+     env:
+       STAGE: ii-b
+       PREVIOUS_STAGES: i-*
+-      TARGETS: singular maxima gap pari gfan palp flintqs ratpoints arb ecm givaro
++      TARGETS: singular maxima gap pari gfan palp flintqs arb ecm givaro
+       LOCAL_ARTIFACT_NAME: sage-local-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
+       LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
+ 
+diff --git a/COPYING.txt b/COPYING.txt
+index 1176a856a0..a3e9cc6645 100644
+--- a/COPYING.txt
++++ b/COPYING.txt
+@@ -107,7 +107,6 @@ pynac                       GPLv2+
+ pyparsing                   MIT License
+ python                      Python License (see below)
+ R                           GPLv2+
+-ratpoints                   GPLv2+
+ readline                    GPLv3+
+ rpy                         GPLv2+
+ rubiks/dietz                GPL, any version
+diff --git a/build/pkgs/ratpoints/SPKG.rst b/build/pkgs/ratpoints/SPKG.rst
+deleted file mode 100644
+index 6607094bec..0000000000
+--- a/build/pkgs/ratpoints/SPKG.rst
++++ /dev/null
+@@ -1,29 +0,0 @@
+-ratpoints: Find rational points on hyperelliptic curves
+-=======================================================
+-
+-Description
+------------
+-
+-Michael Stoll's program which searches for rational points on
+-hyperelliptic curves.
+-
+-NOTE: the ratpoints package has been assimilated by PARI/GP. Therefore,
+-this package (as Sage package) is deprecated. In the future, it will be
+-removed from Sage.
+-
+-
+-Upstream Contact
+-----------------
+-
+--  Author: Michael Stoll
+--  Email: Michael.Stoll@uni-bayreuth.de
+--  Website: http://www.mathe2.uni-bayreuth.de/stoll/programs/
+-
+-
+-Note on SSE2 instructions
+-~~~~~~~~~~~~~~~~~~~~~~~~~
+-
+--  On several architectures, the SSE2 instructions used by ratpoints
+-   cause
+-   compiler errors. In the case that ratpoints fails to build with SSE2
+-   instructions enabled, the build is repeated with SSE2 disabled.
+diff --git a/build/pkgs/ratpoints/checksums.ini b/build/pkgs/ratpoints/checksums.ini
+deleted file mode 100644
+index 46ba1c9ec1..0000000000
+--- a/build/pkgs/ratpoints/checksums.ini
++++ /dev/null
+@@ -1,4 +0,0 @@
+-tarball=ratpoints-VERSION.tar.bz2
+-sha1=14fbc3dd50742794e0b33d2dd1217e5dd8ad2623
+-md5=9bf091d1b90132433f0a1fc6b585d024
+-cksum=670991933
+diff --git a/build/pkgs/ratpoints/dependencies b/build/pkgs/ratpoints/dependencies
+deleted file mode 100644
+index 9a77ea16f7..0000000000
+--- a/build/pkgs/ratpoints/dependencies
++++ /dev/null
+@@ -1,5 +0,0 @@
+-$(MP_LIBRARY)
+-
+-----------
+-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/ratpoints/distros/arch.txt b/build/pkgs/ratpoints/distros/arch.txt
+deleted file mode 100644
+index e137758627..0000000000
+--- a/build/pkgs/ratpoints/distros/arch.txt
++++ /dev/null
+@@ -1 +0,0 @@
+-ratpoints
+diff --git a/build/pkgs/ratpoints/distros/conda.txt b/build/pkgs/ratpoints/distros/conda.txt
+deleted file mode 100644
+index e137758627..0000000000
+--- a/build/pkgs/ratpoints/distros/conda.txt
++++ /dev/null
+@@ -1 +0,0 @@
+-ratpoints
+diff --git a/build/pkgs/ratpoints/distros/debian.txt b/build/pkgs/ratpoints/distros/debian.txt
+deleted file mode 100644
+index dabd28d624..0000000000
+--- a/build/pkgs/ratpoints/distros/debian.txt
++++ /dev/null
+@@ -1 +0,0 @@
+-libratpoints-dev
+diff --git a/build/pkgs/ratpoints/distros/nix.txt b/build/pkgs/ratpoints/distros/nix.txt
+deleted file mode 100644
+index e137758627..0000000000
+--- a/build/pkgs/ratpoints/distros/nix.txt
++++ /dev/null
+@@ -1 +0,0 @@
+-ratpoints
+diff --git a/build/pkgs/ratpoints/distros/repology.txt b/build/pkgs/ratpoints/distros/repology.txt
+deleted file mode 100644
+index e137758627..0000000000
+--- a/build/pkgs/ratpoints/distros/repology.txt
++++ /dev/null
+@@ -1 +0,0 @@
+-ratpoints
+diff --git a/build/pkgs/ratpoints/package-version.txt b/build/pkgs/ratpoints/package-version.txt
+deleted file mode 100644
+index efed46a7bd..0000000000
+--- a/build/pkgs/ratpoints/package-version.txt
++++ /dev/null
+@@ -1 +0,0 @@
+-2.1.3.p5
+diff --git a/build/pkgs/ratpoints/patches/Makefile.patch b/build/pkgs/ratpoints/patches/Makefile.patch
+deleted file mode 100644
+index 093d7c0018..0000000000
+--- a/build/pkgs/ratpoints/patches/Makefile.patch
++++ /dev/null
+@@ -1,37 +0,0 @@
+---- src/Makefile	2009-10-01 01:08:54.000000000 +0200
+-+++ patches/Makefile	2012-03-17 13:57:33.026315142 +0100
+-@@ -21,11 +21,11 @@
+- #
+- #    Michael Stoll, September 21, 2009
+- 
+--CC = gcc
+-+CC ?= gcc
+- RM = rm -f
+- INSTALL = cp
+- 
+--INSTALL_DIR = /usr/local
+-+INSTALL_DIR ?= /usr/local
+- 
+- DISTFILES = Makefile ratpoints.h rp-private.h primes.h \
+-             gen_find_points_h.c gen_init_sieve_h.c \
+-@@ -47,14 +47,14 @@
+- 	diff -q testbase rptest.out
+- 
+- install-bin: ratpoints
+--	${INSTALL} ratpoints ${INSTALL_DIR}/bin/
+--	chmod 755 ${INSTALL_DIR}/bin/ratpoints
+-+	${INSTALL} ratpoints "${INSTALL_DIR}/bin/"
+-+	chmod 755 "${INSTALL_DIR}/bin/ratpoints"
+- 
+- install-lib: ratpoints.h libratpoints.a
+--	${INSTALL} ratpoints.h ${INSTALL_DIR}/include/
+--	chmod 644 ${INSTALL_DIR}/include/ratpoints.h
+--	${INSTALL} libratpoints.a ${INSTALL_DIR}/lib/
+--	chmod 644 ${INSTALL_DIR}/lib/libratpoints.a
+-+	${INSTALL} ratpoints.h "${INSTALL_DIR}/include/"
+-+	chmod 644 "${INSTALL_DIR}/include/ratpoints.h"
+-+	${INSTALL} libratpoints.a "${INSTALL_DIR}/lib/"
+-+	chmod 644 "${INSTALL_DIR}/lib/libratpoints.a"
+- 
+- install: install-bin install-lib
+- 
+diff --git a/build/pkgs/ratpoints/patches/sturm_and_rp_private.patch b/build/pkgs/ratpoints/patches/sturm_and_rp_private.patch
+deleted file mode 100644
+index 664198c4de..0000000000
+--- a/build/pkgs/ratpoints/patches/sturm_and_rp_private.patch
++++ /dev/null
+@@ -1,194 +0,0 @@
+-diff --git a/rp-private.h b/rp-private.h
+-index b4c7dad..0c7193e 100644
+---- a/rp-private.h
+-+++ b/rp-private.h
+-@@ -36,7 +36,7 @@
+- #define LONG_SHIFT ((LONG_LENGTH == 16) ? 4 : \
+-                     (LONG_LENGTH == 32) ? 5 : \
+- 		    (LONG_LENGTH == 64) ? 6 : 0)
+--#define LONG_MASK (~(-1L<<LONG_SHIFT))
+-+#define LONG_MASK (~(-(1L<<LONG_SHIFT)))
+- 
+- /* Check if SSE instructions can be used.
+-    We assume that one SSE word of 128 bit is two long's,
+-diff --git a/sturm.c b/sturm.c
+-index c78d7c6..5fd2cf5 100644
+---- a/sturm.c
+-+++ b/sturm.c
+-@@ -27,7 +27,6 @@
+-  ***********************************************************************/
+- 
+- #include "ratpoints.h"
+--
+- /**************************************************************************
+-  * Arguments of _ratpoints_compute_sturm() : (from the args argument)     *
+-  *                                                                        *
+-@@ -53,7 +52,7 @@
+- /* A helper function: evaluate the polynomial in cofs[] of given degree
+-   at num/2^denexp and return the sign. */
+- 
+--static long eval_sign(ratpoints_args *args, mpz_t *cofs, long degree,
+-+static long eval_sign(const ratpoints_args *args, const mpz_t *cofs, long degree,
+-                       long num, long denexp)
+- {
+-   long n, e, s;
+-@@ -70,11 +69,80 @@ static long eval_sign(ratpoints_args *args, mpz_t *cofs, long degree,
+-   return(s);
+- }
+- 
+-+static const    long max = (long)(((unsigned long)(-1))>>1);
+-+static const    long min = (long)(-(((unsigned long)(-1))>>1));
+-+    /* recursive helper function */
+-+static void iterate(long nl, long nr, long del, long der, long cleft, long cright,
+-+                 long sl, long sr, long depth,
+-+		 ratpoints_interval **iptr, const ratpoints_interval *ivlo,
+-+		 const ratpoints_args *args, const long k, const long sturm_degs[],
+-+                 const mpz_t sturm[][args->degree + 1])
+-+    { /* nl/2^del, nr/2^der : interval left/right endpoints,
+-+         cleft, cright: sign change counts at endpoints,
+-+         sl, sr: signs at endpoints,
+-+         depth: iteration depth */
+-+     long iter = args->sturm;
+-+      if(cleft == cright && sl < 0) { return; }
+-+         /* here we know the polynomial is negative on the interval */
+-+      if((cleft == cright && sl > 0) || depth >= iter)
+-+      /* we have to add/extend an interval if we either know that
+-+         the polynomial is positive on the interval (first condition)
+-+         or the maximal iteration depth has been reached (second condition) */
+-+      { double l = ((double)nl)/((double)(1<<del));
+-+        double u = ((double)nr)/((double)(1<<der));
+-+        if(*iptr == ivlo)
+-+        { (*iptr)->low = l; (*iptr)->up  = u; (*iptr)++; }
+-+        else
+-+        { if(((*iptr)-1)->up == l) /* extend interval */
+-+          { ((*iptr)-1)->up = u; }
+-+          else /* new interval */
+-+          { (*iptr)->low = l; (*iptr)->up  = u; (*iptr)++; }
+-+        }
+-+        return;
+-+      }
+-+      /* now we must split the interval and evaluate the sturm sequence
+-+         at the midpoint */
+-+      { long nm, dem, s0, s1, s2, s, cmid = 0, n;
+-+        if(nl == min)
+-+        { if(nr == max) { nm = 0; dem = 0; }
+-+          else { nm = (nr == 0) ? -1 : 2*nr; dem = 0; }
+-+        }
+-+        else
+-+        { if(nr == max) { nm = (nl == 0) ? 1 : 2*nl; dem = 0; }
+-+          else /* "normal" case */
+-+          { if(del == der) /* then both are zero */
+-+            { if(((nl+nr) & 1) == 0) { nm = (nl+nr)>>1; dem = 0; }
+-+              else { nm = nl+nr; dem = 1; }
+-+            }
+-+            else /* here one de* is greater */
+-+            { if(del > der) { nm = nl + (nr<<(del-der)); dem = del+1; }
+-+              else { nm = (nl<<(der-del)) + nr; dem = der+1; }
+-+            }
+-+          }
+-+        }
+-+        s0 = eval_sign(args, sturm[0], sturm_degs[0], nm, dem);
+-+        s1 = eval_sign(args, sturm[1], sturm_degs[1], nm, dem);
+-+        if(s0*s1 == -1) { cmid++; }
+-+        s = (s1 == 0) ? s0 : s1;
+-+        for(n = 2; n <= k; n++)
+-+        { s2 = eval_sign(args, sturm[n], sturm_degs[n], nm, dem);
+-+          if(s2 == -s) { cmid++; s = s2; }
+-+          else if(s2 != 0) { s = s2; }
+-+        }
+-+        /* now recurse */
+-+        iterate(nl, nm, del, dem, cleft, (s0==0) ? (cmid+1) : cmid,
+-+                sl, (s0==0) ? -s1 : s0, depth+1,
+-+                iptr, ivlo, args, k, sturm_degs, sturm);
+-+        iterate(nm, nr, dem, der, cmid, cright,
+-+                (s0==0) ? s1 : s0, sr, depth+1,
+-+		iptr, ivlo, args, k, sturm_degs, sturm);
+-+      }
+-+    } /* end iterate() */
+-+
+- long _ratpoints_compute_sturm(ratpoints_args *args)
+- { 
+-   mpz_t *cofs = args->cof;
+-   long degree = args->degree;
+--  long iter = args->sturm; 
+-   ratpoints_interval *ivlist = args->domain;
+-   long num_iv = args->num_inter;
+-   long n, m, k, new_num;
+-@@ -165,75 +233,12 @@ long _ratpoints_compute_sturm(ratpoints_args *args)
+-   /* recall: typedef struct {double low; double up;} ratpoints_interval; */
+-   { ratpoints_interval ivlocal[1 + (degree>>1)];
+-     ratpoints_interval *iptr = &ivlocal[0];
+--    long max = (long)(((unsigned long)(-1))>>1);
+--    long min = -max;
+-     long num_intervals;
+-     long slcf = mpz_cmp_si(cofs[degree], 0);
+- 
+--    /* recursive helper function */
+--    void iterate(long nl, long nr, long del, long der, long cleft, long cright,
+--                 long sl, long sr, long depth)
+--    { /* nl/2^del, nr/2^der : interval left/right endpoints,
+--         cleft, cright: sign change counts at endpoints,
+--         sl, sr: signs at endpoints,
+--         depth: iteration depth */
+--      if(cleft == cright && sl < 0) { return; }
+--         /* here we know the polynomial is negative on the interval */
+--      if((cleft == cright && sl > 0) || depth >= iter) 
+--      /* we have to add/extend an interval if we either know that
+--         the polynomial is positive on the interval (first condition)
+--         or the maximal iteration depth has been reached (second condition) */
+--      { double l = ((double)nl)/((double)(1<<del));
+--        double u = ((double)nr)/((double)(1<<der));
+--        if(iptr == &ivlocal[0])
+--        { iptr->low = l; iptr->up  = u; iptr++; }
+--        else
+--        { if((iptr-1)->up == l) /* extend interval */
+--          { (iptr-1)->up = u; }
+--          else /* new interval */
+--          { iptr->low = l; iptr->up  = u; iptr++; }
+--        }
+--        return; 
+--      }
+--      /* now we must split the interval and evaluate the sturm sequence
+--         at the midpoint */
+--      { long nm, dem, s0, s1, s2, s, cmid = 0, n;
+--        if(nl == min)
+--        { if(nr == max) { nm = 0; dem = 0; }
+--          else { nm = (nr == 0) ? -1 : 2*nr; dem = 0; }
+--        }
+--        else
+--        { if(nr == max) { nm = (nl == 0) ? 1 : 2*nl; dem = 0; } 
+--          else /* "normal" case */
+--          { if(del == der) /* then both are zero */
+--            { if(((nl+nr) & 1) == 0) { nm = (nl+nr)>>1; dem = 0; }
+--              else { nm = nl+nr; dem = 1; } 
+--            }
+--            else /* here one de* is greater */
+--            { if(del > der) { nm = nl + (nr<<(del-der)); dem = del+1; }
+--              else { nm = (nl<<(der-del)) + nr; dem = der+1; }
+--            }
+--          }
+--        }
+--        s0 = eval_sign(args, sturm[0], sturm_degs[0], nm, dem);
+--        s1 = eval_sign(args, sturm[1], sturm_degs[1], nm, dem);
+--        if(s0*s1 == -1) { cmid++; }
+--        s = (s1 == 0) ? s0 : s1;
+--        for(n = 2; n <= k; n++)
+--        { s2 = eval_sign(args, sturm[n], sturm_degs[n], nm, dem);
+--          if(s2 == -s) { cmid++; s = s2; }
+--          else if(s2 != 0) { s = s2; }
+--        }
+--        /* now recurse */
+--        iterate(nl, nm, del, dem, cleft, (s0==0) ? (cmid+1) : cmid, 
+--                sl, (s0==0) ? -s1 : s0, depth+1);
+--        iterate(nm, nr, dem, der, cmid, cright, 
+--                (s0==0) ? s1 : s0, sr, depth+1);
+--      }
+--    } /* end iterate() */
+--
+-     iterate(min, max, 0, 0, count2, count1, 
+--            (degree & 1) ? -slcf : slcf, slcf, 0);
+-+            (degree & 1) ? -slcf : slcf, slcf, 0,
+-+	    &iptr, &ivlocal[0], args, k, sturm_degs, sturm);
+-     num_intervals = iptr - &ivlocal[0];
+-     /* intersect with given intervals */
+-     { ratpoints_interval local_copy[num_iv];
+diff --git a/build/pkgs/ratpoints/spkg-install.in b/build/pkgs/ratpoints/spkg-install.in
+deleted file mode 100644
+index b6856c4d4a..0000000000
+--- a/build/pkgs/ratpoints/spkg-install.in
++++ /dev/null
+@@ -1,46 +0,0 @@
+-PRIME_SIZE=7
+-
+-CCFLAGS_NO_SSE="-I$SAGE_LOCAL/include -Wall -O2 -fPIC -DRATPOINTS_MAX_BITS_IN_PRIME=$PRIME_SIZE"
+-CCFLAGS2="-L$SAGE_LOCAL/lib -lgmp -lm $LDFLAGS"
+-CCFLAGS3="-L. -lratpoints"
+-
+-if [[ "$UNAME" = "Darwin" ]]; then
+-    CCFLAGS1="$CCFLAGS_NO_SSE"
+-    echo "Building without SSE2 instructions (MacOS X)."
+-else
+-    CCFLAGS1="$CCFLAGS_NO_SSE -DUSE_SSE"
+-    echo "Attempting to build ratpoints making use of SSE2 instructions."
+-fi
+-
+-# Copy CFLAGS set externally to CCFLAGS.
+-CCFLAGS="$CFLAGS"
+-
+-export CCFLAGS1
+-export CCFLAGS2
+-export CCFLAGS3
+-export CCFLAGS
+-
+-cd src/
+-
+-#############################
+-# Build (just) the library: #
+-#############################
+-
+-# PLEASE, don't break this again by deleting "libratpoints.a".  See trac 8267.
+-if ! $MAKE libratpoints.a; then
+-    [ "$UNAME" = "Darwin" ] && sdh_die "Error building ratpoints."
+-    echo "Build failed. Trying without SSE2 instructions."
+-    CCFLAGS1="$CCFLAGS_NO_SSE"
+-    sdh_make libratpoints.a
+-fi
+-
+-##############################################
+-# Install (just) the library and its header: #
+-##############################################
+-
+-# The following requires that the Makefile got patched;
+-# otherwise one could pass 'INSTALL_DIR=...' on the 'make'
+-# command line:
+-export INSTALL_DIR="$SAGE_DESTDIR_LOCAL"
+-mkdir -p "$INSTALL_DIR"/{lib,include}
+-sdh_make install-lib
+diff --git a/build/pkgs/ratpoints/type b/build/pkgs/ratpoints/type
+deleted file mode 100644
+index a6a7b9cd72..0000000000
+--- a/build/pkgs/ratpoints/type
++++ /dev/null
+@@ -1 +0,0 @@
+-standard
+diff --git a/build/pkgs/sagelib/dependencies b/build/pkgs/sagelib/dependencies
+index 9c7797b1f4..6a7d4b8132 100644
+--- a/build/pkgs/sagelib/dependencies
++++ b/build/pkgs/sagelib/dependencies
+@@ -1,4 +1,4 @@
+-FORCE $(SCRIPTS) arb boost_cropped $(BLAS) brial cliquer cypari cysignals cython ecl eclib ecm flint libgd gap giac givaro glpk gmpy2 gsl iml jinja2 jupyter_core lcalc lrcalc libbraiding libhomfly libpng linbox m4ri m4rie memory_allocator mpc mpfi mpfr $(MP_LIBRARY) ntl numpy pari pip pkgconfig planarity ppl pplpy primesieve primecount primecountpy pycygwin $(PYTHON) ratpoints requests rw sage_conf singular symmetrica zn_poly $(PCFILES) | $(PYTHON_TOOLCHAIN) sage_setup
++FORCE $(SCRIPTS) arb boost_cropped $(BLAS) brial cliquer cypari cysignals cython ecl eclib ecm flint libgd gap giac givaro glpk gmpy2 gsl iml jinja2 jupyter_core lcalc lrcalc libbraiding libhomfly libpng linbox m4ri m4rie memory_allocator mpc mpfi mpfr $(MP_LIBRARY) ntl numpy pari pip pkgconfig planarity ppl pplpy primesieve primecount primecountpy pycygwin $(PYTHON) requests rw sage_conf singular symmetrica zn_poly $(PCFILES) | $(PYTHON_TOOLCHAIN) sage_setup
+ 
+ ----------
+ All lines of this file are ignored except the first.
+diff --git a/src/sage/libs/ratpoints.pxd b/src/sage/libs/ratpoints.pxd
+deleted file mode 100644
+index 67e309b109..0000000000
+--- a/src/sage/libs/ratpoints.pxd
++++ /dev/null
+@@ -1,74 +0,0 @@
+-from sage.rings.integer cimport Integer
+-from sage.libs.gmp.mpz cimport *
+-
+-cdef extern from "ratpoints.h":
+-    long RATPOINTS_MAX_DEGREE
+-    long RATPOINTS_ARRAY_SIZE
+-    long RATPOINTS_DEFAULT_SP1
+-    long RATPOINTS_DEFAULT_SP2
+-    long RATPOINTS_DEFAULT_NUM_PRIMES
+-    long RATPOINTS_DEFAULT_MAX_FORBIDDEN
+-    long RATPOINTS_DEFAULT_STURM
+-    long RATPOINTS_NON_SQUAREFREE
+-    long RATPOINTS_BAD_ARGS
+-
+-    # for args flags:
+-    long RATPOINTS_NO_CHECK # when set, do not check whether the surviving
+-                            # x-coordinates give rise to rational points
+-    long RATPOINTS_NO_Y # when set, only list x coordinates instead of actual points
+-    long RATPOINTS_NO_REVERSE # when set, do not modify the mpz_t array
+-    long RATPOINTS_NO_JACOBI # when set, prevent use of Jacobi symbol test
+-    long RATPOINTS_VERBOSE # when set, print some output on what ratpoints is doing
+-    # define RATPOINTS_FLAGS_INPUT_MASK \
+-    # (RATPOINTS_NO_CHECK | RATPOINTS_NO_Y | RATPOINTS_NO_REVERSE | \
+-    #  RATPOINTS_NO_JACOBI | RATPOINTS_VERBOSE)
+-
+-
+-    ctypedef struct ratpoints_interval:
+-        double low
+-        double up
+-    ctypedef struct ratpoints_args:
+-        mpz_t *cof
+-        long degree
+-        long height
+-        ratpoints_interval *domain
+-        long num_inter
+-        long b_low
+-        long b_high
+-        long sp1
+-        long sp2
+-        long array_size
+-        long sturm
+-        long num_primes
+-        long max_forbidden
+-        unsigned int flags
+-        # from here: private data
+-        # mpz_t *work
+-        # void *se_buffer
+-        # void *se_next
+-        # void *ba_buffer
+-        # void *ba_next
+-        # int *int_buffer
+-        # int *int_next
+-        # void *sieve_list
+-    long find_points(ratpoints_args*, int proc(long, long, mpz_t, void*, int*), void*)
+-    void find_points_init(ratpoints_args*)
+-    long find_points_work(ratpoints_args*, int proc(long, long, mpz_t, void*, int*), void*)
+-    void find_points_clear(ratpoints_args*)
+-
+-ctypedef struct point_list:
+-    long *xes
+-    mpz_t *ys
+-    long *zs
+-    long array_size
+-    long num_points
+-    long max_num_points
+-
+-ctypedef struct info_struct_exists_only:
+-    int verbose
+-
+-cdef int ratpoints_mpz_exists_only(mpz_t *, long, int, bint) except -1
+-
+-
+-
+-
+diff --git a/src/sage/libs/ratpoints.pyx b/src/sage/libs/ratpoints.pyx
+deleted file mode 100644
+index 257dfe3eeb..0000000000
+--- a/src/sage/libs/ratpoints.pyx
++++ /dev/null
+@@ -1,283 +0,0 @@
+-# distutils: libraries = ratpoints
+-r"""
+-Hyperelliptic Curve Point Finding, via ratpoints (deprecated)
+-
+-This module is deprecated, use PARI instead::
+-
+-    sage: pari(EllipticCurve("389a1")).ellratpoints(4)
+-    [[-2, 0], [-2, -1], [-1, 1], [-1, -2], [0, 0], [0, -1], [1, 0], [1, -1], [3, 5], [3, -6], [4, 8], [4, -9], [-3/4, 7/8], [-3/4, -15/8]]
+-    sage: pari("[x^3 + x^2 - 2*x, 1]").hyperellratpoints(4)
+-    [[-2, 0], [-2, -1], [-1, 1], [-1, -2], [0, 0], [0, -1], [1, 0], [1, -1], [3, 5], [3, -6], [4, 8], [4, -9], [-3/4, 7/8], [-3/4, -15/8]]
+-"""
+-
+-from cysignals.memory cimport sig_malloc, sig_realloc, sig_free
+-from cysignals.signals cimport sig_on, sig_off
+-
+-from sage.misc.superseded import deprecation_cython as deprecation
+-deprecation(24531, "the module sage.libs.ratpoints is deprecated; use pari.ellratpoints or pari.hyperellratpoints instead")
+-
+-
+-cdef int process(long x, long z, mpz_t y, void *info0, int *quit):
+-    # ratpoints calls this function when it finds a point [x : y : z]
+-    # info0 is the pointer passed to ratpoints originally
+-    # if quit[0] is set to a nonzero value, ratpoints will abort immediately
+-    cdef point_list *plist = <point_list *> info0
+-    cdef long i
+-    if plist.array_size == plist.num_points:
+-        i = plist.array_size
+-        plist.array_size *= 2
+-        plist.xes = <long *> sig_realloc(plist.xes, plist.array_size * sizeof(long))
+-        plist.ys = <mpz_t *> sig_realloc(plist.ys, plist.array_size * sizeof(mpz_t))
+-        plist.zs = <long *> sig_realloc(plist.zs, plist.array_size * sizeof(long))
+-        while i < plist.array_size:
+-            mpz_init(plist.ys[i])
+-            i += 1
+-    plist.xes[plist.num_points] = x
+-    mpz_set(plist.ys[plist.num_points], y)
+-    plist.zs[plist.num_points] = z
+-    plist.num_points += 1
+-    if plist.max_num_points > 0:
+-        if plist.max_num_points == plist.num_points:
+-            quit[0] = -1
+-    return 1 # weight for counting the points
+-
+-def ratpoints(list coeffs, long H, verbose=False, long max=0,
+-              min_x_denom=None, max_x_denom=None, intervals=[]):
+-    """
+-    Access the ratpoints library to find points on the hyperelliptic curve:
+-
+-    `y^2 = a_n x^n + \cdots + a_1 x + a_0.`
+-
+-    INPUT:
+-
+-    - ``coeffs`` -- list of integer coefficients `a_0` , `a_1`, ..., `a_n`
+-
+-    - ``H`` -- the bound for the denominator and the absolute value of the
+-      numerator of the `x`-coordinate
+-
+-    - ``verbose`` -- if ``True``, ratpoints will print comments about
+-      its progress
+-
+-    - ``max`` -- maximum number of points to find (if 0, find all of them)
+-
+-    OUTPUT:
+-
+-    The points output by this program are points in (1, ceil(n/2), 1)-weighted
+-    projective space. If n is even, then the associated homogeneous equation is
+-    `y^2 = a_n x^n + \cdots + a_1 x z^{n-1} + a_0 z^n` while if n is odd, it is
+-    `y^2 = a_n x^n z + \cdots + a_1 x z^n + a_0 z^{n+1}`.
+-
+-    EXAMPLES::
+-
+-        sage: from sage.libs.ratpoints import ratpoints
+-        doctest:...: DeprecationWarning: the module sage.libs.ratpoints is deprecated; use pari.ellratpoints or pari.hyperellratpoints instead
+-        See http://trac.sagemath.org/24531 for details.
+-        sage: for x,y,z in ratpoints([1..6], 200):
+-        ....:     print(-1*y^2 + 1*z^6 + 2*x*z^5 + 3*x^2*z^4 + 4*x^3*z^3 + 5*x^4*z^2 + 6*x^5*z)
+-        0
+-        0
+-        0
+-        0
+-        0
+-        0
+-        0
+-        sage: for x,y,z in ratpoints([1..5], 200):
+-        ....:    print(-1*y^2 + 1*z^4 + 2*x*z^3 + 3*x^2*z^2 + 4*x^3*z + 5*x^4)
+-        0
+-        0
+-        0
+-        0
+-        0
+-        0
+-        0
+-        0
+-
+-        sage: for x,y,z in ratpoints([1..200], 1000):
+-        ....:    print("{} {} {}".format(x,y,z))
+-        1 0 0
+-        0 1 1
+-        0 -1 1
+-        201 25353012004564588029934064107520000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 200
+-        201 -25353012004564588029934064107520000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 200
+-
+-    The denominator of `x` can be restricted, for example to find
+-    integral points::
+-
+-        sage: from sage.libs.ratpoints import ratpoints
+-        sage: coeffs = [400, -112, 0, 1]
+-        sage: ratpoints(coeffs, 10^6, max_x_denom=1, intervals=[[-10,0],[1000,2000]])
+-        [(1, 0, 0), (-8, 28, 1), (-8, -28, 1), (-7, 29, 1), (-7, -29, 1),
+-         (-4, 28, 1), (-4, -28, 1), (0, 20, 1), (0, -20, 1), (1368, 50596, 1),
+-         (1368, -50596, 1), (1624, 65444, 1), (1624, -65444, 1)]
+-
+-        sage: ratpoints(coeffs, 1000, min_x_denom=100, max_x_denom=200)
+-        [(1, 0, 0),
+-        (-656, 426316, 121),
+-        (-656, -426316, 121),
+-        (452, 85052, 121),
+-        (452, -85052, 121),
+-        (988, 80036, 121),
+-        (988, -80036, 121),
+-        (-556, 773188, 169),
+-        (-556, -773188, 169),
+-        (264, 432068, 169),
+-        (264, -432068, 169)]
+-
+-    Finding the integral points on the compact component of an elliptic curve::
+-
+-        sage: E = EllipticCurve([0,1,0,-35220,-1346400])
+-        sage: e1, e2, e3 = E.division_polynomial(2).roots(multiplicities=False)
+-        sage: coeffs = [E.a6(),E.a4(),E.a2(),1]
+-        sage: ratpoints(coeffs, 1000, max_x_denom=1, intervals=[[e3,e2]])
+-        [(1, 0, 0),
+-        (-165, 0, 1),
+-        (-162, 366, 1),
+-        (-162, -366, 1),
+-        (-120, 1080, 1),
+-        (-120, -1080, 1),
+-        (-90, 1050, 1),
+-        (-90, -1050, 1),
+-        (-85, 1020, 1),
+-        (-85, -1020, 1),
+-        (-42, 246, 1),
+-        (-42, -246, 1),
+-        (-40, 0, 1)]
+-    """
+-    cdef ratpoints_args args
+-    cdef long i, total, verby
+-    cdef Integer sage_int, s_x, s_y, s_z
+-    cdef point_list *plist
+-
+-
+-    verby = ~0 if verbose else 0
+-
+-    # Set the coefficient array:
+-    coeffs = [Integer(a) for a in coeffs]
+-    args.degree = len(coeffs)-1
+-    args.cof = <mpz_t *> sig_malloc((args.degree+1) * sizeof(mpz_t))
+-
+-    # Create an array to hold the points found:
+-    plist = <point_list *> sig_malloc(sizeof(point_list))
+-    if max == 0:
+-        plist.array_size = 64
+-    else:
+-        plist.array_size = max
+-    plist.xes = <long *> sig_malloc(plist.array_size * sizeof(long))
+-    plist.ys = <mpz_t *> sig_malloc(plist.array_size * sizeof(mpz_t))
+-    for i from 0 <= i < plist.array_size:
+-        mpz_init(plist.ys[i])
+-    plist.zs = <long *> sig_malloc(plist.array_size * sizeof(long))
+-    plist.num_points = 0
+-    plist.max_num_points = max
+-
+-    # Set the height bound:
+-    args.height = H
+-
+-    # Set the intervals to be searched, including any specified:
+-    args.num_inter = len(intervals)
+-    args.domain = <ratpoints_interval *> sig_malloc((args.num_inter + args.degree) * sizeof(ratpoints_interval))
+-    for i,I in enumerate(intervals):
+-        args.domain[i].low = I[0]
+-        args.domain[i].up  = I[1]
+-
+-    # Set the minimum and maximum denominators:
+-    if not min_x_denom:  min_x_denom = 1
+-    if not max_x_denom:  max_x_denom = H
+-    args.b_low = min_x_denom
+-    args.b_high = max_x_denom
+-
+-    # Set the remaining arguments, whose non-default use is technical
+-    # (see ratpoints documentation)
+-    args.sp1 = RATPOINTS_DEFAULT_SP1
+-    args.sp2 = RATPOINTS_DEFAULT_SP2
+-    args.array_size = RATPOINTS_ARRAY_SIZE
+-    args.sturm = RATPOINTS_DEFAULT_STURM
+-    args.num_primes = RATPOINTS_DEFAULT_NUM_PRIMES
+-    args.max_forbidden = RATPOINTS_DEFAULT_MAX_FORBIDDEN
+-    args.flags = (RATPOINTS_VERBOSE & verby)
+-
+-    for i from 0 <= i <= args.degree:
+-        mpz_init(args.cof[i])
+-        sage_int = <Integer> coeffs[i]
+-        mpz_set(args.cof[i], sage_int.value)
+-
+-    sig_on()
+-    total = find_points(&args, process, <void *>plist)
+-    sig_off()
+-    if total == RATPOINTS_NON_SQUAREFREE:
+-        raise RuntimeError('Polynomial must be square-free')
+-    if total == RATPOINTS_BAD_ARGS:
+-        raise RuntimeError('Bad arguments to ratpoints')
+-
+-    for i from 0 <= i <= args.degree:
+-        mpz_clear(args.cof[i])
+-
+-    sig_free(args.cof)
+-    sig_free(args.domain)
+-
+-    cdef list L = []
+-    for i from 0 <= i < plist.num_points:
+-        s_x = Integer(0)
+-        s_y = Integer(0)
+-        s_z = Integer(0)
+-        mpz_set_si(s_x.value, plist.xes[i])
+-        mpz_set(s_y.value, plist.ys[i])
+-        mpz_set_si(s_z.value, plist.zs[i])
+-        L.append((s_x,s_y,s_z))
+-
+-    for i from 0 <= i < plist.array_size:
+-        mpz_clear(plist.ys[i])
+-    sig_free(plist.xes)
+-    sig_free(plist.ys)
+-    sig_free(plist.zs)
+-    sig_free(plist)
+-
+-    return L
+-
+-cdef int process_exists_only(long x, long z, mpz_t y, void *info0, int *quit):
+-    cdef info_struct_exists_only *info_s = <info_struct_exists_only *>info0
+-    cdef Integer YY
+-    if info_s.verbose:
+-        YY = Integer(0); mpz_set(YY.value, y)
+-        print('Found point [ %d : %d : %d ], quitting' % (x, YY, z))
+-    quit[0] = -1
+-    return 1
+-
+-cdef int ratpoints_mpz_exists_only(mpz_t *coeffs, long H, int degree, bint verbose) except -1:
+-    """
+-    Direct call to ratpoints to search for existence only.
+-
+-    WARNING - The coefficient array will be modified by ratpoints.
+-    """
+-    cdef ratpoints_args args
+-    cdef info_struct_exists_only info_s
+-    cdef long total, verby = ~0 if verbose else 0
+-    info_s.verbose = verbose
+-    assert degree <= RATPOINTS_MAX_DEGREE
+-    args.degree = degree
+-    args.cof = coeffs
+-    args.domain = <ratpoints_interval *> sig_malloc(2*args.degree * sizeof(ratpoints_interval))
+-    args.height = H
+-    args.num_inter = 0
+-    args.b_low = 1
+-    args.b_high = H
+-    args.sp1 = RATPOINTS_DEFAULT_SP1
+-    args.sp2 = RATPOINTS_DEFAULT_SP2
+-    args.array_size = RATPOINTS_ARRAY_SIZE
+-    args.sturm = RATPOINTS_DEFAULT_STURM
+-    args.num_primes = RATPOINTS_DEFAULT_NUM_PRIMES
+-    args.max_forbidden = RATPOINTS_DEFAULT_MAX_FORBIDDEN
+-    args.flags = (RATPOINTS_VERBOSE & verby)
+-    sig_on()
+-    total = find_points(&args, process_exists_only, <void *>(&info_s))
+-    sig_off()
+-    sig_free(args.domain)
+-    if total == RATPOINTS_NON_SQUAREFREE:
+-        raise RuntimeError('Polynomial must be square-free')
+-    if total == RATPOINTS_BAD_ARGS:
+-        raise RuntimeError('Bad arguments to ratpoints')
+-    return 1 if (total > 0) else 0
+-
+-
+-
+-
+diff --git a/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx b/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx
+index 1cc70925fa..c2f994a650 100644
+--- a/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx
++++ b/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx
+@@ -1,5 +1,3 @@
+-# distutils: libraries = ratpoints
+-
+ r"""
+ Descent on elliptic curves over `\QQ` with a 2-isogeny
+ """
+diff --git a/src/sage_setup/library_order.py b/src/sage_setup/library_order.py
+index 8830d44a95..0b450b3723 100644
+--- a/src/sage_setup/library_order.py
++++ b/src/sage_setup/library_order.py
+@@ -25,7 +25,7 @@ library_order_list = aliases.get("SINGULAR_LIBRARIES", []) + [
+     "giac", "intl", "curl",
+     "ec", "ecm"
+ ] + aliases.get("LINBOX_LIBRARIES", []) + aliases.get("FFLASFFPACK_LIBRARIES", []) + aliases.get("GSL_LIBRARIES", []) + [
+-    "pari", "flint", "ratpoints", "ecl", "glpk", "ppl",
++    "pari", "flint", "ecl", "glpk", "ppl",
+ ] + arb_dylib_names + [
+     "mpfi", "mpfr", "mpc", "ntl", "gmp", "gmpxx",
+     "brial",
+-- 
+2.34.1
+
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_31563.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_31563.patch
new file mode 100644
index 000000000000..563bb8526788
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_giac-1.7.0--see_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/zzz-skip_doctest_no_threejs.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_no_threejs.patch
new file mode 100644
index 000000000000..9b6d0a775b10
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_no_threejs.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage/repl/ipython_kernel/install.py b/src/sage/repl/ipython_kernel/install.py
+index 2143c221ed..f781037c70 100644
+--- a/src/sage/repl/ipython_kernel/install.py
++++ b/src/sage/repl/ipython_kernel/install.py
+@@ -124,7 +124,7 @@ class SageKernelSpec(object):
+             sage: spec = SageKernelSpec(prefix=tmp_dir())
+             sage: spec.use_local_threejs()
+             sage: threejs = os.path.join(spec.nbextensions_dir, 'threejs-sage')
+-            sage: os.path.isdir(threejs)
++            sage: os.path.isdir(threejs)    # optional - threejs
+             True
+         """
+         src = THREEJS_DIR
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch
new file mode 100644
index 000000000000..15aed02f9aaa
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_sage_setup_find.patch
@@ -0,0 +1,12 @@
+--- a/src/sage_setup/find.py
++++ b/src/sage_setup/find.py
+@@ -301,7 +301,7 @@ def find_extra_files(src_dir, modules, cythonized_dir, special_filenames=[]):
+         sage: extras["sage/libs/mpfr"]
+         [...sage/libs/mpfr/types.pxd...]
+         sage: extras["sage/ext/interpreters"]
+-        ['.../src/sage/ext/interpreters/wrapper_cdf.pxd', ...wrapper_cdf.h...]
++        ['.../src/sage/ext/interpreters/wrapper_cdf.pxd', ...]
+     """
+     from Cython.Utils import is_package_dir
+ 
+--
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch
new file mode 100644
index 000000000000..04fa2acbf3ec
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_shebang.patch
@@ -0,0 +1,11 @@
+--- a/src/sage/tests/cmdline.py
++++ b/src/sage/tests/cmdline.py
+@@ -488,7 +488,7 @@ def test_executable(args, input="", timeout=100.0, pydebug_ignore_warnings=False
+         0
+ 
+         sage: (out, err, ret) = test_executable(["sage", "--cython"])
+-        sage: print(err)
++        sage: print(err)  # not tested - broken when shebang is rewritten
+         Cython (http://cython.org) is a compiler for code written in the
+         Cython language.  Cython is based on Pyrex by Greg Ewing.
+         ...
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
new file mode 100644
index 000000000000..f0003a6c8246
--- /dev/null
+++ b/srcpkgs/sagemath/template
@@ -0,0 +1,251 @@
+# Template file for 'sagemath'
+pkgname=sagemath
+version=9.5.rc3
+revision=1
+wrksrc=sage-$version
+build_style=configure
+configure_args="--enable-build-as-root --with-system-python3
+ --enable-system-site-packages"
+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
+ 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-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
+homepage="http://sagemath.org/"
+distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
+checksum=dabc1a98e883c6069b59a755852bb0030395404a95d19d497c56f557c02619c2
+python_version=3
+patch_args="-F0 -Np1"
+
+build_options="debug"
+desc_option_debug="Build with debug symbols"
+
+# path where sage will be installed
+_SAGE_ROOT=/usr/lib/sage-${version}
+
+# Skip these sage packages: they are not needed
+_spkg_skip="appnope fonttools importlib_resources pycygwin
+ setuptools_scm_git_archive setuptools_wheel sphinxcontrib_websupport
+ pplpy_doc vcversioner
+ jmol mathjax sagenb_export thebe sagetex jupyter_jsmol rpy2 threejs"
+
+# Force use these sage packages from system
+_spkg_system="cppy cython cysignals cypari pplpy fpylll memory_allocator
+ primecountpy"
+
+# Databases to be used from system
+_spkg_db="combinatorial_designs conway_polynomials elliptic_curves graphs
+ polytopes_db"
+
+for spkg in $_spkg_skip; do
+	configure_args+=" sage_spkg_install_$spkg=no"
+	configure_args+=" sage_require_$spkg=no"
+done
+
+for spkg in $_spkg_system; do
+	configure_args+=" sage_spkg_install_$spkg=no"
+	configure_args+=" sage_require_$spkg=yes"
+done
+
+for spkg in $_spkg_db; do
+	configure_args+=" sage_spkg_install_$spkg=no"
+	configure_args+=" sage_require_$spkg=yes"
+	depends+=" sage-data-$spkg"
+	checkdepends+=" sage-data-$spkg"
+done
+
+# 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
+
+# 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
+	mv -T $wrksrc $_SAGE_ROOT
+	ln -srfT $_SAGE_ROOT $wrksrc
+
+	mkdir -p $wrksrc/upstream
+	for u in ${_upstream}; do
+		cp "$XBPS_SRCDISTDIR/${pkgname}-${version}/${u##*[/>]}" $wrksrc/upstream
+	done
+}
+
+do_clean() {
+	rm -rf $wrksrc $_SAGE_ROOT
+}
+
+post_patch() {
+	./bootstrap
+}
+
+pre_configure() {
+	if [ "$build_option_debug" ]; then
+		export SAGE_DEBUG=yes
+	fi
+
+	export MAKE="make -j ${XBPS_MAKEJOBS}"
+}
+
+post_configure() {
+	# we set some variables, right after configure has created sage_conf.py
+	cat <<-EOF >> pkgs/sage-conf/sage_conf.py
+	GAP_ROOT_DIR = "/usr/share/gap"
+	GAP_SO = "$(objdump -p /usr/lib/libgap.so | awk '/SONAME/{print $2}')"
+	CONWAY_POLYNOMIALS_DATA_DIR = "/usr/share/sagemath/conway_polynomials"
+	GRAPHS_DATA_DIR = "/usr/share/sagemath/graphs"
+	ELLCURVE_DATA_DIR = "/usr/share/sagemath/ellcurves"
+	POLYTOPE_DATA_DIR = "/usr/share/sagemath/reflexive_polytopes"
+	COMBINATORIAL_DESIGN_DATA_DIR = "/usr/share/sagemath/combinatorial_designs"
+	CREMONA_MINI_DATA_DIR = "/usr/share/sagemath/cremona"
+	CREMONA_LARGE_DATA_DIR = "/usr/share/sagemath/cremona"
+	EOF
+}
+
+do_install() {
+	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 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
+	# 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}
+	ln -sfT sage-${version} ${DESTDIR}/usr/bin/sage
+}
+
+do_check() {
+	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
+		_test_files=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	fi
+	if [ -z "$_test_files" ]; then
+		_test_files=--all
+	fi
+	cp ${FILESDIR}/timings2.json .
+	_test_args="--stats_path=timings2.json"
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args+=" --long --warn-long 60.0"
+	else
+		_test_args+=" --warn-long 30.0"
+	fi
+	if [ "$XBPS_BUILD_ENVIRONMENT" = "void-packages-ci" ]; then
+		# for CI use a predictable random seed
+		_test_args+=" --random-seed=0"
+	fi
+	# since make check will build the docs, run test like this instead
+	./sage -tp ${XBPS_MAKEJOBS} ${_test_args} ${_test_files}
+}
+
+### copied from sage-deps, to be kept 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"
+
+# standard dependencies
+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 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
+ 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
+ gengetopt texinfo
+ brial-devel cliquer-devel gfan libbraiding-devel libhomfly-devel
+ lrcalc-devel nauty-devel palp tachyon
+ maxima-ecl primesieve-devel primecount-devel gap-devel
+"
+
+# optional dependencies
+makedepends+="
+ ffmpeg ImageMagick
+"
+
+# TODO: optional
+# 4ti2 coxeter3 libsemigroups lrslib pdf2svg perl_mongodb polymake
+
+# python packages for trac-29665
+_sage_python3_modules="
+ python3-Babel python3-Jinja2 python3-MarkupSafe python3-Pillow
+ python3-Pygments python3-Sphinx python3-alabaster python3-argcomplete
+ python3-argon2 python3-attrs python3-backcall python3-beniget
+ python3-bleach python3-certifi python3-cffi python3-charset-normalizer
+ python3-cycler python3-dateutil python3-decorator python3-defusedxml
+ python3-docutils python3-entrypoints python3-flit_core python3-gast
+ python3-gmpy2 python3-html5lib python3-idna python3-imagesize
+ python3-importlib_metadata python3-ipython python3-ipython_genutils
+ python3-ipython_ipykernel python3-jedi python3-jsonschema
+ python3-jupyter_client python3-jupyter_core python3-jupyter_ipywidgets
+ python3-jupyter_nbconvert python3-jupyter_nbformat
+ python3-jupyter_notebook python3-jupyterlab_pygments python3-kiwisolver
+ python3-matplotlib python3-matplotlib-inline python3-mistune
+ python3-mpmath python3-nbclient python3-nest_asyncio python3-networkx
+ python3-numpy python3-packaging python3-pandocfilters python3-parsing
+ python3-parso python3-pexpect python3-pickleshare python3-pip
+ python3-pkgconfig python3-pluggy python3-ply python3-prometheus_client
+ python3-prompt_toolkit python3-ptyprocess python3-py python3-pybind11
+ python3-pycparser python3-pyrsistent python3-pytz python3-pyzmq
+ python3-requests python3-scipy python3-send2trash python3-setuptools
+ python3-setuptools_scm python3-simplegeneric python3-six
+ python3-snowballstemmer python3-sphinxcontrib-applehelp
+ python3-sphinxcontrib-devhelp python3-sphinxcontrib-htmlhelp
+ python3-sphinxcontrib-jsmath python3-sphinxcontrib-qthelp
+ python3-sphinxcontrib-serializinghtml python3-sympy python3-terminado
+ python3-testpath python3-texttable python3-toml python3-tomli
+ python3-tornado python3-traitlets python3-typing_extensions
+ python3-tzlocal python3-urllib3 python3-wcwidth python3-webencodings
+ python3-wheel python3-zipp pythran
+
+ python3-cvxopt python3-cppy python3-Cython python3-cysignals python3-cypari2
+ python3-pplpy python3-fpylll python3-primecountpy python3-memory_allocator
+"
+
+# python packages are build and runtime dependencies
+makedepends+=" $_sage_python3_modules"
+depends+=" $_sage_python3_modules"
diff --git a/srcpkgs/sagemath/update b/srcpkgs/sagemath/update
new file mode 100644
index 000000000000..c33aba4e6df2
--- /dev/null
+++ b/srcpkgs/sagemath/update
@@ -0,0 +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 105bc024eec911d0d976eed8b9b609d2be6e8d68 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Thu, 13 Jan 2022 15:47:33 -0300
Subject: [PATCH 02/12] New package: sagemath-test

---
 srcpkgs/sagemath-test/files/timings2.json |  1 +
 srcpkgs/sagemath-test/template            | 35 +++++++++++++++++++++++
 2 files changed, 36 insertions(+)
 create mode 120000 srcpkgs/sagemath-test/files/timings2.json
 create mode 100644 srcpkgs/sagemath-test/template

diff --git a/srcpkgs/sagemath-test/files/timings2.json b/srcpkgs/sagemath-test/files/timings2.json
new file mode 120000
index 000000000000..25d5309fc818
--- /dev/null
+++ b/srcpkgs/sagemath-test/files/timings2.json
@@ -0,0 +1 @@
+../../sagemath/files/timings2.json
\ No newline at end of file
diff --git a/srcpkgs/sagemath-test/template b/srcpkgs/sagemath-test/template
new file mode 100644
index 000000000000..1e6c76274a4d
--- /dev/null
+++ b/srcpkgs/sagemath-test/template
@@ -0,0 +1,35 @@
+# Template file for 'sagemath-test'
+pkgname=sagemath-test
+version=1
+revision=1
+build_style=meta
+checkdepends="sagemath"
+short_desc="Dummy package to test sagemath"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-2.0-or-later"
+homepage="none"
+
+# TODO: install base-voidstrap, uninstall base-chroot, and remove orphans
+# so we can check sagemath depends are enough to run sage on void
+
+do_check() {
+	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
+		_test_files=$(sed -e 's/#.*//;/^\s*$/d' ${XBPS_DISTDIR}/sagemath-check)
+	fi
+	if [ -z "$_test_files" ]; then
+		_test_files=--all
+	fi
+	cp ${FILESDIR}/timings2.json .
+	_test_args="--stats_path=timings2.json"
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args+=" --long --warn-long 60.0"
+	else
+		_test_args+=" --warn-long 30.0"
+	fi
+	if [ "$XBPS_BUILD_ENVIRONMENT" = "void-packages-ci" ]; then
+		# for CI use a predictable random seed
+		_test_args+=" --random-seed=0"
+	fi
+	# since make check will build the docs, run test like this instead
+	sage -tp ${XBPS_MAKEJOBS} ${_test_args} ${_test_files}
+}

From dcf3f75d852ce9a1bcadda2ee924bdd77a9b7db3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Wed, 19 Jan 2022 00:26:58 -0300
Subject: [PATCH 03/12] sagemath: linbox, gap, maxima without patch

---
 ...13e88ee188d516e4956832a23f985a73917a.patch |  31 ---
 ...ea979d4bfa1a26ef3b08a29ca626b83b6ff5.patch |  23 --
 ...f491e5ce599ba185f5e93f02e0fcebd76c9e.patch |  57 ----
 ...aba734cb4ded0b04165fa142b5cf4c38fd23.patch | 247 ------------------
 srcpkgs/sagemath/template                     |   8 +-
 5 files changed, 7 insertions(+), 359 deletions(-)
 delete mode 100644 srcpkgs/sagemath/patches/trac-29631-001-system_linbox-794713e88ee188d516e4956832a23f985a73917a.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-29631-002-system_linbox-7e16ea979d4bfa1a26ef3b08a29ca626b83b6ff5.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-32867-system_maxima-ed39aba734cb4ded0b04165fa142b5cf4c38fd23.patch

diff --git a/srcpkgs/sagemath/patches/trac-29631-001-system_linbox-794713e88ee188d516e4956832a23f985a73917a.patch b/srcpkgs/sagemath/patches/trac-29631-001-system_linbox-794713e88ee188d516e4956832a23f985a73917a.patch
deleted file mode 100644
index 483dbe2c2597..000000000000
--- a/srcpkgs/sagemath/patches/trac-29631-001-system_linbox-794713e88ee188d516e4956832a23f985a73917a.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-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.
-
-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/trac-29631-002-system_linbox-7e16ea979d4bfa1a26ef3b08a29ca626b83b6ff5.patch b/srcpkgs/sagemath/patches/trac-29631-002-system_linbox-7e16ea979d4bfa1a26ef3b08a29ca626b83b6ff5.patch
deleted file mode 100644
index 3b20d13100e7..000000000000
--- a/srcpkgs/sagemath/patches/trac-29631-002-system_linbox-7e16ea979d4bfa1a26ef3b08a29ca626b83b6ff5.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-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-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch b/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
deleted file mode 100644
index da88a369db0d..000000000000
--- a/srcpkgs/sagemath/patches/trac-29644-system_gap-2a41f491e5ce599ba185f5e93f02e0fcebd76c9e.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 2c981351bb60089530b0598d3e9a909a23d4d4d8 Mon Sep 17 00:00:00 2001
-From: Thierry Thomas <thierry@FreeBSD.org>
-Date: Mon, 22 Mar 2021 03:04:12 +0100
-Subject: 29644: Add spkg-configure.m4 for gap
-
----
- build/pkgs/gap/spkg-configure.m4 | 8 ++++++++
- 1 file changed, 8 insertions(+)
- create mode 100644 build/pkgs/gap/spkg-configure.m4
-
-diff --git a/build/pkgs/gap/spkg-configure.m4 b/build/pkgs/gap/spkg-configure.m4
-new file mode 100644
-index 00000000..91cd089
---- /dev/null
-+++ b/build/pkgs/gap/spkg-configure.m4
-@@ -0,0 +1,8 @@
-+SAGE_SPKG_CONFIGURE([gap], [
-+    SAGE_SPKG_DEPCHECK([gmp], [
-+       AC_CHECK_HEADER([gap/system.h], [
-+        AC_SEARCH_LIBS([GAP_COMM], [gap], [
-+        ], [sage_spkg_install_gap=yes])
-+       ], [sage_spkg_install_gap=yes])
-+    ])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From 2a41f491e5ce599ba185f5e93f02e0fcebd76c9e Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Samuel=20Leli=C3=A8vre?= <samuel.lelievre@gmail.com>
-Date: Mon, 22 Mar 2021 03:05:31 +0100
-Subject: 29644: Add distro information for gap
-
----
- build/pkgs/gap/distros/fedora.txt | 1 +
- build/pkgs/gap/distros/gentoo.txt | 1 +
- 2 files changed, 2 insertions(+)
- create mode 100644 build/pkgs/gap/distros/fedora.txt
- create mode 100644 build/pkgs/gap/distros/gentoo.txt
-
-diff --git a/build/pkgs/gap/distros/fedora.txt b/build/pkgs/gap/distros/fedora.txt
-new file mode 100644
-index 00000000..ea4feae
---- /dev/null
-+++ b/build/pkgs/gap/distros/fedora.txt
-@@ -0,0 +1 @@
-+gap
-diff --git a/build/pkgs/gap/distros/gentoo.txt b/build/pkgs/gap/distros/gentoo.txt
-new file mode 100644
-index 00000000..ea64ec9
---- /dev/null
-+++ b/build/pkgs/gap/distros/gentoo.txt
-@@ -0,0 +1 @@
-+sci-mathematics/gap
--- 
-cgit v1.0-1-gd88e
-
diff --git a/srcpkgs/sagemath/patches/trac-32867-system_maxima-ed39aba734cb4ded0b04165fa142b5cf4c38fd23.patch b/srcpkgs/sagemath/patches/trac-32867-system_maxima-ed39aba734cb4ded0b04165fa142b5cf4c38fd23.patch
deleted file mode 100644
index 8edbde0ce76f..000000000000
--- a/srcpkgs/sagemath/patches/trac-32867-system_maxima-ed39aba734cb4ded0b04165fa142b5cf4c38fd23.patch
+++ /dev/null
@@ -1,247 +0,0 @@
-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
- 
--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 fbce694..b40cda6 100644
---- a/pkgs/sage-conf/sage_conf.py.in
-+++ b/pkgs/sage-conf/sage_conf.py.in
-@@ -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.
- MAXIMA_FAS = "@SAGE_MAXIMA_FAS@".replace('${prefix}', SAGE_LOCAL)
- 
-diff --git a/src/bin/sage b/src/bin/sage
-index fcd2630..54b69a1 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/sage/env.py b/src/sage/env.py
-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"))
- 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 fc7f48b..7313c7d 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 917059d..c966a3c 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')
--- 
-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 f0003a6c8246..de9fe5177766 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -38,7 +38,8 @@ _spkg_skip="appnope fonttools importlib_resources pycygwin
 
 # Force use these sage packages from system
 _spkg_system="cppy cython cysignals cypari pplpy fpylll memory_allocator
- primecountpy"
+ primecountpy
+ linbox gap maxima"
 
 # Databases to be used from system
 _spkg_db="combinatorial_designs conway_polynomials elliptic_curves graphs
@@ -107,6 +108,8 @@ post_configure() {
 	cat <<-EOF >> pkgs/sage-conf/sage_conf.py
 	GAP_ROOT_DIR = "/usr/share/gap"
 	GAP_SO = "$(objdump -p /usr/lib/libgap.so | awk '/SONAME/{print $2}')"
+	MAXIMA = "maxima -l ecl"
+	MAXIMA_FAS = ""
 	CONWAY_POLYNOMIALS_DATA_DIR = "/usr/share/sagemath/conway_polynomials"
 	GRAPHS_DATA_DIR = "/usr/share/sagemath/graphs"
 	ELLCURVE_DATA_DIR = "/usr/share/sagemath/ellcurves"
@@ -115,6 +118,9 @@ post_configure() {
 	CREMONA_MINI_DATA_DIR = "/usr/share/sagemath/cremona"
 	CREMONA_LARGE_DATA_DIR = "/usr/share/sagemath/cremona"
 	EOF
+	cat <<-EOF >> src/bin/sage-env
+	unset MAXIMA_PREFIX
+	EOF
 }
 
 do_install() {

From 929ba7e8584c298961415f75a29e100ddbc25c4e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Wed, 19 Jan 2022 14:56:02 -0300
Subject: [PATCH 04/12] sagemath: remove patches for upstream pkgs

---
 ...0e8168a9ffb4fbf07dd03c0846b4933a6dbe.patch | 64 -------------------
 ...26e3db5ea06b962fac386fa3c7223f9a14fb.patch | 51 ---------------
 ...d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch | 35 ----------
 3 files changed, 150 deletions(-)
 delete mode 100644 srcpkgs/sagemath/patches/trac-33047-musl_fix_find_library-dc1a0e8168a9ffb4fbf07dd03c0846b4933a6dbe.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-33063-notebook_fix_deprecation_warning-966926e3db5ea06b962fac386fa3c7223f9a14fb.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch

diff --git a/srcpkgs/sagemath/patches/trac-33047-musl_fix_find_library-dc1a0e8168a9ffb4fbf07dd03c0846b4933a6dbe.patch b/srcpkgs/sagemath/patches/trac-33047-musl_fix_find_library-dc1a0e8168a9ffb4fbf07dd03c0846b4933a6dbe.patch
deleted file mode 100644
index 3d4f4e14bb7b..000000000000
--- a/srcpkgs/sagemath/patches/trac-33047-musl_fix_find_library-dc1a0e8168a9ffb4fbf07dd03c0846b4933a6dbe.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-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: Add a patch that fixes ctypes.util.find_library('c')
-
-The issue causes a failure doctesting src/sage/misc/gperftools.py
----
- 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 00000000..82f436b
---- /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):
--- 
-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
deleted file mode 100644
index 921a1669fd2a..000000000000
--- a/srcpkgs/sagemath/patches/trac-33063-notebook_fix_deprecation_warning-966926e3db5ea06b962fac386fa3c7223f9a14fb.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-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-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch b/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
deleted file mode 100644
index 350c41ac3928..000000000000
--- a/srcpkgs/sagemath/patches/trac-33128-fix_warning_in_sagetexparse-53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 53e4d68ca3ba0d3b29fe78dbd99fa927fa4091b6 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: sagetex: Fix a warning when byte-compiling sagetexparse.py
-
----
- build/pkgs/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 00000000..d82ab67
---- /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'
-+ 
--- 
-cgit v1.0-1-gd88e
-

From 95038f960fe9b521c0efb3dfdef96a38f6b2c27e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Wed, 19 Jan 2022 15:18:27 -0300
Subject: [PATCH 05/12] sagemath: simplify system-site-packages patch

---
 ...aabe95082f42ba134780d579390d7b6153e2.patch |   53 +
 ...184f7498a2046065e669723e68efe2d65cee.patch | 5629 -----------------
 .../zzz-more_site_packages_not_in_29665.patch |   42 -
 srcpkgs/sagemath/template                     |   15 +
 4 files changed, 68 insertions(+), 5671 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-05fcaabe95082f42ba134780d579390d7b6153e2.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
 delete mode 100644 srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch

diff --git a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-05fcaabe95082f42ba134780d579390d7b6153e2.patch b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-05fcaabe95082f42ba134780d579390d7b6153e2.patch
new file mode 100644
index 000000000000..3af8b05135ae
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-05fcaabe95082f42ba134780d579390d7b6153e2.patch
@@ -0,0 +1,53 @@
+From 05fcaabe95082f42ba134780d579390d7b6153e2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 9 Oct 2021 19:30:58 -0400
+Subject: Trac #29665: add --enable-system-site-packages option to ./configure.
+
+This new option is experimental and disabled by default. When it is
+enabled, the string "--system-site-packages" is appended to a new
+environment variable SAGE_VENV_FLAGS that is then passed to the
+sage-venv command during the build using autoconf substitution.
+Thusly the correct setting finds its way into local/pyvenv.cfg.
+---
+ build/make/Makefile.in |  2 +-
+ configure.ac           | 11 +++++++++++
+ 2 files changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/build/make/Makefile.in b/build/make/Makefile.in
+index f870cc3..68627ab 100644
+--- a/build/make/Makefile.in
++++ b/build/make/Makefile.in
+@@ -211,7 +211,7 @@ endif
+ inst_python3_venv = $(SAGE_VENV)/pyvenv.cfg
+ 
+ $(inst_python3_venv):
+-	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv "$(SAGE_VENV)"
++	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv @SAGE_VENV_FLAGS@ "$(SAGE_VENV)"
+ endif
+ 
+ # Build everything and start Sage.
+diff --git a/configure.ac b/configure.ac
+index 351f487..db30a91 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -435,6 +435,17 @@ AC_ARG_ENABLE([download-from-upstream-url],
+   [AS_HELP_STRING([--enable-download-from-upstream-url],
+     [allow downloading packages from their upstream URL if they cannot be found on the Sage mirrors])])
+ 
++AC_ARG_ENABLE(
++  [system-site-packages], [AS_HELP_STRING(
++    [--enable-system-site-packages],
++    [allow sage to use python packages from the system (experimental; default: no)]
++  )], [
++  AS_IF([test "x$enable_system_site_packages" = "xyes"], [
++    SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
++  ])
++])
++AC_SUBST([SAGE_VENV_FLAGS])
++
+ SAGE_SPKG_OPTIONS=""
+ AS_IF([test "x$enable_experimental_packages" = "xyes"], [
+   AS_VAR_APPEND([SAGE_SPKG_OPTIONS], [" -y"])
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch b/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
deleted file mode 100644
index 0ecb27c593cd..000000000000
--- a/srcpkgs/sagemath/patches/trac-29665-enable_system_site_packages-135f184f7498a2046065e669723e68efe2d65cee.patch
+++ /dev/null
@@ -1,5629 +0,0 @@
-From 05fcaabe95082f42ba134780d579390d7b6153e2 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Sat, 9 Oct 2021 19:30:58 -0400
-Subject: Trac #29665: add --enable-system-site-packages option to ./configure.
-
-This new option is experimental and disabled by default. When it is
-enabled, the string "--system-site-packages" is appended to a new
-environment variable SAGE_VENV_FLAGS that is then passed to the
-sage-venv command during the build using autoconf substitution.
-Thusly the correct setting finds its way into local/pyvenv.cfg.
----
- build/make/Makefile.in |  2 +-
- configure.ac           | 11 +++++++++++
- 2 files changed, 12 insertions(+), 1 deletion(-)
-
-diff --git a/build/make/Makefile.in b/build/make/Makefile.in
-index f870cc3..68627ab 100644
---- a/build/make/Makefile.in
-+++ b/build/make/Makefile.in
-@@ -211,7 +211,7 @@ endif
- inst_python3_venv = $(SAGE_VENV)/pyvenv.cfg
- 
- $(inst_python3_venv):
--	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv "$(SAGE_VENV)"
-+	$(PYTHON_FOR_VENV) $(SAGE_ROOT)/build/bin/sage-venv @SAGE_VENV_FLAGS@ "$(SAGE_VENV)"
- endif
- 
- # Build everything and start Sage.
-diff --git a/configure.ac b/configure.ac
-index 351f487..db30a91 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -435,6 +435,17 @@ AC_ARG_ENABLE([download-from-upstream-url],
-   [AS_HELP_STRING([--enable-download-from-upstream-url],
-     [allow downloading packages from their upstream URL if they cannot be found on the Sage mirrors])])
- 
-+AC_ARG_ENABLE(
-+  [system-site-packages], [AS_HELP_STRING(
-+    [--enable-system-site-packages],
-+    [allow sage to use python packages from the system (experimental; default: no)]
-+  )], [
-+  AS_IF([test "x$enable_system_site_packages" = "xyes"], [
-+    SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
-+  ])
-+])
-+AC_SUBST([SAGE_VENV_FLAGS])
-+
- SAGE_SPKG_OPTIONS=""
- AS_IF([test "x$enable_experimental_packages" = "xyes"], [
-   AS_VAR_APPEND([SAGE_SPKG_OPTIONS], [" -y"])
--- 
-cgit v1.0-1-gd88e
-
-
-From 9372d1f663edf4e89f9c186336815ca04cff59dc Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 11 Oct 2021 19:41:14 -0400
-Subject: Trac #29665: new SAGE_PYTHON_PACKAGE_CHECK() autoconf macro.
-
-This new macro encapsulates the check for system installations of
-python packages. It uses setuptools.version's pkg_resources to
-check if the contents of install-requires.txt are satisfied for
-the given package; and if not, tells the build system to install
-the SPKG instead.
----
- m4/sage_python_package_check.m4 | 49 +++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 49 insertions(+)
- create mode 100644 m4/sage_python_package_check.m4
-
-diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
-new file mode 100644
-index 00000000..77b0a0c
---- /dev/null
-+++ b/m4/sage_python_package_check.m4
-@@ -0,0 +1,49 @@
-+#
-+# SYNOPSIS
-+#
-+#   SAGE_PYTHON_PACKAGE_CHECK(package)
-+#
-+# DESCRIPTION
-+#
-+#   Determine if the system copy of a python package can be used by sage.
-+#
-+#   This macro uses setuptools.version's pkg_resources to check that the
-+#   "install-requires.txt" file for the named package is satisfied, and
-+#   it can typically fail in four ways:
-+#
-+#     1. If --enable-system-site-packages was not passed to ./configure,
-+#
-+#     2. If we are not using the system python (no $PYTHON_FOR_VENV),
-+#
-+#     3. If setuptools is not available to the system python,
-+#
-+#     4. If the contents of install-requires.txt are not met (wrong
-+#        version, no version, etc.) by the system python.
-+#
-+#   In any of those cases, we set sage_spkg_install_$package to "yes"
-+#   so that the corresponding SPKG is installed. Otherwise, we do
-+#   nothing, since the default value of sage_spkg_install_$package
-+#   is "no" (to use the system copy).
-+#
-+#   The SAGE_SPKG_CONFIGURE_PYTHON3() macro is AC_REQUIRE'd to ensure
-+#   that $PYTHON_FOR_VENV is available, if it is going to be available.
-+#
-+
-+AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
-+  AS_IF([test "${enable_system_site_packages}" = "yes"], [
-+    AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
-+
-+    dnl strip all comments from install-requires.txt; this should leave
-+    dnl only a single line containing the version specification for this
-+    dnl package.
-+    SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
-+    AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
-+    AS_IF(
-+      ["${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())"],
-+      [AC_MSG_RESULT(yes)],
-+      [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
-+    )
-+  ], [
-+    sage_spkg_install_$1=yes
-+  ])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From a0dac8ad81ad6369d479bba30d2388de59e5cecb Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Sat, 9 Oct 2021 20:21:29 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for py.
-
----
- build/pkgs/py/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/py/spkg-configure.m4
-
-diff --git a/build/pkgs/py/spkg-configure.m4 b/build/pkgs/py/spkg-configure.m4
-new file mode 100644
-index 00000000..ded7034
---- /dev/null
-+++ b/build/pkgs/py/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([py], [SAGE_PYTHON_PACKAGE_CHECK([py])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 87c463a25ab4432dc1fba4f7a9703284e5b8f620 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Sat, 9 Oct 2021 20:24:15 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for wheel.
-
----
- build/pkgs/wheel/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/wheel/spkg-configure.m4
-
-diff --git a/build/pkgs/wheel/spkg-configure.m4 b/build/pkgs/wheel/spkg-configure.m4
-new file mode 100644
-index 00000000..7897ea9
---- /dev/null
-+++ b/build/pkgs/wheel/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([wheel], [SAGE_PYTHON_PACKAGE_CHECK([wheel])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 804094b3a980f262f4d53d7be8b1be43ac0c55e0 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Sat, 9 Oct 2021 20:25:15 -0400
-Subject: Trac #29665: new spkg-configure.m4 for cvxopt.
-
-This includes a SAGE_SPKG_DEPCHECK([gsl glpk suitesparse],... because
-those C dependencies wind up linked into shared libraries like,
-
-  /usr/.../cvxopt/glpk.cpython-39-x86_64-linux-gnu.so
-
-that could potentially conflict with (for example) the glpk SPKG.
----
- build/pkgs/cvxopt/spkg-configure.m4 | 5 +++++
- 1 file changed, 5 insertions(+)
- create mode 100644 build/pkgs/cvxopt/spkg-configure.m4
-
-diff --git a/build/pkgs/cvxopt/spkg-configure.m4 b/build/pkgs/cvxopt/spkg-configure.m4
-new file mode 100644
-index 00000000..c4aa619
---- /dev/null
-+++ b/build/pkgs/cvxopt/spkg-configure.m4
-@@ -0,0 +1,5 @@
-+SAGE_SPKG_CONFIGURE([cvxopt], [
-+  SAGE_SPKG_DEPCHECK([gsl glpk suitesparse], [
-+    SAGE_PYTHON_PACKAGE_CHECK([cvxopt])
-+  ])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From 3f171955ff8d15da2c98aee0d2e254e95a55a2b5 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Sat, 9 Oct 2021 20:28:10 -0400
-Subject: Trac #29665: new spkg-configure.m4 for pyzmq.
-
-This includes a SAGE_SPKG_DEPCHECK([zeromq],... because libzmq winds
-up linked into shared libraries like,
-
-  /usr/.../zmq/backend/cython/message.cpython-39-x86_64-linux-gnu.so
-
-that potentially conflict with the zeromq SPKG.
----
- build/pkgs/pyzmq/spkg-configure.m4 | 5 +++++
- 1 file changed, 5 insertions(+)
- create mode 100644 build/pkgs/pyzmq/spkg-configure.m4
-
-diff --git a/build/pkgs/pyzmq/spkg-configure.m4 b/build/pkgs/pyzmq/spkg-configure.m4
-new file mode 100644
-index 00000000..ae2b126
---- /dev/null
-+++ b/build/pkgs/pyzmq/spkg-configure.m4
-@@ -0,0 +1,5 @@
-+SAGE_SPKG_CONFIGURE([pyzmq], [
-+  SAGE_SPKG_DEPCHECK([zeromq], [
-+    SAGE_PYTHON_PACKAGE_CHECK([pyzmq])
-+  ])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From 20d3aa9da9fc98a6e6a47599cd1b6d1d3785a4c4 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Sat, 9 Oct 2021 20:31:24 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for requests.
-
----
- build/pkgs/requests/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/requests/spkg-configure.m4
-
-diff --git a/build/pkgs/requests/spkg-configure.m4 b/build/pkgs/requests/spkg-configure.m4
-new file mode 100644
-index 00000000..f50a66c
---- /dev/null
-+++ b/build/pkgs/requests/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([requests], [SAGE_PYTHON_PACKAGE_CHECK([requests])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 4df57ee47f2576b6b7bf9265248e06e90616b689 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Sun, 10 Oct 2021 18:13:34 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for six.
-
----
- build/pkgs/six/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/six/spkg-configure.m4
-
-diff --git a/build/pkgs/six/spkg-configure.m4 b/build/pkgs/six/spkg-configure.m4
-new file mode 100644
-index 00000000..a382b81
---- /dev/null
-+++ b/build/pkgs/six/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([six], [SAGE_PYTHON_PACKAGE_CHECK([six])])
--- 
-cgit v1.0-1-gd88e
-
-
-From f4462652d02ca729cc6d7cb36ee4d7d662deafb0 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Sun, 10 Oct 2021 18:14:29 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for packaging.
-
----
- build/pkgs/packaging/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/packaging/spkg-configure.m4
-
-diff --git a/build/pkgs/packaging/spkg-configure.m4 b/build/pkgs/packaging/spkg-configure.m4
-new file mode 100644
-index 00000000..398f9e1
---- /dev/null
-+++ b/build/pkgs/packaging/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([packaging], [SAGE_PYTHON_PACKAGE_CHECK([packaging])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 4d64677fffce48077e4bc3e20ec833c70e6e9b65 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Sun, 10 Oct 2021 18:18:53 -0400
-Subject: Trac #29665: new spkg-configure.m4 for numpy.
-
-This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack
-wind up linked into shared libraries like,
-
-  /usr/.../numpy/linalg/lapack_lite.cpython-39-x86_64-linux-gnu.so
-
-that potentially conflict with the openblas SPKG.
----
- build/pkgs/numpy/spkg-configure.m4 | 5 +++++
- 1 file changed, 5 insertions(+)
- create mode 100644 build/pkgs/numpy/spkg-configure.m4
-
-diff --git a/build/pkgs/numpy/spkg-configure.m4 b/build/pkgs/numpy/spkg-configure.m4
-new file mode 100644
-index 00000000..16f9a90
---- /dev/null
-+++ b/build/pkgs/numpy/spkg-configure.m4
-@@ -0,0 +1,5 @@
-+SAGE_SPKG_CONFIGURE([numpy], [
-+  SAGE_SPKG_DEPCHECK([openblas], [
-+   SAGE_PYTHON_PACKAGE_CHECK([numpy])
-+  ])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From 85dfe5bb32f3c470966b477bae68a921e846d11f Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Sun, 10 Oct 2021 18:58:48 -0400
-Subject: Trac #29665: new spkg-configure.m4 for scipy.
-
-This includes a SAGE_SPKG_DEPCHECK([openblas],... because blas/lapack
-wind up linked into shared libraries like,
-
-  /usr/.../scipy/linalg/_flinalg.cpython-39-x86_64-linux-gnu.so
-
-that potentially conflict with the openblas SPKG.
----
- build/pkgs/scipy/spkg-configure.m4 | 5 +++++
- 1 file changed, 5 insertions(+)
- create mode 100644 build/pkgs/scipy/spkg-configure.m4
-
-diff --git a/build/pkgs/scipy/spkg-configure.m4 b/build/pkgs/scipy/spkg-configure.m4
-new file mode 100644
-index 00000000..0b7294a
---- /dev/null
-+++ b/build/pkgs/scipy/spkg-configure.m4
-@@ -0,0 +1,5 @@
-+SAGE_SPKG_CONFIGURE([scipy], [
-+  SAGE_SPKG_DEPCHECK([openblas], [
-+    SAGE_PYTHON_PACKAGE_CHECK([scipy])
-+  ])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From 5616f1491036fda95f4d3e840c8c8b531c97323b Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 11 Oct 2021 07:19:24 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for pluggy.
-
----
- build/pkgs/pluggy/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pluggy/spkg-configure.m4
-
-diff --git a/build/pkgs/pluggy/spkg-configure.m4 b/build/pkgs/pluggy/spkg-configure.m4
-new file mode 100644
-index 00000000..11b1fce
---- /dev/null
-+++ b/build/pkgs/pluggy/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([pluggy], [SAGE_PYTHON_PACKAGE_CHECK([pluggy])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 6bceae3d356878cfe5fce40c9998dead003a3844 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 11 Oct 2021 07:24:12 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for pickleshare.
-
----
- build/pkgs/pickleshare/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pickleshare/spkg-configure.m4
-
-diff --git a/build/pkgs/pickleshare/spkg-configure.m4 b/build/pkgs/pickleshare/spkg-configure.m4
-new file mode 100644
-index 00000000..80e9b7c
---- /dev/null
-+++ b/build/pkgs/pickleshare/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([pickleshare], [SAGE_PYTHON_PACKAGE_CHECK([pickleshare])])
--- 
-cgit v1.0-1-gd88e
-
-
-From da2ab534f4a256c82ed4f1c5f0f5c320529b5e9f Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 11 Oct 2021 08:53:29 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for html5lib.
-
----
- build/pkgs/html5lib/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/html5lib/spkg-configure.m4
-
-diff --git a/build/pkgs/html5lib/spkg-configure.m4 b/build/pkgs/html5lib/spkg-configure.m4
-new file mode 100644
-index 00000000..f421b7e
---- /dev/null
-+++ b/build/pkgs/html5lib/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([html5lib], [SAGE_PYTHON_PACKAGE_CHECK([html5lib])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 5e464134afdf6055b7b5804208f759561c5435cd Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 11 Oct 2021 18:30:47 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for networkx.
-
----
- build/pkgs/networkx/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/networkx/spkg-configure.m4
-
-diff --git a/build/pkgs/networkx/spkg-configure.m4 b/build/pkgs/networkx/spkg-configure.m4
-new file mode 100644
-index 00000000..926671e
---- /dev/null
-+++ b/build/pkgs/networkx/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([networkx], [SAGE_PYTHON_PACKAGE_CHECK([networkx])])
--- 
-cgit v1.0-1-gd88e
-
-
-From c4d40770cd9c7fda811e31759a5f4aedc320f3f9 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 11 Oct 2021 20:33:24 -0400
-Subject: Trac #29665: new spkg-configure.m4 for matplotlib.
-
-This includes a SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull],...
-because those dependencies wind up linked into shared libraries like,
-
-  /usr/lib/.../matplotlib/ft2font.cpython-39-x86_64-linux-gnu.so
-
-that potentially conflict with their SPKG counterparts.
----
- build/pkgs/matplotlib/spkg-configure.m4 | 5 +++++
- 1 file changed, 5 insertions(+)
- create mode 100644 build/pkgs/matplotlib/spkg-configure.m4
-
-diff --git a/build/pkgs/matplotlib/spkg-configure.m4 b/build/pkgs/matplotlib/spkg-configure.m4
-new file mode 100644
-index 00000000..39c2d29
---- /dev/null
-+++ b/build/pkgs/matplotlib/spkg-configure.m4
-@@ -0,0 +1,5 @@
-+SAGE_SPKG_CONFIGURE([matplotlib], [
-+  SAGE_SPKG_DEPCHECK([bzip2 freetype libpng qhull], [
-+    SAGE_PYTHON_PACKAGE_CHECK([matplotlib])
-+  ])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From 7834dc3ac349201af632f89a9de7cd1967931010 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 11 Oct 2021 20:35:00 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for bleach.
-
----
- build/pkgs/bleach/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/bleach/spkg-configure.m4
-
-diff --git a/build/pkgs/bleach/spkg-configure.m4 b/build/pkgs/bleach/spkg-configure.m4
-new file mode 100644
-index 00000000..3c9bb26
---- /dev/null
-+++ b/build/pkgs/bleach/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([bleach], [SAGE_PYTHON_PACKAGE_CHECK([bleach])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 84cad343287a2c69a4a21b9fa3b92301ff88645b Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 11 Oct 2021 20:37:03 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for decorator.
-
----
- build/pkgs/decorator/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/decorator/spkg-configure.m4
-
-diff --git a/build/pkgs/decorator/spkg-configure.m4 b/build/pkgs/decorator/spkg-configure.m4
-new file mode 100644
-index 00000000..e062778
---- /dev/null
-+++ b/build/pkgs/decorator/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([decorator], [SAGE_PYTHON_PACKAGE_CHECK([decorator])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 25693212572e69d452bc95c923ada13744359eb7 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 11 Oct 2021 20:38:03 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for idna.
-
----
- build/pkgs/idna/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/idna/spkg-configure.m4
-
-diff --git a/build/pkgs/idna/spkg-configure.m4 b/build/pkgs/idna/spkg-configure.m4
-new file mode 100644
-index 00000000..9d363f2
---- /dev/null
-+++ b/build/pkgs/idna/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([idna], [SAGE_PYTHON_PACKAGE_CHECK([idna])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 6d5616472f6cdc6cf496bba6fe07bd4ef44dfdaf Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 11 Oct 2021 20:39:23 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for certifi.
-
----
- build/pkgs/certifi/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/certifi/spkg-configure.m4
-
-diff --git a/build/pkgs/certifi/spkg-configure.m4 b/build/pkgs/certifi/spkg-configure.m4
-new file mode 100644
-index 00000000..ddd4061
---- /dev/null
-+++ b/build/pkgs/certifi/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([certifi], [SAGE_PYTHON_PACKAGE_CHECK([certifi])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 9412a07023b275e29e8d1af9b8ee3e767042e7fd Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 11 Oct 2021 20:40:59 -0400
-Subject: Trac #29665: new spkg-configure.m4 for pillow.
-
-This includes an SAGE_SPKG_DEPCHECK([bzip2 freetype libpng zlib],...
-because those dependencies wind up linked into shared libraries like,
-
-  /usr/.../PIL/_imagingft.cpython-39-x86_64-linux-gnu.so
-
-and potentially conflict with their SPKG counterparts.
----
- build/pkgs/pillow/spkg-configure.m4 | 5 +++++
- 1 file changed, 5 insertions(+)
- create mode 100644 build/pkgs/pillow/spkg-configure.m4
-
-diff --git a/build/pkgs/pillow/spkg-configure.m4 b/build/pkgs/pillow/spkg-configure.m4
-new file mode 100644
-index 00000000..f2e68e2
---- /dev/null
-+++ b/build/pkgs/pillow/spkg-configure.m4
-@@ -0,0 +1,5 @@
-+SAGE_SPKG_CONFIGURE([pillow], [
-+  SAGE_SPKG_DEPCHECK([bzip2 freetype libpng zlib], [
-+    SAGE_PYTHON_PACKAGE_CHECK([pillow])
-+  ])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From eede914311481fdb75b363b7a799075e876a2b4f Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 11 Oct 2021 20:44:13 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for mpmath.
-
----
- build/pkgs/mpmath/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/mpmath/spkg-configure.m4
-
-diff --git a/build/pkgs/mpmath/spkg-configure.m4 b/build/pkgs/mpmath/spkg-configure.m4
-new file mode 100644
-index 00000000..f43c838
---- /dev/null
-+++ b/build/pkgs/mpmath/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([mpmath], [SAGE_PYTHON_PACKAGE_CHECK([mpmath])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 363a825885832c0b580ff53fe61f5c79e70c4728 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 11 Oct 2021 20:44:56 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for sympy.
-
----
- build/pkgs/sympy/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/sympy/spkg-configure.m4
-
-diff --git a/build/pkgs/sympy/spkg-configure.m4 b/build/pkgs/sympy/spkg-configure.m4
-new file mode 100644
-index 00000000..fa0f1f5
---- /dev/null
-+++ b/build/pkgs/sympy/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([sympy], [SAGE_PYTHON_PACKAGE_CHECK([sympy])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 0667964c914e4a01dda697190a054ff96cea92d6 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 11 Oct 2021 20:47:06 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for pygments.
-
----
- build/pkgs/pygments/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pygments/spkg-configure.m4
-
-diff --git a/build/pkgs/pygments/spkg-configure.m4 b/build/pkgs/pygments/spkg-configure.m4
-new file mode 100644
-index 00000000..99f29e3
---- /dev/null
-+++ b/build/pkgs/pygments/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([pygments], [SAGE_PYTHON_PACKAGE_CHECK([pygments])])
--- 
-cgit v1.0-1-gd88e
-
-
-From f787c233aa05d8e90f7c6ad18f76bd2fa36bfbfb Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 11 Oct 2021 20:48:50 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for jinja2.
-
----
- build/pkgs/jinja2/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/jinja2/spkg-configure.m4
-
-diff --git a/build/pkgs/jinja2/spkg-configure.m4 b/build/pkgs/jinja2/spkg-configure.m4
-new file mode 100644
-index 00000000..0970d1c
---- /dev/null
-+++ b/build/pkgs/jinja2/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([jinja2], [SAGE_PYTHON_PACKAGE_CHECK([jinja2])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 309d8f8e2b7078b5efbbe824b69ec1d9b1e639f0 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Tue, 12 Oct 2021 08:43:24 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for pandocfilters.
-
----
- build/pkgs/pandocfilters/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/pandocfilters/spkg-configure.m4
-
-diff --git a/build/pkgs/pandocfilters/spkg-configure.m4 b/build/pkgs/pandocfilters/spkg-configure.m4
-new file mode 100644
-index 00000000..3e9537f
---- /dev/null
-+++ b/build/pkgs/pandocfilters/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([pandocfilters], [
-+  SAGE_PYTHON_PACKAGE_CHECK([pandocfilters])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From f57bfda49777a6ba1cd123553acd75dc347c5521 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Tue, 12 Oct 2021 08:44:46 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for webencodings.
-
----
- build/pkgs/webencodings/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/webencodings/spkg-configure.m4
-
-diff --git a/build/pkgs/webencodings/spkg-configure.m4 b/build/pkgs/webencodings/spkg-configure.m4
-new file mode 100644
-index 00000000..1b9a5c4
---- /dev/null
-+++ b/build/pkgs/webencodings/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([webencodings], [
-+  SAGE_PYTHON_PACKAGE_CHECK([webencodings])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From 7f193a62d7a2ea0b6a3ca6beb12390d91c25bbfb Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Tue, 12 Oct 2021 08:48:26 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for pytz.
-
----
- build/pkgs/pytz/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pytz/spkg-configure.m4
-
-diff --git a/build/pkgs/pytz/spkg-configure.m4 b/build/pkgs/pytz/spkg-configure.m4
-new file mode 100644
-index 00000000..366521b
---- /dev/null
-+++ b/build/pkgs/pytz/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([pytz], [SAGE_PYTHON_PACKAGE_CHECK([pytz])])
--- 
-cgit v1.0-1-gd88e
-
-
-From bfd3fdd887c3465c03465248de4997eed4a82915 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Tue, 12 Oct 2021 08:51:16 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for texttable.
-
----
- build/pkgs/texttable/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/texttable/spkg-configure.m4
-
-diff --git a/build/pkgs/texttable/spkg-configure.m4 b/build/pkgs/texttable/spkg-configure.m4
-new file mode 100644
-index 00000000..42a3de1
---- /dev/null
-+++ b/build/pkgs/texttable/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([texttable], [SAGE_PYTHON_PACKAGE_CHECK([texttable])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 914bf0cc57abc46129b27c1525782dbe16da31a2 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Tue, 12 Oct 2021 08:53:41 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for babel.
-
----
- build/pkgs/babel/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/babel/spkg-configure.m4
-
-diff --git a/build/pkgs/babel/spkg-configure.m4 b/build/pkgs/babel/spkg-configure.m4
-new file mode 100644
-index 00000000..d7b9a71
---- /dev/null
-+++ b/build/pkgs/babel/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([babel], [SAGE_PYTHON_PACKAGE_CHECK([babel])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 56977abd1eafbc87c765a2892cfe525382648259 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 14 Oct 2021 08:06:59 -0400
-Subject: Trac #29665: force system python3 with --enable-system-site-packages.
-
-When the python SPKG is used, the --enable-system-site-packages flag
-will essentially do nothing, and that may confuse users who have
-wasted a few hours building sage. (Generally, they will want to fix
-detection of their system python3 first.)
-
-To forestall that, we now set "--with-system-python3=force" whenever
-the "--enable-system-site-packages" flag is passed.
----
- configure.ac | 11 ++++++++++-
- 1 file changed, 10 insertions(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index db30a91..6fafb83 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -438,10 +438,19 @@ AC_ARG_ENABLE([download-from-upstream-url],
- AC_ARG_ENABLE(
-   [system-site-packages], [AS_HELP_STRING(
-     [--enable-system-site-packages],
--    [allow sage to use python packages from the system (experimental; default: no)]
-+    [allow the use of python packages from the system (experimental; default: no)]
-   )], [
-   AS_IF([test "x$enable_system_site_packages" = "xyes"], [
-     SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
-+
-+    dnl We want to raise an error if the user asked for "system site
-+    dnl packages" but the system python will not be used. Technically
-+    dnl that causes no problems (SAGE_PYTHON_PACKAGE_CHECK always fails,
-+    dnl so SPKGs are used for all python packages), but it may be confusing
-+    dnl to end users who expect the flag to actually give them access to
-+    dnl their system python packages and who may not be paying close
-+    dnl attention to their ./configure output.
-+    with_system_python3="force"
-   ])
- ])
- AC_SUBST([SAGE_VENV_FLAGS])
--- 
-cgit v1.0-1-gd88e
-
-
-From 02b369fd24ef7cf8997082e7850b9cf022cae34b Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Fri, 15 Oct 2021 01:18:35 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for setuptools.
-
----
- build/pkgs/setuptools/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/setuptools/spkg-configure.m4
-
-diff --git a/build/pkgs/setuptools/spkg-configure.m4 b/build/pkgs/setuptools/spkg-configure.m4
-new file mode 100644
-index 00000000..a2ad811
---- /dev/null
-+++ b/build/pkgs/setuptools/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([setuptools], [SAGE_PYTHON_PACKAGE_CHECK([setuptools])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 05117317d38693978efaf36e81d8b02bae44b257 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Fri, 15 Oct 2021 01:15:48 -0400
-Subject: Trac #29665: poison PYTHONUSERBASE when testing for "system"
- packages.
-
-When we're detecting system installations of python packages, we want
-to hide anything that was installed with e.g. "pip install --user". To
-accomplish that, we mimic the PYTHONUSERBASE poisoning from sage-env
-within the SAGE_PYTHON_PACKAGE_CHECK() macro.
----
- m4/sage_python_package_check.m4 | 18 +++++++++++++++++-
- 1 file changed, 17 insertions(+), 1 deletion(-)
-
-diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
-index 77b0a0c..b8cdba4 100644
---- a/m4/sage_python_package_check.m4
-+++ b/m4/sage_python_package_check.m4
-@@ -38,11 +38,27 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
-     dnl package.
-     SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
-     AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
-+
-+    dnl To prevent user-site (pip install --user) packages from being
-+    dnl detected as "system" packages, we poison PYTHONUSERBASE. The
-+    dnl sage-env script also does this at runtime; we mimic that
-+    dnl implementation to ensure that the behaviors at ./configure and
-+    dnl runtime are identical. Beware that (as in sage-env) the poisoning
-+    dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
-+    dnl user points PYTHONUSERBASE to any path (even the default), then
-+    dnl his local pip packages will be detected.
-+    PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
-+    AS_IF([test -z "${PYTHONUSERBASE}"], [
-+      PYTHONUSERBASE="${HOME}/.sage/local"
-+    ])
-+
-     AS_IF(
--      ["${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())"],
-+      [PYTHONUSERBASE="${PYTHONUSERBASE}" "${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" 2>/dev/null],
-       [AC_MSG_RESULT(yes)],
-       [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
-     )
-+
-+    PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
-   ], [
-     sage_spkg_install_$1=yes
-   ])
--- 
-cgit v1.0-1-gd88e
-
-
-From d75c1492f63a584b5ec5f424ddd7f7c4a6d502d3 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Fri, 15 Oct 2021 11:20:04 -0400
-Subject: Trac #29665: run SAGE_PYTHON_PACKAGE_CHECK() inside a venv.
-
-To recreate the runtime environment as closely as possible, we now use
-a venv (with system site packages enabled) when checking for system
-copies of python packages.
----
- m4/sage_python_package_check.m4 | 76 +++++++++++++++++++++++++++--------------
- 1 file changed, 51 insertions(+), 25 deletions(-)
-
-diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
-index b8cdba4..7cbd6c0 100644
---- a/m4/sage_python_package_check.m4
-+++ b/m4/sage_python_package_check.m4
-@@ -15,9 +15,11 @@
- #
- #     2. If we are not using the system python (no $PYTHON_FOR_VENV),
- #
--#     3. If setuptools is not available to the system python,
-+#     3. If we are unable to create a venv with the system python,
- #
--#     4. If the contents of install-requires.txt are not met (wrong
-+#     4. If setuptools is not available to the system python,
-+#
-+#     5. If the contents of install-requires.txt are not met (wrong
- #        version, no version, etc.) by the system python.
- #
- #   In any of those cases, we set sage_spkg_install_$package to "yes"
-@@ -27,38 +29,62 @@
- #
- #   The SAGE_SPKG_CONFIGURE_PYTHON3() macro is AC_REQUIRE'd to ensure
- #   that $PYTHON_FOR_VENV is available, if it is going to be available.
-+#   The check is run inside a new venv, and with the PYTHONUSERBASE
-+#   variable poisoned in the same manner as sage-env poisons it, to
-+#   ensure that the ./configure- and run-time views of the system
-+#   are as similar as possible.
- #
- 
- AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
-   AS_IF([test "${enable_system_site_packages}" = "yes"], [
-     AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
- 
--    dnl strip all comments from install-requires.txt; this should leave
--    dnl only a single line containing the version specification for this
--    dnl package.
--    SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
--    AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
-+    dnl We run this check inside a python venv, because that's ultimately
-+    dnl how the system $PYTHON_FOR_VENV will be used.
-+    AC_MSG_CHECKING([if we can create a python venv in config.venv])
- 
--    dnl To prevent user-site (pip install --user) packages from being
--    dnl detected as "system" packages, we poison PYTHONUSERBASE. The
--    dnl sage-env script also does this at runtime; we mimic that
--    dnl implementation to ensure that the behaviors at ./configure and
--    dnl runtime are identical. Beware that (as in sage-env) the poisoning
--    dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
--    dnl user points PYTHONUSERBASE to any path (even the default), then
--    dnl his local pip packages will be detected.
--    PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
--    AS_IF([test -z "${PYTHONUSERBASE}"], [
--      PYTHONUSERBASE="${HOME}/.sage/local"
--    ])
-+    dnl Use --clear because ./configure typically clobbers its output files.
-+    AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
-+                                        --clear                dnl
-+                                        --without-pip          dnl
-+					config.venv], [
-+      AC_MSG_RESULT(yes)
-+      dnl strip all comments from install-requires.txt; this should leave
-+      dnl only a single line containing the version specification for this
-+      dnl package.
-+      SAGE_PKG_VERSPEC=$(sed '/^#/d' "./build/pkgs/$1/install-requires.txt")
-+      AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
-+
-+      dnl To prevent user-site (pip install --user) packages from being
-+      dnl detected as "system" packages, we poison PYTHONUSERBASE. The
-+      dnl sage-env script also does this at runtime; we mimic that
-+      dnl implementation to ensure that the behaviors at ./configure and
-+      dnl runtime are identical. Beware that (as in sage-env) the poisoning
-+      dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
-+      dnl user points PYTHONUSERBASE to any path (even the default), then
-+      dnl his local pip packages will be detected.
-+      PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
-+      AS_IF([test -z "${PYTHONUSERBASE}"], [
-+        PYTHONUSERBASE="${HOME}/.sage/local"
-+      ])
- 
--    AS_IF(
--      [PYTHONUSERBASE="${PYTHONUSERBASE}" "${PYTHON_FOR_VENV}" -c "from setuptools.version import pkg_resources; pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" 2>/dev/null],
--      [AC_MSG_RESULT(yes)],
--      [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
--    )
-+      AS_IF(
-+        [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
-+           "from setuptools.version import pkg_resources;              dnl
-+            pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" dnl
-+	 2>/dev/null],
-+        [AC_MSG_RESULT(yes)],
-+        [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
-+      )
-+
-+      PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
-+    ], [
-+      dnl failed to create a venv for some reason
-+      AC_MSG_RESULT(no)
-+      sage_spkg_install_$1=yes
-+    ])
- 
--    PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
-+    rm -rf config.venv
-   ], [
-     sage_spkg_install_$1=yes
-   ])
--- 
-cgit v1.0-1-gd88e
-
-
-From 87646c3264a04ffd98a12d67074f93e1943a1e96 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Fri, 15 Oct 2021 11:38:08 -0400
-Subject: Trac #29665: log SAGE_PYTHON_PACKAGE_CHECK() failures to config.log.
-
----
- m4/sage_python_package_check.m4 | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
-index 7cbd6c0..e0e0b9f 100644
---- a/m4/sage_python_package_check.m4
-+++ b/m4/sage_python_package_check.m4
-@@ -47,7 +47,8 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
-     AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
-                                         --clear                dnl
-                                         --without-pip          dnl
--					config.venv], [
-+                                        config.venv            dnl
-+                                        2>&AS_MESSAGE_LOG_FD], [
-       AC_MSG_RESULT(yes)
-       dnl strip all comments from install-requires.txt; this should leave
-       dnl only a single line containing the version specification for this
-@@ -72,7 +73,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
-         [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
-            "from setuptools.version import pkg_resources;              dnl
-             pkg_resources.require('${SAGE_PKG_VERSPEC}'.splitlines())" dnl
--	 2>/dev/null],
-+	 2>&AS_MESSAGE_LOG_FD],
-         [AC_MSG_RESULT(yes)],
-         [AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
-       )
--- 
-cgit v1.0-1-gd88e
-
-
-From f7dfffd1c64816e2ae4e0f420b22065c5c5bf2cb Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Fri, 15 Oct 2021 11:45:37 -0400
-Subject: Trac #29665: don't clobber a plain file named config.venv.
-
-When SAGE_PYTHON_PACKAGE_CHECK() is cleaning up, we no longer remove
-"config.venv" unconditionally. Instead, we remove it only if it is a
-directory. This is also how "pyvenv --clear" works.
----
- m4/sage_python_package_check.m4 | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
-index e0e0b9f..127a078 100644
---- a/m4/sage_python_package_check.m4
-+++ b/m4/sage_python_package_check.m4
-@@ -85,7 +85,9 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
-       sage_spkg_install_$1=yes
-     ])
- 
--    rm -rf config.venv
-+    dnl Clean up config.venv, but only if we could have created it.
-+    dnl (The --clear flag to pyvenv will not clobber a plain file.)
-+    AS_IF([test -d config.venv], [rm -rf config.venv])
-   ], [
-     sage_spkg_install_$1=yes
-   ])
--- 
-cgit v1.0-1-gd88e
-
-
-From 9849c77313b895dcfb786d2ea54e36585bd31ce2 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Sat, 16 Oct 2021 08:14:42 -0400
-Subject: Trac #29665: don't announce system python packages that won't be
- used.
-
-When --enable-system-site-packages was not given, the python packages
-using SAGE_PYTHON_PACKAGE_CHECK() in spkg-configure.m4 cannot be used.
-Rather than suggest that users install them anyway, that macro now
-hacks the value of sage_use_system_$package to be "no" when the use
-of system site packages is disabled at the python level.
----
- m4/sage_python_package_check.m4 | 17 +++++++++++++++++
- 1 file changed, 17 insertions(+)
-
-diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
-index 127a078..7ee82a7 100644
---- a/m4/sage_python_package_check.m4
-+++ b/m4/sage_python_package_check.m4
-@@ -89,6 +89,23 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
-     dnl (The --clear flag to pyvenv will not clobber a plain file.)
-     AS_IF([test -d config.venv], [rm -rf config.venv])
-   ], [
-+    dnl System site packages are disabled.
-     sage_spkg_install_$1=yes
-+
-+    dnl We have to retroactively hack the --with-system-foo={no,yes,force}
-+    dnl mechanism here because it wasn't designed with the ability to
-+    dnl disable arbitrary chunks of system packages in mind. The easy cases
-+    dnl are "no" and "force" which require no action; "no" means we won't
-+    dnl suggest the package anyway, and "force" will raise an error when
-+    dnl the system-package check fails.
-+    dnl
-+    dnl The default of "yes" is more troubling because it is the default. To
-+    dnl avoid prompting users to install packages that won't be used, we want
-+    dnl to ignore "yes" when reporting the "hint: install these packages..."
-+    dnl at the end of ./configure. To accomplish that, we change "yes" to
-+    dnl "no" here, essentially changing the default for packages using this
-+    dnl macro when --enable-system-site-packages is disabled. Packages with
-+    dnl "no" are not suggested to the user.
-+    AS_IF([test "${sage_use_system_$1}" = "yes"],[sage_use_system_$1=no])
-   ])
- ])
--- 
-cgit v1.0-1-gd88e
-
-
-From 3e6ad737b94aaac234d615ecaf1a2455eb607f1a Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Sun, 17 Oct 2021 06:16:21 -0400
-Subject: Trac #29665: add Gentoo package information for python packages.
-
----
- build/pkgs/babel/distros/gentoo.txt         | 1 +
- build/pkgs/bleach/distros/gentoo.txt        | 1 +
- build/pkgs/certifi/distros/gentoo.txt       | 1 +
- build/pkgs/cvxopt/distros/gentoo.txt        | 1 +
- build/pkgs/decorator/distros/gentoo.txt     | 1 +
- build/pkgs/html5lib/distros/gentoo.txt      | 1 +
- build/pkgs/idna/distros/gentoo.txt          | 1 +
- build/pkgs/jinja2/distros/gentoo.txt        | 1 +
- build/pkgs/matplotlib/distros/gentoo.txt    | 1 +
- build/pkgs/mpmath/distros/gentoo.txt        | 1 +
- build/pkgs/networkx/distros/gentoo.txt      | 1 +
- build/pkgs/numpy/distros/gentoo.txt         | 1 +
- build/pkgs/packaging/distros/gentoo.txt     | 1 +
- build/pkgs/pandocfilters/distros/gentoo.txt | 1 +
- build/pkgs/pickleshare/distros/gentoo.txt   | 1 +
- build/pkgs/pillow/distros/gentoo.txt        | 1 +
- build/pkgs/pluggy/distros/gentoo.txt        | 1 +
- build/pkgs/pygments/distros/gentoo.txt      | 1 +
- build/pkgs/pytz/distros/gentoo.txt          | 1 +
- build/pkgs/pyzmq/distros/gentoo.txt         | 1 +
- build/pkgs/requests/distros/gentoo.txt      | 1 +
- build/pkgs/scipy/distros/gentoo.txt         | 1 +
- build/pkgs/setuptools/distros/gentoo.txt    | 1 +
- build/pkgs/six/distros/gentoo.txt           | 1 +
- build/pkgs/sympy/distros/gentoo.txt         | 1 +
- build/pkgs/texttable/distros/gentoo.txt     | 1 +
- build/pkgs/toml/distros/gentoo.txt          | 1 +
- build/pkgs/webencodings/distros/gentoo.txt  | 1 +
- 28 files changed, 28 insertions(+)
- create mode 100644 build/pkgs/babel/distros/gentoo.txt
- create mode 100644 build/pkgs/bleach/distros/gentoo.txt
- create mode 100644 build/pkgs/certifi/distros/gentoo.txt
- create mode 100644 build/pkgs/cvxopt/distros/gentoo.txt
- create mode 100644 build/pkgs/decorator/distros/gentoo.txt
- create mode 100644 build/pkgs/html5lib/distros/gentoo.txt
- create mode 100644 build/pkgs/idna/distros/gentoo.txt
- create mode 100644 build/pkgs/jinja2/distros/gentoo.txt
- create mode 100644 build/pkgs/matplotlib/distros/gentoo.txt
- create mode 100644 build/pkgs/mpmath/distros/gentoo.txt
- create mode 100644 build/pkgs/networkx/distros/gentoo.txt
- create mode 100644 build/pkgs/numpy/distros/gentoo.txt
- create mode 100644 build/pkgs/packaging/distros/gentoo.txt
- create mode 100644 build/pkgs/pandocfilters/distros/gentoo.txt
- create mode 100644 build/pkgs/pickleshare/distros/gentoo.txt
- create mode 100644 build/pkgs/pillow/distros/gentoo.txt
- create mode 100644 build/pkgs/pluggy/distros/gentoo.txt
- create mode 100644 build/pkgs/pygments/distros/gentoo.txt
- create mode 100644 build/pkgs/pytz/distros/gentoo.txt
- create mode 100644 build/pkgs/pyzmq/distros/gentoo.txt
- create mode 100644 build/pkgs/requests/distros/gentoo.txt
- create mode 100644 build/pkgs/scipy/distros/gentoo.txt
- create mode 100644 build/pkgs/setuptools/distros/gentoo.txt
- create mode 100644 build/pkgs/six/distros/gentoo.txt
- create mode 100644 build/pkgs/sympy/distros/gentoo.txt
- create mode 100644 build/pkgs/texttable/distros/gentoo.txt
- create mode 100644 build/pkgs/toml/distros/gentoo.txt
- create mode 100644 build/pkgs/webencodings/distros/gentoo.txt
-
-diff --git a/build/pkgs/babel/distros/gentoo.txt b/build/pkgs/babel/distros/gentoo.txt
-new file mode 100644
-index 00000000..2d2c34f
---- /dev/null
-+++ b/build/pkgs/babel/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/Babel
-diff --git a/build/pkgs/bleach/distros/gentoo.txt b/build/pkgs/bleach/distros/gentoo.txt
-new file mode 100644
-index 00000000..b4f9744
---- /dev/null
-+++ b/build/pkgs/bleach/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/bleach
-diff --git a/build/pkgs/certifi/distros/gentoo.txt b/build/pkgs/certifi/distros/gentoo.txt
-new file mode 100644
-index 00000000..72e2e91
---- /dev/null
-+++ b/build/pkgs/certifi/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/certifi
-diff --git a/build/pkgs/cvxopt/distros/gentoo.txt b/build/pkgs/cvxopt/distros/gentoo.txt
-new file mode 100644
-index 00000000..b312391
---- /dev/null
-+++ b/build/pkgs/cvxopt/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/cvxopt
-diff --git a/build/pkgs/decorator/distros/gentoo.txt b/build/pkgs/decorator/distros/gentoo.txt
-new file mode 100644
-index 00000000..fea5a67
---- /dev/null
-+++ b/build/pkgs/decorator/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/decorator
-diff --git a/build/pkgs/html5lib/distros/gentoo.txt b/build/pkgs/html5lib/distros/gentoo.txt
-new file mode 100644
-index 00000000..6c2be76
---- /dev/null
-+++ b/build/pkgs/html5lib/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/html5lib
-diff --git a/build/pkgs/idna/distros/gentoo.txt b/build/pkgs/idna/distros/gentoo.txt
-new file mode 100644
-index 00000000..68ef51c
---- /dev/null
-+++ b/build/pkgs/idna/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/idna
-diff --git a/build/pkgs/jinja2/distros/gentoo.txt b/build/pkgs/jinja2/distros/gentoo.txt
-new file mode 100644
-index 00000000..15a27ae
---- /dev/null
-+++ b/build/pkgs/jinja2/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/jinja
-diff --git a/build/pkgs/matplotlib/distros/gentoo.txt b/build/pkgs/matplotlib/distros/gentoo.txt
-new file mode 100644
-index 00000000..bcfefb5
---- /dev/null
-+++ b/build/pkgs/matplotlib/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/matplotlib
-diff --git a/build/pkgs/mpmath/distros/gentoo.txt b/build/pkgs/mpmath/distros/gentoo.txt
-new file mode 100644
-index 00000000..946c62d
---- /dev/null
-+++ b/build/pkgs/mpmath/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/mpmath
-diff --git a/build/pkgs/networkx/distros/gentoo.txt b/build/pkgs/networkx/distros/gentoo.txt
-new file mode 100644
-index 00000000..dd97742
---- /dev/null
-+++ b/build/pkgs/networkx/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/networkx
-diff --git a/build/pkgs/numpy/distros/gentoo.txt b/build/pkgs/numpy/distros/gentoo.txt
-new file mode 100644
-index 00000000..d2179d4
---- /dev/null
-+++ b/build/pkgs/numpy/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/numpy
-diff --git a/build/pkgs/packaging/distros/gentoo.txt b/build/pkgs/packaging/distros/gentoo.txt
-new file mode 100644
-index 00000000..e5309ed
---- /dev/null
-+++ b/build/pkgs/packaging/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/packaging
-diff --git a/build/pkgs/pandocfilters/distros/gentoo.txt b/build/pkgs/pandocfilters/distros/gentoo.txt
-new file mode 100644
-index 00000000..a726fda
---- /dev/null
-+++ b/build/pkgs/pandocfilters/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/pandocfilters
-diff --git a/build/pkgs/pickleshare/distros/gentoo.txt b/build/pkgs/pickleshare/distros/gentoo.txt
-new file mode 100644
-index 00000000..14fad0f
---- /dev/null
-+++ b/build/pkgs/pickleshare/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/pickleshare
-diff --git a/build/pkgs/pillow/distros/gentoo.txt b/build/pkgs/pillow/distros/gentoo.txt
-new file mode 100644
-index 00000000..1243649
---- /dev/null
-+++ b/build/pkgs/pillow/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/pillow
-diff --git a/build/pkgs/pluggy/distros/gentoo.txt b/build/pkgs/pluggy/distros/gentoo.txt
-new file mode 100644
-index 00000000..7b33876
---- /dev/null
-+++ b/build/pkgs/pluggy/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/pluggy
-diff --git a/build/pkgs/pygments/distros/gentoo.txt b/build/pkgs/pygments/distros/gentoo.txt
-new file mode 100644
-index 00000000..a584f32
---- /dev/null
-+++ b/build/pkgs/pygments/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/pygments
-diff --git a/build/pkgs/pytz/distros/gentoo.txt b/build/pkgs/pytz/distros/gentoo.txt
-new file mode 100644
-index 00000000..902a18b
---- /dev/null
-+++ b/build/pkgs/pytz/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/pytz
-diff --git a/build/pkgs/pyzmq/distros/gentoo.txt b/build/pkgs/pyzmq/distros/gentoo.txt
-new file mode 100644
-index 00000000..77c2429
---- /dev/null
-+++ b/build/pkgs/pyzmq/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/pyzmq
-diff --git a/build/pkgs/requests/distros/gentoo.txt b/build/pkgs/requests/distros/gentoo.txt
-new file mode 100644
-index 00000000..d3dc941
---- /dev/null
-+++ b/build/pkgs/requests/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/requests
-diff --git a/build/pkgs/scipy/distros/gentoo.txt b/build/pkgs/scipy/distros/gentoo.txt
-new file mode 100644
-index 00000000..11dabd2
---- /dev/null
-+++ b/build/pkgs/scipy/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/scipy
-diff --git a/build/pkgs/setuptools/distros/gentoo.txt b/build/pkgs/setuptools/distros/gentoo.txt
-new file mode 100644
-index 00000000..3a4fa34
---- /dev/null
-+++ b/build/pkgs/setuptools/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/setuptools
-diff --git a/build/pkgs/six/distros/gentoo.txt b/build/pkgs/six/distros/gentoo.txt
-new file mode 100644
-index 00000000..f73f648
---- /dev/null
-+++ b/build/pkgs/six/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/six
-diff --git a/build/pkgs/sympy/distros/gentoo.txt b/build/pkgs/sympy/distros/gentoo.txt
-new file mode 100644
-index 00000000..b5a5034
---- /dev/null
-+++ b/build/pkgs/sympy/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/sympy
-diff --git a/build/pkgs/texttable/distros/gentoo.txt b/build/pkgs/texttable/distros/gentoo.txt
-new file mode 100644
-index 00000000..b33a7a7
---- /dev/null
-+++ b/build/pkgs/texttable/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/texttable
-diff --git a/build/pkgs/toml/distros/gentoo.txt b/build/pkgs/toml/distros/gentoo.txt
-new file mode 100644
-index 00000000..64fcea3
---- /dev/null
-+++ b/build/pkgs/toml/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/toml
-diff --git a/build/pkgs/webencodings/distros/gentoo.txt b/build/pkgs/webencodings/distros/gentoo.txt
-new file mode 100644
-index 00000000..7539b0f
---- /dev/null
-+++ b/build/pkgs/webencodings/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/webencodings
--- 
-cgit v1.0-1-gd88e
-
-
-From 088380f884124c9608160b613ba031c5f023f604 Mon Sep 17 00:00:00 2001
-From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
-Date: Sun, 17 Oct 2021 18:43:04 -0700
-Subject: build/pkgs: Add distros/fedora.txt for Python packages
-
----
- build/pkgs/babel/distros/fedora.txt         | 1 +
- build/pkgs/bleach/distros/fedora.txt        | 1 +
- build/pkgs/certifi/distros/fedora.txt       | 1 +
- build/pkgs/cvxopt/distros/fedora.txt        | 1 +
- build/pkgs/decorator/distros/fedora.txt     | 1 +
- build/pkgs/html5lib/distros/fedora.txt      | 1 +
- build/pkgs/idna/distros/fedora.txt          | 1 +
- build/pkgs/jinja2/distros/fedora.txt        | 1 +
- build/pkgs/matplotlib/distros/fedora.txt    | 1 +
- build/pkgs/mpmath/distros/fedora.txt        | 1 +
- build/pkgs/networkx/distros/fedora.txt      | 1 +
- build/pkgs/numpy/distros/fedora.txt         | 1 +
- build/pkgs/packaging/distros/fedora.txt     | 1 +
- build/pkgs/pandocfilters/distros/fedora.txt | 1 +
- build/pkgs/pickleshare/distros/fedora.txt   | 1 +
- build/pkgs/pillow/distros/fedora.txt        | 1 +
- build/pkgs/pluggy/distros/fedora.txt        | 1 +
- build/pkgs/py/distros/fedora.txt            | 1 +
- build/pkgs/pygments/distros/fedora.txt      | 1 +
- build/pkgs/pytz/distros/fedora.txt          | 1 +
- build/pkgs/pyzmq/distros/fedora.txt         | 1 +
- build/pkgs/requests/distros/fedora.txt      | 1 +
- build/pkgs/scipy/distros/fedora.txt         | 1 +
- build/pkgs/setuptools/distros/fedora.txt    | 1 +
- build/pkgs/six/distros/fedora.txt           | 1 +
- build/pkgs/sympy/distros/fedora.txt         | 1 +
- build/pkgs/texttable/distros/fedora.txt     | 1 +
- build/pkgs/toml/distros/fedora.txt          | 1 +
- build/pkgs/webencodings/distros/fedora.txt  | 1 +
- build/pkgs/wheel/distros/fedora.txt         | 1 +
- 30 files changed, 30 insertions(+)
- create mode 100644 build/pkgs/babel/distros/fedora.txt
- create mode 100644 build/pkgs/bleach/distros/fedora.txt
- create mode 100644 build/pkgs/certifi/distros/fedora.txt
- create mode 100644 build/pkgs/cvxopt/distros/fedora.txt
- create mode 100644 build/pkgs/decorator/distros/fedora.txt
- create mode 100644 build/pkgs/html5lib/distros/fedora.txt
- create mode 100644 build/pkgs/idna/distros/fedora.txt
- create mode 100644 build/pkgs/jinja2/distros/fedora.txt
- create mode 100644 build/pkgs/matplotlib/distros/fedora.txt
- create mode 100644 build/pkgs/mpmath/distros/fedora.txt
- create mode 100644 build/pkgs/networkx/distros/fedora.txt
- create mode 100644 build/pkgs/numpy/distros/fedora.txt
- create mode 100644 build/pkgs/packaging/distros/fedora.txt
- create mode 100644 build/pkgs/pandocfilters/distros/fedora.txt
- create mode 100644 build/pkgs/pickleshare/distros/fedora.txt
- create mode 100644 build/pkgs/pillow/distros/fedora.txt
- create mode 100644 build/pkgs/pluggy/distros/fedora.txt
- create mode 100644 build/pkgs/py/distros/fedora.txt
- create mode 100644 build/pkgs/pygments/distros/fedora.txt
- create mode 100644 build/pkgs/pytz/distros/fedora.txt
- create mode 100644 build/pkgs/pyzmq/distros/fedora.txt
- create mode 100644 build/pkgs/requests/distros/fedora.txt
- create mode 100644 build/pkgs/scipy/distros/fedora.txt
- create mode 100644 build/pkgs/setuptools/distros/fedora.txt
- create mode 100644 build/pkgs/six/distros/fedora.txt
- create mode 100644 build/pkgs/sympy/distros/fedora.txt
- create mode 100644 build/pkgs/texttable/distros/fedora.txt
- create mode 100644 build/pkgs/toml/distros/fedora.txt
- create mode 100644 build/pkgs/webencodings/distros/fedora.txt
- create mode 100644 build/pkgs/wheel/distros/fedora.txt
-
-diff --git a/build/pkgs/babel/distros/fedora.txt b/build/pkgs/babel/distros/fedora.txt
-new file mode 100644
-index 00000000..98f6593
---- /dev/null
-+++ b/build/pkgs/babel/distros/fedora.txt
-@@ -0,0 +1 @@
-+babel
-diff --git a/build/pkgs/bleach/distros/fedora.txt b/build/pkgs/bleach/distros/fedora.txt
-new file mode 100644
-index 00000000..c5422cc
---- /dev/null
-+++ b/build/pkgs/bleach/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-bleach
-diff --git a/build/pkgs/certifi/distros/fedora.txt b/build/pkgs/certifi/distros/fedora.txt
-new file mode 100644
-index 00000000..be421c8
---- /dev/null
-+++ b/build/pkgs/certifi/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-certifi
-diff --git a/build/pkgs/cvxopt/distros/fedora.txt b/build/pkgs/cvxopt/distros/fedora.txt
-new file mode 100644
-index 00000000..f15770f
---- /dev/null
-+++ b/build/pkgs/cvxopt/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-cvxopt
-diff --git a/build/pkgs/decorator/distros/fedora.txt b/build/pkgs/decorator/distros/fedora.txt
-new file mode 100644
-index 00000000..0795604
---- /dev/null
-+++ b/build/pkgs/decorator/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-decorator
-diff --git a/build/pkgs/html5lib/distros/fedora.txt b/build/pkgs/html5lib/distros/fedora.txt
-new file mode 100644
-index 00000000..b821491
---- /dev/null
-+++ b/build/pkgs/html5lib/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-html5lib
-diff --git a/build/pkgs/idna/distros/fedora.txt b/build/pkgs/idna/distros/fedora.txt
-new file mode 100644
-index 00000000..a73e70c
---- /dev/null
-+++ b/build/pkgs/idna/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-idna
-diff --git a/build/pkgs/jinja2/distros/fedora.txt b/build/pkgs/jinja2/distros/fedora.txt
-new file mode 100644
-index 00000000..f5f3caf
---- /dev/null
-+++ b/build/pkgs/jinja2/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-jinja2
-diff --git a/build/pkgs/matplotlib/distros/fedora.txt b/build/pkgs/matplotlib/distros/fedora.txt
-new file mode 100644
-index 00000000..f6d856e
---- /dev/null
-+++ b/build/pkgs/matplotlib/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-matplotlib
-diff --git a/build/pkgs/mpmath/distros/fedora.txt b/build/pkgs/mpmath/distros/fedora.txt
-new file mode 100644
-index 00000000..a7dc8d5
---- /dev/null
-+++ b/build/pkgs/mpmath/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-mpmath
-diff --git a/build/pkgs/networkx/distros/fedora.txt b/build/pkgs/networkx/distros/fedora.txt
-new file mode 100644
-index 00000000..293f943
---- /dev/null
-+++ b/build/pkgs/networkx/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-networkx
-diff --git a/build/pkgs/numpy/distros/fedora.txt b/build/pkgs/numpy/distros/fedora.txt
-new file mode 100644
-index 00000000..c8722b9
---- /dev/null
-+++ b/build/pkgs/numpy/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-numpy
-diff --git a/build/pkgs/packaging/distros/fedora.txt b/build/pkgs/packaging/distros/fedora.txt
-new file mode 100644
-index 00000000..02ad855
---- /dev/null
-+++ b/build/pkgs/packaging/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-packaging
-diff --git a/build/pkgs/pandocfilters/distros/fedora.txt b/build/pkgs/pandocfilters/distros/fedora.txt
-new file mode 100644
-index 00000000..e7a86d0
---- /dev/null
-+++ b/build/pkgs/pandocfilters/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-pandocfilters
-diff --git a/build/pkgs/pickleshare/distros/fedora.txt b/build/pkgs/pickleshare/distros/fedora.txt
-new file mode 100644
-index 00000000..6d991a2
---- /dev/null
-+++ b/build/pkgs/pickleshare/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-pickleshare
-diff --git a/build/pkgs/pillow/distros/fedora.txt b/build/pkgs/pillow/distros/fedora.txt
-new file mode 100644
-index 00000000..86dbb1d
---- /dev/null
-+++ b/build/pkgs/pillow/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-pillow
-diff --git a/build/pkgs/pluggy/distros/fedora.txt b/build/pkgs/pluggy/distros/fedora.txt
-new file mode 100644
-index 00000000..c869e54
---- /dev/null
-+++ b/build/pkgs/pluggy/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-pluggy
-diff --git a/build/pkgs/py/distros/fedora.txt b/build/pkgs/py/distros/fedora.txt
-new file mode 100644
-index 00000000..b348d39
---- /dev/null
-+++ b/build/pkgs/py/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-py
-diff --git a/build/pkgs/pygments/distros/fedora.txt b/build/pkgs/pygments/distros/fedora.txt
-new file mode 100644
-index 00000000..f3e72a8
---- /dev/null
-+++ b/build/pkgs/pygments/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-pygments
-diff --git a/build/pkgs/pytz/distros/fedora.txt b/build/pkgs/pytz/distros/fedora.txt
-new file mode 100644
-index 00000000..2cccc9e
---- /dev/null
-+++ b/build/pkgs/pytz/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-pytz
-diff --git a/build/pkgs/pyzmq/distros/fedora.txt b/build/pkgs/pyzmq/distros/fedora.txt
-new file mode 100644
-index 00000000..23f64d1
---- /dev/null
-+++ b/build/pkgs/pyzmq/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-pyzmq
-diff --git a/build/pkgs/requests/distros/fedora.txt b/build/pkgs/requests/distros/fedora.txt
-new file mode 100644
-index 00000000..93a7bc1
---- /dev/null
-+++ b/build/pkgs/requests/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-requests
-diff --git a/build/pkgs/scipy/distros/fedora.txt b/build/pkgs/scipy/distros/fedora.txt
-new file mode 100644
-index 00000000..7ff2882
---- /dev/null
-+++ b/build/pkgs/scipy/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-scipy
-diff --git a/build/pkgs/setuptools/distros/fedora.txt b/build/pkgs/setuptools/distros/fedora.txt
-new file mode 100644
-index 00000000..e1ad178
---- /dev/null
-+++ b/build/pkgs/setuptools/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-setuptools
-diff --git a/build/pkgs/six/distros/fedora.txt b/build/pkgs/six/distros/fedora.txt
-new file mode 100644
-index 00000000..787c530
---- /dev/null
-+++ b/build/pkgs/six/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-six
-diff --git a/build/pkgs/sympy/distros/fedora.txt b/build/pkgs/sympy/distros/fedora.txt
-new file mode 100644
-index 00000000..126c88a
---- /dev/null
-+++ b/build/pkgs/sympy/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-sympy
-diff --git a/build/pkgs/texttable/distros/fedora.txt b/build/pkgs/texttable/distros/fedora.txt
-new file mode 100644
-index 00000000..8d1ccec
---- /dev/null
-+++ b/build/pkgs/texttable/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-texttable
-diff --git a/build/pkgs/toml/distros/fedora.txt b/build/pkgs/toml/distros/fedora.txt
-new file mode 100644
-index 00000000..821ee77
---- /dev/null
-+++ b/build/pkgs/toml/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-toml
-diff --git a/build/pkgs/webencodings/distros/fedora.txt b/build/pkgs/webencodings/distros/fedora.txt
-new file mode 100644
-index 00000000..12ddba9
---- /dev/null
-+++ b/build/pkgs/webencodings/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-webencodings
-diff --git a/build/pkgs/wheel/distros/fedora.txt b/build/pkgs/wheel/distros/fedora.txt
-new file mode 100644
-index 00000000..ae4cbb9
---- /dev/null
-+++ b/build/pkgs/wheel/distros/fedora.txt
-@@ -0,0 +1 @@
-+python-wheel
--- 
-cgit v1.0-1-gd88e
-
-
-From ad1d5a20380b147c774903066031442f31094626 Mon Sep 17 00:00:00 2001
-From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
-Date: Sun, 17 Oct 2021 21:04:04 -0700
-Subject: build/pkgs: Add distros/arch.txt for Python packages
-
----
- build/pkgs/babel/distros/arch.txt         | 1 +
- build/pkgs/bleach/distros/arch.txt        | 1 +
- build/pkgs/certifi/distros/arch.txt       | 1 +
- build/pkgs/cvxopt/distros/arch.txt        | 1 +
- build/pkgs/decorator/distros/arch.txt     | 1 +
- build/pkgs/html5lib/distros/arch.txt      | 1 +
- build/pkgs/idna/distros/arch.txt          | 1 +
- build/pkgs/matplotlib/distros/arch.txt    | 1 +
- build/pkgs/mpmath/distros/arch.txt        | 1 +
- build/pkgs/networkx/distros/arch.txt      | 1 +
- build/pkgs/numpy/distros/arch.txt         | 1 +
- build/pkgs/packaging/distros/arch.txt     | 1 +
- build/pkgs/pandocfilters/distros/arch.txt | 1 +
- build/pkgs/pickleshare/distros/arch.txt   | 1 +
- build/pkgs/pillow/distros/arch.txt        | 1 +
- build/pkgs/pluggy/distros/arch.txt        | 1 +
- build/pkgs/py/distros/arch.txt            | 1 +
- build/pkgs/pygments/distros/arch.txt      | 1 +
- build/pkgs/pytz/distros/arch.txt          | 1 +
- build/pkgs/pyzmq/distros/arch.txt         | 1 +
- build/pkgs/requests/distros/arch.txt      | 1 +
- build/pkgs/scipy/distros/arch.txt         | 1 +
- build/pkgs/setuptools/distros/arch.txt    | 1 +
- build/pkgs/six/distros/arch.txt           | 1 +
- build/pkgs/sympy/distros/arch.txt         | 1 +
- build/pkgs/texttable/distros/arch.txt     | 1 +
- build/pkgs/toml/distros/arch.txt          | 1 +
- build/pkgs/webencodings/distros/arch.txt  | 1 +
- build/pkgs/wheel/distros/arch.txt         | 1 +
- 29 files changed, 29 insertions(+)
- create mode 100644 build/pkgs/babel/distros/arch.txt
- create mode 100644 build/pkgs/bleach/distros/arch.txt
- create mode 100644 build/pkgs/certifi/distros/arch.txt
- create mode 100644 build/pkgs/cvxopt/distros/arch.txt
- create mode 100644 build/pkgs/decorator/distros/arch.txt
- create mode 100644 build/pkgs/html5lib/distros/arch.txt
- create mode 100644 build/pkgs/idna/distros/arch.txt
- create mode 100644 build/pkgs/matplotlib/distros/arch.txt
- create mode 100644 build/pkgs/mpmath/distros/arch.txt
- create mode 100644 build/pkgs/networkx/distros/arch.txt
- create mode 100644 build/pkgs/numpy/distros/arch.txt
- create mode 100644 build/pkgs/packaging/distros/arch.txt
- create mode 100644 build/pkgs/pandocfilters/distros/arch.txt
- create mode 100644 build/pkgs/pickleshare/distros/arch.txt
- create mode 100644 build/pkgs/pillow/distros/arch.txt
- create mode 100644 build/pkgs/pluggy/distros/arch.txt
- create mode 100644 build/pkgs/py/distros/arch.txt
- create mode 100644 build/pkgs/pygments/distros/arch.txt
- create mode 100644 build/pkgs/pytz/distros/arch.txt
- create mode 100644 build/pkgs/pyzmq/distros/arch.txt
- create mode 100644 build/pkgs/requests/distros/arch.txt
- create mode 100644 build/pkgs/scipy/distros/arch.txt
- create mode 100644 build/pkgs/setuptools/distros/arch.txt
- create mode 100644 build/pkgs/six/distros/arch.txt
- create mode 100644 build/pkgs/sympy/distros/arch.txt
- create mode 100644 build/pkgs/texttable/distros/arch.txt
- create mode 100644 build/pkgs/toml/distros/arch.txt
- create mode 100644 build/pkgs/webencodings/distros/arch.txt
- create mode 100644 build/pkgs/wheel/distros/arch.txt
-
-diff --git a/build/pkgs/babel/distros/arch.txt b/build/pkgs/babel/distros/arch.txt
-new file mode 100644
-index 00000000..f2d828c
---- /dev/null
-+++ b/build/pkgs/babel/distros/arch.txt
-@@ -0,0 +1 @@
-+python-babel
-diff --git a/build/pkgs/bleach/distros/arch.txt b/build/pkgs/bleach/distros/arch.txt
-new file mode 100644
-index 00000000..c5422cc
---- /dev/null
-+++ b/build/pkgs/bleach/distros/arch.txt
-@@ -0,0 +1 @@
-+python-bleach
-diff --git a/build/pkgs/certifi/distros/arch.txt b/build/pkgs/certifi/distros/arch.txt
-new file mode 100644
-index 00000000..be421c8
---- /dev/null
-+++ b/build/pkgs/certifi/distros/arch.txt
-@@ -0,0 +1 @@
-+python-certifi
-diff --git a/build/pkgs/cvxopt/distros/arch.txt b/build/pkgs/cvxopt/distros/arch.txt
-new file mode 100644
-index 00000000..f15770f
---- /dev/null
-+++ b/build/pkgs/cvxopt/distros/arch.txt
-@@ -0,0 +1 @@
-+python-cvxopt
-diff --git a/build/pkgs/decorator/distros/arch.txt b/build/pkgs/decorator/distros/arch.txt
-new file mode 100644
-index 00000000..0795604
---- /dev/null
-+++ b/build/pkgs/decorator/distros/arch.txt
-@@ -0,0 +1 @@
-+python-decorator
-diff --git a/build/pkgs/html5lib/distros/arch.txt b/build/pkgs/html5lib/distros/arch.txt
-new file mode 100644
-index 00000000..b821491
---- /dev/null
-+++ b/build/pkgs/html5lib/distros/arch.txt
-@@ -0,0 +1 @@
-+python-html5lib
-diff --git a/build/pkgs/idna/distros/arch.txt b/build/pkgs/idna/distros/arch.txt
-new file mode 100644
-index 00000000..a73e70c
---- /dev/null
-+++ b/build/pkgs/idna/distros/arch.txt
-@@ -0,0 +1 @@
-+python-idna
-diff --git a/build/pkgs/matplotlib/distros/arch.txt b/build/pkgs/matplotlib/distros/arch.txt
-new file mode 100644
-index 00000000..f6d856e
---- /dev/null
-+++ b/build/pkgs/matplotlib/distros/arch.txt
-@@ -0,0 +1 @@
-+python-matplotlib
-diff --git a/build/pkgs/mpmath/distros/arch.txt b/build/pkgs/mpmath/distros/arch.txt
-new file mode 100644
-index 00000000..a7dc8d5
---- /dev/null
-+++ b/build/pkgs/mpmath/distros/arch.txt
-@@ -0,0 +1 @@
-+python-mpmath
-diff --git a/build/pkgs/networkx/distros/arch.txt b/build/pkgs/networkx/distros/arch.txt
-new file mode 100644
-index 00000000..293f943
---- /dev/null
-+++ b/build/pkgs/networkx/distros/arch.txt
-@@ -0,0 +1 @@
-+python-networkx
-diff --git a/build/pkgs/numpy/distros/arch.txt b/build/pkgs/numpy/distros/arch.txt
-new file mode 100644
-index 00000000..c8722b9
---- /dev/null
-+++ b/build/pkgs/numpy/distros/arch.txt
-@@ -0,0 +1 @@
-+python-numpy
-diff --git a/build/pkgs/packaging/distros/arch.txt b/build/pkgs/packaging/distros/arch.txt
-new file mode 100644
-index 00000000..02ad855
---- /dev/null
-+++ b/build/pkgs/packaging/distros/arch.txt
-@@ -0,0 +1 @@
-+python-packaging
-diff --git a/build/pkgs/pandocfilters/distros/arch.txt b/build/pkgs/pandocfilters/distros/arch.txt
-new file mode 100644
-index 00000000..e7a86d0
---- /dev/null
-+++ b/build/pkgs/pandocfilters/distros/arch.txt
-@@ -0,0 +1 @@
-+python-pandocfilters
-diff --git a/build/pkgs/pickleshare/distros/arch.txt b/build/pkgs/pickleshare/distros/arch.txt
-new file mode 100644
-index 00000000..6d991a2
---- /dev/null
-+++ b/build/pkgs/pickleshare/distros/arch.txt
-@@ -0,0 +1 @@
-+python-pickleshare
-diff --git a/build/pkgs/pillow/distros/arch.txt b/build/pkgs/pillow/distros/arch.txt
-new file mode 100644
-index 00000000..86dbb1d
---- /dev/null
-+++ b/build/pkgs/pillow/distros/arch.txt
-@@ -0,0 +1 @@
-+python-pillow
-diff --git a/build/pkgs/pluggy/distros/arch.txt b/build/pkgs/pluggy/distros/arch.txt
-new file mode 100644
-index 00000000..c869e54
---- /dev/null
-+++ b/build/pkgs/pluggy/distros/arch.txt
-@@ -0,0 +1 @@
-+python-pluggy
-diff --git a/build/pkgs/py/distros/arch.txt b/build/pkgs/py/distros/arch.txt
-new file mode 100644
-index 00000000..b348d39
---- /dev/null
-+++ b/build/pkgs/py/distros/arch.txt
-@@ -0,0 +1 @@
-+python-py
-diff --git a/build/pkgs/pygments/distros/arch.txt b/build/pkgs/pygments/distros/arch.txt
-new file mode 100644
-index 00000000..f3e72a8
---- /dev/null
-+++ b/build/pkgs/pygments/distros/arch.txt
-@@ -0,0 +1 @@
-+python-pygments
-diff --git a/build/pkgs/pytz/distros/arch.txt b/build/pkgs/pytz/distros/arch.txt
-new file mode 100644
-index 00000000..2cccc9e
---- /dev/null
-+++ b/build/pkgs/pytz/distros/arch.txt
-@@ -0,0 +1 @@
-+python-pytz
-diff --git a/build/pkgs/pyzmq/distros/arch.txt b/build/pkgs/pyzmq/distros/arch.txt
-new file mode 100644
-index 00000000..23f64d1
---- /dev/null
-+++ b/build/pkgs/pyzmq/distros/arch.txt
-@@ -0,0 +1 @@
-+python-pyzmq
-diff --git a/build/pkgs/requests/distros/arch.txt b/build/pkgs/requests/distros/arch.txt
-new file mode 100644
-index 00000000..93a7bc1
---- /dev/null
-+++ b/build/pkgs/requests/distros/arch.txt
-@@ -0,0 +1 @@
-+python-requests
-diff --git a/build/pkgs/scipy/distros/arch.txt b/build/pkgs/scipy/distros/arch.txt
-new file mode 100644
-index 00000000..7ff2882
---- /dev/null
-+++ b/build/pkgs/scipy/distros/arch.txt
-@@ -0,0 +1 @@
-+python-scipy
-diff --git a/build/pkgs/setuptools/distros/arch.txt b/build/pkgs/setuptools/distros/arch.txt
-new file mode 100644
-index 00000000..e1ad178
---- /dev/null
-+++ b/build/pkgs/setuptools/distros/arch.txt
-@@ -0,0 +1 @@
-+python-setuptools
-diff --git a/build/pkgs/six/distros/arch.txt b/build/pkgs/six/distros/arch.txt
-new file mode 100644
-index 00000000..787c530
---- /dev/null
-+++ b/build/pkgs/six/distros/arch.txt
-@@ -0,0 +1 @@
-+python-six
-diff --git a/build/pkgs/sympy/distros/arch.txt b/build/pkgs/sympy/distros/arch.txt
-new file mode 100644
-index 00000000..126c88a
---- /dev/null
-+++ b/build/pkgs/sympy/distros/arch.txt
-@@ -0,0 +1 @@
-+python-sympy
-diff --git a/build/pkgs/texttable/distros/arch.txt b/build/pkgs/texttable/distros/arch.txt
-new file mode 100644
-index 00000000..8d1ccec
---- /dev/null
-+++ b/build/pkgs/texttable/distros/arch.txt
-@@ -0,0 +1 @@
-+python-texttable
-diff --git a/build/pkgs/toml/distros/arch.txt b/build/pkgs/toml/distros/arch.txt
-new file mode 100644
-index 00000000..821ee77
---- /dev/null
-+++ b/build/pkgs/toml/distros/arch.txt
-@@ -0,0 +1 @@
-+python-toml
-diff --git a/build/pkgs/webencodings/distros/arch.txt b/build/pkgs/webencodings/distros/arch.txt
-new file mode 100644
-index 00000000..12ddba9
---- /dev/null
-+++ b/build/pkgs/webencodings/distros/arch.txt
-@@ -0,0 +1 @@
-+python-webencodings
-diff --git a/build/pkgs/wheel/distros/arch.txt b/build/pkgs/wheel/distros/arch.txt
-new file mode 100644
-index 00000000..ae4cbb9
---- /dev/null
-+++ b/build/pkgs/wheel/distros/arch.txt
-@@ -0,0 +1 @@
-+python-wheel
--- 
-cgit v1.0-1-gd88e
-
-
-From 5087abee08f2a89ddaf422ec72a84575fe724a79 Mon Sep 17 00:00:00 2001
-From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
-Date: Sun, 17 Oct 2021 21:20:56 -0700
-Subject: build/pkgs: Add distros/opensuse.txt for Python packages
-
----
- build/pkgs/bleach/distros/opensuse.txt        | 1 +
- build/pkgs/cvxopt/distros/opensuse.txt        | 1 +
- build/pkgs/html5lib/distros/opensuse.txt      | 1 +
- build/pkgs/idna/distros/opensuse.txt          | 1 +
- build/pkgs/jinja2/distros/opensuse.txt        | 2 +-
- build/pkgs/mpmath/distros/opensuse.txt        | 1 +
- build/pkgs/numpy/distros/opensuse.txt         | 1 +
- build/pkgs/packaging/distros/opensuse.txt     | 1 +
- build/pkgs/pandocfilters/distros/opensuse.txt | 1 +
- build/pkgs/pluggy/distros/opensuse.txt        | 1 +
- build/pkgs/py/distros/opensuse.txt            | 1 +
- build/pkgs/pygments/distros/opensuse.txt      | 2 +-
- build/pkgs/sympy/distros/opensuse.txt         | 1 +
- build/pkgs/texttable/distros/opensuse.txt     | 1 +
- build/pkgs/toml/distros/opensuse.txt          | 1 +
- 15 files changed, 15 insertions(+), 2 deletions(-)
- create mode 100644 build/pkgs/bleach/distros/opensuse.txt
- create mode 100644 build/pkgs/cvxopt/distros/opensuse.txt
- create mode 100644 build/pkgs/html5lib/distros/opensuse.txt
- create mode 100644 build/pkgs/idna/distros/opensuse.txt
- create mode 100644 build/pkgs/mpmath/distros/opensuse.txt
- create mode 100644 build/pkgs/numpy/distros/opensuse.txt
- create mode 100644 build/pkgs/packaging/distros/opensuse.txt
- create mode 100644 build/pkgs/pandocfilters/distros/opensuse.txt
- create mode 100644 build/pkgs/pluggy/distros/opensuse.txt
- create mode 100644 build/pkgs/py/distros/opensuse.txt
- create mode 100644 build/pkgs/sympy/distros/opensuse.txt
- create mode 100644 build/pkgs/texttable/distros/opensuse.txt
- create mode 100644 build/pkgs/toml/distros/opensuse.txt
-
-diff --git a/build/pkgs/bleach/distros/opensuse.txt b/build/pkgs/bleach/distros/opensuse.txt
-new file mode 100644
-index 00000000..6d37c4c
---- /dev/null
-+++ b/build/pkgs/bleach/distros/opensuse.txt
-@@ -0,0 +1 @@
-+python3-bleach
-diff --git a/build/pkgs/cvxopt/distros/opensuse.txt b/build/pkgs/cvxopt/distros/opensuse.txt
-new file mode 100644
-index 00000000..2bb6ad1
---- /dev/null
-+++ b/build/pkgs/cvxopt/distros/opensuse.txt
-@@ -0,0 +1 @@
-+python3-cvxopt
-diff --git a/build/pkgs/html5lib/distros/opensuse.txt b/build/pkgs/html5lib/distros/opensuse.txt
-new file mode 100644
-index 00000000..6d7b8df
---- /dev/null
-+++ b/build/pkgs/html5lib/distros/opensuse.txt
-@@ -0,0 +1 @@
-+python3-html5lib
-diff --git a/build/pkgs/idna/distros/opensuse.txt b/build/pkgs/idna/distros/opensuse.txt
-new file mode 100644
-index 00000000..de48e70
---- /dev/null
-+++ b/build/pkgs/idna/distros/opensuse.txt
-@@ -0,0 +1 @@
-+python3-idna
-diff --git a/build/pkgs/jinja2/distros/opensuse.txt b/build/pkgs/jinja2/distros/opensuse.txt
-index 5d90a22..f2db865 100644
---- a/build/pkgs/jinja2/distros/opensuse.txt
-+++ b/build/pkgs/jinja2/distros/opensuse.txt
-@@ -1 +1 @@
--python3-Jinja2
-+python3-jinja2
-diff --git a/build/pkgs/mpmath/distros/opensuse.txt b/build/pkgs/mpmath/distros/opensuse.txt
-new file mode 100644
-index 00000000..fbc82a9
---- /dev/null
-+++ b/build/pkgs/mpmath/distros/opensuse.txt
-@@ -0,0 +1 @@
-+python3-mpmath
-diff --git a/build/pkgs/numpy/distros/opensuse.txt b/build/pkgs/numpy/distros/opensuse.txt
-new file mode 100644
-index 00000000..79d5c5a
---- /dev/null
-+++ b/build/pkgs/numpy/distros/opensuse.txt
-@@ -0,0 +1 @@
-+python3-numpy
-diff --git a/build/pkgs/packaging/distros/opensuse.txt b/build/pkgs/packaging/distros/opensuse.txt
-new file mode 100644
-index 00000000..8f1c0ff
---- /dev/null
-+++ b/build/pkgs/packaging/distros/opensuse.txt
-@@ -0,0 +1 @@
-+python3-packaging
-diff --git a/build/pkgs/pandocfilters/distros/opensuse.txt b/build/pkgs/pandocfilters/distros/opensuse.txt
-new file mode 100644
-index 00000000..d0d4c24
---- /dev/null
-+++ b/build/pkgs/pandocfilters/distros/opensuse.txt
-@@ -0,0 +1 @@
-+python3-pandocfilters
-diff --git a/build/pkgs/pluggy/distros/opensuse.txt b/build/pkgs/pluggy/distros/opensuse.txt
-new file mode 100644
-index 00000000..43a3acf
---- /dev/null
-+++ b/build/pkgs/pluggy/distros/opensuse.txt
-@@ -0,0 +1 @@
-+python3-pluggy
-diff --git a/build/pkgs/py/distros/opensuse.txt b/build/pkgs/py/distros/opensuse.txt
-new file mode 100644
-index 00000000..81fefe6
---- /dev/null
-+++ b/build/pkgs/py/distros/opensuse.txt
-@@ -0,0 +1 @@
-+python3-py
-diff --git a/build/pkgs/pygments/distros/opensuse.txt b/build/pkgs/pygments/distros/opensuse.txt
-index 9ff5740..3ab3792 100644
---- a/build/pkgs/pygments/distros/opensuse.txt
-+++ b/build/pkgs/pygments/distros/opensuse.txt
-@@ -1 +1 @@
--python3-Pygments
-+python3-pygments
-diff --git a/build/pkgs/sympy/distros/opensuse.txt b/build/pkgs/sympy/distros/opensuse.txt
-new file mode 100644
-index 00000000..db423c8
---- /dev/null
-+++ b/build/pkgs/sympy/distros/opensuse.txt
-@@ -0,0 +1 @@
-+python3-sympy
-diff --git a/build/pkgs/texttable/distros/opensuse.txt b/build/pkgs/texttable/distros/opensuse.txt
-new file mode 100644
-index 00000000..8f8e7e2
---- /dev/null
-+++ b/build/pkgs/texttable/distros/opensuse.txt
-@@ -0,0 +1 @@
-+python3-texttable
-diff --git a/build/pkgs/toml/distros/opensuse.txt b/build/pkgs/toml/distros/opensuse.txt
-new file mode 100644
-index 00000000..543e89d
---- /dev/null
-+++ b/build/pkgs/toml/distros/opensuse.txt
-@@ -0,0 +1 @@
-+python3-toml
--- 
-cgit v1.0-1-gd88e
-
-
-From a480ba7ace1370d106ae831e904ea22b72af1be7 Mon Sep 17 00:00:00 2001
-From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
-Date: Sun, 17 Oct 2021 22:45:04 -0700
-Subject: build/pkgs: Add distros/debian.txt for Python packages
-
----
- build/pkgs/babel/distros/debian.txt         | 1 +
- build/pkgs/bleach/distros/debian.txt        | 1 +
- build/pkgs/certifi/distros/debian.txt       | 1 +
- build/pkgs/cvxopt/distros/debian.txt        | 1 +
- build/pkgs/decorator/distros/debian.txt     | 1 +
- build/pkgs/html5lib/distros/debian.txt      | 1 +
- build/pkgs/idna/distros/debian.txt          | 1 +
- build/pkgs/jinja2/distros/debian.txt        | 1 +
- build/pkgs/matplotlib/distros/debian.txt    | 1 +
- build/pkgs/mpmath/distros/debian.txt        | 1 +
- build/pkgs/networkx/distros/debian.txt      | 1 +
- build/pkgs/numpy/distros/debian.txt         | 1 +
- build/pkgs/packaging/distros/debian.txt     | 1 +
- build/pkgs/pandocfilters/distros/debian.txt | 1 +
- build/pkgs/pickleshare/distros/debian.txt   | 1 +
- build/pkgs/pillow/distros/debian.txt        | 1 +
- build/pkgs/pluggy/distros/debian.txt        | 1 +
- build/pkgs/py/distros/debian.txt            | 1 +
- build/pkgs/pygments/distros/debian.txt      | 1 +
- build/pkgs/pytz/distros/debian.txt          | 1 +
- build/pkgs/requests/distros/debian.txt      | 1 +
- build/pkgs/scipy/distros/debian.txt         | 1 +
- build/pkgs/setuptools/distros/debian.txt    | 1 +
- build/pkgs/six/distros/debian.txt           | 1 +
- build/pkgs/sympy/distros/debian.txt         | 1 +
- build/pkgs/texttable/distros/debian.txt     | 1 +
- build/pkgs/toml/distros/debian.txt          | 1 +
- build/pkgs/webencodings/distros/debian.txt  | 1 +
- build/pkgs/wheel/distros/debian.txt         | 1 +
- 29 files changed, 29 insertions(+)
- create mode 100644 build/pkgs/babel/distros/debian.txt
- create mode 100644 build/pkgs/bleach/distros/debian.txt
- create mode 100644 build/pkgs/certifi/distros/debian.txt
- create mode 100644 build/pkgs/cvxopt/distros/debian.txt
- create mode 100644 build/pkgs/decorator/distros/debian.txt
- create mode 100644 build/pkgs/html5lib/distros/debian.txt
- create mode 100644 build/pkgs/idna/distros/debian.txt
- create mode 100644 build/pkgs/jinja2/distros/debian.txt
- create mode 100644 build/pkgs/matplotlib/distros/debian.txt
- create mode 100644 build/pkgs/mpmath/distros/debian.txt
- create mode 100644 build/pkgs/networkx/distros/debian.txt
- create mode 100644 build/pkgs/numpy/distros/debian.txt
- create mode 100644 build/pkgs/packaging/distros/debian.txt
- create mode 100644 build/pkgs/pandocfilters/distros/debian.txt
- create mode 100644 build/pkgs/pickleshare/distros/debian.txt
- create mode 100644 build/pkgs/pillow/distros/debian.txt
- create mode 100644 build/pkgs/pluggy/distros/debian.txt
- create mode 100644 build/pkgs/py/distros/debian.txt
- create mode 100644 build/pkgs/pygments/distros/debian.txt
- create mode 100644 build/pkgs/pytz/distros/debian.txt
- create mode 100644 build/pkgs/requests/distros/debian.txt
- create mode 100644 build/pkgs/scipy/distros/debian.txt
- create mode 100644 build/pkgs/setuptools/distros/debian.txt
- create mode 100644 build/pkgs/six/distros/debian.txt
- create mode 100644 build/pkgs/sympy/distros/debian.txt
- create mode 100644 build/pkgs/texttable/distros/debian.txt
- create mode 100644 build/pkgs/toml/distros/debian.txt
- create mode 100644 build/pkgs/webencodings/distros/debian.txt
- create mode 100644 build/pkgs/wheel/distros/debian.txt
-
-diff --git a/build/pkgs/babel/distros/debian.txt b/build/pkgs/babel/distros/debian.txt
-new file mode 100644
-index 00000000..e623eb6
---- /dev/null
-+++ b/build/pkgs/babel/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-babel
-diff --git a/build/pkgs/bleach/distros/debian.txt b/build/pkgs/bleach/distros/debian.txt
-new file mode 100644
-index 00000000..6d37c4c
---- /dev/null
-+++ b/build/pkgs/bleach/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-bleach
-diff --git a/build/pkgs/certifi/distros/debian.txt b/build/pkgs/certifi/distros/debian.txt
-new file mode 100644
-index 00000000..f585a82
---- /dev/null
-+++ b/build/pkgs/certifi/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-certifi
-diff --git a/build/pkgs/cvxopt/distros/debian.txt b/build/pkgs/cvxopt/distros/debian.txt
-new file mode 100644
-index 00000000..2bb6ad1
---- /dev/null
-+++ b/build/pkgs/cvxopt/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-cvxopt
-diff --git a/build/pkgs/decorator/distros/debian.txt b/build/pkgs/decorator/distros/debian.txt
-new file mode 100644
-index 00000000..46c478e
---- /dev/null
-+++ b/build/pkgs/decorator/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-decorator
-diff --git a/build/pkgs/html5lib/distros/debian.txt b/build/pkgs/html5lib/distros/debian.txt
-new file mode 100644
-index 00000000..6d7b8df
---- /dev/null
-+++ b/build/pkgs/html5lib/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-html5lib
-diff --git a/build/pkgs/idna/distros/debian.txt b/build/pkgs/idna/distros/debian.txt
-new file mode 100644
-index 00000000..de48e70
---- /dev/null
-+++ b/build/pkgs/idna/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-idna
-diff --git a/build/pkgs/jinja2/distros/debian.txt b/build/pkgs/jinja2/distros/debian.txt
-new file mode 100644
-index 00000000..f2db865
---- /dev/null
-+++ b/build/pkgs/jinja2/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-jinja2
-diff --git a/build/pkgs/matplotlib/distros/debian.txt b/build/pkgs/matplotlib/distros/debian.txt
-new file mode 100644
-index 00000000..1374329
---- /dev/null
-+++ b/build/pkgs/matplotlib/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-matplotlib
-diff --git a/build/pkgs/mpmath/distros/debian.txt b/build/pkgs/mpmath/distros/debian.txt
-new file mode 100644
-index 00000000..fbc82a9
---- /dev/null
-+++ b/build/pkgs/mpmath/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-mpmath
-diff --git a/build/pkgs/networkx/distros/debian.txt b/build/pkgs/networkx/distros/debian.txt
-new file mode 100644
-index 00000000..6779066
---- /dev/null
-+++ b/build/pkgs/networkx/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-networkx
-diff --git a/build/pkgs/numpy/distros/debian.txt b/build/pkgs/numpy/distros/debian.txt
-new file mode 100644
-index 00000000..79d5c5a
---- /dev/null
-+++ b/build/pkgs/numpy/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-numpy
-diff --git a/build/pkgs/packaging/distros/debian.txt b/build/pkgs/packaging/distros/debian.txt
-new file mode 100644
-index 00000000..8f1c0ff
---- /dev/null
-+++ b/build/pkgs/packaging/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-packaging
-diff --git a/build/pkgs/pandocfilters/distros/debian.txt b/build/pkgs/pandocfilters/distros/debian.txt
-new file mode 100644
-index 00000000..d0d4c24
---- /dev/null
-+++ b/build/pkgs/pandocfilters/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-pandocfilters
-diff --git a/build/pkgs/pickleshare/distros/debian.txt b/build/pkgs/pickleshare/distros/debian.txt
-new file mode 100644
-index 00000000..a00907d
---- /dev/null
-+++ b/build/pkgs/pickleshare/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-pickleshare
-diff --git a/build/pkgs/pillow/distros/debian.txt b/build/pkgs/pillow/distros/debian.txt
-new file mode 100644
-index 00000000..3319fcd
---- /dev/null
-+++ b/build/pkgs/pillow/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-pillow
-diff --git a/build/pkgs/pluggy/distros/debian.txt b/build/pkgs/pluggy/distros/debian.txt
-new file mode 100644
-index 00000000..43a3acf
---- /dev/null
-+++ b/build/pkgs/pluggy/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-pluggy
-diff --git a/build/pkgs/py/distros/debian.txt b/build/pkgs/py/distros/debian.txt
-new file mode 100644
-index 00000000..81fefe6
---- /dev/null
-+++ b/build/pkgs/py/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-py
-diff --git a/build/pkgs/pygments/distros/debian.txt b/build/pkgs/pygments/distros/debian.txt
-new file mode 100644
-index 00000000..3ab3792
---- /dev/null
-+++ b/build/pkgs/pygments/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-pygments
-diff --git a/build/pkgs/pytz/distros/debian.txt b/build/pkgs/pytz/distros/debian.txt
-new file mode 100644
-index 00000000..db20908
---- /dev/null
-+++ b/build/pkgs/pytz/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-tz
-diff --git a/build/pkgs/requests/distros/debian.txt b/build/pkgs/requests/distros/debian.txt
-new file mode 100644
-index 00000000..43147b2
---- /dev/null
-+++ b/build/pkgs/requests/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-requests
-diff --git a/build/pkgs/scipy/distros/debian.txt b/build/pkgs/scipy/distros/debian.txt
-new file mode 100644
-index 00000000..12b3666
---- /dev/null
-+++ b/build/pkgs/scipy/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-scipy
-diff --git a/build/pkgs/setuptools/distros/debian.txt b/build/pkgs/setuptools/distros/debian.txt
-new file mode 100644
-index 00000000..1c0901c
---- /dev/null
-+++ b/build/pkgs/setuptools/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-setuptools
-diff --git a/build/pkgs/six/distros/debian.txt b/build/pkgs/six/distros/debian.txt
-new file mode 100644
-index 00000000..68ff859
---- /dev/null
-+++ b/build/pkgs/six/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-six
-diff --git a/build/pkgs/sympy/distros/debian.txt b/build/pkgs/sympy/distros/debian.txt
-new file mode 100644
-index 00000000..db423c8
---- /dev/null
-+++ b/build/pkgs/sympy/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-sympy
-diff --git a/build/pkgs/texttable/distros/debian.txt b/build/pkgs/texttable/distros/debian.txt
-new file mode 100644
-index 00000000..8f8e7e2
---- /dev/null
-+++ b/build/pkgs/texttable/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-texttable
-diff --git a/build/pkgs/toml/distros/debian.txt b/build/pkgs/toml/distros/debian.txt
-new file mode 100644
-index 00000000..543e89d
---- /dev/null
-+++ b/build/pkgs/toml/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-toml
-diff --git a/build/pkgs/webencodings/distros/debian.txt b/build/pkgs/webencodings/distros/debian.txt
-new file mode 100644
-index 00000000..ac30c2f
---- /dev/null
-+++ b/build/pkgs/webencodings/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-webencodings
-diff --git a/build/pkgs/wheel/distros/debian.txt b/build/pkgs/wheel/distros/debian.txt
-new file mode 100644
-index 00000000..3c066725
---- /dev/null
-+++ b/build/pkgs/wheel/distros/debian.txt
-@@ -0,0 +1 @@
-+python3-wheel
--- 
-cgit v1.0-1-gd88e
-
-
-From 93bf30d7de292551c3050e2dd74651d69ba4bd46 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 18 Oct 2021 07:50:34 -0400
-Subject: Trac #29665: add more documentation for SAGE_PYTHON_PACKAGE_CHECK().
-
-An earlier commit allows SAGE_PYTHON_PACKAGE_CHECK(package) to tweak the
-value of sage_use_system_$package if --enable-system-site-packages was
-not used. This essentially changes the default --with-system-$package=yes
-to "no" in that case. Here we update the documentation to reflect it.
----
- m4/sage_python_package_check.m4 | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
-index 7ee82a7..95eefd0 100644
---- a/m4/sage_python_package_check.m4
-+++ b/m4/sage_python_package_check.m4
-@@ -34,6 +34,10 @@
- #   ensure that the ./configure- and run-time views of the system
- #   are as similar as possible.
- #
-+#   To avoid suggesting these system packages to users who have not
-+#   set --enable-system-site-packages, this macro also changes the
-+#   default for --with-system-foo from "yes" to "no" in that case.
-+#
- 
- AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
-   AS_IF([test "${enable_system_site_packages}" = "yes"], [
--- 
-cgit v1.0-1-gd88e
-
-
-From d771e49d57ecdf3622434bc09cbfb87ad3bb7744 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 18 Oct 2021 07:42:46 -0400
-Subject: Trac #29665: improve SAGE_PYTHON_PACKAGE_CHECK() failure message.
-
-When --enable-system-site-packages is off, SAGE_PYTHON_PACKAGE_CHECK()
-will always install the corresponding SPKG. We improve the ./configure
-output in that case to make it clear that the decision was based on
-the value of --enable-system-site-packages and not the "real" check.
----
- m4/sage_python_package_check.m4 | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
-index 95eefd0..5f0f084 100644
---- a/m4/sage_python_package_check.m4
-+++ b/m4/sage_python_package_check.m4
-@@ -40,7 +40,9 @@
- #
- 
- AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
-+  AC_MSG_CHECKING([if --enable-system-site-packages was used])
-   AS_IF([test "${enable_system_site_packages}" = "yes"], [
-+    AC_MSG_RESULT(yes)
-     AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
- 
-     dnl We run this check inside a python venv, because that's ultimately
-@@ -94,6 +96,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
-     AS_IF([test -d config.venv], [rm -rf config.venv])
-   ], [
-     dnl System site packages are disabled.
-+    AC_MSG_RESULT(no; skipping check)
-     sage_spkg_install_$1=yes
- 
-     dnl We have to retroactively hack the --with-system-foo={no,yes,force}
--- 
-cgit v1.0-1-gd88e
-
-
-From 5bb43c1b78a1deb3364f235305937c2f823e5e18 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Sun, 24 Oct 2021 20:29:25 -0400
-Subject: Trac #29665: use sage-venv in SAGE_PYTHON_PACKAGE_CHECK().
-
-For consistency with the rest of the build system, we now use the
-build/bin/sage-venv script to create the venv in this autoconf macro
-rather than invoking $PYTHON_FOR_VENV with "-m venv" directly.
----
- m4/sage_python_package_check.m4 | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4
-index 5f0f084..5547b35 100644
---- a/m4/sage_python_package_check.m4
-+++ b/m4/sage_python_package_check.m4
-@@ -50,11 +50,11 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
-     AC_MSG_CHECKING([if we can create a python venv in config.venv])
- 
-     dnl Use --clear because ./configure typically clobbers its output files.
--    AS_IF(["${PYTHON_FOR_VENV}" -m venv --system-site-packages dnl
--                                        --clear                dnl
--                                        --without-pip          dnl
--                                        config.venv            dnl
--                                        2>&AS_MESSAGE_LOG_FD], [
-+    AS_IF(["${PYTHON_FOR_VENV}" build/bin/sage-venv      dnl
-+                                  --system-site-packages dnl
-+                                  --clear                dnl
-+                                  config.venv            dnl
-+                                  2>&AS_MESSAGE_LOG_FD], [
-       AC_MSG_RESULT(yes)
-       dnl strip all comments from install-requires.txt; this should leave
-       dnl only a single line containing the version specification for this
--- 
-cgit v1.0-1-gd88e
-
-
-From c78363d6326addff16ca5abac897949a6be72bf4 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 18:10:30 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for urllib3.
-
----
- build/pkgs/urllib3/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/urllib3/spkg-configure.m4
-
-diff --git a/build/pkgs/urllib3/spkg-configure.m4 b/build/pkgs/urllib3/spkg-configure.m4
-new file mode 100644
-index 00000000..d7ef3e1
---- /dev/null
-+++ b/build/pkgs/urllib3/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([urllib3], [SAGE_PYTHON_PACKAGE_CHECK([urllib3])])
--- 
-cgit v1.0-1-gd88e
-
-
-From f416d5abcae495ea8301fad024b279ea9e997b29 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 18:15:18 -0400
-Subject: Trac #29665: add Gentoo package information for urllib3.
-
----
- build/pkgs/urllib3/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/urllib3/distros/gentoo.txt
-
-diff --git a/build/pkgs/urllib3/distros/gentoo.txt b/build/pkgs/urllib3/distros/gentoo.txt
-new file mode 100644
-index 00000000..172a535
---- /dev/null
-+++ b/build/pkgs/urllib3/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/urllib3
--- 
-cgit v1.0-1-gd88e
-
-
-From 852068b992bf7959500c650f54cb92e5b68d7ef8 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 18:15:58 -0400
-Subject: Trac #29665: add Gentoo package information for nbformat.
-
----
- build/pkgs/nbformat/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/nbformat/distros/gentoo.txt
-
-diff --git a/build/pkgs/nbformat/distros/gentoo.txt b/build/pkgs/nbformat/distros/gentoo.txt
-new file mode 100644
-index 00000000..006b1f2
---- /dev/null
-+++ b/build/pkgs/nbformat/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/nbformat
--- 
-cgit v1.0-1-gd88e
-
-
-From 66179fd28fcc92ee840dcd87bb4db25cea968d66 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 18:34:16 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for nbformat.
-
----
- build/pkgs/nbformat/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/nbformat/spkg-configure.m4
-
-diff --git a/build/pkgs/nbformat/spkg-configure.m4 b/build/pkgs/nbformat/spkg-configure.m4
-new file mode 100644
-index 00000000..5a7f8c4
---- /dev/null
-+++ b/build/pkgs/nbformat/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([nbformat], [SAGE_PYTHON_PACKAGE_CHECK([nbformat])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 874005e81ed20f27a5f895030dcdbdfc5f73ad80 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 18:47:01 -0400
-Subject: Trac #29665: add Gentoo package information for zipp.
-
----
- build/pkgs/zipp/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/zipp/distros/gentoo.txt
-
-diff --git a/build/pkgs/zipp/distros/gentoo.txt b/build/pkgs/zipp/distros/gentoo.txt
-new file mode 100644
-index 00000000..7f59450
---- /dev/null
-+++ b/build/pkgs/zipp/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/zipp
--- 
-cgit v1.0-1-gd88e
-
-
-From 0cc2a7355b5554c1fb79c742ebf02eff54465b3e Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 18:47:35 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for zipp.
-
----
- build/pkgs/zipp/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/zipp/spkg-configure.m4
-
-diff --git a/build/pkgs/zipp/spkg-configure.m4 b/build/pkgs/zipp/spkg-configure.m4
-new file mode 100644
-index 00000000..0fe3a9c
---- /dev/null
-+++ b/build/pkgs/zipp/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([zipp], [SAGE_PYTHON_PACKAGE_CHECK([zipp])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 6073ad8e56c21fc862749bbd84a56d543fb9458c Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 18:48:37 -0400
-Subject: Trac #29665: add Gentoo package information for wcwidth.
-
----
- build/pkgs/wcwidth/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/wcwidth/distros/gentoo.txt
-
-diff --git a/build/pkgs/wcwidth/distros/gentoo.txt b/build/pkgs/wcwidth/distros/gentoo.txt
-new file mode 100644
-index 00000000..edeb80b
---- /dev/null
-+++ b/build/pkgs/wcwidth/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/wcwidth
--- 
-cgit v1.0-1-gd88e
-
-
-From 9793d6172c64d61a015fbe61bd45863759124fad Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 18:51:10 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for wcwidth.
-
----
- build/pkgs/wcwidth/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/wcwidth/spkg-configure.m4
-
-diff --git a/build/pkgs/wcwidth/spkg-configure.m4 b/build/pkgs/wcwidth/spkg-configure.m4
-new file mode 100644
-index 00000000..5bde15a
---- /dev/null
-+++ b/build/pkgs/wcwidth/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([wcwidth], [SAGE_PYTHON_PACKAGE_CHECK([wcwidth])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 20232f370a43c146ca4e696c72a2cbcc498db060 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 18:52:36 -0400
-Subject: Trac #29665: add Gentoo package information for testpath.
-
----
- build/pkgs/testpath/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/testpath/distros/gentoo.txt
-
-diff --git a/build/pkgs/testpath/distros/gentoo.txt b/build/pkgs/testpath/distros/gentoo.txt
-new file mode 100644
-index 00000000..efa10a0
---- /dev/null
-+++ b/build/pkgs/testpath/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/testpath
--- 
-cgit v1.0-1-gd88e
-
-
-From 1b0785b2aad8844e74345fe950baf097e2b43d24 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 18:55:22 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for testpath.
-
----
- build/pkgs/testpath/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/testpath/spkg-configure.m4
-
-diff --git a/build/pkgs/testpath/spkg-configure.m4 b/build/pkgs/testpath/spkg-configure.m4
-new file mode 100644
-index 00000000..d8fc2a7
---- /dev/null
-+++ b/build/pkgs/testpath/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([testpath], [SAGE_PYTHON_PACKAGE_CHECK([testpath])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 10fc3829ecd956d732b1b069fdfe81f0d6d5cdc2 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 18:56:06 -0400
-Subject: Trac #29665: add Gentoo package information for jedi.
-
----
- build/pkgs/jedi/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/jedi/distros/gentoo.txt
-
-diff --git a/build/pkgs/jedi/distros/gentoo.txt b/build/pkgs/jedi/distros/gentoo.txt
-new file mode 100644
-index 00000000..6c85a46
---- /dev/null
-+++ b/build/pkgs/jedi/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/jedi
--- 
-cgit v1.0-1-gd88e
-
-
-From a75824d74c281c7639028ca01dabeed266f56998 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:06:37 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for jedi.
-
----
- build/pkgs/jedi/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/jedi/spkg-configure.m4
-
-diff --git a/build/pkgs/jedi/spkg-configure.m4 b/build/pkgs/jedi/spkg-configure.m4
-new file mode 100644
-index 00000000..a37dbcc
---- /dev/null
-+++ b/build/pkgs/jedi/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([jedi], [SAGE_PYTHON_PACKAGE_CHECK([jedi])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 17af01373d43f6acbbdbc23e073e372d3fdadf8b Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:07:47 -0400
-Subject: Trac #29665: add Gentoo package information for tomli.
-
----
- build/pkgs/tomli/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/tomli/distros/gentoo.txt
-
-diff --git a/build/pkgs/tomli/distros/gentoo.txt b/build/pkgs/tomli/distros/gentoo.txt
-new file mode 100644
-index 00000000..0458e25
---- /dev/null
-+++ b/build/pkgs/tomli/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/tomli
--- 
-cgit v1.0-1-gd88e
-
-
-From 0d3b5994ae612be11992467c4a3f1a74b81400fe Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:08:12 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for tomli.
-
----
- build/pkgs/tomli/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/tomli/spkg-configure.m4
-
-diff --git a/build/pkgs/tomli/spkg-configure.m4 b/build/pkgs/tomli/spkg-configure.m4
-new file mode 100644
-index 00000000..95a8b8b
---- /dev/null
-+++ b/build/pkgs/tomli/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([tomli], [SAGE_PYTHON_PACKAGE_CHECK([tomli])])
--- 
-cgit v1.0-1-gd88e
-
-
-From dce1c515781b0eeb8eb9c2bc7aba581560c1fac1 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:09:22 -0400
-Subject: Trac #29665: add Gentoo package information for defusedxml.
-
----
- build/pkgs/defusedxml/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/defusedxml/distros/gentoo.txt
-
-diff --git a/build/pkgs/defusedxml/distros/gentoo.txt b/build/pkgs/defusedxml/distros/gentoo.txt
-new file mode 100644
-index 00000000..2804214
---- /dev/null
-+++ b/build/pkgs/defusedxml/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/defusedxml
--- 
-cgit v1.0-1-gd88e
-
-
-From 02e1e1cd7f8bdae3ca5b7d35ce70af28a44e9b7c Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:11:14 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for defusedxml.
-
----
- build/pkgs/defusedxml/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/defusedxml/spkg-configure.m4
-
-diff --git a/build/pkgs/defusedxml/spkg-configure.m4 b/build/pkgs/defusedxml/spkg-configure.m4
-new file mode 100644
-index 00000000..e02f345
---- /dev/null
-+++ b/build/pkgs/defusedxml/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([defusedxml], [SAGE_PYTHON_PACKAGE_CHECK([defusedxml])])
--- 
-cgit v1.0-1-gd88e
-
-
-From e0ba4ebb5cfc637b5d26b85de9f34e0a160d2b9c Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:12:22 -0400
-Subject: Trac #29665: add Gentoo package information for ipywidgets.
-
----
- build/pkgs/ipywidgets/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/ipywidgets/distros/gentoo.txt
-
-diff --git a/build/pkgs/ipywidgets/distros/gentoo.txt b/build/pkgs/ipywidgets/distros/gentoo.txt
-new file mode 100644
-index 00000000..7c76967
---- /dev/null
-+++ b/build/pkgs/ipywidgets/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/ipywidgets
--- 
-cgit v1.0-1-gd88e
-
-
-From 49df7e7d93c7a31b7c46d5d224a35fd313a29a32 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:15:53 -0400
-Subject: Trac #29665: add Gentoo package information for simplegeneric.
-
----
- build/pkgs/simplegeneric/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/simplegeneric/distros/gentoo.txt
-
-diff --git a/build/pkgs/simplegeneric/distros/gentoo.txt b/build/pkgs/simplegeneric/distros/gentoo.txt
-new file mode 100644
-index 00000000..a86e90d
---- /dev/null
-+++ b/build/pkgs/simplegeneric/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/simplegeneric
--- 
-cgit v1.0-1-gd88e
-
-
-From 2a893635d5804749e6fec7ed7289c921ecb5300a Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:16:33 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for simplegeneric.
-
----
- build/pkgs/simplegeneric/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/simplegeneric/spkg-configure.m4
-
-diff --git a/build/pkgs/simplegeneric/spkg-configure.m4 b/build/pkgs/simplegeneric/spkg-configure.m4
-new file mode 100644
-index 00000000..13715ab
---- /dev/null
-+++ b/build/pkgs/simplegeneric/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([simplegeneric], [SAGE_PYTHON_PACKAGE_CHECK([simplegeneric])])
--- 
-cgit v1.0-1-gd88e
-
-
-From a8fe7ecd6e3163e7d01261e5497ac452a8cc95ab Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:17:18 -0400
-Subject: Trac #29665: add Gentoo package information for imagesize.
-
----
- build/pkgs/imagesize/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/imagesize/distros/gentoo.txt
-
-diff --git a/build/pkgs/imagesize/distros/gentoo.txt b/build/pkgs/imagesize/distros/gentoo.txt
-new file mode 100644
-index 00000000..54350ba
---- /dev/null
-+++ b/build/pkgs/imagesize/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/imagesize
--- 
-cgit v1.0-1-gd88e
-
-
-From 2ad837c5dd1fca0f50ce6d5042a9344210a54f84 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:17:48 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for imagesize.
-
----
- build/pkgs/imagesize/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/imagesize/spkg-configure.m4
-
-diff --git a/build/pkgs/imagesize/spkg-configure.m4 b/build/pkgs/imagesize/spkg-configure.m4
-new file mode 100644
-index 00000000..20210ef
---- /dev/null
-+++ b/build/pkgs/imagesize/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([imagesize], [SAGE_PYTHON_PACKAGE_CHECK([imagesize])])
--- 
-cgit v1.0-1-gd88e
-
-
-From bf47415b5bfca2d7bf24e20de35662bf331623b9 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:18:49 -0400
-Subject: Trac #29665: add Gentoo package information for mistune.
-
----
- build/pkgs/mistune/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/mistune/distros/gentoo.txt
-
-diff --git a/build/pkgs/mistune/distros/gentoo.txt b/build/pkgs/mistune/distros/gentoo.txt
-new file mode 100644
-index 00000000..56f0a4e
---- /dev/null
-+++ b/build/pkgs/mistune/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/mistune
--- 
-cgit v1.0-1-gd88e
-
-
-From 6898a74fd0c65a40c5220ba68b4062ac6fe060c6 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:21:30 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for mistune.
-
----
- build/pkgs/mistune/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/mistune/spkg-configure.m4
-
-diff --git a/build/pkgs/mistune/spkg-configure.m4 b/build/pkgs/mistune/spkg-configure.m4
-new file mode 100644
-index 00000000..972f33d
---- /dev/null
-+++ b/build/pkgs/mistune/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([mistune], [SAGE_PYTHON_PACKAGE_CHECK([mistune])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 62735e4ccf2031cd39eb5e04b03bdfd97005d808 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:22:48 -0400
-Subject: Trac #29665: add Gentoo package information for backcall.
-
----
- build/pkgs/backcall/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/backcall/distros/gentoo.txt
-
-diff --git a/build/pkgs/backcall/distros/gentoo.txt b/build/pkgs/backcall/distros/gentoo.txt
-new file mode 100644
-index 00000000..266a222
---- /dev/null
-+++ b/build/pkgs/backcall/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/backcall
--- 
-cgit v1.0-1-gd88e
-
-
-From 9ef3ea42d4a33c7cdb623fa5417ae300cf323183 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:25:10 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for backcall.
-
----
- build/pkgs/backcall/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/backcall/spkg-configure.m4
-
-diff --git a/build/pkgs/backcall/spkg-configure.m4 b/build/pkgs/backcall/spkg-configure.m4
-new file mode 100644
-index 00000000..d6b11c4
---- /dev/null
-+++ b/build/pkgs/backcall/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([backcall], [SAGE_PYTHON_PACKAGE_CHECK([backcall])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 1b3ea2a3c40fea0fb58435f5e5304368ea58dff8 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:25:58 -0400
-Subject: Trac #29665: add Gentoo package information for parso.
-
----
- build/pkgs/parso/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/parso/distros/gentoo.txt
-
-diff --git a/build/pkgs/parso/distros/gentoo.txt b/build/pkgs/parso/distros/gentoo.txt
-new file mode 100644
-index 00000000..f9ce4c7
---- /dev/null
-+++ b/build/pkgs/parso/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/parso
--- 
-cgit v1.0-1-gd88e
-
-
-From 963a3a2c563ec71a1f5be2395722d0e824cb0b11 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:26:22 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for parso.
-
----
- build/pkgs/parso/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/parso/spkg-configure.m4
-
-diff --git a/build/pkgs/parso/spkg-configure.m4 b/build/pkgs/parso/spkg-configure.m4
-new file mode 100644
-index 00000000..1ca6f1b
---- /dev/null
-+++ b/build/pkgs/parso/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([parso], [SAGE_PYTHON_PACKAGE_CHECK([parso])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 943053dfc474b6549bcc7d6ef2971ea43588b35c Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:27:00 -0400
-Subject: Trac #29665: add Gentoo package information for pyparsing.
-
----
- build/pkgs/pyparsing/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pyparsing/distros/gentoo.txt
-
-diff --git a/build/pkgs/pyparsing/distros/gentoo.txt b/build/pkgs/pyparsing/distros/gentoo.txt
-new file mode 100644
-index 00000000..ef0419f
---- /dev/null
-+++ b/build/pkgs/pyparsing/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/pyparsing
--- 
-cgit v1.0-1-gd88e
-
-
-From bd682eaa2ac41dd84e7a52e2b0c5442fc8fd8919 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 3 Nov 2021 19:27:30 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for pyparsing.
-
----
- build/pkgs/pyparsing/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pyparsing/spkg-configure.m4
-
-diff --git a/build/pkgs/pyparsing/spkg-configure.m4 b/build/pkgs/pyparsing/spkg-configure.m4
-new file mode 100644
-index 00000000..d2b4c00
---- /dev/null
-+++ b/build/pkgs/pyparsing/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([pyparsing], [SAGE_PYTHON_PACKAGE_CHECK([pyparsing])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 74f36a9c0ec7c63b7e6c40066e42f4b15c2f978e Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:17:42 -0400
-Subject: Trac #29665: add Gentoo package information for debugpy.
-
----
- build/pkgs/debugpy/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/debugpy/distros/gentoo.txt
-
-diff --git a/build/pkgs/debugpy/distros/gentoo.txt b/build/pkgs/debugpy/distros/gentoo.txt
-new file mode 100644
-index 00000000..8b797ce
---- /dev/null
-+++ b/build/pkgs/debugpy/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/debugpy
--- 
-cgit v1.0-1-gd88e
-
-
-From be072fa87ac5c373d9dc9b54c0bd68734d5709bc Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:21:17 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for debugpy.
-
----
- build/pkgs/debugpy/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/debugpy/spkg-configure.m4
-
-diff --git a/build/pkgs/debugpy/spkg-configure.m4 b/build/pkgs/debugpy/spkg-configure.m4
-new file mode 100644
-index 00000000..db605ff
---- /dev/null
-+++ b/build/pkgs/debugpy/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([debugpy], [SAGE_PYTHON_PACKAGE_CHECK([debugpy])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 6f777ce2f2e14b94e91c8b7bbac82f9017460aba Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:23:56 -0400
-Subject: Trac #29665: add Gentoo package information for tzlocal.
-
----
- build/pkgs/tzlocal/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/tzlocal/distros/gentoo.txt
-
-diff --git a/build/pkgs/tzlocal/distros/gentoo.txt b/build/pkgs/tzlocal/distros/gentoo.txt
-new file mode 100644
-index 00000000..2018442
---- /dev/null
-+++ b/build/pkgs/tzlocal/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/tzlocal
--- 
-cgit v1.0-1-gd88e
-
-
-From 3bd078fc15ae13982249452711baafae91038191 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:24:51 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for tzlocal.
-
----
- build/pkgs/tzlocal/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/tzlocal/spkg-configure.m4
-
-diff --git a/build/pkgs/tzlocal/spkg-configure.m4 b/build/pkgs/tzlocal/spkg-configure.m4
-new file mode 100644
-index 00000000..e020b28
---- /dev/null
-+++ b/build/pkgs/tzlocal/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([tzlocal], [SAGE_PYTHON_PACKAGE_CHECK([tzlocal])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 91b0882fc62214923da9ee7b6dccb05d8a1d11d1 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:26:13 -0400
-Subject: Trac #29665: add Gentoo package information for pycparser.
-
----
- build/pkgs/pycparser/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pycparser/distros/gentoo.txt
-
-diff --git a/build/pkgs/pycparser/distros/gentoo.txt b/build/pkgs/pycparser/distros/gentoo.txt
-new file mode 100644
-index 00000000..5e87307
---- /dev/null
-+++ b/build/pkgs/pycparser/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/pycparser
--- 
-cgit v1.0-1-gd88e
-
-
-From beabde92fe6e057faf516fe82d27f1e903e55ce6 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:27:27 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for pycparser.
-
----
- build/pkgs/pycparser/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pycparser/spkg-configure.m4
-
-diff --git a/build/pkgs/pycparser/spkg-configure.m4 b/build/pkgs/pycparser/spkg-configure.m4
-new file mode 100644
-index 00000000..4b9b900
---- /dev/null
-+++ b/build/pkgs/pycparser/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([pycparser], [SAGE_PYTHON_PACKAGE_CHECK([pycparser])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 86c2788dc7fd1169314e9598c91fa81045553677 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:29:36 -0400
-Subject: Trac #29665: add Gentoo package information for cycler.
-
----
- build/pkgs/cycler/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/cycler/distros/gentoo.txt
-
-diff --git a/build/pkgs/cycler/distros/gentoo.txt b/build/pkgs/cycler/distros/gentoo.txt
-new file mode 100644
-index 00000000..4b21543
---- /dev/null
-+++ b/build/pkgs/cycler/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/cycler
--- 
-cgit v1.0-1-gd88e
-
-
-From 67c5a944101ddf329f0a61c61d4e784f58a5c5b0 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:30:27 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for cycler.
-
----
- build/pkgs/cycler/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/cycler/spkg-configure.m4
-
-diff --git a/build/pkgs/cycler/spkg-configure.m4 b/build/pkgs/cycler/spkg-configure.m4
-new file mode 100644
-index 00000000..239571a
---- /dev/null
-+++ b/build/pkgs/cycler/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([cycler], [SAGE_PYTHON_PACKAGE_CHECK([cycler])])
--- 
-cgit v1.0-1-gd88e
-
-
-From ef6d490251abfa41f7a0910274700a8a6a65f629 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:31:19 -0400
-Subject: Trac #29665: add Gentoo package information for traitlets.
-
----
- build/pkgs/traitlets/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/traitlets/distros/gentoo.txt
-
-diff --git a/build/pkgs/traitlets/distros/gentoo.txt b/build/pkgs/traitlets/distros/gentoo.txt
-new file mode 100644
-index 00000000..46bfaab
---- /dev/null
-+++ b/build/pkgs/traitlets/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/traitlets
--- 
-cgit v1.0-1-gd88e
-
-
-From 1f922b458d34088d9f6773312209e69f19ee45dc Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:31:50 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for traitlets.
-
----
- build/pkgs/traitlets/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/traitlets/spkg-configure.m4
-
-diff --git a/build/pkgs/traitlets/spkg-configure.m4 b/build/pkgs/traitlets/spkg-configure.m4
-new file mode 100644
-index 00000000..df2382b
---- /dev/null
-+++ b/build/pkgs/traitlets/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([traitlets], [SAGE_PYTHON_PACKAGE_CHECK([traitlets])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 95b89a9ced0acb6d971a27fa63b97ea58a11f4e1 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:33:35 -0400
-Subject: Trac #29665: add Gentoo package information for argcomplete.
-
----
- build/pkgs/argcomplete/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/argcomplete/distros/gentoo.txt
-
-diff --git a/build/pkgs/argcomplete/distros/gentoo.txt b/build/pkgs/argcomplete/distros/gentoo.txt
-new file mode 100644
-index 00000000..b150949
---- /dev/null
-+++ b/build/pkgs/argcomplete/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/argcomplete
--- 
-cgit v1.0-1-gd88e
-
-
-From b4cd8ef384e6e5bae0de0f3c113fb5f9e6e1a71e Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:34:14 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for argcomplete.
-
----
- build/pkgs/argcomplete/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/argcomplete/spkg-configure.m4
-
-diff --git a/build/pkgs/argcomplete/spkg-configure.m4 b/build/pkgs/argcomplete/spkg-configure.m4
-new file mode 100644
-index 00000000..cbd7ccf
---- /dev/null
-+++ b/build/pkgs/argcomplete/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([argcomplete], [SAGE_PYTHON_PACKAGE_CHECK([argcomplete])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 4cc610e8331970cc018d7ea87af928fa73a292c1 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:36:21 -0400
-Subject: Trac #29665: add Gentoo package information for ptyprocess.
-
----
- build/pkgs/ptyprocess/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/ptyprocess/distros/gentoo.txt
-
-diff --git a/build/pkgs/ptyprocess/distros/gentoo.txt b/build/pkgs/ptyprocess/distros/gentoo.txt
-new file mode 100644
-index 00000000..571a851
---- /dev/null
-+++ b/build/pkgs/ptyprocess/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/ptyprocess
--- 
-cgit v1.0-1-gd88e
-
-
-From cd15f97221bf5933b07900e4f77cb55401eede26 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:37:02 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for ptyprocess.
-
----
- build/pkgs/ptyprocess/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/ptyprocess/spkg-configure.m4
-
-diff --git a/build/pkgs/ptyprocess/spkg-configure.m4 b/build/pkgs/ptyprocess/spkg-configure.m4
-new file mode 100644
-index 00000000..bfacbae
---- /dev/null
-+++ b/build/pkgs/ptyprocess/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([ptyprocess], [SAGE_PYTHON_PACKAGE_CHECK([ptyprocess])])
--- 
-cgit v1.0-1-gd88e
-
-
-From bb5f45b15f99e4ba28e1b1f6042a0e8ea17f1dfc Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:38:22 -0400
-Subject: Trac #29665: add Gentoo package information for attrs.
-
----
- build/pkgs/attrs/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/attrs/distros/gentoo.txt
-
-diff --git a/build/pkgs/attrs/distros/gentoo.txt b/build/pkgs/attrs/distros/gentoo.txt
-new file mode 100644
-index 00000000..3b906fa
---- /dev/null
-+++ b/build/pkgs/attrs/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/attrs
--- 
-cgit v1.0-1-gd88e
-
-
-From 321707ebf8e9af1e4ac3a5b5b094b4226bb3a7a5 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:38:55 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for attrs.
-
----
- build/pkgs/attrs/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/attrs/spkg-configure.m4
-
-diff --git a/build/pkgs/attrs/spkg-configure.m4 b/build/pkgs/attrs/spkg-configure.m4
-new file mode 100644
-index 00000000..ba6a9b7
---- /dev/null
-+++ b/build/pkgs/attrs/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([attrs], [SAGE_PYTHON_PACKAGE_CHECK([attrs])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 69a498a4e8854ecdfc2f1a134104983c0dcb9e32 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:40:09 -0400
-Subject: Trac #29665: add Gentoo package information for send2trash.
-
----
- build/pkgs/send2trash/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/send2trash/distros/gentoo.txt
-
-diff --git a/build/pkgs/send2trash/distros/gentoo.txt b/build/pkgs/send2trash/distros/gentoo.txt
-new file mode 100644
-index 00000000..a89b179
---- /dev/null
-+++ b/build/pkgs/send2trash/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/send2trash
--- 
-cgit v1.0-1-gd88e
-
-
-From 9baed17c84e1bdf5abd17c20766e5cd7dddc5b53 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:41:45 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for send2trash.
-
----
- build/pkgs/send2trash/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/send2trash/spkg-configure.m4
-
-diff --git a/build/pkgs/send2trash/spkg-configure.m4 b/build/pkgs/send2trash/spkg-configure.m4
-new file mode 100644
-index 00000000..3bbb727
---- /dev/null
-+++ b/build/pkgs/send2trash/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([send2trash], [SAGE_PYTHON_PACKAGE_CHECK([send2trash])])
--- 
-cgit v1.0-1-gd88e
-
-
-From b9b552b2a2aaccaeb7c5b25be0b681f107522d09 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:43:27 -0400
-Subject: Trac #29665: add Gentoo package information for pyrsistent.
-
----
- build/pkgs/pyrsistent/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pyrsistent/distros/gentoo.txt
-
-diff --git a/build/pkgs/pyrsistent/distros/gentoo.txt b/build/pkgs/pyrsistent/distros/gentoo.txt
-new file mode 100644
-index 00000000..83439ce
---- /dev/null
-+++ b/build/pkgs/pyrsistent/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/pyrsistent
--- 
-cgit v1.0-1-gd88e
-
-
-From a17b31fac6104852762f57daa749443147bdf121 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:44:03 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for pyrsistent.
-
----
- build/pkgs/pyrsistent/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pyrsistent/spkg-configure.m4
-
-diff --git a/build/pkgs/pyrsistent/spkg-configure.m4 b/build/pkgs/pyrsistent/spkg-configure.m4
-new file mode 100644
-index 00000000..f7ca75d
---- /dev/null
-+++ b/build/pkgs/pyrsistent/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([pyrsistent], [SAGE_PYTHON_PACKAGE_CHECK([pyrsistent])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 68520decad6d6937918d7a6af65ca5bd476e5d02 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:45:45 -0400
-Subject: Trac #29665: add Gentoo package information for entrypoints.
-
----
- build/pkgs/entrypoints/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/entrypoints/distros/gentoo.txt
-
-diff --git a/build/pkgs/entrypoints/distros/gentoo.txt b/build/pkgs/entrypoints/distros/gentoo.txt
-new file mode 100644
-index 00000000..684ddd0
---- /dev/null
-+++ b/build/pkgs/entrypoints/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/entrypoints
--- 
-cgit v1.0-1-gd88e
-
-
-From 34213eccb642a6bad64d89acaefa83ee702cb483 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:46:24 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for entrypoints.
-
----
- build/pkgs/entrypoints/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/entrypoints/spkg-configure.m4
-
-diff --git a/build/pkgs/entrypoints/spkg-configure.m4 b/build/pkgs/entrypoints/spkg-configure.m4
-new file mode 100644
-index 00000000..caed658
---- /dev/null
-+++ b/build/pkgs/entrypoints/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([entrypoints], [SAGE_PYTHON_PACKAGE_CHECK([entrypoints])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 8e985614345da1a58fcdc127a9c0ddd790f9b5d2 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:48:26 -0400
-Subject: Trac #29665: add Gentoo package information for markupsafe.
-
----
- build/pkgs/markupsafe/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/markupsafe/distros/gentoo.txt
-
-diff --git a/build/pkgs/markupsafe/distros/gentoo.txt b/build/pkgs/markupsafe/distros/gentoo.txt
-new file mode 100644
-index 00000000..9654e35
---- /dev/null
-+++ b/build/pkgs/markupsafe/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/markupsafe
--- 
-cgit v1.0-1-gd88e
-
-
-From d370f229ae0988856f2e0d1f6ee2df2c47169106 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 4 Nov 2021 18:48:55 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for markupsafe.
-
----
- build/pkgs/markupsafe/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/markupsafe/spkg-configure.m4
-
-diff --git a/build/pkgs/markupsafe/spkg-configure.m4 b/build/pkgs/markupsafe/spkg-configure.m4
-new file mode 100644
-index 00000000..79eb8db
---- /dev/null
-+++ b/build/pkgs/markupsafe/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([markupsafe], [SAGE_PYTHON_PACKAGE_CHECK([markupsafe])])
--- 
-cgit v1.0-1-gd88e
-
-
-From c49b285ad9e25e6bc81a7e75d461d234fdd3ea68 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Fri, 5 Nov 2021 06:30:49 -0400
-Subject: Trac #29665: add Gentoo package information for flit_core.
-
----
- build/pkgs/flit_core/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/flit_core/distros/gentoo.txt
-
-diff --git a/build/pkgs/flit_core/distros/gentoo.txt b/build/pkgs/flit_core/distros/gentoo.txt
-new file mode 100644
-index 00000000..fe6bea9
---- /dev/null
-+++ b/build/pkgs/flit_core/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/flit_core
--- 
-cgit v1.0-1-gd88e
-
-
-From 5b0ce1c4f23cd9fc4316e1eb2b9b4bde394957f3 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Fri, 5 Nov 2021 06:32:11 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for flit_core.
-
----
- build/pkgs/flit_core/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/flit_core/spkg-configure.m4
-
-diff --git a/build/pkgs/flit_core/spkg-configure.m4 b/build/pkgs/flit_core/spkg-configure.m4
-new file mode 100644
-index 00000000..ee67557
---- /dev/null
-+++ b/build/pkgs/flit_core/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([flit_core], [SAGE_PYTHON_PACKAGE_CHECK([flit_core])])
--- 
-cgit v1.0-1-gd88e
-
-
-From f006c231a81428b1e1e792f889bf974f90e3c831 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Fri, 5 Nov 2021 06:34:06 -0400
-Subject: Trac #29665: add Gentoo package information for nest_asyncio.
-
----
- build/pkgs/nest_asyncio/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/nest_asyncio/distros/gentoo.txt
-
-diff --git a/build/pkgs/nest_asyncio/distros/gentoo.txt b/build/pkgs/nest_asyncio/distros/gentoo.txt
-new file mode 100644
-index 00000000..ab742d2
---- /dev/null
-+++ b/build/pkgs/nest_asyncio/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/nest_asyncio
--- 
-cgit v1.0-1-gd88e
-
-
-From 4a58d0a96a84475e765a01a64f5f44c48a317e0b Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Fri, 5 Nov 2021 06:34:43 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for nest_asyncio.
-
----
- build/pkgs/nest_asyncio/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/nest_asyncio/spkg-configure.m4
-
-diff --git a/build/pkgs/nest_asyncio/spkg-configure.m4 b/build/pkgs/nest_asyncio/spkg-configure.m4
-new file mode 100644
-index 00000000..4d81527
---- /dev/null
-+++ b/build/pkgs/nest_asyncio/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([nest_asyncio], [SAGE_PYTHON_PACKAGE_CHECK([nest_asyncio])])
--- 
-cgit v1.0-1-gd88e
-
-
-From e50af937777ea778908bc09a7a79db3dd80fdf25 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Fri, 5 Nov 2021 06:37:02 -0400
-Subject: Trac #29665: add Gentoo package information for ipython_genutils.
-
----
- build/pkgs/ipython_genutils/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/ipython_genutils/distros/gentoo.txt
-
-diff --git a/build/pkgs/ipython_genutils/distros/gentoo.txt b/build/pkgs/ipython_genutils/distros/gentoo.txt
-new file mode 100644
-index 00000000..01bc49d
---- /dev/null
-+++ b/build/pkgs/ipython_genutils/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/ipython_genutils
--- 
-cgit v1.0-1-gd88e
-
-
-From ec3c0ce9db2ba13c1a49d1bcfb7a4b249cb7ae83 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Fri, 5 Nov 2021 06:39:20 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for ipython_genutils.
-
----
- build/pkgs/ipython_genutils/spkg-configure.m4 | 4 ++++
- 1 file changed, 4 insertions(+)
- create mode 100644 build/pkgs/ipython_genutils/spkg-configure.m4
-
-diff --git a/build/pkgs/ipython_genutils/spkg-configure.m4 b/build/pkgs/ipython_genutils/spkg-configure.m4
-new file mode 100644
-index 00000000..b0ba86a
---- /dev/null
-+++ b/build/pkgs/ipython_genutils/spkg-configure.m4
-@@ -0,0 +1,4 @@
-+SAGE_SPKG_CONFIGURE(
-+  [ipython_genutils],
-+  [SAGE_PYTHON_PACKAGE_CHECK([ipython_genutils])]
-+)
--- 
-cgit v1.0-1-gd88e
-
-
-From 5c9e2e265115e5f10d4b459a475467e30b4bddde Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Fri, 5 Nov 2021 06:40:03 -0400
-Subject: Trac #29665: add Gentoo package information for ipython.
-
----
- build/pkgs/ipython/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/ipython/distros/gentoo.txt
-
-diff --git a/build/pkgs/ipython/distros/gentoo.txt b/build/pkgs/ipython/distros/gentoo.txt
-new file mode 100644
-index 00000000..8b76f18
---- /dev/null
-+++ b/build/pkgs/ipython/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/ipython
--- 
-cgit v1.0-1-gd88e
-
-
-From 621e707ddd040a902d7dddf0bed1de2b54ab22f2 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Fri, 5 Nov 2021 07:37:56 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for ipython.
-
----
- build/pkgs/ipython/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/ipython/spkg-configure.m4
-
-diff --git a/build/pkgs/ipython/spkg-configure.m4 b/build/pkgs/ipython/spkg-configure.m4
-new file mode 100644
-index 00000000..02ab89f
---- /dev/null
-+++ b/build/pkgs/ipython/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([ipython], [SAGE_PYTHON_PACKAGE_CHECK([ipython])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 20a0613f6d441da436f3e7b8047a72bf490882bd Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Fri, 5 Nov 2021 07:51:11 -0400
-Subject: Trac #29665: standard python spkg-configure.m4 for ipywidgets.
-
----
- build/pkgs/ipywidgets/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/ipywidgets/spkg-configure.m4
-
-diff --git a/build/pkgs/ipywidgets/spkg-configure.m4 b/build/pkgs/ipywidgets/spkg-configure.m4
-new file mode 100644
-index 00000000..51ca9be
---- /dev/null
-+++ b/build/pkgs/ipywidgets/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([ipywidgets], [SAGE_PYTHON_PACKAGE_CHECK([ipywidgets])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 76bcd386633acc02a1a3026339d0cbd258ada04e Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Fri, 5 Nov 2021 10:05:16 -0400
-Subject: Trac #29665: add Gentoo package information for wheel.
-
----
- build/pkgs/wheel/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/wheel/distros/gentoo.txt
-
-diff --git a/build/pkgs/wheel/distros/gentoo.txt b/build/pkgs/wheel/distros/gentoo.txt
-new file mode 100644
-index 00000000..ec571d5
---- /dev/null
-+++ b/build/pkgs/wheel/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/wheel
--- 
-cgit v1.0-1-gd88e
-
-
-From 96c2dd2ca7812f5333bb9d45eadb7ac408e364ce Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 08:51:44 -0500
-Subject: Trac #29665: add Gentoo package information for terminado.
-
----
- build/pkgs/terminado/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/terminado/distros/gentoo.txt
-
-diff --git a/build/pkgs/terminado/distros/gentoo.txt b/build/pkgs/terminado/distros/gentoo.txt
-new file mode 100644
-index 00000000..1df16f1
---- /dev/null
-+++ b/build/pkgs/terminado/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/terminado
--- 
-cgit v1.0-1-gd88e
-
-
-From 0de0f5f3d235a4339b21e37ea13c9f5e59a82e59 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 08:52:35 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for terminado.
-
----
- build/pkgs/terminado/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/terminado/spkg-configure.m4
-
-diff --git a/build/pkgs/terminado/spkg-configure.m4 b/build/pkgs/terminado/spkg-configure.m4
-new file mode 100644
-index 00000000..5defc2f
---- /dev/null
-+++ b/build/pkgs/terminado/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([terminado], [SAGE_PYTHON_PACKAGE_CHECK([terminado])])
--- 
-cgit v1.0-1-gd88e
-
-
-From d14a745c770b02822557e7cee0a98de1cb2f3a12 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 08:56:15 -0500
-Subject: Trac #29665: add Gentoo package information for cffi.
-
----
- build/pkgs/cffi/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/cffi/distros/gentoo.txt
-
-diff --git a/build/pkgs/cffi/distros/gentoo.txt b/build/pkgs/cffi/distros/gentoo.txt
-new file mode 100644
-index 00000000..81eeb81
---- /dev/null
-+++ b/build/pkgs/cffi/distros/gentoo.txt
-@@ -0,0 +1 @@
-+virtual/python-cffi
--- 
-cgit v1.0-1-gd88e
-
-
-From ce393c04afc69fe050e38f780d4e117164687d80 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 08:57:04 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for cffi.
-
----
- build/pkgs/cffi/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/cffi/spkg-configure.m4
-
-diff --git a/build/pkgs/cffi/spkg-configure.m4 b/build/pkgs/cffi/spkg-configure.m4
-new file mode 100644
-index 00000000..dc81875
---- /dev/null
-+++ b/build/pkgs/cffi/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([cffi], [SAGE_PYTHON_PACKAGE_CHECK([cffi])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 467093315b3fdd57c8caa2f95cf99ad52b0b84fb Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 08:57:57 -0500
-Subject: Trac #29665: add Gentoo package information for pip.
-
----
- build/pkgs/pip/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pip/distros/gentoo.txt
-
-diff --git a/build/pkgs/pip/distros/gentoo.txt b/build/pkgs/pip/distros/gentoo.txt
-new file mode 100644
-index 00000000..1845454
---- /dev/null
-+++ b/build/pkgs/pip/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/pip[vanilla]
--- 
-cgit v1.0-1-gd88e
-
-
-From c597fd23f9f68dabbcb7e698d0569c3e6458f6d1 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 09:07:26 -0500
-Subject: Trac #29665: new spkg-configure.m4 for pip.
-
----
- build/pkgs/pip/spkg-configure.m4 | 12 ++++++++++++
- 1 file changed, 12 insertions(+)
- create mode 100644 build/pkgs/pip/spkg-configure.m4
-
-diff --git a/build/pkgs/pip/spkg-configure.m4 b/build/pkgs/pip/spkg-configure.m4
-new file mode 100644
-index 00000000..c7a5562
---- /dev/null
-+++ b/build/pkgs/pip/spkg-configure.m4
-@@ -0,0 +1,12 @@
-+SAGE_SPKG_CONFIGURE([pip], [
-+  dnl always run this macro because it changes the default value of
-+  dnl the --with-system-<package> option.
-+  SAGE_PYTHON_PACKAGE_CHECK([pip])
-+
-+  dnl if we might not install the spkg, make sure that "pip" is in
-+  dnl the user's PATH, too.
-+  AS_IF([test "x$sage_spkg_install_pip" != "xyes"], [
-+    AC_CHECK_PROG(HAVE_PIP, pip, yes, no)
-+    AS_IF([test "x$HAVE_PIP" = "xno"], [sage_spkg_install_pip=yes])
-+  ])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From ef8f1e807bc55d7b8321777486fa867a7c135419 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Tue, 9 Nov 2021 09:09:04 -0500
-Subject: Trac #29665: set $SAGE_PIP_INSTALL_FLAGS for
- --enable-system-site-packages.
-
-We need to pass some special flags to "pip install" to make it do the
-right thing in the precence of system-site packages. Here we introduce
-a new autoconf variable, SAGE_PIP_INSTALL_FLAGS, that will be used
-to pass those flags to the build system.
-
-With autoconf aware of the variable, we substitute its value into the
-sage-build-env-config script for use in spkg-install.in.
----
- build/bin/sage-build-env-config.in | 1 +
- configure.ac                       | 9 +++++++++
- 2 files changed, 10 insertions(+)
-
-diff --git a/build/bin/sage-build-env-config.in b/build/bin/sage-build-env-config.in
-index 92e7dad..ad62e5f 100644
---- a/build/bin/sage-build-env-config.in
-+++ b/build/bin/sage-build-env-config.in
-@@ -53,6 +53,7 @@ export SAGE_PARI_CFG="@SAGE_PARI_CFG@"
- 
- export SAGE_GLPK_PREFIX="@SAGE_GLPK_PREFIX@"
- export SAGE_FREETYPE_PREFIX="@SAGE_FREETYPE_PREFIX@"
-+export SAGE_PIP_INSTALL_FLAGS="@SAGE_PIP_INSTALL_FLAGS@"
- export SAGE_SUITESPARSE_PREFIX="@SAGE_SUITESPARSE_PREFIX@"
- 
- export SAGE_CONFIGURE_FFLAS_FFPACK="@SAGE_CONFIGURE_FFLAS_FFPACK@"
-diff --git a/configure.ac b/configure.ac
-index 6fafb83..6ed07ac 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -441,6 +441,14 @@ AC_ARG_ENABLE(
-     [allow the use of python packages from the system (experimental; default: no)]
-   )], [
-   AS_IF([test "x$enable_system_site_packages" = "xyes"], [
-+    dnl When installing python SPKGs in the presence of system-site
-+    dnl packages, we need to --ignore-installed so that a patched SPKG
-+    dnl can be installed in the presence of an unpatched system package
-+    dnl that appears (to pip) to be identical. The --no-deps flag is
-+    dnl then needed because --ignore-installed will make any installed
-+    dnl dependencies invisible to pip, who does not appreciate that.
-+    SAGE_PIP_INSTALL_FLAGS="${SAGE_PIP_INSTALL_FLAGS} --no-deps --ignore-installed"
-+
-     SAGE_VENV_FLAGS="${SAGE_VENV_FLAGS} --system-site-packages"
- 
-     dnl We want to raise an error if the user asked for "system site
-@@ -453,6 +461,7 @@ AC_ARG_ENABLE(
-     with_system_python3="force"
-   ])
- ])
-+AC_SUBST([SAGE_PIP_INSTALL_FLAGS])
- AC_SUBST([SAGE_VENV_FLAGS])
- 
- SAGE_SPKG_OPTIONS=""
--- 
-cgit v1.0-1-gd88e
-
-
-From 3cf365fef84e809e74abd2eb388e7a8e9af9d739 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Tue, 9 Nov 2021 21:01:58 -0500
-Subject: Trac #29665: pass $SAGE_PIP_INSTALL_FLAGS to sdh_pip_install.
-
-Since sdh_pip_install is usually called from spkg-install.in, the
-variables from sage-build-env-config will be available. Here we pass
-the contents of $SAGE_PIP_INSTALL_FLAGS to sage-pip-install
-unconditionally, and hope that the user ignores this variable unless
-he truly knows what he is doing.
----
- build/bin/sage-dist-helpers | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/build/bin/sage-dist-helpers b/build/bin/sage-dist-helpers
-index fe364e5..1032ac3 100644
---- a/build/bin/sage-dist-helpers
-+++ b/build/bin/sage-dist-helpers
-@@ -303,7 +303,11 @@ sdh_store_wheel() {
- }
- 
- sdh_store_and_pip_install_wheel() {
--    local pip_options=""
-+    # The $SAGE_PIP_INSTALL_FLAGS variable is set by sage-build-env-config.
-+    # We skip sanity checking its contents since you should either let sage
-+    # decide what it contains, or really know what you are doing.
-+    local pip_options="${SAGE_PIP_INSTALL_FLAGS}"
-+
-     while [ $# -gt 0 ]; do
-         case $1 in
-             -*) pip_options="$pip_options $1"
--- 
-cgit v1.0-1-gd88e
-
-
-From 50f0438ee857b8f0b7d7ad924e6bba9c5e1bc033 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 13:10:46 -0500
-Subject: Trac #29665: add Gentoo package information for pexpect.
-
----
- build/pkgs/pexpect/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pexpect/distros/gentoo.txt
-
-diff --git a/build/pkgs/pexpect/distros/gentoo.txt b/build/pkgs/pexpect/distros/gentoo.txt
-new file mode 100644
-index 00000000..30c4b60
---- /dev/null
-+++ b/build/pkgs/pexpect/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/pexpect
--- 
-cgit v1.0-1-gd88e
-
-
-From 4d784688d997290b462646fa7f36114a41f3f453 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 13:11:25 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for pexpect.
-
----
- build/pkgs/pexpect/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pexpect/spkg-configure.m4
-
-diff --git a/build/pkgs/pexpect/spkg-configure.m4 b/build/pkgs/pexpect/spkg-configure.m4
-new file mode 100644
-index 00000000..6520856
---- /dev/null
-+++ b/build/pkgs/pexpect/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([pexpect], [SAGE_PYTHON_PACKAGE_CHECK([pexpect])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 6447122dc76a3b7a58340dbed942db66530b5b07 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 13:12:05 -0500
-Subject: Trac #29665: add Gentoo package information for docutils.
-
----
- build/pkgs/docutils/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/docutils/distros/gentoo.txt
-
-diff --git a/build/pkgs/docutils/distros/gentoo.txt b/build/pkgs/docutils/distros/gentoo.txt
-new file mode 100644
-index 00000000..fe4a452
---- /dev/null
-+++ b/build/pkgs/docutils/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/docutils
--- 
-cgit v1.0-1-gd88e
-
-
-From 709041480a5fc729b0ee7f1a8a3b16d4d65321b5 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 13:12:38 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for docutils.
-
----
- build/pkgs/docutils/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/docutils/spkg-configure.m4
-
-diff --git a/build/pkgs/docutils/spkg-configure.m4 b/build/pkgs/docutils/spkg-configure.m4
-new file mode 100644
-index 00000000..3584e45
---- /dev/null
-+++ b/build/pkgs/docutils/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([docutils], [SAGE_PYTHON_PACKAGE_CHECK([docutils])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 782d38b48ab87afccc43fbc071e7b7ed48fb0a20 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 13:14:37 -0500
-Subject: Trac #29665: add Gentoo package information for nbclient.
-
----
- build/pkgs/nbclient/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/nbclient/distros/gentoo.txt
-
-diff --git a/build/pkgs/nbclient/distros/gentoo.txt b/build/pkgs/nbclient/distros/gentoo.txt
-new file mode 100644
-index 00000000..06ff18d
---- /dev/null
-+++ b/build/pkgs/nbclient/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/nbclient
--- 
-cgit v1.0-1-gd88e
-
-
-From 19ce09336532336f69db74381932d51a429dfaca Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 13:15:11 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for nbclient.
-
----
- build/pkgs/nbclient/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/nbclient/spkg-configure.m4
-
-diff --git a/build/pkgs/nbclient/spkg-configure.m4 b/build/pkgs/nbclient/spkg-configure.m4
-new file mode 100644
-index 00000000..14178b7
---- /dev/null
-+++ b/build/pkgs/nbclient/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([nbclient], [SAGE_PYTHON_PACKAGE_CHECK([nbclient])])
--- 
-cgit v1.0-1-gd88e
-
-
-From c063b9de42c1780368000a563d0dbe80b6fff169 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 13:17:36 -0500
-Subject: Trac #29665: add Gentoo package information for argon2_cffi.
-
----
- build/pkgs/argon2_cffi/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/argon2_cffi/distros/gentoo.txt
-
-diff --git a/build/pkgs/argon2_cffi/distros/gentoo.txt b/build/pkgs/argon2_cffi/distros/gentoo.txt
-new file mode 100644
-index 00000000..2f12ca8
---- /dev/null
-+++ b/build/pkgs/argon2_cffi/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/argon2-cffi
--- 
-cgit v1.0-1-gd88e
-
-
-From 0b4d5699dd51ea52550fba7db9e1cbb8bbac1892 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 13:18:35 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for argon2_cffi.
-
----
- build/pkgs/argon2_cffi/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/argon2_cffi/spkg-configure.m4
-
-diff --git a/build/pkgs/argon2_cffi/spkg-configure.m4 b/build/pkgs/argon2_cffi/spkg-configure.m4
-new file mode 100644
-index 00000000..03ebc63
---- /dev/null
-+++ b/build/pkgs/argon2_cffi/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([argon2_cffi], [SAGE_PYTHON_PACKAGE_CHECK([argon2_cffi])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 2b4119558a6e0b1aa512848539a237676b035c83 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:30:48 -0500
-Subject: Trac #29665: fix package name in dateutil's install-requires.txt.
-
----
- build/pkgs/dateutil/install-requires.txt | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/build/pkgs/dateutil/install-requires.txt b/build/pkgs/dateutil/install-requires.txt
-index 0ae93da..face537 100644
---- a/build/pkgs/dateutil/install-requires.txt
-+++ b/build/pkgs/dateutil/install-requires.txt
-@@ -1 +1 @@
--dateutil >=2.8.1
-+python-dateutil >=2.8.1
--- 
-cgit v1.0-1-gd88e
-
-
-From df371b7c4d20a3353d43940306ad22e11aba29da Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:31:41 -0500
-Subject: Trac #29665: add Gentoo package information for dateutil.
-
----
- build/pkgs/dateutil/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/dateutil/distros/gentoo.txt
-
-diff --git a/build/pkgs/dateutil/distros/gentoo.txt b/build/pkgs/dateutil/distros/gentoo.txt
-new file mode 100644
-index 00000000..e129df7
---- /dev/null
-+++ b/build/pkgs/dateutil/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/python-dateutil
--- 
-cgit v1.0-1-gd88e
-
-
-From 577695dfdf661ee26c0ffd767bdbf479d95f7fb4 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:32:21 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for dateutil.
-
----
- build/pkgs/dateutil/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/dateutil/spkg-configure.m4
-
-diff --git a/build/pkgs/dateutil/spkg-configure.m4 b/build/pkgs/dateutil/spkg-configure.m4
-new file mode 100644
-index 00000000..fdcd127
---- /dev/null
-+++ b/build/pkgs/dateutil/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([dateutil], [SAGE_PYTHON_PACKAGE_CHECK([dateutil])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 1984651caac624ec4bb58814ca1d57fe66f9881a Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:33:51 -0500
-Subject: Trac #29665: add Gentoo package information for setuptools_scm.
-
----
- build/pkgs/setuptools_scm/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/setuptools_scm/distros/gentoo.txt
-
-diff --git a/build/pkgs/setuptools_scm/distros/gentoo.txt b/build/pkgs/setuptools_scm/distros/gentoo.txt
-new file mode 100644
-index 00000000..8989597
---- /dev/null
-+++ b/build/pkgs/setuptools_scm/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/setuptools_scm
--- 
-cgit v1.0-1-gd88e
-
-
-From ebf7c854ed966e7353759be485c4f5a57b9a10fa Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:34:49 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for setuptools_scm.
-
----
- build/pkgs/setuptools_scm/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/setuptools_scm/spkg-configure.m4
-
-diff --git a/build/pkgs/setuptools_scm/spkg-configure.m4 b/build/pkgs/setuptools_scm/spkg-configure.m4
-new file mode 100644
-index 00000000..437148c
---- /dev/null
-+++ b/build/pkgs/setuptools_scm/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([setuptools_scm], [
-+  SAGE_PYTHON_PACKAGE_CHECK([setuptools_scm])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From 0dee0d0c28f31b1f619e44c710a3c9e22d2b2544 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:36:33 -0500
-Subject: Trac #29665: add Gentoo package information for nbconvert.
-
----
- build/pkgs/nbconvert/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/nbconvert/distros/gentoo.txt
-
-diff --git a/build/pkgs/nbconvert/distros/gentoo.txt b/build/pkgs/nbconvert/distros/gentoo.txt
-new file mode 100644
-index 00000000..6c45a10
---- /dev/null
-+++ b/build/pkgs/nbconvert/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/nbconvert
--- 
-cgit v1.0-1-gd88e
-
-
-From 473789eb11b1838bc32dc8a63509ee199afc8912 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:37:37 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for nbconvert.
-
----
- build/pkgs/nbconvert/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/nbconvert/spkg-configure.m4
-
-diff --git a/build/pkgs/nbconvert/spkg-configure.m4 b/build/pkgs/nbconvert/spkg-configure.m4
-new file mode 100644
-index 00000000..9b5dee3
---- /dev/null
-+++ b/build/pkgs/nbconvert/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([nbconvert], [SAGE_PYTHON_PACKAGE_CHECK([nbconvert])])
--- 
-cgit v1.0-1-gd88e
-
-
-From f0703b594e57c980d605aa9bc8316c45a7858b3b Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:41:51 -0500
-Subject: Trac #29665: add Gentoo package information for jupyter_core.
-
----
- build/pkgs/jupyter_core/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/jupyter_core/distros/gentoo.txt
-
-diff --git a/build/pkgs/jupyter_core/distros/gentoo.txt b/build/pkgs/jupyter_core/distros/gentoo.txt
-new file mode 100644
-index 00000000..f168c5a
---- /dev/null
-+++ b/build/pkgs/jupyter_core/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/jupyter_core
--- 
-cgit v1.0-1-gd88e
-
-
-From 061a307cc4a6680d8500fde834975064e59540d5 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:42:48 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for jupyter_core.
-
----
- build/pkgs/jupyter_core/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/jupyter_core/spkg-configure.m4
-
-diff --git a/build/pkgs/jupyter_core/spkg-configure.m4 b/build/pkgs/jupyter_core/spkg-configure.m4
-new file mode 100644
-index 00000000..67df9c3
---- /dev/null
-+++ b/build/pkgs/jupyter_core/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([jupyter_core], [
-+  SAGE_PYTHON_PACKAGE_CHECK([jupyter_core])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From b85abe964ce0b98b5842efe9cbad9bdb1c89202f Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:47:08 -0500
-Subject: Trac #29665: add Gentoo package information for jupyter_client.
-
----
- build/pkgs/jupyter_client/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/jupyter_client/distros/gentoo.txt
-
-diff --git a/build/pkgs/jupyter_client/distros/gentoo.txt b/build/pkgs/jupyter_client/distros/gentoo.txt
-new file mode 100644
-index 00000000..4f1de88
---- /dev/null
-+++ b/build/pkgs/jupyter_client/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/jupyter_client
--- 
-cgit v1.0-1-gd88e
-
-
-From 86323ff1e0b2507933df6bc2a96c9175957640c5 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:48:04 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for jupyter_client.
-
----
- build/pkgs/jupyter_client/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/jupyter_client/spkg-configure.m4
-
-diff --git a/build/pkgs/jupyter_client/spkg-configure.m4 b/build/pkgs/jupyter_client/spkg-configure.m4
-new file mode 100644
-index 00000000..fbd3498
---- /dev/null
-+++ b/build/pkgs/jupyter_client/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([jupyter_client], [
-+  SAGE_PYTHON_PACKAGE_CHECK([jupyter_client])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From a8475e27dd30d752d05ab6fea6579e8623501d82 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:48:58 -0500
-Subject: Trac #29665: add Gentoo package information for snowballstemmer.
-
----
- build/pkgs/snowballstemmer/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/snowballstemmer/distros/gentoo.txt
-
-diff --git a/build/pkgs/snowballstemmer/distros/gentoo.txt b/build/pkgs/snowballstemmer/distros/gentoo.txt
-new file mode 100644
-index 00000000..63fd851
---- /dev/null
-+++ b/build/pkgs/snowballstemmer/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/snowballstemmer
--- 
-cgit v1.0-1-gd88e
-
-
-From 0833c9b781062b4ed86d619e050a6f5d60e36080 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:49:38 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for snowballstemmer.
-
----
- build/pkgs/snowballstemmer/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/snowballstemmer/spkg-configure.m4
-
-diff --git a/build/pkgs/snowballstemmer/spkg-configure.m4 b/build/pkgs/snowballstemmer/spkg-configure.m4
-new file mode 100644
-index 00000000..6aa0882
---- /dev/null
-+++ b/build/pkgs/snowballstemmer/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([snowballstemmer], [
-+  SAGE_PYTHON_PACKAGE_CHECK([snowballstemmer])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From 50a1cf2a2bcd7eeec64cbc3f70e3e9fbe5d850fe Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:50:47 -0500
-Subject: Trac #29665: add Gentoo package information for tornado.
-
----
- build/pkgs/tornado/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/tornado/distros/gentoo.txt
-
-diff --git a/build/pkgs/tornado/distros/gentoo.txt b/build/pkgs/tornado/distros/gentoo.txt
-new file mode 100644
-index 00000000..6ae4b9f
---- /dev/null
-+++ b/build/pkgs/tornado/distros/gentoo.txt
-@@ -0,0 +1 @@
-+www-servers/tornado
--- 
-cgit v1.0-1-gd88e
-
-
-From 118f4da6e03476c726363e8e22ecda32f13bfc33 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:51:26 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for tornado.
-
----
- build/pkgs/tornado/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/tornado/spkg-configure.m4
-
-diff --git a/build/pkgs/tornado/spkg-configure.m4 b/build/pkgs/tornado/spkg-configure.m4
-new file mode 100644
-index 00000000..1ee5bc9
---- /dev/null
-+++ b/build/pkgs/tornado/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([tornado], [SAGE_PYTHON_PACKAGE_CHECK([tornado])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 3850701747a6c8ef60840bdfdb589b28d4cd2b9a Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:52:21 -0500
-Subject: Trac #29665: add Gentoo package information for jsonschema.
-
----
- build/pkgs/jsonschema/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/jsonschema/distros/gentoo.txt
-
-diff --git a/build/pkgs/jsonschema/distros/gentoo.txt b/build/pkgs/jsonschema/distros/gentoo.txt
-new file mode 100644
-index 00000000..d708e4c
---- /dev/null
-+++ b/build/pkgs/jsonschema/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/jsonschema
--- 
-cgit v1.0-1-gd88e
-
-
-From 76e3917c8af781af00f642cfada7a79594429e30 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:54:03 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for jsonschema.
-
----
- build/pkgs/jsonschema/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/jsonschema/spkg-configure.m4
-
-diff --git a/build/pkgs/jsonschema/spkg-configure.m4 b/build/pkgs/jsonschema/spkg-configure.m4
-new file mode 100644
-index 00000000..b9e5e21
---- /dev/null
-+++ b/build/pkgs/jsonschema/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([jsonschema], [SAGE_PYTHON_PACKAGE_CHECK([jsonschema])])
--- 
-cgit v1.0-1-gd88e
-
-
-From fd4a16c11669b6dd73ac6325bca820e76db00402 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:55:54 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for
- widgetsnbextension.
-
----
- build/pkgs/widgetsnbextension/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/widgetsnbextension/spkg-configure.m4
-
-diff --git a/build/pkgs/widgetsnbextension/spkg-configure.m4 b/build/pkgs/widgetsnbextension/spkg-configure.m4
-new file mode 100644
-index 00000000..bf82daf
---- /dev/null
-+++ b/build/pkgs/widgetsnbextension/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([widgetsnbextension], [
-+  SAGE_PYTHON_PACKAGE_CHECK([widgetsnbextension])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From 8079a9f384e3c8480e157dd98c3db2f43c987f4e Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:57:20 -0500
-Subject: Trac #29665: add Gentoo package information for importlib_resources.
-
----
- build/pkgs/importlib_resources/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/importlib_resources/distros/gentoo.txt
-
-diff --git a/build/pkgs/importlib_resources/distros/gentoo.txt b/build/pkgs/importlib_resources/distros/gentoo.txt
-new file mode 100644
-index 00000000..d5e1f2c
---- /dev/null
-+++ b/build/pkgs/importlib_resources/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/importlib_resources
--- 
-cgit v1.0-1-gd88e
-
-
-From 2c430d7c52f02779a6c41b98ac2f4edd8b6759c3 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:58:00 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for
- importlib_resources.
-
----
- build/pkgs/importlib_resources/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/importlib_resources/spkg-configure.m4
-
-diff --git a/build/pkgs/importlib_resources/spkg-configure.m4 b/build/pkgs/importlib_resources/spkg-configure.m4
-new file mode 100644
-index 00000000..50df55b
---- /dev/null
-+++ b/build/pkgs/importlib_resources/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([importlib_resources], [
-+  SAGE_PYTHON_PACKAGE_CHECK([importlib_resources])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From 00d13d7bf2e50aae2ccef3b2b30293c70a922af2 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:58:38 -0500
-Subject: Trac #29665: add Gentoo package information for kiwisolver.
-
----
- build/pkgs/kiwisolver/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/kiwisolver/distros/gentoo.txt
-
-diff --git a/build/pkgs/kiwisolver/distros/gentoo.txt b/build/pkgs/kiwisolver/distros/gentoo.txt
-new file mode 100644
-index 00000000..7b30c95
---- /dev/null
-+++ b/build/pkgs/kiwisolver/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/kiwisolver
--- 
-cgit v1.0-1-gd88e
-
-
-From 72b7907ef7ea9fa4ff6948ea34cfe2f693ee6c31 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 19:59:09 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for kiwisolver.
-
----
- build/pkgs/kiwisolver/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/kiwisolver/spkg-configure.m4
-
-diff --git a/build/pkgs/kiwisolver/spkg-configure.m4 b/build/pkgs/kiwisolver/spkg-configure.m4
-new file mode 100644
-index 00000000..4e7ac97
---- /dev/null
-+++ b/build/pkgs/kiwisolver/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([kiwisolver], [SAGE_PYTHON_PACKAGE_CHECK([kiwisolver])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 479351279e4e0ea7e2d146434f0daba038765cfd Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:00:04 -0500
-Subject: Trac #29665: add Gentoo package information for notebook.
-
----
- build/pkgs/notebook/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/notebook/distros/gentoo.txt
-
-diff --git a/build/pkgs/notebook/distros/gentoo.txt b/build/pkgs/notebook/distros/gentoo.txt
-new file mode 100644
-index 00000000..6475d72
---- /dev/null
-+++ b/build/pkgs/notebook/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/notebook
--- 
-cgit v1.0-1-gd88e
-
-
-From f4d9242ea654977f8ad7865c82eec593e11a36bc Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:01:42 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for notebook.
-
----
- build/pkgs/notebook/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/notebook/spkg-configure.m4
-
-diff --git a/build/pkgs/notebook/spkg-configure.m4 b/build/pkgs/notebook/spkg-configure.m4
-new file mode 100644
-index 00000000..a17ba95
---- /dev/null
-+++ b/build/pkgs/notebook/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([notebook], [SAGE_PYTHON_PACKAGE_CHECK([notebook])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 9837070c7f8e9a71283b84d49d4fd2c94b78a464 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:02:38 -0500
-Subject: Trac #29665: add Gentoo package information for matplotlib_inline.
-
----
- build/pkgs/matplotlib_inline/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/matplotlib_inline/distros/gentoo.txt
-
-diff --git a/build/pkgs/matplotlib_inline/distros/gentoo.txt b/build/pkgs/matplotlib_inline/distros/gentoo.txt
-new file mode 100644
-index 00000000..6a5859c
---- /dev/null
-+++ b/build/pkgs/matplotlib_inline/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/matplotlib-inline
--- 
-cgit v1.0-1-gd88e
-
-
-From 750be73b25b92b4875e47d044360ac0e1116ec3e Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:03:28 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for matplotlib_inline.
-
----
- build/pkgs/matplotlib_inline/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/matplotlib_inline/spkg-configure.m4
-
-diff --git a/build/pkgs/matplotlib_inline/spkg-configure.m4 b/build/pkgs/matplotlib_inline/spkg-configure.m4
-new file mode 100644
-index 00000000..e59658f
---- /dev/null
-+++ b/build/pkgs/matplotlib_inline/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([matplotlib_inline], [
-+  SAGE_PYTHON_PACKAGE_CHECK([matplotlib_inline])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From 273505f49698dcd2ab30c2756b07113c9b7e7791 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:04:10 -0500
-Subject: Trac #29665: add Gentoo package information for ipykernel.
-
----
- build/pkgs/ipykernel/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/ipykernel/distros/gentoo.txt
-
-diff --git a/build/pkgs/ipykernel/distros/gentoo.txt b/build/pkgs/ipykernel/distros/gentoo.txt
-new file mode 100644
-index 00000000..88aab61
---- /dev/null
-+++ b/build/pkgs/ipykernel/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/ipykernel
--- 
-cgit v1.0-1-gd88e
-
-
-From 629ad36c9e4ae0cdff4a013289b4f2911442445e Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:04:46 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for ipykernel.
-
----
- build/pkgs/ipykernel/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/ipykernel/spkg-configure.m4
-
-diff --git a/build/pkgs/ipykernel/spkg-configure.m4 b/build/pkgs/ipykernel/spkg-configure.m4
-new file mode 100644
-index 00000000..94ecc2d
---- /dev/null
-+++ b/build/pkgs/ipykernel/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([ipykernel], [SAGE_PYTHON_PACKAGE_CHECK([ipykernel])])
--- 
-cgit v1.0-1-gd88e
-
-
-From b8d709edb6a24fd5868ee2818b56e78257b2eafa Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:05:26 -0500
-Subject: Trac #29665: add Gentoo package information for prompt_toolkit.
-
----
- build/pkgs/prompt_toolkit/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/prompt_toolkit/distros/gentoo.txt
-
-diff --git a/build/pkgs/prompt_toolkit/distros/gentoo.txt b/build/pkgs/prompt_toolkit/distros/gentoo.txt
-new file mode 100644
-index 00000000..6902484
---- /dev/null
-+++ b/build/pkgs/prompt_toolkit/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/prompt_toolkit
--- 
-cgit v1.0-1-gd88e
-
-
-From 16c0b5e767ae4dac4440510b7253e5c8642b7d2c Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:10:39 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for prompt_toolkit.
-
----
- build/pkgs/prompt_toolkit/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/prompt_toolkit/spkg-configure.m4
-
-diff --git a/build/pkgs/prompt_toolkit/spkg-configure.m4 b/build/pkgs/prompt_toolkit/spkg-configure.m4
-new file mode 100644
-index 00000000..fd8c1a6
---- /dev/null
-+++ b/build/pkgs/prompt_toolkit/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([prompt_toolkit], [
-+  SAGE_PYTHON_PACKAGE_CHECK([prompt_toolkit])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From 0cd9283e8bb6c8ae413fc8f715c021f7ec3ca2c8 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:12:10 -0500
-Subject: Trac #29665: add Gentoo package information for charset_normalizer.
-
----
- build/pkgs/charset_normalizer/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/charset_normalizer/distros/gentoo.txt
-
-diff --git a/build/pkgs/charset_normalizer/distros/gentoo.txt b/build/pkgs/charset_normalizer/distros/gentoo.txt
-new file mode 100644
-index 00000000..eefeb89
---- /dev/null
-+++ b/build/pkgs/charset_normalizer/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/charset_normalizer
--- 
-cgit v1.0-1-gd88e
-
-
-From a04b01a9ab59097d189edcc5ddcb461faede83b2 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:12:54 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for
- charset_normalizer.
-
----
- build/pkgs/charset_normalizer/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/charset_normalizer/spkg-configure.m4
-
-diff --git a/build/pkgs/charset_normalizer/spkg-configure.m4 b/build/pkgs/charset_normalizer/spkg-configure.m4
-new file mode 100644
-index 00000000..18b18cf
---- /dev/null
-+++ b/build/pkgs/charset_normalizer/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([charset_normalizer], [
-+  SAGE_PYTHON_PACKAGE_CHECK([charset_normalizer])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From d2ea08138711c53046f977b586f33b09b176b2e3 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:13:37 -0500
-Subject: Trac #29665: add Gentoo package information for prometheus_client.
-
----
- build/pkgs/prometheus_client/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/prometheus_client/distros/gentoo.txt
-
-diff --git a/build/pkgs/prometheus_client/distros/gentoo.txt b/build/pkgs/prometheus_client/distros/gentoo.txt
-new file mode 100644
-index 00000000..aa2889c
---- /dev/null
-+++ b/build/pkgs/prometheus_client/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/prometheus_client
--- 
-cgit v1.0-1-gd88e
-
-
-From 5b0393200e9edd3e26b8a55ba67e5710e7403fcb Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:15:09 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for prometheus_client.
-
----
- build/pkgs/prometheus_client/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/prometheus_client/spkg-configure.m4
-
-diff --git a/build/pkgs/prometheus_client/spkg-configure.m4 b/build/pkgs/prometheus_client/spkg-configure.m4
-new file mode 100644
-index 00000000..b494588
---- /dev/null
-+++ b/build/pkgs/prometheus_client/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([prometheus_client], [
-+  SAGE_PYTHON_PACKAGE_CHECK([prometheus_client])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From cdcd85284f43ca4ad18353ec3527b2901e57b788 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:17:23 -0500
-Subject: Trac #29665: add Gentoo package information for pybind11.
-
----
- build/pkgs/pybind11/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pybind11/distros/gentoo.txt
-
-diff --git a/build/pkgs/pybind11/distros/gentoo.txt b/build/pkgs/pybind11/distros/gentoo.txt
-new file mode 100644
-index 00000000..0c500b3
---- /dev/null
-+++ b/build/pkgs/pybind11/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/pybind11
--- 
-cgit v1.0-1-gd88e
-
-
-From efdd1eb64c4799fe3cdf2221824182941b3fda2d Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:17:51 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for pybind11.
-
----
- build/pkgs/pybind11/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pybind11/spkg-configure.m4
-
-diff --git a/build/pkgs/pybind11/spkg-configure.m4 b/build/pkgs/pybind11/spkg-configure.m4
-new file mode 100644
-index 00000000..cce1cf5
---- /dev/null
-+++ b/build/pkgs/pybind11/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([pybind11], [SAGE_PYTHON_PACKAGE_CHECK([pybind11])])
--- 
-cgit v1.0-1-gd88e
-
-
-From b2128f33b68ea33927284116ea598dd186902400 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:19:23 -0500
-Subject: Trac #29665: add Gentoo package information for pkgconfig.
-
----
- build/pkgs/pkgconfig/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pkgconfig/distros/gentoo.txt
-
-diff --git a/build/pkgs/pkgconfig/distros/gentoo.txt b/build/pkgs/pkgconfig/distros/gentoo.txt
-new file mode 100644
-index 00000000..32e8618
---- /dev/null
-+++ b/build/pkgs/pkgconfig/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/pkgconfig
--- 
-cgit v1.0-1-gd88e
-
-
-From 5b373b49e06aadeb36dc57e500da9a322460e658 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:19:54 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for pkgconfig.
-
----
- build/pkgs/pkgconfig/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pkgconfig/spkg-configure.m4
-
-diff --git a/build/pkgs/pkgconfig/spkg-configure.m4 b/build/pkgs/pkgconfig/spkg-configure.m4
-new file mode 100644
-index 00000000..6708293
---- /dev/null
-+++ b/build/pkgs/pkgconfig/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([pkgconfig], [SAGE_PYTHON_PACKAGE_CHECK([pkgconfig])])
--- 
-cgit v1.0-1-gd88e
-
-
-From ce578729eb0d14baab365351ba9a9ffffb7b79f2 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:21:10 -0500
-Subject: Trac #29665: add Gentoo package information for
- sphinxcontrib_serializinghtml.
-
----
- build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
-
-diff --git a/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt b/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
-new file mode 100644
-index 00000000..38bca8f
---- /dev/null
-+++ b/build/pkgs/sphinxcontrib_serializinghtml/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/sphinxcontrib-serializinghtml
--- 
-cgit v1.0-1-gd88e
-
-
-From bb0f42c32bbce0e4488678312f5e2d88c6f42c9b Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:21:54 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for
- sphinxcontrib_serializinghtml.
-
----
- build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
-
-diff --git a/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4 b/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
-new file mode 100644
-index 00000000..be8e625
---- /dev/null
-+++ b/build/pkgs/sphinxcontrib_serializinghtml/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([sphinxcontrib_serializinghtml], [
-+  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_serializinghtml])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From e47dcf985e40475de85c9436a85537751318bc3d Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:22:54 -0500
-Subject: Trac #29665: add Gentoo package information for sphinxcontrib_jsmath.
-
----
- build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
-
-diff --git a/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt b/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
-new file mode 100644
-index 00000000..041a471
---- /dev/null
-+++ b/build/pkgs/sphinxcontrib_jsmath/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/sphinxcontrib-jsmath
--- 
-cgit v1.0-1-gd88e
-
-
-From 72cff6fd35f93de4fa855bc870569dd733ff5c24 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:23:49 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for
- sphinxcontrib_jsmath.
-
----
- build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
-
-diff --git a/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4 b/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
-new file mode 100644
-index 00000000..e46bde2
---- /dev/null
-+++ b/build/pkgs/sphinxcontrib_jsmath/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([sphinxcontrib_jsmath], [
-+  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_jsmath])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From a36395d70f759449cd63c1b0990fbdcb4cb25ca0 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:24:26 -0500
-Subject: Trac #29665: add Gentoo package information for
- sphinxcontrib_devhelp.
-
----
- build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
-
-diff --git a/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
-new file mode 100644
-index 00000000..9b5c899
---- /dev/null
-+++ b/build/pkgs/sphinxcontrib_devhelp/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/sphinxcontrib-devhelp
--- 
-cgit v1.0-1-gd88e
-
-
-From 9953a5dd1646ed0ad51d2e3935cf609bc9e7fd1c Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:25:04 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for
- sphinxcontrib_devhelp.
-
----
- build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
-
-diff --git a/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
-new file mode 100644
-index 00000000..8728136
---- /dev/null
-+++ b/build/pkgs/sphinxcontrib_devhelp/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([sphinxcontrib_devhelp], [
-+  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_devhelp])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From b199d5363aad93f3cb23f7904c9553a28b06348f Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:25:53 -0500
-Subject: Trac #29665: add Gentoo package information for sphinxcontrib_qthelp.
-
----
- build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
-
-diff --git a/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
-new file mode 100644
-index 00000000..7210099
---- /dev/null
-+++ b/build/pkgs/sphinxcontrib_qthelp/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/sphinxcontrib-qthelp
--- 
-cgit v1.0-1-gd88e
-
-
-From 94ac8806739f3938e73f5857328e91e0d42e98d2 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:26:28 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for
- sphinxcontrib_qthelp.
-
----
- build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
-
-diff --git a/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
-new file mode 100644
-index 00000000..81ea5e1
---- /dev/null
-+++ b/build/pkgs/sphinxcontrib_qthelp/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([sphinxcontrib_qthelp], [
-+  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_qthelp])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From beedc154aa405e8a58aee8889f510db07adc89a7 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:26:54 -0500
-Subject: Trac #29665: add Gentoo package information for
- sphinxcontrib_applehelp.
-
----
- build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
-
-diff --git a/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
-new file mode 100644
-index 00000000..66ac8da
---- /dev/null
-+++ b/build/pkgs/sphinxcontrib_applehelp/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/sphinxcontrib-applehelp
--- 
-cgit v1.0-1-gd88e
-
-
-From 07d47c3673d6b35423b71f621cb400989c0101c2 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:27:19 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for
- sphinxcontrib_applehelp.
-
----
- build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
-
-diff --git a/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
-new file mode 100644
-index 00000000..e834aed
---- /dev/null
-+++ b/build/pkgs/sphinxcontrib_applehelp/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([sphinxcontrib_applehelp], [
-+  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_applehelp])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From 333a66546c5d421735c49dbafd7370a827f22781 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:27:46 -0500
-Subject: Trac #29665: add Gentoo package information for
- sphinxcontrib_htmlhelp.
-
----
- build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
-
-diff --git a/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt b/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
-new file mode 100644
-index 00000000..e080bac
---- /dev/null
-+++ b/build/pkgs/sphinxcontrib_htmlhelp/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/sphinxcontrib-htmlhelp
--- 
-cgit v1.0-1-gd88e
-
-
-From bfaeb3962254439b63f1f2e0e883de462c7831be Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:29:18 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for
- sphinxcontrib_htmlhelp.
-
----
- build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
-
-diff --git a/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4 b/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
-new file mode 100644
-index 00000000..c77b003
---- /dev/null
-+++ b/build/pkgs/sphinxcontrib_htmlhelp/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([sphinxcontrib_htmlhelp], [
-+  SAGE_PYTHON_PACKAGE_CHECK([sphinxcontrib_htmlhelp])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From 782cde13da06e8b85806cb7cbc8aceee0364e639 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:30:23 -0500
-Subject: Trac #29665: add Gentoo package information for jupyterlab_pygments.
-
----
- build/pkgs/jupyterlab_pygments/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/jupyterlab_pygments/distros/gentoo.txt
-
-diff --git a/build/pkgs/jupyterlab_pygments/distros/gentoo.txt b/build/pkgs/jupyterlab_pygments/distros/gentoo.txt
-new file mode 100644
-index 00000000..c57b4f1
---- /dev/null
-+++ b/build/pkgs/jupyterlab_pygments/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/jupyterlab_pygments
--- 
-cgit v1.0-1-gd88e
-
-
-From 39f974cfa4a8c6e5dd897f152f83ec82f40ee9f7 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Wed, 10 Nov 2021 20:31:13 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for
- jupyterlab_pygments.
-
----
- build/pkgs/jupyterlab_pygments/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/jupyterlab_pygments/spkg-configure.m4
-
-diff --git a/build/pkgs/jupyterlab_pygments/spkg-configure.m4 b/build/pkgs/jupyterlab_pygments/spkg-configure.m4
-new file mode 100644
-index 00000000..e46e21f
---- /dev/null
-+++ b/build/pkgs/jupyterlab_pygments/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([jupyterlab_pygments], [
-+  SAGE_PYTHON_PACKAGE_CHECK([jupyterlab_pygments])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From db704620700fd36cec3bf6125938f3ee00a9eb5e Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 30 Dec 2021 20:29:15 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for ply.
-
----
- build/pkgs/ply/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/ply/spkg-configure.m4
-
-diff --git a/build/pkgs/ply/spkg-configure.m4 b/build/pkgs/ply/spkg-configure.m4
-new file mode 100644
-index 00000000..ffb0030
---- /dev/null
-+++ b/build/pkgs/ply/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([ply], [SAGE_PYTHON_PACKAGE_CHECK([ply])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 6aac31dabcdfdef228d7780398a3fda1a4cc566f Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 30 Dec 2021 20:29:51 -0500
-Subject: Trac #29665: add Gentoo package information for ply.
-
----
- build/pkgs/ply/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/ply/distros/gentoo.txt
-
-diff --git a/build/pkgs/ply/distros/gentoo.txt b/build/pkgs/ply/distros/gentoo.txt
-new file mode 100644
-index 00000000..c8b1630
---- /dev/null
-+++ b/build/pkgs/ply/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/ply
--- 
-cgit v1.0-1-gd88e
-
-
-From bb8d3372936ec37470d69687a0f91592129460ae Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 30 Dec 2021 20:30:33 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for gast.
-
----
- build/pkgs/gast/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/gast/spkg-configure.m4
-
-diff --git a/build/pkgs/gast/spkg-configure.m4 b/build/pkgs/gast/spkg-configure.m4
-new file mode 100644
-index 00000000..26ec59f
---- /dev/null
-+++ b/build/pkgs/gast/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([gast], [SAGE_PYTHON_PACKAGE_CHECK([gast])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 1cdc4046a88f1c2b4e5c162f66c6db6090b24194 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 30 Dec 2021 20:31:15 -0500
-Subject: Trac #29665: add Gentoo package information for gast.
-
----
- build/pkgs/gast/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/gast/distros/gentoo.txt
-
-diff --git a/build/pkgs/gast/distros/gentoo.txt b/build/pkgs/gast/distros/gentoo.txt
-new file mode 100644
-index 00000000..3be5e7e
---- /dev/null
-+++ b/build/pkgs/gast/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/gast
--- 
-cgit v1.0-1-gd88e
-
-
-From 96068b8a3742b65d619190e1d9fa5db399e6b4f2 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 30 Dec 2021 20:32:20 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for pythran.
-
----
- build/pkgs/pythran/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pythran/spkg-configure.m4
-
-diff --git a/build/pkgs/pythran/spkg-configure.m4 b/build/pkgs/pythran/spkg-configure.m4
-new file mode 100644
-index 00000000..592e95b
---- /dev/null
-+++ b/build/pkgs/pythran/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([pythran], [SAGE_PYTHON_PACKAGE_CHECK([pythran])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 1fa0fad3ae8f7e559c6fc315c6773a7d8aac0bfb Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 30 Dec 2021 20:32:55 -0500
-Subject: Trac #29665: add Gentoo package information for pythran.
-
----
- build/pkgs/pythran/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/pythran/distros/gentoo.txt
-
-diff --git a/build/pkgs/pythran/distros/gentoo.txt b/build/pkgs/pythran/distros/gentoo.txt
-new file mode 100644
-index 00000000..1bb7cdc
---- /dev/null
-+++ b/build/pkgs/pythran/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/pythran
--- 
-cgit v1.0-1-gd88e
-
-
-From d26370e5b8c88e76abfb7c27e3defb71c9e9f711 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 30 Dec 2021 20:33:50 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for beniget.
-
----
- build/pkgs/beniget/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/beniget/spkg-configure.m4
-
-diff --git a/build/pkgs/beniget/spkg-configure.m4 b/build/pkgs/beniget/spkg-configure.m4
-new file mode 100644
-index 00000000..8ae6101
---- /dev/null
-+++ b/build/pkgs/beniget/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([beniget], [SAGE_PYTHON_PACKAGE_CHECK([beniget])])
--- 
-cgit v1.0-1-gd88e
-
-
-From eeeb296ed9b9694a865534103fd58e62a151ef5e Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 30 Dec 2021 20:34:22 -0500
-Subject: Trac #29665: add Gentoo package information for beniget.
-
----
- build/pkgs/beniget/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/beniget/distros/gentoo.txt
-
-diff --git a/build/pkgs/beniget/distros/gentoo.txt b/build/pkgs/beniget/distros/gentoo.txt
-new file mode 100644
-index 00000000..1a5972c
---- /dev/null
-+++ b/build/pkgs/beniget/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/beniget
--- 
-cgit v1.0-1-gd88e
-
-
-From 078b2ff272d0eeff5cce40ad7eb176d9ddd7bdff Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 30 Dec 2021 20:35:37 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for alabaster.
-
----
- build/pkgs/alabaster/spkg-configure.m4 | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/alabaster/spkg-configure.m4
-
-diff --git a/build/pkgs/alabaster/spkg-configure.m4 b/build/pkgs/alabaster/spkg-configure.m4
-new file mode 100644
-index 00000000..4eca6e0
---- /dev/null
-+++ b/build/pkgs/alabaster/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([alabaster], [SAGE_PYTHON_PACKAGE_CHECK([alabaster])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 7dc264353e5f64110431ff28c1b8b7e89699e9bd Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 30 Dec 2021 20:36:06 -0500
-Subject: Trac #29665: add Gentoo package information for alabaster.
-
----
- build/pkgs/alabaster/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/alabaster/distros/gentoo.txt
-
-diff --git a/build/pkgs/alabaster/distros/gentoo.txt b/build/pkgs/alabaster/distros/gentoo.txt
-new file mode 100644
-index 00000000..cffece6
---- /dev/null
-+++ b/build/pkgs/alabaster/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/alabaster
--- 
-cgit v1.0-1-gd88e
-
-
-From 8011a5e675e7e61a77ce34a299ee961a9f44253f Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 30 Dec 2021 20:43:59 -0500
-Subject: Trac #29665: standard python spkg-configure.m4 for
- importlib_metadata.
-
----
- build/pkgs/importlib_metadata/spkg-configure.m4 | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 build/pkgs/importlib_metadata/spkg-configure.m4
-
-diff --git a/build/pkgs/importlib_metadata/spkg-configure.m4 b/build/pkgs/importlib_metadata/spkg-configure.m4
-new file mode 100644
-index 00000000..0554e52
---- /dev/null
-+++ b/build/pkgs/importlib_metadata/spkg-configure.m4
-@@ -0,0 +1,3 @@
-+SAGE_SPKG_CONFIGURE([importlib_metadata], [
-+  SAGE_PYTHON_PACKAGE_CHECK([importlib_metadata])
-+])
--- 
-cgit v1.0-1-gd88e
-
-
-From 928ca0019e3ec6c4541a16b28bcc6710df6d010b Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 30 Dec 2021 20:44:28 -0500
-Subject: Trac #29665: add Gentoo package information for importlib_metadata.
-
----
- build/pkgs/importlib_metadata/distros/gentoo.txt | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 build/pkgs/importlib_metadata/distros/gentoo.txt
-
-diff --git a/build/pkgs/importlib_metadata/distros/gentoo.txt b/build/pkgs/importlib_metadata/distros/gentoo.txt
-new file mode 100644
-index 00000000..4f92786
---- /dev/null
-+++ b/build/pkgs/importlib_metadata/distros/gentoo.txt
-@@ -0,0 +1 @@
-+dev-python/importlib_metadata
--- 
-cgit v1.0-1-gd88e
-
-
-From 135f184f7498a2046065e669723e68efe2d65cee Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Thu, 30 Dec 2021 21:16:58 -0500
-Subject: Trac #29665: fix sage.misc.package doctest with system alabaster.
-
-When alabaster from the system is used, these tests won't be able to
-find its SPKG installed. Add some ellipses, and switch one test to
-look for sage_conf instead.
----
- src/sage/misc/package.py | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/src/sage/misc/package.py b/src/sage/misc/package.py
-index 84f3d50..c7ad206 100644
---- a/src/sage/misc/package.py
-+++ b/src/sage/misc/package.py
-@@ -386,9 +386,9 @@ def installed_packages(exclude_pip=True):
-     EXAMPLES::
- 
-         sage: sorted(installed_packages().keys())  # optional - build
--        [...'gmpy2', ...'sage_conf', ...]
--        sage: installed_packages()['gmpy2']  # optional - build, random
--        '2.1.0b5'
-+        [...'sage_conf', ...]
-+        sage: installed_packages()['sage_conf']  # optional - build, random
-+        '9.5'
- 
-     .. SEEALSO::
- 
--- 
-cgit v1.0-1-gd88e
-
diff --git a/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch b/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
deleted file mode 100644
index 093e3d56eb33..000000000000
--- a/srcpkgs/sagemath/patches/zzz-more_site_packages_not_in_29665.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-More site packages not included in trac 29665
-
-diff --git a/build/pkgs/gmpy2/spkg-configure.m4 b/build/pkgs/gmpy2/spkg-configure.m4
-new file mode 100644
-index 0000000000..2d0390f7db
---- /dev/null
-+++ b/build/pkgs/gmpy2/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([gmpy2], [SAGE_PYTHON_PACKAGE_CHECK([gmpy2])])
-diff --git a/build/pkgs/sphinx/spkg-configure.m4 b/build/pkgs/sphinx/spkg-configure.m4
-new file mode 100644
-index 0000000000..e149fbb2cf
---- /dev/null
-+++ b/build/pkgs/sphinx/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([sphinx], [SAGE_PYTHON_PACKAGE_CHECK([sphinx])])
-diff --git a/build/pkgs/typing_extensions/spkg-configure.m4 b/build/pkgs/typing_extensions/spkg-configure.m4
-new file mode 100644
-index 0000000000..d475fd8257
---- /dev/null
-+++ b/build/pkgs/typing_extensions/spkg-configure.m4
-@@ -0,0 +1 @@
-+SAGE_SPKG_CONFIGURE([typing_extensions], [SAGE_PYTHON_PACKAGE_CHECK([typing_extensions])])
--- 
-diff --git a/build/pkgs/gmpy2/install-requires.txt b/build/pkgs/gmpy2/install-requires.txt
-index 51d24518ef..c25feff557 100644
---- a/build/pkgs/gmpy2/install-requires.txt
-+++ b/build/pkgs/gmpy2/install-requires.txt
-@@ -1,3 +1 @@
--# We would like to write gmpy2 >=2.1.0b5, but pipenv does not accept prereleases in version ranges
--# https://github.com/pypa/pipenv/issues/1760
--gmpy2 ==2.1.0rc1
-+gmpy2 >=2.1
-diff --git a/build/pkgs/ptyprocess/install-requires.txt b/build/pkgs/ptyprocess/install-requires.txt
-index de89260872..7c336f636c 100644
---- a/build/pkgs/ptyprocess/install-requires.txt
-+++ b/build/pkgs/ptyprocess/install-requires.txt
-@@ -1,3 +1,3 @@
--ptyprocess ==0.5.1
-+ptyprocess
- # https://trac.sagemath.org/ticket/31280#comment:42 and following
- # sagelib is not compatible with ptyprocess 0.5.2, 0.6, and 0.7
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index de9fe5177766..e182267cdb96 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -39,6 +39,21 @@ _spkg_skip="appnope fonttools importlib_resources pycygwin
 # Force use these sage packages from system
 _spkg_system="cppy cython cysignals cypari pplpy fpylll memory_allocator
  primecountpy
+ alabaster argcomplete argon2_cffi attrs babel backcall beniget bleach certifi
+ cffi charset_normalizer cvxopt cycler dateutil debugpy decorator defusedxml
+ docutils entrypoints flit_core gast gmpy2 html5lib idna imagesize
+ importlib_metadata importlib_resources ipykernel ipython ipython_genutils
+ ipywidgets jedi jinja2 jsonschema jupyter_client jupyter_core
+ jupyterlab_pygments kiwisolver markupsafe matplotlib matplotlib_inline mistune
+ mpmath nbclient nbconvert nbformat nest_asyncio networkx notebook numpy
+ packaging pandocfilters parso pexpect pickleshare pillow pip pkgconfig pluggy
+ ply prometheus_client prompt_toolkit ptyprocess py pybind11 pycparser pygments
+ pyparsing pyrsistent pythran pytz pyzmq requests scipy send2trash setuptools
+ setuptools_scm simplegeneric six snowballstemmer sphinx
+ sphinxcontrib_applehelp sphinxcontrib_devhelp sphinxcontrib_htmlhelp
+ sphinxcontrib_jsmath sphinxcontrib_qthelp sphinxcontrib_serializinghtml sympy
+ terminado testpath texttable tomli tornado traitlets typing_extensions tzlocal
+ urllib3 wcwidth webencodings wheel widgetsnbextension zipp
  linbox gap maxima"
 
 # Databases to be used from system

From b843796fa6a6952191b2977b2f632223e59e6ca9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Wed, 19 Jan 2022 19:13:37 -0300
Subject: [PATCH 06/12] sagemath: simplify ratpoints patch

---
 .../patches/zzz-dont_link_ratpoints.patch     |   8 +
 .../patches/zzz-remove_ratpoints.patch        | 887 ------------------
 srcpkgs/sagemath/template                     |   4 +-
 3 files changed, 11 insertions(+), 888 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/zzz-dont_link_ratpoints.patch
 delete mode 100644 srcpkgs/sagemath/patches/zzz-remove_ratpoints.patch

diff --git a/srcpkgs/sagemath/patches/zzz-dont_link_ratpoints.patch b/srcpkgs/sagemath/patches/zzz-dont_link_ratpoints.patch
new file mode 100644
index 000000000000..b3c5c734298a
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-dont_link_ratpoints.patch
@@ -0,0 +1,8 @@
+--- a/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx
++++ b/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx
+@@ -1,5 +1,3 @@
+-# distutils: libraries = ratpoints
+-
+ r"""
+ Descent on elliptic curves over `\QQ` with a 2-isogeny
+ """
diff --git a/srcpkgs/sagemath/patches/zzz-remove_ratpoints.patch b/srcpkgs/sagemath/patches/zzz-remove_ratpoints.patch
deleted file mode 100644
index 0842d9d7f6d5..000000000000
--- a/srcpkgs/sagemath/patches/zzz-remove_ratpoints.patch
+++ /dev/null
@@ -1,887 +0,0 @@
-From 3178a5e1e4f7174343fd913494ae255b3e05fb85 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
-Date: Mon, 17 Jan 2022 21:04:42 -0300
-Subject: [PATCH] ratpoints: remove deprecated package
-
----
- .github/workflows/ci-cygwin-minimal.yml       |   2 +-
- .github/workflows/ci-cygwin-standard.yml      |   2 +-
- COPYING.txt                                   |   1 -
- build/pkgs/ratpoints/SPKG.rst                 |  29 --
- build/pkgs/ratpoints/checksums.ini            |   4 -
- build/pkgs/ratpoints/dependencies             |   5 -
- build/pkgs/ratpoints/distros/arch.txt         |   1 -
- build/pkgs/ratpoints/distros/conda.txt        |   1 -
- build/pkgs/ratpoints/distros/debian.txt       |   1 -
- build/pkgs/ratpoints/distros/nix.txt          |   1 -
- build/pkgs/ratpoints/distros/repology.txt     |   1 -
- build/pkgs/ratpoints/package-version.txt      |   1 -
- build/pkgs/ratpoints/patches/Makefile.patch   |  37 ---
- .../patches/sturm_and_rp_private.patch        | 194 ------------
- build/pkgs/ratpoints/spkg-install.in          |  46 ---
- build/pkgs/ratpoints/type                     |   1 -
- build/pkgs/sagelib/dependencies               |   2 +-
- src/sage/libs/ratpoints.pxd                   |  74 -----
- src/sage/libs/ratpoints.pyx                   | 283 ------------------
- .../elliptic_curves/descent_two_isogeny.pyx   |   2 -
- src/sage_setup/library_order.py               |   2 +-
- 21 files changed, 4 insertions(+), 686 deletions(-)
- delete mode 100644 build/pkgs/ratpoints/SPKG.rst
- delete mode 100644 build/pkgs/ratpoints/checksums.ini
- delete mode 100644 build/pkgs/ratpoints/dependencies
- delete mode 100644 build/pkgs/ratpoints/distros/arch.txt
- delete mode 100644 build/pkgs/ratpoints/distros/conda.txt
- delete mode 100644 build/pkgs/ratpoints/distros/debian.txt
- delete mode 100644 build/pkgs/ratpoints/distros/nix.txt
- delete mode 100644 build/pkgs/ratpoints/distros/repology.txt
- delete mode 100644 build/pkgs/ratpoints/package-version.txt
- delete mode 100644 build/pkgs/ratpoints/patches/Makefile.patch
- delete mode 100644 build/pkgs/ratpoints/patches/sturm_and_rp_private.patch
- delete mode 100644 build/pkgs/ratpoints/spkg-install.in
- delete mode 100644 build/pkgs/ratpoints/type
- delete mode 100644 src/sage/libs/ratpoints.pxd
- delete mode 100644 src/sage/libs/ratpoints.pyx
-
-diff --git a/.github/workflows/ci-cygwin-minimal.yml b/.github/workflows/ci-cygwin-minimal.yml
-index 9e847e7474..9df1365657 100644
---- a/.github/workflows/ci-cygwin-minimal.yml
-+++ b/.github/workflows/ci-cygwin-minimal.yml
-@@ -217,7 +217,7 @@ jobs:
-     env:
-       STAGE: ii-b
-       PREVIOUS_STAGES: i-*
--      TARGETS: singular maxima gap pari gfan palp flintqs ratpoints arb ecm givaro
-+      TARGETS: singular maxima gap pari gfan palp flintqs arb ecm givaro
-       LOCAL_ARTIFACT_NAME: sage-local-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
-       LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
- 
-diff --git a/.github/workflows/ci-cygwin-standard.yml b/.github/workflows/ci-cygwin-standard.yml
-index cbbe0f46a8..8aee1c2c3c 100644
---- a/.github/workflows/ci-cygwin-standard.yml
-+++ b/.github/workflows/ci-cygwin-standard.yml
-@@ -217,7 +217,7 @@ jobs:
-     env:
-       STAGE: ii-b
-       PREVIOUS_STAGES: i-*
--      TARGETS: singular maxima gap pari gfan palp flintqs ratpoints arb ecm givaro
-+      TARGETS: singular maxima gap pari gfan palp flintqs arb ecm givaro
-       LOCAL_ARTIFACT_NAME: sage-local-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
-       LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
- 
-diff --git a/COPYING.txt b/COPYING.txt
-index 1176a856a0..a3e9cc6645 100644
---- a/COPYING.txt
-+++ b/COPYING.txt
-@@ -107,7 +107,6 @@ pynac                       GPLv2+
- pyparsing                   MIT License
- python                      Python License (see below)
- R                           GPLv2+
--ratpoints                   GPLv2+
- readline                    GPLv3+
- rpy                         GPLv2+
- rubiks/dietz                GPL, any version
-diff --git a/build/pkgs/ratpoints/SPKG.rst b/build/pkgs/ratpoints/SPKG.rst
-deleted file mode 100644
-index 6607094bec..0000000000
---- a/build/pkgs/ratpoints/SPKG.rst
-+++ /dev/null
-@@ -1,29 +0,0 @@
--ratpoints: Find rational points on hyperelliptic curves
--=======================================================
--
--Description
-------------
--
--Michael Stoll's program which searches for rational points on
--hyperelliptic curves.
--
--NOTE: the ratpoints package has been assimilated by PARI/GP. Therefore,
--this package (as Sage package) is deprecated. In the future, it will be
--removed from Sage.
--
--
--Upstream Contact
------------------
--
---  Author: Michael Stoll
---  Email: Michael.Stoll@uni-bayreuth.de
---  Website: http://www.mathe2.uni-bayreuth.de/stoll/programs/
--
--
--Note on SSE2 instructions
--~~~~~~~~~~~~~~~~~~~~~~~~~
--
---  On several architectures, the SSE2 instructions used by ratpoints
--   cause
--   compiler errors. In the case that ratpoints fails to build with SSE2
--   instructions enabled, the build is repeated with SSE2 disabled.
-diff --git a/build/pkgs/ratpoints/checksums.ini b/build/pkgs/ratpoints/checksums.ini
-deleted file mode 100644
-index 46ba1c9ec1..0000000000
---- a/build/pkgs/ratpoints/checksums.ini
-+++ /dev/null
-@@ -1,4 +0,0 @@
--tarball=ratpoints-VERSION.tar.bz2
--sha1=14fbc3dd50742794e0b33d2dd1217e5dd8ad2623
--md5=9bf091d1b90132433f0a1fc6b585d024
--cksum=670991933
-diff --git a/build/pkgs/ratpoints/dependencies b/build/pkgs/ratpoints/dependencies
-deleted file mode 100644
-index 9a77ea16f7..0000000000
---- a/build/pkgs/ratpoints/dependencies
-+++ /dev/null
-@@ -1,5 +0,0 @@
--$(MP_LIBRARY)
--
------------
--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/ratpoints/distros/arch.txt b/build/pkgs/ratpoints/distros/arch.txt
-deleted file mode 100644
-index e137758627..0000000000
---- a/build/pkgs/ratpoints/distros/arch.txt
-+++ /dev/null
-@@ -1 +0,0 @@
--ratpoints
-diff --git a/build/pkgs/ratpoints/distros/conda.txt b/build/pkgs/ratpoints/distros/conda.txt
-deleted file mode 100644
-index e137758627..0000000000
---- a/build/pkgs/ratpoints/distros/conda.txt
-+++ /dev/null
-@@ -1 +0,0 @@
--ratpoints
-diff --git a/build/pkgs/ratpoints/distros/debian.txt b/build/pkgs/ratpoints/distros/debian.txt
-deleted file mode 100644
-index dabd28d624..0000000000
---- a/build/pkgs/ratpoints/distros/debian.txt
-+++ /dev/null
-@@ -1 +0,0 @@
--libratpoints-dev
-diff --git a/build/pkgs/ratpoints/distros/nix.txt b/build/pkgs/ratpoints/distros/nix.txt
-deleted file mode 100644
-index e137758627..0000000000
---- a/build/pkgs/ratpoints/distros/nix.txt
-+++ /dev/null
-@@ -1 +0,0 @@
--ratpoints
-diff --git a/build/pkgs/ratpoints/distros/repology.txt b/build/pkgs/ratpoints/distros/repology.txt
-deleted file mode 100644
-index e137758627..0000000000
---- a/build/pkgs/ratpoints/distros/repology.txt
-+++ /dev/null
-@@ -1 +0,0 @@
--ratpoints
-diff --git a/build/pkgs/ratpoints/package-version.txt b/build/pkgs/ratpoints/package-version.txt
-deleted file mode 100644
-index efed46a7bd..0000000000
---- a/build/pkgs/ratpoints/package-version.txt
-+++ /dev/null
-@@ -1 +0,0 @@
--2.1.3.p5
-diff --git a/build/pkgs/ratpoints/patches/Makefile.patch b/build/pkgs/ratpoints/patches/Makefile.patch
-deleted file mode 100644
-index 093d7c0018..0000000000
---- a/build/pkgs/ratpoints/patches/Makefile.patch
-+++ /dev/null
-@@ -1,37 +0,0 @@
----- src/Makefile	2009-10-01 01:08:54.000000000 +0200
--+++ patches/Makefile	2012-03-17 13:57:33.026315142 +0100
--@@ -21,11 +21,11 @@
-- #
-- #    Michael Stoll, September 21, 2009
-- 
---CC = gcc
--+CC ?= gcc
-- RM = rm -f
-- INSTALL = cp
-- 
---INSTALL_DIR = /usr/local
--+INSTALL_DIR ?= /usr/local
-- 
-- DISTFILES = Makefile ratpoints.h rp-private.h primes.h \
--             gen_find_points_h.c gen_init_sieve_h.c \
--@@ -47,14 +47,14 @@
-- 	diff -q testbase rptest.out
-- 
-- install-bin: ratpoints
---	${INSTALL} ratpoints ${INSTALL_DIR}/bin/
---	chmod 755 ${INSTALL_DIR}/bin/ratpoints
--+	${INSTALL} ratpoints "${INSTALL_DIR}/bin/"
--+	chmod 755 "${INSTALL_DIR}/bin/ratpoints"
-- 
-- install-lib: ratpoints.h libratpoints.a
---	${INSTALL} ratpoints.h ${INSTALL_DIR}/include/
---	chmod 644 ${INSTALL_DIR}/include/ratpoints.h
---	${INSTALL} libratpoints.a ${INSTALL_DIR}/lib/
---	chmod 644 ${INSTALL_DIR}/lib/libratpoints.a
--+	${INSTALL} ratpoints.h "${INSTALL_DIR}/include/"
--+	chmod 644 "${INSTALL_DIR}/include/ratpoints.h"
--+	${INSTALL} libratpoints.a "${INSTALL_DIR}/lib/"
--+	chmod 644 "${INSTALL_DIR}/lib/libratpoints.a"
-- 
-- install: install-bin install-lib
-- 
-diff --git a/build/pkgs/ratpoints/patches/sturm_and_rp_private.patch b/build/pkgs/ratpoints/patches/sturm_and_rp_private.patch
-deleted file mode 100644
-index 664198c4de..0000000000
---- a/build/pkgs/ratpoints/patches/sturm_and_rp_private.patch
-+++ /dev/null
-@@ -1,194 +0,0 @@
--diff --git a/rp-private.h b/rp-private.h
--index b4c7dad..0c7193e 100644
----- a/rp-private.h
--+++ b/rp-private.h
--@@ -36,7 +36,7 @@
-- #define LONG_SHIFT ((LONG_LENGTH == 16) ? 4 : \
--                     (LONG_LENGTH == 32) ? 5 : \
-- 		    (LONG_LENGTH == 64) ? 6 : 0)
---#define LONG_MASK (~(-1L<<LONG_SHIFT))
--+#define LONG_MASK (~(-(1L<<LONG_SHIFT)))
-- 
-- /* Check if SSE instructions can be used.
--    We assume that one SSE word of 128 bit is two long's,
--diff --git a/sturm.c b/sturm.c
--index c78d7c6..5fd2cf5 100644
----- a/sturm.c
--+++ b/sturm.c
--@@ -27,7 +27,6 @@
--  ***********************************************************************/
-- 
-- #include "ratpoints.h"
---
-- /**************************************************************************
--  * Arguments of _ratpoints_compute_sturm() : (from the args argument)     *
--  *                                                                        *
--@@ -53,7 +52,7 @@
-- /* A helper function: evaluate the polynomial in cofs[] of given degree
--   at num/2^denexp and return the sign. */
-- 
---static long eval_sign(ratpoints_args *args, mpz_t *cofs, long degree,
--+static long eval_sign(const ratpoints_args *args, const mpz_t *cofs, long degree,
--                       long num, long denexp)
-- {
--   long n, e, s;
--@@ -70,11 +69,80 @@ static long eval_sign(ratpoints_args *args, mpz_t *cofs, long degree,
--   return(s);
-- }
-- 
--+static const    long max = (long)(((unsigned long)(-1))>>1);
--+static const    long min = (long)(-(((unsigned long)(-1))>>1));
--+    /* recursive helper function */
--+static void iterate(long nl, long nr, long del, long der, long cleft, long cright,
--+                 long sl, long sr, long depth,
--+		 ratpoints_interval **iptr, const ratpoints_interval *ivlo,
--+		 const ratpoints_args *args, const long k, const long sturm_degs[],
--+                 const mpz_t sturm[][args->degree + 1])
--+    { /* nl/2^del, nr/2^der : interval left/right endpoints,
--+         cleft, cright: sign change counts at endpoints,
--+         sl, sr: signs at endpoints,
--+         depth: iteration depth */
--+     long iter = args->sturm;
--+      if(cleft == cright && sl < 0) { return; }
--+         /* here we know the polynomial is negative on the interval */
--+      if((cleft == cright && sl > 0) || depth >= iter)
--+      /* we have to add/extend an interval if we either know that
--+         the polynomial is positive on the interval (first condition)
--+         or the maximal iteration depth has been reached (second condition) */
--+      { double l = ((double)nl)/((double)(1<<del));
--+        double u = ((double)nr)/((double)(1<<der));
--+        if(*iptr == ivlo)
--+        { (*iptr)->low = l; (*iptr)->up  = u; (*iptr)++; }
--+        else
--+        { if(((*iptr)-1)->up == l) /* extend interval */
--+          { ((*iptr)-1)->up = u; }
--+          else /* new interval */
--+          { (*iptr)->low = l; (*iptr)->up  = u; (*iptr)++; }
--+        }
--+        return;
--+      }
--+      /* now we must split the interval and evaluate the sturm sequence
--+         at the midpoint */
--+      { long nm, dem, s0, s1, s2, s, cmid = 0, n;
--+        if(nl == min)
--+        { if(nr == max) { nm = 0; dem = 0; }
--+          else { nm = (nr == 0) ? -1 : 2*nr; dem = 0; }
--+        }
--+        else
--+        { if(nr == max) { nm = (nl == 0) ? 1 : 2*nl; dem = 0; }
--+          else /* "normal" case */
--+          { if(del == der) /* then both are zero */
--+            { if(((nl+nr) & 1) == 0) { nm = (nl+nr)>>1; dem = 0; }
--+              else { nm = nl+nr; dem = 1; }
--+            }
--+            else /* here one de* is greater */
--+            { if(del > der) { nm = nl + (nr<<(del-der)); dem = del+1; }
--+              else { nm = (nl<<(der-del)) + nr; dem = der+1; }
--+            }
--+          }
--+        }
--+        s0 = eval_sign(args, sturm[0], sturm_degs[0], nm, dem);
--+        s1 = eval_sign(args, sturm[1], sturm_degs[1], nm, dem);
--+        if(s0*s1 == -1) { cmid++; }
--+        s = (s1 == 0) ? s0 : s1;
--+        for(n = 2; n <= k; n++)
--+        { s2 = eval_sign(args, sturm[n], sturm_degs[n], nm, dem);
--+          if(s2 == -s) { cmid++; s = s2; }
--+          else if(s2 != 0) { s = s2; }
--+        }
--+        /* now recurse */
--+        iterate(nl, nm, del, dem, cleft, (s0==0) ? (cmid+1) : cmid,
--+                sl, (s0==0) ? -s1 : s0, depth+1,
--+                iptr, ivlo, args, k, sturm_degs, sturm);
--+        iterate(nm, nr, dem, der, cmid, cright,
--+                (s0==0) ? s1 : s0, sr, depth+1,
--+		iptr, ivlo, args, k, sturm_degs, sturm);
--+      }
--+    } /* end iterate() */
--+
-- long _ratpoints_compute_sturm(ratpoints_args *args)
-- { 
--   mpz_t *cofs = args->cof;
--   long degree = args->degree;
---  long iter = args->sturm; 
--   ratpoints_interval *ivlist = args->domain;
--   long num_iv = args->num_inter;
--   long n, m, k, new_num;
--@@ -165,75 +233,12 @@ long _ratpoints_compute_sturm(ratpoints_args *args)
--   /* recall: typedef struct {double low; double up;} ratpoints_interval; */
--   { ratpoints_interval ivlocal[1 + (degree>>1)];
--     ratpoints_interval *iptr = &ivlocal[0];
---    long max = (long)(((unsigned long)(-1))>>1);
---    long min = -max;
--     long num_intervals;
--     long slcf = mpz_cmp_si(cofs[degree], 0);
-- 
---    /* recursive helper function */
---    void iterate(long nl, long nr, long del, long der, long cleft, long cright,
---                 long sl, long sr, long depth)
---    { /* nl/2^del, nr/2^der : interval left/right endpoints,
---         cleft, cright: sign change counts at endpoints,
---         sl, sr: signs at endpoints,
---         depth: iteration depth */
---      if(cleft == cright && sl < 0) { return; }
---         /* here we know the polynomial is negative on the interval */
---      if((cleft == cright && sl > 0) || depth >= iter) 
---      /* we have to add/extend an interval if we either know that
---         the polynomial is positive on the interval (first condition)
---         or the maximal iteration depth has been reached (second condition) */
---      { double l = ((double)nl)/((double)(1<<del));
---        double u = ((double)nr)/((double)(1<<der));
---        if(iptr == &ivlocal[0])
---        { iptr->low = l; iptr->up  = u; iptr++; }
---        else
---        { if((iptr-1)->up == l) /* extend interval */
---          { (iptr-1)->up = u; }
---          else /* new interval */
---          { iptr->low = l; iptr->up  = u; iptr++; }
---        }
---        return; 
---      }
---      /* now we must split the interval and evaluate the sturm sequence
---         at the midpoint */
---      { long nm, dem, s0, s1, s2, s, cmid = 0, n;
---        if(nl == min)
---        { if(nr == max) { nm = 0; dem = 0; }
---          else { nm = (nr == 0) ? -1 : 2*nr; dem = 0; }
---        }
---        else
---        { if(nr == max) { nm = (nl == 0) ? 1 : 2*nl; dem = 0; } 
---          else /* "normal" case */
---          { if(del == der) /* then both are zero */
---            { if(((nl+nr) & 1) == 0) { nm = (nl+nr)>>1; dem = 0; }
---              else { nm = nl+nr; dem = 1; } 
---            }
---            else /* here one de* is greater */
---            { if(del > der) { nm = nl + (nr<<(del-der)); dem = del+1; }
---              else { nm = (nl<<(der-del)) + nr; dem = der+1; }
---            }
---          }
---        }
---        s0 = eval_sign(args, sturm[0], sturm_degs[0], nm, dem);
---        s1 = eval_sign(args, sturm[1], sturm_degs[1], nm, dem);
---        if(s0*s1 == -1) { cmid++; }
---        s = (s1 == 0) ? s0 : s1;
---        for(n = 2; n <= k; n++)
---        { s2 = eval_sign(args, sturm[n], sturm_degs[n], nm, dem);
---          if(s2 == -s) { cmid++; s = s2; }
---          else if(s2 != 0) { s = s2; }
---        }
---        /* now recurse */
---        iterate(nl, nm, del, dem, cleft, (s0==0) ? (cmid+1) : cmid, 
---                sl, (s0==0) ? -s1 : s0, depth+1);
---        iterate(nm, nr, dem, der, cmid, cright, 
---                (s0==0) ? s1 : s0, sr, depth+1);
---      }
---    } /* end iterate() */
---
--     iterate(min, max, 0, 0, count2, count1, 
---            (degree & 1) ? -slcf : slcf, slcf, 0);
--+            (degree & 1) ? -slcf : slcf, slcf, 0,
--+	    &iptr, &ivlocal[0], args, k, sturm_degs, sturm);
--     num_intervals = iptr - &ivlocal[0];
--     /* intersect with given intervals */
--     { ratpoints_interval local_copy[num_iv];
-diff --git a/build/pkgs/ratpoints/spkg-install.in b/build/pkgs/ratpoints/spkg-install.in
-deleted file mode 100644
-index b6856c4d4a..0000000000
---- a/build/pkgs/ratpoints/spkg-install.in
-+++ /dev/null
-@@ -1,46 +0,0 @@
--PRIME_SIZE=7
--
--CCFLAGS_NO_SSE="-I$SAGE_LOCAL/include -Wall -O2 -fPIC -DRATPOINTS_MAX_BITS_IN_PRIME=$PRIME_SIZE"
--CCFLAGS2="-L$SAGE_LOCAL/lib -lgmp -lm $LDFLAGS"
--CCFLAGS3="-L. -lratpoints"
--
--if [[ "$UNAME" = "Darwin" ]]; then
--    CCFLAGS1="$CCFLAGS_NO_SSE"
--    echo "Building without SSE2 instructions (MacOS X)."
--else
--    CCFLAGS1="$CCFLAGS_NO_SSE -DUSE_SSE"
--    echo "Attempting to build ratpoints making use of SSE2 instructions."
--fi
--
--# Copy CFLAGS set externally to CCFLAGS.
--CCFLAGS="$CFLAGS"
--
--export CCFLAGS1
--export CCFLAGS2
--export CCFLAGS3
--export CCFLAGS
--
--cd src/
--
--#############################
--# Build (just) the library: #
--#############################
--
--# PLEASE, don't break this again by deleting "libratpoints.a".  See trac 8267.
--if ! $MAKE libratpoints.a; then
--    [ "$UNAME" = "Darwin" ] && sdh_die "Error building ratpoints."
--    echo "Build failed. Trying without SSE2 instructions."
--    CCFLAGS1="$CCFLAGS_NO_SSE"
--    sdh_make libratpoints.a
--fi
--
--##############################################
--# Install (just) the library and its header: #
--##############################################
--
--# The following requires that the Makefile got patched;
--# otherwise one could pass 'INSTALL_DIR=...' on the 'make'
--# command line:
--export INSTALL_DIR="$SAGE_DESTDIR_LOCAL"
--mkdir -p "$INSTALL_DIR"/{lib,include}
--sdh_make install-lib
-diff --git a/build/pkgs/ratpoints/type b/build/pkgs/ratpoints/type
-deleted file mode 100644
-index a6a7b9cd72..0000000000
---- a/build/pkgs/ratpoints/type
-+++ /dev/null
-@@ -1 +0,0 @@
--standard
-diff --git a/build/pkgs/sagelib/dependencies b/build/pkgs/sagelib/dependencies
-index 9c7797b1f4..6a7d4b8132 100644
---- a/build/pkgs/sagelib/dependencies
-+++ b/build/pkgs/sagelib/dependencies
-@@ -1,4 +1,4 @@
--FORCE $(SCRIPTS) arb boost_cropped $(BLAS) brial cliquer cypari cysignals cython ecl eclib ecm flint libgd gap giac givaro glpk gmpy2 gsl iml jinja2 jupyter_core lcalc lrcalc libbraiding libhomfly libpng linbox m4ri m4rie memory_allocator mpc mpfi mpfr $(MP_LIBRARY) ntl numpy pari pip pkgconfig planarity ppl pplpy primesieve primecount primecountpy pycygwin $(PYTHON) ratpoints requests rw sage_conf singular symmetrica zn_poly $(PCFILES) | $(PYTHON_TOOLCHAIN) sage_setup
-+FORCE $(SCRIPTS) arb boost_cropped $(BLAS) brial cliquer cypari cysignals cython ecl eclib ecm flint libgd gap giac givaro glpk gmpy2 gsl iml jinja2 jupyter_core lcalc lrcalc libbraiding libhomfly libpng linbox m4ri m4rie memory_allocator mpc mpfi mpfr $(MP_LIBRARY) ntl numpy pari pip pkgconfig planarity ppl pplpy primesieve primecount primecountpy pycygwin $(PYTHON) requests rw sage_conf singular symmetrica zn_poly $(PCFILES) | $(PYTHON_TOOLCHAIN) sage_setup
- 
- ----------
- All lines of this file are ignored except the first.
-diff --git a/src/sage/libs/ratpoints.pxd b/src/sage/libs/ratpoints.pxd
-deleted file mode 100644
-index 67e309b109..0000000000
---- a/src/sage/libs/ratpoints.pxd
-+++ /dev/null
-@@ -1,74 +0,0 @@
--from sage.rings.integer cimport Integer
--from sage.libs.gmp.mpz cimport *
--
--cdef extern from "ratpoints.h":
--    long RATPOINTS_MAX_DEGREE
--    long RATPOINTS_ARRAY_SIZE
--    long RATPOINTS_DEFAULT_SP1
--    long RATPOINTS_DEFAULT_SP2
--    long RATPOINTS_DEFAULT_NUM_PRIMES
--    long RATPOINTS_DEFAULT_MAX_FORBIDDEN
--    long RATPOINTS_DEFAULT_STURM
--    long RATPOINTS_NON_SQUAREFREE
--    long RATPOINTS_BAD_ARGS
--
--    # for args flags:
--    long RATPOINTS_NO_CHECK # when set, do not check whether the surviving
--                            # x-coordinates give rise to rational points
--    long RATPOINTS_NO_Y # when set, only list x coordinates instead of actual points
--    long RATPOINTS_NO_REVERSE # when set, do not modify the mpz_t array
--    long RATPOINTS_NO_JACOBI # when set, prevent use of Jacobi symbol test
--    long RATPOINTS_VERBOSE # when set, print some output on what ratpoints is doing
--    # define RATPOINTS_FLAGS_INPUT_MASK \
--    # (RATPOINTS_NO_CHECK | RATPOINTS_NO_Y | RATPOINTS_NO_REVERSE | \
--    #  RATPOINTS_NO_JACOBI | RATPOINTS_VERBOSE)
--
--
--    ctypedef struct ratpoints_interval:
--        double low
--        double up
--    ctypedef struct ratpoints_args:
--        mpz_t *cof
--        long degree
--        long height
--        ratpoints_interval *domain
--        long num_inter
--        long b_low
--        long b_high
--        long sp1
--        long sp2
--        long array_size
--        long sturm
--        long num_primes
--        long max_forbidden
--        unsigned int flags
--        # from here: private data
--        # mpz_t *work
--        # void *se_buffer
--        # void *se_next
--        # void *ba_buffer
--        # void *ba_next
--        # int *int_buffer
--        # int *int_next
--        # void *sieve_list
--    long find_points(ratpoints_args*, int proc(long, long, mpz_t, void*, int*), void*)
--    void find_points_init(ratpoints_args*)
--    long find_points_work(ratpoints_args*, int proc(long, long, mpz_t, void*, int*), void*)
--    void find_points_clear(ratpoints_args*)
--
--ctypedef struct point_list:
--    long *xes
--    mpz_t *ys
--    long *zs
--    long array_size
--    long num_points
--    long max_num_points
--
--ctypedef struct info_struct_exists_only:
--    int verbose
--
--cdef int ratpoints_mpz_exists_only(mpz_t *, long, int, bint) except -1
--
--
--
--
-diff --git a/src/sage/libs/ratpoints.pyx b/src/sage/libs/ratpoints.pyx
-deleted file mode 100644
-index 257dfe3eeb..0000000000
---- a/src/sage/libs/ratpoints.pyx
-+++ /dev/null
-@@ -1,283 +0,0 @@
--# distutils: libraries = ratpoints
--r"""
--Hyperelliptic Curve Point Finding, via ratpoints (deprecated)
--
--This module is deprecated, use PARI instead::
--
--    sage: pari(EllipticCurve("389a1")).ellratpoints(4)
--    [[-2, 0], [-2, -1], [-1, 1], [-1, -2], [0, 0], [0, -1], [1, 0], [1, -1], [3, 5], [3, -6], [4, 8], [4, -9], [-3/4, 7/8], [-3/4, -15/8]]
--    sage: pari("[x^3 + x^2 - 2*x, 1]").hyperellratpoints(4)
--    [[-2, 0], [-2, -1], [-1, 1], [-1, -2], [0, 0], [0, -1], [1, 0], [1, -1], [3, 5], [3, -6], [4, 8], [4, -9], [-3/4, 7/8], [-3/4, -15/8]]
--"""
--
--from cysignals.memory cimport sig_malloc, sig_realloc, sig_free
--from cysignals.signals cimport sig_on, sig_off
--
--from sage.misc.superseded import deprecation_cython as deprecation
--deprecation(24531, "the module sage.libs.ratpoints is deprecated; use pari.ellratpoints or pari.hyperellratpoints instead")
--
--
--cdef int process(long x, long z, mpz_t y, void *info0, int *quit):
--    # ratpoints calls this function when it finds a point [x : y : z]
--    # info0 is the pointer passed to ratpoints originally
--    # if quit[0] is set to a nonzero value, ratpoints will abort immediately
--    cdef point_list *plist = <point_list *> info0
--    cdef long i
--    if plist.array_size == plist.num_points:
--        i = plist.array_size
--        plist.array_size *= 2
--        plist.xes = <long *> sig_realloc(plist.xes, plist.array_size * sizeof(long))
--        plist.ys = <mpz_t *> sig_realloc(plist.ys, plist.array_size * sizeof(mpz_t))
--        plist.zs = <long *> sig_realloc(plist.zs, plist.array_size * sizeof(long))
--        while i < plist.array_size:
--            mpz_init(plist.ys[i])
--            i += 1
--    plist.xes[plist.num_points] = x
--    mpz_set(plist.ys[plist.num_points], y)
--    plist.zs[plist.num_points] = z
--    plist.num_points += 1
--    if plist.max_num_points > 0:
--        if plist.max_num_points == plist.num_points:
--            quit[0] = -1
--    return 1 # weight for counting the points
--
--def ratpoints(list coeffs, long H, verbose=False, long max=0,
--              min_x_denom=None, max_x_denom=None, intervals=[]):
--    """
--    Access the ratpoints library to find points on the hyperelliptic curve:
--
--    `y^2 = a_n x^n + \cdots + a_1 x + a_0.`
--
--    INPUT:
--
--    - ``coeffs`` -- list of integer coefficients `a_0` , `a_1`, ..., `a_n`
--
--    - ``H`` -- the bound for the denominator and the absolute value of the
--      numerator of the `x`-coordinate
--
--    - ``verbose`` -- if ``True``, ratpoints will print comments about
--      its progress
--
--    - ``max`` -- maximum number of points to find (if 0, find all of them)
--
--    OUTPUT:
--
--    The points output by this program are points in (1, ceil(n/2), 1)-weighted
--    projective space. If n is even, then the associated homogeneous equation is
--    `y^2 = a_n x^n + \cdots + a_1 x z^{n-1} + a_0 z^n` while if n is odd, it is
--    `y^2 = a_n x^n z + \cdots + a_1 x z^n + a_0 z^{n+1}`.
--
--    EXAMPLES::
--
--        sage: from sage.libs.ratpoints import ratpoints
--        doctest:...: DeprecationWarning: the module sage.libs.ratpoints is deprecated; use pari.ellratpoints or pari.hyperellratpoints instead
--        See http://trac.sagemath.org/24531 for details.
--        sage: for x,y,z in ratpoints([1..6], 200):
--        ....:     print(-1*y^2 + 1*z^6 + 2*x*z^5 + 3*x^2*z^4 + 4*x^3*z^3 + 5*x^4*z^2 + 6*x^5*z)
--        0
--        0
--        0
--        0
--        0
--        0
--        0
--        sage: for x,y,z in ratpoints([1..5], 200):
--        ....:    print(-1*y^2 + 1*z^4 + 2*x*z^3 + 3*x^2*z^2 + 4*x^3*z + 5*x^4)
--        0
--        0
--        0
--        0
--        0
--        0
--        0
--        0
--
--        sage: for x,y,z in ratpoints([1..200], 1000):
--        ....:    print("{} {} {}".format(x,y,z))
--        1 0 0
--        0 1 1
--        0 -1 1
--        201 25353012004564588029934064107520000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 200
--        201 -25353012004564588029934064107520000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 200
--
--    The denominator of `x` can be restricted, for example to find
--    integral points::
--
--        sage: from sage.libs.ratpoints import ratpoints
--        sage: coeffs = [400, -112, 0, 1]
--        sage: ratpoints(coeffs, 10^6, max_x_denom=1, intervals=[[-10,0],[1000,2000]])
--        [(1, 0, 0), (-8, 28, 1), (-8, -28, 1), (-7, 29, 1), (-7, -29, 1),
--         (-4, 28, 1), (-4, -28, 1), (0, 20, 1), (0, -20, 1), (1368, 50596, 1),
--         (1368, -50596, 1), (1624, 65444, 1), (1624, -65444, 1)]
--
--        sage: ratpoints(coeffs, 1000, min_x_denom=100, max_x_denom=200)
--        [(1, 0, 0),
--        (-656, 426316, 121),
--        (-656, -426316, 121),
--        (452, 85052, 121),
--        (452, -85052, 121),
--        (988, 80036, 121),
--        (988, -80036, 121),
--        (-556, 773188, 169),
--        (-556, -773188, 169),
--        (264, 432068, 169),
--        (264, -432068, 169)]
--
--    Finding the integral points on the compact component of an elliptic curve::
--
--        sage: E = EllipticCurve([0,1,0,-35220,-1346400])
--        sage: e1, e2, e3 = E.division_polynomial(2).roots(multiplicities=False)
--        sage: coeffs = [E.a6(),E.a4(),E.a2(),1]
--        sage: ratpoints(coeffs, 1000, max_x_denom=1, intervals=[[e3,e2]])
--        [(1, 0, 0),
--        (-165, 0, 1),
--        (-162, 366, 1),
--        (-162, -366, 1),
--        (-120, 1080, 1),
--        (-120, -1080, 1),
--        (-90, 1050, 1),
--        (-90, -1050, 1),
--        (-85, 1020, 1),
--        (-85, -1020, 1),
--        (-42, 246, 1),
--        (-42, -246, 1),
--        (-40, 0, 1)]
--    """
--    cdef ratpoints_args args
--    cdef long i, total, verby
--    cdef Integer sage_int, s_x, s_y, s_z
--    cdef point_list *plist
--
--
--    verby = ~0 if verbose else 0
--
--    # Set the coefficient array:
--    coeffs = [Integer(a) for a in coeffs]
--    args.degree = len(coeffs)-1
--    args.cof = <mpz_t *> sig_malloc((args.degree+1) * sizeof(mpz_t))
--
--    # Create an array to hold the points found:
--    plist = <point_list *> sig_malloc(sizeof(point_list))
--    if max == 0:
--        plist.array_size = 64
--    else:
--        plist.array_size = max
--    plist.xes = <long *> sig_malloc(plist.array_size * sizeof(long))
--    plist.ys = <mpz_t *> sig_malloc(plist.array_size * sizeof(mpz_t))
--    for i from 0 <= i < plist.array_size:
--        mpz_init(plist.ys[i])
--    plist.zs = <long *> sig_malloc(plist.array_size * sizeof(long))
--    plist.num_points = 0
--    plist.max_num_points = max
--
--    # Set the height bound:
--    args.height = H
--
--    # Set the intervals to be searched, including any specified:
--    args.num_inter = len(intervals)
--    args.domain = <ratpoints_interval *> sig_malloc((args.num_inter + args.degree) * sizeof(ratpoints_interval))
--    for i,I in enumerate(intervals):
--        args.domain[i].low = I[0]
--        args.domain[i].up  = I[1]
--
--    # Set the minimum and maximum denominators:
--    if not min_x_denom:  min_x_denom = 1
--    if not max_x_denom:  max_x_denom = H
--    args.b_low = min_x_denom
--    args.b_high = max_x_denom
--
--    # Set the remaining arguments, whose non-default use is technical
--    # (see ratpoints documentation)
--    args.sp1 = RATPOINTS_DEFAULT_SP1
--    args.sp2 = RATPOINTS_DEFAULT_SP2
--    args.array_size = RATPOINTS_ARRAY_SIZE
--    args.sturm = RATPOINTS_DEFAULT_STURM
--    args.num_primes = RATPOINTS_DEFAULT_NUM_PRIMES
--    args.max_forbidden = RATPOINTS_DEFAULT_MAX_FORBIDDEN
--    args.flags = (RATPOINTS_VERBOSE & verby)
--
--    for i from 0 <= i <= args.degree:
--        mpz_init(args.cof[i])
--        sage_int = <Integer> coeffs[i]
--        mpz_set(args.cof[i], sage_int.value)
--
--    sig_on()
--    total = find_points(&args, process, <void *>plist)
--    sig_off()
--    if total == RATPOINTS_NON_SQUAREFREE:
--        raise RuntimeError('Polynomial must be square-free')
--    if total == RATPOINTS_BAD_ARGS:
--        raise RuntimeError('Bad arguments to ratpoints')
--
--    for i from 0 <= i <= args.degree:
--        mpz_clear(args.cof[i])
--
--    sig_free(args.cof)
--    sig_free(args.domain)
--
--    cdef list L = []
--    for i from 0 <= i < plist.num_points:
--        s_x = Integer(0)
--        s_y = Integer(0)
--        s_z = Integer(0)
--        mpz_set_si(s_x.value, plist.xes[i])
--        mpz_set(s_y.value, plist.ys[i])
--        mpz_set_si(s_z.value, plist.zs[i])
--        L.append((s_x,s_y,s_z))
--
--    for i from 0 <= i < plist.array_size:
--        mpz_clear(plist.ys[i])
--    sig_free(plist.xes)
--    sig_free(plist.ys)
--    sig_free(plist.zs)
--    sig_free(plist)
--
--    return L
--
--cdef int process_exists_only(long x, long z, mpz_t y, void *info0, int *quit):
--    cdef info_struct_exists_only *info_s = <info_struct_exists_only *>info0
--    cdef Integer YY
--    if info_s.verbose:
--        YY = Integer(0); mpz_set(YY.value, y)
--        print('Found point [ %d : %d : %d ], quitting' % (x, YY, z))
--    quit[0] = -1
--    return 1
--
--cdef int ratpoints_mpz_exists_only(mpz_t *coeffs, long H, int degree, bint verbose) except -1:
--    """
--    Direct call to ratpoints to search for existence only.
--
--    WARNING - The coefficient array will be modified by ratpoints.
--    """
--    cdef ratpoints_args args
--    cdef info_struct_exists_only info_s
--    cdef long total, verby = ~0 if verbose else 0
--    info_s.verbose = verbose
--    assert degree <= RATPOINTS_MAX_DEGREE
--    args.degree = degree
--    args.cof = coeffs
--    args.domain = <ratpoints_interval *> sig_malloc(2*args.degree * sizeof(ratpoints_interval))
--    args.height = H
--    args.num_inter = 0
--    args.b_low = 1
--    args.b_high = H
--    args.sp1 = RATPOINTS_DEFAULT_SP1
--    args.sp2 = RATPOINTS_DEFAULT_SP2
--    args.array_size = RATPOINTS_ARRAY_SIZE
--    args.sturm = RATPOINTS_DEFAULT_STURM
--    args.num_primes = RATPOINTS_DEFAULT_NUM_PRIMES
--    args.max_forbidden = RATPOINTS_DEFAULT_MAX_FORBIDDEN
--    args.flags = (RATPOINTS_VERBOSE & verby)
--    sig_on()
--    total = find_points(&args, process_exists_only, <void *>(&info_s))
--    sig_off()
--    sig_free(args.domain)
--    if total == RATPOINTS_NON_SQUAREFREE:
--        raise RuntimeError('Polynomial must be square-free')
--    if total == RATPOINTS_BAD_ARGS:
--        raise RuntimeError('Bad arguments to ratpoints')
--    return 1 if (total > 0) else 0
--
--
--
--
-diff --git a/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx b/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx
-index 1cc70925fa..c2f994a650 100644
---- a/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx
-+++ b/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx
-@@ -1,5 +1,3 @@
--# distutils: libraries = ratpoints
--
- r"""
- Descent on elliptic curves over `\QQ` with a 2-isogeny
- """
-diff --git a/src/sage_setup/library_order.py b/src/sage_setup/library_order.py
-index 8830d44a95..0b450b3723 100644
---- a/src/sage_setup/library_order.py
-+++ b/src/sage_setup/library_order.py
-@@ -25,7 +25,7 @@ library_order_list = aliases.get("SINGULAR_LIBRARIES", []) + [
-     "giac", "intl", "curl",
-     "ec", "ecm"
- ] + aliases.get("LINBOX_LIBRARIES", []) + aliases.get("FFLASFFPACK_LIBRARIES", []) + aliases.get("GSL_LIBRARIES", []) + [
--    "pari", "flint", "ratpoints", "ecl", "glpk", "ppl",
-+    "pari", "flint", "ecl", "glpk", "ppl",
- ] + arb_dylib_names + [
-     "mpfi", "mpfr", "mpc", "ntl", "gmp", "gmpxx",
-     "brial",
--- 
-2.34.1
-
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index e182267cdb96..97ce9a93f10d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -33,7 +33,7 @@ _SAGE_ROOT=/usr/lib/sage-${version}
 # Skip these sage packages: they are not needed
 _spkg_skip="appnope fonttools importlib_resources pycygwin
  setuptools_scm_git_archive setuptools_wheel sphinxcontrib_websupport
- pplpy_doc vcversioner
+ pplpy_doc vcversioner ratpoints
  jmol mathjax sagenb_export thebe sagetex jupyter_jsmol rpy2 threejs"
 
 # Force use these sage packages from system
@@ -107,6 +107,8 @@ do_clean() {
 }
 
 post_patch() {
+	# these are unused and nothing else uses ratpoints spkg
+	rm src/sage/libs/ratpoints.{pyx,pxd}
 	./bootstrap
 }
 

From 59e2aa82fbc95585b07a4e35859ffa9d34dfcba8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 24 Jan 2022 15:44:40 -0300
Subject: [PATCH 07/12] sagemath: use --disable-doc, cleanup

---
 srcpkgs/sagemath/template | 21 +--------------------
 1 file changed, 1 insertion(+), 20 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 97ce9a93f10d..58a64211e73e 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -5,10 +5,7 @@ revision=1
 wrksrc=sage-$version
 build_style=configure
 configure_args="--enable-build-as-root --with-system-python3
- --enable-system-site-packages"
-make_check_target=ptest
-# for now skip building docs
-make_build_target=build
+ --enable-system-site-packages --disable-doc"
 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
@@ -24,9 +21,6 @@ checksum=dabc1a98e883c6069b59a755852bb0030395404a95d19d497c56f557c02619c2
 python_version=3
 patch_args="-F0 -Np1"
 
-build_options="debug"
-desc_option_debug="Build with debug symbols"
-
 # path where sage will be installed
 _SAGE_ROOT=/usr/lib/sage-${version}
 
@@ -95,11 +89,6 @@ post_extract() {
 	rm -rf $_SAGE_ROOT
 	mv -T $wrksrc $_SAGE_ROOT
 	ln -srfT $_SAGE_ROOT $wrksrc
-
-	mkdir -p $wrksrc/upstream
-	for u in ${_upstream}; do
-		cp "$XBPS_SRCDISTDIR/${pkgname}-${version}/${u##*[/>]}" $wrksrc/upstream
-	done
 }
 
 do_clean() {
@@ -112,14 +101,6 @@ post_patch() {
 	./bootstrap
 }
 
-pre_configure() {
-	if [ "$build_option_debug" ]; then
-		export SAGE_DEBUG=yes
-	fi
-
-	export MAKE="make -j ${XBPS_MAKEJOBS}"
-}
-
 post_configure() {
 	# we set some variables, right after configure has created sage_conf.py
 	cat <<-EOF >> pkgs/sage-conf/sage_conf.py

From f26577e1f6767600c5a430cd07470c19eea17d8a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 25 Jan 2022 17:34:12 -0300
Subject: [PATCH 08/12] sagemath: dependencies not needed with --disable-doc

---
 srcpkgs/sagemath/template | 23 +++++++++++------------
 1 file changed, 11 insertions(+), 12 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 58a64211e73e..df96e5dfa542 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -33,9 +33,9 @@ _spkg_skip="appnope fonttools importlib_resources pycygwin
 # Force use these sage packages from system
 _spkg_system="cppy cython cysignals cypari pplpy fpylll memory_allocator
  primecountpy
- alabaster argcomplete argon2_cffi attrs babel backcall beniget bleach certifi
+ argcomplete argon2_cffi attrs backcall beniget bleach certifi
  cffi charset_normalizer cvxopt cycler dateutil debugpy decorator defusedxml
- docutils entrypoints flit_core gast gmpy2 html5lib idna imagesize
+ docutils entrypoints flit_core gast gmpy2 html5lib idna
  importlib_metadata importlib_resources ipykernel ipython ipython_genutils
  ipywidgets jedi jinja2 jsonschema jupyter_client jupyter_core
  jupyterlab_pygments kiwisolver markupsafe matplotlib matplotlib_inline mistune
@@ -43,12 +43,14 @@ _spkg_system="cppy cython cysignals cypari pplpy fpylll memory_allocator
  packaging pandocfilters parso pexpect pickleshare pillow pip pkgconfig pluggy
  ply prometheus_client prompt_toolkit ptyprocess py pybind11 pycparser pygments
  pyparsing pyrsistent pythran pytz pyzmq requests scipy send2trash setuptools
- setuptools_scm simplegeneric six snowballstemmer sphinx
- sphinxcontrib_applehelp sphinxcontrib_devhelp sphinxcontrib_htmlhelp
- sphinxcontrib_jsmath sphinxcontrib_qthelp sphinxcontrib_serializinghtml sympy
+ setuptools_scm simplegeneric six sympy
  terminado testpath texttable tomli tornado traitlets typing_extensions tzlocal
  urllib3 wcwidth webencodings wheel widgetsnbextension zipp
  linbox gap maxima"
+### Not required with --disable-doc
+#alabaster babel imagesize snowballstemmer sphinx
+#sphinxcontrib_applehelp sphinxcontrib_devhelp sphinxcontrib_htmlhelp
+#sphinxcontrib_jsmath sphinxcontrib_qthelp sphinxcontrib_serializinghtml
 
 # Databases to be used from system
 _spkg_db="combinatorial_designs conway_polynomials elliptic_curves graphs
@@ -216,13 +218,13 @@ makedepends+="
 
 # python packages for trac-29665
 _sage_python3_modules="
- python3-Babel python3-Jinja2 python3-MarkupSafe python3-Pillow
- python3-Pygments python3-Sphinx python3-alabaster python3-argcomplete
+ python3-Jinja2 python3-MarkupSafe python3-Pillow
+ python3-Pygments python3-argcomplete
  python3-argon2 python3-attrs python3-backcall python3-beniget
  python3-bleach python3-certifi python3-cffi python3-charset-normalizer
  python3-cycler python3-dateutil python3-decorator python3-defusedxml
  python3-docutils python3-entrypoints python3-flit_core python3-gast
- python3-gmpy2 python3-html5lib python3-idna python3-imagesize
+ python3-gmpy2 python3-html5lib python3-idna
  python3-importlib_metadata python3-ipython python3-ipython_genutils
  python3-ipython_ipykernel python3-jedi python3-jsonschema
  python3-jupyter_client python3-jupyter_core python3-jupyter_ipywidgets
@@ -237,10 +239,7 @@ _sage_python3_modules="
  python3-pycparser python3-pyrsistent python3-pytz python3-pyzmq
  python3-requests python3-scipy python3-send2trash python3-setuptools
  python3-setuptools_scm python3-simplegeneric python3-six
- python3-snowballstemmer python3-sphinxcontrib-applehelp
- python3-sphinxcontrib-devhelp python3-sphinxcontrib-htmlhelp
- python3-sphinxcontrib-jsmath python3-sphinxcontrib-qthelp
- python3-sphinxcontrib-serializinghtml python3-sympy python3-terminado
+ python3-sympy python3-terminado
  python3-testpath python3-texttable python3-toml python3-tomli
  python3-tornado python3-traitlets python3-typing_extensions
  python3-tzlocal python3-urllib3 python3-wcwidth python3-webencodings

From 894d69ccaf14be9ad25467148ed44a689d39cb6b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 25 Jan 2022 17:35:24 -0300
Subject: [PATCH 09/12] sagemath: update to 9.5.rc4.

---
 .../sagemath/patches/zzz-disable_rpath.patch  | 35 +++++++++++++++++++
 srcpkgs/sagemath/patches/zzz-shebang.patch    | 12 +++++++
 srcpkgs/sagemath/template                     |  4 +--
 3 files changed, 49 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/zzz-disable_rpath.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-shebang.patch

diff --git a/srcpkgs/sagemath/patches/zzz-disable_rpath.patch b/srcpkgs/sagemath/patches/zzz-disable_rpath.patch
new file mode 100644
index 000000000000..107fd3dce23a
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-disable_rpath.patch
@@ -0,0 +1,35 @@
+diff --git a/src/bin/sage-env b/src/bin/sage-env
+index 27edbf4cfb..0ead5789cb 100644
+--- a/src/bin/sage-env
++++ b/src/bin/sage-env
+@@ -411,14 +411,6 @@ if [ -n "$PYTHONHOME" ]; then
+     unset PYTHONHOME
+ fi
+ 
+-if [ -n "$SAGE_LOCAL" ]; then
+-    LDFLAGS="-L$SAGE_LOCAL/lib -Wl,-rpath,$SAGE_LOCAL/lib $LDFLAGS"
+-    if [ "$UNAME" = "Linux" ]; then
+-        LDFLAGS="-Wl,-rpath-link,$SAGE_LOCAL/lib $LDFLAGS"
+-    fi
+-    export LDFLAGS
+-fi
+-
+ if [ -z "$IPYTHONDIR" ]; then
+     # We hardcode a version number in the directory name. The idea is
+     # that we keep using the same version number as long as that is
+diff --git a/src/sage_setup/setenv.py b/src/sage_setup/setenv.py
+index b059a6e709..b6a9e3646c 100644
+--- a/src/sage_setup/setenv.py
++++ b/src/sage_setup/setenv.py
+@@ -30,11 +30,6 @@ def setenv():
+         _environ_prepend('PATH',         f'{SAGE_LOCAL}/bin')
+         _environ_prepend('LIBRARY_PATH', f'{SAGE_LOCAL}/lib')
+         _environ_prepend('CPATH',        f'{SAGE_LOCAL}/include')
+-        _environ_prepend('LDFLAGS',      f'-L{SAGE_LOCAL}/lib -Wl,-rpath,{SAGE_LOCAL}/lib',
+-                         separator=' ')
+-        if UNAME == 'Linux':
+-            _environ_prepend('LDFLAGS',      f'-Wl,-rpath-link,{SAGE_LOCAL}/lib',
+-                             separator=' ')
+         if Path(SAGE_VENV).resolve() != Path(SAGE_LOCAL).resolve():
+             # This condition is always true, but we are keeping it for clarity.
+             _environ_prepend('PATH',         f'{SAGE_VENV}/bin')
diff --git a/srcpkgs/sagemath/patches/zzz-shebang.patch b/srcpkgs/sagemath/patches/zzz-shebang.patch
new file mode 100644
index 000000000000..82b0c610ef66
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-shebang.patch
@@ -0,0 +1,12 @@
+--- a/src/setup.cfg.m4
++++ b/src/setup.cfg.m4
+@@ -25,6 +25,9 @@ classifiers =
+     Programming Language :: Python :: Implementation :: CPython
+     Topic :: Scientific/Engineering :: Mathematics
+ 
++[build]
++executable = /usr/bin/python3
++
+ [options]
+ python_requires = >=3.7, <3.11
+ install_requires =
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index df96e5dfa542..e5169576b95d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -1,6 +1,6 @@
 # Template file for 'sagemath'
 pkgname=sagemath
-version=9.5.rc3
+version=9.5.rc4
 revision=1
 wrksrc=sage-$version
 build_style=configure
@@ -17,7 +17,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
-checksum=dabc1a98e883c6069b59a755852bb0030395404a95d19d497c56f557c02619c2
+checksum=9d5053b83648e9fac5590516a39871ac57524ab9d37102206977e0010e61bb6e
 python_version=3
 patch_args="-F0 -Np1"
 

From 968999111f33cd6d8d96176b2446385af238f145 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Wed, 26 Jan 2022 00:55:43 -0300
Subject: [PATCH 10/12] sagemath: don't separate venv, don't ship src twice

---
 .../patches/zzz-fix_sage_setup_find.patch     | 13 ++++++++++++
 srcpkgs/sagemath/template                     | 21 +++++++------------
 2 files changed, 21 insertions(+), 13 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/zzz-fix_sage_setup_find.patch

diff --git a/srcpkgs/sagemath/patches/zzz-fix_sage_setup_find.patch b/srcpkgs/sagemath/patches/zzz-fix_sage_setup_find.patch
new file mode 100644
index 000000000000..06a6bda1b82e
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-fix_sage_setup_find.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage_setup/find.py b/src/sage_setup/find.py
+index 18f0ddf1ae..084256e3e7 100644
+--- a/src/sage_setup/find.py
++++ b/src/sage_setup/find.py
+@@ -213,7 +213,7 @@ def filter_cython_sources(src_dir, distributions):
+     """
+     files: list[str] = []
+ 
+-    for dirpath, dirnames, filenames in os.walk(src_dir):
++    for dirpath, dirnames, filenames in os.walk(src_dir, followlinks=True):
+         for filename in filenames:
+             filepath = os.path.join(dirpath, filename)
+             base, ext = os.path.splitext(filename)
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index e5169576b95d..cbd205366d4e 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -5,7 +5,7 @@ revision=1
 wrksrc=sage-$version
 build_style=configure
 configure_args="--enable-build-as-root --with-system-python3
- --enable-system-site-packages --disable-doc"
+ --enable-system-site-packages --disable-doc --with-sage-venv=no"
 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
@@ -84,7 +84,7 @@ nostrip=yes
 noshlibprovides=yes
 
 # compile python code in sage venv
-pycompile_dirs="$_SAGE_ROOT/venv/"
+pycompile_dirs="$_SAGE_ROOT"
 
 post_extract() {
 	# sage wants to be built in place so let $wrksrc be a symlink
@@ -127,20 +127,15 @@ do_install() {
 	vlicense COPYING.txt
 	vdoc README.md
 	vmkdir $_SAGE_ROOT
-	vcopy "VERSION.txt prefix sage venv" $_SAGE_ROOT
+	vcopy "VERSION.txt sage" $_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 lib share; do
-		vcopy venv/$f $_SAGE_ROOT/venv/
+		vcopy local/$f $_SAGE_ROOT/local
 	done
-	vcopy "src" $_SAGE_ROOT # only src/sage ?
-
-	# not needed ?
-	# Maybe pkgs/sagemath-standard/build/cythonized for debug
-	#vcopy "build pkgs" $_SAGE_ROOT
+	vmkdir $_SAGE_ROOT/src
+	vcopy src/bin $_SAGE_ROOT/src
+	ln -sf ../local/lib/python3.10/site-packages/{sage,sage_setup} \
+		${DESTDIR}/$_SAGE_ROOT/src
 
 	# symlink main binary
 	vmkdir usr/bin

From 68a86d294639336a30f1d58a5014fd33e68afaca Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Wed, 26 Jan 2022 10:01:49 -0300
Subject: [PATCH 11/12] sagemath: dont depend on ffmpeg and imagemagick

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

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index cbd205366d4e..24baca924e21 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -204,9 +204,9 @@ makedepends+="
 "
 
 # optional dependencies
-makedepends+="
- ffmpeg ImageMagick
-"
+#makedepends+="
+# ffmpeg ImageMagick
+#"
 
 # TODO: optional
 # 4ti2 coxeter3 libsemigroups lrslib pdf2svg perl_mongodb polymake

From d63f5f06de20f4ced62a5b869d29dadf0002481e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 30 Jan 2022 19:13:04 -0300
Subject: [PATCH 12/12] sagemath: update to 9.5.

---
 srcpkgs/sagemath/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 24baca924e21..6535cea07986 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -1,6 +1,6 @@
 # Template file for 'sagemath'
 pkgname=sagemath
-version=9.5.rc4
+version=9.5
 revision=1
 wrksrc=sage-$version
 build_style=configure
@@ -17,7 +17,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-only, GPL-2.0-or-later, CC-BY-SA-3.0, custom:Various free"
 homepage="http://sagemath.org/"
 distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
-checksum=9d5053b83648e9fac5590516a39871ac57524ab9d37102206977e0010e61bb6e
+checksum=8d70a3b26080802c5b2e33dda4c23795d494d8216a0c2ecfcd608ebab0e64ff6
 python_version=3
 patch_args="-F0 -Np1"
 

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (239 preceding siblings ...)
  2022-01-30 22:13 ` tornaria
@ 2022-01-30 22:41 ` tornaria
  2022-01-31  9:01 ` dkwo
                   ` (7 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-01-30 22:41 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1025249504

Comment:
sage 9.5 is released, so I've updated this branch.

However, now that all dependencies are already available in void, I've been working on a new template which will install sagelib as a python module, in the system site-packages.

I'm not sure about all the binary scripts, I lean towards installing all of them in `/usr/lib/sagemath/bin` or `/usr/lib/sagemath/9.5/bin` and have just a symlink in `/usr/bin`. The point is that it should be easy to install a local or user version of sagemath from source to coexist with the system sagemath.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (240 preceding siblings ...)
  2022-01-30 22:41 ` [WIP] New package: sagemath-9.5 tornaria
@ 2022-01-31  9:01 ` dkwo
  2022-01-31  9:40 ` dkwo
                   ` (6 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2022-01-31  9:01 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1025512364

Comment:
Great. What are the obstacles to cross compile it, besides `ntl`?

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (241 preceding siblings ...)
  2022-01-31  9:01 ` dkwo
@ 2022-01-31  9:40 ` dkwo
  2022-02-02 21:03 ` [PR PATCH] [Updated] " tornaria
                   ` (5 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: dkwo @ 2022-01-31  9:40 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1025546462

Comment:
Just a note to self: use
```
ln -s /usr/lib/sage-9.5/local/share/jupyter /usr/local/share/
PYTHONPATH=/usr/lib/sage-9.5/local/lib/python3.10/site-packages/
```

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: sagemath-9.5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (242 preceding siblings ...)
  2022-01-31  9:40 ` dkwo
@ 2022-02-02 21:03 ` tornaria
  2022-02-02 21:41 ` tornaria
                   ` (4 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-02-02 21:03 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1053 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
This is WIP, so I can get feedback.

Supported architectures: x86_64, x86_64-musl, i686. We also try to make sure it works with musl-1.2.

The testsuite can be run normal (-Q) or long (-K). For CI it runs normal (~ 1/2 time) and it uses a fixed random seed 0 to avoid random failures. When running locally, the random seed is random so one may get occasional test failures that depend on a particular value of the random seed.

The package `sagemath-test` is a dummy package whose purpose is to run the testsuite with sage installed as a package and without the build directory. For this to make sense, the masterdir has to be clean (without traces of the sagemath build, this should be ok after running "pkg" or "pkg -Q").

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: 61949 bytes --]

From 847945aac668024312a58754006d22de3bc18cbc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 31 Jan 2022 12:50:38 -0300
Subject: [PATCH] New package: sagemath-9.5

---
 srcpkgs/sagemath/files/timings2.json          | 397 ++++++++++++++++++
 .../patches/01-dont_link_ratpoints.patch      |  10 +
 ...2-fix_get_shared_lib_path--see_29644.patch |  13 +
 .../patches/03-doctest_have_program.patch     |  20 +
 .../patches/04-doctest_sage_getfile.patch     |  22 +
 .../patches/05-fix_sage_getfile.patch         |  16 +
 .../sagemath/patches/07-ignore_warning.patch  |  15 +
 .../08-dont_run_pytest--see_31924.patch       |  27 ++
 .../patches/09-doctest_numerical_fix.patch    |  14 +
 ...y_slow_doctest-polynomial_zmod_flint.patch |  14 +
 ...ry_slow_doctest-isogeny_small_degree.patch | 106 +++++
 ...fix_very_slow_doctest-function_field.patch |  97 +++++
 ...2ddd4e2dc92469c1590ebf0c40f8f69bf579.patch | 126 ++++++
 ...2adf01e9e2ce9f1e33779f0b1ac0d9d1989c.patch |  40 ++
 .../zzz-loadable_module_extension.patch       |  14 +
 .../patches/zzz-skip_doctest_no_threejs.patch |  13 +
 srcpkgs/sagemath/template                     | 129 ++++++
 17 files changed, 1073 insertions(+)
 create mode 100644 srcpkgs/sagemath/files/timings2.json
 create mode 100644 srcpkgs/sagemath/patches/01-dont_link_ratpoints.patch
 create mode 100644 srcpkgs/sagemath/patches/02-fix_get_shared_lib_path--see_29644.patch
 create mode 100644 srcpkgs/sagemath/patches/03-doctest_have_program.patch
 create mode 100644 srcpkgs/sagemath/patches/04-doctest_sage_getfile.patch
 create mode 100644 srcpkgs/sagemath/patches/05-fix_sage_getfile.patch
 create mode 100644 srcpkgs/sagemath/patches/07-ignore_warning.patch
 create mode 100644 srcpkgs/sagemath/patches/08-dont_run_pytest--see_31924.patch
 create mode 100644 srcpkgs/sagemath/patches/09-doctest_numerical_fix.patch
 create mode 100644 srcpkgs/sagemath/patches/10-fix_very_slow_doctest-polynomial_zmod_flint.patch
 create mode 100644 srcpkgs/sagemath/patches/11-fix_very_slow_doctest-isogeny_small_degree.patch
 create mode 100644 srcpkgs/sagemath/patches/12-fix_very_slow_doctest-function_field.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-33189-fix_doctests_for_arb_2.22-53532ddd4e2dc92469c1590ebf0c40f8f69bf579.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-33226-fix_doctests_giac-1.7.0-33ea2adf01e9e2ce9f1e33779f0b1ac0d9d1989c.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-loadable_module_extension.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_no_threejs.patch
 create mode 100644 srcpkgs/sagemath/template

diff --git a/srcpkgs/sagemath/files/timings2.json b/srcpkgs/sagemath/files/timings2.json
new file mode 100644
index 000000000000..01b2fcc9e0bf
--- /dev/null
+++ b/srcpkgs/sagemath/files/timings2.json
@@ -0,0 +1,397 @@
+{
+  "doc.ca.intro.index": {"walltime": 8},
+  "doc.en.constructions.calculus": {"walltime": 64},
+  "doc.en.constructions.plotting": {"walltime": 32},
+  "doc.en.prep.Advanced-2DPlotting": {"walltime": 16},
+  "doc.en.prep.Calculus": {"walltime": 8},
+  "doc.en.prep.Symbolics-and-Basic-Plotting": {"walltime": 8},
+  "doc.en.thematic_tutorials.explicit_methods_in_number_theory.birds_other": {"walltime": 8},
+  "doc.en.thematic_tutorials.explicit_methods_in_number_theory.elliptic_curves": {"walltime": 8},
+  "doc.en.thematic_tutorials.geometry.polyhedra_tutorial": {"walltime": 16},
+  "doc.en.thematic_tutorials.sandpile": {"walltime": 16},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_advanced": {"walltime": 32},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_cartesian": {"walltime": 32},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_change": {"walltime": 32},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_curvilinear": {"walltime": 32},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_plane": {"walltime": 16},
+  "doc.ja.tutorial.tour_plotting": {"walltime": 8},
+  "sage.algebras.cluster_algebra": {"walltime": 8},
+  "sage.algebras.commutative_dga": {"walltime": 16},
+  "sage.algebras.hecke_algebras.ariki_koike_algebra": {"walltime": 8},
+  "sage.algebras.iwahori_hecke_algebra": {"walltime": 8},
+  "sage.algebras.lie_algebras.classical_lie_algebra": {"walltime": 128},
+  "sage.algebras.lie_algebras.nilpotent_lie_algebra": {"walltime": 16},
+  "sage.algebras.quantum_clifford": {"walltime": 16},
+  "sage.algebras.quantum_groups.fock_space": {"walltime": 8},
+  "sage.algebras.quatalg.quaternion_algebra": {"walltime": 8},
+  "sage.algebras.steenrod.steenrod_algebra": {"walltime": 64},
+  "sage.algebras.steenrod.steenrod_algebra_bases": {"walltime": 8},
+  "sage.algebras.yangian": {"walltime": 8},
+  "sage.arith.misc": {"walltime": 32},
+  "sage.calculus.calculus": {"walltime": 16},
+  "sage.calculus.desolvers": {"walltime": 8},
+  "sage.calculus.functional": {"walltime": 8},
+  "sage.calculus.riemann": {"walltime": 64},
+  "sage.calculus.tests": {"walltime": 16},
+  "sage.calculus.transforms.dwt": {"walltime": 16},
+  "sage.calculus.transforms.fft": {"walltime": 8},
+  "sage.categories.coxeter_groups": {"walltime": 8},
+  "sage.categories.finite_monoids": {"walltime": 16},
+  "sage.categories.lie_conformal_algebras": {"walltime": 8},
+  "sage.categories.loop_crystals": {"walltime": 8},
+  "sage.categories.pushout": {"walltime": 8},
+  "sage.categories.super_hopf_algebras_with_basis": {"walltime": 32},
+  "sage.categories.super_lie_conformal_algebras": {"walltime": 8},
+  "sage.coding.ag_code": {"walltime": 64},
+  "sage.coding.ag_code_decoders": {"walltime": 128},
+  "sage.coding.binary_code": {"walltime": 8},
+  "sage.coding.linear_code": {"walltime": 16},
+  "sage.combinat.backtrack": {"walltime": 32},
+  "sage.combinat.chas.wqsym": {"walltime": 32},
+  "sage.combinat.cluster_algebra_quiver.cluster_seed": {"walltime": 64},
+  "sage.combinat.cluster_algebra_quiver.quiver": {"walltime": 128},
+  "sage.combinat.crystals.affine_factorization": {"walltime": 16},
+  "sage.combinat.crystals.alcove_path": {"walltime": 32},
+  "sage.combinat.crystals.highest_weight_crystals": {"walltime": 8},
+  "sage.combinat.crystals.kirillov_reshetikhin": {"walltime": 16},
+  "sage.combinat.crystals.letters": {"walltime": 8},
+  "sage.combinat.crystals.littelmann_path": {"walltime": 16},
+  "sage.combinat.crystals.mv_polytopes": {"walltime": 16},
+  "sage.combinat.crystals.pbw_crystal": {"walltime": 16},
+  "sage.combinat.crystals.star_crystal": {"walltime": 8},
+  "sage.combinat.designs.bibd": {"walltime": 8},
+  "sage.combinat.designs.database": {"walltime": 16},
+  "sage.combinat.designs.difference_family": {"walltime": 8},
+  "sage.combinat.designs.gen_quadrangles_with_spread": {"walltime": 128},
+  "sage.combinat.designs.orthogonal_arrays_build_recursive": {"walltime": 16},
+  "sage.combinat.designs.orthogonal_arrays_find_recursive": {"walltime": 8},
+  "sage.combinat.diagram_algebras": {"walltime": 64},
+  "sage.combinat.fqsym": {"walltime": 32},
+  "sage.combinat.free_prelie_algebra": {"walltime": 8},
+  "sage.combinat.fully_commutative_elements": {"walltime": 8},
+  "sage.combinat.grossman_larson_algebras": {"walltime": 8},
+  "sage.combinat.interval_posets": {"walltime": 8},
+  "sage.combinat.k_regular_sequence": {"walltime": 8},
+  "sage.combinat.k_tableau": {"walltime": 16},
+  "sage.combinat.matrices.hadamard_matrix": {"walltime": 8},
+  "sage.combinat.multiset_partition_into_sets_ordered": {"walltime": 8},
+  "sage.combinat.ncsf_qsym.ncsf": {"walltime": 16},
+  "sage.combinat.ncsf_qsym.qsym": {"walltime": 16},
+  "sage.combinat.partition": {"walltime": 16},
+  "sage.combinat.partition_kleshchev": {"walltime": 16},
+  "sage.combinat.partition_tuple": {"walltime": 8},
+  "sage.combinat.posets.moebius_algebra": {"walltime": 16},
+  "sage.combinat.posets.posets": {"walltime": 8},
+  "sage.combinat.rigged_configurations.kr_tableaux": {"walltime": 32},
+  "sage.combinat.rigged_configurations.rigged_configurations": {"walltime": 16},
+  "sage.combinat.rigged_configurations.tensor_product_kr_tableaux": {"walltime": 16},
+  "sage.combinat.root_system.associahedron": {"walltime": 8},
+  "sage.combinat.root_system.branching_rules": {"walltime": 8},
+  "sage.combinat.root_system.fusion_ring": {"walltime": 8},
+  "sage.combinat.root_system.integrable_representations": {"walltime": 16},
+  "sage.combinat.root_system.non_symmetric_macdonald_polynomials": {"walltime": 16},
+  "sage.combinat.root_system.pieri_factors": {"walltime": 8},
+  "sage.combinat.root_system.plot": {"walltime": 32},
+  "sage.combinat.root_system.root_lattice_realization_algebras": {"walltime": 16},
+  "sage.combinat.root_system.root_lattice_realizations": {"walltime": 16},
+  "sage.combinat.root_system.root_system": {"walltime": 8},
+  "sage.combinat.root_system.weyl_group": {"walltime": 8},
+  "sage.combinat.rsk": {"walltime": 32},
+  "sage.combinat.sf.classical": {"walltime": 16},
+  "sage.combinat.sf.jack": {"walltime": 16},
+  "sage.combinat.sf.k_dual": {"walltime": 16},
+  "sage.combinat.sf.llt": {"walltime": 16},
+  "sage.combinat.sf.macdonald": {"walltime": 64},
+  "sage.combinat.sf.new_kschur": {"walltime": 8},
+  "sage.combinat.sf.sfa": {"walltime": 32},
+  "sage.combinat.shifted_primed_tableau": {"walltime": 16},
+  "sage.combinat.skew_tableau": {"walltime": 8},
+  "sage.combinat.symmetric_group_algebra": {"walltime": 16},
+  "sage.combinat.tableau": {"walltime": 32},
+  "sage.combinat.tableau_tuple": {"walltime": 32},
+  "sage.combinat.tiling": {"walltime": 256},
+  "sage.combinat.tutorial": {"walltime": 16},
+  "sage.combinat.words.paths": {"walltime": 64},
+  "sage.crypto.block_cipher.des": {"walltime": 16},
+  "sage.crypto.mq.sr": {"walltime": 64},
+  "sage.crypto.sbox": {"walltime": 16},
+  "sage.crypto.sboxes": {"walltime": 8},
+  "sage.doctest.forker": {"walltime": 16},
+  "sage.doctest.sources": {"walltime": 64},
+  "sage.doctest.test": {"walltime": 128},
+  "sage.dynamics.arithmetic_dynamics.projective_ds": {"walltime": 64},
+  "sage.dynamics.arithmetic_dynamics.wehlerK3": {"walltime": 8},
+  "sage.dynamics.cellular_automata.glca": {"walltime": 8},
+  "sage.dynamics.cellular_automata.solitons": {"walltime": 8},
+  "sage.dynamics.complex_dynamics.mandel_julia": {"walltime": 16},
+  "sage.functions.bessel": {"walltime": 16},
+  "sage.functions.exp_integral": {"walltime": 8},
+  "sage.functions.hypergeometric": {"walltime": 8},
+  "sage.functions.other": {"walltime": 16},
+  "sage.functions.piecewise": {"walltime": 8},
+  "sage.games.quantumino": {"walltime": 8},
+  "sage.geometry.cone": {"walltime": 32},
+  "sage.geometry.fan": {"walltime": 8},
+  "sage.geometry.hyperbolic_space.hyperbolic_geodesic": {"walltime": 8},
+  "sage.geometry.hyperplane_arrangement.arrangement": {"walltime": 16},
+  "sage.geometry.hyperplane_arrangement.library": {"walltime": 8},
+  "sage.geometry.hyperplane_arrangement.plot": {"walltime": 8},
+  "sage.geometry.lattice_polytope": {"walltime": 16},
+  "sage.geometry.polyhedral_complex": {"walltime": 8},
+  "sage.geometry.polyhedron.base": {"walltime": 32},
+  "sage.geometry.polyhedron.library": {"walltime": 32},
+  "sage.geometry.polyhedron.plot": {"walltime": 8},
+  "sage.geometry.riemannian_manifolds.parametrized_surface3d": {"walltime": 16},
+  "sage.geometry.triangulation.base": {"walltime": 32},
+  "sage.geometry.triangulation.point_configuration": {"walltime": 16},
+  "sage.graphs.chrompoly": {"walltime": 8},
+  "sage.graphs.connectivity": {"walltime": 16},
+  "sage.graphs.generators.basic": {"walltime": 16},
+  "sage.graphs.generators.classical_geometries": {"walltime": 32},
+  "sage.graphs.generators.distance_regular": {"walltime": 256},
+  "sage.graphs.generators.families": {"walltime": 32},
+  "sage.graphs.generators.smallgraphs": {"walltime": 16},
+  "sage.graphs.generic_graph": {"walltime": 32},
+  "sage.graphs.genus": {"walltime": 16},
+  "sage.graphs.graph": {"walltime": 16},
+  "sage.graphs.graph_generators": {"walltime": 8},
+  "sage.graphs.graph_list": {"walltime": 8},
+  "sage.graphs.graph_plot": {"walltime": 8},
+  "sage.graphs.strongly_regular_db": {"walltime": 16},
+  "sage.groups.cubic_braid": {"walltime": 16},
+  "sage.groups.fqf_orthogonal": {"walltime": 16},
+  "sage.groups.libgap_mixin": {"walltime": 8},
+  "sage.groups.libgap_morphism": {"walltime": 8},
+  "sage.groups.lie_gps.nilpotent_lie_group": {"walltime": 16},
+  "sage.groups.matrix_gps.finitely_generated": {"walltime": 8},
+  "sage.groups.matrix_gps.heisenberg": {"walltime": 32},
+  "sage.groups.matrix_gps.linear": {"walltime": 8},
+  "sage.groups.perm_gps.cubegroup": {"walltime": 16},
+  "sage.groups.perm_gps.partn_ref.refinement_graphs": {"walltime": 8},
+  "sage.groups.perm_gps.permgroup": {"walltime": 8},
+  "sage.groups.perm_gps.permgroup_named": {"walltime": 8},
+  "sage.homology.hochschild_complex": {"walltime": 8},
+  "sage.homology.homology_vector_space_with_basis": {"walltime": 8},
+  "sage.interacts.test_jupyter": {"walltime": 16},
+  "sage.interfaces.ecm": {"walltime": 8},
+  "sage.interfaces.expect": {"walltime": 8},
+  "sage.interfaces.gap": {"walltime": 16},
+  "sage.interfaces.maxima": {"walltime": 8},
+  "sage.interfaces.maxima_abstract": {"walltime": 64},
+  "sage.interfaces.psage": {"walltime": 8},
+  "sage.interfaces.sage0": {"walltime": 8},
+  "sage.lfunctions.zero_sums": {"walltime": 8},
+  "sage.libs.eclib.interface": {"walltime": 16},
+  "sage.libs.eclib.mwrank": {"walltime": 16},
+  "sage.libs.gap.test_long": {"walltime": 32},
+  "sage.libs.giac": {"walltime": 32},
+  "sage.manifolds.catalog": {"walltime": 8},
+  "sage.manifolds.chart": {"walltime": 32},
+  "sage.manifolds.chart_func": {"walltime": 8},
+  "sage.manifolds.continuous_map": {"walltime": 8},
+  "sage.manifolds.differentiable.affine_connection": {"walltime": 128},
+  "sage.manifolds.differentiable.automorphismfield": {"walltime": 32},
+  "sage.manifolds.differentiable.automorphismfield_group": {"walltime": 8},
+  "sage.manifolds.differentiable.bundle_connection": {"walltime": 8},
+  "sage.manifolds.differentiable.characteristic_cohomology_class": {"walltime": 256},
+  "sage.manifolds.differentiable.curve": {"walltime": 16},
+  "sage.manifolds.differentiable.degenerate": {"walltime": 32},
+  "sage.manifolds.differentiable.degenerate_submanifold": {"walltime": 256},
+  "sage.manifolds.differentiable.diff_form": {"walltime": 64},
+  "sage.manifolds.differentiable.diff_map": {"walltime": 8},
+  "sage.manifolds.differentiable.examples.euclidean": {"walltime": 32},
+  "sage.manifolds.differentiable.examples.sphere": {"walltime": 32},
+  "sage.manifolds.differentiable.integrated_curve": {"walltime": 32},
+  "sage.manifolds.differentiable.levi_civita_connection": {"walltime": 32},
+  "sage.manifolds.differentiable.manifold": {"walltime": 16},
+  "sage.manifolds.differentiable.manifold_homset": {"walltime": 16},
+  "sage.manifolds.differentiable.metric": {"walltime": 64},
+  "sage.manifolds.differentiable.mixed_form": {"walltime": 16},
+  "sage.manifolds.differentiable.mixed_form_algebra": {"walltime": 8},
+  "sage.manifolds.differentiable.multivectorfield": {"walltime": 64},
+  "sage.manifolds.differentiable.pseudo_riemannian": {"walltime": 16},
+  "sage.manifolds.differentiable.pseudo_riemannian_submanifold": {"walltime": 128},
+  "sage.manifolds.differentiable.scalarfield": {"walltime": 16},
+  "sage.manifolds.differentiable.scalarfield_algebra": {"walltime": 8},
+  "sage.manifolds.differentiable.tangent_vector": {"walltime": 16},
+  "sage.manifolds.differentiable.tensorfield": {"walltime": 128},
+  "sage.manifolds.differentiable.tensorfield_paral": {"walltime": 16},
+  "sage.manifolds.differentiable.vector_bundle": {"walltime": 16},
+  "sage.manifolds.differentiable.vectorfield": {"walltime": 64},
+  "sage.manifolds.differentiable.vectorframe": {"walltime": 8},
+  "sage.manifolds.point": {"walltime": 16},
+  "sage.manifolds.scalarfield": {"walltime": 16},
+  "sage.manifolds.scalarfield_algebra": {"walltime": 8},
+  "sage.manifolds.section": {"walltime": 32},
+  "sage.manifolds.trivialization": {"walltime": 8},
+  "sage.manifolds.vector_bundle": {"walltime": 8},
+  "sage.matrix.benchmark": {"walltime": 8},
+  "sage.matrix.matrix2": {"walltime": 16},
+  "sage.matrix.matrix_integer_dense": {"walltime": 16},
+  "sage.matrix.matrix_integer_dense_hnf": {"walltime": 32},
+  "sage.matrix.matrix_mod2_dense": {"walltime": 8},
+  "sage.matrix.matrix_rational_dense": {"walltime": 8},
+  "sage.matrix.special": {"walltime": 8},
+  "sage.matroids.catalog": {"walltime": 64},
+  "sage.misc.cachefunc": {"walltime": 16},
+  "sage.misc.cython": {"walltime": 8},
+  "sage.misc.functional": {"walltime": 8},
+  "sage.misc.randstate": {"walltime": 16},
+  "sage.misc.sagedoc": {"walltime": 64},
+  "sage.misc.sageinspect": {"walltime": 32},
+  "sage.modular.abvar.abvar": {"walltime": 16},
+  "sage.modular.abvar.homspace": {"walltime": 8},
+  "sage.modular.abvar.lseries": {"walltime": 8},
+  "sage.modular.arithgroup.arithgroup_perm": {"walltime": 8},
+  "sage.modular.arithgroup.tests": {"walltime": 8},
+  "sage.modular.btquotients.pautomorphicform": {"walltime": 32},
+  "sage.modular.hypergeometric_motive": {"walltime": 16},
+  "sage.modular.local_comp.local_comp": {"walltime": 32},
+  "sage.modular.local_comp.type_space": {"walltime": 16},
+  "sage.modular.modform.ambient_R": {"walltime": 16},
+  "sage.modular.modform.constructor": {"walltime": 8},
+  "sage.modular.modform.cuspidal_submodule": {"walltime": 16},
+  "sage.modular.modform.element": {"walltime": 64},
+  "sage.modular.modform.ring": {"walltime": 64},
+  "sage.modular.modform.space": {"walltime": 8},
+  "sage.modular.modform_hecketriangle.abstract_space": {"walltime": 16},
+  "sage.modular.modform_hecketriangle.graded_ring_element": {"walltime": 16},
+  "sage.modular.modform_hecketriangle.hecke_triangle_group_element": {"walltime": 32},
+  "sage.modular.modform_hecketriangle.readme": {"walltime": 16},
+  "sage.modular.modform_hecketriangle.space": {"walltime": 8},
+  "sage.modular.modsym.ambient": {"walltime": 16},
+  "sage.modular.modsym.space": {"walltime": 8},
+  "sage.modular.pollack_stevens.modsym": {"walltime": 64},
+  "sage.modular.pollack_stevens.padic_lseries": {"walltime": 32},
+  "sage.modules.finite_submodule_iter": {"walltime": 16},
+  "sage.modules.free_module": {"walltime": 16},
+  "sage.modules.free_module_element": {"walltime": 8},
+  "sage.modules.free_module_integer": {"walltime": 32},
+  "sage.modules.free_quadratic_module_integer_symmetric": {"walltime": 8},
+  "sage.modules.torsion_quadratic_module": {"walltime": 16},
+  "sage.parallel.map_reduce": {"walltime": 8},
+  "sage.plot.animate": {"walltime": 128},
+  "sage.plot.arrow": {"walltime": 8},
+  "sage.plot.circle": {"walltime": 8},
+  "sage.plot.complex_plot": {"walltime": 8},
+  "sage.plot.contour_plot": {"walltime": 32},
+  "sage.plot.density_plot": {"walltime": 8},
+  "sage.plot.graphics": {"walltime": 32},
+  "sage.plot.line": {"walltime": 8},
+  "sage.plot.matrix_plot": {"walltime": 16},
+  "sage.plot.multigraphics": {"walltime": 16},
+  "sage.plot.plot": {"walltime": 64},
+  "sage.plot.plot3d.base": {"walltime": 8},
+  "sage.plot.plot3d.implicit_plot3d": {"walltime": 16},
+  "sage.plot.plot3d.implicit_surface": {"walltime": 8},
+  "sage.plot.plot3d.parametric_plot3d": {"walltime": 8},
+  "sage.plot.plot3d.parametric_surface": {"walltime": 8},
+  "sage.plot.plot3d.plot3d": {"walltime": 16},
+  "sage.plot.plot3d.tachyon": {"walltime": 8},
+  "sage.plot.plot3d.transform": {"walltime": 32},
+  "sage.plot.point": {"walltime": 8},
+  "sage.plot.polygon": {"walltime": 8},
+  "sage.plot.streamline_plot": {"walltime": 8},
+  "sage.quadratic_forms.genera.genus": {"walltime": 16},
+  "sage.quadratic_forms.quadratic_form__automorphisms": {"walltime": 8},
+  "sage.quadratic_forms.quadratic_form__local_representation_conditions": {"walltime": 64},
+  "sage.quadratic_forms.quadratic_form__neighbors": {"walltime": 8},
+  "sage.quadratic_forms.quadratic_form__siegel_product": {"walltime": 8},
+  "sage.repl.ipython_extension": {"walltime": 8},
+  "sage.rings.asymptotic.asymptotic_expansion_generators": {"walltime": 64},
+  "sage.rings.asymptotic.asymptotic_ring": {"walltime": 8},
+  "sage.rings.asymptotic.asymptotics_multivariate_generating_functions": {"walltime": 32},
+  "sage.rings.asymptotic.term_monoid": {"walltime": 8},
+  "sage.rings.continued_fraction": {"walltime": 8},
+  "sage.rings.finite_rings.finite_field_base": {"walltime": 8},
+  "sage.rings.function_field.function_field": {"walltime": 128},
+  "sage.rings.function_field.function_field_valuation": {"walltime": 64},
+  "sage.rings.function_field.ideal": {"walltime": 8},
+  "sage.rings.function_field.place": {"walltime": 8},
+  "sage.rings.integer": {"walltime": 128},
+  "sage.rings.invariants.invariant_theory": {"walltime": 8},
+  "sage.rings.number_field.bdd_height": {"walltime": 8},
+  "sage.rings.number_field.number_field": {"walltime": 64},
+  "sage.rings.number_field.number_field_element": {"walltime": 16},
+  "sage.rings.number_field.splitting_field": {"walltime": 8},
+  "sage.rings.number_field.totallyreal": {"walltime": 16},
+  "sage.rings.number_field.totallyreal_rel": {"walltime": 8},
+  "sage.rings.padics.padic_base_leaves": {"walltime": 64},
+  "sage.rings.padics.padic_extension_leaves": {"walltime": 64},
+  "sage.rings.padics.padic_generic_element": {"walltime": 16},
+  "sage.rings.padics.padic_lattice_element": {"walltime": 32},
+  "sage.rings.padics.relative_extension_leaves": {"walltime": 32},
+  "sage.rings.polynomial.multi_polynomial_ideal": {"walltime": 8},
+  "sage.rings.polynomial.multi_polynomial_sequence": {"walltime": 8},
+  "sage.rings.polynomial.ore_function_element": {"walltime": 8},
+  "sage.rings.polynomial.polynomial_element": {"walltime": 16},
+  "sage.rings.polynomial.polynomial_rational_flint": {"walltime": 8},
+  "sage.rings.qqbar": {"walltime": 16},
+  "sage.rings.tests": {"walltime": 16},
+  "sage.rings.valuation.augmented_valuation": {"walltime": 32},
+  "sage.rings.valuation.mapped_valuation": {"walltime": 64},
+  "sage.rings.valuation.valuation": {"walltime": 8},
+  "sage.sandpiles.sandpile": {"walltime": 16},
+  "sage.schemes.curves.affine_curve": {"walltime": 16},
+  "sage.schemes.curves.closed_point": {"walltime": 8},
+  "sage.schemes.curves.projective_curve": {"walltime": 32},
+  "sage.schemes.cyclic_covers.cycliccover_finite_field": {"walltime": 64},
+  "sage.schemes.elliptic_curves.BSD": {"walltime": 8},
+  "sage.schemes.elliptic_curves.Qcurves": {"walltime": 8},
+  "sage.schemes.elliptic_curves.constructor": {"walltime": 32},
+  "sage.schemes.elliptic_curves.ell_curve_isogeny": {"walltime": 16},
+  "sage.schemes.elliptic_curves.ell_egros": {"walltime": 32},
+  "sage.schemes.elliptic_curves.ell_finite_field": {"walltime": 8},
+  "sage.schemes.elliptic_curves.ell_generic": {"walltime": 8},
+  "sage.schemes.elliptic_curves.ell_modular_symbols": {"walltime": 16},
+  "sage.schemes.elliptic_curves.ell_number_field": {"walltime": 128},
+  "sage.schemes.elliptic_curves.ell_point": {"walltime": 8},
+  "sage.schemes.elliptic_curves.ell_rational_field": {"walltime": 128},
+  "sage.schemes.elliptic_curves.gal_reps_number_field": {"walltime": 32},
+  "sage.schemes.elliptic_curves.gp_simon": {"walltime": 16},
+  "sage.schemes.elliptic_curves.heegner": {"walltime": 32},
+  "sage.schemes.elliptic_curves.height": {"walltime": 64},
+  "sage.schemes.elliptic_curves.isogeny_class": {"walltime": 32},
+  "sage.schemes.elliptic_curves.isogeny_small_degree": {"walltime": 64},
+  "sage.schemes.elliptic_curves.kraus": {"walltime": 16},
+  "sage.schemes.elliptic_curves.mod_sym_num": {"walltime": 8},
+  "sage.schemes.elliptic_curves.padic_lseries": {"walltime": 8},
+  "sage.schemes.elliptic_curves.padics": {"walltime": 16},
+  "sage.schemes.elliptic_curves.saturation": {"walltime": 16},
+  "sage.schemes.elliptic_curves.sha_tate": {"walltime": 32},
+  "sage.schemes.hyperelliptic_curves.hyperelliptic_finite_field": {"walltime": 64},
+  "sage.schemes.hyperelliptic_curves.hyperelliptic_generic": {"walltime": 8},
+  "sage.schemes.hyperelliptic_curves.hyperelliptic_padic_field": {"walltime": 32},
+  "sage.schemes.hyperelliptic_curves.monsky_washnitzer": {"walltime": 8},
+  "sage.schemes.projective.projective_rational_point": {"walltime": 8},
+  "sage.schemes.riemann_surfaces.riemann_surface": {"walltime": 64},
+  "sage.schemes.toric.chow_group": {"walltime": 8},
+  "sage.schemes.toric.sheaf.klyachko": {"walltime": 8},
+  "sage.stats.distributions.discrete_gaussian_integer": {"walltime": 8},
+  "sage.stats.time_series": {"walltime": 8},
+  "sage.structure.coerce_dict": {"walltime": 32},
+  "sage.structure.element": {"walltime": 16},
+  "sage.structure.sage_object": {"walltime": 8},
+  "sage.symbolic.expression": {"walltime": 32},
+  "sage.symbolic.integration.integral": {"walltime": 32},
+  "sage.symbolic.random_tests": {"walltime": 32},
+  "sage.symbolic.relation": {"walltime": 8},
+  "sage.tests.book_schilling_zabrocki_kschur_primer": {"walltime": 32},
+  "sage.tests.book_stein_ent": {"walltime": 16},
+  "sage.tests.books.computational-mathematics-with-sagemath.combinat_doctest": {"walltime": 32},
+  "sage.tests.books.computational-mathematics-with-sagemath.float_doctest": {"walltime": 16},
+  "sage.tests.books.computational-mathematics-with-sagemath.graphique_doctest": {"walltime": 32},
+  "sage.tests.books.computational-mathematics-with-sagemath.graphtheory_doctest": {"walltime": 8},
+  "sage.tests.books.computational-mathematics-with-sagemath.integration_doctest": {"walltime": 32},
+  "sage.tests.books.computational-mathematics-with-sagemath.mpoly_doctest": {"walltime": 8},
+  "sage.tests.books.computational-mathematics-with-sagemath.nonlinear_doctest": {"walltime": 8},
+  "sage.tests.books.computational-mathematics-with-sagemath.recequadiff_doctest": {"walltime": 8},
+  "sage.tests.books.computational-mathematics-with-sagemath.sol.graphique_doctest": {"walltime": 16},
+  "sage.tests.books.computational-mathematics-with-sagemath.sol.numbertheory_doctest": {"walltime": 16},
+  "sage.tests.books.computational-mathematics-with-sagemath.sol.polynomes_doctest": {"walltime": 16},
+  "sage.tests.cmdline": {"walltime": 64},
+  "sage.tests.gosper-sum": {"walltime": 16},
+  "sage.tests.parigp": {"walltime": 8},
+  "sage.topology.simplicial_complex": {"walltime": 8},
+  "sage.topology.simplicial_complex_examples": {"walltime": 16}
+}
diff --git a/srcpkgs/sagemath/patches/01-dont_link_ratpoints.patch b/srcpkgs/sagemath/patches/01-dont_link_ratpoints.patch
new file mode 100644
index 000000000000..e5c3f5776aa2
--- /dev/null
+++ b/srcpkgs/sagemath/patches/01-dont_link_ratpoints.patch
@@ -0,0 +1,10 @@
+ - do not link ratpoints where it's not used
+
+--- a/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx
++++ b/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx
+@@ -1,5 +1,3 @@
+-# distutils: libraries = ratpoints
+-
+ r"""
+ Descent on elliptic curves over `\QQ` with a 2-isogeny
+ """
diff --git a/srcpkgs/sagemath/patches/02-fix_get_shared_lib_path--see_29644.patch b/srcpkgs/sagemath/patches/02-fix_get_shared_lib_path--see_29644.patch
new file mode 100644
index 000000000000..d3672b094c1c
--- /dev/null
+++ b/srcpkgs/sagemath/patches/02-fix_get_shared_lib_path--see_29644.patch
@@ -0,0 +1,13 @@
+ - fix _get_shared_lib_path() so we don't need to configure GAP_SO
+
+--- a/src/sage/env.py
++++ b/src/sage/env.py
+@@ -293,7 +293,7 @@ def _get_shared_lib_path(*libnames: str) -> Optional[str]:
+             if sys.platform == 'darwin':
+                 ext = 'dylib'
+             else:
+-                ext = 'so'
++                ext = 'so*'
+ 
+             if SAGE_LOCAL:
+                 search_directories.append(Path(SAGE_LOCAL) / 'lib')
diff --git a/srcpkgs/sagemath/patches/03-doctest_have_program.patch b/srcpkgs/sagemath/patches/03-doctest_have_program.patch
new file mode 100644
index 000000000000..27ba3776470c
--- /dev/null
+++ b/srcpkgs/sagemath/patches/03-doctest_have_program.patch
@@ -0,0 +1,20 @@
+ - we don't know `SAGE_VENV/bin` contains `sage`, but `sys.argv[0]` should
+   be the full path to `sage-ipython` and the same directory should have `sage`
+
+--- a/src/sage/misc/sage_ostools.pyx
++++ b/src/sage/misc/sage_ostools.pyx
+@@ -32,12 +32,11 @@ def have_program(program, path=None):
+         True
+         sage: have_program('there_is_not_a_program_with_this_name')
+         False
+-        sage: from sage.env import SAGE_VENV
+-        sage: have_program('sage', os.path.join(SAGE_VENV, 'bin'))
++        sage: have_program('sage', os.path.dirname(sys.argv[0]))
+         True
+         sage: have_program('sage', '/there_is_not_a_path_with_this_name')
+         False
+-        sage: have_program('there_is_not_a_program_with_this_name', os.path.join(SAGE_VENV, 'bin'))
++        sage: have_program('there_is_not_a_program_with_this_name', "/bin")
+         False
+     """
+     if path is None:
diff --git a/srcpkgs/sagemath/patches/04-doctest_sage_getfile.patch b/srcpkgs/sagemath/patches/04-doctest_sage_getfile.patch
new file mode 100644
index 000000000000..95bce107f854
--- /dev/null
+++ b/srcpkgs/sagemath/patches/04-doctest_sage_getfile.patch
@@ -0,0 +1,22 @@
+ - add one doctest for coverage
+
+--- a/src/sage/misc/sageinspect.py
++++ b/src/sage/misc/sageinspect.py
+@@ -1341,10 +1342,12 @@ def sage_getfile(obj):
+     EXAMPLES::
+ 
+         sage: from sage.misc.sageinspect import sage_getfile
+-        sage: sage_getfile(sage.rings.rational)[-23:]
+-        'sage/rings/rational.pyx'
+-        sage: sage_getfile(Sq)[-42:]
+-        'sage/algebras/steenrod/steenrod_algebra.py'
++        sage: sage_getfile(sage.rings.rational)
++        '...sage/rings/rational.pyx'
++        sage: sage_getfile(Sq)
++        '...sage/algebras/steenrod/steenrod_algebra.py'
++        sage: sage_getfile(x)
++        '...sage/symbolic/expression.pyx'
+ 
+     The following tests against some bugs fixed in :trac:`9976`::
+ 
+
diff --git a/srcpkgs/sagemath/patches/05-fix_sage_getfile.patch b/srcpkgs/sagemath/patches/05-fix_sage_getfile.patch
new file mode 100644
index 000000000000..56c58078f319
--- /dev/null
+++ b/srcpkgs/sagemath/patches/05-fix_sage_getfile.patch
@@ -0,0 +1,16 @@
+ - fix sage_getfile() by checking all possible EXTENSION_SUFFIXES
+
+--- a/src/sage/misc/sageinspect.py
++++ b/src/sage/misc/sageinspect.py
+@@ -1400,8 +1403,9 @@ def sage_getfile(obj):
+         sourcefile = inspect.getabsfile(obj)
+     except TypeError: # this happens for Python builtins
+         return ''
+-    if sourcefile.endswith(loadable_module_extension()):
+-        return sourcefile[:-len(loadable_module_extension())]+os.path.extsep+'pyx'
++    for suffix in import_machinery.EXTENSION_SUFFIXES:
++        if sourcefile.endswith(suffix):
++            return sourcefile[:-len(suffix)]+os.path.extsep+'pyx'
+     return sourcefile
+ 
+ 
diff --git a/srcpkgs/sagemath/patches/07-ignore_warning.patch b/srcpkgs/sagemath/patches/07-ignore_warning.patch
new file mode 100644
index 000000000000..69668678a40b
--- /dev/null
+++ b/srcpkgs/sagemath/patches/07-ignore_warning.patch
@@ -0,0 +1,15 @@
+ - this ignores a warning caused by old notebook
+
+--- a/src/sage/all.py
++++ b/src/sage/all.py
+@@ -100,6 +100,9 @@ warnings.filterwarnings('ignore', category=DeprecationWarning,
+                         message='The distutils(.sysconfig module| package) is deprecated',
+                         module='Cython|distutils|numpy|sage.env|sage.features')
+ 
++warnings.filterwarnings('ignore', category=DeprecationWarning,
++                        message=r"invalid escape sequence '\\s'")
++
+ ################ end setup warnings ###############################
+ 
+ 
+
diff --git a/srcpkgs/sagemath/patches/08-dont_run_pytest--see_31924.patch b/srcpkgs/sagemath/patches/08-dont_run_pytest--see_31924.patch
new file mode 100644
index 000000000000..06bd2ccae6fb
--- /dev/null
+++ b/srcpkgs/sagemath/patches/08-dont_run_pytest--see_31924.patch
@@ -0,0 +1,27 @@
+ - using pytest is broken, see #31924
+
+--- a/src/bin/sage-runtests
++++ b/src/bin/sage-runtests
+@@ -154,21 +154,4 @@ if __name__ == "__main__":
+     DC = DocTestController(args, args.filenames)
+     err = DC.run()
+ 
+-    try:
+-        exit_code_pytest = 0
+-        import pytest
+-        pytest_options = ["--import-mode", "importlib"]
+-        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.")
+-
+-    if err == 0:
+-        sys.exit(exit_code_pytest)
+-    else:
+-        sys.exit(err)
++    sys.exit(err)
diff --git a/srcpkgs/sagemath/patches/09-doctest_numerical_fix.patch b/srcpkgs/sagemath/patches/09-doctest_numerical_fix.patch
new file mode 100644
index 000000000000..8780c8a97efa
--- /dev/null
+++ b/srcpkgs/sagemath/patches/09-doctest_numerical_fix.patch
@@ -0,0 +1,14 @@
+ - This fixes a doctest failure due to a small numerical issue when running
+   maxima-sbcl on 32 bit
+
+--- a/src/sage/interfaces/maxima_abstract.py
++++ b/src/sage/interfaces/maxima_abstract.py
+@@ -1525,7 +1525,7 @@ class MaximaAbstractElement(ExtraTabCompletion, InterfaceElement):
+         EXAMPLES::
+ 
+             sage: maxima('exp(-sqrt(x))').nintegral('x',0,1)
+-            (0.5284822353142306, 4.1633141378838...e-11, 231, 0)
++            (0.5284822353142306, 4.163...e-11, 231, 0)
+ 
+         Note that GP also does numerical integration, and can do so to very
+         high precision very quickly::
diff --git a/srcpkgs/sagemath/patches/10-fix_very_slow_doctest-polynomial_zmod_flint.patch b/srcpkgs/sagemath/patches/10-fix_very_slow_doctest-polynomial_zmod_flint.patch
new file mode 100644
index 000000000000..bae8387cf94a
--- /dev/null
+++ b/srcpkgs/sagemath/patches/10-fix_very_slow_doctest-polynomial_zmod_flint.patch
@@ -0,0 +1,14 @@
+--- a/src/sage/rings/polynomial/polynomial_zmod_flint.pyx
++++ b/src/sage/rings/polynomial/polynomial_zmod_flint.pyx
+@@ -237,8 +237,9 @@ cdef class Polynomial_zmod_flint(Polynomial_template):
+ 
+             sage: a = ZZ['x'](range(100000))
+             sage: R = Integers(3)['x']
+-            sage: R(a)  # long time (7s on sage.math, 2013)
+-            2*x^99998 + ... + x
++            sage: p = R(a)
++            sage: p.truncate(10)  # testing the whole poly is VERY SLOW
++            2*x^8 + x^7 + 2*x^5 + x^4 + 2*x^2 + x
+         """
+         sig_on()
+         fmpz_poly_get_nmod_poly(&self.x, x)
diff --git a/srcpkgs/sagemath/patches/11-fix_very_slow_doctest-isogeny_small_degree.patch b/srcpkgs/sagemath/patches/11-fix_very_slow_doctest-isogeny_small_degree.patch
new file mode 100644
index 000000000000..f3da5bbb555e
--- /dev/null
+++ b/srcpkgs/sagemath/patches/11-fix_very_slow_doctest-isogeny_small_degree.patch
@@ -0,0 +1,106 @@
+diff --git a/src/sage/schemes/elliptic_curves/isogeny_small_degree.py b/src/sage/schemes/elliptic_curves/isogeny_small_degree.py
+index 43727346269..9d3ccd475cd 100644
+--- a/src/sage/schemes/elliptic_curves/isogeny_small_degree.py
++++ b/src/sage/schemes/elliptic_curves/isogeny_small_degree.py
+@@ -186,7 +186,7 @@ def Psi(l, use_stored=True):
+         sage: assert Psi(3, use_stored=True) == Psi(3, use_stored=False)
+         sage: assert Psi(5, use_stored=True) == Psi(5, use_stored=False)
+         sage: assert Psi(7, use_stored=True) == Psi(7, use_stored=False)
+-        sage: assert Psi(13, use_stored=True) == Psi(13, use_stored=False) # not tested (very long time)
++        sage: assert Psi(13, use_stored=True) == Psi(13, use_stored=False)  # long time (2s)
+     """
+     if l not in [2, 3, 5, 7, 13]:
+         raise ValueError("Genus zero primes are 2, 3, 5, 7 or 13.")
+@@ -1207,7 +1207,7 @@ def isogenies_13_0(E, minimal_models=True):
+         sage: K.<a> = NumberField(f)
+         sage: E = EllipticCurve(j=K(0)); E.ainvs()
+         (0, 0, 0, 0, 1)
+-        sage: [phi.codomain().ainvs() for phi in isogenies_13_0(E)]
++        sage: [phi.codomain().ainvs() for phi in isogenies_13_0(E)]  # long time (4s)
+         [(0,
+           0,
+           20360599/165164973653422080*a^11 - 3643073/41291243413355520*a^10 - 101/8789110986240*a^9 + 5557619461/573489491852160*a^8 - 82824971/11947697746920*a^7 - 19487/21127670640*a^6 - 475752603733/29409717530880*a^5 + 87205112531/7352429382720*a^4 + 8349/521670880*a^3 + 5858744881/12764634345*a^2 - 1858703809/2836585410*a + 58759402/48906645,
+@@ -1325,7 +1325,7 @@ def isogenies_13_1728(E, minimal_models=True):
+         sage: f = x^12 + 1092*x^10 - 432432*x^8 + 6641024*x^6 - 282896640*x^4 - 149879808*x^2 - 349360128
+         sage: K.<a> = NumberField(f)
+         sage: E = EllipticCurve(K, [1,0])
+-        sage: [phi.codomain().ainvs() for phi in isogenies_13_1728(E)]
++        sage: [phi.codomain().ainvs() for phi in isogenies_13_1728(E)]  # long time (3s)
+         [(0,
+         0,
+         0,
+@@ -1550,8 +1550,11 @@ def Psi2(l):
+         sage: from sage.schemes.elliptic_curves.isogeny_small_degree import Psi2
+         sage: Psi2(11)
+         x^5 - 55*x^4*u + 994*x^3*u^2 - 8774*x^2*u^3 + 41453*x*u^4 - 928945/11*u^5 + 33*x^4 + 276*x^3*u - 7794*x^2*u^2 + 4452*x*u^3 + 1319331/11*u^4 + 216*x^3*v - 4536*x^2*u*v + 31752*x*u^2*v - 842616/11*u^3*v + 162*x^3 + 38718*x^2*u - 610578*x*u^2 + 33434694/11*u^3 - 4536*x^2*v + 73872*x*u*v - 2745576/11*u^2*v - 16470*x^2 + 580068*x*u - 67821354/11*u^2 - 185976*x*v + 14143896/11*u*v + 7533*x - 20437029/11*u - 12389112/11*v + 19964151/11
+-        sage: Psi2(71)  # long time (1 second)
+-        -2209380711722505179506258739515288584116147237393815266468076436521/71*u^210 + ... - 14790739586438315394567393301990769678157425619440464678252277649/71
++        sage: f = Psi2(71)
++        sage: f.coefficient([0, 210, 0])
++        -2209380711722505179506258739515288584116147237393815266468076436521/71
++        sage: f.coefficient([0, 0, 0])
++        -14790739586438315394567393301990769678157425619440464678252277649/71
+ 
+     TESTS::
+ 
+@@ -1665,17 +1668,17 @@ def isogenies_prime_degree_genus_plus_0(E, l=None, minimal_models=True):
+         sage: K = QuadraticField(5,'a')
+         sage: a = K.gen()
+         sage: E = EllipticCurve_from_j(184068066743177379840*a - 411588709724712960000)
+-        sage: isogenies_prime_degree_genus_plus_0(E, 47) # long time (4.3s)
++        sage: isogenies_prime_degree_genus_plus_0(E, 47)  # long time (2s)
+         [Isogeny of degree 47 from Elliptic Curve defined by y^2 = x^3 + (454562028554080355857852049849975895490560*a-1016431595837124114668689286176511361024000)*x + (-249456798429896080881440540950393713303830363999480904280965120*a+557802358738710443451273320227578156598454035482869042774016000) over Number Field in a with defining polynomial x^2 - 5 with a = 2.236067977499790? to Elliptic Curve defined by y^2 = x^3 + (39533118442361013730577638493616965245992960*a-88398740199669828340617478832005245173760000)*x + (214030321479466610282320528611562368963830105830555363061803253760*a-478586348074220699687616322532666163722004497458452316582576128000) over Number Field in a with defining polynomial x^2 - 5 with a = 2.236067977499790?]
+ 
+         sage: K = QuadraticField(-66827,'a')
+         sage: a = K.gen()
+         sage: E = EllipticCurve_from_j(-98669236224000*a + 4401720074240000)
+-        sage: isogenies_prime_degree_genus_plus_0(E, 59)   # long time (25s, 2012)
++        sage: isogenies_prime_degree_genus_plus_0(E, 59)   # long time (5s)
+         [Isogeny of degree 59 from Elliptic Curve defined by y^2 = x^3 + (2605886146782144762297974784000*a+1893681048912773634944634716160000)*x + (-116918454256410782232296183198067568744071168000*a+17012043538294664027185882358514011304812871680000) over Number Field in a with defining polynomial x^2 + 66827 with a = 258.5091874576221?*I to Elliptic Curve defined by y^2 = x^3 + (-19387084027159786821400775098368000*a-4882059104868154225052787156713472000)*x + (-25659862010101415428713331477227179429538847260672000*a-2596038148441293485938798119003462972840818381946880000) over Number Field in a with defining polynomial x^2 + 66827 with a = 258.5091874576221?*I]
+ 
+         sage: E = EllipticCurve_from_j(GF(13)(5))
+-        sage: isogenies_prime_degree_genus_plus_0(E, 71) # long time
++        sage: isogenies_prime_degree_genus_plus_0(E, 71)
+         [Isogeny of degree 71 from Elliptic Curve defined by y^2 = x^3 + x + 4 over Finite Field of size 13 to Elliptic Curve defined by y^2 = x^3 + 10*x + 7 over Finite Field of size 13, Isogeny of degree 71 from Elliptic Curve defined by y^2 = x^3 + x + 4 over Finite Field of size 13 to Elliptic Curve defined by y^2 = x^3 + 10*x + 7 over Finite Field of size 13]
+ 
+         sage: E = EllipticCurve(GF(13),[0,1,1,1,0])
+@@ -2117,11 +2120,11 @@ def isogenies_prime_degree_general(E, l, minimal_models=True):
+         sage: isogenies_prime_degree_general(E, 19)
+         [Isogeny of degree 19 from Elliptic Curve defined by y^2 + y = x^3 - 1862*x - 30956 over Rational Field to Elliptic Curve defined by y^2 + y = x^3 - 672182*x + 212325489 over Rational Field]
+         sage: E = EllipticCurve([0, -1, 0, -6288, 211072])
+-        sage: isogenies_prime_degree_general(E, 37)  # long time (10s)
++        sage: isogenies_prime_degree_general(E, 37)  # long time (2s)
+         [Isogeny of degree 37 from Elliptic Curve defined by y^2 = x^3 - x^2 - 6288*x + 211072 over Rational Field to Elliptic Curve defined by y^2 = x^3 - x^2 - 163137088*x - 801950801728 over Rational Field]
+ 
+         sage: E = EllipticCurve([-3440, 77658])
+-        sage: isogenies_prime_degree_general(E, 43)  # long time (16s)
++        sage: isogenies_prime_degree_general(E, 43)  # long time (2s)
+         [Isogeny of degree 43 from Elliptic Curve defined by y^2 = x^3 - 3440*x + 77658 over Rational Field to Elliptic Curve defined by y^2 = x^3 - 6360560*x - 6174354606 over Rational Field]
+ 
+     Isogenies of degree equal to the characteristic are computed (but
+@@ -2175,7 +2178,7 @@ def isogenies_prime_degree_general(E, l, minimal_models=True):
+ 
+         sage: K.<i> = QuadraticField(-1)
+         sage: E = EllipticCurve(K,[0,0,0,1,0])
+-        sage: [phi.codomain().ainvs() for phi in E.isogenies_prime_degree(37)] # long time
++        sage: [phi.codomain().ainvs() for phi in E.isogenies_prime_degree(37)]  # long time (6s)
+         [(0, 0, 0, -840*i + 1081, 0), (0, 0, 0, 840*i + 1081, 0)]
+     """
+     if not l.is_prime():
+@@ -2329,14 +2332,14 @@ def isogenies_prime_degree(E, l, minimal_models=True):
+         sage: E = EllipticCurve(GF(101), [-3440, 77658])
+         sage: E.isogenies_prime_degree(71) # fast
+         []
+-        sage: E.isogenies_prime_degree(73) # slower (2s)
++        sage: E.isogenies_prime_degree(73)  # long time (2s)
+         []
+ 
+     Test that :trac:`32269` is fixed::
+ 
+         sage: K = QuadraticField(-11)
+         sage: E = EllipticCurve(K, [0,1,0,-117,-541])
+-        sage: E.isogenies_prime_degree(37)
++        sage: E.isogenies_prime_degree(37)  # long time (9s)
+         [Isogeny of degree 37 from Elliptic Curve defined by y^2 = x^3 + x^2 + (-117)*x + (-541) over Number Field in a with defining polynomial x^2 + 11 with a = 3.316624790355400?*I to Elliptic Curve defined by y^2 = x^3 + x^2 + (30800*a+123963)*x + (3931312*a-21805005) over Number Field in a with defining polynomial x^2 + 11 with a = 3.316624790355400?*I,
+          Isogeny of degree 37 from Elliptic Curve defined by y^2 = x^3 + x^2 + (-117)*x + (-541) over Number Field in a with defining polynomial x^2 + 11 with a = 3.316624790355400?*I to Elliptic Curve defined by y^2 = x^3 + x^2 + (-30800*a+123963)*x + (-3931312*a-21805005) over Number Field in a with defining polynomial x^2 + 11 with a = 3.316624790355400?*I]
+ 
diff --git a/srcpkgs/sagemath/patches/12-fix_very_slow_doctest-function_field.patch b/srcpkgs/sagemath/patches/12-fix_very_slow_doctest-function_field.patch
new file mode 100644
index 000000000000..3b7b1ea843df
--- /dev/null
+++ b/srcpkgs/sagemath/patches/12-fix_very_slow_doctest-function_field.patch
@@ -0,0 +1,97 @@
+--- a/src/sage/rings/function_field/function_field.py
++++ b/src/sage/rings/function_field/function_field.py
+@@ -111,22 +111,21 @@ Function fields over the algebraic field are supported::
+     sage: m = L.completion(pl, prec=5)
+     sage: m(x)
+     I + s + O(s^5)
+-    sage: m(y)
++    sage: m(y)                             # long time (4s)
+     -2*s + (-4 - I)*s^2 + (-15 - 4*I)*s^3 + (-75 - 23*I)*s^4 + (-413 - 154*I)*s^5 + O(s^6)
+-    sage: m(y)^2 + m(y) + m(x) + 1/m(x)
++    sage: m(y)^2 + m(y) + m(x) + 1/m(x)    # long time (8s)
+     O(s^5)
+ 
+ TESTS::
+ 
+     sage: TestSuite(J).run()
+-    sage: TestSuite(K).run(max_runs=1024) # long time (5s)
+-    sage: TestSuite(L).run(max_runs=64)   # long time (10s)
+-    sage: TestSuite(M).run(max_runs=32)   # long time (30s)
+-    sage: TestSuite(N).run(max_runs=64, skip = '_test_derivation')  # long time (8s)
+-    sage: TestSuite(O).run(max_runs=128, skip = '_test_derivation') # long time (8s)
+-
++    sage: TestSuite(K).run(max_runs=256)   # long time (10s)
++    sage: TestSuite(L).run(max_runs=8)     # long time (25s)
++    sage: TestSuite(M).run(max_runs=8)     # long time (35s)
++    sage: TestSuite(N).run(max_runs=8, skip = '_test_derivation')    # long time (15s)
++    sage: TestSuite(O).run()
+     sage: TestSuite(R).run()
+-    sage: TestSuite(S).run() # long time (3s)
++    sage: TestSuite(S).run()               # long time (4s)
+ 
+ Global function fields
+ ----------------------
+@@ -287,7 +286,7 @@ class FunctionField(Field):
+         TESTS::
+ 
+             sage: K.<x> = FunctionField(QQ)
+-            sage: TestSuite(K).run()
++            sage: TestSuite(K).run()               # long time (3s)
+         """
+         Field.__init__(self, base_field, names=names, category=category)
+ 
+@@ -729,7 +728,7 @@ class FunctionField(Field):
+         EXAMPLES::
+ 
+             sage: K.<x> = FunctionField(QQ)
+-            sage: TestSuite(K).run() # indirect doctest
++            sage: TestSuite(K).run()    # indirect doctest, long time (3s)
+         """
+         tester = self._tester(**options)
+         S = tester.some_elements()
+@@ -1209,7 +1208,7 @@ class FunctionField_polymod(FunctionField):
+             sage: K.<x> = FunctionField(QQ); R.<y> = K[]
+             sage: L = K.extension(y^5 - x^3 - 3*x + x*y); L
+             Function field in y defined by y^5 + x*y - x^3 - 3*x
+-            sage: TestSuite(L).run()  # long time
++            sage: TestSuite(L).run(max_runs=512)   # long time (15s)
+ 
+         We can set the variable name, which doesn't have to be y::
+ 
+@@ -2888,7 +2887,8 @@ class FunctionField_simple(FunctionField_polymod):
+             sage: F.<y> = K.extension(Y^3 - x^2*(x^2 + x + 1)^2)
+             sage: O = K.maximal_order()
+             sage: pls = [O.ideal(x-QQbar(sqrt(c))).place() for c in [-2, -1, 0, 1, 2]]
+-            sage: all(q.place_below() == p for p in pls for q in F.places_above(p))
++            sage: all(q.place_below() == p         # long time (4s)
++            ....:     for p in pls for q in F.places_above(p))
+             True
+         """
+         R = self.base_field()
+@@ -3091,7 +3091,7 @@ class FunctionField_global(FunctionField_simple):
+ 
+         sage: K.<x> = FunctionField(GF(4)); _.<Y> = K[]
+         sage: L.<y> = K.extension((1 - x)*Y^7 - x^3)
+-        sage: L.gaps()
++        sage: L.gaps()                         # long time (6s)
+         [1, 2, 3]
+ 
+     or may define a trivial extension::
+@@ -3111,7 +3111,7 @@ class FunctionField_global(FunctionField_simple):
+ 
+             sage: K.<x> = FunctionField(GF(5)); _.<Y> = K[]
+             sage: L.<y> = K.extension(Y^3 - (x^3 - 1)/(x^3 - 2))
+-            sage: TestSuite(L).run()
++            sage: TestSuite(L).run()               # long time (7s)
+         """
+         FunctionField_polymod.__init__(self, polynomial, names)
+ 
+@@ -3807,7 +3807,7 @@ class RationalFunctionField(FunctionField):
+ 
+             sage: K.<t> = FunctionField(CC); K
+             Rational function field in t over Complex Field with 53 bits of precision
+-            sage: TestSuite(K).run()
++            sage: TestSuite(K).run()               # long time (5s)
+ 
+             sage: FunctionField(QQ[I], 'alpha')
+             Rational function field in alpha over Number Field in I with defining polynomial x^2 + 1 with I = 1*I
diff --git a/srcpkgs/sagemath/patches/trac-33189-fix_doctests_for_arb_2.22-53532ddd4e2dc92469c1590ebf0c40f8f69bf579.patch b/srcpkgs/sagemath/patches/trac-33189-fix_doctests_for_arb_2.22-53532ddd4e2dc92469c1590ebf0c40f8f69bf579.patch
new file mode 100644
index 000000000000..b861af7ec982
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33189-fix_doctests_for_arb_2.22-53532ddd4e2dc92469c1590ebf0c40f8f69bf579.patch
@@ -0,0 +1,126 @@
+From 24cc94b1988a90f3bd22a2368ec30c086283af13 Mon Sep 17 00:00:00 2001
+From: Antonio Rojas <arojas@archlinux.org>
+Date: Sun, 16 Jan 2022 11:55:04 +0100
+Subject: Add abs tol to some arb tests
+
+---
+ src/sage/functions/error.py    |  2 +-
+ src/sage/rings/complex_arb.pyx |  6 +++---
+ src/sage/rings/real_arb.pyx    | 10 +++++-----
+ 3 files changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/src/sage/functions/error.py b/src/sage/functions/error.py
+index f48d04f..06f0b24 100644
+--- a/src/sage/functions/error.py
++++ b/src/sage/functions/error.py
+@@ -267,7 +267,7 @@ class Function_erf(BuiltinFunction):
+ 
+         Check that real ball evaluation is fixed :trac:`28061`::
+ 
+-            sage: RealBallField(128)(erf(5))
++            sage: RealBallField(128)(erf(5)) # abs tol 1e-38
+             [0.99999999999846254020557196514981165651 +/- 7.33e-39]
+         """
+         R = parent or s_parent(x)
+diff --git a/src/sage/rings/complex_arb.pyx b/src/sage/rings/complex_arb.pyx
+index f986970..93ff565 100644
+--- a/src/sage/rings/complex_arb.pyx
++++ b/src/sage/rings/complex_arb.pyx
+@@ -3974,8 +3974,8 @@ cdef class ComplexBall(RingElement):
+ 
+         EXAMPLES::
+ 
+-            sage: CBF(20).erfc()
+-            [5.39586561160790e-176 +/- ...e-191]
++            sage: CBF(20).erfc() # abs tol 1e-190
++            [5.39586561160790e-176 +/- 6.73e-191]
+             sage: CBF(100, 100).erfc()
+             [0.00065234366376858 +/- ...e-18] + [-0.00393572636292141 +/- ...e-18]*I
+         """
+@@ -4280,7 +4280,7 @@ cdef class ComplexBall(RingElement):
+ 
+         TESTS:
+ 
+-            sage: CBF(Shi(I))
++            sage: CBF(Shi(I)) # abs tol 1e-15
+             [0.946083070367183 +/- 9.22e-16]*I
+         """
+         cdef ComplexBall result = self._new()
+diff --git a/src/sage/rings/real_arb.pyx b/src/sage/rings/real_arb.pyx
+index 4a81784..292bfea 100644
+--- a/src/sage/rings/real_arb.pyx
++++ b/src/sage/rings/real_arb.pyx
+@@ -3506,7 +3506,7 @@ cdef class RealBall(RingElement):
+ 
+         EXAMPLES::
+ 
+-            sage: RBF(1/2).erf()
++            sage: RBF(1/2).erf() # abs tol 1e-16
+             [0.520499877813047 +/- 6.10e-16]
+         """
+         cdef RealBall res = self._new()
+@@ -3556,12 +3556,12 @@ cdef class RealBall(RingElement):
+ 
+         EXAMPLES::
+ 
+-            sage: RBF(1).Si()
++            sage: RBF(1).Si() # abs tol 1e-15
+             [0.946083070367183 +/- 9.22e-16]
+ 
+         TESTS::
+ 
+-            sage: RBF(Si(1))
++            sage: RBF(Si(1)) # abs tol 1e-15
+             [0.946083070367183 +/- 9.22e-16]
+         """
+         cdef RealBall res = self._new()
+@@ -3578,12 +3578,12 @@ cdef class RealBall(RingElement):
+ 
+         EXAMPLES::
+ 
+-            sage: RBF(1).Ci()  # abs tol 1e-16
++            sage: RBF(1).Ci()  # abs tol 1e-15
+             [0.337403922900968 +/- 3.25e-16]
+ 
+         TESTS::
+ 
+-            sage: RBF(Ci(1))  # abs tol 1e-16
++            sage: RBF(Ci(1))  # abs tol 1e-15
+             [0.337403922900968 +/- 3.25e-16]
+         """
+         cdef RealBall res = self._new()
+-- 
+cgit v1.0-1-gd88e
+
+
+From 53532ddd4e2dc92469c1590ebf0c40f8f69bf579 Mon Sep 17 00:00:00 2001
+From: Antonio Rojas <arojas@archlinux.org>
+Date: Sun, 16 Jan 2022 14:16:53 +0100
+Subject: Decrease abs tol
+
+---
+ src/sage/rings/real_arb.pyx | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/sage/rings/real_arb.pyx b/src/sage/rings/real_arb.pyx
+index 292bfea..eb30f7f 100644
+--- a/src/sage/rings/real_arb.pyx
++++ b/src/sage/rings/real_arb.pyx
+@@ -3578,12 +3578,12 @@ cdef class RealBall(RingElement):
+ 
+         EXAMPLES::
+ 
+-            sage: RBF(1).Ci()  # abs tol 1e-15
++            sage: RBF(1).Ci()  # abs tol 5e-16
+             [0.337403922900968 +/- 3.25e-16]
+ 
+         TESTS::
+ 
+-            sage: RBF(Ci(1))  # abs tol 1e-15
++            sage: RBF(Ci(1))  # abs tol 5e-16
+             [0.337403922900968 +/- 3.25e-16]
+         """
+         cdef RealBall res = self._new()
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/trac-33226-fix_doctests_giac-1.7.0-33ea2adf01e9e2ce9f1e33779f0b1ac0d9d1989c.patch b/srcpkgs/sagemath/patches/trac-33226-fix_doctests_giac-1.7.0-33ea2adf01e9e2ce9f1e33779f0b1ac0d9d1989c.patch
new file mode 100644
index 000000000000..d4e8f8be60e3
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33226-fix_doctests_giac-1.7.0-33ea2adf01e9e2ce9f1e33779f0b1ac0d9d1989c.patch
@@ -0,0 +1,40 @@
+From 33ea2adf01e9e2ce9f1e33779f0b1ac0d9d1989c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 24 Jan 2022 09:03:29 -0500
+Subject: Trac #33226: update doctests for giac-1.7.0.45.
+
+We have two failing doctests with giac-1.7.0.45: one is a trivial
+tolerance issue, but the other is a symbolic integration result for
+which giac is no longer willing to return a symbolic answer. We add
+"abs tol" to the numeric test, and drop the symbolic one entirely.
+---
+ src/sage/functions/min_max.py | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/sage/functions/min_max.py b/src/sage/functions/min_max.py
+index fc18373..9b7d6d9 100644
+--- a/src/sage/functions/min_max.py
++++ b/src/sage/functions/min_max.py
+@@ -228,15 +228,15 @@ class MaxSymbolic(MinMax_base):
+             ...
+             TypeError: cannot evaluate symbolic expression numerically
+ 
+-        ::
++        We can usually integrate these expressions, but can't
++        guarantee a symbolic answer in closed form::
+ 
+             sage: f = max_symbolic(sin(x), cos(x))
+             sage: r = integral(f, x, 0, 1)
+             ...
+-            sage: r
+-            sqrt(2) - cos(1)
+-            sage: r.n()
++            sage: r.n()  # abs tol 1e-8
+             0.873911256504955
++
+         """
+         return max_symbolic(args)
+ 
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-loadable_module_extension.patch b/srcpkgs/sagemath/patches/zzz-loadable_module_extension.patch
new file mode 100644
index 000000000000..f3eb0aad2cca
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-loadable_module_extension.patch
@@ -0,0 +1,14 @@
+ - this is not a proper fix... should fix sage_getfile() instead
+
+--- a/src/sage/misc/sageinspect.py
++++ b/src/sage/misc/sageinspect.py
+@@ -187,7 +187,8 @@ def loadable_module_extension():
+         True
+     """
+     # Return the full platform-specific extension module suffix
+-    return import_machinery.EXTENSION_SUFFIXES[0]
++    # PATCHED for void linux, we use the shortest extension (.so)
++    return import_machinery.EXTENSION_SUFFIXES[-1]
+ 
+ 
+ def isclassinstance(obj):
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_no_threejs.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_no_threejs.patch
new file mode 100644
index 000000000000..5cb62f56e902
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_no_threejs.patch
@@ -0,0 +1,13 @@
+ - we don't have threejs in void
+
+--- a/src/sage/repl/ipython_kernel/install.py
++++ b/src/sage/repl/ipython_kernel/install.py
+@@ -124,7 +124,7 @@ class SageKernelSpec(object):
+             sage: spec = SageKernelSpec(prefix=tmp_dir())
+             sage: spec.use_local_threejs()
+             sage: threejs = os.path.join(spec.nbextensions_dir, 'threejs-sage')
+-            sage: os.path.isdir(threejs)
++            sage: os.path.isdir(threejs)    # optional - threejs
+             True
+         """
+         src = THREEJS_DIR
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
new file mode 100644
index 000000000000..710a9e80c052
--- /dev/null
+++ b/srcpkgs/sagemath/template
@@ -0,0 +1,129 @@
+# Template file for 'sagemath'
+pkgname=sagemath
+version=9.5
+revision=1
+wrksrc=sage-$version
+build_wrksrc=pkgs/sagemath-standard
+build_style=python3-module
+_bindir=/usr/lib/sagemath/bin
+make_install_args="--install-scripts=$_bindir"
+hostmakedepends="m4 pkg-config python3-Cython python3-Jinja2 python3-pkgconfig
+ python3-setuptools"
+makedepends="arb-devel boost-devel brial-devel cliquer-devel ecl eclib-devel
+ ecm-devel fflas-ffpack flintlib-devel gap-devel gd-devel giac-devel glpk-devel
+ gsl-devel iml-devel lcalc-devel libbraiding-devel libhomfly-devel libmpc-devel
+ libpng-devel linbox-devel lrcalc-devel m4ri-devel m4rie-devel mpfi-devel
+ mpfr-devel ntl-devel openblas-devel pari-devel planarity-devel python3-cypari2
+ python3-cysignals python3-devel python3-gmpy2 python3-memory_allocator
+ python3-numpy rankwidth-devel singular symmetrica-devel zn_poly"
+depends="FlintQS eclib-devel fflas-ffpack flintlib-devel gcc-fortran gd-devel
+ gfan giac gsl-devel gzip libpng-devel linbox-devel m4ri-devel maxima-ecl
+ mpfr-devel nauty ntl-devel palp pari-devel pari-elldata-small pari-galdata
+ pari-galpol-small pari-seadata-small pkg-config python3-Cython python3-cypari2
+ python3-cysignals python3-devel python3-fpylll python3-ipython
+ python3-ipython_ipykernel python3-jupyter_ipywidgets python3-matplotlib
+ python3-memory_allocator python3-networkx python3-pip python3-pkgconfig
+ python3-pplpy python3-primecountpy python3-requests python3-scipy
+ python3-sympy python3-traitlets sage-data-combinatorial_designs
+ sage-data-conway_polynomials sage-data-elliptic_curves sage-data-graphs
+ sage-data-polytopes_db sympow tachyon"
+checkdepends="$depends"
+short_desc="Open source mathematics software"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-2.0-or-later"
+homepage="http://sagemath.org/"
+distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
+checksum=8d70a3b26080802c5b2e33dda4c23795d494d8216a0c2ecfcd608ebab0e64ff6
+
+post_patch() {
+	# these are unused and nothing else uses ratpoints
+	rm sage/libs/ratpoints.{pyx,pxd}
+
+	# git tree needs bootstrapping
+	pushd $wrksrc/build/pkgs/sagelib
+	PATH=../../bin:$PATH BOOTSTRAP_QUIET=no ./bootstrap
+	popd
+}
+
+do_configure() {
+	# set variables in sage.env since we do not install sage_conf
+	cat >> sage/env.py <<-EOF
+	CONWAY_POLYNOMIALS_DATA_DIR = "/usr/share/sagemath/conway_polynomials"
+	GRAPHS_DATA_DIR = "/usr/share/sagemath/graphs"
+	ELLCURVE_DATA_DIR = "/usr/share/sagemath/ellcurves"
+	POLYTOPE_DATA_DIR = "/usr/share/sagemath/reflexive_polytopes"
+	COMBINATORIAL_DESIGN_DATA_DIR = "/usr/share/sagemath/combinatorial_designs"
+	CREMONA_MINI_DATA_DIR = "/usr/share/sagemath/cremona"
+	CREMONA_LARGE_DATA_DIR = "/usr/share/sagemath/cremona"
+	EOF
+
+	# don't install sage-venv-config: it is used to set SAGE_VENV=/usr and
+	# then sage-env prepends "$SAGE_VENV/bin" to PATH which is undesired
+	vsed -e '/sage-venv-config/d' -i $wrksrc/src/setup.cfg
+}
+
+pre_build() {
+	export PYTHONPATH=../sage-setup
+	export SAGE_NUM_THREADS="$XBPS_MAKEJOBS"
+}
+
+post_build() {
+	_scripts=$(cd build/scripts* && pwd)
+	cat >> $_scripts/sage-env-config <<-'EOF'
+	PATH=$(dirname $SELF):$PATH
+	EOF
+}
+
+pre_install() {
+	export PYTHONPATH=../sage-setup
+	export SAGE_NUM_THREADS="$XBPS_MAKEJOBS"
+}
+
+post_install() {
+	# fix jupyter kernel spec
+	vsed -i -e 's|"/usr/bin/sage", "--python"|"/usr/bin/python"|' \
+		${DESTDIR}/usr/share/jupyter/kernels/sagemath/kernel.json
+	# replace broken symlinks by good copies (sagemath logo images)
+	for file in $(ls sage/ext_data/notebook-ipython); do
+		rm ${DESTDIR}/usr/share/jupyter/kernels/sagemath/$file
+		cp -a sage/ext_data/notebook-ipython/$file \
+			${DESTDIR}/usr/share/jupyter/kernels/sagemath
+	done
+	# we don't have docs here
+	rm ${DESTDIR}/usr/share/jupyter/kernels/sagemath/doc
+	# we don't have threejs in void
+	rm ${DESTDIR}/usr/share/jupyter/nbextensions/threejs-sage
+
+	# symlink main binary
+	vmkdir usr/bin
+	ln -s $_bindir/sage ${DESTDIR}/usr/bin/sage-${version}
+	ln -s sage-${version} ${DESTDIR}/usr/bin/sage
+}
+
+do_check() {
+	_scripts=$(cd build/scripts* && pwd)
+	export PYTHONPATH=$(cd build/lib* && pwd)
+
+	# get out of $build_wrksrc, otherwise python picks the wrong sage module
+	cd $(mktemp -dp build)
+
+	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
+		_sed='s|#.*||;/^\s*$/d;s|[^ ]*/sage/|'$PYTHONPATH'/sage/|g' \
+		_test_files=$(sed -e "$_sed" ${XBPS_DISTDIR}/sagemath-check)
+	fi
+	if [ -z "$_test_files" ]; then
+		_test_files=--all
+	fi
+	cp ${FILESDIR}/timings2.json .
+	_test_args="--stats_path=timings2.json"
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		_test_args+=" --long --warn-long 60.0"
+	else
+		_test_args+=" --warn-long 30.0"
+	fi
+	if [ "$XBPS_BUILD_ENVIRONMENT" = "void-packages-ci" ]; then
+		# for CI use a predictable random seed
+		_test_args+=" --random-seed=0"
+	fi
+	$_scripts/sage -tp ${XBPS_MAKEJOBS} ${_test_args} ${_test_files}
+}

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [WIP] New package: sagemath-9.5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (243 preceding siblings ...)
  2022-02-02 21:03 ` [PR PATCH] [Updated] " tornaria
@ 2022-02-02 21:41 ` tornaria
  2022-02-03  0:31 ` tornaria
                   ` (3 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-02-02 21:41 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1028384675

Comment:
I updated this branch to the new "sage-as-a-python-module" version from #35339 which seems to work very well.

The previous approach with its full history is at https://github.com/tornaria/void-packages/tree/sagemath-v1, rebased to current master. I won't be updating or rebasing it further.

Assuming CI passes (should take about 2h to finish), this PR is done and ready to merge. Any problems we find later we can follow up in individual issues, please @ me so I'm notified.

We have:
 - 11 patches which can be upstreamed, I'll work on that.
 - 2 patches are taken from positive_review tickets in sage trac, should be merged soon.
 - only 2 are void specific, no patches that are musl specific.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: New package: sagemath-9.5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (244 preceding siblings ...)
  2022-02-02 21:41 ` tornaria
@ 2022-02-03  0:31 ` tornaria
  2022-02-03  2:48 ` tornaria
                   ` (2 subsequent siblings)
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-02-03  0:31 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1028487601

Comment:
Note that #35367 should be merged before this so that the binary package of sagemath runs ok on older cpus (e.g. nehalem).

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: New package: sagemath-9.5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (245 preceding siblings ...)
  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
  248 siblings, 0 replies; 250+ messages in thread
From: tornaria @ 2022-02-03  2:48 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1028552182

Comment:
BTW, doctesting with `--long` on my nehalem box finished: after #35367 all tests passed using the packages for nauty and sagemath built on the cascade lake. No more illegal instructions found.

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: [PR PATCH] [Merged]: New package: sagemath-9.5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (246 preceding siblings ...)
  2022-02-03  2:48 ` tornaria
@ 2022-02-03 13:31 ` leahneukirchen
  2022-02-03 15:41 ` Vindaar
  248 siblings, 0 replies; 250+ messages in thread
From: leahneukirchen @ 2022-02-03 13:31 UTC (permalink / raw)
  To: ml

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

There's a merged pull request on the void-packages repository

New package: sagemath-9.5
https://github.com/void-linux/void-packages/pull/34030

Description:
This is WIP, so I can get feedback.

Supported architectures: x86_64, x86_64-musl, i686. We also try to make sure it works with musl-1.2.

The testsuite can be run normal (-Q) or long (-K). For CI it runs normal (~ 1/2 time) and it uses a fixed random seed 0 to avoid random failures. When running locally, the random seed is random so one may get occasional test failures that depend on a particular value of the random seed.

The package `sagemath-test` is a dummy package whose purpose is to run the testsuite with sage installed as a package and without the build directory. For this to make sense, the masterdir has to be clean (without traces of the sagemath build, this should be ok after running "pkg" or "pkg -Q").

^ permalink raw reply	[flat|nested] 250+ messages in thread

* Re: New package: sagemath-9.5
  2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
                   ` (247 preceding siblings ...)
  2022-02-03 13:31 ` [PR PATCH] [Merged]: " leahneukirchen
@ 2022-02-03 15:41 ` Vindaar
  248 siblings, 0 replies; 250+ messages in thread
From: Vindaar @ 2022-02-03 15:41 UTC (permalink / raw)
  To: ml

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

New comment by Vindaar on void-packages repository

https://github.com/void-linux/void-packages/pull/34030#issuecomment-1029120333

Comment:
Huge thank you @tornaria! This is amazing and really appreciated! All working fine on my end.

^ permalink raw reply	[flat|nested] 250+ messages in thread

end of thread, other threads:[~2022-02-03 15:41 UTC | newest]

Thread overview: 250+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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).