diff --git a/rpm/osg-build.spec b/rpm/osg-build.spec index 09f06724..f792aca3 100644 --- a/rpm/osg-build.spec +++ b/rpm/osg-build.spec @@ -17,11 +17,18 @@ Requires: %{name}-base = %{version} Requires: %{name}-mock = %{version} Requires: %{name}-koji = %{version} +%if (0%{?fedora} >= 31 || 0%{?rhel} >= 8) +BuildRequires: python3 +%define __python /usr/bin/python3 +%else +BuildRequires: python2 +%define __python /usr/bin/python2 +%endif + %if 0%{?rhel} < 8 BuildRequires: git %else BuildRequires: git-core -BuildRequires: python3 %endif @@ -93,12 +100,6 @@ Summary: OSG-Build tests %{summary} -%if (0%{?fedora} >= 31 || 0%{?rhel} >= 8) - %define __python /usr/bin/python3 -%else - %define __python /usr/bin/python2 -%endif - %prep %setup -q -n %{name}-%{version}