On Tue, Nov 8, 2022 at 5:06 AM Miro Hrončok <mhroncok@xxxxxxxxxx> wrote:
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
--
Hi Miro,
You have explained the problem very well, and a possible solution.
But I'm a bit confused as to what you want to happen.
Is this a heads up, that you are going to change something?
Do you want us to discuss what is the best thing to do?
Are you letting us know about the problem, and want someone else to implement a solution?
Troy Dawson
_______________________________________________ epel-devel mailing list -- epel-devel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to epel-devel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/epel-devel@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue