aboutsummaryrefslogtreecommitdiffstats
path: root/community/py3-pytest-httpx/APKBUILD
blob: ec39aab3cd89416d68f58fc4850d37197a6dbd84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Contributor: Duncan Bellamy <dunk@denkimushi.com>
# Maintainer: Duncan Bellamy <dunk@denkimushi.com>
pkgname=py3-pytest-httpx
pkgver=0.21.2
pkgrel=1
pkgdesc="send responses to httpx"
url="https://colin-b.github.io/pytest_httpx/"
arch="all !armhf !ppc64le" #limited by py3-httpx
license="MIT"
depends="py3-httpx py3-pytest"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest-asyncio"
source="$pkgname-$pkgver.tar.gz::https://github.com/Colin-b/pytest_httpx/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/pytest_httpx-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir dist \
		--output-fd 1
}

check() {
	python3 -m installer -d testenv \
		dist/pytest_httpx-$pkgver-py3-none-any.whl
	local sitedir="$(python3 -c 'import site;print(site.getsitepackages()[0])')"
	#deselected tests fail on [b''] not equal to []
	PYTHONPATH="$PWD/testenv/$sitedir" python3 -m pytest \
		--deselect tests/test_httpx_async.py::test_default_response_streaming \
		--deselect tests/test_httpx_sync.py::test_default_response_streaming
}

package() {
	python3 -m installer -d "$pkgdir" \
		dist/pytest_httpx-$pkgver-py3-none-any.whl
}

sha512sums="
d8a9d1381a7c1bb1f907effce48bcd4cad29b2eb135e5d18e7ba3025ba2f18d97c7914f0cfb835416dfa608c59ed51db653b0366d407cfbb82fc520808f3792e  py3-pytest-httpx-0.21.2.tar.gz
"