aports/testing/py3-editdistance-s/APKBUILD

37 lines
1.1 KiB
Text

# Contributor: Galen Abell <galen@galenabell.com>
# Maintainer: Galen Abell <galen@galenabell.com>
pkgname=py3-editdistance-s
_pyname=editdistance-s
pkgver=1.0.0
pkgrel=6
pkgdesc="Fast implementation of the edit distance"
url="https://github.com/asottile-archive/editdistance-s"
arch="all"
license="MIT"
depends="python3 py3-cffi"
makedepends="py3-setuptools python3-dev py3-gpep517"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="$_pyname-$pkgver.tar.gz::https://github.com/asottile-archive/editdistance-s/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/$_pyname-$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
}
package() {
gpep517 install-wheel --destdir "$pkgdir" \
.dist/*.whl
}
sha512sums="
148234a38f54f70a2d6bc64f6a166a8954c79fb89d5f5c0bf3f041fe60056332901484a0626e218a72ae992f476305cbb662dfa0acdda794727fc682c569d718 editdistance-s-1.0.0.tar.gz
"