From 08ad10c9eb669e4bdcb43b88a8ecae8a51787ad5 Mon Sep 17 00:00:00 2001 From: Benjamin A. Beasley Date: Jul 20 2023 15:20:58 +0000 Subject: Use the Cython compat package until Cython 3 is supported --- diff --git a/0001-Drop-the-setuptools_git_ls_files-dependency.patch b/0001-Drop-the-setuptools_git_ls_files-dependency.patch deleted file mode 100644 index a2ffd92..0000000 --- a/0001-Drop-the-setuptools_git_ls_files-dependency.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 0a34645e1bfa7181ed384e2e9ef0920445f41267 Mon Sep 17 00:00:00 2001 -From: "Benjamin A. Beasley" -Date: Thu, 2 Dec 2021 08:31:09 -0500 -Subject: [PATCH] Drop the setuptools_git_ls_files dependency - -This dependency makes sense upstream, but we do not need it (and it is -not packaged) in Fedora. ---- - pyproject.toml | 1 - - setup.py | 2 +- - 2 files changed, 1 insertion(+), 2 deletions(-) - -diff --git a/pyproject.toml b/pyproject.toml -index 8b63d75..591a65e 100644 ---- a/pyproject.toml -+++ b/pyproject.toml -@@ -3,7 +3,6 @@ requires = [ - "setuptools", - "wheel", - "setuptools_scm", -- "setuptools_git_ls_files", - "cython", - ] - -diff --git a/setup.py b/setup.py -index 3334b82..9e692e7 100644 ---- a/setup.py -+++ b/setup.py -@@ -152,7 +152,7 @@ setup_params = dict( - 'build_ext': custom_build_ext, - }, - setup_requires=( -- ["setuptools_scm", "setuptools_git_ls_files"] + pytest_runner + wheel -+ ["setuptools_scm"] + pytest_runner + wheel - ), - tests_require=[ - 'pytest>=2.8', --- -2.33.1 - diff --git a/151.patch b/151.patch new file mode 100644 index 0000000..a4a7bcd --- /dev/null +++ b/151.patch @@ -0,0 +1,22 @@ +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 f44cd57..be2085f 100644 --- a/python-compreffor.spec +++ b/python-compreffor.spec @@ -10,11 +10,14 @@ Source0: %{url}/archive/%{version}/compreffor-%{version}.tar.gz # command’s --help output Source1: compreffor.1 -# Drop the setuptools_git_ls_files dependency +# Temporarily pin cython<3 +# https://github.com/googlefonts/compreffor/pull/151 # -# This dependency makes sense upstream, but we do not need it (and it is -# not packaged) in Fedora. -Patch: 0001-Drop-the-setuptools_git_ls_files-dependency.patch +# Works around, but does not fix: +# +# Fails to build with Cython 3 +# https://github.com/googlefonts/compreffor/issues/150 +Patch: %{url}/pull/151.patch # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval ExcludeArch: %{ix86} @@ -41,6 +44,13 @@ Summary: %{summary} %prep %autosetup -n compreffor-%{version} -p1 +# Drop the setuptools_git_ls_files dependency +# +# This dependency makes sense upstream, but we do not need it (and it is +# not packaged) in Fedora. +sed -r -i '/setuptools_git_ls_files/d' pyproject.toml +sed -r -i 's/, "setuptools_git_ls_files"//' setup.py + # Remove shebangs from non-script sources. The find-then-modify pattern # preserves mtimes on sources that did not need to be modified. find 'src' -type f -name '*.py' \