From a67f31c6df9f1e42859ab9b6da61c74adf966970 Mon Sep 17 00:00:00 2001 From: ptrcnull Date: Thu, 8 Aug 2024 20:10:31 +0200 Subject: [PATCH] testing/py3-confluent-kafka: build with gpep517 --- testing/py3-confluent-kafka/APKBUILD | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/testing/py3-confluent-kafka/APKBUILD b/testing/py3-confluent-kafka/APKBUILD index 6d9939383cf..2ca049a7fd8 100644 --- a/testing/py3-confluent-kafka/APKBUILD +++ b/testing/py3-confluent-kafka/APKBUILD @@ -3,14 +3,14 @@ pkgname=py3-confluent-kafka _pkgname=confluent-kafka-python pkgver=1.8.2 -pkgrel=4 +pkgrel=5 pkgdesc="Confluent's Apache Kafka Python clien" url="https://github.com/confluentinc/confluent-kafka-python" # x86, armhf, armv7: blocked by py3-fastavro arch="all !x86 !armhf !armv7" license="Apache-2.0" depends="py3-avro py3-fastavro py3-jsonschema py3-protobuf py3-requests" -makedepends="py3-setuptools python3-dev librdkafka-dev>=1.0.1" +makedepends="py3-setuptools python3-dev librdkafka-dev>=1.0.1 py3-gpep517" checkdepends="py3-pytest py3-trivup" options="!check" # missing deps subpackages="$pkgname-pyc" @@ -18,15 +18,20 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/confluentinc/confluent-kafka builddir="$srcdir/$_pkgname-$pkgver" build() { - python3 setup.py build + gpep517 build-wheel \ + --wheel-dir .dist \ + --output-fd 3 3>&1 >&2 } check() { - python3 setup.py build_ext --inplace - PYTHONPATH=. python3 -m pytest -v tests + python3 -m venv --clear --without-pip --system-site-packages .testenv + gpep517 install-wheel --destdir .testenv --prefix '' .dist/*.whl + .testenv/bin/python3 -m pytest } + package() { - python3 setup.py install --skip-build --root="$pkgdir" + gpep517 install-wheel --destdir "$pkgdir" \ + .dist/*.whl rm "$pkgdir"/usr/LICENSE.txt }