summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoromni <omni+alpine@hack.org>2023-10-26 20:01:03 +0000
committerKevin Daudt <kdaudt@alpinelinux.org>2024-01-11 22:19:17 +0000
commit685a38fd0d58026b39c17119947bd291d90b47d7 (patch)
treec426e1f0861b84c70cf026aea9b675bb84c95cab
parent915db7b0e79aea2672af0191b273c775a1f93296 (diff)
downloadaports-685a38fd0d58026b39c17119947bd291d90b47d7.zip
main/py3-mock: switch to gpep517
-rw-r--r--main/py3-mock/APKBUILD18
1 files 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="