From 6afc1011c4e426126c6a7be8ce8687dcdf5e2cc0 Mon Sep 17 00:00:00 2001 From: Matthias Bussonnier Date: Sun, 10 May 2015 16:57:19 -0700 Subject: [PATCH 1/2] data_dir is not .ipython/kernel anymore. On OSX, items ~/Library/Jupyter/ which screw up where things find kernels and anyway is already at the beginning of the search paths lists. --- jupyter_notebook/notebookapp.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/jupyter_notebook/notebookapp.py b/jupyter_notebook/notebookapp.py index 8c034ca7b..db218a4c1 100644 --- a/jupyter_notebook/notebookapp.py +++ b/jupyter_notebook/notebookapp.py @@ -788,10 +788,6 @@ class NotebookApp(JupyterApp): self.kernel_spec_manager = self.kernel_spec_manager_class( parent=self, ) - # FIXME: temporarily add .ipython/kernels to the kernel search path - self.kernel_spec_manager.kernel_dirs.append( - os.path.join(self.data_dir, 'kernels'), - ) self.kernel_manager = self.kernel_manager_class( parent=self, log=self.log, From e20131a05b884452a9d7ab2a04f39656cf72159d Mon Sep 17 00:00:00 2001 From: Matthias Bussonnier Date: Sun, 10 May 2015 19:19:32 -0700 Subject: [PATCH 2/2] set data_dir in tests --- jupyter_notebook/tests/launchnotebook.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jupyter_notebook/tests/launchnotebook.py b/jupyter_notebook/tests/launchnotebook.py index 3b51cd73a..4c76b0348 100644 --- a/jupyter_notebook/tests/launchnotebook.py +++ b/jupyter_notebook/tests/launchnotebook.py @@ -67,13 +67,15 @@ class NotebookTestBase(TestCase): @classmethod def setup_class(cls): cls.home_dir = TemporaryDirectory() + data_dir = TemporaryDirectory() cls.env_patch = patch.dict('os.environ', { 'HOME': cls.home_dir.name, 'IPYTHONDIR': pjoin(cls.home_dir.name, '.ipython'), + 'JUPYTER_DATA_DIR' : data_dir.name }) cls.env_patch.start() cls.config_dir = TemporaryDirectory() - cls.data_dir = TemporaryDirectory() + cls.data_dir = data_dir cls.runtime_dir = TemporaryDirectory() cls.notebook_dir = TemporaryDirectory() app = cls.notebook = NotebookApp(