diff options
Diffstat (limited to 'community/py3-prometheus-client/APKBUILD')
-rw-r--r-- | community/py3-prometheus-client/APKBUILD | 35 |
1 files changed, 26 insertions, 9 deletions
diff --git a/community/py3-prometheus-client/APKBUILD b/community/py3-prometheus-client/APKBUILD index 94cd2feb8f3..d13251e1dce 100644 --- a/community/py3-prometheus-client/APKBUILD +++ b/community/py3-prometheus-client/APKBUILD @@ -1,24 +1,41 @@ # Contributor: Rasmus Thomsen <oss@cogitri.dev> -# Maintainer: Rasmus Thomsen <oss@cogitri.dev> +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=py3-prometheus-client -pkgver=0.9.0 -pkgrel=0 +pkgver=0.20.0 +pkgrel=1 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 -source="https://pypi.io/packages/source/p/prometheus_client/prometheus_client-$pkgver.tar.gz" +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 + $pkgname-label.patch::https://github.com/prometheus/client_python/commit/4535ce0f43097aa48e44a65747d82064f2aadaf5.patch + " 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 + # https://github.com/prometheus/client_python/issues/1020 + .testenv/bin/python3 -m pytest \ + --ignore=tests/test_asgi.py } package() { - python3 setup.py install --prefix=/usr --root="$pkgdir" + python3 -m installer -d "$pkgdir" \ + .dist/*.whl } -sha512sums="5b6ae0e22afdc2cdc3f1a03429a950d84d1ad5e6445d8b97db7b9fd124ae1beaa256ccb595486becc6bfa7029eca53bdaf18c0f93da8988ae853bc32c96692f0 prometheus_client-0.9.0.tar.gz" +sha512sums=" +9e5aed628b052790af8954eee7914b6480226368229bb0dade2f8c3f88ab04971d2a8a55558fd7dbb125894f30cea56363cc670deb0aa6822f31562437031fb2 prometheus_client-0.20.0.tar.gz +866e9a0dd25b5cb91f2c350b5b36a8729b65ffd8477dacb378de866c79eef23e5c97859d613c7d4dfe02df87e7da8c15f7ec426f560fc9a5d17dbb05308e1738 py3-prometheus-client-label.patch +" |