testing/py3-geoip: build with gpep517

This commit is contained in:
ptrcnull 2024-08-08 20:14:11 +02:00
parent ec29d33ea6
commit 1a3c7289ba

View File

@ -2,28 +2,33 @@
# Maintainer: Weilu Jia <optix2000@gmail.com>
pkgname=py3-geoip
pkgver=1.3.2
pkgrel=3
pkgrel=4
pkgdesc="MaxMind GeoIP Legacy Database - Python API"
url="https://github.com/maxmind/geoip-api-python"
arch="all"
license="LGPL-2.1-or-later"
depends="python3 geoip"
makedepends="py3-setuptools python3-dev geoip-dev"
makedepends="py3-setuptools python3-dev geoip-dev py3-gpep517"
checkdepends="py3-nose"
options="!check" # Until there's an easy way to download legacy GeoIP DBs
source="https://pypi.python.org/packages/source/G/GeoIP/GeoIP-$pkgver.tar.gz"
builddir="$srcdir/GeoIP-$pkgver"
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
gpep517 install-wheel --destdir .testenv --prefix '' .dist/*.whl
.testenv/bin/python3 -m nose
}
package() {
python3 setup.py install --skip-build --root="$pkgdir"
gpep517 install-wheel --destdir "$pkgdir" \
.dist/*.whl
}
sha512sums="