[arch-commits] Commit in python-sympy/trunk (PKGBUILD sympy-python-3.10.patch)

Antonio Rojas arojas at gemini.archlinux.org
Sat Dec 4 11:29:39 UTC 2021


    Date: Saturday, December 4, 2021 @ 11:29:39
  Author: arojas
Revision: 1065012

Python 3.10 rebuild

Added:
  python-sympy/trunk/sympy-python-3.10.patch
Modified:
  python-sympy/trunk/PKGBUILD

-------------------------+
 PKGBUILD                |   14 ++++++++++----
 sympy-python-3.10.patch |   26 ++++++++++++++++++++++++++
 2 files changed, 36 insertions(+), 4 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-12-04 11:04:24 UTC (rev 1065011)
+++ PKGBUILD	2021-12-04 11:29:39 UTC (rev 1065012)
@@ -6,7 +6,7 @@
 
 pkgname=python-sympy
 pkgver=1.9
-pkgrel=2
+pkgrel=3
 arch=('any')
 pkgdesc='Symbolic manipulation package (Computer Algebra System), written in pure Python'
 url='https://sympy.org/en/index.html'
@@ -15,9 +15,15 @@
 optdepends=('ipython: user friendly interface for isympy'
             'python-symengine: optimized backend, set USE_SYMENGINE=1 to use')
 makedepends=('python-setuptools')
-source=("https://github.com/sympy/sympy/archive/sympy-$pkgver/sympy-$pkgver.tar.gz")
-sha512sums=('139712219ba6bf420ba89b3f8d086ab8883c5ab965e9308ba9ee665ac3ac69a9b16fa30c6f5dfbc77dd34873ff3ff95c0d058954d7f9d853f5e9537efc24dd3c')
+source=("https://github.com/sympy/sympy/archive/sympy-$pkgver/sympy-$pkgver.tar.gz"
+         sympy-python-3.10.patch)
+sha512sums=('139712219ba6bf420ba89b3f8d086ab8883c5ab965e9308ba9ee665ac3ac69a9b16fa30c6f5dfbc77dd34873ff3ff95c0d058954d7f9d853f5e9537efc24dd3c'
+            'fbda6f7d293337f08909684179efd9497fea7093dfedf2c0bf2fc67ee1168ce50268f6580091b3e1db78eef59e19c4780e3537b077d156ea7b4680191ad43468')
 
+prepare() {
+  patch -d sympy-sympy-$pkgver -p1 < sympy-python-3.10.patch # Fix tests with python 3.10 (Fedora)
+}
+
 build() {
   cd sympy-sympy-$pkgver
   python setup.py build
@@ -25,7 +31,7 @@
 
 check() {
   cd sympy-sympy-$pkgver
-  python setup.py test
+  python bin/test
 }
 
 package() {

Added: sympy-python-3.10.patch
===================================================================
--- sympy-python-3.10.patch	                        (rev 0)
+++ sympy-python-3.10.patch	2021-12-04 11:29:39 UTC (rev 1065012)
@@ -0,0 +1,26 @@
+--- a/sympy/external/tests/test_pythonmpq.py	2021-09-30 16:23:28.000000000 -0600
++++ b/sympy/external/tests/test_pythonmpq.py	2021-10-08 11:06:59.453830335 -0600
+@@ -42,7 +42,7 @@ def test_PythonMPQ():
+         assert check_Q(Q(Q(3, 5))) == (3, 5)
+         assert check_Q(Q(0.5)) == (1, 2)
+         assert check_Q(Q('0.5')) == (1, 2)
+-        assert check_Q(Q(Decimal('0.6'))) == (3, 5)
++        assert check_Q(Q(str(Decimal('0.6')))) == (3, 5)
+         assert check_Q(Q(Fraction(3, 5))) == (3, 5)
+ 
+         # Invalid types
+--- a/sympy/polys/ring_series.py	2021-09-30 16:23:28.000000000 -0600
++++ b/sympy/polys/ring_series.py	2021-10-08 13:43:30.746068783 -0600
+@@ -989,6 +989,11 @@ def rs_nth_root(p, n, x, prec):
+             except ValueError:                # as exponent
+                 raise DomainError("The given series can't be expanded in "
+                     "this domain.")
++            except TypeError:
++                try:
++                    const = R(c**QQ(1, n))
++                except ValueError:
++                    raise DomainError("The given series can't be expanded in this domain.")
+         res = rs_nth_root(p/c, n, x, prec)*const
+     else:
+         res = _nth_root1(p, n, x, prec)
+



More information about the arch-commits mailing list