[arch-commits] Commit in python-blist/trunk (PKGBUILD python3.7.patch)

Felix Yan felixonmars at archlinux.org
Mon Jul 2 19:05:32 UTC 2018


    Date: Monday, July 2, 2018 @ 19:05:31
  Author: felixonmars
Revision: 350191

fix build for python 3.7

Added:
  python-blist/trunk/python3.7.patch
Modified:
  python-blist/trunk/PKGBUILD

-----------------+
 PKGBUILD        |    7 +++++--
 python3.7.patch |   16 ++++++++++++++++
 2 files changed, 21 insertions(+), 2 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2018-07-02 19:03:51 UTC (rev 350190)
+++ PKGBUILD	2018-07-02 19:05:31 UTC (rev 350191)
@@ -12,10 +12,13 @@
 arch=('x86_64')
 license=('BSD')
 makedepends=('python-setuptools' 'python2-setuptools')
-source=(${pkgbase}-${pkgver}.tar.gz::https://github.com/DanielStutzbach/blist/archive/v${pkgver}.tar.gz)
-sha512sums=('f46ded57aeb2a33fc5450420210d015aa37c2fc91034a771dfb1a184ef2655d8e5dc97bee61139059e6211569fcb7358f972071d3830733e9dbb8908e1b0e14c')
+source=(${pkgbase}-${pkgver}.tar.gz::https://github.com/DanielStutzbach/blist/archive/v${pkgver}.tar.gz
+        python3.7.patch)
+sha512sums=('f46ded57aeb2a33fc5450420210d015aa37c2fc91034a771dfb1a184ef2655d8e5dc97bee61139059e6211569fcb7358f972071d3830733e9dbb8908e1b0e14c'
+            'ecf08ebbfd39a069e8cd93723fefe3d0ee223d618f8748032927416dd6c813396fa271b20dd74fdaed0369b19046b4d2954b70c77f72258cc5551699eaa1281f')
 
 prepare() {
+  (cd $_pkgname-$pkgver; patch -p1 -i ../python3.7.patch)
   cp -ra ${_pkgname}-${pkgver}{,-py2}
 }
 

Added: python3.7.patch
===================================================================
--- python3.7.patch	                        (rev 0)
+++ python3.7.patch	2018-07-02 19:05:31 UTC (rev 350191)
@@ -0,0 +1,16 @@
+diff --git a/blist/_sortedlist.py b/blist/_sortedlist.py
+index b34f69e..d6143c4 100644
+--- a/blist/_sortedlist.py
++++ b/blist/_sortedlist.py
+@@ -420,7 +420,10 @@ class _setmixin(object):
+     def __iter__(self):
+         it = super(_setmixin, self).__iter__()
+         while True:
+-            item = next(it)
++            try:
++                item = next(it)
++            except StopIteration:
++                return
+             n = len(self)
+             yield item
+             if n != len(self):



More information about the arch-commits mailing list