From 9ba6c38fa10a90ffd42ea64846b2f17a64a2f256 Mon Sep 17 00:00:00 2001 From: Kazunari Sekigawa Date: Thu, 10 Nov 2022 21:20:14 +0900 Subject: [PATCH] The Mac build system should use Python3 only --- macbuild/build4mac_util.py | 3 +-- macbuild/macQAT.py | 17 +++++------------ 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/macbuild/build4mac_util.py b/macbuild/build4mac_util.py index 0c6d0d5cc..42f016f0d 100755 --- a/macbuild/build4mac_util.py +++ b/macbuild/build4mac_util.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python3 # -*- coding: utf-8 -*- #======================================================================================== @@ -10,7 +10,6 @@ # # This file is imported by 'build4mac.py' script. #======================================================================================== -from __future__ import print_function # to use print() of Python 3 in Python >= 2.7 import sys import os import re diff --git a/macbuild/macQAT.py b/macbuild/macQAT.py index 639bd8fb2..51b8d13f8 100755 --- a/macbuild/macQAT.py +++ b/macbuild/macQAT.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # -*- coding: utf-8 -*- #=============================================================================== @@ -10,12 +10,10 @@ # # This script must be copied to a "*.macQAT/" directory to run. #=============================================================================== -from __future__ import print_function # to use print() of Python 3 in Python >= 2.7 import sys import os import datetime from time import sleep -import six import platform import optparse import subprocess @@ -201,15 +199,10 @@ def ExportEnvVariables(): # @param[in] logfile log file name #------------------------------------------------------------------------------- def RunTester( command, logfile="" ): - if six.PY3: - proc = subprocess.Popen( command.split(), - stdout=subprocess.PIPE, \ - stderr=subprocess.STDOUT, \ - universal_newlines=True ) - else: - proc = subprocess.Popen( command.split(), - stdout=subprocess.PIPE, \ - stderr=subprocess.STDOUT ) + proc = subprocess.Popen( command.split(), + stdout=subprocess.PIPE, \ + stderr=subprocess.STDOUT, \ + universal_newlines=True ) if not logfile == "": with proc.stdout, open( logfile, 'w' ) as file: