ayaports/backports/py3-rapidfuzz/APKBUILD
build@apk-groulx 7c2d413554 3.17 cleanup
2023-01-11 00:40:45 +00:00

55 lines
1.1 KiB
Text

# Maintainer: psykose <alice@ayaya.dev>
pkgname=py3-rapidfuzz
pkgver=2.13.7
pkgrel=0
pkgdesc="Rapid fuzzy string matching in Python using various string metrics"
url="https://github.com/maxbachmann/RapidFuzz"
arch="all"
license="MIT"
makedepends="
cmake
cython
py3-gpep517
py3-rapidfuzz-capi
py3-scikit-build
py3-setuptools
python3-dev
samurai
"
checkdepends="
py3-hypothesis
py3-numpy
pytest
"
source="https://files.pythonhosted.org/packages/source/r/rapidfuzz/rapidfuzz-$pkgver.tar.gz"
builddir="$srcdir/rapidfuzz-$pkgver"
case "$CARCH" in
x86*)
# float rounding
options="$options !check"
;;
esac
build() {
RAPIDFUZZ_BUILD_EXTENSION=1 \
gpep517 build-wheel \
--wheel-dir dist \
--output-fd 1
}
check() {
python3 -m venv --system-site-packages testenv
testenv/bin/python3 -m installer \
dist/rapidfuzz*.whl
testenv/bin/python3 -m pytest
}
package() {
python3 -m installer -d "$pkgdir" \
dist/rapidfuzz*.whl
}
sha512sums="
5d2c4620c09b44fc8bd48e236b46af6e28ef3b86f32e0697408bd77230af46d711bfc28eb7fcfc8b1403a84b51235fc39b9a1d2fedb6421918bcb700b2b88f9c rapidfuzz-2.13.7.tar.gz
"