ayaports/backports/py3-levenshtein/APKBUILD

46 lines
1.1 KiB
Text
Raw Normal View History

2023-01-11 00:40:45 +00:00
# Contributor: Galen Abell <galen@galenabell.com>
# Maintainer: Galen Abell <galen@galenabell.com>
pkgname=py3-levenshtein
pkgver=0.21.0
pkgrel=0
2023-01-11 00:40:45 +00:00
pkgdesc="Python extension for computing string edit distances and similarities"
url="https://github.com/maxbachmann/Levenshtein"
2023-01-11 00:40:45 +00:00
arch="all"
license="GPL-2.0-only"
depends="python3 py3-rapidfuzz"
makedepends="
cmake
cython
py3-gpep517
py3-scikit-build
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"
2023-01-11 00:40:45 +00:00
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
2023-01-11 00:40:45 +00:00
}
package() {
python3 -m installer -d "$pkgdir" \
dist/Levenshtein*.whl
2023-01-11 00:40:45 +00:00
}
sha512sums="
2023-05-05 22:46:10 +00:00
bb1cf70497e89db5b427eb4ac79708d205fc9edfc9588d30c63ef6e3e77b9369c8892edc31c32cb135d54947e8eedb770d06a7d5c6f8743d44378d7d1a12d459 py3-levenshtein-0.21.0.tar.gz
"