Skip to content

Commit

Permalink
Fixed|macOS: Python 3 compatibility in deps deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Jan 13, 2020
1 parent 0d607b5 commit 42df5b5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions doomsday/build/scripts/apple_deps.py
Expand Up @@ -11,9 +11,9 @@
name_cmd = '/usr/bin/install_name_tool'
print("Fixing install names in:", sys.argv[1])
root = os.path.join(sys.argv[1], 'Contents')
binaries = list(
map(lambda n: '/MacOS/' + n, os.listdir(root + '/MacOS')) + \
map(lambda n: '/Frameworks/' + n, os.listdir(root + '/Frameworks')))
binaries = \
list(map(lambda n: '/MacOS/' + n, os.listdir(root + '/MacOS'))) + \
list(map(lambda n: '/Frameworks/' + n, os.listdir(root + '/Frameworks')))
actions = {}
for binary in binaries:
if binary.startswith('/Frameworks/'):
Expand All @@ -31,9 +31,9 @@
binary = binaries[0]
del binaries[0]
print(binary)
if not re.search('cmd LC_RPATH', subprocess.check_output([otool_cmd, '-l', root + binary])):
if not re.search('cmd LC_RPATH', subprocess.check_output([otool_cmd, '-l', root + binary], encoding='utf-8')):
subprocess.check_call([name_cmd, '-add_rpath', '@loader_path/../Frameworks', root + binary])
deps = subprocess.check_output([otool_cmd, '-L', root + binary])
deps = subprocess.check_output([otool_cmd, '-L', root + binary], encoding='utf-8')
dep_actions = []
for deps_line in deps.split('\n'):
dep = re.match('\\s+(.*) \\(compatibility version.*', deps_line)
Expand Down

0 comments on commit 42df5b5

Please sign in to comment.