Skip to content

Commit be4e2a0

Browse files
committed
Update swift-rpathize.py to work with Python 3.8 and Python 2.7
In Python 2, str() is also a kind of bytes blob In Python 3, str() is a Unicode string that's unrelated
1 parent 38c8bbd commit be4e2a0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

utils/swift-rpathize.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ def rpathize(filename):
6565
# Build a command to invoke install_name_tool.
6666
command = ['install_name_tool']
6767
for line in dylibsOutput.splitlines():
68-
match = dylib_regex.match(line)
68+
l = line.decode("utf-8", "strict")
69+
match = dylib_regex.match(l)
6970
if match:
7071
command.append('-change')
7172
command.append(match.group('path'))

0 commit comments

Comments
 (0)