[U-Boot] [PATCH] host-tools: use python2 explicitly for shebang

Masahiro Yamada yamada.masahiro at socionext.com
Sun Jan 21 09:34:57 UTC 2018


All of these host tools are apparently written for Python2,
not Python3.

Use 'python2' in the shebang line according to PEP 394
(https://www.python.org/dev/peps/pep-0394/).

Signed-off-by: Masahiro Yamada <yamada.masahiro at socionext.com>
---

I sent some time before figuring out why Patman does not work
on my machine.

If 'python' points to python3, Patman does not epit any error
message, it just stays silent until it consumes all memory
on the system.


 scripts/dtc/pylibfdt/setup.py | 2 +-
 scripts/mailmapper            | 2 +-
 test/py/test.py               | 2 +-
 tools/buildman/buildman.py    | 2 +-
 tools/dtoc/dtoc.py            | 2 +-
 tools/microcode-tool.py       | 2 +-
 tools/patman/patman.py        | 2 +-
 tools/rkmux.py                | 2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/scripts/dtc/pylibfdt/setup.py b/scripts/dtc/pylibfdt/setup.py
index daf1089..4f7cf04 100755
--- a/scripts/dtc/pylibfdt/setup.py
+++ b/scripts/dtc/pylibfdt/setup.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 
 """
 setup.py file for SWIG libfdt
diff --git a/scripts/mailmapper b/scripts/mailmapper
index 922ada6..78b23d1 100755
--- a/scripts/mailmapper
+++ b/scripts/mailmapper
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 #
 # Copyright (C) 2014, Masahiro Yamada <yamada.m at jp.panasonic.com>
 #
diff --git a/test/py/test.py b/test/py/test.py
index 74e560a..4695079 100755
--- a/test/py/test.py
+++ b/test/py/test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 
 # Copyright (c) 2015 Stephen Warren
 # Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved.
diff --git a/tools/buildman/buildman.py b/tools/buildman/buildman.py
index 11a4f16..473117c 100755
--- a/tools/buildman/buildman.py
+++ b/tools/buildman/buildman.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 #
 # Copyright (c) 2012 The Chromium OS Authors.
 #
diff --git a/tools/dtoc/dtoc.py b/tools/dtoc/dtoc.py
index ce7bc05..6eacfc9 100755
--- a/tools/dtoc/dtoc.py
+++ b/tools/dtoc/dtoc.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python2
 #
 # Copyright (C) 2016 Google, Inc
 # Written by Simon Glass <sjg at chromium.org>
diff --git a/tools/microcode-tool.py b/tools/microcode-tool.py
index 790c27e..069d961 100755
--- a/tools/microcode-tool.py
+++ b/tools/microcode-tool.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 #
 # Copyright (c) 2014 Google, Inc
 #
diff --git a/tools/patman/patman.py b/tools/patman/patman.py
index 4b3bc78..7647440 100755
--- a/tools/patman/patman.py
+++ b/tools/patman/patman.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 #
 # Copyright (c) 2011 The Chromium OS Authors.
 #
diff --git a/tools/rkmux.py b/tools/rkmux.py
index 3917335..11c192a 100755
--- a/tools/rkmux.py
+++ b/tools/rkmux.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python2
 
 # Script to create enums from datasheet register tables
 #
-- 
2.7.4



More information about the U-Boot mailing list