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/APKBUILD38
1 files changed, 25 insertions, 13 deletions
diff --git a/community/py3-pytest-socket/APKBUILD b/community/py3-pytest-socket/APKBUILD
index a0d3b8b713b..966876b60e0 100644
--- a/community/py3-pytest-socket/APKBUILD
+++ b/community/py3-pytest-socket/APKBUILD
@@ -1,31 +1,43 @@
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=py3-pytest-socket
-pkgver=0.4.0
-pkgrel=0
+pkgver=0.7.0
+pkgrel=1
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 and not test_single_cli_arg_connect_disabled_hostname_resolved' \
+ --ignore tests/test_async.py
}
package() {
- python3 setup.py install --prefix=/usr --root="$pkgdir"
+ python3 -m installer -d "$pkgdir" \
+ .dist/*.whl
}
-sha512sums="47e6eec02106c755e24a0f9c6c7e811d79389a156797711bf9ec167ab3b0f89e1c5681193c32db2ddfdf15966b17de1a99f7d6534a0ddb47df4e08e94147e75b pytest-socket-0.4.0.tar.gz"
+sha512sums="
+fe8888819fef0f192f88a7509fe153b992c12a1fd1d56ae69c844a592fc403e3b5b13c4c3c4be89c8bf114f18d84fb6d6e8a8e3604d7fe454d090272689136f1 py3-pytest-socket-0.7.0.tar.gz
+"