summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD44
1 files changed, 29 insertions, 15 deletions
diff --git a/PKGBUILD b/PKGBUILD
index e41a00129597..80c26090974b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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/"
}