Re: [PATCH 1/2] pylibfdt: use python3 shebang

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



On Thu, Aug 29, 2019 at 08:15:24AM +0200, Luca Weiss wrote:
> On August 29, 2019 3:04:54 AM GMT+02:00, David Gibson <david@xxxxxxxxxxxxxxxxxxxxx> wrote:
> >On Sat, Aug 17, 2019 at 11:25:31PM +0200, Luca Weiss wrote:
> >> Signed-off-by: Luca Weiss <luca@xxxxxxxxx>
> >
> >Hrm.  I believe pylibfdt should currently work with both Python2 and
> >Python3, so I'm not very comfortable with binding it to Python3 only
> >via the shbang.
> >
> >> ---
> >>  pylibfdt/setup.py | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >> 
> >> diff --git a/pylibfdt/setup.py b/pylibfdt/setup.py
> >> index a00bf8b..200f446 100755
> >> --- a/pylibfdt/setup.py
> >> +++ b/pylibfdt/setup.py
> >> @@ -1,4 +1,4 @@
> >> -#!/usr/bin/env python2
> >> +#!/usr/bin/env python3
> >>  # SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause)
> >>  
> >>  """
> 
> The problem I'm addressing with this patch is that the default
> python version for the library is now python 3 but that file, if
> called without an interpreter is launched with python2. You can of
> course still call "python2 setup.py install" or whatever and it will
> use Python 2, this just changes the "default" for that file.

> And the shebang can't be 'modular' (except you set it to a script
> which decides between py2 & 3 and execs the correct one but that is
> a horrible idea^^)

Ah, I see your point.

Ok, can you resend please with these changes:

 1) Include the rationale you have above in the commit message

 2) Add a comment, right below the shebang noting that while Python3
    is the default, it should also be possible to invoke with Python2
    explicitly

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Device Tree]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux