[arch-commits] Commit in sagemath/repos/community-x86_64 (13 files)

Antonio Rojas arojas at gemini.archlinux.org
Sun Nov 7 10:12:21 UTC 2021


    Date: Sunday, November 7, 2021 @ 10:12:21
  Author: arojas
Revision: 1038465

archrelease: copy trunk to community-x86_64

Added:
  sagemath/repos/community-x86_64/PKGBUILD
    (from rev 1038464, sagemath/trunk/PKGBUILD)
  sagemath/repos/community-x86_64/latte-count.patch
    (from rev 1038464, sagemath/trunk/latte-count.patch)
  sagemath/repos/community-x86_64/sagemath-lcalc2.patch
    (from rev 1038464, sagemath/trunk/sagemath-lcalc2.patch)
  sagemath/repos/community-x86_64/sagemath-lrcalc2.patch
    (from rev 1038464, sagemath/trunk/sagemath-lrcalc2.patch)
  sagemath/repos/community-x86_64/sagemath-mpmath.patch
    (from rev 1038464, sagemath/trunk/sagemath-mpmath.patch)
  sagemath/repos/community-x86_64/sagemath-optional-packages.patch
    (from rev 1038464, sagemath/trunk/sagemath-optional-packages.patch)
  sagemath/repos/community-x86_64/test-optional.patch
    (from rev 1038464, sagemath/trunk/test-optional.patch)
Deleted:
  sagemath/repos/community-x86_64/PKGBUILD
  sagemath/repos/community-x86_64/latte-count.patch
  sagemath/repos/community-x86_64/sagemath-lcalc2.patch
  sagemath/repos/community-x86_64/sagemath-lrcalc2.patch
  sagemath/repos/community-x86_64/sagemath-optional-packages.patch
  sagemath/repos/community-x86_64/test-optional.patch

----------------------------------+
 PKGBUILD                         |  201 +++---
 latte-count.patch                |  178 ++---
 sagemath-lcalc2.patch            | 1014 ++++++++++++++++----------------
 sagemath-lrcalc2.patch           | 1146 ++++++++++++++++++-------------------
 sagemath-mpmath.patch            |   14 
 sagemath-optional-packages.patch |   34 -
 test-optional.patch              |   50 -
 7 files changed, 1328 insertions(+), 1309 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2021-11-07 10:12:03 UTC (rev 1038464)
+++ PKGBUILD	2021-11-07 10:12:21 UTC (rev 1038465)
@@ -1,98 +0,0 @@
-# Maintainer: Antonio Rojas <arojas at archlinux.org>
-# Contributor: Evgeniy Alekseev <arcanis.arch at gmail dot com>
-# Contributor: Daniel Wallace <danielwallace at gtmanfred dot com>
-# Contributor: Thomas Dziedzic <gostrc at gmail dot com>
-# Contributor: Osman Ugus <ugus11 at yahoo dot com>
-# Contributor: Stefan Husmann <stefan-husmann at t-online dot de>
-
-pkgname=sagemath
-pkgver=9.4
-pkgrel=1
-pkgdesc='Open Source Mathematics Software, free alternative to Magma, Maple, Mathematica, and Matlab'
-arch=(x86_64)
-url='http://www.sagemath.org'
-license=(GPL)
-depends=(palp brial cliquer maxima-ecl gfan sympow nauty python-rpy2 python-fpylll python-psutil python-cypari2
-  python-matplotlib python-scipy python-sympy python-networkx python-pplpy python-sphinx python-ipywidgets python-memory-allocator
-  gap flintqs lcalc lrcalc arb eclib zn_poly gd python-cvxopt pynac linbox m4rie pari-galdata pari-seadata-small planarity rankwidth tachyon
-  sage-data-combinatorial_designs sage-data-elliptic_curves sage-data-graphs sage-data-polytopes_db sage-data-conway_polynomials
-  iml giac libhomfly libbraiding symmetrica threejs-sage)
-optdepends=('cython: to compile cython code' 'python-pkgconfig: to compile cython code'
-  'jmol: alternative 3D plot engine' 'jupyter-jsmol: alternative 3D plot engine in the Jupyter notebook'
-  'sagemath-doc: HTML documentation' 'python-igraph: igraph backend for graph theory'
-  'sage-numerical-backends-coin: COIN mixed integer linear programming backend'
-  'coin-or-csdp: for computing Lovász theta-function of graphs'
-  'buckygen: for generating fullerene graphs' 'plantri: for generating some classes of graphs' 'benzene: for generating fusenes and benzenoids'
-  'ffmpeg: to export animations to video' 'imagemagick: to show animations'
-  'coxeter: Coxeter groups implementation'
-  'rubiks: Rubiks cube algorithms'
-  'lrs: Algorithms for linear reverse search used in game theory and for computing volume of polytopes'
-  'python-pynormaliz: Normaliz backend for polyhedral computations'
-  'latte-integrale: integral point count in polyhedra' 'python-jupymake: polymake backend for polyhedral computations'
-  'shared_meataxe: faster matrix arithmetic over finite fields' 'openblas: faster linear algebra'
-  'sirocco: for computing the fundamental group of the complement of a plane curve' 'primecount: faster prime_pi implementation'
-  'dot2tex: for displaying some diagrams' 'cryptominisat5: SAT solver' 'python-pycosat: picosat SAT solver'
-  'python-pip: to install optional packages with sage -pip' 'sage-notebook-exporter: convert flask notebooks to Jupyter')
-makedepends=(cython boost ratpoints python-jinja sirocco mcqd coxeter bliss tdlib python-pkgconfig shared_meataxe primecount)
-conflicts=(sagemath-jupyter)
-replaces=(sagemath-jupyter)
-source=(https://github.com/sagemath/sage/archive/$pkgver/$pkgname-$pkgver.tar.gz
-        sagemath-optional-packages.patch
-        latte-count.patch
-        test-optional.patch
-        sagemath-lrcalc2.patch
-        sagemath-lcalc2.patch)
-sha256sums=('47190f37e679c2483dadc13112595bacb399dfe4c4a0cde18d3627f5b2db0ea5'
-            '665fc76fa57b1c50f122a8d1874e187afc97a9120921706176b63da3d9d30651'
-            '88e944f23c3b2391dc2e9f9be8e1131152d837dc8c829dfc714663869a272e81'
-            'af984186f852d2847d770a18fb6822296c50a652dbf55a1ed59d27517c3d3ee4'
-            '240ac4c29d96d56407a20e1b7f9846e342a7eb2bb4edd6e5c86b3b5a8ff462f9'
-            '791b3f2c6e5529b09c3abf2f9703b6cf754d633a7a4177645b70b72ea014135a')
-
-prepare(){
-  cd sage-$pkgver
-
-# Upstream patches
-# Replace lrcalc.pyx with a wrapper over lrcalc's python bindings https://trac.sagemath.org/ticket/31355
-  patch -p1 -i ../sagemath-lrcalc2.patch
-# Port to lcalc 2 https://trac.sagemath.org/ticket/32037
-  patch -p1 -i ../sagemath-lcalc2.patch
-
-# Arch-specific patches
-# assume all optional packages are installed
-  patch -p1 -i ../sagemath-optional-packages.patch
-# don't list optional packages when running tests
-  patch -p1 -i ../test-optional.patch
-# use correct latte-count binary name
-  patch -p1 -i ../latte-count.patch
-
-  cd build/pkgs/sagelib
-  ./bootstrap
-}
-
-build() {
-  cd sage-$pkgver/pkgs/sagemath-standard
-
-  export SAGE_NUM_THREADS=10
-  python setup.py build
-}
-
-package() {
-  cd sage-$pkgver/pkgs/sagemath-standard
-
-  python setup.py install --root="$pkgdir" --optimize=1
-
-# Remove sage_setup
-  rm -r "$pkgdir"/usr/lib/python*/site-packages/sage_setup
-
-# 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
-
-# adjust threejs version
-  rm "$pkgdir"$_pythonpath/sage/ext_data/threejs/threejs-version.txt
-  ln -s /usr/share/threejs-sage/version "$pkgdir"$_pythonpath/sage/ext_data/threejs/threejs-version.txt
-}

