aboutsummaryrefslogtreecommitdiffstats
path: root/community/py3-pytest-socket/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/py3-pytest-socket/APKBUILD')
-rw-r--r--community/py3-pytest-socket/APKBUILD34
1 files changed, 22 insertions, 12 deletions
diff --git a/community/py3-pytest-socket/APKBUILD b/community/py3-pytest-socket/APKBUILD
index f7caeb873b4..2d5c041d734 100644
--- a/community/py3-pytest-socket/APKBUILD
+++ b/community/py3-pytest-socket/APKBUILD
@@ -1,33 +1,43 @@
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=py3-pytest-socket
-pkgver=0.4.1
+pkgver=0.7.0
pkgrel=0
pkgdesc="Pytest Plugin to disable socket calls during tests"
-url="https://pypi.org/project/pytest-socket/"
+url="https://github.com/miketheman/pytest-socket"
arch="noarch"
license="MIT"
-depends="
- py3-pytest
- python3
+depends="py3-pytest"
+makedepends="
+ poetry
+ py3-gpep517
+ py3-wheel
"
-makedepends="py3-setuptools"
-source="https://pypi.python.org/packages/source/p/pytest-socket/pytest-socket-$pkgver.tar.gz"
-options="!check" # No tests in pypi package and Github tarball unusable for distros
+checkdepends="py3-pytest-httpbin"
+subpackages="$pkgname-pyc"
+source="$pkgname-$pkgver.tar.gz::https://github.com/miketheman/pytest-socket/archive/refs/tags/$pkgver.tar.gz"
+options="net" # Required for tests
builddir="$srcdir/pytest-socket-$pkgver"
build() {
- python3 setup.py build
+ gpep517 build-wheel \
+ --wheel-dir .dist \
+ --output-fd 3 3>&1 >&2
}
check() {
- pytest
+ python3 -m venv --clear --without-pip --system-site-packages .testenv
+ .testenv/bin/python3 -m installer .dist/*.whl
+ # tests/test_async.py requires py3-httpx which is not available on ppc64le
+ .testenv/bin/python3 -m pytest -k 'not test_starlette and not test_asynctest' \
+ --ignore tests/test_async.py
}
package() {
- python3 setup.py install --prefix=/usr --root="$pkgdir"
+ python3 -m installer -d "$pkgdir" \
+ .dist/*.whl
}
sha512sums="
-d929c447767522ead4b6a2e1f27cda8459674a099ac222bf194a69e222837b97101cc6f3ab3eb177f2cf97af8d2aa7538fe4acdfc6eb63d11a902c3e09d0f48f pytest-socket-0.4.1.tar.gz
+fe8888819fef0f192f88a7509fe153b992c12a1fd1d56ae69c844a592fc403e3b5b13c4c3c4be89c8bf114f18d84fb6d6e8a8e3604d7fe454d090272689136f1 py3-pytest-socket-0.7.0.tar.gz
"