From 10a0268598285aa672f140ebb0b6c0ff98f3e392 Mon Sep 17 00:00:00 2001 From: Benjamin A. Beasley Date: Jul 20 2023 15:56:50 +0000 Subject: Patch for Cython 3 --- diff --git a/0001-Use-old_build_ext-for-Cython-3-compatibility.patch b/0001-Use-old_build_ext-for-Cython-3-compatibility.patch new file mode 100644 index 0000000..ead24dd --- /dev/null +++ b/0001-Use-old_build_ext-for-Cython-3-compatibility.patch @@ -0,0 +1,25 @@ +From 0a061c4f0c0d8d7f4a859c4d5b8d7915d2fd7e52 Mon Sep 17 00:00:00 2001 +From: "Benjamin A. Beasley" +Date: Thu, 20 Jul 2023 11:31:10 -0400 +Subject: [PATCH] Use old_build_ext for Cython 3 compatibility + +--- + setup.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/setup.py b/setup.py +index f4acd48..1304aef 100644 +--- a/setup.py ++++ b/setup.py +@@ -26,7 +26,7 @@ except pkg_resources.ResolutionError: + else: + with_cython = True + print('Development mode: Compiling Cython modules from .pyx sources.') +- from Cython.Distutils import build_ext ++ from Cython.Distutils.old_build_ext import old_build_ext as build_ext + + + class custom_build_ext(build_ext): +-- +2.41.0 + diff --git a/151.patch b/151.patch deleted file mode 100644 index a4a7bcd..0000000 --- a/151.patch +++ /dev/null @@ -1,22 +0,0 @@ -From cbb525b0c73c9b479869fdcf38df72c4c08105ab Mon Sep 17 00:00:00 2001 -From: "Benjamin A. Beasley" -Date: Thu, 20 Jul 2023 11:06:33 -0400 -Subject: [PATCH] Temporarily pin cython<3 - ---- - pyproject.toml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/pyproject.toml b/pyproject.toml -index 8b63d75..e60f27d 100644 ---- a/pyproject.toml -+++ b/pyproject.toml -@@ -4,7 +4,7 @@ requires = [ - "wheel", - "setuptools_scm", - "setuptools_git_ls_files", -- "cython", -+ "cython<3", - ] - - build-backend = "setuptools.build_meta" diff --git a/python-compreffor.spec b/python-compreffor.spec index c33b1a4..d75906c 100644 --- a/python-compreffor.spec +++ b/python-compreffor.spec @@ -10,14 +10,16 @@ Source0: %{url}/archive/%{version}/compreffor-%{version}.tar.gz # command’s --help output Source1: compreffor.1 -# Temporarily pin cython<3 -# https://github.com/googlefonts/compreffor/pull/151 +# Use old_build_ext for Cython 3 compatibility +# https://github.com/googlefonts/compreffor/pull/152 # -# Works around, but does not fix: +# Fixes: # # Fails to build with Cython 3 # https://github.com/googlefonts/compreffor/issues/150 -Patch: %{url}/pull/151.patch +# +# Rebased on 0.5.3. +Patch: 0001-Use-old_build_ext-for-Cython-3-compatibility.patch # Replace deprecated license_file with license_files in setup.cfg # https://github.com/googlefonts/compreffor/pull/149