Copied: sagemath/repos/community-x86_64/PKGBUILD (from rev 1038464, sagemath/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2021-11-07 10:12:21 UTC (rev 1038465)
@@ -0,0 +1,103 @@
+# Maintainer: Antonio Rojas <arojas at archlinux.org>
+# Contributor: Evgeniy Alekseev <arcanis.arch at gmail dot com>
+# Contributor: Daniel Wallace <danielwallace at gtmanfred dot com>
+# Contributor: Thomas Dziedzic <gostrc at gmail dot com>
+# Contributor: Osman Ugus <ugus11 at yahoo dot com>
+# Contributor: Stefan Husmann <stefan-husmann at t-online dot de>
+
+pkgname=sagemath
+pkgver=9.4
+pkgrel=2
+pkgdesc='Open Source Mathematics Software, free alternative to Magma, Maple, Mathematica, and Matlab'
+arch=(x86_64)
+url='http://www.sagemath.org'
+license=(GPL)
+depends=(palp brial cliquer maxima-ecl gfan sympow nauty python-rpy2 python-fpylll python-psutil python-cypari2
+  python-matplotlib python-scipy python-sympy python-networkx python-pplpy python-sphinx python-ipywidgets python-memory-allocator
+  gap flintqs lcalc lrcalc arb eclib zn_poly gd python-cvxopt pynac linbox m4rie pari-galdata pari-seadata-small planarity rankwidth tachyon
+  sage-data-combinatorial_designs sage-data-elliptic_curves sage-data-graphs sage-data-polytopes_db sage-data-conway_polynomials
+  iml giac libhomfly libbraiding symmetrica threejs-sage)
+optdepends=('cython: to compile cython code' 'python-pkgconfig: to compile cython code'
+  'jmol: alternative 3D plot engine' 'jupyter-jsmol: alternative 3D plot engine in the Jupyter notebook'
+  'sagemath-doc: HTML documentation' 'python-igraph: igraph backend for graph theory'
+  'sage-numerical-backends-coin: COIN mixed integer linear programming backend'
+  'coin-or-csdp: for computing Lovász theta-function of graphs'
+  'buckygen: for generating fullerene graphs' 'plantri: for generating some classes of graphs' 'benzene: for generating fusenes and benzenoids'
+  'ffmpeg: to export animations to video' 'imagemagick: to show animations'
+  'coxeter: Coxeter groups implementation'
+  'rubiks: Rubiks cube algorithms'
+  'lrs: Algorithms for linear reverse search used in game theory and for computing volume of polytopes'
+  'python-pynormaliz: Normaliz backend for polyhedral computations'
+  'latte-integrale: integral point count in polyhedra' 'python-jupymake: polymake backend for polyhedral computations'
+  'shared_meataxe: faster matrix arithmetic over finite fields' 'openblas: faster linear algebra'
+  'sirocco: for computing the fundamental group of the complement of a plane curve' 'primecount: faster prime_pi implementation'
+  'dot2tex: for displaying some diagrams' 'cryptominisat5: SAT solver' 'python-pycosat: picosat SAT solver'
+  'python-pip: to install optional packages with sage -pip' 'sage-notebook-exporter: convert flask notebooks to Jupyter'
+  'python-database-knotinfo: interface to the KnotInfo and LinkInfo databases')
+makedepends=(cython boost ratpoints python-jinja sirocco mcqd coxeter bliss tdlib python-pkgconfig shared_meataxe primecount)
+conflicts=(sagemath-jupyter)
+replaces=(sagemath-jupyter)
+source=(https://github.com/sagemath/sage/archive/$pkgver/$pkgname-$pkgver.tar.gz
+        sagemath-optional-packages.patch
+        latte-count.patch
+        test-optional.patch
+        sagemath-lrcalc2.patch
+        sagemath-lcalc2.patch
+        sagemath-mpmath.patch)
+sha256sums=('47190f37e679c2483dadc13112595bacb399dfe4c4a0cde18d3627f5b2db0ea5'
+            '665fc76fa57b1c50f122a8d1874e187afc97a9120921706176b63da3d9d30651'
+            '88e944f23c3b2391dc2e9f9be8e1131152d837dc8c829dfc714663869a272e81'
+            'af984186f852d2847d770a18fb6822296c50a652dbf55a1ed59d27517c3d3ee4'
+            '240ac4c29d96d56407a20e1b7f9846e342a7eb2bb4edd6e5c86b3b5a8ff462f9'
+            '791b3f2c6e5529b09c3abf2f9703b6cf754d633a7a4177645b70b72ea014135a'
+            'be1c871fe6306a053169dce3edbb8bc78a96254ae7c83b2b741257ef3445b6eb')
+
+prepare(){
+  cd sage-$pkgver
+
+# Upstream patches
+# Replace lrcalc.pyx with a wrapper over lrcalc's python bindings https://trac.sagemath.org/ticket/31355
+  patch -p1 -i ../sagemath-lrcalc2.patch
+# Port to lcalc 2 https://trac.sagemath.org/ticket/32037
+  patch -p1 -i ../sagemath-lcalc2.patch
+# Make it work with vanilla mpmath https://trac.sagemath.org/ticket/32799
+  patch -p1 -i ../sagemath-mpmath.patch
+
+# Arch-specific patches
+# assume all optional packages are installed
+  patch -p1 -i ../sagemath-optional-packages.patch
+# don't list optional packages when running tests
+  patch -p1 -i ../test-optional.patch
+# use correct latte-count binary name
+  patch -p1 -i ../latte-count.patch
+
+  cd build/pkgs/sagelib
+  ./bootstrap
+}
+
+build() {
+  cd sage-$pkgver/pkgs/sagemath-standard
+
+  export SAGE_NUM_THREADS=10
+  python setup.py build
+}
+
+package() {
+  cd sage-$pkgver/pkgs/sagemath-standard
+
+  python setup.py install --root="$pkgdir" --optimize=1
+
+# Remove sage_setup
+  rm -r "$pkgdir"/usr/lib/python*/site-packages/sage_setup
+
+# 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
+
+# adjust threejs version
+  rm "$pkgdir"$_pythonpath/sage/ext_data/threejs/threejs-version.txt
+  ln -s /usr/share/threejs-sage/version "$pkgdir"$_pythonpath/sage/ext_data/threejs/threejs-version.txt
+}

Deleted: latte-count.patch
===================================================================
--- latte-count.patch	2021-11-07 10:12:03 UTC (rev 1038464)
+++ latte-count.patch	2021-11-07 10:12:21 UTC (rev 1038465)
@@ -1,89 +0,0 @@
-diff --git a/src/sage/geometry/polyhedron/base_ZZ.py b/src/sage/geometry/polyhedron/base_ZZ.py
-index 268af9db0d..70d41dfa30 100644
---- a/src/sage/geometry/polyhedron/base_ZZ.py
-+++ b/src/sage/geometry/polyhedron/base_ZZ.py
-@@ -193,7 +193,7 @@ class Polyhedron_ZZ(Polyhedron_base):
-             sage: p = P._ehrhart_polynomial_latte(maxdet=5, verbose=True)  # optional - latte_int
-             This is LattE integrale ...
-             ...
--            Invocation: count --ehrhart-polynomial '--redundancy-check=none' --cdd '--maxdet=5' /dev/stdin
-+            Invocation: latte-count --ehrhart-polynomial '--redundancy-check=none' --cdd '--maxdet=5' /dev/stdin
-             ...
-             sage: p    # optional - latte_int
-             1/2*t^2 + 3/2*t + 1
-@@ -201,7 +201,7 @@ class Polyhedron_ZZ(Polyhedron_base):
-             sage: p = P._ehrhart_polynomial_latte(dual=True, verbose=True)  # optional - latte_int
-             This is LattE integrale ...
-             ...
--            Invocation: count --ehrhart-polynomial '--redundancy-check=none' --cdd --dual /dev/stdin
-+            Invocation: latte-count --ehrhart-polynomial '--redundancy-check=none' --cdd --dual /dev/stdin
-             ...
-             sage: p   # optional - latte_int
-             1/2*t^2 + 3/2*t + 1
-@@ -209,7 +209,7 @@ class Polyhedron_ZZ(Polyhedron_base):
-             sage: p = P._ehrhart_polynomial_latte(irrational_primal=True, verbose=True)   # optional - latte_int
-             This is LattE integrale ...
-             ...
--            Invocation: count --ehrhart-polynomial '--redundancy-check=none' --cdd --irrational-primal /dev/stdin
-+            Invocation: latte-count --ehrhart-polynomial '--redundancy-check=none' --cdd --irrational-primal /dev/stdin
-             ...
-             sage: p   # optional - latte_int
-             1/2*t^2 + 3/2*t + 1
-@@ -217,7 +217,7 @@ class Polyhedron_ZZ(Polyhedron_base):
-             sage: p = P._ehrhart_polynomial_latte(irrational_all_primal=True, verbose=True)  # optional - latte_int
-             This is LattE integrale ...
-             ...
--            Invocation: count --ehrhart-polynomial '--redundancy-check=none' --cdd --irrational-all-primal /dev/stdin
-+            Invocation: latte-count --ehrhart-polynomial '--redundancy-check=none' --cdd --irrational-all-primal /dev/stdin
-             ...
-             sage: p   # optional - latte_int
-             1/2*t^2 + 3/2*t + 1
-@@ -229,7 +229,7 @@ class Polyhedron_ZZ(Polyhedron_base):
-             ...
-             RuntimeError: LattE integrale program failed (exit code 1):
-             ...
--            Invocation: count --ehrhart-polynomial '--redundancy-check=none' --cdd '--bim-bam-boum=19' /dev/stdin
-+            Invocation: latte-count --ehrhart-polynomial '--redundancy-check=none' --cdd '--bim-bam-boum=19' /dev/stdin
-             Unknown command/option --bim-bam-boum=19
-         """
-         # note: the options below are explicitly written in the function
-diff --git a/src/sage/interfaces/latte.py b/src/sage/interfaces/latte.py
-index 066cedd401..302b39910d 100644
---- a/src/sage/interfaces/latte.py
-+++ b/src/sage/interfaces/latte.py
-@@ -95,7 +95,7 @@ def count(arg, ehrhart_polynomial=False, multivariate_generating_function=False,
-         sage: n = count(cddin, cdd=True, verbose=True, raw_output=True)  # optional - latte_int
-         This is LattE integrale ...
-         ...
--        Invocation: count '--redundancy-check=none' --cdd /dev/stdin
-+        Invocation: latte-count '--redundancy-check=none' --cdd /dev/stdin
-         ...
-         Total Unimodular Cones: ...
-         Maximum number of simplicial cones in memory at once: ...
-@@ -127,7 +127,7 @@ def count(arg, ehrhart_polynomial=False, multivariate_generating_function=False,
- 
-     arg = str_to_bytes(arg)
- 
--    args = ['count']
-+    args = ['latte-count']
-     if ehrhart_polynomial and multivariate_generating_function:
-         raise ValueError
-     if ehrhart_polynomial:
-diff --git a/src/sage/features/latte.py b/src/sage/features/latte.py
-index 63d227fd35..040a5cf1f9 100644
---- a/src/sage/features/latte.py
-+++ b/src/sage/features/latte.py
-@@ -9,10 +9,10 @@ from . import Executable, Feature, FeatureTestResult
- 
- class Latte_count(Executable):
-     r"""
--    Feature for the executable ``count`` from the LattE suite.
-+    Feature for the executable ``latte-count`` from the LattE suite.
-     """
-     def __init__(self):
--        Executable.__init__(self, "count", executable="count",
-+        Executable.__init__(self, "latte-count", executable="latte-count",
-                             spkg="latte_int",
-                             url=LATTE_URL)
- 
-

Copied: sagemath/repos/community-x86_64/latte-count.patch (from rev 1038464, sagemath/trunk/latte-count.patch)
===================================================================
--- latte-count.patch	                        (rev 0)
+++ latte-count.patch	2021-11-07 10:12:21 UTC (rev 1038465)
@@ -0,0 +1,89 @@
+diff --git a/src/sage/geometry/polyhedron/base_ZZ.py b/src/sage/geometry/polyhedron/base_ZZ.py
+index 268af9db0d..70d41dfa30 100644
+--- a/src/sage/geometry/polyhedron/base_ZZ.py
++++ b/src/sage/geometry/polyhedron/base_ZZ.py
+@@ -193,7 +193,7 @@ class Polyhedron_ZZ(Polyhedron_base):
+             sage: p = P._ehrhart_polynomial_latte(maxdet=5, verbose=True)  # optional - latte_int
+             This is LattE integrale ...
+             ...
+-            Invocation: count --ehrhart-polynomial '--redundancy-check=none' --cdd '--maxdet=5' /dev/stdin
++            Invocation: latte-count --ehrhart-polynomial '--redundancy-check=none' --cdd '--maxdet=5' /dev/stdin
+             ...
+             sage: p    # optional - latte_int
+             1/2*t^2 + 3/2*t + 1
+@@ -201,7 +201,7 @@ class Polyhedron_ZZ(Polyhedron_base):
+             sage: p = P._ehrhart_polynomial_latte(dual=True, verbose=True)  # optional - latte_int
+             This is LattE integrale ...
+             ...
+-            Invocation: count --ehrhart-polynomial '--redundancy-check=none' --cdd --dual /dev/stdin
++            Invocation: latte-count --ehrhart-polynomial '--redundancy-check=none' --cdd --dual /dev/stdin
+             ...
+             sage: p   # optional - latte_int
+             1/2*t^2 + 3/2*t + 1
+@@ -209,7 +209,7 @@ class Polyhedron_ZZ(Polyhedron_base):
+             sage: p = P._ehrhart_polynomial_latte(irrational_primal=True, verbose=True)   # optional - latte_int
+             This is LattE integrale ...
+             ...
+-            Invocation: count --ehrhart-polynomial '--redundancy-check=none' --cdd --irrational-primal /dev/stdin
++            Invocation: latte-count --ehrhart-polynomial '--redundancy-check=none' --cdd --irrational-primal /dev/stdin
+             ...
+             sage: p   # optional - latte_int
+             1/2*t^2 + 3/2*t + 1
+@@ -217,7 +217,7 @@ class Polyhedron_ZZ(Polyhedron_base):
+             sage: p = P._ehrhart_polynomial_latte(irrational_all_primal=True, verbose=True)  # optional - latte_int
+             This is LattE integrale ...
+             ...
+-            Invocation: count --ehrhart-polynomial '--redundancy-check=none' --cdd --irrational-all-primal /dev/stdin
++            Invocation: latte-count --ehrhart-polynomial '--redundancy-check=none' --cdd --irrational-all-primal /dev/stdin
+             ...
+             sage: p   # optional - latte_int
+             1/2*t^2 + 3/2*t + 1
+@@ -229,7 +229,7 @@ class Polyhedron_ZZ(Polyhedron_base):
+             ...
+             RuntimeError: LattE integrale program failed (exit code 1):
+             ...
+-            Invocation: count --ehrhart-polynomial '--redundancy-check=none' --cdd '--bim-bam-boum=19' /dev/stdin
++            Invocation: latte-count --ehrhart-polynomial '--redundancy-check=none' --cdd '--bim-bam-boum=19' /dev/stdin
+             Unknown command/option --bim-bam-boum=19
+         """
+         # note: the options below are explicitly written in the function
+diff --git a/src/sage/interfaces/latte.py b/src/sage/interfaces/latte.py
+index 066cedd401..302b39910d 100644
+--- a/src/sage/interfaces/latte.py
++++ b/src/sage/interfaces/latte.py
+@@ -95,7 +95,7 @@ def count(arg, ehrhart_polynomial=False, multivariate_generating_function=False,
+         sage: n = count(cddin, cdd=True, verbose=True, raw_output=True)  # optional - latte_int
+         This is LattE integrale ...
+         ...
+-        Invocation: count '--redundancy-check=none' --cdd /dev/stdin
++        Invocation: latte-count '--redundancy-check=none' --cdd /dev/stdin
+         ...
+         Total Unimodular Cones: ...
+         Maximum number of simplicial cones in memory at once: ...
+@@ -127,7 +127,7 @@ def count(arg, ehrhart_polynomial=False, multivariate_generating_function=False,
+ 
+     arg = str_to_bytes(arg)
+ 
+-    args = ['count']
++    args = ['latte-count']
+     if ehrhart_polynomial and multivariate_generating_function:
+         raise ValueError
+     if ehrhart_polynomial:
+diff --git a/src/sage/features/latte.py b/src/sage/features/latte.py
+index 63d227fd35..040a5cf1f9 100644
+--- a/src/sage/features/latte.py
++++ b/src/sage/features/latte.py
+@@ -9,10 +9,10 @@ from . import Executable, Feature, FeatureTestResult
+ 
+ class Latte_count(Executable):
+     r"""
+-    Feature for the executable ``count`` from the LattE suite.
++    Feature for the executable ``latte-count`` from the LattE suite.
+     """
+     def __init__(self):
+-        Executable.__init__(self, "count", executable="count",
++        Executable.__init__(self, "latte-count", executable="latte-count",
+                             spkg="latte_int",
+                             url=LATTE_URL)
+ 
+

Deleted: sagemath-lcalc2.patch
===================================================================
--- sagemath-lcalc2.patch	2021-11-07 10:12:03 UTC (rev 1038464)
+++ sagemath-lcalc2.patch	2021-11-07 10:12:21 UTC (rev 1038465)
@@ -1,507 +0,0 @@
-diff --git a/src/sage/lfunctions/lcalc.py b/src/sage/lfunctions/lcalc.py
-index aabbd47..6efa5fe 100644
---- a/src/sage/lfunctions/lcalc.py
-+++ b/src/sage/lfunctions/lcalc.py
-@@ -225,19 +225,54 @@ class LCalc(SageObject):
-         EXAMPLES::
- 
-             sage: I = CC.0
--            sage: lcalc.values_along_line(0.5, 0.5+20*I, 5)
--            [(0.500000000, -1.46035451), (0.500000000 + 4.00000000*I, 0.606783764 + 0.0911121400*I), (0.500000000 + 8.00000000*I, 1.24161511 + 0.360047588*I), (0.500000000 + 12.0000000*I, 1.01593665 - 0.745112472*I), (0.500000000 + 16.0000000*I, 0.938545408 + 1.21658782*I)]
-+            sage: values = lcalc.values_along_line(0.5, 0.5+20*I, 5)
-+            sage: values[0][0] # abs tol 1e-8
-+            0.5
-+            sage: values[0][1] # abs tol 1e-8
-+            -1.46035451 + 0.0*I
-+            sage: values[1][0] # abs tol 1e-8
-+            0.5 + 4.0*I
-+            sage: values[1][1] # abs tol 1e-8
-+            0.606783764 + 0.0911121400*I
-+            sage: values[2][0] # abs tol 1e-8
-+            0.5 + 8.0*I
-+            sage: values[2][1] # abs tol 1e-8
-+            1.24161511 + 0.360047588*I
-+            sage: values[3][0] # abs tol 1e-8
-+            0.5 + 12.0*I
-+            sage: values[3][1] # abs tol 1e-8
-+            1.01593665 - 0.745112472*I
-+            sage: values[4][0] # abs tol 1e-8
-+            0.5 + 16.0*I
-+            sage: values[4][1] # abs tol 1e-8
-+            0.938545408 + 1.21658782*I
- 
-         Sometimes warnings are printed (by lcalc) when this command is
-         run::
- 
-             sage: E = EllipticCurve('389a')
--            sage: E.lseries().values_along_line(0.5, 3, 5)
--            [(0.000000000, 0.209951303),
--             (0.500000000, -...e-16),
--             (1.00000000, 0.133768433),
--             (1.50000000, 0.360092864),
--             (2.00000000, 0.552975867)]
-+            sage: values = E.lseries().values_along_line(0.5, 3, 5)
-+            sage: values[0][0] # abs tol 1e-8
-+            0.0
-+            sage: values[0][1] # abs tol 1e-8
-+            0.209951303  + 0.0*I
-+            sage: values[1][0] # abs tol 1e-8
-+            0.5
-+            sage: values[1][1] # abs tol 1e-8
-+            0.0  + 0.0*I
-+            sage: values[2][0] # abs tol 1e-8
-+            1.0
-+            sage: values[2][1] # abs tol 1e-8
-+            0.133768433 - 0.0*I
-+            sage: values[3][0] # abs tol 1e-8
-+            1.5
-+            sage: values[3][1] # abs tol 1e-8
-+            0.360092864 - 0.0*I
-+            sage: values[4][0] # abs tol 1e-8
-+            2.0
-+            sage: values[4][1] # abs tol 1e-8
-+            0.552975867 + 0.0*I
-+
-         """
-         L = self._compute_L(L)
-         CC = sage.rings.all.ComplexField(prec)
-@@ -281,8 +316,31 @@ class LCalc(SageObject):
- 
-         EXAMPLES::
- 
--            sage: lcalc.twist_values(0.5, -10, 10)
--            [(-8, 1.10042141), (-7, 1.14658567), (-4, 0.667691457), (-3, 0.480867558), (5, 0.231750947), (8, 0.373691713)]
-+            sage: values = lcalc.twist_values(0.5, -10, 10)
-+            sage: values[0][0]
-+            -8
-+            sage: values[0][1] # abs tol 1e-8
-+            1.10042141 + 0.0*I
-+            sage: values[1][0]
-+            -7
-+            sage: values[1][1] # abs tol 1e-8
-+            1.14658567 + 0.0*I
-+            sage: values[2][0]
-+            -4
-+            sage: values[2][1] # abs tol 1e-8
-+            0.667691457 + 0.0*I
-+            sage: values[3][0]
-+            -3
-+            sage: values[3][1] # abs tol 1e-8
-+            0.480867558 + 0.0*I
-+            sage: values[4][0]
-+            5
-+            sage: values[4][1] # abs tol 1e-8
-+            0.231750947 + 0.0*I
-+            sage: values[5][0]
-+            8
-+            sage: values[5][1] # abs tol 1e-8
-+            0.373691713 + 0.0*I
-         """
-         L = self._compute_L(L)
-         CC = sage.rings.all.ComplexField(prec)
-diff --git a/src/sage/lfunctions/zero_sums.pyx b/src/sage/lfunctions/zero_sums.pyx
-index 225fe7d..8b0e566 100644
---- a/src/sage/lfunctions/zero_sums.pyx
-+++ b/src/sage/lfunctions/zero_sums.pyx
-@@ -829,8 +829,11 @@ cdef class LFunctionZeroSum_abstract(SageObject):
-         EXAMPLES::
- 
-             sage: E = EllipticCurve("11a")
--            sage: E.lseries().zeros(2)
--            [6.36261389, 8.60353962]
-+            sage: zeros = E.lseries().zeros(2)
-+            sage: zeros[0] # abs tol 1e-8
-+            6.36261389
-+            sage: zeros[1] # abs tol 1e-8
-+            8.60353962
- 
-         E is a rank zero curve; the lowest zero has imaginary part ~6.36. The
-         zero sum with tau=0 indicates that there are no zeros at the central
-diff --git a/src/sage/libs/lcalc/lcalc_Lfunction.pxd b/src/sage/libs/lcalc/lcalc_Lfunction.pxd
-index d1dbb5d..5edf084 100644
---- a/src/sage/libs/lcalc/lcalc_Lfunction.pxd
-+++ b/src/sage/libs/lcalc/lcalc_Lfunction.pxd
-@@ -21,7 +21,7 @@ cdef extern from "lcalc_sage.h":
-         int (* compute_rank) ()
-         double (* N) (double T)
-         void  (* find_zeros_v)(double T1, double T2, double stepsize, doublevec result )
--        void (*find_zeros_via_N_v)(long count,int do_negative,double max_refine, int rank, int test_explicit_formula, doublevec result)
-+        int (*find_zeros)(long count, long start, double max_refine, int rank, const char* message_stamp, doublevec* result)
-         void (*print_data_L)()
- 
-         #Constructor and destructor
-@@ -38,7 +38,7 @@ cdef extern from "lcalc_sage.h":
-         double (* N) (double T)
-         double *dirichlet_coefficient
-         void  (* find_zeros_v)(double T1, double T2, double stepsize, doublevec result )
--        void (*find_zeros_via_N_v)(long count,int do_negative,double max_refine, int rank, int test_explicit_formula, doublevec result)
-+        int (*find_zeros)(long count, long start, double max_refine, int rank, const char* message_stamp, doublevec* result)
-         void (*print_data_L)()
- 
-         #Constructor and destructor
-@@ -54,7 +54,7 @@ cdef extern from "lcalc_sage.h":
-         int (* compute_rank) ()
-         double (* N) (double T)
-         void  (* find_zeros_v)(double T1, double T2, double stepsize, doublevec result )
--        void (*find_zeros_via_N_v)(long count,int do_negative,double max_refine, int rank, int test_explicit_formula, doublevec result)
-+        int (*find_zeros)(long count, long start, double max_refine, int rank, const char* message_stamp, doublevec* result)
-         void (*print_data_L)()
- 
-         #Constructor and destructor
-@@ -70,7 +70,7 @@ cdef extern from "lcalc_sage.h":
-         int (* compute_rank) ()
-         double (* N) (double T)
-         void  (* find_zeros_v)(double T1, double T2, double stepsize, doublevec result )
--        void (*find_zeros_via_N_v)(long count,int do_negative,double max_refine, int rank, int test_explicit_formula, doublevec result)#puts result in vector<double> result
-+        int (*find_zeros)(long count, long start, double max_refine, int rank, const char* message_stamp, doublevec* result)
-         void (*find_zeros_via_N)(long count,int do_negative,double max_refine, int rank, int test_explicit_formula, char *filename) #puts result in filename
- 
-         #Constructor and destructor
-@@ -111,7 +111,7 @@ cdef class Lfunction:
-     #strange bug, replacing Double with double gives me a compile error
-     cdef Double __typedN(self, double T)
-     cdef void __find_zeros_v(self, double T1, double T2, double stepsize,doublevec *result)
--    cdef void __find_zeros_via_N_v(self, long count,int do_negative,double max_refine, int rank, int test_explicit_formula,doublevec *result)
-+    cdef int __find_zeros(self, long count, long start, double max_refine, int rank, const char* message_stamp, doublevec* result)
- 
-     cdef str _repr
- 
-diff --git a/src/sage/libs/lcalc/lcalc_Lfunction.pyx b/src/sage/libs/lcalc/lcalc_Lfunction.pyx
-index 7e54d7e..88a6e13 100644
---- a/src/sage/libs/lcalc/lcalc_Lfunction.pyx
-+++ b/src/sage/libs/lcalc/lcalc_Lfunction.pyx
-@@ -143,29 +143,29 @@ cdef class Lfunction:
-             sage: chi = DirichletGroup(5)[2] #This is a quadratic character
-             sage: from sage.libs.lcalc.lcalc_Lfunction import *
-             sage: L=Lfunction_from_character(chi, type="int")
--            sage: L.value(.5)  # abs tol 3e-15
-+            sage: L.value(.5)  # abs tol 1e-8
-             0.231750947504016 + 5.75329642226136e-18*I
--            sage: L.value(.2+.4*I)
--            0.102558603193... + 0.190840777924...*I
-+            sage: L.value(.2+.4*I) # abs tol 1e-8
-+            0.102558603193 + 0.190840777924*I
- 
-             sage: L=Lfunction_from_character(chi, type="double")
--            sage: L.value(.6)  # abs tol 3e-15
-+            sage: L.value(.6)  # abs tol 1e-8
-             0.274633355856345 + 6.59869267328199e-18*I
--            sage: L.value(.6+I)
--            0.362258705721... + 0.433888250620...*I
-+            sage: L.value(.6+I) # abs tol 1e-8
-+            0.362258705721 + 0.433888250620*I
- 
-             sage: chi = DirichletGroup(5)[1]
-             sage: L=Lfunction_from_character(chi, type="complex")
--            sage: L.value(.5)
--            0.763747880117... + 0.216964767518...*I
--            sage: L.value(.6+5*I)
--            0.702723260619... - 1.10178575243...*I
-+            sage: L.value(.5) # abs tol 1e-8
-+            0.763747880117 + 0.216964767518*I
-+            sage: L.value(.6+5*I) # abs tol 1e-8
-+            0.702723260619 - 1.10178575243*I
- 
-             sage: L=Lfunction_Zeta()
--            sage: L.value(.5)
--            -1.46035450880...
--            sage: L.value(.4+.5*I)
--            -0.450728958517... - 0.780511403019...*I
-+            sage: L.value(.5) # abs tol 1e-8
-+            -1.46035450880 + 0.0*I
-+            sage: L.value(.4+.5*I)  # abs tol 1e-8
-+            -0.450728958517 - 0.780511403019*I
-         """
-         cdef ComplexNumber complexified_s = CCC(s)
-         cdef c_Complex z = new_Complex(mpfr_get_d(complexified_s.__re, MPFR_RNDN), mpfr_get_d(complexified_s.__im, MPFR_RNDN))
-@@ -185,23 +185,21 @@ cdef class Lfunction:
-             sage: chi = DirichletGroup(5)[2]  # Quadratic character
-             sage: from sage.libs.lcalc.lcalc_Lfunction import *
-             sage: L = Lfunction_from_character(chi, type="int")
--            sage: L.hardy_z_function(0)
--            0.231750947504... 
--            sage: L.hardy_z_function(.5).imag()  # abs tol 1e-15
-+            sage: L.hardy_z_function(0) # abs tol 1e-8
-+            0.231750947504 + 0.0*I
-+            sage: L.hardy_z_function(.5).imag()  # abs tol 1e-8
-             1.17253174178320e-17
--            sage: L.hardy_z_function(.4+.3*I)
--            0.2166144222685... - 0.00408187127850...*I
-             sage: chi = DirichletGroup(5)[1]
-             sage: L = Lfunction_from_character(chi, type="complex")
--            sage: L.hardy_z_function(0)
--            0.793967590477...
--            sage: L.hardy_z_function(.5).imag()  # abs tol 1e-15
-+            sage: L.hardy_z_function(0) # abs tol 1e-8
-+            0.793967590477 + 0.0*I
-+            sage: L.hardy_z_function(.5).imag()  # abs tol 1e-8
-             0.000000000000000
-             sage: E = EllipticCurve([-82,0])
-             sage: L = Lfunction_from_elliptic_curve(E, number_of_coeffs=40000)
--            sage: L.hardy_z_function(2.1)
--            -0.00643179176869...
--            sage: L.hardy_z_function(2.1).imag()  # abs tol 1e-15
-+            sage: L.hardy_z_function(2.1) # abs tol 1e-8
-+            -0.00643179176863296 - 1.47189978221606e-19*I
-+            sage: L.hardy_z_function(2.1).imag()  # abs tol 1e-8
-             -3.93833660115668e-19
-         """
-         #This takes s -> .5 + I*s
-@@ -241,8 +239,8 @@ cdef class Lfunction:
-             sage: from sage.libs.lcalc.lcalc_Lfunction import *
-             sage: chi = DirichletGroup(5)[2] #This is a quadratic character
-             sage: L=Lfunction_from_character(chi, type="complex")
--            sage: L.__N(10)
--            3.17043978326...
-+            sage: L.__N(10) # abs tol 1e-8
-+            4.0
-         """
-         cdef RealNumber real_T=RRR(T)
-         cdef double double_T = mpfr_get_d(real_T.value, MPFR_RNDN)
-@@ -307,18 +305,21 @@ cdef class Lfunction:
-         return returnvalue
- 
-     #The default values are from L.h. See L.h
--    def find_zeros_via_N(self, count=0, do_negative=False, max_refine=1025,
--                         rank=-1, test_explicit_formula=0):
-+    def find_zeros_via_N(self, count=0, start=0, max_refine=1025, rank=-1):
-         """
--        Finds ``count`` number of zeros with positive imaginary part
--        starting at real axis. This function also verifies that all
--        the zeros have been found.
-+        Find ``count`` zeros (in order of increasing magnitude) and output
-+        their imaginary parts. This function verifies that no zeros
-+        are missed, and that all values output are indeed zeros.
-+
-+        If this L-function is self-dual (if its Dirichlet coefficients
-+        are real, up to a tolerance of 1e-6), then only the zeros with
-+        positive imaginary parts are output. Their conjugates, which
-+        are also zeros, are not output.
- 
-         INPUT:
- 
-         - ``count`` - number of zeros to be found
--        - ``do_negative`` - (default: False) False to ignore zeros below the
--          real axis.
-+        - ``start`` - (default: 0) how many initial zeros to skip
-         - ``max_refine`` - when some zeros are found to be missing, the step
-           size used to find zeros is refined. max_refine gives an upper limit
-           on when lcalc should give up. Use default value unless you know
-@@ -326,13 +327,9 @@ cdef class Lfunction:
-         - ``rank`` - integer (default: -1) analytic rank of the L-function.
-           If -1 is passed, then we attempt to compute it. (Use default if in
-           doubt)
--        - ``test_explicit_formula`` - integer (default: 0) If nonzero, test
--          the explicit formula for additional confidence that all the zeros
--          have been found and are accurate. This is still being tested, so
--          using the default is recommended.
- 
-         OUTPUT:
--        
-+
-         list -- A list of the imaginary parts of the zeros that have been found
- 
-         EXAMPLES::
-@@ -349,21 +346,26 @@ cdef class Lfunction:
- 
-             sage: chi = DirichletGroup(5)[1]
-             sage: L=Lfunction_from_character(chi, type="complex")
--            sage: L.find_zeros_via_N(3)
--            [6.18357819545..., 8.45722917442..., 12.6749464170...]
-+            sage: zeros = L.find_zeros_via_N(3)
-+            sage: zeros[0] # abs tol 1e-8
-+            -4.13290370521286
-+            sage: zeros[1] # abs tol 1e-8
-+            6.18357819545086
-+            sage: zeros[2] # abs tol 1e-8
-+            8.45722917442320
- 
-             sage: L=Lfunction_Zeta()
-             sage: L.find_zeros_via_N(3)
-             [14.1347251417..., 21.0220396387..., 25.0108575801...]
-         """
--        cdef Integer count_I = Integer(count)
--        cdef Integer do_negative_I = Integer(do_negative)
--        cdef RealNumber max_refine_R = RRR(max_refine)
--        cdef Integer rank_I = Integer(rank)
--        cdef Integer test_explicit_I = Integer(test_explicit_formula)
-+
-+        # This is the default value for message_stamp, but we have to
-+        # pass it explicitly since we're passing in the next argument,
-+        # our &result pointer.
-+        cdef const char* message_stamp = ""
-         cdef doublevec result
-         sig_on()
--        self.__find_zeros_via_N_v(mpz_get_si(count_I.value), mpz_get_si(do_negative_I.value), mpfr_get_d(max_refine_R.value, MPFR_RNDN), mpz_get_si(rank_I.value), mpz_get_si(test_explicit_I.value), &result)
-+        self.__find_zeros(count, start, max_refine, rank, message_stamp, &result)
-         sig_off()
-         returnvalue = []
-         for i in range(result.size()):
-@@ -390,7 +392,7 @@ cdef class Lfunction:
-     cdef void __find_zeros_v(self,double T1, double T2, double stepsize, doublevec *result):
-         raise NotImplementedError
- 
--    cdef void __find_zeros_via_N_v(self, long count,int do_negative,double max_refine, int rank, int test_explicit_formula, doublevec *result):
-+    cdef int __find_zeros(self, long count, long start, double max_refine, int rank, const char* message_stamp, doublevec *result):
-         raise NotImplementedError
- 
- ##############################################################################
-@@ -486,8 +488,8 @@ cdef class Lfunction_I(Lfunction):
-     cdef double __typedN(self, double T):
-         return (<c_Lfunction_I *>self.thisptr).N(T)
- 
--    cdef void __find_zeros_via_N_v(self, long count,int do_negative,double max_refine, int rank, int test_explicit_formula, doublevec *result):
--        (<c_Lfunction_I *>self.thisptr).find_zeros_via_N_v(count, do_negative, max_refine, rank, test_explicit_formula, result[0])
-+    cdef int __find_zeros(self, long count, long start, double max_refine, int rank, const char* message_stamp, doublevec *result):
-+        (<c_Lfunction_I *>self.thisptr).find_zeros(count, start, max_refine, rank, message_stamp, result)
- 
-     # debug tools
-     def _print_data_to_standard_output(self):
-@@ -500,7 +502,7 @@ cdef class Lfunction_I(Lfunction):
-             sage: from sage.libs.lcalc.lcalc_Lfunction import *
-             sage: chi = DirichletGroup(5)[2] #This is a quadratic character
-             sage: L=Lfunction_from_character(chi, type="int")
--            sage: L._print_data_to_standard_output() # tol 1e-15
-+            sage: L._print_data_to_standard_output() # tol 1e-8
-             -----------------------------------------------
-             <BLANKLINE>
-             Name of L_function:
-@@ -624,8 +626,8 @@ cdef class Lfunction_D(Lfunction):
-     cdef double __typedN(self, double T):
-         return (<c_Lfunction_D *>self.thisptr).N(T)
- 
--    cdef void __find_zeros_via_N_v(self, long count,int do_negative,double max_refine, int rank, int test_explicit_formula, doublevec *result):
--        (<c_Lfunction_D *>self.thisptr).find_zeros_via_N_v(count, do_negative, max_refine, rank, test_explicit_formula, result[0])
-+    cdef int __find_zeros(self, long count, long start,double max_refine, int rank, const char* message_stamp, doublevec *result):
-+        (<c_Lfunction_D *>self.thisptr).find_zeros(count, start, max_refine, rank, message_stamp, result)
- 
-     # debug tools
-     def _print_data_to_standard_output(self):
-@@ -638,7 +640,7 @@ cdef class Lfunction_D(Lfunction):
-             sage: from sage.libs.lcalc.lcalc_Lfunction import *
-             sage: chi = DirichletGroup(5)[2] #This is a quadratic character
-             sage: L=Lfunction_from_character(chi, type="double")
--            sage: L._print_data_to_standard_output() # tol 1e-15
-+            sage: L._print_data_to_standard_output() # tol 1e-8
-             -----------------------------------------------
-             <BLANKLINE>
-             Name of L_function:
-@@ -769,8 +771,8 @@ cdef class Lfunction_C:
-     cdef double __typedN(self, double T):
-         return (<c_Lfunction_C *>self.thisptr).N(T)
- 
--    cdef void __find_zeros_via_N_v(self, long count,int do_negative,double max_refine, int rank, int test_explicit_formula, doublevec *result):
--        (<c_Lfunction_C *>self.thisptr).find_zeros_via_N_v(count, do_negative, max_refine, rank, test_explicit_formula, result[0])
-+    cdef int __find_zeros(self, long count, long start, double max_refine, int rank, const char* message_stamp, doublevec *result):
-+        (<c_Lfunction_C *>self.thisptr).find_zeros(count, start, max_refine, rank, message_stamp, result)
- 
-     # debug tools
-     def _print_data_to_standard_output(self):
-@@ -783,7 +785,7 @@ cdef class Lfunction_C:
-             sage: from sage.libs.lcalc.lcalc_Lfunction import *
-             sage: chi = DirichletGroup(5)[1]
-             sage: L=Lfunction_from_character(chi, type="complex")
--            sage: L._print_data_to_standard_output() # tol 1e-15
-+            sage: L._print_data_to_standard_output() # tol 1e-8
-             -----------------------------------------------
-             <BLANKLINE>
-             Name of L_function:
-@@ -854,8 +856,8 @@ cdef class Lfunction_Zeta(Lfunction):
-     cdef double __typedN(self, double T):
-         return (<c_Lfunction_Zeta *>self.thisptr).N(T)
- 
--    cdef void __find_zeros_via_N_v(self, long count,int do_negative,double max_refine, int rank, int test_explicit_formula, doublevec *result):
--        (<c_Lfunction_Zeta *>self.thisptr).find_zeros_via_N_v(count, do_negative, max_refine, rank, test_explicit_formula, result[0])
-+    cdef int __find_zeros(self, long count, long start, double max_refine, int rank, const char* message_stamp, doublevec *result):
-+        (<c_Lfunction_Zeta *>self.thisptr).find_zeros(count, start, max_refine, rank, message_stamp, result)
- 
-     def __dealloc__(self):
-         """
-@@ -950,10 +952,11 @@ def Lfunction_from_elliptic_curve(E, number_of_coeffs=10000):
-         sage: L = Lfunction_from_elliptic_curve(EllipticCurve('37'))
-         sage: L
-         L-function with real Dirichlet coefficients
--        sage: L.value(0.5).abs() < 1e-15   # "noisy" zero on some platforms (see #9615)
-+        sage: L.value(0.5).abs() < 1e-8   # "noisy" zero on some platforms (see #9615)
-         True
--        sage: L.value(0.5, derivative=1)
--        0.305999...
-+        sage: L.value(0.5, derivative=1)  # abs tol 1e-6
-+        0.305999773835200 + 0.0*I
-+
-     """
-     import sage.libs.lcalc.lcalc_Lfunction
-     Q = RRR(E.conductor()).sqrt() / RRR(2 * pi)
-diff --git a/src/sage/libs/lcalc/lcalc_sage.h b/src/sage/libs/lcalc/lcalc_sage.h
-index 4985289..891a40c 100644
---- a/src/sage/libs/lcalc/lcalc_sage.h
-+++ b/src/sage/libs/lcalc/lcalc_sage.h
-@@ -1,4 +1,4 @@
--#include "Lfunction/L.h"
-+#include "lcalc/L.h"
- int *new_ints(int l)
- {
-     return new int[l];
-@@ -62,4 +62,3 @@ void testL(L_function<Complex> *L)
-     cout << "Value at 1"  << L->value(1.0) <<endl;
-     cout << "Value at .5+I"  << L->value(.5+I) <<endl;
- }
--
-diff --git a/src/sage/modular/dirichlet.py b/src/sage/modular/dirichlet.py
-index d101f6a..23a9b1b 100644
---- a/src/sage/modular/dirichlet.py
-+++ b/src/sage/modular/dirichlet.py
-@@ -751,8 +751,8 @@ class DirichletCharacter(MultiplicativeGroupElement):
-             sage: a = a.primitive_character()
-             sage: L = a.lfunction(algorithm='lcalc'); L
-             L-function with complex Dirichlet coefficients
--            sage: L.value(4)  # abs tol 1e-14
--            0.988944551741105 - 5.16608739123418e-18*I
-+            sage: L.value(4)  # abs tol 1e-8
-+            0.988944551741105 + 0.0*I
-         """
-         if algorithm is None:
-             algorithm = 'pari'
-diff --git a/src/sage/schemes/elliptic_curves/ell_rational_field.py b/src/sage/schemes/elliptic_curves/ell_rational_field.py
-index bda999e..1736ce4 100644
---- a/src/sage/schemes/elliptic_curves/ell_rational_field.py
-+++ b/src/sage/schemes/elliptic_curves/ell_rational_field.py
-@@ -1516,7 +1516,7 @@ class EllipticCurve_rational_field(EllipticCurve_number_field):
-             sage: EllipticCurve([1234567,89101112]).analytic_rank(algorithm='rubinstein')
-             Traceback (most recent call last):
-             ...
--            RuntimeError: unable to compute analytic rank using rubinstein algorithm (unable to convert ' 6.19283e+19 and is too large' to an integer)
-+            RuntimeError: unable to compute analytic rank using rubinstein algorithm (unable to convert ' 6.19283... and is too large' to an integer)
-             sage: EllipticCurve([1234567,89101112]).analytic_rank(algorithm='sympow')
-             Traceback (most recent call last):
-             ...
-diff --git a/src/sage/schemes/elliptic_curves/lseries_ell.py b/src/sage/schemes/elliptic_curves/lseries_ell.py
-index 1fcd02f..8536db5 100644
---- a/src/sage/schemes/elliptic_curves/lseries_ell.py
-+++ b/src/sage/schemes/elliptic_curves/lseries_ell.py
-@@ -400,8 +400,22 @@ class Lseries_ell(SageObject):
- 
-             sage: E = EllipticCurve('37a')
-             sage: vals = E.lseries().twist_values(1, -12, -4)
--            sage: vals  # abs tol 1e-15
--            [(-11, 1.47824342), (-8, 8.9590946e-18), (-7, 1.85307619), (-4, 2.45138938)]
-+            sage: vals[0][0]
-+            -11
-+            sage: vals[0][1] # abs tol 1e-8
-+            1.47824342 + 0.0*I
-+            sage: vals[1][0]
-+            -8
-+            sage: vals[1][1] # abs tol 1e-8
-+            0.0 + 0.0*I
-+            sage: vals[2][0]
-+            -7
-+            sage: vals[2][1] # abs tol 1e-8
-+            1.85307619 + 0.0*I
-+            sage: vals[3][0]
-+            -4
-+            sage: vals[3][1] # abs tol 1e-8
-+            2.45138938 + 0.0*I
-             sage: F = E.quadratic_twist(-8)
-             sage: F.rank()
-             1
-

Copied: sagemath/repos/community-x86_64/sagemath-lcalc2.patch (from rev 1038464, sagemath/trunk/sagemath-lcalc2.patch)
===================================================================
--- sagemath-lcalc2.patch	                        (rev 0)
+++ sagemath-lcalc2.patch	2021-11-07 10:12:21 UTC (rev 1038465)
@@ -0,0 +1,507 @@
+diff --git a/src/sage/lfunctions/lcalc.py b/src/sage/lfunctions/lcalc.py
+index aabbd47..6efa5fe 100644
+--- a/src/sage/lfunctions/lcalc.py
++++ b/src/sage/lfunctions/lcalc.py
+@@ -225,19 +225,54 @@ class LCalc(SageObject):
+         EXAMPLES::
+ 
+             sage: I = CC.0
+-            sage: lcalc.values_along_line(0.5, 0.5+20*I, 5)
+-            [(0.500000000, -1.46035451), (0.500000000 + 4.00000000*I, 0.606783764 + 0.0911121400*I), (0.500000000 + 8.00000000*I, 1.24161511 + 0.360047588*I), (0.500000000 + 12.0000000*I, 1.01593665 - 0.745112472*I), (0.500000000 + 16.0000000*I, 0.938545408 + 1.21658782*I)]
++            sage: values = lcalc.values_along_line(0.5, 0.5+20*I, 5)
++            sage: values[0][0] # abs tol 1e-8
++            0.5
++            sage: values[0][1] # abs tol 1e-8
++            -1.46035451 + 0.0*I
++            sage: values[1][0] # abs tol 1e-8
++            0.5 + 4.0*I
++            sage: values[1][1] # abs tol 1e-8
++            0.606783764 + 0.0911121400*I
++            sage: values[2][0] # abs tol 1e-8
++            0.5 + 8.0*I
++            sage: values[2][1] # abs tol 1e-8
++            1.24161511 + 0.360047588*I
++            sage: values[3][0] # abs tol 1e-8
++            0.5 + 12.0*I
++            sage: values[3][1] # abs tol 1e-8
++            1.01593665 - 0.745112472*I
++            sage: values[4][0] # abs tol 1e-8
++            0.5 + 16.0*I
++            sage: values[4][1] # abs tol 1e-8
++            0.938545408 + 1.21658782*I
+ 
+         Sometimes warnings are printed (by lcalc) when this command is
+         run::
+ 
+             sage: E = EllipticCurve('389a')
+-            sage: E.lseries().values_along_line(0.5, 3, 5)
+-            [(0.000000000, 0.209951303),
+-             (0.500000000, -...e-16),
+-             (1.00000000, 0.133768433),
+-             (1.50000000, 0.360092864),
+-             (2.00000000, 0.552975867)]
++            sage: values = E.lseries().values_along_line(0.5, 3, 5)
++            sage: values[0][0] # abs tol 1e-8
++            0.0
++            sage: values[0][1] # abs tol 1e-8
++            0.209951303  + 0.0*I
++            sage: values[1][0] # abs tol 1e-8
++            0.5
++            sage: values[1][1] # abs tol 1e-8
++            0.0  + 0.0*I
++            sage: values[2][0] # abs tol 1e-8
++            1.0
++            sage: values[2][1] # abs tol 1e-8
++            0.133768433 - 0.0*I
++            sage: values[3][0] # abs tol 1e-8
++            1.5
++            sage: values[3][1] # abs tol 1e-8
++            0.360092864 - 0.0*I
++            sage: values[4][0] # abs tol 1e-8
++            2.0
++            sage: values[4][1] # abs tol 1e-8
++            0.552975867 + 0.0*I
++
+         """
+         L = self._compute_L(L)
+         CC = sage.rings.all.ComplexField(prec)
+@@ -281,8 +316,31 @@ class LCalc(SageObject):
+ 
+         EXAMPLES::
+ 
+-            sage: lcalc.twist_values(0.5, -10, 10)
+-            [(-8, 1.10042141), (-7, 1.14658567), (-4, 0.667691457), (-3, 0.480867558), (5, 0.231750947), (8, 0.373691713)]
++            sage: values = lcalc.twist_values(0.5, -10, 10)
++            sage: values[0][0]
++            -8
++            sage: values[0][1] # abs tol 1e-8
++            1.10042141 + 0.0*I
++            sage: values[1][0]
++            -7
++            sage: values[1][1] # abs tol 1e-8
++            1.14658567 + 0.0*I
++            sage: values[2][0]
++            -4
++            sage: values[2][1] # abs tol 1e-8
++            0.667691457 + 0.0*I
++            sage: values[3][0]
++            -3
++            sage: values[3][1] # abs tol 1e-8
++            0.480867558 + 0.0*I
++            sage: values[4][0]
++            5
++            sage: values[4][1] # abs tol 1e-8
++            0.231750947 + 0.0*I
++            sage: values[5][0]
++            8
++            sage: values[5][1] # abs tol 1e-8
++            0.373691713 + 0.0*I
+         """
+         L = self._compute_L(L)
+         CC = sage.rings.all.ComplexField(prec)
+diff --git a/src/sage/lfunctions/zero_sums.pyx b/src/sage/lfunctions/zero_sums.pyx
+index 225fe7d..8b0e566 100644
+--- a/src/sage/lfunctions/zero_sums.pyx
++++ b/src/sage/lfunctions/zero_sums.pyx
+@@ -829,8 +829,11 @@ cdef class LFunctionZeroSum_abstract(SageObject):
+         EXAMPLES::
+ 
+             sage: E = EllipticCurve("11a")
+-            sage: E.lseries().zeros(2)
+-            [6.36261389, 8.60353962]
++            sage: zeros = E.lseries().zeros(2)
++            sage: zeros[0] # abs tol 1e-8
++            6.36261389
++            sage: zeros[1] # abs tol 1e-8
++            8.60353962
+ 
+         E is a rank zero curve; the lowest zero has imaginary part ~6.36. The
+         zero sum with tau=0 indicates that there are no zeros at the central
+diff --git a/src/sage/libs/lcalc/lcalc_Lfunction.pxd b/src/sage/libs/lcalc/lcalc_Lfunction.pxd
+index d1dbb5d..5edf084 100644
+--- a/src/sage/libs/lcalc/lcalc_Lfunction.pxd
++++ b/src/sage/libs/lcalc/lcalc_Lfunction.pxd
+@@ -21,7 +21,7 @@ cdef extern from "lcalc_sage.h":
+         int (* compute_rank) ()
+         double (* N) (double T)
+         void  (* find_zeros_v)(double T1, double T2, double stepsize, doublevec result )
+-        void (*find_zeros_via_N_v)(long count,int do_negative,double max_refine, int rank, int test_explicit_formula, doublevec result)
++        int (*find_zeros)(long count, long start, double max_refine, int rank, const char* message_stamp, doublevec* result)
+         void (*print_data_L)()
+ 
+         #Constructor and destructor
+@@ -38,7 +38,7 @@ cdef extern from "lcalc_sage.h":
+         double (* N) (double T)
+         double *dirichlet_coefficient
+         void  (* find_zeros_v)(double T1, double T2, double stepsize, doublevec result )
+-        void (*find_zeros_via_N_v)(long count,int do_negative,double max_refine, int rank, int test_explicit_formula, doublevec result)
++        int (*find_zeros)(long count, long start, double max_refine, int rank, const char* message_stamp, doublevec* result)
+         void (*print_data_L)()
+ 
+         #Constructor and destructor
+@@ -54,7 +54,7 @@ cdef extern from "lcalc_sage.h":
+         int (* compute_rank) ()
+         double (* N) (double T)
+         void  (* find_zeros_v)(double T1, double T2, double stepsize, doublevec result )
+-        void (*find_zeros_via_N_v)(long count,int do_negative,double max_refine, int rank, int test_explicit_formula, doublevec result)
++        int (*find_zeros)(long count, long start, double max_refine, int rank, const char* message_stamp, doublevec* result)
+         void (*print_data_L)()
+ 
+         #Constructor and destructor
+@@ -70,7 +70,7 @@ cdef extern from "lcalc_sage.h":
+         int (* compute_rank) ()
+         double (* N) (double T)
+         void  (* find_zeros_v)(double T1, double T2, double stepsize, doublevec result )
+-        void (*find_zeros_via_N_v)(long count,int do_negative,double max_refine, int rank, int test_explicit_formula, doublevec result)#puts result in vector<double> result
++        int (*find_zeros)(long count, long start, double max_refine, int rank, const char* message_stamp, doublevec* result)
+         void (*find_zeros_via_N)(long count,int do_negative,double max_refine, int rank, int test_explicit_formula, char *filename) #puts result in filename
+ 
+         #Constructor and destructor
+@@ -111,7 +111,7 @@ cdef class Lfunction:
+     #strange bug, replacing Double with double gives me a compile error
+     cdef Double __typedN(self, double T)
+     cdef void __find_zeros_v(self, double T1, double T2, double stepsize,doublevec *result)
+-    cdef void __find_zeros_via_N_v(self, long count,int do_negative,double max_refine, int rank, int test_explicit_formula,doublevec *result)
++    cdef int __find_zeros(self, long count, long start, double max_refine, int rank, const char* message_stamp, doublevec* result)
+ 
+     cdef str _repr
+ 
+diff --git a/src/sage/libs/lcalc/lcalc_Lfunction.pyx b/src/sage/libs/lcalc/lcalc_Lfunction.pyx
+index 7e54d7e..88a6e13 100644
+--- a/src/sage/libs/lcalc/lcalc_Lfunction.pyx
++++ b/src/sage/libs/lcalc/lcalc_Lfunction.pyx
+@@ -143,29 +143,29 @@ cdef class Lfunction:
+             sage: chi = DirichletGroup(5)[2] #This is a quadratic character
+             sage: from sage.libs.lcalc.lcalc_Lfunction import *
+             sage: L=Lfunction_from_character(chi, type="int")
+-            sage: L.value(.5)  # abs tol 3e-15
++            sage: L.value(.5)  # abs tol 1e-8
+             0.231750947504016 + 5.75329642226136e-18*I
+-            sage: L.value(.2+.4*I)
+-            0.102558603193... + 0.190840777924...*I
++            sage: L.value(.2+.4*I) # abs tol 1e-8
++            0.102558603193 + 0.190840777924*I
+ 
+             sage: L=Lfunction_from_character(chi, type="double")
+-            sage: L.value(.6)  # abs tol 3e-15
++            sage: L.value(.6)  # abs tol 1e-8
+             0.274633355856345 + 6.59869267328199e-18*I
+-            sage: L.value(.6+I)
+-            0.362258705721... + 0.433888250620...*I
++            sage: L.value(.6+I) # abs tol 1e-8
++            0.362258705721 + 0.433888250620*I
+ 
+             sage: chi = DirichletGroup(5)[1]
+             sage: L=Lfunction_from_character(chi, type="complex")
+-            sage: L.value(.5)
+-            0.763747880117... + 0.216964767518...*I
+-            sage: L.value(.6+5*I)
+-            0.702723260619... - 1.10178575243...*I
++            sage: L.value(.5) # abs tol 1e-8
++            0.763747880117 + 0.216964767518*I
++            sage: L.value(.6+5*I) # abs tol 1e-8
++            0.702723260619 - 1.10178575243*I
+ 
+             sage: L=Lfunction_Zeta()
+-            sage: L.value(.5)
+-            -1.46035450880...
+-            sage: L.value(.4+.5*I)
+-            -0.450728958517... - 0.780511403019...*I
++            sage: L.value(.5) # abs tol 1e-8
++            -1.46035450880 + 0.0*I
++            sage: L.value(.4+.5*I)  # abs tol 1e-8
++            -0.450728958517 - 0.780511403019*I
+         """
+         cdef ComplexNumber complexified_s = CCC(s)
+         cdef c_Complex z = new_Complex(mpfr_get_d(complexified_s.__re, MPFR_RNDN), mpfr_get_d(complexified_s.__im, MPFR_RNDN))
+@@ -185,23 +185,21 @@ cdef class Lfunction:
+             sage: chi = DirichletGroup(5)[2]  # Quadratic character
+             sage: from sage.libs.lcalc.lcalc_Lfunction import *
+             sage: L = Lfunction_from_character(chi, type="int")
+-            sage: L.hardy_z_function(0)
+-            0.231750947504... 
+-            sage: L.hardy_z_function(.5).imag()  # abs tol 1e-15
++            sage: L.hardy_z_function(0) # abs tol 1e-8
++            0.231750947504 + 0.0*I
++            sage: L.hardy_z_function(.5).imag()  # abs tol 1e-8
+             1.17253174178320e-17
+-            sage: L.hardy_z_function(.4+.3*I)
+-            0.2166144222685... - 0.00408187127850...*I
+             sage: chi = DirichletGroup(5)[1]
+             sage: L = Lfunction_from_character(chi, type="complex")
+-            sage: L.hardy_z_function(0)
+-            0.793967590477...
+-            sage: L.hardy_z_function(.5).imag()  # abs tol 1e-15
++            sage: L.hardy_z_function(0) # abs tol 1e-8
++            0.793967590477 + 0.0*I
++            sage: L.hardy_z_function(.5).imag()  # abs tol 1e-8
+             0.000000000000000
+             sage: E = EllipticCurve([-82,0])
+             sage: L = Lfunction_from_elliptic_curve(E, number_of_coeffs=40000)
+-            sage: L.hardy_z_function(2.1)
+-            -0.00643179176869...
+-            sage: L.hardy_z_function(2.1).imag()  # abs tol 1e-15
++            sage: L.hardy_z_function(2.1) # abs tol 1e-8
++            -0.00643179176863296 - 1.47189978221606e-19*I
++            sage: L.hardy_z_function(2.1).imag()  # abs tol 1e-8
+             -3.93833660115668e-19
+         """
+         #This takes s -> .5 + I*s
+@@ -241,8 +239,8 @@ cdef class Lfunction:
+             sage: from sage.libs.lcalc.lcalc_Lfunction import *
+             sage: chi = DirichletGroup(5)[2] #This is a quadratic character
+             sage: L=Lfunction_from_character(chi, type="complex")
+-            sage: L.__N(10)
+-            3.17043978326...
++            sage: L.__N(10) # abs tol 1e-8
++            4.0
+         """
+         cdef RealNumber real_T=RRR(T)
+         cdef double double_T = mpfr_get_d(real_T.value, MPFR_RNDN)
+@@ -307,18 +305,21 @@ cdef class Lfunction:
+         return returnvalue
+ 
+     #The default values are from L.h. See L.h
+-    def find_zeros_via_N(self, count=0, do_negative=False, max_refine=1025,
+-                         rank=-1, test_explicit_formula=0):
++    def find_zeros_via_N(self, count=0, start=0, max_refine=1025, rank=-1):
+         """
+-        Finds ``count`` number of zeros with positive imaginary part
+-        starting at real axis. This function also verifies that all
+-        the zeros have been found.
++        Find ``count`` zeros (in order of increasing magnitude) and output
++        their imaginary parts. This function verifies that no zeros
++        are missed, and that all values output are indeed zeros.
++
++        If this L-function is self-dual (if its Dirichlet coefficients
++        are real, up to a tolerance of 1e-6), then only the zeros with
++        positive imaginary parts are output. Their conjugates, which
++        are also zeros, are not output.
+ 
+         INPUT:
+ 
+         - ``count`` - number of zeros to be found
+-        - ``do_negative`` - (default: False) False to ignore zeros below the
+-          real axis.
++        - ``start`` - (default: 0) how many initial zeros to skip
+         - ``max_refine`` - when some zeros are found to be missing, the step
+           size used to find zeros is refined. max_refine gives an upper limit
+           on when lcalc should give up. Use default value unless you know
+@@ -326,13 +327,9 @@ cdef class Lfunction:
+         - ``rank`` - integer (default: -1) analytic rank of the L-function.
+           If -1 is passed, then we attempt to compute it. (Use default if in
+           doubt)
+-        - ``test_explicit_formula`` - integer (default: 0) If nonzero, test
+-          the explicit formula for additional confidence that all the zeros
+-          have been found and are accurate. This is still being tested, so
+-          using the default is recommended.
+ 
+         OUTPUT:
+-        
++
+         list -- A list of the imaginary parts of the zeros that have been found
+ 
+         EXAMPLES::
+@@ -349,21 +346,26 @@ cdef class Lfunction:
+ 
+             sage: chi = DirichletGroup(5)[1]
+             sage: L=Lfunction_from_character(chi, type="complex")
+-            sage: L.find_zeros_via_N(3)
+-            [6.18357819545..., 8.45722917442..., 12.6749464170...]
++            sage: zeros = L.find_zeros_via_N(3)
++            sage: zeros[0] # abs tol 1e-8
++            -4.13290370521286
++            sage: zeros[1] # abs tol 1e-8
++            6.18357819545086
++            sage: zeros[2] # abs tol 1e-8
++            8.45722917442320
+ 
+             sage: L=Lfunction_Zeta()
+             sage: L.find_zeros_via_N(3)
+             [14.1347251417..., 21.0220396387..., 25.0108575801...]
+         """
+-        cdef Integer count_I = Integer(count)
+-        cdef Integer do_negative_I = Integer(do_negative)
+-        cdef RealNumber max_refine_R = RRR(max_refine)
+-        cdef Integer rank_I = Integer(rank)
+-        cdef Integer test_explicit_I = Integer(test_explicit_formula)
++
++        # This is the default value for message_stamp, but we have to
++        # pass it explicitly since we're passing in the next argument,
++        # our &result pointer.
++        cdef const char* message_stamp = ""
+         cdef doublevec result
+         sig_on()
+-        self.__find_zeros_via_N_v(mpz_get_si(count_I.value), mpz_get_si(do_negative_I.value), mpfr_get_d(max_refine_R.value, MPFR_RNDN), mpz_get_si(rank_I.value), mpz_get_si(test_explicit_I.value), &result)
++        self.__find_zeros(count, start, max_refine, rank, message_stamp, &result)
+         sig_off()
+         returnvalue = []
+         for i in range(result.size()):
+@@ -390,7 +392,7 @@ cdef class Lfunction:
+     cdef void __find_zeros_v(self,double T1, double T2, double stepsize, doublevec *result):
+         raise NotImplementedError
+ 
+-    cdef void __find_zeros_via_N_v(self, long count,int do_negative,double max_refine, int rank, int test_explicit_formula, doublevec *result):
++    cdef int __find_zeros(self, long count, long start, double max_refine, int rank, const char* message_stamp, doublevec *result):
+         raise NotImplementedError
+ 
+ ##############################################################################
+@@ -486,8 +488,8 @@ cdef class Lfunction_I(Lfunction):
+     cdef double __typedN(self, double T):
+         return (<c_Lfunction_I *>self.thisptr).N(T)
+ 
+-    cdef void __find_zeros_via_N_v(self, long count,int do_negative,double max_refine, int rank, int test_explicit_formula, doublevec *result):
+-        (<c_Lfunction_I *>self.thisptr).find_zeros_via_N_v(count, do_negative, max_refine, rank, test_explicit_formula, result[0])
++    cdef int __find_zeros(self, long count, long start, double max_refine, int rank, const char* message_stamp, doublevec *result):
++        (<c_Lfunction_I *>self.thisptr).find_zeros(count, start, max_refine, rank, message_stamp, result)
+ 
+     # debug tools
+     def _print_data_to_standard_output(self):
+@@ -500,7 +502,7 @@ cdef class Lfunction_I(Lfunction):
+             sage: from sage.libs.lcalc.lcalc_Lfunction import *
+             sage: chi = DirichletGroup(5)[2] #This is a quadratic character
+             sage: L=Lfunction_from_character(chi, type="int")
+-            sage: L._print_data_to_standard_output() # tol 1e-15
++            sage: L._print_data_to_standard_output() # tol 1e-8
+             -----------------------------------------------
+             <BLANKLINE>
+             Name of L_function:
+@@ -624,8 +626,8 @@ cdef class Lfunction_D(Lfunction):
+     cdef double __typedN(self, double T):
+         return (<c_Lfunction_D *>self.thisptr).N(T)
+ 
+-    cdef void __find_zeros_via_N_v(self, long count,int do_negative,double max_refine, int rank, int test_explicit_formula, doublevec *result):
+-        (<c_Lfunction_D *>self.thisptr).find_zeros_via_N_v(count, do_negative, max_refine, rank, test_explicit_formula, result[0])
++    cdef int __find_zeros(self, long count, long start,double max_refine, int rank, const char* message_stamp, doublevec *result):
++        (<c_Lfunction_D *>self.thisptr).find_zeros(count, start, max_refine, rank, message_stamp, result)
+ 
+     # debug tools
+     def _print_data_to_standard_output(self):
+@@ -638,7 +640,7 @@ cdef class Lfunction_D(Lfunction):
+             sage: from sage.libs.lcalc.lcalc_Lfunction import *
+             sage: chi = DirichletGroup(5)[2] #This is a quadratic character
+             sage: L=Lfunction_from_character(chi, type="double")
+-            sage: L._print_data_to_standard_output() # tol 1e-15
++            sage: L._print_data_to_standard_output() # tol 1e-8
+             -----------------------------------------------
+             <BLANKLINE>
+             Name of L_function:
+@@ -769,8 +771,8 @@ cdef class Lfunction_C:
+     cdef double __typedN(self, double T):
+         return (<c_Lfunction_C *>self.thisptr).N(T)
+ 
+-    cdef void __find_zeros_via_N_v(self, long count,int do_negative,double max_refine, int rank, int test_explicit_formula, doublevec *result):
+-        (<c_Lfunction_C *>self.thisptr).find_zeros_via_N_v(count, do_negative, max_refine, rank, test_explicit_formula, result[0])
++    cdef int __find_zeros(self, long count, long start, double max_refine, int rank, const char* message_stamp, doublevec *result):
++        (<c_Lfunction_C *>self.thisptr).find_zeros(count, start, max_refine, rank, message_stamp, result)
+ 
+     # debug tools
+     def _print_data_to_standard_output(self):
+@@ -783,7 +785,7 @@ cdef class Lfunction_C:
+             sage: from sage.libs.lcalc.lcalc_Lfunction import *
+             sage: chi = DirichletGroup(5)[1]
+             sage: L=Lfunction_from_character(chi, type="complex")
+-            sage: L._print_data_to_standard_output() # tol 1e-15
++            sage: L._print_data_to_standard_output() # tol 1e-8
+             -----------------------------------------------
+             <BLANKLINE>
+             Name of L_function:
+@@ -854,8 +856,8 @@ cdef class Lfunction_Zeta(Lfunction):
+     cdef double __typedN(self, double T):
+         return (<c_Lfunction_Zeta *>self.thisptr).N(T)
+ 
+-    cdef void __find_zeros_via_N_v(self, long count,int do_negative,double max_refine, int rank, int test_explicit_formula, doublevec *result):
+-        (<c_Lfunction_Zeta *>self.thisptr).find_zeros_via_N_v(count, do_negative, max_refine, rank, test_explicit_formula, result[0])
++    cdef int __find_zeros(self, long count, long start, double max_refine, int rank, const char* message_stamp, doublevec *result):
++        (<c_Lfunction_Zeta *>self.thisptr).find_zeros(count, start, max_refine, rank, message_stamp, result)
+ 
+     def __dealloc__(self):
+         """
+@@ -950,10 +952,11 @@ def Lfunction_from_elliptic_curve(E, number_of_coeffs=10000):
+         sage: L = Lfunction_from_elliptic_curve(EllipticCurve('37'))
+         sage: L
+         L-function with real Dirichlet coefficients
+-        sage: L.value(0.5).abs() < 1e-15   # "noisy" zero on some platforms (see #9615)
++        sage: L.value(0.5).abs() < 1e-8   # "noisy" zero on some platforms (see #9615)
+         True
+-        sage: L.value(0.5, derivative=1)
+-        0.305999...
++        sage: L.value(0.5, derivative=1)  # abs tol 1e-6
++        0.305999773835200 + 0.0*I
++
+     """
+     import sage.libs.lcalc.lcalc_Lfunction
+     Q = RRR(E.conductor()).sqrt() / RRR(2 * pi)
+diff --git a/src/sage/libs/lcalc/lcalc_sage.h b/src/sage/libs/lcalc/lcalc_sage.h
+index 4985289..891a40c 100644
+--- a/src/sage/libs/lcalc/lcalc_sage.h
++++ b/src/sage/libs/lcalc/lcalc_sage.h
+@@ -1,4 +1,4 @@
+-#include "Lfunction/L.h"
++#include "lcalc/L.h"
+ int *new_ints(int l)
+ {
+     return new int[l];
+@@ -62,4 +62,3 @@ void testL(L_function<Complex> *L)
+     cout << "Value at 1"  << L->value(1.0) <<endl;
+     cout << "Value at .5+I"  << L->value(.5+I) <<endl;
+ }
+-
+diff --git a/src/sage/modular/dirichlet.py b/src/sage/modular/dirichlet.py
+index d101f6a..23a9b1b 100644
+--- a/src/sage/modular/dirichlet.py
++++ b/src/sage/modular/dirichlet.py
+@@ -751,8 +751,8 @@ class DirichletCharacter(MultiplicativeGroupElement):
+             sage: a = a.primitive_character()
+             sage: L = a.lfunction(algorithm='lcalc'); L
+             L-function with complex Dirichlet coefficients
+-            sage: L.value(4)  # abs tol 1e-14
+-            0.988944551741105 - 5.16608739123418e-18*I
++            sage: L.value(4)  # abs tol 1e-8
++            0.988944551741105 + 0.0*I
+         """
+         if algorithm is None:
+             algorithm = 'pari'
+diff --git a/src/sage/schemes/elliptic_curves/ell_rational_field.py b/src/sage/schemes/elliptic_curves/ell_rational_field.py
+index bda999e..1736ce4 100644
+--- a/src/sage/schemes/elliptic_curves/ell_rational_field.py
++++ b/src/sage/schemes/elliptic_curves/ell_rational_field.py
+@@ -1516,7 +1516,7 @@ class EllipticCurve_rational_field(EllipticCurve_number_field):
+             sage: EllipticCurve([1234567,89101112]).analytic_rank(algorithm='rubinstein')
+             Traceback (most recent call last):
+             ...
+-            RuntimeError: unable to compute analytic rank using rubinstein algorithm (unable to convert ' 6.19283e+19 and is too large' to an integer)
++            RuntimeError: unable to compute analytic rank using rubinstein algorithm (unable to convert ' 6.19283... and is too large' to an integer)
+             sage: EllipticCurve([1234567,89101112]).analytic_rank(algorithm='sympow')
+             Traceback (most recent call last):
+             ...
+diff --git a/src/sage/schemes/elliptic_curves/lseries_ell.py b/src/sage/schemes/elliptic_curves/lseries_ell.py
+index 1fcd02f..8536db5 100644
+--- a/src/sage/schemes/elliptic_curves/lseries_ell.py
++++ b/src/sage/schemes/elliptic_curves/lseries_ell.py
+@@ -400,8 +400,22 @@ class Lseries_ell(SageObject):
+ 
+             sage: E = EllipticCurve('37a')
+             sage: vals = E.lseries().twist_values(1, -12, -4)
+-            sage: vals  # abs tol 1e-15
+-            [(-11, 1.47824342), (-8, 8.9590946e-18), (-7, 1.85307619), (-4, 2.45138938)]
++            sage: vals[0][0]
++            -11
++            sage: vals[0][1] # abs tol 1e-8
++            1.47824342 + 0.0*I
++            sage: vals[1][0]
++            -8
++            sage: vals[1][1] # abs tol 1e-8
++            0.0 + 0.0*I
++            sage: vals[2][0]
++            -7
++            sage: vals[2][1] # abs tol 1e-8
++            1.85307619 + 0.0*I
++            sage: vals[3][0]
++            -4
++            sage: vals[3][1] # abs tol 1e-8
++            2.45138938 + 0.0*I
+             sage: F = E.quadratic_twist(-8)
+             sage: F.rank()
+             1
+

Deleted: sagemath-lrcalc2.patch
===================================================================
--- sagemath-lrcalc2.patch	2021-11-07 10:12:03 UTC (rev 1038464)
+++ sagemath-lrcalc2.patch	2021-11-07 10:12:21 UTC (rev 1038465)
@@ -1,573 +0,0 @@
-diff --git a/build/pkgs/lrcalc/checksums.ini b/build/pkgs/lrcalc/checksums.ini
-index 7a0e6a1b96..70de56c40d 100644
---- a/build/pkgs/lrcalc/checksums.ini
-+++ b/build/pkgs/lrcalc/checksums.ini
-@@ -1,4 +1,5 @@
- tarball=lrcalc-VERSION.tar.gz
--sha1=89c288875bc3e3e2919876cb645bdfd7316b5965
--md5=6bba16c0cca9debccd0af847bd3d4a23
--cksum=3738483656
-+sha1=2a98661eb39c7ef526c932f7886fc3142fd639ab
-+md5=7cfa8f67287f2b70a15a833b94bc24b6
-+cksum=2250996027
-+upstream_url=https://sites.math.rutgers.edu/~asbuch/lrcalc/lrcalc-VERSION.tar.gz
-diff --git a/build/pkgs/lrcalc/package-version.txt b/build/pkgs/lrcalc/package-version.txt
-index 92ab3427e8..879b416e60 100644
---- a/build/pkgs/lrcalc/package-version.txt
-+++ b/build/pkgs/lrcalc/package-version.txt
-@@ -1 +1 @@
--1.2.p1
-+2.1
-diff --git a/build/pkgs/lrcalc/patches/includes.patch b/build/pkgs/lrcalc/patches/includes.patch
-deleted file mode 100644
-index 707da176a6..0000000000
---- a/build/pkgs/lrcalc/patches/includes.patch
-+++ /dev/null
-@@ -1,90 +0,0 @@
--From 4a5e1c8c3c11efdb1cbb4239825a6bf4bf1c52f8 Mon Sep 17 00:00:00 2001
--From: Anders Skovsted Buch <asbuch at math.rutgers.edu>
--Date: Sun, 29 Nov 2015 16:25:56 -0500
--Subject: [PATCH] Patch by Jeroen Demeyer to change include <vector.h> to
-- "vector.h", plus similar cases.
--
-----
-- src/lrcalc.c   | 2 +-
-- src/maple.c    | 4 ++--
-- src/schublib.h | 2 +-
-- src/symfcn.c   | 6 +++---
-- src/symfcn.h   | 4 ++--
-- 5 files changed, 9 insertions(+), 9 deletions(-)
--
--diff --git a/src/lrcalc.c b/src/lrcalc.c
--index aff3f75..60df49e 100644
----- a/src/lrcalc.c
--+++ b/src/lrcalc.c
--@@ -8,7 +8,7 @@
-- #include <stdlib.h>
-- extern char *optarg;
-- 
---#include <vectarg.h>
--+#include "vectarg.h"
-- 
-- #include "symfcn.h"
-- #include "maple.h"
--diff --git a/src/maple.c b/src/maple.c
--index fdc0768..a5f4d14 100644
----- a/src/maple.c
--+++ b/src/maple.c
--@@ -4,8 +4,8 @@
--  */
-- 
-- #include <stdio.h>
---#include <vector.h>
---#include <hashtab.h>
--+#include "vector.h"
--+#include "hashtab.h"
-- #include "maple.h"
-- 
-- 
--diff --git a/src/schublib.h b/src/schublib.h
--index a8e8511..864850c 100644
----- a/src/schublib.h
--+++ b/src/schublib.h
--@@ -1,7 +1,7 @@
-- #ifndef _SCHUBLIB_H
-- #define _SCHUBLIB_H
-- 
---#include <hashtab.h>
--+#include "hashtab.h"
-- 
-- hashtab *trans(vector *w, int vars, hashtab *res);
-- hashtab *monk(int i, hashtab *slc, int rank);
--diff --git a/src/symfcn.c b/src/symfcn.c
--index 4ffbe4b..fd5df5d 100644
----- a/src/symfcn.c
--+++ b/src/symfcn.c
--@@ -5,9 +5,9 @@
-- 
-- #include <stdio.h>
-- 
---#include <alloc.h>
---#include <vector.h>
---#include <hashtab.h>
--+#include "alloc.h"
--+#include "vector.h"
--+#include "hashtab.h"
-- 
-- #include "symfcn.h"
-- 
--diff --git a/src/symfcn.h b/src/symfcn.h
--index b8543b1..29bb00d 100644
----- a/src/symfcn.h
--+++ b/src/symfcn.h
--@@ -1,8 +1,8 @@
-- #ifndef _SYMFCN_H
-- #define _SYMFCN_H
-- 
---#include <hashtab.h>
---#include <vector.h>
--+#include "hashtab.h"
--+#include "vector.h"
-- 
-- int part_itr_sz(vector *part);
-- int part_itr_sub(vector *part, vector *outer);
---- 
--2.1.1.1.g1fb337f
--
-diff --git a/build/pkgs/lrcalc/spkg-install.in b/build/pkgs/lrcalc/spkg-install.in
-index d6665bfb42..a34493b776 100644
---- a/build/pkgs/lrcalc/spkg-install.in
-+++ b/build/pkgs/lrcalc/spkg-install.in
-@@ -7,3 +7,6 @@ cp "$SAGE_ROOT"/config/config.sub .
- sdh_configure
- sdh_make
- sdh_make_install
-+
-+cd python
-+sdh_pip_install .
-diff --git a/src/sage/libs/lrcalc/lrcalc.pxd b/src/sage/libs/lrcalc/lrcalc.pxd
-deleted file mode 100644
-index 10b88db93f..0000000000
---- a/src/sage/libs/lrcalc/lrcalc.pxd
-+++ /dev/null
-@@ -1,77 +0,0 @@
--# distutils: libraries = lrcalc
--
--cdef extern from "lrcalc/hashtab.h":
--    ctypedef struct hashtab:
--        pass
--
--    ctypedef struct hash_itr:
--        pass
--
--    ctypedef unsigned long hashkey_t
--    ctypedef int (*cmp_t) (void* a, void* b)
--    ctypedef hashkey_t (*hash_t) (void* a)
--
--    hashtab* hash_new(cmp_t cm, hash_t hsh)
--    void hash_free(hashtab *ht)
--
--    void* hash_lookup(hashtab *ht, void *key)
--    void* hash_insert(hashtab *ht, void *key, void *value)
--
--    bint hash_good(hash_itr)
--    void hash_first(hashtab* s, hash_itr itr)
--    void hash_next(hash_itr itr)
--    void* hash_key(hash_itr itr)
--    void* hash_value(hash_itr itr)
--    int hash_intvalue(hash_itr itr)
--
--cdef extern from "lrcalc/vector.h":
--    ctypedef struct vector:
--        size_t length
--        int* array
--
--    vector* v_new(int length)
--    void v_free(vector* v)
--    void v_print(vector *v)
--    int v_length(vector* v)
--    int v_elem(vector* v, int i)
--
--    ctypedef struct vecpair:
--        vector *first
--        vector *second
--
--    vector* vp_first(vecpair* vp)
--    vector* vp_second(vecpair* vp)
--
--cdef extern from "lrcalc/list.h":
--    cdef struct _list:
--        void **array
--        size_t allocated
--        size_t length
--    void l_free(_list *lst)
--
--cdef extern from "lrcalc/symfcn.h":
--    long long lrcoef_c "lrcoef"(vector* outer, vector* inner1, vector* inner2)
--    hashtab* mult_c "mult"(vector *sh1, vector *sh2, int maxrows)
--    hashtab* skew_c "skew"(vector *outer, vector *inner, int maxrows)
--    hashtab* coprod_c "coprod"(vector *part, int all)
--    void fusion_reduce_c "fusion_reduce"(hashtab* ht, int rows, int cols, int opt_zero)
--    _list *quantum_reduce_c "quantum_reduce"(hashtab* ht, int rows, int col)
--
--    ctypedef struct skewtab:
--        vector *outer
--        vector *inner
--        vector *conts
--        int maxrows
--        vector *conjugate
--        int rows
--        int cols
--        int matrix[1]
--
--    skewtab *st_new(vector *outer, vector *inner, vector *conts, int maxrows)
--    int st_next(skewtab *st)
--    void st_print(skewtab *st)
--    void st_free(skewtab *st)
--
--
--cdef extern from "lrcalc/schublib.h":
--    hashtab* mult_schubert_c "mult_schubert"(vector *sh1, vector *sh2, int rank)
-diff --git a/src/sage/libs/lrcalc/lrcalc.pyx b/src/sage/libs/lrcalc/lrcalc.py
-similarity index 65%
-rename from src/sage/libs/lrcalc/lrcalc.pyx
-rename to src/sage/libs/lrcalc/lrcalc.py
-index 1cf67dc15a..d4e2f5d538 100644
---- a/src/sage/libs/lrcalc/lrcalc.pyx
-+++ b/src/sage/libs/lrcalc/lrcalc.py
-@@ -187,180 +187,16 @@ AUTHORS:
- #                  https://www.gnu.org/licenses/
- # ****************************************************************************
- 
--from sage.rings.integer cimport Integer
--from sage.structure.parent cimport Parent
- from sage.combinat.partition import _Partitions
- from sage.combinat.permutation import Permutation
--from sage.combinat.skew_tableau import SkewTableau
--
--
--cdef vector* iterable_to_vector(it):
--    """
--    Return an lrcalc vector (which is a list of integers) from a Python iterable.
--
--    TESTS::
--
--        sage: from sage.libs.lrcalc.lrcalc import test_iterable_to_vector
--        sage: x = test_iterable_to_vector(Partition([3,2,1])); x   #indirect doctest
--        [3, 2, 1]
--    """
--    cdef vector* v
--    cdef list itr = list(it)
--    cdef int n = len(itr)
--    cdef int i
--    v = v_new(n)
--    for i in range(n):
--        v.array[i] = int(itr[i])
--    return v
--
--
--cdef list vector_to_list(vector *v):
--    """
--    Converts a lrcalc vector to Python list.
--
--    TESTS::
--
--        sage: from sage.libs.lrcalc.lrcalc import test_iterable_to_vector
--        sage: x = test_iterable_to_vector([]); x         #indirect doctest
--        []
--    """
--    cdef int i, n
--    n = v_length(v)
--    cdef list result = [None]*n
--    for i in range(n):
--        result[i] = Integer(v_elem(v, i))
--    return result
--
--
--def test_iterable_to_vector(it):
--    """
--    A wrapper function for the cdef function ``iterable_to_vector``
--    and ``vector_to_list``, to test that they are working correctly.
--
--    EXAMPLES::
--
--        sage: from sage.libs.lrcalc.lrcalc import test_iterable_to_vector
--        sage: x = test_iterable_to_vector([3,2,1]); x
--        [3, 2, 1]
--    """
--    cdef vector *v = iterable_to_vector(it)
--    result = vector_to_list(v)
--    v_free(v)
--    return result
--
--
--cdef skewtab_to_SkewTableau(skewtab *st):
--    """
--    A wrapper function which transforms the data set ``st`` used in
--    ``lrcalc`` to a ``SkewTableau`` in Sage.
--
--    TESTS::
--
--        sage: from sage.libs.lrcalc.lrcalc import test_skewtab_to_SkewTableau
--        sage: test_skewtab_to_SkewTableau([],[])
--        []
--    """
--    inner = vector_to_list(st.inner)
--    outer = vector_to_list(st.outer)
--    return SkewTableau(expr=[[inner[y] for y in range(len(outer))],
--                             [[st.matrix[x + y * st.cols] + 1
--                                for x in range(inner[y], outer[y])]
--                              for y in range(len(outer) - 1, -1, -1)]])
--
--
--def test_skewtab_to_SkewTableau(outer, inner):
--    """
--    A wrapper function for the cdef function ``skewtab_to_SkewTableau``
--    for testing purposes.
--
--    It constructs the first LR skew tableau of shape ``outer/inner``
--    as an ``lrcalc`` ``skewtab``, and converts it to a
--    :class:`SkewTableau`.
--
--    EXAMPLES::
--
--        sage: from sage.libs.lrcalc.lrcalc import test_skewtab_to_SkewTableau
--        sage: test_skewtab_to_SkewTableau([3,2,1],[])
--        [[1, 1, 1], [2, 2], [3]]
--        sage: test_skewtab_to_SkewTableau([4,3,2,1],[1,1]).pp()
--        .  1  1  1
--        .  2  2
--        1  3
--        2
--    """
--    cdef vector* o = iterable_to_vector(outer)
--    cdef vector* i = iterable_to_vector(inner+[0]*(len(outer)-len(inner)))
--    cdef skewtab* st = st_new(o, i, NULL, 0)
--    return skewtab_to_SkewTableau(st)
--
--
--cdef dict sf_hashtab_to_dict(hashtab *ht):
--    """
--    Return a dictionary representing a Schur function. The keys are
--    partitions and the values are integers <type 'sage.rings.integer.Integer'>.
--
--    EXAMPLES::
--
--        sage: from sage.libs.lrcalc.lrcalc import mult
--        sage: sorted(mult([1],[1]).items())        #indirect doctest
--        [([1, 1], 1), ([2], 1)]
--        sage: assert isinstance(mult([1],[1]),dict)#indirect doctest
--    """
--    cdef hash_itr itr
--    cdef dict result = {}
--    cdef list p
--    hash_first(ht, itr)
--    while hash_good(itr):
--        p = vector_to_list(<vector*> hash_key(itr))
--        result[_Partitions(p)] = Integer(hash_intvalue(itr))
--        hash_next(itr)
--    return result
--
--
--cdef dict schubert_hashtab_to_dict(hashtab *ht):
--    """
--    Return a dictionary corresponding to a Schubert polynomial whose keys
--    are permutations and whose values are integers <type 'sage.rings.integer.Integer'>.
--
--    EXAMPLES::
--
--        sage: from sage.libs.lrcalc.lrcalc import mult_schubert
--        sage: mult_schubert([3,2,1], [1,2,3])      #indirect doctest
--        {[3, 2, 1]: 1}
--    """
--    cdef hash_itr itr
--    cdef dict result = {}
--    hash_first(ht, itr)
--    while hash_good(itr):
--        p = vector_to_list(<vector*> hash_key(itr))
--        result[Permutation(p)] = Integer(hash_intvalue(itr))
--        hash_next(itr)
--    return result
--
--
--cdef dict vp_hashtab_to_dict(hashtab *ht):
--    """
--    Return a dictionary corresponding to the coproduct of a Schur function whose keys are
--    pairs of partitions and whose values are integers <type 'sage.rings.integer.Integer'>.
--
--    EXAMPLES::
--
--        sage: from sage.libs.lrcalc.lrcalc import coprod
--        sage: coprod([1])      #indirect doctest
--        {([1], []): 1}
--    """
--    cdef hash_itr itr
--    cdef vecpair* vp
--    cdef dict result = {}
--    hash_first(ht, itr)
--    while hash_good(itr):
--        vp = <vecpair*> hash_key(itr)
--        p1 = _Partitions(vector_to_list(vp_first(vp)))
--        p2 = _Partitions(vector_to_list(vp_second(vp)))
--        result[(p1, p2)] = Integer(hash_intvalue(itr))
--        hash_next(itr)
--    return result
-+from sage.combinat.skew_tableau import SkewTableaux
-+from sage.combinat.skew_partition import SkewPartition
-+from sage.combinat.words.word import Word
-+from sage.rings.integer import Integer
-+import lrcalc
- 
-+def _lrcalc_dict_to_sage(result):
-+    return dict({_Partitions(i):Integer(k) for i,k in result.items()})
- 
- def lrcoef_unsafe(outer, inner1, inner2):
-     r"""
-@@ -392,18 +228,7 @@ def lrcoef_unsafe(outer, inner1, inner2):
-         sage: lrcoef_unsafe([2,1,1,1,1], [2,1], [2,1])
-         0
-     """
--    cdef long long result
--    cdef vector *o
--    cdef vector *i1
--    cdef vector *i2
--    o = iterable_to_vector(outer)
--    i1 = iterable_to_vector(inner1)
--    i2 = iterable_to_vector(inner2)
--    result = lrcoef_c(o, i1, i2)
--    v_free(o)
--    v_free(i1)
--    v_free(i2)
--    return Integer(result)
-+    return Integer(lrcalc.lrcoef(outer, inner1, inner2))
- 
- 
- def lrcoef(outer, inner1, inner2):
-@@ -510,44 +335,23 @@ def mult(part1, part2, maxrows=None, level=None, quantum=None):
-     if quantum is not None and (level is None or maxrows is None):
-         raise ValueError('missing parameters maxrows or level')
- 
--    cdef vector* v1 = iterable_to_vector(part1)
--    cdef vector* v2 = iterable_to_vector(part2)
--    if maxrows is None:
--        maxrows = 0
--    cdef hashtab* ht = mult_c(v1, v2, int(maxrows))
--    cdef hashtab* tab
--    cdef dict result
--
-     if quantum is None:
-         if level is not None:
--            fusion_reduce_c(ht, int(maxrows), int(level), int(0))
--        result = sf_hashtab_to_dict(ht)
--        v_free(v1)
--        v_free(v2)
--        hash_free(ht)
--        return result
-+            return _lrcalc_dict_to_sage(lrcalc.mult_fusion(part1, part2, maxrows, level))
-+        if maxrows is None:
-+            maxrows = -1
-+        return _lrcalc_dict_to_sage(lrcalc.mult(part1, part2, maxrows))
- 
-     # Otherwise do quantum multiplication
--    cdef _list *qlist
--    cdef dict temp
--    qlist = quantum_reduce_c(ht, int(maxrows), int(level))
--    # The above call frees the memory associated with ht
--    v_free(v1)
--    v_free(v2)
--
--    cdef Parent P = quantum.parent()
--    result = {}
--    for i in range(qlist.length):
--        tab = <hashtab*>(qlist.array[i])
--        temp = sf_hashtab_to_dict(tab)
--        for k in temp:
--            result[k] = result.get(k, P.zero()) + quantum**i * temp[k]
--        hash_free(tab)
--    l_free(qlist)
--    return result
--
--
--def skew(outer, inner, maxrows=0):
-+    result = lrcalc.mult_quantum(part1, part2, maxrows, level, degrees=True)
-+    P = quantum.parent()
-+    output = {}
-+    for i,k in result.items():
-+        output[_Partitions(i[0])] = output.get(_Partitions(i[0]), P.zero()) + k*quantum**(i[1])
-+    return output
-+
-+
-+def skew(outer, inner, maxrows=-1):
-     """
-     Compute the Schur expansion of a skew Schur function.
- 
-@@ -572,14 +376,7 @@ def skew(outer, inner, maxrows=0):
-         sage: sorted(skew([2,1],[1]).items())
-         [([1, 1], 1), ([2], 1)]
-     """
--    cdef vector* v1 = iterable_to_vector(outer)
--    cdef vector* v2 = iterable_to_vector(inner)
--    cdef hashtab* ht = skew_c(v1, v2, int(maxrows))
--    result = sf_hashtab_to_dict(ht)
--    v_free(v1)
--    v_free(v2)
--    hash_free(ht)
--    return result
-+    return _lrcalc_dict_to_sage(lrcalc.skew(outer, inner, maxrows))
- 
- 
- def coprod(part, all=0):
-@@ -609,12 +406,8 @@ def coprod(part, all=0):
-         sage: sorted(coprod([2,1]).items())
-         [(([1, 1], [1]), 1), (([2], [1]), 1), (([2, 1], []), 1)]
-     """
--    cdef vector* v1 = iterable_to_vector(part)
--    cdef hashtab* ht = coprod_c(v1, int(all))
--    result = vp_hashtab_to_dict(ht)
--    v_free(v1)
--    hash_free(ht)
--    return result
-+    result = lrcalc.coprod(part, all)
-+    return dict({tuple(_Partitions(j) for j in i):Integer(k) for i,k in result.items()})
- 
- 
- def mult_schubert(w1, w2, rank=0):
-@@ -646,17 +439,11 @@ def mult_schubert(w1, w2, rank=0):
-          ([6, 4, 3, 1, 2, 5], 1), ([6, 5, 2, 1, 3, 4], 1),
-          ([7, 3, 4, 1, 2, 5, 6], 1), ([7, 4, 2, 1, 3, 5, 6], 1)]
-     """
--    cdef vector* v1 = iterable_to_vector(w1)
--    cdef vector* v2 = iterable_to_vector(w2)
--    cdef hashtab* ht = mult_schubert_c(v1, v2, int(rank))
--    result = schubert_hashtab_to_dict(ht)
--    v_free(v1)
--    v_free(v2)
--    hash_free(ht)
--    return result
-+    result = lrcalc.schubmult(w1, w2, rank)
-+    return dict({Permutation(list(i)):Integer(k) for i,k in result.items()})
- 
- 
--def lrskew(outer, inner, weight=None, maxrows=0):
-+def lrskew(outer, inner, weight=None, maxrows=-1):
-     r"""
-     Iterate over the skew LR tableaux of shape ``outer / inner``.
- 
-@@ -703,21 +490,23 @@ def lrskew(outer, inner, weight=None, maxrows=0):
-         sage: list(lrskew([3,2,1],[2], weight=[3,1]))
-         [[[None, None, 1], [1, 1], [2]]]
-     """
--    cdef vector* o = iterable_to_vector(outer)
--    cdef vector* i = iterable_to_vector(inner + [0]*(len(outer) - len(inner)))
--    cdef skewtab* st = st_new(o, i, NULL, int(maxrows))
-+    iterator = lrcalc.lr_iterator(outer, inner, maxrows)
-+    shape = SkewPartition([outer, inner])
- 
-     if weight is None:
--        yield skewtab_to_SkewTableau(st)
--        while st_next(st):
--            yield skewtab_to_SkewTableau(st)
-+        while True:
-+            try:
-+                word = Word([i+1 for i in next(iterator)])
-+                yield SkewTableaux().from_shape_and_word(shape, word)
-+            except StopIteration:
-+                break
-     else:
-         wt = _Partitions(weight)
--        r = skewtab_to_SkewTableau(st)
--        if r.weight() == wt:
--            yield r
--        while st_next(st):
--            r = skewtab_to_SkewTableau(st)
--            if r.weight() == wt:
--                yield r
--    st_free(st)
-+        while True:
-+            try:
-+                word = Word([i+1 for i in next(iterator)])
-+                r = SkewTableaux().from_shape_and_word(shape, word)
-+                if r.weight() == wt:
-+                    yield r
-+            except StopIteration:
-+                break

Copied: sagemath/repos/community-x86_64/sagemath-lrcalc2.patch (from rev 1038464, sagemath/trunk/sagemath-lrcalc2.patch)
===================================================================
--- sagemath-lrcalc2.patch	                        (rev 0)
+++ sagemath-lrcalc2.patch	2021-11-07 10:12:21 UTC (rev 1038465)
@@ -0,0 +1,573 @@
+diff --git a/build/pkgs/lrcalc/checksums.ini b/build/pkgs/lrcalc/checksums.ini
+index 7a0e6a1b96..70de56c40d 100644
+--- a/build/pkgs/lrcalc/checksums.ini
++++ b/build/pkgs/lrcalc/checksums.ini
+@@ -1,4 +1,5 @@
+ tarball=lrcalc-VERSION.tar.gz
+-sha1=89c288875bc3e3e2919876cb645bdfd7316b5965
+-md5=6bba16c0cca9debccd0af847bd3d4a23
+-cksum=3738483656
++sha1=2a98661eb39c7ef526c932f7886fc3142fd639ab
++md5=7cfa8f67287f2b70a15a833b94bc24b6
++cksum=2250996027
++upstream_url=https://sites.math.rutgers.edu/~asbuch/lrcalc/lrcalc-VERSION.tar.gz
+diff --git a/build/pkgs/lrcalc/package-version.txt b/build/pkgs/lrcalc/package-version.txt
+index 92ab3427e8..879b416e60 100644
+--- a/build/pkgs/lrcalc/package-version.txt
++++ b/build/pkgs/lrcalc/package-version.txt
+@@ -1 +1 @@
+-1.2.p1
++2.1
+diff --git a/build/pkgs/lrcalc/patches/includes.patch b/build/pkgs/lrcalc/patches/includes.patch
+deleted file mode 100644
+index 707da176a6..0000000000
+--- a/build/pkgs/lrcalc/patches/includes.patch
++++ /dev/null
+@@ -1,90 +0,0 @@
+-From 4a5e1c8c3c11efdb1cbb4239825a6bf4bf1c52f8 Mon Sep 17 00:00:00 2001
+-From: Anders Skovsted Buch <asbuch at math.rutgers.edu>
+-Date: Sun, 29 Nov 2015 16:25:56 -0500
+-Subject: [PATCH] Patch by Jeroen Demeyer to change include <vector.h> to
+- "vector.h", plus similar cases.
+-
+----
+- src/lrcalc.c   | 2 +-
+- src/maple.c    | 4 ++--
+- src/schublib.h | 2 +-
+- src/symfcn.c   | 6 +++---
+- src/symfcn.h   | 4 ++--
+- 5 files changed, 9 insertions(+), 9 deletions(-)
+-
+-diff --git a/src/lrcalc.c b/src/lrcalc.c
+-index aff3f75..60df49e 100644
+---- a/src/lrcalc.c
+-+++ b/src/lrcalc.c
+-@@ -8,7 +8,7 @@
+- #include <stdlib.h>
+- extern char *optarg;
+- 
+--#include <vectarg.h>
+-+#include "vectarg.h"
+- 
+- #include "symfcn.h"
+- #include "maple.h"
+-diff --git a/src/maple.c b/src/maple.c
+-index fdc0768..a5f4d14 100644
+---- a/src/maple.c
+-+++ b/src/maple.c
+-@@ -4,8 +4,8 @@
+-  */
+- 
+- #include <stdio.h>
+--#include <vector.h>
+--#include <hashtab.h>
+-+#include "vector.h"
+-+#include "hashtab.h"
+- #include "maple.h"
+- 
+- 
+-diff --git a/src/schublib.h b/src/schublib.h
+-index a8e8511..864850c 100644
+---- a/src/schublib.h
+-+++ b/src/schublib.h
+-@@ -1,7 +1,7 @@
+- #ifndef _SCHUBLIB_H
+- #define _SCHUBLIB_H
+- 
+--#include <hashtab.h>
+-+#include "hashtab.h"
+- 
+- hashtab *trans(vector *w, int vars, hashtab *res);
+- hashtab *monk(int i, hashtab *slc, int rank);
+-diff --git a/src/symfcn.c b/src/symfcn.c
+-index 4ffbe4b..fd5df5d 100644
+---- a/src/symfcn.c
+-+++ b/src/symfcn.c
+-@@ -5,9 +5,9 @@
+- 
+- #include <stdio.h>
+- 
+--#include <alloc.h>
+--#include <vector.h>
+--#include <hashtab.h>
+-+#include "alloc.h"
+-+#include "vector.h"
+-+#include "hashtab.h"
+- 
+- #include "symfcn.h"
+- 
+-diff --git a/src/symfcn.h b/src/symfcn.h
+-index b8543b1..29bb00d 100644
+---- a/src/symfcn.h
+-+++ b/src/symfcn.h
+-@@ -1,8 +1,8 @@
+- #ifndef _SYMFCN_H
+- #define _SYMFCN_H
+- 
+--#include <hashtab.h>
+--#include <vector.h>
+-+#include "hashtab.h"
+-+#include "vector.h"
+- 
+- int part_itr_sz(vector *part);
+- int part_itr_sub(vector *part, vector *outer);
+--- 
+-2.1.1.1.g1fb337f
+-
+diff --git a/build/pkgs/lrcalc/spkg-install.in b/build/pkgs/lrcalc/spkg-install.in
+index d6665bfb42..a34493b776 100644
+--- a/build/pkgs/lrcalc/spkg-install.in
++++ b/build/pkgs/lrcalc/spkg-install.in
+@@ -7,3 +7,6 @@ cp "$SAGE_ROOT"/config/config.sub .
+ sdh_configure
+ sdh_make
+ sdh_make_install
++
++cd python
++sdh_pip_install .
+diff --git a/src/sage/libs/lrcalc/lrcalc.pxd b/src/sage/libs/lrcalc/lrcalc.pxd
+deleted file mode 100644
+index 10b88db93f..0000000000
+--- a/src/sage/libs/lrcalc/lrcalc.pxd
++++ /dev/null
+@@ -1,77 +0,0 @@
+-# distutils: libraries = lrcalc
+-
+-cdef extern from "lrcalc/hashtab.h":
+-    ctypedef struct hashtab:
+-        pass
+-
+-    ctypedef struct hash_itr:
+-        pass
+-
+-    ctypedef unsigned long hashkey_t
+-    ctypedef int (*cmp_t) (void* a, void* b)
+-    ctypedef hashkey_t (*hash_t) (void* a)
+-
+-    hashtab* hash_new(cmp_t cm, hash_t hsh)
+-    void hash_free(hashtab *ht)
+-
+-    void* hash_lookup(hashtab *ht, void *key)
+-    void* hash_insert(hashtab *ht, void *key, void *value)
+-
+-    bint hash_good(hash_itr)
+-    void hash_first(hashtab* s, hash_itr itr)
+-    void hash_next(hash_itr itr)
+-    void* hash_key(hash_itr itr)
+-    void* hash_value(hash_itr itr)
+-    int hash_intvalue(hash_itr itr)
+-
+-cdef extern from "lrcalc/vector.h":
+-    ctypedef struct vector:
+-        size_t length
+-        int* array
+-
+-    vector* v_new(int length)
+-    void v_free(vector* v)
+-    void v_print(vector *v)
+-    int v_length(vector* v)
+-    int v_elem(vector* v, int i)
+-
+-    ctypedef struct vecpair:
+-        vector *first
+-        vector *second
+-
+-    vector* vp_first(vecpair* vp)
+-    vector* vp_second(vecpair* vp)
+-
+-cdef extern from "lrcalc/list.h":
+-    cdef struct _list:
+-        void **array
+-        size_t allocated
+-        size_t length
+-    void l_free(_list *lst)
+-
+-cdef extern from "lrcalc/symfcn.h":
+-    long long lrcoef_c "lrcoef"(vector* outer, vector* inner1, vector* inner2)
+-    hashtab* mult_c "mult"(vector *sh1, vector *sh2, int maxrows)
+-    hashtab* skew_c "skew"(vector *outer, vector *inner, int maxrows)
+-    hashtab* coprod_c "coprod"(vector *part, int all)
+-    void fusion_reduce_c "fusion_reduce"(hashtab* ht, int rows, int cols, int opt_zero)
+-    _list *quantum_reduce_c "quantum_reduce"(hashtab* ht, int rows, int col)
+-
+-    ctypedef struct skewtab:
+-        vector *outer
+-        vector *inner
+-        vector *conts
+-        int maxrows
+-        vector *conjugate
+-        int rows
+-        int cols
+-        int matrix[1]
+-
+-    skewtab *st_new(vector *outer, vector *inner, vector *conts, int maxrows)
+-    int st_next(skewtab *st)
+-    void st_print(skewtab *st)
+-    void st_free(skewtab *st)
+-
+-
+-cdef extern from "lrcalc/schublib.h":
+-    hashtab* mult_schubert_c "mult_schubert"(vector *sh1, vector *sh2, int rank)
+diff --git a/src/sage/libs/lrcalc/lrcalc.pyx b/src/sage/libs/lrcalc/lrcalc.py
+similarity index 65%
+rename from src/sage/libs/lrcalc/lrcalc.pyx
+rename to src/sage/libs/lrcalc/lrcalc.py
+index 1cf67dc15a..d4e2f5d538 100644
+--- a/src/sage/libs/lrcalc/lrcalc.pyx
++++ b/src/sage/libs/lrcalc/lrcalc.py
+@@ -187,180 +187,16 @@ AUTHORS:
+ #                  https://www.gnu.org/licenses/
+ # ****************************************************************************
+ 
+-from sage.rings.integer cimport Integer
+-from sage.structure.parent cimport Parent
+ from sage.combinat.partition import _Partitions
+ from sage.combinat.permutation import Permutation
+-from sage.combinat.skew_tableau import SkewTableau
+-
+-
+-cdef vector* iterable_to_vector(it):
+-    """
+-    Return an lrcalc vector (which is a list of integers) from a Python iterable.
+-
+-    TESTS::
+-
+-        sage: from sage.libs.lrcalc.lrcalc import test_iterable_to_vector
+-        sage: x = test_iterable_to_vector(Partition([3,2,1])); x   #indirect doctest
+-        [3, 2, 1]
+-    """
+-    cdef vector* v
+-    cdef list itr = list(it)
+-    cdef int n = len(itr)
+-    cdef int i
+-    v = v_new(n)
+-    for i in range(n):
+-        v.array[i] = int(itr[i])
+-    return v
+-
+-
+-cdef list vector_to_list(vector *v):
+-    """
+-    Converts a lrcalc vector to Python list.
+-
+-    TESTS::
+-
+-        sage: from sage.libs.lrcalc.lrcalc import test_iterable_to_vector
+-        sage: x = test_iterable_to_vector([]); x         #indirect doctest
+-        []
+-    """
+-    cdef int i, n
+-    n = v_length(v)
+-    cdef list result = [None]*n
+-    for i in range(n):
+-        result[i] = Integer(v_elem(v, i))
+-    return result
+-
+-
+-def test_iterable_to_vector(it):
+-    """
+-    A wrapper function for the cdef function ``iterable_to_vector``
+-    and ``vector_to_list``, to test that they are working correctly.
+-
+-    EXAMPLES::
+-
+-        sage: from sage.libs.lrcalc.lrcalc import test_iterable_to_vector
+-        sage: x = test_iterable_to_vector([3,2,1]); x
+-        [3, 2, 1]
+-    """
+-    cdef vector *v = iterable_to_vector(it)
+-    result = vector_to_list(v)
+-    v_free(v)
+-    return result
+-
+-
+-cdef skewtab_to_SkewTableau(skewtab *st):
+-    """
+-    A wrapper function which transforms the data set ``st`` used in
+-    ``lrcalc`` to a ``SkewTableau`` in Sage.
+-
+-    TESTS::
+-
+-        sage: from sage.libs.lrcalc.lrcalc import test_skewtab_to_SkewTableau
+-        sage: test_skewtab_to_SkewTableau([],[])
+-        []
+-    """
+-    inner = vector_to_list(st.inner)
+-    outer = vector_to_list(st.outer)
+-    return SkewTableau(expr=[[inner[y] for y in range(len(outer))],
+-                             [[st.matrix[x + y * st.cols] + 1
+-                                for x in range(inner[y], outer[y])]
+-                              for y in range(len(outer) - 1, -1, -1)]])
+-
+-
+-def test_skewtab_to_SkewTableau(outer, inner):
+-    """
+-    A wrapper function for the cdef function ``skewtab_to_SkewTableau``
+-    for testing purposes.
+-
+-    It constructs the first LR skew tableau of shape ``outer/inner``
+-    as an ``lrcalc`` ``skewtab``, and converts it to a
+-    :class:`SkewTableau`.
+-
+-    EXAMPLES::
+-
+-        sage: from sage.libs.lrcalc.lrcalc import test_skewtab_to_SkewTableau
+-        sage: test_skewtab_to_SkewTableau([3,2,1],[])
+-        [[1, 1, 1], [2, 2], [3]]
+-        sage: test_skewtab_to_SkewTableau([4,3,2,1],[1,1]).pp()
+-        .  1  1  1
+-        .  2  2
+-        1  3
+-        2
+-    """
+-    cdef vector* o = iterable_to_vector(outer)
+-    cdef vector* i = iterable_to_vector(inner+[0]*(len(outer)-len(inner)))
+-    cdef skewtab* st = st_new(o, i, NULL, 0)
+-    return skewtab_to_SkewTableau(st)
+-
+-
+-cdef dict sf_hashtab_to_dict(hashtab *ht):
+-    """
+-    Return a dictionary representing a Schur function. The keys are
+-    partitions and the values are integers <type 'sage.rings.integer.Integer'>.
+-
+-    EXAMPLES::
+-
+-        sage: from sage.libs.lrcalc.lrcalc import mult
+-        sage: sorted(mult([1],[1]).items())        #indirect doctest
+-        [([1, 1], 1), ([2], 1)]
+-        sage: assert isinstance(mult([1],[1]),dict)#indirect doctest
+-    """
+-    cdef hash_itr itr
+-    cdef dict result = {}
+-    cdef list p
+-    hash_first(ht, itr)
+-    while hash_good(itr):
+-        p = vector_to_list(<vector*> hash_key(itr))
+-        result[_Partitions(p)] = Integer(hash_intvalue(itr))
+-        hash_next(itr)
+-    return result
+-
+-
+-cdef dict schubert_hashtab_to_dict(hashtab *ht):
+-    """
+-    Return a dictionary corresponding to a Schubert polynomial whose keys
+-    are permutations and whose values are integers <type 'sage.rings.integer.Integer'>.
+-
+-    EXAMPLES::
+-
+-        sage: from sage.libs.lrcalc.lrcalc import mult_schubert
+-        sage: mult_schubert([3,2,1], [1,2,3])      #indirect doctest
+-        {[3, 2, 1]: 1}
+-    """
+-    cdef hash_itr itr
+-    cdef dict result = {}
+-    hash_first(ht, itr)
+-    while hash_good(itr):
+-        p = vector_to_list(<vector*> hash_key(itr))
+-        result[Permutation(p)] = Integer(hash_intvalue(itr))
+-        hash_next(itr)
+-    return result
+-
+-
+-cdef dict vp_hashtab_to_dict(hashtab *ht):
+-    """
+-    Return a dictionary corresponding to the coproduct of a Schur function whose keys are
+-    pairs of partitions and whose values are integers <type 'sage.rings.integer.Integer'>.
+-
+-    EXAMPLES::
+-
+-        sage: from sage.libs.lrcalc.lrcalc import coprod
+-        sage: coprod([1])      #indirect doctest
+-        {([1], []): 1}
+-    """
+-    cdef hash_itr itr
+-    cdef vecpair* vp
+-    cdef dict result = {}
+-    hash_first(ht, itr)
+-    while hash_good(itr):
+-        vp = <vecpair*> hash_key(itr)
+-        p1 = _Partitions(vector_to_list(vp_first(vp)))
+-        p2 = _Partitions(vector_to_list(vp_second(vp)))
+-        result[(p1, p2)] = Integer(hash_intvalue(itr))
+-        hash_next(itr)
+-    return result
++from sage.combinat.skew_tableau import SkewTableaux
++from sage.combinat.skew_partition import SkewPartition
++from sage.combinat.words.word import Word
++from sage.rings.integer import Integer
++import lrcalc
+ 
++def _lrcalc_dict_to_sage(result):
++    return dict({_Partitions(i):Integer(k) for i,k in result.items()})
+ 
+ def lrcoef_unsafe(outer, inner1, inner2):
+     r"""
+@@ -392,18 +228,7 @@ def lrcoef_unsafe(outer, inner1, inner2):
+         sage: lrcoef_unsafe([2,1,1,1,1], [2,1], [2,1])
+         0
+     """
+-    cdef long long result
+-    cdef vector *o
+-    cdef vector *i1
+-    cdef vector *i2
+-    o = iterable_to_vector(outer)
+-    i1 = iterable_to_vector(inner1)
+-    i2 = iterable_to_vector(inner2)
+-    result = lrcoef_c(o, i1, i2)
+-    v_free(o)
+-    v_free(i1)
+-    v_free(i2)
+-    return Integer(result)
++    return Integer(lrcalc.lrcoef(outer, inner1, inner2))
+ 
+ 
+ def lrcoef(outer, inner1, inner2):
+@@ -510,44 +335,23 @@ def mult(part1, part2, maxrows=None, level=None, quantum=None):
+     if quantum is not None and (level is None or maxrows is None):
+         raise ValueError('missing parameters maxrows or level')
+ 
+-    cdef vector* v1 = iterable_to_vector(part1)
+-    cdef vector* v2 = iterable_to_vector(part2)
+-    if maxrows is None:
+-        maxrows = 0
+-    cdef hashtab* ht = mult_c(v1, v2, int(maxrows))
+-    cdef hashtab* tab
+-    cdef dict result
+-
+     if quantum is None:
+         if level is not None:
+-            fusion_reduce_c(ht, int(maxrows), int(level), int(0))
+-        result = sf_hashtab_to_dict(ht)
+-        v_free(v1)
+-        v_free(v2)
+-        hash_free(ht)
+-        return result
++            return _lrcalc_dict_to_sage(lrcalc.mult_fusion(part1, part2, maxrows, level))
++        if maxrows is None:
++            maxrows = -1
++        return _lrcalc_dict_to_sage(lrcalc.mult(part1, part2, maxrows))
+ 
+     # Otherwise do quantum multiplication
+-    cdef _list *qlist
+-    cdef dict temp
+-    qlist = quantum_reduce_c(ht, int(maxrows), int(level))
+-    # The above call frees the memory associated with ht
+-    v_free(v1)
+-    v_free(v2)
+-
+-    cdef Parent P = quantum.parent()
+-    result = {}
+-    for i in range(qlist.length):
+-        tab = <hashtab*>(qlist.array[i])
+-        temp = sf_hashtab_to_dict(tab)
+-        for k in temp:
+-            result[k] = result.get(k, P.zero()) + quantum**i * temp[k]
+-        hash_free(tab)
+-    l_free(qlist)
+-    return result
+-
+-
+-def skew(outer, inner, maxrows=0):
++    result = lrcalc.mult_quantum(part1, part2, maxrows, level, degrees=True)
++    P = quantum.parent()
++    output = {}
++    for i,k in result.items():
++        output[_Partitions(i[0])] = output.get(_Partitions(i[0]), P.zero()) + k*quantum**(i[1])
++    return output
++
++
++def skew(outer, inner, maxrows=-1):
+     """
+     Compute the Schur expansion of a skew Schur function.
+ 
+@@ -572,14 +376,7 @@ def skew(outer, inner, maxrows=0):
+         sage: sorted(skew([2,1],[1]).items())
+         [([1, 1], 1), ([2], 1)]
+     """
+-    cdef vector* v1 = iterable_to_vector(outer)
+-    cdef vector* v2 = iterable_to_vector(inner)
+-    cdef hashtab* ht = skew_c(v1, v2, int(maxrows))
+-    result = sf_hashtab_to_dict(ht)
+-    v_free(v1)
+-    v_free(v2)
+-    hash_free(ht)
+-    return result
++    return _lrcalc_dict_to_sage(lrcalc.skew(outer, inner, maxrows))
+ 
+ 
+ def coprod(part, all=0):
+@@ -609,12 +406,8 @@ def coprod(part, all=0):
+         sage: sorted(coprod([2,1]).items())
+         [(([1, 1], [1]), 1), (([2], [1]), 1), (([2, 1], []), 1)]
+     """
+-    cdef vector* v1 = iterable_to_vector(part)
+-    cdef hashtab* ht = coprod_c(v1, int(all))
+-    result = vp_hashtab_to_dict(ht)
+-    v_free(v1)
+-    hash_free(ht)
+-    return result
++    result = lrcalc.coprod(part, all)
++    return dict({tuple(_Partitions(j) for j in i):Integer(k) for i,k in result.items()})
+ 
+ 
+ def mult_schubert(w1, w2, rank=0):
+@@ -646,17 +439,11 @@ def mult_schubert(w1, w2, rank=0):
+          ([6, 4, 3, 1, 2, 5], 1), ([6, 5, 2, 1, 3, 4], 1),
+          ([7, 3, 4, 1, 2, 5, 6], 1), ([7, 4, 2, 1, 3, 5, 6], 1)]
+     """
+-    cdef vector* v1 = iterable_to_vector(w1)
+-    cdef vector* v2 = iterable_to_vector(w2)
+-    cdef hashtab* ht = mult_schubert_c(v1, v2, int(rank))
+-    result = schubert_hashtab_to_dict(ht)
+-    v_free(v1)
+-    v_free(v2)
+-    hash_free(ht)
+-    return result
++    result = lrcalc.schubmult(w1, w2, rank)
++    return dict({Permutation(list(i)):Integer(k) for i,k in result.items()})
+ 
+ 
+-def lrskew(outer, inner, weight=None, maxrows=0):
++def lrskew(outer, inner, weight=None, maxrows=-1):
+     r"""
+     Iterate over the skew LR tableaux of shape ``outer / inner``.
+ 
+@@ -703,21 +490,23 @@ def lrskew(outer, inner, weight=None, maxrows=0):
+         sage: list(lrskew([3,2,1],[2], weight=[3,1]))
+         [[[None, None, 1], [1, 1], [2]]]
+     """
+-    cdef vector* o = iterable_to_vector(outer)
+-    cdef vector* i = iterable_to_vector(inner + [0]*(len(outer) - len(inner)))
+-    cdef skewtab* st = st_new(o, i, NULL, int(maxrows))
++    iterator = lrcalc.lr_iterator(outer, inner, maxrows)
++    shape = SkewPartition([outer, inner])
+ 
+     if weight is None:
+-        yield skewtab_to_SkewTableau(st)
+-        while st_next(st):
+-            yield skewtab_to_SkewTableau(st)
++        while True:
++            try:
++                word = Word([i+1 for i in next(iterator)])
++                yield SkewTableaux().from_shape_and_word(shape, word)
++            except StopIteration:
++                break
+     else:
+         wt = _Partitions(weight)
+-        r = skewtab_to_SkewTableau(st)
+-        if r.weight() == wt:
+-            yield r
+-        while st_next(st):
+-            r = skewtab_to_SkewTableau(st)
+-            if r.weight() == wt:
+-                yield r
+-    st_free(st)
++        while True:
++            try:
++                word = Word([i+1 for i in next(iterator)])
++                r = SkewTableaux().from_shape_and_word(shape, word)
++                if r.weight() == wt:
++                    yield r
++            except StopIteration:
++                break

Copied: sagemath/repos/community-x86_64/sagemath-mpmath.patch (from rev 1038464, sagemath/trunk/sagemath-mpmath.patch)
===================================================================
--- sagemath-mpmath.patch	                        (rev 0)
+++ sagemath-mpmath.patch	2021-11-07 10:12:21 UTC (rev 1038465)
@@ -0,0 +1,14 @@
+diff --git a/src/sage/env.py b/src/sage/env.py
+index e5af037..40ace13 100644
+--- a/src/sage/env.py
++++ b/src/sage/env.py
+@@ -237,6 +237,9 @@ LIBSINGULAR_PATH = var("LIBSINGULAR_PATH", "libSingular.so")
+ OPENMP_CFLAGS = var("OPENMP_CFLAGS", "")
+ OPENMP_CXXFLAGS = var("OPENMP_CXXFLAGS", "")
+ 
++# Make sure mpmath uses Sage types
++os.environ['MPMATH_SAGE'] = '1'
++
+ # misc
+ SAGE_BANNER = var("SAGE_BANNER", "")
+ SAGE_IMPORTALL = var("SAGE_IMPORTALL", "yes")

Deleted: sagemath-optional-packages.patch
===================================================================
--- sagemath-optional-packages.patch	2021-11-07 10:12:03 UTC (rev 1038464)
+++ sagemath-optional-packages.patch	2021-11-07 10:12:21 UTC (rev 1038465)
@@ -1,17 +0,0 @@
-diff --git a/build/pkgs/sagelib/src/setup.py b/build/pkgs/sagelib/src/setup.py
-index 0d7c29d746..fb34cbfd5e 100755
---- a/build/pkgs/sagelib/src/setup.py
-+++ b/build/pkgs/sagelib/src/setup.py
-@@ -75,10 +75,9 @@ if sdist:
- else:
-     distributions = ['']
-     optional_packages_with_extensions = ['mcqd', 'bliss', 'tdlib', 'primecount',
--                                         'coxeter3', 'fes', 'sirocco', 'meataxe']
-+                                         'coxeter3', 'sirocco', 'meataxe']
-     distributions += ['sage-{}'.format(pkg)
--                      for pkg in optional_packages_with_extensions
--                      if is_package_installed_and_updated(pkg)]
-+                      for pkg in optional_packages_with_extensions]
-     log.warn('distributions = {0}'.format(distributions))
- 
- from sage_setup.find import find_python_sources

Copied: sagemath/repos/community-x86_64/sagemath-optional-packages.patch (from rev 1038464, sagemath/trunk/sagemath-optional-packages.patch)
===================================================================
--- sagemath-optional-packages.patch	                        (rev 0)
+++ sagemath-optional-packages.patch	2021-11-07 10:12:21 UTC (rev 1038465)
@@ -0,0 +1,17 @@
+diff --git a/build/pkgs/sagelib/src/setup.py b/build/pkgs/sagelib/src/setup.py
+index 0d7c29d746..fb34cbfd5e 100755
+--- a/build/pkgs/sagelib/src/setup.py
++++ b/build/pkgs/sagelib/src/setup.py
+@@ -75,10 +75,9 @@ if sdist:
+ else:
+     distributions = ['']
+     optional_packages_with_extensions = ['mcqd', 'bliss', 'tdlib', 'primecount',
+-                                         'coxeter3', 'fes', 'sirocco', 'meataxe']
++                                         'coxeter3', 'sirocco', 'meataxe']
+     distributions += ['sage-{}'.format(pkg)
+-                      for pkg in optional_packages_with_extensions
+-                      if is_package_installed_and_updated(pkg)]
++                      for pkg in optional_packages_with_extensions]
+     log.warn('distributions = {0}'.format(distributions))
+ 
+ from sage_setup.find import find_python_sources

