| 1 | # Contributor: Oleg Titov <[email protected]> |
| 2 | # Maintainer: Oleg Titov <[email protected]> |
| 3 | pkgname=py3-mnemonic |
| 4 | pkgver=0.21 |
| 5 | pkgrel=2 |
| 6 | pkgdesc="Python mnemonic code for generating deterministic keys, BIP39" |
| 7 | url="https://github.com/trezor/python-mnemonic" |
| 8 | arch="noarch" |
| 9 | license="MIT" |
| 10 | makedepends="py3-gpep517 py3-poetry-core" |
| 11 | checkdepends="py3-pytest" |
| 12 | subpackages="$pkgname-doc $pkgname-pyc" |
| 13 | source="mnemonic-$pkgver.tar.gz::https://github.com/trezor/python-mnemonic/archive/refs/tags/v$pkgver.tar.gz" |
| 14 | builddir="$srcdir/python-mnemonic-$pkgver" |
| 15 | |
| 16 | build() { |
| 17 | gpep517 build-wheel \ |
| 18 | --wheel-dir .dist \ |
| 19 | --output-fd 3 3>&1 >&2 |
| 20 | } |
| 21 | |
| 22 | check() { |
| 23 | python3 -m venv --clear --without-pip --system-site-packages .testenv |
| 24 | .testenv/bin/python3 -m installer .dist/*.whl |
| 25 | .testenv/bin/python3 -m pytest |
| 26 | } |
| 27 | |
| 28 | package() { |
| 29 | python3 -m installer -d "$pkgdir" \ |
| 30 | .dist/*.whl |
| 31 | |
| 32 | install -Dm644 README.rst -t "$pkgdir"/usr/share/doc/$pkgname |
| 33 | } |
| 34 | |
| 35 | sha512sums=" |
| 36 | b541052fb48291cf4976fc750d7d502152ac5ef33e203edde9158d768ae826766626ae9979821f3123ea8cf2abec023415e7f8a6dc3fd69d15d9a0570ee3c83c mnemonic-0.21.tar.gz |
| 37 | " |