Re: Include minor version number in packaged Python shebangs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri Dec 9, 2022 at 22:04 +0000, Audrey Toskin wrote:
> DNF modules let you install multiple different versions of Python 3,
> and the `alternatives` tool lets you change which is the default
> version invoked by `/usr/bin/python3`.

This is not the case on any current Fedora release. AFAIK, only EL 8
manages /usr/bin/python3 with alternatives. In current releases,
/usr/bin/python3 always points to the default system python interpreter
even if you have other python interpreter packages on your system.

> However, at least for *Enterprise Linux 8, it seems a lot of packages
> were built assuming the distro's default Python 3.6, but at runtime
> only invoke "Python 3", not 3.6 specifically.

In EPEL, packages with /usr/bin/python3 shebangs are meant to be
executed with python3.6. You are correct that this falls apart when the
python3 alternative points to a different Python interpreter. This
oversight has been fixed[1] so new package builds that are meant for
python3.6 have /usr/bin/python3.6 interpreters. We have not rebuilt
existing packages so they are still affected by this. Therefore, it is
recommended to keep python3 as /usr/bin/python3.6.

[1]: https://lists.fedoraproject.org/archives/list/epel-devel@xxxxxxxxxxxxxxxxxxxxxxx/thread/RE3PG72B5AX7NTACPDSBGOWCMN7I3OQJ/

> It seems that I still need Python 3.6 for most packages installed via
> DNF on EL8,

Correct.

> So, the workaround to having both installed on my system at the same
> time would be to edit the shebangs to include the minor version of
> Python that each application requires.

It'd be better to set the python3 alternative to python3.6
(alternatives --set python3 /usr/bin/python3.6).
Local modifications like this are not recommended. They will be
discarded on updates.

--
Maxwell G (@gotmax23)
Pronouns: He/Him/His
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to 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/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux