Linux-SPDX Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] scripts: switch some more scripts explicitly to Python 3
@ 2021-02-01  1:08 Masahiro Yamada
  2021-02-01  1:33 ` Nathan Chancellor
  2021-02-01 18:28 ` Nick Desaulniers
  0 siblings, 2 replies; 5+ messages in thread
From: Masahiro Yamada @ 2021-02-01  1:08 UTC (permalink / raw)
  To: linux-kbuild
  Cc: linux-doc, Masahiro Yamada, Greg Kroah-Hartman,
	Nathan Chancellor, Nick Desaulniers, Thomas Gleixner,
	clang-built-linux, linux-kernel, linux-spdx

For the same reason as commit 51839e29cb59 ("scripts: switch explicitly
to Python 3"), switch some more scripts, which I tested and confirmed
working on Python 3.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 scripts/clang-tools/gen_compile_commands.py | 2 +-
 scripts/clang-tools/run-clang-tools.py      | 2 +-
 scripts/spdxcheck.py                        | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/clang-tools/gen_compile_commands.py b/scripts/clang-tools/gen_compile_commands.py
index 19963708bcf8..8ddb5d099029 100755
--- a/scripts/clang-tools/gen_compile_commands.py
+++ b/scripts/clang-tools/gen_compile_commands.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # SPDX-License-Identifier: GPL-2.0
 #
 # Copyright (C) Google LLC, 2018
diff --git a/scripts/clang-tools/run-clang-tools.py b/scripts/clang-tools/run-clang-tools.py
index fa7655c7cec0..f754415af398 100755
--- a/scripts/clang-tools/run-clang-tools.py
+++ b/scripts/clang-tools/run-clang-tools.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # SPDX-License-Identifier: GPL-2.0
 #
 # Copyright (C) Google LLC, 2020
diff --git a/scripts/spdxcheck.py b/scripts/spdxcheck.py
index bc87200f9c7c..cbdb5c83c08f 100755
--- a/scripts/spdxcheck.py
+++ b/scripts/spdxcheck.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # SPDX-License-Identifier: GPL-2.0
 # Copyright Thomas Gleixner <tglx@linutronix.de>
 
-- 
2.27.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] scripts: switch some more scripts explicitly to Python 3
  2021-02-01  1:08 [PATCH] scripts: switch some more scripts explicitly to Python 3 Masahiro Yamada
@ 2021-02-01  1:33 ` Nathan Chancellor
  2021-02-01 18:28 ` Nick Desaulniers
  1 sibling, 0 replies; 5+ messages in thread
From: Nathan Chancellor @ 2021-02-01  1:33 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: linux-kbuild, linux-doc, Greg Kroah-Hartman, Nathan Chancellor,
	Nick Desaulniers, Thomas Gleixner, clang-built-linux,
	linux-kernel, linux-spdx

