From f447d8f064c61cfdfcc09aa8c5949bf7822d271d Mon Sep 17 00:00:00 2001 From: David Liu Date: Sun, 8 Jan 2023 22:05:13 -0500 Subject: [PATCH] Enable automatic installation of extension and fix path config --- .../nbconfig/notebook.d/markus_jupyter_extension.json | 5 +++++ markus-jupyter-extension/__init__.py | 4 ++-- setup.cfg | 10 +++++++++- 3 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 jupyter-config/nbconfig/notebook.d/markus_jupyter_extension.json diff --git a/jupyter-config/nbconfig/notebook.d/markus_jupyter_extension.json b/jupyter-config/nbconfig/notebook.d/markus_jupyter_extension.json new file mode 100644 index 0000000..255464a --- /dev/null +++ b/jupyter-config/nbconfig/notebook.d/markus_jupyter_extension.json @@ -0,0 +1,5 @@ +{ + "load_extensions": { + "markus-jupyter-extension/extension": true + } +} diff --git a/markus-jupyter-extension/__init__.py b/markus-jupyter-extension/__init__.py index 97420b2..d58671c 100644 --- a/markus-jupyter-extension/__init__.py +++ b/markus-jupyter-extension/__init__.py @@ -4,6 +4,6 @@ def _jupyter_nbextension_paths(): return [{ 'section': 'notebook', 'src': 'static', - 'dest': 'markus-jupyter', - 'require': 'markus-jupyter/extension' + 'dest': 'markus-jupyter-extension', + 'require': 'markus-jupyter-extension/extension' }] diff --git a/setup.cfg b/setup.cfg index 4479b55..ad9587e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = markus-jupyter-extension -version = 0.1.1 +version = 0.1.2 description = Jupyter extension for integration with MarkUs long_description = file: README.md long_description_content_type = text/markdown @@ -17,6 +17,14 @@ python_requires = ~=3.8 zip_safe = False include_package_data = True +[options.data_files] +share/jupyter/nbextensions/markus-jupyter-extension = + markus-jupyter-extension/static/extension.js +share/jupyter/nbextensions/markus-jupyter-extension/assets = + markus-jupyter-extension/static/assets/markus.ico +etc/jupyter/nbconfig/notebook.d = + jupyter-config/nbconfig/notebook.d/markus_jupyter_extension.json + [options.extras_require] dev = pre-commit