[arch-commits] Commit in ipython/trunk (PKGBUILD pygments-monkeypatch.diff)

Kyle Keen kkeen at archlinux.org
Mon Nov 10 10:20:35 UTC 2014


    Date: Monday, November 10, 2014 @ 11:20:34
  Author: kkeen
Revision: 122291

upgpkg: ipython 2.3.0-2 fix for pygments 2.0

Added:
  ipython/trunk/pygments-monkeypatch.diff
Modified:
  ipython/trunk/PKGBUILD

---------------------------+
 PKGBUILD                  |   13 ++++++++++---
 pygments-monkeypatch.diff |   22 ++++++++++++++++++++++
 2 files changed, 32 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2014-11-10 10:13:30 UTC (rev 122290)
+++ PKGBUILD	2014-11-10 10:20:34 UTC (rev 122291)
@@ -8,7 +8,7 @@
 pkgbase=ipython 
 pkgname=(ipython ipython2)
 pkgver=2.3.0
-pkgrel=1
+pkgrel=2
 pkgdesc="An enhanced Interactive Python shell."
 arch=('any')
 url="http://ipython.org"
@@ -26,11 +26,18 @@
             "python-jinja: for ipython notebook"
             "haskell-pandoc: ipython notebook conversion")
 #source=("http://archive.ipython.org/release/$pkgver/ipython-$pkgver.tar.gz")
-source=("https://pypi.python.org/packages/source/i/ipython/$pkgbase-$pkgver.tar.gz")
-md5sums=('222eecd3a8299c0119c56954c79e4d0f')
+source=("https://pypi.python.org/packages/source/i/ipython/$pkgbase-$pkgver.tar.gz"
+        "pygments-monkeypatch.diff")
+md5sums=('222eecd3a8299c0119c56954c79e4d0f'
+         'a8e3ed58e2b3f4198534cbecd03a7ade')
 
 build() {
   cd "$srcdir"
+  pushd ipython-$pkgver
+  # this is already in trunk and should only apply to 2.3.0
+  # https://github.com/ipython/ipython/issues/6877
+  patch -p1 -i ../pygments-monkeypatch.diff
+  popd
   cp -r ipython-$pkgver ipython2-$pkgver
 }
 

Added: pygments-monkeypatch.diff
===================================================================
--- pygments-monkeypatch.diff	                        (rev 0)
+++ pygments-monkeypatch.diff	2014-11-10 10:20:34 UTC (rev 122291)
@@ -0,0 +1,22 @@
+diff --git a/IPython/qt/console/pygments_highlighter.py b/IPython/qt/console/pygments_highlighter.py
+index 4044be7..402938f 100644
+--- a/IPython/qt/console/pygments_highlighter.py
++++ b/IPython/qt/console/pygments_highlighter.py
+@@ -24,11 +24,12 @@ def get_tokens_unprocessed(self, text, stack=('root',)):
+         for rexmatch, action, new_state in statetokens:
+             m = rexmatch(text, pos)
+             if m:
+-                if type(action) is _TokenType:
+-                    yield pos, action, m.group()
+-                else:
+-                    for item in action(self, m):
+-                        yield item
++                if action is not None:
++                    if type(action) is _TokenType:
++                        yield pos, action, m.group()
++                    else:
++                        for item in action(self, m):
++                            yield item
+                 pos = m.end()
+                 if new_state is not None:
+                     # state transition



More information about the arch-commits mailing list