summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD34
2 files changed, 28 insertions, 22 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 7918b94ec1f3..481c18076e5f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,18 +1,22 @@
pkgbase = python-normality
pkgdesc = Micro-library for normalizing text strings
- pkgver = 2.2.3
+ pkgver = 2.3.3
pkgrel = 1
url = https://github.com/pudo/normality
arch = any
license = MIT
checkdepends = python-pytest
- checkdepends = python-pyicu>=1.9.3
+ checkdepends = python-pyicu
+ makedepends = python-build
+ makedepends = python-installer
makedepends = python-setuptools
- depends = python-banal>=1.0.1
+ makedepends = python-wheel
+ depends = python-banal
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
+ depends = python-charset-normalizer
+ optdepends = python-pyicu: greatly improves text transliteration compared to python-text-unidecode
+ source = python-normality-2.3.3.tar.gz::https://github.com/pudo/normality/archive/2.3.3.tar.gz
+ sha256sums = 8dc5ad1be2cc1edeabc5960419e61d07f35ffe4d51f8027181dd4f0c04bc962a
pkgname = python-normality
diff --git a/PKGBUILD b/PKGBUILD
index 80c26090974b..762fee6c9756 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,38 +1,40 @@
# Maintainer: Luis Martinez <luis dot martinez at disroot dot org>
pkgname=python-normality
-pkgver=2.2.3
+_pkg="${pkgname#python-}"
+pkgver=2.3.3
pkgrel=1
pkgdesc='Micro-library for normalizing text strings'
license=('MIT')
arch=('any')
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")
+depends=('python-banal' 'python-text-unidecode' 'python-chardet' 'python-charset-normalizer')
+optdepends=('python-pyicu: greatly improves text transliteration compared to python-text-unidecode')
+makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
+checkdepends=('python-pytest' 'python-pyicu')
source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz")
-sha256sums=('98bdc235cb069c18ec087f0866a2a82e3c8b992140f1fe3db95db9d202633fb3')
+sha256sums=('8dc5ad1be2cc1edeabc5960419e61d07f35ffe4d51f8027181dd4f0c04bc962a')
prepare() {
- cd "normality-$pkgver"
+ cd "$_pkg-$pkgver"
sed -i '/packages=find_packages/s/test/tests*/' setup.py
}
build() {
- cd "normality-$pkgver"
- python setup.py build
+ cd "$_pkg-$pkgver"
+ python -m build --wheel --no-isolation
}
check() {
- cd "normality-$pkgver"
- pytest
+ cd "$_pkg-$pkgver"
+ pytest -x
}
package() {
- 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/"
+ cd "$_pkg-$pkgver"
+ PYTHONHASHSEED=0 python -m installer --destdir="$pkgdir/" dist/*.whl
+ install -Dm644 README.md -t "$pkgdir/usr/share/doc/$pkgname/"
+ local _site="$(python -c 'import site; print(site.getsitepackages()[0])')"
+ install -d "$pkgdir/usr/share/licenses/$pkgname/"
+ ln -s "$_site/$_pkg-$pkgver.dist-info/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/"
}