From a47d2c62356889c09edd29737b3b446dc62aaaa9 Mon Sep 17 00:00:00 2001 From: Matyas Selmeci Date: Thu, 4 Feb 2021 16:18:00 -0600 Subject: [PATCH] BuildRequire the python we're installing with (otherwise the shebang mangling script that rpmbuild runs will get it wrong) --- rpm/osg-build.spec | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) 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}