upgpkg: ufw 0.36.2-1
[ArchLinux/community.git] / python-rapidfuzz / trunk / PKGBUILD
blobfb77cc1f98c363af36026e06b4d4d0293484a024
1 # Maintainer:
2 # Contributor: Pekka Ristola <pekkarr [at] protonmail [dot] com>
3 # Contributor: Caltlgin Stsodaat <contact@fossdaily.xyz>
5 _pkgname=rapidfuzz
6 pkgname=python-$_pkgname
7 pkgver=3.0.0
8 pkgrel=2
9 pkgdesc='Rapid fuzzy string matching in Python using various string metrics'
10 arch=(x86_64)
11 url='https://github.com/maxbachmann/rapidfuzz'
12 license=(MIT)
13 depends=(python)
14 makedepends=(python-build python-installer python-scikit-build rapidfuzz-cpp)
15 checkdepends=(python-hypothesis python-pandas python-pytest)
16 optdepends=(python-numpy)
17 source=(https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz)
18 sha256sums=('4c1d895d16f62e9ac88d303eb918d90a390bd712055c849e01c558b7ae0fa908')
20 build() {
21   cd $_pkgname-$pkgver
22   RAPIDFUZZ_BUILD_EXTENSION=1 \
23   python -m build --wheel --no-isolation
26 check() {
27   cd $_pkgname-$pkgver
28   python -m venv --system-site-packages test-env
29   test-env/bin/python -m installer dist/*.whl
30   test-env/bin/python -m pytest
33 package() {
34   cd $_pkgname-$pkgver
35   python -m installer --destdir="$pkgdir" dist/*.whl
37   install -Dm644 README.md -t "$pkgdir"/usr/share/doc/$pkgname
38   install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname