I use a bbappend for python3 in meta-wayland for almost a year now because i had issues installing python scripts with /usr/bin/python shebang e.g. here in sway:
<https://github.com/swaywm/sway/blob/master/contrib/inactive-windows-transparency.py>

Issue has been that, if adding this script to do_install(), package_qa failed because of the missing /usr/bin/python provider.

Ran into this quite a few times in the past and then created the symlink instead of patching shebangs

I just wanted to mention, that having a symlink would be an alternative to patching shebangs and as i was asked to send a patch, i did. But I'm fine with whatever is done in oe-core.

Basically I also think the best solution would be, upstream would deprecate /usr/bin/python usage. Unfortunaltey it's not, and so there will always be people using it.

Am Di, 22. Nov 2022 um 17:41:22 +0000 schrieb Ross Burton <[email protected]>:
On 22 Nov 2022, at 04:42, Markus Volk via lists.openembedded.org <[email protected] <mailto:[email protected]>> wrote:
On Mon, Nov 21 2022 at 06:48:07 PM +0100, Alexander Kanavin <[email protected] <mailto:[email protected]>> wrote:
 On my Debian systems, indeed, /usr/bin/python is absent.

 Debian has a package for this
 <https://packages.debian.org/bookworm/python-is-python3>

And that’s a perfectly good solution that I like.

Personally, I think people should forget that /usr/bin/python exists: the recommendation from Python is to call python2 or python3. I can quote from PEP-0394:

“””
Depending on a distribution or system configuration, python may or may not be installed. If python is installed its target interpreter may refer to python2 or python3.”
• Distributors may choose to set the behavior of the python command as follows:
        • python2,
        • python3,
        • not provide python command,
• allow python to be configurable by an end user or a system administrator.
“””

We’ve picked option 3. As per Python upstream, that’s absolutely fine.

If you have a serious need that /usr/bin/python exists, and is a symlink to python3, then could you not make a simple recipe that RDEPENDS on python3 and ships just a /usr/bin/python -> python3 symlink? You can even put this in your layer to avoid having to debate it with the oe-core maintainers.

Ross




-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#173696): 
https://lists.openembedded.org/g/openembedded-core/message/173696
Mute This Topic: https://lists.openembedded.org/mt/95156228/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to