python3-cysignals: patch and rebuild for Cython 3

This commit is contained in:
Gonzalo Tornaría 2023-07-19 10:36:33 -03:00 committed by Andrew J. Hesford
parent 4b198381ab
commit 901c8f21b3
3 changed files with 44 additions and 1 deletions

View File

@ -0,0 +1,13 @@
diff --git a/src/cysignals/signals.pxd.in b/src/cysignals/signals.pxd.in
index c86e085..a98c8d1 100644
--- a/src/cysignals/signals.pxd.in
+++ b/src/cysignals/signals.pxd.in
@@ -54,7 +54,7 @@ cdef extern from "macros.h" nogil:
# can be used to make Cython check whether there is a pending exception
# (PyErr_Occurred() is non-NULL). To Cython, it will look like
# cython_check_exception() actually raised the exception.
-cdef inline void cython_check_exception() nogil except *:
+cdef inline void cython_check_exception() except * nogil:
pass

View File

@ -0,0 +1,30 @@
commit 9996a4028ddc7f9a5ffda3df65d5b7d3b7df8aa5
Author: Gonzalo Tornaría <tornaria@cmat.edu.uy>
Date: Wed Jul 19 18:34:57 2023 -0300
cython3 support using legacy directives
diff --git a/setup.py b/setup.py
index 37acdfc..f68270b 100755
--- a/setup.py
+++ b/setup.py
@@ -157,13 +157,17 @@ class build_ext(_build_ext):
# Run Cython with -Werror on continuous integration services
# with Python 3.6 or later
from Cython.Compiler import Options
- Options.warning_errors = True
+ Options.warning_errors = False
from Cython.Build.Dependencies import cythonize
return cythonize(extensions,
build_dir=cythonize_dir,
include_path=["src", os.path.join(cythonize_dir, "src")],
- compiler_directives=dict(binding=True, language_level=2))
+ compiler_directives=dict(
+ binding=True,
+ language_level=2,
+ legacy_implicit_noexcept=True,
+ ))
class build_py(_build_py):

View File

@ -1,7 +1,7 @@
# Template file for 'python3-cysignals' # Template file for 'python3-cysignals'
pkgname=python3-cysignals pkgname=python3-cysignals
version=1.11.2 version=1.11.2
revision=4 revision=5
build_style=python3-module build_style=python3-module
hostmakedepends="python3-setuptools python3-Cython autoconf" hostmakedepends="python3-setuptools python3-Cython autoconf"
makedepends="python3-devel pari-devel" makedepends="python3-devel pari-devel"