From d78c30b16379818ba523c549f0bbc2227d89beb4 Mon Sep 17 00:00:00 2001 From: j Date: Tue, 30 Sep 2014 23:21:44 +0200 Subject: [PATCH] use python3 to update static files --- oml/commands.py | 4 ++-- static/py/build.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/oml/commands.py b/oml/commands.py index 31d4464..96404da 100644 --- a/oml/commands.py +++ b/oml/commands.py @@ -110,8 +110,8 @@ def command_update_static(*args): r('git', 'clone', 'https://git.0x2620.org/oxjs.git', oxjs) elif os.path.exists(os.path.join(oxjs, '.git')): os.system('cd "%s" && git pull' % oxjs) - r('python2', os.path.join(oxjs, 'tools', 'build', 'build.py')) - r('python2', os.path.join(settings.static_path, 'py', 'build.py')) + r('python3', os.path.join(oxjs, 'tools', 'build', 'build.py')) + r('python3', os.path.join(settings.static_path, 'py', 'build.py')) def command_release(*args): """ diff --git a/static/py/build.py b/static/py/build.py index fe52b40..22f5588 100644 --- a/static/py/build.py +++ b/static/py/build.py @@ -14,7 +14,7 @@ ox.file.write_json('../json/js.json', files, indent=4) ox.file.write_file( '%soml.min.js' % path, '\n'.join([ - ox.js.minify(ox.file.read_file('%s%s' % (path, file))) + ox.js.minify(ox.file.read_file('%s%s' % (path, file)).decode('utf-8')) for file in files ]) )