[PATCH] scripts/spdxcheck.py: Use Python 3
Antony Pavlov
antonynpavlov at gmail.com
Wed Apr 28 05:39:11 BST 2021
On Fri, 16 Apr 2021 12:14:04 +0300
Antony Pavlov <antonynpavlov at gmail.com> wrote:
ping
> Based on this linux kernel commit:
>
> > commit d0259c42abff51b586496a0594933e394efefbc5
> > Author: Bert Vermeulen <bert at biot.com>
> > Date: Thu Jan 21 09:54:12 2021 +0100
> >
> > spdxcheck.py: Use Python 3
> >
> > Python 2.x has been officially EOL'ed for some time, and in any case
> > the git module for it is hard to come by.
>
> Signed-off-by: Antony Pavlov <antonynpavlov at gmail.com>
> ---
> scripts/checkpatch.pl | 4 ++--
> scripts/spdxcheck.py | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index b8bd4e1a59..36e3d768f3 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -885,10 +885,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 "$root/.git"));
> + return 1 if (!$tree || which("python3") eq "" || !(-e "$root/scripts/spdxcheck.py") || !(-e "$root/.git"));
>
> 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;
> }
> diff --git a/scripts/spdxcheck.py b/scripts/spdxcheck.py
> index 6374e078a5..0f81337394 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 at linutronix.de>
>
> --
> 2.31.0
>
--
Best regards,
Antony Pavlov
More information about the barebox
mailing list