| 1 | # Contributor: Rejah Rehim <[email protected]> |
| 2 | # Contributor: Antoine Martin (ayakael) <[email protected]> |
| 3 | # Maintainer: Antoine Martin (ayakael) <[email protected]> |
| 4 | pkgname=py3-python-jwt |
| 5 | _pkgname=python_jwt |
| 6 | pkgver=4.1.0 |
| 7 | pkgrel=3 |
| 8 | pkgdesc="Module for generating and verifying JSON Web Tokens" |
| 9 | url="https://github.com/davedoesdev/python-jwt" |
| 10 | arch="noarch" |
| 11 | license="MIT" |
| 12 | depends="py3-jwcrypto" |
| 13 | makedepends="py3-gpep517 py3-setuptools py3-wheel" |
| 14 | checkdepends="py3-pyvows py3-gevent py3-coverage py3-mock npm" |
| 15 | subpackages="$pkgname-pyc" |
| 16 | source="https://files.pythonhosted.org/packages/source/p/$_pkgname/$_pkgname-$pkgver.tar.gz" |
| 17 | builddir="$srcdir"/$_pkgname-$pkgver |
| 18 | options="!check" # Test failure due to being too old |
| 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 | npm install jose |
| 30 | msg "Running pyvows tests (this will take a while)" |
| 31 | .testenv/bin/python3 -m test.run.run_pyvows --progress test |
| 32 | } |
| 33 | |
| 34 | package() { |
| 35 | python3 -m installer -d "$pkgdir" \ |
| 36 | .dist/*.whl |
| 37 | } |
| 38 | |
| 39 | sha512sums=" |
| 40 | fb6f39723c60659e09915ee36b2742974d73353e9026c1ac536d3256bd7bff55b596b68af51a882a7e8c52b9caf960c3888a417cc0361d0edd313f9167fabb55 python_jwt-4.1.0.tar.gz |
| 41 | " |