3 Commits
epel9 ... f38

Author SHA1 Message Date
Benjamin A. Beasley
2e4f747a07 Add setuptools to the runtime dependencies (fix RHBZ#2268986) 2024-03-11 09:30:17 -04:00
Benjamin A. Beasley
bc15816665 Fix sed-patch to remove BuildRequires on python3-pytest-cov
[skip changelog]
2024-03-11 09:30:17 -04:00
Benjamin A. Beasley
9f7febc8e9 Assert that %pyproject_files contains a license file 2024-03-11 09:30:17 -04:00
2 changed files with 24 additions and 4 deletions

View File

@@ -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

View File

@@ -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,9 +34,9 @@ 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:]]*)("pytest-cov")/\1# \2/' pyproject.toml
sed -r -i 's/^([[:blank:]]*)\b(pytest-cov)\b/\1# \2/' setup.cfg
%generate_buildrequires
@@ -40,7 +49,7 @@ sed -r -i 's/^([[:blank:]]*)("pytest-cov")/\1# \2/' pyproject.toml
%install
%pyproject_install
%pyproject_save_files flexcache
%pyproject_save_files -l flexcache
# Upstream probably doesnt want to install flexcache.testsuite, but we dont
# know how to suggest a fix given “[BUG] options.packages.find.exclude not
@@ -58,7 +67,6 @@ sed -r -i '/\/flexcache\/testsuite/d' %{pyproject_files}
%files -n python3-flexcache -f %{pyproject_files}
# pyproject_files handles AUTHORS and LICENSE; verify with “rpm -qL -p …”
%doc README.rst
%doc CHANGES