Fix gdns generation with python3.

Python2 has reached end-of-life.
This commit is contained in:
Fabio Alessandrelli
2021-04-29 22:38:36 +02:00
parent 5f9e74f2fb
commit f26a1d8e83

View File

@@ -12,7 +12,7 @@ def add_sources(sources, dirpath, extension):
def gen_gdnative_lib(target, source, env):
for t in target:
with open(t.srcnode().path, 'w') as w:
w.write(source[0].get_contents().replace('{GDNATIVE_PATH}', os.path.splitext(t.name)[0]).replace('{TARGET}', env['target']))
w.write(source[0].get_contents().decode('utf8').replace('{GDNATIVE_PATH}', os.path.splitext(t.name)[0]).replace('{TARGET}', env['target']))
env = Environment()