backports/py3-rtree: build using gpep517

This commit is contained in:
Antoine Martin 2024-11-01 10:13:02 -04:00 committed by Antoine Martin
parent 1a345ce163
commit ea2def9dd2

View file

@ -3,7 +3,7 @@
pkgname=py3-rtree
_pkgname=rtree
pkgver=1.1.0
pkgrel=1
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
@ -11,22 +11,27 @@ url="https://pypi.org/project/Rtree/"
arch="noarch !s390x"
license="MIT"
depends="python3 libspatialindex-dev"
makedepends="py3-setuptools py3-wheel"
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() {
python3 setup.py build
gpep517 build-wheel \
--wheel-dir .dist \
--output-fd 3 3>&1 >&2
}
check() {
python3 -m pytest -v --doctest-modules rtree tests
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() {
python3 setup.py install --skip-build --root="$pkgdir"
gpep517 install-wheel --destdir "$pkgdir" \
.dist/*.whl
}
sha512sums="