Deleted: test-optional.patch
===================================================================
--- test-optional.patch	2021-11-07 10:12:03 UTC (rev 1038464)
+++ test-optional.patch	2021-11-07 10:12:21 UTC (rev 1038465)
@@ -1,25 +0,0 @@
-diff --git a/src/sage/doctest/control.py b/src/sage/doctest/control.py
-index 2d93841e50..937e20cd2e 100644
---- a/src/sage/doctest/control.py
-+++ b/src/sage/doctest/control.py
-@@ -357,20 +357,6 @@ class DocTestController(SageObject):
-                 # Special case to run all optional tests
-                 options.optional = True
-             else:
--                # We replace the 'optional' tag by all optional
--                # packages for which the installed version matches the
--                # latest available version (this implies in particular
--                # that the package is actually installed).
--                if 'optional' in options.optional:
--                    options.optional.discard('optional')
--                    from sage.misc.package import list_packages
--                    for pkg in list_packages('optional', local=True).values():
--                        if pkg['installed'] and pkg['installed_version'] == pkg['remote_version']:
--                            options.optional.add(pkg['name'])
--
--                    from sage.features import package_systems
--                    options.optional.update(system.name for system in package_systems())
--
-                 # Check that all tags are valid
-                 for o in options.optional:
-                     if not optionaltag_regex.search(o):

Copied: sagemath/repos/community-x86_64/test-optional.patch (from rev 1038464, sagemath/trunk/test-optional.patch)
===================================================================
--- test-optional.patch	                        (rev 0)
+++ test-optional.patch	2021-11-07 10:12:21 UTC (rev 1038465)
@@ -0,0 +1,25 @@
+diff --git a/src/sage/doctest/control.py b/src/sage/doctest/control.py
+index 2d93841e50..937e20cd2e 100644
+--- a/src/sage/doctest/control.py
++++ b/src/sage/doctest/control.py
+@@ -357,20 +357,6 @@ class DocTestController(SageObject):
+                 # Special case to run all optional tests
+                 options.optional = True
+             else:
+-                # We replace the 'optional' tag by all optional
+-                # packages for which the installed version matches the
+-                # latest available version (this implies in particular
+-                # that the package is actually installed).
+-                if 'optional' in options.optional:
+-                    options.optional.discard('optional')
+-                    from sage.misc.package import list_packages
+-                    for pkg in list_packages('optional', local=True).values():
+-                        if pkg['installed'] and pkg['installed_version'] == pkg['remote_version']:
+-                            options.optional.add(pkg['name'])
+-
+-                    from sage.features import package_systems
+-                    options.optional.update(system.name for system in package_systems())
+-
+                 # Check that all tags are valid
+                 for o in options.optional:
+                     if not optionaltag_regex.search(o):



More information about the arch-commits mailing list