Date: Tuesday, April 11, 2023 @ 16:10:02
Author: dvzrv
Revision: 1444687
archrelease: copy trunk to community-staging-x86_64
Added:
python-jarowinkler/repos/community-staging-x86_64/
python-jarowinkler/repos/community-staging-x86_64/PKGBUILD
(from rev 1444686, python-jarowinkler/trunk/PKGBUILD)
----------+
PKGBUILD | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 56 insertions(+)
Copied: python-jarowinkler/repos/community-staging-x86_64/PKGBUILD (from rev
1444686, python-jarowinkler/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2023-04-11 16:10:02 UTC (rev 1444687)
@@ -0,0 +1,56 @@
+# Maintainer:
+# Contributor: Pekka Ristola <pekkarr [at] protonmail [dot] com>
+
+_name=jarowinkler
+pkgname=python-$_name
+pkgver=1.2.3
+pkgrel=2
+pkgdesc='A library for fast approximate string matching using Jaro and
Jaro-Winkler similarity'
+arch=(x86_64)
+url='https://github.com/maxbachmann/JaroWinkler'
+license=(MIT)
+depends=(
+ gcc-libs
+ glibc
+ python
+)
+makedepends=(
+ python-build
+ python-installer
+ python-rapidfuzz-capi
+ python-scikit-build
+ python-setuptools
+ ninja
+)
+checkdepends=(
+ python-hypothesis
+ python-pytest
+)
+source=("https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz")
+sha256sums=('af28ea284cfbd1b21b29ff94b759f20e94e4f7c06f424b0b4702e701c2a21668')
+
+prepare() {
+ # remove strict build dependencies...
+ sed -e 's/==/>=/' -i $_name-$pkgver/pyproject.toml
+}
+
+build() {
+ cd $_name-$pkgver
+ JAROWINKLER_BUILD_EXTENSION=1 \
+ python -m build --wheel --no-isolation
+}
+
+check() {
+ local site_packages=$(python -c "import site;
print(site.getsitepackages()[0])")
+
+ cd $_name-$pkgver
+ python -m installer --destdir=test_dir dist/*.whl
+ export PYTHONPATH="test_dir/$site_packages:$PYTHONPATH"
+ pytest -vv
+}
+
+package() {
+ cd $_name-$pkgver
+ python -m installer --destdir="$pkgdir" dist/*.whl
+ install -Dm644 -t "$pkgdir"/usr/share/licenses/$pkgname LICENSE
+}