diff options
Diffstat (limited to 'community/py3-prometheus-client/APKBUILD')
-rw-r--r-- | community/py3-prometheus-client/APKBUILD | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/community/py3-prometheus-client/APKBUILD b/community/py3-prometheus-client/APKBUILD index 3a7782bd9e7..de57a750a7c 100644 --- a/community/py3-prometheus-client/APKBUILD +++ b/community/py3-prometheus-client/APKBUILD @@ -1,26 +1,36 @@ # Contributor: Rasmus Thomsen <oss@cogitri.dev> -# Maintainer: Rasmus Thomsen <oss@cogitri.dev> +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=py3-prometheus-client -pkgver=0.11.0 +pkgver=0.20.0 pkgrel=0 pkgdesc="Python3 client for the Prometheus monitoring system" url="https://github.com/prometheus/client_python" arch="noarch" license="Apache-2.0" depends="python3 py3-twisted" -makedepends="python3-dev py3-setuptools" -options="!check" # Pypi tarballs come without tests +makedepends="python3-dev py3-gpep517 py3-setuptools py3-wheel" +checkdepends="py3-asgiref py3-pytest" +subpackages="$pkgname-pyc" source="https://pypi.io/packages/source/p/prometheus_client/prometheus_client-$pkgver.tar.gz" builddir="$srcdir/prometheus_client-$pkgver" build() { - python3 setup.py build + gpep517 build-wheel \ + --wheel-dir .dist \ + --output-fd 3 3>&1 >&2 +} + +check() { + python3 -m venv --clear --without-pip --system-site-packages .testenv + .testenv/bin/python3 -m installer .dist/*.whl + .testenv/bin/python3 -m pytest } package() { - python3 setup.py install --prefix=/usr --root="$pkgdir" + python3 -m installer -d "$pkgdir" \ + .dist/*.whl } sha512sums=" -d8d2d50a0a771782ec947af59373c781e617bd46368eb4f9795b5d69a419e57c967ded0947512f52d3b6cd42e925e247dc2de4e9d38198d0acb9e72dff9c1af8 prometheus_client-0.11.0.tar.gz +9e5aed628b052790af8954eee7914b6480226368229bb0dade2f8c3f88ab04971d2a8a55558fd7dbb125894f30cea56363cc670deb0aa6822f31562437031fb2 prometheus_client-0.20.0.tar.gz " |