From b946d421e1ccbe8f306fedc759f83530de6542dd Mon Sep 17 00:00:00 2001 From: Björn Esser Date: Aug 29 2017 21:10:11 +0000 Subject: Use Python2 on EPEL <= 7 --- diff --git a/mintlocale.spec b/mintlocale.spec index 85fdb39..6e54d83 100644 --- a/mintlocale.spec +++ b/mintlocale.spec @@ -1,6 +1,6 @@ Name: mintlocale Version: 1.4.2 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Language selection tool License: GPLv2+ @@ -40,6 +40,13 @@ for f in $(%{_bindir}/find . -name '*.py' -type f) ; do %{__mv} -f ${f}.new ${f} done +%if (0%{?rhel} && 0%{?rhel} >= 7) +for f in $(%{__grep} -Rl '#!.*python3') ; do + %{__sed} -e 's~#!.*python3~/usr/bin/python2~g' < ${f} > ${f}.new + /bin/touch -r ${f}.new ${f} + %{__mv} -f ${f}.new ${f} +done +%endif # (0%%{?rhel} && 0%%{?rhel} >= 7) %build echo 'nothing to build' @@ -82,6 +89,9 @@ echo 'LANG=$locale' > %{buildroot}%{_datadir}/linuxmint/mintlocale/templates/def %changelog +* Tue Aug 29 2017 Björn Esser - 1.4.2-7 +- Use Python2 on EPEL <= 7 + * Wed Jul 26 2017 Fedora Release Engineering - 1.4.2-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild