mirror of https://github.com/mpv-player/mpv
build: fix Python 3 unicode issue with waf 1.8.6
Starting with waf 1.8.6 (in Python 3), the hcode variable isn't a string, but a byte string. This commit adds the solution proposed in the upstream waf bug report: https://code.google.com/p/waf/issues/detail?id=1535 It seems a bit overly verbose, but on the other hand, this solution has the chance of being most correct/compatible. Fixes #1604.
This commit is contained in:
parent
a34d331841
commit
14b231119d
|
@ -33,7 +33,13 @@ def build(ctx):
|
|||
|
||||
cls = Task.classes['cprogram']
|
||||
class cprogram(cls):
|
||||
run_str = cls.hcode + '${LAST_LINKFLAGS}'
|
||||
try:
|
||||
run_str = cls.orig_run_str + '${LAST_LINKFLAGS}'
|
||||
except AttributeError:
|
||||
try:
|
||||
run_str = cls.hcode + '${LAST_LINKFLAGS}'
|
||||
except TypeError:
|
||||
run_str = cls.hcode.decode('iso8859-1') + '${LAST_LINKFLAGS}'
|
||||
|
||||
cls = Task.classes['macplist']
|
||||
class macplist(cls):
|
||||
|
|
Loading…
Reference in New Issue