From b127a043a65e94c0b57361d60a309b5ecc1196a3 Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Fri, 17 Nov 2023 17:35:44 +0100 Subject: [PATCH] Build using setuptools on EL <= 9 Signed-off-by: Nils Philippsen --- python-rpmautospec-core.spec | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/python-rpmautospec-core.spec b/python-rpmautospec-core.spec index c7042bd..57c55ba 100644 --- a/python-rpmautospec-core.spec +++ b/python-rpmautospec-core.spec @@ -1,7 +1,9 @@ %if ! 0%{?rhel} || 0%{?rhel} >= 10 %bcond_without testcoverage +%bcond_with setup_py %else %bcond_with testcoverage +%bcond_without setup_py %endif %if ! 0%{?rhel} || 0%{?rhel} >= 9 @@ -36,7 +38,12 @@ BuildRequires: sed %if %{without compatbuild} %generate_buildrequires -%pyproject_buildrequires +%if %{without setup.py} +%{pyproject_buildrequires} +%else +( %{pyproject_buildrequires} ) | grep -v poetry +echo 'python3dist(setuptools)' +%endif %else BuildRequires: python3dist(setuptools) %endif @@ -65,7 +72,7 @@ addopts = PYTESTINI %endif -%if %{with compatbuild} +%if %{with setup_py} cat << SETUPPY > setup.py from setuptools import setup