|
21 | 21 | from urllib import urlretrieve |
22 | 22 |
|
23 | 23 | from jupyter_core.paths import ( |
24 | | - jupyter_data_dir, jupyter_config_dir, jupyter_config_path, |
25 | | - SYSTEM_JUPYTER_PATH, ENV_JUPYTER_PATH, ENV_CONFIG_PATH, SYSTEM_CONFIG_PATH |
| 24 | + jupyter_data_dir, jupyter_config_path, jupyter_path, |
| 25 | + SYSTEM_JUPYTER_PATH, ENV_JUPYTER_PATH, |
26 | 26 | ) |
27 | 27 | from ipython_genutils.path import ensure_dir_exists |
28 | 28 | from ipython_genutils.py3compat import string_types, cast_unicode_py2 |
@@ -484,7 +484,7 @@ def validate_nbextension(require, logger=None): |
484 | 484 | infos = [] |
485 | 485 |
|
486 | 486 | js_exists = False |
487 | | - for exts in _nbextension_dirs(): |
| 487 | + for exts in jupyter_path('nbextensions'): |
488 | 488 | # Does the Javascript entrypoint actually exist on disk? |
489 | 489 | js = u"{}.js".format(os.path.join(exts, *require.split("/"))) |
490 | 490 | js_exists = os.path.exists(js) |
@@ -1014,18 +1014,6 @@ def _get_nbextension_dir(user=False, sys_prefix=False, prefix=None, nbextensions |
1014 | 1014 | return nbext |
1015 | 1015 |
|
1016 | 1016 |
|
1017 | | -def _nbextension_dirs(): |
1018 | | - """The possible locations of nbextensions. |
1019 | | -
|
1020 | | - Returns a list of known base extension locations |
1021 | | - """ |
1022 | | - return [ |
1023 | | - pjoin(jupyter_data_dir(), u'nbextensions'), |
1024 | | - pjoin(ENV_JUPYTER_PATH[0], u'nbextensions'), |
1025 | | - pjoin(SYSTEM_JUPYTER_PATH[0], 'nbextensions') |
1026 | | - ] |
1027 | | - |
1028 | | - |
1029 | 1017 | def _get_nbextension_metadata(module): |
1030 | 1018 | """Get the list of nbextension paths associated with a Python module. |
1031 | 1019 |
|
|
0 commit comments