2023-01-11 00:40:45 +00:00
|
|
|
# Contributor: Galen Abell <galen@galenabell.com>
|
|
|
|
# Maintainer: Galen Abell <galen@galenabell.com>
|
|
|
|
pkgname=py3-levenshtein
|
2023-11-24 18:26:42 +00:00
|
|
|
pkgver=0.23.0
|
2023-05-05 05:19:47 +00:00
|
|
|
pkgrel=0
|
2023-01-11 00:40:45 +00:00
|
|
|
pkgdesc="Python extension for computing string edit distances and similarities"
|
2023-05-05 05:19:47 +00:00
|
|
|
url="https://github.com/maxbachmann/Levenshtein"
|
2023-11-24 18:26:42 +00:00
|
|
|
arch="all"
|
2023-01-11 00:40:45 +00:00
|
|
|
license="GPL-2.0-only"
|
2023-11-24 18:26:42 +00:00
|
|
|
depends="py3-rapidfuzz"
|
2023-05-05 05:19:47 +00:00
|
|
|
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() {
|
2023-05-05 05:19:47 +00:00
|
|
|
gpep517 build-wheel \
|
2023-11-24 18:26:42 +00:00
|
|
|
--wheel-dir .dist \
|
2023-05-05 05:19:47 +00:00
|
|
|
--output-fd 3 3>&1 >&2
|
|
|
|
}
|
|
|
|
|
|
|
|
check() {
|
2023-11-24 18:26:42 +00:00
|
|
|
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() {
|
2023-05-05 05:19:47 +00:00
|
|
|
python3 -m installer -d "$pkgdir" \
|
2023-11-24 18:26:42 +00:00
|
|
|
.dist/Levenshtein*.whl
|
2023-01-11 00:40:45 +00:00
|
|
|
}
|
|
|
|
|
2023-05-05 05:19:47 +00:00
|
|
|
sha512sums="
|
2023-11-24 18:26:42 +00:00
|
|
|
137116f337f576534bf2c12dc49d35f81a3b267eb613e5e6cca6cb80e5701dd0adbfd97c1cec4ea8f1bb4dee2bc67deeb19553474348ea78af4e05b79ce01fdf py3-levenshtein-0.23.0.tar.gz
|
2023-05-05 05:19:47 +00:00
|
|
|
"
|