diff options
author | Luis Martinez | 2021-09-29 22:50:13 -0500 |
---|---|---|
committer | Luis Martinez | 2021-09-29 22:50:13 -0500 |
commit | 52033e9732b6099157647ed20554c283fe16630a (patch) | |
tree | 89da11c8e44c134a5036fa789ccb753f40f50a84 | |
parent | 4bf0c1a28dabd3daacf3ab26be8eae8d627b1fa0 (diff) | |
download | aur-52033e9732b6099157647ed20554c283fe16630a.tar.gz |
update to 2.2.3
also cleaned up package according to Python packaging guidelines
-rw-r--r-- | .SRCINFO | 19 | ||||
-rw-r--r-- | PKGBUILD | 44 |
2 files changed, 40 insertions, 23 deletions
@@ -1,15 +1,18 @@ pkgbase = python-normality - pkgdesc = Micro-library to normalize text strings - pkgver = 2.0.0 + pkgdesc = Micro-library for normalizing text strings + pkgver = 2.2.3 pkgrel = 1 - url = http://github.com/pudo/normality + url = https://github.com/pudo/normality arch = any license = MIT + checkdepends = python-pytest + checkdepends = python-pyicu>=1.9.3 makedepends = python-setuptools - depends = python - source = https://files.pythonhosted.org/packages/source/n/normality/normality-2.0.0.tar.gz - sha256sums = 7998d4b7fcc339e342611377a6b5aaf74107b01e353c505978479a88bd9b9f3c + depends = python-banal>=1.0.1 + depends = python-text-unidecode + depends = python-chardet + optdepends = python-pyicu>=1.9.3: greatly improves text transliteration compared to python-text-unidecode + source = python-normality-2.2.3.tar.gz::https://github.com/pudo/normality/archive/2.2.3.tar.gz + sha256sums = 98bdc235cb069c18ec087f0866a2a82e3c8b992140f1fe3db95db9d202633fb3 pkgname = python-normality - depends = python - @@ -1,24 +1,38 @@ -pkgbase='python-normality' -pkgname=('python-normality') -_module='normality' -pkgver='2.0.0' +# Maintainer: Luis Martinez <luis dot martinez at disroot dot org> + +pkgname=python-normality +pkgver=2.2.3 pkgrel=1 -pkgdesc="Micro-library to normalize text strings" -url="http://github.com/pudo/normality" -depends=('python') -makedepends=('python-setuptools') +pkgdesc='Micro-library for normalizing text strings' license=('MIT') arch=('any') -source=("https://files.pythonhosted.org/packages/source/${_module::1}/$_module/$_module-$pkgver.tar.gz") -sha256sums=('7998d4b7fcc339e342611377a6b5aaf74107b01e353c505978479a88bd9b9f3c') +url='https://github.com/pudo/normality' +depends=('python-banal>=1.0.1' 'python-text-unidecode' 'python-chardet') +optdepends=('python-pyicu>=1.9.3: greatly improves text transliteration compared to python-text-unidecode') +makedepends=('python-setuptools') +checkdepends=('python-pytest' 'python-pyicu>=1.9.3') +# source=("https://files.pythonhosted.org/packages/source/${_module::1}/$_module/$_module-$pkgver.tar.gz") +source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz") +sha256sums=('98bdc235cb069c18ec087f0866a2a82e3c8b992140f1fe3db95db9d202633fb3') + +prepare() { + cd "normality-$pkgver" + sed -i '/packages=find_packages/s/test/tests*/' setup.py +} build() { - cd "${srcdir}/${_module}-${pkgver}" - python setup.py build + cd "normality-$pkgver" + python setup.py build +} + +check() { + cd "normality-$pkgver" + pytest } package() { - depends+=() - cd "${srcdir}/${_module}-${pkgver}" - python setup.py install --root="${pkgdir}" --optimize=1 --skip-build + cd "normality-$pkgver" + PYTHONHASHSEED=0 python setup.py install --root="${pkgdir}" --optimize=1 --skip-build + install -Dm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/" + install -Dm 644 README.md -t "$pkgdir/usr/share/doc/$pkgname/" } |