Mercurial > libervia-web
changeset 1279:2d1ceb026d0e
tasks (brython): copy and load `brython_stdlib.js`
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 19 Jun 2020 16:47:50 +0200 |
parents | 4385a75e3962 |
children | 198605982d15 |
files | libervia/server/tasks/implicit/task_brython.py |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libervia/server/tasks/implicit/task_brython.py Fri Jun 19 16:47:50 2020 +0200 +++ b/libervia/server/tasks/implicit/task_brython.py Fri Jun 19 16:47:50 2020 +0200 @@ -53,6 +53,7 @@ # shutil has blocking method, but the task is run before we start # the web server, so it's not a big deal shutil.copyfile(data_path / "brython.js", brython_js) + shutil.copy(data_path / "brython_stdlib.js", self.build_path) else: log.debug("Brython is already installed") @@ -63,6 +64,7 @@ import_url = f"/{C.BUILD_DIR}/{C.BUILD_DIR_DYN}/{url_hash}" dyn_data.setdefault('scripts', set()).update({ Script(src=f"/{C.BUILD_DIR}/brython.js"), + Script(src=f"/{C.BUILD_DIR}/brython_stdlib.js"), }) dyn_data.setdefault('template', {})['body_onload'] = self.getBodyOnload( extra_path=[import_url])