ayaports/backports/py3-rtree/APKBUILD

39 lines
1.2 KiB
Text

# Contributor: Alex Yam <alex@alexyam.com>
# Maintainer: Alex Yam <alex@alexyam.com>
pkgname=py3-rtree
_pkgname=rtree
pkgver=1.1.0
pkgrel=2
pkgdesc="Python3 library for r-tree spatial index (wrapper for libspatialindex)"
url="https://pypi.org/project/Rtree/"
# s390x: Test failed: IndexSerialization::test_interleaving - AssertionError
# s390x: Test failed: IndexStream::test_stream_input - AssertionError
arch="noarch !s390x"
license="MIT"
depends="python3 libspatialindex-dev"
makedepends="py3-setuptools py3-wheel py3-gpep517"
checkdepends="py3-pytest py3-numpy"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/Toblerity/rtree/archive/$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver
build() {
gpep517 build-wheel \
--wheel-dir .dist \
--output-fd 3 3>&1 >&2
}
check() {
python3 -m venv --clear --without-pip --system-site-packages .testenv
gpep517 install-wheel --destdir .testenv --prefix '' .dist/*.whl
.testenv/bin/python3 -m pytest -v --doctest-modules rtree tests
}
package() {
gpep517 install-wheel --destdir "$pkgdir" \
.dist/*.whl
}
sha512sums="
97a87027e49520f12cb86444ee8a9795fabeec6d8f0e3e869f2714df8f7c649ced1374385852af0ce7d7eb91e5a2cb464a4330807be15d538dc0a4d8de7b7ca2 py3-rtree-1.1.0.tar.gz
"