aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Titov <oleg.titov@gmail.com>2023-11-19 21:17:00 -0600
committeromni <omni+alpine@hack.org>2023-11-20 20:08:31 +0000
commitf006ec5d9ec3a9965aa7d69bdf3194adbf50901b (patch)
tree8c2fe21782f563f15d9d793ebc48da8c3738652a
parent02f5b46e3515a26cc4a528cc52cddd60b1845e9e (diff)
testing/py3-murmurhash: switch to gpep517
-rw-r--r--testing/py3-murmurhash/APKBUILD28
1 files changed, 21 insertions, 7 deletions
diff --git a/testing/py3-murmurhash/APKBUILD b/testing/py3-murmurhash/APKBUILD
index ad0b6aae4e7..c17131fd92d 100644
--- a/testing/py3-murmurhash/APKBUILD
+++ b/testing/py3-murmurhash/APKBUILD
@@ -2,13 +2,18 @@
# Maintainer: Oleg Titov <oleg.titov@gmail.com>
pkgname=py3-murmurhash
pkgver=1.0.10
-pkgrel=0
+pkgrel=1
pkgdesc="Cython bindings for MurmurHash2"
url="https://github.com/explosion/murmurhash"
arch="all"
license="MIT"
-depends="python3"
-makedepends="python3-dev py3-setuptools cython"
+makedepends="
+ cython
+ py3-gpep517
+ py3-setuptools
+ py3-wheel
+ python3-dev
+ "
checkdepends="py3-pytest py3-mmh3"
subpackages="$pkgname-doc $pkgname-pyc"
source="murmurhash-$pkgver.tar.gz::https://github.com/explosion/murmurhash/archive/v$pkgver.tar.gz"
@@ -21,16 +26,25 @@ s390x) options="!check" ;;
esac
build() {
- python3 setup.py build
+ gpep517 build-wheel \
+ --wheel-dir .dist \
+ --output-fd 3 3>&1 >&2
}
check() {
- cd build/lib.*
- pytest
+ python3 -m venv --clear --without-pip --system-site-packages .testenv
+ .testenv/bin/python3 -m installer .dist/*.whl
+
+ # otherwise pytest picks up the local one,
+ # which doesn't have the native shared library and fails
+ mv murmurhash murmurhash-off
+
+ .testenv/bin/python3 -m pytest
}
package() {
- python3 setup.py install --skip-build --root="$pkgdir"
+ python3 -m installer -d "$pkgdir" \
+ .dist/*.whl
rm -r "$pkgdir"/usr/lib/python3*/site-packages/murmurhash/tests/