From c8444a8b4248f17093bf87d44da93484989409c6 Mon Sep 17 00:00:00 2001 From: Jacek Konieczny Date: Sun, 29 Nov 2015 17:49:03 +0100 Subject: [PATCH] shebangs: allow explicit pyhon%{py_ver} too --- rpm.macros | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rpm.macros b/rpm.macros index e354123..8bbe7c5 100644 --- a/rpm.macros +++ b/rpm.macros @@ -741,7 +741,9 @@ __spec_install_post_check_shebangs() { \ shebang=$(sed -e'1s/#! *\(.*\)/\1/;t;d;q' "$f") ; \ f=${f##$RPM_BUILD_ROOT}; \ case "$shebang" in \ - "%{__python}"|"%{__python3}"|"%{__python} "*|"%{__python3} ") \ + "%{__python}"|"%{__python3}"|"%{__python} "*|"%{__python3} " \ + |"/usr/bin/python%{py_ver}"|"/usr/bin/python%{py_ver} "* \ + |"/usr/bin/python%{py3_ver}"|"/usr/bin/python%{py3_ver} "*) \ ;; \ "/usr/bin/env python"*|"/usr/bin/python"|"/usr/bin/python "*) \ echo "$f starts with '#!$shebang', should be '#!%{__python}' or '#!%{__python3}'" >&2;\ -- 2.44.0