From b6e1e47e3a92c1b94ef327149068a8a147fc73f5 Mon Sep 17 00:00:00 2001 From: Matthias Hoelzl Date: Sat, 26 Aug 2017 18:53:49 +0200 Subject: Make build scripts Python3 compatible - The Windows, UWP, Android (on Windows) and Linux builds are tested with Scons 3.0 alpha using Python 3. - OSX and iOS should hopefully work but are not tested since I don't have a Mac. - Builds using SCons 2.5 and Python 2 should not be impacted. --- editor/icons/SCsub | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'editor/icons/SCsub') diff --git a/editor/icons/SCsub b/editor/icons/SCsub index 86c51a50f3..07fe45ce11 100644 --- a/editor/icons/SCsub +++ b/editor/icons/SCsub @@ -1,18 +1,17 @@ #!/usr/bin/env python Import('env') - +from compat import StringIO def make_editor_icons_action(target, source, env): import os - import cStringIO dst = target[0].srcnode().abspath svg_icons = source - whites = cStringIO.StringIO() - darks = cStringIO.StringIO() + whites = StringIO() + darks = StringIO() for f in svg_icons: @@ -48,7 +47,7 @@ def make_editor_icons_action(target, source, env): whites.write('\n') darks.write('\n') - s = cStringIO.StringIO() + s = StringIO() s.write("/* THIS FILE IS GENERATED DO NOT EDIT */\n") s.write("#ifndef _EDITOR_ICONS_H\n") s.write("#define _EDITOR_ICONS_H\n") @@ -75,7 +74,7 @@ def make_editor_icons_action(target, source, env): s.write("#endif\n") - f = open(dst, "wb") + f = open(dst, "w") f.write(s.getvalue()) f.close() s.close() -- cgit v1.2.3