diff options
author | xiota | 2023-01-28 07:28:15 -0800 |
---|---|---|
committer | xiota | 2023-01-28 07:47:33 -0800 |
commit | 04a871c2acab5f38eace6c12d50365e7349f0ca2 (patch) | |
tree | 3f1215a28917adb06999183cdd0b8c2dd44a0d83 | |
parent | a641004004b41546ca2299e20d72c26dd41af463 (diff) | |
download | aur-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-- | .SRCINFO | 18 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 56 |
3 files changed, 54 insertions, 24 deletions
@@ -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 @@ -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 } |