On Mon, Feb 01, 2021 at 10:08:18AM +0900, Masahiro Yamada wrote:
> For the same reason as commit 51839e29cb59 ("scripts: switch explicitly
> to Python 3"), switch some more scripts, which I tested and confirmed
> working on Python 3.
> 
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

Acked-by: Nathan Chancellor <nathan@kernel.org>

> ---
> 
>  scripts/clang-tools/gen_compile_commands.py | 2 +-
>  scripts/clang-tools/run-clang-tools.py      | 2 +-
>  scripts/spdxcheck.py                        | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/scripts/clang-tools/gen_compile_commands.py b/scripts/clang-tools/gen_compile_commands.py
> index 19963708bcf8..8ddb5d099029 100755
> --- a/scripts/clang-tools/gen_compile_commands.py
> +++ b/scripts/clang-tools/gen_compile_commands.py
> @@ -1,4 +1,4 @@
> -#!/usr/bin/env python
> +#!/usr/bin/env python3
>  # SPDX-License-Identifier: GPL-2.0
>  #
>  # Copyright (C) Google LLC, 2018
> diff --git a/scripts/clang-tools/run-clang-tools.py b/scripts/clang-tools/run-clang-tools.py
> index fa7655c7cec0..f754415af398 100755
> --- a/scripts/clang-tools/run-clang-tools.py
> +++ b/scripts/clang-tools/run-clang-tools.py
> @@ -1,4 +1,4 @@
> -#!/usr/bin/env python
> +#!/usr/bin/env python3
>  # SPDX-License-Identifier: GPL-2.0
>  #
>  # Copyright (C) Google LLC, 2020
> diff --git a/scripts/spdxcheck.py b/scripts/spdxcheck.py
> index bc87200f9c7c..cbdb5c83c08f 100755
> --- a/scripts/spdxcheck.py
> +++ b/scripts/spdxcheck.py
> @@ -1,4 +1,4 @@
> -#!/usr/bin/env python
> +#!/usr/bin/env python3
>  # SPDX-License-Identifier: GPL-2.0
>  # Copyright Thomas Gleixner <tglx@linutronix.de>
>  
> -- 
> 2.27.0
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] scripts: switch some more scripts explicitly to Python 3
  2021-02-01  1:08 [PATCH] scripts: switch some more scripts explicitly to Python 3 Masahiro Yamada
  2021-02-01  1:33 ` Nathan Chancellor
@ 2021-02-01 18:28 ` Nick Desaulniers
  2021-02-02  6:09   ` Masahiro Yamada
  1 sibling, 1 reply; 5+ messages in thread
From: Nick Desaulniers @ 2021-02-01 18:28 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Linux Kbuild mailing list, Linux Doc Mailing List,
	Greg Kroah-Hartman, Nathan Chancellor, Thomas Gleixner,
	clang-built-linux, LKML, linux-spdx

On Sun, Jan 31, 2021 at 5:08 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> For the same reason as commit 51839e29cb59 ("scripts: switch explicitly
> to Python 3"), switch some more scripts, which I tested and confirmed
> working on Python 3.
>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

Thanks for the patch. It's time to move on from Python 2.

It looks like there's already a patch in -next for scripts/spdxcheck.py.
("spdxcheck.py: Use Python 3") by Bert Vermeulen.
https://lore.kernel.org/r/20210121085412.265400-1-bert@biot.com

What about:
scripts/tracing/draw_functrace.py
scripts/show_delta
scripts/jobserver-exec

Or do those need additional source level changes?

> ---
>
>  scripts/clang-tools/gen_compile_commands.py | 2 +-
>  scripts/clang-tools/run-clang-tools.py      | 2 +-
>  scripts/spdxcheck.py                        | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/scripts/clang-tools/gen_compile_commands.py b/scripts/clang-tools/gen_compile_commands.py
> index 19963708bcf8..8ddb5d099029 100755
> --- a/scripts/clang-tools/gen_compile_commands.py
> +++ b/scripts/clang-tools/gen_compile_commands.py
> @@ -1,4 +1,4 @@
> -#!/usr/bin/env python
> +#!/usr/bin/env python3
>  # SPDX-License-Identifier: GPL-2.0
>  #
>  # Copyright (C) Google LLC, 2018
> diff --git a/scripts/clang-tools/run-clang-tools.py b/scripts/clang-tools/run-clang-tools.py
> index fa7655c7cec0..f754415af398 100755
> --- a/scripts/clang-tools/run-clang-tools.py
> +++ b/scripts/clang-tools/run-clang-tools.py
> @@ -1,4 +1,4 @@
> -#!/usr/bin/env python
> +#!/usr/bin/env python3
>  # SPDX-License-Identifier: GPL-2.0
>  #
>  # Copyright (C) Google LLC, 2020
> diff --git a/scripts/spdxcheck.py b/scripts/spdxcheck.py
> index bc87200f9c7c..cbdb5c83c08f 100755
> --- a/scripts/spdxcheck.py
> +++ b/scripts/spdxcheck.py
> @@ -1,4 +1,4 @@
> -#!/usr/bin/env python
> +#!/usr/bin/env python3
>  # SPDX-License-Identifier: GPL-2.0
>  # Copyright Thomas Gleixner <tglx@linutronix.de>
>
> --
> 2.27.0
>


-- 
Thanks,
~Nick Desaulniers

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] scripts: switch some more scripts explicitly to Python 3
  2021-02-01 18:28 ` Nick Desaulniers
@ 2021-02-02  6:09   ` Masahiro Yamada
  2021-02-02  6:55     ` Sedat Dilek
  0 siblings, 1 reply; 5+ messages in thread
