diff --git a/flexcache-0.2-setuptools.patch b/flexcache-0.2-setuptools.patch new file mode 100644 index 0000000..356eeae --- /dev/null +++ b/flexcache-0.2-setuptools.patch @@ -0,0 +1,12 @@ +diff -Naur flexcache-0.2-original/setup.cfg flexcache-0.2/setup.cfg +--- flexcache-0.2-original/setup.cfg 2022-02-27 23:12:46.468990600 -0500 ++++ flexcache-0.2/setup.cfg 2024-03-11 08:32:50.998736526 -0400 +@@ -26,6 +26,8 @@ + zip_safe = True + include_package_data = True + python_requires = >=3.7 ++install_requires = ++ setuptools + setup_requires = + setuptools + setuptools_scm diff --git a/python-flexcache.spec b/python-flexcache.spec index 8d9793c..53e5fdf 100644 --- a/python-flexcache.spec +++ b/python-flexcache.spec @@ -7,6 +7,15 @@ License: BSD-3-Clause URL: https://github.com/hgrecco/flexcache Source: %{pypi_source flexcache} +# Add setuptools to the runtime dependencies +# +# This is needed for the “import pkg_resources” in the top-level +# __init__.py. +# +# Downstream-only because version 0.3 of flexcache does not use pkg_resources, +# so this is a temporary patch for version 0.2 only. +Patch: flexcache-0.2-setuptools.patch + BuildArch: noarch BuildRequires: python3-devel @@ -25,7 +34,7 @@ Summary: %{summary} %prep -%autosetup -n flexcache-%{version} +%autosetup -n flexcache-%{version} -p1 # https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters sed -r -i 's/^([[:blank:]]*)\b(pytest-cov)\b/\1# \2/' setup.cfg