Support defining %py3_shebang_flags to %nil

This commit is contained in:
Miro Hrončok 2020-12-08 12:10:29 +01:00
commit e5429a7a48
5 changed files with 48 additions and 13 deletions

View file

@ -17,7 +17,12 @@
# older versions of Python don't have it and must BR /usr/bin/pathfix.py from python3-devel explicitly
pathfix=/usr/bin/pathfix.py
fi
$pathfix -pni %{__python3} -k%{?py3_shebang_flags:a %py3_shebang_flags}}
if [ -z "%{?py3_shebang_flags}" ]; then
shebang_flags="-k"
else
shebang_flags="-ka%{py3_shebang_flags}"
fi
$pathfix -pni %{__python3} $shebang_flags}
# Use the slashes after expand so that the command starts on the same line as
# the macro