summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntony Pavlov <antonynpavlov@gmail.com>2021-04-16 12:14:04 +0300
committerSascha Hauer <s.hauer@pengutronix.de>2021-05-03 14:01:40 +0200
commit623c72a9c6bb79b6084946f1efe3b1358766f52f (patch)
treedf27ef18f1e1c06a2cf47e7285106f689f30e5cd
parent02b7eaf6ab6b7c5c5f83b8742f3e43991e4cff1d (diff)
downloadbarebox-623c72a9c6bb79b6084946f1efe3b1358766f52f.tar.gz
barebox-623c72a9c6bb79b6084946f1efe3b1358766f52f.tar.xz
scripts/spdxcheck.py: Use Python 3
Based on this linux kernel commit: > commit d0259c42abff51b586496a0594933e394efefbc5 > Author: Bert Vermeulen <bert@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@gmail.com> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.barebox.org/20210416091404.92251-1-antonynpavlov@gmail.com Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rwxr-xr-xscripts/checkpatch.pl4
-rwxr-xr-xscripts/spdxcheck.py2
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@linutronix.de>