From 66e983624e11ab2f59cd4595284d29c96e866f3e Mon Sep 17 00:00:00 2001 From: Letian Wang Date: Sat, 1 Feb 2020 17:16:14 +1100 Subject: [PATCH] Update jupyterlab build methods --- tljh/installer.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/tljh/installer.py b/tljh/installer.py index e533a82..b64390d 100644 --- a/tljh/installer.py +++ b/tljh/installer.py @@ -172,11 +172,26 @@ def ensure_jupyterlab_extensions(): extensions = [ '@jupyter-widgets/jupyterlab-manager@1.1' # for jupyterlab 1.2.x ] + install_options = [ + '--no-build' # do not build extension at install time. Will build later + ] utils.run_subprocess([ os.path.join(USER_ENV_PREFIX, 'bin/jupyter'), 'labextension', 'install' - ] + extensions + ['--minimize=False']) # webpack minimization might cause flaky test build + ] + extensions + install_options) + + # Build all the lab extensions in one go using jupyter lab build command + build_options = [ + '--minimize=False', + '--dev-build=False' + ] + + utils.run_subprocess([ + os.path.join(USER_ENV_PREFIX, 'bin/jupyter'), + 'lab', + 'build' + ] + build_options) def ensure_jupyterhub_package(prefix):