Hello EPEL folks,
In EL 8, it is possible to change the "meaning" of /usr/bin/python3 because it
is managed by alternatives:
$ ls -l /usr/bin/python3
lrwxrwxrwx. ... /usr/bin/python3 -> /etc/alternatives/python3
And since %__python3 on EPEL 8 is set to /usr/bin/python3 by epel-rpm-macros:
$ rpm --eval '%__python3'
/usr/bin/python3
When packages have %py3_shebang_fix on EPEL 8:
%py3_shebang_fix %{buildroot}%{_bindir}/*
The shebengs have #!/usr/bin/python3 in them.
(This is done by %__brp_mangle_shebangs automatically, so even packages without
%py3_shebang_fix might be affected.)
But when the package has importable modules in %{python3_sitelib} or
%{python3_sitearch} or simply depends on other Python 3.6 modules, and the user
uses alternatives to change /usr/bin/python3 to e.g. python3.9, the script no
longer works.
I suppose the default value of %__python3 needs to be /usr/bin/python3.6 to
prevent this way of shooting the users to their legs.
(I apologize for letting the alternatives happen, but that ship has sailed a
long time ago. Fortunately, EL 9 no longer have this.)
--
Miro Hrončok
--
Phone: +420777974800
IRC: mhroncok