Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Markus Volk <f_l_k@t-online.de>
To: Ross Burton <ross.burton@arm.com>
Cc: Alexander Kanavin <alex.kanavin@gmail.com>,
	Khem Raj <raj.khem@gmail.com>,
	openembedded-core@lists.openembedded.org
Subject: Re: [oe-core][PATCH] python3: add ${bindir}/python symlink
Date: Tue, 22 Nov 2022 19:13:48 +0100	[thread overview]
Message-ID: <0BHRLR.X1RENR0XRLNC2@t-online.de> (raw)
In-Reply-To: <4BF25A91-3F02-49A2-A546-A9CF7881E0ED@arm.com>

[-- Attachment #1: Type: text/plain, Size: 3095 bytes --]

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 
<ross.burton@arm.com>:
> On 22 Nov 2022, at 04:42, Markus Volk via lists.openembedded.org 
> <f_l_k=t-online.de@lists.openembedded.org 
> <mailto:f_l_k=t-online.de@lists.openembedded.org>> wrote:
>>  On Mon, Nov 21 2022 at 06:48:07 PM +0100, Alexander Kanavin 
>> <alex.kanavin@gmail.com <mailto:alex.kanavin@gmail.com>> 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 (#173694): 
> <https://lists.openembedded.org/g/openembedded-core/message/173694>
> Mute This Topic: <https://lists.openembedded.org/mt/95156228/3618223>
> Group Owner: openembedded-core+owner@lists.openembedded.org 
> <mailto:openembedded-core+owner@lists.openembedded.org>
> Unsubscribe: 
> <https://lists.openembedded.org/g/openembedded-core/unsub> 
> [f_l_k@t-online.de <mailto:f_l_k@t-online.de>]
> -=-=-=-=-=-=-=-=-=-=-=-
> 


[-- Attachment #2: Type: text/html, Size: 3765 bytes --]

      parent reply	other threads:[~2022-11-22 18:14 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-20 17:52 [oe-core][PATCH] python3: add ${bindir}/python symlink Markus Volk
2022-11-20 18:00 ` Alexander Kanavin
2022-11-20 18:03   ` Markus Volk
2022-11-20 23:17 ` Khem Raj
2022-11-20 23:56   ` Alexander Kanavin
2022-11-21 15:16     ` Khem Raj
2022-11-21 17:18       ` Alexander Kanavin
     [not found]       ` <1729A925BA1D06C8.25787@lists.openembedded.org>
2022-11-21 17:48         ` Alexander Kanavin
2022-11-22  4:42           ` f_l_k
2022-11-22 17:41             ` Ross Burton
2022-11-22 18:03               ` Alexander Kanavin
2022-11-22 18:14                 ` Richard Purdie
2022-11-22 18:32                   ` Alexander Kanavin
2022-11-22 22:28                     ` Alexandre Belloni
2022-11-23  5:14                       ` Peter Kjellerstedt
2022-11-23 10:06                     ` Ross Burton
2022-11-23  9:59                 ` Ross Burton
2022-11-23 10:55                   ` Alexander Kanavin
2022-11-23 16:34                     ` Khem Raj
2022-11-23 20:02                       ` Ross Burton
2022-11-22 18:13               ` Markus Volk [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0BHRLR.X1RENR0XRLNC2@t-online.de \
    --to=f_l_k@t-online.de \
    --cc=alex.kanavin@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=raj.khem@gmail.com \
    --cc=ross.burton@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox