Skip to content

Commit f9efa96

Browse files
authored
Backward compatibility for server extension on jupyterhub (#863)
1 parent c03c1aa commit f9efa96

File tree

4 files changed

+21
-1
lines changed

4 files changed

+21
-1
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"NotebookApp": {
3+
"nbserver_extensions": {
4+
"jupyterlab_git": true
5+
}
6+
}
7+
}

jupyterlab_git/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,7 @@ def _load_jupyter_server_extension(server_app):
5454
git = Git(server_app.web_app.settings["contents_manager"], config)
5555
server_app.web_app.settings["git"] = git
5656
setup_handlers(server_app.web_app)
57+
58+
59+
# For backward compatibility
60+
load_jupyter_server_extension = _load_jupyter_server_extension

setup.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,16 @@
3737
data_files_spec = [
3838
("share/jupyter/labextensions/%s" % labext_name, str(lab_path), "**"),
3939
("share/jupyter/labextensions/%s" % labext_name, str(HERE), "install.json"),
40-
("etc/jupyter/jupyter_server_config.d", "jupyter-config", "jupyterlab_git.json"),
40+
(
41+
"etc/jupyter/jupyter_server_config.d",
42+
"jupyter-config/jupyter_server_config.d",
43+
"jupyterlab_git.json",
44+
),
45+
(
46+
"etc/jupyter/jupyter_notebook_config.d",
47+
"jupyter-config/jupyter_notebook_config.d",
48+
"jupyterlab_git.json",
49+
),
4150
]
4251

4352
cmdclass = create_cmdclass(

0 commit comments

Comments
 (0)