Skip to content
Snippets Groups Projects
Commit e4bf8d0a authored by Bart Ribbers's avatar Bart Ribbers
Browse files

community/py3-pytest-socket: upgrade to 0.6.0

parent 7221c9ad
1 merge request!48418community/py3-pytest-socket: upgrade to 0.6.0
Pipeline #169142 canceled
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=py3-pytest-socket
pkgver=0.5.1
pkgrel=2
pkgver=0.6.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"
checkdepends="py3-pytest-httpbin"
subpackages="$pkgname-pyc"
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
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 --skip-build --root="$pkgdir"
python3 -m installer -d "$pkgdir" \
.dist/*.whl
}
sha512sums="
e87f3350fb4db621f40c7f9061955a613fc11959789e5165717b656c78bc38f67e6323b028d900ce798b9fa48f8f9c8c37779972e8cb2b98d07548aed5edcdf8 pytest-socket-0.5.1.tar.gz
b70ab9fe3c41a707f16b6ae23d45e07238d03a731b3f99b794a6707303cd0301b75360ea164b7de48e9f2d56b5544e2da39373ba14a3b0fc20ef03afce03ab03 py3-pytest-socket-0.6.0.tar.gz
"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment