summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD52
1 files changed, 52 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..00ad4c4fee31
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,52 @@
+# Maintainer: Julian Daube <joposter (at) gmail (dot) com>
+# Contributor: Julian Daube <joposter (at) gmail (dot) com>
+
+pkgname=python-rapidfuzz-git
+pkgver=0.6.3.r73.g0007571
+pkgrel=1
+pkgdesc="Rapid fuzzy string matching in Python using the Levenshtein Distance"
+
+url="https://github.com/maxbachmann/rapidfuzz"
+arch=("any")
+license=("MIT")
+provides=("python-rapidfuzz")
+
+source=("$pkgname::git+https://github.com/maxbachmann/rapidfuzz"
+ "$pkgname-cpp::git+https://github.com/maxbachmann/rapidfuzz-cpp"
+)
+
+depends=("python")
+makedepends=("python-setuptools" "gcc" "python-pytest")
+
+pkgver() {
+ cd "$pkgname"
+ git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+prepare() {
+ cd "$pkgname"
+ git submodule init
+ git config submodule."src/rapidfuzz-cpp".url "$srcdir/"$pkgname-cpp
+ git submodule update
+}
+
+check() {
+ cd "$pkgname"
+ pytest
+}
+
+build() {
+ cd "$pkgname"
+ python setup.py build
+}
+
+package() {
+ cd "$pkgname"
+ python setup.py install --root="$pkgdir" --optimize=1 --skip-build
+
+ install -Dm 644 LICENSE "$pkgdir"/usr/share/licenses/python-rapidfuzz/LICENSE
+}
+
+
+md5sums=("SKIP" "SKIP")
+