From 1c0c3fc2d27977f43805fa1d05577a99adcb6961 Mon Sep 17 00:00:00 2001 From: John Maguire Date: Tue, 25 Aug 2020 17:09:41 +0100 Subject: [PATCH] Port macdeploy to python 3 --- dist/macdeploy.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/dist/macdeploy.py b/dist/macdeploy.py index 030674e75..1e6f4cba7 100755 --- a/dist/macdeploy.py +++ b/dist/macdeploy.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 # This file is part of Clementine. # @@ -165,7 +165,7 @@ class CouldNotParseFrameworkNameError(Error): if len(sys.argv) < 2: - print 'Usage: %s ' % sys.argv[0] + print('Usage: %s ' % sys.argv[0]) bundle_dir = sys.argv[1] @@ -186,7 +186,7 @@ fixed_frameworks = set() def GetBrokenLibraries(binary): output = subprocess.Popen( - [OTOOL, '-L', binary], stdout=subprocess.PIPE).communicate()[0] + [OTOOL, '-L', binary], stdout=subprocess.PIPE).communicate()[0].decode('utf-8') broken_libs = {'frameworks': [], 'libs': []} for line in [x.split(' ')[0].lstrip() for x in output.split('\n')[1:]]: if not line: # skip empty lines @@ -480,18 +480,18 @@ def main(): FixPlugin('clementine-spotifyblob', '.') FixPlugin('clementine-tagreader', '.') except: - print 'Failed to find blob: %s' % traceback.format_exc() + print('Failed to find blob: %s' % traceback.format_exc()) for plugin in QT_PLUGINS: FixPlugin(FindQtPlugin(plugin), os.path.dirname(plugin)) if len(sys.argv) <= 2: - print 'Would run %d commands:' % len(commands) + print('Would run %d commands:' % len(commands)) for command in commands: - print ' '.join(command) + print(' '.join(command)) - print 'OK?' - raw_input() + print('OK?') + input() for command in commands: p = subprocess.Popen(command)