[arch-commits] Commit in sagemath/repos/community-x86_64 (16 files)
Antonio Rojas
arojas at gemini.archlinux.org
Fri Apr 1 07:26:39 UTC 2022
Date: Friday, April 1, 2022 @ 07:26:38
Author: arojas
Revision: 1179434
archrelease: copy trunk to community-x86_64
Added:
sagemath/repos/community-x86_64/PKGBUILD
(from rev 1179433, sagemath/trunk/PKGBUILD)
sagemath/repos/community-x86_64/latte-count.patch
(from rev 1179433, sagemath/trunk/latte-count.patch)
sagemath/repos/community-x86_64/sagemath-bliss-0.77.patch
(from rev 1179433, sagemath/trunk/sagemath-bliss-0.77.patch)
sagemath/repos/community-x86_64/sagemath-doc-sphinx4.3.patch
(from rev 1179433, sagemath/trunk/sagemath-doc-sphinx4.3.patch)
sagemath/repos/community-x86_64/sagemath-linbox-1.7.patch
(from rev 1179433, sagemath/trunk/sagemath-linbox-1.7.patch)
sagemath/repos/community-x86_64/sagemath-lrcalc2.patch
(from rev 1179433, sagemath/trunk/sagemath-lrcalc2.patch)
sagemath/repos/community-x86_64/sagemath-optional-packages.patch
(from rev 1179433, sagemath/trunk/sagemath-optional-packages.patch)
sagemath/repos/community-x86_64/test-optional.patch
(from rev 1179433, 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-bliss-0.77.patch
sagemath/repos/community-x86_64/sagemath-doc-sphinx4.3.patch
sagemath/repos/community-x86_64/sagemath-linbox-1.7.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 | 234 +++---
latte-count.patch | 170 ++--
sagemath-bliss-0.77.patch | 366 ++++-----
sagemath-doc-sphinx4.3.patch | 24
sagemath-linbox-1.7.patch | 116 +--
sagemath-lrcalc2.patch | 1370 ++++++++++++++++++-------------------
sagemath-optional-packages.patch | 34
test-optional.patch | 34
8 files changed, 1174 insertions(+), 1174 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2022-04-01 07:26:11 UTC (rev 1179433)
+++ PKGBUILD 2022-04-01 07:26:38 UTC (rev 1179434)
@@ -1,117 +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.5
-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-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 singular 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 python-primecountpy)
-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'
- 'bliss: bliss 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'
- '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)
-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-linbox-1.7.patch
- sagemath-bliss-0.77.patch
- sagemath-doc-sphinx4.3.patch)
-sha256sums=('8d70a3b26080802c5b2e33dda4c23795d494d8216a0c2ecfcd608ebab0e64ff6'
- 'eee5fa15d8c7be7e009166dbde3ea24bb10d7793dc12880516f278f86b1a6694'
- '2bf9e2b44c20c5bec9d90782f59a87374a3c726241179191e9589179e1550a03'
- '9d042070df3dfd53a1248659677798da888f733548eda91a6d5169c7aa1907e1'
- 'c8a1fb98f454dfd52101373e478e396d83a7d55c2c658b1d246a86603cbb15e8'
- 'eacea27b214d32cb886a75695153dfc36b5bad2fd2517e8e4eee18e74220e9e3'
- '49ede468b8e1e7b8d7a390aab9ff1a6e899a0c5e487632cbf76902d80c637505'
- '4e311733bc4c1d7ab4e898356838f101eff26738e7d24fb50c1879fa13a75c6e')
-
-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
-# Fix build with linbox 1.7 https://trac.sagemath.org/ticket/32959
- patch -p1 -i ../sagemath-linbox-1.7.patch
-# Fix build with bliss 0.77 https://trac.sagemath.org/ticket/33010
- patch -p1 -i ../sagemath-bliss-0.77.patch
-# Fix sagemath-doc build with Sphinx 4.3 https://trac.sagemath.org/ticket/32968
- patch -p1 -i ../sagemath-doc-sphinx4.3.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
- export PYTHONPATH="$PWD"/../sage-setup
- python setup.py build
-}
-
-package() {
- cd sage-$pkgver/pkgs/sagemath-standard
-
- python setup.py install --root="$pkgdir" --optimize=1
-
-# 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 1179433, sagemath/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2022-04-01 07:26:38 UTC (rev 1179434)
@@ -0,0 +1,117 @@
+# 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.5
+pkgrel=3
+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-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 singular 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 python-primecountpy)
+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'
+ 'bliss: bliss 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'
+ '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)
+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-linbox-1.7.patch
+ sagemath-bliss-0.77.patch
+ sagemath-doc-sphinx4.3.patch)
+sha256sums=('8d70a3b26080802c5b2e33dda4c23795d494d8216a0c2ecfcd608ebab0e64ff6'
+ 'eee5fa15d8c7be7e009166dbde3ea24bb10d7793dc12880516f278f86b1a6694'
+ '2bf9e2b44c20c5bec9d90782f59a87374a3c726241179191e9589179e1550a03'
+ '9d042070df3dfd53a1248659677798da888f733548eda91a6d5169c7aa1907e1'
+ 'c8a1fb98f454dfd52101373e478e396d83a7d55c2c658b1d246a86603cbb15e8'
+ 'eacea27b214d32cb886a75695153dfc36b5bad2fd2517e8e4eee18e74220e9e3'
+ '49ede468b8e1e7b8d7a390aab9ff1a6e899a0c5e487632cbf76902d80c637505'
+ '4e311733bc4c1d7ab4e898356838f101eff26738e7d24fb50c1879fa13a75c6e')
+
+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
+# Fix build with linbox 1.7 https://trac.sagemath.org/ticket/32959
+ patch -p1 -i ../sagemath-linbox-1.7.patch
+# Fix build with bliss 0.77 https://trac.sagemath.org/ticket/33010
+ patch -p1 -i ../sagemath-bliss-0.77.patch
+# Fix sagemath-doc build with Sphinx 4.3 https://trac.sagemath.org/ticket/32968
+ patch -p1 -i ../sagemath-doc-sphinx4.3.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
+ export PYTHONPATH="$PWD"/../sage-setup
+ python setup.py build
+}
+
+package() {
+ cd sage-$pkgver/pkgs/sagemath-standard
+
+ python setup.py install --root="$pkgdir" --optimize=1
+
+# 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 2022-04-01 07:26:11 UTC (rev 1179433)
+++ latte-count.patch 2022-04-01 07:26:38 UTC (rev 1179434)
@@ -1,85 +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
-@@ -194,7 +194,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
-@@ -202,7 +202,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
-@@ -210,7 +210,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
-@@ -218,7 +218,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
-@@ -230,7 +230,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
-@@ -21,7 +21,7 @@ from . import Executable, Feature, FeatureTestResult
- sage: isinstance(Latte_count(), Latte_count)
- True
- """
-- 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 1179433, sagemath/trunk/latte-count.patch)
===================================================================
--- latte-count.patch (rev 0)
+++ latte-count.patch 2022-04-01 07:26:38 UTC (rev 1179434)
@@ -0,0 +1,85 @@
+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
+@@ -194,7 +194,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
+@@ -202,7 +202,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
+@@ -210,7 +210,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
+@@ -218,7 +218,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
+@@ -230,7 +230,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
+@@ -21,7 +21,7 @@ from . import Executable, Feature, FeatureTestResult
+ sage: isinstance(Latte_count(), Latte_count)
+ True
+ """
+- Executable.__init__(self, "count", executable="count",
++ Executable.__init__(self, "latte-count", executable="latte-count",
+ spkg="latte_int",
+ url=LATTE_URL)
+
+
Deleted: sagemath-bliss-0.77.patch
===================================================================
--- sagemath-bliss-0.77.patch 2022-04-01 07:26:11 UTC (rev 1179433)
+++ sagemath-bliss-0.77.patch 2022-04-01 07:26:38 UTC (rev 1179434)
@@ -1,183 +0,0 @@
-diff --git a/build/pkgs/bliss/checksums.ini b/build/pkgs/bliss/checksums.ini
-index e97d89587b..0c1ebf647b 100644
---- a/build/pkgs/bliss/checksums.ini
-+++ b/build/pkgs/bliss/checksums.ini
-@@ -1,4 +1,5 @@
--tarball=bliss-VERSION.tar.gz
--sha1=1da8f098046824fbfff4c64c337e28b2a082f74f
--md5=452aea8737d3c4ad0d8ff39180be8004
--cksum=2193930007
-+tarball=bliss-VERSION.zip
-+sha1=c91c9dcbc11d66ffbcf6415e09ebe793df37be2a
-+md5=5707cbfd9fd00980571c64ab3584c505
-+cksum=1626493724
-+upstream_url=https://users.aalto.fi/~tjunttil/bliss/downloads/bliss-VERSION.zip
-diff --git a/build/pkgs/bliss/dependencies b/build/pkgs/bliss/dependencies
-index 3546cda461..66d6773d90 100644
---- a/build/pkgs/bliss/dependencies
-+++ b/build/pkgs/bliss/dependencies
-@@ -1,4 +1,4 @@
--# no dependencies
-+| cmake
-
- ----------
- All lines of this file are ignored except the first.
-diff --git a/build/pkgs/bliss/package-version.txt b/build/pkgs/bliss/package-version.txt
-index e93ee1376f..9e1e206c41 100644
---- a/build/pkgs/bliss/package-version.txt
-+++ b/build/pkgs/bliss/package-version.txt
-@@ -1 +1 @@
--0.73+debian-1+sage-2016-08-02.p0
-+0.77
-diff --git a/build/pkgs/bliss/spkg-install.in b/build/pkgs/bliss/spkg-install.in
-index aaf4c3037b..ad1fe8176c 100644
---- a/build/pkgs/bliss/spkg-install.in
-+++ b/build/pkgs/bliss/spkg-install.in
-@@ -1,4 +1,6 @@
- cd src
--sdh_configure --disable-gmp
-+sdh_cmake -DUSE_GMP=OFF -DCMAKE_VERBOSE_MAKEFILE=ON
- sdh_make
--sdh_make_install
-+sdh_install src/*.hh $SAGE_LOCAL/include/bliss/
-+sdh_install libbliss.so $SAGE_LOCAL/lib/
-+sdh_install bliss $SAGE_LOCAL/bin/
-diff --git a/build/pkgs/bliss/spkg-src b/build/pkgs/bliss/spkg-src
-deleted file mode 100755
-index 90073233b7..0000000000
---- a/build/pkgs/bliss/spkg-src
-+++ /dev/null
-@@ -1,28 +0,0 @@
--#!/bin/sh
--#
--# creates the tarball in the current dir, to be moved to ../../../upstream
--#
--# adapted from cliquer/spkg-src
--
--die () {
-- echo >&2 "$@"
-- exit 1
--}
--
--rm -rf bliss/
--git clone -b sage_package https://github.com/mkoeppe/bliss.git || die "Failed to git clone"
--cd bliss/
--
--VERSION=`autoconf --trace='AC_INIT:$2'`
--libtoolize || die "Failed to autoreconf"
--autoreconf -fi || die "Failed to autoreconf"
--automake --add-missing --copy || die "automake failed"
--./configure || die "configure failed"
--
--rm -f bliss-$VERSION.tar.gz
--make dist || die "make dist failed"
--mv bliss-$VERSION.tar.gz ../
--cd ..
--rm -rf bliss/
--
--
-diff --git a/src/sage/graphs/bliss.pyx b/src/sage/graphs/bliss.pyx
-index 22e861a587..fa426e3d11 100644
---- a/src/sage/graphs/bliss.pyx
-+++ b/src/sage/graphs/bliss.pyx
-@@ -47,22 +47,27 @@ cdef extern from "bliss/graph.hh" namespace "bliss":
- cdef cppclass Graph(AbstractGraph):
- Graph(const unsigned int)
- void add_edge(const unsigned int, const unsigned int)
-- void find_automorphisms(Stats&, void (*)(void* , unsigned int,
-- const unsigned int*), void*)
-+ #void find_automorphisms(Stats&, void (*)(void* , unsigned int,
-+ #const unsigned int*), void*)
- void change_color(const unsigned int, const unsigned int);
-- const unsigned int* canonical_form(Stats&, void (*)(void*,unsigned int,
-- const unsigned int*), void*)
-+ const unsigned int* canonical_form(Stats&)
-+
-+cdef extern from "bliss/digraph.hh" namespace "bliss":
-
- cdef cppclass Digraph(AbstractGraph):
- Digraph(const unsigned int)
- void add_edge(const unsigned int, const unsigned int)
-- void find_automorphisms(Stats&, void (*)(void* , unsigned int,
-- const unsigned int*), void*)
-+ #void find_automorphisms(Stats&, void (*)(void* , unsigned int,
-+ #const unsigned int*), void*)
- void change_color(const unsigned int, const unsigned int);
-- const unsigned int* canonical_form(Stats&, void (*)(void*,unsigned int,
-- const unsigned int*), void*)
-+ const unsigned int* canonical_form(Stats&)
- unsigned int get_hash()
-
-+cdef extern from "bliss_find_automorphisms.h":
-+
-+ void bliss_find_automorphisms(Graph*, void (*)(void*, unsigned int, const unsigned int*), void*, Stats&)
-+ void bliss_find_automorphisms(Digraph*, void (*)(void*, unsigned int, const unsigned int*), void*, Stats&)
-+
-
- cdef int encoding_numbits(int n):
- r"""
-@@ -124,9 +129,6 @@ cdef void add_gen(void *user_param, unsigned int n, const unsigned int *aut):
-
- sig_free(done)
-
--cdef void empty_hook(void *user_param , unsigned int n, const unsigned int *aut):
-- return
--
- #####################################################
- # constructing bliss graphs from edge lists
- #####################################################
-@@ -345,10 +347,10 @@ cdef canonical_form_from_edge_list(int Vnr, list Vout, list Vin, int Lnr=1, list
-
- if directed:
- d = bliss_digraph_from_labelled_edges(Vnr, Lnr, Vout, Vin, labels, partition)
-- aut = d.canonical_form(s, empty_hook, NULL)
-+ aut = d.canonical_form(s)
- else:
- g = bliss_graph_from_labelled_edges(Vnr, Lnr, Vout, Vin, labels, partition)
-- aut = g.canonical_form(s, empty_hook, NULL)
-+ aut = g.canonical_form(s)
-
- for i in range(len(Vout)):
- x = Vout[i]
-@@ -640,11 +642,11 @@ cdef automorphism_group_gens_from_edge_list(int Vnr, Vout, Vin, int Lnr=1, label
-
- if directed:
- d = bliss_digraph_from_labelled_edges(Vnr, Lnr, Vout, Vin, labels, partition)
-- d.find_automorphisms(s, add_gen, <void*>data)
-+ bliss_find_automorphisms(d, add_gen, <void*>data, s)
- del d
- else:
- g = bliss_graph_from_labelled_edges(Vnr, Lnr, Vout, Vin, labels, partition)
-- g.find_automorphisms(s, add_gen, <void*>data)
-+ bliss_find_automorphisms(g, add_gen, <void*>data, s)
- del g
-
- return [[cyc for cyc in gen if cyc[0] is not None] for gen in gens]
-diff --git a/src/sage/graphs/bliss_find_automorphisms.h b/src/sage/graphs/bliss_find_automorphisms.h
-new file mode 100644
-index 0000000000..a2c084a163
---- /dev/null
-+++ b/src/sage/graphs/bliss_find_automorphisms.h
-@@ -0,0 +1,22 @@
-+#include <bliss/graph.hh>
-+#include <bliss/digraph.hh>
-+
-+inline void bliss_find_automorphisms(bliss::Graph *graph, void (*hook)(void *user_param, unsigned int n, const unsigned int *aut), void *hook_user_param, bliss::Stats s)
-+{
-+ auto report_aut = [&](unsigned int n, const unsigned int *aut) -> void {
-+ if(hook)
-+ (*hook)(hook_user_param, n, aut);
-+ };
-+
-+ graph->find_automorphisms(s, report_aut);
-+}
-+
-+inline void bliss_find_automorphisms(bliss::Digraph *graph, void (*hook)(void *user_param, unsigned int n, const unsigned int *aut), void *hook_user_param, bliss::Stats s)
-+{
-+ auto report_aut = [&](unsigned int n, const unsigned int *aut) -> void {
-+ if(hook)
-+ (*hook)(hook_user_param, n, aut);
-+ };
-+
-+ graph->find_automorphisms(s, report_aut);
-+}
Copied: sagemath/repos/community-x86_64/sagemath-bliss-0.77.patch (from rev 1179433, sagemath/trunk/sagemath-bliss-0.77.patch)
===================================================================
--- sagemath-bliss-0.77.patch (rev 0)
+++ sagemath-bliss-0.77.patch 2022-04-01 07:26:38 UTC (rev 1179434)
@@ -0,0 +1,183 @@
+diff --git a/build/pkgs/bliss/checksums.ini b/build/pkgs/bliss/checksums.ini
+index e97d89587b..0c1ebf647b 100644
+--- a/build/pkgs/bliss/checksums.ini
++++ b/build/pkgs/bliss/checksums.ini
+@@ -1,4 +1,5 @@
+-tarball=bliss-VERSION.tar.gz
+-sha1=1da8f098046824fbfff4c64c337e28b2a082f74f
+-md5=452aea8737d3c4ad0d8ff39180be8004
+-cksum=2193930007
++tarball=bliss-VERSION.zip
++sha1=c91c9dcbc11d66ffbcf6415e09ebe793df37be2a
++md5=5707cbfd9fd00980571c64ab3584c505
++cksum=1626493724
++upstream_url=https://users.aalto.fi/~tjunttil/bliss/downloads/bliss-VERSION.zip
+diff --git a/build/pkgs/bliss/dependencies b/build/pkgs/bliss/dependencies
+index 3546cda461..66d6773d90 100644
+--- a/build/pkgs/bliss/dependencies
++++ b/build/pkgs/bliss/dependencies
+@@ -1,4 +1,4 @@
+-# no dependencies
++| cmake
+
+ ----------
+ All lines of this file are ignored except the first.
+diff --git a/build/pkgs/bliss/package-version.txt b/build/pkgs/bliss/package-version.txt
+index e93ee1376f..9e1e206c41 100644
+--- a/build/pkgs/bliss/package-version.txt
++++ b/build/pkgs/bliss/package-version.txt
+@@ -1 +1 @@
+-0.73+debian-1+sage-2016-08-02.p0
++0.77
+diff --git a/build/pkgs/bliss/spkg-install.in b/build/pkgs/bliss/spkg-install.in
+index aaf4c3037b..ad1fe8176c 100644
+--- a/build/pkgs/bliss/spkg-install.in
++++ b/build/pkgs/bliss/spkg-install.in
+@@ -1,4 +1,6 @@
+ cd src
+-sdh_configure --disable-gmp
++sdh_cmake -DUSE_GMP=OFF -DCMAKE_VERBOSE_MAKEFILE=ON
+ sdh_make
+-sdh_make_install
++sdh_install src/*.hh $SAGE_LOCAL/include/bliss/
++sdh_install libbliss.so $SAGE_LOCAL/lib/
++sdh_install bliss $SAGE_LOCAL/bin/
+diff --git a/build/pkgs/bliss/spkg-src b/build/pkgs/bliss/spkg-src
+deleted file mode 100755
+index 90073233b7..0000000000
+--- a/build/pkgs/bliss/spkg-src
++++ /dev/null
+@@ -1,28 +0,0 @@
+-#!/bin/sh
+-#
+-# creates the tarball in the current dir, to be moved to ../../../upstream
+-#
+-# adapted from cliquer/spkg-src
+-
+-die () {
+- echo >&2 "$@"
+- exit 1
+-}
+-
+-rm -rf bliss/
+-git clone -b sage_package https://github.com/mkoeppe/bliss.git || die "Failed to git clone"
+-cd bliss/
+-
+-VERSION=`autoconf --trace='AC_INIT:$2'`
+-libtoolize || die "Failed to autoreconf"
+-autoreconf -fi || die "Failed to autoreconf"
+-automake --add-missing --copy || die "automake failed"
+-./configure || die "configure failed"
+-
+-rm -f bliss-$VERSION.tar.gz
+-make dist || die "make dist failed"
+-mv bliss-$VERSION.tar.gz ../
+-cd ..
+-rm -rf bliss/
+-
+-
+diff --git a/src/sage/graphs/bliss.pyx b/src/sage/graphs/bliss.pyx
+index 22e861a587..fa426e3d11 100644
+--- a/src/sage/graphs/bliss.pyx
++++ b/src/sage/graphs/bliss.pyx
+@@ -47,22 +47,27 @@ cdef extern from "bliss/graph.hh" namespace "bliss":
+ cdef cppclass Graph(AbstractGraph):
+ Graph(const unsigned int)
+ void add_edge(const unsigned int, const unsigned int)
+- void find_automorphisms(Stats&, void (*)(void* , unsigned int,
+- const unsigned int*), void*)
++ #void find_automorphisms(Stats&, void (*)(void* , unsigned int,
++ #const unsigned int*), void*)
+ void change_color(const unsigned int, const unsigned int);
+- const unsigned int* canonical_form(Stats&, void (*)(void*,unsigned int,
+- const unsigned int*), void*)
++ const unsigned int* canonical_form(Stats&)
++
++cdef extern from "bliss/digraph.hh" namespace "bliss":
+
+ cdef cppclass Digraph(AbstractGraph):
+ Digraph(const unsigned int)
+ void add_edge(const unsigned int, const unsigned int)
+- void find_automorphisms(Stats&, void (*)(void* , unsigned int,
+- const unsigned int*), void*)
++ #void find_automorphisms(Stats&, void (*)(void* , unsigned int,
++ #const unsigned int*), void*)
+ void change_color(const unsigned int, const unsigned int);
+- const unsigned int* canonical_form(Stats&, void (*)(void*,unsigned int,
+- const unsigned int*), void*)
++ const unsigned int* canonical_form(Stats&)
+ unsigned int get_hash()
+
++cdef extern from "bliss_find_automorphisms.h":
++
++ void bliss_find_automorphisms(Graph*, void (*)(void*, unsigned int, const unsigned int*), void*, Stats&)
++ void bliss_find_automorphisms(Digraph*, void (*)(void*, unsigned int, const unsigned int*), void*, Stats&)
++
+
+ cdef int encoding_numbits(int n):
+ r"""
+@@ -124,9 +129,6 @@ cdef void add_gen(void *user_param, unsigned int n, const unsigned int *aut):
+
+ sig_free(done)
+
+-cdef void empty_hook(void *user_param , unsigned int n, const unsigned int *aut):
+- return
+-
+ #####################################################
+ # constructing bliss graphs from edge lists
+ #####################################################
+@@ -345,10 +347,10 @@ cdef canonical_form_from_edge_list(int Vnr, list Vout, list Vin, int Lnr=1, list
+
+ if directed:
+ d = bliss_digraph_from_labelled_edges(Vnr, Lnr, Vout, Vin, labels, partition)
+- aut = d.canonical_form(s, empty_hook, NULL)
++ aut = d.canonical_form(s)
+ else:
+ g = bliss_graph_from_labelled_edges(Vnr, Lnr, Vout, Vin, labels, partition)
+- aut = g.canonical_form(s, empty_hook, NULL)
++ aut = g.canonical_form(s)
+
+ for i in range(len(Vout)):
+ x = Vout[i]
+@@ -640,11 +642,11 @@ cdef automorphism_group_gens_from_edge_list(int Vnr, Vout, Vin, int Lnr=1, label
+
+ if directed:
+ d = bliss_digraph_from_labelled_edges(Vnr, Lnr, Vout, Vin, labels, partition)
+- d.find_automorphisms(s, add_gen, <void*>data)
++ bliss_find_automorphisms(d, add_gen, <void*>data, s)
+ del d
+ else:
+ g = bliss_graph_from_labelled_edges(Vnr, Lnr, Vout, Vin, labels, partition)
+- g.find_automorphisms(s, add_gen, <void*>data)
++ bliss_find_automorphisms(g, add_gen, <void*>data, s)
+ del g
+
+ return [[cyc for cyc in gen if cyc[0] is not None] for gen in gens]
+diff --git a/src/sage/graphs/bliss_find_automorphisms.h b/src/sage/graphs/bliss_find_automorphisms.h
+new file mode 100644
+index 0000000000..a2c084a163
+--- /dev/null
++++ b/src/sage/graphs/bliss_find_automorphisms.h
+@@ -0,0 +1,22 @@
++#include <bliss/graph.hh>
++#include <bliss/digraph.hh>
++
++inline void bliss_find_automorphisms(bliss::Graph *graph, void (*hook)(void *user_param, unsigned int n, const unsigned int *aut), void *hook_user_param, bliss::Stats s)
++{
++ auto report_aut = [&](unsigned int n, const unsigned int *aut) -> void {
++ if(hook)
++ (*hook)(hook_user_param, n, aut);
++ };
++
++ graph->find_automorphisms(s, report_aut);
++}
++
++inline void bliss_find_automorphisms(bliss::Digraph *graph, void (*hook)(void *user_param, unsigned int n, const unsigned int *aut), void *hook_user_param, bliss::Stats s)
++{
++ auto report_aut = [&](unsigned int n, const unsigned int *aut) -> void {
++ if(hook)
++ (*hook)(hook_user_param, n, aut);
++ };
++
++ graph->find_automorphisms(s, report_aut);
++}
Deleted: sagemath-doc-sphinx4.3.patch
===================================================================
--- sagemath-doc-sphinx4.3.patch 2022-04-01 07:26:11 UTC (rev 1179433)
+++ sagemath-doc-sphinx4.3.patch 2022-04-01 07:26:38 UTC (rev 1179434)
@@ -1,12 +0,0 @@
-diff --git a/src/sage/docs/conf.py b/src/sage/docs/conf.py
-index c788623..dd92d4c 100644
---- a/src/sage/docs/conf.py
-+++ b/src/sage/docs/conf.py
-@@ -911,6 +911,7 @@ def setup(app):
- if app.srcdir.startswith(SAGE_DOC_SRC):
- app.add_config_value('intersphinx_mapping', {}, False)
- app.add_config_value('intersphinx_cache_limit', 5, False)
-+ app.add_config_value('intersphinx_disabled_reftypes', [], False)
- app.connect('config-inited', set_intersphinx_mappings)
- app.connect('builder-inited', intersphinx.load_mappings)
- # We do *not* fully initialize intersphinx since we call it by hand
Copied: sagemath/repos/community-x86_64/sagemath-doc-sphinx4.3.patch (from rev 1179433, sagemath/trunk/sagemath-doc-sphinx4.3.patch)
===================================================================
--- sagemath-doc-sphinx4.3.patch (rev 0)
+++ sagemath-doc-sphinx4.3.patch 2022-04-01 07:26:38 UTC (rev 1179434)
@@ -0,0 +1,12 @@
+diff --git a/src/sage/docs/conf.py b/src/sage/docs/conf.py
+index c788623..dd92d4c 100644
+--- a/src/sage/docs/conf.py
++++ b/src/sage/docs/conf.py
+@@ -911,6 +911,7 @@ def setup(app):
+ if app.srcdir.startswith(SAGE_DOC_SRC):
+ app.add_config_value('intersphinx_mapping', {}, False)
+ app.add_config_value('intersphinx_cache_limit', 5, False)
++ app.add_config_value('intersphinx_disabled_reftypes', [], False)
+ app.connect('config-inited', set_intersphinx_mappings)
+ app.connect('builder-inited', intersphinx.load_mappings)
+ # We do *not* fully initialize intersphinx since we call it by hand
Deleted: sagemath-linbox-1.7.patch
===================================================================
--- sagemath-linbox-1.7.patch 2022-04-01 07:26:11 UTC (rev 1179433)
+++ sagemath-linbox-1.7.patch 2022-04-01 07:26:38 UTC (rev 1179434)
@@ -1,58 +0,0 @@
-diff --git a/src/sage/libs/linbox/conversion.pxd b/src/sage/libs/linbox/conversion.pxd
-index 7794c9e..1753277 100644
---- a/src/sage/libs/linbox/conversion.pxd
-+++ b/src/sage/libs/linbox/conversion.pxd
-@@ -177,9 +177,8 @@ cdef inline Vector_integer_dense new_sage_vector_integer_dense(P, DenseVector_in
- - v -- linbox vector
- """
- cdef Vector_integer_dense res = P()
-- cdef cppvector[Integer] * vec = &v.refRep()
- cdef size_t i
- for i in range(<size_t> res._degree):
-- mpz_set(res._entries[i], vec[0][i].get_mpz_const())
-+ mpz_set(res._entries[i], v.getEntry(i).get_mpz_const())
-
- return res
-diff --git a/src/sage/libs/linbox/linbox.pxd b/src/sage/libs/linbox/linbox.pxd
-index 9112d15..dcc4829 100644
---- a/src/sage/libs/linbox/linbox.pxd
-+++ b/src/sage/libs/linbox/linbox.pxd
-@@ -32,7 +32,7 @@ cdef extern from "linbox/matrix/dense-matrix.h":
- ctypedef Modular_double Field
- ctypedef double Element
- DenseMatrix_Modular_double(Field F, size_t m, size_t n)
-- DenseMatrix_Modular_double(Field F, Element*, size_t m, size_t n)
-+ DenseMatrix_Modular_double(Field F, size_t m, size_t n, Element*)
- void setEntry(size_t i, size_t j, Element& a)
- Element &getEntry(size_t i, size_t j)
-
-@@ -42,7 +42,7 @@ cdef extern from "linbox/matrix/dense-matrix.h":
- ctypedef Modular_float Field
- ctypedef float Element
- DenseMatrix_Modular_float(Field F, size_t m, size_t n)
-- DenseMatrix_Modular_float(Field F, Element*, size_t m, size_t n)
-+ DenseMatrix_Modular_float(Field F, size_t m, size_t n, Element*)
- void setEntry(size_t i, size_t j, Element& a)
- Element &getEntry(size_t i, size_t j)
-
-@@ -101,7 +101,6 @@ cdef extern from "linbox/vector/vector.h":
- DenseVector_integer (Field &F)
- DenseVector_integer (Field &F, long& m)
- DenseVector_integer (Field &F, cppvector[Integer]&)
-- cppvector[Element]& refRep()
- size_t size()
- void resize(size_t)
- void resize(size_t n, const Element&)
-diff --git a/src/sage/matrix/matrix_modn_dense_template.pxi b/src/sage/matrix/matrix_modn_dense_template.pxi
-index 010365d..3d60726 100644
---- a/src/sage/matrix/matrix_modn_dense_template.pxi
-+++ b/src/sage/matrix/matrix_modn_dense_template.pxi
-@@ -219,7 +219,7 @@ cdef inline linbox_echelonize_efd(celement modulus, celement* entries, Py_ssize_
- return 0,[]
-
- cdef ModField *F = new ModField(<long>modulus)
-- cdef DenseMatrix *A = new DenseMatrix(F[0], <ModField.Element*>entries,<Py_ssize_t>nrows, <Py_ssize_t>ncols)
-+ cdef DenseMatrix *A = new DenseMatrix(F[0], <Py_ssize_t>nrows, <Py_ssize_t>ncols, <ModField.Element*>entries)
- cdef Py_ssize_t r = reducedRowEchelonize(A[0])
- cdef Py_ssize_t i,j
- for i in range(nrows):
Copied: sagemath/repos/community-x86_64/sagemath-linbox-1.7.patch (from rev 1179433, sagemath/trunk/sagemath-linbox-1.7.patch)
===================================================================
--- sagemath-linbox-1.7.patch (rev 0)
+++ sagemath-linbox-1.7.patch 2022-04-01 07:26:38 UTC (rev 1179434)
@@ -0,0 +1,58 @@
+diff --git a/src/sage/libs/linbox/conversion.pxd b/src/sage/libs/linbox/conversion.pxd
+index 7794c9e..1753277 100644
+--- a/src/sage/libs/linbox/conversion.pxd
++++ b/src/sage/libs/linbox/conversion.pxd
+@@ -177,9 +177,8 @@ cdef inline Vector_integer_dense new_sage_vector_integer_dense(P, DenseVector_in
+ - v -- linbox vector
+ """
+ cdef Vector_integer_dense res = P()
+- cdef cppvector[Integer] * vec = &v.refRep()
+ cdef size_t i
+ for i in range(<size_t> res._degree):
+- mpz_set(res._entries[i], vec[0][i].get_mpz_const())
++ mpz_set(res._entries[i], v.getEntry(i).get_mpz_const())
+
+ return res
+diff --git a/src/sage/libs/linbox/linbox.pxd b/src/sage/libs/linbox/linbox.pxd
+index 9112d15..dcc4829 100644
+--- a/src/sage/libs/linbox/linbox.pxd
++++ b/src/sage/libs/linbox/linbox.pxd
+@@ -32,7 +32,7 @@ cdef extern from "linbox/matrix/dense-matrix.h":
+ ctypedef Modular_double Field
+ ctypedef double Element
+ DenseMatrix_Modular_double(Field F, size_t m, size_t n)
+- DenseMatrix_Modular_double(Field F, Element*, size_t m, size_t n)
++ DenseMatrix_Modular_double(Field F, size_t m, size_t n, Element*)
+ void setEntry(size_t i, size_t j, Element& a)
+ Element &getEntry(size_t i, size_t j)
+
+@@ -42,7 +42,7 @@ cdef extern from "linbox/matrix/dense-matrix.h":
+ ctypedef Modular_float Field
+ ctypedef float Element
+ DenseMatrix_Modular_float(Field F, size_t m, size_t n)
+- DenseMatrix_Modular_float(Field F, Element*, size_t m, size_t n)
++ DenseMatrix_Modular_float(Field F, size_t m, size_t n, Element*)
+ void setEntry(size_t i, size_t j, Element& a)
+ Element &getEntry(size_t i, size_t j)
+
+@@ -101,7 +101,6 @@ cdef extern from "linbox/vector/vector.h":
+ DenseVector_integer (Field &F)
+ DenseVector_integer (Field &F, long& m)
+ DenseVector_integer (Field &F, cppvector[Integer]&)
+- cppvector[Element]& refRep()
+ size_t size()
+ void resize(size_t)
+ void resize(size_t n, const Element&)
+diff --git a/src/sage/matrix/matrix_modn_dense_template.pxi b/src/sage/matrix/matrix_modn_dense_template.pxi
+index 010365d..3d60726 100644
+--- a/src/sage/matrix/matrix_modn_dense_template.pxi
++++ b/src/sage/matrix/matrix_modn_dense_template.pxi
+@@ -219,7 +219,7 @@ cdef inline linbox_echelonize_efd(celement modulus, celement* entries, Py_ssize_
+ return 0,[]
+
+ cdef ModField *F = new ModField(<long>modulus)
+- cdef DenseMatrix *A = new DenseMatrix(F[0], <ModField.Element*>entries,<Py_ssize_t>nrows, <Py_ssize_t>ncols)
++ cdef DenseMatrix *A = new DenseMatrix(F[0], <Py_ssize_t>nrows, <Py_ssize_t>ncols, <ModField.Element*>entries)
+ cdef Py_ssize_t r = reducedRowEchelonize(A[0])
+ cdef Py_ssize_t i,j
+ for i in range(nrows):
Deleted: sagemath-lrcalc2.patch
===================================================================
--- sagemath-lrcalc2.patch 2022-04-01 07:26:11 UTC (rev 1179433)
+++ sagemath-lrcalc2.patch 2022-04-01 07:26:38 UTC (rev 1179434)
@@ -1,685 +0,0 @@
-diff --git a/build/pkgs/lrcalc/checksums.ini b/build/pkgs/lrcalc/checksums.ini
-index 7a0e6a1b96..8b8620ba52 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
-+tarball=liblrcalc-VERSION.tar.gz
-+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-configure.m4 b/build/pkgs/lrcalc/spkg-configure.m4
-index f2f8b74f8f..b8171ce23f 100644
---- a/build/pkgs/lrcalc/spkg-configure.m4
-+++ b/build/pkgs/lrcalc/spkg-configure.m4
-@@ -1,9 +1,10 @@
- SAGE_SPKG_CONFIGURE([lrcalc], [
-- AC_CHECK_HEADERS([lrcalc/schublib.h], [
-+ AC_LANG_PUSH([C])
-+ AC_CHECK_HEADERS([lrcalc/schublib.h] [lrcalc/lrcoef.h], [
- AC_SEARCH_LIBS([mult_poly_schubert], [lrcalc], [], [sage_spkg_install_lrcalc=yes])
- ], [sage_spkg_install_lrcalc=yes],
-- [[#ifndef _HASHTAB_H
-- #include <lrcalc/hashtab.h>
-- #include <lrcalc/vector.h>
-+ [[#ifndef _IVECTOR_H
-+ #include <lrcalc/ivector.h>
- #endif]])
-+ AC_LANG_POP
- ])
-diff --git a/build/pkgs/lrcalc/spkg-install.in b/build/pkgs/lrcalc/spkg-install.in
-index d6665bfb42..a863950189 100644
---- a/build/pkgs/lrcalc/spkg-install.in
-+++ b/build/pkgs/lrcalc/spkg-install.in
-@@ -1,9 +1,5 @@
- cd src
-
--# Use newer version of config.guess and config.sub (see Trac #19725)
--cp "$SAGE_ROOT"/config/config.guess .
--cp "$SAGE_ROOT"/config/config.sub .
--
- sdh_configure
- sdh_make
- sdh_make_install
-diff --git a/build/pkgs/lrcalc_python/SPKG.rst b/build/pkgs/lrcalc_python/SPKG.rst
-new file mode 100644
-index 0000000000..3a98d556ca
---- /dev/null
-+++ b/build/pkgs/lrcalc_python/SPKG.rst
-@@ -0,0 +1,22 @@
-+lrcalc_python: Littlewood-Richardson calculator
-+===============================================
-+
-+Description
-+-----------
-+
-+Python bindings for the Littlewood-Richardson Calculator
-+
-+http://sites.math.rutgers.edu/~asbuch/lrcalc/
-+
-+License
-+-------
-+
-+GNU General Public License V3
-+
-+
-+Upstream Contact
-+----------------
-+
-+Anders S. Buch (asbuch at math.rutgers.edu)
-+
-+https://bitbucket.org/asbuch/lrcalc
-diff --git a/build/pkgs/lrcalc_python/checksums.ini b/build/pkgs/lrcalc_python/checksums.ini
-new file mode 100644
-index 0000000000..bdfef8711e
---- /dev/null
-+++ b/build/pkgs/lrcalc_python/checksums.ini
-@@ -0,0 +1,5 @@
-+tarball=lrcalc-VERSION.tar.gz
-+sha1=3e9366d9e8b8beccec70b07d174b8f6683c01574
-+md5=4ae444d12ed8e0dd770594ea3ef4a208
-+cksum=2741305196
-+upstream_url=https://pypi.io/packages/source/l/lrcalc/lrcalc-VERSION.tar.gz
-diff --git a/build/pkgs/lrcalc_python/dependencies b/build/pkgs/lrcalc_python/dependencies
-new file mode 100644
-index 0000000000..63e5177ae0
---- /dev/null
-+++ b/build/pkgs/lrcalc_python/dependencies
-@@ -0,0 +1,5 @@
-+$(PYTHON) lrcalc | $(PYTHON_TOOLCHAIN) cython
-+
-+----------
-+All lines of this file are ignored except the first.
-+It is copied by SAGE_ROOT/build/make/install into SAGE_ROOT/build/make/Makefile.
-diff --git a/build/pkgs/lrcalc_python/install-requires.txt b/build/pkgs/lrcalc_python/install-requires.txt
-new file mode 100644
-index 0000000000..8b44d97f4b
---- /dev/null
-+++ b/build/pkgs/lrcalc_python/install-requires.txt
-@@ -0,0 +1 @@
-+lrcalc ~=2.1
-diff --git a/build/pkgs/lrcalc_python/package-version.txt b/build/pkgs/lrcalc_python/package-version.txt
-new file mode 100644
-index 0000000000..879b416e60
---- /dev/null
-+++ b/build/pkgs/lrcalc_python/package-version.txt
-@@ -0,0 +1 @@
-+2.1
-diff --git a/build/pkgs/lrcalc_python/spkg-install.in b/build/pkgs/lrcalc_python/spkg-install.in
-new file mode 100644
-index 0000000000..deba1bb42b
---- /dev/null
-+++ b/build/pkgs/lrcalc_python/spkg-install.in
-@@ -0,0 +1 @@
-+cd src && sdh_pip_install .
-diff --git a/build/pkgs/lrcalc_python/type b/build/pkgs/lrcalc_python/type
-new file mode 100644
-index 0000000000..a6a7b9cd72
---- /dev/null
-+++ b/build/pkgs/lrcalc_python/type
-@@ -0,0 +1 @@
-+standard
-diff --git a/build/pkgs/sagelib/dependencies b/build/pkgs/sagelib/dependencies
-index 9c7797b1f4..3369d4d905 100644
---- a/build/pkgs/sagelib/dependencies
-+++ b/build/pkgs/sagelib/dependencies
-@@ -1,4 +1,4 @@
--FORCE $(SCRIPTS) arb boost_cropped $(BLAS) brial cliquer cypari cysignals cython ecl eclib ecm flint libgd gap giac givaro glpk gmpy2 gsl iml jinja2 jupyter_core lcalc lrcalc libbraiding libhomfly libpng linbox m4ri m4rie memory_allocator mpc mpfi mpfr $(MP_LIBRARY) ntl numpy pari pip pkgconfig planarity ppl pplpy primesieve primecount primecountpy pycygwin $(PYTHON) ratpoints requests rw sage_conf singular symmetrica zn_poly $(PCFILES) | $(PYTHON_TOOLCHAIN) sage_setup
-+FORCE $(SCRIPTS) arb boost_cropped $(BLAS) brial cliquer cypari cysignals cython ecl eclib ecm flint libgd gap giac givaro glpk gmpy2 gsl iml jinja2 jupyter_core lcalc lrcalc_python libbraiding libhomfly libpng linbox m4ri m4rie memory_allocator mpc mpfi mpfr $(MP_LIBRARY) ntl numpy pari pip pkgconfig planarity ppl pplpy primesieve primecount primecountpy pycygwin $(PYTHON) ratpoints requests rw sage_conf singular symmetrica zn_poly $(PCFILES) | $(PYTHON_TOOLCHAIN) sage_setup
-
- ----------
- All lines of this file are ignored except the first.
-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 b591081ec4..65db959944 100644
---- a/src/sage/libs/lrcalc/lrcalc.pyx
-+++ b/src/sage/libs/lrcalc/lrcalc.py
-@@ -187,180 +187,24 @@ 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
-+from sage.combinat.skew_tableau import SkewTableaux
-+from sage.combinat.skew_partition import SkewPartition
-+from sage.rings.integer import Integer
-+import lrcalc
-
--
--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.
-+def _lrcalc_dict_to_sage(result):
-+ r"""
-+ Translate from lrcalc output format to Sage expected format.
-
- 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 <class '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 <class '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 <class 'sage.rings.integer.Integer'>.
--
-- EXAMPLES::
--
-- sage: from sage.libs.lrcalc.lrcalc import coprod
-- sage: coprod([1]) #indirect doctest
-- {([1], []): 1}
-+ sage: mult([2,1],[3,2,1],3) # indirect doctest
-+ {[3, 3, 3]: 1, [4, 3, 2]: 2, [4, 4, 1]: 1, [5, 2, 2]: 1, [5, 3, 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
--
-+ return {_Partitions(la):Integer(k) for la,k in result.items()}
-
- def lrcoef_unsafe(outer, inner1, inner2):
- r"""
-@@ -392,18 +236,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 +343,24 @@ 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():
-+ la = _Partitions(i[0])
-+ output[la] = output.get(la, 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 +385,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 +415,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 {tuple(_Partitions(mu) for mu in la):Integer(k) for la,k in result.items()}
-
-
- def mult_schubert(w1, w2, rank=0):
-@@ -646,17 +448,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 {Permutation(list(la)):Integer(k) for la,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 +499,20 @@ 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)
-+ ST = SkewTableaux()
-+ for data in iterator:
-+ yield ST.from_shape_and_word(shape, [i+1 for i in data])
- 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)
-+ ST = SkewTableaux()
-+ for data in iterator:
-+ m = max(data) + 1
-+ w = [0] * m
-+ for j in data:
-+ w[j] += 1
-+ if w == wt:
-+ yield ST.from_shape_and_word(shape, [i+1 for i in data])
Copied: sagemath/repos/community-x86_64/sagemath-lrcalc2.patch (from rev 1179433, sagemath/trunk/sagemath-lrcalc2.patch)
===================================================================
--- sagemath-lrcalc2.patch (rev 0)
+++ sagemath-lrcalc2.patch 2022-04-01 07:26:38 UTC (rev 1179434)
@@ -0,0 +1,685 @@
+diff --git a/build/pkgs/lrcalc/checksums.ini b/build/pkgs/lrcalc/checksums.ini
+index 7a0e6a1b96..8b8620ba52 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
++tarball=liblrcalc-VERSION.tar.gz
++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-configure.m4 b/build/pkgs/lrcalc/spkg-configure.m4
+index f2f8b74f8f..b8171ce23f 100644
+--- a/build/pkgs/lrcalc/spkg-configure.m4
++++ b/build/pkgs/lrcalc/spkg-configure.m4
+@@ -1,9 +1,10 @@
+ SAGE_SPKG_CONFIGURE([lrcalc], [
+- AC_CHECK_HEADERS([lrcalc/schublib.h], [
++ AC_LANG_PUSH([C])
++ AC_CHECK_HEADERS([lrcalc/schublib.h] [lrcalc/lrcoef.h], [
+ AC_SEARCH_LIBS([mult_poly_schubert], [lrcalc], [], [sage_spkg_install_lrcalc=yes])
+ ], [sage_spkg_install_lrcalc=yes],
+- [[#ifndef _HASHTAB_H
+- #include <lrcalc/hashtab.h>
+- #include <lrcalc/vector.h>
++ [[#ifndef _IVECTOR_H
++ #include <lrcalc/ivector.h>
+ #endif]])
++ AC_LANG_POP
+ ])
+diff --git a/build/pkgs/lrcalc/spkg-install.in b/build/pkgs/lrcalc/spkg-install.in
+index d6665bfb42..a863950189 100644
+--- a/build/pkgs/lrcalc/spkg-install.in
++++ b/build/pkgs/lrcalc/spkg-install.in
+@@ -1,9 +1,5 @@
+ cd src
+
+-# Use newer version of config.guess and config.sub (see Trac #19725)
+-cp "$SAGE_ROOT"/config/config.guess .
+-cp "$SAGE_ROOT"/config/config.sub .
+-
+ sdh_configure
+ sdh_make
+ sdh_make_install
+diff --git a/build/pkgs/lrcalc_python/SPKG.rst b/build/pkgs/lrcalc_python/SPKG.rst
+new file mode 100644
+index 0000000000..3a98d556ca
+--- /dev/null
++++ b/build/pkgs/lrcalc_python/SPKG.rst
+@@ -0,0 +1,22 @@
++lrcalc_python: Littlewood-Richardson calculator
++===============================================
++
++Description
++-----------
++
++Python bindings for the Littlewood-Richardson Calculator
++
++http://sites.math.rutgers.edu/~asbuch/lrcalc/
++
++License
++-------
++
++GNU General Public License V3
++
++
++Upstream Contact
++----------------
++
++Anders S. Buch (asbuch at math.rutgers.edu)
++
++https://bitbucket.org/asbuch/lrcalc
+diff --git a/build/pkgs/lrcalc_python/checksums.ini b/build/pkgs/lrcalc_python/checksums.ini
+new file mode 100644
+index 0000000000..bdfef8711e
+--- /dev/null
++++ b/build/pkgs/lrcalc_python/checksums.ini
+@@ -0,0 +1,5 @@
++tarball=lrcalc-VERSION.tar.gz
++sha1=3e9366d9e8b8beccec70b07d174b8f6683c01574
++md5=4ae444d12ed8e0dd770594ea3ef4a208
++cksum=2741305196
++upstream_url=https://pypi.io/packages/source/l/lrcalc/lrcalc-VERSION.tar.gz
+diff --git a/build/pkgs/lrcalc_python/dependencies b/build/pkgs/lrcalc_python/dependencies
+new file mode 100644
+index 0000000000..63e5177ae0
+--- /dev/null
++++ b/build/pkgs/lrcalc_python/dependencies
+@@ -0,0 +1,5 @@
++$(PYTHON) lrcalc | $(PYTHON_TOOLCHAIN) cython
++
++----------
++All lines of this file are ignored except the first.
++It is copied by SAGE_ROOT/build/make/install into SAGE_ROOT/build/make/Makefile.
+diff --git a/build/pkgs/lrcalc_python/install-requires.txt b/build/pkgs/lrcalc_python/install-requires.txt
+new file mode 100644
+index 0000000000..8b44d97f4b
+--- /dev/null
++++ b/build/pkgs/lrcalc_python/install-requires.txt
+@@ -0,0 +1 @@
++lrcalc ~=2.1
+diff --git a/build/pkgs/lrcalc_python/package-version.txt b/build/pkgs/lrcalc_python/package-version.txt
+new file mode 100644
+index 0000000000..879b416e60
+--- /dev/null
++++ b/build/pkgs/lrcalc_python/package-version.txt
+@@ -0,0 +1 @@
++2.1
+diff --git a/build/pkgs/lrcalc_python/spkg-install.in b/build/pkgs/lrcalc_python/spkg-install.in
+new file mode 100644
+index 0000000000..deba1bb42b
+--- /dev/null
++++ b/build/pkgs/lrcalc_python/spkg-install.in
+@@ -0,0 +1 @@
++cd src && sdh_pip_install .
+diff --git a/build/pkgs/lrcalc_python/type b/build/pkgs/lrcalc_python/type
+new file mode 100644
+index 0000000000..a6a7b9cd72
+--- /dev/null
++++ b/build/pkgs/lrcalc_python/type
+@@ -0,0 +1 @@
++standard
+diff --git a/build/pkgs/sagelib/dependencies b/build/pkgs/sagelib/dependencies
+index 9c7797b1f4..3369d4d905 100644
+--- a/build/pkgs/sagelib/dependencies
++++ b/build/pkgs/sagelib/dependencies
+@@ -1,4 +1,4 @@
+-FORCE $(SCRIPTS) arb boost_cropped $(BLAS) brial cliquer cypari cysignals cython ecl eclib ecm flint libgd gap giac givaro glpk gmpy2 gsl iml jinja2 jupyter_core lcalc lrcalc libbraiding libhomfly libpng linbox m4ri m4rie memory_allocator mpc mpfi mpfr $(MP_LIBRARY) ntl numpy pari pip pkgconfig planarity ppl pplpy primesieve primecount primecountpy pycygwin $(PYTHON) ratpoints requests rw sage_conf singular symmetrica zn_poly $(PCFILES) | $(PYTHON_TOOLCHAIN) sage_setup
++FORCE $(SCRIPTS) arb boost_cropped $(BLAS) brial cliquer cypari cysignals cython ecl eclib ecm flint libgd gap giac givaro glpk gmpy2 gsl iml jinja2 jupyter_core lcalc lrcalc_python libbraiding libhomfly libpng linbox m4ri m4rie memory_allocator mpc mpfi mpfr $(MP_LIBRARY) ntl numpy pari pip pkgconfig planarity ppl pplpy primesieve primecount primecountpy pycygwin $(PYTHON) ratpoints requests rw sage_conf singular symmetrica zn_poly $(PCFILES) | $(PYTHON_TOOLCHAIN) sage_setup
+
+ ----------
+ All lines of this file are ignored except the first.
+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 b591081ec4..65db959944 100644
+--- a/src/sage/libs/lrcalc/lrcalc.pyx
++++ b/src/sage/libs/lrcalc/lrcalc.py
+@@ -187,180 +187,24 @@ 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
++from sage.combinat.skew_tableau import SkewTableaux
++from sage.combinat.skew_partition import SkewPartition
++from sage.rings.integer import Integer
++import lrcalc
+
+-
+-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.
++def _lrcalc_dict_to_sage(result):
++ r"""
++ Translate from lrcalc output format to Sage expected format.
+
+ 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 <class '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 <class '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 <class 'sage.rings.integer.Integer'>.
+-
+- EXAMPLES::
+-
+- sage: from sage.libs.lrcalc.lrcalc import coprod
+- sage: coprod([1]) #indirect doctest
+- {([1], []): 1}
++ sage: mult([2,1],[3,2,1],3) # indirect doctest
++ {[3, 3, 3]: 1, [4, 3, 2]: 2, [4, 4, 1]: 1, [5, 2, 2]: 1, [5, 3, 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
+-
++ return {_Partitions(la):Integer(k) for la,k in result.items()}
+
+ def lrcoef_unsafe(outer, inner1, inner2):
+ r"""
+@@ -392,18 +236,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 +343,24 @@ 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():
++ la = _Partitions(i[0])
++ output[la] = output.get(la, 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 +385,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 +415,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 {tuple(_Partitions(mu) for mu in la):Integer(k) for la,k in result.items()}
+
+
+ def mult_schubert(w1, w2, rank=0):
+@@ -646,17 +448,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 {Permutation(list(la)):Integer(k) for la,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 +499,20 @@ 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)
++ ST = SkewTableaux()
++ for data in iterator:
++ yield ST.from_shape_and_word(shape, [i+1 for i in data])
+ 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)
++ ST = SkewTableaux()
++ for data in iterator:
++ m = max(data) + 1
++ w = [0] * m
++ for j in data:
++ w[j] += 1
++ if w == wt:
++ yield ST.from_shape_and_word(shape, [i+1 for i in data])
Deleted: sagemath-optional-packages.patch
===================================================================
--- sagemath-optional-packages.patch 2022-04-01 07:26:11 UTC (rev 1179433)
+++ sagemath-optional-packages.patch 2022-04-01 07:26:38 UTC (rev 1179434)
@@ -1,17 +0,0 @@
-diff --git a/pkgs/sagemath-standard/setup.py b/pkgs/sagemath-standard/setup.py
-index 6744236593..a038006449 100755
---- a/pkgs/sagemath-standard/setup.py
-+++ b/pkgs/sagemath-standard/setup.py
-@@ -81,10 +81,9 @@ else:
- from sage_setup.optional_extension import is_package_installed_and_updated
- distributions = ['']
- optional_packages_with_extensions = ['mcqd', 'bliss', 'tdlib',
-- 'coxeter3', 'fes', 'sirocco', 'meataxe']
-+ 'coxeter3', 'sirocco', 'meataxe']
- distributions += ['sagemath-{}'.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
- python_packages, python_modules, cython_modules = find_python_sources(
Copied: sagemath/repos/community-x86_64/sagemath-optional-packages.patch (from rev 1179433, sagemath/trunk/sagemath-optional-packages.patch)
===================================================================
--- sagemath-optional-packages.patch (rev 0)
+++ sagemath-optional-packages.patch 2022-04-01 07:26:38 UTC (rev 1179434)
@@ -0,0 +1,17 @@
+diff --git a/pkgs/sagemath-standard/setup.py b/pkgs/sagemath-standard/setup.py
+index 6744236593..a038006449 100755
+--- a/pkgs/sagemath-standard/setup.py
++++ b/pkgs/sagemath-standard/setup.py
+@@ -81,10 +81,9 @@ else:
+ from sage_setup.optional_extension import is_package_installed_and_updated
+ distributions = ['']
+ optional_packages_with_extensions = ['mcqd', 'bliss', 'tdlib',
+- 'coxeter3', 'fes', 'sirocco', 'meataxe']
++ 'coxeter3', 'sirocco', 'meataxe']
+ distributions += ['sagemath-{}'.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
+ python_packages, python_modules, cython_modules = find_python_sources(
Deleted: test-optional.patch
===================================================================
--- test-optional.patch 2022-04-01 07:26:11 UTC (rev 1179433)
+++ test-optional.patch 2022-04-01 07:26:38 UTC (rev 1179434)
@@ -1,17 +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
-@@ -400,11 +400,6 @@ class DocTestController(SageObject):
- # 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.is_installed() and pkg.installed_version == pkg.remote_version:
-- options.optional.add(pkg.name)
--
- from sage.features import package_systems
- options.optional.update(system.name
-
-
Copied: sagemath/repos/community-x86_64/test-optional.patch (from rev 1179433, sagemath/trunk/test-optional.patch)
===================================================================
--- test-optional.patch (rev 0)
+++ test-optional.patch 2022-04-01 07:26:38 UTC (rev 1179434)
@@ -0,0 +1,17 @@
+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
+@@ -400,11 +400,6 @@ class DocTestController(SageObject):
+ # 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.is_installed() and pkg.installed_version == pkg.remote_version:
+- options.optional.add(pkg.name)
+-
+ from sage.features import package_systems
+ options.optional.update(system.name
+
+
More information about the arch-commits
mailing list