# Contributor: Sebastian Hugentobler <sebastian@vanwa.ch>
# Maintainer: Sebastian Hugentobler <sebastian@vanwa.ch>
pkgname=py3-blist
_pkgname=blist
pkgver=1.3.6
pkgrel=9
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"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/DanielStutzbach/blist/archive/v$pkgver.tar.gz
	0004-compatibility-with-PEP-620.patch
	fix-python3.7.patch
	https://github.com/DanielStutzbach/blist/commit/4b88010f208080173d0976d271d4c3100bfbef17.patch
	https://github.com/DanielStutzbach/blist/commit/fddb7837e2094560789a09790360feb75f06ed86.patch
	py3.11.patch
	"
builddir="$srcdir"/$_pkgname-$pkgver

replaces=py-blist # Backwards compatibility
provides=py-blist=$pkgver-r$pkgrel # Backwards compatibility

build() {
	python3 setup.py build
}

check() {
	python3 setup.py check
}

package() {
	python3 setup.py install --skip-build --root="$pkgdir"
}

sha512sums="
f46ded57aeb2a33fc5450420210d015aa37c2fc91034a771dfb1a184ef2655d8e5dc97bee61139059e6211569fcb7358f972071d3830733e9dbb8908e1b0e14c  py3-blist-1.3.6.tar.gz
1c858d0840561cb673715035aaa42c8b98ee6965a80c257a1e221a0bca4432c77c63d1f7cbe7bb80a9b5adbdb0960f3136ec3bce74fd20d214ec965ca8cd72ec  0004-compatibility-with-PEP-620.patch
b885080992a565d3c08c07dd0311ab7656fc2aba5711fc86491d702f71b732aef23c18151b048f7bfc59d3c7bc72ca872367cb1aeaee3f44702f79c96d306fc8  fix-python3.7.patch
29eab0b07dd408c9c83bd3c00d26d24a8c3a2c1f89217c7eeda68fccf4f4844120a5411e2a0edbfe25cf641b3d24274a9b3e9b246e5574079451eea2fdaee3de  4b88010f208080173d0976d271d4c3100bfbef17.patch
6c712413663a62925ff98dae0a51a0b4e2a1cd2477c5a90d70677f1a2dccaf16424959320b3412b5a4885c40f370facf89cca02c95275810592ba8647c8f4c32  fddb7837e2094560789a09790360feb75f06ed86.patch
90390943e73052de29521042a34b40db0d58fd8c367a6e618ff9afcdc4257f7f97041f49fe5a3cee87edbb8d1da909879996e17bf34245cf5afbb1cd6094bc5a  py3.11.patch
"
