@@ -363,6 +363,9 @@ def _load_jupyter_server_extension(server_app):
363
363
f " Registered jlab_ext_example extension at URL path /{url_path}"
364
364
)
365
365
366
+ # For backward compatibility with the classical notebook
367
+ load_jupyter_server_extension = _load_jupyter_server_extension
368
+
366
369
` ` `
367
370
368
371
The ` _jupyter_server_extension_points ` provides the Python package name
@@ -523,7 +526,8 @@ labext_name = "@jupyterlab-examples/server-extension"
523
526
data_files_spec = [
524
527
(" share/jupyter/labextensions/%s" % labext_name , str (lab_path ), " **" ),
525
528
(" share/jupyter/labextensions/%s" % labext_name , str (HERE ), " install.json" ),
526
- (" etc/jupyter/jupyter_server_config.d" , " jupyter-config" , " jlab_ext_example.json" ),
529
+ (" etc/jupyter/jupyter_notebook_config.d" , " jupyter-config/jupyter_notebook_config.d" , " jlab_ext_example.json" ),
530
+ (" etc/jupyter/jupyter_server_config.d" , " jupyter-config/jupyter_server_config.d" , " jlab_ext_example.json" ),
527
531
]
528
532
529
533
cmdclass = create_cmdclass (
@@ -589,7 +593,7 @@ the frontend NPM package needs to be built and inserted in the Python package. T
589
593
done using a special ` cmdclass ` :
590
594
591
595
` ` ` py
592
- # setup .py #L38 - L45
596
+ # setup .py #L39 - L46
593
597
594
598
cmdclass = create_cmdclass (
595
599
" jsdeps" , package_data_spec = package_data_spec , data_files_spec = data_files_spec
@@ -604,7 +608,7 @@ js_command = combine_commands(
604
608
Basically it will build the frontend NPM package:
605
609
606
610
` ` ` py
607
- # setup .py #L43 - L43
611
+ # setup .py #L44 - L44
608
612
609
613
install_npm (HERE , build_cmd = " build:prod" , npm = [" jlpm" ]),
610
614
` ` `
@@ -647,10 +651,19 @@ done by copying the following JSON file:
647
651
648
652
in the appropriate jupyter folder ( ` etc / jupyter / jupyter_server_config .d ` ):
649
653
654
+ ` ` ` py
655
+ # setup .py #L36 - L36
656
+
657
+ (" etc/jupyter/jupyter_server_config.d" , " jupyter-config/jupyter_server_config.d" , " jlab_ext_example.json" ),
658
+ ` ` `
659
+
660
+ For backward compatibility with the classical notebook, the old version of that file is copied in
661
+ ( ` etc / jupyter / jupyter_notebook_config .d ` ):
662
+
650
663
` ` ` py
651
664
# setup .py #L35 - L35
652
665
653
- (" etc/jupyter/jupyter_server_config .d" , " jupyter-config" , " jlab_ext_example.json" ),
666
+ (" etc/jupyter/jupyter_notebook_config .d" , " jupyter-config/jupyter_notebook_config.d " , " jlab_ext_example.json" ),
654
667
` ` `
655
668
656
669
### JupyterLab Extension Manager
0 commit comments