community/py3-httpretty: switch to gpep517

explicitly disable tests as no tests were run anyway, sure needs to be
packaged before tests can be enabled
This commit is contained in:
omni 2024-05-05 17:47:11 +00:00
parent 2f42e13cad
commit 73c3aad806

View File

@ -2,13 +2,15 @@
# Contributor: Valery Kartel <valery.kartel@gmail.com>
pkgname=py3-httpretty
pkgver=1.1.4
pkgrel=3
pkgrel=4
pkgdesc="HTTP client mocking tool for Python"
url="https://github.com/gabrielfalcao/HTTPretty"
arch="noarch"
license="MIT"
depends="python3"
makedepends="python3-dev py3-setuptools"
makedepends="py3-gpep517 py3-setuptools py3-wheel python3-dev"
checkdepends="py3-boto3 py3-httpx py3-pytest py3-requests py3-tornado"
options="!check" # missing module https://github.com/gabrielfalcao/sure
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/h/httpretty/httpretty-$pkgver.tar.gz"
replaces="py-httpretty"
@ -16,17 +18,17 @@ provides="py-httpretty=$pkgver-r$pkgrel"
builddir="$srcdir"/httpretty-$pkgver
build() {
python3 setup.py build
gpep517 build-wheel --wheel-dir .dist --output-fd 3 3>&1 >&2
}
check() {
python3 setup.py build
python3 -m venv --clear --without-pip --system-site-packages .testenv
.testenv/bin/python3 -m installer .dist/*.whl
.testenv/bin/python3 -m pytest
}
package() {
python3 setup.py install --skip-build --root="$pkgdir"
# Fix permissions on .EGG-INFO
chmod 644 "$pkgdir"/usr/lib/python3*/site-packages/*.egg-info/*
python3 -m installer -d "$pkgdir" .dist/*.whl
}
sha512sums="