| 1 | # Contributor: Fabian Affolter <[email protected]> |
| 2 | # Maintainer: Fabian Affolter <[email protected]> |
| 3 | pkgname=py3-python-stdnum |
| 4 | _pkgname=python_stdnum |
| 5 | pkgver=2.2 |
| 6 | pkgrel=1 |
| 7 | pkgdesc="Python module to handle standardized numbers and codes" |
| 8 | url="https://arthurdejong.org/python-stdnum" |
| 9 | arch="noarch" |
| 10 | license="LGPL-2.0-or-later" |
| 11 | depends="python3" |
| 12 | makedepends="py3-setuptools py3-gpep517" |
| 13 | checkdepends="py3-pytest py3-pytest-cov" |
| 14 | subpackages="$pkgname-pyc" |
| 15 | source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" |
| 16 | builddir="$srcdir"/$_pkgname-$pkgver |
| 17 | |
| 18 | replaces="py-stdnum" # Backwards compatibility |
| 19 | provides="py-stdnum=$pkgver-r$pkgrel" # Backwards compatibility |
| 20 | |
| 21 | build() { |
| 22 | gpep517 build-wheel \ |
| 23 | --wheel-dir .dist \ |
| 24 | --output-fd 3 3>&1 >&2 |
| 25 | } |
| 26 | |
| 27 | check() { |
| 28 | python3 -m venv --clear --without-pip --system-site-packages .testenv |
| 29 | .testenv/bin/python3 -m installer .dist/*.whl |
| 30 | .testenv/bin/python3 -m pytest |
| 31 | } |
| 32 | |
| 33 | package() { |
| 34 | gpep517 install-wheel --destdir "$pkgdir" \ |
| 35 | .dist/*.whl |
| 36 | } |
| 37 | |
| 38 | sha512sums=" |
| 39 | a4092ce09817e1606908836c8068f3dc9ccc69a21c969757fb052d755f5a475503cb722fe55100201843b551194174a27bd9ef1818a0f3befa1578dc6395234f python_stdnum-2.2.tar.gz |
| 40 | " |