From 5d43c94f6bba099538c5500f82ba4a2c6926c38e Mon Sep 17 00:00:00 2001 From: Li Chaoran Date: Thu, 18 May 2023 11:26:50 +0800 Subject: [PATCH] fix: python build failed in openeuler Signed-off-by: Li Chaoran --- python/python-copr.spec | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/python/python-copr.spec b/python/python-copr.spec index 03cee428a..ad152702b 100644 --- a/python/python-copr.spec +++ b/python/python-copr.spec @@ -1,11 +1,9 @@ %global srcname copr -%if 0%{?fedora} || 0%{?rhel} > 7 -%global with_python3 1 -%endif - %if 0%{?rhel} && 0%{?rhel} <= 7 %global with_python2 1 +%else +%global with_python3 1 %endif Name: python-copr @@ -133,11 +131,10 @@ Requires: python3-setuptools Requires: python3-six Requires: python3-requests-gssapi Requires: python3-future -%endif %{?python_provide:%python_provide python3-copr} -%if 0%{?fedora} > 30 || 0%{?rhel} > 8 +%else # These are not in requirements.txt Requires: python3-requests-gssapi @@ -147,6 +144,7 @@ BuildRequires: python3-pytest BuildRequires: python3-requests-gssapi BuildRequires: python3-future BuildRequires: python3-filelock +BuildRequires: pyproject-rpm-macros %generate_buildrequires %pyproject_buildrequires -r