From 0a5447765df28757864d9bbaf492cfddf734ea8a Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Sat, 30 Apr 2022 07:24:59 -0400 Subject: [PATCH] Backport to EPEL9 --- python-hatchling.spec | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/python-hatchling.spec b/python-hatchling.spec index e34b272..74e6d9f 100644 --- a/python-hatchling.spec +++ b/python-hatchling.spec @@ -29,6 +29,15 @@ Summary: %{summary} %prep %autosetup -n hatchling-%{version} +# F35, EPEL9, and older: +# The changes between pluggy 0.13.1 and 1.0.0 should not be significant, so we +# loosen the minimum version. +sed -r -i 's/(pluggy>=)1\.0\.0/\10.13.1/' src/hatchling/ouroboros.py +# EPEL9: +# Since hatchling uses packaging 20.9 for Python 2, we hope and expect it can +# work for Python 3 as well. +sed -r -i 's/(packaging>=)21\.3/\120.9/' src/hatchling/ouroboros.py + %generate_buildrequires # Cannot use -r (the default) with hatchling: “ValueError: build backend cannot @@ -62,7 +71,7 @@ install -t '%{buildroot}/%{_mandir}/man1' -D -p -m 0644 '%{SOURCE1}' %files -n python3-hatchling -f %{pyproject_files} -# The license file is installed in an unusual subdirectory: +# Workaround for RHBZ#1985340 required for pyproject-rpm-macros < 1.1.0. %dir %{python3_sitelib}/hatchling-%{version}.dist-info/license_files %license %{python3_sitelib}/hatchling-%{version}.dist-info/license_files/LICENSE.txt %doc README.md