Date: Sunday, March 21, 2021 @ 20:50:34 Author: felixonmars Revision: 898495
addpkg: python-editdistance-s 1.0.0-1 Added: python-editdistance-s/ python-editdistance-s/repos/ python-editdistance-s/trunk/ python-editdistance-s/trunk/PKGBUILD ----------+ PKGBUILD | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) Added: python-editdistance-s/trunk/PKGBUILD =================================================================== --- python-editdistance-s/trunk/PKGBUILD (rev 0) +++ python-editdistance-s/trunk/PKGBUILD 2021-03-21 20:50:34 UTC (rev 898495) @@ -0,0 +1,31 @@ +# Maintainer: Felix Yan <[email protected]> + +pkgname=python-editdistance-s +pkgver=1.0.0 +pkgrel=1 +pkgdesc="Fast implementation of the edit distance (Levenshtein distance)" +url="https://github.com/asottile/editdistance-s" +license=('MIT') +arch=('x86_64') +depends=('python-cffi') +makedepends=('python-setuptools') +checkdepends=('python-pytest') +source=("https://github.com/asottile/editdistance-s/archive/v$pkgver/$pkgname-$pkgver.tar.gz") +sha512sums=('148234a38f54f70a2d6bc64f6a166a8954c79fb89d5f5c0bf3f041fe60056332901484a0626e218a72ae992f476305cbb662dfa0acdda794727fc682c569d718') + +build() { + cd editdistance-s-$pkgver + python setup.py build +} + +check() { + cd editdistance-s-$pkgver + PYTHONPATH="$PWD/build/lib.linux-x86_64-3.9" pytest +} + +package() { + cd editdistance-s-$pkgver + python setup.py install --root="$pkgdir" --optimize=1 + + install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/ +}
