Antonio Rojas pushed to branch main at Arch Linux / Packaging / Packages /
cypari2
Commits:
1fc2a895 by Antonio Rojas at 2024-10-04T10:06:22+02:00
upgpkg: 2.2.0-4: Adapt to precision changes in pari
- - - - -
3 changed files:
- .SRCINFO
- PKGBUILD
- pari-2.17.patch
Changes:
=====================================
.SRCINFO
=====================================
@@ -1,7 +1,7 @@
pkgbase = cypari2
pkgdesc = Cython bindings for PARI
pkgver = 2.2.0
- pkgrel = 3
+ pkgrel = 4
url = https://www.sagemath.org
arch = x86_64
license = GPL-2.0-or-later
@@ -18,6 +18,6 @@ pkgbase = cypari2
source = git+https://github.com/sagemath/cypari2#tag=2.2.0
source = pari-2.17.patch
sha256sums =
015d7421efabb57680fca1445d98585a43228a3f46c36cd7f9cad9b28f5ea0f8
- sha256sums =
3906f3145aafa4bd28914571b7ba20af2b5f3cf9d1ba38d5f103cd0957cd677a
+ sha256sums =
7b70ed11179e6552ae2a3804f32f27fd0acda3f8a14de8a16508c21d99e3a687
pkgname = python-cypari2
=====================================
PKGBUILD
=====================================
@@ -3,7 +3,7 @@
pkgbase=cypari2
pkgname=python-cypari2
pkgver=2.2.0
-pkgrel=3
+pkgrel=4
pkgdesc='Cython bindings for PARI'
arch=(x86_64)
url='https://www.sagemath.org'
@@ -21,7 +21,7 @@ makedepends=(cython
source=(git+https://github.com/sagemath/cypari2#tag=$pkgver
pari-2.17.patch)
sha256sums=('015d7421efabb57680fca1445d98585a43228a3f46c36cd7f9cad9b28f5ea0f8'
- '3906f3145aafa4bd28914571b7ba20af2b5f3cf9d1ba38d5f103cd0957cd677a')
+ '7b70ed11179e6552ae2a3804f32f27fd0acda3f8a14de8a16508c21d99e3a687')
prepare() {
cd $pkgbase
=====================================
pari-2.17.patch
=====================================
@@ -22,3 +22,21 @@ index 9ee4fe6..7f00b52 100644
# PARI types
enum:
+diff --git a/cypari2/pari_instance.pyx b/cypari2/pari_instance.pyx
+index 65d705a..c72639f 100644
+--- a/cypari2/pari_instance.pyx
++++ b/cypari2/pari_instance.pyx
+@@ -361,12 +361,7 @@ cpdef long prec_bits_to_words(unsigned long prec_in_bits)
noexcept:
+ >>> [(32*n, prec_bits_to_words(32*n)) for n in range(1, 9)] == (ans32 if
bitness == '32' else ans64)
+ True
+ """
+- if not prec_in_bits:
+- return prec
+- cdef unsigned long wordsize = BITS_IN_LONG
+-
+- # This equals ceil(prec_in_bits/wordsize) + 2
+- return (prec_in_bits - 1)//wordsize + 3
++ return max(BITS_IN_LONG, nbits2prec(prec_in_bits))
+
+
+ cpdef long prec_words_to_bits(long prec_in_words) noexcept:
View it on GitLab:
https://gitlab.archlinux.org/archlinux/packaging/packages/cypari2/-/commit/1fc2a8953f3451ebd0910f01ae11f73cb1cec092
--
View it on GitLab:
https://gitlab.archlinux.org/archlinux/packaging/packages/cypari2/-/commit/1fc2a8953f3451ebd0910f01ae11f73cb1cec092
You're receiving this email because of your account on gitlab.archlinux.org.