| 1 | # Contributor: Fabian Affolter <[email protected]> |
| 2 | # Maintainer: Fabian Affolter <[email protected]> |
| 3 | pkgname=py3-translationstring |
| 4 | _pkgname=translationstring |
| 5 | pkgver=1.4 |
| 6 | pkgrel=5 |
| 7 | pkgdesc="A Python utility library for i18n" |
| 8 | url="https://pypi.org/project/translationstring/" # actual homepage doesn't exist anymore |
| 9 | arch="noarch" |
| 10 | license="ZPL-2.1" |
| 11 | depends="python3" |
| 12 | makedepends="py3-setuptools py3-gpep517" |
| 13 | subpackages="$pkgname-pyc" |
| 14 | source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" |
| 15 | builddir="$srcdir"/$_pkgname-$pkgver |
| 16 | |
| 17 | replaces="py-translationstring" # Backwards compatibility |
| 18 | provides="py-translationstring=$pkgver-r$pkgrel" # Backwards compatibility |
| 19 | |
| 20 | build() { |
| 21 | gpep517 build-wheel \ |
| 22 | --wheel-dir .dist \ |
| 23 | --output-fd 3 3>&1 >&2 |
| 24 | } |
| 25 | |
| 26 | check() { |
| 27 | python3 -m venv --clear --without-pip --system-site-packages .testenv |
| 28 | .testenv/bin/python3 -m installer .dist/*.whl |
| 29 | .testenv/bin/python3 -m unittest discover |
| 30 | } |
| 31 | |
| 32 | package() { |
| 33 | gpep517 install-wheel --destdir "$pkgdir" \ |
| 34 | .dist/*.whl |
| 35 | |
| 36 | # Reduce size by removing installed-tests |
| 37 | rm -rf "$pkgdir"/usr/lib/python3*/site-packages/translationstring/tests |
| 38 | } |
| 39 | |
| 40 | sha512sums=" |
| 41 | 2f06af782421fcf9ba907a8bc6419cd2c8f5352eee44d051ca1647b418f634e24220727b0eec748c9ead6aeb3c57ea1740356b65d6e2017fa0a395e1823ac81a translationstring-1.4.tar.gz |
| 42 | " |