aboutsummaryrefslogtreecommitdiffstats
path: root/community/py3-httpretty/APKBUILD
blob: 70a15a8e5af5f21a84f31838fe85da8d02f47168 (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
# Maintainer: Valery Kartel <valery.kartel@gmail.com>
# Contributor: Valery Kartel <valery.kartel@gmail.com>
pkgname=py3-httpretty
pkgver=1.1.4
pkgrel=4
pkgdesc="HTTP client mocking tool for Python"
url="https://github.com/gabrielfalcao/HTTPretty"
arch="noarch"
license="MIT"
depends="python3"
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"
provides="py-httpretty=$pkgver-r$pkgrel"
builddir="$srcdir"/httpretty-$pkgver

build() {
	gpep517 build-wheel --wheel-dir .dist --output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" .dist/*.whl
}

sha512sums="
4daceea4f30ce181e871167d304bd7af9d504364f55d42f8025770f2efe7e833d018aed681c8733d653d4de90db3433e999c56bccd4675f81e66d1cc4023e418  httpretty-1.1.4.tar.gz
"