community/py3-netaddr: upgrade to 0.9.0 & use gpep517 packaging

This commit is contained in:
Celeste 2023-09-19 05:48:38 +00:00 committed by Kevin Daudt
parent 4e297948a9
commit 0a3bc64bb2

View File

@ -2,14 +2,14 @@
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py3-netaddr
_pyname=netaddr
pkgver=0.8.0
pkgrel=5
pkgver=0.9.0
pkgrel=0
pkgdesc="A network address manipulation library for Python"
url="https://github.com/netaddr/netaddr"
arch="noarch"
license="BSD-3-Clause"
depends="python3"
makedepends="py3-setuptools"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/n/$_pyname/$_pyname-$pkgver.tar.gz"
@ -19,15 +19,22 @@ replaces="py-netaddr" # Backwards compatibility
provides="py-netaddr=$pkgver-r$pkgrel" # Backwards compatibility
build() {
python3 setup.py build
gpep517 build-wheel \
--wheel-dir .dist \
--output-fd 3 3>&1 >&2
}
check() {
python3 setup.py test
python3 -m venv --clear --without-pip --system-site-packages .testenv
.testenv/bin/python3 -m installer .dist/*.whl
.testenv/bin/python3 -m pytest -k 'not test_strategy_ipv6'
}
package() {
python3 setup.py install --skip-build --root="$pkgdir"
python3 -m installer -d "$pkgdir" \
.dist/*.whl
}
sha512sums="a158bef87e862330c583f8b6709c4f575ec036dd31d725dad679e583ad4bef1a34f43225453bc93970ab720ae5f9f0fc2a6a3b92cbb922ed6f201414fd1e96d3 netaddr-0.8.0.tar.gz"
sha512sums="
250b00a930f7180e1b4e18cb90de579733ffea9cd4ac93a3b7d2f7796b30c6b49d70da4b05ed522ebc9389600f4db8ecaed9345f7d0076632d0beae41e11c3ae netaddr-0.9.0.tar.gz
"