From 830bd34662f69f41b510aa68ac239dd28c19bd0e Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Wed, 8 Jul 2020 14:57:14 +0200 Subject: [PATCH 1/4] pyterm: use Python3 in setup.py --- dist/tools/pyterm/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/tools/pyterm/setup.py b/dist/tools/pyterm/setup.py index f9b9825858..ebdda9e08e 100755 --- a/dist/tools/pyterm/setup.py +++ b/dist/tools/pyterm/setup.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 try: from setuptools import setup From 12cf6f0137b00491342373e7273beb7abc43feff Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Wed, 8 Jul 2020 14:57:54 +0200 Subject: [PATCH 2/4] buildsystem_sanity_check: use python3 --- .../save_all_dependencies_resolution_variables.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/tools/buildsystem_sanity_check/save_all_dependencies_resolution_variables.sh b/dist/tools/buildsystem_sanity_check/save_all_dependencies_resolution_variables.sh index 21a892a786..d2eb59313f 100755 --- a/dist/tools/buildsystem_sanity_check/save_all_dependencies_resolution_variables.sh +++ b/dist/tools/buildsystem_sanity_check/save_all_dependencies_resolution_variables.sh @@ -51,7 +51,7 @@ main() { local output_dir # No 'realpath' in mac by default… - output_dir=$(python -c 'import os.path; print(os.path.abspath("'"$1"'"))') + output_dir=$(python3 -c 'import os.path; print(os.path.abspath("'"$1"'"))') for app in $(applications) do From b8e2d141646cae3405cc7e16a3e7e42fcd11d57a Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Wed, 8 Jul 2020 15:00:00 +0200 Subject: [PATCH 3/4] gen_esp32part.py: use Python3 --- dist/tools/esptool/gen_esp32part.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dist/tools/esptool/gen_esp32part.py b/dist/tools/esptool/gen_esp32part.py index 5f9cfd7740..9520b6abea 100755 --- a/dist/tools/esptool/gen_esp32part.py +++ b/dist/tools/esptool/gen_esp32part.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # ESP32 partition table generation tool # @@ -20,7 +20,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import print_function, division import argparse import os import re From a5043540f4bbe86e3d43ad5cfc97d442f9bb595f Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Wed, 8 Jul 2020 15:02:25 +0200 Subject: [PATCH 4/4] dist/tools/compile_test: use Python3 --- dist/tools/compile_test/compile_test.py | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/dist/tools/compile_test/compile_test.py b/dist/tools/compile_test/compile_test.py index fe61dc5e95..7a3ce6f3c9 100755 --- a/dist/tools/compile_test/compile_test.py +++ b/dist/tools/compile_test/compile_test.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (C) 2014 René Kijewski @@ -19,22 +19,13 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -from __future__ import print_function - from collections import defaultdict from itertools import groupby from os import devnull, environ from os.path import abspath, dirname, isfile, join from subprocess import CalledProcessError, check_call, check_output, PIPE, Popen from sys import argv, exit, stdout - - -try: - # Python 2.x - from StringIO import StringIO -except ImportError: - # Python 3.x - from io import StringIO +from io import StringIO from itertools import tee