| 1 | # Contributor: Carlo Landmeter <[email protected]> |
| 2 | # Maintainer: Francesco Colista <[email protected]> |
| 3 | pkgname=py3-idna |
| 4 | _pkgname=idna |
| 5 | pkgver=3.20 |
| 6 | pkgrel=0 |
| 7 | pkgdesc="IDNA 2008 and UTS #46 for Python3" |
| 8 | url="https://github.com/kjd/idna" |
| 9 | arch="noarch" |
| 10 | license="BSD-3-Clause" |
| 11 | depends="python3" |
| 12 | makedepends=" |
| 13 | py3-gpep517 |
| 14 | py3-hypothesis |
| 15 | py3-flit-core |
| 16 | py3-installer |
| 17 | py3-wheel |
| 18 | " |
| 19 | checkdepends="py3-pytest" |
| 20 | subpackages="$pkgname-pyc" |
| 21 | source="$_pkgname-$pkgver.tar.gz::https://github.com/kjd/idna/archive/v$pkgver.tar.gz" |
| 22 | builddir="$srcdir/$_pkgname-$pkgver" |
| 23 | |
| 24 | replaces="py-idna" # Backwards compatibility |
| 25 | provides="py-idna=$pkgver-r$pkgrel" # Backwards compatibility |
| 26 | |
| 27 | # secfixes: |
| 28 | # 3.7-r0: |
| 29 | # - CVE-2024-3651 |
| 30 | |
| 31 | build() { |
| 32 | gpep517 build-wheel \ |
| 33 | --wheel-dir .dist \ |
| 34 | --output-fd 3 3>&1 >&2 |
| 35 | } |
| 36 | |
| 37 | check() { |
| 38 | python3 -m venv --clear --without-pip --system-site-packages .testenv |
| 39 | .testenv/bin/python3 -m installer .dist/*.whl |
| 40 | .testenv/bin/python3 -m pytest |
| 41 | } |
| 42 | |
| 43 | package() { |
| 44 | python3 -m installer -d "$pkgdir" \ |
| 45 | .dist/$_pkgname-$pkgver-py3-none-any.whl |
| 46 | } |
| 47 | |
| 48 | sha512sums=" |
| 49 | fd3afe8d531a68dde34d18f749765b6e5556aee22c0c2eaf42032ffbb588b833100dd9a7f85eb4e81ddba6d0be051a953d2573f9f98f08ed91c187cd2f8c6613 idna-3.20.tar.gz |
| 50 | " |