From 685a38fd0d58026b39c17119947bd291d90b47d7 Mon Sep 17 00:00:00 2001 From: omni Date: Thu, 26 Oct 2023 20:01:03 +0000 Subject: main/py3-mock: switch to gpep517 --- main/py3-mock/APKBUILD | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/main/py3-mock/APKBUILD b/main/py3-mock/APKBUILD index a1b05da016c..90264c15712 100644 --- a/main/py3-mock/APKBUILD +++ b/main/py3-mock/APKBUILD @@ -3,12 +3,12 @@ pkgname=py3-mock _pkgname=mock pkgver=5.1.0 -pkgrel=0 +pkgrel=1 pkgdesc="Python3 Mocking and Patching Library for Testing" url="https://github.com/testing-cabal/mock" arch="noarch" license="BSD-2-Clause" -makedepends="py3-setuptools py3-pbr" +makedepends="py3-gpep517 py3-setuptools py3-wheel py3-pbr" subpackages="$pkgname-pyc" source="https://files.pythonhosted.org/packages/source/m/mock/mock-$pkgver.tar.gz" builddir="$srcdir/$_pkgname-$pkgver" @@ -18,16 +18,18 @@ replaces="py-mock" # Backwards compatibility provides="py-mock=$pkgver-r$pkgrel" # Backwards compatibility build() { - python3 setup.py build -} - -package() { - python3 setup.py install --skip-build --root="$pkgdir" + 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 # The skipped test checks internal Python unittest behavior and fails - python3 -m pytest -k "not test_bool_not_called" + .testenv/bin/python3 -m pytest -k "not test_bool_not_called" +} + +package() { + python3 -m installer -d "$pkgdir" .dist/*.whl } sha512sums=" -- cgit v1.2.3