From a98b9959ec8e6436f0320aed853321eaa9ed6a23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Wed, 19 Jul 2023 20:13:30 -0300 Subject: [PATCH] python3-cypari2: patch and rebuild for Cython 3 --- .../patches/cython3-legacy.patch | 32 +++++++++++++++++++ srcpkgs/python3-cypari2/template | 2 +- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/python3-cypari2/patches/cython3-legacy.patch diff --git a/srcpkgs/python3-cypari2/patches/cython3-legacy.patch b/srcpkgs/python3-cypari2/patches/cython3-legacy.patch new file mode 100644 index 00000000000..41392fe80d7 --- /dev/null +++ b/srcpkgs/python3-cypari2/patches/cython3-legacy.patch @@ -0,0 +1,32 @@ +commit 8ef356a4eb936c37f55a5c501f3a955e6740c0c5 +Author: Gonzalo TornarĂ­a +Date: Wed Jul 19 19:45:23 2023 -0300 + + cython3 support using legacy directives + +diff --git a/cypari2/gen.pyx b/cypari2/gen.pyx +index 247b1ad..75050a0 100644 +--- a/cypari2/gen.pyx ++++ b/cypari2/gen.pyx +@@ -329,7 +329,7 @@ cdef class Gen(Gen_base): + >>> pari = Pari() + >>> L = pari("vector(10,i,i^2)") + >>> L.__iter__() +- ++ <...generator object at ...> + >>> [x for x in L] + [1, 4, 9, 16, 25, 36, 49, 64, 81, 100] + >>> list(L) +diff --git a/setup.py b/setup.py +index 2188711..455337f 100755 +--- a/setup.py ++++ b/setup.py +@@ -36,6 +36,8 @@ class build_ext(_build_ext): + "binding": True, + "cdivision": True, + "language_level": 2, ++ "legacy_implicit_noexcept": True, ++ "c_api_binop_methods": True, + } + + _build_ext.finalize_options(self) diff --git a/srcpkgs/python3-cypari2/template b/srcpkgs/python3-cypari2/template index 8ac4dd3a562..8d46c443e96 100644 --- a/srcpkgs/python3-cypari2/template +++ b/srcpkgs/python3-cypari2/template @@ -1,7 +1,7 @@ # Template file for 'python3-cypari2' pkgname=python3-cypari2 version=2.1.3 -revision=3 +revision=4 build_style=python3-module hostmakedepends="python3-setuptools python3-Cython pari perl" makedepends="python3-devel python3-cysignals pari-devel gmp-devel"