Skip to content

Commit

Permalink
Update swift-rpathize.py to work with Python 3.8 and Python 2.7
Browse files Browse the repository at this point in the history
In Python 2, str() is also a kind of bytes blob
In Python 3, str() is a Unicode string that's unrelated
  • Loading branch information
tbkka committed Oct 16, 2020
1 parent 38c8bbd commit be4e2a0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion utils/swift-rpathize.py
Expand Up @@ -65,7 +65,8 @@ def rpathize(filename):
# Build a command to invoke install_name_tool.
command = ['install_name_tool']
for line in dylibsOutput.splitlines():
match = dylib_regex.match(line)
l = line.decode("utf-8", "strict")
match = dylib_regex.match(l)
if match:
command.append('-change')
command.append(match.group('path'))
Expand Down

0 comments on commit be4e2a0

Please sign in to comment.