From: Masahiro Yamada @ 2021-02-02  6:09 UTC (permalink / raw)
  To: Nick Desaulniers
  Cc: Linux Kbuild mailing list, Linux Doc Mailing List,
	Greg Kroah-Hartman, Nathan Chancellor, Thomas Gleixner,
	clang-built-linux, LKML, linux-spdx

On Tue, Feb 2, 2021 at 3:28 AM Nick Desaulniers <ndesaulniers@google.com> wrote:
>
> On Sun, Jan 31, 2021 at 5:08 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
> >
> > For the same reason as commit 51839e29cb59 ("scripts: switch explicitly
> > to Python 3"), switch some more scripts, which I tested and confirmed
> > working on Python 3.
> >
> > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
>
> Thanks for the patch. It's time to move on from Python 2.
>
> It looks like there's already a patch in -next for scripts/spdxcheck.py.
> ("spdxcheck.py: Use Python 3") by Bert Vermeulen.
> https://lore.kernel.org/r/20210121085412.265400-1-bert@biot.com

OK, I dropped the spdxcheck.py change in v2.



> What about:
> scripts/tracing/draw_functrace.py
> scripts/show_delta
> scripts/jobserver-exec
>
> Or do those need additional source level changes?


I touched jobserver-exec in this patch:

https://patchwork.kernel.org/project/linux-kbuild/patch/20210201010024.654526-1-masahiroy@kernel.org/


I have not tested draw_functrac.py or show_delta.





> > ---
> >
> >  scripts/clang-tools/gen_compile_commands.py | 2 +-
> >  scripts/clang-tools/run-clang-tools.py      | 2 +-
> >  scripts/spdxcheck.py                        | 2 +-
> >  3 files changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/scripts/clang-tools/gen_compile_commands.py b/scripts/clang-tools/gen_compile_commands.py
> > index 19963708bcf8..8ddb5d099029 100755
> > --- a/scripts/clang-tools/gen_compile_commands.py
> > +++ b/scripts/clang-tools/gen_compile_commands.py
> > @@ -1,4 +1,4 @@
> > -#!/usr/bin/env python
> > +#!/usr/bin/env python3
> >  # SPDX-License-Identifier: GPL-2.0
> >  #
> >  # Copyright (C) Google LLC, 2018
> > diff --git a/scripts/clang-tools/run-clang-tools.py b/scripts/clang-tools/run-clang-tools.py
> > index fa7655c7cec0..f754415af398 100755
> > --- a/scripts/clang-tools/run-clang-tools.py
> > +++ b/scripts/clang-tools/run-clang-tools.py
> > @@ -1,4 +1,4 @@
> > -#!/usr/bin/env python
> > +#!/usr/bin/env python3
> >  # SPDX-License-Identifier: GPL-2.0
> >  #
> >  # Copyright (C) Google LLC, 2020
> > diff --git a/scripts/spdxcheck.py b/scripts/spdxcheck.py
> > index bc87200f9c7c..cbdb5c83c08f 100755
> > --- a/scripts/spdxcheck.py
> > +++ b/scripts/spdxcheck.py
> > @@ -1,4 +1,4 @@
> > -#!/usr/bin/env python
> > +#!/usr/bin/env python3
> >  # SPDX-License-Identifier: GPL-2.0
> >  # Copyright Thomas Gleixner <tglx@linutronix.de>
> >
> > --
> > 2.27.0
> >
>
>
> --
> Thanks,
> ~Nick Desaulniers



-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] scripts: switch some more scripts explicitly to Python 3
  2021-02-02  6:09   ` Masahiro Yamada
@ 2021-02-02  6:55     ` Sedat Dilek
  0 siblings, 0 replies; 5+ messages in thread
From: Sedat Dilek @ 2021-02-02  6:55 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Nick Desaulniers, Linux Kbuild mailing list,
	Linux Doc Mailing List, Greg Kroah-Hartman, Nathan Chancellor,
	Thomas Gleixner, clang-built-linux, LKML, linux-spdx

