[packages/rpm-build-macros] shebangs: allow explicit pyhon%{py_ver} too

jajcus jajcus at pld-linux.org
Sun Nov 29 17:50:14 CET 2015


commit c8444a8b4248f17093bf87d44da93484989409c6
Author: Jacek Konieczny <jajcus at jajcus.net>
Date:   Sun Nov 29 17:49:03 2015 +0100

    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;\
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rpm-build-macros.git/commitdiff/c8444a8b4248f17093bf87d44da93484989409c6



More information about the pld-cvs-commit mailing list