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

@ -19,7 +19,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 %{__python} -k%{?py_shebang_flags:a %py_shebang_flags}}
if [ -z "%{?py_shebang_flags}" ]; then
shebang_flags="-k"
else
shebang_flags="-ka%{py_shebang_flags}"
fi
$pathfix -pni %{__python} $shebang_flags}
# Use the slashes after expand so that the command starts on the same line as
# the macro