From 26956cd7b80590e2ed3885a8a86b57c42441b8dd Mon Sep 17 00:00:00 2001 From: Josh Barnes Date: Wed, 23 Nov 2016 15:56:35 +0000 Subject: [PATCH] add jupyter_highlight_selected_word nbextension --- conda.recipe/meta.yaml | 1 + setup.py | 1 + src/jupyter_contrib_nbextensions/install.py | 8 +++++++- tests/test_application.py | 3 ++- tox.ini | 1 + 5 files changed, 12 insertions(+), 2 deletions(-) diff --git a/conda.recipe/meta.yaml b/conda.recipe/meta.yaml index 32cfb73fd..f4dfd9e80 100644 --- a/conda.recipe/meta.yaml +++ b/conda.recipe/meta.yaml @@ -24,6 +24,7 @@ requirements: - ipython_genutils - jupyter_contrib_core >=0.3 - jupyter_core + - jupyter_highlight_selected_word >=0.0.5 - jupyter_latex_envs >=1.3.4 - jupyter_nbextensions_configurator - nbconvert diff --git a/setup.py b/setup.py index 1e62fc094..8cd7b71fb 100755 --- a/setup.py +++ b/setup.py @@ -59,6 +59,7 @@ def main(): 'ipython_genutils', 'jupyter_contrib_core >=0.3', 'jupyter_core', + 'jupyter_highlight_selected_word >=0.0.5', 'jupyter_latex_envs >=1.3.4', 'jupyter_nbextensions_configurator', 'nbconvert', diff --git a/src/jupyter_contrib_nbextensions/install.py b/src/jupyter_contrib_nbextensions/install.py index 812aec3df..20a6d103b 100644 --- a/src/jupyter_contrib_nbextensions/install.py +++ b/src/jupyter_contrib_nbextensions/install.py @@ -8,6 +8,7 @@ import errno import os +import jupyter_highlight_selected_word import latex_envs import psutil from jupyter_contrib_core.notebook_compat import nbextensions @@ -83,7 +84,12 @@ def toggle_install_files(install, user=False, sys_prefix=False, logger=None, 'Installing' if install else 'Uninstalling', 'to' if install else 'from', 'jupyter data directory')) - for mod in [jupyter_contrib_nbextensions, latex_envs]: + component_nbext_packages = [ + jupyter_contrib_nbextensions, + jupyter_highlight_selected_word, + latex_envs, + ] + for mod in component_nbext_packages: if install: nbextensions.install_nbextension_python( mod.__name__, overwrite=overwrite, symlink=symlink, **kwargs) diff --git a/tests/test_application.py b/tests/test_application.py index c86d34a78..155e11a93 100644 --- a/tests/test_application.py +++ b/tests/test_application.py @@ -88,10 +88,11 @@ def _check_install(self, dirs): 'Expected no files created in {} but found:\n\t{}'.format( tree_dir, '\n\t'.join(in_this_tree))) installed_files.extend(in_this_tree) - # check latex_envs got installed + # check that dependency-provided nbexts got installed if 'data' in dirs: expected_require_paths = [ p.replace('/', os.path.sep) + '.js' for p in [ + 'highlight_selected_word/main', 'latex_envs/latex_envs', ]] for req_part in expected_require_paths: diff --git a/tox.ini b/tox.ini index 44bd449a7..015d16753 100644 --- a/tox.ini +++ b/tox.ini @@ -25,6 +25,7 @@ passenv = * usedevelop = false deps = coverage>=4.2 + jupyter_highlight_selected_word>=0.0.5 jupyter_latex_envs>=1.3.4 mock nose