On Tue, Feb 2, 2021 at 7:10 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> On Tue, Feb 2, 2021 at 3:28 AM Nick Desaulniers <ndesaulniers@google.com> wrote:
> >
> > On Sun, Jan 31, 2021 at 5:08 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
> > >
> > > For the same reason as commit 51839e29cb59 ("scripts: switch explicitly
> > > to Python 3"), switch some more scripts, which I tested and confirmed
> > > working on Python 3.
> > >
> > > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> >
> > Thanks for the patch. It's time to move on from Python 2.
> >
> > It looks like there's already a patch in -next for scripts/spdxcheck.py.
> > ("spdxcheck.py: Use Python 3") by Bert Vermeulen.
> > https://lore.kernel.org/r/20210121085412.265400-1-bert@biot.com
>
> OK, I dropped the spdxcheck.py change in v2.
>
>
>
> > What about:
> > scripts/tracing/draw_functrace.py
> > scripts/show_delta
> > scripts/jobserver-exec
> >
> > Or do those need additional source level changes?
>
>
> I touched jobserver-exec in this patch:
>
> https://patchwork.kernel.org/project/linux-kbuild/patch/20210201010024.654526-1-masahiroy@kernel.org/
>
>
> I have not tested draw_functrac.py or show_delta.
>

As Debian/testing - upcoming bullseye release - has moved to python3.9
(3.9.1-3) as default I am interested in the kbuild transition to
python3.

Is it possible to have a Git branch in kbuild.git especially for this
transition?

Honestly; I lost a bit the track of all kbuild/python3 patches.

Thanks.

- Sedat -

> > > ---
> > >
> > >  scripts/clang-tools/gen_compile_commands.py | 2 +-
> > >  scripts/clang-tools/run-clang-tools.py      | 2 +-
> > >  scripts/spdxcheck.py                        | 2 +-
> > >  3 files changed, 3 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/scripts/clang-tools/gen_compile_commands.py b/scripts/clang-tools/gen_compile_commands.py
> > > index 19963708bcf8..8ddb5d099029 100755
> > > --- a/scripts/clang-tools/gen_compile_commands.py
> > > +++ b/scripts/clang-tools/gen_compile_commands.py
> > > @@ -1,4 +1,4 @@
> > > -#!/usr/bin/env python
> > > +#!/usr/bin/env python3
> > >  # SPDX-License-Identifier: GPL-2.0
> > >  #
> > >  # Copyright (C) Google LLC, 2018
> > > diff --git a/scripts/clang-tools/run-clang-tools.py b/scripts/clang-tools/run-clang-tools.py
> > > index fa7655c7cec0..f754415af398 100755
> > > --- a/scripts/clang-tools/run-clang-tools.py
> > > +++ b/scripts/clang-tools/run-clang-tools.py
> > > @@ -1,4 +1,4 @@
> > > -#!/usr/bin/env python
> > > +#!/usr/bin/env python3
> > >  # SPDX-License-Identifier: GPL-2.0
> > >  #
> > >  # Copyright (C) Google LLC, 2020
> > > diff --git a/scripts/spdxcheck.py b/scripts/spdxcheck.py
> > > index bc87200f9c7c..cbdb5c83c08f 100755
> > > --- a/scripts/spdxcheck.py
> > > +++ b/scripts/spdxcheck.py
> > > @@ -1,4 +1,4 @@
> > > -#!/usr/bin/env python
> > > +#!/usr/bin/env python3
> > >  # SPDX-License-Identifier: GPL-2.0
> > >  # Copyright Thomas Gleixner <tglx@linutronix.de>
> > >
> > > --
> > > 2.27.0
> > >
> >
> >
> > --
> > Thanks,
> > ~Nick Desaulniers
>
>
>
> --
> Best Regards
> Masahiro Yamada
>
> --
> You received this message because you are subscribed to the Google Groups "Clang Built Linux" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-linux+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/CAK7LNATSna9f8cd5Lm%3Dzx2vfJzk%3DWUnAUkA8V593O304zTx%3DvQ%40mail.gmail.com.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-01  1:08 [PATCH] scripts: switch some more scripts explicitly to Python 3 Masahiro Yamada
2021-02-01  1:33 ` Nathan Chancellor
2021-02-01 18:28 ` Nick Desaulniers
2021-02-02  6:09   ` Masahiro Yamada
2021-02-02  6:55     ` Sedat Dilek

Linux-SPDX Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-spdx/0 linux-spdx/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-spdx linux-spdx/ https://lore.kernel.org/linux-spdx \
		linux-spdx@vger.kernel.org
	public-inbox-index linux-spdx

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-spdx


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git