diff --git a/IPython/utils/submodule.py b/IPython/utils/submodule.py index 865477d..4ca093a 100644 --- a/IPython/utils/submodule.py +++ b/IPython/utils/submodule.py @@ -32,14 +32,21 @@ def ipython_parent(): def ipython_submodules(root): """return IPython submodules relative to root""" + from IPython.frontend.html.notebook import DEFAULT_STATIC_FILES_PATH return [ - pjoin(root, 'IPython', 'frontend', 'html', 'notebook', 'static', 'components'), + pjoin(DEFAULT_STATIC_FILES_PATH, 'components') ] def is_repo(d): """is d a git repo?""" return os.path.exists(pjoin(d, '.git')) +def is_package(): + """Is a package manager responsible for the static files path?""" + from IPython.utils.path import get_ipython_package_dir + from IPython.frontend.html.notebook import DEFAULT_STATIC_FILES_PATH + return not DEFAULT_STATIC_FILES_PATH.startswith(get_ipython_package_dir()) + def check_submodule_status(root=None): """check submodule status @@ -51,8 +58,12 @@ def check_submodule_status(root=None): """ if hasattr(sys, "frozen"): - # frozen via py2exe or similar, don't bother - return 'clean' + # frozen via py2exe or similar, don't bother + return 'clean' + + if is_package(): + # package manager is responsible for static files, don't bother + return 'clean' if not root: root = ipython_parent()