-
Notifications
You must be signed in to change notification settings - Fork 20
Description
Hi, %python3_fix_shebang and its younger brother have proven to be really useful, thanks.
If python is present, the macro behaves as intended:
[ 12s] ++ realpath /usr/bin/python3
[ 12s] + sed -i '1s@#\!.*python\S*@#\!/usr/bin/python3.11@' ...
But if no python is present (because the package doesn't need it for build), then the macro changes nothing:
[ 12s] ++ realpath /usr/bin/python3
[ 12s] + sed -i '1s@#\!.*python\S*@#\!/usr/bin/python3@' ...
I discovered it while playing with yast2-multipath, which is one of the packages which just provide a single python file which is not run during the build and install.
What to do? If I add BuildRequires: python3-base, then it works, but it doesn't feel right to me, because python is actually not needed during the build. Maybe we could try to guess the primary python flavor for the current distro in the sed script? Edit: no, that would break all the multi-flavor "regular" python packages, where this macro is implicitly used as well.
What would you suggest?
Anyway, thank you very much for taking care of the macros.