From fd2ddd1b46082a4aab28fda9323dcec7ee20beaa Mon Sep 17 00:00:00 2001 From: Miro HronĨok Date: Feb 03 2021 22:26:34 +0000 Subject: Implement %py2_shebang_fix See https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org/thread/UGCMDDG3S32U7JJK36OEZNHLUVQQRG3M/ --- diff --git a/macros.python2 b/macros.python2 index 82d7428..0e4b0cb 100644 --- a/macros.python2 +++ b/macros.python2 @@ -5,6 +5,8 @@ %py2_shbang_opts -s %py2_shbang_opts_nodash %(opts=%{py2_shbang_opts}; echo ${opts#-}) +%py2_shebang_flags %(opts=%{py2_shbang_opts}; echo ${opts#-}) +%py2_shebang_fix %{expand:/usr/bin/pathfix.py -pni %{__python2} -k%{?py2_shebang_flags:a %py2_shebang_flags}} # Use the slashes after expand so that the command starts on the same line as # the macro