* [PATCH] checkpatch: Use python3 to run spdxcheck.py
@ 2021-06-15 18:52 Paul Barker
2021-06-15 18:58 ` Dwaipayan Ray
0 siblings, 1 reply; 3+ messages in thread
From: Paul Barker @ 2021-06-15 18:52 UTC (permalink / raw)
To: Andy Whitcroft, Joe Perches, Dwaipayan Ray, Lukas Bulwahn, linux-kernel
Cc: Paul Barker
Since commit d0259c42abff ("spdxcheck.py: Use Python 3"), the shebang
line in scripts/spdxcheck.py says the script should run with `python3`.
However, checkpatch has been explicitly running this script with
`python` so it needs updating to ensure that Python 3 is used on all
distros.
Signed-off-by: Paul Barker <paul@pbarker.dev>
---
scripts/checkpatch.pl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 23697a6b1eaa..5e5e3a53461b 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1084,10 +1084,10 @@ sub is_maintained_obsolete {
sub is_SPDX_License_valid {
my ($license) = @_;
- return 1 if (!$tree || which("python") eq "" || !(-e "$root/scripts/spdxcheck.py") || !(-e "$gitroot"));
+ return 1 if (!$tree || which("python3") eq "" || !(-e "$root/scripts/spdxcheck.py") || !(-e "$gitroot"));
my $root_path = abs_path($root);
- my $status = `cd "$root_path"; echo "$license" | python scripts/spdxcheck.py -`;
+ my $status = `cd "$root_path"; echo "$license" | python3 scripts/spdxcheck.py -`;
return 0 if ($status ne "");
return 1;
}
--
2.32.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] checkpatch: Use python3 to run spdxcheck.py
2021-06-15 18:52 [PATCH] checkpatch: Use python3 to run spdxcheck.py Paul Barker
@ 2021-06-15 18:58 ` Dwaipayan Ray
2021-06-15 19:09 ` Paul Barker
0 siblings, 1 reply; 3+ messages in thread
From: Dwaipayan Ray @ 2021-06-15 18:58 UTC (permalink / raw)
To: Paul Barker; +Cc: Andy Whitcroft, Joe Perches, Lukas Bulwahn, linux-kernel
On Wed, Jun 16, 2021 at 12:22 AM Paul Barker <paul@pbarker.dev> wrote:
>
> Since commit d0259c42abff ("spdxcheck.py: Use Python 3"), the shebang
> line in scripts/spdxcheck.py says the script should run with `python3`.
> However, checkpatch has been explicitly running this script with
> `python` so it needs updating to ensure that Python 3 is used on all
> distros.
>
> Signed-off-by: Paul Barker <paul@pbarker.dev>
> ---
> scripts/checkpatch.pl | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 23697a6b1eaa..5e5e3a53461b 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -1084,10 +1084,10 @@ sub is_maintained_obsolete {
> sub is_SPDX_License_valid {
> my ($license) = @_;
>
> - return 1 if (!$tree || which("python") eq "" || !(-e "$root/scripts/spdxcheck.py") || !(-e "$gitroot"));
> + return 1 if (!$tree || which("python3") eq "" || !(-e "$root/scripts/spdxcheck.py") || !(-e "$gitroot"));
>
> my $root_path = abs_path($root);
> - my $status = `cd "$root_path"; echo "$license" | python scripts/spdxcheck.py -`;
> + my $status = `cd "$root_path"; echo "$license" | python3 scripts/spdxcheck.py -`;
> return 0 if ($status ne "");
> return 1;
> }
> --
Hello,
This change was already added by Commit c739ec2da1ea
("checkpatch: scripts/spdxcheck.py now requires python3")
in linux-next.
Thanks,
Dwaipayan.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] checkpatch: Use python3 to run spdxcheck.py
2021-06-15 18:58 ` Dwaipayan Ray
@ 2021-06-15 19:09 ` Paul Barker
0 siblings, 0 replies; 3+ messages in thread
From: Paul Barker @ 2021-06-15 19:09 UTC (permalink / raw)
To: Dwaipayan Ray; +Cc: Andy Whitcroft, Joe Perches, Lukas Bulwahn, linux-kernel
On Wed, 16 Jun 2021 00:28:14 +0530
Dwaipayan Ray <dwaipayanray1@gmail.com> wrote:
> On Wed, Jun 16, 2021 at 12:22 AM Paul Barker <paul@pbarker.dev> wrote:
> >
> > Since commit d0259c42abff ("spdxcheck.py: Use Python 3"), the
> > shebang line in scripts/spdxcheck.py says the script should run
> > with `python3`. However, checkpatch has been explicitly running
> > this script with `python` so it needs updating to ensure that
> > Python 3 is used on all distros.
> >
> > Signed-off-by: Paul Barker <paul@pbarker.dev>
> > ---
> > scripts/checkpatch.pl | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> > index 23697a6b1eaa..5e5e3a53461b 100755
> > --- a/scripts/checkpatch.pl
> > +++ b/scripts/checkpatch.pl
> > @@ -1084,10 +1084,10 @@ sub is_maintained_obsolete {
> > sub is_SPDX_License_valid {
> > my ($license) = @_;
> >
> > - return 1 if (!$tree || which("python") eq "" || !(-e
> > "$root/scripts/spdxcheck.py") || !(-e "$gitroot"));
> > + return 1 if (!$tree || which("python3") eq "" || !(-e
> > "$root/scripts/spdxcheck.py") || !(-e "$gitroot"));
> >
> > my $root_path = abs_path($root);
> > - my $status = `cd "$root_path"; echo "$license" | python
> > scripts/spdxcheck.py -`;
> > + my $status = `cd "$root_path"; echo "$license" | python3
> > scripts/spdxcheck.py -`; return 0 if ($status ne "");
> > return 1;
> > }
> > --
>
> Hello,
> This change was already added by Commit c739ec2da1ea
> ("checkpatch: scripts/spdxcheck.py now requires python3")
> in linux-next.
>
> Thanks,
> Dwaipayan.
So it is. Apologies for the noise.
--
Paul Barker
https://pbarker.dev/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-06-15 19:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-15 18:52 [PATCH] checkpatch: Use python3 to run spdxcheck.py Paul Barker
2021-06-15 18:58 ` Dwaipayan Ray
2021-06-15 19:09 ` Paul Barker
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.