[20.08,9/9] config/arm: support python3 only
diff mbox series

Message ID 20200522132320.26373-10-louise.kilheeney@intel.com
State Superseded, archived
Delegated to: Thomas Monjalon
Headers show
Series
  • adding support for python 3 only.
Related show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/travis-robot success Travis build: passed
ci/checkpatch success coding style OK

Commit Message

Louise Kilheeney May 22, 2020, 1:23 p.m. UTC
Changed script to explicitly use python3 only.

Cc: Thomas Monjalon <thomas@monjalon.net>

Signed-off-by: Louise Kilheeney <louise.kilheeney@intel.com>
---
 config/arm/armv8_machine.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Thomas Monjalon May 22, 2020, 1:46 p.m. UTC | #1
22/05/2020 15:23, Louise Kilheeney:
> Changed script to explicitly use python3 only.

What is the reason of this change?


> Cc: Thomas Monjalon <thomas@monjalon.net>
> 
> Signed-off-by: Louise Kilheeney <louise.kilheeney@intel.com>
> ---
>  config/arm/armv8_machine.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/config/arm/armv8_machine.py b/config/arm/armv8_machine.py
> index 404866d2f..a0e6a8769 100755
> --- a/config/arm/armv8_machine.py
> +++ b/config/arm/armv8_machine.py
> @@ -1,4 +1,4 @@
> -#!/usr/bin/python
> +#!/usr/bin/python3
>  # SPDX-License-Identifier: BSD-3-Clause
>  # Copyright(c) 2017 Cavium, Inc
Louise Kilheeney May 22, 2020, 2:10 p.m. UTC | #2
since python 2 is EOL, Making these scripts to use python3-only, 
it's part of a general update to have everything use python3. 
This is already using python 3 and this makes it explicit.

Best Regards 
Louise Kilheeney
-----Original Message-----
From: Thomas Monjalon <thomas@monjalon.net> 
Sent: Friday 22 May 2020 14:46
To: Kilheeney, Louise <louise.kilheeney@intel.com>
Cc: dev@dpdk.org
Subject: Re: [PATCH 20.08 9/9] config/arm: support python3 only

22/05/2020 15:23, Louise Kilheeney:
> Changed script to explicitly use python3 only.

What is the reason of this change?


> Cc: Thomas Monjalon <thomas@monjalon.net>
> 
> Signed-off-by: Louise Kilheeney <louise.kilheeney@intel.com>
> ---
>  config/arm/armv8_machine.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/config/arm/armv8_machine.py b/config/arm/armv8_machine.py 
> index 404866d2f..a0e6a8769 100755
> --- a/config/arm/armv8_machine.py
> +++ b/config/arm/armv8_machine.py
> @@ -1,4 +1,4 @@
> -#!/usr/bin/python
> +#!/usr/bin/python3
>  # SPDX-License-Identifier: BSD-3-Clause  # Copyright(c) 2017 Cavium, 
> Inc
Thomas Monjalon May 23, 2020, 9:27 p.m. UTC | #3
22/05/2020 16:10, Kilheeney, Louise:
> From: Thomas Monjalon <thomas@monjalon.net> 
> > 22/05/2020 15:23, Louise Kilheeney:
> > > Changed script to explicitly use python3 only.
> > 
> > What is the reason of this change?
> 
> since python 2 is EOL, Making these scripts to use python3-only,
> it's part of a general update to have everything use python3.
> This is already using python 3 and this makes it explicit.

This is to avoid maintaining python 2 compatibility I guess.
Please insert this real reason in the git commit log.


> > --- a/config/arm/armv8_machine.py
> > +++ b/config/arm/armv8_machine.py
> > @@ -1,4 +1,4 @@
> > -#!/usr/bin/python
> > +#!/usr/bin/python3

Are you sure all OS have /usr/bin/python3?
Is it called "python" sometimes?
Is it always located in /usr/bin/?
Shouldn't we use "#! /usr/bin/env python3" ?
Bruce Richardson May 25, 2020, 9:53 a.m. UTC | #4
On Sat, May 23, 2020 at 11:27:42PM +0200, Thomas Monjalon wrote:
> 22/05/2020 16:10, Kilheeney, Louise:
> > From: Thomas Monjalon <thomas@monjalon.net> 
> > > 22/05/2020 15:23, Louise Kilheeney:
> > > > Changed script to explicitly use python3 only.
> > > 
> > > What is the reason of this change?
> > 
> > since python 2 is EOL, Making these scripts to use python3-only,
> > it's part of a general update to have everything use python3.
> > This is already using python 3 and this makes it explicit.
> 
> This is to avoid maintaining python 2 compatibility I guess.
> Please insert this real reason in the git commit log.
> 
Also, python 2 may not be installed (unless explicitly requested) on 
modern distro releases. My Ubuntu 20.04 still only had a "python3" binary,
no "python" binary.

> 
> > > --- a/config/arm/armv8_machine.py
> > > +++ b/config/arm/armv8_machine.py
> > > @@ -1,4 +1,4 @@
> > > -#!/usr/bin/python
> > > +#!/usr/bin/python3
> 
> Are you sure all OS have /usr/bin/python3?
> Is it called "python" sometimes?
> Is it always located in /usr/bin/?
> Shouldn't we use "#! /usr/bin/env python3" ?
> 
Good catch.
+1 for this. On BSD python is in /usr/local/bin
Harman Kalra June 25, 2020, 9:34 a.m. UTC | #5
On Mon, May 25, 2020 at 10:53:28AM +0100, Bruce Richardson wrote:
> On Sat, May 23, 2020 at 11:27:42PM +0200, Thomas Monjalon wrote:
> > 22/05/2020 16:10, Kilheeney, Louise:
> > > From: Thomas Monjalon <thomas@monjalon.net> 
> > > > 22/05/2020 15:23, Louise Kilheeney:
> > > > > Changed script to explicitly use python3 only.
> > > > 
> > > > What is the reason of this change?
> > > 
> > > since python 2 is EOL, Making these scripts to use python3-only,
> > > it's part of a general update to have everything use python3.
> > > This is already using python 3 and this makes it explicit.
> > 
> > This is to avoid maintaining python 2 compatibility I guess.
> > Please insert this real reason in the git commit log.
> > 
> Also, python 2 may not be installed (unless explicitly requested) on 
> modern distro releases. My Ubuntu 20.04 still only had a "python3" binary,
> no "python" binary.
> 
> > 
> > > > --- a/config/arm/armv8_machine.py
> > > > +++ b/config/arm/armv8_machine.py
> > > > @@ -1,4 +1,4 @@
> > > > -#!/usr/bin/python
> > > > +#!/usr/bin/python3
> > 
> > Are you sure all OS have /usr/bin/python3?
> > Is it called "python" sometimes?
> > Is it always located in /usr/bin/?
> > Shouldn't we use "#! /usr/bin/env python3" ?
> > 
> Good catch.
> +1 for this. On BSD python is in /usr/local/bin

Tested config/arm/armv8_machine.py on an arm64 platform, it works fine.
+1 for the patch with changes recomended by Thomas.

Tested-by: Harman Kalra <hkalra@marvell.com>

Patch
diff mbox series

diff --git a/config/arm/armv8_machine.py b/config/arm/armv8_machine.py
index 404866d2f..a0e6a8769 100755
--- a/config/arm/armv8_machine.py
+++ b/config/arm/armv8_machine.py
@@ -1,4 +1,4 @@ 
-#!/usr/bin/python
+#!/usr/bin/python3
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Cavium, Inc