[Python-modules-commits] r29076 - in packages/ipython/trunk/debian/patches (2 files)
jtaylor-guest at users.alioth.debian.org
jtaylor-guest at users.alioth.debian.org
Sun May 25 18:07:22 UTC 2014
Date: Sunday, May 25, 2014 @ 18:07:21
Author: jtaylor-guest
Revision: 29076
add patch to handle profile checking when ipython-notebook is not installed
Added:
packages/ipython/trunk/debian/patches/split-pkg.patch
Modified:
packages/ipython/trunk/debian/patches/series
Modified: packages/ipython/trunk/debian/patches/series
===================================================================
--- packages/ipython/trunk/debian/patches/series 2014-05-25 18:07:18 UTC (rev 29075)
+++ packages/ipython/trunk/debian/patches/series 2014-05-25 18:07:21 UTC (rev 29076)
@@ -5,3 +5,4 @@
no-submodule-check.patch
#test-default-tk.patch
packaged-js.patch
+split-pkg.patch
Added: packages/ipython/trunk/debian/patches/split-pkg.patch
===================================================================
--- packages/ipython/trunk/debian/patches/split-pkg.patch (rev 0)
+++ packages/ipython/trunk/debian/patches/split-pkg.patch 2014-05-25 18:07:21 UTC (rev 29076)
@@ -0,0 +1,32 @@
+Description: don't fail startup if ipython-notebook is not installed
+ e.g. ipython locate triggers this code but doesn't need the notebook css files
+--- a/IPython/core/profiledir.py
++++ b/IPython/core/profiledir.py
+@@ -173,15 +173,18 @@ class ProfileDir(LoggingConfigurable):
+ self._mkdir(self.static_dir)
+ custom = os.path.join(self.static_dir, 'custom')
+ self._mkdir(custom)
+- from IPython.html import DEFAULT_STATIC_FILES_PATH
+- for fname in ('custom.js', 'custom.css'):
+- src = os.path.join(DEFAULT_STATIC_FILES_PATH, 'custom', fname)
+- dest = os.path.join(custom, fname)
+- if not os.path.exists(src):
+- self.log.warn("Could not copy default file to static dir. Source file %s does not exist.", src)
+- continue
+- if not os.path.exists(dest):
+- shutil.copy(src, dest)
++ try:
++ from IPython.html import DEFAULT_STATIC_FILES_PATH
++ for fname in ('custom.js', 'custom.css'):
++ src = os.path.join(DEFAULT_STATIC_FILES_PATH, 'custom', fname)
++ dest = os.path.join(custom, fname)
++ if not os.path.exists(src):
++ self.log.warn("Could not copy default file to static dir. Source file %s does not exist.", src)
++ continue
++ if not os.path.exists(dest):
++ shutil.copy(src, dest)
++ except ImportError:
++ pass # ipython-notebook not installed
+
+ def check_dirs(self):
+ self.check_security_dir()
More information about the Python-modules-commits
mailing list