aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py3-blist
diff options
context:
space:
mode:
authorprspkt <prspkt@protonmail.com>2019-07-05 00:53:52 +0300
committerprspkt <prspkt@protonmail.com>2019-07-05 00:58:08 +0300
commit0800fb000034d482f96be5dd3b854d3eccb9e86e (patch)
treed0d46ab8d41a48b076d1d26b7fdbd5da67882a5d /testing/py3-blist
parent34ae5cedaba4bbf3aedf44cbe6cb883a3b3763da (diff)
downloadaports-0800fb000034d482f96be5dd3b854d3eccb9e86e.tar.bz2
aports-0800fb000034d482f96be5dd3b854d3eccb9e86e.tar.xz
testing/py3-blist: modernize
* Add patch to fix compatibility with python 3.7.
Diffstat (limited to 'testing/py3-blist')
-rw-r--r--testing/py3-blist/APKBUILD21
-rw-r--r--testing/py3-blist/fix-python3.7.patch12
2 files changed, 22 insertions, 11 deletions
diff --git a/testing/py3-blist/APKBUILD b/testing/py3-blist/APKBUILD
index 60b89ad9cf..e2d468046f 100644
--- a/testing/py3-blist/APKBUILD
+++ b/testing/py3-blist/APKBUILD
@@ -1,34 +1,33 @@
# Contributor: Sebastian Hugentobler <sebastian@vanwa.ch>
# Maintainer: Sebastian Hugentobler <sebastian@vanwa.ch>
pkgname=py3-blist
-_pkgname=${pkgname/py3-/}
+_pkgname=blist
pkgver=1.3.6
-pkgrel=1
+pkgrel=2
pkgdesc="A list-like type with better asymptotic performance and similar performance on small lists"
url="https://github.com/DanielStutzbach/blist"
arch="all"
license="BSD-3-Clause"
depends="python3"
makedepends="python3-dev py3-setuptools"
-source="$pkgname-$pkgver.tar.gz::https://github.com/DanielStutzbach/$_pkgname/archive/v$pkgver.tar.gz"
+source="$pkgname-$pkgver.tar.gz::https://github.com/DanielStutzbach/blist/archive/v$pkgver.tar.gz
+ fix-python3.7.patch"
builddir="$srcdir"/$_pkgname-$pkgver
replaces=py-blist # Backwards compatibility
provides=py-blist=$pkgver-r$pkgrel # Backwards compatibility
-check() {
- cd "$builddir"
- python3 setup.py check
-}
-
build() {
- cd "$builddir"
python3 setup.py build
}
+check() {
+ python3 setup.py check
+}
+
package() {
- cd "$builddir"
python3 setup.py install --prefix=/usr --root="$pkgdir"
}
-sha512sums="f46ded57aeb2a33fc5450420210d015aa37c2fc91034a771dfb1a184ef2655d8e5dc97bee61139059e6211569fcb7358f972071d3830733e9dbb8908e1b0e14c py3-blist-1.3.6.tar.gz"
+sha512sums="f46ded57aeb2a33fc5450420210d015aa37c2fc91034a771dfb1a184ef2655d8e5dc97bee61139059e6211569fcb7358f972071d3830733e9dbb8908e1b0e14c py3-blist-1.3.6.tar.gz
+b885080992a565d3c08c07dd0311ab7656fc2aba5711fc86491d702f71b732aef23c18151b048f7bfc59d3c7bc72ca872367cb1aeaee3f44702f79c96d306fc8 fix-python3.7.patch"
diff --git a/testing/py3-blist/fix-python3.7.patch b/testing/py3-blist/fix-python3.7.patch
new file mode 100644
index 0000000000..79fdc15883
--- /dev/null
+++ b/testing/py3-blist/fix-python3.7.patch
@@ -0,0 +1,12 @@
+--- a/blist/_sortedlist.py
++++ b/blist/_sortedlist.py
+@@ -419,8 +419,7 @@ def add(self, value):
+
+ def __iter__(self):
+ it = super(_setmixin, self).__iter__()
+- while True:
+- item = next(it)
++ for item in it:
+ n = len(self)
+ yield item
+ if n != len(self):