summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorxiota2023-01-28 07:28:15 -0800
committerxiota2023-01-28 07:47:33 -0800
commit04a871c2acab5f38eace6c12d50365e7349f0ca2 (patch)
tree3f1215a28917adb06999183cdd0b8c2dd44a0d83
parenta641004004b41546ca2299e20d72c26dd41af463 (diff)
downloadaur-04a871c2acab5f38eace6c12d50365e7349f0ca2.tar.gz
Fix PKGBUILD, pin to last commit before project renamed
- change pkgver - fix source, license - generate missing README.rst - add missing makedepends - add provides, conflicts - add check, checkdepends
-rw-r--r--.SRCINFO18
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD56
3 files changed, 54 insertions, 24 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 6cf65b30608f..fce6687299b2 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,21 @@
pkgbase = python-fuzzywuzzy-git
pkgdesc = Fuzzy string matching in Python
- pkgver = r180.5f0eb1b
+ pkgver = 0.18.0.r3.g9e3d2fe
pkgrel = 1
- url = https://pypi.python.org/pypi/fuzzywuzzy
+ url = https://github.com/seatgeek/fuzzywuzzy
arch = any
- license = custom:unknown
+ license = GPL2
+ checkdepends = python-hypothesis
+ checkdepends = python-levenshtein
+ checkdepends = python-pycodestyle
+ checkdepends = python-pytest
+ makedepends = git
makedepends = python-setuptools
depends = python
optdepends = python-levenshtein: provides a 4-10x speedup in string matching
- source = git://github.com/seatgeek/fuzzywuzzy/
- md5sums = SKIP
+ provides = python-fuzzywuzzy
+ conflicts = python-fuzzywuzzy
+ source = python-fuzzywuzzy::git+https://github.com/seatgeek/fuzzywuzzy#commit=9e3d2fe0d8c1b195696d5fbcda78c371dd4a6b8f
+ sha256sums = SKIP
pkgname = python-fuzzywuzzy-git
-
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..018a3de08144
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+*
+!PKGBUILD
+!.SRCINFO
+!.gitignore
diff --git a/PKGBUILD b/PKGBUILD
index 2576c4b21c40..b2b40fd20101 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,32 +1,52 @@
-# Maintainer: Dobroslaw Kijowski [dobo] <dobo90_at_gmail.com>
+# Contributor: Dobroslaw Kijowski [dobo] <dobo90_at_gmail.com>
-pkgname=python-fuzzywuzzy-git
-_pkgname=fuzzywuzzy
-pkgver=r180.5f0eb1b
+_pkgname=python-fuzzywuzzy
+pkgname=$_pkgname-git
+pkgver=0.18.0.r3.g9e3d2fe
+# this is the last commit before project was renamed "thefuzz"
+_commit=9e3d2fe0d8c1b195696d5fbcda78c371dd4a6b8f
pkgrel=1
pkgdesc='Fuzzy string matching in Python'
arch=(any)
-url=https://pypi.python.org/pypi/fuzzywuzzy
-license=('custom:unknown')
-depends=(python)
-optdepends=('python-levenshtein: provides a 4-10x speedup in string matching')
-makedepends=(python-setuptools)
-source=(git://github.com/seatgeek/fuzzywuzzy/)
-md5sums=(SKIP)
+_url="https://pypi.python.org/pypi/fuzzywuzzy"
+url="https://github.com/seatgeek/fuzzywuzzy"
+license=('GPL2')
+depends=('python')
+provides=(${_pkgname})
+conflicts=(${provides[@]})
+optdepends=(
+ 'python-levenshtein: provides a 4-10x speedup in string matching'
+)
+makedepends=(
+ 'git'
+ 'python-setuptools'
+)
+checkdepends=(
+ 'python-hypothesis'
+ 'python-levenshtein'
+ 'python-pycodestyle'
+ 'python-pytest'
+)
+source=("$_pkgname"::"git+$url#commit=$_commit")
+sha256sums=(SKIP)
pkgver() {
- cd ${srcdir}/${_pkgname}
- printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ cd "$srcdir/$_pkgname"
+ git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
build() {
- cd ${srcdir}/${_pkgname}
+ cd "$srcdir/$_pkgname"
python setup.py build
}
+check() {
+ cd "$srcdir/$_pkgname"
+ # https://github.com/seatgeek/fuzzywuzzy/issues/284
+ pytest --deselect test_fuzzywuzzy_pytest.py::test_process_warning
+}
+
package() {
- cd ${srcdir}/${_pkgname}
- python setup.py install --root=${pkgdir} --optimize=1
- install -d -m 755 ${pkgdir}/usr/share/licenses/${pkgname}
- install -D -m 644 LICENSE.txt ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+ cd "$srcdir/$_pkgname"
+ python setup.py install --root="$pkgdir" --optimize=1
}