[arch-commits] Commit in sagemath/trunk (PKGBUILD sagemath-lrs-071.patch)

Antonio Rojas arojas at archlinux.org
Tue May 18 20:56:07 UTC 2021


    Date: Tuesday, May 18, 2021 @ 20:56:06
  Author: arojas
Revision: 936296

Backport fixes for lrs 071

Added:
  sagemath/trunk/sagemath-lrs-071.patch
Modified:
  sagemath/trunk/PKGBUILD

------------------------+
 PKGBUILD               |   14 +++++++++-----
 sagemath-lrs-071.patch |   36 ++++++++++++++++++++++++++++++++++++
 2 files changed, 45 insertions(+), 5 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-05-18 20:30:11 UTC (rev 936295)
+++ PKGBUILD	2021-05-18 20:56:06 UTC (rev 936296)
@@ -7,13 +7,13 @@
 
 pkgname=sagemath
 pkgver=9.3
-pkgrel=3
+pkgrel=4
 pkgdesc='Open Source Mathematics Software, free alternative to Magma, Maple, Mathematica, and Matlab'
 arch=(x86_64)
 url='http://www.sagemath.org'
 license=(GPL)
-depends=(ipython 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-pillow python-pplpy python-sphinx python-ipywidgets
+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
   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)
@@ -43,7 +43,8 @@
         sagemath-pari-2.13.patch
         sagemath-lrcalc2.patch
         sagemath-eclib-20210310.patch
-        sagemath-matplotlib-3.4.patch)
+        sagemath-matplotlib-3.4.patch
+        sagemath-lrs-071.patch)
 sha256sums=('d3b104a83e140cda563ae0b44fa3ec2b3545660f120fab78dde6ceb5fb1ed991'
             'c100a61c8dfade43bebc622a363abcb3d935a2f40958371ad87a9eb00689f8b0'
             '88e944f23c3b2391dc2e9f9be8e1131152d837dc8c829dfc714663869a272e81'
@@ -51,7 +52,8 @@
             '32d586609dd6970f103574f75287bb641eb0a93618e84a1f671a2816e9420012'
             '240ac4c29d96d56407a20e1b7f9846e342a7eb2bb4edd6e5c86b3b5a8ff462f9'
             'e7b31f5e7ea88681c6eda41e5a74a2859a12dd128e75c00db3cfbd1d8ddf080d'
-            '5e6f919a386e1a9e9caf7528088a3a3f3f3fc51b158a4daf435771afb1212384')
+            '5e6f919a386e1a9e9caf7528088a3a3f3f3fc51b158a4daf435771afb1212384'
+            '4220a65e40f0f9df3a1667d7e5ac6bec36cfb7d2c3056fc02e5a6beb7dc882fa')
 
 prepare(){
   cd sage-$pkgver
@@ -65,6 +67,8 @@
   patch -p1 -i ../sagemath-eclib-20210310.patch
 # Fix deprecation warnings with matplotlib 3.4 https://trac.sagemath.org/ticket/31580
   patch -p1 -i ../sagemath-matplotlib-3.4.patch
+# Fixes for lrs 071 https://trac.sagemath.org/ticket/27745
+  patch -p1 -i ../sagemath-lrs-071.patch
 
 # Arch-specific patches
 # assume all optional packages are installed

Added: sagemath-lrs-071.patch
===================================================================
--- sagemath-lrs-071.patch	                        (rev 0)
+++ sagemath-lrs-071.patch	2021-05-18 20:56:06 UTC (rev 936296)
@@ -0,0 +1,36 @@
+diff --git a/src/sage/features/lrs.py b/src/sage/features/lrs.py
+index be62d14..ab1871a 100644
+--- a/src/sage/features/lrs.py
++++ b/src/sage/features/lrs.py
+@@ -54,9 +54,12 @@ class Lrs(Executable):
+             return FeatureTestResult(self, False,
+                 reason="Call to `{command}` failed with exit code {e.returncode}.".format(command=" ".join(command), e=e))
+ 
+-        expected = "Volume= 1"
+-        if lines.find(expected) == -1:
++        expected_list = ["Volume= 1", "Volume=1"]
++        if all(lines.find(expected) == -1 for expected in expected_list):
++            print(lines)
+             return FeatureTestResult(self, False,
+-                reason="Output of `{command}` did not contain the expected result `{expected}`.".format(command=" ".join(command), expected=expected))
++                reason="Output of `{command}` did not contain the expected result {expected}.".format(
++                    command=" ".join(command),
++                    expected=" or ".join(expected_list)))
+ 
+         return FeatureTestResult(self, True)
+diff --git a/src/sage/game_theory/parser.py b/src/sage/game_theory/parser.py
+index 09596a9..00cc8ef 100644
+--- a/src/sage/game_theory/parser.py
++++ b/src/sage/game_theory/parser.py
+@@ -222,7 +222,10 @@ class Parser():
+         equilibria = []
+         from sage.misc.sage_eval import sage_eval
+         from itertools import groupby
+-        for collection in [list(x[1]) for x in groupby(self.raw_string[7:], lambda x: x == '\n')]:
++        lines = iter(self.raw_string)
++        while not next(lines).startswith("*****"):
++            pass
++        for collection in [list(x[1]) for x in groupby(lines, lambda x: x == '\n')]:
+             if collection[0].startswith('2'):
+                 s1 = tuple([sage_eval(k) for k in collection[-1].split()][1:-1])
+                 for s2 in collection[:-1]:



More information about the arch-commits mailing list