ayaports/backports/py3-levenshtein/APKBUILD

46 lines
1.1 KiB
Text

# Contributor: Galen Abell <galen@galenabell.com>
# Maintainer: Galen Abell <galen@galenabell.com>
pkgname=py3-levenshtein
pkgver=0.26.1
pkgrel=0
pkgdesc="Python extension for computing string edit distances and similarities"
url="https://github.com/maxbachmann/Levenshtein"
arch="all"
license="GPL-2.0-only"
depends="py3-rapidfuzz"
makedepends="
cmake
cython
py3-gpep517
py3-scikit-build
py3-scikit-build-core
python3-dev
rapidfuzz
samurai
"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/maxbachmann/Levenshtein/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/Levenshtein-$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
.testenv/bin/python3 -m installer \
.dist/levenshtein*.whl
.testenv/bin/python3 -m pytest
}
package() {
python3 -m installer -d "$pkgdir" \
.dist/levenshtein*.whl
}
sha512sums="
589b1f404108f488caf880063f20ee9c6a2033b0a2cd819352bf15e285ea8537c1dc8117de70679f720fd3da47546f7e0e5c620e4da8cf09bf8df9b119e6abc9 py3-levenshtein-0.26.1.tar.gz
"