From bc66ad89c836c8da9521416ffb4013a353c51607 Mon Sep 17 00:00:00 2001 From: Alessio Sergi Date: Thu, 14 May 2015 01:20:20 +0200 Subject: [PATCH] python-ipython: re-add split-pkg.patch, it's still needed --- .../python-ipython/patches/split-pkg.patch | 32 +++++++++++++++++++ srcpkgs/python-ipython/template | 2 +- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/python-ipython/patches/split-pkg.patch diff --git a/srcpkgs/python-ipython/patches/split-pkg.patch b/srcpkgs/python-ipython/patches/split-pkg.patch new file mode 100644 index 00000000000..9e5746f4f1d --- /dev/null +++ b/srcpkgs/python-ipython/patches/split-pkg.patch @@ -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 +--- IPython/core/profiledir.py ++++ 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() diff --git a/srcpkgs/python-ipython/template b/srcpkgs/python-ipython/template index fe25fce8bd0..24ef9296a47 100644 --- a/srcpkgs/python-ipython/template +++ b/srcpkgs/python-ipython/template @@ -1,7 +1,7 @@ # Template file for 'python-ipython' pkgname=python-ipython version=3.1.0 -revision=2 +revision=3 noarch=yes wrksrc="ipython-${version}" build_style=python-module